/* Additions on top of the original site's compiled Tailwind (tailwind.css). */

html { -webkit-text-size-adjust: 100%; }
body { background: #fff; overflow-x: hidden; }

/* Download page: five platform tiles (the original had four). */
@media (min-width: 768px) { .so-grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .so-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.so-soon { opacity: .75; cursor: not-allowed; }
.so-soon:hover { background: #fff; color: var(--color-brand-red); transform: none; }

/* Deck page stamp buttons: the original used a framer-motion spring
   (hover scale 1.03 / rotate -0.75deg / contrast 1.1, tap scale .96 / rotate .5deg / y +2px). */
.so-stamp { transition: transform .32s cubic-bezier(.34, 1.56, .64, 1), filter .2s, background-color .15s, color .15s; }
.so-stamp:hover { transform: scale(1.03) rotate(-.75deg); filter: contrast(1.1); }
.so-stamp:active { transform: scale(.96) rotate(.5deg) translateY(2px); transition-duration: .12s; }
.so-stamp-grain {
  background-image:
    radial-gradient(circle at 10% 20%, rgba(255,255,255,.8) 1px, transparent 1px),
    radial-gradient(circle at 80% 80%, rgba(0,0,0,.7) 1.5px, transparent 1.5px),
    radial-gradient(circle at 40% 60%, rgba(255,255,255,.6) 1.2px, transparent 1.2px),
    radial-gradient(circle at 70% 30%, rgba(0,0,0,.6) 1.8px, transparent 1.8px);
  background-size: 14px 14px, 18px 18px, 22px 22px, 16px 16px;
}

/* Phones: the original header ran off the right edge below ~450px. Below 480px the social
   buttons move into the menu (and stay in the footer) so nothing is cut off. */
.so-menu-social { display: none; }
@media (max-width: 479px) {
  .so-head-social { display: none !important; }
  .so-menu-social { display: flex; }
  .so-wordmark { font-size: 19px; }
}
@media (max-width: 340px) { .so-wordmark { font-size: 16px; } }
.so-menu-dot { box-shadow: 0 0 0 2px #fff; }

/* Terms / Privacy pages */
.so-legal { font-family: var(--font-sans); font-size: 15px; line-height: 1.65; color: #27272a; overflow-wrap: anywhere; }
.so-legal h1 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; color: #09090b; font-size: 30px; line-height: 1.1; margin: 0 0 18px; }
.so-legal h2 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; color: var(--color-brand-red); font-size: 20px; line-height: 1.2; margin: 30px 0 10px; }
.so-legal h3 { font-weight: 700; color: #09090b; font-size: 16px; margin: 22px 0 8px; }
.so-legal p { margin: 0 0 12px; }
.so-legal ul, .so-legal ol { margin: 0 0 14px; padding-left: 22px; }
.so-legal ul { list-style: disc; }
.so-legal ol { list-style: decimal; }
.so-legal li { margin: 4px 0; }
.so-legal a { color: var(--color-brand-red); text-decoration: underline; }
.so-legal strong { color: #09090b; }
.so-legal blockquote { margin: 0 0 18px; padding: 12px 16px; border-left: 4px solid var(--color-brand-red); background: #fff1f2; border-radius: 12px; }
.so-legal blockquote p { margin: 0; }
.so-legal hr { border: 0; border-top: 1px solid #e4e4e7; margin: 24px 0; }
.so-legal table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 14px; display: block; overflow-x: auto; }
.so-legal th, .so-legal td { border: 1px solid #e4e4e7; padding: 6px 10px; text-align: left; vertical-align: top; }
.so-legal code { background: #f4f4f5; padding: 1px 5px; border-radius: 4px; font-size: 13px; }
@media (min-width: 640px) { .so-legal h1 { font-size: 40px; } .so-legal h2 { font-size: 24px; } }

/* utilities the original build didn't include */
.border-white\/60 { border-color: rgba(255,255,255,.6); }
.object-cover { object-fit: cover; }
@media (min-width: 640px) { .sm\:p-10 { padding: 2.5rem; } }
/* the original rendered these as <button>s, which Tailwind's reset keeps in their written case */
.so-nt { text-transform: none; }

/* Deck page: gallery of every card in the deck (under the picture / cart / buy area). */
.so-gallery { background: #121212; border: 1px solid #27272a; border-radius: 1.5rem; padding: 20px 14px 18px; box-shadow: 0 25px 50px -12px rgba(0,0,0,.25); }
.so-gallery-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 0 2px; }
.so-gallery-count { flex-shrink: 0; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #a1a1aa; border: 1px solid #3f3f46; border-radius: 9999px; padding: 4px 10px; white-space: nowrap; }
.so-gallery-hint { margin: 8px 2px 16px; font-size: 13px; color: #a1a1aa; font-family: var(--font-sans); }
.so-gallery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.so-gcard { display: block; width: 100%; aspect-ratio: 5 / 7; padding: 0; border: 0; border-radius: 8px; overflow: hidden; cursor: zoom-in; background: #27272a;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 4px 10px rgba(0,0,0,.45); transition: transform .18s ease, box-shadow .18s ease; }
.so-gcard img { display: block; width: 100%; height: 100%; object-fit: fill; }
.so-gcard:hover { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--color-brand-red), 0 10px 20px rgba(0,0,0,.5); }
.so-gcard:focus-visible { outline: none; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--color-brand-red); }
@media (min-width: 480px) { .so-gallery-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 640px) { .so-gallery { padding: 32px; } .so-gallery-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; } .so-gcard { border-radius: 10px; } }
@media (min-width: 900px) { .so-gallery-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .so-gallery-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 14px; } }

/* Card viewer (lightbox): arrows, swipe, keyboard arrows, Esc / close button. */
html.so-lb-lock, html.so-lb-lock body { overflow: hidden; }
.so-lb { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; height: 100vh; height: 100dvh;
  background: rgba(9,9,11,.94); color: #fff; font-family: var(--font-ui, var(--font-sans)); animation: so-lb-in .18s ease-out; }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { .so-lb { background: rgba(9,9,11,.86); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); } }
@keyframes so-lb-in { from { opacity: 0; } to { opacity: 1; } }
.so-lb-top { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left)); }
.so-lb-title { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.so-lb-deck { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--color-brand-red); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.so-lb-name { font-family: var(--font-display); font-size: 20px; line-height: 1.1; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.so-lb-btn { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 9999px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08); color: #fff; cursor: pointer; transition: background-color .15s, border-color .15s, transform .15s; -webkit-tap-highlight-color: transparent; }
.so-lb-btn:hover { background: var(--color-brand-red); border-color: var(--color-brand-red); }
.so-lb-btn:active { transform: scale(.94); }
.so-lb-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.so-lb-stage { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 16px; padding: 4px 16px; touch-action: pan-y; }
/* The frame fills the space between the arrows; the card is the largest 5:7 box that fits in it. */
.so-lb-frame { flex: 1 1 auto; min-width: 0; align-self: stretch; container-type: size; display: flex; align-items: center; justify-content: center; }
.so-lb-frame img { display: block; width: min(100%, 52vh); width: min(100cqw, 100cqh * 5 / 7); height: auto; aspect-ratio: 5 / 7; object-fit: contain; border-radius: 14px;
  box-shadow: 0 25px 60px rgba(0,0,0,.6); user-select: none; -webkit-user-select: none; transition: filter .2s; background: #18181b; }
.so-lb-frame img.so-lb-soft { filter: blur(1.5px); }
.so-lb-side { display: none; width: 56px; height: 56px; }
.so-lb-bottom { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; gap: 28px; padding: 10px 16px max(16px, env(safe-area-inset-bottom)); }
.so-lb-count { min-width: 76px; text-align: center; font-size: 14px; font-weight: 700; letter-spacing: .06em; color: #d4d4d8; }
@media (min-width: 768px) {
  .so-lb-side { display: inline-flex; }
  .so-lb-low { display: none; }
  .so-lb-stage { padding: 8px 24px; gap: 28px; }
  .so-lb-name { font-size: 24px; }
  .so-lb-bottom { padding-top: 12px; padding-bottom: max(20px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .so-lb { animation: none; } .so-gcard { transition: none; } }

/* Store: flipped deck + expanding gallery panel (full grid row, right under the card's row). */
.so-store-grid { --so-g: 24px; gap: var(--so-g); }
@media (min-width: 640px) { .so-store-grid { --so-g: 32px; } }
.so-flip-target { -webkit-tap-highlight-color: transparent; }
.so-flip-target:focus-visible { outline: 3px solid #fff; outline-offset: 6px; border-radius: 1rem; }
.so-panel { grid-column: 1 / -1; min-width: 0; display: grid; grid-template-rows: 0fr; opacity: 0; margin-top: calc(-1 * var(--so-g));
  transition: grid-template-rows .5s cubic-bezier(.4,0,.2,1), opacity .35s ease, margin-top .5s cubic-bezier(.4,0,.2,1); }
.so-panel.so-open { grid-template-rows: 1fr; opacity: 1; margin-top: 0; }
.so-panel-inner { min-height: 0; min-width: 0; overflow: hidden; padding: 4px; margin: -4px; }
.so-gallery-store { max-width: 100%; }
.so-gallery-store .so-gcard { }
@media (prefers-reduced-motion: reduce) { .so-panel { transition: none; } }
.so-deck { scroll-margin-top: 88px; }

/* digital deck purchase options */
.so-option .mt-auto { margin-top: auto; }
.so-option { min-width: 0; }
