/* Animal Auction, Direction C "Thumb Deck": shared kit.
   Tokens are the app's own (ui/theme.ts, ui/hub/parts.tsx, ui/online/EntryKit.tsx, gacha/look.ts).
   Kit changes from today: one carved "deck" tray replaces separate planks; under-edges 4px (was 4-6);
   sheets are paper with a wood lip and a grab tab; opponent tags become portrait badges. */

@font-face { font-family: Fredoka; font-weight: 500; src: url(assets/fonts/Fredoka_500Medium.ttf); }
@font-face { font-family: Fredoka; font-weight: 600; src: url(assets/fonts/Fredoka_600SemiBold.ttf); }
@font-face { font-family: Fredoka; font-weight: 700; src: url(assets/fonts/Fredoka_700Bold.ttf); }
@font-face { font-family: Lilita; font-weight: 400; src: url(assets/fonts/LilitaOne_400Regular.ttf); }

:root {
  /* toy kit */
  --wood: #d9965a; --wood-dark: #a86a3e; --wood-light: #f2c48a; --wood-deep: #7d4a26;
  --ink: #4a2a14; --paper: #fff3dc; --cream: #fffaf0; --muted: #7a5a3e;
  --gold: #ffd24a; --gold-dark: #d99a1e; --gold-edge: #b97d14; --coin-light: #ffe48a;
  --leaf: #4f9a3a; --leaf-edge: #3c7a2b; --leaf-tint: #e4f1d3; --leaf-ink: #33661f;
  --danger: #b8322f; --positive: #2a8a3c; --you: #3b2a8a; --dot: #e8456b; --dot-ink: #c4264f; --turn: #e0782e;
  --silver: #d9d3c6; --silver-dark: #8f8776;
  /* cards */
  --grief: #cc5460; --chaos: #e0a830; --nice: #2ba040; --defense: #3b6fd0;
  /* gacha */
  --g-ink: #24183f; --g-night: #120d2e; --g-roll: #1c1450;
  --t-common: #cfc8b8; --t-rare: #4f8dff; --t-epic: #b25cff; --t-legendary: #ffb81a; --t-ultra: #ff5fa8;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-sheet: cubic-bezier(0.32, 0.72, 0, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
::selection { background: var(--gold); color: var(--ink); }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
img { display: block; }
.i { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.i.fill { fill: currentColor; stroke: none; }
.i.sm { width: 18px; height: 18px; } .i.xs { width: 14px; height: 14px; } .i.lg { width: 30px; height: 30px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- review page shell ---------- */
html, body.review { background: #2a1d12; }
body.review { font-family: Fredoka, system-ui, sans-serif; font-weight: 600; color: #f6e7cf; min-height: 100vh; }
.rv-head { display: flex; align-items: center; gap: 18px; padding: 18px 28px 12px; }
.rv-head a.back { color: #f2c48a; text-decoration: none; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 4px; }
.rv-head h1 { font-family: Lilita; font-weight: 400; font-size: 28px; letter-spacing: .01em; color: #fff3dc; }
.rv-head .dir { font-size: 13px; color: #c9a27a; margin-left: auto; }
.rv-states { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 28px 16px; align-items: center; }
.rv-states button { height: 36px; padding: 0 14px; border-radius: 10px; background: #3d2a1a; color: #f2c48a; font-weight: 600; font-size: 14px; border: 2px solid #5a3d25; transition: background .15s, color .15s; }
.rv-states button:hover { background: #4a3320; }
.rv-states button[aria-pressed=true] { background: var(--gold); color: var(--ink); border-color: var(--gold-edge); }
.rv-states .play { background: #2f4a22; border-color: #4f7a34; color: #d8f0c4; }
.rv-states .sep { width: 1px; height: 24px; background: #5a3d25; margin: 0 4px; }
.rv-frames { display: flex; gap: 32px; padding: 0 28px 24px; align-items: flex-start; }
.rv-col { display: flex; flex-direction: column; gap: 8px; }
.rv-col .lbl { font-size: 13px; color: #c9a27a; display: flex; gap: 10px; align-items: baseline; }
.rv-col .lbl a { color: #f2c48a; font-size: 12px; }
.rv-desk-wrap { position: relative; overflow: hidden; border-radius: 14px; box-shadow: 0 20px 50px -20px rgba(0,0,0,.7); }
.rv-desk-wrap > .frame { transform-origin: 0 0; position: absolute; left: 0; top: 0; }
.rv-notes { padding: 8px 28px 48px; display: grid; grid-template-columns: minmax(300px, 520px) minmax(400px, 1fr); gap: 32px; max-width: 1500px; }
.rv-notes h2 { font-family: Lilita; font-weight: 400; font-size: 20px; color: #fff3dc; margin-bottom: 10px; }
.rv-notes ul { list-style: none; display: grid; gap: 8px; font-weight: 500; font-size: 14.5px; line-height: 1.45; color: #ecd9bd; }
.rv-notes li { padding-left: 16px; position: relative; }
.rv-notes li::before { content: ""; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 3px; background: var(--gold); }
.rv-notes table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-weight: 500; }
.rv-notes th { text-align: left; color: #c9a27a; font-weight: 600; padding: 6px 10px; border-bottom: 2px solid #5a3d25; }
.rv-notes td { padding: 7px 10px; border-bottom: 1px solid #3d2a1a; color: #ecd9bd; vertical-align: top; }
.rv-notes td:first-child { color: #fff3dc; font-weight: 600; width: 38%; }
.tag-keep { color: #9fd38a; } .tag-move { color: #ffd27a; } .tag-merge { color: #b9a6ff; }
.rv-measure { font-size: 13px; color: #9fd38a; }
body.rv-solo { background: #000; }
body.rv-solo .rv-head, body.rv-solo .rv-states, body.rv-solo .rv-notes, body.rv-solo .rv-col > .lbl { display: none; }
body.rv-solo .rv-frames { padding: 0; gap: 0; }
body.rv-solo .rv-desk-wrap { border-radius: 0; box-shadow: none; }

/* ---------- device frames ---------- */
.frame { position: relative; overflow: hidden; font-family: Fredoka, system-ui, sans-serif; font-weight: 600; color: var(--ink); font-size: 14px; background: #1a1209; }
.frame.phone { width: 390px; height: 844px; border-radius: 44px; box-shadow: 0 0 0 10px #120c07, 0 0 0 11px #3d2a1a, 0 30px 60px -20px rgba(0,0,0,.8); margin: 11px; }
body.rv-solo .frame.phone { border-radius: 0; box-shadow: none; margin: 0; }
.frame.desk { width: 1440px; height: 900px; }
.statusbar { position: absolute; z-index: 90; top: 0; left: 0; right: 0; height: 47px; display: flex; align-items: center; justify-content: space-between; padding: 6px 30px 0 36px; color: #fff; font: 600 16px/1 -apple-system, "SF Pro Text", Fredoka, sans-serif; pointer-events: none; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.statusbar.dark { color: #1a1209; text-shadow: none; }
.statusbar .sb-r { display: flex; gap: 6px; align-items: center; }
.statusbar .bat { width: 25px; height: 12px; border: 1.5px solid currentColor; border-radius: 4px; padding: 1.5px; opacity: .95; }
.statusbar .bat::after { content: ""; display: block; height: 100%; width: 78%; background: currentColor; border-radius: 1.5px; }
.statusbar .sig { display: flex; gap: 2px; align-items: flex-end; height: 11px; }
.statusbar .sig i { width: 3px; background: currentColor; border-radius: 1px; }
.homebar { position: absolute; z-index: 95; bottom: 8px; left: 50%; width: 134px; height: 5px; margin-left: -67px; border-radius: 3px; background: rgba(20,10,4,.75); pointer-events: none; }
.homebar.light { background: rgba(255,255,255,.8); }

/* ---------- art layer ---------- */
.art { position: absolute; inset: 0; overflow: hidden; }
.art .bg { position: absolute; inset: -12px; background-size: cover; background-position: center; filter: blur(3px) saturate(1.05); transform: scale(1.04); }
.art .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,12,5,.28) 0%, rgba(20,12,5,0) 18%, rgba(20,12,5,0) 52%, rgba(30,16,6,.55) 100%); }
.hero { position: absolute; left: 50%; transform: translateX(-50%); }
.hero img { width: 100%; height: auto; filter: drop-shadow(0 18px 18px rgba(20,10,0,.35)); }
.hero .contact { position: absolute; left: 18%; right: 18%; bottom: 3%; height: 7%; border-radius: 50%; background: radial-gradient(closest-side, rgba(20,10,0,.45), rgba(20,10,0,0)); z-index: -1; }
@keyframes idle-bob { 0%,100% { transform: translateY(0) scaleY(1); } 50% { transform: translateY(-5px) scaleY(1.012); } }
.hero .bob { animation: idle-bob 3.2s ease-in-out infinite; transform-origin: 50% 100%; }

/* ---------- wood + paper surfaces ---------- */
.wood {
  background:
    linear-gradient(180deg, rgba(255,235,200,.22), rgba(255,235,200,0) 40%),
    linear-gradient(176deg, rgba(120,60,20,0) 0 30%, rgba(120,60,20,.06) 31%, rgba(120,60,20,0) 33% 62%, rgba(120,60,20,.07) 63%, rgba(120,60,20,0) 65%),
    linear-gradient(180deg, #dfa064, #c98a52);
}
.paper { background: var(--paper); }

/* ---------- deck (bottom tray) ---------- */
.deck { position: absolute; z-index: 40; left: 0; right: 0; bottom: 0; border-radius: 28px 28px 0 0; padding: 12px 12px 34px; box-shadow: 0 -10px 30px -8px rgba(30,15,5,.45), inset 0 2px 0 rgba(255,236,204,.65); border: 3px solid var(--wood-dark); border-bottom: 0; }
.deck-row { display: flex; gap: 8px; align-items: center; }
.tabs { display: flex; align-items: flex-end; justify-content: space-around; height: 62px; margin: 0 -4px; }
.tab { flex: 1; height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #6b3f1f; font-size: 12.5px; font-weight: 700; border-radius: 14px; position: relative; transition: color .2s; }
.tab .i { width: 26px; height: 26px; }
.tab[aria-selected=true] { color: var(--ink); background: rgba(255,243,220,.92); box-shadow: 0 3px 0 var(--wood-dark); }
.tab .pip { position: absolute; top: 7px; right: calc(50% - 22px); width: 11px; height: 11px; border-radius: 6px; background: var(--dot); border: 2px solid var(--paper); }
.tab .sub { font-size: 11.5px; font-weight: 600; color: var(--muted); margin-top: -2px; }

/* toy buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; font-weight: 700; font-size: 16px; background: var(--cream); border: 3px solid var(--wood-dark); box-shadow: 0 4px 0 var(--wood-dark), 0 10px 16px -10px rgba(40,20,5,.5); color: var(--ink); transition: transform .1s, box-shadow .1s; }
.btn:active, .btn.pressed { transform: translateY(3px); box-shadow: 0 1px 0 var(--wood-dark); }
.btn.gold { background: linear-gradient(180deg, #ffe17a, var(--gold) 55%, #f6c33a); border-color: var(--gold-edge); box-shadow: 0 4px 0 var(--gold-edge), 0 12px 18px -10px rgba(120,70,10,.6), inset 0 2px 0 rgba(255,255,255,.6); }
.btn.leaf { background: linear-gradient(180deg, #6cbf4f, var(--leaf)); border-color: var(--leaf-edge); color: #fff; box-shadow: 0 4px 0 var(--leaf-edge), inset 0 2px 0 rgba(255,255,255,.35); }
.btn.ghost { background: rgba(255,243,220,.18); border-color: rgba(255,243,220,.55); color: #fff3dc; box-shadow: none; }
.btn.dim { opacity: .45; }
.btn.round { width: 48px; padding: 0; border-radius: 24px; }
.btn.sq { width: 48px; padding: 0; }
.kcap { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 24px; padding: 0 6px; border-radius: 6px; background: rgba(74,42,20,.12); border: 1.5px solid rgba(74,42,20,.35); border-bottom-width: 3px; font-size: 12px; font-weight: 700; color: var(--ink); }
.kcap.light { background: rgba(255,243,220,.15); border-color: rgba(255,243,220,.45); color: #fff3dc; }

/* chips + pills */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 6px; border-radius: 18px; background: var(--cream); border: 2.5px solid var(--wood-dark); font-weight: 700; font-size: 15px; }
.pill.dark { background: rgba(36,22,10,.62); border-color: rgba(255,236,204,.35); color: #fff3dc; backdrop-filter: blur(6px); }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; font-weight: 700; background: rgba(74,42,20,.1); }
.token { border-radius: 50%; overflow: hidden; flex: none; background: var(--wood-light); }
.token img { width: 100%; height: 100%; object-fit: cover; }

/* level ring token */
.lvl { position: relative; width: 44px; height: 44px; flex: none; }
.lvl svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.lvl img { position: absolute; inset: 4px; width: 36px; height: 36px; border-radius: 50%; }
.lvl b { position: absolute; right: -4px; bottom: -4px; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 10px; background: #2f6b22; color: #fff; border: 2px solid var(--paper); font-size: 11.5px; display: flex; align-items: center; justify-content: center; }

/* ---------- sheets ---------- */
.sheet { position: absolute; z-index: 50; left: 0; right: 0; bottom: 0; border-radius: 26px 26px 0 0; background: var(--paper); box-shadow: 0 -14px 40px -10px rgba(30,15,5,.55); border: 3px solid var(--wood); border-bottom: 0; transition: transform .5s var(--ease-sheet), height .5s var(--ease-sheet); overflow: hidden; }
.grab { width: 44px; height: 5px; border-radius: 3px; background: rgba(74,42,20,.28); margin: 8px auto 6px; }
.sheet h3 { font-family: Lilita; font-weight: 400; font-size: 22px; letter-spacing: .01em; }
.scrim { position: absolute; inset: 0; z-index: 45; background: rgba(20,10,4,.35); opacity: 0; transition: opacity .4s; pointer-events: none; }

/* acorn and tier helpers */
.t-common { --t: var(--t-common); } .t-rare { --t: var(--t-rare); } .t-epic { --t: var(--t-epic); } .t-legendary { --t: var(--t-legendary); } .t-ultra { --t: var(--t-ultra); }
.stars { display: inline-flex; gap: 1px; color: var(--gold); }
.stars .i { width: 13px; height: 13px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .12s !important; }
}
