/*
Theme Name: SITE_NAME Lab
Theme URI: https://your-domain.com
Author: SITE_NAME
Author URI: https://your-domain.com
Description: A quiet personal theme for notes and reflective divination.
Version: 1.7.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.2
License: GPL-2.0-or-later
Text Domain: site-name-lab
*/

:root {
    color-scheme: light;
    --theme-progress: 0;
    --bg-r: calc(243 + (18 - 243) * var(--theme-progress));
    --bg-g: calc(245 + (23 - 245) * var(--theme-progress));
    --bg-b: calc(248 + (32 - 248) * var(--theme-progress));
    --bg2-r: calc(232 + (26 - 232) * var(--theme-progress));
    --bg2-g: calc(237 + (32 - 237) * var(--theme-progress));
    --bg2-b: calc(243 + (43 - 243) * var(--theme-progress));
    --panel-r: calc(255 + (31 - 255) * var(--theme-progress));
    --panel-g: calc(255 + (37 - 255) * var(--theme-progress));
    --panel-b: calc(255 + (48 - 255) * var(--theme-progress));
    --panel-a: calc(0.7 + (0.74 - 0.7) * var(--theme-progress));
    --panel-strong-r: calc(255 + (35 - 255) * var(--theme-progress));
    --panel-strong-g: calc(255 + (42 - 255) * var(--theme-progress));
    --panel-strong-b: calc(255 + (54 - 255) * var(--theme-progress));
    --panel-strong-a: calc(0.92 + (0.92 - 0.92) * var(--theme-progress));
    --text-r: calc(20 + (237 - 20) * var(--theme-progress));
    --text-g: calc(25 + (241 - 25) * var(--theme-progress));
    --text-b: calc(34 + (247 - 34) * var(--theme-progress));
    --muted-r: calc(102 + (178 - 102) * var(--theme-progress));
    --muted-g: calc(112 + (188 - 112) * var(--theme-progress));
    --muted-b: calc(133 + (201 - 133) * var(--theme-progress));
    --line-r: calc(98 + (226 - 98) * var(--theme-progress));
    --line-g: calc(109 + (232 - 109) * var(--theme-progress));
    --line-b: calc(130 + (240 - 130) * var(--theme-progress));
    --line-a: calc(0.12 + (0.16 - 0.12) * var(--theme-progress));
    --shadow-a: calc(0.1 + (0.36 - 0.1) * var(--theme-progress));
    --shadow-soft-a: calc(0.06 + (0.24 - 0.06) * var(--theme-progress));
    --accent-r: calc(30 + (242 - 30) * var(--theme-progress));
    --accent-g: calc(38 + (245 - 38) * var(--theme-progress));
    --accent-b: calc(50 + (251 - 50) * var(--theme-progress));
    --accent-soft-r: calc(143 + (158 - 143) * var(--theme-progress));
    --accent-soft-g: calc(155 + (171 - 155) * var(--theme-progress));
    --accent-soft-b: calc(173 + (192 - 173) * var(--theme-progress));
    --accent-glow-r: calc(188 + (137 - 188) * var(--theme-progress));
    --accent-glow-g: calc(198 + (166 - 198) * var(--theme-progress));
    --accent-glow-b: calc(214 + (205 - 214) * var(--theme-progress));
    --ink-r: calc(15 + (247 - 15) * var(--theme-progress));
    --ink-g: calc(23 + (249 - 23) * var(--theme-progress));
    --ink-b: calc(35 + (252 - 35) * var(--theme-progress));
    --font-ui: "Avenir Next", "SF Pro Text", "Segoe UI Variable Text", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei UI", "Helvetica Neue", sans-serif;
    --font-display: "Avenir Next", "SF Pro Display", "Segoe UI Variable Display", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei UI", "Helvetica Neue", sans-serif;
    --font-reading: "Charter", "Iowan Old Style", "Baskerville", "Palatino Linotype", "Source Han Serif SC", "Noto Serif SC", Georgia, serif;
    --bg: rgb(var(--bg-r), var(--bg-g), var(--bg-b));
    --bg-2: rgb(var(--bg2-r), var(--bg2-g), var(--bg2-b));
    --panel: rgba(var(--panel-r), var(--panel-g), var(--panel-b), var(--panel-a));
    --panel-strong: rgba(var(--panel-strong-r), var(--panel-strong-g), var(--panel-strong-b), var(--panel-strong-a));
    --text: rgb(var(--text-r), var(--text-g), var(--text-b));
    --muted: rgb(var(--muted-r), var(--muted-g), var(--muted-b));
    --line: rgba(var(--line-r), var(--line-g), var(--line-b), var(--line-a));
    --shadow: 0 34px 90px rgba(25, 34, 48, var(--shadow-a));
    --shadow-soft: 0 20px 42px rgba(25, 34, 48, var(--shadow-soft-a));
    --accent: rgb(var(--accent-r), var(--accent-g), var(--accent-b));
    --accent-soft: rgb(var(--accent-soft-r), var(--accent-soft-g), var(--accent-soft-b));
    --accent-glow: rgba(var(--accent-glow-r), var(--accent-glow-g), var(--accent-glow-b), 0.2);
    --ink: rgb(var(--ink-r), var(--ink-g), var(--ink-b));
    --header-bg: linear-gradient(
        180deg,
        rgba(calc(255 + (25 - 255) * var(--theme-progress)), calc(255 + (31 - 255) * var(--theme-progress)), calc(255 + (40 - 255) * var(--theme-progress)), calc(0.84 + (0.88 - 0.84) * var(--theme-progress))),
        rgba(calc(255 + (19 - 255) * var(--theme-progress)), calc(255 + (23 - 255) * var(--theme-progress)), calc(255 + (31 - 255) * var(--theme-progress)), calc(0.58 + (0.68 - 0.58) * var(--theme-progress)))
    );
    --header-border: rgba(255,255,255,calc(0.66 + (0.14 - 0.66) * var(--theme-progress)));
    --header-shadow: 0 18px 44px rgba(0,0,0,calc(0.04 + (0.28 - 0.04) * var(--theme-progress))), inset 0 1px 0 rgba(255,255,255,calc(0.94 + (0.10 - 0.94) * var(--theme-progress)));
    --soft-surface-bg: linear-gradient(
        180deg,
        rgba(calc(255 + (34 - 255) * var(--theme-progress)), calc(255 + (42 - 255) * var(--theme-progress)), calc(255 + (56 - 255) * var(--theme-progress)), calc(0.76 + (0.74 - 0.76) * var(--theme-progress))),
        rgba(calc(247 + (21 - 247) * var(--theme-progress)), calc(250 + (27 - 250) * var(--theme-progress)), calc(254 + (37 - 254) * var(--theme-progress)), calc(0.38 + (0.56 - 0.38) * var(--theme-progress)))
    );
    --soft-surface-border: rgba(255,255,255,calc(0.78 + (0.10 - 0.78) * var(--theme-progress)));
    --soft-surface-shadow: 0 22px 46px rgba(calc(45 + (3 - 45) * var(--theme-progress)), calc(57 + (8 - 57) * var(--theme-progress)), calc(76 + (18 - 76) * var(--theme-progress)), calc(0.08 + (0.18 - 0.08) * var(--theme-progress))), inset 0 1px 0 rgba(255,255,255,calc(0.96 + (0.07 - 0.96) * var(--theme-progress)));
    --soft-surface-hover-shadow: 0 28px 56px rgba(calc(88 + (6 - 88) * var(--theme-progress)), calc(104 + (12 - 104) * var(--theme-progress)), calc(131 + (24 - 131) * var(--theme-progress)), calc(0.16 + (0.24 - 0.16) * var(--theme-progress)));
    --menu-surface-bg: linear-gradient(
        180deg,
        rgba(calc(255 + (39 - 255) * var(--theme-progress)), calc(255 + (45 - 255) * var(--theme-progress)), calc(255 + (57 - 255) * var(--theme-progress)), calc(0.88 + (0.82 - 0.88) * var(--theme-progress))),
        rgba(calc(248 + (24 - 248) * var(--theme-progress)), calc(250 + (29 - 250) * var(--theme-progress)), calc(254 + (39 - 254) * var(--theme-progress)), calc(0.54 + (0.58 - 0.54) * var(--theme-progress)))
    );
    --menu-list-bg: rgba(calc(251 + (26 - 251) * var(--theme-progress)), calc(252 + (31 - 252) * var(--theme-progress)), calc(255 + (41 - 255) * var(--theme-progress)), calc(0.78 + (0.82 - 0.78) * var(--theme-progress)));
    --menu-border: rgba(255,255,255,calc(0.68 + (0.14 - 0.68) * var(--theme-progress)));
    --menu-shadow: inset 0 1px 0 rgba(255,255,255,calc(0.94 + (0.12 - 0.94) * var(--theme-progress))), 0 12px 28px rgba(calc(43 + (0 - 43) * var(--theme-progress)), calc(49 + (0 - 49) * var(--theme-progress)), calc(59 + (0 - 59) * var(--theme-progress)), calc(0.06 + (0.24 - 0.06) * var(--theme-progress)));
    --secondary-btn-bg: linear-gradient(
        180deg,
        rgba(calc(255 + (52 - 255) * var(--theme-progress)), calc(255 + (60 - 255) * var(--theme-progress)), calc(255 + (75 - 255) * var(--theme-progress)), calc(0.86 + (0.78 - 0.86) * var(--theme-progress))),
        rgba(calc(244 + (33 - 244) * var(--theme-progress)), calc(247 + (39 - 247) * var(--theme-progress)), calc(252 + (50 - 252) * var(--theme-progress)), calc(0.54 + (0.56 - 0.54) * var(--theme-progress)))
    );
    --secondary-btn-border: rgba(255,255,255,calc(0.68 + (0.14 - 0.68) * var(--theme-progress)));
    --secondary-btn-shadow: inset 0 1px 0 rgba(255,255,255,calc(0.9 + (0.12 - 0.9) * var(--theme-progress))), 0 12px 28px rgba(calc(53 + (0 - 53) * var(--theme-progress)), calc(62 + (0 - 62) * var(--theme-progress)), calc(79 + (0 - 79) * var(--theme-progress)), calc(0.05 + (0.24 - 0.05) * var(--theme-progress)));
    --primary-btn-bg: linear-gradient(
        180deg,
        rgba(calc(44 + (77 - 44) * var(--theme-progress)), calc(53 + (96 - 53) * var(--theme-progress)), calc(66 + (126 - 66) * var(--theme-progress)), calc(0.94 + (0.92 - 0.94) * var(--theme-progress))),
        rgba(calc(28 + (53 - 28) * var(--theme-progress)), calc(35 + (68 - 35) * var(--theme-progress)), calc(46 + (91 - 46) * var(--theme-progress)), calc(0.98 + (0.96 - 0.98) * var(--theme-progress)))
    );
    --primary-btn-shadow: 0 14px 30px rgba(calc(30 + (8 - 30) * var(--theme-progress)), calc(38 + (14 - 38) * var(--theme-progress)), calc(50 + (26 - 50) * var(--theme-progress)), calc(0.14 + (0.24 - 0.14) * var(--theme-progress))), inset 0 1px 0 rgba(255,255,255,calc(0.12 + (0.14 - 0.12) * var(--theme-progress)));
}

/* 2026 editorial system: one authoritative layer for structure, motion and radius. */
:root {
    --qa-page: rgb(calc(247 - 231 * var(--theme-progress)), calc(249 - 232 * var(--theme-progress)), calc(252 - 231 * var(--theme-progress)));
    --qa-surface: rgba(calc(255 - 231 * var(--theme-progress)), calc(255 - 229 * var(--theme-progress)), calc(255 - 226 * var(--theme-progress)), calc(0.82 - 0.08 * var(--theme-progress)));
    --qa-surface-strong: rgb(calc(255 - 232 * var(--theme-progress)), calc(255 - 230 * var(--theme-progress)), calc(255 - 226 * var(--theme-progress)));
    --qa-ink: rgb(calc(18 + 221 * var(--theme-progress)), calc(24 + 217 * var(--theme-progress)), calc(34 + 210 * var(--theme-progress)));
    --qa-muted: rgb(calc(91 + 84 * var(--theme-progress)), calc(103 + 79 * var(--theme-progress)), calc(123 + 70 * var(--theme-progress)));
    --qa-line: rgba(calc(76 + 118 * var(--theme-progress)), calc(91 + 105 * var(--theme-progress)), calc(118 + 87 * var(--theme-progress)), 0.16);
    --qa-blue: rgb(calc(45 + 80 * var(--theme-progress)), calc(91 + 57 * var(--theme-progress)), calc(159 + 54 * var(--theme-progress)));
    --qa-radius-sm: 16px;
    --qa-radius-md: 24px;
    --qa-radius-lg: 36px;
    --qa-shadow: 0 24px 70px rgba(22, 34, 54, calc(0.1 + 0.11 * var(--theme-progress)));
    --qa-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--qa-ink) !important;
    background: var(--qa-page) !important;
    background-image: none !important;
}

body::before,
body::after {
    display: none !important;
}

.site-header {
    position: fixed !important;
    z-index: 80;
    top: 0 !important;
    left: 0;
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0.85rem clamp(0.9rem, 2.2vw, 1.75rem) !important;
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    pointer-events: none;
}

.site-header .brand,
.site-header .header-actions {
    pointer-events: auto;
}

.site-header .brand {
    color: #fff;
    font-size: 0.92rem;
    font-weight: 720;
    letter-spacing: 0 !important;
    text-shadow: 0 1px 20px rgba(0, 0, 0, 0.3);
    mix-blend-mode: difference;
}

.site-header .header-actions {
    padding: 0.28rem;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.54);
    -webkit-backdrop-filter: blur(20px) saturate(145%);
    backdrop-filter: blur(20px) saturate(145%);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.7), 0 10px 34px rgba(19, 31, 51, 0.11);
}

[data-theme="dark"] .site-header .header-actions {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(15, 22, 34, 0.62);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.09), 0 12px 34px rgba(0, 0, 0, 0.24);
}

.nav {
    display: none !important;
}

.site-dock {
    position: fixed;
    z-index: 90;
    left: clamp(0.72rem, 1.5vw, 1.2rem);
    top: 50%;
    width: 3.25rem;
    height: 3.25rem;
    transform: translateY(-50%);
}

.site-dock-toggle,
.site-dock-link {
    display: flex;
    align-items: center;
    min-width: 3.25rem;
    min-height: 3.25rem;
    border: 1px solid rgba(255, 255, 255, calc(0.55 - 0.42 * var(--theme-progress)));
    border-radius: 999px;
    color: var(--qa-ink);
    background: var(--qa-surface);
    -webkit-backdrop-filter: blur(22px) saturate(145%);
    backdrop-filter: blur(22px) saturate(145%);
    box-shadow: inset 0 1px rgba(255, 255, 255, calc(0.72 - 0.58 * var(--theme-progress))), 0 16px 42px rgba(18, 30, 49, calc(0.13 + 0.1 * var(--theme-progress)));
}

.site-dock-toggle {
    position: relative;
    z-index: 4;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    padding: 0;
    cursor: pointer;
    transition: transform 260ms var(--qa-ease), background-color 220ms ease, box-shadow 260ms ease;
}

.site-dock-toggle:hover {
    transform: scale(1.04);
}

.site-dock.is-open .site-dock-toggle {
    transform: rotate(90deg);
}

.site-dock-toggle-icon {
    width: 1.25rem !important;
    height: 1.25rem !important;
}

.site-dock-menu {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.site-dock-link {
    position: absolute;
    z-index: 2;
    left: 0;
    top: 0;
    width: max-content;
    padding: 0 1rem;
    gap: 0.68rem;
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.78);
    transform-origin: left center;
    transition: transform 360ms var(--qa-ease), opacity 180ms ease, background-color 180ms ease;
}

.site-dock-link:nth-child(1) { --dock-y: -4.35rem; }
.site-dock-link:nth-child(2) { --dock-y: 0rem; }
.site-dock-link:nth-child(3) { --dock-y: 4.35rem; }

.site-dock.is-open .site-dock-menu {
    pointer-events: auto;
}

.site-dock.is-open .site-dock-link {
    opacity: 1;
    transform: translate3d(4.15rem, var(--dock-y), 0) scale(1);
}

.site-dock-link:hover,
.site-dock-link.is-current {
    color: #fff;
    background: var(--qa-blue);
    border-color: transparent;
}

.site-dock-icon {
    flex: 0 0 auto;
    width: 1.12rem !important;
    height: 1.12rem !important;
}

.site-dock-link span {
    font-size: 0.88rem;
    font-weight: 690;
    white-space: nowrap;
}

.page-shell {
    width: min(1180px, calc(100% - 2rem)) !important;
    padding-top: clamp(6.5rem, 9vw, 8rem) !important;
}

body.home .page-shell {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.home-film-hero {
    position: relative;
    width: 100%;
    min-height: 100svh;
    overflow: hidden;
    isolation: isolate;
    color: #fff;
    background: #111722;
}

.home-film,
.home-film-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.home-film {
    z-index: 0;
    object-fit: cover;
    object-position: center 42%;
    opacity: 0;
    border: 0;
    border-radius: 0;
    background: #111722;
    transform: scale(1.005);
    transition: opacity 820ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.home-film.is-active {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .home-film {
        transition-duration: 1ms;
    }
}

.home-film-shade {
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(7, 12, 20, 0.16), rgba(7, 12, 20, 0.04) 42%, rgba(7, 12, 20, 0.7)),
        linear-gradient(90deg, rgba(7, 12, 20, 0.58), transparent 64%);
}

.home-film-copy {
    position: absolute;
    z-index: 2;
    left: clamp(1.25rem, 6vw, 6.5rem);
    right: clamp(1.25rem, 6vw, 6.5rem);
    bottom: clamp(5.8rem, 12vh, 9rem);
    max-width: 64rem;
}

.home-film-kicker {
    display: block;
    margin-bottom: 1.15rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.84rem;
    font-weight: 680;
}

.home-film-copy h1 {
    max-width: 10ch;
    margin: 0;
    color: #fff;
    font-family: inherit;
    font-size: clamp(4rem, 9vw, 8.2rem) !important;
    font-weight: 690;
    line-height: 0.9 !important;
    letter-spacing: 0 !important;
    text-wrap: balance;
}

.home-film-copy p {
    max-width: 39rem;
    margin: 1.5rem 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(1rem, 1.45vw, 1.24rem);
    line-height: 1.55;
}

.home-scroll-cue,
.home-video-toggle {
    position: absolute;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 999px;
    color: #fff;
    background: rgba(11, 18, 29, 0.22);
    -webkit-backdrop-filter: blur(18px) saturate(135%);
    backdrop-filter: blur(18px) saturate(135%);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.18);
}

.home-scroll-cue {
    left: 50%;
    bottom: 1.5rem;
    min-height: 2.75rem;
    padding: 0 1rem;
    gap: 0.48rem;
    transform: translateX(-50%);
    font-size: 0.8rem;
    font-weight: 650;
}

.home-scroll-cue .ui-icon {
    width: 0.92rem !important;
    height: 0.92rem !important;
}

.home-video-toggle {
    right: clamp(1rem, 2.2vw, 1.7rem);
    bottom: 1.5rem;
    min-height: 2.75rem;
    padding: 0 1rem;
    gap: 0.5rem;
    cursor: pointer;
}

.home-video-toggle .ui-icon {
    display: none;
}

.home-video-toggle::before {
    content: '';
    width: 0.95rem;
    height: 0.95rem;
    background: currentColor;
    -webkit-mask: url('assets/vendor/phosphor/pause.svg') center / contain no-repeat;
    mask: url('assets/vendor/phosphor/pause.svg') center / contain no-repeat;
}

.home-film-hero.is-video-paused .home-video-toggle::before {
    -webkit-mask-image: url('assets/vendor/phosphor/play.svg');
    mask-image: url('assets/vendor/phosphor/play.svg');
}

.home-video-toggle span {
    font-size: 0.8rem;
    font-weight: 680;
}

.home-story-stream {
    width: min(1240px, calc(100% - 2rem));
    margin: 0 auto;
    padding: clamp(5.5rem, 10vw, 9rem) 0 clamp(6rem, 11vw, 10rem);
}

.home-story-intro {
    display: grid;
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.5fr);
    align-items: end;
    gap: 1rem clamp(1.5rem, 5vw, 5rem);
    margin-bottom: clamp(2.5rem, 6vw, 5rem);
}

.home-story-intro > span {
    grid-column: 1;
    color: var(--qa-blue);
    font-size: 0.78rem;
    font-weight: 760;
}

.home-story-intro h2 {
    grid-column: 1;
    margin: 0.65rem 0 0;
    font-size: clamp(2.6rem, 5.5vw, 5.5rem);
    line-height: 0.98;
    letter-spacing: 0;
}

.home-story-intro p {
    grid-column: 2;
    grid-row: 1 / span 2;
    max-width: 30rem;
    margin: 0 0 0.55rem;
    color: var(--qa-muted);
    font-size: clamp(1.05rem, 1.7vw, 1.36rem);
    line-height: 1.55;
}

.home-story {
    min-height: clamp(30rem, 64vh, 44rem);
    margin-top: clamp(1rem, 2vw, 1.5rem);
    overflow: hidden;
    border-radius: var(--qa-radius-lg) !important;
    background: #e8edf6;
    box-shadow: var(--qa-shadow);
    transform: translateZ(0);
}

