/* FIVE. theme choices: System follows prefers-color-scheme unless overridden.
   Source dark palette is unchanged in style.css. These are purposeful light tokens.
*/
html[data-effective-theme="light"]{
 color-scheme:light;
 --bg:#f7f6f1;--panel:#ffffff;--panel2:#f0f5f4;--ink:#162f3d;
 --muted:#506775;--gold:#956322;--teal:#287363;--amber:#946127;
 --absent:#637987;--border:#bccbd0;
}
/* Header appearance selector: applies in both themes. */
.theme-picker{position:relative;flex:0 0 auto}
.theme-trigger{position:relative}
.theme-symbol{font-size:20px;line-height:1}
.theme-menu{position:absolute;right:0;top:calc(100% + 9px);width:204px;z-index:950;
 border:1px solid #547383;border-radius:13px;padding:9px;
 background:#122d3f;color:#f5f0e6;box-shadow:0 18px 55px #0007}
.theme-menu[hidden]{display:none!important}
.theme-menu-title{font-size:10px;font-weight:850;letter-spacing:.12em;padding:7px 9px 10px;color:#e6c28d}
.theme-option{display:flex;align-items:center;gap:9px;width:100%;min-height:43px;text-align:left;
 padding:9px 10px;background:transparent;color:inherit;border:1px solid transparent;border-radius:8px;font-size:12px;font-weight:750}
.theme-option:hover,.theme-option:focus-visible{background:#29495a}
.theme-option[aria-pressed="true"]{background:#2b494d;border-color:#b5a27e;color:#ffe4b7}
.theme-option-icon{width:21px;text-align:center;font-size:18px;flex:0 0 auto}
.theme-check{margin-left:auto;color:#f1c884;font-weight:900;font-size:15px;min-width:12px}
.theme-option:focus-visible,.theme-trigger:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
html[data-effective-theme="light"] .theme-menu{background:#fff;color:#203b4b;border-color:#bbcdd0;box-shadow:0 15px 40px #1b35402e}
html[data-effective-theme="light"] .theme-menu-title{color:#81551f}
html[data-effective-theme="light"] .theme-option:hover,
html[data-effective-theme="light"] .theme-option:focus-visible{background:#ebf1ef}
html[data-effective-theme="light"] .theme-option[aria-pressed="true"]{background:#edf3ed;border-color:#8baea4;color:#215f51}
html[data-effective-theme="light"] .theme-check{color:#256654}
/* The generous daylight palette retains gold, sea-glass green and the 5x6 game grid. */
html[data-effective-theme="light"] body{background:#f7f6f1;color:#162f3d}
html[data-effective-theme="light"] .atmosphere{background:radial-gradient(ellipse 63% 35% at 80% 0%,#dce7db88,transparent 80%),repeating-linear-gradient(0deg,transparent 0 47px,#7b9ba112 48px),repeating-linear-gradient(90deg,transparent 0 47px,#7b9ba112 48px)}
html[data-effective-theme="light"] .topbar,
html[data-effective-theme="light"] .endnote{border-color:#c7d4d2}
html[data-effective-theme="light"] .wordmark small,
html[data-effective-theme="light"] .clock-date,
html[data-effective-theme="light"] .endnote>span,
html[data-effective-theme="light"] .endnote small{color:#526e78}
html[data-effective-theme="light"] .eyebrow,
html[data-effective-theme="light"] .overline,
html[data-effective-theme="light"] .tries,
html[data-effective-theme="light"] .five-section-kicker,
html[data-effective-theme="light"] .lounge-rules,
html[data-effective-theme="light"] .field-label,
html[data-effective-theme="light"] .rounds-label,
html[data-effective-theme="light"] .how-mini>span,
html[data-effective-theme="light"] .social-mark{color:#89591e}
html[data-effective-theme="light"] .hero-copy>p,
html[data-effective-theme="light"] .hero-score .score-foot,
html[data-effective-theme="light"] .rounds-label span:last-child,
html[data-effective-theme="light"] .tries small,
html[data-effective-theme="light"] .game-notice,
html[data-effective-theme="light"] .play-footer,
html[data-effective-theme="light"] .community-card p,
html[data-effective-theme="light"] .how-mini p,
html[data-effective-theme="light"] .social-head p,
html[data-effective-theme="light"] .social-info,
html[data-effective-theme="light"] .social-fine,
html[data-effective-theme="light"] .social-fine *,
html[data-effective-theme="light"] .my-rank-info,
html[data-effective-theme="light"] .board-player small,
html[data-effective-theme="light"] .board-points small,
html[data-effective-theme="light"] .board-scope button:not(.active),
html[data-effective-theme="light"] .chat-byline time,
html[data-effective-theme="light"] .chat-bottom,
html[data-effective-theme="light"] .chat-code,
html[data-effective-theme="light"] .chat-loading,
html[data-effective-theme="light"] .five-section-kicker span,
html[data-effective-theme="light"] .achievements-head p,
html[data-effective-theme="light"] .achievement-card small,
html[data-effective-theme="light"] .delight-share-card>small,
html[data-effective-theme="light"] .account-note,
html[data-effective-theme="light"] .account-divider,
html[data-effective-theme="light"] .privacy-article p{color:#506876!important}
html[data-effective-theme="light"] .icon-button,
html[data-effective-theme="light"] .profile-button,
html[data-effective-theme="light"] .account-button{background:#fff;border-color:#c2d1d4;color:#285261}
html[data-effective-theme="light"] .account-button{color:#895b21}
html[data-effective-theme="light"] .icon-button:hover,
html[data-effective-theme="light"] .profile-button:hover,
html[data-effective-theme="light"] .account-button:hover{background:#e9f0ee}
html[data-effective-theme="light"] .hero-score{background:linear-gradient(125deg,#fff,#e9f1eb);border-color:#c0d1d1;box-shadow:0 15px 35px #123d4811}
html[data-effective-theme="light"] .hero-score>span,
html[data-effective-theme="light"] .aside-stat b,
html[data-effective-theme="light"] .account-numbers b,
html[data-effective-theme="light"] .my-stats-grid b,
html[data-effective-theme="light"] .board-rank,
html[data-effective-theme="light"] .board-points b,
html[data-effective-theme="light"] .stat-strip strong,
html[data-effective-theme="light"] .score-main strong{color:#805422}
html[data-effective-theme="light"] .score-main small{color:#54717a}
html[data-effective-theme="light"] .score-progress{background:#dbe8e3}
html[data-effective-theme="light"] .round-tracker{background:#edf3f1;border-color:#bfd0d0}
html[data-effective-theme="light"] .round-circle{background:#fff;color:#526d77;border-color:#bdcdd2}
html[data-effective-theme="light"] .round-circle.current{background:#e9c78e;color:#1d3641;border-color:#c09a60}
html[data-effective-theme="light"] .round-circle.solved{background:#39796b;color:#fff;border-color:#367669}
html[data-effective-theme="light"] .round-circle.failed{background:#80575c;color:#fff;border-color:#80575c}
html[data-effective-theme="light"] .play-panel{background:radial-gradient(ellipse 88% 40% at 100% 0%,#eaf3ec,#ffffff 80%);border-color:#c1d2d4;box-shadow:0 13px 36px #163b4811}
html[data-effective-theme="light"] .game-notice.warn{color:#96502f!important}
html[data-effective-theme="light"] .game-notice.good{color:#236c55!important}
html[data-effective-theme="light"] .tile{background:#fff;border-color:#acbec8;color:#1c3949;box-shadow:inset 0 0 0 1px #f0f4f3}
html[data-effective-theme="light"] .tile.typed{background:#e9f0f2;border-color:#7b99a7}
html[data-effective-theme="light"] .tile.G{background:#39796b;border-color:#39796b;color:#fff;box-shadow:none}
html[data-effective-theme="light"] .tile.Y{background:#a57b3f;border-color:#a57b3f;color:#fff;box-shadow:none}
html[data-effective-theme="light"] .tile.X{background:#607380;border-color:#607380;color:#fff;box-shadow:none}
html[data-effective-theme="light"] .key{background:#e0eaec;border-color:#bdd0d6;color:#233e4c}
html[data-effective-theme="light"] .key.wide{background:#ccdbdf;color:#1f3b4a}
html[data-effective-theme="light"] .key.G{background:#39796b;color:#fff;border-color:#39796b}
html[data-effective-theme="light"] .key.Y{background:#a57b3f;color:#fff;border-color:#a57b3f}
html[data-effective-theme="light"] .key.X{background:#607380;color:#fff;border-color:#607380}
html[data-effective-theme="light"] .play-footer{border-color:#cbd8d9}
html[data-effective-theme="light"] .aside-card,
html[data-effective-theme="light"] .social-panel,
html[data-effective-theme="light"] .achievements,
html[data-effective-theme="light"] .privacy-article{background:radial-gradient(ellipse at 95% 0%,#f0f6f1,#fff 70%);border-color:#c2d2d4}
html[data-effective-theme="light"] .community-card,
html[data-effective-theme="light"] .invite-card{background:linear-gradient(135deg,#eef5f1,#fdfdfb)}
html[data-effective-theme="light"] .aside-stat,
html[data-effective-theme="light"] .privacy-article section{border-color:#d0dddc;color:#526975}
html[data-effective-theme="light"] .countdown{background:#eff4f2;border-color:#c4d3d5;color:#415d6b}
html[data-effective-theme="light"] .aside-soon{border-color:#b59b70;color:#825923}
html[data-effective-theme="light"] .how-mini button,
html[data-effective-theme="light"] .text-button,
html[data-effective-theme="light"] .account-link,
html[data-effective-theme="light"] .privacy-footer-link{color:#87591f}
html[data-effective-theme="light"] .board-scope{background:#edf3f2;border-color:#c3d1d5}
html[data-effective-theme="light"] .board-scope button.active{background:#e8c691;color:#1b3846}
html[data-effective-theme="light"] .board-scope button:not(.active):hover{background:#ddebe7}
html[data-effective-theme="light"] .board-row,
html[data-effective-theme="light"] .your-stats,
html[data-effective-theme="light"] .achievement-card,
html[data-effective-theme="light"] .chat-message,
html[data-effective-theme="light"] .challenge-player,
html[data-effective-theme="light"] .account-numbers>div{background:#f1f6f5;border-color:#d0dedf}
html[data-effective-theme="light"] .board-row.mine,
html[data-effective-theme="light"] .achievement-card.earned,
html[data-effective-theme="light"] .chat-message.mine{background:#e2efe8;border-color:#9ac1b4}
html[data-effective-theme="light"] .board-empty{border-color:#b1c7cd;color:#526978}
html[data-effective-theme="light"] .board-empty strong,
html[data-effective-theme="light"] .board-empty a,
html[data-effective-theme="light"] .achievement-card strong,
html[data-effective-theme="light"] .chat-byline strong{color:#264d57}
html[data-effective-theme="light"] .live-badge{background:#e5f3e8;border-color:#85b99e;color:#216147}
html[data-effective-theme="light"] .chat-log{scrollbar-color:#acc7cb #edf3f1}
html[data-effective-theme="light"] .chat-body{color:#254454}
html[data-effective-theme="light"] .chat-controls button{color:#546f7e}
html[data-effective-theme="light"] .chat-controls button:hover{color:#77501b}
html[data-effective-theme="light"] .chat-quick button,
html[data-effective-theme="light"] .share-channel-row button{background:#edf3f1;border-color:#bfd1d4;color:#285569}
html[data-effective-theme="light"] .chat-quick button:hover,
html[data-effective-theme="light"] .share-channel-row button:hover{background:#dfece6}
html[data-effective-theme="light"] .chat-compose input,
html[data-effective-theme="light"] .modal input:not([type=checkbox]),
html[data-effective-theme="light"] .account-dialog input:not([type=checkbox]),
html[data-effective-theme="light"] .delight-dialog textarea{background:#fff;border-color:#9fb5be;color:#173c4c}
html[data-effective-theme="light"] input::placeholder,
html[data-effective-theme="light"] textarea::placeholder{color:#697e89;opacity:1}
html[data-effective-theme="light"] .chat-code summary{color:#89571e}
html[data-effective-theme="light"] .modal{background:#fff;border-color:#b4cbd1;color:#182f3c;box-shadow:0 25px 80px #223e4c3b}
html[data-effective-theme="light"] .modal::backdrop{background:#24404a88}
html[data-effective-theme="light"] .modal p,
html[data-effective-theme="light"] .modal small{color:#526b77}
html[data-effective-theme="light"] .modal-x{background:#eff3f2;border-color:#b6cbd0;color:#4a5c69}
html[data-effective-theme="light"] .help-example,
html[data-effective-theme="light"] .stat-strip,
html[data-effective-theme="light"] .account-banner,
html[data-effective-theme="light"] .account-codes,
html[data-effective-theme="light"] .profile-privacy,
html[data-effective-theme="light"] .sound-setting,
html[data-effective-theme="light"] .delight-status,
html[data-effective-theme="light"] .challenge-url,
html[data-effective-theme="light"] .delight-share-card,
html[data-effective-theme="light"] .achievement-finish{background:#f2f6f3;border-color:#c2d1d0;color:#244356}
html[data-effective-theme="light"] .share-three-symbols>span{background:#d7e1e0;border-color:#becdd0;color:#294858}
html[data-effective-theme="light"] .share-three-symbols>span.won{background:#39796b;color:#fff}
html[data-effective-theme="light"] .share-three-symbols>span.missed{background:#775b5c;color:#fff}
html[data-effective-theme="light"] .challenge-ribbon{background:linear-gradient(115deg,#e7f0e9,#f9f5eb);border-color:#c8b48f}
html[data-effective-theme="light"] .challenge-ribbon strong,
html[data-effective-theme="light"] .challenge-player strong,
html[data-effective-theme="light"] .delight-share-score strong{color:#815c27}
html[data-effective-theme="light"] .challenge-ribbon small,
html[data-effective-theme="light"] .challenge-player span,
html[data-effective-theme="light"] .challenge-player small,
html[data-effective-theme="light"] .sound-setting small{color:#54717c}
html[data-effective-theme="light"] .achievement-count{color:#835923;border-color:#bfa988}
html[data-effective-theme="light"] .achievement-symbol,
html[data-effective-theme="light"] .social-mark,
html[data-effective-theme="light"] .chat-byline .claimed-star,
html[data-effective-theme="light"] .account-banner span{color:#805421}
html[data-effective-theme="light"] .finish-badge{background:#e6f0e7;color:#35614c;border-color:#a4c4b8}
html[data-effective-theme="light"] .finished-badges small{color:#526b77}
html[data-effective-theme="light"] .secondary-button{background:#e4eeed;border-color:#aebfc5;color:#244b60}
html[data-effective-theme="light"] .secondary-button:hover{background:#d4e6e1}
html[data-effective-theme="light"] .postgame-actions{background:#eef6ed;border-color:#c9af80}
html[data-effective-theme="light"] .postgame-actions p{color:#4f6973}
html[data-effective-theme="light"] .toast{background:#fff;border-color:#ae8f5e;color:#624217;box-shadow:0 12px 35px #2943532d}
html[data-effective-theme="light"] .account-check{color:#3d5864}
html[data-effective-theme="light"] .account-code-list code,
html[data-effective-theme="light"] .share-preview{background:#f6f8f6;border-color:#b8ced0;color:#2d4a56}
html[data-effective-theme="light"] .account-message{color:#805522!important}
html[data-effective-theme="light"] .result-word{color:#2b6658!important}
html[data-effective-theme="light"] .result-small{color:#526b77!important}
html[data-effective-theme="light"] .delight-fine{color:#526b77!important}
html[data-effective-theme="light"] .privacy-article h2{color:#885c25}
html[data-effective-theme="light"] .danger-button{background:#fff3f0;border-color:#c39288;color:#913d32}
html[data-effective-theme="light"] .danger-button:hover{background:#fae6e2}
/* Tiny screens: theme button remains accessible without pushing page width. */
@media(max-width:470px){.theme-trigger{min-width:30px;width:30px!important}.theme-symbol{font-size:17px}}
@media(max-width:380px){.top-actions .theme-picker .icon-button{min-width:28px;width:28px;min-height:32px}.theme-menu{width:190px}.topbar{gap:3px}.profile-button{max-width:62px}}
@media(min-width:381px) and (max-width:409px){
 .topbar{gap:6px}
 .top-actions{gap:4px}
 .profile-button{max-width:96px}
}

.privacy-header-actions{display:flex;align-items:center;gap:10px}.privacy-header-actions .privacy-button{font-size:11px;min-height:38px}@media(max-width:390px){.privacy-header-actions{gap:5px}.privacy-header-actions .privacy-button{padding:7px;font-size:10px}}

/* Dark-mode absent letters contrast improvement — FIVE. */
html:not([data-effective-theme="light"]) .tile.X{background:#4a6070;border-color:#748b9b;color:#fff;box-shadow:inset 0 0 0 1px #ffffff0f}
html:not([data-effective-theme="light"]) .key.X{background:#4a6070;border-color:#748b9b;color:#fff}
html:not([data-effective-theme="light"]) .tile-status{color:#fff}
