/* ---------- Theme Variables ---------- */
:root {
    --rt-bg: #fafaf8;
    --rt-bg-soft: #ffffff;
    --rt-text: #16161a;
    --rt-text-soft: #3f3f46;
    --rt-muted: #6b7280;
    --rt-faint: #a1a1aa;
    --rt-line: rgba(0, 0, 0, 0.08);
    --rt-line-strong: rgba(0, 0, 0, 0.14);
    --rt-hover-bg: rgba(0, 0, 0, 0.04);
    --rt-accent: #ea580c;
    --rt-card: #ffffff;
    --rt-card-hover: #ffffff;
    --rt-nav-active: #16161a;
    --rt-blockquote: #3f3f46;

    /* Lattice accent — shared brand color for headers, links, tags */
    --lt-accent: #f97316;
    --lt-accent-strong: #c2410c;
    --lt-accent-soft: rgba(249, 115, 22, 0.12);
    --lt-accent-border: rgba(249, 115, 22, 0.28);
    --lt-on-accent: #ffffff;
    --lt-tag-text: #c2410c;
    --lt-shadow: 0 1px 2px rgba(20, 20, 30, 0.04), 0 8px 24px rgba(20, 20, 30, 0.05);
    --lt-shadow-lift: 0 2px 4px rgba(20, 20, 30, 0.05), 0 18px 40px rgba(20, 20, 30, 0.1);

    /* Dynamic island theme */
    --sc-bg: #000000;
    --sc-border: rgba(255, 255, 255, 0.12);
    --sc-accent-glow: rgba(0, 0, 0, 0.15);
    --sc-accent: #ff9f43;
    --sc-accent-grad: linear-gradient(90deg, #ff9f43, #ff5500);
    --sc-muted: #9ca3af;
    --sc-w-collapsed: 120px;
    --sc-h-collapsed: 40px;
    --sc-w-compact: 185px;
    --sc-h-compact: 40px;
    --sc-w-expanded: 370px;
    --sc-h-expanded: 175px;
}

html[data-theme="dark"] {
    --rt-bg: #0e0e11;
    --rt-bg-soft: #17171b;
    --rt-text: #f1f1f4;
    --rt-text-soft: #d4d4dc;
    --rt-muted: #a1a1aa;
    --rt-faint: #6c6c78;
    --rt-line: rgba(255, 255, 255, 0.10);
    --rt-line-strong: rgba(255, 255, 255, 0.18);
    --rt-hover-bg: rgba(255, 255, 255, 0.06);
    --rt-accent: #fb923c;
    --rt-card: #17171b;
    --rt-card-hover: #1d1d23;
    --rt-nav-active: #f1f1f4;
    --rt-blockquote: #d4d4dc;

    --lt-accent: #fb923c;
    --lt-accent-strong: #fdba74;
    --lt-accent-soft: rgba(251, 146, 60, 0.16);
    --lt-accent-border: rgba(251, 146, 60, 0.3);
    --lt-tag-text: #fdba74;
    --lt-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --lt-shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.35), 0 18px 44px rgba(0, 0, 0, 0.45);

    /* Dynamic island in dark mode (no colored glow — kept neutral) */
    --sc-bg: #0a0a0a;
    --sc-accent-glow: rgba(0, 0, 0, 0.55);
}

/* ---------- Global Theme Application ---------- */
body {
    background-color: var(--rt-bg);
    color: var(--rt-text);
    transition: background-color 0.35s ease, color 0.35s ease;
}

h1, h2, h3, h4 {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    letter-spacing: -0.02em;
}

::selection {
    background: var(--lt-accent-soft);
    color: var(--rt-text);
}

/* ---------- Theme Switch ---------- */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 26px;
}

.switch #input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #2196f3;
    -webkit-transition: 0.4s;
    transition: 0.4s;
    z-index: 0;
    overflow: hidden;
}

.sun-moon {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: yellow;
    -webkit-transition: 0.4s;
    transition: 0.4s;
}

#input:checked + .slider {
    background-color: black;
}

#input:focus + .slider {
    box-shadow: 0 0 1px #2196f3;
}

#input:checked + .slider .sun-moon {
    -webkit-transform: translateX(20px);
    -ms-transform: translateX(20px);
    transform: translateX(20px);
    background-color: white;
    -webkit-animation: rotate-center 0.6s ease-in-out both;
    animation: rotate-center 0.6s ease-in-out both;
}