.home-story-tone-1 { background: linear-gradient(145deg, #e7edf7, #f6f8fc 70%); }
.home-story-tone-2 { background: linear-gradient(145deg, #e8f1ed, #f7faf8 70%); }
.home-story-tone-3 { background: linear-gradient(145deg, #f1ebf2, #faf8fa 70%); }
.home-story-tone-4 { background: linear-gradient(145deg, #f2eee7, #fbfaf7 70%); }

[data-theme="dark"] .home-story-tone-1 { background: linear-gradient(145deg, #1a2433, #111923 70%); }
[data-theme="dark"] .home-story-tone-2 { background: linear-gradient(145deg, #172824, #101b1a 70%); }
[data-theme="dark"] .home-story-tone-3 { background: linear-gradient(145deg, #29202d, #18131d 70%); }
[data-theme="dark"] .home-story-tone-4 { background: linear-gradient(145deg, #29251f, #191713 70%); }

.home-story-link {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto 1fr auto;
    width: 100%;
    min-height: inherit;
    padding: clamp(1.35rem, 4vw, 3.4rem);
    color: var(--qa-ink);
}

.home-story-meta {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--qa-muted);
    font-size: 0.82rem;
    font-weight: 680;
}

.home-story-copy {
    grid-column: 1;
    grid-row: 3;
    align-self: end;
    max-width: 58rem;
}

.home-story-copy h3 {
    max-width: 15ch;
    margin: 0;
    font-size: clamp(2.55rem, 6vw, 6rem);
    line-height: 0.98;
    letter-spacing: 0;
    text-wrap: balance;
}

.home-story-copy p {
    max-width: 38rem;
    margin: 1.35rem 0 0;
    color: var(--qa-muted);
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    line-height: 1.6;
}

.home-story-action {
    grid-column: 2;
    grid-row: 3;
    align-self: end;
    display: inline-flex;
    align-items: center;
    min-height: 3.1rem;
    padding: 0 1.1rem;
    gap: 0.55rem;
    border-radius: 999px;
    color: #fff;
    background: var(--qa-blue);
    font-size: 0.84rem;
    font-weight: 720;
    transition: transform 260ms var(--qa-ease), box-shadow 260ms ease;
}

.home-story:hover .home-story-action {
    transform: translate3d(0, -3px, 0);
    box-shadow: 0 14px 30px rgba(33, 71, 128, 0.2);
}

.home-story-action .ui-icon {
    width: 1rem !important;
    height: 1rem !important;
}

.glass-card,
.note-card,
.tarot-form,
.tarot-table,
.reading-box,
.comment-card,
.comment-form-wrap-v4,
.comments-compose-panel,
.tarot-history,
.tarot-history-item,
.music-capsule-toggle,
.music-capsule-panel {
    border-radius: var(--qa-radius-md) !important;
}

.button,
.button.primary,
.button.secondary,
.lang-toggle,
.article-translate-toggle,
.comment-form .submit,
.tarot-form button {
    border-radius: 999px !important;
}

.article-content table,
.tarot-table table,
.tarot-table-wrap {
    overflow: hidden;
    border-radius: var(--qa-radius-md) !important;
}

.article-content th,
.article-content td {
    border-color: var(--qa-line) !important;
}

.page-hero,
.section-head,
.article-meta-row {
    border: 0 !important;
}

.site-footer {
    border: 0 !important;
    color: var(--qa-muted);
}

@media (max-width: 760px) {
    .site-header {
        padding: 0.7rem 0.72rem !important;
    }

    .site-header .brand {
        font-size: 0.82rem;
    }

    .site-header .header-actions {
        transform: scale(0.92);
        transform-origin: right top;
    }

    .site-dock {
        left: 0.68rem;
        top: auto;
        bottom: 0.9rem;
        transform: none;
    }

    .site-dock-link:nth-child(1) { --dock-y: -10.8rem; }
    .site-dock-link:nth-child(2) { --dock-y: -7.15rem; }
    .site-dock-link:nth-child(3) { --dock-y: -3.5rem; }

    .site-dock.is-open .site-dock-link {
        transform: translate3d(0, var(--dock-y), 0) scale(1);
    }

    .home-film-hero {
        min-height: 92svh;
    }

    .home-film {
        object-position: 54% center;
    }

    .home-film-copy {
        bottom: 6.5rem;
    }

    .home-film-copy h1 {
        max-width: 8ch;
        font-size: clamp(3.45rem, 16vw, 5.1rem) !important;
        line-height: 0.94 !important;
    }

    .home-film-copy p {
        max-width: 21rem;
        margin-top: 1rem;
        font-size: 0.96rem;
    }

    .home-scroll-cue {
        left: 1rem;
        transform: none;
    }

    .home-video-toggle {
        right: 1rem;
        width: 2.75rem;
        padding: 0;
        justify-content: center;
    }

    .home-video-toggle span {
        display: none;
    }

    .home-story-stream {
        width: min(100% - 1.25rem, 42rem);
        padding-top: 4.8rem;
    }

    .home-story-intro {
        display: block;
        margin-bottom: 2.3rem;
    }

    .home-story-intro h2 {
        margin-top: 0.6rem;
        font-size: clamp(2.5rem, 13vw, 4.1rem);
    }

    .home-story-intro p {
        margin-top: 1rem;
    }

    .home-story {
        min-height: 30rem;
        border-radius: 26px !important;
    }

    .home-story-link {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 1.3rem;
    }

    .home-story-copy {
        margin-top: auto;
    }

    .home-story-copy h3 {
        font-size: clamp(2.4rem, 12vw, 4.1rem);
    }

    .home-story-copy p {
        margin-top: 1rem;
    }

    .home-story-action {
        align-self: flex-start;
        margin-top: 1.4rem;
    }

    .glass-card,
    .note-card,
    .tarot-form,
    .tarot-table,
    .reading-box,
    .comment-card,
    .comment-form-wrap-v4,
    .comments-compose-panel,
    .tarot-history,
    .tarot-history-item,
    .music-capsule-toggle,
    .music-capsule-panel {
        border-radius: 20px !important;
    }
}

/* Music interaction layer: one compact control, one scrollable result list. */
.music-capsule {
    contain: layout paint;
    z-index: 80;
}

.music-capsule-panel {
    overflow: hidden;
    display: grid;
    gap: 0.72rem;
}

.music-capsule-panel[hidden],
.music-aplayer[hidden],
.music-play-toggle[hidden] {
    display: none !important;
}

.music-play-toggle {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    margin: 0 0 0 auto;
    padding: 0;
    border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
    border-radius: 50%;
    background: color-mix(in srgb, currentColor 8%, transparent);
    color: inherit;
    cursor: pointer;
    transition: transform 160ms ease, background-color 160ms ease;
}

.music-play-toggle:hover {
    transform: translateY(-1px);
    background: color-mix(in srgb, currentColor 14%, transparent);
}

.music-play-toggle:active {
    transform: scale(0.96);
}

.music-play-icon {
    width: 1.08rem;
    height: 1.08rem;
}

.music-aplayer {
    min-width: 0;
    overflow: hidden;
}

.music-native-audio {
    display: block;
    width: 100%;
    min-width: 0;
    height: 38px;
    border-radius: 12px;
}

.music-capsule.is-buffering .music-capsule-art {
    animation: music-art-pulse 1.1s ease-in-out infinite;
}

.music-results {
    min-height: 0;
    max-height: min(32vh, 17rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.music-result {
    width: 100%;
    min-height: 3.25rem;
    display: grid;
    grid-template-columns: 2.65rem minmax(0, 1fr);
    gap: 0.68rem;
    align-items: center;
    text-align: left;
}

.music-result-copy {
    min-width: 0;
}

.music-result-copy strong,
.music-result-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.music-search-button,
.music-play-toggle,
.music-capsule-toggle {
    touch-action: manipulation;
}

.music-search.is-loading .music-search-button {
    pointer-events: none;
    opacity: 0.58;
}

@keyframes music-art-pulse {
    0%, 100% { transform: scale(1); opacity: 0.82; }
    50% { transform: scale(1.045); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .music-capsule.is-buffering .music-capsule-art { animation: none; }
    .music-play-toggle { transition: none; }
}

@media (max-width: 760px) {
    .music-capsule {
        bottom: max(0.72rem, env(safe-area-inset-bottom));
    }

    .music-capsule-panel {
        max-height: min(70svh, 34rem);
    }

    .music-results {
        max-height: min(30svh, 15rem);
    }
}

/* Final article reading refinements. Kept last so legacy passes cannot undo them. */
body.single .article { width: min(100% - 2.5rem, 50rem) !important; margin-top: clamp(2.5rem, 6vw, 5.5rem) !important; padding: clamp(1.5rem, 4.5vw, 3.8rem) !important; gap: 1.6rem !important; border-color: rgba(162, 176, 198, 0.22) !important; background: linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(248, 250, 253, 0.42)), var(--soft-surface-bg) !important; }
body.single .article-meta-row { align-items: center !important; padding-bottom: 1rem !important; }
body.single .article-meta-cluster { display: flex !important; align-items: center !important; gap: 0.65rem 0.9rem !important; }
body.single .article > h1 { max-width: 13ch !important; margin: 0.35rem 0 0.65rem !important; font-size: clamp(2.25rem, 6vw, 4.85rem) !important; line-height: 1.05 !important; letter-spacing: 0 !important; text-wrap: balance; }
body.single .article-content { max-width: 43rem !important; gap: 0 !important; font-size: clamp(1.03rem, 1.4vw, 1.16rem) !important; line-height: 1.94 !important; }
body.single .article-content > p { margin: 0 0 1.35rem !important; text-wrap: pretty; }
body.single .article-content > p:first-of-type { max-width: 39rem; margin-bottom: 2rem !important; color: var(--muted) !important; font-family: var(--font-display) !important; font-size: clamp(1.22rem, 2.1vw, 1.48rem) !important; line-height: 1.6 !important; }
body.single .article-content > h2 { max-width: 32rem; margin: 3.25rem 0 1rem !important; font-size: clamp(1.45rem, 2.6vw, 2rem) !important; line-height: 1.24 !important; }
body.single .article-content blockquote { margin: 2.2rem 0 !important; padding: 0.7rem 0 0.7rem 1.25rem !important; border-left: 2px solid rgba(117, 141, 177, 0.65) !important; color: var(--muted) !important; font-family: var(--font-display) !important; font-size: 1.14em !important; line-height: 1.65 !important; }
body.single .article-content .article-sources { display: grid !important; gap: 0.35rem !important; margin: 3rem 0 0 !important; padding-top: 1.15rem !important; border-top: 1px solid rgba(162, 176, 198, 0.22) !important; background: transparent !important; box-shadow: none !important; }
body.single .article-content .article-sources span { color: var(--muted) !important; font-size: 0.76rem !important; font-weight: 650; }
body.single .article-content .article-sources a { width: fit-content; max-width: 100%; color: var(--text) !important; font-size: 0.9rem !important; line-height: 1.55 !important; text-decoration-color: rgba(117, 141, 177, 0.45); text-underline-offset: 0.22em; }
[data-theme="dark"] body.single .article { border-color: rgba(177, 190, 211, 0.14) !important; background: linear-gradient(145deg, rgba(37, 46, 61, 0.82), rgba(19, 25, 35, 0.58)), var(--soft-surface-bg) !important; }
[data-theme="dark"] body.single .article-content .article-sources { border-top-color: rgba(177, 190, 211, 0.16) !important; }
@media (max-width: 760px) { body.single .article { width: calc(100% - 1.25rem) !important; margin-top: 1rem !important; padding: 1.25rem 1.1rem 1.8rem !important; border-radius: 20px !important; } body.single .article-meta-row { gap: 0.8rem !important; padding-bottom: 0.85rem !important; } body.single .article-meta-cluster { gap: 0.45rem 0.7rem !important; } body.single .article > h1 { max-width: 11ch !important; font-size: clamp(2.25rem, 12vw, 3.15rem) !important; line-height: 1.09 !important; } body.single .article-content { font-size: 1rem !important; line-height: 1.86 !important; } body.single .article-content > p:first-of-type { margin-bottom: 1.7rem !important; font-size: 1.16rem !important; line-height: 1.62 !important; } body.single .article-content > h2 { margin-top: 2.45rem !important; font-size: 1.5rem !important; } }

/* Final article reading refinements. Kept last so legacy theme passes cannot undo them. */
body.single .article {
    width: min(100% - 2.5rem, 50rem) !important;
    margin-top: clamp(2.5rem, 6vw, 5.5rem) !important;
    padding: clamp(1.5rem, 4.5vw, 3.8rem) !important;
    gap: 1.6rem !important;
    border-color: rgba(162, 176, 198, 0.22) !important;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(248, 250, 253, 0.42)), var(--soft-surface-bg) !important;
}

body.single .article-meta-row { align-items: center !important; padding-bottom: 1rem !important; }
body.single .article-meta-cluster { display: flex !important; align-items: center !important; gap: 0.65rem 0.9rem !important; }

body.single .article > h1 {
    max-width: 13ch !important;
    margin: 0.35rem 0 0.65rem !important;
    font-size: clamp(2.25rem, 6vw, 4.85rem) !important;
    line-height: 1.05 !important;
    letter-spacing: 0 !important;
    text-wrap: balance;
}

body.single .article-content {
    max-width: 43rem !important;
    gap: 0 !important;
    font-size: clamp(1.03rem, 1.4vw, 1.16rem) !important;
    line-height: 1.94 !important;
}

body.single .article-content > p { margin: 0 0 1.35rem !important; text-wrap: pretty; }
body.single .article-content > p:first-of-type {
    max-width: 39rem;
    margin-bottom: 2rem !important;
    color: var(--muted) !important;
    font-family: var(--font-display) !important;
    font-size: clamp(1.22rem, 2.1vw, 1.48rem) !important;
    line-height: 1.6 !important;
}

body.single .article-content > h2 {
    max-width: 32rem;
    margin: 3.25rem 0 1rem !important;
    font-size: clamp(1.45rem, 2.6vw, 2rem) !important;
    line-height: 1.24 !important;
}

body.single .article-content blockquote {
    margin: 2.2rem 0 !important;
    padding: 0.7rem 0 0.7rem 1.25rem !important;
    border-left: 2px solid rgba(117, 141, 177, 0.65) !important;
    color: var(--muted) !important;
    font-family: var(--font-display) !important;
    font-size: 1.14em !important;
    line-height: 1.65 !important;
}

body.single .article-content .article-sources {
    display: grid !important;
    gap: 0.35rem !important;
    margin: 3rem 0 0 !important;
    padding-top: 1.15rem !important;
    border-top: 1px solid rgba(162, 176, 198, 0.22) !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.single .article-content .article-sources span { color: var(--muted) !important; font-size: 0.76rem !important; font-weight: 650; }
body.single .article-content .article-sources a { width: fit-content; max-width: 100%; color: var(--text) !important; font-size: 0.9rem !important; line-height: 1.55 !important; text-decoration-color: rgba(117, 141, 177, 0.45); text-underline-offset: 0.22em; }

[data-theme="dark"] body.single .article { border-color: rgba(177, 190, 211, 0.14) !important; background: linear-gradient(145deg, rgba(37, 46, 61, 0.82), rgba(19, 25, 35, 0.58)), var(--soft-surface-bg) !important; }
[data-theme="dark"] body.single .article-content .article-sources { border-top-color: rgba(177, 190, 211, 0.16) !important; }

@media (max-width: 760px) {
    body.single .article { width: calc(100% - 1.25rem) !important; margin-top: 1rem !important; padding: 1.25rem 1.1rem 1.8rem !important; border-radius: 20px !important; }
    body.single .article-meta-row { gap: 0.8rem !important; padding-bottom: 0.85rem !important; }
    body.single .article-meta-cluster { gap: 0.45rem 0.7rem !important; }
    body.single .article > h1 { max-width: 11ch !important; font-size: clamp(2.25rem, 12vw, 3.15rem) !important; line-height: 1.09 !important; }
    body.single .article-content { font-size: 1rem !important; line-height: 1.86 !important; }
    body.single .article-content > p:first-of-type { margin-bottom: 1.7rem !important; font-size: 1.16rem !important; line-height: 1.62 !important; }
    body.single .article-content > h2 { margin-top: 2.45rem !important; font-size: 1.5rem !important; }
}

/* Compact theme control and mobile reading system. */
.site-header .header-actions {
    gap: 0.42rem !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

.theme-toggle {
    --toggle-icon: 20px;
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, calc(0.62 - var(--theme-progress) * 0.48)) !important;
    border-radius: 50% !important;
    background: rgba(calc(255 - var(--theme-progress) * 235), calc(255 - var(--theme-progress) * 232), calc(255 - var(--theme-progress) * 226), calc(0.74 + var(--theme-progress) * 0.04)) !important;
    box-shadow: inset 0 1px rgba(255,255,255,calc(0.82 - var(--theme-progress) * 0.68)), 0 10px 28px rgba(22,34,54,calc(0.1 + var(--theme-progress) * 0.12)) !important;
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
    transition: background-color 260ms ease, border-color 260ms ease, box-shadow 260ms ease, transform 180ms var(--qa-ease) !important;
}

.theme-toggle:hover {
    transform: translateY(-1px);
}

.theme-toggle:active {
    transform: scale(0.94);
}

.theme-toggle-track {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: transparent !important;
    box-shadow: none !important;
}

.theme-toggle__around {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    width: var(--toggle-icon) !important;
    height: var(--toggle-icon) !important;
    color: rgb(calc(226 - var(--theme-progress) * 13), calc(160 + var(--theme-progress) * 56), calc(52 + var(--theme-progress) * 181)) !important;
    opacity: 1 !important;
    filter: none !important;
    transform: translate3d(-50%, -50%, 0) rotate(calc(var(--theme-progress) * 150deg)) !important;
    transform-origin: center !important;
    transition: transform 260ms var(--qa-ease), color 260ms ease !important;
}

.theme-toggle.is-clicking {
    animation: qa-theme-button-pop 260ms var(--qa-ease);
}

@keyframes qa-theme-button-pop {
    0% { transform: scale(1); }
    45% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

@media (min-width: 761px) and (max-width: 980px) {
    .page-hero h1,
    .tarot-hero-copy h1 {
        font-size: 3rem !important;
        line-height: 1.05 !important;
        letter-spacing: 0 !important;
    }

    .article > h1 {
        max-width: 14ch !important;
        font-size: 3.4rem !important;
        line-height: 1.04 !important;
        letter-spacing: 0 !important;
    }

    .home-story-copy h3 {
        font-size: 3.6rem !important;
        line-height: 1.02 !important;
    }
}

@media (max-width: 760px) {
    body {
        font-size: 16px !important;
        line-height: 1.6 !important;
    }

    .site-header {
        min-height: 56px !important;
        padding: 0.55rem 0.72rem !important;
    }

    .site-header .brand {
        font-size: 0.8rem !important;
    }

    .site-header .header-actions {
        gap: 0.34rem !important;
        transform: none !important;
    }

    .theme-toggle {
        --toggle-icon: 18px;
        width: 38px !important;
        min-width: 38px !important;
        height: 38px !important;
        min-height: 38px !important;
    }

    .lang-toggle {
        min-height: 38px !important;
        padding: 0 0.72rem !important;
        font-size: 0.8rem !important;
    }

    .page-shell {
        width: min(100% - 1.25rem, 42rem) !important;
        padding-top: 5.4rem !important;
    }

    body.home .page-shell {
        width: 100% !important;
        padding-top: 0 !important;
    }

    .home-film-copy {
        left: 1.25rem !important;
        right: 1.25rem !important;
        bottom: 6.3rem !important;
    }

    .home-film-kicker {
        margin-bottom: 0.75rem !important;
        font-size: 0.78rem !important;
    }

    .home-film-copy h1 {
        max-width: 8ch !important;
        font-size: 3.1rem !important;
        line-height: 0.98 !important;
        letter-spacing: 0 !important;
    }

    .home-film-copy p {
        max-width: 22rem !important;
        margin-top: 0.85rem !important;
        font-size: 0.96rem !important;
        line-height: 1.55 !important;
    }

    .home-scroll-cue,
    .home-video-toggle {
        min-height: 42px !important;
    }

    .home-story-stream {
        width: min(100% - 1.25rem, 42rem) !important;
        padding: 4.4rem 0 6rem !important;
    }

    .home-story-intro {
        margin-bottom: 2rem !important;
    }

    .home-story-intro > span {
        font-size: 0.76rem !important;
    }

    .home-story-intro h2 {
        margin-top: 0.45rem !important;
        font-size: 2.5rem !important;
        line-height: 1.02 !important;
        letter-spacing: 0 !important;
    }

    .home-story-intro p {
        margin-top: 0.75rem !important;
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }

    .home-story {
        min-height: 26rem !important;
        border-radius: 24px !important;
    }

    .home-story-link {
        padding: 1.15rem !important;
    }

    .home-story-copy h3 {
        max-width: 12ch !important;
        font-size: 2.25rem !important;
        line-height: 1.04 !important;
        letter-spacing: 0 !important;
    }

    .home-story-copy p {
        margin-top: 0.8rem !important;
        font-size: 0.96rem !important;
        line-height: 1.62 !important;
    }

    .home-story-action {
        min-height: 44px !important;
        margin-top: 1rem !important;
        padding: 0 0.95rem !important;
    }

    .page-hero {
        min-height: 0 !important;
        padding: 1.1rem 0.5rem 1.55rem !important;
        background: transparent !important;
    }

    .page-hero .eyebrow,
    .tarot-hero-copy .hero-kicker {
        font-size: 0.78rem !important;
    }

    .page-hero h1,
    .tarot-hero-copy h1 {
        max-width: 100% !important;
        margin-top: 0.55rem !important;
        font-size: 2.4rem !important;
        line-height: 1.06 !important;
        letter-spacing: 0 !important;
        overflow-wrap: normal !important;
        word-break: keep-all !important;
    }

    .page-hero > p,
    .tarot-hero-copy > p {
        margin-top: 0.72rem !important;
        font-size: 0.96rem !important;
        line-height: 1.65 !important;
    }

    .notes-page-grid {
        gap: 0.72rem !important;
        padding-top: 0 !important;
    }

    .note-card {
        min-height: 0 !important;
        padding: 1rem !important;
        border-radius: 20px !important;
    }

    .note-card-date {
        font-size: 0.76rem !important;
    }

    .note-card h2,
    .note-card h3 {
        margin-top: 0.7rem !important;
        font-size: 1.14rem !important;
        line-height: 1.35 !important;
        letter-spacing: 0 !important;
    }

    .note-card p {
        margin-top: 0.5rem !important;
        font-size: 0.94rem !important;
        line-height: 1.6 !important;
    }

    .note-card-link {
        margin-top: 0.7rem !important;
        font-size: 0.86rem !important;
    }

    .article {
        width: 100% !important;
        padding: 0.7rem 0.85rem 1.5rem !important;
        border-radius: 22px !important;
    }

    .article-meta-row {
        align-items: center !important;
        margin-bottom: 0 !important;
    }

    .article-kicker,
    .article-back-link,
    .article-translate-toggle {
        font-size: 0.78rem !important;
    }

    .article > h1 {
        max-width: 12ch !important;
        margin-top: 1.45rem !important;
        font-size: 2.25rem !important;
        line-height: 1.08 !important;
        letter-spacing: 0 !important;
        overflow-wrap: normal !important;
        word-break: keep-all !important;
    }

    .article-content {
        gap: 0 !important;
        font-family: var(--font-ui) !important;
        font-size: 1rem !important;
        line-height: 1.82 !important;
    }

    .article-content p,
    .article-content li {
        color: var(--qa-ink) !important;
        font-size: 1rem !important;
        line-height: 1.82 !important;
    }

    .article-content > p:first-of-type {
        color: var(--qa-muted) !important;
        font-size: 1.03rem !important;
        line-height: 1.75 !important;
    }

    .article-content h2 {
        margin-top: 2.35rem !important;
        margin-bottom: 0.75rem !important;
        font-size: 1.55rem !important;
        line-height: 1.24 !important;
        letter-spacing: 0 !important;
    }

    .article-content h3 {
        margin-top: 2rem !important;
        font-size: 1.15rem !important;
        line-height: 1.35 !important;
    }

    .article-content blockquote {
        margin: 1.6rem 0 !important;
        padding-left: 1rem !important;
    }

    .article-content blockquote p {
        font-size: 1.05rem !important;
        line-height: 1.7 !important;
    }

    .article-source-list {
        gap: 0.55rem !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .article-source-list li,
    .article-source-list a {
        font-size: 0.9rem !important;
        line-height: 1.55 !important;
    }

    .comments-shell {
        width: 100% !important;
        margin-top: 2.5rem !important;
        padding: 0 !important;
    }

    .comments-topbar {
        align-items: flex-end !important;
        gap: 0.75rem !important;
        padding: 0 0.2rem 1rem !important;
        border: 0 !important;
    }

    .comments-topbar h2 {
        font-size: 1.38rem !important;
        line-height: 1.2 !important;
    }

    .comments-topbar > p {
        font-size: 0.85rem !important;
        line-height: 1.45 !important;
    }

    .comments-grid {
        display: block !important;
    }

    .comments-empty-inline {
        display: none !important;
    }

    .comments-compose-panel {
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .comment-form-wrap-v4 {
        padding: 1rem !important;
        border: 1px solid var(--qa-line) !important;
        border-radius: 20px !important;
        background: var(--qa-surface) !important;
        box-shadow: 0 16px 42px rgba(22,34,54,calc(0.08 + var(--theme-progress) * 0.1)) !important;
    }

    .comment-compose-head strong {
        font-size: 1.18rem !important;
    }

    .comment-compose-head p {
        font-size: 0.86rem !important;
    }

    .comment-reply-title {
        display: none !important;
    }

    .comment-form label {
        color: var(--qa-muted) !important;
        font-size: 0.86rem !important;
    }

    .comment-form textarea {
        width: 100% !important;
        min-height: 8.5rem !important;
        padding: 0.9rem !important;
        border-radius: 16px !important;
        color: var(--qa-ink) !important;
        background: rgba(255,255,255,calc(0.7 - var(--theme-progress) * 0.58)) !important;
        font-family: var(--font-ui) !important;
        font-size: 1rem !important;
        line-height: 1.65 !important;
    }

    .comment-form input[type="submit"],
    .comment-form button[type="submit"] {
        width: 100% !important;
        min-height: 44px !important;
        border-radius: 999px !important;
        font-size: 0.9rem !important;
    }

    .tarot-stage {
        width: 100% !important;
        padding: 1rem 0 2rem !important;
    }

    .tarot-layout {
        gap: 0.8rem !important;
    }

    .tarot-form {
        padding: 1rem !important;
        border-radius: 20px !important;
    }

    .tarot-form label > span,
    .tarot-form-helper {
        font-size: 0.86rem !important;
        line-height: 1.5 !important;
    }

    .tarot-form textarea {
        min-height: 7.5rem !important;
        padding: 0.85rem !important;
        border-radius: 16px !important;
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }

    .tarot-form select {
        min-height: 48px !important;
        padding: 0.75rem 0.9rem !important;
        border-radius: 16px !important;
        font-size: 0.98rem !important;
    }

    .tarot-form button {
        min-height: 44px !important;
        font-size: 0.9rem !important;
    }

    .tarot-table {
        min-height: 560px !important;
        padding: 0.9rem !important;
        border-radius: 20px !important;
    }

    .tarot-table-head p,
    .tarot-selection-copy,
    .tarot-table-hint {
        font-size: 0.84rem !important;
        line-height: 1.5 !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .home-film {
        transform: none;
    }

    .site-dock-link,
    .site-dock-toggle,
    .home-story-action {
        transition-duration: 0.01ms !important;
    }
}

[data-theme="dark"] {
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html::before,
html::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.28s linear;
}

html::before {
    opacity: calc(var(--theme-progress) * 0.94);
    background:
        radial-gradient(circle at 15% 10%, rgba(92, 116, 153, 0.22), transparent 24rem),
        radial-gradient(circle at 82% 16%, rgba(74, 92, 128, 0.18), transparent 21rem),
        linear-gradient(180deg, rgba(11, 15, 22, 0.18), rgba(9, 12, 18, 0.62));
}

html::after {
    opacity: calc((1 - var(--theme-progress)) * 0.8);
    background:
        radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.72), transparent 18rem),
        radial-gradient(circle at 84% 14%, rgba(223, 234, 247, 0.34), transparent 21rem);
}

body {
    margin: 0;
    color: var(--text);
    font-family: var(--font-ui);
    background:
        radial-gradient(circle at 12% 12%, rgba(calc(209 + (101 - 209) * var(--theme-progress)), calc(219 + (122 - 219) * var(--theme-progress)), calc(233 + (155 - 233) * var(--theme-progress)), calc(0.56 + (0.24 - 0.56) * var(--theme-progress))), transparent 23rem),
        radial-gradient(circle at 84% 10%, rgba(calc(255 + (84 - 255) * var(--theme-progress)), calc(255 + (97 - 255) * var(--theme-progress)), calc(255 + (131 - 255) * var(--theme-progress)), calc(0.76 + (0.18 - 0.76) * var(--theme-progress))), transparent 18rem),
        radial-gradient(circle at 50% 100%, rgba(calc(205 + (58 - 205) * var(--theme-progress)), calc(217 + (70 - 217) * var(--theme-progress)), calc(233 + (93 - 233) * var(--theme-progress)), calc(0.44 + (0.42 - 0.44) * var(--theme-progress))), transparent 28rem),
        linear-gradient(180deg, rgb(calc(247 + (15 - 247) * var(--theme-progress)), calc(249 + (19 - 249) * var(--theme-progress)), calc(252 + (25 - 252) * var(--theme-progress))) 0%, var(--bg) 36%, var(--bg-2) 100%);
    animation: page-fade 0.7s ease;
    transition: color 0.22s linear;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    z-index: 1;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: calc(0.18 + var(--theme-progress) * 0.06);
    background:
        radial-gradient(circle at 14% 12%, rgba(255,255,255,0.36), transparent 16rem),
        radial-gradient(circle at 84% 14%, rgba(208, 220, 239, 0.18), transparent 18rem),
        radial-gradient(circle at 50% 100%, rgba(126, 146, 178, 0.08), transparent 26rem);
    filter: blur(8px);
    transition: opacity 0.28s linear, background 0.28s linear;
}

body::after {
    content: "";
    position: fixed;
    inset: auto 0 -18vh;
    height: 42vh;
    pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(146, 161, 184, 0.16), transparent 68%);
    filter: blur(24px);
}

[data-theme="dark"] body::after {
    background: radial-gradient(ellipse at center, rgba(98, 116, 145, 0.18), transparent 70%);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.2rem;
    padding: 1.05rem clamp(1rem, 4vw, 3.4rem);
    background: var(--header-bg);
    border: 1px solid var(--header-border);
    border-top: 0;
    border-radius: 0 0 26px 26px;
    box-shadow: var(--header-shadow);
    backdrop-filter: blur(28px) saturate(150%);
    transition: background 0.18s linear, border-color 0.18s linear, box-shadow 0.18s linear;
}

[data-theme="dark"] .site-header {
    background: var(--header-bg);
    border-color: var(--header-border);
    box-shadow: var(--header-shadow);
}

body.admin-bar .site-header {
    top: 32px;
}

.brand {
    font-family: var(--font-display);
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: 0;
}

.nav {
    display: flex;
    justify-content: center;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.nav a {
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    color: var(--muted);
    transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    border: 1px solid transparent;
}

.nav a:hover {
    color: var(--text);
    background: rgba(255,255,255,0.72);
    border-color: rgba(255,255,255,0.72);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.78), 0 10px 20px rgba(71, 81, 98, 0.05);
}

.header-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.54rem;
}

.theme-toggle {
    position: relative;
    width: 5.3rem;
    height: 2.58rem;
    --toggle-pad: 0.17rem;
    --toggle-thumb-size: 2.08rem;
    --toggle-travel: calc(5.3rem - 2.08rem - 0.34rem);
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
    user-select: none;
}

.theme-toggle-track {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, calc(0.9 - var(--theme-progress) * 0.62));
    background: linear-gradient(180deg, #78c8fb 0%, #56acec 100%);
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,0.3),
        inset 0 -2px 0 rgba(0,0,0,0.14),
        0 14px 28px rgba(19, 27, 40, calc(0.1 + var(--theme-progress) * 0.12));
    backdrop-filter: blur(16px) saturate(168%);
    will-change: transform, box-shadow, filter;
    transition: border-color 0.26s linear, box-shadow 0.34s cubic-bezier(.22,1,.36,1), transform 0.34s cubic-bezier(.22,1,.36,1), filter 0.34s cubic-bezier(.22,1,.36,1);
}

.theme-toggle-track::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.28), rgba(255,255,255,0) 34%);
    pointer-events: none;
}

.theme-toggle-track::before {
    content: "";
    position: absolute;
    inset: auto 0.16rem 0.16rem 0.16rem;
    height: 0.54rem;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,0.44), rgba(255,255,255,0.14));
    opacity: calc(0.82 - var(--theme-progress) * 0.18);
    pointer-events: none;
    filter: blur(0.12rem);
}

.theme-toggle-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.theme-toggle-art .theme-toggle-sky,
.theme-toggle-art .theme-toggle-scene {
    transition: opacity 0.34s linear, transform 0.44s cubic-bezier(.22,1,.36,1);
    transform-origin: center;
}

.theme-toggle-art .theme-toggle-sky-day,
.theme-toggle-art .theme-toggle-scene-day {
    opacity: calc(1 - var(--theme-progress) * 1.08);
}

.theme-toggle-art .theme-toggle-sky-night,
.theme-toggle-art .theme-toggle-scene-night {
    opacity: calc(var(--theme-progress) * 1.08);
}

.theme-toggle-side-sun circle:last-of-type,
.theme-toggle-side-sun path {
    opacity: calc(0.9 - var(--theme-progress) * 0.84);
    transition: opacity 0.28s linear;
}

.theme-toggle-side-moon {
    opacity: calc(var(--theme-progress) * 0.96);
    transition: opacity 0.28s linear;
}

.theme-toggle-cloud {
    fill: rgba(247, 252, 255, 0.96);
    filter: drop-shadow(0 0.18rem 0.2rem rgba(255,255,255,0.12));
    opacity: calc(0.94 - var(--theme-progress) * 1.5);
}

.theme-toggle-cloud-a { animation: toggle-cloud-drift-a var(--cloud-duration-a, 96s) ease-in-out infinite alternate; }
.theme-toggle-cloud-b { animation: toggle-cloud-drift-b var(--cloud-duration-b, 112s) ease-in-out infinite alternate; }
.theme-toggle-cloud-c { animation: toggle-cloud-drift-c var(--cloud-duration-c, 88s) ease-in-out infinite alternate; }

.theme-toggle-stars .theme-toggle-star {
    stroke: rgba(255,255,255,0.94);
    stroke-width: 1.25;
    stroke-linecap: round;
    opacity: calc(0.18 + var(--theme-progress) * 0.78);
    transform-box: fill-box;
    transform-origin: center;
}

.theme-toggle-star-a { transform: translate(28px, 13px); animation: toggle-star-soft-a var(--star-duration-a, 89s) ease-in-out infinite; }
.theme-toggle-star-b { transform: translate(42px, 20px); animation: toggle-star-soft-b var(--star-duration-b, 103s) ease-in-out infinite; }
.theme-toggle-star-c { transform: translate(55px, 14px); animation: toggle-star-soft-c var(--star-duration-c, 97s) ease-in-out infinite; }
.theme-toggle-star-d { transform: translate(70px, 24px); animation: toggle-star-soft-d var(--star-duration-d, 118s) ease-in-out infinite; }

.theme-toggle-thumb {
    position: absolute;
    left: var(--toggle-pad);
    top: var(--toggle-pad);
    width: var(--toggle-thumb-size);
    height: var(--toggle-thumb-size);
    border-radius: 999px;
    background:
        linear-gradient(
            180deg,
            rgba(calc(255 + (192 - 255) * var(--theme-progress)), calc(209 + (203 - 209) * var(--theme-progress)), calc(58 + (220 - 58) * var(--theme-progress)), 0.98),
            rgba(calc(245 + (150 - 245) * var(--theme-progress)), calc(181 + (160 - 181) * var(--theme-progress)), calc(44 + (185 - 44) * var(--theme-progress)), 0.98)
        );
    border: 1px solid rgba(calc(255 + (213 - 255) * var(--theme-progress)), calc(243 + (220 - 243) * var(--theme-progress)), calc(170 + (227 - 170) * var(--theme-progress)), calc(0.9 - var(--theme-progress) * 0.14));
    box-shadow:
        0 10px 22px rgba(21, 28, 40, calc(0.14 + var(--theme-progress) * 0.16)),
        inset 0 1px 0 rgba(255,255,255,0.58),
        inset 0 -0.24rem 0.42rem rgba(calc(222 + (124 - 222) * var(--theme-progress)), calc(180 + (133 - 180) * var(--theme-progress)), calc(28 + (166 - 28) * var(--theme-progress)), calc(0.14 + var(--theme-progress) * 0.08));
    will-change: transform, box-shadow, background;
    transform: translateX(calc(var(--theme-progress) * var(--toggle-travel)));
    transition: transform 0.34s cubic-bezier(.2,.9,.25,1), background 0.26s linear, border-color 0.24s linear, box-shadow 0.28s cubic-bezier(.22,1,.36,1);
}

.theme-toggle-thumb-gloss {
    position: absolute;
    inset: 0.16rem;
    border-radius: inherit;
    background:
        radial-gradient(circle at 34% 24%, rgba(255,255,255,0.58), transparent 34%),
        linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0.02));
    opacity: calc(0.48 - var(--theme-progress) * 0.08);
}

.theme-toggle-thumb-core {
    position: absolute;
    inset: 0.38rem;
    border-radius: inherit;
    background:
        radial-gradient(circle at 34% 30%, rgba(255,255,255,0.32), transparent 26%),
        linear-gradient(180deg, rgba(calc(255 + (206 - 255) * var(--theme-progress)), calc(222 + (212 - 222) * var(--theme-progress)), calc(118 + (220 - 118) * var(--theme-progress)), calc(0.16 + var(--theme-progress) * 0.08)), rgba(255,255,255,0.01));
    opacity: calc(0.36 - var(--theme-progress) * 0.1);
}

.theme-toggle-thumb > .theme-toggle-moon-cut,
.theme-toggle-thumb > .theme-toggle-sun-core {
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.theme-toggle-thumb > .theme-toggle-sun-core {
    inset: 0.4rem;
    background:
        radial-gradient(circle at 50% 50%, rgba(calc(255 + (205 - 255) * var(--theme-progress)), calc(206 + (207 - 206) * var(--theme-progress)), calc(89 + (218 - 89) * var(--theme-progress)), 0.98) 0 62%, transparent 64%);
    opacity: calc(0.96 - var(--theme-progress) * 0.04);
    box-shadow: 0 0 0 0.06rem rgba(255, 235, 171, calc(0.38 - var(--theme-progress) * 0.16));
    transform: rotate(calc(var(--theme-progress) * 1turn)) scale(calc(1 - var(--theme-progress) * 0.06));
    transform-origin: center;
    will-change: transform, opacity, background;
    transition: opacity 0.3s ease, transform 0.46s cubic-bezier(.22,1,.36,1), background 0.3s linear;
}

.theme-toggle-thumb > .theme-toggle-moon-cut {
    width: 1.62rem;
    height: 1.62rem;
    left: -0.02rem;
    top: -0.28rem;
    background: radial-gradient(circle at 42% 38%, rgba(42, 47, 63, calc(var(--theme-progress) * 0.98)), rgba(16, 20, 31, calc(var(--theme-progress) * 0.99)) 78%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,calc(var(--theme-progress) * 0.04));
    opacity: calc(var(--theme-progress) * 0.98);
    transform: translateX(calc((1 - var(--theme-progress)) * 1rem)) translateY(calc((1 - var(--theme-progress)) * -0.48rem)) scale(calc(0.58 + var(--theme-progress) * 0.48));
    will-change: transform, opacity, background;
    transition: opacity 0.3s ease, transform 0.34s cubic-bezier(.22,1,.36,1), background 0.26s linear;
}

.theme-toggle-thumb::before,
.theme-toggle-thumb::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: rgba(174, 178, 188, calc(var(--theme-progress) * 0.88));
    opacity: calc(var(--theme-progress) * 0.95);
    transition: opacity 0.24s ease, transform 0.34s cubic-bezier(.2,.9,.25,1);
}

.theme-toggle-thumb::before {
    width: 0.22rem;
    height: 0.22rem;
    left: 0.8rem;
    top: 0.72rem;
    box-shadow:
        0.36rem 0.26rem 0 rgba(148, 153, 165, calc(var(--theme-progress) * 0.72)),
        0.58rem -0.08rem 0 rgba(136, 142, 154, calc(var(--theme-progress) * 0.62));
}

.theme-toggle-thumb::after {
    inset: 0;
    background: radial-gradient(circle at 34% 26%, rgba(255,255,255,calc(0.34 - var(--theme-progress) * 0.08)), transparent 28%);
    opacity: 1;
}

.theme-toggle:hover .theme-toggle-track {
    transform: translateY(-1px);
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,0.34),
        inset 0 -2px 0 rgba(0,0,0,0.12),
        0 18px 32px rgba(19, 27, 40, calc(0.12 + var(--theme-progress) * 0.14));
}

.theme-toggle:hover .theme-toggle-thumb {
    box-shadow:
        0 14px 26px rgba(21, 28, 40, calc(0.14 + var(--theme-progress) * 0.18)),
        inset 0 1px 0 rgba(255,255,255,0.96),
        inset 0 -8px 14px rgba(calc(206 + (114 - 206) * var(--theme-progress)), calc(214 + (125 - 214) * var(--theme-progress)), calc(225 + (154 - 225) * var(--theme-progress)), calc(0.16 + var(--theme-progress) * 0.1));
}

.lang-toggle-icon {
    width: 1rem;
    height: 1rem;
    opacity: 0.84;
    stroke-width: 1.9;
}

.theme-toggle.is-dragging .theme-toggle-track,
.theme-toggle.is-dragging .theme-toggle-thumb,
.theme-toggle.is-dragging .theme-toggle-art .theme-toggle-sky,
.theme-toggle.is-dragging .theme-toggle-art .theme-toggle-scene {
    transition: none;
}

.is-theme-dragging body,
.is-theme-dragging .site-header,
.is-theme-dragging .glass-card,
.is-theme-dragging .card,
.is-theme-dragging .note-card,
.is-theme-dragging .article,
.is-theme-dragging .reading-box,
.is-theme-dragging .tarot-form,
.is-theme-dragging .tarot-history-item,
.is-theme-dragging .comment-card,
.is-theme-dragging .comment-form-wrap-v4,
.is-theme-dragging .button,
.is-theme-dragging .lang-toggle,
.is-theme-dragging .lang-menu-list,
.is-theme-dragging .nav a {
    transition: none !important;
}

.lang-menu {
    position: relative;
    justify-self: end;
}

.lang-menu summary {
    list-style: none;
}

.lang-menu summary::-webkit-details-marker {
    display: none;
}

.lang-toggle {
    min-width: 5.8rem;
    min-height: 2.24rem;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.58rem;
    padding: 0.46rem 0.78rem;
    border-radius: 999px;
    border: 1px solid var(--menu-border);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.04)),
        var(--menu-surface-bg);
    color: var(--text);
    font-size: 0.84rem;
    cursor: pointer;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.5),
        var(--menu-shadow);
    backdrop-filter: blur(24px) saturate(150%);
    transition: background 0.18s linear, border-color 0.18s linear, box-shadow 0.18s linear, color 0.18s linear;
}

.lang-caret {
    width: 0.88rem;
    height: 0.88rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.74;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.lang-menu[open] .lang-caret {
    transform: rotate(180deg);
    opacity: 1;
}

@keyframes toggle-cloud-drift-a {
    0% { transform: translateX(-2px) translateY(0); }
    50% { transform: translateX(8px) translateY(-1px); }
    100% { transform: translateX(14px) translateY(0); }
}

@keyframes toggle-cloud-drift-b {
    0% { transform: translateX(-5px) translateY(0); }
    50% { transform: translateX(5px) translateY(-1px); }
    100% { transform: translateX(11px) translateY(0); }
}

@keyframes toggle-cloud-drift-c {
    0% { transform: translateX(-3px) translateY(0); }
    50% { transform: translateX(4px) translateY(-0.5px); }
    100% { transform: translateX(9px) translateY(0); }
}

@keyframes toggle-star-soft-a {
    0%, 100% { opacity: calc(0.18 + var(--theme-progress) * 0.52); }
    38% { opacity: calc(0.3 + var(--theme-progress) * 0.9); }
    45% { opacity: calc(0.22 + var(--theme-progress) * 0.58); }
}

@keyframes toggle-star-soft-b {
    0%, 100% { opacity: calc(0.14 + var(--theme-progress) * 0.46); }
    52% { opacity: calc(0.28 + var(--theme-progress) * 0.92); }
    60% { opacity: calc(0.18 + var(--theme-progress) * 0.54); }
}

@keyframes toggle-star-soft-c {
    0%, 100% { opacity: calc(0.16 + var(--theme-progress) * 0.48); }
    28% { opacity: calc(0.27 + var(--theme-progress) * 0.88); }
    35% { opacity: calc(0.17 + var(--theme-progress) * 0.56); }
}

@keyframes toggle-star-soft-d {
    0%, 100% { opacity: calc(0.2 + var(--theme-progress) * 0.44); }
    64% { opacity: calc(0.26 + var(--theme-progress) * 0.84); }
    73% { opacity: calc(0.16 + var(--theme-progress) * 0.5); }
}

/* MIT source adapted locally from @theme-toggles/react Around.css v4.1.0. */
.theme-toggle.theme-toggle--reversed .theme-toggle__around { transform: scaleX(-1); }

.theme-toggle {
    --theme-toggle__around--duration: 560ms;
    width: 2.52rem;
    height: 2.52rem;
    --toggle-pad: 0;
    --toggle-thumb-size: 0;
    --toggle-travel: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle-track {
    position: absolute;
    inset: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: rgb(calc(245 + (222 - 245) * var(--theme-progress)), calc(178 + (226 - 178) * var(--theme-progress)), calc(54 + (238 - 54) * var(--theme-progress)));
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,calc(0.78 - var(--theme-progress) * 0.54));
    background:
        radial-gradient(circle at 28% 22%, rgba(255,255,255,calc(0.72 - var(--theme-progress) * 0.54)), transparent 42%),
        linear-gradient(180deg,
            rgba(calc(255 + (41 - 255) * var(--theme-progress)), calc(255 + (48 - 255) * var(--theme-progress)), calc(255 + (65 - 255) * var(--theme-progress)), calc(0.86 + (0.78 - 0.86) * var(--theme-progress))),
            rgba(calc(238 + (14 - 238) * var(--theme-progress)), calc(244 + (19 - 244) * var(--theme-progress)), calc(252 + (30 - 252) * var(--theme-progress)), calc(0.62 + (0.7 - 0.62) * var(--theme-progress)))
        );
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,calc(0.78 - var(--theme-progress) * 0.58)),
        0 12px 26px rgba(19,27,40,calc(0.1 + var(--theme-progress) * 0.16));
    backdrop-filter: blur(18px) saturate(160%);
    transition: color 0.28s ease, background 0.28s linear, border-color 0.28s linear, box-shadow 0.28s ease, transform 0.28s ease;
}

.theme-toggle-track::before,
.theme-toggle-track::after {
    display: none;
}

.theme-toggle__around {
    width: 1.42rem;
    height: 1.42rem;
    display: block;
    overflow: visible;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,calc(0.08 + var(--theme-progress) * 0.2)));
}

.theme-toggle__around * {
    transform-origin: center;
    transition: transform calc(var(--theme-toggle__around--duration) * .6) ease;
}

.theme-toggle__around > g g circle {
    transition-duration: calc(var(--theme-toggle__around--duration) * .2);
}

.theme-toggle__around > g g :nth-child(1) { transition-delay: calc(var(--theme-toggle__around--duration) * .253); }
.theme-toggle__around > g g :nth-child(2) { transition-delay: calc(var(--theme-toggle__around--duration) * .348); }
.theme-toggle__around > g g :nth-child(3) { transition-delay: calc(var(--theme-toggle__around--duration) * .443); }
.theme-toggle__around > g g :nth-child(4) { transition-delay: calc(var(--theme-toggle__around--duration) * .538); }
.theme-toggle__around > g g :nth-child(5) { transition-delay: calc(var(--theme-toggle__around--duration) * .633); }
.theme-toggle__around > g g :nth-child(6) { transition-delay: calc(var(--theme-toggle__around--duration) * .728); }

.theme-toggle__around > :first-child path {
    transition-property: transform, d;
}

.theme-toggle--toggled.theme-toggle .theme-toggle__around * {
    transition-delay: 0s;
    transition-duration: var(--theme-toggle__around--duration);
}

.theme-toggle--toggled.theme-toggle .theme-toggle__around > g > circle {
    transform: scale(1.4);
}

.theme-toggle--toggled.theme-toggle .theme-toggle__around > g g circle {
    transform: scale(0);
    transition-duration: calc(var(--theme-toggle__around--duration) * .4);
}

.theme-toggle--toggled.theme-toggle .theme-toggle__around > :first-child {
    transform: rotate(-90deg);
}

.theme-toggle--toggled.theme-toggle .theme-toggle__around > :first-child path {
    d: path("M-12-14h42v30a1 1 0 00-16 13H0Z");
}

@supports not (d: path("")) {
    .theme-toggle--toggled.theme-toggle .theme-toggle__around:first-child path {
        transform: translate3d(-12px, -14px, 0);
    }
}

.theme-toggle:hover .theme-toggle-track {
    transform: translateY(-1px);
}

.theme-toggle.is-dragging .theme-toggle-track,
.theme-toggle.is-dragging .theme-toggle__around * {
    transition: none;
}

.lang-menu-list {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    min-width: 8.2rem;
    padding: 0.38rem;
    display: grid;
    gap: 0.18rem;
    border-radius: 16px;
    border: 1px solid var(--menu-border);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.04)),
        var(--menu-list-bg);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.44),
        var(--shadow);
    backdrop-filter: blur(24px) saturate(145%);
    transition: background 0.18s linear, border-color 0.18s linear, box-shadow 0.18s linear;
}

