body.theme-open{overflow:hidden}
:focus-visible{outline-color:var(--blue)}
.theme-trigger{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:9px 10px;color:var(--blue);background:var(--primary-soft);border:1px solid var(--line);border-radius:8px;font-size:13px;font-weight:650;white-space:nowrap;flex-shrink:0}
.theme-trigger:hover,.theme-trigger:focus-visible{background:var(--blue);border-color:var(--blue);color:var(--on-primary);box-shadow:0 4px 12px color-mix(in srgb,var(--blue) 16%,transparent)}
.theme-trigger svg{width:19px;height:19px}
.theme-palette{width:min(560px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 32px);padding:0;margin:auto;border:1px solid var(--line);border-radius:18px;background:var(--white);color:var(--ink);box-shadow:0 24px 100px #0e243b44;overflow:auto;overscroll-behavior:contain}
.theme-palette::backdrop{background:#0c2038a6;backdrop-filter:blur(5px)}
.theme-palette[open]{animation:theme-arrive .2s ease-out}
.theme-panel-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:25px 26px 20px;border-bottom:1px solid var(--line);background:var(--mist)}
.theme-kicker{display:block;font-size:10px;font-weight:700;letter-spacing:.17em;color:var(--blue);margin-bottom:7px}
.theme-panel-header h2{font-size:24px;line-height:1.3}
.theme-panel-header p{font-size:13px;line-height:1.7;margin-top:8px;color:var(--muted)}
.theme-close{display:grid;place-items:center;flex-shrink:0;width:40px;height:40px;padding:10px;border:1px solid var(--line);border-radius:10px;background:var(--white);color:var(--ink)}
.theme-close svg{width:20px;height:20px}
.theme-close:hover,.theme-close:focus-visible{background:var(--blue);color:var(--on-primary);border-color:var(--blue)}
.theme-panel-body{padding:22px 26px}
.theme-palette fieldset{padding:0;margin:0;border:0;min-width:0}
.theme-palette legend{padding:0;margin-bottom:14px;font-size:14px;font-weight:700}
.theme-preset-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.theme-preset{position:relative;display:flex;flex-direction:column;align-items:flex-start;min-width:0;padding:14px;border:1px solid var(--line);border-radius:10px;background:var(--white);color:var(--ink);text-align:left}
.theme-preset:hover,.theme-preset:focus-visible{background:var(--primary-soft);border-color:var(--blue);color:var(--blue);transform:translateY(-2px)}
.theme-preset[aria-pressed=true]{border-color:var(--blue);background:var(--primary-soft);box-shadow:inset 0 0 0 1px var(--blue)}
.theme-preset-swatches{display:flex;gap:5px;margin-bottom:10px}
.theme-preset-swatches i{display:block;width:28px;height:20px;border-radius:4px;border:1px solid #0000000b}
.theme-preset strong{font-size:13px;line-height:1.6;font-weight:650}
.theme-preset small{display:block;font-size:11px;line-height:1.6;color:var(--muted);margin-top:3px}
.theme-preset-check{position:absolute;top:11px;right:11px;display:none;width:20px;height:20px;line-height:20px;text-align:center;border-radius:50%;font-size:12px;background:var(--blue);color:var(--on-primary)}
.theme-preset[aria-pressed=true] .theme-preset-check{display:block}
.theme-palette .theme-custom{margin-top:23px;padding-top:20px;border-top:1px solid var(--line)}
.theme-custom legend{float:left;width:100%;margin-bottom:5px}
.theme-helper{clear:both;font-size:12px;line-height:1.7;color:var(--muted);margin-bottom:14px}
.theme-color-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.theme-color-fields label{display:flex;flex-direction:column;align-items:stretch;gap:6px;min-width:0;font-size:12px;font-weight:600;color:var(--ink)}
.theme-color-fields input[type=color]{appearance:none;-webkit-appearance:none;display:block;width:100%;height:42px;min-height:42px;margin:0;padding:4px;border:1px solid var(--line);border-radius:7px;background:var(--white);cursor:pointer}
.theme-color-fields input[type=color]::-webkit-color-swatch-wrapper{padding:0}
.theme-color-fields input[type=color]::-webkit-color-swatch{border:0;border-radius:4px}
.theme-color-fields input[type=color]::-moz-color-swatch{border:0;border-radius:4px}
.theme-color-fields input[type=color]:hover,.theme-color-fields input[type=color]:focus-visible{background:var(--primary-soft);border-color:var(--blue);box-shadow:0 0 0 2px var(--primary-soft)}
.theme-color-fields output{font-family:Consolas,monospace;font-size:11px;font-weight:400;color:var(--muted);letter-spacing:.03em}
.theme-live-sample{display:flex;align-items:center;gap:12px;padding:16px;margin-top:20px;border-radius:10px;background:var(--navy);color:var(--on-navy)}
.theme-sample-mark{display:grid;place-items:center;flex-shrink:0;width:42px;height:42px;border:1px solid color-mix(in srgb,var(--on-navy) 35%,transparent);border-radius:9px;font:700 19px/1 Arial,sans-serif;letter-spacing:-.08em}
.theme-live-sample strong{display:block;font-size:13px;line-height:1.7;font-weight:600}
.theme-live-sample div>span{display:block;font-size:10px;line-height:1.7;opacity:.8;margin-top:3px}
.theme-sample-dot{flex-shrink:0;width:10px;height:10px;margin-left:auto;background:var(--accent);border:1px solid color-mix(in srgb,var(--on-navy) 35%,transparent);border-radius:50%}
.theme-panel-footer{padding:17px 26px 22px;border-top:1px solid var(--line);background:var(--mist)}
.theme-status{min-height:21px;margin:0 0 13px;font-size:11px;line-height:1.8;color:var(--muted)}
.theme-footer-actions{display:flex;align-items:center;justify-content:space-between;gap:14px}
.theme-reset,.theme-done{min-height:42px;padding:10px 18px;border-radius:8px;font-size:13px;font-weight:600;line-height:1.5}
.theme-reset{background:var(--white);border:1px solid var(--line);color:var(--blue)}
.theme-reset:hover,.theme-reset:focus-visible{background:var(--primary-soft);border-color:var(--blue);color:var(--hover)}
.theme-done{min-width:104px;background:var(--blue);border:1px solid var(--blue);color:var(--on-primary)}
.theme-done:hover,.theme-done:focus-visible{background:var(--hover);border-color:var(--hover);color:var(--on-hover,var(--on-primary));transform:translateY(-1px)}
:root[data-tone="dark"] .theme-palette{background:var(--surface);box-shadow:0 24px 100px #0008}
:root[data-tone="dark"] .theme-palette::backdrop{background:#101820b8}
:root[data-tone="dark"] .theme-preset-swatches i{border-color:#ffffff24}
@keyframes theme-arrive{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:1240px){.theme-trigger{padding-inline:8px}.theme-trigger span{display:none}}
@media(max-width:599px){.theme-trigger{width:40px;padding:9px}.theme-trigger span{display:none}.theme-palette{width:calc(100vw - 24px);max-height:calc(100dvh - 24px);border-radius:14px}.theme-panel-header{padding:20px 18px 16px}.theme-panel-header h2{font-size:22px}.theme-panel-body{padding:18px}.theme-preset-grid{gap:8px}.theme-preset{padding:12px 10px}.theme-preset strong{font-size:12px}.theme-preset small{font-size:10px}.theme-preset-swatches i{width:22px;height:18px}.theme-panel-footer{padding:15px 18px 18px}.theme-color-fields{gap:10px}.theme-live-sample{gap:10px;padding:13px}.theme-live-sample strong{font-size:12px}.theme-sample-mark{width:35px;height:35px;font-size:17px}}
@media(prefers-reduced-motion:reduce){.theme-palette[open]{animation:none}.theme-palette *{transition:none!important}}
.theme-live-sample .theme-sample-mark{width:62px;height:32px;border:0;border-radius:0}
.theme-sample-mark img{display:block;width:100%;height:100%;object-fit:contain}