.moon-dot {
    opacity: 0;
    transition: 0.4s;
    fill: gray;
}

#input:checked + .slider .sun-moon .moon-dot {
    opacity: 1;
}

.slider.round {
    border-radius: 34px;
}

.slider.round .sun-moon {
    border-radius: 50%;
}

#moon-dot-1 {
    left: 10px;
    top: 3px;
    position: absolute;
    width: 6px;
    height: 6px;
    z-index: 4;
}

#moon-dot-2 {
    left: 2px;
    top: 10px;
    position: absolute;
    width: 10px;
    height: 10px;
    z-index: 4;
}

#moon-dot-3 {
    left: 16px;
    top: 18px;
    position: absolute;
    width: 3px;
    height: 3px;
    z-index: 4;
}

#light-ray-1 {
    left: -8px;
    top: -8px;
    position: absolute;
    width: 43px;
    height: 43px;
    z-index: -1;
    fill: white;
    opacity: 10%;
}

#light-ray-2 {
    left: -50%;
    top: -50%;
    position: absolute;
    width: 55px;
    height: 55px;
    z-index: -1;
    fill: white;
    opacity: 10%;
}

#light-ray-3 {
    left: -18px;
    top: -18px;
    position: absolute;
    width: 60px;
    height: 60px;
    z-index: -1;
    fill: white;
    opacity: 10%;
}

.cloud-light {
    position: absolute;
    fill: #eee;
    animation-name: cloud-move;
    animation-duration: 6s;
    animation-iteration-count: infinite;
}

.cloud-dark {
    position: absolute;
    fill: #ccc;
    animation-name: cloud-move;
    animation-duration: 6s;
    animation-iteration-count: infinite;
    animation-delay: 1s;
}

#cloud-1 { left: 30px; top: 15px; width: 40px; }
#cloud-2 { left: 44px; top: 10px; width: 20px; }
#cloud-3 { left: 18px; top: 24px; width: 30px; }
#cloud-4 { left: 36px; top: 18px; width: 40px; }
#cloud-5 { left: 48px; top: 14px; width: 20px; }
#cloud-6 { left: 22px; top: 26px; width: 30px; }

@keyframes cloud-move {
    0% { transform: translateX(0px); }
    40% { transform: translateX(4px); }
    80% { transform: translateX(-4px); }
    100% { transform: translateX(0px); }
}

.stars {
    transform: translateY(-32px);
    opacity: 0;
    transition: 0.4s;
}

.star {
    fill: white;
    position: absolute;
    -webkit-transition: 0.4s;
    transition: 0.4s;
    animation-name: star-twinkle;
    animation-duration: 2s;
    animation-iteration-count: infinite;
}

#input:checked + .slider .stars {
    -webkit-transform: translateY(0);
    -ms-transform: translateY(0);
    transform: translateY(0);
    opacity: 1;
}

#star-1 { width: 20px; top: 2px; left: 3px; animation-delay: 0.3s; }
#star-2 { width: 6px; top: 16px; left: 3px; }
#star-3 { width: 12px; top: 20px; left: 10px; animation-delay: 0.6s; }
#star-4 { width: 18px; top: 0px; left: 18px; animation-delay: 1.3s; }

@keyframes star-twinkle {
    0% { transform: scale(1); }
    40% { transform: scale(1.2); }
    80% { transform: scale(0.8); }
    100% { transform: scale(1); }
}

@keyframes rotate-center {
    0% { transform: translateX(20px) rotate(0); }
    100% { transform: translateX(20px) rotate(360deg); }
}

/* ============================================================
   SHARED SITE HEADER / FOOTER (injected by common.js on every page)
   ============================================================ */