.lang-option {
    border: 0;
    background: transparent;
    color: var(--text);
    text-align: left;
    padding: 0.62rem 0.72rem;
    border-radius: 12px;
    cursor: pointer;
    font: inherit;
}

.lang-option:hover {
    background: rgba(0,0,0,0.04);
}

[data-theme="dark"] .nav a:hover,
[data-theme="dark"] .lang-option:hover {
    background: rgba(255,255,255,0.08);
}

[data-theme="dark"] .lang-toggle {
    border-color: var(--menu-border);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02)),
        var(--menu-surface-bg);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.1),
        var(--menu-shadow);
}

[data-theme="dark"] .lang-menu-list {
    border-color: var(--menu-border);
    background: var(--menu-list-bg);
}

.page-shell,
.site-footer {
    width: min(1160px, calc(100% - 2rem));
    margin: 0 auto;
}

.hero,
.page-hero {
    padding: clamp(3.8rem, 8vw, 6.5rem) 0;
}

.section-tight {
    padding-top: 0;
}

.hero {
    min-height: clamp(32rem, 76vh, 40rem);
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(300px, 0.82fr);
    gap: clamp(1.6rem, 5vw, 3rem);
    align-items: center;
    position: relative;
}

h1 {
    margin: 0.65rem 0 1.05rem;
    font-family: var(--font-display);
    font-size: clamp(3.15rem, 7vw, 6rem);
    line-height: 0.94;
    letter-spacing: 0;
    font-weight: 720;
}

h2 {
    margin: 0.55rem 0 0.95rem;
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 3.8vw, 2.8rem);
    line-height: 1.1;
    letter-spacing: 0;
    font-weight: 690;
}

h3 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.14rem;
    line-height: 1.28;
    letter-spacing: 0;
    font-weight: 680;
}

p {
    margin: 0;
    color: var(--muted);
    line-height: 1.78;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    padding: 0;
    border-radius: 0;
    border: 0;
    background: transparent;
    color: #728092;
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0;
    text-transform: uppercase;
    box-shadow: none;
    backdrop-filter: none;
}

.eyebrow-meta {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 520;
    letter-spacing: 0;
}

.eyebrow-section {
    min-height: auto;
    padding: 0;
    border-radius: 0;
    border: 0;
    background: transparent;
    color: rgba(205, 214, 228, 0.84);
    box-shadow: none;
}

.button {
    min-height: 2.9rem;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.78rem 1.08rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.44);
    font-family: var(--font-display);
    font-weight: 660;
    letter-spacing: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
    border-color: rgba(255,255,255,0.62);
}

.button:disabled,
.button[disabled] {
    cursor: wait;
    opacity: 0.72;
    transform: none;
    box-shadow: none;
}

.button::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-120%);
    background: linear-gradient(100deg, transparent 15%, rgba(255,255,255,0.26) 48%, transparent 78%);
    transition: transform 0.6s ease;
}

.button:hover::after {
    transform: translateX(120%);
}

.ui-icon {
    width: 1rem;
    height: 1rem;
    display: inline-block;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.button-icon {
    width: 0.96rem;
    height: 0.96rem;
    opacity: 0.86;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.button:hover .button-icon {
    transform: translateX(1.5px);
    opacity: 1;
}

.inline-icon {
    width: 0.92rem;
    height: 0.92rem;
    opacity: 0.72;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.button.primary {
    color: #f8fafc;
    border-color: rgba(255,255,255,0.16);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.03)),
        var(--primary-btn-bg);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.18),
        var(--primary-btn-shadow);
}

.button.secondary {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.04)),
        var(--secondary-btn-bg);
    color: var(--text);
    border-color: var(--secondary-btn-border);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.5),
        var(--secondary-btn-shadow);
    backdrop-filter: blur(20px) saturate(152%);
}

.glass-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid var(--soft-surface-border);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.04)),
        var(--soft-surface-bg);
    box-shadow: var(--soft-surface-shadow);
    backdrop-filter: blur(28px) saturate(155%);
    transition: background 0.18s linear, border-color 0.18s linear, box-shadow 0.18s linear;
}

.glass-card::before,
.hero-panel::before,
.comment-card::before,
.comment-form-wrap-v4::before,
.tarot-history-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(140deg, rgba(255,255,255,0.18), rgba(255,255,255,0) 36%, rgba(255,255,255,0.03) 100%);
    pointer-events: none;
}

.hero-actions,
.tarot-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.6rem;
}

.hero-stack {
    display: grid;
    gap: 1rem;
}

.hero-home {
    min-height: clamp(30rem, 70vh, 37rem);
    align-items: center;
}

.hero-copy {
    display: grid;
    align-content: center;
    gap: 1rem;
    max-width: 40rem;
}

.hero-panel {
    position: relative;
    overflow: hidden;
    min-height: 11.8rem;
    padding: 1.35rem;
    border-radius: 16px;
    border: 1px solid rgba(219,227,238,0.72);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.15), rgba(255,255,255,0.04)),
        rgba(252,253,255,0.68);
    box-shadow: 0 14px 30px rgba(36,44,57,0.06);
    backdrop-filter: blur(18px) saturate(135%);
    display: grid;
    align-content: start;
    gap: 0.88rem;
}

.hero-panel strong {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
}

.hero-panel-dark {
    background:
        radial-gradient(circle at 16% 18%, rgba(126,145,171,0.1), transparent 24rem),
        linear-gradient(180deg, rgba(34,40,50,0.95), rgba(22,27,35,0.98));
    color: #f3f6fa;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 20px 42px rgba(17, 22, 29, 0.2);
}

.hero-panel-spotlight {
    min-height: 16.8rem;
}

.hero-panel-dark p,
.hero-panel-dark h3,
.hero-panel-dark a {
    color: #edf2f8;
}

.hero-panel-dark .eyebrow {
    background: rgba(255,255,255,0.07);
    color: #d7dee8;
    border-color: rgba(255,255,255,0.12);
}

.hero-panel-meta {
    color: var(--muted);
    font-size: 0.82rem;
}

.studio-rail {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

.studio-rail-home {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.studio-chip {
    padding: 1rem 1.1rem;
    display: grid;
    gap: 0.45rem;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.50), rgba(255,255,255,0.24));
    border: 1px solid rgba(255,255,255,0.58);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.78);
    backdrop-filter: blur(18px) saturate(140%);
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.45rem;
}

.hero-mini-card {
    padding: 1.3rem;
    display: grid;
    gap: 0.8rem;
}

.hero-mini-card-dark {
    background:
        linear-gradient(180deg, rgba(43,56,81,0.82), rgba(33,43,64,0.88)),
        var(--panel);
    color: #f5efe5;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 22px 48px rgba(53, 71, 101, 0.20);
}

.hero-mini-card-dark p,
.hero-mini-card-dark h3 {
    color: #eee7dc;
}

.hero-mini-card-dark .eyebrow {
    background: rgba(255,255,255,0.1);
    color: #e6dbc8;
    border-color: rgba(255,255,255,0.12);
}

.section { padding: clamp(2.8rem, 7vw, 5.4rem) 0; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.card {
    padding: 1.2rem;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.18s linear, border-color 0.18s linear;
}

.card:hover,
.note-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--soft-surface-hover-shadow);
}

.notes-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.notes-card-grid-featured .note-card:nth-child(1) {
    grid-column: span 2;
}

.note-card {
    overflow: hidden;
    padding: 1.4rem;
    display: grid;
    gap: 0.96rem;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.18s linear, border-color 0.18s linear;
    min-height: 15.8rem;
    align-content: start;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.03)),
        var(--soft-surface-bg);
    border: 1px solid var(--soft-surface-border);
    box-shadow: var(--soft-surface-shadow);
}

.note-card-date {
    font-size: 0.78rem;
    color: var(--muted);
    letter-spacing: 0;
}

.note-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--text);
}

.note-card-link:hover {
    color: var(--accent);
}

.note-card-link:hover .inline-icon {
    transform: translateX(1.5px);
    opacity: 1;
}

.article {
    overflow: hidden;
    padding: clamp(1.35rem, 3.5vw, 2rem);
    margin: clamp(2.4rem, 6vw, 4rem) auto;
    display: grid;
    gap: 1.2rem;
    border-radius: 18px;
}

.article-meta-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.2rem;
    flex-wrap: wrap;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(193, 205, 224, 0.18);
}

.article-meta-cluster {
    display: grid;
    align-items: start;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.article-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    font-size: 0.73rem;
    line-height: 1.2;
    letter-spacing: 0;
    color: var(--muted);
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    font-size: 0.78rem;
    line-height: 1.2;
    letter-spacing: 0;
    color: var(--muted);
    font-weight: 560;
}

.article-kicker {
    font-weight: 560;
    text-transform: uppercase;
}

.section-kicker {
    font-weight: 620;
    text-transform: uppercase;
}

.section-kicker::before {
    content: "";
    width: 0.22rem;
    height: 0.22rem;
    border-radius: 999px;
    background: rgba(144, 160, 186, 0.72);
}

.section-kicker-icon::before {
    display: none;
}

.badge-icon {
    width: 0.88rem;
    height: 0.88rem;
    opacity: 0.86;
    stroke-width: 1.72;
}

.hero-kicker .badge-icon,
.section-kicker .badge-icon {
    color: #90a4c4;
}

[data-theme="dark"] .hero-kicker .badge-icon,
[data-theme="dark"] .section-kicker .badge-icon {
    color: #d4def0;
}

.article-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.4;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.article-back-link:hover {
    color: var(--text);
    opacity: 0.92;
}

.article-back-link:hover .inline-icon {
    transform: translateX(-1.5px);
    opacity: 1;
}

.article-translate-menu {
    position: relative;
}

.article-translate-toggle {
    min-width: auto;
    min-height: 1.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    padding: 0.28rem 0.1rem 0.28rem 0.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.46);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.04)),
        rgba(247,250,255,0.42);
    color: var(--text);
    font-size: 0.82rem;
    cursor: pointer;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.44),
        0 8px 18px rgba(35, 43, 57, 0.05);
    backdrop-filter: blur(18px) saturate(142%);
    transition: background 0.2s ease, color 0.2s ease;
}

.article-translate-toggle:hover {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.2), rgba(255,255,255,0.05)),
        rgba(247,250,255,0.52);
}

.article-translate-menu.is-open .article-translate-list {
    display: grid;
}

.article-translate-list {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    min-width: 8rem;
    padding: 0.38rem;
    display: none;
    gap: 0.18rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.54);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.04)),
        rgba(247,250,255,0.76);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.46),
        var(--shadow);
    z-index: 4;
    backdrop-filter: blur(22px) saturate(145%);
}

.article-translate-option {
    border: 0;
    background: transparent;
    color: var(--text);
    text-align: left;
    padding: 0.62rem 0.72rem;
    border-radius: 12px;
    cursor: pointer;
    font: inherit;
}

.article-translate-option:hover {
    background: rgba(0,0,0,0.04);
}

/* Keep the article language menu above the article surface and usable on short screens. */
body.single .page-shell,
body.single .article {
    overflow: visible;
}

body.single .article {
    position: relative;
    z-index: 1;
}

.article-meta-row,
.article-translate-menu {
    position: relative;
    z-index: 12;
}

.article-translate-list {
    max-height: min(22rem, var(--article-translate-max-height, calc(100dvh - 7rem)));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(116, 132, 158, 0.42) transparent;
}

.article-translate-menu.opens-upward .article-translate-list {
    top: auto;
    bottom: calc(100% + 0.5rem);
}

.article-translate-list::-webkit-scrollbar {
    width: 6px;
}

.article-translate-list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(116, 132, 158, 0.42);
}

.article-translate-list::-webkit-scrollbar-track {
    background: transparent;
}

.article-translate-option:focus-visible {
    background: rgba(109, 130, 164, 0.1);
    outline-offset: -2px;
}

.article-content {
    display: grid;
    gap: 1.08rem;
    color: var(--text);
    line-height: 1.88;
    font-size: 1.04rem;
    font-family: var(--font-reading);
}

.article-content p,
.article-content li {
    color: var(--text);
}

.article-content h2,
.article-content h3 {
    margin-top: 0.45rem;
    font-family: var(--font-display);
}

.article-content.is-translating {
    opacity: 0.58;
    transition: opacity 0.22s ease;
}

.article-content-status {
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.comments-shell {
    padding: clamp(1.2rem, 3.4vw, 1.85rem);
    margin: 0 auto clamp(3rem, 7vw, 4.5rem);
    display: grid;
    gap: 1.25rem;
}

.comments-head {
    display: grid;
    gap: 0.5rem;
}

.comment-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.9rem;
}

.comment-list .comment {
    list-style: none;
    padding: 1rem 1.05rem;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.72);
}

.comment-meta {
    margin-bottom: 0.55rem;
    font-size: 0.88rem;
}

.comment-metadata a,
.comment-author .fn {
    color: var(--text);
    font-style: normal;
    font-weight: 600;
}

.comment-content p {
    color: var(--text);
}

.comment-respond {
    display: grid;
    gap: 0.9rem;
}

.comment-reply-title {
    margin: 0;
    font-size: 1.25rem;
}

.comment-form {
    display: grid;
    gap: 0.9rem;
}

.comment-form label {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--muted);
    font-weight: 650;
}

.comment-form-note,
.comment-notes,
.logged-in-as {
    font-size: 0.92rem;
    color: var(--muted);
}

.comment-form-author,
.comment-form-email,
.comment-form-comment {
    margin: 0;
}

.comment-form-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 0.82rem 0.92rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.82);
    color: var(--text);
    font: inherit;
    outline: none;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form textarea:focus {
    border-color: rgba(80, 72, 74, 0.32);
    box-shadow: 0 0 0 4px rgba(80, 72, 74, 0.08);
}

.comment-form textarea {
    min-height: 10rem;
    resize: vertical;
}

.comment-form-cookies-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.comment-form-cookies-consent input {
    margin-top: 0.2rem;
}

.tarot-preview-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.3rem;
}

.tarot-stage { padding-bottom: 4.5rem; }

.tarot-stage-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 1.2rem;
    align-items: start;
    margin-bottom: 1.35rem;
}

.tarot-hero-copy {
    max-width: 760px;
}

.tarot-hero-copy h1 {
    max-width: 10ch;
    font-size: clamp(2.6rem, 5.4vw, 4.8rem);
    line-height: 0.98;
}

.tarot-hero-copy > p {
    max-width: 48rem;
}

.tarot-hero-note,
.tarot-page-closing {
    margin-top: 1rem;
    max-width: 760px;
}

.tarot-page-closing {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    font-size: 0.96rem;
}

.tarot-layout {
    display: grid;
    grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
    gap: 1.45rem;
    align-items: start;
}

.tarot-form,
.reading-box {
    padding: 1.28rem;
    border-radius: 16px;
}

.tarot-form {
    position: sticky;
    top: 5.6rem;
    display: grid;
    gap: 0.92rem;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.05)),
        rgba(252,253,255,0.7);
    border: 1px solid rgba(220,228,239,0.74);
    box-shadow: 0 14px 28px rgba(31,39,52,0.06);
    backdrop-filter: blur(14px) saturate(128%);
}

.tarot-form-helper {
    margin: -0.1rem 0 0.1rem;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

label span {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--muted);
    font-weight: 650;
}

textarea,
select {
    width: 100%;
    padding: 0.82rem 0.92rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.72);
    background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(245,248,252,0.7));
    color: var(--text);
    font: inherit;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.78);
}

textarea:focus,
select:focus {
    border-color: rgba(178, 184, 194, 0.92);
    box-shadow: 0 0 0 4px rgba(178, 184, 194, 0.14);
}

.tarot-form-note {
    margin-top: 0.9rem;
    font-size: 0.92rem;
}

.tarot-table {
    position: relative;
    isolation: isolate;
    min-height: 42rem;
    padding: 1.4rem;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 14%, rgba(192, 202, 216, 0.08), transparent 18rem),
        radial-gradient(circle at 18% 18%, rgba(90, 104, 124, 0.1), transparent 18rem),
        linear-gradient(180deg, rgba(18, 23, 31, 0.985), rgba(24, 30, 38, 0.99));
    color: #e8edf4;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 20px 44px rgba(15,20,29,0.2), inset 0 1px 0 rgba(255,255,255,0.06);
}

.tarot-table-wrap {
    position: relative;
}

.tarot-table-head {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.2rem;
    margin-bottom: 1.15rem;
}

.tarot-table-head > div {
    display: grid;
    gap: 0.42rem;
}

.tarot-table-hint {
    margin: 0;
    color: #b6c0cc;
    font-size: 0.9rem;
    line-height: 1.55;
}

.tarot-selection-copy {
    max-width: 19rem;
    text-align: left;
    color: #c4ced8;
    font-size: 0.94rem;
    line-height: 1.58;
    margin: 0;
}

.tarot-spread-zone {
    position: relative;
    z-index: 1;
    min-height: 7.8rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 2.45rem;
}

.spread-slot {
    min-height: 7.2rem;
    display: grid;
    align-content: center;
    gap: 0.42rem;
    padding: 0.92rem 0.96rem;
    border-radius: 12px;
    border: 1px dashed rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.04);
    color: #d1d9e4;
    backdrop-filter: blur(12px);
}

.spread-slot strong { color: #eef3f8; }

.spread-slot.is-filled {
    background: rgba(255,255,255,0.08);
    border-style: solid;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 10px 18px rgba(0, 0, 0, 0.08);
}

.tarot-deck-fan {
    position: relative;
    z-index: 1;
    width: min(100%, 920px);
    min-height: 32rem;
    margin: 0 auto;
}

.tarot-deck-fan.is-stacked::before {
    opacity: 0.45;
    transform: translateX(-50%) scale(0.82);
}

.tarot-deck-fan.is-shuffling::before,
.tarot-deck-fan.is-drawing::before {
    opacity: 0.88;
    transform: translateX(-50%) scale(1.04);
}

.tarot-deck-fan::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 1.5rem;
    width: min(82%, 34rem);
    height: 12rem;
    transform: translateX(-50%);
    border-radius: 50%;
    border: 1px solid rgba(190, 202, 218, 0.14);
    border-bottom: 0;
    opacity: 0.75;
}

.tarot-deck-fan::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 2.8rem;
    width: min(76%, 26rem);
    height: 6rem;
    transform: translateX(-50%);
    border-radius: 999px;
    background: radial-gradient(circle, rgba(196, 206, 220, 0.11), rgba(196, 206, 220, 0));
    filter: blur(20px);
    pointer-events: none;
}

.deck-card {
    position: absolute;
    left: 50%;
    bottom: 1.5rem;
    width: clamp(116px, 9.4vw, 144px);
    aspect-ratio: 0.58;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    opacity: 0;
    transform: translateX(calc(-50% + var(--deck-shift, var(--card-shift)))) translateY(var(--deck-lift, 0px)) rotate(var(--deck-rotate, var(--card-rotate)));
    transform-origin: center 96%;
    transition: transform 0.9s cubic-bezier(0.16, 0.84, 0.24, 1), opacity 0.42s ease, z-index 0.2s ease, filter 0.3s ease;
    filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.22));
    transition-delay: calc(var(--fan-index, 0) * 30ms);
    touch-action: manipulation;
}

.tarot-deck-fan.is-stacked .deck-card {
    opacity: 1;
    --deck-shift: 0px;
    --deck-rotate: 0deg;
    --deck-lift: calc(var(--stack-depth) * -1.4px);
    cursor: default;
}

.tarot-deck-fan.is-shuffling .deck-card {
    opacity: 1;
    --deck-shift: calc((var(--fan-index) - 5.5) * 8px);
    --deck-rotate: calc((var(--fan-index) - 5.5) * 2.2deg);
    --deck-lift: calc(-26px - (var(--fan-index) % 4) * 5px);
    filter: drop-shadow(0 24px 34px rgba(0, 0, 0, 0.26));
    animation: deck-shuffle 0.9s ease-in-out infinite alternate;
}

.tarot-deck-fan.is-ready .deck-card {
    opacity: 1;
}

.tarot-deck-fan.is-ready .deck-card:hover {
    transform: translateX(calc(-50% + var(--card-shift))) translateY(-28px) rotate(calc(var(--card-rotate) * 0.42));
    z-index: 6;
}

.tarot-deck-fan.is-ready .deck-card.is-selected {
    transform: translateX(calc(-50% + var(--card-shift))) translateY(-48px) rotate(0deg);
    z-index: 8;
    filter: drop-shadow(0 0 24px rgba(240, 211, 156, 0.28)) drop-shadow(0 26px 36px rgba(0, 0, 0, 0.32));
    pointer-events: none;
}

.tarot-deck-fan.is-drawing .deck-card {
    opacity: 0.16;
    --deck-shift: calc(var(--card-shift) * 0.82);
    --deck-rotate: calc(var(--card-rotate) * 0.28);
    --deck-lift: -4px;
}

.tarot-deck-fan.is-drawing .deck-card.is-selected {
    opacity: 1;
    --deck-shift: var(--selected-shift, 0px);
    --deck-rotate: 0deg;
    --deck-lift: -164px;
    z-index: 10;
    filter: drop-shadow(0 0 26px rgba(245, 217, 165, 0.28)) drop-shadow(0 38px 48px rgba(0, 0, 0, 0.34));
}

.deck-card-inner,
.tarot-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.74s ease;
}

.deck-card.is-open .deck-card-inner,
.tarot-card.revealed .tarot-card-inner {
    transform: rotateY(180deg);
}

.deck-face,
.tarot-face {
    position: absolute;
    inset: 0;
    border-radius: 18px;
    backface-visibility: hidden;
    display: grid;
    place-items: center;
    gap: 0.4rem;
    padding: 1rem;
}

.deck-back,
.tarot-back {
    position: relative;
    background:
        radial-gradient(circle at 50% 30%, rgba(194, 205, 220, 0.13), transparent 24%),
        radial-gradient(circle at 30% 18%, rgba(96, 110, 129, 0.16), transparent 24%),
        linear-gradient(180deg, rgba(22, 26, 33, 0.98), rgba(30, 35, 42, 0.99));
    color: #dbe4ef;
    border: 1px solid rgba(198, 210, 225, 0.2);
    box-shadow: 0 16px 30px rgba(11, 14, 19, 0.24);
    text-transform: uppercase;
    letter-spacing: 0;
    font-size: 0.74rem;
}

.deck-back::before,
.tarot-back::before {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 14px;
    border: 1px solid rgba(192, 204, 220, 0.18);
}

.deck-back-mark {
    font-size: 1.95rem;
    letter-spacing: 0;
}

.deck-front,
.tarot-front {
    transform: rotateY(180deg);
    position: relative;
    background:
        linear-gradient(180deg, rgba(251,252,253,0.985), rgba(241,245,249,0.98)),
        radial-gradient(circle at top, rgba(185, 197, 214, 0.08), transparent 44%);
    border: 1px solid rgba(186, 194, 207, 0.24);
    color: var(--text);
    box-shadow: 0 16px 30px rgba(35, 43, 56, 0.12);
}

.deck-front::before,
.tarot-front::before {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 14px;
    border: 1px solid rgba(126, 139, 158, 0.16);
}

.deck-card-name,
.deck-card-meta {
    position: relative;
    z-index: 1;
}

.deck-card-art {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 70%;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(201, 188, 168, 0.30);
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(244,240,233,0.92));
    box-shadow: 0 12px 24px rgba(62, 54, 43, 0.10);
}

.deck-card-name {
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
}

.deck-card-meta {
    font-size: 0.74rem;
    color: var(--muted);
}

.tarot-result {
    display: grid;
    gap: 0.95rem;
    margin-top: 1.35rem;
}

.tarot-history {
    margin-top: 1.2rem;
    padding: 1.08rem;
    border-radius: 16px;
    display: grid;
    gap: 0.9rem;
}

.tarot-history-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.tarot-history-head h2 {
    margin: 0.28rem 0 0.22rem;
    font-size: clamp(1.1rem, 2vw, 1.34rem);
    line-height: 1.2;
}

.tarot-history-head p {
    max-width: 30rem;
    margin: 0;
    font-size: 0.92rem;
    color: var(--muted);
}

.tarot-history-list {
    display: grid;
    gap: 0.75rem;
}

.tarot-history-group {
    display: grid;
    gap: 0.75rem;
}

.tarot-history-item {
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.8rem;
    align-items: center;
    padding: 0.98rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(223,229,238,0.58);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.03)),
        rgba(252,253,255,0.52);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.46);
}

.tarot-history-meta {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.84rem;
    margin-bottom: 0.45rem;
}

.tarot-history-meta .eyebrow {
    padding: 0.34rem 0.6rem;
    font-size: 0.7rem;
}

.tarot-history-copy {
    min-width: 0;
}

.tarot-history-copy strong {
    display: block;
    font-size: 0.96rem;
    line-height: 1.45;
    color: var(--text);
    margin-bottom: 0.24rem;
}

.tarot-history-copy p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
}

.tarot-history-more {
    display: grid;
    gap: 0.75rem;
}

.tarot-history-more:not([open]) .tarot-history-group-hidden {
    display: none;
}

.tarot-history-more[open] {
    padding-top: 0.15rem;
}

.tarot-history-more-toggle {
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--muted);
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
}

.tarot-history-more-toggle::-webkit-details-marker {
    display: none;
}

.tarot-history-more-toggle::before {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    transition: transform 0.2s ease;
}

.tarot-history-more[open] .tarot-history-more-toggle::before {
    transform: rotate(225deg) translateY(-1px);
}

.tarot-history-more-toggle span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.52);
    background: linear-gradient(180deg, rgba(255,255,255,0.7), rgba(255,255,255,0.34));
    color: var(--text);
    font-size: 0.76rem;
}

.tarot-result-meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.tarot-result-copy {
    min-width: 0;
    display: grid;
    gap: 0.38rem;
}

.tarot-result-copy strong {
    font-family: var(--font-display);
    font-size: 1.04rem;
    line-height: 1.4;
}

.tarot-result-copy p,
.tarot-result-meta p {
    margin: 0;
    max-width: 36rem;
    color: var(--muted);
}

.tarot-result-boundary {
    max-width: 16rem;
    font-size: 0.88rem;
    line-height: 1.55;
    text-align: right;
}

.tarot-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.tarot-card {
    min-height: 360px;
    perspective: 1200px;
    opacity: 0;
    transform: translateY(18px);
    animation: result-rise 0.7s ease forwards;
    animation-delay: calc(var(--result-index, 0) * 120ms);
}

.tarot-card-inner { min-height: 360px; }

.tarot-front {
    align-content: start;
    justify-items: start;
}

.tarot-front > * {
    position: relative;
    z-index: 1;
}

.tarot-front h3 { margin-top: 0.15rem; }

.tarot-card-copy {
    display: grid;
    gap: 0.5rem;
}

.tarot-card-copy p {
    margin: 0;
    color: var(--text);
}

.tarot-card-copy p:last-child {
    color: var(--muted);
}

.tarot-card-art {
    width: 100%;
    height: 15.4rem;
    object-fit: contain;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.64);
    box-shadow: 0 12px 26px rgba(91, 112, 146, 0.12), inset 0 1px 0 rgba(255,255,255,0.72);
    background: linear-gradient(180deg, rgba(255,255,255,0.84), rgba(244,248,255,0.62));
    padding: 0.35rem;
}

.reading-box {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.7), rgba(255,255,255,0.36)),
        radial-gradient(circle at top right, rgba(214, 219, 228, 0.14), transparent 42%);
    border: 1px solid rgba(255,255,255,0.66);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.86), 0 20px 42px rgba(35, 42, 53, 0.06);
    backdrop-filter: blur(22px) saturate(145%);
}

.reading-box p {
    font-size: 0.98rem;
    line-height: 1.72;
}

.reading-box strong {
    font-size: 0.98rem;
}

.tarot-meaning-box {
    display: grid;
    gap: 0.42rem;
}

.ai-chat-panel {
    display: grid;
    gap: 1rem;
}

.ai-chat-head {
    display: grid;
    gap: 0.35rem;
}

.ai-chat-log {
    display: grid;
    gap: 0.8rem;
    max-height: 26rem;
    overflow: auto;
    padding-right: 0.25rem;
}

.ai-chat-bubble {
    display: grid;
    gap: 0.48rem;
    padding: 0.82rem 0.9rem;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.58);
    background: linear-gradient(180deg, rgba(255,255,255,0.66), rgba(255,255,255,0.32));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.78);
    backdrop-filter: blur(18px) saturate(140%);
}

.ai-chat-bubble.is-user {
    margin-left: 2rem;
    background: linear-gradient(180deg, rgba(236,239,243,0.86), rgba(225,230,236,0.62));
}

.ai-chat-bubble.is-assistant {
    margin-right: 2rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.66), rgba(255,255,255,0.34));
}

.ai-chat-content {
    color: var(--text);
    line-height: 1.68;
    font-size: 0.96rem;
}

.ai-chat-empty {
    font-size: 0.92rem;
}

.ai-chat-remaining {
    margin: 0.1rem 0 0;
    font-size: 0.84rem;
    color: var(--muted);
}

.ai-chat-compose textarea {
    min-height: 6.2rem;
    resize: vertical;
}

.article-content.is-translating,
.comment-form textarea:disabled,
.ai-chat-compose textarea:disabled {
    opacity: 0.74;
}

.ai-chat-actions {
    margin-top: 0;
}

[data-theme="dark"] .eyebrow {
    border-color: rgba(255,255,255,0.15);
    background: linear-gradient(180deg, rgba(52,60,75,0.78), rgba(33,39,50,0.56));
    color: #c1cad7;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}

[data-theme="dark"] .eyebrow-meta {
    border: 0;
    background: transparent;
    box-shadow: none;
    color: rgba(198, 208, 223, 0.72);
}

[data-theme="dark"] .eyebrow-section {
    border-color: rgba(255,255,255,0.1);
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.025));
    color: rgba(225, 232, 243, 0.84);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

[data-theme="dark"] .article-kicker,
[data-theme="dark"] .section-kicker,
[data-theme="dark"] .hero-kicker {
    color: rgba(196, 206, 220, 0.76);
}

[data-theme="dark"] .section-kicker::before {
    background: rgba(143, 159, 185, 0.64);
}

[data-theme="dark"] .article {
    border-color: var(--soft-surface-border);
    background: var(--soft-surface-bg);
    box-shadow: var(--soft-surface-shadow);
}

[data-theme="dark"] .article-meta-row {
    border-bottom-color: rgba(132, 146, 170, 0.14);
}

[data-theme="dark"] .article-translate-toggle {
    color: rgba(229, 235, 244, 0.88);
}

/* Editorial reading pass: quiet hierarchy, generous measure, fewer surfaces. */
body.single .article {
    width: min(100% - 2.5rem, 50rem);
    margin-top: clamp(2.5rem, 6vw, 5.5rem);
    padding: clamp(1.5rem, 4.5vw, 3.8rem);
    gap: 1.6rem;
    border-color: rgba(162, 176, 198, 0.22);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(248, 250, 253, 0.42)),
        var(--soft-surface-bg);
}

body.single .article-meta-row {
    align-items: center;
    padding-bottom: 1rem;
}

body.single .article-meta-cluster {
    display: flex;
    align-items: center;
    gap: 0.65rem 0.9rem;
}

body.single .article > h1 {
    max-width: 13ch;
    margin: 0.35rem 0 0.65rem;
    font-size: clamp(2.25rem, 6vw, 4.85rem);
    line-height: 1.05;
    letter-spacing: 0;
    text-wrap: balance;
}

body.single .article-content {
    max-width: 43rem;
    gap: 0;
    font-size: clamp(1.03rem, 1.4vw, 1.16rem);
    line-height: 1.94;
}

body.single .article-content > p {
    margin: 0 0 1.35rem;
    text-wrap: pretty;
}

body.single .article-content > p:first-of-type {
    max-width: 39rem;
    margin-bottom: 2rem;
    color: var(--muted);
    font-family: var(--font-display);
    font-size: clamp(1.22rem, 2.1vw, 1.48rem);
    line-height: 1.6;
}

body.single .article-content > h2 {
    max-width: 32rem;
    margin: 3.25rem 0 1rem;
    font-size: clamp(1.45rem, 2.6vw, 2rem);
    line-height: 1.24;
}

body.single .article-content blockquote {
    margin: 2.2rem 0;
    padding: 0.7rem 0 0.7rem 1.25rem;
    border-left: 2px solid rgba(117, 141, 177, 0.65);
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 1.14em;
    line-height: 1.65;
}

body.single .article-content .article-sources {
    display: grid;
    gap: 0.35rem;
    margin: 3rem 0 0;
    padding-top: 1.15rem;
    border-top: 1px solid rgba(162, 176, 198, 0.22);
    background: transparent;
    box-shadow: none;
}

body.single .article-content .article-sources span {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 650;
}

body.single .article-content .article-sources a {
    width: fit-content;
    max-width: 100%;
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.55;
    text-decoration-color: rgba(117, 141, 177, 0.45);
    text-underline-offset: 0.22em;
}

[data-theme="dark"] body.single .article {
    border-color: rgba(177, 190, 211, 0.14);
    background:
        linear-gradient(145deg, rgba(37, 46, 61, 0.82), rgba(19, 25, 35, 0.58)),
        var(--soft-surface-bg);
}

[data-theme="dark"] body.single .article-content .article-sources {
    border-top-color: rgba(177, 190, 211, 0.16);
}

@media (max-width: 760px) {
    body.single .article {
        width: calc(100% - 1.25rem);
        margin-top: 1rem;
        padding: 1.25rem 1.1rem 1.8rem;
        border-radius: 20px !important;
    }

    body.single .article-meta-row {
        gap: 0.8rem;
        padding-bottom: 0.85rem;
    }

    body.single .article-meta-cluster {
        gap: 0.45rem 0.7rem;
    }

    body.single .article > h1 {
        max-width: 11ch;
        font-size: clamp(2.25rem, 12vw, 3.15rem) !important;
        line-height: 1.09;
    }

    body.single .article-content {
        font-size: 1rem !important;
        line-height: 1.86 !important;
    }

    body.single .article-content > p:first-of-type {
        margin-bottom: 1.7rem;
        font-size: 1.16rem !important;
        line-height: 1.62 !important;
    }

    body.single .article-content > h2 {
        margin-top: 2.45rem;
        font-size: 1.5rem !important;
    }
}

[data-theme="dark"] .article-translate-toggle:hover {
    background: rgba(255,255,255,0.06);
}

[data-theme="dark"] .button.primary {
    color: #f4f7fb;
    border-color: rgba(255,255,255,0.14);
    background: var(--primary-btn-bg);
    box-shadow: var(--primary-btn-shadow);
}

