/* The chooser keeps its own multicolour identity across all palettes. */
.header-right-actions { position: relative; }
.theme-picker { display: flex; flex: 0 0 auto; }
.theme-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid #70698b;
    border-radius: 999px;
    background: linear-gradient(120deg, #233b59, #49324c);
    color: #fff;
    box-shadow: inset 0 1px 0 #ffffff30, 0 3px 9px #26344926;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
}
.theme-trigger:hover, .theme-trigger[aria-expanded="true"] { background: #27344d; border-color: #b7a8d0; }
.theme-trigger:focus-visible { outline: 2px solid var(--theme-accent, #755000); outline-offset: 3px; }
.theme-trigger svg { flex: 0 0 16px; width: 16px; height: 16px; }
.theme-menu {
    position: absolute;
    z-index: var(--layer-dropdown, 30);
    top: calc(100% + 10px);
    right: 0;
    width: min(272px, calc(100vw - 32px));
    max-height: calc(100vh - 130px);
    max-height: calc(100dvh - 130px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 7px;
    border: 1px solid var(--theme-border, #d9ccaf);
    border-radius: 14px;
    color: var(--ink-strong);
    background: var(--surface-core, #fff);
    box-shadow: var(--shadow-floating);
}
.theme-menu[hidden] { display: none !important; }
.theme-choice {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 56px;
    margin: 0;
    padding: 9px 11px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: var(--ink-strong);
    background: transparent;
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    text-align: left;
    cursor: pointer;
}
.theme-choice:hover, .theme-choice[aria-checked="true"] { background: var(--theme-soft); }
.theme-choice:focus-visible { outline: 2px solid var(--theme-accent); outline-offset: -2px; }
.theme-choice-check { margin-left: auto; flex: 0 0 18px; color: var(--theme-accent); visibility: hidden; }
.theme-choice[aria-checked="true"] .theme-choice-check { visibility: visible; }
.theme-swatch { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 32px; border: 1px solid #00000015; border-radius: 7px; }
.theme-swatch span { display: block; width: 24px; height: 12px; border-radius: 4px; }
.theme-swatch-original-purple { background: #eee7f2; }
.theme-swatch-original-purple span { background: linear-gradient(#6f438a, #2d183b); }
.theme-swatch-gold-3d { background: #fff7e5; }
.theme-swatch-gold-3d span { background: linear-gradient(#ffe6a0, #cea244); border: 1px solid #b98b2f; box-shadow: 0 2px 0 #9c7027, 0 4px 5px #aa7e2b33; }
.theme-swatch-blue-minimal { background: #eef6ff; }
.theme-swatch-blue-minimal span { background: #1761b6; }
.theme-swatch-red-grand { background: #fff1ee; }
.theme-swatch-red-grand span { background: #9d2234; border: 1px solid #841c2b; }
.theme-menu-note { margin: 6px 11px 5px; color: var(--ink-muted); font-size: 11px; line-height: 1.5; }
.theme-domain-section { margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--theme-border); }
.theme-domain-title { margin: 0 11px 5px; color: var(--ink-muted); font-size: 11px; font-weight: 650; }
.theme-domain-link { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 11px; border-radius: 9px; color: var(--ink-strong); font-size: 13px; font-weight: 550; line-height: 1.5; text-decoration: none; }
.theme-domain-link span { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.theme-domain-link svg { flex: 0 0 16px; color: var(--theme-accent); }
.theme-domain-link:hover { color: var(--theme-accent); background: var(--theme-soft); }
.theme-domain-link:focus-visible { outline: 2px solid var(--theme-accent); outline-offset: -2px; background: var(--theme-soft); }
@media (max-width: 600px) {
    .theme-trigger { width: 34px; min-width: 34px; height: 34px; min-height: 34px; padding: 0; }
    .theme-trigger::after { content: ""; position: absolute; inset: -5px; border-radius: inherit; }
    .theme-trigger-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .site-header .header-right-actions { gap: 6px !important; }
    .site-header .language-trigger { padding-inline: 8px; gap: 4px; }
}
