:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Helvetica Neue", "Noto Sans", sans-serif;
  color: #2b2a26; background: #f6f5f0; font-synthesis: none;
  --ink: #2b2a26; --green: #f5c400; --green-text: #8a6500; --muted: #77736a; --line: #e4e1d8; --ok: #58a700; --ok-text: #3f7a00;
  --ease: cubic-bezier(.22,.8,.25,1);
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; overscroll-behavior: none; }
body { -webkit-font-smoothing: antialiased; }
button, input { font: inherit; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; touch-action: manipulation; color: inherit; }
button:disabled { opacity: .45; cursor: wait; }
button:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
button { transition: transform .18s var(--ease), background .18s; }
button:active { transform: scale(.97); }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(36px, 9.5vw, 48px); line-height: 1.07; letter-spacing: -2px; font-weight: 550; }
h1 em { font-style: normal; color: #b58600; }
h2 { font-size: 27px; line-height: 1.15; letter-spacing: -1px; font-weight: 550; }
#root {
  width: min(100%, 480px); height: min(100dvh, var(--app-height, 100dvh)); margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 28px max(22px, env(safe-area-inset-bottom));
  position: relative; container-type: size; transform: translateY(var(--app-top, 0px));
}
.screen { height: 100%; min-height: 0; display: flex; flex-direction: column; animation: arrive .36s var(--ease) both; }
@keyframes arrive { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.identity { display: flex; justify-content: space-between; align-items: center; min-height: 32px; gap: 16px; flex-shrink: 0; }
.wordmark { font-size: 19px; font-weight: 650; letter-spacing: -1px; }
.wordmark span { color: var(--green-text); }
.live { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }
.live::before { content: ''; width: 5px; height: 5px; background: var(--green); border-radius: 50%; }
.caption { color: var(--muted); font-size: 12px; line-height: 1.5; }
.eyebrow { color: var(--muted); font-size: 11px; letter-spacing: 1.8px; font-weight: 550; text-transform: uppercase; }
.sub { color: var(--muted); font-size: 14px; line-height: 1.6; }
.primary { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 52px; flex-shrink: 0; padding: 0 20px; border: 0; border-radius: 28px; background: var(--green); color: #2a2100; font-size: 15px; font-weight: 500; }
.primary .arrow { margin-inline-start: auto; }
.primary .button-label { margin-inline-start: auto; }
.arrow { width: 18px; height: 18px; flex-shrink: 0; }
.text-button { border: 0; background: transparent; padding: 12px; min-height: 44px; font-size: 14px; font-weight: 450; }
.bottom { flex-shrink: 0; display: grid; gap: 13px; text-align: center; }
.bottom .caption { font-size: 11px; }
.brand-art { width: 108px; height: 108px; color: var(--green-text); display: block; }
.onboarding-intro { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.onboarding-intro h1 { margin-top: 5px; }
.onboarding-intro .sub { max-width: 280px; }
#onboard { display: flex; flex-direction: column; flex-shrink: 0; }
.avatar-label { font-size: 11px; color: var(--muted); margin-bottom: 12px; }
.avatars { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 24px; }
.avatar { width: 44px; height: 44px; padding: 3px; background: transparent; border: 0; border-radius: 50%; position: relative; }
.avatar svg { width: 100%; height: 100%; display: block; opacity: .6; transition: opacity .2s, transform .2s; }
.avatar.selected svg { opacity: 1; transform: scale(1.12); }
.avatar.selected::after { content: ''; position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--green); left: calc(50% - 2px); bottom: -7px; }
.field-label { font-size: 11px; color: var(--muted); }
input { appearance: none; width: 100%; height: 48px; border: 0; border-bottom: 1px solid #cfcabd; border-radius: 0; background: transparent; padding: 0; color: var(--ink); outline: none; font-size: 17px; font-weight: 400; }
input::placeholder { color: #8b867b; font-weight: 400; }
input:focus { border-color: var(--green-text); }
#onboard .primary { margin-top: 26px; }
.privacy-note { text-align: center; color: var(--muted); font-size: 11px; margin-top: 15px; }
.profile { display: flex; align-items: center; gap: 10px; min-width: 0; }
.face { display: block; flex-shrink: 0; width: 34px; height: 34px; }
.face svg { width: 100%; height: 100%; display: block; }
.profile-name { font-size: 13px; font-weight: 500; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile small { display: block; font-size: 10px; color: var(--muted); margin-top: 3px; }
.rank-button { border: 0; border-radius: 20px; background: #ecebe4; padding: 0 12px; height: 44px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.home-center { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 18px; }
.duel-art { width: 240px; height: 190px; position: relative; margin-bottom: 10px; }
.letter { position: absolute; display: grid; place-items: center; width: 106px; height: 122px; border-radius: 28px; font-size: 64px; font-weight: 450; letter-spacing: -5px; }
.letter.first { background: #fbefc4; color: #7a5d00; left: 23px; top: 31px; transform: rotate(-14deg); }
.letter.second { background: #2b2a26; color: #fff8e0; left: 115px; top: 48px; transform: rotate(12deg); }
.art-spark { position: absolute; top: 8px; right: 26px; color: #c9a227; font-size: 32px; font-weight: 300; }
.match-details { display: flex; justify-content: center; gap: 20px; font-size: 12px; color: var(--muted); }
.match-details span + span::before { content: '·'; margin-inline-end: 20px; color: #b3aea2; }
.rank-track { display: flex; gap: 5px; margin-top: 2px; }
.rank-track span { flex: 1; font-size: 10px; color: #8f8a7f; padding-top: 9px; border-top: 2px solid #e6e3da; }
.rank-track .current { color: var(--green-text); border-color: var(--green-text); }
.queue-center { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.queue-center h1 { font-size: 38px; margin: 24px 0 14px; }
.queue-center .sub { max-width: 270px; }
.radar { position: relative; width: 240px; height: 240px; flex-shrink: 0; display: grid; place-items: center; }
.radar::before, .radar::after { content: ''; position: absolute; inset: 0; border: 1px solid #e4e1d8; border-radius: 50%; }
.radar::after { inset: 35px; border-color: #dad6cb; }
.radar .face { width: 74px; height: 74px; }
.orbit { position: absolute; inset: 0; animation: orbit 6s linear infinite; }
.orbit::before { content: ''; position: absolute; width: 10px; height: 10px; top: 49px; left: 24px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 6px #e6eddf; }
@keyframes orbit { to { transform: rotate(360deg); } }
.queue-bottom { gap: 4px; }
.queue-bottom .text-button { color: var(--green-text); font-size: 15px; }
.connection { color: #8b744c; font-size: 11px; text-align: center; line-height: 1.4; }
.connection:empty { display: none; }
.game-screen { animation: none; }
.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; flex-shrink: 0; }
.player { display: flex; align-items: center; gap: 8px; min-width: 0; }
.player:last-child { flex-direction: row-reverse; text-align: end; }
.player-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 500; }
.player-name small { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; font-weight: 400; }
.score { font-size: 24px; font-weight: 550; letter-spacing: 3px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.round-status { margin-top: 30px; flex-shrink: 0; }
.roundline { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; letter-spacing: 1.1px; margin-bottom: 12px; }
#seconds { font-variant-numeric: tabular-nums; }
.progress { height: 2px; background: #e6e3da; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--green); transition: width .08s linear; }
.question { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; }
.direction { font-size: 12px; color: var(--muted); }
.word { font-size: clamp(32px, 11vw, 52px); font-weight: 500; letter-spacing: -1.8px; line-height: 1.1; text-align: center; overflow-wrap: anywhere; width: 100%; }
.category { color: #948f84; font-size: 11px; }
.answer-area { flex-shrink: 0; }
.feedback { min-height: 30px; padding-top: 10px; text-align: center; font-size: 11px; color: var(--green-text); }
.game-note { text-align: center; color: #99948a; font-size: 10px; margin-top: 10px; }
.result-top { display: flex; align-items: center; justify-content: space-between; gap: 15px; flex-shrink: 0; }
.result-top .eyebrow { font-size: 10px; }
.segmented { display: flex; background: #ecebe4; padding: 3px; border-radius: 20px; flex-shrink: 0; margin-top: 24px; }
.segmented button { flex: 1; min-height: 44px; border: 0; background: transparent; border-radius: 18px; color: var(--muted); font-size: 12px; }
.segmented [aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 4px #2b2a2610; }
.result-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 16px; }
.result-symbol { width: 68px; height: 68px; display: grid; place-items: center; color: var(--green-text); margin-bottom: 4px; }
.result-symbol svg { width: 100%; height: 100%; }
.result-title { font-size: 32px; }
.final-score { font-size: 78px; font-weight: 400; letter-spacing: -3px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.final-score span { color: #b3aea2; font-weight: 300; }
.result-panel .sub { font-size: 12px; max-width: 270px; }
.words-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; }
.word-history { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; list-style: none; margin: 0; padding: 0; }
.history-row { position: relative; padding-block: 12px; padding-inline: 0 20px; border-bottom: 1px solid var(--line); min-width: 0; }
.history-row strong { display: block; font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.history-row small { display: block; color: var(--muted); margin-top: 4px; font-size: 11px; overflow-wrap: anywhere; }
.history-row .outcome { position: absolute; top: 13px; inset-inline-end: 0; color: #948f84; font-size: 11px; }
.history-row .won { color: var(--green-text); }
.history-legend { font-size: 10px; color: var(--muted); margin-top: 16px; text-align: center; }
#toast { position: fixed; top: max(16px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); border-radius: 20px; background: #def8bb; color: var(--ink); padding: 12px 18px; max-width: calc(100% - 32px); width: max-content; font-size: 12px; line-height: 1.4; display: none; z-index: 10; box-shadow: 0 6px 25px #30352c20; }
dialog { color: var(--ink); background: #f6f5f0; border: 0; padding: 28px; border-radius: 24px; width: min(360px, calc(100% - 32px)); }
dialog::backdrop { background: #2b2a2640; backdrop-filter: blur(6px); }
dialog p { color: var(--muted); font-size: 13px; line-height: 1.6; margin-top: 16px; }
dialog .primary { margin-top: 24px; }
.loading { height: 100%; display: grid; place-items: center; font-size: 13px; color: var(--muted); }
.error-screen { justify-content: center; gap: 20px; }
@media (min-width: 700px) { #root { padding-top: 36px; padding-bottom: 30px; max-height: 940px; top: max(0px, calc((100dvh - 940px) / 2)); } }
@media (max-width: 360px) {
  #root { padding-left: 22px; padding-right: 22px; }
  .avatars { gap: 3px; }
  .avatar { width: 42px; height: 44px; }
  .scoreboard { gap: 9px; }
  .player { gap: 5px; }
  .player .face { width: 28px; height: 28px; }
  .word-history { column-gap: 14px; }
}
@media (max-height: 740px) {
  .onboarding-intro { gap: 11px; }
  .onboarding-intro .brand-art { width: 72px; height: 72px; }
  .onboarding-intro h1 { font-size: 37px; }
  .onboarding-intro .sub { font-size: 12px; }
  .duel-art { transform: scale(.8); height: 152px; margin-bottom: 0; }
  .home-center { gap: 15px; }
  .radar { width: 200px; height: 200px; }
  .orbit::before { top: 34px; left: 21px; }
  .result-panel { gap: 12px; }
  .result-symbol { width: 52px; height: 52px; }
}
@media (max-height: 620px) {
  #root { padding-top: max(16px, env(safe-area-inset-top)); padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  .onboarding-intro .brand-art { display: none; }
  .onboarding-intro { gap: 8px; }
  .onboarding-intro h1 { font-size: 34px; }
  .avatar-label { margin-bottom: 6px; }
  .avatars { margin-bottom: 15px; }
  #onboard .primary { margin-top: 16px; }
  .privacy-note { margin-top: 10px; }
  .duel-art { transform: scale(.65); height: 125px; margin-top: -20px; }
  .home-center h1 { font-size: 34px; }
  .home-center { gap: 10px; }
  .radar { width: 150px; height: 150px; }
  .radar::after { inset: 24px; }
  .radar .face { width: 54px; height: 54px; }
  .orbit::before { top: 25px; left: 14px; width: 8px; height: 8px; }
  .queue-center h1 { margin: 18px 0 10px; font-size: 32px; }
  .queue-center .sub { font-size: 12px; }
  .result-symbol { width: 40px; height: 40px; margin: 0; }
  .result-title { font-size: 27px; }
  .final-score { font-size: 60px; }
  .segmented { margin-top: 14px; }
  .history-row { padding-top: 9px; padding-bottom: 9px; }
  .round-status { margin-top: 22px; }
}
@media (max-height: 480px) {
  .onboarding-intro .sub, .avatar-label, .privacy-note, .game-note { display: none; }
  .onboarding-intro h1 { font-size: 26px; letter-spacing: -1px; margin: 0; }
  .onboarding-intro h1 br { display: none; }
  .onboarding-intro { flex: 1; }
  .avatars { margin: 8px 0 12px; }
  #onboard .primary { margin-top: 12px; height: 46px; }
  .home-center .duel-art, .home-center .sub { display: none; }
  .radar { width: 100px; height: 100px; }
  .radar::after { inset: 15px; }
  .radar .face { width: 42px; height: 42px; }
  .orbit::before { top: 13px; left: 10px; }
  .queue-center h1 { font-size: 25px; margin-top: 12px; }
  .queue-center h1 br { display: none; }
  .round-status { margin-top: 16px; }
  .question { gap: 12px; }
  .word { font-size: 34px; }
  .category { display: none; }
  .feedback { min-height: 22px; padding-top: 7px; }
  .result-symbol, .result-panel .sub { display: none; }
  .result-panel { gap: 8px; }
  .result-title { font-size: 24px; }
  .final-score { font-size: 50px; }
  .history-row { padding-top: 5px; padding-bottom: 5px; }
  .history-row strong { font-size: 11px; }
  .history-row small { font-size: 10px; margin-top: 2px; }
  .history-row .outcome { top: 7px; }
  .history-legend { margin-top: 8px; }
  .segmented { margin-top: 10px; }
  .result-screen .bottom .caption { display: none; }
  .bottom { gap: 7px; }
  .bottom .primary { height: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Container height follows visualViewport on iOS, including the software keyboard. */
@container (max-height: 480px) {
  .onboarding-intro .brand-art, .onboarding-intro .sub, .avatar-label, .privacy-note, .game-note { display: none; }
  .onboarding-intro h1 { font-size: 26px; letter-spacing: -1px; margin: 0; }
  .onboarding-intro h1 br { display: none; }
  .onboarding-intro { gap: 0; }
  .avatars { margin: 8px 0 12px; }
  #onboard .primary { margin-top: 12px; height: 46px; }
  .round-status { margin-top: 16px; }
  .question { gap: 10px; }
  .word { font-size: 34px; }
  .category { display: none; }
  .feedback { min-height: 22px; padding-top: 7px; }
}
/* The mascot is shared by identity, avatars and the arena. */
.wordmark { display: inline-flex; align-items: center; gap: 5px; }
.wordmark > img { width: auto; height: 48px; object-fit: contain; margin: 0; }
.wordmark > span { margin-left: -5px; }
.brand-art { width: 148px; height: 148px; object-fit: contain; }
.onboarding-intro { gap: 12px; }
.avatar-label { display: flex; justify-content: space-between; align-items: center; }
#mood-label { color: var(--green-text); font-size: 10px; }
.avatars { gap: 6px; }
.avatar { width: 48px; height: 48px; padding: 0; }
.avatar img { width: 100%; height: 100%; display: block; object-fit: contain; opacity: .72; transition: opacity .2s, transform .2s; }
.avatar.selected img { opacity: 1; transform: translateY(-3px) scale(1.09); }
.face img { width: 100%; height: 100%; display: block; object-fit: contain; }
.profile .face { width: 42px; height: 42px; }
.mascot-hero { width: 220px; height: 220px; }
.mascot-hero .brand-art { width: 100%; height: 100%; }
.home-center { gap: 15px; }
.match-scene { position: relative; width: 260px; height: 240px; flex-shrink: 0; }
.match-scene .brand-art { position: absolute; width: 210px; height: 210px; left: 25px; top: 8px; animation: mascot-float 3s ease-in-out infinite; }
.match-ticket { position: absolute; display: block; padding: 10px 16px; border-radius: 13px; font-size: 15px; font-weight: 550; box-shadow: 0 5px 18px #30352c12; }
.match-ticket span { display: block; font-size: 10px; font-weight: 400; margin-top: 3px; opacity: .65; }
.ticket-en { left: -5px; bottom: 18px; background: #fff1bf; transform: rotate(-9deg); }
.ticket-tr { right: -5px; top: 20px; background: #e8e2f2; transform: rotate(9deg); }
@keyframes mascot-float { 50% { transform: translateY(-7px) rotate(2deg); } }
.rank-badge { display: inline-block; width: 44px; height: 56px; flex-shrink: 0; overflow: visible; filter: drop-shadow(0 2px 2px #30352c14); }
.rank-button { background: transparent; display: flex; align-items: center; gap: 7px; padding: 0; font-size: 11px; }
.rank-button .rank-badge { width: 34px; height: 44px; }
.rank-track { gap: 2px; justify-content: space-between; }
.rank-track .rank-step { border: 0; padding: 0; display: flex; flex-direction: column; align-items: center; opacity: .55; }
.rank-track .rank-step.current { opacity: 1; }
.rank-step .rank-badge { width: 35px; height: 45px; }
.rank-step small { font-size: 8px; margin-top: 3px; white-space: nowrap; }
.player-name small { display: flex; align-items: center; gap: 4px; margin-top: 0; min-height: 24px; }
.player:last-child .player-name small { justify-content: flex-end; }
.rank-mini { width: 19px; height: 24px; }
.result-symbol { width: 76px; height: 90px; }
.result-symbol .rank-result { width: 72px; height: 90px; }
#rank-gallery { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px 8px; margin-top: 20px; }
#rank-gallery > div { display: flex; flex-direction: column; align-items: center; gap: 3px; }
#rank-gallery .rank-badge { width: 47px; height: 60px; }
#rank-gallery span { font-size: 11px; }
#rank-gallery small { font-size: 9px; color: var(--muted); }
@media (max-width: 360px) { .avatars { gap: 2px; } .avatar { width: 42px; height: 44px; } .rank-step small { font-size: 7px; } }
@media (max-height: 740px) { .onboarding-intro .brand-art { width: 95px; height: 95px; } .mascot-hero { width: 165px; height: 165px; } .match-scene { transform: scale(.85); height: 205px; } .result-symbol, .result-symbol .rank-result { width: 52px; height: 66px; } }
@media (max-height: 620px) { .onboarding-intro .brand-art { display: none; } .mascot-hero { width: 125px; height: 125px; } .match-scene { transform: scale(.65); height: 155px; margin-top: -20px; } .rank-step .rank-badge { width: 27px; height: 35px; } .rank-step small { display: none; } .result-symbol, .result-symbol .rank-result { width: 35px; height: 44px; } }
@media (max-height: 480px) { .mascot-hero { display: none; } .match-scene { transform: scale(.45); height: 105px; margin-top: -30px; } .queue-center h1 { margin-top: 8px; } .rank-track { display: none; } .result-symbol { display: none; } #rank-gallery { grid-template-columns: repeat(6,1fr); gap: 5px; margin-top: 12px; } #rank-gallery .rank-badge { width: 31px; height: 40px; } #rank-gallery span { font-size: 8px; } #rank-gallery small { display: none; } }
@container (max-height: 480px) { .onboarding-intro .brand-art { display: none; } }

dialog { padding: 22px; }
dialog h2 { font-size: 23px; }
dialog p { font-size: 11px; line-height: 1.5; margin-top: 12px; }
dialog .primary { margin-top: 18px; }
@media (max-height: 620px) { #rank-gallery { gap: 8px; margin-top: 14px; } #rank-gallery .rank-badge { width: 38px; height: 48px; } }

/* Four tactile answer badges; the result remains readable after selection. */
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.choice-option { position: relative; min-height: 100px; padding: 16px 12px 14px; border: 1.5px solid #dfdbd0; border-bottom: 5px solid #ccd7c7; border-radius: 20px; background: #fffefa; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 12px; text-align: start; }
.choice-letter { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; background: #efede6; color: #8b867b; font-size: 11px; font-weight: 600; }
.choice-label { font-size: 16px; font-weight: 550; line-height: 1.2; overflow-wrap: anywhere; }
.choice-mark { position: absolute; top: 15px; inset-inline-end: 14px; font-size: 20px; font-weight: 650; }
.choice-option:disabled { opacity: 1; cursor: default; }
.choice-option.chosen { background: #fbf5e0; border-color: #d9b84a; }
.choice-option.correct { background: #e8f6d8; border-color: #78ce08; border-bottom-color: var(--ok); color: var(--ok-text); }
.choice-option.correct .choice-letter { background: #d0edb5; color: var(--ok-text); }
.choice-option.wrong { background: #ffede8; border-color: #edaa98; border-bottom-color: #db8976; color: #a44939; }
.choice-option.wrong .choice-letter { background: #f9d5ca; color: #a44939; }
.choice-option:enabled:active { transform: translateY(3px); border-bottom-width: 2px; padding-bottom: 17px; }
@media (max-height: 620px) { .choice-option { min-height: 84px; gap: 8px; padding: 10px 12px; border-radius: 16px; } .question { gap: 12px; } }
@media (max-height: 480px) { .choice-grid { gap: 9px; } .choice-option { min-height: 62px; flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; padding: 8px 10px; } .choice-letter { width: 21px; height: 21px; flex-shrink: 0; } .choice-label { font-size: 14px; } .choice-mark { top: 2px; inset-inline-end: 4px; font-size: 13px; } .question { padding: 8px 0; } }

.wordmark > span { color: var(--green); }
.primary { font-weight: 650; box-shadow: 0 3px 0 #c99a00; }
.primary:active { box-shadow: none; transform: translateY(3px); }

.rank-progress { width: 100%; max-width: 340px; text-align: start; }
.xp-heading { display: flex; align-items: baseline; justify-content: space-between; padding: 0 4px; gap: 12px; }
.xp-total { color: var(--ink); font-size: 24px; font-weight: 650; letter-spacing: -.8px; font-variant-numeric: tabular-nums; }
.xp-total small { font-size: 11px; letter-spacing: .5px; color: var(--muted); font-weight: 500; }
.xp-change { font-size: 12px; font-weight: 600; color: var(--green-text); }
.xp-change small { font-size: 10px; font-weight: 400; color: var(--muted); margin-left: 3px; }
.xp-change.loss { color: #a44939; }
.xp-rail-row { display: flex; align-items: center; gap: 9px; margin: 4px 0; }
.xp-badge { width: 29px; height: 37px; }
.xp-track { flex: 1; height: 12px; border-radius: 20px; background: #e8e5dc; overflow: hidden; box-shadow: inset 0 2px 2px #30352c0b; }
.xp-fill { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#f5c400,#ffd94a); box-shadow: inset 0 2px 0 #c8f97b; transition: width .6s var(--ease); }
.xp-next { color: var(--muted); font-size: 11px; line-height: 1.5; text-align: center; }
.xp-next strong { color: var(--ink); font-weight: 550; }
.xp-next b { color: var(--green-text); font-weight: 600; }
.xp-max { width: 29px; height: 29px; display: grid; place-items: center; color: var(--green-text); background: #fff3c4; border-radius: 50%; font-size: 15px; }
@media (max-height: 620px) { .result-symbol, .result-panel > .sub { display: none; } .rank-progress { max-width: 320px; } .xp-total { font-size: 21px; } }
@media (max-height: 480px) { .xp-badge { width: 24px; height: 31px; } .xp-rail-row { margin: 1px 0; } .xp-total { font-size: 19px; } .xp-next { font-size: 10px; } .xp-change small { display: none; } }

/* Languages: picker, right-to-left layouts and scripts that must not be letter-spaced. */
.wordmark { direction: ltr; }
.loading span { color: var(--green); }
.identity-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.language-picker { position: relative; display: inline-flex; align-items: center; gap: 5px; height: 40px; padding: 0 12px; border-radius: 20px; background: #ecebe4; color: var(--ink); font-size: 11px; font-weight: 550; white-space: nowrap; max-width: 160px; flex-shrink: 0; }
.language-picker svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--green-text); }
.language-picker span { overflow: hidden; text-overflow: ellipsis; }
.language-picker select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.language-picker:focus-within { outline: 2px solid var(--green); outline-offset: 3px; }
.lang-tag { font-size: 9px; font-weight: 650; letter-spacing: .5px; color: var(--muted); background: #ecebe4; border-radius: 6px; padding: 2px 5px; }
[dir="rtl"] .arrow { transform: scaleX(-1); }
:is(h1, h2, .word, .eyebrow, .roundline, .result-title):is(:lang(ar), :lang(fa), :lang(ur), :lang(he), :lang(hi), :lang(bn), :lang(th), :lang(ja), :lang(ko), :lang(zh)) { letter-spacing: 0; }
:is(.eyebrow):is(:lang(ar), :lang(fa), :lang(ur), :lang(he), :lang(hi), :lang(bn), :lang(th), :lang(ja), :lang(ko), :lang(zh)) { text-transform: none; }

/* Metod Ranked: sign-in, languages, upsell */
.flag { width: 24px; height: 16px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 .5px #2b2a2633; flex-shrink: 0; }
.lang-chip { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 12px; border: 0; border-radius: 20px; background: #ecebe4; font-size: 13px; font-weight: 550; }
.upsell { margin-top: 12px; text-align: center; font-size: 12px; color: var(--muted); }
.link-button { border: 0; background: none; padding: 4px 2px; color: var(--green-text); font-weight: 600; font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }
.form-note { min-height: 22px; margin: 8px 0 10px; font-size: 13px; line-height: 1.45; color: #a44939; }
.form-note.warn { color: var(--ink); }
.form-note a { color: var(--green-text); font-weight: 600; }
.code-input { font-size: 28px; letter-spacing: 10px; font-variant-numeric: tabular-nums; }
.login-links { display: flex; justify-content: space-between; margin-top: 6px; }
.login-links .text-button { font-size: 13px; color: var(--green-text); padding: 10px 0; }
.ticket-flag { width: 20px; height: 13px; border-radius: 2px; object-fit: cover; margin-inline-end: 6px; vertical-align: -1px; }
.langs-screen { gap: 12px; }
.langs-scroll { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -28px; padding: 14px 28px 12px; }
.langs-title { font-size: 24px; letter-spacing: -.6px; font-weight: 600; }
.langs-label { margin: 22px 0 8px; font-size: 11px; font-weight: 650; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }
.pick-list { background: #fff; border-radius: 14px; padding: 4px; box-shadow: 0 1px 2px #2b2a260d; }
.pick { display: flex; align-items: center; gap: 12px; width: 100%; height: 48px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; text-align: start; transition: background .15s; }
.pick + .pick { margin-top: 2px; }
.pick:hover { background: #f6f5f0; }
.pick:active { transform: none; background: #f0eee7; }
.pick .flag { width: 24px; height: 17px; border-radius: 3px; }
.pick-name { flex: 1; font-size: 15px; font-weight: 550; }
.radio { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #cfcabd; flex-shrink: 0; position: relative; }
.pick.on { background: #fdf6dc; }
.pick.on .radio { border-color: var(--green); background: var(--green); }
.pick.on .radio::after { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: #fff; }
.pick.soon .flag, .pick.soon .pick-name { opacity: .45; }
.pick-note { font-size: 12px; color: var(--muted); }
.langs-note { margin: -2px 0 12px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.other-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.other-tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; padding: 11px 10px 10px; border-radius: 13px; background: #ecebe4; color: var(--ink); text-decoration: none; font-size: 12.5px; font-weight: 500; min-width: 0; }
.other-tile span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.other-tile .flag { width: 22px; height: 15px; border-radius: 3px; filter: saturate(.55); opacity: .85; }
.other-tile svg { position: absolute; top: 10px; right: 9px; width: 13px; height: 13px; color: #a9a497; }
.other-tile:active { background: #e3e1d8; }
.langs-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-shrink: 0; }
.langs-foot small { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.langs-foot .text-button { font-size: 13px; color: #a44939; padding: 8px 0; }
#go-home { align-self: center; margin-top: 6px; color: var(--muted); }
.leave { align-self: flex-end; margin: 6px 0 -4px; border: 0; background: none; padding: 6px 0; font-size: 12px; color: var(--muted); }
.leave:hover { color: #a44939; }
/* Queue: you, the language, the opponent being found. No floating stickers. */
.queue-center { gap: 0; }
.q-lang { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 17px; background: #ecebe4; font-size: 13px; font-weight: 600; }
.q-lang .flag { width: 22px; height: 15px; }
.versus { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 30px 0 34px; width: 100%; }
.vs-side { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 112px; min-width: 0; }
.vs-side strong { font-size: 14px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 8px; }
.vs-side small { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.vs-face { width: 84px; height: 84px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 1px 2px #2b2a2614, 0 0 0 3px var(--green); }
.vs-face img { width: 70px; height: 70px; object-fit: contain; }
.vs-face.empty { display: flex; gap: 5px; justify-content: center; align-items: center; box-shadow: 0 0 0 1.5px #dad6cb inset; background: transparent; }
.vs-face.empty span { width: 7px; height: 7px; border-radius: 50%; background: #c9c4b6; animation: q-dot 1.2s ease-in-out infinite; }
.vs-face.empty span:nth-child(2) { animation-delay: .15s; } .vs-face.empty span:nth-child(3) { animation-delay: .3s; }
@keyframes q-dot { 0%, 70%, 100% { opacity: .35; } 35% { opacity: 1; } }
.vs-mid { font-size: 12px; font-weight: 700; letter-spacing: 1.5px; color: var(--muted); margin-bottom: 38px; }
.queue-center h1 { font-size: 30px; margin: 0 0 10px; }
@media (prefers-reduced-motion: reduce) { .vs-face.empty span { animation: none; opacity: .7; } }
.username-field { display: flex; align-items: center; gap: 2px; border-bottom: 1px solid #cfcabd; }
.username-field:focus-within { border-color: var(--green-text); }
.username-field span { font-size: 17px; color: var(--muted); }
.username-field input { border-bottom: 0; }
.username-note { min-height: 18px; margin: 6px 0 10px; font-size: 12px; color: var(--muted); }
.username-note.ok { color: var(--ok-text); }
.username-note.bad { color: #a44939; }
/* Overall table */
.board-line { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 14px; padding: 12px 14px; border: 0; border-radius: 14px; background: #fff; box-shadow: 0 1px 2px #2b2a260d; font-size: 13px; color: var(--muted); }
.board-line strong { font-size: 18px; color: var(--ink); font-weight: 700; }
.board-line small { font-size: 12px; }
.board-line .arrow { margin-inline-start: auto; width: 16px; height: 16px; color: var(--green-text); }
.board-panel:not([hidden]) { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 18px 0 14px; }
.board-scroll { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 18px; -webkit-mask-image: linear-gradient(#000 calc(100% - 28px), transparent); mask-image: linear-gradient(#000 calc(100% - 28px), transparent); }
.board-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; font-size: 11px; font-weight: 650; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); flex-shrink: 0; }
.board-head small { letter-spacing: 0; text-transform: none; font-weight: 500; }
.board-list { list-style: none; margin: 0; padding: 4px; background: #fff; border-radius: 14px; box-shadow: 0 1px 2px #2b2a260d; }
.board-row { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 10px; border-radius: 10px; }
.board-row.me { background: #fdf6dc; }
.board-place { width: 24px; text-align: center; font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.board-list:not(.board-mine) .board-row:first-child .board-place { color: #b58600; }
.board-badge svg { width: 20px; height: 26px; display: block; filter: none; }
.board-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 550; }
.board-name em { font-style: normal; font-size: 11px; color: var(--green-text); font-weight: 600; }
.board-xp { font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; }
.board-xp small { font-size: 11px; color: var(--muted); font-weight: 500; }
.board-mine { flex-shrink: 0; margin-top: 8px; box-shadow: 0 0 0 1.5px var(--green), 0 4px 14px #2b2a2614; }
.board-mine .board-row.me { background: transparent; }
.board-gap { text-align: center; color: var(--muted); margin: 4px 0; letter-spacing: 3px; }