[data-theme="dark"] .button.secondary,
[data-theme="dark"] .glass-card,
[data-theme="dark"] .note-card,
[data-theme="dark"] .card,
[data-theme="dark"] .article,
[data-theme="dark"] .reading-box,
[data-theme="dark"] .tarot-form,
[data-theme="dark"] .tarot-history-item,
[data-theme="dark"] .ai-chat-bubble,
[data-theme="dark"] .comment-list .comment {
    border-color: var(--soft-surface-border);
    background: var(--soft-surface-bg);
    box-shadow: var(--soft-surface-shadow);
}

[data-theme="dark"] .hero-panel,
[data-theme="dark"] .studio-chip,
[data-theme="dark"] .hero-mini-card {
    border-color: rgba(255,255,255,0.14);
    background: linear-gradient(180deg, rgba(41,48,62,0.78), rgba(27,33,43,0.52));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 18px 40px rgba(0,0,0,0.18);
}

[data-theme="dark"] .hero-panel-dark,
[data-theme="dark"] .hero-mini-card-dark,
[data-theme="dark"] .tarot-table {
    border-color: rgba(255,255,255,0.16);
    background:
        radial-gradient(circle at 16% 18%, rgba(96, 116, 148, 0.08), transparent 24rem),
        linear-gradient(180deg, rgba(21, 26, 36, 0.985), rgba(14, 18, 25, 0.995));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.09), 0 22px 48px rgba(0,0,0,0.26);
}

[data-theme="dark"] .hero-panel-dark .button.secondary,
[data-theme="dark"] .hero-mini-card-dark .button.secondary {
    background: linear-gradient(180deg, rgba(53, 63, 81, 0.92), rgba(34, 42, 56, 0.9));
    border-color: rgba(255,255,255,0.12);
    color: #eef3f8;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 10px 22px rgba(0,0,0,0.16);
}

[data-theme="dark"] .hero-panel-dark .button.secondary::after,
[data-theme="dark"] .hero-mini-card-dark .button.secondary::after {
    background: linear-gradient(100deg, transparent 18%, rgba(255,255,255,0.12) 48%, transparent 78%);
}

[data-theme="dark"] .article-translate-toggle,
[data-theme="dark"] .article-translate-list,
[data-theme="dark"] .tarot-history-more-toggle span {
    border-color: rgba(255,255,255,0.14);
    background: linear-gradient(180deg, rgba(46,54,69,0.78), rgba(28,34,45,0.56));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 10px 20px rgba(0,0,0,0.18);
}

[data-theme="dark"] .article-translate-option:hover {
    background: rgba(255,255,255,0.08);
}

[data-theme="dark"] textarea,
[data-theme="dark"] select,
[data-theme="dark"] .comment-form input[type="text"],
[data-theme="dark"] .comment-form input[type="email"],
[data-theme="dark"] .comment-form textarea {
    border-color: rgba(255,255,255,0.15);
    background: linear-gradient(180deg, rgba(21,27,36,0.92), rgba(25,31,41,0.74));
    color: var(--text);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.09);
}

[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] .comment-form input[type="text"]:focus,
[data-theme="dark"] .comment-form input[type="email"]:focus,
[data-theme="dark"] .comment-form textarea:focus {
    border-color: rgba(158, 171, 192, 0.56);
    box-shadow: 0 0 0 4px rgba(158, 171, 192, 0.14);
}

[data-theme="dark"] .deck-front,
[data-theme="dark"] .tarot-front {
    border-color: rgba(207, 217, 232, 0.2);
    background:
        linear-gradient(180deg, rgba(236,240,247,0.98), rgba(211,219,232,0.96)),
        radial-gradient(circle at top, rgba(255,255,255,0.14), transparent 44%);
    color: #141922;
    box-shadow: 0 18px 34px rgba(0,0,0,0.24);
}

[data-theme="dark"] .tarot-card-copy p,
[data-theme="dark"] .deck-card-name {
    color: #141922;
}

[data-theme="dark"] .tarot-card-copy p:last-child,
[data-theme="dark"] .deck-card-meta {
    color: #515d70;
}

[data-theme="dark"] .tarot-card-art,
[data-theme="dark"] .deck-card-art {
    border-color: rgba(255,255,255,0.7);
    background: linear-gradient(180deg, rgba(250,252,255,0.96), rgba(232,237,246,0.9));
    box-shadow: 0 12px 28px rgba(0,0,0,0.18);
}

[data-theme="dark"] .ai-chat-bubble.is-user {
    background: linear-gradient(180deg, rgba(52,61,77,0.86), rgba(36,44,57,0.68));
}

[data-theme="dark"] .ai-chat-bubble.is-assistant {
    background: linear-gradient(180deg, rgba(40,47,60,0.82), rgba(27,33,44,0.62));
}

[data-theme="dark"] .site-footer {
    border-top-color: rgba(255,255,255,0.1);
}

[data-theme="dark"] .nav a,
[data-theme="dark"] .article-back-link,
[data-theme="dark"] .note-card-link,
[data-theme="dark"] .hero-panel-meta {
    color: #b7c2d0;
}

[data-theme="dark"] .nav a:hover,
[data-theme="dark"] .note-card-link:hover {
    color: #eef2f8;
}

[data-theme="dark"] .tarot-table-hint,
[data-theme="dark"] .tarot-selection-copy,
[data-theme="dark"] .spread-slot,
[data-theme="dark"] .tarot-result-copy p,
[data-theme="dark"] .tarot-result-meta p,
[data-theme="dark"] .tarot-history-head p,
[data-theme="dark"] .tarot-history-copy p {
    color: #b7c2cf;
}

[data-theme="dark"] .article-content {
    color: #eef2f8;
}

[data-theme="dark"] .article-content p,
[data-theme="dark"] .article-content li {
    color: #d4dce8;
}

[data-theme="dark"] .note-card-date,
[data-theme="dark"] .section-head p,
[data-theme="dark"] .hero-copy p,
[data-theme="dark"] .tarot-form-helper {
    color: #b9c4d2;
}

[data-theme="dark"] .hero-panel h3,
[data-theme="dark"] .note-card h3,
[data-theme="dark"] .tarot-history-copy strong,
[data-theme="dark"] .reading-box strong {
    color: #f2f5fa;
}

[data-theme="dark"] .tarot-table::before,
[data-theme="dark"] .tarot-table::after,
[data-theme="dark"] .tarot-table-wrap::before {
    content: none;
}

[data-theme="dark"] .tarot-deck-fan::before {
    border-color: rgba(161, 175, 196, 0.1);
    opacity: 0.42;
}

[data-theme="dark"] .tarot-deck-fan::after {
    width: min(68%, 22rem);
    height: 4.2rem;
    background: radial-gradient(circle, rgba(103, 122, 154, 0.08), rgba(103, 122, 154, 0));
    filter: blur(18px);
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* Bocconi-inspired editorial pass: stronger hierarchy, quieter motion, disciplined icon scale. */
:root {
    --editorial-ink: rgb(calc(18 + (238 - 18) * var(--theme-progress)), calc(29 + (242 - 29) * var(--theme-progress)), calc(48 + (248 - 48) * var(--theme-progress)));
    --editorial-muted: rgb(calc(84 + (176 - 84) * var(--theme-progress)), calc(99 + (188 - 99) * var(--theme-progress)), calc(124 + (205 - 124) * var(--theme-progress)));
    --editorial-blue: rgb(calc(28 + (120 - 28) * var(--theme-progress)), calc(64 + (156 - 64) * var(--theme-progress)), calc(124 + (218 - 124) * var(--theme-progress)));
    --editorial-red: rgb(calc(184 + (238 - 184) * var(--theme-progress)), calc(48 + (112 - 48) * var(--theme-progress)), calc(54 + (128 - 54) * var(--theme-progress)));
    --editorial-paper: rgba(calc(255 + (20 - 255) * var(--theme-progress)), calc(255 + (27 - 255) * var(--theme-progress)), calc(252 + (39 - 252) * var(--theme-progress)), calc(0.88 + var(--theme-progress) * 0.02));
    --editorial-line: rgba(calc(191 + (94 - 191) * var(--theme-progress)), calc(203 + (113 - 203) * var(--theme-progress)), calc(222 + (142 - 222) * var(--theme-progress)), calc(0.58 - var(--theme-progress) * 0.12));
    --editorial-radius: 10px;
    --editorial-radius-lg: 18px;
}

body {
    color: var(--editorial-ink);
    background:
        linear-gradient(90deg, rgba(var(--line-r), var(--line-g), var(--line-b), calc(0.06 - var(--theme-progress) * 0.03)) 1px, transparent 1px) 0 0 / clamp(4rem, 10vw, 8rem) clamp(4rem, 10vw, 8rem),
        radial-gradient(circle at 16% 4%, rgba(111, 141, 190, calc(0.16 - var(--theme-progress) * 0.08)), transparent 26rem),
        radial-gradient(circle at 88% 18%, rgba(194, 72, 86, calc(0.12 - var(--theme-progress) * 0.05)), transparent 24rem),
        linear-gradient(180deg, rgb(calc(251 + (12 - 251) * var(--theme-progress)), calc(252 + (17 - 252) * var(--theme-progress)), calc(250 + (27 - 250) * var(--theme-progress))) 0%, var(--bg) 54%, var(--bg-2) 100%) !important;
}

body::before,
body::after {
    opacity: 0.08 !important;
}

.site-header {
    width: min(100% - 2rem, 1240px);
    min-height: 68px;
    top: 0;
    border-radius: 0 !important;
    border: 0 !important;
    border-bottom: 1px solid var(--editorial-line) !important;
    box-shadow: none !important;
    background: rgba(calc(255 + (16 - 255) * var(--theme-progress)), calc(255 + (22 - 255) * var(--theme-progress)), calc(252 + (34 - 252) * var(--theme-progress)), calc(0.82 + var(--theme-progress) * 0.04)) !important;
    -webkit-backdrop-filter: blur(14px) saturate(120%) !important;
    backdrop-filter: blur(14px) saturate(120%) !important;
}

.brand,
.site-brand {
    font-size: clamp(1.06rem, 1.6vw, 1.22rem);
    font-weight: 820;
    letter-spacing: -0.02em;
}

.nav {
    padding: 0;
    border: 0;
    background: transparent !important;
    box-shadow: none !important;
}

.nav a {
    min-height: 40px;
    padding: 0.55rem 0.74rem;
    border-radius: 6px !important;
    color: var(--editorial-muted);
    font-size: 0.91rem;
    font-weight: 680;
}

.nav a:hover {
    color: var(--editorial-ink);
    background: rgba(calc(232 + (255 - 232) * var(--theme-progress)), calc(238 + (255 - 238) * var(--theme-progress)), calc(248 + (255 - 248) * var(--theme-progress)), calc(0.68 - var(--theme-progress) * 0.58)) !important;
}

.header-actions {
    gap: 0.54rem;
}

.theme-toggle {
    --toggle-w: 66px;
    --toggle-h: 36px;
    --toggle-icon: 21px;
    --toggle-pad: 7px;
}

.theme-toggle-track,
.lang-toggle,
.article-translate-toggle,
.button {
    border-radius: var(--editorial-radius) !important;
}

.theme-toggle-track {
    border-color: var(--editorial-line) !important;
    background:
        linear-gradient(90deg, rgba(219, 234, 254, calc(0.92 - var(--theme-progress) * 0.82)), rgba(255, 247, 237, calc(0.76 - var(--theme-progress) * 0.62))),
        linear-gradient(145deg, rgba(255,255,255,calc(0.78 - var(--theme-progress) * 0.64)), rgba(255,255,255,calc(0.34 - var(--theme-progress) * 0.2))),
        rgba(calc(244 - var(--theme-progress) * 224), calc(247 - var(--theme-progress) * 222), calc(251 - var(--theme-progress) * 216), 0.88) !important;
}

[data-theme="dark"] .theme-toggle-track {
    background:
        radial-gradient(circle at 74% 38%, rgba(234, 216, 166, 0.32), transparent 24%),
        linear-gradient(145deg, rgba(34, 44, 64, 0.96), rgba(11, 17, 29, 0.92)) !important;
}

.lang-toggle {
    min-width: 96px;
    height: 40px;
    min-height: 40px;
    border-color: var(--editorial-line) !important;
    background: transparent !important;
    box-shadow: none !important;
}

.lang-toggle .ui-icon {
    color: var(--editorial-blue);
}

.hero,
.page-hero,
.tarot-stage {
    width: min(100% - 2rem, 1240px);
    margin-inline: auto;
}

.hero-home-clean {
    min-height: clamp(520px, 70vh, 720px) !important;
    display: grid;
    align-items: end;
    padding-block: clamp(5rem, 10vw, 8rem) clamp(3rem, 7vw, 5rem);
    border-bottom: 1px solid var(--editorial-line);
    position: relative;
}

.hero-home-clean::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: clamp(2.8rem, 7vw, 5.2rem);
    width: min(42vw, 34rem);
    aspect-ratio: 1.55;
    border-radius: var(--editorial-radius-lg);
    background:
        linear-gradient(135deg, rgba(20, 43, 83, calc(0.88 - var(--theme-progress) * 0.1)), rgba(115, 43, 60, calc(0.58 - var(--theme-progress) * 0.16))),
        radial-gradient(circle at 74% 28%, rgba(255,255,255,0.22), transparent 26%);
    box-shadow: 0 28px 72px rgba(20, 31, 50, calc(0.16 + var(--theme-progress) * 0.16));
    opacity: 0.92;
    pointer-events: none;
}

.hero-copy {
    max-width: min(62rem, 76%);
    position: relative;
    z-index: 1;
}

.hero-kicker,
.section-kicker,
.eyebrow,
.article-kicker,
.note-card-date {
    min-height: auto;
    padding: 0;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--editorial-blue);
    text-transform: none;
    font-size: 0.92rem;
    font-weight: 760;
}

.hero-home-clean h1,
.page-hero h1,
.tarot-hero-copy h1,
.article h1 {
    max-width: 11ch;
    font-size: clamp(4rem, 11vw, 9.2rem) !important;
    line-height: 0.92 !important;
    letter-spacing: -0.055em !important;
    font-weight: 850;
}

.page-hero h1,
.tarot-hero-copy h1,
.article h1 {
    font-size: clamp(3.1rem, 8vw, 7rem) !important;
}

.hero-home-clean .hero-copy > p,
.page-hero > p,
.tarot-hero-copy > p {
    max-width: 46rem;
    font-size: clamp(1.12rem, 2vw, 1.54rem);
    line-height: 1.45;
    color: var(--editorial-muted);
}

.hero-actions {
    gap: 0.72rem;
    margin-top: 1.5rem;
}

.button {
    min-height: 46px;
    padding: 0.82rem 1.05rem;
    font-weight: 760;
}

.button.primary {
    background: var(--editorial-ink) !important;
    color: rgb(calc(255 - var(--theme-progress) * 232), calc(255 - var(--theme-progress) * 228), calc(255 - var(--theme-progress) * 220)) !important;
    border-color: transparent !important;
}

.button.secondary {
    background: transparent !important;
    color: var(--editorial-ink) !important;
    border-color: var(--editorial-line) !important;
    box-shadow: none !important;
}

.section {
    width: min(100% - 2rem, 1240px);
}

.section-head {
    border-top: 1px solid var(--editorial-line);
    padding-top: clamp(1.2rem, 3vw, 2rem);
    margin-bottom: clamp(1.2rem, 3vw, 2rem);
}

.section-head h2 {
    font-size: clamp(2rem, 4.4vw, 4.8rem);
    line-height: 0.98;
    letter-spacing: -0.045em;
}

.notes-card-grid,
.notes-page-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--editorial-line);
    border: 1px solid var(--editorial-line);
}

.note-card,
.glass-card,
.article,
.tarot-form,
.tarot-table,
.reading-box,
.comment-card,
.comment-form-wrap-v4,
.comments-compose-panel,
.music-capsule-panel,
.tarot-history {
    border-radius: 0 !important;
    border: 0 !important;
    background: var(--editorial-paper) !important;
    box-shadow: none !important;
}

.note-card {
    min-height: 320px;
    padding: clamp(1.05rem, 2.2vw, 1.55rem);
    display: flex;
    flex-direction: column;
}

.note-card h2,
.note-card h3 {
    margin-top: auto;
    font-size: clamp(1.42rem, 2.4vw, 2.2rem);
    line-height: 1.02;
    letter-spacing: -0.035em;
}

.note-card p {
    font-size: 0.98rem;
    line-height: 1.65;
    color: var(--editorial-muted);
}

.note-card-link,
.article-back-link {
    color: var(--editorial-blue);
    font-weight: 760;
}

.page-hero {
    padding-block: clamp(5.2rem, 11vw, 8.4rem) clamp(2.6rem, 6vw, 4.2rem);
    border-bottom: 1px solid var(--editorial-line);
}

.article {
    width: min(100% - 2rem, 980px);
    padding: clamp(2rem, 5vw, 4.5rem);
    border-left: 1px solid var(--editorial-line) !important;
    border-right: 1px solid var(--editorial-line) !important;
}

.article-content {
    font-size: clamp(1.02rem, 1.6vw, 1.15rem);
    line-height: 1.86;
}

.comments-shell {
    width: min(100% - 2rem, 980px);
}

.comments-grid {
    grid-template-columns: minmax(0, 1fr) minmax(17rem, 21rem);
    gap: 1px;
    background: var(--editorial-line);
    border: 1px solid var(--editorial-line);
}

.comments-feed,
.comments-compose-panel {
    background: var(--editorial-paper);
}

.comment-card,
.comment-form-wrap-v4 {
    padding: 1rem 1.1rem;
}

.tarot-stage {
    padding-top: clamp(4.8rem, 10vw, 7.6rem);
}

.tarot-layout {
    display: grid;
    grid-template-columns: minmax(17rem, 25rem) minmax(0, 1fr);
    gap: 1px;
    background: var(--editorial-line);
    border: 1px solid var(--editorial-line);
}

.tarot-form,
.tarot-table {
    border: 0 !important;
}

.tarot-table {
    min-height: clamp(620px, 62vw, 760px);
    background:
        linear-gradient(145deg, rgba(16, 30, 58, 0.96), rgba(26, 29, 42, 0.94)) !important;
}

.tarot-table-head {
    color: rgba(255,255,255,0.9);
}

.tarot-table .section-kicker,
.tarot-table-hint,
.tarot-selection-copy {
    color: rgba(236, 242, 252, 0.72) !important;
}

.ui-icon,
img.ui-icon {
    width: 18px !important;
    height: 18px !important;
    color: currentColor;
    opacity: 0.9;
}

.badge-icon {
    width: 16px !important;
    height: 16px !important;
}

.button-icon,
.inline-icon,
.lang-caret {
    width: 15px !important;
    height: 15px !important;
}

.music-capsule-toggle {
    border-radius: 14px !important;
}

@media (max-width: 980px) {
    .hero-copy {
        max-width: 100%;
    }

    .hero-home-clean::after {
        opacity: 0.26;
        width: min(74vw, 32rem);
    }

    .notes-card-grid,
    .notes-page-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tarot-layout,
    .comments-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .site-header,
    .hero,
    .page-hero,
    .tarot-stage,
    .section,
    .article,
    .comments-shell {
        width: min(100% - 1rem, 1240px);
    }

    .site-header {
        min-height: 58px;
        padding-inline: 0.66rem;
    }

    .nav {
        order: 3;
        width: 100%;
        justify-content: space-between;
        overflow-x: auto;
        padding-top: 0.32rem;
        scrollbar-width: none;
    }

    .nav::-webkit-scrollbar {
        display: none;
    }

    .nav a {
        white-space: nowrap;
        min-height: 34px;
        font-size: 0.82rem;
    }

    .theme-toggle {
        --toggle-w: 58px;
        --toggle-h: 34px;
    }

    .lang-toggle {
        min-width: 78px;
        height: 38px;
        min-height: 38px;
        font-size: 0.86rem;
    }

    .hero-home-clean {
        min-height: 560px !important;
        padding-top: 7.2rem;
        padding-bottom: 2.4rem;
    }

    .hero-home-clean h1,
    .page-hero h1,
    .tarot-hero-copy h1,
    .article h1 {
        font-size: clamp(3.5rem, 18vw, 5.4rem) !important;
        max-width: 9ch;
    }

    .hero-home-clean .hero-copy > p,
    .page-hero > p,
    .tarot-hero-copy > p {
        font-size: 1.05rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .button {
        justify-content: center;
    }

    .notes-card-grid,
    .notes-page-grid {
        grid-template-columns: 1fr;
    }

    .note-card {
        min-height: 240px;
    }

    .article {
        padding: 1.2rem;
    }

    .tarot-stage {
        padding-top: 6.2rem;
    }

    .tarot-table {
        min-height: 600px;
    }
}

/* Post-visual-check corrections: mobile hero artwork must not compete with primary actions. */
.button,
.button.primary,
.button.secondary,
.lang-toggle,
.article-translate-toggle {
    border-radius: 10px !important;
}

.music-capsule-toggle {
    border-radius: 14px !important;
}

@media (max-width: 760px) {
    .hero-home-clean::after {
        top: auto;
        right: 0.5rem;
        bottom: 4.6rem;
        width: min(58vw, 16rem);
        opacity: 0.13;
        filter: saturate(0.82);
    }

    .hero-actions {
        position: relative;
        z-index: 3;
    }

    .button,
    .button.primary,
    .button.secondary {
        border-radius: 10px !important;
    }
}

/* Liquid glass music capsule. */
.music-capsule {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    z-index: 60;
    width: min(23rem, calc(100vw - 2rem));
    display: grid;
    justify-items: end;
    pointer-events: none;
}

.music-capsule-toggle,
.music-capsule-panel {
    pointer-events: auto;
    -webkit-backdrop-filter: blur(26px) saturate(170%);
    backdrop-filter: blur(26px) saturate(170%);
}

.music-capsule-toggle {
    width: min(18rem, calc(100vw - 2rem));
    min-height: 3.4rem;
    padding: 0.42rem 0.54rem 0.42rem 0.46rem;
    border: 1px solid rgba(255,255,255,calc(0.68 - var(--theme-progress) * 0.48));
    border-radius: 999px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.72rem;
    color: var(--text);
    background:
        linear-gradient(135deg, rgba(255,255,255,calc(0.78 - var(--theme-progress) * 0.58)), rgba(255,255,255,calc(0.24 - var(--theme-progress) * 0.1))),
        rgba(calc(250 - var(--theme-progress) * 226), calc(252 - var(--theme-progress) * 226), calc(255 - var(--theme-progress) * 220), calc(0.64 + var(--theme-progress) * 0.08));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,calc(0.86 - var(--theme-progress) * 0.64)),
        0 18px 46px rgba(22,32,50,calc(0.10 + var(--theme-progress) * 0.22));
    cursor: pointer;
    transform: translateZ(0);
    transition: width .24s cubic-bezier(.22,1,.36,1), transform .2s ease, box-shadow .22s ease, border-color .22s ease;
}

.music-capsule-toggle:hover {
    transform: translateY(-1px) translateZ(0);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,calc(0.9 - var(--theme-progress) * 0.66)),
        0 22px 52px rgba(22,32,50,calc(0.12 + var(--theme-progress) * 0.24));
}

.music-capsule-orb {
    width: 2.42rem;
    height: 2.42rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: rgb(calc(84 + (216 - 84) * var(--theme-progress)), calc(111 + (226 - 111) * var(--theme-progress)), calc(154 + (238 - 154) * var(--theme-progress)));
    background:
        radial-gradient(circle at 34% 24%, rgba(255,255,255,0.92), transparent 32%),
        linear-gradient(145deg, rgba(232,238,248,0.92), rgba(184,199,222,0.48));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.9),
        0 10px 22px rgba(58,76,110,0.14);
}

[data-theme="dark"] .music-capsule-orb {
    background:
        radial-gradient(circle at 34% 24%, rgba(255,255,255,0.32), transparent 32%),
        linear-gradient(145deg, rgba(66,76,96,0.92), rgba(35,42,56,0.78));
}

.music-capsule.is-playing .music-capsule-orb {
    animation: music-pulse 1.6s ease-in-out infinite;
}

.music-capsule-copy {
    min-width: 0;
    display: grid;
    gap: 0.06rem;
    text-align: left;
}

.music-capsule-copy strong,
.music-capsule-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.music-capsule-copy strong {
    font-size: 0.92rem;
    line-height: 1.2;
}

.music-capsule-copy small {
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.25;
}

.music-capsule-panel {
    width: min(23rem, calc(100vw - 2rem));
    margin-bottom: 0.62rem;
    padding: 0.78rem;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,calc(0.64 - var(--theme-progress) * 0.46));
    background:
        linear-gradient(145deg, rgba(255,255,255,calc(0.74 - var(--theme-progress) * 0.55)), rgba(255,255,255,calc(0.22 - var(--theme-progress) * 0.1))),
        rgba(calc(250 - var(--theme-progress) * 228), calc(252 - var(--theme-progress) * 228), calc(255 - var(--theme-progress) * 224), calc(0.72 + var(--theme-progress) * 0.06));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,calc(0.82 - var(--theme-progress) * 0.64)),
        0 24px 62px rgba(15,24,42,calc(0.14 + var(--theme-progress) * 0.24));
    transform-origin: bottom right;
    animation: music-panel-rise .22s cubic-bezier(.22,1,.36,1);
}

.music-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
    align-items: end;
}

.music-search label {
    display: grid;
    gap: 0.34rem;
}

.music-search label span {
    margin: 0;
    font-size: 0.76rem;
    color: var(--muted);
}

.music-search input {
    min-height: 2.46rem;
    border-radius: 999px;
    padding: 0.62rem 0.82rem;
}

.music-search-button,
.music-play {
    width: 2.46rem;
    height: 2.46rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.58);
    display: grid;
    place-items: center;
    color: var(--text);
    background: rgba(255,255,255,calc(0.58 - var(--theme-progress) * 0.42));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
    cursor: pointer;
}

.music-results {
    margin-top: 0.62rem;
    display: grid;
    gap: 0.36rem;
    max-height: 17rem;
    overflow: auto;
    padding-right: 0.15rem;
}

.music-result {
    width: 100%;
    min-width: 0;
    padding: 0.44rem;
    border: 0;
    border-radius: 16px;
    display: grid;
    grid-template-columns: 2.52rem minmax(0, 1fr);
    gap: 0.6rem;
    align-items: center;
    color: var(--text);
    text-align: left;
    background: transparent;
    cursor: pointer;
    transition: background .16s ease, transform .16s ease;
}

.music-result:hover {
    background: rgba(255,255,255,calc(0.42 - var(--theme-progress) * 0.24));
    transform: translateY(-1px);
}

.music-result-art {
    width: 2.52rem;
    height: 2.52rem;
    border-radius: 12px;
    background:
        radial-gradient(circle at 35% 24%, rgba(255,255,255,.7), transparent 36%),
        linear-gradient(135deg, rgba(178,194,219,.8), rgba(126,145,176,.48));
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.52);
}

.music-result-copy {
    min-width: 0;
    display: grid;
    gap: 0.08rem;
}

.music-result-copy strong,
.music-result-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.music-result-copy strong {
    font-size: 0.88rem;
}

.music-result-copy small,
.music-note,
.music-empty {
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.45;
}

.music-note,
.music-empty {
    margin: 0.62rem 0 0;
}

.music-aplayer {
    margin-top: 0.68rem;
}

.music-aplayer[hidden] {
    display: none;
}

.music-capsule .aplayer {
    margin: 0;
    border-radius: 20px;
    overflow: hidden;
    color: var(--text);
    font-family: inherit;
    background:
        linear-gradient(145deg, rgba(255,255,255,calc(0.52 - var(--theme-progress) * 0.36)), rgba(255,255,255,calc(0.18 - var(--theme-progress) * 0.08))),
        rgba(calc(250 - var(--theme-progress) * 226), calc(252 - var(--theme-progress) * 226), calc(255 - var(--theme-progress) * 220), calc(0.48 + var(--theme-progress) * 0.1));
    border: 1px solid rgba(255,255,255,calc(0.48 - var(--theme-progress) * 0.34));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,calc(0.74 - var(--theme-progress) * 0.5)),
        0 14px 34px rgba(18,28,45,calc(0.08 + var(--theme-progress) * 0.16));
}

.music-capsule .aplayer .aplayer-body {
    background: transparent;
}

.music-capsule .aplayer .aplayer-pic {
    width: 4.4rem;
    height: 4.4rem;
    border-radius: 18px;
    margin: 0.58rem;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.38),
        0 12px 24px rgba(22,32,50,.16);
}

.music-capsule .aplayer .aplayer-info {
    margin-left: 5.45rem;
    min-height: 5.56rem;
    padding: 0.78rem 0.82rem 0.58rem 0;
    border-bottom: 0;
}

.music-capsule .aplayer .aplayer-title {
    color: var(--text);
    font-weight: 760;
    letter-spacing: 0;
}

.music-capsule .aplayer .aplayer-author,
.music-capsule .aplayer .aplayer-time,
.music-capsule .aplayer .aplayer-list ol li .aplayer-list-author {
    color: var(--muted);
}

.music-capsule .aplayer .aplayer-controller .aplayer-bar-wrap {
    padding: 0 0 0 0.35rem;
}

.music-capsule .aplayer .aplayer-bar,
.music-capsule .aplayer .aplayer-loaded {
    height: 4px;
    border-radius: 999px;
    background: rgba(111,128,156,calc(0.16 + var(--theme-progress) * 0.16));
}

.music-capsule .aplayer .aplayer-played {
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, #7d91b5, #aebbd0) !important;
}

.music-capsule .aplayer .aplayer-thumb {
    width: 12px;
    height: 12px;
    margin-top: -4px;
    border: 2px solid rgba(255,255,255,.9);
    background: #7d91b5 !important;
    box-shadow: 0 4px 10px rgba(42,56,82,.22);
}

.music-capsule .aplayer .aplayer-icon {
    color: var(--muted);
    opacity: 0.9;
}

.music-capsule .aplayer .aplayer-icon:hover {
    color: var(--text);
    opacity: 1;
}

.music-capsule .aplayer .aplayer-list {
    border-top: 1px solid rgba(126,142,166,calc(0.16 + var(--theme-progress) * 0.16));
}

.music-capsule .aplayer .aplayer-list ol {
    max-height: 7.5rem !important;
}

.music-capsule .aplayer .aplayer-list ol li {
    border-top: 0;
    color: var(--text);
    background: transparent;
}

.music-capsule .aplayer .aplayer-list ol li:hover,
.music-capsule .aplayer .aplayer-list ol li.aplayer-list-light {
    background: rgba(255,255,255,calc(0.42 - var(--theme-progress) * 0.24));
}

[data-theme="dark"] .music-capsule .aplayer .aplayer-list ol li:hover,
[data-theme="dark"] .music-capsule .aplayer .aplayer-list ol li.aplayer-list-light {
    background: rgba(255,255,255,.07);
}

[data-theme="dark"] .music-search-button {
    border-color: rgba(255,255,255,.12);
    background: rgba(255,255,255,.06);
}

