/* Turf War: phone first. The park in daylight, cream cards with chunky ink, you in blue, the bot in red. */
@font-face { font-family: 'Lilita One'; src: url('../fonts/lilita-one.woff2') format('woff2'); font-display: swap; }

:root {
  --ink: #1f2a24;
  --cream: #fffdf5;
  --grass: #9cc77f;
  --grass-2: #8dbb70;
  --path: #e9dcb6;
  --me: #2f7fd0;
  --bot: #d0452f;
  --gold: #f4c331;
  --muted: #5b6b61;
  --r: 12px;
  --display: 'Lilita One', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 15px/1.35 var(--body); color: var(--ink); -webkit-text-size-adjust: 100%;
  background: repeating-linear-gradient(90deg, var(--grass) 0 44px, var(--grass-2) 44px 88px);
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.loading { text-align: center; margin-top: 40vh; font-family: var(--display); font-size: 1.3rem; }

#app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; max-width: 720px; margin: 0 auto; }

/* ---------------------------------------------------------------- top */
.top { display: flex; align-items: center; gap: 8px; padding: calc(6px + env(safe-area-inset-top)) 10px 6px; background: #2f6b3f; color: #fff; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 2px solid rgba(255,255,255,.35); background: transparent; color: #fff; font-size: 1.05rem; font-weight: 700; display: grid; place-items: center; padding: 0; line-height: 1; }
.round { font-family: var(--display); font-size: 1.05rem; letter-spacing: .02em; }
.score { margin-left: auto; margin-right: auto; display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 1.7rem; background: none; border: 0; color: #fff; padding: 0; }
.score .mid { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.score i { font: 700 .62rem var(--body); text-transform: uppercase; letter-spacing: .08em; opacity: .8; }
.score small { font: 600 .68rem var(--body); opacity: .75; }
.score .me { color: #9fd0ff; } .score .bot { color: #ffb3a6; }

.botbar { display: flex; gap: 12px; align-items: center; font-size: .78rem; padding: 4px 12px; background: rgba(255,253,245,.75); border-bottom: 2px solid var(--ink); }
.botbar .who { font-weight: 700; display: flex; align-items: center; gap: 5px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; border: 2px solid var(--ink); }
.dot.bot { background: var(--bot); }
.think { margin-left: auto; color: var(--bot); font-weight: 700; min-width: 70px; text-align: right; }
.think.on::after { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--bot); margin-left: 5px; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }

/* -------------------------------------------------------------- board */
.board { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; padding: 8px 6px; align-items: stretch; }
.col { display: flex; flex-direction: column; gap: 6px; min-height: 100%; border-radius: var(--r); padding: 4px 3px; background: rgba(233,220,182,.35); transition: background .15s, box-shadow .15s; }
.col.target { background: rgba(255,253,245,.75); box-shadow: 0 0 0 3px var(--gold) inset; cursor: pointer; }
.col.scrapping { box-shadow: 0 0 0 3px var(--me) inset; }
.side { flex: 1; display: flex; flex-direction: column; gap: 5px; align-items: center; min-height: 64px; }
.side.bot { justify-content: flex-end; }
.side.me { justify-content: flex-start; }

/* the landmark card: nudged up towards the bot or down towards you */
.lm { position: relative; border: 2.5px solid var(--ink); border-radius: 10px; background: var(--cream); padding: 6px 3px; min-height: 74px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-align: center; box-shadow: 0 3px 0 var(--ink); transition: transform .35s cubic-bezier(.3,1.4,.5,1), background .2s; }
.lm.h0 { margin-top: 56px; background: #e3f0ff; border-color: var(--me); box-shadow: 0 3px 0 var(--me); }
.lm.h1 { margin-bottom: 56px; background: #ffe7e2; border-color: var(--bot); box-shadow: 0 3px 0 var(--bot); }
.lm-name { font-family: var(--display); font-size: .82rem; line-height: 1.02; }
.lm-rule { font-size: .64rem; line-height: 1.12; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tot { display: flex; flex-direction: column; font-family: var(--display); font-size: 1.05rem; line-height: 1; gap: 2px; }
.tot b { font-weight: 400; opacity: .55; }
.tot .bot { color: var(--bot); } .tot .me { color: var(--me); }
.tot b.lead { opacity: 1; font-size: 1.25rem; }

/* a fighter out on the park */
.tok { position: relative; width: 100%; max-width: 66px; aspect-ratio: 1; border: 2.5px solid var(--ink); border-radius: 10px; background: var(--cream); padding: 0; box-shadow: 0 2px 0 var(--ink); }
.tok.me { border-color: var(--me); box-shadow: 0 2px 0 var(--me); }
.tok.bot { border-color: var(--bot); box-shadow: 0 2px 0 var(--bot); }
.tok .art { position: absolute; inset: 4px 4px 2px; display: block; }
.tok .art svg { width: 100%; height: 100%; }
.tok .str { position: absolute; top: -7px; left: -7px; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--display); font-size: .9rem; display: grid; place-items: center; border: 2px solid var(--cream); }
.tok.me .str { background: var(--me); } .tok.bot .str { background: var(--bot); }
.tok .trophy, .tok .gear, .mini .trophy { position: absolute; bottom: -6px; font-size: .62rem; font-weight: 800; background: var(--gold); border: 2px solid var(--ink); border-radius: 8px; padding: 0 3px; line-height: 1.2; }
.tok .trophy { left: -4px; } .tok .gear { right: -4px; background: #fff; }
.tok.down { background: repeating-linear-gradient(45deg, #c7553f 0 6px, #b84a35 6px 12px); }
.tok.down .back { font-family: var(--display); color: #fff; font-size: 1.5rem; position: absolute; inset: 0; display: grid; place-items: center; }
.tok.secret { opacity: .82; background: repeating-linear-gradient(45deg, #fff 0 6px, #eef4fb 6px 12px); }
.tok.target { outline: 3px solid var(--gold); outline-offset: 2px; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { outline-color: transparent; } }

/* ------------------------------------------------------------- ticker */
.ticker { border: 0; border-top: 2px solid var(--ink); background: var(--cream); text-align: left; padding: 6px 12px; font-size: .8rem; display: flex; gap: 8px; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticker span { margin-left: auto; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); flex: none; }

/* --------------------------------------------------------------- dock */
.dock { background: var(--cream); border-top: 2px solid var(--ink); padding-bottom: env(safe-area-inset-bottom); }
.prompt { display: flex; align-items: center; gap: 8px; padding: 8px 10px; min-height: 56px; background: #fff6d6; border-bottom: 2px solid var(--ink); }
.prompt p { margin: 0; flex: 1; font-size: .9rem; }
.btns { display: flex; gap: 6px; flex: none; }
.btn { border: 2.5px solid var(--ink); border-radius: 10px; background: var(--cream); padding: 8px 14px; font-weight: 800; box-shadow: 0 3px 0 var(--ink); text-decoration: none; display: inline-block; text-align: center; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.btn.go { background: var(--gold); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.wide { width: 100%; margin-top: 12px; }
.btn[disabled] { opacity: .45; }

.tabs { display: flex; gap: 4px; padding: 6px 10px 0; }
.tabs button { border: 0; background: none; padding: 4px 8px; font-weight: 700; font-size: .8rem; color: var(--muted); border-bottom: 3px solid transparent; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--ink); }
.cards { display: flex; gap: 8px; overflow-x: auto; padding: 10px 10px 12px; scroll-snap-type: x proximity; }
.empty { margin: 10px 4px; color: var(--muted); font-size: .85rem; }

/* a fighter in your gang */
.mini { position: relative; flex: none; width: 92px; height: 118px; border: 2.5px solid var(--ink); border-radius: 12px; background: var(--cream); padding: 6px 5px 5px; display: flex; flex-direction: column; align-items: center; scroll-snap-align: start; box-shadow: 0 3px 0 var(--ink); }
.mini.on { transform: translateY(-6px); border-color: var(--me); box-shadow: 0 6px 0 var(--me); background: #e3f0ff; }
.mini.idle { opacity: .9; }
.mini .str, .pick-card .str, .fs .str { position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%; background: #5d6c78; color: #fff; font-family: var(--display); display: grid; place-items: center; font-size: .85rem; }
.mini .art { width: 54px; height: 54px; }
.mini .art svg, .pick-card .art svg, .fs-art svg { width: 100%; height: 100%; }
.mini .nm { font-family: var(--display); font-size: .78rem; line-height: 1.05; text-align: center; }
.mini .tt { font-size: .62rem; color: var(--muted); font-weight: 700; text-align: center; line-height: 1.1; margin-top: 1px; }
.mini .trophy { top: 4px; right: 4px; bottom: auto; }

.pcard { flex: none; width: 132px; height: 118px; border: 2.5px solid var(--ink); border-radius: 12px; background: var(--cream); padding: 7px; text-align: left; display: flex; flex-direction: column; gap: 3px; scroll-snap-align: start; box-shadow: 0 3px 0 var(--ink); }
.pcard.gear { background: #eef6e6; }
.pcard.on { transform: translateY(-6px); border-color: var(--me); box-shadow: 0 6px 0 var(--me); }
.pcard .kind { font-size: .6rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.pcard .nm { font-family: var(--display); font-size: .88rem; line-height: 1.05; }
.pcard .tx { font-size: .66rem; line-height: 1.2; color: #3c4a42; overflow: hidden; }
.pcard.idle { opacity: .85; }

/* -------------------------------------------------------- pick a gang */
.pick { position: fixed; inset: 0; z-index: 20; background: rgba(31,42,36,.55); overflow-y: auto; padding: 16px 12px calc(16px + env(safe-area-inset-bottom)); }
.pick-in { max-width: 560px; margin: 0 auto; background: var(--cream); border: 3px solid var(--ink); border-radius: 18px; padding: 16px 14px; box-shadow: 0 5px 0 var(--ink); }
.pick h1, .sheet h2 { font-family: var(--display); font-weight: 400; margin: 0 0 4px; font-size: 1.6rem; }
.pick p { margin: 0 0 12px; color: var(--muted); }
.pick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pick-card { position: relative; border: 2.5px solid var(--ink); border-radius: 12px; background: #fff; padding: 8px 8px 10px; display: flex; flex-direction: column; align-items: center; text-align: center; box-shadow: 0 3px 0 var(--ink); transition: opacity .15s, transform .15s; }
.pick-card.out { opacity: .45; }
.pick-card.on { border-color: var(--me); box-shadow: 0 3px 0 var(--me); background: #eef5ff; }
.pick-n { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; background: var(--me); color: #fff; font-family: var(--display); display: grid; place-items: center; border: 2px solid var(--ink); }
.pick-bar { position: sticky; bottom: 0; padding-top: 4px; background: linear-gradient(transparent, var(--cream) 30%); }
.pick-card .art { width: 72px; height: 72px; }
.pick-card .nm { font-family: var(--display); font-size: 1rem; }
.pick-card .tt { font-size: .72rem; line-height: 1.25; margin-top: 2px; }
.pick-card .tt b { color: #3e5566; }
.pick-card .carry, .fs .carry { font-size: .62rem; font-weight: 800; color: #a0392b; text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; }

/* ------------------------------------------------------------- sheets */
.scrim { position: fixed; inset: 0; background: rgba(31,42,36,.45); z-index: 30; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; max-width: 720px; margin: 0 auto; max-height: 82dvh; overflow-y: auto; background: var(--cream); border: 3px solid var(--ink); border-bottom: 0; border-radius: 20px 20px 0 0; padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); }
.sheet.anim { animation: up .22s ease-out; }
@keyframes up { from { transform: translateY(30%); opacity: 0; } }
.sheet h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; margin: 14px 0 4px; color: var(--muted); }
.sheet ul { padding-left: 18px; margin: 4px 0; }
.sheet .muted, .muted { color: var(--muted); font-size: .88rem; }
.acts { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.fs { position: relative; }
.fs-head { display: flex; gap: 12px; align-items: center; }
.fs .str { position: static; width: 44px; height: 44px; font-size: 1.4rem; flex: none; }
.fs-art { height: 120px; margin: 8px 0; background: #eceee9; border: 2px solid var(--ink); border-radius: 12px; padding: 6px; }
.fs .tt { font-family: var(--display); font-weight: 400; color: #3e5566; }
.quip { font-style: italic; color: var(--muted); }
.results { list-style: none; padding: 0 !important; margin: 12px 0; display: grid; gap: 6px; }
.results li { display: grid; grid-template-columns: 1.2fr .8fr 1.4fr; gap: 6px; padding: 8px 10px; border: 2px solid var(--ink); border-radius: 10px; font-size: .85rem; background: #fff; }
.results li.me { border-color: var(--me); background: #e3f0ff; } .results li.bot { border-color: var(--bot); background: #ffe7e2; }
.big-score { font-family: var(--display); font-size: 1.2rem; text-align: center; }
.big-score span { font-size: 2rem; } .big-score .me { color: var(--me); } .big-score .bot { color: var(--bot); }
.log { padding-left: 20px; font-size: .85rem; } .log li { margin: 4px 0; } .log li.me { color: #1d5a99; } .log li.bot { color: #9a3322; }
.rules ol { padding-left: 20px; } .rules li { margin: 6px 0; }

.toast { position: fixed; left: 50%; bottom: 210px; transform: translateX(-50%); z-index: 40; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 12px; font-size: .88rem; max-width: 90vw; text-align: center; }
.toast.anim { animation: up .2s; }

/* ----------------------------------------------------------- bigger */
@media (min-width: 560px) {
  .board { gap: 10px; padding: 12px; }
  .tok { max-width: 84px; }
  .lm-name { font-size: 1rem; }
  .lm-rule { font-size: .68rem; }
  .pick-grid { grid-template-columns: repeat(3, 1fr); }
}

.pick-card.drop { opacity: .5; border-color: var(--bot); box-shadow: 0 3px 0 var(--bot); }
.pick-card.drop::after { content: 'going home'; position: absolute; top: 6px; right: 6px; font-size: .62rem; font-weight: 800; text-transform: uppercase; background: var(--bot); color: #fff; border-radius: 6px; padding: 1px 5px; }
.pick-card .new { position: absolute; top: 6px; right: 6px; font-size: .62rem; font-weight: 800; text-transform: uppercase; background: var(--gold); border: 2px solid var(--ink); border-radius: 6px; padding: 0 5px; }
.gains { font-size: .85rem; padding-left: 18px; } .gains li { margin: 3px 0; } .gains li.me { color: #1d5a99; } .gains li.bot { color: #9a3322; }
.fs p.off { text-decoration: line-through; opacity: .55; }
.why-off { margin-top: -6px; font-weight: 700; color: #a0392b; font-size: .88rem; }
.tok.picked { outline: 3px solid var(--me); outline-offset: 2px; transform: scale(1.06); }
.tok.pop { animation: trophy-pop .9s cubic-bezier(.3,1.6,.5,1); z-index: 2; }
@keyframes trophy-pop { 0% { transform: scale(1); } 30% { transform: scale(1.35) rotate(-6deg); box-shadow: 0 0 0 6px var(--gold); } 60% { transform: scale(.95) rotate(3deg); } 100% { transform: scale(1); } }

/* tug of war */
.tug { position: relative; flex: 1; max-width: 230px; height: 30px; margin: 0 auto; border: 2.5px solid #fff; border-radius: 16px; background: var(--bot); overflow: hidden; padding: 0; }
.tug-me { position: absolute; left: 0; top: 0; bottom: 0; background: var(--me); transition: width .8s cubic-bezier(.3,1.3,.5,1); }
.knot { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: #fff; border-radius: 2px; transition: left .8s cubic-bezier(.3,1.3,.5,1); }
.tug-l, .tug-r { position: absolute; top: 50%; transform: translateY(-50%); font: 800 .66rem var(--body); text-transform: uppercase; letter-spacing: .06em; color: #fff; }
.tug-l { left: 9px; } .tug-r { right: 9px; }
.dons { display: grid; gap: 8px; }
.don { display: flex; gap: 10px; align-items: center; border: 2px solid var(--ink); border-radius: 12px; padding: 6px 10px; background: #fff; }
.don.me { border-color: var(--me); } .don.bot { border-color: var(--bot); }
.don .art { width: 48px; height: 48px; flex: none; } .don .art svg { width: 100%; height: 100%; }
.don small { display: block; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.don b { font-family: var(--display); font-weight: 400; font-size: 1.05rem; display: block; }
.don span:last-child { font-size: .8rem; color: #3c4a42; }

/* the main button of a sheet stays in reach, however long the sheet gets */
.sheet > .btn.wide:last-child { position: sticky; bottom: 0; z-index: 1; box-shadow: 0 3px 0 var(--ink), 0 -16px 16px 4px var(--cream); }
.results li { padding: 5px 9px; font-size: .8rem; }
.big-score { margin: 4px 0 8px; }

/* the hand: a grid of short tiles, everything visible, no sideways scrolling */
.cards.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 6px; overflow: visible; padding: 10px 10px 12px; }
.cards.grid .mini { width: auto; height: 54px; flex-direction: row; align-items: center; gap: 4px; padding: 4px 5px 4px 4px; text-align: left; }
.cards.grid .mini .art { width: 34px; height: 42px; flex: none; }
.cards.grid .mini .txt { min-width: 0; display: flex; flex-direction: column; }
.cards.grid .mini .nm { font-size: .74rem; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cards.grid .mini .tt { font-size: .6rem; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cards.grid .mini .str { top: -7px; left: -7px; width: 20px; height: 20px; font-size: .75rem; border: 2px solid var(--cream); }
.cards.grid .mini .trophy { top: -7px; right: -5px; }
.cards.grid .mini.on { transform: translateY(-3px); }
.cards.grid .pcard { width: auto; height: 54px; padding: 5px 7px; gap: 1px; justify-content: center; }
.cards.grid .pcard .nm { font-size: .78rem; }
.cards.grid .pcard.on { transform: translateY(-3px); }
.tabs .live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); border: 1.5px solid var(--ink); margin-left: 5px; animation: blink 1s infinite; }
.ptx { font-size: .82rem; color: #3c4a42; }
.btn.blocked { opacity: .55; box-shadow: none; font-weight: 700; }
.btn.blocked small { display: block; font-weight: 500; font-size: .74rem; color: #a0392b; margin-top: 2px; }

/* a trick goes off */
.callout { position: fixed; left: 50%; top: 22%; transform: translateX(-50%); z-index: 45; display: flex; gap: 10px; align-items: center; width: min(88vw, 360px); background: var(--cream); border: 3px solid var(--ink); border-radius: 16px; padding: 8px 12px 8px 8px; box-shadow: 0 5px 0 var(--ink); pointer-events: none; }
.callout.anim { animation: callout .45s cubic-bezier(.3,1.6,.5,1); }
.callout:not(.anim) .art { animation: none; }
.callout .art { width: 64px; height: 64px; flex: none; animation: bounce .6s .2s; } .callout .art svg { width: 100%; height: 100%; }
.callout b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.35rem; color: #3e5566; line-height: 1; }
.callout span:last-child { font-size: .8rem; }
.callout.blocked { border-color: var(--bot); box-shadow: 0 5px 0 var(--bot); } .callout.blocked b { color: var(--bot); }
@keyframes callout { from { transform: translateX(-50%) scale(.4) rotate(-8deg); opacity: 0; } }
@keyframes bounce { 40% { transform: translateY(-10px) rotate(-6deg); } }

/* picking a gang: short rows, all seven in view */
.pick-list { display: grid; grid-template-columns: 1fr; gap: 8px; }
.pick-row { position: relative; display: flex; gap: 10px; align-items: center; text-align: left; border: 2.5px solid var(--ink); border-radius: 12px; background: #fff; padding: 6px 40px 6px 6px; box-shadow: 0 3px 0 var(--ink); }
.pick-row .art { width: 54px; height: 54px; flex: none; } .pick-row .art svg { width: 100%; height: 100%; }
.pick-row .body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pick-row .pr-top { display: flex; align-items: center; gap: 6px; }
.pick-row .str { width: 22px; height: 22px; border-radius: 50%; background: #5d6c78; color: #fff; font-family: var(--display); display: grid; place-items: center; font-size: .85rem; flex: none; }
.pick-row .nm { font-family: var(--display); font-size: 1rem; line-height: 1; }
.pick-row .cap { font-size: .68rem; font-weight: 800; background: var(--gold); border: 2px solid var(--ink); border-radius: 8px; padding: 0 4px; }
.pick-row .tt { font-size: .74rem; line-height: 1.25; color: #3c4a42; } .pick-row .tt b { color: #3e5566; }
.pick-row .pick-n { top: 50%; right: 8px; transform: translateY(-50%); }
.pick-row.on { border-color: var(--me); box-shadow: 0 3px 0 var(--me); background: #eef5ff; }
.pick-row.out { opacity: .45; }
.pick-sum { text-align: center; font-size: .8rem; font-weight: 700; color: var(--muted); margin: 0 0 -4px !important; }
.linkish { display: block; margin: 8px auto 0; border: 0; background: none; color: var(--me); font-weight: 700; font-size: .82rem; text-decoration: underline; }
@media (min-width: 560px) { .pick-list { grid-template-columns: 1fr 1fr; } }
.pick-bar { background: var(--cream); box-shadow: 0 -16px 14px 2px var(--cream); padding-top: 8px; }
.pick-row.drop { opacity: .55; border-color: var(--bot); box-shadow: 0 3px 0 var(--bot); background: #fff3f0; }
.pick-row.drop::after { content: 'going home'; position: absolute; top: 50%; right: 8px; transform: translateY(-50%) rotate(-6deg); font-size: .62rem; font-weight: 800; text-transform: uppercase; background: var(--bot); color: #fff; border-radius: 6px; padding: 2px 5px; }
.pick-row .new { position: static; font-size: .62rem; font-weight: 800; text-transform: uppercase; background: var(--gold); border: 2px solid var(--ink); border-radius: 6px; padding: 0 5px; }
.pick-row .carrying { font-size: .7rem; font-weight: 700; color: #a0392b; }

/* a crowd at one landmark: full-size tiles, overlapping only as much as the space needs (set from the page, see fitCrowds) */
.side .tok { flex: none; }
.side .tok + .tok { margin-top: calc(-1 * var(--ov, 0px)); }

/* who's at a landmark */
.here { display: grid; gap: 10px; margin: 8px 0; }
.here h3 { margin: 0 0 4px !important; } .here h3.me { color: var(--me); } .here h3.bot { color: var(--bot); }
.here ul { list-style: none; padding: 0 !important; margin: 0; display: grid; gap: 4px; }
.here li { display: flex; align-items: center; gap: 8px; border: 2px solid var(--ink); border-radius: 10px; padding: 3px 8px 3px 4px; background: #fff; font-size: .85rem; cursor: pointer; }
.here li.none { border-style: dashed; color: var(--muted); cursor: default; padding: 6px 10px; }
.here .mini-art { width: 34px; height: 34px; flex: none; } .here .mini-art svg { width: 100%; height: 100%; }
.here .mini-art.back { display: grid; place-items: center; background: var(--bot); color: #fff; border-radius: 6px; font-family: var(--display); }
.here .s { margin-left: auto; font-family: var(--display); font-size: 1.1rem; }
.mini.stuck { opacity: .55; }
.mini.stuck::after { content: '🚫'; position: absolute; right: 4px; bottom: 3px; font-size: .8rem; }

/* the scrap reveal: landmarks settle one by one */
.board.replaying { cursor: pointer; }
.col.res-me { background: rgba(47,127,208,.28); } .col.res-bot { background: rgba(208,69,47,.26); } .col.res-none { background: rgba(31,42,36,.15); }
.col.res-now { animation: res-flash .6s ease-out; }
@keyframes res-flash { 0% { transform: scale(1); } 35% { transform: scale(1.06); } 100% { transform: scale(1); } }
.verdict { position: absolute; left: 50%; bottom: -12px; transform: translateX(-50%) rotate(-4deg); white-space: nowrap; font: 800 .62rem var(--body); text-transform: uppercase; letter-spacing: .03em; padding: 2px 6px; border-radius: 7px; border: 2px solid var(--ink); background: var(--gold); color: var(--ink); z-index: 2; }
.res-now .verdict { animation: callout .35s cubic-bezier(.3,1.6,.5,1); }
.verdict.me { background: var(--me); color: #fff; } .verdict.bot { background: var(--bot); color: #fff; } .verdict.none { background: #e6e2d6; }
.acts .btn .who { display: block; font-weight: 500; font-size: .74rem; color: var(--muted); margin-top: 1px; }

/* round summary chips */
.chips { list-style: none; padding: 0 !important; margin: 10px 0 4px; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { display: flex; align-items: center; gap: 5px; border: 2px solid var(--ink); border-radius: 999px; padding: 3px 10px 3px 6px; font-size: .8rem; font-weight: 700; background: #fff; }
.chips li.me { border-color: var(--me); background: #eef5ff; } .chips li.bot { border-color: var(--bot); background: #fff1ee; }
.dons { grid-template-columns: 1fr 1fr; }
.don { padding: 5px 7px; gap: 6px; align-items: flex-start; }
.don .art { width: 36px; height: 36px; }
.don b { font-size: .92rem; } .don span:last-child { font-size: .72rem; line-height: 1.25; }
.bd { background: #f3efe2; border: 2px dashed #c9bf9f; border-radius: 10px; padding: 6px 10px; font-size: .84rem; line-height: 1.5; }
.bd > b { font-family: var(--display); font-weight: 400; font-size: 1.1rem; } .bd span { white-space: nowrap; margin-right: 4px; } .bd .neg { color: #a0392b; }

/* trophy time: the won landmark in focus, takeable fighters shouting about it */
.col.dim { opacity: .4; filter: saturate(.6); }
.tok.grab { box-shadow: 0 0 0 4px var(--gold), 0 0 18px 4px rgba(244,195,49,.85); animation: grab 1.1s ease-in-out infinite; z-index: 2; }
@keyframes grab { 50% { transform: translateY(-4px) scale(1.05); } }
.tok .take { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); background: var(--gold); border: 2px solid var(--ink); border-radius: 8px; font: 800 .6rem var(--body); text-transform: uppercase; padding: 1px 5px; white-space: nowrap; z-index: 3; }
.prompt .sub { display: block; font-size: .76rem; color: var(--muted); }

/* what's being done to a fighter (top right) and what he's doing to them (bottom middle) */
.tok .fx { position: absolute; top: -8px; right: -6px; background: #fff; border: 2px solid var(--bot); border-radius: 9px; font-size: .62rem; line-height: 1.15; padding: 0 2px; z-index: 2; }
.tok .aura { position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); background: var(--gold); border: 2px solid var(--ink); border-radius: 9px; font-size: .62rem; line-height: 1.15; padding: 0 3px; z-index: 2; white-space: nowrap; }
.side.n4 .tok .fx, .side.n5 .tok .fx, .side.n6 .tok .fx, .side.n4 .tok .aura, .side.n5 .tok .aura, .side.n6 .tok .aura { font-size: .5rem; }
.why-aura { margin-top: -4px; font-size: .86rem; color: #6b5a12; }
.callout.capture { border-color: var(--bot); box-shadow: 0 5px 0 var(--bot); }
.callout.capture .art { width: 50px; height: 50px; }
.callout.capture .arrow { font-size: 1.3rem; font-weight: 800; color: var(--bot); }
.callout.capture b { color: var(--bot); }
.callout.capture.mine { border-color: var(--me); box-shadow: 0 5px 0 var(--me); } .callout.capture.mine b, .callout.capture.mine .arrow { color: var(--me); }

/* who can carry the trophy */
.tok.carry { box-shadow: 0 0 0 4px var(--me), 0 0 18px 4px rgba(47,127,208,.75); animation: grab 1.1s ease-in-out infinite; z-index: 2; }
.tok .carry-tag { background: var(--me); color: #fff; }
/* looping animations stay in step across re-renders (each render rebuilds the board) */
.tok.grab, .tok.carry { animation-delay: var(--t1, 0ms); }
.tok.target { animation-delay: var(--t2, 0ms); }
.tok.pop { animation-delay: var(--tp, 0ms); }

/* a landmark's rule as a short tag */
.lm-tag { align-self: stretch; margin: 1px 2px 0; padding-top: 4px; border-top: 1.5px dashed rgba(31,42,36,.25); font-size: .62rem; font-weight: 600; line-height: 1.2; color: #56645b; text-wrap: balance; }
.lm.h0 .lm-tag { border-top-color: rgba(47,127,208,.4); } .lm.h1 .lm-tag { border-top-color: rgba(208,69,47,.4); }

/* every landmark card the same size: name at the top, rule (or totals) underneath */
.lm { height: 114px; min-height: 0; justify-content: flex-start; padding-top: 7px; overflow: hidden; }
.lm .tot { margin-top: auto; margin-bottom: auto; }
@media (min-width: 560px) { .lm { height: 116px; } }
.lm-name { min-height: 2.1em; display: flex; align-items: center; justify-content: center; }
.lm { padding-left: 5px; padding-right: 5px; }
.lm-name.long { font-size: .7rem; letter-spacing: -.01em; }
@media (min-width: 560px) { .lm-name.long { font-size: .9rem; } }
.lm-tag { font-size: .6rem; }

/* status badges in the game's own style: a red "no" for something done to him, a gold star for something he's doing */
.tok .fx, .fx.inline { position: absolute; top: -8px; right: -7px; width: 19px; height: 19px; padding: 0; border-radius: 50%; background: var(--bot); border: 2px solid var(--ink); z-index: 2; font-size: 0; }
.tok .fx::after, .fx.inline::after { content: ''; position: absolute; left: 50%; top: 50%; width: 11px; height: 2.5px; background: #fff; border-radius: 2px; transform: translate(-50%, -50%) rotate(-45deg); }
.tok .fx::before, .fx.inline::before { content: ''; position: absolute; inset: 2.5px; border: 2px solid #fff; border-radius: 50%; }
.tok .aura, .aura.inline { position: absolute; bottom: -9px; left: 50%; transform: translateX(-50%); width: 20px; height: 20px; padding: 0; border-radius: 50%; background: var(--gold); border: 2px solid var(--ink); font: 400 .78rem/16px var(--display); color: var(--ink); text-align: center; z-index: 2; }
.fx.inline, .aura.inline { position: relative; display: inline-block; top: auto; right: auto; bottom: auto; left: auto; transform: none; vertical-align: -4px; margin-right: 6px; }
/* the scrap verdict sits inside the bottom of the (fixed-size, clipped) landmark card */
.verdict { bottom: 6px; max-width: calc(100% - 6px); overflow: hidden; text-overflow: ellipsis; transform: translateX(-50%) rotate(-3deg); }
@keyframes verdict-in { from { transform: translateX(-50%) scale(.4) rotate(-8deg); opacity: 0; } }
.res-now .verdict { animation: verdict-in .35s cubic-bezier(.3,1.6,.5,1); }
.verdict { font-size: .56rem; letter-spacing: 0; padding: 1px 5px; max-width: none; overflow: visible; }
.col.res .tot { margin-bottom: 26px; }
/* the pinned main button: a small fade only, and enough room that it never washes over the button above */
.sheet > .btn.wide:last-child { margin-top: 18px; box-shadow: 0 3px 0 var(--ink), 0 -10px 10px 0 var(--cream); }
.sheet > .btn.wide.ghost:last-child { box-shadow: 0 -10px 10px 0 var(--cream); }
a.btn { color: var(--ink); }
.lm-name, .lm-tag { max-width: 100%; }
.lm.more::after { content: 'i'; margin-top: auto; margin-bottom: 4px; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--muted); color: var(--muted); font: italic 700 .68rem/13px Georgia, serif; text-align: center; }
/* landmark cards never get squashed when a column runs short of room (the board scrolls instead) */
.lm { flex: none; }
/* short screens: shorter landmark cards (their text fits itself) leave more room for fighters */
.lm { height: clamp(88px, 13.5dvh, 114px); }
@media (max-height: 760px) { .col.res .tot { margin-bottom: 20px; } }
.side .tok { max-width: var(--tokw, 66px); }
@media (min-width: 560px) { .side .tok { max-width: var(--tokw, 84px); } }
.lm.h0 { margin-top: clamp(24px, 6dvh, 56px); } .lm.h1 { margin-bottom: clamp(24px, 6dvh, 56px); }
.cards.grid .mini .tt.wrap { white-space: normal; text-overflow: clip; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.05; }

/* hand tiles: the name gets two lines rather than an ellipsis */
.cards.grid .mini .nm { white-space: normal; text-overflow: clip; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.02; }
.cards.grid .mini .tt { -webkit-line-clamp: 1; }
.lm-rule-big { font-size: 1.05rem; }
.lm-name.long { font-size: inherit; letter-spacing: normal; }

/* status badges: together in the top-right corner, never hanging over the next tile */
.tok .badges { position: absolute; top: -7px; right: -6px; display: flex; gap: 2px; z-index: 2; }
.tok .badges .fx, .tok .badges .aura { position: relative; top: auto; right: auto; bottom: auto; left: auto; transform: none; width: 17px; height: 17px; }
.tok .badges .aura { font-size: .66rem; line-height: 13px; }
.tok .badges .fx::after { width: 9px; }

/* trophies and gear: small pills inside the bottom of the tile, not hanging over the next one */
.tok .trophy, .tok .gear { bottom: 3px; font-size: .58rem; line-height: 1.25; padding: 0 3px; border-width: 1.5px; display: flex; align-items: center; gap: 1px; }
.tok .trophy { left: 3px; } .tok .gear { right: 3px; }

/* landmark cards: the deck's own picture of the place, the name on a band across the top, totals on a pill */
.lm { position: relative; padding: 0; overflow: hidden; justify-content: flex-start; background: #a6d18e; }
.lm .lm-art { position: absolute; inset: 0; } .lm .lm-art svg { width: 100%; height: 100%; display: block; }
.lm .lm-name { position: relative; z-index: 1; align-self: stretch; min-height: 0; padding: 4px 3px 3px; background: rgba(255,253,245,.94); border-bottom: 2px solid var(--ink); font-size: .74rem; line-height: 1.02; }
.lm.h0 .lm-name { background: rgba(227,240,255,.96); border-bottom-color: var(--me); } .lm.h1 .lm-name { background: rgba(255,231,226,.96); border-bottom-color: var(--bot); }
.lm.h0, .lm.h1 { background: #a6d18e; }
.lm .tot { position: relative; z-index: 1; margin: auto; background: rgba(255,253,245,.95); border: 2px solid var(--ink); border-radius: 10px; padding: 2px 7px; }
.col.res .tot { margin-bottom: auto; }
.lm .verdict { z-index: 2; }
.lm.more::after { content: none; }
/* "Take?" / "Carry?" sit inside the top of the tile: the part that stays visible when tiles overlap, so tags never pile up */
.tok .take { top: 3px; left: 50%; transform: translateX(-50%); font-size: .54rem; padding: 0 4px; border-width: 1.5px; }
/* no text tags on tiles (they collide when tiles overlap): the glow says it, the prompt explains it */
.tok.grab { box-shadow: 0 0 0 4px var(--gold), 0 0 22px 6px rgba(244,195,49,.95); }
.tok.carry { box-shadow: 0 0 0 4px var(--me), 0 0 22px 6px rgba(47,127,208,.85); }

/* trophy time: named choices in the prompt bar */
.prompt.tall { flex-direction: column; align-items: stretch; gap: 6px; }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pick-chip { display: flex; align-items: center; gap: 6px; border: 2.5px solid var(--ink); border-radius: 12px; background: #fff; padding: 3px 9px 3px 4px; box-shadow: 0 3px 0 var(--ink); text-align: left; }
.pick-chip .art { width: 30px; height: 30px; flex: none; } .pick-chip .art svg { width: 100%; height: 100%; }
.pick-chip b { display: block; font-family: var(--display); font-weight: 400; font-size: .85rem; line-height: 1.05; }
.pick-chip small { display: block; font-size: .66rem; color: var(--muted); font-weight: 700; }
.pick-chip.beaten { border-color: #b8901a; box-shadow: 0 3px 0 #b8901a; background: #fff8dc; }
.pick-chip.carrier { border-color: var(--me); box-shadow: 0 3px 0 var(--me); background: #eef5ff; }
.dons { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.chips li { padding-left: 10px; } .chips li span { display: flex; }
/* the last row clears the pinned button's fade when you're scrolled to the bottom */
.pick-grid { padding-bottom: 22px; }
.pick-bar { box-shadow: 0 -12px 12px 0 var(--cream); }
.cards.grid .pcard { height: auto; min-height: 54px; }
.cards.grid .pcard .nm { line-height: 1.05; }

/* sending out: big cards for the gang, two to a row, with the whole trick */
.cards.big { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 10px; overflow: visible; }
.bigc { position: relative; display: flex; gap: 6px; align-items: flex-start; text-align: left; border: 2.5px solid var(--ink); border-radius: 12px; background: var(--cream); padding: 6px 7px 6px 4px; box-shadow: 0 3px 0 var(--ink); }
.bigc .art { width: 40px; height: 46px; flex: none; } .bigc .art svg { width: 100%; height: 100%; }
.bigc .txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bigc .bc-top { display: flex; align-items: center; gap: 4px; }
.bigc .str { width: 18px; height: 18px; border-radius: 50%; background: #5d6c78; color: #fff; font: 400 .7rem/18px var(--display); text-align: center; flex: none; }
.bigc .nm { font-family: var(--display); font-size: .82rem; line-height: 1.02; }
.bigc .tt { font-size: .66rem; line-height: 1.22; color: #3c4a42; } .bigc .tt b { color: #3e5566; }
.bigc .trophy { position: static; display: inline-flex; align-items: center; gap: 1px; font-size: .58rem; font-weight: 800; background: var(--gold); border: 1.5px solid var(--ink); border-radius: 7px; padding: 0 3px; }
.bigc.on { border-color: var(--me); box-shadow: 0 4px 0 var(--me); background: #e3f0ff; transform: translateY(-2px); }
.bigc.stuck { opacity: .55; } .bigc.stuck::after { content: 'can’t go out'; position: absolute; right: 6px; bottom: 4px; font-size: .56rem; font-weight: 800; text-transform: uppercase; color: #a0392b; }
.btn.small { padding: 6px 10px; font-size: .82rem; }
@media (max-height: 700px) { .bigc .tt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } }
/* the Don's reason: its own block with its own line height (inline, it inherited the parent's tall lines) */
.don > div { line-height: 1.2; min-width: 0; }
.don span:last-child { display: block; line-height: 1.3; margin-top: 2px; }
.don b { line-height: 1.05; }
/* no bouncing at trophy time: a still glow (the named buttons in the prompt do the explaining) */
.tok.grab, .tok.carry { animation: none; }
/* narrow phones: the prompt's buttons get their own row rather than squeezing the words into a column */
@media (max-width: 400px) { .prompt { flex-wrap: wrap; } .prompt p { flex: 1 1 100%; } .prompt .btns { margin-left: auto; } }

/* sending out: the board is empty, so the gang gets two wider tiles a row (still just name, strength and trick title) */
.cards.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 8px; }
.cards.grid.two .mini { height: 58px; gap: 6px; padding-left: 6px; }
.cards.grid.two .mini .art { width: 40px; height: 46px; }
.cards.grid.two .mini .nm { font-size: .86rem; -webkit-line-clamp: 1; }
.cards.grid.two .mini .tt { font-size: .7rem; }
@media (max-height: 640px) { .cards.grid.two .mini { height: 48px; } .cards.grid.two .mini .art { width: 32px; height: 38px; } }
/* the prompt's words get at least ~60% of the width; buttons that don't fit beside them move to their own row, on any phone */
.prompt { flex-wrap: wrap; }
.prompt p { flex: 1 1 60%; min-width: 58%; }
.prompt .btns { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }

/* =====================================================================================
   Tablets and desktop only (700px and wider). Phones never see anything below this line.
   ===================================================================================== */
@media (min-width: 700px) {
  html { font-size: 17px; }
  /* the game sits on the grass like a board on a table: framed, centred, not stretched to the screen's full height */
  #app { max-width: 880px; height: min(100dvh - 32px, 1060px); margin: 16px auto; border: 3px solid var(--ink); border-radius: 22px; overflow: hidden; box-shadow: 0 10px 0 rgba(31,42,36,.35); background: var(--grass-2); }
  body { display: flex; align-items: center; }
  .top { padding: 10px 16px; }
  .tug { max-width: 320px; height: 34px; }
  .botbar { padding: 6px 18px; font-size: .82rem; }
  .board { gap: 14px; padding: 16px; }
  .col { padding: 8px 6px; }
  .side .tok { max-width: var(--tokw, 96px); }
  .tok .str { width: 28px; height: 28px; font-size: 1rem; }
  .lm { height: clamp(110px, 15dvh, 150px); }
  .lm .lm-name { font-size: .9rem; padding: 6px 4px 5px; }
  .lm .tot { font-size: 1.25rem; padding: 3px 10px; }
  .prompt { padding: 10px 16px; min-height: 60px; }
  .prompt p { font-size: .95rem; }
  .tabs { padding: 8px 16px 0; }
  .cards { padding: 12px 16px 16px; }
  /* the hand: more to a row, so tiles keep a card-like shape instead of stretching wide */
  .cards.grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .cards.grid.two { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards.grid .mini, .cards.grid.two .mini { height: 64px; }
  .cards.grid .mini .art, .cards.grid.two .mini .art { width: 44px; height: 52px; }
  .cards.grid .pcard { min-height: 64px; }
  .sheet { max-width: 560px; border-radius: 20px 20px 0 0; }
  .pick { display: flex; align-items: center; }
  .pick-in { max-width: 720px; width: 100%; }
  .pick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .callout { top: 30%; }
}
@media (min-width: 1100px) {
  #app { max-width: 960px; }
  .cards.grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 700px) { .side .tok { max-width: var(--tokw, 116px); } .tok .art { inset: 6px 6px 4px; } }

/* "thinking…" never changes the size of anything */
.think { width: 84px; min-width: 84px; white-space: nowrap; overflow: hidden; }

/* big tablets: use the height, and scale everything up to match rather than leaving a margin of grass */
@media (min-width: 700px) and (min-height: 1100px) {
  html { font-size: 19px; }
  #app { max-width: min(980px, 100vw - 32px); height: calc(100dvh - 32px); }
  .side .tok { max-width: var(--tokw, 140px); }
  .lm { height: clamp(130px, 13dvh, 180px); }
  .cards.grid .mini, .cards.grid.two .mini { height: 74px; }
  .cards.grid .mini .art, .cards.grid.two .mini .art { width: 52px; height: 60px; }
}

/* Landscape desktops and tablets (wide and short): the prompt and your hand move into a side panel, so the board gets the full height */
@media (min-width: 1000px) and (min-aspect-ratio: 5/4) {
  #app { max-width: min(1240px, 100vw - 32px); display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-rows: auto auto minmax(0, 1fr); }
  #app > .top, #app > .botbar { grid-column: 1 / -1; }
  #app > .board { grid-column: 1; grid-row: 3; }
  #app > .dock { grid-column: 2; grid-row: 3; border-top: 0; border-left: 2.5px solid var(--ink); overflow-y: auto; display: flex; flex-direction: column; }
  .dock .prompt { flex-wrap: wrap; border-bottom: 2px solid var(--ink); }
  .dock .prompt p { flex: 1 1 100%; min-width: 0; }
  .dock .cards.grid, .dock .cards.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dock .chips-row { flex-direction: column; align-items: stretch; }
  .tug { max-width: 380px; }
}
/* Dimmer's arms reach the edge of his drawing: give wide bodies a little more room inside the tile so his hands aren't cut off */
.tok.wide .art { inset: 7px 8px 5px; }
/* doodles may draw a few units past their 100×100 canvas (Dimmer's hands): show it rather than clip it */
.art svg, .fs-art svg, .callout .art svg, .don .art svg, .here .mini-art svg { overflow: visible; }
