.theme-picker{position:relative;flex-shrink:0}.theme-toggle{border:1px solid var(--line);border-radius:5px;background:#fffefa;color:var(--ink);height:32px;padding:0 10px;font-size:12px;white-space:nowrap}.theme-toggle:hover{border-color:var(--ink)}.theme-options{position:absolute;inset-inline-end:0;top:40px;width:258px;padding:8px;background:#fffefa;border:1px solid var(--line);border-radius:10px;box-shadow:0 12px 36px #243e3526;z-index:100}.theme-option{display:flex;align-items:center;gap:10px;padding:10px;margin:0;border-radius:6px;cursor:pointer}.theme-option:hover{background:#f0f3ed}.theme-option input{width:15px;height:15px;margin:0;accent-color:var(--ink);flex-shrink:0}.theme-copy strong,.theme-copy small{display:block}.theme-copy strong{font-size:13px;color:var(--ink)}.theme-copy small{font-size:10px;color:#677269;margin-top:4px}.theme-swatch{width:30px;height:32px;border-radius:5px;flex-shrink:0;border:1px solid #0001}.theme-swatch.classic{background:linear-gradient(135deg,#f7f5ee 50%,#243e35 50%,#ac5140 85%)}.theme-swatch.playful{background:linear-gradient(135deg,#fff2cd 50%,#6755ad 50%,#f49580 85%)}.theme-swatch.minimal{background:linear-gradient(135deg,#f3f6fa 50%,#285b88 50%,#a9d7e8 85%)}
html[data-theme=playful]{--bg:#fff8ed;--ink:#4e3b7e;--muted:#786b81;--line:#e9dced;--red:#b54c50;--surface:#fffdf9;--soft:#f4eafd;--accent:#6b4ca0;--selected:#eee3fc}html[data-theme=minimal]{--bg:#f3f6fa;--ink:#234a6d;--muted:#64788a;--line:#dce5ed;--red:#ad4b52;--surface:#fff;--soft:#eaf2f8;--accent:#32658d;--selected:#e1eef9}
html[data-theme=playful] body{background:radial-gradient(ellipse at 0 0,#f8e4f4 0,transparent 44%),radial-gradient(ellipse at 100% 10%,#fff0c9 0,transparent 40%),var(--bg)}html[data-theme=playful] .panel,html[data-theme=playful] .card{border-radius:16px;box-shadow:0 4px 14px #694b8510}html[data-theme=playful] .brand b{border-radius:12px;transform:rotate(-4deg)}html[data-theme=playful] header>nav a{border-radius:18px}html[data-theme=playful] .primary{border-radius:12px;background:linear-gradient(100deg,#684599,#8b518f)}html[data-theme=playful] .radio-pill span,html[data-theme=playful] .category{border-radius:9px}
html[data-theme=minimal] .panel,html[data-theme=minimal] .card{border-radius:6px;box-shadow:0 3px 12px #26476208}html[data-theme=minimal] header{background:#ffffffb3}html[data-theme=minimal] .primary{background:#285b88;border-radius:5px}
html[data-theme=playful] .panel,html[data-theme=playful] .card,html[data-theme=minimal] .panel,html[data-theme=minimal] .card{background:var(--surface)}
html[data-theme]:not([data-theme=classic]) .form-section h4{background:var(--soft);color:var(--ink);border-color:var(--line);border-inline-start-color:var(--accent)}html[data-theme]:not([data-theme=classic]) .form-section h4>span{background:var(--accent)}html[data-theme]:not([data-theme=classic]) .field-title,html[data-theme]:not([data-theme=classic]) .studio-layout label:not(.radio-pill):not(.image-drop){color:var(--ink)}html[data-theme]:not([data-theme=classic]) header>nav a{color:var(--ink)}html[data-theme]:not([data-theme=classic]) header>nav a.active{background:var(--accent);border-color:var(--accent);color:#fff}html[data-theme]:not([data-theme=classic]) header>nav a:hover:not(.active){background:var(--soft)}html[data-theme]:not([data-theme=classic]) .radio-pill input:checked+span,html[data-theme]:not([data-theme=classic]) .category.selected,html[data-theme]:not([data-theme=classic]) .surname-filters button.active,html[data-theme]:not([data-theme=classic]) .poem-source-tabs button.active{background:var(--selected);color:var(--ink);border-color:var(--accent);box-shadow:none}html[data-theme]:not([data-theme=classic]) .surname-intro,html[data-theme]:not([data-theme=classic]) #analysis,html[data-theme]:not([data-theme=classic]) .image-drop{background:var(--soft);border-color:var(--line)}html[data-theme]:not([data-theme=classic]) .theme-toggle,html[data-theme]:not([data-theme=classic]) .theme-options{background:var(--surface)}html[data-theme]:not([data-theme=classic]) .theme-option:hover{background:var(--soft)}
@media(max-width:760px){.header-actions{gap:5px;flex-wrap:wrap;justify-content:flex-end}.header-actions .language-control select{width:92px;max-width:92px}.theme-toggle{font-size:11px;padding:0 7px}.theme-options{width:240px}header{column-gap:8px}.brand{gap:7px;font-size:20px}.brand small{letter-spacing:1px}}@media(max-width:360px){header{padding-inline:10px}.header-actions .language-control select{width:80px}.brand small{display:none}}
/* Candlelit Chinese palette: lacquer red, ink black and restrained gold. */
html[data-theme=classic]{color-scheme:dark;--bg:#120d0e;--ink:#f0dfc4;--muted:#b6a295;--line:#493034;--red:#df9b88}
html[data-theme=classic] body{background:radial-gradient(ellipse at 50% 0,#48171e 0,transparent 55%),#120d0e;color:var(--ink)}
html[data-theme=classic] header{background:#170e10ed;border-color:#694138}
html[data-theme=classic] .brand{color:#ecd5ad}html[data-theme=classic] .brand b{background:#701f2b;color:#f2d8a7;border:1px solid #b78355;box-shadow:inset 0 0 0 3px #701f2b,inset 0 0 0 4px #b7835566}
html[data-theme=classic] header>nav a{color:#cbb8a3}html[data-theme=classic] header>nav a:hover{background:#39171e;color:#ffe7c2}html[data-theme=classic] header>nav a.active{background:#772330;border-color:#a5574d;color:#fff0d4;box-shadow:0 2px 12px #0004}
html[data-theme=classic] .panel,html[data-theme=classic] .card,html[data-theme=classic] dialog{background:#201416;border-color:#4b3033;box-shadow:0 6px 24px #0002}
html[data-theme=classic] .form-section h4{background:linear-gradient(90deg,#491b24,#28161a);color:#f3ddba;border-color:#684037;border-inline-start-color:#bb8d54}html[data-theme=classic] .form-section h4>span{background:#7c2a35;color:#ffe8ba;border:1px solid #a26b4b}
html[data-theme=classic] .field-title,html[data-theme=classic] .studio-layout label:not(.radio-pill):not(.image-drop){color:#e7cfa9}html[data-theme=classic] .studio-layout .field-title::before{background:#c39b63}
html[data-theme=classic] input,html[data-theme=classic] select,html[data-theme=classic] textarea,html[data-theme=classic] .header-actions .language-control select{background:#170f11;color:#ecdcc4;border-color:#55383b}html[data-theme=classic] input::placeholder,html[data-theme=classic] textarea::placeholder{color:#aa9389}html[data-theme=classic] input:focus,html[data-theme=classic] select:focus,html[data-theme=classic] textarea:focus{border-color:#ba8e5d;box-shadow:0 0 0 2px #ba8e5d22}
html[data-theme=classic] .radio-pill span,html[data-theme=classic] .category,html[data-theme=classic] .surname-filters button,html[data-theme=classic] .poem-source-tabs button,html[data-theme=classic] .prompt-examples button{background:#26191c;color:#cfbca9;border-color:#53373b}
html[data-theme=classic] .radio-pill input:checked+span,html[data-theme=classic] .category.selected,html[data-theme=classic] .surname-filters button.active,html[data-theme=classic] .poem-source-tabs button.active{background:#64232e;color:#ffe9c3;border-color:#bd8d62;box-shadow:inset 0 0 0 1px #bd8d6222}
html[data-theme=classic] .primary{background:linear-gradient(100deg,#772130,#9a3540);color:#fff0d4;border:1px solid #b06c53;box-shadow:0 3px 12px #0003}html[data-theme=classic] .primary:hover{background:#a23c46}
html[data-theme=classic] .surname-intro,html[data-theme=classic] #analysis,html[data-theme=classic] .image-drop{background:#2d1b1d;border-color:#715044;color:#dfc9b0}html[data-theme=classic] .surname-intro h3,html[data-theme=classic] .surname-intro h4,html[data-theme=classic] .surname-intro p{color:#d6bfa9}html[data-theme=classic] .hint,html[data-theme=classic] em{color:#b6a095}html[data-theme=classic] .badge{border-color:#755047;color:#d6b68a}html[data-theme=classic] .card p{color:#c5b1a1}html[data-theme=classic] .poems{background:linear-gradient(150deg,#2d171d,#1b1214)}html[data-theme=classic] .theme-toggle,html[data-theme=classic] .theme-options{background:#241518;color:#ecd7b9;border-color:#715044}html[data-theme=classic] .theme-option:hover{background:#3d1c24}html[data-theme=classic] .theme-copy small{color:#bba591}html[data-theme=classic] .theme-swatch.classic{background:linear-gradient(135deg,#150e10 48%,#842838 48%,#bd925c 90%)}html[data-theme=classic] .theme-copy strong{color:#ecd7b9}html[data-theme=classic] .actions button,html[data-theme=classic] .surname-intro a{color:#d2ad80}html[data-theme=classic] .quiet{color:#e5cfae}html[data-theme=classic] .pagination button{background:#28181c;color:#e5cfae;border-color:#604044}