@keyframes music-panel-rise {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes music-pulse {
    0%, 100% {
        transform: scale(1);
        filter: saturate(1);
    }
    50% {
        transform: scale(1.035);
        filter: saturate(1.18);
    }
}

@media (max-width: 640px) {
  /* The admin bar is not part of the public mobile layout and can create a horizontal strip. */
  #wpadminbar { display: none !important; }
  html { margin-top: 0 !important; }

    .music-capsule {
        right: 0.7rem;
        left: 0.7rem;
        bottom: max(0.72rem, env(safe-area-inset-bottom));
        width: auto;
        justify-items: stretch;
    }

    .music-capsule-toggle,
    .music-capsule-panel {
        width: 100%;
    }

    .music-capsule-panel {
        border-radius: 20px;
        transform-origin: bottom center;
    }
}

/* 2026 typography and icon tuning pass: open-source inspired, local-first, quieter. */
:root {
    --font-ui: "Inter", "IBM Plex Sans", "SF Pro Text", "Segoe UI Variable Text", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei UI", sans-serif;
    --font-display: "Inter Display", "Inter", "IBM Plex Sans", "SF Pro Display", "Segoe UI Variable Display", "PingFang SC", "Noto Sans SC", sans-serif;
    --font-reading: "IBM Plex Serif", "Source Han Serif SC", "Noto Serif SC", "Iowan Old Style", "Charter", Georgia, serif;
    --icon-blue: rgb(calc(91 + (178 - 91) * var(--theme-progress)), calc(114 + (197 - 114) * var(--theme-progress)), calc(154 + (219 - 154) * var(--theme-progress)));
    --icon-ink: rgb(calc(72 + (216 - 72) * var(--theme-progress)), calc(88 + (224 - 88) * var(--theme-progress)), calc(118 + (236 - 118) * var(--theme-progress)));
    --surface-soft-shadow: 0 18px 44px rgba(31, 42, 68, calc(0.075 + var(--theme-progress) * 0.12));
}

body {
    font-family: var(--font-ui);
    font-feature-settings: "cv02", "cv03", "cv04", "ss01";
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.site-brand,
.nav a,
.button,
.theme-toggle,
.lang-toggle,
.hero-kicker,
.section-kicker,
.eyebrow {
    font-family: var(--font-display);
}

h1,
h2,
h3 {
    letter-spacing: 0;
    text-wrap: balance;
}

.article-content,
.comment-card-body,
.note-card p,
.reading-box,
.tarot-reading,
.article-excerpt {
    text-wrap: pretty;
}

.ui-icon,
img.ui-icon {
    width: 1.04rem !important;
    height: 1.04rem !important;
    color: var(--icon-blue);
    opacity: 0.94;
    stroke-width: 1.55 !important;
    filter: saturate(1.08) contrast(1.04);
}

.ui-icon path,
.ui-icon circle,
.ui-icon line,
.ui-icon polyline,
.ui-icon polygon,
.ui-icon rect {
    vector-effect: non-scaling-stroke;
}

.badge-icon,
.hero-kicker .badge-icon,
.section-kicker .badge-icon,
.eyebrow .badge-icon {
    width: 0.98rem !important;
    height: 0.98rem !important;
    color: var(--icon-blue);
    stroke-width: 1.55 !important;
}

.button .ui-icon,
.article-translate-toggle .ui-icon,
.lang-toggle .ui-icon {
    width: 0.98rem !important;
    height: 0.98rem !important;
    color: currentColor;
}

.music-panel-head .ui-icon,
.music-capsule-art .ui-icon {
    color: var(--icon-ink);
    opacity: 0.9;
}

.glass-card,
.note-card,
.article,
.article-video-card,
.comments-compose-panel,
.comment-card,
.comment-form-wrap-v4,
.tarot-form,
.reading-box,
.tarot-history,
.music-capsule-panel {
    box-shadow: var(--surface-soft-shadow), inset 0 1px rgba(255,255,255,calc(0.62 - var(--theme-progress) * 0.5)) !important;
}

.hero-kicker,
.section-kicker,
.eyebrow,
.article-date,
.note-date,
.post-date,
.comment-count-pill,
.archive-pill {
    border-radius: 999px !important;
    background:
        linear-gradient(135deg, rgba(255,255,255,calc(0.66 - var(--theme-progress) * 0.48)), rgba(255,255,255,calc(0.22 - var(--theme-progress) * 0.1))),
        rgba(calc(247 - var(--theme-progress) * 224), calc(250 - var(--theme-progress) * 224), calc(255 - var(--theme-progress) * 216), calc(0.62 + var(--theme-progress) * 0.08)) !important;
    border: 1px solid rgba(var(--line-r), var(--line-g), var(--line-b), calc(0.15 + var(--theme-progress) * 0.02)) !important;
    box-shadow: inset 0 1px rgba(255,255,255,calc(0.7 - var(--theme-progress) * 0.54)), 0 10px 24px rgba(22, 33, 55, calc(0.055 + var(--theme-progress) * 0.08)) !important;
}

[data-theme="dark"] .hero-kicker,
[data-theme="dark"] .section-kicker,
[data-theme="dark"] .eyebrow,
[data-theme="dark"] .article-date,
[data-theme="dark"] .note-date,
[data-theme="dark"] .post-date,
[data-theme="dark"] .comment-count-pill,
[data-theme="dark"] .archive-pill {
    color: rgba(228, 234, 244, 0.82) !important;
}

.button,
.article-translate-toggle,
.lang-toggle,
.music-capsule-toggle {
    transition:
        transform 180ms cubic-bezier(.2,.8,.2,1),
        box-shadow 220ms cubic-bezier(.2,.8,.2,1),
        background-color 260ms ease,
        border-color 260ms ease !important;
}

.button:hover,
.article-translate-toggle:hover,
.lang-toggle:hover,
.music-capsule-toggle:hover {
    transform: translate3d(0, -1px, 0);
}

.note-card,
.comment-card,
.tarot-history-item {
    transition:
        transform 220ms cubic-bezier(.2,.8,.2,1),
        border-color 260ms ease,
        box-shadow 260ms ease !important;
}

.note-card:hover,
.comment-card:hover,
.tarot-history-item:hover {
    transform: translate3d(0, -2px, 0);
}

.tarot-stage,
.tarot-table {
    background-clip: padding-box;
}

.tarot-table::after {
    background:
        radial-gradient(ellipse at center, rgba(255,255,255,0.035), transparent 58%),
        linear-gradient(180deg, rgba(255,255,255,0.025), transparent) !important;
}

[data-theme="dark"] .tarot-table::after {
    background:
        radial-gradient(ellipse at center, rgba(148, 163, 184, 0.045), transparent 60%),
        linear-gradient(180deg, rgba(255,255,255,0.018), transparent) !important;
}

@media (max-width: 760px) {
    .site-shell,
    .wrap,
    .article-wrap,
    .comments-shell {
        width: min(100% - 1.2rem, var(--max-width));
    }

    .hero-kicker,
    .section-kicker,
    .eyebrow {
        max-width: 100%;
        white-space: normal;
    }

    .article h1,
    .page-hero h1,
    .hero-home-clean h1,
    .tarot-hero-copy h1 {
        font-size: clamp(2.08rem, 11vw, 3.12rem) !important;
        line-height: 1.02 !important;
    }

    .note-card,
    .article,
    .comments-compose-panel,
    .comment-card,
    .comment-form-wrap-v4,
    .tarot-form,
    .reading-box,
    .tarot-history,
    .music-capsule-panel {
        box-shadow: 0 14px 34px rgba(20, 32, 52, calc(0.06 + var(--theme-progress) * 0.12)), inset 0 1px rgba(255,255,255,calc(0.52 - var(--theme-progress) * 0.42)) !important;
    }
}

/* 2026 proportion and motion lock: verified against Apple/Material/Vercel/Carbon guidance. */
:root {
    --motion-fast: 160ms;
    --motion-base: 220ms;
    --motion-page: 280ms;
    --motion-ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
    --motion-ease-out: cubic-bezier(0, 0, 0.2, 1);
    --icon-ui: 18px;
    --icon-button: 16px;
    --icon-small: 14px;
    --touch-target: 44px;
}

body {
    animation: page-fade var(--motion-page) var(--motion-ease-out);
}

.site-header {
    min-height: 58px;
    gap: clamp(0.62rem, 1.6vw, 1rem);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav {
    gap: 0.22rem;
}

.nav a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 0.48rem 0.7rem;
    border-radius: 12px !important;
    line-height: 1;
    transition:
        color var(--motion-fast) var(--motion-ease-out),
        background-color var(--motion-fast) var(--motion-ease-out),
        border-color var(--motion-fast) var(--motion-ease-out),
        transform var(--motion-fast) var(--motion-ease-out) !important;
}

.button,
.lang-toggle,
.article-translate-toggle,
.music-capsule-toggle {
    min-height: var(--touch-target);
    gap: 0.48rem;
    transition:
        transform var(--motion-fast) var(--motion-ease-out),
        box-shadow var(--motion-base) var(--motion-ease-out),
        border-color var(--motion-fast) var(--motion-ease-out),
        background-color var(--motion-fast) linear !important;
}

.button:hover,
.lang-toggle:hover,
.article-translate-toggle:hover,
.music-capsule-toggle:hover,
.nav a:hover {
    transform: translate3d(0, -1px, 0);
}

.button:active,
.lang-toggle:active,
.article-translate-toggle:active,
.music-capsule-toggle:active {
    transform: translate3d(0, 0, 0) scale(0.985);
}

.theme-toggle {
    --toggle-w: 64px;
    --toggle-h: 36px;
    --toggle-icon: 22px;
    --toggle-thumb-size: var(--toggle-icon);
    --toggle-pad: 7px;
    width: var(--toggle-w) !important;
    min-width: var(--toggle-w) !important;
    height: var(--touch-target) !important;
    min-height: var(--touch-target) !important;
    padding: 4px !important;
    border-radius: 999px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    touch-action: pan-y;
    contain: layout paint style;
}

.theme-toggle-track {
    position: relative !important;
    inset: auto !important;
    width: var(--toggle-w) !important;
    height: var(--toggle-h) !important;
    border-radius: 999px !important;
    overflow: hidden;
    transform: translateZ(0);
    transition:
        background-color var(--motion-base) linear,
        border-color var(--motion-base) linear,
        box-shadow var(--motion-base) var(--motion-ease-out),
        transform var(--motion-fast) var(--motion-ease-out) !important;
}

.theme-toggle-track::before,
.theme-toggle-track::after {
    transition:
        opacity var(--motion-base) linear,
        transform var(--motion-base) var(--motion-ease-out) !important;
}

.theme-toggle__around {
    position: absolute !important;
    z-index: 2;
    top: calc((var(--toggle-h) - var(--toggle-icon)) / 2);
    left: 7px;
    width: var(--toggle-icon) !important;
    height: var(--toggle-icon) !important;
    transform:
        translate3d(calc(var(--theme-progress) * 28px), 0, 0)
        rotate(calc(var(--theme-progress) * 96deg))
        scale(calc(1 - var(--theme-progress) * 0.02));
    transform-box: fill-box;
    transform-origin: center;
    transition:
        transform var(--motion-base) var(--motion-ease-standard),
        color var(--motion-base) linear,
        opacity var(--motion-fast) linear !important;
    will-change: transform;
}

.theme-toggle__around *,
.theme-toggle__around > :first-child,
.theme-toggle__around > :first-child path,
.theme-toggle__around > g g circle {
    transition:
        transform var(--motion-base) var(--motion-ease-standard),
        opacity var(--motion-fast) linear !important;
    transform-box: fill-box;
    transform-origin: center;
}

.theme-toggle--toggled.theme-toggle .theme-toggle__around > :first-child path {
    transition-property: transform, opacity !important;
}

.theme-toggle.is-dragging .theme-toggle-track,
.theme-toggle.is-dragging .theme-toggle__around,
.theme-toggle.is-dragging .theme-toggle__around * {
    transition: none !important;
}

.theme-toggle:hover .theme-toggle-track {
    transform: translate3d(0, -1px, 0);
}

.ui-icon,
img.ui-icon {
    width: var(--icon-ui) !important;
    height: var(--icon-ui) !important;
    stroke-width: 1.6 !important;
    opacity: 0.88;
    vertical-align: -0.18em;
}

.button-icon,
.button .ui-icon,
.article-translate-toggle .ui-icon {
    width: var(--icon-button) !important;
    height: var(--icon-button) !important;
    stroke-width: 1.7 !important;
}

.badge-icon,
.hero-kicker .badge-icon,
.section-kicker .badge-icon,
.eyebrow .badge-icon {
    width: 17px !important;
    height: 17px !important;
    stroke-width: 1.65 !important;
    flex-basis: 17px;
}

.lang-toggle {
    min-width: 92px;
    padding: 0.48rem 0.66rem;
    border-radius: 15px !important;
}

.lang-toggle-icon {
    width: 17px !important;
    height: 17px !important;
}

.lang-caret {
    width: var(--icon-small) !important;
    height: var(--icon-small) !important;
    opacity: 0.7;
}

.hero-kicker,
.section-kicker,
.eyebrow {
    min-height: 34px;
    padding: 0.42rem 0.62rem;
    border-radius: 14px !important;
    gap: 0.4rem;
}

.glass-card,
.note-card,
.article,
.tarot-form,
.reading-box,
.comment-card,
.comment-form-wrap-v4,
.comments-compose-panel,
.music-capsule-panel,
.tarot-history-item {
    transition:
        transform var(--motion-base) var(--motion-ease-out),
        box-shadow var(--motion-base) var(--motion-ease-out),
        border-color var(--motion-fast) var(--motion-ease-out),
        background-color var(--motion-fast) linear !important;
}

.glass-card:hover,
.note-card:hover,
.comment-card:hover,
.tarot-history-item:hover {
    transform: translate3d(0, -2px, 0);
}

.motion-reveal {
    transition:
        opacity var(--motion-page) var(--motion-ease-out) var(--reveal-delay, 0ms),
        transform var(--motion-page) var(--motion-ease-out) var(--reveal-delay, 0ms) !important;
}

.tarot-table {
    min-height: clamp(580px, 64vw, 760px);
}

.tarot-deck-fan {
    min-height: clamp(18rem, 38vw, 25rem);
}

.deck-card {
    width: clamp(92px, 7.4vw, 118px) !important;
    aspect-ratio: 0.62;
    transform-origin: 50% 92%;
    transition:
        transform 240ms var(--motion-ease-standard),
        filter var(--motion-base) linear,
        opacity var(--motion-fast) linear !important;
}

.deck-card-art,
.tarot-card-art {
    aspect-ratio: 0.62 !important;
    border-radius: 10px !important;
}

.tarot-card-art {
    width: min(100%, 168px);
    max-height: none !important;
}

.tarot-deck-fan.is-ready .deck-card:hover {
    transform: translateX(calc(-50% + var(--card-shift))) translateY(-14px) rotate(calc(var(--card-rotate) * 0.45)) !important;
}

.tarot-deck-fan.is-ready .deck-card.is-selected {
    transform: translateX(calc(-50% + var(--card-shift))) translateY(-26px) rotate(calc(var(--card-rotate) * 0.16)) !important;
}

.tarot-deck-fan.is-drawing .deck-card.is-selected {
    --deck-lift: -126px;
    transform:
        translateX(calc(-50% + var(--selected-shift, var(--card-shift))))
        translateY(var(--deck-lift))
        rotate(calc((var(--selected-order) - 1) * 3deg)) !important;
}

@media (max-width: 980px) {
    .site-header {
        min-height: 56px;
    }

    .nav a {
        min-height: 36px;
        padding-inline: 0.58rem;
    }

    .deck-card {
        width: clamp(78px, 11vw, 102px) !important;
    }
}

@media (max-width: 760px) {
    .site-header {
        width: min(100% - 0.75rem, 1160px);
        min-height: 54px;
        border-radius: 0 0 18px 18px;
    }

    .theme-toggle {
        --toggle-w: 58px;
        --toggle-h: 34px;
        --toggle-icon: 21px;
        --toggle-pad: 6px;
    }

    .theme-toggle__around {
        left: 6px;
        transform:
            translate3d(calc(var(--theme-progress) * 25px), 0, 0)
            rotate(calc(var(--theme-progress) * 94deg))
            scale(calc(1 - var(--theme-progress) * 0.02));
    }

    .lang-toggle {
        min-width: 82px;
        min-height: 42px;
        padding-inline: 0.58rem;
    }

    .nav a {
        min-height: 34px;
        border-radius: 11px !important;
        font-size: 0.84rem;
    }

    .ui-icon,
    img.ui-icon {
        width: 17px !important;
        height: 17px !important;
    }

    .button-icon,
    .button .ui-icon,
    .article-translate-toggle .ui-icon {
        width: 15px !important;
        height: 15px !important;
    }

    .tarot-table {
        min-height: clamp(540px, 132vw, 680px);
    }

    .tarot-deck-fan {
        min-height: clamp(17.5rem, 74vw, 21rem);
    }

    .deck-card {
        width: clamp(66px, 17.4vw, 82px) !important;
    }

    .tarot-deck-fan.is-drawing .deck-card.is-selected {
        --deck-lift: -104px;
        --selected-shift: calc((var(--selected-order) - 1) * 58px) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 1ms !important;
    }
}

.article-video-feature {
    margin: clamp(2rem, 5vw, 3.6rem) 0;
}

.article-video-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    padding: clamp(1rem, 2.4vw, 1.4rem);
    border: 1px solid rgba(var(--line-r), var(--line-g), var(--line-b), 0.14);
    background:
        linear-gradient(145deg, rgba(255,255,255,0.76), rgba(255,255,255,0.42)),
        radial-gradient(circle at 18% 18%, rgba(190, 205, 226, 0.32), transparent 36%);
    box-shadow: inset 0 1px rgba(255,255,255,0.72), 0 28px 80px rgba(18, 28, 45, 0.12);
}

.article-video-copy {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.article-video-copy span {
    display: inline-flex;
    align-items: center;
    height: 2rem;
    padding: 0 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(var(--line-r), var(--line-g), var(--line-b), 0.14);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.article-video-copy h2 {
    margin: 0;
    font-size: clamp(1.36rem, 3vw, 2rem);
    letter-spacing: 0;
}

.article-video-copy p {
    max-width: 18rem;
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    text-align: right;
}

.article-video-player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 22px;
    background: #0f172a;
    box-shadow: 0 18px 54px rgba(15, 23, 42, 0.18);
}

[data-theme="dark"] .article-video-card {
    background:
        linear-gradient(145deg, rgba(21, 29, 43, 0.86), rgba(12, 18, 28, 0.72)),
        radial-gradient(circle at 20% 16%, rgba(120, 142, 174, 0.2), transparent 38%);
    border-color: rgba(226, 232, 240, 0.13);
    box-shadow: inset 0 1px rgba(255,255,255,0.08), 0 30px 80px rgba(0, 0, 0, 0.32);
}

@media (max-width: 720px) {
    .article-video-card {
        border-radius: 22px;
    }

    .article-video-copy {
        display: block;
    }

    .article-video-copy h2 {
        margin-top: 0.7rem;
    }

    .article-video-copy p {
        margin-top: 0.45rem;
        text-align: left;
    }

    .article-video-player {
        border-radius: 18px;
    }
}

/* 2026 visual system pass: quieter liquid glass, consistent depth, and compositor-friendly motion. */
:root {
    --ease-out-quart: cubic-bezier(.16, 1, .3, 1);
    --ease-soft-spring: cubic-bezier(.19, 1, .22, 1);
    --surface-radius: clamp(18px, 2.6vw, 28px);
    --surface-radius-sm: 16px;
    --glass-stroke: rgba(255, 255, 255, calc(0.64 - var(--theme-progress) * 0.48));
    --glass-stroke-dark: rgba(117, 132, 158, calc(0.2 + var(--theme-progress) * 0.05));
    --glass-tint: rgba(
        calc(255 + (22 - 255) * var(--theme-progress)),
        calc(255 + (29 - 255) * var(--theme-progress)),
        calc(255 + (42 - 255) * var(--theme-progress)),
        calc(0.66 + var(--theme-progress) * 0.08)
    );
    --glass-tint-strong: rgba(
        calc(255 + (26 - 255) * var(--theme-progress)),
        calc(255 + (34 - 255) * var(--theme-progress)),
        calc(255 + (50 - 255) * var(--theme-progress)),
        calc(0.82 + var(--theme-progress) * 0.02)
    );
    --glass-shadow: 0 24px 72px rgba(
        calc(26 - var(--theme-progress) * 18),
        calc(36 - var(--theme-progress) * 28),
        calc(58 - var(--theme-progress) * 38),
        calc(0.11 + var(--theme-progress) * 0.22)
    );
    --glass-shadow-hover: 0 34px 92px rgba(
        calc(27 - var(--theme-progress) * 20),
        calc(39 - var(--theme-progress) * 30),
        calc(66 - var(--theme-progress) * 42),
        calc(0.16 + var(--theme-progress) * 0.24)
    );
    --quiet-blue: rgb(
        calc(96 + (176 - 96) * var(--theme-progress)),
        calc(119 + (196 - 119) * var(--theme-progress)),
        calc(158 + (228 - 158) * var(--theme-progress))
    );
    --warm-light: rgba(234, 207, 166, calc(0.24 - var(--theme-progress) * 0.08));
}

html {
    background:
        radial-gradient(ellipse at 18% 0%, rgba(205, 218, 235, calc(0.5 - var(--theme-progress) * 0.34)), transparent 38rem),
        radial-gradient(ellipse at 86% 8%, rgba(230, 221, 206, calc(0.42 - var(--theme-progress) * 0.22)), transparent 34rem),
        linear-gradient(180deg,
            rgb(calc(246 + (13 - 246) * var(--theme-progress)), calc(248 + (18 - 248) * var(--theme-progress)), calc(252 + (29 - 252) * var(--theme-progress))) 0%,
            rgb(calc(238 + (18 - 238) * var(--theme-progress)), calc(242 + (24 - 242) * var(--theme-progress)), calc(248 + (36 - 248) * var(--theme-progress))) 100%);
}

body {
    background:
        linear-gradient(115deg, rgba(255,255,255,calc(0.24 - var(--theme-progress) * 0.2)), transparent 36%),
        radial-gradient(ellipse at 50% 120%, rgba(156, 174, 205, calc(0.22 - var(--theme-progress) * 0.04)), transparent 42rem);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(95, 110, 138, calc(0.028 - var(--theme-progress) * 0.012)) 1px, transparent 1px),
        linear-gradient(90deg, rgba(95, 110, 138, calc(0.026 - var(--theme-progress) * 0.012)) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,0.5), transparent 68%);
}

.site-header {
    top: 0.76rem;
    width: min(100% - 1.4rem, 1120px);
    min-height: 3.45rem;
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255,255,255,calc(0.72 - var(--theme-progress) * 0.58)), rgba(255,255,255,calc(0.34 - var(--theme-progress) * 0.18))),
        rgba(calc(247 - var(--theme-progress) * 229), calc(249 - var(--theme-progress) * 229), calc(252 - var(--theme-progress) * 222), calc(0.7 + var(--theme-progress) * 0.06)) !important;
    border: 1px solid var(--glass-stroke) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,calc(0.86 - var(--theme-progress) * 0.74)),
        0 18px 54px rgba(22, 32, 52, calc(0.08 + var(--theme-progress) * 0.24)) !important;
    -webkit-backdrop-filter: blur(22px) saturate(150%) !important;
    backdrop-filter: blur(22px) saturate(150%) !important;
}

.brand {
    letter-spacing: 0;
    font-weight: 780;
}

.nav {
    padding: 0.22rem;
    border-radius: 999px;
    background: rgba(255,255,255,calc(0.34 - var(--theme-progress) * 0.24));
    border: 1px solid rgba(255,255,255,calc(0.54 - var(--theme-progress) * 0.42));
}

.nav a {
    border-radius: 999px;
    padding: 0.48rem 0.78rem;
    transition: color 0.22s var(--ease-out-quart), background 0.22s linear, transform 0.22s var(--ease-out-quart);
}

.nav a:hover {
    background: rgba(255,255,255,calc(0.62 - var(--theme-progress) * 0.48));
    transform: translateY(-1px);
}

.page-shell {
    width: min(100% - 1.4rem, 1120px);
    padding-top: clamp(6.2rem, 9vw, 8.4rem);
}

.hero,
.page-hero {
    position: relative;
    isolation: isolate;
}

.hero-home-clean {
    min-height: min(72vh, 42rem);
    align-items: center;
    padding-block: clamp(3.4rem, 8vw, 6.4rem);
}

.hero-home-clean::before,
.page-hero::before {
    content: "";
    position: absolute;
    inset: -10% -8%;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 22% 24%, rgba(255,255,255,calc(0.68 - var(--theme-progress) * 0.58)), transparent 22rem),
        radial-gradient(ellipse at 78% 18%, rgba(178, 194, 221, calc(0.28 - var(--theme-progress) * 0.05)), transparent 24rem),
        linear-gradient(180deg, transparent, rgba(255,255,255,calc(0.16 - var(--theme-progress) * 0.1)));
    filter: saturate(112%);
}

.hero-copy {
    max-width: 760px;
}

.hero-home-clean h1,
.page-hero h1,
.tarot-hero-copy h1 {
    letter-spacing: 0;
    text-wrap: balance;
    color: var(--text);
}

.hero-home-clean h1 {
    font-size: clamp(3.8rem, 8.6vw, 7rem);
    line-height: 0.92;
}

.hero-copy p,
.page-hero p,
.tarot-hero-copy > p {
    max-width: 46rem;
    color: rgba(var(--muted-r), var(--muted-g), var(--muted-b), 0.92);
    line-height: 1.72;
    text-wrap: pretty;
}

.hero-kicker,
.section-kicker,
.eyebrow,
.article-kicker,
.note-card-date,
.article-translate-toggle {
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255,255,255,calc(0.62 - var(--theme-progress) * 0.5)), rgba(255,255,255,calc(0.24 - var(--theme-progress) * 0.1)));
    border: 1px solid rgba(255,255,255,calc(0.54 - var(--theme-progress) * 0.4));
    box-shadow: inset 0 1px 0 rgba(255,255,255,calc(0.8 - var(--theme-progress) * 0.68));
    -webkit-backdrop-filter: blur(16px) saturate(142%);
    backdrop-filter: blur(16px) saturate(142%);
}

.hero-kicker,
.section-kicker,
.eyebrow {
    width: fit-content;
    min-height: 2.06rem;
    padding: 0.42rem 0.72rem;
    text-transform: none;
}

.section-kicker::before {
    display: none;
}

.glass-card,
.note-card,
.article,
.comment-card,
.comment-form-wrap-v4,
.comments-compose-panel,
.tarot-form,
.tarot-history,
.reading-box,
.music-capsule-panel,
.article-video-card {
    border-radius: var(--surface-radius) !important;
    border: 1px solid var(--glass-stroke) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,calc(0.62 - var(--theme-progress) * 0.5)), rgba(255,255,255,calc(0.18 - var(--theme-progress) * 0.08))),
        var(--glass-tint) !important;
    box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255,255,255,calc(0.76 - var(--theme-progress) * 0.66)) !important;
    -webkit-backdrop-filter: blur(22px) saturate(145%) !important;
    backdrop-filter: blur(22px) saturate(145%) !important;
    transition:
        transform 0.32s var(--ease-out-quart),
        box-shadow 0.32s var(--ease-out-quart),
        border-color 0.24s linear,
        background 0.24s linear;
}

.glass-card::after,
.note-card::after,
.article-video-card::after,
.comment-card::after,
.tarot-form::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(115deg, transparent 8%, rgba(255,255,255,0.18) 35%, transparent 58%);
    opacity: 0;
    transform: translateX(-18%);
    transition: opacity 0.3s var(--ease-out-quart), transform 0.56s var(--ease-out-quart);
}

.glass-card:hover,
.note-card:hover,
.article-video-card:hover,
.comment-card:hover {
    transform: translate3d(0, -3px, 0);
    box-shadow: var(--glass-shadow-hover), inset 0 1px 0 rgba(255,255,255,calc(0.84 - var(--theme-progress) * 0.7)) !important;
}

.glass-card:hover::after,
.note-card:hover::after,
.article-video-card:hover::after,
.comment-card:hover::after {
    opacity: 1;
    transform: translateX(18%);
}

.button,
.comment-form input[type="submit"],
.music-search-button,
.tarot-history-more-toggle {
    min-height: 2.72rem;
    border-radius: 999px !important;
    font-weight: 740;
    letter-spacing: 0;
    transition:
        transform 0.22s var(--ease-out-quart),
        box-shadow 0.22s var(--ease-out-quart),
        background 0.22s linear,
        opacity 0.22s linear;
}

.button.primary,
.comment-form input[type="submit"],
.music-search-button {
    color: rgb(calc(255 - var(--theme-progress) * 12), calc(255 - var(--theme-progress) * 10), calc(255 - var(--theme-progress) * 4)) !important;
    background:
        linear-gradient(180deg, rgba(54, 66, 86, 0.96), rgba(30, 40, 58, 0.98)),
        radial-gradient(circle at 26% 18%, rgba(255,255,255,0.26), transparent 46%) !important;
    box-shadow: 0 16px 36px rgba(30, 42, 66, 0.18), inset 0 1px 0 rgba(255,255,255,0.2) !important;
}

.button.secondary,
.lang-toggle,
.article-translate-toggle,
.music-capsule-toggle {
    background:
        linear-gradient(180deg, rgba(255,255,255,calc(0.74 - var(--theme-progress) * 0.56)), rgba(255,255,255,calc(0.3 - var(--theme-progress) * 0.14))),
        rgba(246, 249, 253, calc(0.56 - var(--theme-progress) * 0.34)) !important;
    border: 1px solid rgba(255,255,255,calc(0.62 - var(--theme-progress) * 0.46)) !important;
}

.button:hover,
.comment-form input[type="submit"]:hover,
.music-search-button:hover,
.music-capsule-toggle:hover {
    transform: translateY(-2px);
}

.notes-card-grid {
    gap: clamp(0.9rem, 2vw, 1.35rem);
}

.note-card {
    position: relative;
    min-height: 13.6rem;
    padding: clamp(1.15rem, 2.4vw, 1.55rem);
}

.note-card h2,
.note-card h3 {
    line-height: 1.12;
    text-wrap: balance;
}

.note-card p {
    line-height: 1.68;
    color: rgba(var(--muted-r), var(--muted-g), var(--muted-b), 0.92);
}

.article {
    max-width: 860px;
    padding: clamp(1.35rem, 4vw, 2.4rem);
}

.article-content {
    font-size: clamp(1rem, 1.1vw, 1.08rem);
}

.article-content :where(p, li) {
    line-height: 1.92;
}

.comments-shell {
    margin-top: clamp(2rem, 5vw, 3.4rem);
}

.comments-grid {
    gap: clamp(1rem, 2.4vw, 1.6rem);
}

.comment-card,
.comment-form-wrap-v4 {
    padding: clamp(0.9rem, 2vw, 1.15rem);
}

.tarot-stage {
    position: relative;
}

.tarot-layout {
    gap: clamp(1rem, 2.4vw, 1.6rem);
}

.tarot-form {
    position: sticky;
    top: 6.2rem;
}

.tarot-table {
    border-radius: clamp(24px, 3vw, 36px) !important;
    background:
        radial-gradient(ellipse at 50% 14%, rgba(218, 226, 238, 0.14), transparent 18rem),
        radial-gradient(ellipse at 24% 16%, rgba(112, 130, 158, 0.16), transparent 20rem),
        linear-gradient(180deg, #161d28 0%, #101720 100%) !important;
    border-color: rgba(236, 241, 248, 0.11) !important;
}

.tarot-deck-fan::before {
    opacity: 0.78;
    background:
        radial-gradient(ellipse at center, rgba(237, 242, 248, 0.045), transparent 63%),
        linear-gradient(180deg, rgba(255,255,255,0.035), transparent);
}

.deck-card {
    filter: drop-shadow(0 16px 22px rgba(3, 7, 14, 0.26));
}

.tarot-card-art,
.deck-card-art {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
}

.music-capsule {
    right: clamp(0.8rem, 2.2vw, 1.4rem);
    bottom: clamp(0.8rem, 2.2vw, 1.4rem);
}

.music-capsule-toggle {
    min-height: 3.4rem;
    border-radius: 999px !important;
}

.music-capsule-panel {
    border-radius: 24px !important;
}

.article-video-card {
    isolation: isolate;
}

.article-video-player {
    border-radius: clamp(16px, 2.2vw, 24px);
}

.motion-reveal {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
    transition:
        opacity 0.62s var(--ease-out-quart) var(--reveal-delay, 0ms),
        transform 0.72s var(--ease-soft-spring) var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}

.motion-reveal.is-visible,
.is-reduced-motion .motion-reveal {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

@keyframes premium-soft-float {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(0, -4px, 0); }
}

.hero-kicker .badge-icon,
.section-kicker .badge-icon,
.eyebrow .badge-icon {
    animation: premium-soft-float 6s var(--ease-in-out, ease-in-out) infinite;
}

[data-theme="dark"] .glass-card,
[data-theme="dark"] .note-card,
[data-theme="dark"] .article,
[data-theme="dark"] .comment-card,
[data-theme="dark"] .comment-form-wrap-v4,
[data-theme="dark"] .comments-compose-panel,
[data-theme="dark"] .tarot-form,
[data-theme="dark"] .tarot-history,
[data-theme="dark"] .music-capsule-panel,
[data-theme="dark"] .article-video-card {
    border-color: rgba(126, 146, 178, 0.2) !important;
}

[data-theme="dark"] .button.primary,
[data-theme="dark"] .comment-form input[type="submit"],
[data-theme="dark"] .music-search-button {
    background:
        linear-gradient(180deg, rgba(80, 95, 126, 0.96), rgba(43, 56, 83, 0.98)),
        radial-gradient(circle at 22% 16%, rgba(255,255,255,0.16), transparent 44%) !important;
}

@media (max-width: 900px) {
    .site-header {
        border-radius: 24px;
        align-items: center;
    }

    .nav {
        order: 3;
        width: 100%;
        justify-content: flex-start;
    }

    .tarot-form {
        position: relative;
        top: auto;
    }
}

@media (max-width: 640px) {
    .page-shell {
        width: min(100% - 0.9rem, 1120px);
        padding-top: 5.6rem;
    }

    .hero-home-clean {
        min-height: 58vh;
        padding-block: 2rem 2.6rem;
    }

    .hero-home-clean h1,
    .page-hero h1,
    .tarot-hero-copy h1 {
        font-size: clamp(2.36rem, 11vw, 3.6rem);
    }

    .hero-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .button {
        width: 100%;
        justify-content: center;
    }

    .note-card,
    .article,
    .comment-card,
    .comment-form-wrap-v4,
    .tarot-form {
        border-radius: 20px !important;
    }

    .article-video-copy p {
        max-width: none;
    }

    .music-capsule {
        left: 0.62rem;
        right: 0.62rem;
    }

    .music-capsule-toggle {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .motion-reveal,
    .hero-kicker .badge-icon,
    .section-kicker .badge-icon,
    .eyebrow .badge-icon {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

/* Final refinement pass: quieter rhythm, sharper glass, safer hidden fields. */
.site-name-hp {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.site-shell,
.site-main,
.archive-wrap,
.article-wrap,
.tarot-page {
    isolation: isolate;
}

.site-header {
    border-bottom: 1px solid rgba(var(--line-r), var(--line-g), var(--line-b), 0.1) !important;
    background: rgba(var(--panel-r), var(--panel-g), var(--panel-b), 0.58) !important;
    box-shadow: 0 1px 0 rgba(255,255,255,0.48), 0 18px 46px rgba(15, 23, 42, 0.04) !important;
}

[data-theme="dark"] .site-header {
    background: rgba(12, 18, 28, 0.62) !important;
    border-bottom-color: rgba(226, 232, 240, 0.09) !important;
    box-shadow: 0 1px 0 rgba(255,255,255,0.05), 0 18px 46px rgba(0,0,0,0.18) !important;
}

.brand,
.primary-nav a,
.lang-toggle,
.theme-toggle {
    letter-spacing: 0 !important;
}

.glass-card,
.note-card,
.project-card,
.article,
.tarot-form,
.tarot-table,
.reading-box,
.tarot-history,
.comment-card,
.comment-form-wrap-v4,
.comments-compose-panel,
.music-capsule-panel {
    border-radius: 22px !important;
    border-color: rgba(var(--line-r), var(--line-g), var(--line-b), 0.13) !important;
    box-shadow: 0 22px 52px rgba(15, 23, 42, 0.075), inset 0 1px rgba(255,255,255,0.58) !important;
}

[data-theme="dark"] .glass-card,
[data-theme="dark"] .note-card,
[data-theme="dark"] .project-card,
[data-theme="dark"] .article,
[data-theme="dark"] .tarot-form,
[data-theme="dark"] .tarot-table,
[data-theme="dark"] .reading-box,
[data-theme="dark"] .tarot-history,
[data-theme="dark"] .comment-card,
[data-theme="dark"] .comment-form-wrap-v4,
[data-theme="dark"] .comments-compose-panel,
[data-theme="dark"] .music-capsule-panel {
    border-color: rgba(226, 232, 240, 0.12) !important;
    box-shadow: 0 24px 58px rgba(0, 0, 0, 0.28), inset 0 1px rgba(255,255,255,0.075) !important;
}

.note-card,
.comment-card,
.tarot-history-item {
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.note-card:hover,
.comment-card:hover,
.tarot-history-item:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--accent-soft-r), var(--accent-soft-g), var(--accent-soft-b), 0.24) !important;
}

.page-hero,
.hero {
    max-width: 1120px;
    margin-inline: auto;
}

.hero-home-clean,
.page-hero,
.tarot-hero {
    gap: clamp(1rem, 3vw, 2.2rem) !important;
}

.hero-home-clean h1,
.page-hero h1,
.tarot-hero-copy h1,
.article h1 {
    text-wrap: balance;
}

.note-card p,
.article-content p,
.comment-card-body,
.reading-box,
.tarot-history-item p {
    color: rgba(var(--muted-r), var(--muted-g), var(--muted-b), 0.96);
}

.button,
button,
input[type="submit"] {
    -webkit-tap-highlight-color: transparent;
}

.button.primary,
.comment-form input[type="submit"],
.tarot-form button,
.music-search button {
    background: linear-gradient(135deg, rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.94), rgba(var(--accent-soft-r), var(--accent-soft-g), var(--accent-soft-b), 0.86)) !important;
    box-shadow: inset 0 1px rgba(255,255,255,0.26), 0 12px 28px rgba(15, 23, 42, 0.12) !important;
}

[data-theme="dark"] .button.primary,
[data-theme="dark"] .comment-form input[type="submit"],
[data-theme="dark"] .tarot-form button,
[data-theme="dark"] .music-search button {
    background: linear-gradient(135deg, rgba(226, 232, 240, 0.92), rgba(148, 163, 184, 0.82)) !important;
    color: #101722 !important;
    box-shadow: inset 0 1px rgba(255,255,255,0.42), 0 14px 34px rgba(0, 0, 0, 0.26) !important;
}

.comment-form textarea,
.tarot-form textarea,
.tarot-form input,
.tarot-form select,
.music-search input {
    border-radius: 18px !important;
    border-color: rgba(var(--line-r), var(--line-g), var(--line-b), 0.14) !important;
    background: rgba(var(--panel-r), var(--panel-g), var(--panel-b), 0.55) !important;
    box-shadow: inset 0 1px rgba(255,255,255,0.5) !important;
}

[data-theme="dark"] .comment-form textarea,
[data-theme="dark"] .tarot-form textarea,
[data-theme="dark"] .tarot-form input,
[data-theme="dark"] .tarot-form select,
[data-theme="dark"] .music-search input {
    background: rgba(9, 14, 22, 0.54) !important;
    border-color: rgba(226, 232, 240, 0.12) !important;
    box-shadow: inset 0 1px rgba(255,255,255,0.06) !important;
}

.tarot-table {
    min-height: clamp(560px, 72vh, 760px);
}

.deck-card img {
    object-fit: cover;
    image-rendering: auto;
}

@media (max-width: 760px) {
    .site-main {
        padding-inline: clamp(1rem, 5vw, 1.35rem);
    }

    .site-header {
        top: 0;
        margin: 0;
        border-radius: 0 0 20px 20px !important;
    }

    .primary-nav {
        gap: 0.25rem !important;
    }

    .primary-nav a {
        padding: 0.54rem 0.66rem !important;
        font-size: 0.88rem !important;
    }

    .glass-card,
    .note-card,
    .article,
    .tarot-form,
    .tarot-table,
    .reading-box,
    .comments-compose-panel,
    .comment-form-wrap-v4 {
        border-radius: 20px !important;
    }

    .tarot-table {
        min-height: 520px;
        padding: clamp(1rem, 4.5vw, 1.25rem) !important;
    }
}

@keyframes deck-shuffle {
    from {
        transform: translateX(calc(-50% + var(--deck-shift, 0px))) translateY(var(--deck-lift, 0px)) rotate(calc(var(--deck-rotate, 0deg) - 1.4deg));
    }
    to {
        transform: translateX(calc(-50% + var(--deck-shift, 0px))) translateY(calc(var(--deck-lift, 0px) - 8px)) rotate(calc(var(--deck-rotate, 0deg) + 1.4deg));
    }
}

@keyframes result-rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.site-footer {
    padding: 2rem 0 3rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255,255,255,0.54);
    color: var(--muted);
    font-size: 0.92rem;
}

.site-footer a {
    opacity: 0.88;
    transition: opacity 0.2s ease;
}

.site-footer a:hover {
    opacity: 1;
}

.tarot-preview-band {
    padding: 1.45rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
}

.tarot-preview-copy {
    display: grid;
    gap: 0.75rem;
}

@keyframes page-fade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 980px) {
    .hero,
    .tarot-layout {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
    }

    .tarot-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tarot-stage-shell,
    .tarot-preview-band {
        grid-template-columns: 1fr;
    }

    .tarot-form {
        position: static;
    }
}