.lt-nav,
.lt-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid var(--rt-line);
    transition: background-color 0.25s ease, border-color 0.25s ease;
    animation: rt-nav-in 0.6s cubic-bezier(0.22, 0.68, 0.3, 1) both;
}
@supports ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
    .lt-nav,
    .lt-topbar {
        background: color-mix(in srgb, var(--rt-bg) 80%, transparent);
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
    }
}
.lt-nav {
    background: var(--rt-bg);
}
.lt-topbar {
    background: var(--rt-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px max(20px, calc((100% - 1180px) / 2 + 20px));
}
@keyframes rt-nav-in {
    from { opacity: 0; transform: translateY(-14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.lt-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}
.lt-logo-word {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--rt-text);
    white-space: nowrap;
    transition: color 0.2s ease, letter-spacing 0.25s ease;
}
.lt-logo:hover .lt-logo-word { color: var(--lt-accent); letter-spacing: -0.015em; }
@media (max-width: 560px) {
    .lt-logo-word { display: none; }
}

.lt-nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--rt-line);
    border-radius: 999px;
    background: var(--rt-bg-soft);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}
.lt-nav-link {
    position: relative;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--rt-muted);
    padding: 7px 16px;
    border-radius: 999px;
    transition: color 0.2s ease, background-color 0.2s ease;
}
.lt-nav-link:hover { color: var(--rt-text); background: var(--rt-hover-bg); }
.lt-nav-link.active {
    color: var(--lt-on-accent);
    background: linear-gradient(135deg, var(--lt-accent), var(--lt-accent-strong));
}
.lt-ctrls {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px;
    border: 1px solid var(--rt-line);
    border-radius: 999px;
    background: var(--rt-bg-soft);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}
.lt-ctrls .lt-icon-btn {
    width: 44px;
    height: 34px;
    border: 0;
    background: transparent;
}
.lt-ctrls .lt-icon-btn:hover {
    background: var(--rt-hover-bg);
    color: var(--rt-text);
    border-color: transparent;
}
#rt-search-toggle:focus-visible {
    outline: none;
    box-shadow: none;
    background: var(--rt-hover-bg);
}

.lt-back-btn {
    width: 38px;
    height: 38px;
}
.lt-back-btn i { font-size: 13px; }

.lt-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: var(--rt-muted);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
}
.lt-icon-btn:hover {
    background: var(--rt-hover-bg);
    color: var(--rt-text);
    border-color: var(--rt-line);
}

/* Keep the pill nav + controls comfortable on narrow screens */
@media (max-width: 640px) {
    .lt-nav-links { gap: 2px; }
    .lt-nav-link { padding: 6px 10px; font-size: 12.5px; }
    .lt-ctrls { gap: 0; }
    .lt-ctrls .lt-icon-btn { width: 38px; height: 31px; }
}

/* ---------- Shared tag text (base; index.css refines on the home page) ---------- */
.lt-tag {
    display: inline;
    padding: 0;
    background: none;
    border: 0;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--rt-faint);
    white-space: nowrap;
}

