/* Five optical worlds. Every colour has a material or interface role. */
:root {
  --action:#1e2b50;--action-hover:#31436f;--action-text:#f7f7ff;
  --numeral:#13234e;--hero-ink:#13234e;--marker-ink:#243156;
  --marker-clear:#dce0ed;--marker-soft:#d2d1ef;--marker-focus:#4764d4;--marker-warm:#efb3a4;--marker-focus-ink:#fff;
  --select-fill:#eef0fae0;--select-line:#c9cde3;--dialog-fill:#f4f4fd;
  --selection:#bacaff;--scrollbar:#a9afd0;--plate-filter:none;
  --special-fill:#b74954;--special-ink:#fff;
}
:root[data-game="powerball"] {
  --paper:#ede9ea;--ink:#3c2027;--muted:#70525b;--blue:#a52f43;--rule:#d4c4c8;
  --action:#7b2638;--action-hover:#9a3248;--action-text:#fff8f9;
  --numeral:#3a1e26;--hero-ink:#fff8f8;--marker-ink:#3a2930;
  --marker-clear:#e0d9dc;--marker-soft:#d9cdd3;--marker-focus:#a5384b;--marker-focus-ink:#fff8f8;
  --select-fill:#f6eff1e8;--select-line:#d8c4cb;--dialog-fill:#fbf3f5;
  --selection:#e5b2bd;--scrollbar:#b48a95;
  --plate-filter:saturate(.12) brightness(1.025);--special-fill:#a12b40;--special-ink:#fff;
}
:root[data-game="megamillions"] {
  --paper:#f2eadb;--ink:#473213;--muted:#76603c;--blue:#9e650e;--rule:#dacbb0;
  --action:#5b3c15;--action-hover:#76521c;--action-text:#fff8e9;
  --numeral:#473213;--hero-ink:#34220a;--marker-ink:#4f3a1a;
  --marker-clear:#e9dfcc;--marker-soft:#e6d2aa;--marker-focus:#d4a340;--marker-focus-ink:#34220a;
  --select-fill:#fff9eae8;--select-line:#ddcdae;--dialog-fill:#fff8eb;
  --selection:#e7c780;--scrollbar:#bba06d;
  --plate-filter:hue-rotate(145deg) saturate(.65) sepia(.12);--special-fill:#e2b44f;--special-ink:#493212;
}
:root[data-game="uklotto"] {
  --paper:#e5eeea;--ink:#173c32;--muted:#4d7066;--blue:#1a735b;--rule:#c0d6cd;
  --action:#194b3d;--action-hover:#266751;--action-text:#f4fff9;
  --numeral:#143b30;--hero-ink:#effff8;--marker-ink:#224d40;
  --marker-clear:#d5e3dc;--marker-soft:#bfd7ca;--marker-focus:#277d5e;--marker-warm:#b9d2bf;--marker-focus-ink:#effff8;
  --select-fill:#f0faf5e8;--select-line:#bfd4c9;--dialog-fill:#f1faf5;
  --selection:#a4cfb9;--scrollbar:#7eac97;
  --plate-filter:hue-rotate(-92deg) saturate(.52);--special-fill:#277d5e;--special-ink:#fff;
}
:root[data-game="euromillions"] {
  --paper:#e3eff4;--ink:#193b51;--muted:#496c80;--blue:#167997;--rule:#bdd5df;
  --action:#214b64;--action-hover:#2d6885;--action-text:#f5fdff;
  --numeral:#123b53;--hero-ink:#0b3247;--marker-ink:#264b60;
  --marker-clear:#d0e4eb;--marker-soft:#c5dee9;--marker-focus:#78bdd1;--marker-focus-ink:#0b3247;
  --select-fill:#f0fbffe8;--select-line:#bad4df;--dialog-fill:#f1faff;
  --selection:#afdce9;--scrollbar:#80aabf;
  --plate-filter:hue-rotate(-45deg) saturate(.72);--special-fill:#d7c9f0;--special-ink:#473466;
}
body,.room{background:var(--paper);color:var(--ink)}
::selection{background:var(--selection);color:var(--ink)}
::-webkit-scrollbar-thumb{background:var(--scrollbar)}
.optical-stage{filter:var(--plate-filter);transform-origin:52% 47%;will-change:auto}
.orb,.sculpture{will-change:auto}
.room[data-state="running"] .orb,.room[data-state="running"] .optical-stage{will-change:transform}
.orb-number{color:var(--numeral)}.cobalt .orb-number{color:var(--hero-ink)}
.draw-button{background:var(--action);color:var(--action-text)}.draw-button:hover{background:var(--action-hover)}
.select-wrap select{background:var(--select-fill);border-color:var(--select-line)}
.phase{color:var(--muted)}.copy-button{color:var(--muted)}
.result h2:after{background:var(--rule)}
.room .numbers li{background:var(--marker-clear);color:var(--marker-ink)}
.room .numbers li:first-child{background:var(--marker-warm)}
.room .numbers li:nth-child(3),.room .numbers li:nth-child(6){background:var(--marker-soft)}
.room .numbers li:nth-child(4){background:var(--marker-focus);color:var(--marker-focus-ink)}
.room[data-game="powerball"] .numbers li:nth-child(1),.room[data-game="megamillions"] .numbers li:nth-child(1),.room[data-game="euromillions"] .numbers li:nth-child(1),
.room[data-game="powerball"] .numbers li:nth-child(4),.room[data-game="megamillions"] .numbers li:nth-child(4),.room[data-game="euromillions"] .numbers li:nth-child(4){background:var(--marker-clear);color:var(--marker-ink)}
.room[data-game="powerball"] .numbers li:nth-child(2),.room[data-game="megamillions"] .numbers li:nth-child(2),.room[data-game="euromillions"] .numbers li:nth-child(2),
.room[data-game="powerball"] .numbers li:nth-child(5),.room[data-game="megamillions"] .numbers li:nth-child(5),.room[data-game="euromillions"] .numbers li:nth-child(5){background:var(--marker-soft);color:var(--marker-ink)}
.room[data-game="powerball"] .numbers li:nth-child(3),.room[data-game="megamillions"] .numbers li:nth-child(3),.room[data-game="euromillions"] .numbers li:nth-child(3){background:var(--marker-focus);color:var(--marker-focus-ink)}
.room[data-game] .numbers li.special{background:var(--special-fill);color:var(--special-ink)}
dialog{background:var(--dialog-fill);color:var(--ink)}dialog::backdrop{background:#10182066}
.history-numbers span{background:var(--marker-clear);color:var(--marker-ink)}.history-numbers .bonus{background:var(--special-fill);color:var(--special-ink)}
.update-data{border-color:var(--select-line)}
.room[data-game="powerball"] .cobalt img{filter:hue-rotate(120deg) saturate(1.05)}
.room[data-game="powerball"] .clear-left img,.room[data-game="powerball"] .clear-right img{filter:saturate(.12)}
.room[data-game="powerball"] .lavender-left img,.room[data-game="powerball"] .lavender-right img{filter:saturate(.15)}
.room[data-game="megamillions"] .cobalt img{filter:hue-rotate(165deg) saturate(.87)}
.room[data-game="megamillions"] .clear-left img,.room[data-game="megamillions"] .clear-right img{filter:hue-rotate(145deg) saturate(.4) sepia(.1)}
.room[data-game="megamillions"] .lavender-left img,.room[data-game="megamillions"] .lavender-right img{filter:hue-rotate(145deg) saturate(.72)}
.room[data-game="uklotto"] .cobalt img{filter:hue-rotate(-85deg) saturate(.83)}
.room[data-game="uklotto"] .clear-left img,.room[data-game="uklotto"] .clear-right img{filter:hue-rotate(-92deg) saturate(.55)}
.room[data-game="uklotto"] .lavender-left img,.room[data-game="uklotto"] .lavender-right img{filter:hue-rotate(-92deg) saturate(.68)}
.room[data-game="uklotto"] .coral img{filter:hue-rotate(115deg) saturate(.55)}
.room[data-game="euromillions"] .cobalt img{filter:hue-rotate(-40deg) saturate(.8)}
.room[data-game="euromillions"] .clear-left img,.room[data-game="euromillions"] .clear-right img{filter:hue-rotate(-45deg) saturate(.65)}
.room[data-game="euromillions"] .lavender-left img,.room[data-game="euromillions"] .lavender-right:not(.extra) img{filter:hue-rotate(-35deg) saturate(.6)}
@media(min-width:761px){
  .room[data-game="powerball"] .coral{left:17%;top:31%}.room[data-game="powerball"] .clear-left{left:27%;top:52%}.room[data-game="powerball"] .lavender-left{left:37%;top:24%}.room[data-game="powerball"] .cobalt{left:53%;top:49%}.room[data-game="powerball"] .clear-right{left:77%;top:31%}.room[data-game="powerball"] .lavender-right{left:88%;top:57%}
  .room[data-game="megamillions"] .coral{left:82%;top:26%}.room[data-game="megamillions"] .clear-left{left:17%;top:45%}.room[data-game="megamillions"] .lavender-left{left:30%;top:26%}.room[data-game="megamillions"] .cobalt{left:49%;top:47%}.room[data-game="megamillions"] .clear-right{left:73%;top:56%}.room[data-game="megamillions"] .lavender-right{left:91%;top:57%}
  .room[data-game="uklotto"] .coral{left:18%;top:41%}.room[data-game="uklotto"] .clear-left{left:30%;top:59%}.room[data-game="uklotto"] .lavender-left{left:34%;top:24%}.room[data-game="uklotto"] .cobalt{left:55%;top:49%}.room[data-game="uklotto"] .clear-right{left:80%;top:37%}.room[data-game="uklotto"] .lavender-right{left:90%;top:59%}
  .room[data-game="euromillions"] .coral{left:17%;top:32%}.room[data-game="euromillions"] .extra{left:83%;top:23%}.room[data-game="euromillions"] .clear-left{left:26%;top:60%}.room[data-game="euromillions"] .lavender-left{left:34%;top:26%}.room[data-game="euromillions"] .cobalt{left:54%;top:48%}.room[data-game="euromillions"] .clear-right{left:79%;top:58%}.room[data-game="euromillions"] .lavender-right{left:93%;top:44%}
}
@media(prefers-reduced-motion:reduce){.room[data-state="running"] .orb,.room[data-state="running"] .optical-stage{will-change:auto}}

/* The sound control belongs to the room, clear of the mobile title and selector. */
.sound-button{width:44px;height:44px;display:grid;place-items:center;padding:10px;border:0;border-radius:50%;background:none;color:var(--ink);transition:background .15s,color .15s}
.sound-button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.sound-button:hover{background:var(--select-fill);color:var(--blue)}
.sound-mute{display:none}.sound-button[aria-pressed="false"] .sound-waves{display:none}.sound-button[aria-pressed="false"] .sound-mute{display:block}
@media(max-width:760px){.sound-button{position:absolute;right:15px;top:61px}.header nav{gap:17px}}
@media(max-width:359px){.sound-button{right:11px}.header nav{gap:12px}}
@media(prefers-reduced-motion:reduce){.sound-button{transition:none}}

/* HIG-informed web affordances: comfortable targets and immediate press feedback. */
.text-button,.skip-button,.copy-button,.set-navigation button,#history-close{min-width:44px;min-height:44px}
.select-wrap select{min-height:44px}
.draw-button:hover{transform:none}
.draw-button:active{transform:scale(.985);background:var(--action-hover)}
.text-button:active,.skip-button:active,.copy-button:active,.set-navigation button:active,#history-close:active,.sound-button:active{background:var(--select-fill);color:var(--blue)}
.text-button,.skip-button,.copy-button,.set-navigation button,#history-close{border-radius:50%;transition:background .12s,color .12s}
.skip-button{border-radius:24px;padding-inline:8px}
@media(max-width:760px){.set-navigation button{width:44px;height:44px}.copy-button{min-width:44px;min-height:44px}.actions{gap:16px}}
@media(max-width:359px){.actions{gap:10px}.draw-button{min-width:148px}.result-detail{gap:5px}}
@media(prefers-reduced-motion:reduce){.draw-button:active{transform:none}}

/* Regional entry and languages share the same native, quiet navigation. */
.locale-wrap{position:relative;display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;border-radius:50%;font-size:12px;font-weight:650}
.locale-wrap select{position:absolute;inset:0;opacity:0;width:44px;height:44px;cursor:pointer}
.locale-wrap:hover,.locale-wrap:active{background:var(--select-fill)}
.locale-wrap:focus-within{outline:2px solid var(--blue);outline-offset:4px}
.room[data-state="choosing"] .draw-button{min-width:220px}
@media(min-width:761px){html:not([lang="ko"]) .result h2{left:10%;font-size:clamp(17px,calc(23px*var(--scale)),23px)}html:not([lang="ko"]) .room.euro .result h2{left:9%}}
@media(max-width:760px){
 .header nav{gap:6px}.sound-button{position:static}.select-wrap{position:absolute;right:22px;top:76px}
 .game-heading{max-width:calc(100% - 182px)}.wordmark,.room.long-title .wordmark{font-size:21px;line-height:1.2}
 .game-format{position:static;white-space:normal;max-width:none;margin-top:8px;line-height:1.5}
 .text-button{padding-inline:4px}.select-wrap select{max-width:170px}
 .result-detail>p{max-width:190px;line-height:1.5}.room.euro .result-detail{gap:8px}
 .result h2{padding-inline:44px}.draw-button{padding-inline:17px;min-width:160px}.skip-button{font-size:12px;gap:6px}
}
@media(max-width:359px){
 .header nav{gap:2px}.header{padding:18px}.select-wrap{right:18px;top:85px}
 .game-heading{max-width:calc(100% - 165px)}.wordmark,.room.long-title .wordmark{font-size:18px}
 .select-wrap select{max-width:145px}.result-detail>p{max-width:137px}.draw-button{min-width:144px;font-size:15px;padding-inline:12px}
 .actions{gap:7px;padding-inline:14px}.skip-button{font-size:11px}
}

@media(max-width:359px){.result,.room.euro .result{top:77%;padding-top:16px}}