.tarot-question-kicker,
.tarot-card-kicker {
    color: inherit;
}

@media (max-width: 820px) {
    body.admin-bar .site-header {
        top: 46px;
    }

    .site-header {
        grid-template-columns: 1fr auto;
        align-items: start;
        gap: 0.75rem;
        padding-top: 0.8rem;
        padding-bottom: 0.8rem;
    }

    .brand {
        padding-top: 0.2rem;
    }

    .header-actions {
        gap: 0.38rem;
    }

    .theme-toggle {
        width: 4.7rem;
        height: 2.24rem;
        --toggle-thumb-size: 1.82rem;
        --toggle-pad: 0.18rem;
        --toggle-travel: calc(4.7rem - 1.82rem - 0.36rem);
    }

    .theme-toggle-thumb {
        width: var(--toggle-thumb-size);
        height: var(--toggle-thumb-size);
        left: var(--toggle-pad);
        top: var(--toggle-pad);
        transform: translateX(calc(var(--theme-progress) * var(--toggle-travel)));
    }

    .nav {
        grid-column: 1 / -1;
        justify-content: flex-start;
        gap: 0.22rem;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.2rem;
        margin: 0 -0.1rem;
        scrollbar-width: none;
    }

    .nav::-webkit-scrollbar {
        display: none;
    }

    .nav a {
        white-space: nowrap;
        padding: 0.52rem 0.8rem;
    }

    .lang-toggle {
        min-width: auto;
        min-height: 2.08rem;
        padding-inline: 0.68rem;
    }

    .hero,
    .page-hero {
        padding-top: 2.6rem;
    }

    .hero-home {
        gap: 1rem;
    }

    .hero-copy {
        gap: 0.82rem;
    }

    .section-head {
        margin-bottom: 1.2rem;
    }

    .hero-actions,
    .tarot-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hero-actions .button,
    .tarot-actions .button,
    .tarot-preview-actions .button {
        width: 100%;
    }

    .hero-panel-dark {
        background:
            linear-gradient(180deg, rgba(36, 43, 56, 0.96), rgba(21, 27, 37, 0.98));
        border-color: rgba(255,255,255,0.14);
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 12px 24px rgba(17, 22, 29, 0.16);
    }

    .hero-panel-dark .button.secondary {
        background: linear-gradient(180deg, rgba(78, 89, 108, 0.94), rgba(55, 65, 82, 0.98));
        color: #f5f7fb;
        border-color: rgba(255,255,255,0.16);
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 8px 18px rgba(15, 20, 28, 0.16);
        backdrop-filter: blur(16px) saturate(135%);
    }

    .hero-panel-dark .button.secondary::after {
        background: linear-gradient(100deg, transparent 18%, rgba(255,255,255,0.12) 48%, transparent 78%);
    }

    [data-theme="dark"] .hero-panel,
    [data-theme="dark"] .hero-panel-dark {
        background-image: none;
    }

    [data-theme="dark"] .hero-panel {
        background: linear-gradient(180deg, rgba(34,40,52,0.9), rgba(23,28,38,0.78));
        border-color: rgba(255,255,255,0.12);
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 14px 28px rgba(0,0,0,0.16);
    }

    [data-theme="dark"] .hero-panel-dark {
        background: linear-gradient(180deg, rgba(26,31,41,0.96), rgba(15,19,27,0.94));
        border-color: rgba(255,255,255,0.12);
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 14px 28px rgba(0,0,0,0.18);
    }

    .hero-panel,
    .hero-mini-card,
    .note-card,
    .tarot-preview-band {
        border-radius: 18px;
    }

    .hero-panel,
    .hero-mini-card,
    .note-card,
    .tarot-form,
    .reading-box {
        padding: 1.1rem;
    }

    h1 {
        font-size: clamp(2.75rem, 12vw, 3.9rem);
        line-height: 0.99;
    }

    .tarot-hero-copy h1 {
        max-width: 7ch;
        font-size: clamp(2.2rem, 10vw, 3.3rem);
    }

    .tarot-hero-note,
    .tarot-page-closing {
        font-size: 0.95rem;
    }

    .tarot-preview-card,
    .tarot-table-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .tarot-result-boundary {
        max-width: none;
        text-align: left;
    }

    .tarot-history-head,
    .tarot-history-item {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .tarot-history {
        padding: 1rem;
        gap: 0.82rem;
    }

    .tarot-history-head h2 {
        font-size: 1.08rem;
        margin-top: 0.32rem;
    }

    .tarot-history-head p,
    .tarot-history-copy p {
        font-size: 0.88rem;
    }

    .tarot-history-item {
        padding: 0.88rem 0.9rem;
        gap: 0.72rem;
        border-radius: 14px;
    }

    .tarot-history-meta {
        gap: 0.5rem;
        margin-bottom: 0.34rem;
        font-size: 0.8rem;
    }

    .tarot-history-copy strong {
        font-size: 0.92rem;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .article-meta-row {
        align-items: flex-start;
    }

    .comment-form-fields {
        grid-template-columns: 1fr;
    }

    .tarot-hero-copy h1 {
        max-width: 7ch;
        font-size: clamp(2rem, 12vw, 3.1rem);
        line-height: 0.98;
    }

    .tarot-selection-copy {
        text-align: left;
        max-width: none;
        font-size: 0.9rem;
    }

    .tarot-table {
        min-height: 38rem;
        padding: 1.05rem;
    }

    .tarot-table-head {
        grid-template-columns: 1fr;
        display: grid;
        gap: 0.72rem;
    }

    .tarot-spread-zone {
        grid-template-columns: 1fr;
    }

    .tarot-cards {
        grid-template-columns: 1fr;
    }

    .studio-rail {
        grid-template-columns: 1fr;
    }

    .notes-card-grid-featured .note-card:nth-child(1) {
        grid-column: auto;
    }

    .notes-card-grid {
        grid-template-columns: 1fr;
    }

    .note-card {
        min-height: auto;
    }

    .tarot-preview-band {
        gap: 0.9rem;
    }

    .tarot-deck-fan.is-drawing .deck-card.is-selected {
        --deck-shift: 0px;
        --deck-lift: -128px;
    }

    .tarot-deck-fan {
        min-height: 22rem;
        overflow-x: hidden;
        overflow-y: visible;
    }

    .deck-card {
        width: 112px;
    }

    .tarot-card {
        min-height: 338px;
    }

    .tarot-card-inner {
        min-height: 338px;
    }

    .tarot-card-art {
        height: 13.8rem;
    }

    .ai-chat-bubble.is-user,
    .ai-chat-bubble.is-assistant {
        margin-left: 0;
        margin-right: 0;
    }
}

.comments-shell {
    margin: 1.1rem auto clamp(2.6rem, 6vw, 3.8rem);
}

.comments-shell-v4 {
    display: grid;
    gap: 0.85rem;
    padding-top: 0.1rem;
}

.comments-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(188,201,224,.18);
}

.comments-topbar-copy {
    display: grid;
    gap: 0.42rem;
}

.comments-topbar h2 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.24;
}

.comments-topbar p {
    margin: 0.08rem 0 0;
    max-width: 18rem;
    font-size: 0.82rem;
    text-align: right;
}

.comments-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 19rem);
    gap: 1rem;
    align-items: start;
}

.comments-feed,
.comments-compose-panel {
    min-width: 0;
}

.comment-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.6rem;
}

.comment-list .comment {
    list-style: none;
    padding: 0;
    border: 0;
    background: transparent;
}

.comment-card {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 0.45rem;
    padding: 0.9rem 0.96rem;
    border: 1px solid rgba(223, 229, 238, 0.68);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.03)),
        rgba(252,253,255,0.62);
    box-shadow: 0 10px 22px rgba(108,126,158,.045);
    backdrop-filter: blur(12px) saturate(116%);
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.comment-card:hover {
    transform: translateY(-1px);
    border-color: rgba(205,214,227,.9);
    box-shadow: 0 18px 38px rgba(103,123,158,.08);
}

.comment-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.comment-card-head strong {
    font-size: 0.92rem;
    font-weight: 610;
    color: var(--text);
}

.comment-card-head time {
    font-size: 0.8rem;
    color: var(--muted);
    white-space: nowrap;
}

.comment-card-body {
    color: var(--text);
    font-size: 0.93rem;
    line-height: 1.7;
}

.comment-card-body p {
    margin: 0.08rem 0 0;
}

.comments-empty-inline {
    padding: 0.15rem 0 0.55rem;
    font-size: 0.9rem;
}

.comments-empty-inline strong {
    font-weight: 560;
    color: var(--text);
}

.comment-form-wrap-v4 {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 0.82rem;
    padding: 1rem;
    border: 1px solid rgba(223, 229, 238, 0.72);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.03)),
        rgba(252,253,255,0.62);
    box-shadow: 0 12px 28px rgba(105,126,160,.05);
    backdrop-filter: blur(12px) saturate(118%);
}

.comment-compose-head {
    display: grid;
    gap: 0.42rem;
    padding-bottom: 0.42rem;
    border-bottom: 1px solid rgba(188,201,224,.18);
}

.comment-compose-head strong {
    font-size: 1rem;
    font-weight: 620;
    color: var(--text);
    line-height: 1.28;
}

.comment-compose-head p {
    margin: 0;
    font-size: 0.86rem;
}

.comment-respond {
    display: grid;
    gap: 0.62rem;
}

.comment-reply-title {
    margin: 0;
    font-size: 1.04rem;
}

.comment-form {
    display: grid;
    gap: 0.62rem;
}

.comment-form label {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--muted);
    font-weight: 650;
}

.comment-form-note,
.comment-notes,
.logged-in-as {
    font-size: 0.84rem;
}

.comment-form-author,
.comment-form-email,
.comment-form-url,
.comment-form-cookies-consent {
    display: none !important;
}

.comment-form-author,
.comment-form-email,
.comment-form-comment {
    margin: 0;
}

.comment-form textarea {
    min-height: 7rem;
    padding: 0.74rem 0.82rem;
    border-radius: 12px;
    border-color: rgba(223, 229, 238, 0.9);
    background: rgba(255,255,255,0.9);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.82);
}

.comment-form textarea:focus {
    border-color: rgba(154,171,198,.9);
    box-shadow: 0 0 0 4px rgba(154,171,198,.14);
}

.comment-form-status {
    min-height: 1.35rem;
    font-size: 0.86rem;
    transition: color .18s ease, opacity .18s ease;
}

.comment-form-status.is-error { color: #8a4a4a; }
.comment-form-status.is-success { color: #58704f; }

[data-theme="dark"] .comments-topbar {
    border-bottom-color: rgba(124,140,170,.16);
}

[data-theme="dark"] .comment-card {
    border-color: rgba(255,255,255,.1);
    background: rgba(31,38,49,.76);
    box-shadow: 0 18px 40px rgba(3,8,18,.16);
}

[data-theme="dark"] .comment-card:hover {
    border-color: rgba(255,255,255,.16);
    box-shadow: 0 22px 46px rgba(6,12,24,.22);
}

[data-theme="dark"] .comment-card-head strong,
[data-theme="dark"] .comment-card-body,
[data-theme="dark"] .comments-empty-inline strong,
[data-theme="dark"] .comment-compose-head strong,
[data-theme="dark"] .comment-reply-title {
    color: #edf3fb;
}

[data-theme="dark"] .comment-card-head time,
[data-theme="dark"] .comment-compose-head p,
[data-theme="dark"] .comment-form-status {
    color: rgba(204,214,228,.68);
}

[data-theme="dark"] .comment-form-wrap-v4 {
    border-color: rgba(255,255,255,.1);
    background: rgba(28,35,46,.74);
    box-shadow: 0 24px 48px rgba(4,10,20,.18);
}

[data-theme="dark"] .comment-compose-head {
    border-bottom-color: rgba(120,136,164,.16);
}

[data-theme="dark"] .comment-form textarea {
    border-color: rgba(255,255,255,.12);
    background: rgba(23,29,39,.92);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

[data-theme="dark"] .comment-form textarea::placeholder {
    color: rgba(210,220,234,.34);
}

[data-theme="dark"] .comment-form textarea:focus {
    border-color: rgba(142,160,193,.5);
    box-shadow: 0 0 0 4px rgba(120,144,182,.14);
}

@media (min-width: 961px) {
    .comments-compose-panel {
        position: sticky;
        top: 1.1rem;
    }
}

@media (max-width: 960px) {
    .comments-grid {
        grid-template-columns: 1fr;
    }

    .comments-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .comments-topbar p {
        text-align: left;
        max-width: none;
    }

    .comment-card-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.18rem;
    }

    .comment-card-head time {
        white-space: normal;
    }
}

@media (max-width: 820px) {
    .comments-shell-v4 {
        gap: 0.75rem;
    }

    .comments-topbar {
        padding-bottom: 0.6rem;
    }
}

.header-actions .theme-toggle {
    width: 2.52rem;
    height: 2.52rem;
    --toggle-pad: 0;
    --toggle-thumb-size: 0;
    --toggle-travel: 0;
}

.header-actions .theme-toggle-track {
    inset: 0;
}

.header-actions .theme-toggle-thumb,
.header-actions .theme-toggle-thumb-gloss,
.header-actions .theme-toggle-thumb-core,
.header-actions .theme-toggle-sun-core,
.header-actions .theme-toggle-moon-cut {
    display: none;
}

@media (max-width: 820px) {
    .header-actions .theme-toggle {
        width: 2.42rem;
        height: 2.42rem;
    }

    .header-actions .theme-toggle__around {
        width: 1.34rem;
        height: 1.34rem;
    }
}

/* Liquid glass refinement pass. */
.header-actions .theme-toggle {
    --theme-toggle__around--duration: 460ms;
    contain: layout paint;
    isolation: isolate;
}

.header-actions .theme-toggle-track {
    color: rgb(calc(248 + (224 - 248) * var(--theme-progress)), calc(184 + (229 - 184) * var(--theme-progress)), calc(61 + (239 - 61) * var(--theme-progress)));
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(255,255,255,calc(0.82 - var(--theme-progress) * 0.58)), rgba(255,255,255,calc(0.2 - var(--theme-progress) * 0.1)) 44%, rgba(255,255,255,calc(0.08 + var(--theme-progress) * 0.02))),
        radial-gradient(circle at 30% 18%, rgba(255,255,255,calc(0.9 - var(--theme-progress) * 0.72)), transparent 46%),
        linear-gradient(180deg,
            rgba(calc(255 + (42 - 255) * var(--theme-progress)), calc(255 + (50 - 255) * var(--theme-progress)), calc(255 + (67 - 255) * var(--theme-progress)), calc(0.72 + var(--theme-progress) * 0.04)),
            rgba(calc(238 + (13 - 238) * var(--theme-progress)), calc(244 + (18 - 244) * var(--theme-progress)), calc(252 + (29 - 252) * var(--theme-progress)), calc(0.44 + var(--theme-progress) * 0.18))
        );
    border-color: rgba(255,255,255,calc(0.8 - var(--theme-progress) * 0.56));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,calc(0.88 - var(--theme-progress) * 0.66)),
        inset 0 -1px 0 rgba(255,255,255,calc(0.34 - var(--theme-progress) * 0.22)),
        0 12px 26px rgba(15,23,36,calc(0.08 + var(--theme-progress) * 0.16));
    -webkit-backdrop-filter: blur(22px) saturate(170%);
    backdrop-filter: blur(22px) saturate(170%);
    transform: translateZ(0);
    transition: color 0.22s linear, background 0.22s linear, border-color 0.22s linear, box-shadow 0.22s linear, transform 0.24s cubic-bezier(.22,1,.36,1);
}

.header-actions .theme-toggle-track::before,
.header-actions .theme-toggle-track::after {
    content: "";
    display: block;
    position: absolute;
    pointer-events: none;
    border-radius: inherit;
}

.header-actions .theme-toggle-track::before {
    inset: 1px 1px auto 1px;
    height: 45%;
    background: linear-gradient(180deg, rgba(255,255,255,calc(0.76 - var(--theme-progress) * 0.62)), rgba(255,255,255,0));
    opacity: 0.9;
}

.header-actions .theme-toggle-track::after {
    inset: 0;
    background: linear-gradient(120deg, transparent 12%, rgba(255,255,255,calc(0.34 - var(--theme-progress) * 0.22)) 38%, transparent 62%);
    opacity: 0.52;
    transform: translateX(calc(-0.55rem + var(--theme-progress) * 1.1rem));
    transition: transform 0.44s cubic-bezier(.22,1,.36,1), opacity 0.22s linear;
}

.header-actions .theme-toggle__around {
    position: relative;
    z-index: 1;
    transform: translateZ(0);
    backface-visibility: hidden;
    filter:
        drop-shadow(0 1px 1px rgba(255,255,255,calc(0.28 - var(--theme-progress) * 0.2)))
        drop-shadow(0 2px 5px rgba(0,0,0,calc(0.1 + var(--theme-progress) * 0.16)));
}

.header-actions .theme-toggle__around *,
.header-actions .theme-toggle__around > :first-child path {
    transition-timing-function: cubic-bezier(.25,.9,.25,1);
}

.header-actions .theme-toggle:hover .theme-toggle-track {
    transform: translateY(-1px) translateZ(0);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,calc(0.92 - var(--theme-progress) * 0.68)),
        inset 0 -1px 0 rgba(255,255,255,calc(0.38 - var(--theme-progress) * 0.22)),
        0 16px 32px rgba(15,23,36,calc(0.1 + var(--theme-progress) * 0.18));
}

.lang-toggle,
.button.secondary,
.glass-card,
.note-card,
.article,
.tarot-form,
.reading-box,
.comments-compose-panel,
.comment-card {
    -webkit-backdrop-filter: blur(24px) saturate(165%);
    backdrop-filter: blur(24px) saturate(165%);
}

.lang-toggle,
.button.secondary {
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,calc(0.72 - var(--theme-progress) * 0.56)),
        inset 0 -1px 0 rgba(255,255,255,calc(0.22 - var(--theme-progress) * 0.12)),
        0 12px 28px rgba(15,23,36,calc(0.05 + var(--theme-progress) * 0.17));
}

.button.primary {
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,calc(0.18 + var(--theme-progress) * 0.02)),
        0 16px 32px rgba(15,23,36,calc(0.14 + var(--theme-progress) * 0.13));
}

/* Icon polish pass: consistent weight, size, and restrained saturation. */
:root {
    --icon-soft: rgb(calc(104 + (204 - 104) * var(--theme-progress)), calc(120 + (214 - 120) * var(--theme-progress)), calc(145 + (228 - 145) * var(--theme-progress)));
    --icon-accent: rgb(calc(92 + (213 - 92) * var(--theme-progress)), calc(116 + (222 - 116) * var(--theme-progress)), calc(154 + (239 - 154) * var(--theme-progress)));
    --icon-muted: rgb(calc(126 + (185 - 126) * var(--theme-progress)), calc(139 + (197 - 139) * var(--theme-progress)), calc(160 + (212 - 160) * var(--theme-progress)));
}

.ui-icon {
    width: 1.02rem;
    height: 1.02rem;
    stroke-width: 1.68;
    opacity: 0.84;
    color: currentColor;
    transform: translateZ(0);
    filter: saturate(1.08);
}

img.ui-icon {
    object-fit: contain;
    filter:
        saturate(1.12)
        brightness(calc(0.72 + var(--theme-progress) * 0.86))
        contrast(1.04);
}

.ui-icon path,
.ui-icon circle,
.ui-icon line,
.ui-icon polyline,
.ui-icon polygon,
.ui-icon rect {
    vector-effect: non-scaling-stroke;
}

.badge-icon {
    width: 0.96rem;
    height: 0.96rem;
    stroke-width: 1.82;
    opacity: 0.94;
    color: var(--icon-accent);
    filter: saturate(1.16) drop-shadow(0 1px 1px rgba(255,255,255,calc(0.32 - var(--theme-progress) * 0.24)));
}

.hero-kicker .badge-icon,
.section-kicker .badge-icon {
    color: var(--icon-accent);
}

[data-theme="dark"] .hero-kicker .badge-icon,
[data-theme="dark"] .section-kicker .badge-icon {
    color: var(--icon-accent);
}

.button-icon {
    width: 1rem;
    height: 1rem;
    stroke-width: 1.82;
    opacity: 0.9;
    color: currentColor;
    filter: saturate(1.1);
}

.button.primary .button-icon {
    color: rgba(255,255,255,0.96);
    opacity: 0.92;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.16));
}

.button.secondary .button-icon {
    color: var(--icon-accent);
}

.button:hover .button-icon {
    transform: translateX(1px) scale(1.03);
    opacity: 1;
}

.inline-icon {
    width: 0.96rem;
    height: 0.96rem;
    stroke-width: 1.72;
    opacity: 0.78;
    color: var(--icon-muted);
    filter: saturate(1.04);
}

.article-back-link:hover .inline-icon,
.note-card-link:hover .inline-icon {
    color: var(--icon-accent);
    opacity: 1;
}

.lang-toggle-icon {
    width: 1.02rem;
    height: 1.02rem;
    stroke-width: 1.82;
    opacity: 0.86;
    color: var(--icon-soft);
    filter: saturate(1.08);
}

.lang-caret {
    width: 0.86rem;
    height: 0.86rem;
    stroke-width: 1.86;
    opacity: 0.68;
    color: var(--icon-muted);
}

.lang-toggle:hover .lang-toggle-icon,
.lang-toggle:hover .lang-caret {
    opacity: 1;
    color: var(--icon-accent);
}

.header-actions .theme-toggle {
    width: 2.58rem;
    height: 2.58rem;
}

.header-actions .theme-toggle__around {
    width: 1.48rem;
    height: 1.48rem;
    filter:
        saturate(1.12)
        drop-shadow(0 1px 1px rgba(255,255,255,calc(0.3 - var(--theme-progress) * 0.22)))
        drop-shadow(0 2px 5px rgba(0,0,0,calc(0.1 + var(--theme-progress) * 0.16)));
}

[data-theme="dark"] .ui-icon {
    opacity: 0.88;
}

.glass-card,
.note-card,
.button,
.music-capsule-toggle,
.music-capsule-panel,
.theme-toggle,
.lang-toggle {
    transition-duration: 180ms;
    transition-timing-function: cubic-bezier(.2,.8,.2,1);
}

.note-card:hover,
.glass-card:hover {
    transform: translate3d(0, -2px, 0);
}

/* Layout refinement pass: fewer duplicated panels, calmer spacing across desktop, tablet, and phone. */
.hero-home-clean {
    grid-template-columns: minmax(0, 45rem);
    min-height: clamp(23rem, 52vh, 31rem);
    padding-top: clamp(3.2rem, 7vw, 5.2rem);
    padding-bottom: clamp(2.4rem, 5vw, 4rem);
    align-items: center;
}

.hero-home-clean .hero-copy {
    max-width: 45rem;
}

.hero-home-clean h1,
.tarot-hero-copy h1,
.notes-page h1,
.article h1 {
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.hero-home-clean h1 {
    font-size: clamp(3rem, 6.4vw, 5.35rem);
    line-height: 0.98;
    max-width: 10.5ch;
}

.hero-home-clean .hero-copy > p {
    max-width: 34rem;
    font-size: clamp(1.02rem, 1.5vw, 1.18rem);
    line-height: 1.68;
}

.section-home-notes {
    padding-top: clamp(1.2rem, 3vw, 2.2rem);
}

.section-home-notes .section-head {
    margin-bottom: 1rem;
}

.section-home-notes h2 {
    max-width: 12em;
    font-size: clamp(1.72rem, 3.2vw, 2.35rem);
    letter-spacing: 0;
}

.section-home-notes .notes-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(0.78rem, 1.8vw, 1rem);
}

.section-home-notes .note-card {
    min-height: 12rem;
    padding: clamp(1.05rem, 2vw, 1.28rem);
    gap: 0.72rem;
}

.section-home-notes .note-card p {
    line-height: 1.62;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notes-page-grid {
    padding-top: clamp(1.2rem, 3vw, 2.2rem);
}

.notes-page-grid .note-card {
    min-height: 12.6rem;
}

.note-card h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.04rem, 1.8vw, 1.18rem);
    line-height: 1.32;
    letter-spacing: 0;
    font-weight: 680;
}

.notes-page-grid .note-card p {
    line-height: 1.62;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tarot-stage {
    padding-top: clamp(2.8rem, 6vw, 4.5rem);
    padding-bottom: clamp(2.8rem, 6vw, 4.2rem);
}

.tarot-stage-shell {
    grid-template-columns: minmax(0, 48rem);
    margin-bottom: clamp(1.2rem, 3vw, 2rem);
}

.tarot-hero-copy {
    max-width: 48rem;
}

.tarot-hero-copy h1 {
    max-width: 11ch;
    font-size: clamp(2.55rem, 5vw, 4.3rem);
    line-height: 1.02;
}

.tarot-hero-copy > p {
    max-width: 36rem;
    line-height: 1.68;
}

.tarot-hero-note {
    margin-top: 0.72rem;
    font-size: 0.96rem;
}

.tarot-layout {
    grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
    gap: clamp(1rem, 2.4vw, 1.35rem);
}

.tarot-form {
    padding: 1.16rem;
    gap: 0.82rem;
}

.tarot-form textarea {
    min-height: 8.2rem;
    resize: vertical;
}

.tarot-table {
    min-height: clamp(34rem, 62vw, 40rem);
    padding: clamp(1rem, 2vw, 1.25rem);
}

.tarot-table-head {
    margin-bottom: 0.95rem;
}

.tarot-table-hint,
.tarot-selection-copy {
    line-height: 1.52;
}

.tarot-spread-zone {
    min-height: 6.7rem;
    margin-bottom: 1.55rem;
}

.spread-slot {
    min-height: 6.25rem;
}

.tarot-deck-fan {
    min-height: clamp(26rem, 48vw, 30.5rem);
}

.tarot-page-closing {
    max-width: 42rem;
    line-height: 1.7;
}

@media (max-width: 820px) {
    .header-actions .theme-toggle {
        width: 2.46rem;
        height: 2.46rem;
    }

    .header-actions .theme-toggle__around {
        width: 1.4rem;
        height: 1.4rem;
    }

    .ui-icon {
        width: 1rem;
        height: 1rem;
    }
}

@media (max-width: 980px) {
    .hero-home-clean,
    .tarot-stage-shell,
    .tarot-layout {
        grid-template-columns: 1fr;
    }

    .hero-home-clean {
        min-height: auto;
        padding-top: clamp(2.6rem, 7vw, 4.2rem);
    }

    .section-home-notes .notes-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tarot-table {
        min-height: 36rem;
    }

    .tarot-deck-fan {
        min-height: 27rem;
    }
}

@media (max-width: 640px) {
    .page-shell,
    .site-footer {
        width: min(100% - 1.18rem, 1160px);
    }

    .hero-home-clean {
        padding-top: 2.4rem;
        padding-bottom: 1.8rem;
    }

    .hero-home-clean h1 {
        max-width: 9ch;
        font-size: clamp(2.38rem, 12vw, 3.35rem);
        line-height: 1.04;
    }

    .hero-home-clean .hero-copy > p,
    .tarot-hero-copy > p {
        font-size: 0.98rem;
        line-height: 1.66;
    }

    .hero-actions {
        gap: 0.58rem;
        margin-top: 1.15rem;
    }

    .button {
        min-height: 2.72rem;
        padding: 0.72rem 0.92rem;
        white-space: normal;
    }

    .section-home-notes {
        padding-top: 0.8rem;
    }

    .section-home-notes .notes-card-grid {
        grid-template-columns: 1fr;
    }

    .section-home-notes .note-card {
        min-height: auto;
        border-radius: 16px;
    }

    .section-home-notes .note-card p {
        -webkit-line-clamp: 2;
    }

    .notes-page-grid .note-card {
        min-height: auto;
    }

    .notes-page-grid .note-card p {
        -webkit-line-clamp: 2;
    }

    .tarot-stage {
        padding-top: 2.1rem;
        padding-bottom: 2.6rem;
    }

    .tarot-hero-copy h1 {
        max-width: 9.5ch;
        font-size: clamp(2rem, 10.5vw, 2.8rem);
        line-height: 1.08;
    }

    .tarot-hero-note {
        margin-top: 0.58rem;
        font-size: 0.9rem;
    }

    .tarot-form,
    .tarot-table,
    .reading-box {
        border-radius: 16px;
    }

    .tarot-table {
        min-height: 33rem;
        padding: 0.92rem;
    }

    .tarot-table-head {
        gap: 0.62rem;
        margin-bottom: 0.75rem;
    }

    .tarot-selection-copy {
        font-size: 0.86rem;
    }

    .tarot-spread-zone {
        min-height: 5.8rem;
        gap: 0.62rem;
        margin-bottom: 1.1rem;
    }

    .spread-slot {
        min-height: 5.4rem;
        padding: 0.78rem;
    }

    .tarot-deck-fan {
        min-height: 24rem;
    }
}

/* Final polish pass: lighter copy surfaces, centered tarot motion, and safer mobile layout. */
html,
body {
    max-width: 100%;
    overflow-x: clip;
}

@supports not (overflow-x: clip) {
    html,
    body {
        overflow-x: hidden;
    }
}

.hero-kicker,
.section-kicker,
.eyebrow,
.article-kicker,
.note-card-date {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--muted);
    font-size: 0.82rem;
    letter-spacing: 0;
}

.hero-kicker::before,
.section-kicker::before,
.eyebrow::before {
    display: none;
}

.hero-kicker .badge-icon,
.section-kicker .badge-icon,
.eyebrow .badge-icon {
    width: 1rem;
    height: 1rem;
    color: var(--icon-accent);
    opacity: 0.86;
}

.glass-card,
.article,
.note-card,
.tarot-form,
.reading-box,
.comment-card,
.comment-form-wrap-v4 {
    border-radius: 18px;
    border-color: rgba(220, 229, 241, calc(0.72 - var(--theme-progress) * 0.54));
    background:
        linear-gradient(145deg, rgba(255,255,255,calc(0.72 - var(--theme-progress) * 0.52)), rgba(255,255,255,calc(0.28 - var(--theme-progress) * 0.16)) 46%, rgba(255,255,255,calc(0.12 + var(--theme-progress) * 0.02))),
        rgba(calc(250 - var(--theme-progress) * 225), calc(252 - var(--theme-progress) * 226), calc(255 - var(--theme-progress) * 221), calc(0.62 + var(--theme-progress) * 0.1));
    box-shadow:
        0 18px 44px rgba(calc(62 - var(--theme-progress) * 56), calc(76 - var(--theme-progress) * 68), calc(101 - var(--theme-progress) * 82), calc(0.07 + var(--theme-progress) * 0.1)),
        inset 0 1px 0 rgba(255,255,255,calc(0.78 - var(--theme-progress) * 0.66));
}

.note-card {
    min-width: 0;
}

.note-card a,
.article a {
    text-underline-offset: 0.18em;
}

.notes-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17.5rem), 1fr));
}

.comments-shell-v4 {
    max-width: 100%;
}

.comments-topbar {
    border-bottom-color: rgba(167, 183, 207, calc(0.24 - var(--theme-progress) * 0.08));
}

.comments-topbar p {
    color: var(--muted);
}

.comment-card,
.comment-form-wrap-v4 {
    padding: 0.92rem 0.96rem;
}

.comment-card-body,
.comment-form textarea {
    font-size: 0.94rem;
}

.comment-form textarea {
    border-radius: 14px;
}

.tarot-table {
    min-height: auto;
    border-radius: 20px;
    background:
        radial-gradient(circle at 50% 12%, rgba(170, 184, 206, 0.12), transparent 18rem),
        radial-gradient(circle at 18% 18%, rgba(89, 101, 121, 0.13), transparent 17rem),
        linear-gradient(180deg, rgba(19, 24, 32, 0.98), rgba(24, 30, 39, 0.99));
}

.tarot-table::before,
.tarot-table::after,
.tarot-table-wrap::before {
    display: none;
}

.tarot-spread-zone {
    margin-bottom: clamp(0.9rem, 2vw, 1.45rem);
}

.spread-slot {
    border-style: solid;
    border-color: rgba(220, 230, 244, 0.14);
    background: rgba(255,255,255,0.035);
}

.tarot-deck-fan {
    min-height: clamp(24rem, 42vw, 30rem);
    overflow: visible;
}

.deck-card {
    width: clamp(106px, 8.8vw, 132px);
}

.deck-card-art,
.tarot-card-art {
    background:
        radial-gradient(circle at 50% 18%, rgba(225, 216, 198, 0.22), transparent 36%),
        linear-gradient(180deg, rgba(250,248,244,0.96), rgba(236,230,219,0.92));
}

.tarot-page-closing {
    color: var(--muted);
}

@media (max-width: 980px) {
    .tarot-layout {
        gap: 1rem;
    }

    .tarot-form {
        position: relative;
        top: auto;
    }
}