/* ---------- Spotlight Search ---------- */
.rt-spotlight {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
}
.rt-spotlight.is-open { display: block; }
.rt-spotlight-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 14, 0.5);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    animation: rt-fade-in 0.2s ease both;
}
.rt-spotlight-panel {
    position: relative;
    margin: 12vh auto 0;
    width: min(640px, calc(100% - 32px));
    max-height: 68vh;
    display: flex;
    flex-direction: column;
    background: var(--rt-bg-soft);
    border: 1px solid var(--rt-line);
    border-radius: 20px;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
    overflow: hidden;
    animation: rt-spot-in 0.25s cubic-bezier(0.22, 0.68, 0.3, 1) both;
}
@keyframes rt-spot-in {
    from { opacity: 0; transform: translateY(-16px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes rt-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.rt-spotlight-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--rt-line);
}
.rt-spotlight-icon { font-size: 15px; color: var(--rt-faint); flex-shrink: 0; }
.rt-spotlight-input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 17px;
    font-family: inherit;
    color: var(--rt-text);
    -webkit-appearance: none;
    appearance: none;
}
.rt-spotlight-input:focus,
.rt-spotlight-input:focus-visible {
    outline: none;
    box-shadow: none;
    border: none;
}
.rt-spotlight-input::placeholder { color: var(--rt-faint); }
.rt-spotlight-input-row:focus-within {
    outline: none;
    box-shadow: none;
}
.rt-spotlight-esc {
    flex-shrink: 0;
    font-size: 11px;
    font-family: inherit;
    font-weight: 600;
    color: var(--rt-muted);
    border: 1px solid var(--rt-line);
    border-radius: 6px;
    padding: 3px 7px;
    background: var(--rt-hover-bg);
}
.rt-spotlight-hint {
    padding: 26px 18px;
    text-align: center;
    font-size: 13px;
    color: var(--rt-faint);
}
.rt-spotlight-results {
    overflow-y: auto;
    padding: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--rt-line-strong) transparent;
    scrollbar-gutter: stable;
}
.rt-spotlight-results::-webkit-scrollbar {
    width: 10px;
}
.rt-spotlight-results::-webkit-scrollbar-track {
    background: transparent;
}
.rt-spotlight-results::-webkit-scrollbar-thumb {
    background: var(--rt-line-strong);
    border-radius: 999px;
    border: 3px solid transparent;
    background-clip: padding-box;
}
.rt-spotlight-results::-webkit-scrollbar-thumb:hover {
    background: var(--lt-accent);
    background-clip: padding-box;
    border: 3px solid transparent;
}
.rt-spotlight-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 12px;
    border-radius: 14px;
    text-decoration: none;
    transition: background-color 0.12s ease;
    scroll-margin: 6px;
}
.rt-spotlight-item.active { background: var(--rt-hover-bg); }
.rt-spotlight-item-thumb {
    width: 52px;
    height: 44px;
    border-radius: 10px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    background-color: var(--rt-line);
}
.rt-spotlight-item-main { flex: 1; min-width: 0; }
.rt-spotlight-item-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--rt-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rt-spotlight-item-desc {
    font-size: 12.5px;
    color: var(--rt-muted);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rt-spotlight-item-meta {
    display: flex;
    gap: 12px;
    margin-top: 5px;
    font-size: 11.5px;
    color: var(--rt-faint);
}
.rt-spotlight-item-tags {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.rt-spotlight-empty {
    padding: 36px 0;
    text-align: center;
    font-size: 13.5px;
    color: var(--rt-muted);
}
.rt-spotlight-empty b { color: var(--rt-text); }
body.rt-spotlight-open { overflow: hidden; }

/* Site footer */
.lt-footer-kr {
    letter-spacing: 0.08em;
    text-align: center;
    font-size: 13px;
    color: var(--rt-muted);
}
.lt-footer-main {
    color: var(--rt-faint);
    font-size: 12px;
}

/* ---------- Dynamic Island Player ---------- */
.sc-dynamic-island {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: var(--sc-bg);
    border: 1px solid var(--sc-border);
    color: #ffffff;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
    z-index: 99999;
    cursor: pointer;
    user-select: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    transform-origin: bottom right;
    transition:
        width 480ms cubic-bezier(0.175, 0.885, 0.32, 1.12),
        height 480ms cubic-bezier(0.175, 0.885, 0.32, 1.12),
        border-radius 450ms cubic-bezier(0.175, 0.885, 0.32, 1.1),
        box-shadow 400ms ease,
        transform 300ms ease;
    /* Entrance plays once, on first paint. Class-based state switches from
       JS do NOT re-declare `animation`, so the drop-in never restarts. */
    animation: sc-drop-in 700ms cubic-bezier(0.68, -0.55, 0.265, 1.55) both;
}

.sc-dynamic-island.expanded {
    width: var(--sc-w-expanded);
    height: var(--sc-h-expanded);
    border-radius: 28px;
    cursor: default;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.9), 0 0 30px var(--sc-accent-glow);
}

.sc-dynamic-island.collapsed {
    width: var(--sc-w-collapsed);
    height: var(--sc-h-collapsed);
    border-radius: 22px;
}

.sc-dynamic-island.compact {
    width: var(--sc-w-compact);
    height: var(--sc-h-compact);
    border-radius: 22px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8), 0 0 20px var(--sc-accent-glow);
}

/* Hidden state (Show Player off) */
.sc-dynamic-island.sc-hidden {
    display: none;
}

/* Mobile: give the collapsed panel a bigger, easier-to-hit tap target and
   keep it clear of the thumb reach zone. Also let taps wake it reliably. */
