.theme-mode-toggle{position:fixed;z-index:12;right:calc(14px + env(safe-area-inset-right,0px));bottom:calc(60px + env(safe-area-inset-bottom,0px));width:44px;height:44px;display:grid;place-items:center;padding:0;border:1px solid #62685d;border-radius:50%;background:#161a17;color:#eeeee1;cursor:pointer;box-shadow:0 2px 10px #111a1440;transition:background .18s ease-out,color .18s ease-out,transform .18s ease-out}
.theme-mode-toggle:hover{transform:translateY(-2px);border-color:#dcf49a;color:#dcf49a}.theme-mode-toggle:focus-visible{outline:3px solid #a8ce61;outline-offset:3px}
.theme-mode-toggle svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.theme-mode-toggle .sun{display:none}
html[data-exile-theme=light]{color-scheme:light;--paper:#eae9dc;--panel:#f5f2e7;--ink:#203027;--muted:#526157;--stroke:#9da99a;--surface:#f5f2e7;--line:#8a9888;--heading:#203027;--accent:#29483b}
html[data-exile-theme=light] body{background:#eae9dc;color:#203027}
html[data-exile-theme=light] .theme-mode-toggle{background:#f5f2e7;color:#203027;border-color:#909b8d}
html[data-exile-theme=light] .theme-mode-toggle .moon{display:none}
html[data-exile-theme=light] .theme-mode-toggle .sun{display:block}
html[data-exile-theme=light] .language-control{background:#f5f2e7;color:#203027;color-scheme:light}
html[data-exile-theme=light] .topbar{background:#eceadf;color:#203027;border-color:#abb4a5}
html[data-exile-theme=light] .topinner nav a,html[data-exile-theme=light] .play-exit{color:#344b3b}
html[data-exile-theme=light] .topinner nav a[aria-current]{color:#203027;border-bottom-color:#29483b}
html[data-exile-theme=light] .game-shell .topbar{background:#eceadf;border-color:#abb4a5}
html[data-exile-theme=light] .game-shell .topinner nav a,html[data-exile-theme=light] .game-shell .topinner nav button{color:#203027}
html[data-exile-theme=light] .game-shell .topinner nav :is(a,button):hover{color:#456f4d}
html[data-exile-theme=light] #shell-map{background:#f5f2e7;color:#203027}
html[data-exile-theme=light] #shell-map nav a{border-color:#aab5a9}
html[data-exile-theme=light] #shell-map nav a[aria-current]{background:#29483b;color:#fff}
html[data-exile-theme=light] #shell-map nav a:hover{background:#e2e8d8}
html[data-exile-theme=light] body:has(.game-entry),html[data-exile-theme=light] body:has(.game-room-play),html[data-exile-theme=light][data-select-game] body{--room-ink:#203027;--room-ivory:#203027;--room-muted:#526157;--room-lime:#29483b;background:#eae9dc;color:#203027}
html[data-exile-theme=light] body:has(.game-entry)::before,html[data-exile-theme=light] body:has(.game-room-play)::before,html[data-exile-theme=light][data-select-game] body::before{background:linear-gradient(90deg,#eae9dcee,#eae9dcd6),url('/assets/exile-panorama/harbour.webp') var(--room-position) 60%/auto 115% no-repeat;opacity:.26}
html[data-exile-theme=light] .game-entry .one-rule{color:#526157}
html[data-exile-theme=light] .selecting .game-entry .welcome-copy h1{color:#203027}
html[data-exile-theme=light] .game-entry .game-emblem{mix-blend-mode:normal;opacity:1}
html[data-exile-theme=light] .game-entry .game-emblem img{filter:grayscale(1) invert(1) brightness(1.2);mix-blend-mode:multiply}
html[data-exile-theme=light] .game-entry.theme-loop .game-emblem img{content:url('/assets/exile-panorama/games/loop-ivory.png');filter:none}
html[data-exile-theme=light] .game-entry .accentbtn{background:#29483b;color:#f5f2e7}
html[data-exile-theme=light] .game-entry .accentbtn:hover{background:#385d4b;color:#fff}
html[data-exile-theme=light] .selecting .game-entry .choices span{background:#f5f2e7;color:#203027;border-color:#aab5a9}
html[data-exile-theme=light] .selecting .game-entry .choices input:checked+span{background:#29483b;color:#fff;border-color:#29483b}
html[data-exile-theme=light] .selecting .game-entry .choices label:hover input:not(:checked)+span{background:#e2e8d8}
html[data-exile-theme=light] .game-entry .entry-settings{color-scheme:light}
html[data-exile-theme=light] .game-room-play .loop-game{--loop-light:#203027;--loop-line:#8a9888;--loop-accent:#29483b}
html[data-exile-theme=light] .loop-game .tool-row button[aria-pressed=true],html[data-exile-theme=light] .loop-game .tool-row button[aria-pressed=true]:hover{color:#fff;background:#29483b}
html[data-exile-theme=light] .game-room-play .loop-game .board-frame,html[data-exile-theme=light] .game-room-play .loop-game .board-frame *{color-scheme:light}
html[data-exile-theme=light] .game-room-play .loop-game .board-frame{background:#fdfbf2}
html[data-exile-theme=light] .playing .new-deal,html[data-exile-theme=light] .playing .share-puzzle{color:#203027}
html[data-exile-theme=light] .playing :is(.new-deal,.share-puzzle):hover{background:#f5f2e7;color:#203027}
html[data-exile-theme=light] .playing .result-slip{background:#f5f2e7;color:#203027}
html[data-exile-theme=light] :is(.records-page,.weekly-leaderboard-page,.updates-page,.service-info,.puzzle-ranking){color:#203027}
html[data-exile-theme=light] .puzzle-ranking :is(summary,h2){color:#203027}
html[data-exile-theme=light] .result-slip .result-answer{color:#203027}
html[data-exile-theme=light] .result-actions>.share-result{color:#203027}
html[data-exile-theme=light] .mini-intro{background:#eae9dc}
html[data-exile-theme=light] body:has(.ex-room){background:#eae9dc;color:#203027}
html[data-exile-theme=light] .ex-room{--room-bg:#eae9dc;--room-surface:#f5f2e7;--room-text:#203027;--room-muted:#526157;--room-rule:#aab5a9;--room-accent:#29483b}
html[data-exile-theme=light] .ex-room .room-lead::after{opacity:.45}
html[data-exile-theme=light] .room-box input:not([type=radio]):not([type=checkbox]){color-scheme:light;background:#fdfbf2}
html[data-exile-theme=light] .room-box .room-primary{color:#fff}
html[data-exile-theme=light] .service-links{border-color:#aab5a9;color:#526157}
html[data-exile-theme=light] body .footer-guides summary{color:#203027}
html[data-exile-theme=light] .mast{background:#eceadf;color:#203027}
html[data-exile-theme=light] :is(.mast .sigil,.topbar .brandmark){filter:brightness(.35) saturate(.65)}
html[data-exile-theme=light] .mast #lang,html[data-exile-theme=light] .mast #records-open,html[data-exile-theme=light] .mast #map-toggle,html[data-exile-theme=light] .mast #rooms-open{color:#203027}
html[data-exile-theme=light] .stage{background:#a5b2a5}
html[data-exile-theme=light] #intro #title{color:#fffdf2;text-shadow:0 2px 10px #18271ab0}
html[data-exile-theme=light] .selection{background:#f5f2e7;color:#203027;border-left-color:#29483b}
html[data-exile-theme=light] .selection small{color:#526157}
html[data-exile-theme=light] .selection #play{background:#29483b;color:#fff}
html[data-exile-theme=light] .point-name{background:#f5f2e7;color:#203027}
html[data-exile-theme=light] .point-number{background:#f5f2e7;color:#203027;border-color:#29483b}
html[data-exile-theme=light] .point:is(:hover,:focus-visible,[aria-current=location]) .point-number{background:#29483b;color:#fff;border-color:#29483b}
html[data-exile-theme=light] .directory{background:#f5f2e7;color:#203027}
html[data-exile-theme=light] .rail-stop{background:#eae9dc;color:#203027;border-color:#aab5a9}
html[data-exile-theme=light] .rail-stop:nth-child(even){background:#f5f2e7}
html[data-exile-theme=light] .rail-stop[aria-pressed=true]{background:#29483b;color:#fff}
html[data-exile-theme=light] #faq-link{color:#203027}
/* Keep reading surfaces in ink; the game boards and dark room panels have their own contrast. */
html[data-exile-theme=light] .selecting .game-entry .setup-intro h1{color:#203027}
html[data-exile-theme=light] .game-room-play .mini-game{--ivory:#203027;--mini-spot:#d6e7ae;color:#203027}
html[data-exile-theme=light] .game-room-play .mini-game :is(.mini-guide,.mini-board-foot,.mini-board-foot button,.mini-form label,.mini-entry-label,.mini-message){color:#344b3b}
html[data-exile-theme=light] .game-room-play .mini-game .mini-mission strong{color:#29483b}
html[data-exile-theme=light] .game-room-play .mini-game .mini-timer b{color:#203027}
html[data-exile-theme=light] .game-room-play .mini-game .number-grid .corner{color:#fffdf2}
html[data-exile-theme=light] .game-room-play .mini-game .mini-submit{background:#d6e7ae;border-color:#d6e7ae;color:#203027}
html[data-exile-theme=light] .game-room-play .mini-game .mini-submit:disabled{background:transparent;border-color:#9da99a;color:#526157}
html[data-exile-theme=light] .game-room-play .janggi-game :is(.jg-status,.jg-actions button){color:#203027}
html[data-exile-theme=light] .game-room-play .janggi-game .jg-reserve{color:#526157}
html[data-exile-theme=light] .weekly-page{--ivory:#203027}
html[data-exile-theme=light] .weekly-page .weekly-register input{background:#fdfbf2;color:#203027}
html[data-exile-theme=light] .weekly-page .weekly-position{color:#526157}
html[data-exile-theme=light] .faq-page details[open] summary,html[data-exile-theme=light] .faq-page details p{color:#203027}
html[data-exile-theme=light] .game-shell .room-invite .room-lead h1{color:#eeeee1}
html[data-exile-theme=light] .game-shell .room-invite .room-primary{color:#203027}
html[data-exile-theme=light] .game-shell .room-invite .choices input:checked+span{color:#fffdf2}
html[data-exile-theme=light] body:has(.room-invite) .room-trail a{color:#c3cabb}
html[data-exile-theme=light] body:has(.room-invite) .service-links,html[data-exile-theme=light] body:has(.room-invite) .footer-guides summary{color:#c3cabb}
@media(prefers-reduced-motion:reduce){.theme-mode-toggle{transition:none}}
