:root{color-scheme:light;--bg:#fff;--fg:#171717;--muted:#626262;--line:#ddd;--invert:0}
@media(prefers-color-scheme:dark){:root:not([data-theme]){color-scheme:dark;--bg:#111;--fg:#f5f5f5;--muted:#aaa;--line:#444;--invert:1}}
:root[data-theme=dark]{color-scheme:dark;--bg:#111;--fg:#f5f5f5;--muted:#aaa;--line:#444;--invert:1}
*{box-sizing:border-box}body{margin:0;min-height:100vh;min-height:100svh;display:grid;grid-template-rows:auto 1fr auto;background:var(--bg);color:var(--fg);font-family:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;text-align:center}header{display:flex;justify-content:flex-end;padding:1.25rem}button{width:44px;height:44px;border:1px solid var(--line);border-radius:50%;background:transparent;color:var(--fg);font-size:25px;cursor:pointer;display:grid;place-items:center}button:focus-visible{outline:2px solid var(--fg);outline-offset:4px}.sun{display:none}:root[data-theme=dark] .sun{display:inline}:root[data-theme=dark] .moon{display:none}@media(prefers-color-scheme:dark){:root:not([data-theme]) .sun{display:inline}:root:not([data-theme]) .moon{display:none}}main{align-self:center;padding:1rem 1.5rem 2rem}.king{display:block;width:clamp(150px,32vw,270px);height:auto;margin:0 auto 1.25rem;filter:invert(var(--invert));object-fit:contain}h1{font-size:clamp(2.3rem,8vw,4.8rem);letter-spacing:-.065em;line-height:1.05;margin:0;font-weight:800}.tagline{font-size:clamp(1.05rem,3vw,1.4rem);margin:1rem 0 .4rem}.status{color:var(--muted);font-size:.95rem;margin:.5rem 0}.phrase-slot{min-height:5rem;display:grid;place-items:center;margin-top:1.5rem}#phrase{color:var(--muted);font-size:.9rem;font-style:italic;max-width:34rem;transition:opacity .35s ease;margin:0}#phrase.fading{opacity:0}footer{padding:1rem 1rem 1.75rem;color:var(--muted);font-size:.75rem;line-height:1.5}footer p{margin:.3rem 0}.credit{color:var(--fg);font-weight:600}@media(prefers-reduced-motion:reduce){#phrase{transition:none}} 

/* Compact resurrection layout */
body{display:block;min-height:100svh}
header{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;gap:.5rem;padding:.8rem 1rem;max-width:960px;margin:auto}
header .phrase-slot{grid-column:2;min-height:44px;margin:0;padding:.25rem 0}
header button{grid-column:3;grid-row:1}
#phrase{font-size:clamp(.78rem,2.5vw,1rem)}
main{padding:.65rem 1rem .5rem}
.king{width:clamp(145px,30vw,215px);margin:0 auto .35rem}
h1{font-size:clamp(2.3rem,8vw,4rem)}
.tagline{margin:.6rem 0 .25rem}
.status{margin:.3rem 0}
footer{padding:.65rem 1rem 1rem}
footer p{margin:.2rem 0}
@media(max-width:420px){header{grid-template-columns:36px minmax(0,1fr) 36px;padding:.6rem .6rem}header button{width:36px;height:36px;font-size:21px}}

/* Royal lighting department */
header{grid-template-columns:minmax(0,1fr) auto;max-width:960px;gap:1rem}
header .phrase-slot{grid-column:1;grid-row:1}
.switch-panel{grid-column:2;grid-row:1;display:flex;align-items:center;gap:6px}
.bear-message{width:clamp(95px,15vw,160px);height:auto;filter:invert(var(--invert))}
header #theme-toggle{width:52px;height:76px;border:0;border-radius:6px;padding:0;background:transparent;display:grid;place-items:center}
#theme-toggle img{width:100%;height:100%;object-fit:contain;filter:invert(var(--invert))}
#theme-toggle .sun{display:none}
:root[data-theme=dark] #theme-toggle .sun{display:block}
:root[data-theme=dark] #theme-toggle .moon{display:none}
@media(prefers-color-scheme:dark){:root:not([data-theme]) #theme-toggle .sun{display:block}:root:not([data-theme]) #theme-toggle .moon{display:none}}
@media(max-width:540px){header{grid-template-columns:1fr;gap:.2rem;padding:.5rem .75rem}header .phrase-slot{grid-column:1;grid-row:2;min-height:36px}.switch-panel{grid-column:1;grid-row:1;justify-self:end}.bear-message{width:105px}header #theme-toggle{width:38px;height:55px}}

/* Independent header rows; compact spacing */
header{display:flex;flex-direction:column;align-items:stretch;gap:.25rem;max-width:960px;padding:.5rem 1rem}header .phrase-slot{order:2;min-height:2.5rem;width:100%;padding:0 .5rem} .switch-panel{order:1;align-self:flex-end;gap:4px}.bear-message{
    width:110px;
    transform:translateY(30px);
} #theme-toggle{width:35px;height:50px}main{padding:.25rem 1rem .4rem}.king{width:clamp(125px,25vw,180px);margin:0 auto .3rem}footer{padding:.4rem 1rem 1rem}
/* Mobile polar bear containment */
@media (max-width: 600px) {
    .bear-message {
        transform: none;
        margin-top: 30px;
    }
}

/* The old fart - Paradox footer */
.paradox-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 60px auto 0;
    padding: 15px 10px;
    max-width: 480px;
    border-top: 1px solid var(--line);
}

.paradox-face {
    width: 75px;
    height: 75px;
    object-fit: contain;
    flex-shrink: 0;
    filter: invert(var(--invert));
}

.paradox-text {
    text-align: left;
}

.paradox-text p {
    font-size: 0.65rem;
    line-height: 1.3;
    margin: 0;
}

.paradox-text .credit {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 4px;
}

/* Mobile old fart adjustments */
@media (max-width: 600px) {
    .paradox-footer {
        margin-top: 40px;
    }

    .paradox-face {
        width: 60px;
        height: 60px;
    }

    .paradox-text p {
        font-size: 0.65rem;
    }

    .paradox-text .credit {
        font-size: 0.8rem;
    }
}