.shell[data-theme="light"]{--upgrade-bg:#f5f1e9;--upgrade-surface:#fffdf8;--upgrade-ink:#26382c;--upgrade-muted:#69766c;--upgrade-line:#dfe3d6;--upgrade-shadow:0 16px 45px #26382c10;}
.shell[data-theme="dark"]{--upgrade-bg:#111a17;--upgrade-surface:#1c2823;--upgrade-ink:#edf3e9;--upgrade-muted:#a9b7aa;--upgrade-line:#35473c;--upgrade-shadow:0 18px 48px #0005;background:var(--upgrade-bg);color:var(--upgrade-ink);color-scheme:dark;}
.shell[data-theme="dark"] .main,.shell[data-theme="dark"] .room-layout,.shell[data-theme="dark"] .hero,.shell[data-theme="dark"] .notice,.shell[data-theme="dark"] .panel,.shell[data-theme="dark"] .join-box,.shell[data-theme="dark"] .game-tile,.shell[data-theme="dark"] .room-side .panel,.shell[data-theme="dark"] .member,.shell[data-theme="dark"] .chat-bubble,.shell[data-theme="dark"] .album-page,.shell[data-theme="dark"] .prompt,.shell[data-theme="dark"] .gallery-card,.shell[data-theme="dark"] .gallery-hero,.shell[data-theme="dark"] .score-chip{background:var(--upgrade-surface);color:var(--upgrade-ink);border-color:var(--upgrade-line);box-shadow:var(--upgrade-shadow);}
.shell[data-theme="dark"] :is(p,small,.muted,.fine,.date,.label,.status,.chat-meta){color:var(--upgrade-muted);}
.shell[data-theme="dark"] :is(input,textarea,select){background:#14201a;color:var(--upgrade-ink);border-color:var(--upgrade-line);}
.shell[data-theme="dark"] .rail{background:#16221c;color:var(--upgrade-ink);border-color:var(--upgrade-line);}
.shell[data-theme="dark"] .nav-link{color:var(--upgrade-muted);}.shell[data-theme="dark"] .nav-link.active{background:#26392f;color:#e9f1e4;}
.shell[data-theme="dark"] .answer-card{background:linear-gradient(145deg,#25332c,#1b2721)!important;color:#f1f4ed!important;border-color:#475c4d!important;}
.shell[data-theme="dark"] .answer-card p,.shell[data-theme="dark"] .answer-card small{color:#e1e9dc!important;}
.shell[data-theme="dark"] .answer-card.selected{background:#493424!important;border-color:#d98e66!important;}
.shell[data-theme="dark"] .vote-button,.shell[data-theme="dark"] .chip{background:#2d3c33;color:#e8eee4;border-color:#46584b;}
body:has(.shell[data-theme="dark"]) #modal{background:#1c2823;color:#edf3e9;border:1px solid #35473c;}
.room-chip{display:inline-flex;align-items:center;gap:3px}.room-delete{height:30px;width:30px;border:0;border-radius:10px;background:#f3ddd5;color:#8d3428;font-size:22px;line-height:1;cursor:pointer}.room-delete:hover{background:#e8bcae;transform:scale(1.05)}
.chat-panel .chat-list{height:min(32vh,300px);min-height:0!important;max-height:min(32vh,300px);flex:0 1 auto;overflow-y:auto;overscroll-behavior:contain}.chat-list>.chat-empty,.chat-list>small:only-child{min-height:0!important;flex:0 0 auto}
.room-layout[data-room-game="draw"] #drawing-text{background:#fffdf6;color:#293b2e;line-height:1.5;font-family:inherit;border-radius:14px;}
.draw-tools{align-items:center}.draw-tools label{display:inline-flex;align-items:center;gap:8px}.draw-tools select{width:auto;min-height:40px;padding:6px 12px;border:1px solid #d8ddcf;border-radius:10px;background:#fffdf6;color:#293b2e}
.reveal-panel{overflow:hidden}.reveal-page{animation:reveal-in .48s cubic-bezier(.2,.85,.25,1) both}.reveal-page canvas{width:100%;height:auto;max-height:55vh;object-fit:contain}.reveal-time{font-variant-numeric:tabular-nums}@keyframes reveal-in{from{opacity:0;transform:translateY(16px) scale(.98)}to{opacity:1;transform:none}}
.score-ribbon{position:sticky;top:8px;z-index:5;display:flex;gap:8px;overflow-x:auto;padding:8px 2px;margin:0 0 14px;scrollbar-width:thin;backdrop-filter:blur(10px)}.score-chip{display:flex;align-items:center;gap:8px;flex:0 0 auto;padding:7px 11px;border:1px solid #dfe3d6;border-radius:999px;background:#fffdf8;box-shadow:0 5px 16px #26382c10}.score-chip strong{font-size:17px;color:#bc593a}.score-chip.score-pop{animation:score-pop .6s ease}.score-chip .avatar{width:25px;height:25px}@keyframes score-pop{50%{transform:translateY(-4px) scale(1.08)}}
.auto-advance{display:flex;align-items:center;gap:6px;justify-content:center}.auto-advance span{font-weight:800;font-variant-numeric:tabular-nums}.room-layout[data-room-game="cah"] .answer-hand .answer-card{display:flex;flex-direction:column;justify-content:space-between;gap:10px;text-align:left;min-width:0}.room-layout[data-room-game="cah"] .answer-hand button.answer-card{font:inherit;cursor:pointer}.room-layout[data-room-game="cah"] .answer-card textarea{min-height:90px;resize:vertical}
.gallery-hero{display:flex;justify-content:space-between;align-items:center;gap:28px;padding:clamp(24px,5vw,58px);border:1px solid #e0e4d8;border-radius:28px;background:linear-gradient(125deg,#f3e5c9,#e9f0e4 58%,#dce8e6);box-shadow:0 20px 50px #26382c13}.gallery-hero h1{font-size:clamp(34px,5vw,58px);line-height:1.04;letter-spacing:-.045em;margin:13px 0}.gallery-hero p{max-width:55ch;color:#627266}.gallery-total{display:grid;place-items:center;min-width:130px;min-height:130px;border-radius:50%;background:#fff9;color:#33503e;box-shadow:inset 0 0 0 1px #fff}.gallery-total strong{font-size:45px;line-height:1}.gallery-total span{font-size:12px}.gallery-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,290px),1fr));gap:20px;margin:28px 0}.gallery-card{overflow:hidden;border:1px solid #dfe3d6;border-radius:20px;background:#fffdf8;box-shadow:0 12px 30px #26382c10;transition:transform .2s,box-shadow .2s}.gallery-card:hover{transform:translateY(-4px);box-shadow:0 20px 40px #26382c1c}.gallery-canvas{background:#fff;padding:10px}.gallery-canvas canvas{display:block;width:100%;height:auto;aspect-ratio:4/3;border-radius:12px}.gallery-meta{padding:12px 16px 16px}.gallery-meta small{color:#69766c}.gallery-meta .avatar{width:26px;height:26px}
@media(max-width:700px){.gallery-hero{align-items:flex-start;padding:24px 20px}.gallery-total{min-width:82px;min-height:82px}.gallery-total strong{font-size:30px}.gallery-total span{max-width:65px;text-align:center;font-size:10px}.chat-panel .chat-list{height:min(30vh,240px);max-height:min(30vh,240px)}.room-heading .row{gap:6px}.score-ribbon{top:2px}}
@media(prefers-reduced-motion:reduce){.reveal-page,.score-chip.score-pop{animation:none}.gallery-card{transition:none}}