@media (max-width: 767px) {
    .sc-dynamic-island.collapsed {
        width: 132px;
        height: 44px;
        border-radius: 24px;
        bottom: 18px;
        right: 18px;
    }
    .sc-dynamic-island.compact {
        bottom: 18px;
        right: 18px;
    }
    .sc-dynamic-island {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
}

.sc-view-wrapper { width: 100%; height: 100%; position: relative; }
.sc-dynamic-island.expanded .sc-view-wrapper { animation: none; }

.sc-compact-layout {
    position: absolute; inset: 0; display: flex;
    align-items: center; justify-content: space-between;
    padding: 0 14px; opacity: 1; pointer-events: none;
    transition: opacity 250ms ease, transform 250ms ease;
}

.sc-dynamic-island.expanded .sc-compact-layout {
    opacity: 0; transform: scale(0.9); pointer-events: none;
}

.sc-compact-art {
    width: 24px; height: 24px; border-radius: 50%;
    background: linear-gradient(135deg, #111, #222);
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; color: var(--sc-accent);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-size: cover; background-position: center;
    transition: transform 0.3s ease;
}

.sc-compact-eq { display: flex; gap: 3px; align-items: flex-end; height: 14px; }
.sc-compact-eq span { width: 2px; background-color: var(--sc-muted); height: 3px; border-radius: 1px; }
.sc-compact-eq.active span { background-color: var(--sc-accent); animation: sc-eq-bounce 1s infinite ease-in-out; }
.sc-compact-eq.active span:nth-child(1) { animation-delay: 0.1s; }
.sc-compact-eq.active span:nth-child(2) { animation-delay: 0.3s; }
.sc-compact-eq.active span:nth-child(3) { animation-delay: 0.2s; }

.sc-expanded-layout {
    position: absolute; inset: 0; padding: 16px;
    display: flex; flex-direction: column; justify-content: space-between;
    opacity: 0; transform: scale(0.92); pointer-events: none;
    transition: opacity 300ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sc-dynamic-island.expanded .sc-expanded-layout {
    opacity: 1; transform: scale(1); pointer-events: auto !important;
}

.sc-meta-header { display: flex; gap: 12px; align-items: center; min-width: 0; }

.sc-expanded-art {
    width: 48px; height: 48px; border-radius: 12px;
    background: linear-gradient(135deg, #111, #222);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: var(--sc-accent);
    border: 1px solid rgba(255, 255, 255, 0.1); flex-shrink: 0;
    background-size: cover; background-position: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.sc-track-details { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.sc-title-group { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sc-track-title { font-size: 13.5px; font-weight: 700; color: #ffffff; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 175px; }
.sc-track-artist { font-size: 11px; color: var(--sc-muted); margin: 2px 0 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-wave-canvas { width: 60px; height: 18px; flex-shrink: 0; opacity: 0.85; }

.sc-timeline-group { display: flex; flex-direction: column; gap: 3px; margin: 8px 0; }
.sc-timeline-bar-bg { width: 100%; height: 4px; background-color: rgba(255, 255, 255, 0.12); border-radius: 2px; position: relative; cursor: pointer; }
.sc-timeline-bar-bg:hover { height: 6px; border-radius: 3px; }
.sc-timeline-fill { height: 100%; width: 0%; background: var(--sc-accent-grad); border-radius: inherit; pointer-events: none; position: relative; }
.sc-timeline-handle { position: absolute; top: 50%; left: 0%; width: 10px; height: 10px; background-color: #ffffff; border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; opacity: 0; box-shadow: 0 2px 6px rgba(0,0,0,0.5); transition: opacity 150ms ease; }
.sc-timeline-bar-bg:hover .sc-timeline-handle { opacity: 1; }
.sc-time-labels { display: flex; justify-content: space-between; font-family: monospace; font-size: 9px; color: #6b7280; }

.sc-controls-row { display: flex; align-items: center; justify-content: space-between; }
.sc-branding { display: flex; align-items: center; gap: 4px; font-size: 8px; font-family: monospace; color: #4b5563; letter-spacing: 0.5px; }
.sc-branding i { color: var(--sc-accent); font-size: 11px; }
.sc-playback-group { display: flex; align-items: center; gap: 14px; }

.sc-btn { background: none; border: none; color: var(--sc-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: color 150ms ease, transform 100ms ease; padding: 4px; }
.sc-btn:hover { color: #ffffff; }
.sc-btn:active { transform: scale(0.9); }
.sc-btn-play { width: 32px; height: 32px; border-radius: 50%; background-color: #ffffff; color: #000000; font-size: 12px; }
.sc-btn-play:hover { background-color: #e5e7eb; color: #000000; transform: scale(1.05); }
.sc-btn-play:active { transform: scale(0.95); }
.sc-btn-lock { font-size: 10px; color: #4b5563; }
.sc-btn-lock.locked { color: var(--sc-accent); }
.sc-btn-repeat.active { color: var(--sc-accent); }

@keyframes sc-drop-in {
    0%   { opacity: 0; transform: translateY(60px) scale(0.6) rotate(6deg); }
    55%  { opacity: 1; transform: translateY(-8px) scale(1.04) rotate(-1deg); }
    75%  { transform: translateY(3px) scale(0.99) rotate(0.3deg); }
    100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}
@keyframes sc-eq-bounce { 0%, 100% { height: 3px; } 50% { height: 12px; } }

/* ---------- Utility: force light text on dark island regardless of theme ---------- */
.sc-dynamic-island,
.sc-dynamic-island * {
    color-scheme: dark;
}

/* ============================================================
   NAV SETTINGS DROPDOWN (theme-aware)
   ============================================================ */
.rt-settings {
    position: relative;
    margin: 0 3px 0 4px;
}
.rt-settings-toggle {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--rt-line);
    color: var(--rt-muted);
    cursor: pointer;
    font-size: 13px;
    transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.rt-settings-toggle:hover {
    color: var(--rt-accent);
    border-color: var(--rt-accent);
    background-color: var(--rt-hover-bg);
    transform: rotate(45deg);
}

.rt-settings-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    background-color: var(--rt-bg-soft);
    border: 1px solid var(--rt-line-strong);
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.22s ease, transform 0.22s ease;
    z-index: 100000;
}
.rt-settings.open .rt-settings-dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.rt-settings-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--rt-accent);
    padding: 2px 2px 8px;
    border-bottom: 1px solid var(--rt-line);
    margin-bottom: 6px;
}
.rt-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 10px;
    border-radius: 10px;
    transition: background-color 0.2s ease;
}
.rt-setting-row:hover { background-color: var(--rt-hover-bg); }
.rt-setting-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--rt-text);
}
.rt-setting-label i { color: var(--rt-accent); font-size: 12px; }

.rt-toggle {
    position: relative;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
    cursor: pointer;
}
.rt-toggle input { opacity: 0; width: 0; height: 0; }
.rt-toggle-slider {
    position: absolute;
    inset: 0;
    background-color: var(--rt-faint);
    border-radius: 20px;
    transition: background-color 0.22s ease;
}
.rt-toggle-slider::before {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    left: 2px;
    top: 2px;
    background-color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: transform 0.22s ease;
}
.rt-toggle input:checked + .rt-toggle-slider { background-color: var(--rt-accent); }
.rt-toggle input:checked + .rt-toggle-slider::before { transform: translateX(16px); }

/*SITE-WIDE ANIMATIONS (applied to the page content) */
@keyframes rt-fade-up {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
main > *,
.article-body > * {
    animation: rt-fade-up 0.7s ease backwards;
}
main > *:nth-child(2) { animation-delay: 0.08s; }
main > *:nth-child(3) { animation-delay: 0.16s; }
main > *:nth-child(4) { animation-delay: 0.24s; }

.rt-nav-link {
    position: relative;
}
.rt-nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    height: 2px;
    width: 100%;
    background-color: var(--rt-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.28s ease;
}
.rt-nav-link:hover::after,
.rt-nav-link.active::after { transform: scaleX(1); }

.rt-card,
.rt-featured,
.rt-entry {
    transition: transform 0.3s cubic-bezier(0.22, 0.68, 0.3, 1), box-shadow 0.3s ease;
}
.rt-card:hover,
.rt-featured:hover,
.rt-entry:hover { transform: translateY(-6px); }

.rt-btn-solid {
    transition: transform 0.2s ease, background-color 0.25s ease, color 0.25s ease;
}
.rt-btn-solid:hover { transform: translateY(-2px); }

.rt-body-title {
    transition: color 0.3s ease, transform 0.3s ease;
}
.rt-body-title:hover {
    color: var(--rt-accent);
    transform: scale(1.02);
    transform-origin: left center;
}

.article-image {
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}
.article-image:hover {
    transform: scale(1.015);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
}

footer { animation: rt-fade-up 0.7s ease 0.2s backwards; }
