/* U2 V2: white architectural canvas + blue/violet glass accent family. */
.game-ui { --u2-ink:#29345c; --u2-muted:#59647f; --u2-accent:#455cce; --u2-border:#d7deef; }
.game-ui .topbar { background:rgba(255,255,255,.92); border-color:#e7ebf5; }
.mode-tools { grid-column:1; grid-row:1; display:grid; gap:7px; justify-self:start; pointer-events:auto; }
.mode-tools .edition-mark { font-size:10px; line-height:1; }
.mode-tools .edition-mark>span { font-size:16px; }
.mode-switch { display:flex; gap:3px; padding:3px; border:1px solid #dfe4f1; border-radius:13px; background:#f5f7fd; }
.mode-switch button { min-height:36px; border:0; border-radius:9px; padding:0 13px; background:transparent; color:#59647f; font:650 12px/1.2 "PingFang SC",sans-serif; cursor:pointer; }
.mode-switch button[aria-pressed="true"] { background:#fff; color:#435abe; box-shadow:0 2px 6px #445aa21f; }
.mode-switch button:hover { background:#e8edfb; }
.mode-switch button:active { background:#d8e1fa; }
.game-ui .brand-title { color:#354b91; }
.game-ui .title-letter:last-child { color:#7950b6; }
.game-ui .identity small, .game-ui .counter, .game-ui .status { color:var(--u2-muted); }
.edition-mark { grid-column:1; grid-row:1; display:flex; align-items:center; gap:8px; color:var(--u2-muted); font-size:12px; letter-spacing:.05em; }
.edition-mark>span { color:#455cce; font-size:24px; font-weight:800; letter-spacing:-.08em; }
.edition-mark small { border:1px solid var(--u2-border); padding:3px 6px; border-radius:6px; font-size:10px; }
.game-ui .soft-control, .game-ui .input-field { color:var(--u2-ink); border-color:var(--u2-border); background:#f8faff; box-shadow:0 2px 0 #e1e6f1; }
.game-ui button.soft-control { min-height:44px; }
.game-ui .soft-control:hover { background:#edf1ff; border-color:#a6b5e6; }
.game-ui .soft-control:active { background:#dce4fc; box-shadow:none; }
.game-ui .soft-control:disabled { opacity:.52; cursor:default; }
.game-ui :is(button,select,input,summary):focus-visible { outline:3px solid #4865cb; outline-offset:3px; }
.game-ui .soft-control[aria-pressed="true"] { color:#344c9c; background:#e8eeff; border-color:#b9c7ec; }
.game-ui .controls { background:rgba(255,255,255,.94); border-color:#dfe5f1; box-shadow:0 8px 32px #384b7810; }
.game-ui #mic-button { background:linear-gradient(120deg,#516cdb,#7555c7); border-color:#5367ba; color:white; box-shadow:0 5px 0 #47549e, inset 0 1px 0 #aebaff; }
.game-ui #mic-button:hover { background:linear-gradient(120deg,#425bc0,#6746b6); }
.game-ui #mic-button .mic-icon { background:#ffffff20; }
.game-ui #u2-clear-button { color:#5c42a2; background:#f0ebff; border-color:#d5c8f0; }
.game-ui .horn { filter:hue-rotate(77deg) saturate(.6); }
.game-ui .brand-buddy--mint { background:linear-gradient(145deg,#f0f9ff,#b1d4ed); }
.game-ui .brand-buddy--peach { background:linear-gradient(145deg,#fbf3ff,#cfbced); }
.game-ui .center-tools { max-height:calc(100dvh - 120px); overflow-y:auto; color:var(--u2-ink); background:#fff; border-color:var(--u2-border); }
.game-ui .sound-settings p { color:var(--u2-muted); line-height:1.65; }
.game-ui .sound-action-row { flex-wrap:wrap; }
/* Compact reward below the title, never stretched between viewport edges.
 * Both columns must shrink so long counts/reward copy wrap within the card. */
.game-ui #combo-hud { position:absolute; z-index:22; top:112px; left:50%; transform:translateX(-50%); right:auto; bottom:auto; width:240px; max-width:calc(100% - 32px); height:max-content; min-height:58px; box-sizing:border-box; padding:8px 13px; display:grid; grid-template-columns:minmax(0,.72fr) minmax(0,1fr); align-items:center; align-content:start; gap:2px 10px; white-space:normal; overflow-wrap:anywhere; background:#f4f6ff; border:1px solid #dce2f5; border-radius:14px; box-shadow:none; pointer-events:none; }
.game-ui #combo-hud > * { min-width:0; max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.game-ui #combo-hud[hidden] { display:none; }
.game-ui #combo-hud .combo-caption { grid-column:1; color:#58678d; font-size:10px; }
.game-ui #combo-count { grid-column:1; grid-row:2; font-size:22px; line-height:1; color:#5b49ac; }
.game-ui #combo-reward { grid-column:2; grid-row:1 / 3; color:#435b9f; font-size:11px; line-height:1.5; }
.game-ui #combo-hud .combo-meter { grid-column:1 / 3; height:2px; margin:2px 0 0; }
.game-ui #combo-hud .combo-meter i { background:#8d80dd; }
.game-ui #u2-clear-status { position:absolute; z-index:12; top:112px; left:50%; transform:translateX(-50%); margin:0; max-width:58%; padding:6px 14px; border-radius:20px; color:#4d4d94; background:#f7f8ffeb; font-size:12px; text-align:center; pointer-events:none; }
.game-ui #u2-clear-status:empty { display:none; }
.game-ui[data-idle="true"] :is(.vm-ledger-host,.horn,.utterance,#combo-hud,#u2-stats) { visibility:hidden; }
.game-ui[data-mode="u2"] #combo-hud { display:none; }
.game-ui [hidden] { display:none !important; }
#u2-stats { position:absolute; z-index:9; top:116px; right:28px; width:272px; padding:17px; border:1px solid #fff; border-radius:25px; background:linear-gradient(140deg,#f3f0ffed,#f4fbffed); box-shadow:0 8px 22px #4d5e8214; color:#4f5276; }
#u2-stats summary { display:flex; align-items:baseline; gap:8px; cursor:pointer; min-height:36px; list-style:none; }
#u2-stats summary::-webkit-details-marker { display:none; }
#u2-stats summary>span { font-size:13px; font-weight:650; flex:1; }
#u2-stats summary>strong { font-size:30px; line-height:1.2; color:#5e51a6; }
#u2-stats summary>small { font-size:11px; }
#u2-stats summary::after { content:"⌄"; align-self:center; }
#u2-language-counts { display:grid; grid-template-columns:1fr 1fr; gap:7px; margin-top:12px; }
#u2-language-counts>div { display:flex; justify-content:space-between; gap:5px; padding:7px 9px; background:#ffffffa8; border-radius:9px; font-size:11px; }
#u2-stats p { font-size:10px; margin:12px 0 0; color:#626987; }
.game-ui #stress-button { min-width:110px; }
.game-ui #stress-exhibit { display:none; position:absolute; z-index:23; right:28px; top:24px; }
.game-ui[data-exhibit="true"] #stress-exhibit { display:inline-flex; }
.game-ui[data-idle="true"] #world { opacity:0; }
.game-ui[data-idle="true"] #u2-backdrop { display:none; }
.vm-welcome-host { --welcome-ink:#30457f; --welcome-muted:#5a6383; --welcome-focus:#445bc3; --welcome-control:#f4f6ff; --welcome-control-hover:#e8edff; --welcome-control-active:#dce4ff; }
.vm-welcome__button { border-color:#cbd4ef; box-shadow:0 3px 0 #d4dcf3,inset 0 1px 0 white; }
.vm-welcome__button--primary { background:#e5ebff; border-color:#bdcaee; box-shadow:0 3px 0 #bcc9ed,inset 0 1px 0 white; }
.vm-welcome__sentence { letter-spacing:-.018em; }
.vm-welcome-host { mix-blend-mode:multiply; }
.vm-welcome__logo { filter:none; }
.vm-welcome__panel { overflow-y:auto; }
/* Match the old exhibition selector's specificity to release its bottom:110px.
 * Without this reset top + bottom expands the auto-height grid into a strip. */
.game-ui[data-exhibit="true"] #combo-hud { top:105px; left:50%; bottom:auto; }
.game-ui[data-exhibit="true"] #u2-clear-status { top:104px; }
.game-ui[data-exhibit="true"] #stress-banner { top:178px; }
@media(max-width:1100px) { .edition-mark { font-size:10px; } .game-ui #combo-hud { width:180px; } }
@media(max-width:900px) {
 .mode-tools { grid-row:2; } .mode-tools .edition-mark { display:none; } .mode-switch button { padding:0 10px; font-size:11px; min-height:34px; }
 .game-ui #combo-hud { top:109px; left:50%; width:168px; min-height:37px; padding:4px 8px; border-radius:9px; }
 .game-ui #combo-hud .combo-caption { display:none; } .game-ui #combo-count { grid-row:1; font-size:18px; }
 .game-ui #combo-reward { grid-row:1; font-size:9px; } .game-ui #combo-hud .combo-meter { margin:0; }
 .game-ui[data-exhibit="true"] #combo-hud { top:112px; left:50%; }
 #u2-stats { top:108px; right:16px; width:194px; padding:10px 13px; border-radius:17px; }
 #u2-stats summary>strong { font-size:23px; }
}
@media(max-width:520px) { .edition-mark { gap:5px; } .edition-mark small { display:none; } .game-ui #combo-hud { width:125px; } .game-ui #combo-reward { font-size:8px; } .game-ui #u2-clear-status { max-width:90%; width:max-content; } }
@media(prefers-reduced-motion:reduce) { .game-ui .soft-control { transition:none; } }
