/* ================= ARENA, INTRO, LOBBY, ACHIEVEMENTS, SETTINGS, SHARE ================= */

/* ---------- shared bits ---------- */
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); display: inline-flex; align-items: center; gap: 8px; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(255,93,93,.7); animation: liveDot 1.6s infinite; vertical-align: middle; margin-right: 6px; }
@keyframes liveDot { 70% { box-shadow: 0 0 0 8px rgba(255,93,93,0); } 100% { box-shadow: 0 0 0 0 rgba(255,93,93,0); } }
.icon-btn { appearance: none; border: 1px solid var(--line); background: var(--card2); color: var(--text); width: 36px; height: 36px; border-radius: 10px; cursor: pointer; font-size: 16px; display: inline-grid; place-items: center; transition: transform .15s, border-color .15s, background .15s; }
.icon-btn:hover { border-color: var(--gold); transform: translateY(-1px); }
.icon-btn[aria-pressed="true"] { background: #2a1d1d; border-color: #5a2a2a; }
.me-chip { gap: 8px; }
#me-chip { display: flex; align-items: center; gap: 10px; }
.chip-me { display: flex; align-items: center; gap: 8px; }
.page.wide { max-width: 1180px; }
.page-head { margin-bottom: 18px; }
.page-head h2 { font-size: clamp(30px, 4.4vw, 44px); font-weight: 900; letter-spacing: -.035em; margin: 6px 0 6px; }
.lead-text { color: #aab1bd; font-size: 16px; margin: 0; max-width: 620px; line-height: 1.55; }
.section-head { display: flex; align-items: center; gap: 14px; margin: 30px 0 14px; }
.section-head h3 { margin: 0; font-size: 22px; letter-spacing: -.02em; }

/* ---------- home ---------- */
.home-hero { max-width: 1100px; margin: 0 auto; padding: 26px 24px 0; }
.hero-me { display: inline-flex; align-items: center; gap: 16px; border-radius: 18px; padding: 6px 18px 6px 6px; transition: background .2s; }
.hero-me:hover { background: rgba(255,255,255,.04); }
.hero-me .avatar.lg { width: 72px; height: 72px; }
.hero-text { display: grid; gap: 4px; min-width: 0; }
.hero-me .hello { margin: 0; font-size: clamp(30px, 4.6vw, 44px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70vw; }
.hero-record { display: flex; align-items: center; gap: 6px; font: 800 17px var(--mono); }
.hero-record .w { color: var(--green); }
.hero-record .l { color: var(--red); }
.hero-record .sep { color: var(--muted); }
.hero-record .streak-pill { margin-left: 8px; font-family: Inter, sans-serif; }
.hello { margin: 4px 0 6px; font-size: clamp(34px, 5vw, 54px); font-weight: 900; letter-spacing: -.04em; line-height: 1.02;
  background: linear-gradient(100deg, #fff 0%, #fff6d6 35%, var(--gold) 50%, #fff6d6 65%, #fff 100%); background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 7s linear infinite; }
.mode-live { grid-column: 1 / -1; align-items: center; background: linear-gradient(135deg, #2a0f14, var(--card) 55%); border-color: #4a1d24; }
.mode-live .mode-arrow { font-size: 22px; color: var(--muted); transition: transform .2s, color .2s; }
.mode-live:hover { transform: translateY(-4px); border-color: var(--red); }
.mode-live:hover .mode-arrow { transform: translateX(6px); color: var(--text); }
.live-count { font-size: 12px; font-weight: 800; color: #fff; background: var(--red); border-radius: 999px; padding: 3px 8px; margin-left: 6px; vertical-align: middle; display: none; }
.live-count.on { display: inline-block; }
.mode-card.suggested { border-color: var(--gold); animation: suggestPulse 1.2s ease-in-out infinite; }
@keyframes suggestPulse { 50% { box-shadow: 0 0 0 4px rgba(245,197,66,.35), 0 0 50px rgba(245,197,66,.3); } }
.tip-list { list-style: none; padding: 0 !important; margin: 0; display: grid; gap: 10px; }
.tip-list li { display: flex; gap: 12px; align-items: flex-start; line-height: 1.45; }
.tip-list li > span { font-size: 20px; width: 28px; text-align: center; flex-shrink: 0; }
.tip-list b { color: var(--text); }
.tips h4 { font-size: 17px; margin-bottom: 14px !important; }
.best-find-card span { color: var(--gold); font-weight: 800; font-family: var(--mono); }
.best-find-card { margin-bottom: 4px; }

/* ---------- arena layout ---------- */
.arena { max-width: 1320px; margin: 0 auto; padding: 14px 20px 24px; display: grid; gap: 12px; }
.arena-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.arena-mode { font-weight: 800; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); display: flex; align-items: center; }
.arena-tools { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.arena-top .timer { width: 64px; height: 64px; }
.arena-top .timer span { font-size: 22px; }
.watchers { font-size: 13px; font-weight: 700; color: #dfe3ea; background: rgba(255,255,255,.06); border: 1px solid var(--line); padding: 6px 10px; border-radius: 999px; }
.rec-badge { display: inline-flex; align-items: center; gap: 6px; font: 700 12px var(--mono); color: #ff8080; background: rgba(255,93,93,.1); border: 1px solid rgba(255,93,93,.35); padding: 6px 10px; border-radius: 999px; }
.rec-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.tug { display: grid; gap: 4px; justify-items: center; }
.tug-bar { width: min(560px, 100%); height: 8px; border-radius: 999px; background: linear-gradient(90deg, #4da3ff, #7b5cff); overflow: hidden; box-shadow: 0 0 20px rgba(77,163,255,.2); }
.tug-a { height: 100%; width: 50%; background: linear-gradient(90deg, #ffdf7e, var(--gold)); box-shadow: 0 0 16px rgba(245,197,66,.6); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.tug-label { font-size: 13px; font-weight: 700; color: #cfd5df; }

.arena-stage { position: relative; display: grid; gap: 16px; align-items: start; }
.arena-stage.seats-2 { grid-template-columns: 1fr 1fr; }
.arena-stage.seats-1 { grid-template-columns: minmax(0, 880px); justify-content: center; }
.seat { display: grid; gap: 10px; min-width: 0; }
.seat.is-me { order: -1; } /* your own camera is always on the left */
.seat .cam { position: relative; aspect-ratio: 4 / 3; max-height: calc(100dvh - 260px); width: 100%; border-radius: 20px; overflow: hidden; background: #000; border: 2px solid var(--line); transition: border-color .3s, box-shadow .3s; }
.seats-1 .seat .cam { aspect-ratio: 16 / 10; }
.seat.is-me .cam { border-color: rgba(245,197,66,.55); box-shadow: 0 0 30px rgba(245,197,66,.12); }
.seat:not(.is-me) .cam { border-color: rgba(77,163,255,.45); box-shadow: 0 0 30px rgba(77,163,255,.1); }
.seat .cam video, .seat .cam img.remote, .seat .cam canvas.botcam { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.seat .cam video { transform: scaleX(-1); }
.seat .cam img.remote { transform: none; }
.cam-wait { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--muted); font-size: 14px; font-weight: 600; background: radial-gradient(circle, #1a1f29, #0b0d10); z-index: 1; }
.cam-wait span::after { content: ''; animation: dots 1.4s steps(4) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
.seat-score { position: absolute; top: 12px; right: 12px; z-index: 2; background: rgba(0,0,0,.62); backdrop-filter: blur(6px); padding: 8px 14px; border-radius: 14px; text-align: right; }
.seat-score span { display: block; font-size: 10px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.seat-score .score { font: 800 clamp(20px, 2.6vw, 32px) var(--mono); color: var(--gold); font-variant-numeric: tabular-nums; }
.seat:not(.is-me) .seat-score .score { color: #9fd0ff; }
.seat-tag { position: absolute; left: 12px; bottom: 12px; z-index: 2; display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,.62); backdrop-filter: blur(6px); padding: 5px 12px 5px 5px; border-radius: 999px; font-weight: 700; font-size: 14px; max-width: calc(100% - 24px); }
.seat-tag .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-tag em { font-style: normal; font-size: 10px; font-weight: 900; letter-spacing: .1em; background: var(--gold); color: #1a1405; padding: 2px 6px; border-radius: 5px; }
.seat-tag i { font-style: normal; font-size: 12px; color: #ffb36b; }
.seat .scan-status { position: absolute; left: 50%; bottom: 58px; transform: translateX(-50%); z-index: 2; background: rgba(0,0,0,.65); padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; backdrop-filter: blur(6px); white-space: nowrap; }
.seat .scan-status:empty { display: none; }
.seat .scanline { z-index: 2; }
.seat .pop-layer { z-index: 3; }
.pop.out { animation: popOut .35s ease forwards !important; }
@keyframes popOut { to { opacity: 0; transform: translateY(-70px) scale(.85); } }
.pop.small .amt { font-size: 40px; }
.pop.small .nm { font-size: 16px; }
.arena-stage.final .seat.is-me .cam { animation: lastSeconds 1s ease-in-out infinite; }
.seat .cam.flash::after { z-index: 4; }

.feed-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 0 4px; }
.feed-head b { color: var(--text); letter-spacing: .02em; }
.seat .feed { display: flex; flex-wrap: wrap; gap: 6px; max-height: 120px; overflow: auto; min-height: 34px; }
.seat .feed li { padding: 5px 10px 5px 6px; font-size: 13px; }
.seat .feed li .em { font-size: 15px; }
.seat .feed li .n { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat .feed .empty-feed { color: var(--muted); font-size: 13px; padding: 6px 4px; background: none; border: 0; }

.pb { position: relative; height: 30px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line); overflow: hidden; }
.pb-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, rgba(245,197,66,.25), rgba(245,197,66,.6)); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.pb.beat .pb-fill { background: linear-gradient(90deg, rgba(61,220,132,.35), rgba(61,220,132,.75)); }
.pb-text { position: relative; display: block; text-align: center; line-height: 28px; font-size: 13px; font-weight: 700; }

/* overlay covers the whole stage */
.arena-stage > .overlay { position: absolute; inset: -6px; border-radius: 22px; z-index: 10; background: radial-gradient(ellipse at center, rgba(20,16,4,.86), rgba(5,6,8,.94)); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; text-align: center; }

/* ---------- intro screens ---------- */
.intro { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; max-width: 760px; margin: 0 auto; animation: introIn .5s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes introIn { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.intro-ring { position: relative; border-radius: 50%; padding: 5px; background: conic-gradient(from var(--angle, 0deg), var(--gold), #7a5a0a, #ffe48f, #7a5a0a, var(--gold)); animation: spinBorder 4s linear infinite; box-shadow: 0 0 50px rgba(245,197,66,.35); }
.intro-ring .avatar { display: block; border: 4px solid #0b0d10; width: 128px; height: 128px; }
@keyframes spinBorder { to { --angle: 360deg; } }
.intro-name { margin: 2px 0 0; font-size: clamp(40px, 7vw, 76px); font-weight: 900; letter-spacing: -.045em; line-height: 1;
  background: linear-gradient(100deg, #fff 0%, #fff6d6 30%, var(--gold) 48%, #fff6d6 62%, #fff 100%); background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 24px rgba(245,197,66,.3)); animation: shimmer 5s linear infinite; }
.pb-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; color: #dfe3ea; background: rgba(245,197,66,.08); border: 1px solid rgba(245,197,66,.35); padding: 9px 18px; border-radius: 999px; }
.pb-pill b { font: 800 18px var(--mono); color: var(--gold); }
.intro-steps { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.intro-steps div { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: #cfd5df; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); padding: 9px 14px; border-radius: 12px; animation: introIn .5s both; }
.intro-steps div:nth-child(2) { animation-delay: .1s; }
.intro-steps div:nth-child(3) { animation-delay: .2s; }
.intro-steps span { font-size: 18px; }

.vs-row { display: flex; align-items: center; justify-content: center; gap: clamp(14px, 5vw, 56px); margin-top: 8px; }
.vs-card { position: relative; display: grid; justify-items: center; gap: 8px; min-width: 0; animation: slideL .6s cubic-bezier(.2,.9,.3,1.2) both; }
.vs-card.right { animation-name: slideR; }
.vs-card.right .intro-ring { background: conic-gradient(from var(--angle, 0deg), #4da3ff, #1b3a6b, #9fd0ff, #1b3a6b, #4da3ff); box-shadow: 0 0 50px rgba(77,163,255,.35); }
@keyframes slideL { from { opacity: 0; transform: translateX(-70px); } }
@keyframes slideR { from { opacity: 0; transform: translateX(70px); } }
.vs-name { font-size: clamp(20px, 3vw, 28px); font-weight: 900; letter-spacing: -.02em; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-meta { color: var(--muted); font-size: 14px; font-weight: 600; }
.you-tag { position: absolute; top: -6px; right: 6px; font-size: 10px; font-weight: 900; letter-spacing: .12em; background: var(--gold); color: #1a1405; padding: 3px 7px; border-radius: 6px; }
.vs-mark { position: relative; display: grid; place-items: center; width: 84px; height: 84px; flex-shrink: 0; }
.vs-mark::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, rgba(245,197,66,.45), transparent 70%); animation: vsPulse 1.2s ease-in-out infinite; }
.vs-mark span { position: relative; font: italic 900 46px Inter, sans-serif; background: linear-gradient(180deg, #fff2b8, var(--gold) 55%, #b77a0c); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 0 #3a2800); animation: vsSlam .6s .35s cubic-bezier(.2,.9,.3,1.4) both; }
@keyframes vsPulse { 50% { transform: scale(1.25); opacity: .6; } }
@keyframes vsSlam { from { transform: scale(3) rotate(-12deg); opacity: 0; } }
.intro-foot { margin-top: 10px; font-size: 15px; color: #cfd5df; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); padding: 9px 18px; border-radius: 999px; }
.intro-foot b { color: #ffb36b; }

.cd { gap: 4px; }
.cd-num { font: 900 clamp(110px, 18vw, 180px) var(--mono); line-height: 1; background: linear-gradient(180deg, #fff6d6, var(--gold) 55%, #c98a0c); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 40px rgba(245,197,66,.45)); animation: cdPop .9s cubic-bezier(.2,.9,.3,1.2) both; }
.cd-num.small { font-size: clamp(70px, 12vw, 110px); }
.cd-num.go { font-family: Inter, sans-serif; font-style: italic; letter-spacing: -.04em; }
@keyframes cdPop { 0% { transform: scale(2.2); opacity: 0; } 25% { transform: scale(.95); opacity: 1; } 40% { transform: scale(1); } }
.cd-sub { font-size: 17px; font-weight: 600; color: #cfd5df; animation: introIn .4s .15s both; }

/* ---------- reactions ---------- */
.react-layer { position: absolute; inset: 0; pointer-events: none; z-index: 12; overflow: hidden; }
.react-float { position: absolute; bottom: 10px; display: grid; justify-items: center; animation: reactUp 2.6s ease-out forwards; }
.react-float span { font-size: 40px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.6)); }
.react-float small { font-size: 11px; font-weight: 700; color: #fff; background: rgba(0,0,0,.55); padding: 2px 6px; border-radius: 6px; }
@keyframes reactUp { 0% { transform: translateY(0) scale(.5); opacity: 0; } 12% { transform: translateY(-20px) scale(1.15); opacity: 1; } 100% { transform: translateY(-340px) scale(1); opacity: 0; } }
.react-bar { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; width: max-content; max-width: 100%; margin: 0 auto; }
.react-btn { appearance: none; border: 0; background: transparent; font-size: 26px; cursor: pointer; width: 46px; height: 46px; border-radius: 50%; transition: transform .15s, background .15s; }
.react-btn:hover { background: rgba(255,255,255,.08); transform: translateY(-3px) scale(1.12); }

/* ---------- lobby ---------- */
.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.live-card { background: linear-gradient(180deg, #151920, #0f1216); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: grid; gap: 14px; transition: transform .2s, border-color .2s, box-shadow .2s; animation: fadeUp .4s both; }
.live-card:hover { transform: translateY(-4px); border-color: rgba(255,93,93,.5); box-shadow: 0 14px 40px rgba(0,0,0,.4), 0 0 30px rgba(255,93,93,.1); }
.lc-top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; }
.lc-mode { color: #cfd5df; }
.lc-state { font: 700 12px var(--mono); color: var(--muted); }
.lc-state.live { color: #ff8080; }
.lc-state.soon { color: var(--gold); }
.lc-players { display: flex; align-items: center; justify-content: space-around; gap: 8px; }
.lc-p { display: grid; justify-items: center; gap: 4px; text-align: center; min-width: 0; flex: 1; }
.lc-p.lead .lc-score { color: var(--gold); }
.lc-p.lead .avatar { border-color: var(--gold); box-shadow: 0 0 18px rgba(245,197,66,.4); }
.lc-name { font-weight: 800; font-size: 15px; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-name i { font-style: normal; font-size: 12px; color: #ffb36b; }
.lc-score { font: 800 18px var(--mono); }
.lc-items { font-size: 12px; color: var(--muted); }
.lc-vs { font: italic 900 22px Inter, sans-serif; color: var(--gold); }
.lc-foot { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.live-empty { grid-column: 1 / -1; text-align: center; padding: 50px 20px; background: var(--card); border: 1px dashed var(--line); border-radius: 20px; }
.live-empty .big-emoji { font-size: 54px; animation: floaty 3s ease-in-out infinite; }
.live-empty h3 { margin: 10px 0 6px; font-size: 22px; }
.live-empty .btn { margin-top: 16px; display: inline-block; }
@keyframes floaty { 50% { transform: translateY(-10px); } }

/* ---------- achievements ---------- */
.ach-progress { flex: 1; max-width: 260px; height: 8px; background: var(--bg2); border-radius: 999px; overflow: hidden; }
.ach-progress span { display: block; height: 100%; background: linear-gradient(90deg, #cd7f32, #c9d1dc, var(--gold), #8ef0ff); }
.ach-group { margin-bottom: 16px; }
.ach-group-head { display: flex; justify-content: space-between; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .16em; padding: 0 2px 8px; }
.ach-group-head.bronze { color: #e0a06a; } .ach-group-head.silver { color: #d6dde6; } .ach-group-head.gold { color: var(--gold); } .ach-group-head.diamond { color: #8ef0ff; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.ach { --ring: #cd7f32; --glow: rgba(205,127,50,.25); display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; transition: transform .2s, border-color .2s; }
.ach:hover { transform: translateY(-2px); border-color: var(--ring); }
.ach.silver { --ring: #c9d1dc; --glow: rgba(201,209,220,.25); }
.ach.gold { --ring: #f5c542; --glow: rgba(245,197,66,.3); }
.ach.diamond { --ring: #8ef0ff; --glow: rgba(142,240,255,.35); }
.ach-medal { position: relative; flex-shrink: 0; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; background: radial-gradient(circle at 35% 30%, #262c37, #0e1014); border: 3px solid var(--ring); box-shadow: 0 0 18px var(--glow), inset 0 0 12px rgba(0,0,0,.6); }
.ach.diamond .ach-medal { border: 0; padding: 3px; background: conic-gradient(from var(--angle, 0deg), #8ef0ff, #c58bff, #fff, #7ff5c8, #8ef0ff); animation: spinBorder 3s linear infinite; }
.ach.diamond .ach-medal span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #1d2a35, #0b0f14); }
.ach-tier { font-size: 10px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; color: var(--ring); }
.ach-name { font-weight: 800; font-size: 15px; }
.ach-desc { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.ach-at { font-size: 11px; color: #6f7888; margin-top: 2px; }
.ach.locked { opacity: .5; }
.ach.locked .ach-medal { filter: grayscale(1); box-shadow: none; }
.ach.locked.diamond .ach-medal { animation: none; }
.ach.big { padding: 16px 18px; background: linear-gradient(180deg, #1a1e26, #12151a); }
.ach.big .ach-medal { width: 68px; height: 68px; font-size: 30px; }
.unlocks { margin: 6px auto 22px; }
.unlocks-title { font-size: 13px; font-weight: 900; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.unlock-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; text-align: left; }
.unlock-row.compact { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); max-width: 980px; margin: 0 auto; }
.unlock { animation: unlockIn .7s cubic-bezier(.2,.9,.3,1.35) both; animation-delay: calc(.8s + var(--i) * .18s); }
@keyframes unlockIn { from { opacity: 0; transform: scale(.4) rotate(-6deg); } }

/* ---------- results ---------- */
.result-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-top: 10px; display: flex; justify-content: center; align-items: center; }
.result-actions { margin: 4px 0 26px; }
.share-zone { margin: 0 auto 28px; text-align: left; }
.share-title { text-align: center; margin: 0 0 14px; font-size: 22px; }
.share-title span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 4px; }
.share-grid { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.share-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: grid; gap: 10px; width: 300px; }
.share-media { border-radius: 12px; overflow: hidden; background: #0b0d10; display: grid; place-items: center; }
.share-media.vertical { aspect-ratio: 9 / 16; }
.share-media.card { aspect-ratio: 4 / 5; }
.share-media video, .share-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rendering { display: grid; justify-items: center; gap: 10px; color: var(--muted); font-size: 13px; text-align: center; padding: 16px; line-height: 1.5; }
.share-label { font-weight: 700; font-size: 14px; display: flex; justify-content: space-between; gap: 8px; }
.share-label span { color: var(--muted); font-weight: 600; font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.share-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.share-btns .btn { flex: 1; padding: 9px 10px; font-size: 13px; white-space: nowrap; }
#hl-make { flex-basis: 100%; }
.muted-card { opacity: .7; }
.receipt h4 .avatar { width: 22px; height: 22px; }

/* ---------- settings ---------- */
.settings-card { position: relative; text-align: left; max-width: 460px; }
.settings-card h3 { margin: 0 0 14px; font-size: 22px; }
.set-group { display: grid; gap: 10px; margin-bottom: 18px; }
.set-title { font-size: 11px; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; background: var(--bg2); border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.set-row b { display: block; font-size: 14px; }
.set-row small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; line-height: 1.4; }
.set-row input[type=range] { width: 160px; accent-color: var(--gold); }
.switch { appearance: none; width: 44px; height: 26px; border-radius: 999px; background: #2a303b; position: relative; cursor: pointer; flex-shrink: 0; transition: background .2s; border: 0; padding: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s cubic-bezier(.2,.9,.3,1.4); }
.switch:checked { background: var(--gold); }
.switch:checked::after { transform: translateX(18px); }
.switch:focus { box-shadow: 0 0 0 3px rgba(245,197,66,.25); }
.set-group > .btn { justify-self: start; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .arena { padding: 10px 12px 18px; }
  .arena-stage.seats-2 { gap: 8px; }
  .arena-stage.seats-2 .seat .cam { aspect-ratio: 3 / 4; border-radius: 14px; }
  .arena-stage.seats-2 .seat-score { top: 6px; right: 6px; padding: 5px 8px; }
  .arena-stage.seats-2 .seat-tag { left: 6px; bottom: 6px; font-size: 12px; }
  .arena-stage.seats-2 .seat-tag .avatar { width: 20px; height: 20px; }
  .arena-stage.seats-2 .pop .amt { font-size: 30px; }
  .arena-stage.seats-2 .pop .nm { font-size: 13px; }
  .arena-stage.seats-2 .pop .q { display: none; }
  .arena-stage.seats-2 .seat .scan-status { font-size: 11px; bottom: 40px; padding: 5px 9px; }
  .seats-1 .seat .cam { aspect-ratio: 3 / 4; }
  .arena-top { grid-template-columns: auto 1fr auto; }
  .arena-mode { font-size: 11px; letter-spacing: .08em; }
  .arena-top .timer { width: 54px; height: 54px; justify-self: center; }
  .vs-row { gap: 10px; }
  .intro-ring .avatar { width: 92px; height: 92px; }
  .vs-mark { width: 56px; height: 56px; }
  .vs-mark span { font-size: 32px; }
  .seat .feed li .n { max-width: 110px; }
}
@media (max-width: 640px) {
  .watchers, .rec-badge { display: none !important; }
  .arena-tools .btn { padding: 7px 10px; font-size: 13px; }
  .intro-ring .avatar { width: 76px; height: 76px; }
  .vs-name { font-size: 17px; max-width: 130px; }
  .vs-meta { font-size: 12px; }
  .intro-steps div { font-size: 12px; padding: 7px 10px; }
  .home-hero { padding: 20px 16px 0; }
  .share-card { width: 100%; }
  .live-grid { grid-template-columns: 1fr; }
  .react-btn { width: 38px; height: 38px; font-size: 22px; }
  .seat .feed { max-height: 90px; }
}

/* ---------- gradient-text safety ----------
   Gradient text (background-clip: text) only paints inside the element's own box. Italic glyphs lean
   past the right edge, descenders (g, y, p, j) hang below short line-heights and tight letter-spacing
   pulls the last glyph outside, so those parts render transparent and look cut off. Pad every
   gradient-text element so the paint covers the full glyphs, and cancel the padding with negative
   margins so layout and centering stay exactly the same. */
.lp-title, .landing .gold, .db-winner, .hello, .intro-name, .cd-num, .vs-mark span,
.result-title.win, .pop.legendary .amt {
  padding: .08em .16em .14em;
  margin: -.08em -.16em -.14em;
}
/* italic + heavy: give the slanted right side (and the leading edge) extra room */
.vs-mark span, .cd-num.go {
  padding-left: .22em; padding-right: .34em;
  margin-left: -.22em; margin-right: -.34em;
}
.landing .gold { display: inline-block; }
/* centered with translate(-50%): symmetric padding alone keeps it centered, margins would shift it */
.db-winner { margin: 0; }

/* ---------- pop-ups never wider than their camera ----------
   Each camera is a size container, so "+$ amount" and item names scale with the camera instead of
   running past its (overflow: hidden) edge on small phones. */
.seat .cam { container-type: inline-size; }
.seat .pop { max-width: 94%; }
.seat .pop .amt { font-size: min(64px, 15cqw); white-space: nowrap; }
.seat .pop.small .amt, .arena-stage.seats-2 .seat .pop .amt { font-size: min(40px, 14cqw); }
.seat .pop .nm { font-size: min(22px, 7.5cqw); overflow-wrap: anywhere; line-height: 1.2; }
.seat .pop .q { font-size: min(15px, 5.5cqw); }
.seat .seat-score .score { font-size: min(32px, 8.5cqw); }

/* ---------- camera check ---------- */
.cam-card { position: relative; max-width: 520px; text-align: center; display: grid; gap: 12px; }
.cam-card h3 { margin: 0; font-size: 22px; }
.cam-sub { margin: -6px 0 0; font-size: 14px; }
.cam-preview { position: relative; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: radial-gradient(circle, #1a1f29, #0b0d10); border: 2px solid rgba(245,197,66,.4); }
.cam-preview video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.cam-preview video.no-mirror, .seat .cam video.no-mirror { transform: none; }
.cam-msg { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 20px; color: #cfd5df; font-size: 15px; line-height: 1.45; }
.cam-msg small { color: var(--muted); }
.cam-err-icon { font-size: 40px; }
.cam-label { position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 20px); font-size: 12px; font-weight: 700; background: rgba(0,0,0,.6); padding: 4px 10px; border-radius: 999px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cam-label:empty { display: none; }
.cam-help { text-align: left; font-size: 13.5px; line-height: 1.5; color: #dfe3ea; background: rgba(255,93,93,.08); border: 1px solid rgba(255,93,93,.3); border-radius: 12px; padding: 12px 14px; }
.cam-controls { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.cam-controls select { flex: 1; min-width: 0; max-width: 300px; background: var(--bg2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; font: 14px Inter, sans-serif; }
.cam-card.busy .cam-controls, .cam-card.busy #cam-ok { opacity: .5; pointer-events: none; }
.cam-card .row .btn.big { min-width: 220px; }

/* camera pill on the Play screen */
button.pill { font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.pill.pill-cam.ok { color: var(--text); border-color: rgba(61,220,132,.35); }
.pill.pill-cam.ok i { background: var(--green); }
.pill.pill-cam.ask { color: #1a1405; background: linear-gradient(180deg, #ffe48f, var(--gold)); border-color: transparent; animation: camAsk 1.8s ease-in-out infinite; }
.pill.pill-cam.ask i { background: #1a1405; }
.pill.pill-cam.bad { color: #fff; background: rgba(255,93,93,.18); border-color: rgba(255,93,93,.5); }
.pill.pill-cam.bad i { background: var(--red); }
@keyframes camAsk { 50% { box-shadow: 0 0 0 4px rgba(245,197,66,.25); } }
.set-row .btn { flex-shrink: 0; }
/* the padded hero title hugs its text so the padding never pokes past the screen edge */
.lp-title { display: inline-block; }

/* feed chips never wider than their column: the name shrinks (with …), the price always shows */
.seat .feed li { max-width: 100%; min-width: 0; }
.seat .feed li .n { flex: 1 1 auto; min-width: 0; max-width: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat .feed li b, .seat .feed li .em { flex-shrink: 0; }

/* history rows: let the middle column shrink so long item lists end in … instead of widening the page */
.hist { grid-template-columns: 70px minmax(0, 1fr) auto; }
.hist > div { min-width: 0; }
.hist .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) {
  .hist { grid-template-columns: 60px minmax(0, 1fr); }
  /* leaderboard tabs on phones: Points (the main board) on its own row, the other four as a 2x2 grid */
  .lb-tabs { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; }
  .lb-tabs .tab { white-space: normal; padding: 9px 8px; }
  .lb-tabs .tab:first-child { grid-column: 1 / -1; }
}
/* five leaderboard tabs don't fit one row on tablets: let them wrap instead of cutting the labels */
.lb-tabs { flex-wrap: wrap; }
.lb-tabs .tab { flex: 1 1 auto; }

/* arena never wider than the screen: grid tracks may shrink, the reaction bar wraps, the mode label wraps */
.arena { grid-template-columns: minmax(0, 1fr); }
.arena-top { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.arena-mode { min-width: 0; line-height: 1.3; }
.react-bar { width: fit-content; max-width: 100%; }
/* timer centered on tablets too; only phones (too narrow for equal side columns) let it slide right.
   The tools may wrap to a second row rather than overlap the timer when watchers + REC + flip all show. */
.arena-tools { flex-wrap: wrap; row-gap: 6px; }
@media (max-width: 640px) {
  .arena-top { grid-template-columns: minmax(0, 1fr) auto auto; }
}
@media (max-width: 640px) {
  .react-bar { border-radius: 18px; gap: 4px; padding: 6px; }
  .react-btn { width: 36px; height: 36px; font-size: 21px; }
}

/* long usernames in big headings wrap instead of running off the screen */
.result-title, .intro-name, .vs-name, .profile-name, .lc-name, .receipt h4 { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .result-title { font-size: clamp(30px, 9vw, 40px); line-height: 1.1; }
  .intro-name { font-size: clamp(30px, 9vw, 40px); }
  .profile-name { font-size: 26px; }
}
/* status messages wrap inside small (phone) cameras instead of being cut at the edges */
.seat .scan-status { width: max-content; max-width: calc(100% - 16px); white-space: normal; text-align: center; line-height: 1.3; }

/* leaderboard: the name column takes the leftover space and long names end in …, values always fit */
table.lb .who-cell { width: 100%; max-width: 0; }
table.lb .who { min-width: 0; }
table.lb .who .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.lb .val { white-space: nowrap; }
/* the "online now" pill sits on its own centered line above the (inline-block) hero title */
.lp-live { display: flex; width: fit-content; margin-left: auto; margin-right: auto; }

/* ---------- iPhone Safari zoom fixes ----------
   1) Safari zooms in when you tap a field whose text is under 16px, and in a one-page app that zoom sticks
      on every screen afterwards. Phones/tablets get 16px fields.
   2) Older Safari ignores `overflow-x: clip`, so decorations that poke past the screen edge made the page
      wider than the phone and Safari opened it zoomed in. Keep every decoration inside the screen. */
@media (max-width: 900px), (pointer: coarse) {
  input, select, textarea { font-size: 16px !important; }
}
.lp-hero::before { width: min(900px, 100%); }
.lp-floaters { overflow: hidden; }
/* same optical correction for the other italic VS marks (game intro, live lobby) */
.vs-mark span { left: -.09em; }
.lc-vs { position: relative; left: -.15em; }

/* ================= FLAGS, RANKS, TAGS ================= */
.flag { display: inline-block; width: 1.35em; height: 1em; border-radius: 3px; object-fit: cover; vertical-align: -0.12em; box-shadow: 0 0 0 1px rgba(255,255,255,.18); flex-shrink: 0; }
.name-flag { margin-right: .4em; }
.bot-flag { font-size: 24px; line-height: 1; }

/* rank badge: colored pill, like "FINAL BOSS" in battles */
.rank-badge { --rc: #9aa3b2; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px 4px 7px; border-radius: 999px; border: 1.5px solid var(--rc); background: color-mix(in srgb, var(--rc) 14%, rgba(0,0,0,.55)); color: var(--rc); font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; line-height: 1.2; }
.rank-badge i { font-style: normal; font-size: 13px; }
.rank-badge.small { font-size: 10px; padding: 3px 8px 3px 6px; margin-left: 4px; }
.rank-badge.big { font-size: 15px; padding: 7px 16px 7px 11px; }
.rank-badge.big i { font-size: 20px; }

/* tag chips */
.tag-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); color: #e7eaf0; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; line-height: 1.2; }
.tag-chip i { font-style: normal; font-size: 12px; }

/* ---- in the arena ---- */
.seat-flag { height: 30px; display: flex; justify-content: center; align-items: center; margin-bottom: -4px; }
.seat-flag .flag { width: 40px; height: 30px; border-radius: 5px; box-shadow: 0 0 0 1.5px rgba(255,255,255,.25), 0 4px 14px rgba(0,0,0,.5); }
.seat-tags { position: absolute; top: 12px; left: 12px; z-index: 2; display: flex; flex-wrap: wrap; gap: 5px; max-width: calc(100% - 170px); }
.seat-tags .tag-chip { background: rgba(0,0,0,.62); backdrop-filter: blur(6px); font-size: 10px; padding: 4px 9px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.seat-rank { position: absolute; right: 12px; bottom: 12px; z-index: 2; }
.seat-rank .rank-badge { background: color-mix(in srgb, var(--rc) 18%, rgba(0,0,0,.7)); backdrop-filter: blur(6px); }
.seat .seat-tag { max-width: calc(100% - 150px); }

/* intros */
.vs-badges { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; }
.vs-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; max-width: 280px; }
.vs-name .flag { width: 1.1em; height: .82em; }

/* home header */
.hero-record { flex-wrap: wrap; row-gap: 6px; }
.hero-record .name-flag { width: 24px; height: 18px; }

/* profile */
.profile-badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.country-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: #cfd5df; background: rgba(255,255,255,.05); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.rank-card { --rc: #9aa3b2; display: grid; gap: 12px; border-color: color-mix(in srgb, var(--rc) 40%, var(--line)); background: linear-gradient(160deg, color-mix(in srgb, var(--rc) 10%, var(--card)), var(--card) 60%); }
.rank-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.rank-bar { height: 10px; border-radius: 999px; background: var(--bg2); overflow: hidden; border: 1px solid var(--line); }
.rank-bar span { display: block; height: 100%; min-width: 4px; background: var(--rc); border-radius: inherit; transition: width .8s cubic-bezier(.2,.8,.2,1); }
.rank-next { font-size: 14px; color: #cfd5df; }
.rank-next b { color: var(--text); }
.rank-ladder { display: grid; grid-template-columns: repeat(9, 1fr); gap: 6px; }
.rank-ladder span { --rc: #9aa3b2; display: grid; justify-items: center; gap: 2px; padding: 6px 0; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); opacity: .45; filter: grayscale(.8); }
.rank-ladder span.got { opacity: 1; filter: none; }
.rank-ladder span.now { border-color: var(--rc); box-shadow: 0 0 0 1px var(--rc), 0 0 16px color-mix(in srgb, var(--rc) 40%, transparent); }
.rank-ladder i { font-style: normal; font-size: 18px; }
.rank-ladder small { font: 700 10px var(--mono); color: var(--muted); }
.tag-count { margin-left: auto; font: 800 14px var(--mono); color: var(--gold); }
.tag-help { margin: -6px 0 12px; }
.tag-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip.pick { cursor: pointer; font-size: 12px; padding: 8px 14px; transition: transform .15s, border-color .15s, background .15s; font-family: inherit; }
.tag-chip.pick:hover { transform: translateY(-2px); border-color: rgba(245,197,66,.5); }
.tag-chip.pick.on { background: rgba(245,197,66,.16); border-color: var(--gold); color: var(--gold2); box-shadow: 0 0 14px rgba(245,197,66,.2); }

/* settings */
.country-row { flex-wrap: wrap; }
.country-select { display: flex; align-items: center; gap: 8px; }
.country-select select { max-width: 190px; background: var(--card2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: 14px Inter, sans-serif; }
.set-flag-img { width: 30px; height: 22px; }

@media (max-width: 900px) {
  /* small cameras: one tag, icon-only rank */
  .arena-stage.seats-2 .seat-tags { top: 6px; left: 6px; max-width: calc(100% - 96px); }
  .arena-stage.seats-2 .seat-tags .tag-chip:nth-child(n+2) { display: none; }
  .arena-stage.seats-2 .seat-tags .tag-chip { font-size: 9px; padding: 3px 7px; }
  .arena-stage.seats-2 .seat-rank { right: 6px; bottom: 6px; }
  .arena-stage.seats-2 .seat-rank .rank-badge { padding: 4px 6px; }
  .arena-stage.seats-2 .seat-rank .rank-badge b { display: none; }
  .arena-stage.seats-2 .seat .seat-tag { max-width: calc(100% - 50px); }
  .seat-flag { height: 24px; }
  .seat-flag .flag { width: 32px; height: 24px; }
}
@media (max-width: 640px) {
  .rank-ladder { gap: 3px; }
  .rank-ladder i { font-size: 15px; }
  .seats-1 .seat-tags { max-width: calc(100% - 140px); }
}

/* VS intro: cards line up at the top (tags can make one card taller); VS sits level with the avatars */
.vs-row { align-items: flex-start; }
.vs-mark { margin-top: 27px; }               /* (avatar ring 138px - mark 84px) / 2 */
.vs-name { max-width: 340px; }
@media (max-width: 900px) { .vs-mark { margin-top: 23px; } }   /* ring 102 - mark 56 */
@media (max-width: 640px) { .vs-mark { margin-top: 15px; } .vs-name { max-width: 150px; } }  /* ring 86 - mark 56 */
/* leaderboard name cell: avatar + flag + name must stay inside the cell so long names end in … */
table.lb .who-cell { overflow: hidden; }
table.lb .who { display: flex; align-items: center; max-width: 100%; overflow: hidden; }

/* VS intro on small screens: each card gets at most its half, long tags shorten, panel grows to fit */
.vs-card { flex: 1 1 0; min-width: 0; max-width: 340px; }
.vs-name { max-width: 100%; }
.vs-tags .tag-chip, .vs-badges .tag-chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.arena-stage > .overlay { bottom: auto; min-height: calc(100% + 12px); }
@media (max-width: 640px) {
  .vs-card { max-width: 42%; }
  .vs-name { max-width: 100%; font-size: 16px; }
  .vs-tags { gap: 4px; }
  .vs-tags .tag-chip { font-size: 9px; padding: 3px 7px; }
  .vs-badges .rank-badge { font-size: 9px; }
}

/* small phone cameras: tags become emoji-only icons (all 3 fit), and the name gets the room "YOU" took
   (your camera is already the gold-bordered one on the left) */
@media (max-width: 900px) {
  .arena-stage.seats-2 .seat-tags .tag-chip:nth-child(n+2) { display: inline-flex; }
  .arena-stage.seats-2 .seat-tags { gap: 3px; }
  .arena-stage.seats-2 .seat-tags .tag-chip { font-size: 0; gap: 0; padding: 3px 5px; }
  .arena-stage.seats-2 .seat-tags .tag-chip i { font-size: 12px; }
}
@media (max-width: 640px) {
  .arena-stage.seats-2 .seat-tag em { display: none; }
}

/* ================= QA PASS: dialogs, results, history, small-camera polish ================= */
/* styled confirm (util.js confirmDialog) */
.confirm-card { max-width: 360px; }
.confirm-icon { font-size: 40px; line-height: 1; }
.confirm-card h3 { margin: 10px 0 6px; font-size: 20px; }
#confirm-body { margin: 0 0 18px; line-height: 1.5; }
.confirm-card .row .btn { flex: 1; }
.btn.danger { background: rgba(255,93,93,.14); border-color: rgba(255,93,93,.55); color: #ffc9c9; }
.btn.danger:hover:not(:disabled) { background: rgba(255,93,93,.24); border-color: var(--red); color: #fff; }

/* private room: "waiting for your friend..." */
.wait-dots { margin-top: 12px; font-size: 13px; font-weight: 700; color: var(--gold); }
.wait-dots::after { content: ''; display: inline-block; width: 1.3em; text-align: left; animation: dots 1.4s steps(4) infinite; }

/* match history: practice results are outlined, ranked ones filled */
.badge.practice { background: transparent; border: 1px dashed currentColor; }
.badge.draw.practice { color: var(--muted); }

/* leaderboard: the podium holds the top 3, so the table (4th and below) has no gold/silver/bronze numbers */
table.lb tr:nth-child(-n+3) .pos { color: var(--muted); }

/* a lost streak is news, not a celebration */
.record.sad { background: rgba(255,255,255,.04); border-color: var(--line); color: #cfd5df; }
.record.sad::after { display: none; }

/* achievement unlocks: one or two get big equal-width cards; three or more become a tidy grid */
.unlock-row:not(.compact) .unlock { flex: 0 1 360px; display: flex; }
.unlock-row:not(.compact) .ach { flex: 1; }
@media (max-width: 640px) {
  .unlock-row:not(.compact) .unlock { flex-basis: 100%; }
  .unlock-row.compact { grid-template-columns: 1fr 1fr; gap: 8px; }
  .unlock-row.compact .ach { padding: 10px; gap: 10px; }
  .unlock-row.compact .ach-medal { width: 40px; height: 40px; font-size: 18px; border-width: 2px; }
  .unlock-row.compact .ach-desc { display: none; }
  .unlock-row.compact .ach-name { font-size: 13px; line-height: 1.25; }
  .unlock-row.compact .ach-tier { font-size: 9px; }
}

/* VS screen: the panel takes the full width (shrink-to-fit made each card only as wide as its smallest
   content, cutting "RoboAppraiser" on desktop) and long names wrap onto a second line, after an underscore
   when there is one, instead of being cut to "Extraordin..." */
.intro-vs { width: 100%; }
.intro-vs .vs-row { align-self: stretch; }
.vs-name { white-space: normal; text-overflow: clip; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* small (side-by-side) cameras: tag icons stack down the left edge instead of wrapping into a clump */
@media (max-width: 900px) {
  .arena-stage.seats-2 .seat-tags { flex-direction: column; align-items: flex-start; max-width: none; }
}

/* VS intro: country flag as a badge on the avatar ring */
.intro-ring .ring-flag { position: absolute; right: -2px; bottom: 6px; width: 38px; height: 28px; border-radius: 6px; box-shadow: 0 0 0 3px #0b0d10, 0 4px 12px rgba(0,0,0,.55); }
@media (max-width: 900px) { .intro-ring .ring-flag { width: 32px; height: 24px; bottom: 4px; } }
@media (max-width: 640px) { .intro-ring .ring-flag { width: 27px; height: 20px; right: -4px; bottom: 2px; box-shadow: 0 0 0 2px #0b0d10, 0 3px 8px rgba(0,0,0,.5); } }

/* leaderboard on phones: tighter cells so names keep a few more letters next to the money column */
@media (max-width: 640px) {
  table.lb td { padding: 10px 5px; }
  table.lb .pos { width: 34px; }
  table.lb .who { gap: 8px; }
  table.lb .val { font-size: 14px; }
}
/* "YOU" rides on the avatar ring (top-right), opposite the flag badge, whatever the card width */
.intro-ring .you-tag { top: -2px; right: -10px; z-index: 1; box-shadow: 0 0 0 3px #0b0d10; }

/* ---------- leaderboard podium (top 3; the table lists 4th and below) ---------- */
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 14px; margin: 18px 0 16px; padding: 0 4px; }
.pod { display: grid; justify-items: center; gap: 6px; text-align: center; min-width: 0; color: inherit; animation: podUp .6s cubic-bezier(.2,.9,.3,1.2) both; animation-delay: calc(.12s * var(--i, 0)); }
.pod.p1 { grid-column: 2; grid-row: 1; }
.pod.p2 { grid-column: 1; grid-row: 1; }
.pod.p3 { grid-column: 3; grid-row: 1; }
@keyframes podUp { from { opacity: 0; transform: translateY(30px); } }
.pod-avatar { position: relative; margin-bottom: 2px; transition: transform .2s; }
.pod:hover .pod-avatar { transform: translateY(-4px); }
.pod .avatar.lg { width: 74px; height: 74px; border-width: 3px; border-color: #cfd6e0; box-shadow: 0 0 22px rgba(207,214,224,.25); }
.pod.p1 .avatar.lg { width: 96px; height: 96px; border-color: var(--gold); box-shadow: 0 0 34px rgba(245,197,66,.5); }
.pod.p3 .avatar.lg { border-color: #d08c5a; box-shadow: 0 0 22px rgba(208,140,90,.3); }
.pod-medal { position: absolute; right: -6px; bottom: -4px; font-size: 26px; filter: drop-shadow(0 3px 6px rgba(0,0,0,.6)); }
.pod.p1 .pod-medal { font-size: 32px; }
.pod-name { font-weight: 800; font-size: 15px; max-width: 100%; overflow: hidden; overflow-wrap: anywhere; line-height: 1.25;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; } /* long names wrap to 2 lines (after "_" first) */
.pod.me .pod-name { color: var(--gold2); }
.pod-val { font: 800 15px var(--mono); color: var(--gold); white-space: nowrap; }
.pod.p1 .pod-val { font-size: 18px; }
.pod-base { width: 100%; height: 64px; margin-top: 4px; border-radius: 14px 14px 4px 4px; display: grid; place-items: center;
  border: 1px solid rgba(207,214,224,.28); border-bottom: 0; background: linear-gradient(180deg, rgba(207,214,224,.16), rgba(207,214,224,.02)); }
.pod-base span { font: 900 30px Inter, sans-serif; color: rgba(255,255,255,.28); }
.pod.p1 .pod-base { height: 96px; border-color: rgba(245,197,66,.5); background: linear-gradient(180deg, rgba(245,197,66,.3), rgba(245,197,66,.03)); box-shadow: 0 -10px 40px rgba(245,197,66,.12); }
.pod.p1 .pod-base span { font-size: 40px; color: rgba(255,223,126,.55); }
.pod.p3 .pod-base { height: 48px; border-color: rgba(208,140,90,.3); background: linear-gradient(180deg, rgba(208,140,90,.18), rgba(208,140,90,.02)); }
@media (max-width: 640px) {
  .podium { gap: 8px; padding: 0; }
  .pod .avatar.lg { width: 58px; height: 58px; }
  .pod.p1 .avatar.lg { width: 74px; height: 74px; }
  .pod-medal { font-size: 20px; right: -6px; }
  .pod.p1 .pod-medal { font-size: 24px; }
  .pod-name { font-size: 13px; }
  .pod-val, .pod.p1 .pod-val { font-size: 13px; }
  .pod-base { height: 50px; }
  .pod.p1 .pod-base { height: 74px; }
  .pod.p3 .pod-base { height: 36px; }
  .pod-base span { font-size: 22px; }
  .pod.p1 .pod-base span { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) { .pod { animation: none; } }

/* ================= ACCOUNT, PASSWORD RESET, PRIVACY ================= */
.link-btn { appearance: none; background: none; border: 0; padding: 4px 0; color: var(--muted); font: 600 13px Inter, sans-serif; cursor: pointer; justify-self: center; }
.link-btn:hover { color: var(--gold2); text-decoration: underline; }
.form-title { margin: 0; font-size: 20px; }
.form-lead { margin: -6px 0 2px; line-height: 1.5; }
.center { text-align: center; }
.ok-msg { color: var(--green); font-size: 14px; margin: 8px 0 0; line-height: 1.45; }
.ok-msg:empty { display: none; }
/* sign-up: "I'm 13+ and agree" checkbox */
.form label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; color: #c3cad6; line-height: 1.45; cursor: pointer; }
.form label.check input { width: 20px; height: 20px; flex-shrink: 0; margin: 0; padding: 0; accent-color: var(--gold); cursor: pointer; }
.form label.check a, .notice-foot a, .legal-links a, .foot-links a { color: var(--gold2); }
/* settings → account */
.account-card { position: relative; max-width: 420px; text-align: left; }
.account-card .confirm-icon { text-align: center; }
.legal-links { display: flex; gap: 18px; justify-content: center; font-size: 13px; font-weight: 600; padding-top: 2px; }
/* landing footer */
.foot-links { display: flex; gap: 18px; font-size: 13px; font-weight: 600; }
/* first-game camera notice */
.notice-list { list-style: none; margin: 4px 0 10px; padding: 0; display: grid; gap: 10px; text-align: left; }
.notice-list li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.45; font-size: 14px; color: #cfd5df; }
.notice-list li > span { font-size: 20px; width: 26px; text-align: center; flex-shrink: 0; }
.notice-list b { color: var(--text); }
.notice-foot { margin: 0; font-size: 13px; }
.confirm-card:has(.notice-list) { max-width: 440px; }

/* ---------- voice chat ----------
   Round button hanging under each player's score box (it lives inside it): your own = mic on/off, the other player's = mute them (spectators: mute that
   player). Whoever is talking gets a green glow on the button and the camera. */
.seat-voice { position: absolute; top: calc(100% + 6px); right: 0; z-index: 2; width: 38px; height: 38px; padding: 0; border-radius: 50%; border: 2px solid rgba(255,255,255,.2); background: rgba(0,0,0,.62); backdrop-filter: blur(6px); color: #fff; font-size: 17px; line-height: 1; display: grid; place-items: center; cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; }
.seat-voice:hover { border-color: var(--gold); }
.seat-voice.off, .voice-pill.off { background: rgba(70,18,18,.78); border-color: #8a3030; }
.seat-voice.slash::before { content: ''; position: absolute; width: 2px; height: 68%; border-radius: 2px; background: #ff5a5a; transform: rotate(45deg); box-shadow: 0 0 0 1px rgba(0,0,0,.55); }
.seat-voice[data-note]:not([data-note=""])::after { content: attr(data-note); position: absolute; top: calc(100% + 4px); right: 0; padding: 2px 6px; border-radius: 6px; background: rgba(0,0,0,.7); color: #ffb3b3; font-size: 10px; font-weight: 800; letter-spacing: .04em; white-space: nowrap; }
.seat-voice.talking, .voice-pill.talking { border-color: #3ddc84; box-shadow: 0 0 0 3px rgba(61,220,132,.28), 0 0 18px rgba(61,220,132,.5); }
.seat .cam.talking { border-color: #3ddc84 !important; box-shadow: 0 0 0 1px #3ddc84, 0 0 30px rgba(61,220,132,.32) !important; }
.result-voice { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: -8px 0 16px; }
.result-voice:empty { display: none; }
.voice-pill { display: inline-flex; align-items: center; gap: 6px; max-width: 220px; padding: 6px 12px; border-radius: 999px; border: 2px solid var(--line); background: var(--card2); color: var(--text); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; }
.voice-pill .vp-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
@media (max-width: 900px) {
  .arena-stage.seats-2 .seat-voice { width: 32px; height: 32px; font-size: 14px; }
}

/* ---------- 1v1 results over the live cameras ----------
   While a rematch is possible the arena stays mounted behind the results page as a fixed, blurred, non-interactive
   backdrop (cameras + talking glow keep moving); the results scroll above it. */
#view-game.backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; animation: none; }
#view-game.backdrop .arena-top, #view-game.backdrop .tug, #view-game.backdrop .overlay, #view-game.backdrop .react-bar,
#view-game.backdrop .feed-head, #view-game.backdrop .feed, #view-game.backdrop .pb { display: none !important; }
#view-game.backdrop .arena { height: 100%; align-content: center; }
#view-game.backdrop .arena-stage { filter: blur(12px) saturate(1.15); transform: scale(1.05); }
#view-game.backdrop::after { content: ''; position: fixed; inset: 0; background: radial-gradient(ellipse at 50% 30%, rgba(9,11,15,.45), rgba(9,11,15,.82)); }
#view-result.over-cams { position: relative; z-index: 1; }

.earned { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: -6px 0 16px; animation: fadeUp .5s .45s both; }
.earn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; font-weight: 800; font-size: 14px; border: 1px solid; }
.earn small { font-weight: 600; opacity: .75; }
.earn.tok { color: #ffe08a; background: rgba(245,197,66,.12); border-color: rgba(245,197,66,.4); }
.earn.pts { color: #b9dcff; background: rgba(77,163,255,.12); border-color: rgba(77,163,255,.4); }

/* ---------- Value Tokens + points ---------- */
.hero-pts, .hero-tok { font: 800 12px var(--font, inherit); letter-spacing: .02em; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.hero-pts { color: #b9dcff; background: rgba(77,163,255,.12); border: 1px solid rgba(77,163,255,.35); }
.hero-tok { color: #ffe08a; background: rgba(245,197,66,.12); border: 1px solid rgba(245,197,66,.35); }
.hero-record { flex-wrap: wrap; row-gap: 6px; }
.tok-balance { color: var(--gold2, #ffe08a); white-space: nowrap; }
.tag-chip.pick.locked { color: #8d95a3; background: rgba(255,255,255,.025); border-style: dashed; }
.tag-chip.pick.locked i { filter: grayscale(1); opacity: .6; }
.tag-chip.pick.locked .price { margin-left: 4px; padding: 2px 7px; border-radius: 999px; background: rgba(255,255,255,.06); color: #aab1bd; font-size: 10px; letter-spacing: .03em; }
.tag-chip.pick.locked.afford { color: #e7eaf0; border-color: rgba(245,197,66,.45); }
.tag-chip.pick.locked.afford i { filter: none; opacity: 1; }
.tag-chip.pick.locked.afford .price { background: rgba(245,197,66,.16); color: var(--gold2, #ffe08a); }

/* points leaderboard climb on the results screen */
.climb { display: flex; width: fit-content; max-width: 100%; margin: -6px auto 16px; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 12px; padding: 8px 16px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--text); text-decoration: none; font-size: 14px; animation: fadeUp .5s .6s both; transition: border-color .15s; }
.climb:hover { border-color: rgba(77,163,255,.5); }
.climb.up { border-color: rgba(61,220,132,.45); background: rgba(61,220,132,.07); }
.climb-label { color: var(--muted); font-weight: 700; }
.climb-rank { font: 800 18px var(--mono); }
.climb-rank s { color: var(--muted); font-weight: 600; text-decoration-thickness: 2px; }
.climb-up { font-weight: 900; font-size: 12px; letter-spacing: .06em; color: #3ddc84; background: rgba(61,220,132,.14); padding: 3px 8px; border-radius: 999px; }
.climb-next { color: #cfd5df; font-size: 13px; }

/* ---------- safety: report / block / content filter / admin ---------- */
.seat-report { position: absolute; left: 12px; bottom: 56px; z-index: 2; width: 34px; height: 34px; padding: 0; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2); background: rgba(0,0,0,.55); backdrop-filter: blur(6px); color: #ffb3b3; font-size: 15px;
  cursor: pointer; display: grid; place-items: center; opacity: .75; transition: opacity .15s, border-color .15s; }
.seat-report:hover { opacity: 1; border-color: #ff6b6b; }
.seat .cam.cam-off video, .seat .cam.cam-off img.remote { visibility: hidden; }
.cam-off-msg { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 16px;
  text-align: center; font-weight: 700; font-size: 14px; color: #ffd0d0; background: radial-gradient(circle, #2a1416, #0d0a0b); }
.cam-off-msg span { font-size: 34px; }
@media (max-width: 900px) {
  .arena-stage.seats-2 .seat-report { left: 6px; bottom: 42px; width: 28px; height: 28px; font-size: 13px; }
}
.report-card { text-align: left; max-width: 440px; display: grid; gap: 12px; }
.report-card h3 { margin: 0; padding-right: 28px; overflow-wrap: anywhere; }
.report-card p { margin: 0; }
.report-reasons { display: grid; gap: 6px; }
.report-reasons .reason { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(255,255,255,.03); cursor: pointer; font-size: 15px; }
.report-reasons .reason:has(input:checked) { border-color: var(--gold); background: rgba(245,197,66,.08); }
.report-card textarea { width: 100%; resize: vertical; min-height: 70px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg2); color: var(--text); font: 16px Inter, sans-serif; }
.report-actions { display: flex; justify-content: flex-end; gap: 8px; }
.profile-safety { display: flex; gap: 14px; align-items: center; margin-top: 8px; }
.result-report { display: flex; justify-content: center; margin: -8px 0 14px; }
.blocked-name { display: inline-flex; gap: 6px; align-items: center; margin-right: 12px; }
.blocked-name .link-btn { padding: 0; font-size: 12px; }
#nav-admin b { color: #ff8a8a; margin-left: 2px; }
.admin-list { display: grid; gap: 12px; margin-top: 14px; }
.admin-report { display: grid; gap: 8px; padding: 16px; text-align: left; }
.ar-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ar-reason { font-weight: 800; color: #ffb3b3; }
.ar-who { overflow-wrap: anywhere; }
.ar-note { margin: 0; padding: 8px 12px; border-left: 3px solid var(--line); color: #cfd5df; white-space: pre-wrap; overflow-wrap: anywhere; }
.ar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ban-pill { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 800; color: #ffd0d0; background: rgba(255,80,80,.15); border: 1px solid rgba(255,80,80,.4); }
.admin-tabs { max-width: 280px; }
.btn.small { padding: 7px 12px; font-size: 13px; }
/* the global input style (full width, padded) must not apply to the report dialog's radios/checkbox */
.report-card input[type="radio"], .report-card input[type="checkbox"] { width: 18px; height: 18px; flex: 0 0 18px; padding: 0; margin: 0; accent-color: var(--gold); }
.report-card .check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; text-align: left; }
.report-reasons .reason span { text-align: left; }
.report-card { position: relative; }