@media (max-width: 640px) {
    .page-shell,
    .site-header,
    .site-footer {
        width: min(100% - 1rem, 1160px);
    }

    .page-hero {
        padding-top: 2.05rem;
        padding-bottom: 1.2rem;
    }

    .page-hero h1,
    .article h1,
    .tarot-hero-copy h1 {
        max-width: 100%;
        font-size: clamp(2.05rem, 10.8vw, 3rem);
        line-height: 1.08;
    }

    .hero-kicker,
    .section-kicker,
    .eyebrow,
    .article-kicker,
    .note-card-date {
        font-size: 0.78rem;
    }

    .glass-card,
    .article,
    .note-card,
    .tarot-form,
    .reading-box,
    .comment-card,
    .comment-form-wrap-v4,
    .tarot-table {
        border-radius: 16px;
    }

    .article {
        padding: 1.04rem;
    }

    .comments-grid {
        gap: 0.78rem;
    }

    .comments-topbar {
        gap: 0.42rem;
    }

    .comment-card,
    .comment-form-wrap-v4 {
        padding: 0.84rem;
    }

    .tarot-stage {
        padding-top: 1.9rem;
    }

    .tarot-table {
        padding: 0.82rem;
    }

    .tarot-table-head {
        gap: 0.44rem;
        margin-bottom: 0.64rem;
    }

    .tarot-table-hint,
    .tarot-selection-copy {
        font-size: 0.84rem;
        line-height: 1.45;
    }

    .tarot-spread-zone {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        min-height: auto;
        gap: 0.42rem;
        margin-bottom: 0.7rem;
    }

    .spread-slot {
        min-height: 4.7rem;
        padding: 0.58rem;
        font-size: 0.76rem;
        line-height: 1.38;
    }

    .tarot-deck-fan {
        min-height: clamp(17rem, 88vw, 21rem);
        overflow: visible;
    }

    .deck-card {
        width: clamp(70px, 19.5vw, 88px);
        bottom: 0.8rem;
    }

    .tarot-deck-fan.is-ready .deck-card:hover {
        transform: translateX(calc(-50% + var(--card-shift))) translateY(-18px) rotate(calc(var(--card-rotate) * 0.38));
    }

    .tarot-deck-fan.is-ready .deck-card.is-selected {
        transform: translateX(calc(-50% + var(--card-shift))) translateY(-30px) rotate(0deg);
    }

    .tarot-deck-fan.is-drawing .deck-card.is-selected {
        --selected-shift: calc((var(--selected-order) - 1) * 76px) !important;
        --deck-lift: -112px;
    }
}

/* Final hardening pass: reduce visual noise, prevent overflow, and keep every page in one system. */
.site-header,
.page-shell,
.site-footer {
    box-sizing: border-box;
}

.page-shell > *,
.hero-copy,
.section-head,
.article,
.notes-card-grid,
.tarot-stage,
.tarot-layout,
.comments-shell {
    min-width: 0;
}

.hero-home-clean {
    min-height: clamp(23rem, 58vh, 34rem);
    padding-top: clamp(3.4rem, 8vw, 5.8rem);
    padding-bottom: clamp(2.2rem, 6vw, 4.2rem);
}

.hero-home-clean .hero-copy {
    max-width: 43rem;
}

.hero-home-clean h1,
.page-hero h1,
.article h1 {
    letter-spacing: 0;
    text-wrap: balance;
}

.hero-home-clean .hero-copy > p,
.page-hero > p,
.tarot-hero-copy > p,
.article-content p {
    text-wrap: pretty;
}

.section-home-notes {
    padding-top: clamp(1.2rem, 3vw, 2.2rem);
}

.section-home-notes .section-head {
    margin-bottom: 1rem;
}

.notes-card-grid {
    gap: clamp(0.78rem, 1.8vw, 1rem);
}

.note-card {
    min-height: 12rem;
    padding: clamp(1rem, 2vw, 1.22rem);
}

.note-card h2,
.note-card h3 {
    font-size: clamp(1.16rem, 2.2vw, 1.42rem);
    line-height: 1.22;
}

.article {
    max-width: min(100%, 820px);
    margin-top: clamp(1.8rem, 4.5vw, 3rem);
    margin-bottom: clamp(1.2rem, 3vw, 2rem);
}

.article-meta-row,
.comments-topbar,
.tarot-table-head {
    border-bottom-color: rgba(156, 174, 201, calc(0.18 - var(--theme-progress) * 0.04));
}

.article-translate-toggle,
.lang-toggle,
.button {
    border-radius: 999px;
}

.comments-shell {
    max-width: min(100%, 1120px);
}

.comments-grid {
    grid-template-columns: minmax(0, 1fr) minmax(14.5rem, 17rem);
}

.comment-form-wrap-v4,
.comment-card {
    border-radius: 15px;
    background:
        linear-gradient(145deg, rgba(255,255,255,calc(0.68 - var(--theme-progress) * 0.52)), rgba(255,255,255,calc(0.22 - var(--theme-progress) * 0.12))),
        rgba(calc(250 - var(--theme-progress) * 225), calc(252 - var(--theme-progress) * 226), calc(255 - var(--theme-progress) * 221), calc(0.52 + var(--theme-progress) * 0.12));
}

.comment-form-wrap-v4::before,
.comment-card::before {
    opacity: 0.42;
}

.comment-compose-head {
    gap: 0.3rem;
    padding-bottom: 0.34rem;
}

.comment-form-note,
.comment-notes,
.logged-in-as,
.comments-topbar p {
    color: var(--muted);
    opacity: 0.84;
}

.tarot-stage {
    padding-top: clamp(2.4rem, 6vw, 4.8rem);
}

.tarot-stage-shell {
    grid-template-columns: minmax(0, 1fr);
    max-width: 760px;
    margin-bottom: clamp(1rem, 2.4vw, 1.35rem);
}

.tarot-hero-copy h1 {
    max-width: 11ch;
}

.tarot-layout {
    grid-template-columns: minmax(15rem, 18rem) minmax(0, 1fr);
    gap: clamp(0.9rem, 2vw, 1.2rem);
}

.tarot-form {
    padding: clamp(0.95rem, 1.8vw, 1.12rem);
}

.tarot-table {
    overflow: hidden;
    background-color: #151b24;
    background-image:
        radial-gradient(circle at 50% 10%, rgba(180, 193, 215, 0.10), transparent 17rem),
        radial-gradient(circle at 20% 20%, rgba(98, 114, 139, 0.12), transparent 18rem),
        linear-gradient(180deg, #151b24 0%, #171d27 100%) !important;
    box-shadow:
        0 18px 42px rgba(10, 14, 21, calc(0.18 + var(--theme-progress) * 0.05)),
        inset 0 1px 0 rgba(255,255,255,0.07);
}

.tarot-table *,
.tarot-table::before,
.tarot-table::after {
    box-sizing: border-box;
}

.tarot-table .section-kicker,
.tarot-table-hint,
.tarot-selection-copy {
    color: rgba(229, 235, 244, 0.76);
}

.tarot-deck-fan::before {
    border-color: rgba(212, 222, 237, 0.10);
}

.tarot-deck-fan::after {
    background: radial-gradient(circle, rgba(196, 207, 224, 0.08), rgba(196, 207, 224, 0));
}

.deck-card,
.tarot-card {
    -webkit-tap-highlight-color: transparent;
}

.deck-card-art {
    aspect-ratio: 0.58;
    height: auto;
    object-fit: cover;
}

.tarot-card-art {
    max-height: 15.2rem;
}

.tarot-page-closing {
    max-width: 42rem;
    opacity: 0.84;
}

[data-theme="dark"] .comment-form-wrap-v4,
[data-theme="dark"] .comment-card {
    background: rgba(25, 31, 42, 0.74);
}

@media (max-width: 980px) {
    .tarot-layout,
    .comments-grid {
        grid-template-columns: 1fr;
    }

    .tarot-form {
        position: relative;
        top: auto;
    }

    .comments-compose-panel {
        position: relative;
        top: auto;
    }
}

@media (max-width: 760px) {
    .site-header {
        width: min(100% - 1rem, 1160px);
    }

    .hero-home-clean {
        min-height: auto;
        padding-top: 2.4rem;
        padding-bottom: 1.6rem;
    }

    .hero-actions {
        grid-template-columns: 1fr 1fr;
    }

    .button {
        min-height: 2.58rem;
        padding: 0.68rem 0.82rem;
    }

    .notes-card-grid {
        grid-template-columns: 1fr;
    }

    .article {
        max-width: 100%;
        padding: 1rem;
    }

    .article-meta-row {
        gap: 0.7rem;
    }

    .tarot-stage {
        padding-top: 2rem;
    }

    .tarot-hero-copy h1 {
        max-width: 100%;
        font-size: clamp(2.08rem, 10.8vw, 2.82rem);
    }

    .tarot-layout {
        gap: 0.82rem;
    }

    .tarot-table {
        border-radius: 18px;
        padding: 0.74rem;
    }

    .tarot-deck-fan {
        min-height: clamp(17.2rem, 82vw, 20rem);
    }

    .deck-card {
        width: clamp(64px, 18vw, 82px);
    }

    .tarot-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .page-shell,
    .site-header,
    .site-footer {
        width: min(100% - 0.82rem, 1160px);
    }

    .header-actions {
        gap: 0.28rem;
    }

    .lang-toggle {
        padding-inline: 0.55rem;
    }

    .hero-actions {
        grid-template-columns: 1fr;
    }

    .tarot-spread-zone {
        grid-template-columns: 1fr;
    }

    .spread-slot {
        min-height: 3.8rem;
    }

    .tarot-deck-fan.is-drawing .deck-card.is-selected {
        --selected-shift: calc((var(--selected-order) - 1) * 60px) !important;
    }
}

/* Quiet refinement pass: clearer focus states, uploaded media support, and lighter mobile rhythm. */
img,
video,
iframe {
    max-width: 100%;
}

button,
summary,
a,
input,
textarea,
select {
    -webkit-tap-highlight-color: transparent;
}

:where(a, button, summary, input, textarea, select):focus-visible {
    outline: 2px solid rgba(118, 137, 168, calc(0.52 + var(--theme-progress) * 0.1));
    outline-offset: 3px;
}

.article-content :where(img, video, iframe) {
    display: block;
    width: min(100%, 100%);
    margin: 1.2rem auto;
    border-radius: 18px;
    border: 1px solid rgba(208, 219, 234, calc(0.62 - var(--theme-progress) * 0.44));
    box-shadow: 0 18px 44px rgba(37, 49, 70, calc(0.08 + var(--theme-progress) * 0.08));
    background: rgba(255,255,255,calc(0.5 - var(--theme-progress) * 0.38));
}

.article-content :where(video, iframe) {
    aspect-ratio: 16 / 9;
    height: auto;
}

.article-content figure {
    margin: 1.25rem 0;
}

.article-content figcaption {
    margin-top: 0.48rem;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.55;
    text-align: center;
}

.article-content blockquote {
    margin: 1.2rem 0;
    padding: 0.1rem 0 0.1rem 1rem;
    border-left: 2px solid rgba(126, 145, 174, calc(0.34 + var(--theme-progress) * 0.06));
    color: var(--muted);
}

.article-content blockquote p {
    color: inherit;
}

.comment-form-status {
    margin: 0;
}

.comment-form textarea,
.ai-chat-compose textarea {
    line-height: 1.68;
}

.tarot-actions {
    align-items: center;
}

.tarot-actions .button {
    min-width: 0;
}

.tarot-history-item {
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.tarot-history-item:hover {
    transform: translateY(-1px);
    border-color: rgba(188, 202, 224, calc(0.62 - var(--theme-progress) * 0.36));
}

.deck-card-art,
.tarot-card-art {
    image-rendering: auto;
}

@media (max-width: 760px) {
    .site-header {
        row-gap: 0.52rem;
    }

    .nav a {
        font-size: 0.88rem;
    }

    .section {
        padding-top: 2rem;
        padding-bottom: 2.4rem;
    }

    .article-content {
        gap: 0.82rem;
        font-size: 1rem;
        line-height: 1.82;
    }

    .article-content :where(img, video, iframe) {
        margin: 0.9rem auto;
        border-radius: 15px;
    }

    .comments-shell {
        margin-bottom: 2.6rem;
    }

    .comment-form textarea {
        min-height: 6.4rem;
    }

    .ai-chat-log {
        max-height: 20rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* Performance and dark-mode cleanup: use downloaded player/icon modules without white flashes. */
:root {
    --player-glass-light: linear-gradient(145deg, rgba(255,255,255,0.72), rgba(246,249,253,0.38));
    --player-glass-dark: linear-gradient(145deg, rgba(31,39,53,0.94), rgba(15,21,31,0.92));
    --player-line-light: rgba(205, 216, 232, 0.48);
    --player-line-dark: rgba(116, 134, 166, 0.22);
}

html[data-theme="dark"]::after,
html[data-theme="dark"] body::before,
html[data-theme="dark"] body::after {
    opacity: 0.12;
    background:
        radial-gradient(circle at 18% 14%, rgba(88, 105, 138, 0.16), transparent 18rem),
        radial-gradient(circle at 82% 12%, rgba(78, 85, 118, 0.12), transparent 19rem) !important;
    filter: none;
}

[data-theme="dark"] .glass-card,
[data-theme="dark"] .note-card,
[data-theme="dark"] .article,
[data-theme="dark"] .tarot-form,
[data-theme="dark"] .reading-box,
[data-theme="dark"] .comment-card,
[data-theme="dark"] .comment-form-wrap-v4,
[data-theme="dark"] .comments-compose-panel,
[data-theme="dark"] .lang-toggle,
[data-theme="dark"] .button.secondary,
[data-theme="dark"] .article-translate-toggle {
    background: linear-gradient(145deg, rgba(32, 40, 54, 0.9), rgba(16, 22, 32, 0.82)) !important;
    border-color: rgba(120, 138, 168, 0.22) !important;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255,255,255,0.06) !important;
}

[data-theme="dark"] .glass-card::before,
[data-theme="dark"] .note-card::before,
[data-theme="dark"] .article::before,
[data-theme="dark"] .comment-card::before,
[data-theme="dark"] .comment-form-wrap-v4::before {
    opacity: 0.08 !important;
}

[data-theme="dark"] .site-header {
    background: linear-gradient(180deg, rgba(23, 29, 40, 0.92), rgba(13, 18, 27, 0.78)) !important;
    border-color: rgba(121, 139, 170, 0.18) !important;
}

[data-theme="dark"] .nav a:hover {
    background: rgba(255,255,255,0.055) !important;
    border-color: rgba(255,255,255,0.08) !important;
}

.music-capsule-toggle,
.music-capsule-panel,
.music-capsule .aplayer {
    -webkit-backdrop-filter: blur(16px) saturate(138%) !important;
    backdrop-filter: blur(16px) saturate(138%) !important;
    will-change: auto;
}

.music-capsule-toggle,
.music-capsule-panel {
    background: var(--player-glass-light) !important;
    border-color: var(--player-line-light) !important;
}

[data-theme="dark"] .music-capsule-toggle,
[data-theme="dark"] .music-capsule-panel,
[data-theme="dark"] .music-capsule .aplayer {
    background: var(--player-glass-dark) !important;
    border-color: var(--player-line-dark) !important;
    color: var(--text);
    box-shadow: 0 18px 44px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.055) !important;
}

[data-theme="dark"] .music-capsule-orb {
    background:
        radial-gradient(circle at 34% 24%, rgba(255,255,255,0.16), transparent 28%),
        linear-gradient(145deg, rgba(92, 111, 149, 0.8), rgba(35, 45, 65, 0.86)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 10px 22px rgba(0,0,0,0.22) !important;
}

[data-theme="dark"] .music-search input,
[data-theme="dark"] .comment-form textarea,
[data-theme="dark"] .tarot-form textarea,
[data-theme="dark"] .tarot-form select,
[data-theme="dark"] .ai-chat-compose textarea {
    background: rgba(10, 15, 24, 0.72) !important;
    border-color: rgba(118, 137, 168, 0.2) !important;
    color: var(--text);
}

[data-theme="dark"] .music-search-button,
[data-theme="dark"] .music-play {
    background: rgba(255,255,255,0.055) !important;
    border-color: rgba(255,255,255,0.09) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06) !important;
}

[data-theme="dark"] .music-result:hover,
[data-theme="dark"] .music-capsule .aplayer .aplayer-list ol li:hover,
[data-theme="dark"] .music-capsule .aplayer .aplayer-list ol li.aplayer-list-light {
    background: rgba(255,255,255,0.06) !important;
}

[data-theme="dark"] .music-result-art,
[data-theme="dark"] .music-capsule .aplayer .aplayer-pic {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 12px 26px rgba(0,0,0,0.28) !important;
}

[data-theme="dark"] .aplayer,
[data-theme="dark"] .aplayer-body,
[data-theme="dark"] .aplayer-info,
[data-theme="dark"] .aplayer-list,
[data-theme="dark"] .aplayer-list ol,
[data-theme="dark"] .aplayer-list ol li {
    background-color: transparent !important;
}

[data-theme="dark"] .aplayer .aplayer-list ol li.aplayer-list-light .aplayer-list-cur {
    background: rgb(144, 164, 205) !important;
}

[data-theme="dark"] .tarot-table {
    background-image:
        radial-gradient(circle at 50% 8%, rgba(120, 146, 190, 0.12), transparent 15rem),
        radial-gradient(circle at 82% 18%, rgba(112, 104, 158, 0.1), transparent 17rem),
        linear-gradient(180deg, #101722 0%, #0c121b 100%) !important;
    border-color: rgba(118, 137, 168, 0.18) !important;
}

.theme-toggle-track,
.theme-toggle__around,
.music-capsule-orb,
.ui-icon {
    will-change: auto !important;
}

.music-capsule.is-playing .music-capsule-orb {
    animation: music-pulse 2.4s ease-in-out infinite;
}

[data-theme="dark"] .deck-card-art,
[data-theme="dark"] .tarot-card-art {
    background-color: #ede7da;
}

@media (max-width: 760px) {
    .music-capsule-toggle,
    .music-capsule-panel,
    .music-capsule .aplayer,
    .site-header,
    .glass-card,
    .note-card,
    .tarot-form,
    .tarot-table {
        -webkit-backdrop-filter: blur(10px) saturate(122%) !important;
        backdrop-filter: blur(10px) saturate(122%) !important;
    }

    [data-theme="dark"] .music-capsule {
        filter: none !important;
    }
}

/* Music dock redesign: APlayer core with a cleaner Apple/Spotify-like shell. */
.music-capsule {
    width: min(25.5rem, calc(100vw - 1.6rem));
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
}

.music-capsule-toggle {
    width: min(21rem, calc(100vw - 1.6rem));
    min-height: 4.05rem;
    padding: 0.46rem 0.56rem;
    grid-template-columns: 3.12rem minmax(0, 1fr) 2.45rem;
    gap: 0.72rem;
    border-radius: 24px;
    background:
        linear-gradient(145deg, rgba(255,255,255,0.76), rgba(245,248,253,0.48)),
        rgba(250,252,255,0.72) !important;
    border-color: rgba(205, 216, 232, 0.58) !important;
    box-shadow:
        0 18px 44px rgba(45, 58, 82, 0.12),
        inset 0 1px 0 rgba(255,255,255,0.72) !important;
}

.music-capsule-toggle:hover {
    transform: translateY(-2px) translateZ(0);
    box-shadow:
        0 22px 52px rgba(45, 58, 82, 0.15),
        inset 0 1px 0 rgba(255,255,255,0.78) !important;
}

.music-capsule-art {
    width: 3.12rem;
    height: 3.12rem;
    border-radius: 17px;
    display: grid;
    place-items: center;
    color: rgb(84, 111, 154);
    background:
        radial-gradient(circle at 30% 22%, rgba(255,255,255,0.74), transparent 31%),
        linear-gradient(145deg, rgba(229,236,248,0.98), rgba(178,195,222,0.66));
    background-size: cover;
    background-position: center;
    box-shadow:
        0 10px 24px rgba(52, 70, 104, 0.16),
        inset 0 1px 0 rgba(255,255,255,0.68);
    overflow: hidden;
}

.music-capsule-art.has-artwork .music-icon {
    display: none !important;
    opacity: 0 !important;
}

.music-capsule-copy {
    gap: 0.18rem;
}

.music-capsule-copy strong {
    font-size: 0.96rem;
    font-weight: 760;
    letter-spacing: -0.01em;
}

.music-capsule-copy small {
    font-size: 0.78rem;
}

.music-capsule-action {
    width: 2.45rem;
    height: 2.45rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: rgb(82, 103, 137);
    background: rgba(255,255,255,0.54);
    border: 1px solid rgba(211, 222, 237, 0.7);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.68);
}

.music-capsule.is-open .music-capsule-action {
    color: rgb(39, 49, 67);
    background: rgba(255,255,255,0.78);
}

.music-capsule-panel {
    width: min(25.5rem, calc(100vw - 1.6rem));
    padding: 0.84rem;
    border-radius: 26px;
    background:
        linear-gradient(145deg, rgba(255,255,255,0.78), rgba(244,247,252,0.5)),
        rgba(250,252,255,0.76) !important;
    border-color: rgba(205, 216, 232, 0.6) !important;
}

.music-panel-head {
    display: flex;
    align-items: center;
    gap: 0.46rem;
    margin: 0 0 0.68rem;
    color: rgb(86, 103, 132);
    font-size: 0.82rem;
    font-weight: 740;
}

.music-panel-head .ui-icon {
    width: 1rem;
    height: 1rem;
}

.music-search {
    align-items: center;
}

.music-search label span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.music-search input {
    min-height: 2.78rem;
    padding: 0.72rem 0.94rem;
    border-radius: 16px;
    background: rgba(255,255,255,0.66) !important;
}

.music-search-button {
    width: 2.78rem;
    height: 2.78rem;
    border-radius: 16px;
}

.music-results {
    max-height: 15.5rem;
    gap: 0.28rem;
}

.music-result {
    padding: 0.46rem;
    border-radius: 16px;
    grid-template-columns: 2.75rem minmax(0, 1fr);
}

.music-result-art {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 13px;
}

.music-capsule .aplayer {
    border-radius: 20px;
}

.music-capsule .aplayer .aplayer-pic {
    width: 4.15rem;
    height: 4.15rem;
    border-radius: 16px;
}

.music-capsule .aplayer .aplayer-info {
    margin-left: 5.1rem;
    min-height: 5.2rem;
}

[data-theme="dark"] .music-capsule-toggle,
[data-theme="dark"] .music-capsule-panel,
[data-theme="dark"] .music-capsule .aplayer {
    background:
        linear-gradient(145deg, rgba(32, 40, 55, 0.95), rgba(12, 18, 28, 0.94)) !important;
    border-color: rgba(123, 142, 173, 0.24) !important;
}

[data-theme="dark"] .music-capsule-art {
    color: rgb(190, 207, 235);
    background:
        radial-gradient(circle at 30% 22%, rgba(255,255,255,0.14), transparent 32%),
        linear-gradient(145deg, rgba(74, 90, 122, 0.92), rgba(30, 40, 58, 0.9));
    box-shadow:
        0 12px 26px rgba(0,0,0,0.28),
        inset 0 1px 0 rgba(255,255,255,0.08);
}

[data-theme="dark"] .music-capsule-action {
    color: rgb(197, 211, 236);
    background: rgba(255,255,255,0.055);
    border-color: rgba(255,255,255,0.09);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

[data-theme="dark"] .music-panel-head {
    color: rgb(190, 204, 226);
}

[data-theme="dark"] .music-search input {
    background: rgba(10, 15, 24, 0.72) !important;
}

@media (max-width: 640px) {
    .music-capsule {
        left: 0.72rem;
        right: 0.72rem;
        width: auto;
    }

    .music-capsule-toggle,
    .music-capsule-panel {
        width: 100%;
        border-radius: 22px;
    }

    .music-capsule-toggle {
        min-height: 3.78rem;
        grid-template-columns: 2.82rem minmax(0, 1fr) 2.28rem;
        gap: 0.58rem;
    }

    .music-capsule-art {
        width: 2.82rem;
        height: 2.82rem;
        border-radius: 15px;
    }

    .music-capsule-action {
        width: 2.28rem;
        height: 2.28rem;
    }
}

/* Final stability pass: lighter rendering, calmer copy surfaces, and mobile-safe layout. */
html {
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    text-rendering: geometricPrecision;
}

.page-shell {
    overflow: clip;
}

.site-header,
.glass-card,
.note-card,
.article,
.tarot-form,
.tarot-table,
.reading-box,
.comment-card,
.comment-form-wrap-v4,
.comments-compose-panel,
.music-capsule-toggle,
.music-capsule-panel {
    -webkit-backdrop-filter: blur(12px) saturate(128%);
    backdrop-filter: blur(12px) saturate(128%);
}

.theme-toggle {
    width: 2.46rem;
    height: 2.46rem;
    contain: layout paint;
}

.theme-toggle-track {
    background:
        radial-gradient(circle at 32% 24%, rgba(255,255,255,0.82), transparent 34%),
        linear-gradient(
            145deg,
            rgba(calc(255 + (31 - 255) * var(--theme-progress)), calc(255 + (39 - 255) * var(--theme-progress)), calc(255 + (55 - 255) * var(--theme-progress)), calc(0.72 + var(--theme-progress) * 0.08)),
            rgba(calc(235 + (15 - 235) * var(--theme-progress)), calc(242 + (22 - 242) * var(--theme-progress)), calc(252 + (34 - 252) * var(--theme-progress)), calc(0.42 + var(--theme-progress) * 0.12))
        ) !important;
    box-shadow:
        0 10px 24px rgba(28, 38, 56, calc(0.08 + var(--theme-progress) * 0.12)),
        inset 0 1px 0 rgba(255,255,255,calc(0.76 - var(--theme-progress) * 0.56)) !important;
}

.theme-toggle__around {
    color: rgb(calc(87 + (205 - 87) * var(--theme-progress)), calc(111 + (212 - 111) * var(--theme-progress)), calc(150 + (226 - 150) * var(--theme-progress)));
    filter: saturate(1.06) contrast(1.02);
}

.hero-home-clean {
    min-height: auto;
    padding-top: clamp(3.2rem, 8vw, 5.8rem);
    padding-bottom: clamp(2.4rem, 7vw, 4.4rem);
}

.hero-actions,
.section-head,
.article-meta-row,
.tarot-table-head,
.comments-topbar {
    min-width: 0;
}

.section-home-notes {
    padding-top: clamp(1.4rem, 4vw, 2.6rem);
}

.notes-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17.5rem), 1fr));
}

.note-card,
.comment-card {
    transform: translateZ(0);
}

.comment-list {
    gap: 0.62rem;
}

.comments-shell {
    max-width: min(100%, 1080px);
}

.comments-topbar {
    align-items: end;
    padding-bottom: 0.72rem;
}

.comments-topbar h2 {
    font-size: clamp(1.3rem, 2.2vw, 1.8rem);
    letter-spacing: -0.015em;
}

.comments-topbar > p {
    margin: 0;
    color: var(--muted);
}

.comments-grid {
    grid-template-columns: minmax(0, 1fr) minmax(15rem, 18.5rem);
    align-items: start;
}

.comments-compose-panel {
    position: sticky;
    top: 5.4rem;
    align-self: start;
}

.comment-card,
.comment-form-wrap-v4 {
    border-radius: 16px;
    padding: 0.92rem 1rem;
}

.comment-card-head {
    margin-bottom: 0.42rem;
}

.comment-card-body p {
    margin: 0;
    line-height: 1.7;
}

.comment-compose-head {
    gap: 0.2rem;
}

.comment-compose-head p,
.comment-form-note,
.music-note,
.tarot-form-helper {
    color: var(--muted);
    font-size: 0.88rem;
}

.comment-form textarea {
    min-height: 7rem;
    resize: vertical;
}

.tarot-stage {
    overflow: clip;
}

.tarot-layout {
    align-items: start;
}

.tarot-form,
.tarot-table {
    max-width: 100%;
}

.tarot-table {
    isolation: isolate;
    background-color: #151b24 !important;
    box-shadow:
        0 22px 54px rgba(13, 18, 28, 0.18),
        inset 0 1px 0 rgba(255,255,255,0.08) !important;
}

.tarot-table::before,
.tarot-table::after {
    pointer-events: none;
}

.tarot-deck-fan,
.tarot-spread-zone {
    max-width: 100%;
}

[data-theme="dark"] .tarot-form,
[data-theme="dark"] .tarot-table,
[data-theme="dark"] .reading-box,
[data-theme="dark"] .tarot-history,
[data-theme="dark"] .tarot-history-item {
    background-color: #101722 !important;
    border-color: rgba(125, 145, 176, 0.18) !important;
}

[data-theme="dark"] .button.primary {
    background: linear-gradient(180deg, rgba(82, 98, 130, 0.96), rgba(42, 53, 76, 0.98)) !important;
}

[data-theme="dark"] .comment-form textarea,
[data-theme="dark"] .music-search input,
[data-theme="dark"] .tarot-form textarea,
[data-theme="dark"] .tarot-form select,
[data-theme="dark"] .ai-chat-compose textarea {
    background: rgba(11, 17, 26, 0.74) !important;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .site-header,
    .glass-card,
    .note-card,
    .article,
    .tarot-form,
    .tarot-table,
    .reading-box,
    .comment-card,
    .comment-form-wrap-v4,
    .comments-compose-panel,
    .music-capsule-toggle,
    .music-capsule-panel {
        background-color: rgba(248, 251, 255, 0.92) !important;
    }

    [data-theme="dark"] .site-header,
    [data-theme="dark"] .glass-card,
    [data-theme="dark"] .note-card,
    [data-theme="dark"] .article,
    [data-theme="dark"] .tarot-form,
    [data-theme="dark"] .tarot-table,
    [data-theme="dark"] .reading-box,
    [data-theme="dark"] .comment-card,
    [data-theme="dark"] .comment-form-wrap-v4,
    [data-theme="dark"] .comments-compose-panel,
    [data-theme="dark"] .music-capsule-toggle,
    [data-theme="dark"] .music-capsule-panel {
        background-color: rgba(18, 24, 35, 0.96) !important;
    }
}

@media (max-width: 980px) {
    .comments-grid {
        grid-template-columns: 1fr;
    }

    .comments-compose-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .site-header {
        width: min(100% - 0.9rem, 1160px);
        padding: 0.68rem 0.72rem;
    }

    .header-actions {
        gap: 0.34rem;
    }

    .theme-toggle {
        width: 2.34rem;
        height: 2.34rem;
    }

    .lang-toggle {
        min-height: 2.34rem;
        padding-inline: 0.62rem;
    }

    .page-hero,
    .hero {
        padding-top: 2.4rem;
        padding-bottom: 1.8rem;
    }

    .hero-home-clean h1,
    .page-hero h1,
    .tarot-hero-copy h1,
    .article h1 {
        font-size: clamp(2rem, 10vw, 2.86rem);
        line-height: 1.04;
        word-break: keep-all;
        overflow-wrap: anywhere;
    }

    .comments-topbar {
        display: grid;
        gap: 0.28rem;
        align-items: start;
    }

    .comment-card,
    .comment-form-wrap-v4 {
        padding: 0.86rem;
    }

    .tarot-table {
        padding: 0.76rem;
    }

    .tarot-deck-fan {
        min-height: clamp(14.8rem, 76vw, 18rem);
    }

    .deck-card {
        width: clamp(58px, 16.2vw, 76px);
    }

    .site-header,
    .glass-card,
    .note-card,
    .article,
    .tarot-form,
    .tarot-table,
    .reading-box,
    .comment-card,
    .comment-form-wrap-v4,
    .comments-compose-panel,
    .music-capsule-toggle,
    .music-capsule-panel {
        -webkit-backdrop-filter: blur(8px) saturate(118%);
        backdrop-filter: blur(8px) saturate(118%);
    }
}

/* Studio finish pass: calmer color, clearer glass, less machine-like framing. */
:root {
    --studio-blue: rgb(calc(86 + (170 - 86) * var(--theme-progress)), calc(114 + (190 - 114) * var(--theme-progress)), calc(154 + (222 - 154) * var(--theme-progress)));
    --studio-lilac: rgb(calc(142 + (204 - 142) * var(--theme-progress)), calc(126 + (190 - 126) * var(--theme-progress)), calc(180 + (226 - 180) * var(--theme-progress)));
    --studio-warm: rgb(calc(214 + (236 - 214) * var(--theme-progress)), calc(177 + (208 - 177) * var(--theme-progress)), calc(120 + (166 - 120) * var(--theme-progress)));
    --studio-card: linear-gradient(
        145deg,
        rgba(calc(255 + (41 - 255) * var(--theme-progress)), calc(255 + (48 - 255) * var(--theme-progress)), calc(255 + (62 - 255) * var(--theme-progress)), calc(0.78 + var(--theme-progress) * 0.02)),
        rgba(calc(248 + (22 - 248) * var(--theme-progress)), calc(251 + (28 - 251) * var(--theme-progress)), calc(255 + (39 - 255) * var(--theme-progress)), calc(0.48 + var(--theme-progress) * 0.08)) 58%,
        rgba(calc(239 + (16 - 239) * var(--theme-progress)), calc(244 + (22 - 244) * var(--theme-progress)), calc(251 + (33 - 251) * var(--theme-progress)), calc(0.32 + var(--theme-progress) * 0.08))
    );
    --studio-line: rgba(calc(203 + (105 - 203) * var(--theme-progress)), calc(214 + (122 - 214) * var(--theme-progress)), calc(231 + (150 - 231) * var(--theme-progress)), calc(0.54 - var(--theme-progress) * 0.16));
    --studio-hairline: rgba(255,255,255,calc(0.9 - var(--theme-progress) * 0.74));
    --studio-card-shadow: 0 18px 48px rgba(calc(69 - var(--theme-progress) * 60), calc(84 - var(--theme-progress) * 72), calc(111 - var(--theme-progress) * 86), calc(0.075 + var(--theme-progress) * 0.08)), inset 0 1px 0 var(--studio-hairline);
}

body {
    background:
        radial-gradient(circle at 15% 8%, rgba(calc(206 + (86 - 206) * var(--theme-progress)), calc(221 + (102 - 221) * var(--theme-progress)), calc(242 + (135 - 242) * var(--theme-progress)), calc(0.54 - var(--theme-progress) * 0.26)), transparent 24rem),
        radial-gradient(circle at 86% 12%, rgba(calc(231 + (126 - 231) * var(--theme-progress)), calc(214 + (109 - 214) * var(--theme-progress)), calc(244 + (158 - 244) * var(--theme-progress)), calc(0.38 - var(--theme-progress) * 0.18)), transparent 22rem),
        radial-gradient(circle at 50% 100%, rgba(calc(206 + (62 - 206) * var(--theme-progress)), calc(220 + (78 - 220) * var(--theme-progress)), calc(238 + (108 - 238) * var(--theme-progress)), calc(0.34 + var(--theme-progress) * 0.02)), transparent 30rem),
        linear-gradient(180deg, rgb(calc(249 + (14 - 249) * var(--theme-progress)), calc(251 + (18 - 251) * var(--theme-progress)), calc(254 + (25 - 254) * var(--theme-progress))) 0%, var(--bg) 48%, var(--bg-2) 100%);
}

.site-header {
    border-radius: 0 0 22px 22px;
    background:
        linear-gradient(180deg, rgba(calc(255 + (29 - 255) * var(--theme-progress)), calc(255 + (35 - 255) * var(--theme-progress)), calc(255 + (47 - 255) * var(--theme-progress)), calc(0.76 + var(--theme-progress) * 0.04)), rgba(calc(255 + (18 - 255) * var(--theme-progress)), calc(255 + (23 - 255) * var(--theme-progress)), calc(255 + (33 - 255) * var(--theme-progress)), calc(0.42 + var(--theme-progress) * 0.12)));
    border-color: rgba(255,255,255,calc(0.72 - var(--theme-progress) * 0.54));
}

.brand {
    font-weight: 760;
    letter-spacing: -0.01em;
}

.nav a {
    border-radius: 14px;
    font-size: 0.94rem;
}

.nav a:hover {
    background: rgba(255,255,255,calc(0.62 - var(--theme-progress) * 0.46));
}

