:root {
  --bg: #0b1020; --surface: #141b33; --surface2: #1c2547; --border: #2a3563; --text: #eef1fb; --muted: #9aa5c8;
  --saffron: #ff9933; --gold: #ffc94a; --good: #4ade80; --bad: #f87171; --felt1: #2b4a2a; --felt2: #16291a;
  --parch: #f4e9d2; --ink: #3a2410;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Devanagari", sans-serif; }
body.playing { overflow: hidden; height: 100vh; height: 100dvh; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
.screen { max-width: 980px; margin: 0 auto; padding: 0 16px env(safe-area-inset-bottom); }
.topbar { display: flex; align-items: center; gap: 10px; padding: 10px 0; justify-content: space-between; }
.back { color: var(--muted); text-decoration: none; font-weight: 700; font-size: 14px; }
.langs { display: flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.langs button { background: transparent; border: 0; padding: 6px 12px; font-size: 13px; font-weight: 800; color: var(--muted); }
.langs button.on { background: var(--saffron); color: #1a1000; }
/* setup */
.hero { display: flex; gap: 14px; align-items: flex-end; margin: 6px 0 14px; }
.hero-text { flex: 1; }
.kicker { color: var(--saffron); font-weight: 800; letter-spacing: 3px; font-size: 12px; margin: 0; }
h1 { font-size: 40px; margin: 2px 0; line-height: 1.05; }
h1 .mr { display: block; font-size: 26px; color: var(--saffron); }
.tag { color: var(--gold); font-weight: 700; margin: 6px 0; }
.sub { color: var(--muted); margin: 6px 0 0; }
.coach { width: 120px; mask-image: linear-gradient(#000 70%, transparent); -webkit-mask-image: linear-gradient(#000 70%, transparent); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px; margin: 0 0 14px; }
.card h2 { margin: 0 0 10px; font-size: 18px; }
.prow { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.prow .dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.prow input { flex: 1; min-width: 0; background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 9px 10px; }
select.emb { background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 7px 4px; font-size: 18px; }
.seg { display: flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; flex: none; }
.seg button { background: transparent; border: 0; padding: 8px 10px; font-size: 13px; font-weight: 700; color: var(--muted); }
.seg button.on { background: var(--saffron); color: #1a1000; }
.x { background: transparent; border: 0; color: var(--muted); font-size: 18px; width: 28px; }
.row { display: flex; align-items: center; gap: 10px; margin: 12px 0; }
.row label { color: var(--muted); font-weight: 600; }
.row select { flex: 1; background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 9px; }
.primary { width: 100%; background: var(--saffron); color: #1a1000; border: 0; border-radius: 12px; padding: 13px; font-weight: 800; font-size: 16px; }
.ghost { width: 100%; background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; padding: 11px; font-weight: 700; margin-top: 8px; }
.danger { color: var(--bad); }
.meta { color: var(--muted); font-size: 13px; }
.emblems { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: 12px; }
.theme { display: block; width: 100%; text-align: left; background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.theme.on { border-color: var(--saffron); box-shadow: 0 0 0 1px var(--saffron) inset; }
.theme small { display: block; color: var(--muted); margin-top: 3px; }
.theme em { display: block; font-style: normal; font-size: 12px; color: var(--gold); margin-top: 2px; }
#themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 10px; }
#themes .meta { grid-column: 1 / -1; }
.rules summary { font-weight: 800; cursor: pointer; }
.rules-body p { color: var(--muted); } .rules-body b { color: var(--text); }

/* game screen: a column filling the viewport */
#game { height: 100vh; height: 100dvh; display: flex; flex-direction: column; padding: 0 8px env(safe-area-inset-bottom); max-width: 1500px; margin: 0 auto; }
.gbar { display: flex; align-items: center; gap: 8px; padding: 6px 0 4px; flex: none; }
.iconbtn { background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; width: 38px; height: 34px; font-size: 17px; flex: none; }
.gtitle { flex: 1; text-align: center; font-weight: 800; color: var(--saffron); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gtitle small { color: var(--muted); font-weight: 600; margin-left: 6px; }
.strip { display: flex; gap: 6px; overflow-x: auto; padding: 0 0 6px; scrollbar-width: none; flex: none; }
.strip::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px 3px 3px; font-size: 12px; }
.chip.on { border-color: var(--saffron); box-shadow: 0 0 0 1px var(--saffron) inset; }
.chip.out { opacity: .4; }
.chip b { display: block; font-size: 12px; line-height: 1.1; white-space: nowrap; }
.chip span { color: var(--gold); font-weight: 700; white-space: nowrap; }
i.em { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; font-style: normal; font-size: 12px; flex: none; vertical-align: middle; box-shadow: 0 0 0 1.5px #fff9; }
.gamebody { flex: 1; min-height: 0; display: flex; justify-content: center; align-items: flex-start; gap: 12px; }
.panebtns { display: flex; gap: 6px; padding: 6px 0; flex: none; }
.panebtns button { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 4px; font-weight: 800; font-size: 13px; }

/* board */
#board { position: relative; background: #1a1206; border: 3px solid #6b4a1e; border-radius: 10px; box-shadow: 0 10px 30px #0009; }
.tile { position: absolute; display: flex; overflow: hidden; cursor: pointer; border: 1px solid #2b1d0a; background: var(--parch); }
.tile[data-side="2"] { flex-direction: column; }            /* top row: photo above, name below (towards the centre) */
.tile[data-side="0"] { flex-direction: column-reverse; }    /* bottom row: name above, photo below */
.tile[data-side="1"] { flex-direction: row; }               /* left column: photo left, name right */
.tile[data-side="3"] { flex-direction: row-reverse; }       /* right column: photo right, name left */
.tile[data-side="c"] { flex-direction: column; }
.tile .ph { position: relative; flex: 0 0 44%; background: #2b2318; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.tile[data-side="c"] .ph { flex: 0 0 55%; }
.tile .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .ph .ic { font-size: calc(var(--fs) * 1.9); }
.tile .ph .star { position: absolute; top: 1px; right: 2px; color: var(--gold); font-size: calc(var(--fs) * 1.15); text-shadow: 0 0 3px #000, 0 0 2px #000; line-height: 1; }
.tile .info { position: relative; flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 2px; color: var(--ink); text-align: center; line-height: 1.05; }
.tile .band { position: absolute; background: #888; }
.tile[data-side="2"] .band { top: 0; left: 0; right: 0; height: 4px; }
.tile[data-side="0"] .band { bottom: 0; left: 0; right: 0; height: 4px; }
.tile[data-side="1"] .band { left: 0; top: 0; bottom: 0; width: 4px; }
.tile[data-side="3"] .band { right: 0; top: 0; bottom: 0; width: 4px; }
.tile .nm { font-weight: 900; color: var(--ink); overflow: hidden; max-width: 100%; word-break: normal; }
.tile .nm.v { writing-mode: vertical-rl; text-orientation: mixed; white-space: nowrap; max-height: 100%; }
.tile .val { font-size: calc(var(--fs) * .78); font-weight: 800; color: #8a4b08; }
.tile .val::before { content: "₹"; content: "◈ "; font-size: .8em; color: #b07d2a; }
.tile .own { display: flex; align-items: center; gap: 1px; justify-content: center; flex-wrap: wrap; }
.tile .own i.em { width: calc(var(--fs) * 1.25); height: calc(var(--fs) * 1.25); font-size: calc(var(--fs) * .7); box-shadow: 0 0 0 1px #fff; }
.tile .own .lv { font-size: calc(var(--fs) * .8); color: #8a4b08; }
.tile.cardt .ph, .tile.corner .ph { background: radial-gradient(circle, #3a2a10, #1c1408); }
.tile.cardt .info, .tile.corner .info { background: #2a1d0b; }
.tile.cardt .nm, .tile.corner .nm { color: var(--gold); }
.tile .ic2 { font-size: calc(var(--fs) * 1.1); }
.tile.owned { box-shadow: inset 0 0 0 3px var(--own); }
.tile.owned .info { background: color-mix(in srgb, var(--own) 22%, var(--parch)); }
.tile.inv { box-shadow: inset 0 0 0 3px var(--gold), 0 0 10px var(--gold); z-index: 3; }
.tile.here { outline: 3px solid #fff; outline-offset: -3px; z-index: 4; box-shadow: 0 0 16px var(--saffron); }
i.oi { display: inline-block; width: calc(var(--fs, 12px) * 1.15); height: calc(var(--fs, 12px) * 1.15); font-style: normal; vertical-align: middle; }
i.oi svg { width: 100%; height: 100%; display: block; }
i.oi.off { opacity: .22; filter: grayscale(1); }
i.oi.hide { display: none; }
.token { position: absolute; width: var(--tok, 18px); height: var(--tok, 18px); border-radius: 50%; border: 2px solid #fff; transform: translate(-50%, -50%); transition: left .2s ease, top .2s ease; z-index: 6; box-shadow: 0 2px 5px #000b; display: flex; align-items: center; justify-content: center; font-size: calc(var(--tok, 18px) * .6); pointer-events: none; }
.token.me { width: calc(var(--tok, 18px) * 1.25); height: calc(var(--tok, 18px) * 1.25); z-index: 7; box-shadow: 0 0 0 2px var(--gold), 0 2px 6px #000; }

/* centre */
#center { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 3% 4%; text-align: center; overflow: hidden;
  background-image: linear-gradient(#16291ad0, #16291ae0), url(/forts/sardar-shivaji.jpg), radial-gradient(ellipse at 50% 35%, var(--felt1), var(--felt2));
  background-size: cover, auto 92%, cover; background-position: center; background-repeat: no-repeat; }
#spot { position: absolute; inset: 0; background: center/cover no-repeat; opacity: .16; pointer-events: none; }
#center > *:not(#spot):not(#sardars) { position: relative; z-index: 2; }
#sardars { position: absolute; top: 6px; left: 6px; right: 6px; display: flex; justify-content: center; gap: 6px; z-index: 1; }
#sardars .sd { width: clamp(26px, 8%, 52px); aspect-ratio: 1; border-radius: 50%; border: 2px solid #c9a227; background: #2a1d0b center/cover; opacity: .7; color: #f5e6c4; font-weight: 900; font-size: 10px; padding: 0; }
#sardars .sd:hover { opacity: 1; }
#who { font-weight: 800; font-size: 17px; }
#who small { display: block; color: #cfe3c8; font-weight: 600; font-size: 12px; }
#goal { font-size: 12px; color: #e8f2e3; width: min(330px, 92%); }
#goal b { color: var(--gold); }
.bar { height: 7px; background: #0008; border-radius: 99px; overflow: hidden; margin: 3px 0; }
.bar i { display: block; height: 100%; background: var(--gold); border-radius: 99px; }
#dice { display: flex; gap: 8px; min-height: 64px; align-items: center; justify-content: center; }
.kpts { font-size: 28px; font-weight: 900; color: var(--gold); margin-left: 8px; text-shadow: 0 2px 4px #000; }
#actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
#actions button { background: var(--saffron); color: #1a1000; border: 0; border-radius: 12px; padding: 10px 18px; font-weight: 800; font-size: 15px; }
#actions button.alt { background: #0007; color: var(--text); border: 1px solid #fff3; }
#feed { font-size: 12px; color: #d9e6d3; max-width: 100%; }
#feed div { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 2px 0; }
#feed .good { color: #a7f3c0; } #feed .bad { color: #fecaca; } #feed .big { color: var(--gold); font-weight: 700; } #feed .card { color: #c7d2fe; }
#dyk { font-size: 12px; color: #f5e6c4; max-width: 94%; background: #0007; border-radius: 10px; padding: 6px 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
#dyk b { color: var(--gold); }
#game.small #sardars, #game.small #dyk { display: none; }
#game.small #who { font-size: 15px; } #game.small #actions button { padding: 8px 14px; font-size: 14px; }

/* kavdya: 3D cowries with thickness, gloss and a shadow */
.kavdi { display: inline-flex; gap: 12px; perspective: 600px; }
.shell { position: relative; width: 30px; height: 42px; display: inline-block; transform-style: preserve-3d; }
.cw { position: absolute; inset: 0; transform-style: preserve-3d; }
.shell.is-d .cw { transform: rotateX(180deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.face svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 1px 0 #0003); }
.fw { transform: translateZ(4px); }
.fd { transform: rotateX(180deg) translateZ(4px); }
.rim { position: absolute; inset: 1px 1px; border-radius: 50%; background: radial-gradient(ellipse, #cdb48a, #8a6a3e); }
.r1 { transform: translateZ(2px); } .r2 { transform: translateZ(0); background: radial-gradient(ellipse, #b78d58, #6f4a22); } .r3 { transform: translateZ(-2px); background: radial-gradient(ellipse, #9c6a35, #4f2c10); }
.shell .shadow { position: absolute; left: 10%; right: 10%; bottom: -8px; height: 8px; border-radius: 50%; background: radial-gradient(ellipse, #000a, transparent 70%); transform: translateZ(-6px); }
.kavdi.flying .shell { animation: toss var(--dur) cubic-bezier(.3,.7,.4,1) var(--d) both; }
.kavdi.flying .cw { animation: spin var(--dur) cubic-bezier(.2,.6,.3,1) var(--d) both; }
.kavdi.flying .shadow { animation: shad var(--dur) cubic-bezier(.3,.7,.4,1) var(--d) both; }
@keyframes toss { 0% { transform: translateY(0) rotateZ(0); } 40% { transform: translateY(calc(var(--h) * -1)) rotateZ(calc(var(--rz) / 2)); } 70% { transform: translateY(0) rotateZ(var(--rz)); } 82% { transform: translateY(-8px) rotateZ(var(--rz)); } 100% { transform: translateY(0) rotateZ(var(--rz)); } }
@keyframes spin { from { transform: rotateX(0) rotateY(0); } to { transform: rotateX(var(--rx)) rotateY(var(--ry)); } }
@keyframes shad { 0% { opacity: 1; } 40% { opacity: .2; transform: translateZ(-6px) scale(.5); } 70%, 100% { opacity: 1; transform: translateZ(-6px) scale(1); } }
.force { display: flex; align-items: center; gap: 12px; }
.force .meter { width: 18px; height: 70px; border-radius: 9px; background: #0009; border: 2px solid #fff6; display: flex; align-items: flex-end; overflow: hidden; }
.force .meter i { display: block; width: 100%; background: linear-gradient(0deg, #4ade80, #ffd54f 60%, #ef4444); border-radius: 7px; }
.force .throw { background: var(--saffron); color: #1a1000; border: 0; border-radius: 12px; padding: 12px 18px; font-weight: 900; font-size: 16px; animation: pulse 1s infinite; }
.force small { color: #e8f2e3; font-size: 11px; max-width: 90px; }
@keyframes pulse { 50% { transform: scale(1.06); } }
#game.small .shell { width: 24px; height: 34px; } #game.small .kavdi { gap: 8px; } #game.small .force .meter { height: 54px; }

/* side panel (wide screens) */
#side { width: 300px; flex: none; overflow: auto; align-self: stretch; }
.tabs { display: flex; gap: 6px; margin-bottom: 10px; position: sticky; top: 0; background: var(--bg); padding-bottom: 4px; z-index: 2; }
.tabs button { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 7px 4px; font-weight: 800; font-size: 12px; color: var(--muted); }
.tabs button.on { background: var(--saffron); color: #1a1000; border-color: var(--saffron); }
.pcard { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px; margin-bottom: 10px; }
.pcard.on { border-color: var(--saffron); }
.pcard.out { opacity: .45; }
.pcard .phd { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.pcard .phd span { color: var(--muted); }
.pcard .phd .c { margin-left: auto; color: var(--gold); font-weight: 800; }
.pcard .need { font-size: 12px; color: var(--muted); }
.pcard .need b { color: var(--gold); }
.forts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fchip { display: flex; align-items: center; gap: 4px; background: var(--surface2); border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px 2px 2px; font-size: 11px; font-weight: 700; --fs: 10px; }
.fchip.u { border-color: var(--gold); color: var(--gold); }
.fchip.inv { box-shadow: 0 0 8px var(--gold); }
.fchip .th, .fortlist .th { width: 24px; height: 24px; border-radius: 50%; background: center/cover #333; flex: none; }
.fortlist .th { width: 44px; height: 44px; border-radius: 8px; }
.none { color: var(--muted); font-size: 12px; }
.dates h4 { margin: 0 0 8px; color: var(--saffron); font-size: 15px; }
.dt { font-size: 12px; padding: 5px 8px; border-left: 4px solid; margin-bottom: 5px; border-radius: 0 8px 8px 0; opacity: .6; }
.dt span { display: block; font-weight: 800; font-size: 11px; }
.dt.g { border-color: #22c55e; background: #14532d55; } .dt.g span { color: #4ade80; }
.dt.r { border-color: #ef4444; background: #7f1d1d55; } .dt.r span { color: #f87171; }
.dt.past { opacity: 1; }
.dates .lg { font-size: 11px; color: var(--muted); } .dates .lg .g { color: #4ade80; } .dates .lg .r { color: #f87171; }
.sdrow { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); cursor: pointer; }
.sdpic { width: 52px; height: 52px; flex: none; border-radius: 50%; border: 2px solid #c9a227; background: #2a1d0b center/cover; display: flex; align-items: center; justify-content: center; font-weight: 900; color: #f5e6c4; }
.sdrow small { display: block; color: var(--muted); font-size: 12px; }

/* sheets */
.modal { position: fixed; inset: 0; background: #000a; display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
.sheet { background: var(--surface); border: 1px solid var(--border); border-radius: 20px 20px 0 0; width: 100%; max-width: 620px; max-height: 94vh; max-height: 94dvh; overflow: auto; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
@media (min-width: 760px) { .modal { align-items: center; } .sheet { border-radius: 20px; } }
.sheet h3 { margin: 0 0 4px; font-size: 21px; }
.sheet .yr { font-size: 13px; color: var(--gold); font-weight: 700; }
.photo { margin: -18px -16px 10px; position: relative; }
.photo img { width: 100%; max-height: 230px; object-fit: cover; display: block; border-radius: 20px 20px 0 0; }
.photo.sm img { max-height: 140px; }
.photo figcaption { position: absolute; right: 8px; bottom: 6px; font-size: 10px; color: #fffc; background: #0008; padding: 2px 6px; border-radius: 6px; max-width: 80%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fact { background: #1b2a1c; border: 1px solid #2f5d34; color: #d6f5d9; border-radius: 12px; padding: 10px 12px; margin: 10px 0; font-size: 14px; }
.fact b { color: #a7f3c0; }
.card-text { background: linear-gradient(135deg, #3b2a0a, #1f1606); border: 1px solid var(--saffron); border-radius: 14px; padding: 16px; font-size: 16px; margin: 10px 0; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.btns button { flex: 1 1 140px; border-radius: 12px; padding: 12px; font-weight: 800; border: 1px solid var(--border); background: var(--surface2); display: inline-flex; align-items: center; justify-content: center; gap: 6px; --fs: 16px; }
.btns button.go { background: var(--saffron); color: #1a1000; border: 0; }
.btns button:disabled { opacity: .4; }
.ownrow { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: 6px 0; --fs: 18px; }
.ownrow .v { margin-left: auto; font-size: 13px; color: var(--muted); }
.ownrow .v b { color: var(--gold); }
.invtag, .hardtag { background: var(--gold); color: #1a1000; font-size: 11px; font-weight: 900; padding: 2px 8px; border-radius: 999px; letter-spacing: .5px; }
.hardtag { background: #b91c1c; color: #fff; }
.ladder { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0; --fs: 26px; }
.rung { background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; padding: 6px; text-align: center; opacity: .5; }
.rung.on { opacity: 1; border-color: var(--gold); }
.rung.next { opacity: 1; border: 2px dashed var(--saffron); }
.rung b { display: block; font-size: 12px; } .rung small { display: block; color: var(--muted); font-size: 10px; line-height: 1.2; }
.q { font-size: 17px; font-weight: 700; margin: 8px 0 12px; }
.opts { display: grid; gap: 8px; }
@media (min-width: 560px) { .opts { grid-template-columns: 1fr 1fr; } }
.opt { text-align: left; background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; padding: 12px; font-weight: 600; }
.opt b { color: var(--saffron); margin-right: 6px; }
.opt.gone { opacity: .2; pointer-events: none; }
.opt.right { background: #14532d; border-color: var(--good); }
.opt.wrong { background: #5f1d1d; border-color: var(--bad); }
.verdict { font-weight: 800; } .verdict.ok { color: var(--good); } .verdict.no { color: var(--bad); }
.life { display: flex; gap: 8px; margin: 12px 0 0; }
.life button { flex: 1; background: transparent; border: 1px dashed var(--border); border-radius: 10px; padding: 8px 4px; font-size: 13px; font-weight: 700; }
.life button:disabled { opacity: .3; }
.hint { display: flex; gap: 10px; align-items: center; background: var(--surface2); border-radius: 12px; padding: 8px 10px; margin-top: 10px; font-size: 14px; }
.hint img { width: 40px; height: 40px; object-fit: cover; object-position: top; border-radius: 50%; }
.progress { color: var(--gold); font-weight: 800; font-size: 13px; }
.fortlist .f { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid var(--border); cursor: pointer; --fs: 12px; }
.fortlist .f .grow { flex: 1; } .fortlist .f small { color: var(--muted); display: block; }
.vs { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.vs > div { flex: 1; text-align: center; background: var(--surface2); border-radius: 12px; padding: 6px; }
.vs img { width: 100%; height: 90px; object-fit: cover; border-radius: 8px; }
.vs b { display: block; } .vs small { color: var(--muted); }
.vs > span { font-weight: 900; color: var(--saffron); font-size: 20px; }
.rank { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 13px; }
.rank a { color: var(--gold); }
.win { text-align: center; } .win .big { font-size: 34px; font-weight: 900; color: var(--saffron); margin: 6px 0; }
.mandil { width: 160px; display: block; margin: 0 auto; filter: drop-shadow(0 6px 12px #000a); }
.toast { font-size: 13px; position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--surface2); border: 1px solid var(--saffron); border-radius: 999px; padding: 10px 16px; font-weight: 700; z-index: 60; max-width: 90vw; text-align: center; }
/* war */
.modal.warmode { align-items: stretch; }
.modal.warmode .sheet { max-width: 760px; height: 100%; max-height: 100vh; border-radius: 0; padding: 10px 12px; display: flex; }
.war { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.war .half { flex: 1; background: var(--surface2); border: 2px solid var(--pc); border-radius: 16px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow: auto; }
.war .half.rot { transform: rotate(180deg); }
.war .hh { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.war .pts { margin-left: auto; font-size: 26px; font-weight: 900; color: var(--gold); }
.war .st { font-size: 12px; color: var(--muted); min-width: 70px; text-align: right; }
.war .good { color: var(--good); font-weight: 800; } .war .bad { color: var(--bad); font-weight: 800; }
.war .wq { font-weight: 700; font-size: 15px; }
.war .opts { grid-template-columns: 1fr 1fr; }
.war .opt { padding: 10px; font-size: 14px; }
.war .opt.mine { box-shadow: 0 0 0 3px var(--gold); }
.wmid { text-align: center; color: var(--saffron); font-weight: 800; font-size: 13px; }
.wfact { color: #d6f5d9; font-weight: 500; font-size: 12px; margin-top: 4px; }

#game.small .tile .ph { flex-basis: 40%; }
.gamebody.below { flex-direction: column; align-items: center; }
.gamebody.below #side { width: 100%; max-width: 620px; flex: 1; min-height: 0; overflow: auto; align-self: center; }

/* online play */
.netctl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.netctl .or { color: var(--muted); font-size: 13px; }
#net-code { width: 5.5em; text-transform: uppercase; letter-spacing: .2em; font-weight: 700; text-align: center; }
#online.hl { border-color: var(--saffron); }
#net-room { margin-top: 10px; }
.roomcode { display: flex; align-items: baseline; gap: 10px; }
.roomcode b { font-size: 34px; letter-spacing: .25em; color: var(--gold); }
.btnlink { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: inherit; }
.prow .netname { flex: 1; font-weight: 600; }
.prow .tag { font-size: 12px; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px; }
.waitnote { color: var(--muted); font-size: 14px; text-align: center; margin: 8px 0 0; }
#actions .waitnote { display: block; padding: 6px 10px; }
body.netclient #themes-card, body.netclient #add-player, body.netclient #start, body.netclient #resume, body.netclient #resume-net,
body.netclient .row:has(#rounds), body.netclient #players .prow:not(:first-child), body.netclient #players .seg, body.netclient #players .x { display: none !important; }
.netctl .ghost { width: auto; flex: 1 1 8em; margin-top: 0; }
#net-code { background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 10px; color: inherit; font-size: 16px; }
.passbox { display: flex; flex-direction: column; gap: 4px; background: rgba(22,163,74,.14); border: 1.5px solid #16a34a; border-radius: 14px; padding: 12px 14px; margin: 10px 0; }
.passbox b { color: #86efac; font-size: 18px; }
.passbox span { color: var(--muted); }
