.hide { display: none !important; }
/* landing and join */
#join { position: fixed; inset: 0; overflow-y: auto; background: #1a1410 url(img/hero.jpg) center top / cover no-repeat; }
#join::before { content: ""; position: fixed; inset: 0; background: linear-gradient(180deg, rgba(10, 20, 20, .25) 0%, rgba(10, 20, 20, .55) 38%, rgba(10, 20, 20, .96) 72%); pointer-events: none; }
.wrap { position: relative; max-width: 460px; margin: 0 auto; padding: calc(34vh + env(safe-area-inset-top)) 20px 40px; }
.wrap h1 { margin: 0; font-size: 62px; font-weight: 700; letter-spacing: .1em; line-height: .95; text-shadow: 0 4px 24px rgba(0, 0, 0, .7); }
.wrap .tag { font-size: 21px; color: var(--sand); margin: 6px 0 16px; line-height: 1.2; }
.wrap p { color: var(--dim); font-size: 17px; line-height: 1.35; margin: 0 0 14px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 16px; }
.facts div { background: rgba(14, 30, 30, .8); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.facts b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.facts small { color: var(--dim); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.card h2 { margin: 0 0 10px; font-size: 22px; }
.card input { width: 100%; font: inherit; font-size: 18px; color: var(--ink); background: rgba(255, 255, 255, .08); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; margin-bottom: 8px; outline: none; user-select: text; -webkit-user-select: text; }
.card input::placeholder { color: var(--dim); }
.card input:focus { border-color: var(--sand); }
.card .btn { width: 100%; display: block; margin-top: 4px; }
.card .alt { background: none; color: var(--dim); font-size: 16px; padding: 10px; width: 100%; text-decoration: underline; }
.err { color: #ff9c88; font-size: 16px; min-height: 20px; margin: 6px 0 0; }
.how { margin: 18px 0 0; padding: 0; list-style: none; }
.how li { color: var(--dim); font-size: 17px; line-height: 1.3; padding: 8px 0; border-top: 1px solid var(--line); }
.how b { color: var(--ink); }
.foot { text-align: center; margin-top: 18px; font-size: 15px; }
.foot a { color: var(--dim); }
/* game shell */
#nav { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: var(--panel); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 5; }
#nav button { flex: 1; background: none; padding: 13px 0 12px; font-size: 14px; letter-spacing: .07em; text-transform: uppercase; color: var(--dim); position: relative; }
#nav button.on { color: var(--sand); }
#nav button.on::before { content: ""; position: absolute; left: 22%; right: 22%; top: 0; height: 3px; border-radius: 2px; background: var(--sand); }
#nav i { position: absolute; top: 3px; right: 4%; min-width: 17px; height: 17px; border-radius: 9px; background: var(--stop); color: #fff; font-style: normal; font-size: 12px; line-height: 17px; padding: 0 4px; }
#top { z-index: 4; }
#build { bottom: calc(64px + env(safe-area-inset-bottom)); }
#hint { bottom: calc(72px + env(safe-area-inset-bottom)); }
#sheet { z-index: 6; background: #0f201f; }
#toast { z-index: 9; }
#panel { position: fixed; left: 0; right: 0; top: 0; bottom: calc(46px + env(safe-area-inset-bottom)); overflow-y: auto; background: #12201f; padding: calc(74px + env(safe-area-inset-top)) 12px 20px; }
#panel h2 { margin: 4px 0 8px; font-size: 24px; }
#panel h3, #sheet h3 { margin: 16px 0 6px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); font-weight: 600; }
#alert { background: var(--stop); color: #fff; border-radius: 10px; padding: 5px 12px; font-size: 16px; font-weight: 700; }
.row { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; background: rgba(255, 255, 255, .06); border-radius: 12px; padding: 7px 10px; margin-bottom: 6px; }
.row img { width: 50px; height: 50px; object-fit: contain; flex: none; }
.row .g { flex: 1; min-width: 0; }
.row b { display: block; font-size: 18px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row span { color: var(--dim); font-size: 14px; line-height: 1.2; display: block; }
.row .r { text-align: right; font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row .r small { display: block; color: var(--dim); font-size: 13px; }
.row.me { outline: 1px solid var(--sand); }
.row.locked { opacity: .55; }
.row.win { border-left: 4px solid var(--go); }
.row.loss { border-left: 4px solid var(--stop); }
.step { display: flex; gap: 4px; align-items: center; justify-content: flex-end; }
.step button { width: 34px; height: 34px; border-radius: 9px; background: rgba(255, 255, 255, .12); font-size: 15px; font-weight: 700; }
.step button.w { width: 44px; }
.step output { min-width: 36px; text-align: center; font-size: 19px; font-variant-numeric: tabular-nums; }
.mini { padding: 8px 12px; border-radius: 10px; background: var(--go); color: #10230b; font-weight: 700; font-size: 16px; }
.mini:disabled { opacity: .4; }
#mapc { position: static; width: 100%; height: 44vh; border-radius: 14px; background: #2b3a34; touch-action: none; display: block; }
.sides { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 6px 0; }
.sides button { padding: 9px 0; border-radius: 10px; background: rgba(255, 255, 255, .1); font-size: 15px; }
.sides button.on { background: var(--sand); color: #2a1c08; }
.sides small { display: block; font-size: 12px; opacity: .8; }
.odds { margin: 10px 0 4px; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, .07); font-size: 15px; line-height: 1.35; }
.odds b { display: block; font-size: 20px; margin-bottom: 3px; }
.odds span { display: block; }
.odds small { display: block; margin-top: 6px; font-size: 12px; opacity: .7; }
.odds.win { background: rgba(127, 197, 107, .18); box-shadow: inset 4px 0 0 #7fc56b; }
.odds.win b { color: #9fdb8a; }
.odds.close { background: rgba(233, 184, 114, .18); box-shadow: inset 4px 0 0 #e9b872; }
.odds.close b { color: #f3d9a4; }
.odds.loss { background: rgba(224, 112, 90, .18); box-shadow: inset 4px 0 0 #e0705a; }
.odds.loss b { color: #f29a86; }
.kv { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin: 8px 0; }
.banner { border-radius: 12px; padding: 10px 12px; font-size: 20px; font-weight: 700; margin: 8px 0; }
.banner.win { background: rgba(127, 197, 107, .2); color: var(--go); }
.banner.loss { background: rgba(224, 112, 90, .2); color: #ff9c88; }
.duel { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.duel h4 { margin: 0 0 4px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.pill { display: flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .06); border-radius: 9px; padding: 3px 8px 3px 4px; margin-bottom: 4px; font-size: 15px; min-height: 34px; }
.pill img { width: 28px; height: 28px; object-fit: contain; }
.pill b { margin-left: auto; font-variant-numeric: tabular-nums; }
.pill.dead { opacity: .35; }
.link { background: none; color: var(--dim); text-decoration: underline; font-size: 15px; padding: 8px 0; }
.card .btn.google { background: #f3ead8; color: #1a1410; margin: 0 0 4px; }
.or { text-align: center; color: var(--dim); font-size: 14px; letter-spacing: .1em; text-transform: uppercase; margin: 10px 0 8px; }

.age { float: right; font-weight: 500; letter-spacing: 0; text-transform: none; opacity: .65; }
.bmap { margin: 8px 0; padding: 6px 6px 8px; border-radius: 12px; background: rgba(0, 0, 0, .22); }
.bmap svg { display: block; width: 100%; height: auto; }
.bmap .legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 0 6px; font-size: 12px; opacity: .85; }
.bmap .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: -4px; }
.bmap .legend span { flex-basis: 100%; opacity: .7; }