.hero-home-clean h1,
.page-hero h1,
.tarot-hero-copy h1,
.article h1 {
    letter-spacing: -0.018em;
    font-weight: 760;
}

.hero-home-clean .hero-copy > p,
.page-hero > p,
.tarot-hero-copy > p {
    color: rgb(calc(86 + (188 - 86) * var(--theme-progress)), calc(99 + (197 - 99) * var(--theme-progress)), calc(123 + (212 - 123) * var(--theme-progress)));
}

.hero-kicker,
.section-kicker,
.eyebrow,
.article-kicker,
.note-card-date {
    gap: 0.42rem;
    font-weight: 680;
    color: rgb(calc(94 + (187 - 94) * var(--theme-progress)), calc(110 + (199 - 110) * var(--theme-progress)), calc(138 + (219 - 138) * var(--theme-progress)));
}

.hero-kicker .badge-icon,
.section-kicker .badge-icon,
.eyebrow .badge-icon {
    color: var(--studio-blue);
    filter: saturate(1.2);
}

.glass-card,
.note-card,
.article,
.tarot-form,
.reading-box,
.comment-card,
.comment-form-wrap-v4,
.comments-compose-panel {
    background: var(--studio-card) !important;
    border: 1px solid var(--studio-line);
    box-shadow: var(--studio-card-shadow);
    border-radius: 20px;
}

.glass-card::before,
.note-card::before,
.article::before,
.comment-card::before,
.comment-form-wrap-v4::before {
    background: linear-gradient(120deg, rgba(255,255,255,calc(0.58 - var(--theme-progress) * 0.42)), transparent 38%, rgba(255,255,255,calc(0.18 - var(--theme-progress) * 0.1)) 72%, transparent);
    opacity: 0.5;
}

.note-card {
    gap: 0.84rem;
}

.note-card h2,
.note-card h3 {
    letter-spacing: -0.012em;
}

.note-card p {
    color: rgb(calc(91 + (190 - 91) * var(--theme-progress)), calc(104 + (199 - 104) * var(--theme-progress)), calc(128 + (214 - 128) * var(--theme-progress)));
}

.note-card-link {
    color: var(--studio-blue);
    font-weight: 700;
}

.button {
    letter-spacing: 0;
    font-weight: 730;
    transform: translateZ(0);
}

.button.primary {
    background:
        linear-gradient(180deg, rgba(calc(42 + (84 - 42) * var(--theme-progress)), calc(53 + (103 - 53) * var(--theme-progress)), calc(72 + (135 - 72) * var(--theme-progress)), 0.96), rgba(calc(27 + (48 - 27) * var(--theme-progress)), calc(36 + (62 - 36) * var(--theme-progress)), calc(52 + (88 - 52) * var(--theme-progress)), 0.98)) !important;
}

.button.secondary,
.lang-toggle,
.article-translate-toggle {
    background:
        linear-gradient(180deg, rgba(255,255,255,calc(0.72 - var(--theme-progress) * 0.5)), rgba(255,255,255,calc(0.32 - var(--theme-progress) * 0.18))) !important;
    border-color: rgba(255,255,255,calc(0.72 - var(--theme-progress) * 0.54));
}

.ui-icon,
img.ui-icon {
    opacity: 0.9;
    filter: saturate(1.18) contrast(1.05);
}

.badge-icon {
    color: var(--studio-blue);
}

.section-home-notes .notes-card-grid,
.notes-page-grid {
    gap: clamp(0.9rem, 2vw, 1.12rem);
}

.comments-topbar {
    border-bottom: 1px solid rgba(calc(178 + (108 - 178) * var(--theme-progress)), calc(194 + (127 - 194) * var(--theme-progress)), calc(218 + (156 - 218) * var(--theme-progress)), calc(0.28 - var(--theme-progress) * 0.06));
}

.comments-grid {
    gap: clamp(0.9rem, 2vw, 1.12rem);
}

.comment-card,
.comment-form-wrap-v4 {
    background:
        linear-gradient(145deg, rgba(255,255,255,calc(0.64 - var(--theme-progress) * 0.48)), rgba(255,255,255,calc(0.2 - var(--theme-progress) * 0.1))),
        rgba(calc(250 - var(--theme-progress) * 226), calc(252 - var(--theme-progress) * 226), calc(255 - var(--theme-progress) * 220), calc(0.48 + var(--theme-progress) * 0.1)) !important;
    border-radius: 17px;
}

.comment-form textarea,
.music-search input,
.tarot-form textarea,
.tarot-form select {
    background: rgba(calc(255 + (18 - 255) * var(--theme-progress)), calc(255 + (24 - 255) * var(--theme-progress)), calc(255 + (34 - 255) * var(--theme-progress)), calc(0.72 - var(--theme-progress) * 0.12));
    border-color: rgba(calc(202 + (100 - 202) * var(--theme-progress)), calc(214 + (118 - 214) * var(--theme-progress)), calc(232 + (148 - 232) * var(--theme-progress)), calc(0.52 - var(--theme-progress) * 0.12));
}

.tarot-table {
    border-radius: 22px;
    background-color: #17202c;
    background-image:
        radial-gradient(circle at 50% 8%, rgba(225, 232, 244, 0.12), transparent 16rem),
        radial-gradient(circle at 82% 20%, rgba(163, 151, 206, 0.11), transparent 17rem),
        radial-gradient(circle at 18% 30%, rgba(124, 151, 189, 0.13), transparent 19rem),
        linear-gradient(180deg, #17202c 0%, #121923 100%) !important;
    border-color: rgba(224, 234, 248, 0.14);
}

.tarot-table-head {
    border-bottom-color: rgba(224, 234, 248, 0.12);
}

.tarot-table .section-kicker,
.tarot-table-hint,
.tarot-selection-copy {
    color: rgba(239, 244, 252, 0.78);
}

.spread-slot {
    border-radius: 16px;
    background: rgba(255,255,255,0.045);
    border-color: rgba(224,234,248,0.14);
}

.deck-card-art,
.tarot-card-art {
    border-radius: 11px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.24), inset 0 1px 0 rgba(255,255,255,0.32);
}

.music-capsule {
    right: clamp(0.8rem, 2.6vw, 1.4rem);
    bottom: clamp(0.8rem, 2.6vw, 1.35rem);
}

.music-capsule-toggle,
.music-capsule-panel {
    background:
        linear-gradient(145deg, rgba(255,255,255,calc(0.72 - var(--theme-progress) * 0.5)), rgba(255,255,255,calc(0.22 - var(--theme-progress) * 0.1))),
        rgba(calc(248 - var(--theme-progress) * 224), calc(251 - var(--theme-progress) * 226), calc(255 - var(--theme-progress) * 220), calc(0.72 + var(--theme-progress) * 0.04)) !important;
    border-color: rgba(255,255,255,calc(0.74 - var(--theme-progress) * 0.56));
    box-shadow: 0 16px 40px rgba(20,28,42,calc(0.1 + var(--theme-progress) * 0.16)), inset 0 1px 0 rgba(255,255,255,calc(0.84 - var(--theme-progress) * 0.66));
}

.music-capsule-orb {
    background:
        radial-gradient(circle at 30% 24%, rgba(255,255,255,0.84), transparent 28%),
        linear-gradient(145deg, var(--studio-lilac), var(--studio-blue));
    color: white;
}

.music-result {
    border-radius: 14px;
}

.site-footer {
    color: var(--muted);
}

@media (max-width: 760px) {
    .site-header {
        border-radius: 0 0 18px 18px;
        gap: 0.56rem;
    }

    .brand {
        font-size: 0.98rem;
    }

    .nav {
        gap: 0.18rem;
    }

    .nav a {
        padding: 0.48rem 0.56rem;
        font-size: 0.86rem;
        border-radius: 12px;
    }

    .hero-home-clean h1,
    .page-hero h1,
    .tarot-hero-copy h1 {
        letter-spacing: -0.012em;
    }

    .glass-card,
    .note-card,
    .article,
    .tarot-form,
    .reading-box,
    .comment-card,
    .comment-form-wrap-v4,
    .comments-compose-panel,
    .tarot-table {
        border-radius: 17px;
    }

    .comments-grid {
        gap: 0.72rem;
    }

    .music-capsule {
        left: 0.72rem;
        right: 0.72rem;
        width: auto;
    }

    .music-capsule-toggle,
    .music-capsule-panel {
        width: 100%;
    }
}

/* Live polish lock: keep the last visual layer lean and consistent. */
.site-header,
.glass-card,
.note-card,
.article,
.tarot-form,
.tarot-table,
.reading-box,
.comment-card,
.comment-form-wrap-v4,
.comments-compose-panel,
.music-capsule-toggle,
.music-capsule-panel {
    -webkit-backdrop-filter: blur(12px) saturate(126%) !important;
    backdrop-filter: blur(12px) saturate(126%) !important;
}

.theme-toggle {
    width: 2.46rem !important;
    height: 2.46rem !important;
    contain: layout paint;
}

.theme-toggle-track {
    background:
        radial-gradient(circle at 32% 24%, rgba(255,255,255,0.76), transparent 34%),
        linear-gradient(145deg, rgba(255,255,255,calc(0.68 - var(--theme-progress) * 0.46)), rgba(234,241,252,calc(0.46 - var(--theme-progress) * 0.26))),
        rgba(calc(246 - var(--theme-progress) * 225), calc(250 - var(--theme-progress) * 226), calc(255 - var(--theme-progress) * 219), calc(0.82 + var(--theme-progress) * 0.06)) !important;
}

.theme-toggle__around {
    color: rgb(calc(82 + (204 - 82) * var(--theme-progress)), calc(105 + (214 - 105) * var(--theme-progress)), calc(145 + (226 - 145) * var(--theme-progress))) !important;
}

.hero-home-clean {
    min-height: auto !important;
}

.notes-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17.5rem), 1fr));
}

.comments-shell {
    max-width: min(100%, 1080px);
}

.comments-grid {
    grid-template-columns: minmax(0, 1fr) minmax(15rem, 18.5rem);
    align-items: start;
}

.comments-compose-panel {
    position: sticky;
    top: 5.4rem;
}

.comment-card,
.comment-form-wrap-v4 {
    border-radius: 16px !important;
    padding: 0.92rem 1rem;
}

.comment-card-body p {
    margin: 0;
}

.tarot-stage {
    overflow: clip;
}

.tarot-table {
    background-color: #151b24 !important;
    box-shadow: 0 22px 54px rgba(13,18,28,0.18), inset 0 1px 0 rgba(255,255,255,0.08) !important;
}

[data-theme="dark"] .tarot-form,
[data-theme="dark"] .tarot-table,
[data-theme="dark"] .reading-box,
[data-theme="dark"] .tarot-history,
[data-theme="dark"] .tarot-history-item {
    background-color: #101722 !important;
}

@media (max-width: 980px) {
    .comments-grid {
        grid-template-columns: 1fr;
    }

    .comments-compose-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .site-header,
    .glass-card,
    .note-card,
    .article,
    .tarot-form,
    .tarot-table,
    .reading-box,
    .comment-card,
    .comment-form-wrap-v4,
    .comments-compose-panel,
    .music-capsule-toggle,
    .music-capsule-panel {
        -webkit-backdrop-filter: blur(8px) saturate(118%) !important;
        backdrop-filter: blur(8px) saturate(118%) !important;
    }

    .page-hero,
    .hero {
        padding-top: 2.4rem;
        padding-bottom: 1.8rem;
    }

    .hero-home-clean h1,
    .page-hero h1,
    .tarot-hero-copy h1,
    .article h1 {
        font-size: clamp(2rem, 10vw, 2.86rem);
        line-height: 1.04;
        overflow-wrap: anywhere;
    }

    .tarot-deck-fan {
        min-height: clamp(14.8rem, 76vw, 18rem);
    }

    .deck-card {
        width: clamp(58px, 16.2vw, 76px);
    }
}

/* Performance lock: native music player and calmer mobile rendering. */
.music-native-audio {
    display: block;
    width: 100%;
    height: 38px;
    border-radius: 999px;
    color-scheme: light;
    filter: saturate(0.9);
}

[data-theme="dark"] .music-native-audio {
    color-scheme: dark;
    filter: saturate(0.82) brightness(0.92);
}

.music-capsule.has-track .music-aplayer {
    margin-top: 10px !important;
    padding: 6px !important;
    border: 1px solid rgba(var(--line-r), var(--line-g), var(--line-b), 0.14) !important;
    border-radius: 22px !important;
    background: linear-gradient(145deg, rgba(255,255,255,0.62), rgba(255,255,255,0.3)) !important;
    box-shadow: inset 0 1px rgba(255,255,255,0.72), 0 14px 34px rgba(15, 23, 42, 0.08) !important;
}

[data-theme="dark"] .music-capsule.has-track .music-aplayer {
    background: linear-gradient(145deg, rgba(21, 29, 43, 0.76), rgba(11, 17, 27, 0.54)) !important;
    border-color: rgba(226, 232, 240, 0.13) !important;
    box-shadow: inset 0 1px rgba(255,255,255,0.08), 0 16px 36px rgba(0, 0, 0, 0.28) !important;
}

[data-theme="dark"] .tarot-form,
[data-theme="dark"] .tarot-table,
[data-theme="dark"] .reading-box,
[data-theme="dark"] .comments-compose-panel,
[data-theme="dark"] .comment-form-wrap-v4 {
    background-image: linear-gradient(145deg, rgba(18, 25, 36, 0.92), rgba(12, 18, 28, 0.82)) !important;
}

@media (max-width: 640px) {
    html,
    body {
        overflow-x: hidden;
    }

    .float-orb,
    .aurora,
    .hero-glow,
    .tarot-stage::before,
    .tarot-stage::after {
        animation-duration: 28s !important;
        filter: blur(24px) !important;
    }

    .music-capsule,
    .tarot-stage,
    .tarot-table,
    .deck-card {
        transform: translateZ(0);
        contain: layout paint;
    }
}

/* Absolute final layer: keep this at EOF so older passes cannot override proportions. */
:root {
    --final-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --final-ease-out: cubic-bezier(0, 0, 0.2, 1);
    --final-fast: 160ms;
    --final-base: 220ms;
}

.site-header {
    border-radius: 0 !important;
    box-shadow: none !important;
}

.button,
.button.primary,
.button.secondary,
.lang-toggle,
.article-translate-toggle {
    border-radius: 10px !important;
}

.theme-toggle {
    --toggle-w: 66px;
    --toggle-h: 36px;
    --toggle-icon: 21px;
    --toggle-pad: 7px;
    --toggle-thumb-size: var(--toggle-icon);
    width: var(--toggle-w) !important;
    min-width: var(--toggle-w) !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 4px !important;
    border-radius: 999px !important;
}

.theme-toggle-track {
    width: var(--toggle-w) !important;
    height: var(--toggle-h) !important;
    border-radius: 999px !important;
    transition:
        background-color var(--final-base) linear,
        border-color var(--final-base) linear,
        box-shadow var(--final-base) var(--final-ease-out),
        transform var(--final-fast) var(--final-ease-out) !important;
}

.theme-toggle__around {
    width: var(--toggle-icon) !important;
    height: var(--toggle-icon) !important;
    left: 7px !important;
    top: calc((var(--toggle-h) - var(--toggle-icon)) / 2) !important;
    transform:
        translate3d(calc(var(--theme-progress) * 28px), 0, 0)
        rotate(calc(var(--theme-progress) * 96deg)) !important;
    transition:
        transform var(--final-base) var(--final-ease),
        color var(--final-base) linear,
        opacity var(--final-fast) linear !important;
}

.theme-toggle__around *,
.theme-toggle__around > :first-child path {
    transition:
        transform var(--final-base) var(--final-ease),
        opacity var(--final-fast) linear !important;
}

.ui-icon,
img.ui-icon {
    width: 18px !important;
    height: 18px !important;
    stroke-width: 1.6 !important;
    opacity: 0.9 !important;
}

.badge-icon,
.hero-kicker .badge-icon,
.section-kicker .badge-icon,
.eyebrow .badge-icon {
    width: 16px !important;
    height: 16px !important;
    stroke-width: 1.65 !important;
}

.button-icon,
.inline-icon,
.lang-caret {
    width: 15px !important;
    height: 15px !important;
    stroke-width: 1.7 !important;
}

.glass-card,
.note-card,
.article,
.tarot-form,
.tarot-table,
.reading-box,
.comment-card,
.comment-form-wrap-v4,
.comments-compose-panel,
.tarot-history,
.tarot-history-item {
    border-radius: 0 !important;
    box-shadow: none !important;
    transition:
        transform var(--final-base) var(--final-ease-out),
        border-color var(--final-fast) var(--final-ease-out),
        background-color var(--final-fast) linear,
        box-shadow var(--final-base) var(--final-ease-out) !important;
}

.music-capsule-toggle,
.music-capsule-panel,
.music-capsule.has-track .music-aplayer {
    border-radius: 14px !important;
}

.tarot-table {
    min-height: clamp(620px, 62vw, 760px) !important;
}

.tarot-form,
.tarot-table {
    background-clip: padding-box;
}

.deck-card {
    width: clamp(92px, 7.4vw, 118px) !important;
    aspect-ratio: 0.62 !important;
    transition:
        transform 240ms var(--final-ease),
        opacity var(--final-fast) linear,
        filter var(--final-base) linear !important;
}

.deck-card-art,
.tarot-card-art {
    aspect-ratio: 0.62 !important;
    border-radius: 10px !important;
}

@media (max-width: 980px) {
    .deck-card {
        width: clamp(78px, 11vw, 102px) !important;
    }
}

@media (max-width: 760px) {
    .theme-toggle {
        --toggle-w: 58px;
        --toggle-h: 34px;
        --toggle-icon: 21px;
        --toggle-pad: 6px;
    }

    .theme-toggle__around {
        left: 6px !important;
        transform:
            translate3d(calc(var(--theme-progress) * 25px), 0, 0)
            rotate(calc(var(--theme-progress) * 94deg)) !important;
    }

    .button,
    .button.primary,
    .button.secondary,
    .lang-toggle,
    .article-translate-toggle {
        border-radius: 10px !important;
    }

    .hero-home-clean::after {
        right: 0.5rem !important;
        bottom: 4.6rem !important;
        width: min(58vw, 16rem) !important;
        opacity: 0.13 !important;
    }

    .tarot-table {
        min-height: 600px !important;
    }

    .deck-card {
        width: clamp(66px, 17.4vw, 82px) !important;
    }
}

/* Soft editorial correction: Bocconi-like hierarchy without visible grids or hard boxes. */
:root {
    --soft-editorial-surface: rgba(
        calc(255 + (22 - 255) * var(--theme-progress)),
        calc(255 + (29 - 255) * var(--theme-progress)),
        calc(255 + (42 - 255) * var(--theme-progress)),
        calc(0.72 + var(--theme-progress) * 0.06)
    );
    --soft-editorial-shadow: 0 18px 52px rgba(
        calc(42 - var(--theme-progress) * 31),
        calc(55 - var(--theme-progress) * 39),
        calc(78 - var(--theme-progress) * 51),
        calc(0.08 + var(--theme-progress) * 0.14)
    );
}

body {
    background-image:
        radial-gradient(circle at 10% -8%, rgba(190, 216, 248, calc(0.3 - var(--theme-progress) * 0.16)), transparent 34%),
        radial-gradient(circle at 92% 16%, rgba(220, 205, 238, calc(0.2 - var(--theme-progress) * 0.1)), transparent 30%),
        linear-gradient(180deg, rgba(255,255,255,calc(0.76 - var(--theme-progress) * 0.68)), rgba(243,247,252,calc(0.74 - var(--theme-progress) * 0.62))) !important;
    background-size: auto !important;
}

.site-header,
.hero-home-clean,
.page-hero,
.section-head,
.article {
    border-color: transparent !important;
}

.site-header {
    border-bottom: 0 !important;
    box-shadow: 0 10px 34px rgba(35, 48, 70, calc(0.035 + var(--theme-progress) * 0.08)) !important;
}

.hero-home-clean,
.page-hero {
    border-bottom: 0 !important;
}

.hero-home-clean::after {
    display: none !important;
}

.hero-home-clean {
    min-height: min(590px, calc(100svh - 90px)) !important;
    padding-block: clamp(3rem, 8vh, 5rem) clamp(2.4rem, 6vh, 3.6rem) !important;
}

body.home .site-main,
body.home .page-shell {
    padding-top: 0 !important;
}

.hero-home-clean h1 {
    max-width: 9ch;
    font-size: clamp(4.4rem, 8vw, 7.2rem) !important;
    line-height: 0.94 !important;
    letter-spacing: 0 !important;
}

.section-head {
    border-top: 0 !important;
    padding-top: 0 !important;
}

.notes-card-grid,
.notes-page-grid,
.comments-grid,
.tarot-layout {
    gap: clamp(0.9rem, 2vw, 1.25rem) !important;
    border: 0 !important;
    background: transparent !important;
}

.glass-card,
.note-card,
.tarot-form,
.tarot-table,
.reading-box,
.comment-card,
.comment-form-wrap-v4,
.comments-compose-panel,
.tarot-history,
.tarot-history-item {
    border-radius: clamp(16px, 2vw, 22px) !important;
    border: 1px solid rgba(var(--line-r), var(--line-g), var(--line-b), calc(0.11 + var(--theme-progress) * 0.04)) !important;
    background: var(--soft-editorial-surface) !important;
    box-shadow: var(--soft-editorial-shadow) !important;
}

.article {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding-inline: clamp(0.1rem, 2.6vw, 2rem) !important;
}

.tarot-table {
    border-color: rgba(137, 157, 187, 0.16) !important;
    background:
        radial-gradient(circle at 76% 18%, rgba(111, 126, 156, 0.18), transparent 34%),
        linear-gradient(145deg, #1b2330, #111822 68%, #0d141e) !important;
    box-shadow: 0 24px 64px rgba(12, 18, 28, 0.22), inset 0 1px 0 rgba(255,255,255,0.08) !important;
}

[data-theme="dark"] .tarot-table {
    border-color: rgba(139, 157, 187, 0.14) !important;
    background:
        radial-gradient(circle at 76% 18%, rgba(92, 110, 142, 0.16), transparent 34%),
        linear-gradient(145deg, #121a26, #0c121c 70%, #090f17) !important;
}

.note-card:hover,
.comment-card:hover {
    transform: translate3d(0, -2px, 0) !important;
    box-shadow: 0 24px 64px rgba(31, 43, 64, calc(0.1 + var(--theme-progress) * 0.14)) !important;
}

.article-content {
    font-size: clamp(1.02rem, 1.2vw, 1.12rem);
    line-height: 1.86;
}

.article-meta-row {
    border-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.article > h1 {
    max-width: 15ch;
    margin-top: clamp(2rem, 4vw, 3.6rem);
    font-size: clamp(3rem, 5.6vw, 5.4rem) !important;
    line-height: 1.01 !important;
    letter-spacing: 0 !important;
    text-wrap: balance;
}

.article-content > p:first-of-type {
    color: var(--muted);
    font-size: clamp(1.12rem, 2vw, 1.32rem);
    line-height: 1.72;
}

.article-content h2 {
    margin-top: clamp(2.7rem, 6vw, 4.8rem);
    margin-bottom: 0.9rem;
    font-size: clamp(1.75rem, 4vw, 3rem);
    line-height: 1.1;
    letter-spacing: 0;
}

.article-content h3 {
    margin-top: 2rem;
    font-size: clamp(1.15rem, 2vw, 1.38rem);
    letter-spacing: 0;
}

.article-content a {
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

.article-content blockquote {
    margin: clamp(2rem, 4vw, 3rem) 0;
    padding: 0 0 0 clamp(1rem, 2.2vw, 1.5rem);
    border-left: 3px solid rgba(67, 92, 139, calc(0.54 + var(--theme-progress) * 0.16));
    background: transparent;
    color: var(--text);
    font-size: clamp(1.15rem, 2vw, 1.42rem);
    line-height: 1.65;
}

.article-source-list {
    display: grid;
    gap: 0.75rem;
    margin: 1.2rem 0 0;
    padding: 0;
    list-style: none;
}

.article-source-list li {
    margin: 0;
    padding: 0.3rem 0;
    border: 0;
}

.article-source-list li:last-child {
    border-bottom: 0;
}

.article-source-list a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text);
    font-weight: 650;
}

/* Full-bleed editorial video inspired by Bocconi's homepage treatment. */
.article-video-feature.bocconi-video-hero {
    width: min(100%, 1120px);
    margin: clamp(2rem, 5vw, 4rem) auto clamp(2.5rem, 6vw, 5rem);
}

.bocconi-video-hero .article-video-card {
    position: relative;
    min-height: clamp(340px, 56vw, 640px);
    padding: 0 !important;
    overflow: hidden;
    isolation: isolate;
    border: 0 !important;
    border-radius: clamp(18px, 2.6vw, 28px) !important;
    background: #101722 !important;
    box-shadow: 0 30px 90px rgba(15, 24, 39, calc(0.18 + var(--theme-progress) * 0.16)) !important;
}

.bocconi-video-hero .article-video-player,
.article-content .bocconi-video-hero .article-video-player {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    margin: 0 !important;
    object-fit: cover;
    object-position: center 38%;
    border: 0 !important;
    border-radius: inherit !important;
    background: #101722;
    box-shadow: none !important;
}

.bocconi-video-shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(8, 14, 24, 0.16), rgba(8, 14, 24, 0.02) 40%, rgba(8, 14, 24, 0.74)),
        linear-gradient(90deg, rgba(8, 14, 24, 0.42), transparent 58%);
}

.bocconi-video-hero .article-video-copy {
    position: absolute;
    z-index: 2;
    left: clamp(1.2rem, 4vw, 3.4rem);
    right: clamp(1.2rem, 4vw, 3.4rem);
    bottom: clamp(1.3rem, 4vw, 3.2rem);
    display: block;
    max-width: 46rem;
    margin: 0;
    color: #fff;
}

.bocconi-video-hero .article-video-copy span {
    height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: rgba(255,255,255,0.78);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.bocconi-video-hero .article-video-copy h2 {
    max-width: 13ch;
    margin: 0.55rem 0 0;
    color: #fff;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(2rem, 6vw, 5.4rem);
    font-weight: 500;
    line-height: 0.98;
    letter-spacing: 0;
    text-wrap: balance;
}

.bocconi-video-hero .article-video-copy p {
    max-width: 34rem;
    margin: 1rem 0 0;
    color: rgba(255,255,255,0.82);
    font-size: clamp(0.92rem, 1.6vw, 1.08rem);
    line-height: 1.55;
    text-align: left;
}

.bocconi-video-toggle {
    position: absolute;
    z-index: 3;
    top: clamp(1rem, 2.5vw, 1.7rem);
    right: clamp(1rem, 2.5vw, 1.7rem);
    display: inline-flex;
    align-items: center;
    gap: 0.48rem;
    min-height: 2.65rem;
    padding: 0 0.95rem;
    border: 1px solid rgba(255,255,255,0.54);
    border-radius: 999px;
    background: rgba(255,255,255,0.18);
    color: #fff;
    -webkit-backdrop-filter: blur(16px) saturate(135%);
    backdrop-filter: blur(16px) saturate(135%);
    box-shadow: inset 0 1px rgba(255,255,255,0.28), 0 10px 30px rgba(0,0,0,0.15);
    cursor: pointer;
}

.bocconi-video-toggle::before {
    content: '';
    width: 16px;
    height: 16px;
    background: currentColor;
    -webkit-mask: url('assets/vendor/phosphor/pause.svg') center / contain no-repeat;
    mask: url('assets/vendor/phosphor/pause.svg') center / contain no-repeat;
}

.bocconi-video-hero.is-video-paused .bocconi-video-toggle::before {
    -webkit-mask-image: url('assets/vendor/phosphor/play.svg');
    mask-image: url('assets/vendor/phosphor/play.svg');
}

.bocconi-video-toggle span {
    font-size: 0.78rem;
    font-weight: 700;
}

@media (max-width: 760px) {
    .notes-card-grid,
    .notes-page-grid,
    .comments-grid,
    .tarot-layout {
        gap: 0.82rem !important;
    }

    .glass-card,
    .note-card,
    .tarot-form,
    .tarot-table,
    .reading-box,
    .comment-card,
    .comment-form-wrap-v4,
    .comments-compose-panel,
    .tarot-history,
    .tarot-history-item {
        border-radius: 17px !important;
    }

    .article {
        width: min(100% - 1.25rem, 980px) !important;
        padding-inline: 0 !important;
    }

    .hero-home-clean {
        min-height: min(500px, calc(100svh - 82px)) !important;
        padding-block: 2.8rem 2.2rem !important;
    }

    .hero-home-clean h1 {
        max-width: 8ch;
        font-size: clamp(2.9rem, 14vw, 4.2rem) !important;
        line-height: 0.96 !important;
    }

    .article > h1 {
        max-width: none;
        margin-top: 1.55rem;
        font-size: clamp(2.45rem, 11.5vw, 3.6rem) !important;
        line-height: 1.04 !important;
    }

    .bocconi-video-hero .article-video-card {
        min-height: clamp(380px, 118vw, 560px);
        border-radius: 18px !important;
    }

    .bocconi-video-hero .article-video-player,
    .article-content .bocconi-video-hero .article-video-player {
        object-position: 53% center;
    }

    .bocconi-video-hero .article-video-copy h2 {
        max-width: 9ch;
    }

    .bocconi-video-toggle span {
        display: none;
    }

    .bocconi-video-toggle {
        width: 2.65rem;
        padding: 0;
        justify-content: center;
    }
}

/* Final structure lock. Keep this block last so legacy polish passes cannot undo the layout. */
body {
    color: var(--qa-ink) !important;
    background: var(--qa-page) !important;
    background-image: none !important;
}

body::before,
body::after {
    display: none !important;
}

.site-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0.85rem clamp(0.9rem, 2.2vw, 1.75rem) !important;
    display: flex !important;
    justify-content: space-between !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.site-header .header-actions {
    border-radius: 999px !important;
}

.nav {
    display: none !important;
}

.page-shell {
    width: min(1180px, calc(100% - 2rem)) !important;
    padding-top: clamp(6.5rem, 9vw, 8rem) !important;
}

body.home .page-shell {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.button,
.button.primary,
.button.secondary,
.lang-toggle,
.article-translate-toggle,
.comment-form .submit,
.tarot-form button {
    border-radius: 999px !important;
}

.glass-card,
.note-card,
.tarot-form,
.tarot-table,
.reading-box,
.comment-card,
.comment-form-wrap-v4,
.comments-compose-panel,
.tarot-history,
.tarot-history-item,
.music-capsule-toggle,
.music-capsule-panel {
    border-radius: var(--qa-radius-md) !important;
}

.home-film-hero,
.home-film,
.home-film-shade {
    border: 0 !important;
    border-radius: 0 !important;
}

.home-story {
    border: 0 !important;
    border-radius: var(--qa-radius-lg) !important;
    box-shadow: var(--qa-shadow) !important;
}

.article-content table,
.tarot-table table,
.tarot-table-wrap {
    overflow: hidden !important;
    border-radius: var(--qa-radius-md) !important;
}

.page-hero,
.section-head,
.article-meta-row {
    border: 0 !important;
}

.tarot-stage::before,
.tarot-stage::after {
    display: none !important;
}

@media (min-width: 1000px) {
    .home-film {
        transform: scale(1.38) !important;
    }
}

@media (max-width: 760px) {
    .site-header {
        padding: 0.7rem 0.72rem !important;
    }

    .site-dock {
        left: 0.68rem !important;
        right: auto !important;
        top: auto !important;
        bottom: calc(0.9rem + env(safe-area-inset-bottom, 0px)) !important;
        transform: none !important;
    }

    .site-dock-link:nth-child(1) { --dock-y: -10.8rem; }
    .site-dock-link:nth-child(2) { --dock-y: -7.15rem; }
    .site-dock-link:nth-child(3) { --dock-y: -3.5rem; }

    .home-story,
    .glass-card,
    .note-card,
    .tarot-form,
    .tarot-table,
    .reading-box,
    .comment-card,
    .comment-form-wrap-v4,
    .comments-compose-panel,
    .tarot-history,
    .tarot-history-item,
    .music-capsule-toggle,
    .music-capsule-panel {
        border-radius: 20px !important;
    }
}

/* Final music interaction layer. */
.music-capsule {
    contain: layout paint;
    z-index: 80;
}

.music-capsule-panel {
    overflow: hidden;
    display: grid;
    gap: 0.72rem;
}

.music-capsule-panel[hidden],
.music-aplayer[hidden],
.music-play-toggle[hidden] {
    display: none !important;
}

.music-play-toggle {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    margin: 0 0 0 auto;
    padding: 0;
    border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
    border-radius: 50%;
    background: color-mix(in srgb, currentColor 8%, transparent);
    color: inherit;
    cursor: pointer;
    transition: transform 160ms ease, background-color 160ms ease;
}

.music-play-toggle:hover {
    transform: translateY(-1px);
    background: color-mix(in srgb, currentColor 14%, transparent);
}

.music-play-toggle:active { transform: scale(0.96); }

.music-play-icon { width: 1.08rem; height: 1.08rem; }

.music-aplayer { min-width: 0; overflow: hidden; }

.music-native-audio {
    display: block;
    width: 100%;
    min-width: 0;
    height: 38px;
    border-radius: 12px;
}

.music-capsule.is-buffering .music-capsule-art {
    animation: music-art-pulse 1.1s ease-in-out infinite;
}

.music-results {
    min-height: 0;
    max-height: min(32vh, 17rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.music-result {
    width: 100%;
    min-height: 3.25rem;
    display: grid;
    grid-template-columns: 2.65rem minmax(0, 1fr);
    gap: 0.68rem;
    align-items: center;
    text-align: left;
}

.music-result-copy { min-width: 0; }

.music-result-copy strong,
.music-result-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.music-search-button,
.music-play-toggle,
.music-capsule-toggle { touch-action: manipulation; }

.music-search.is-loading .music-search-button {
    pointer-events: none;
    opacity: 0.58;
}

@keyframes music-art-pulse {
    0%, 100% { transform: scale(1); opacity: 0.82; }
    50% { transform: scale(1.045); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .music-capsule.is-buffering .music-capsule-art { animation: none; }
    .music-play-toggle { transition: none; }
}

@media (max-width: 760px) {
    .music-capsule { bottom: max(0.72rem, env(safe-area-inset-bottom)); }
    .music-capsule-panel { max-height: min(70svh, 34rem); }
    .music-results { max-height: min(30svh, 15rem); }
}

/* Keep the open panel inside the viewport instead of letting grid reflow push it away. */
.music-capsule {
    display: flex !important;
    flex-direction: column;
    align-items: flex-end;
}

.music-capsule-panel {
    position: absolute !important;
    right: 0;
    bottom: calc(100% + 0.62rem) !important;
    top: auto !important;
    max-height: min(70vh, 34rem) !important;
    overflow: hidden auto !important;
}

.music-capsule-toggle {
    position: relative;
    z-index: 1;
}

.music-results {
    max-height: min(30vh, 15.5rem) !important;
    overflow-y: auto;
    overscroll-behavior: contain;
}

@media (max-width: 640px) {
    .music-capsule {
        left: 0.72rem !important;
        right: 0.72rem !important;
        width: auto !important;
        max-width: none !important;
    }
    .music-capsule-panel {
        right: 0;
        width: 100% !important;
        max-height: min(64svh, 30rem) !important;
    }
    .music-results { max-height: min(28svh, 13rem) !important; }
}
