/* Mộng Giới truyện - Main Stylesheet */

/* ===== Design Tokens ===== */
:root {
    /* Primary */
    --color-primary: #9b2c2c;
    --color-primary-hover: #7f1d1d;
    --color-primary-light: #f6e9e5;
    --color-on-primary: #ffffff;

    /* Hero accent */
    --color-hero-accent: #9b2c2c;
    --color-hero-bg: #241f1c;

    /* Text */
    --color-text-primary: #1a1a1a;
    --color-text-secondary: #454140;
    --color-text-muted: #6f6d6d;

    /* Background */
    --color-bg: #faf7f5;
    --color-bg-secondary: #f3efec;
    --color-bg-tertiary: #ece9e7;

    /* Border */
    --color-border: #d8d5d4;
    --color-border-light: #e8e3df;

    /* Semantic */
    --color-success: #10B981;
    --color-on-success: #1b1e18;
    --color-warning: #9a671b;
    --color-danger: #EF4444;
    --color-on-danger: #FFFFFF;
    --color-rating: #b7791f;

    /* Footer */
    --color-footer-bg: #211d1b;
    --color-footer-text: #FFFFFF;
    --color-footer-text-muted: rgba(255,255,255,0.6);
    --color-footer-border: rgba(255,255,255,0.1);
    --color-footer-link: rgba(255,255,255,0.8);
    --color-footer-link-hover: #FFFFFF;

    /* Input */
    --color-input-bg: #faf7f5;
    --color-input-border: #d8d5d4;
    --color-input-focus-ring: rgba(155,44,44,0.22);

    /* Overlay */
    --color-overlay: rgba(0,0,0,0.5);

    /* Select */
    --color-select-indicator: #6f6d6d;

    /* Banner overlay (always bright over images) */
    --color-banner-overlay-text: #FFFFFF;
    --color-banner-overlay-text-muted: rgba(255,255,255,0.72);

    /* Badge */
    --color-badge-primary-bg: #f6e9e5;
    --color-badge-primary-text: #9b2c2c;
    --color-badge-success-bg: #D1FAE5;
    --color-badge-success-text: #065F46;
    --color-badge-warning-bg: #f8edc8;
    --color-badge-warning-text: #6f4813;
    --color-badge-danger-bg: #FEE2E2;
    --color-badge-danger-text: #991B1B;

    /* Banner (light) */
    --color-banner-bg: #f3efec;
    --color-banner-text: #1a1a1a;
    --color-banner-text-muted: #6f6d6d;
    --color-banner-card-bg: #ece9e7;
    --color-banner-shell-gradient: linear-gradient(122deg, rgba(250,247,245,0.98), rgba(243,239,236,0.93) 52%, rgba(236,233,231,0.88));
    --color-banner-shell-ambient: radial-gradient(circle at 72% 12%, rgba(183,121,31,0.13), transparent 35%);
    --color-banner-shell-border: #d8d5d4;
    --color-banner-veil: none;
    --color-banner-cover-border: #d8d5d4;
    --color-banner-cover-shadow: 1px 8px 28px -8px rgba(96,28,28,0.28);
    --color-banner-card-active-border: #9b2c2c;
    --color-banner-card-active-shadow: 1px 1px 16px -2px rgba(96,28,28,0.22);
    --color-banner-card-hover-border: rgba(155,44,44,0.58);
    --color-banner-card-hover-shadow: 1px 1px 16px -2px rgba(96,28,28,0.16);
    --color-banner-card-rank-bg: rgba(0,0,0,0.65);
    --color-banner-card-rank-active-bg: #9b2c2c;
    --color-banner-card-overlay: linear-gradient(transparent, rgba(0,0,0,0.78));
    --shadow-banner: 1px 8px 32px -8px rgba(96,28,28,0.18);

    /* Typography */
    --font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-serif: 'Libre Baskerville', Georgia, serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;

    /* Radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-pill: 6px;
    --radius-full: 9999px;

    /* Spacing / Touch */
    --touch-target: 44px;

    /* Shadow */
    --shadow-sm: 1px 1px 16px -2px rgba(96,28,28,0.08), 1px 1px 2px -3px rgba(96,28,28,0.12);
    --shadow-md: 1px 1px 16px -2px rgba(96,28,28,0.12), 1px 2px 4px -3px rgba(96,28,28,0.12);
    --shadow-lg: 1px 1px 16px -2px rgba(96,28,28,0.12), 1px 8px 10px -3px rgba(96,28,28,0.12);

    /* Layout */
    --container-max: 1280px;
    --sidebar-width: 300px;
    --header-height: 64px;
    --header-top: 12px;
    --header-side: clamp(12px, 3vw, 28px);
    --header-radius: 6px;
    --bottom-nav-height: 0px;
    --card-min-width: 200px;
    --grid-gap: 16px;
}

/* Dark Theme */
html[data-theme="dark"] {
    --color-primary: #b94343;
    --color-primary-hover: #d25b52;
    --color-primary-light: #3a2926;
    --color-on-primary: #fffaf7;

    --color-text-primary: #f8f4f0;
    --color-text-secondary: #ded7d2;
    --color-text-muted: #b8afa9;

    --color-bg: #2d2a28;
    --color-bg-secondary: #242220;
    --color-bg-tertiary: #373330;

    --color-border: #4d4945;
    --color-border-light: #3c3936;

    --color-on-success: #1b1e18;
    --color-on-danger: #FFFFFF;
    --color-warning: #d8ae58;
    --color-rating: #d8ae58;

    --color-footer-bg: #1d1b19;

    --color-input-bg: #2d2a28;
    --color-input-border: #4d4945;
    --color-input-focus-ring: rgba(185,67,67,0.24);

    --color-overlay: rgba(0,0,0,0.7);

    --color-select-indicator: #b8afa9;

    --color-badge-primary-bg: #49302d;
    --color-badge-primary-text: #efaaa2;
    --color-badge-success-bg: #064E3B;
    --color-badge-success-text: #6EE7B7;
    --color-badge-warning-bg: #453a27;
    --color-badge-warning-text: #e6c982;
    --color-badge-danger-bg: #7F1D1D;
    --color-badge-danger-text: #FCA5A5;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.4);
    --shadow-lg: 0 12px 24px rgba(0,0,0,0.5);

    /* Banner dark */
    --color-banner-bg: #242220;
    --color-banner-text: #f8f4f0;
    --color-banner-text-muted: rgba(255,255,255,0.72);
    --color-banner-card-bg: #373330;
    --color-banner-shell-gradient: linear-gradient(112deg, rgba(36,34,32,0.98), rgba(55,51,48,0.96) 52%, rgba(45,42,40,0.98));
    --color-banner-shell-ambient: radial-gradient(circle at 72% 12%, rgba(216,174,88,0.13), transparent 35%);
    --color-banner-shell-border: #4d4945;
    --color-banner-veil: linear-gradient(90deg, rgba(0,0,0,0.38), transparent 36%, rgba(0,0,0,0.26));
    --color-banner-cover-border: rgba(255,255,255,0.16);
    --color-banner-cover-shadow: 0 20px 50px rgba(0,0,0,0.42);
    --color-banner-card-active-border: #b94343;
    --color-banner-card-active-shadow: 1px 1px 16px -2px rgba(185,67,67,0.34);
    --color-card-glow: rgba(185,67,67,0.26);
    --color-banner-card-hover-border: rgba(185,67,67,0.7);
    --color-banner-card-hover-shadow: 1px 1px 16px -2px rgba(185,67,67,0.22);
    --shadow-banner: 0 24px 60px rgba(0,0,0,0.35);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }
body {
    font-family: var(--font-family);
    color: var(--color-text-primary);
    background: var(--color-bg-secondary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-top: calc(var(--header-top) + var(--header-height));
    transition: background 0.3s, color 0.3s;
}
body.wp-theme-monggioitruyen {
    padding-top: calc(var(--header-top) + var(--header-height));
}
:target {
    scroll-margin-top: calc(var(--header-top) + var(--header-height) + 16px);
}
a { color: var(--color-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-primary-hover); }
img { max-width: 100%; height: auto; }

.container { max-width: var(--container-max); margin: 0 auto; padding: 0 16px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: var(--touch-target); padding: 8px 24px;
    border-radius: var(--radius-pill); border: none; cursor: pointer;
    font-family: var(--font-family); font-weight: 600;
    font-size: var(--font-size-sm);
    touch-action: manipulation;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
    gap: 8px; white-space: nowrap;
}
.btn-primary { background: var(--color-primary); color: var(--color-on-primary); }
.btn-primary:hover { background: var(--color-primary-hover); color: var(--color-on-primary); }
a.btn-primary,
a.btn-primary:hover,
a.btn-primary:focus-visible {
    color: var(--color-on-primary);
}
.btn-outline { background: transparent; border: 2px solid var(--color-primary); color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: var(--color-on-primary); }
.btn-ghost { background: transparent; color: var(--color-text-secondary); }
.btn-ghost:hover { background: var(--color-bg-tertiary); }
.btn-sm { min-height: 36px; padding: 6px 16px; font-size: var(--font-size-xs); }
.btn-lg { min-height: 52px; padding: 12px 32px; font-size: var(--font-size-base); }

.card {
    background: var(--color-bg); border-radius: var(--radius-md);
    border: 1px solid var(--color-border); overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s, background 0.3s, border-color 0.3s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-img { width: 100%; aspect-ratio: 2/3; object-fit: cover; object-position: center; display: block; }
.hd-story-cover-compact-image {
    aspect-ratio: 2 / 3 !important;
    overflow: hidden;
}
.hd-story-cover-compact-image img,
img.hd-story-cover-compact-image {
    height: 100%;
    object-fit: cover;
    object-position: center;
    width: 100%;
}
.card-body { padding: 12px; }
.card-title {
    font-size: var(--font-size-sm); font-weight: 600;
    line-height: 1.4; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    color: var(--color-text-primary);
}
.card-meta { font-size: var(--font-size-xs); color: var(--color-text-muted); margin-top: 4px; }

.grid { display: grid; gap: var(--grid-gap); width: 100%; }
.grid-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    justify-content: stretch;
}
.home-story-grid {
    gap: 16px;
    margin-left: calc(50% - 50vw + 64px);
    margin-right: calc(50% - 50vw + 64px);
    width: calc(100vw - 128px);
}
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-1 { grid-template-columns: 1fr; }

@media (max-width: 1024px) {
    .grid-6 { grid-template-columns: repeat(4, 1fr); }
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
    .home-story-grid {
        gap: 12px;
        margin-left: calc(50% - 50vw + 32px);
        margin-right: calc(50% - 50vw + 32px);
        width: calc(100vw - 64px);
    }
}
@media (max-width: 768px) {
    .grid-6, .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .home-story-grid {
        gap: 12px;
        margin-left: calc(50% - 50vw + 12px);
        margin-right: calc(50% - 50vw + 12px);
        width: calc(100vw - 24px);
    }
}
@media (max-width: 375px) {
    .grid-6, .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .home-story-grid {
        gap: 12px;
        margin-left: calc(50% - 50vw + 8px);
        margin-right: calc(50% - 50vw + 8px);
        width: calc(100vw - 16px);
    }
}

/* ===== Home New Marquee Carousel ===== */
@keyframes home-marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.home-new-marquee {
    overflow: hidden;
    margin-left: calc(50% - 50vw + 64px);
    margin-right: calc(50% - 50vw + 64px);
    width: calc(100vw - 128px);
}
.home-new-track {
    display: flex;
    animation: home-marquee-scroll 40s linear infinite;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}
.home-new-track:hover {
    animation-play-state: paused;
}
.home-new-group {
    display: flex;
    gap: 16px;
    flex-shrink: 0;
    padding-right: 16px;
}
.home-new-group .story-card {
    width: calc((100vw - 128px - 7 * 16px) / 8);
    flex-shrink: 0;
}
@media (max-width: 1024px) {
    .home-new-marquee {
        margin-left: calc(50% - 50vw + 32px);
        margin-right: calc(50% - 50vw + 32px);
        width: calc(100vw - 64px);
    }
    .home-new-group {
        gap: 12px;
        padding-right: 12px;
    }
    .home-new-group .story-card {
        width: calc((100vw - 64px - 3 * 12px) / 4);
    }
}
@media (max-width: 768px) {
    .home-new-marquee {
        margin-left: calc(50% - 50vw + 12px);
        margin-right: calc(50% - 50vw + 12px);
        width: calc(100vw - 24px);
    }
    .home-new-group {
        gap: 12px;
        padding-right: 12px;
    }
    .home-new-group .story-card {
        width: calc((100vw - 24px - 1 * 12px) / 2);
    }
}
@media (max-width: 375px) {
    .home-new-marquee {
        margin-left: calc(50% - 50vw + 8px);
        margin-right: calc(50% - 50vw + 8px);
        width: calc(100vw - 16px);
    }
    .home-new-group {
        gap: 8px;
        padding-right: 8px;
    }
    .home-new-group .story-card {
        width: calc((100vw - 16px - 1 * 8px) / 2);
    }
}
@media (prefers-reduced-motion: reduce) {
    .home-new-track {
        animation: none !important;
        transform: none !important;
    }
    .home-new-marquee {
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }
    .home-new-group[aria-hidden="true"] {
        display: none;
    }
    .home-new-group {
        flex-shrink: 0;
    }
    .home-new-group .story-card {
        scroll-snap-align: start;
    }
}

/* ===== Warm parchment theme (canonical tokens) =====
 * This project ships plain CSS rather than a Tailwind build. The semantic
 * tokens below mirror the supplied Tailwind v4 theme and expose compatibility
 * aliases for the existing WordPress components.
 */
:root {
    --background: oklch(0.9650 0.0114 84.5784);
    --foreground: oklch(0.2437 0.0179 55.4008);
    --card: oklch(0.9858 0.0085 84.5723);
    --card-foreground: oklch(0.2437 0.0179 55.4008);
    --popover: oklch(0.9858 0.0085 84.5723);
    --popover-foreground: oklch(0.2437 0.0179 55.4008);
    --primary: oklch(0.4559 0.0756 55.5364);
    --primary-foreground: oklch(0.9743 0.0102 81.7952);
    --secondary: oklch(0.9100 0.0247 71.4550);
    --secondary-foreground: oklch(0.3196 0.0355 55.4442);
    --muted: oklch(0.9249 0.0183 78.2381);
    --muted-foreground: oklch(0.4992 0.0249 60.3482);
    --accent: oklch(0.8739 0.0392 66.0191);
    --accent-foreground: oklch(0.3002 0.0399 51.2561);
    --destructive: oklch(0.5599 0.1895 26.9761);
    --destructive-foreground: oklch(0.9791 0 0);
    --border: oklch(0.8548 0.0251 71.4319);
    --input: oklch(0.8548 0.0251 71.4319);
    --ring: oklch(0.5315 0.0704 58.4717);
    --chart-1: oklch(0.4888 0.0797 54.2277);
    --chart-2: oklch(0.5990 0.0750 69.7754);
    --chart-3: oklch(0.7005 0.0699 82.7894);
    --chart-4: oklch(0.5595 0.0644 42.6802);
    --chart-5: oklch(0.7600 0.0556 89.4818);
    --sidebar: oklch(0.9456 0.0165 79.3506);
    --sidebar-foreground: oklch(0.2655 0.0198 56.7194);
    --sidebar-primary: oklch(0.4559 0.0756 55.5364);
    --sidebar-primary-foreground: oklch(0.9743 0.0102 81.7952);
    --sidebar-accent: oklch(0.8898 0.0283 70.9177);
    --sidebar-accent-foreground: oklch(0.3002 0.0352 53.2291);
    --sidebar-border: oklch(0.8455 0.0251 71.4276);
    --sidebar-ring: oklch(0.5315 0.0704 58.4717);

    --font-sans: Geist, ui-sans-serif, sans-serif, system-ui;
    --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --radius: 0.625rem;
    --radius-sm: calc(var(--radius) - 4px);
    --radius-md: calc(var(--radius) - 2px);
    --radius-lg: var(--radius);
    --radius-xl: calc(var(--radius) + 4px);
    --radius-pill: var(--radius);
    --shadow-2xs: 0 1px 30px 0 hsl(0 0% 76.8627% / 0.23);
    --shadow-xs: 0 1px 30px 0 hsl(0 0% 76.8627% / 0.23);
    --shadow-sm: 0 1px 30px 0 hsl(0 0% 76.8627% / 0.45), 0 1px 2px -1px hsl(0 0% 76.8627% / 0.45);
    --shadow: 0 1px 30px 0 hsl(0 0% 76.8627% / 0.45), 0 1px 2px -1px hsl(0 0% 76.8627% / 0.45);
    --shadow-md: 0 1px 30px 0 hsl(0 0% 76.8627% / 0.45), 0 2px 4px -1px hsl(0 0% 76.8627% / 0.45);
    --shadow-lg: 0 1px 30px 0 hsl(0 0% 76.8627% / 0.45), 0 4px 6px -1px hsl(0 0% 76.8627% / 0.45);
    --shadow-xl: 0 1px 30px 0 hsl(0 0% 76.8627% / 0.45), 0 8px 10px -1px hsl(0 0% 76.8627% / 0.45);
    --shadow-2xl: 0 1px 30px 0 hsl(0 0% 76.8627% / 1);
    --tracking-normal: 0.075em;

    /* Compatibility aliases used throughout the current theme. */
    --font-family: var(--font-sans);
    --color-primary: var(--primary);
    --color-primary-hover: color-mix(in oklch, var(--primary) 84%, black);
    --color-primary-light: var(--secondary);
    --color-on-primary: var(--primary-foreground);
    --color-hero-accent: var(--chart-2);
    --color-hero-bg: var(--sidebar-foreground);
    --color-text-primary: var(--foreground);
    --color-text-secondary: var(--secondary-foreground);
    --color-text-muted: var(--muted-foreground);
    --color-bg: var(--card);
    --color-bg-secondary: var(--background);
    --color-bg-tertiary: var(--muted);
    --color-border: var(--border);
    --color-border-light: color-mix(in oklch, var(--border) 58%, var(--card));
    --color-danger: var(--destructive);
    --color-on-danger: var(--destructive-foreground);
    --color-warning: var(--chart-4);
    --color-rating: var(--chart-3);
    --color-input-bg: var(--card);
    --color-input-border: var(--input);
    --color-input-focus-ring: color-mix(in oklch, var(--ring) 35%, transparent);
    --color-select-indicator: var(--muted-foreground);
    --color-badge-primary-bg: var(--secondary);
    --color-badge-primary-text: var(--primary);
    --color-banner-bg: var(--background);
    --color-banner-text: var(--foreground);
    --color-banner-text-muted: var(--muted-foreground);
    --color-banner-card-bg: var(--card);
    --color-banner-shell-border: var(--border);
    --color-banner-cover-border: var(--border);
    --color-banner-card-active-border: var(--primary);
    --color-footer-bg: var(--sidebar-foreground);
}

.dark,
html[data-theme="dark"] {
    --background: oklch(0.2051 0.0187 55.1182);
    --foreground: oklch(0.8945 0.0184 78.2341);
    --card: oklch(0.2363 0.0204 56.5252);
    --card-foreground: oklch(0.8945 0.0184 78.2341);
    --popover: oklch(0.2363 0.0204 56.5252);
    --popover-foreground: oklch(0.8945 0.0184 78.2341);
    --primary: oklch(0.6900 0.0745 64.6851);
    --primary-foreground: oklch(0.2010 0.0178 50.4028);
    --secondary: oklch(0.2891 0.0251 56.2135);
    --secondary-foreground: oklch(0.8702 0.0174 76.0979);
    --muted: oklch(0.2696 0.0197 56.7422);
    --muted-foreground: oklch(0.6693 0.0217 69.8640);
    --accent: oklch(0.3413 0.0348 59.1323);
    --accent-foreground: oklch(0.9103 0.0200 77.3092);
    --destructive: oklch(0.6302 0.1697 26.8726);
    --destructive-foreground: oklch(0.9791 0 0);
    --border: oklch(0.3400 0.0252 59.3595);
    --input: oklch(0.3400 0.0252 59.3595);
    --ring: oklch(0.6393 0.0650 64.6054);
    --chart-1: oklch(0.6803 0.0747 64.6373);
    --chart-2: oklch(0.6088 0.0648 76.8689);
    --chart-3: oklch(0.5406 0.0544 50.9481);
    --chart-4: oklch(0.7389 0.0591 84.3911);
    --chart-5: oklch(0.5805 0.0701 38.1547);
    --sidebar: oklch(0.1863 0.0167 53.4250);
    --sidebar-foreground: oklch(0.8761 0.0185 78.2315);
    --sidebar-primary: oklch(0.6900 0.0745 64.6851);
    --sidebar-primary-foreground: oklch(0.2010 0.0178 50.4028);
    --sidebar-accent: oklch(0.2861 0.0274 56.9079);
    --sidebar-accent-foreground: oklch(0.9006 0.0184 78.2350);
    --sidebar-border: oklch(0.3208 0.0245 56.3891);
    --sidebar-ring: oklch(0.6393 0.0650 64.6054);
    --radius: 1.875rem;
    --shadow-2xs: 0 1px 30px 0 hsl(0 0% 0% / 0.23);
    --shadow-xs: 0 1px 30px 0 hsl(0 0% 0% / 0.23);
    --shadow-sm: 0 1px 30px 0 hsl(0 0% 0% / 0.45), 0 1px 2px -1px hsl(0 0% 0% / 0.45);
    --shadow: 0 1px 30px 0 hsl(0 0% 0% / 0.45), 0 1px 2px -1px hsl(0 0% 0% / 0.45);
    --shadow-md: 0 1px 30px 0 hsl(0 0% 0% / 0.45), 0 2px 4px -1px hsl(0 0% 0% / 0.45);
    --shadow-lg: 0 1px 30px 0 hsl(0 0% 0% / 0.45), 0 4px 6px -1px hsl(0 0% 0% / 0.45);
    --shadow-xl: 0 1px 30px 0 hsl(0 0% 0% / 0.45), 0 8px 10px -1px hsl(0 0% 0% / 0.45);
    --shadow-2xl: 0 1px 30px 0 hsl(0 0% 0% / 1);
    --color-primary-hover: color-mix(in oklch, var(--primary) 84%, white);
    --color-footer-bg: var(--sidebar);
}

body {
    background-color: var(--background);
    color: var(--foreground);
    font-family: var(--font-sans);
    letter-spacing: var(--tracking-normal);
}

/* ===== Daily check-in ===== */
body.daily-checkin-open {
    overflow: hidden;
}

body.topup-open {
    overflow: hidden;
}

.daily-checkin-modal {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: var(--color-overlay);
}

.daily-checkin-modal[hidden] {
    display: none;
}

.daily-checkin-card {
    width: min(100%, 42rem);
    max-height: min(46rem, calc(100dvh - 2rem));
    overflow: auto;
    padding: clamp(1rem, 3vw, 1.5rem);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--card);
    color: var(--foreground);
    box-shadow: var(--shadow-xl);
    animation: daily-checkin-enter 180ms ease-out;
}

.daily-checkin-card > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.daily-checkin-card h2 {
    margin: 0;
    font-size: clamp(1.125rem, 3vw, 1.375rem);
}

.daily-checkin-card header p,
.daily-checkin-streak {
    margin: .25rem 0 0;
    color: var(--muted-foreground);
    font-size: .875rem;
}

.daily-checkin-streak {
    padding: .7rem .8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--muted);
    color: var(--foreground);
}

.daily-checkin-close {
    display: grid;
    width: 2.5rem;
    height: 2.5rem;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--card);
    color: var(--foreground);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.daily-checkin-close:hover,
.daily-checkin-close:focus-visible {
    background: var(--accent);
}

.daily-checkin-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: .55rem;
    margin: 1rem 0;
}

.daily-checkin-day {
    position: relative;
    display: flex;
    min-height: 8.9rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: .65rem .25rem;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
    color: var(--foreground);
    text-align: center;
}

.daily-checkin-day strong {
    font-size: .8rem;
}

.daily-checkin-day > span {
    color: var(--muted-foreground);
    font-size: .74rem;
}

.daily-checkin-day small {
    min-height: 1.5rem;
    color: var(--muted-foreground);
    font-size: .68rem;
    line-height: 1.2;
}

.daily-checkin-day > b {
    display: grid;
    width: 2.25rem;
    height: 2.25rem;
    place-items: center;
    border-radius: 999px;
    background: var(--primary);
    color: var(--primary-foreground);
    font-size: 1.35rem;
    line-height: 1;
}

.daily-checkin-day.is-current {
    border-color: var(--primary);
    background: var(--secondary);
    box-shadow: inset 0 0 0 1px var(--primary);
}

.daily-checkin-day.is-current > span,
.daily-checkin-day.is-current small {
    color: var(--foreground);
    font-weight: 600;
}

.daily-checkin-day.is-complete {
    border-color: var(--primary);
}

.daily-checkin-day.is-locked {
    opacity: .62;
}

.daily-checkin-day:nth-child(7) {
    border-color: var(--chart-4);
}

.daily-checkin-day.is-stamping > b {
    animation: daily-checkin-stamp 460ms cubic-bezier(.2, 1.45, .45, 1) both;
}

.daily-checkin-submit {
    width: 100%;
    min-height: 2.75rem;
    border: 0;
    border-radius: var(--radius-md);
    background: var(--primary);
    color: var(--primary-foreground);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.daily-checkin-submit:hover:not(:disabled),
.daily-checkin-submit:focus-visible:not(:disabled) {
    background: var(--color-primary-hover);
}

.daily-checkin-submit:disabled {
    cursor: not-allowed;
    opacity: .72;
}

.daily-checkin-toast {
    position: fixed;
    z-index: 5100;
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    max-width: min(24rem, calc(100vw - 2rem));
    padding: .8rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--card);
    color: var(--foreground);
    box-shadow: var(--shadow-lg);
    font-weight: 700;
}

.daily-checkin-toast.is-error {
    border-color: var(--destructive);
    color: var(--destructive);
}

.topup-card > header small {
    color: var(--muted-foreground);
    font-size: .75rem;
}

.topup-packages {
    display: grid;
    gap: .55rem;
    margin: 1rem 0;
}

.topup-package {
    align-items: center;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--foreground);
    cursor: pointer;
    display: flex;
    font: inherit;
    gap: 1rem;
    justify-content: space-between;
    min-height: 4.1rem;
    padding: .7rem .9rem;
    text-align: left;
    width: 100%;
}

.topup-package:hover,
.topup-package:focus-visible,
.topup-package.is-selected {
    border-color: var(--primary);
    background: var(--secondary);
}

.topup-package:disabled {
    cursor: not-allowed;
    opacity: .65;
}

.topup-package-icon {
    align-items: center;
    background: var(--secondary);
    border-radius: var(--radius-md);
    color: var(--primary);
    display: inline-flex;
    flex: 0 0 2.25rem;
    height: 2.25rem;
    justify-content: center;
}

.topup-package-icon .hdk-icon {
    height: 1.1rem;
    width: 1.1rem;
}

.topup-package.is-selected .topup-package-icon {
    background: var(--primary);
    color: var(--primary-foreground);
}

.topup-package-copy {
    display: grid;
    flex: 1 1 auto;
    gap: .2rem;
    min-width: 0;
}

.topup-package strong {
    font-size: .875rem;
}

.topup-package small {
    color: var(--muted-foreground);
    font-size: .75rem;
}

.topup-package > b {
    flex: 0 0 auto;
    font-size: .875rem;
}

.topup-message {
    color: var(--muted-foreground);
    font-size: .8rem;
    margin: .75rem 0 0;
    text-align: center;
}

body.payment-open {
    overflow: hidden;
}

.payment-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: var(--color-overlay);
    animation: payment-overlay-in 220ms ease-out both;
}

.payment-modal[hidden],
.payment-lightbox[hidden] {
    display: none;
}

.payment-dialog {
    box-sizing: border-box;
    width: min(100%, 760px);
    max-height: min(90vh, 90dvh);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 16px;
    background: var(--color-bg);
    color: var(--color-text-primary);
    font-family: var(--font-family);
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: payment-dialog-in 220ms ease-out both;
}

.payment-dialog-content {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 42px clamp(20px, 5vw, 48px) 8px;
}

.payment-dialog h2 {
    margin: 0 0 26px;
    color: var(--color-text-primary);
    font-family: var(--font-family);
    font-size: clamp(32px, 5vw, 46px);
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.12;
}

.payment-qr-card {
    display: grid;
    justify-items: center;
    gap: 8px;
    width: min(100%, 350px);
    margin: 0 auto;
    padding: 16px 18px 18px;
    border: 1px solid var(--color-border-light);
    border-radius: 14px;
    background: var(--color-bg);
    box-shadow: var(--shadow-sm);
}

.payment-vietqr-logo {
    color: var(--color-text-primary);
    font-size: 23px;
    font-weight: 850;
    letter-spacing: -.05em;
    line-height: 1;
}

.payment-vietqr-logo span {
    color: var(--color-primary);
}

.payment-qr-button {
    display: grid;
    place-items: center;
    width: min(100%, 280px);
    padding: 0;
    border: 0;
    background: var(--color-bg);
    cursor: zoom-in;
}

.payment-qr-button img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
}

.payment-bank-logo {
    display: grid;
    min-width: 48px;
    min-height: 30px;
    place-items: center;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
}

.payment-qr-card > strong {
    font-size: 17px;
    font-weight: 800;
}

.payment-qr-card > span {
    color: var(--color-text-secondary);
    font-size: 15px;
    font-weight: 650;
}

.payment-qr-card > b {
    color: var(--color-text-primary);
    font-size: 15px;
    font-weight: 750;
}

.payment-qr-hint {
    margin: 12px 0 24px;
    color: var(--color-text-muted);
    font-size: 14px;
}

.payment-warning {
    max-width: 560px;
    margin: 0 auto 18px;
    padding: 15px;
    border-radius: 10px;
    background: var(--color-badge-warning-bg);
    color: var(--color-badge-warning-text);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
}

.payment-info-card {
    max-width: 560px;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid var(--color-border-light);
    border-radius: 14px;
    background: var(--color-bg);
    text-align: left;
}

.payment-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 54px;
    padding: 11px 18px;
    border-bottom: 1px solid var(--color-border-light);
    font-size: 16px;
}

.payment-info-row:last-child {
    border-bottom: 0;
}

.payment-info-row > span {
    flex: 0 0 auto;
    color: var(--color-text-secondary);
}

.payment-info-row strong {
    min-width: 0;
    color: var(--color-text-primary);
    font-weight: 750;
    overflow-wrap: anywhere;
    text-align: right;
}

.payment-info-row .payment-accent {
    color: var(--color-primary);
}

.payment-info-countdown {
    background: var(--color-primary-light);
}

.payment-info-countdown strong {
    font-size: 25px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.payment-info-transfer em,
.payment-note em {
    color: var(--color-danger);
    font-style: normal;
    font-weight: 800;
}

.payment-info-transfer > div {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
}

.payment-info-transfer button {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 6px 14px;
    border: 0;
    border-radius: 8px;
    background: var(--color-primary);
    color: var(--color-on-primary);
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
}

.payment-info-transfer button:hover,
.payment-info-transfer button:focus-visible {
    background: var(--color-primary-hover);
}

.payment-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 22px 0 8px;
    color: var(--color-text-muted);
    font-size: 18px;
    font-weight: 650;
}

.payment-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid var(--color-primary-light);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: payment-spin 800ms linear infinite;
}

.payment-spinner[hidden] {
    display: none;
}

.payment-note {
    margin: 0 auto 8px;
    color: var(--color-text-muted);
    font-size: 14px;
    line-height: 1.45;
}

.payment-policy {
    display: grid;
    gap: 3px;
    max-width: 560px;
    margin: 18px auto 14px;
    color: var(--color-text-secondary);
    font-size: 12px;
    line-height: 1.4;
}

.payment-close {
    display: block;
    width: 150px;
    height: 70px;
    margin: 0 auto;
    border: 0;
    border-radius: 8px;
    background: var(--color-primary);
    color: var(--color-on-primary);
    cursor: pointer;
    font: inherit;
    font-size: 24px;
    font-weight: 700;
}

.payment-actions {
    flex: 0 0 auto;
    padding: 12px 20px 18px;
    border-top: 1px solid var(--color-border-light);
    background: var(--color-bg);
}

.payment-close:hover,
.payment-close:focus-visible {
    background: var(--color-primary-hover);
}

.payment-lightbox {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, .85);
}

.payment-lightbox > button {
    position: absolute;
    top: 20px;
    right: 20px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: var(--color-bg);
    color: var(--color-text-primary);
    cursor: pointer;
    font-size: 30px;
}

.payment-lightbox img {
    display: block;
    max-width: min(90vw, 700px);
    max-height: 85dvh;
    border-radius: 12px;
    background: var(--color-bg);
    object-fit: contain;
}

.payment-modal.is-expired .payment-qr-button {
    cursor: not-allowed;
    opacity: .38;
}

@keyframes payment-overlay-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes payment-dialog-in {
    from { opacity: 0; transform: scale(.96); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes payment-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 600px) {
    .payment-modal { padding: 12px; }
    .payment-dialog {
        width: calc(100vw - 24px);
        max-width: 420px;
        max-height: calc(100dvh - 24px);
    }
    .payment-dialog-content { padding: 12px 14px 4px; }
    .payment-dialog h2 { margin-bottom: 8px; font-size: clamp(24px, 7vw, 30px); }
    .payment-qr-card {
        grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
        grid-template-rows: repeat(4, auto);
        column-gap: 8px;
        row-gap: 3px;
        align-items: center;
        padding: 9px;
    }
    .payment-vietqr-logo { grid-column: 1; grid-row: 1; font-size: 17px; }
    .payment-qr-button { grid-column: 1; grid-row: 2 / 5; width: 100%; }
    .payment-bank-logo { grid-column: 2; grid-row: 1; min-height: 22px; font-size: 13px; }
    .payment-qr-card > strong { grid-column: 2; grid-row: 2; font-size: 13px; }
    .payment-qr-card > span { grid-column: 2; grid-row: 3; }
    .payment-qr-card > b { grid-column: 2; grid-row: 4; }
    .payment-qr-card > span,
    .payment-qr-card > b { font-size: 12px; }
    .payment-qr-card > strong,
    .payment-qr-card > span,
    .payment-qr-card > b { min-width: 0; overflow-wrap: anywhere; }
    .payment-qr-hint { margin: 2px 0 6px; font-size: 11px; }
    .payment-warning { margin-bottom: 5px; padding: 8px; font-size: 12px; }
    .payment-info-row { gap: 8px; min-height: 32px; padding: 4px 10px; font-size: 12px; }
    .payment-info-row > span { flex-basis: 38%; }
    .payment-info-transfer > div { flex: 1 1 auto; flex-wrap: wrap; }
    .payment-info-transfer strong { flex: 1 1 100%; }
    .payment-info-transfer button { min-height: 30px; margin-left: auto; padding: 4px 10px; font-size: 12px; }
    .payment-info-countdown strong { font-size: 18px; }
    .payment-status { margin: 6px 0 4px; font-size: 14px; }
    .payment-spinner { width: 15px; height: 15px; border-width: 2px; }
    .payment-note { font-size: 11px; }
    .payment-policy { gap: 2px; margin: 8px auto 4px; font-size: 10px; }
    .payment-actions { padding: 7px 14px 10px; }
    .payment-close { width: 128px; height: 42px; font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
    .payment-modal,
    .payment-dialog,
    .payment-spinner { animation: none; }
}

.account-wallet-payment-notice {
    background: color-mix(in srgb, var(--color-warning) 12%, var(--card));
    border: 1px solid color-mix(in srgb, var(--color-warning) 46%, var(--border));
    border-radius: var(--radius-md);
    color: var(--foreground);
    display: grid;
    font-size: .75rem;
    gap: .35rem;
    line-height: 1.45;
    margin: 0;
    padding: .75rem .85rem;
}

.account-wallet-payment-notice strong {
    color: var(--foreground);
}

.account-wallet-payment-notice span {
    color: var(--muted-foreground);
}

@keyframes daily-checkin-enter {
    from { opacity: 0; transform: translateY(.5rem) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes daily-checkin-stamp {
    0% { opacity: 0; transform: scale(0); }
    68% { opacity: 1; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

@media (max-width: 680px) {
    .daily-checkin-modal {
        align-items: center;
        padding: .5rem;
    }

    .daily-checkin-card {
        width: 100%;
        max-height: min(43rem, calc(100dvh - 1rem));
        border-radius: var(--radius-xl);
    }

    .daily-checkin-days {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .daily-checkin-day {
        min-height: 7.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .daily-checkin-card,
    .daily-checkin-day.is-stamping > b {
        animation: none;
    }
}


/* Reader-only themes must also recolor the inner chapter wrapper. */
.reader-theme-dark #chapter-content {
    background: oklch(0.2051 0.0187 55.1182) !important;
    color: oklch(0.8945 0.0184 78.2341) !important;
}

.reader-theme-dark #chapter-content .chapter-body-text,
.reader-theme-dark #chapter-content .chapter-body-text :where(p, span, div, li, blockquote) {
    color: inherit !important;
}

.reader-theme-sepia #chapter-content {
    background: #f4ecd8 !important;
    color: #5b4636 !important;
}

.reader-theme-sepia #chapter-content .chapter-body-text,
.reader-theme-sepia #chapter-content .chapter-body-text :where(p, span, div, li, blockquote) {
    color: inherit !important;
}

/* ===== Chapter reader typography and controls ===== */
.reader-heading {
    margin: 4px auto 22px;
    max-width: 980px;
    text-align: center;
}
.reader-story-link {
    align-items: center;
    color: var(--primary);
    display: inline-flex;
    font-size: var(--font-size-sm);
    font-weight: 750;
    gap: 5px;
    margin-bottom: 10px;
}
.reader-story-link .hdk-icon { height: 16px; width: 16px; }
.reader-heading .reader-title {
    color: var(--foreground);
    font-size: clamp(1.4rem, 2.6vw, 2.15rem);
    letter-spacing: -.025em;
    margin: 0;
    overflow-wrap: anywhere;
}
.reader-heading-meta {
    align-items: center;
    color: var(--muted-foreground);
    display: flex;
    flex-wrap: wrap;
    font-size: var(--font-size-xs);
    gap: 8px;
    justify-content: center;
    margin-top: 9px;
}
.reader-heading-meta span { align-items: center; display: inline-flex; gap: 5px; }

.reader-chapter-nav {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 420px) minmax(0, 1fr);
    margin: 0 auto 14px;
    max-width: 980px;
}
.reader-chapter-nav-btn,
.reader-chapter-select-wrap {
    align-items: center;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--foreground);
    display: inline-flex;
    font: inherit;
    font-size: var(--font-size-xs);
    font-weight: 750;
    gap: 7px;
    min-height: 46px;
}
.reader-chapter-nav-btn {
    justify-content: center;
    padding: 8px 14px;
}
.reader-chapter-nav-btn:first-child { justify-self: end; }
.reader-chapter-nav-btn.is-next { justify-self: start; }
.reader-chapter-nav-btn:hover,
.reader-chapter-list-trigger:hover {
    background: var(--accent);
    color: var(--accent-foreground);
}
.reader-chapter-nav-btn.is-disabled {
    cursor: not-allowed;
    opacity: .42;
}
.reader-chapter-nav-btn .hdk-icon,
.reader-chapter-select-wrap > .hdk-icon { height: 17px; width: 17px; }
.reader-chapter-select-wrap {
    min-width: 0;
    padding-left: 12px;
    position: relative;
}
.reader-chapter-select-wrap select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: transparent;
    background-image: none;
    border: 0;
    color: var(--foreground);
    cursor: pointer;
    flex: 1;
    font: inherit;
    min-height: 44px;
    min-width: 0;
    outline: 0;
    padding: 0 34px 0 0;
    text-align: center;
    text-overflow: ellipsis;
}
/* The global dark-select indicator is intended for native selects. This
   reader select already draws its own chevron, so retain one arrow and keep
   the native option popup readable in Dark Mode. */
html[data-theme="dark"] .reader-chapter-select-wrap select {
    background-image: none;
    background-color: transparent;
    color: var(--foreground);
}
.reader-chapter-select-wrap select option {
    background-color: var(--card);
    color: var(--foreground);
}
.reader-chapter-select-wrap::after {
    border-bottom: 2px solid currentColor;
    border-right: 2px solid currentColor;
    content: "";
    height: 7px;
    pointer-events: none;
    position: absolute;
    right: 14px;
    top: 17px;
    transform: rotate(45deg);
    width: 7px;
}

.reader-content {
    color: var(--foreground);
    font-family: "Literata", "Noto Serif", "Times New Roman", serif;
    font-size: 1.125rem;
    letter-spacing: 0.005em;
    line-height: 1.8;
    margin-inline: auto;
    max-width: 1400px;
}

.reader-content p {
    margin-bottom: 1.35em;
}

.reader-chapter-nav-bottom {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.reader-chapter-list-trigger { cursor: pointer; width: 100%; }

.reader-comments {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 4px);
    margin: 0 auto;
    max-width: 1040px;
    padding: 24px;
}
.reader-comments-header {
    align-items: end;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 16px;
}
.reader-comments-header > div > span {
    color: var(--muted-foreground);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.reader-comments-header h2 { font-size: 1.25rem; margin: 2px 0 0; }
.reader-comments-header h2 small { color: var(--muted-foreground); font-size: .72em; }
.reader-comment-filters { display: flex; gap: 5px; }
.reader-comment-filters a {
    border-radius: 999px;
    color: var(--muted-foreground);
    font-size: 11px;
    font-weight: 750;
    padding: 7px 10px;
}
.reader-comment-filters a:hover,
.reader-comment-filters a.is-active { background: var(--accent); color: var(--accent-foreground); }
.reader-comment-form {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 18px;
    overflow: hidden;
}
.reader-comment-form textarea {
    background: transparent;
    border: 0;
    color: var(--foreground);
    display: block;
    font: inherit;
    font-size: 13px;
    min-height: 108px;
    outline: 0;
    padding: 14px;
    resize: vertical;
    width: 100%;
}
.reader-comment-form > div:last-child {
    align-items: center;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 8px;
}
.reader-comment-form small { color: var(--muted-foreground); font-size: 10px; padding-left: 5px; }
.reader-comment-form button[type="submit"],
.reader-comment-login > a {
    align-items: center;
    background: var(--primary);
    border: 0;
    border-radius: var(--radius-sm);
    color: var(--primary-foreground);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    gap: 6px;
    min-height: 40px;
    padding: 8px 13px;
}
.reader-comment-replying {
    align-items: center;
    background: var(--muted);
    color: var(--muted-foreground);
    display: flex;
    font-size: 11px;
    gap: 5px;
    padding: 8px 12px;
}
.reader-comment-replying[hidden] { display: none; }
.reader-comment-replying button { background: transparent; border: 0; color: var(--primary); cursor: pointer; font: inherit; margin-left: auto; }
.reader-comment-login {
    align-items: center;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    padding: 14px;
}
.reader-comment-login > .hdk-icon { color: var(--primary); height: 24px; width: 24px; }
.reader-comment-login p { display: grid; flex: 1; gap: 2px; margin: 0; }
.reader-comment-login p strong { font-size: 12px; }
.reader-comment-login p span { color: var(--muted-foreground); font-size: 10px; }
.reader-comment-card { display: flex; gap: 12px; padding: 16px 0; }
.reader-comment-card + .reader-comment-card { border-top: 1px solid var(--border); }
.reader-comment-card > img {
    border: 1px solid var(--border);
    border-radius: 50%;
    flex: 0 0 42px;
    height: 42px;
    object-fit: cover;
    width: 42px;
}
.reader-comment-body { min-width: 0; flex: 1; }
.reader-comment-body > header { align-items: baseline; display: flex; flex-wrap: wrap; gap: 8px; }
.reader-comment-body > header strong { font-size: 12px; }
.reader-comment-body > header time { color: var(--muted-foreground); font-size: 10px; }
.reader-comment-body > p { color: var(--foreground); font-size: 13px; line-height: 1.7; margin: 6px 0 8px; overflow-wrap: anywhere; }
.reader-comment-body > footer { display: flex; gap: 8px; }
.reader-comment-body > footer button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: var(--muted-foreground);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 10px;
    font-weight: 750;
    gap: 4px;
    min-height: 32px;
    padding: 5px 7px;
}
.reader-comment-body > footer button:hover,
.reader-comment-body > footer button.is-liked { background: var(--accent); color: var(--primary); }
.reader-comment-body > footer button.is-liked .hdk-icon { fill: currentColor; }
.reader-comment-replies { border-left: 2px solid var(--border); margin-top: 8px; padding-left: 14px; }
.reader-comment-card.is-reply { padding: 12px 0 4px; }
.reader-comment-card.is-reply > img { flex-basis: 34px; height: 34px; width: 34px; }
.reader-comments-empty { align-items: center; color: var(--muted-foreground); display: flex; flex-direction: column; gap: 5px; padding: 34px 12px; text-align: center; }
.reader-comments-empty .hdk-icon { height: 28px; width: 28px; }
.reader-comments-empty strong { color: var(--foreground); font-size: 13px; }
.reader-comments-empty span { font-size: 11px; }
.reader-comment-pagination { display: flex; gap: 6px; justify-content: center; margin-top: 16px; }
.reader-comment-pagination a { align-items: center; border: 1px solid var(--border); border-radius: 9px; color: var(--foreground); display: inline-flex; font-size: 11px; height: 36px; justify-content: center; width: 36px; }
.reader-comment-pagination a.is-active { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }

.reader-title {
    font-family: "Be Vietnam Pro", system-ui, sans-serif;
    font-weight: 650;
    line-height: 1.35;
}

.reader-toolbar {
    backdrop-filter: blur(12px);
    background: color-mix(in oklch, var(--card) 94%, transparent);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.reader-navigation {
    align-items: center;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    margin: 3rem auto 1rem;
    max-width: 760px;
    padding-top: 1.5rem;
}

.reader-navigation-top {
    margin-top: 0;
}

.reader-navigation-bottom .btn-primary:last-child {
    margin-left: auto;
}

.reader-action-wrapper {
    background: color-mix(in oklch, var(--card) 96%, transparent);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: grid;
    gap: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 760px;
    overflow: hidden;
    width: 100%;
}
.reader-end-action-bar { margin: 20px auto 10px; }
.reader-chapter-nav-bottom { margin: 0 auto 28px; }
.reader-action-wrapper > button,
.reader-action-wrapper > a,
.reader-action-wrapper > .reader-chapter-nav-btn {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 0;
    border-right: 1px solid var(--border);
    color: var(--muted-foreground);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: var(--font-size-xs);
    font-weight: 700;
    gap: 7px;
    justify-content: center;
    min-height: 50px;
    padding: 9px 12px;
    transition: background-color .16s, color .16s;
    width: 100%;
}
.reader-action-wrapper > :last-child { border-right: 0; }
.reader-action-wrapper > :not(.is-disabled):hover,
.reader-action-wrapper > :not(.is-disabled):focus-visible {
    background: var(--secondary);
    color: var(--primary);
}
.reader-action-wrapper > :focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: -3px;
}
.reader-action-wrapper .hdk-icon {
    height: 18px;
    width: 18px;
}

/* ===== Story Card Image Wrap & Views Overlay (all cards) ===== */
.story-card .card-img-wrap {
    position: relative;
    overflow: hidden;
}
.story-card .card-img-wrap .card-img {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    object-position: center;
}
.card-views-overlay {
    position: absolute;
    bottom: 6px;
    right: 6px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(0, 0, 0, 0.58);
    color: #fff;
    font-size: var(--font-size-xs);
    font-weight: 600;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    line-height: 1;
    pointer-events: none;
    z-index: 1;
}
.card-views-overlay .hdk-icon {
    font-size: 11px;
    flex-shrink: 0;
}
@media (max-width: 768px) {
    .card-views-overlay {
        bottom: 4px;
        right: 4px;
        padding: 2px 5px;
        font-size: 10px;
    }
}

/* ===== Compact Story Card (Marquee Carousel) ===== */
.story-card-compact .card-img-wrap {
    aspect-ratio: 2 / 3;
    width: 100%;
}
.story-card-compact .card-img-wrap .card-img {
    position: absolute;
    inset: 0;
    height: 100%;
}
.story-card-compact .card-body {
    padding: 8px 10px 10px;
}
.story-card-compact .card-title {
    font-size: var(--font-size-xs);
    -webkit-line-clamp: 2;
    margin-bottom: 6px;
}
.card-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: nowrap;
    min-width: 0;
}
.story-card-status .badge {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    padding: 2px 8px;
    font-size: 10px;
    line-height: 1;
    white-space: nowrap;
}
.story-card-chapters {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}
.story-card-chapters .hdk-icon {
    font-size: 12px;
    flex-shrink: 0;
}
@media (max-width: 768px) {
    .story-card-compact .card-body {
        padding: 6px 8px 8px;
    }
}

.badge {
    display: inline-flex; align-items: center;
    padding: 4px 12px; border-radius: var(--radius-full);
    font-size: var(--font-size-xs); font-weight: 600;
    min-height: 24px;
}
.badge-primary { background: var(--color-badge-primary-bg); color: var(--color-badge-primary-text); }
.badge-success { background: var(--color-badge-success-bg); color: var(--color-badge-success-text); }
.badge-warning { background: var(--color-badge-warning-bg); color: var(--color-badge-warning-text); }
.badge-danger { background: var(--color-badge-danger-bg); color: var(--color-badge-danger-text); }

/* ===== Category Grid & Cards ===== */
.category-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 24px 16px 20px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--color-text-primary);
    transition: transform 0.3s var(--motion-ease-out), box-shadow 0.3s var(--motion-ease-out), border-color 0.3s, background 0.3s;
    position: relative;
    overflow: hidden;
}
.category-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--color-primary-light), transparent 60%);
    opacity: 0;
    transition: opacity 0.35s var(--motion-ease-out);
    z-index: 0;
}
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 1px 8px 24px -6px rgba(96,28,28,0.18);
    border-color: var(--color-primary);
}
.category-card:hover::before {
    opacity: 1;
}
.category-card-icon {
    font-size: 36px;
    line-height: 1;
    position: relative;
    z-index: 1;
    transition: transform 0.3s var(--motion-ease-out);
}
.category-card:hover .category-card-icon {
    transform: scale(1.15);
}
.category-card-content {
    position: relative;
    z-index: 1;
}
.category-card-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--color-text-primary);
}
.category-card-desc {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.category-card-count {
    display: inline-block;
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--color-badge-primary-text);
    background: var(--color-badge-primary-bg);
    padding: 3px 10px;
    border-radius: var(--radius-full);
}

@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    .category-card {
        padding: 18px 12px 16px;
        gap: 8px;
    }
    .category-card-icon {
        font-size: 28px;
    }
}

.section { padding: 40px 0; }
.section:nth-child(even) {
    background: var(--color-bg);
    border-top: 1px solid var(--color-border-light);
    border-bottom: 1px solid var(--color-border-light);
}

input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    background: var(--color-input-bg);
    border: 2px solid var(--color-input-border);
    border-radius: var(--radius-pill);
    color: var(--color-text-primary);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    min-height: var(--touch-target);
    max-width: 100%;
    min-width: 0;
    padding: 10px 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
textarea {
    width: 100%;
    border-radius: var(--radius-md);
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-input-focus-ring);
}
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23817089' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-position: right 14px center;
    background-repeat: no-repeat;
    padding-right: 36px;
}
::placeholder { color: var(--color-text-muted); opacity: 1; }
.section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
body.home .section-header,
body.front-page .section-header {
    margin-left: calc(50% - 50vw + 64px);
    margin-right: calc(50% - 50vw + 64px);
    width: calc(100vw - 128px);
}
@media (max-width: 1024px) {
    body.home .section-header,
    body.front-page .section-header {
        margin-left: calc(50% - 50vw + 32px);
        margin-right: calc(50% - 50vw + 32px);
        width: calc(100vw - 64px);
    }
}
@media (max-width: 768px) {
    body.home .section-header,
    body.front-page .section-header {
        margin-left: calc(50% - 50vw + 12px);
        margin-right: calc(50% - 50vw + 12px);
        width: calc(100vw - 24px);
    }
}
@media (max-width: 375px) {
    body.home .section-header,
    body.front-page .section-header {
        margin-left: calc(50% - 50vw + 8px);
        margin-right: calc(50% - 50vw + 8px);
        width: calc(100vw - 16px);
    }
}
.section-title {
    font-size: var(--font-size-xl); font-weight: 700;
    color: var(--color-text-primary);
    position: relative;
    padding-left: 16px;
}
.section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    border-radius: 2px;
    background: var(--color-primary);
}

.hdk-icon {
    width: 1em;
    height: 1em;
    stroke: currentColor;
    vertical-align: -0.125em;
    flex-shrink: 0;
    display: inline-block;
}
.hdk-icon-btn {
    font-size: 1.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.hdk-icon-bottom-nav {
    font-size: 20px;
    line-height: 1;
}
.hdk-icon-check {
    color: var(--color-success);
}
.hdk-icon-filled {
    fill: currentColor;
}
.hdk-icon-star-filled {
    color: var(--color-star, #f5a623);
}

/* Avatar Upload */
.hdk-avatar-upload {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.hdk-avatar-preview {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--color-bg-secondary);
    border: 2px dashed var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.hdk-avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hdk-avatar-preview.has-preview {
    border-style: solid;
    border-color: var(--color-primary);
}
.hdk-avatar-dropzone {
    flex: 1;
    min-width: 200px;
    min-height: 96px;
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    color: var(--color-text-secondary);
}
.hdk-avatar-dropzone:hover,
.hdk-avatar-dropzone:focus-visible,
.hdk-avatar-dropzone.dragover {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
    color: var(--color-primary);
}
.hdk-avatar-dropzone:focus-visible {
    outline: 3px solid var(--color-input-focus-ring);
    outline-offset: 2px;
}
.hdk-avatar-dropzone.has-file {
    border-style: solid;
    border-color: var(--color-success);
    background: none;
}
.hdk-avatar-dropzone.has-error {
    border-color: var(--color-danger);
}
.hdk-avatar-error {
    width: 100%;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: var(--color-danger);
    color: var(--color-on-danger);
    font-size: 13px;
    margin-top: 8px;
}

.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); border: 0;
}

html[data-theme="dark"] select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23b2a6b9' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

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

/* ===== Motion Tokens ===== */
:root {
    --motion-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --motion-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --motion-duration-fast: 0.3s;
    --motion-duration-base: 0.5s;
    --motion-duration-slow: 0.8s;
    --motion-stagger-step: 80ms;
    --color-card-glow: rgba(155,44,44,0.20);
}

/* ===== Hero Ambient Keyframes ===== */
@keyframes hero-drift-left {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(-2%, 1%) scale(1.04); }
    100% { transform: translate(0, 0) scale(1); }
}
@keyframes hero-drift-right {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(2%, -1%) scale(1.03); }
    100% { transform: translate(0, 0) scale(1); }
}
@keyframes hero-breathe {
    0%   { opacity: 0.55; transform: scale(1); }
    50%  { opacity: 0.75; transform: scale(1.12); }
    100% { opacity: 0.55; transform: scale(1); }
}
@keyframes banner-shimmer {
    0% { transform: translateX(-120%) skewX(-12deg); opacity: 0; }
    18% { opacity: 0.35; }
    48% { opacity: 0.10; }
    100% { transform: translateX(140%) skewX(-12deg); opacity: 0; }
}
@keyframes search-dialog-in {
    from { opacity: 0; transform: translateY(18px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes banner-copy-rise {
    from { opacity: 0.72; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Banner Pulse ===== */
@keyframes banner-pulse {
    0%   { box-shadow: 0 0 0 0 var(--color-card-glow); }
    60%  { box-shadow: 0 0 0 12px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}

/* ===== Section Reveal ===== */
.motion-reveal,
.motion-stagger {
    opacity: 1;
    transform: none;
}
.motion-enabled .motion-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity var(--motion-duration-base) var(--motion-ease-out),
        transform var(--motion-duration-base) var(--motion-ease-out);
}
.motion-enabled .motion-reveal.motion-visible {
    opacity: 1;
    transform: none;
}
.motion-enabled .motion-reveal .motion-stagger {
    opacity: 0;
    transform: translateY(16px);
    transition:
        opacity var(--motion-duration-fast) var(--motion-ease-out),
        transform var(--motion-duration-fast) var(--motion-ease-out);
}
.motion-enabled .motion-reveal .motion-stagger.motion-visible,
.motion-enabled .motion-stagger.motion-visible {
    opacity: 1;
    transform: none;
}
.motion-reveal-immediate {
    opacity: 1;
    transform: none;
}

/* ===== Cover Crossfade/Slide ===== */
.banner-cover-exit {
    opacity: 0;
    transform: translateX(12px);
}
.banner-cover-enter {
    opacity: 1;
    transform: translateX(0);
}

/* Hide darkify floating switch (theme has its own toggle) */
.darkify_switch { display: none !important; }

/* ===== Site Header ===== */
.site-header {
    background: var(--color-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--color-border-light);
    border-radius: var(--header-radius);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.10);
    height: var(--header-height);
    left: var(--header-side);
    position: fixed;
    right: var(--header-side);
    top: var(--header-top);
    transform: translate3d(0, 0, 0);
    transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1), background 0.3s, border-color 0.3s, box-shadow 0.3s;
    will-change: transform;
    z-index: 1000;
}
.site-header.is-hidden {
    transform: translate3d(0, calc(-100% - var(--header-hide-offset, var(--header-top)) - 4px), 0);
}
body.admin-bar .site-header {
    top: calc(32px + var(--header-top));
}
@media (prefers-reduced-motion: reduce) {
    .site-header {
        transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
    }
}
.site-logo {
    min-width: 0;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--color-primary);
}
.site-header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 16px;
    max-width: 1440px;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    min-width: 0;
}
.header-action-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    max-width: 38px;
    max-height: 38px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    border: 1px solid var(--color-border-light);
    background: var(--color-bg-secondary);
    color: var(--color-text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    flex-shrink: 0;
}
.header-action-btn:hover,
.header-action-btn:focus-visible {
    background: var(--color-bg-tertiary);
    color: var(--color-primary);
    border-color: var(--color-primary);
    transform: scale(1.04);
}
.header-action-btn:active {
    transform: scale(0.95);
}
.header-action-btn svg,
.header-action-btn .hdk-icon {
    width: 18px;
    height: 18px;
}
.mobile-menu-bars {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3.5px;
    width: 18px;
    height: 14px;
}
.mobile-menu-bars span {
    display: block;
    width: 16px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: 0.25s ease;
}
.mobile-login-btn,
.mobile-user-btn,
.mobile-menu-toggle {
    display: none;
}
.auth-login-link,
.auth-register-link {
    min-width: 86px;
}
.theme-toggle {
    transition: transform 0.3s ease;
}
.theme-toggle:active {
    transform: scale(0.9);
}

/* ===== Layout Utilities ===== */
.page-shell {
    padding-top: 24px;
}
.panel {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}
.panel-pad {
    padding: 20px;
}
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.story-list-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid var(--color-border-light);
}
.story-list-row:nth-child(even) {
    background: var(--color-bg-secondary);
}
.empty-state {
    text-align: center;
    padding: 48px 0;
    color: var(--color-text-muted);
}
.footer-link {
    color: var(--color-footer-link);
}
.footer-link:hover {
    color: var(--color-footer-link-hover);
}

/* ===== Story Card ===== */
.story-card {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s var(--motion-ease-out), box-shadow 0.4s var(--motion-ease-out);
    will-change: transform;
}
.story-card::after {
    background: linear-gradient(120deg, transparent 15%, rgba(255,255,255,0.24), transparent 58%);
    content: "";
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    transform: translateX(-120%);
    transition: opacity 0.35s var(--motion-ease-out), transform 0.65s var(--motion-ease-out);
}
.story-card:hover {
    transform: translateY(-6px);
    box-shadow: 1px 8px 28px -6px rgba(96,28,28,0.22), 0 4px 12px rgba(0,0,0,0.06);
}
.story-card:hover::after {
    opacity: 1;
    transform: translateX(120%);
}
.story-card .card-img {
    transition: transform 0.5s var(--motion-ease-out), filter 0.5s var(--motion-ease-out);
}
.story-card:hover .card-img {
    transform: scale(1.06);
    filter: brightness(1.10);
}

/* ===== Hero Banner ===== */
.hero-banner {
    background: var(--color-banner-bg);
    color: var(--color-banner-text);
    padding: 28px 0 32px;
    position: relative;
    overflow: hidden;
    transition: background 0.3s, color 0.3s;
}
.hero-banner::before,
.hero-banner::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    will-change: transform, opacity;
}
.hero-banner::before {
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, var(--color-primary-light) 0%, transparent 70%);
    top: -120px;
    left: -80px;
    animation: hero-drift-left 22s var(--motion-ease-in-out) infinite;
}
.hero-banner::after {
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(183,121,31,0.10) 0%, transparent 70%);
    bottom: -100px;
    right: -60px;
    animation: hero-drift-right 24s var(--motion-ease-in-out) infinite;
}
.hero-banner > .container {
    position: relative;
    z-index: 1;
    max-width: none;
    margin: 0 auto;
    padding: 0 64px;
}
.hero-banner .banner-shell {
    background:
        var(--color-banner-shell-ambient),
        var(--color-banner-shell-gradient);
    border: 1px solid var(--color-banner-shell-border);
    border-radius: 28px;
    box-shadow: var(--shadow-banner);
    min-height: 480px;
    overflow: hidden;
    padding: 18px clamp(12px, 1.5vw, 22px);
    position: relative;
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.hero-banner .banner-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--color-banner-veil);
    pointer-events: none;
}
.hero-banner .banner-shell::after {
    animation: banner-shimmer 6s ease-in-out infinite;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
    content: "";
    inset: -30% auto -30% 0;
    pointer-events: none;
    position: absolute;
    width: 28%;
    z-index: 1;
}
.hero-banner .banner-grid {
    align-items: center;
    display: grid;
    gap: clamp(22px, 2.6vw, 36px);
    grid-template-columns: minmax(230px, 0.82fr) minmax(260px, 0.92fr) minmax(248px, 0.82fr);
    justify-content: space-between;
    min-height: 420px;
    position: relative;
    z-index: 1;
}
.hero-banner .banner-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding-left: 28px;
}
.hero-banner .banner-info.is-changing {
    animation: banner-copy-rise 0.42s var(--motion-ease-out);
}
.hero-banner .banner-meta-badge-row {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}
.hero-banner .banner-nomination-badge {
    align-items: center;
    background: var(--color-primary);
    border-radius: 9999px;
    color: var(--color-on-primary);
    display: inline-flex;
    font-size: var(--font-size-xs);
    font-weight: 700;
    gap: 6px;
    padding: 4px 10px;
}
.hero-banner .banner-slide-position {
    color: var(--color-banner-text-muted);
    font-size: var(--font-size-sm);
    font-weight: 500;
    opacity: 0.9;
}
.hero-banner .banner-slide-current {
    color: var(--color-primary);
    font-size: var(--font-size-base);
    font-weight: 700;
}
.hero-banner .banner-title {
    color: var(--color-banner-text);
    font-size: var(--font-size-3xl);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
}
.hero-banner .banner-summary {
    color: var(--color-banner-text-muted);
    display: -webkit-box;
    font-size: var(--font-size-sm);
    line-height: 1.65;
    margin-bottom: 24px;
    max-width: 360px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
}
.hero-banner .banner-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}
.hero-banner .banner-read-link {
    color: var(--color-banner-overlay-text);
}
.hero-banner .banner-read-link:hover {
    color: var(--color-banner-overlay-text);
}
.hero-banner .banner-views {
    color: var(--color-banner-text-muted);
    font-size: var(--font-size-xs);
}
.hero-banner .banner-cover {
    align-items: center;
    aspect-ratio: 2 / 3;
    display: flex;
    justify-content: center;
    min-width: 0;
    width: min(100%, clamp(260px, 24vw, 340px));
}
.hero-banner .banner-cover-img {
    border: 1px solid var(--color-banner-cover-border);
    border-radius: 12px;
    box-shadow: var(--color-banner-cover-shadow);
    display: block;
    height: 100%;
    max-height: none;
    max-width: none;
    object-fit: cover;
    object-position: center;
    transition: opacity 0.35s var(--motion-ease-out), transform 0.35s var(--motion-ease-out);
    width: 100%;
}
.hero-banner .banner-cards {
    display: grid;
    gap: 9px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    min-width: 0;
    padding-right: 28px;
}
.hero-banner .banner-card {
    appearance: none;
    aspect-ratio: 2 / 3;
    background: var(--color-banner-card-bg);
    border: 2px solid transparent;
    border-radius: 12px;
    color: var(--color-banner-text);
    cursor: pointer;
    display: block;
    min-width: 0;
    overflow: hidden;
    padding: 0;
    position: relative;
    text-align: left;
    transition: box-shadow 0.25s, border-color 0.25s, transform 0.25s;
}
.hero-banner .banner-card.active {
    border-color: var(--color-banner-card-active-border);
    box-shadow: var(--color-banner-card-active-shadow);
    animation: banner-pulse 0.8s var(--motion-ease-out);
}
.hero-banner .banner-card:hover {
    border-color: var(--color-banner-card-hover-border);
    box-shadow: var(--color-banner-card-hover-shadow);
    transform: translateY(-2px);
}
.hero-banner .banner-card img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}
.hero-banner .banner-card-rank {
    background: var(--color-banner-card-rank-bg);
    border-radius: 10px;
    color: var(--color-banner-overlay-text);
    font-size: var(--font-size-xs);
    font-weight: 700;
    left: 7px;
    line-height: 1;
    padding: 6px 7px;
    position: absolute;
    top: 7px;
}
.hero-banner .banner-card.active .banner-card-rank {
    background: var(--color-banner-card-rank-active-bg);
    color: var(--color-on-primary);
}
.hero-banner .banner-card-overlay {
    background: var(--color-banner-card-overlay);
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    left: 0;
    min-height: 48%;
    justify-content: flex-end;
    padding: 28px 18px 8px 8px;
    position: absolute;
    right: 0;
}
.hero-banner .banner-card-title {
    color: var(--color-banner-overlay-text);
    display: -webkit-box;
    font-size: clamp(11px, 0.9vw, var(--font-size-sm));
    font-weight: 700;
    line-height: 1.25;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.hero-banner .banner-card-views {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--color-banner-overlay-text-muted);
    font-size: var(--font-size-xs);
}
.hero-banner .banner-nav {
    align-items: center;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    color: var(--color-banner-overlay-text);
    cursor: pointer;
    display: flex;
    height: 34px;
    justify-content: center;
    opacity: 0.75;
    padding: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: background 0.2s, opacity 0.2s, transform 0.2s;
    width: 34px;
    z-index: 4;
}
.hero-banner .banner-nav:hover {
    background: rgba(15, 23, 42, 0.72);
    opacity: 1;
    transform: translateY(-50%) scale(1.06);
}
.hero-banner .banner-nav:focus-visible {
    opacity: 1;
    outline: 2px solid var(--color-banner-overlay-text);
    outline-offset: 2px;
}
.hero-banner .banner-nav .hdk-icon {
    height: 20px;
    width: 20px;
}
.hero-banner .banner-nav-prev {
    left: 6px;
}
.hero-banner .banner-nav-next {
    right: 6px;
}

/* ===== Desktop Banner (> 768px) & Mobile Banner (<= 768px) Display Switch ===== */
.hero-banner .banner-desktop {
    display: block;
}
.hero-banner .banner-mobile {
    display: none;
}

/* ===== Mobile Banner Compact Styles ===== */
.banner-mobile-hero-card {
    background: var(--color-banner-card-bg);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    min-height: 190px;
    overflow: hidden;
    position: relative;
}
.banner-mobile-blur-bg {
    background-position: center;
    background-size: cover;
    filter: blur(24px) brightness(0.35);
    inset: -10px;
    position: absolute;
    transform: scale(1.15);
    transition: background-image 0.4s var(--motion-ease-out);
    z-index: 0;
}
.banner-mobile-hero-inner {
    padding: 14px;
    position: relative;
    z-index: 1;
}
.banner-mobile-top-bar {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}
.banner-nomination-badge-sm {
    align-items: center;
    background: var(--color-primary);
    border-radius: 9999px;
    color: var(--color-on-primary);
    display: inline-flex;
    font-size: 11px;
    font-weight: 700;
    gap: 4px;
    padding: 3px 8px;
}
.banner-mobile-nav-pills {
    align-items: center;
    display: flex;
    gap: 6px;
}
.banner-mobile-slide-pos {
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    margin-right: 4px;
    opacity: 0.9;
}
.banner-mobile-nav-btn {
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    height: 26px;
    justify-content: center;
    padding: 0;
    width: 26px;
    transition: background 0.2s;
}
.banner-mobile-nav-btn:hover {
    background: rgba(0, 0, 0, 0.6);
}
.banner-mobile-main-row {
    align-items: center;
    display: flex;
    gap: 14px;
}
.banner-mobile-cover-wrap {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
    flex-shrink: 0;
    height: 132px;
    overflow: hidden;
    width: 92px;
}
.banner-mobile-cover-img {
    display: block;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.35s var(--motion-ease-out), transform 0.35s var(--motion-ease-out);
    width: 100%;
}
.banner-mobile-text-col {
    flex: 1;
    min-width: 0;
}
.banner-mobile-title {
    color: #fff;
    display: -webkit-box;
    font-size: var(--font-size-base);
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 6px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.banner-mobile-summary {
    color: rgba(255, 255, 255, 0.82);
    display: -webkit-box;
    font-size: var(--font-size-xs);
    line-height: 1.45;
    margin: 0 0 12px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.banner-mobile-actions-row {
    align-items: center;
    display: flex;
    gap: 12px;
}
.banner-mobile-read-btn {
    font-size: var(--font-size-xs);
    font-weight: 600;
    padding: 6px 16px;
}
.banner-mobile-views {
    align-items: center;
    color: rgba(255, 255, 255, 0.75);
    display: inline-flex;
    font-size: 11px;
    gap: 4px;
}

/* Dải thumbnail vuốt ngang mobile */
.banner-mobile-strip-outer {
    margin-top: 12px;
}
.banner-mobile-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 2px 6px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.banner-mobile-strip::-webkit-scrollbar {
    display: none;
}
.banner-mobile-thumb {
    appearance: none;
    background: var(--color-banner-card-bg);
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    flex: 0 0 68px;
    height: 96px;
    overflow: hidden;
    padding: 0;
    position: relative;
    scroll-snap-align: start;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.banner-mobile-thumb.active {
    border-color: var(--color-banner-card-active-border);
    box-shadow: var(--color-banner-card-active-shadow);
    transform: scale(1.04);
}
.banner-mobile-thumb img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}
.banner-mobile-thumb-rank {
    background: var(--color-banner-card-rank-bg);
    border-radius: 6px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    left: 4px;
    line-height: 1;
    padding: 3px 5px;
    position: absolute;
    top: 4px;
}
.banner-mobile-thumb.active .banner-mobile-thumb-rank {
    background: var(--color-banner-card-rank-active-bg);
    color: var(--color-on-primary);
}

@media (max-width: 1024px) {
    .hero-banner > .container {
        padding-left: 32px;
        padding-right: 32px;
    }
    .hero-banner .banner-shell {
        min-height: 0;
        padding: 26px;
    }
    .hero-banner .banner-grid {
        gap: 22px;
        grid-template-columns: minmax(220px, 0.9fr) minmax(220px, 0.8fr);
    }
    .hero-banner .banner-info {
        order: 1;
    }
    .hero-banner .banner-cover {
        order: 0;
        width: min(40vw, 300px);
    }
    .hero-banner .banner-cards {
        gap: 9px;
        grid-column: 1 / -1;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        margin-left: auto;
        margin-right: auto;
        max-width: 75%;
        order: 2;
        padding-right: 0;
    }
}

@media (max-width: 768px) {
    .hero-banner {
        padding: 12px 0 20px;
    }
    .hero-banner > .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    .hero-banner .banner-desktop {
        display: none !important;
    }
    .hero-banner .banner-mobile {
        display: block !important;
    }
}

@media (max-width: 375px) {
    .hero-banner > .container {
        padding-left: 8px;
        padding-right: 8px;
    }
    .banner-mobile-cover-wrap {
        height: 118px;
        width: 82px;
    }
    .banner-mobile-thumb {
        flex-basis: 60px;
        height: 84px;
    }
    .banner-mobile-title {
        font-size: 14px;
    }
}

/* ===== Search Modal ===== */
.search-modal {
    align-items: flex-start;
    justify-content: center;
    overscroll-behavior: contain;
    padding: calc(var(--header-top) + var(--header-height) + 18px) 16px 24px;
    transition: background 0.3s;
    z-index: 4000 !important;
}
.search-modal.active {
    display: flex !important;
}
body.search-open {
    overflow: hidden;
}
.search-dialog {
    animation: search-dialog-in 0.28s var(--motion-ease-out);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
    max-height: calc(100vh - var(--header-height) - 44px);
    max-width: 680px;
    overflow: hidden;
    padding: 18px;
    width: min(680px, 100%);
    z-index: 1;
}
.search-form {
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto auto;
}
.search-form input[type="search"] {
    width: 100%;
}
.search-status {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    padding: 12px 2px 8px;
}
.search-results {
    display: grid;
    gap: 8px;
    max-height: min(56vh, 460px);
    overflow-y: auto;
    padding-right: 2px;
}
.search-results-title {
    color: var(--color-text-primary);
    font-size: var(--font-size-sm);
    font-weight: 700;
    margin-bottom: 2px;
}
.search-result-card {
    align-items: center;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    display: flex;
    gap: 12px;
    padding: 8px;
    text-decoration: none;
    transition: transform 0.2s var(--motion-ease-out), border-color 0.2s, background 0.2s;
}
.search-result-card:hover {
    background: var(--color-bg-tertiary);
    border-color: var(--color-primary);
    color: var(--color-text-primary);
    transform: translateY(-1px);
}
.search-result-card img {
    aspect-ratio: 2 / 3;
    border-radius: 8px;
    flex: 0 0 42px;
    object-fit: cover;
    width: 42px;
}
.search-result-copy {
    display: grid;
    min-width: 0;
}
.search-result-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.search-result-copy small,
.search-empty {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

/* ===== Search Results Page ===== */
.search-page-header {
    margin-bottom: 24px;
}
.search-page-header .search-highlight {
    color: var(--color-primary);
    font-weight: 600;
}
.search-type-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.search-type-chips a,
.search-type-chips span {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-full);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    padding: 8px 14px;
    text-decoration: none;
}
.search-type-chips .active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-on-primary);
}
.search-result-item {
    display: flex;
    gap: 16px;
    padding: 12px;
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--color-text-primary);
    transition: transform 0.2s var(--motion-ease-out), box-shadow 0.2s, border-color 0.2s;
}
.search-result-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
    color: var(--color-text-primary);
}
.search-result-item .search-thumb {
    flex: 0 0 64px;
    width: 64px;
    height: 96px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}
.search-result-item .search-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}
.search-result-item .search-title {
    font-weight: 600;
    font-size: var(--font-size-base);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.search-result-item .search-meta {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}

.search-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-muted);
}
.search-empty-state .search-empty-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.6;
}
.search-empty-state h3 {
    font-size: var(--font-size-lg);
    color: var(--color-text-primary);
    margin-bottom: 8px;
}
.search-empty-state p {
    margin-bottom: 16px;
}

/* ===== Audio Stories & Player ===== */
.audio-story-strip {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.audio-story-card {
    align-items: center;
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    display: grid;
    gap: 12px;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    padding: 10px;
}
.audio-story-card img {
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-sm);
    height: 56px;
    object-fit: cover;
    width: 56px;
}
.audio-story-card h3 {
    display: -webkit-box;
    font-size: var(--font-size-sm);
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 4px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.audio-story-card p {
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
    margin: 0;
}
.hdk-audio-player {
    align-items: center;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    bottom: 0;
    box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.14);
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto 130px auto;
    left: 50%;
    max-width: 720px;
    opacity: 0;
    padding: 12px 14px;
    pointer-events: none;
    position: fixed;
    transform: translate(-50%, 100%);
    transition: opacity 0.25s var(--motion-ease-out), transform 0.25s var(--motion-ease-out);
    width: min(calc(100vw - 24px), 720px);
    z-index: 1200;
}
.hdk-audio-player.active {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}
.hdk-audio-copy {
    min-width: 0;
}
.hdk-audio-copy strong,
.hdk-audio-copy span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hdk-audio-copy span {
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
    margin-top: 2px;
}
.hdk-audio-control,
.hdk-audio-close {
    align-items: center;
    background: var(--color-primary);
    border: 0;
    border-radius: 50%;
    color: var(--color-on-primary);
    cursor: pointer;
    display: inline-flex;
    height: 38px;
    justify-content: center;
    width: 38px;
}
.hdk-audio-close {
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
}
.hdk-audio-progress {
    background: var(--color-border-light);
    border-radius: var(--radius-full);
    height: 5px;
    overflow: hidden;
}
.hdk-audio-progress span {
    background: var(--color-primary);
    display: block;
    height: 100%;
    width: 0;
}

@media (max-width: 520px) {
    .search-form {
        grid-template-columns: 1fr;
    }
    .search-form .btn {
        width: 100%;
    }
    .search-modal {
        padding: calc(var(--header-top) + var(--header-height)) 0 0;
    }
    .search-dialog {
        border-radius: 0;
        max-height: calc(100vh - var(--header-top) - var(--header-height));
    }
    .audio-story-strip {
        grid-template-columns: 1fr;
    }
    .hdk-audio-player {
        bottom: var(--bottom-nav-height);
        grid-template-columns: minmax(0, 1fr) auto auto;
        width: 100%;
    }
    .hdk-audio-progress {
        grid-column: 1 / -1;
        order: 4;
    }
}

/* ===== Mobile Drawer (Hatdaukhaai Offcanvas) ===== */
.mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 2000 !important;
    display: none;
    pointer-events: none;
}
.mobile-drawer.open {
    display: block !important;
    pointer-events: auto;
}
.mobile-drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.mobile-drawer.open .mobile-drawer-overlay {
    opacity: 1;
}
.mobile-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 300px;
    max-width: 85vw;
    height: 100%;
    background: var(--color-bg);
    border-left: 1px solid var(--color-border);
    box-shadow: -6px 0 25px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    z-index: 10;
}
.mobile-drawer.open .mobile-drawer-panel {
    transform: translateX(0);
}
.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-border-light);
    background: var(--color-bg-secondary);
}
.mobile-drawer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-primary);
    font-weight: 700;
    font-size: 1.12rem;
}
.mobile-drawer-user {
    padding: 14px 16px;
    background: color-mix(in srgb, var(--color-primary) 6%, var(--color-bg));
    border-bottom: 1px solid var(--color-border-light);
}
.drawer-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.drawer-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.drawer-user-name {
    font-weight: 700;
    color: var(--color-text-primary);
    font-size: 0.95rem;
}
.drawer-user-credits {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 3px;
}
.drawer-user-credits strong {
    color: var(--color-primary);
}
.mobile-drawer-guest {
    padding: 16px;
    border-bottom: 1px solid var(--color-border-light);
    text-align: center;
}
.mobile-drawer-guest p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}
.mobile-drawer-nav {
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}
.mobile-drawer-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    text-decoration: none;
    font-size: 0.94rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.mobile-drawer-link:hover,
.mobile-drawer-link.active {
    background: color-mix(in srgb, var(--color-primary) 10%, transparent);
    color: var(--color-primary);
}
.mobile-drawer-link.logout-link {
    color: var(--color-danger);
    margin-top: 10px;
    border-top: 1px solid var(--color-border-light);
    border-radius: 0;
    padding-top: 14px;
}

/* ===== Star Rating ===== */
.star:hover, .star:hover ~ .star {
    color: var(--color-rating);
}
.stars:hover .star {
    color: var(--color-rating);
}
.stars .star:hover ~ .star {
    color: var(--color-text-muted);
}

/* ===== Chapter Reader ===== */
article p {
    margin-bottom: 1em;
}
article p:last-child {
    margin-bottom: 0;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px 0 24px;
}
.pagination-links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}
.pagination-links .btn {
    min-width: 40px;
}
.pagination-links .btn-primary {
    pointer-events: none;
}
.pagination-links .disabled {
    opacity: 0.4;
    pointer-events: none;
    cursor: default;
}
.pagination-summary {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    text-align: center;
}
@media (max-width: 480px) {
    .pagination-links {
        gap: 4px;
    }
    .pagination-links .btn {
        min-width: 36px;
        padding: 6px 10px;
        font-size: 11px;
    }
    .pagination-links .page-prev,
    .pagination-links .page-next {
        padding: 6px 12px;
    }
}

/* ===== Mobile Bottom Navigation ===== */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    z-index: 900;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.06);
    transition: background 0.3s, border-color 0.3s;
}
.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1;
    min-width: 0;
    padding: 6px 4px;
    text-decoration: none;
    color: var(--color-text-muted);
    font-size: 10px;
    font-weight: 500;
    border: none;
    background: none;
    cursor: pointer;
    font-family: var(--font-family);
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.bottom-nav-item:hover,
.bottom-nav-item:active,
.bottom-nav-item.active {
    color: var(--color-primary);
}
.bottom-nav-icon {
    font-size: 20px;
    line-height: 1;
}
.bottom-nav-label {
    line-height: 1;
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }
    :root {
        --bottom-nav-height: 60px;
    }
    body {
        padding-bottom: var(--bottom-nav-height);
    }
    .site-footer {
        margin-bottom: var(--bottom-nav-height);
        padding-bottom: calc(24px + var(--bottom-nav-height));
    }
    #purchase-modal > div,
    .search-modal {
        padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px));
    }
    .toc-float-btn {
        bottom: calc(60px + var(--bottom-nav-height, 0px));
    }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    :root {
        --container-max: 960px;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 58px;
        --header-top: 0px;
        --header-side: 0px;
        --header-radius: 0px;
    }
    .site-header {
        left: 0 !important;
        right: 0 !important;
        top: 0 !important;
        width: 100% !important;
        height: var(--header-height) !important;
        border-radius: 0 !important;
        border-top: none !important;
        border-left: none !important;
        border-right: none !important;
        border-bottom: 1px solid var(--color-border-light) !important;
        background: color-mix(in srgb, var(--color-bg) 95%, transparent) !important;
        backdrop-filter: blur(16px) !important;
        -webkit-backdrop-filter: blur(16px) !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
    }
    .site-header.is-hidden {
        transform: translate3d(0, calc(-100% - var(--header-hide-offset, 0px) - 4px), 0) !important;
    }
    body.admin-bar .site-header {
        top: 46px !important;
    }
    body.wp-theme-monggioitruyen {
        padding-top: var(--header-height) !important;
    }
    .site-header-container {
        padding-inline: 12px !important;
        gap: 8px !important;
        max-width: 100% !important;
    }
    .site-logo {
        display: inline-flex !important;
        align-items: center !important;
        gap: 8px !important;
        text-decoration: none !important;
        flex: 0 0 auto !important;
        max-width: none !important;
        overflow: visible !important;
    }
    .site-logo-mark {
        width: 34px !important;
        height: 34px !important;
        border-radius: 9px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
        background: linear-gradient(145deg, var(--color-primary), var(--color-primary-hover)) !important;
        color: #fff8ed !important;
    }
    .site-logo-mark svg, .site-logo-mark .hdk-icon {
        width: 18px !important;
        height: 18px !important;
    }
    .site-logo-copy {
        display: flex !important;
        align-items: baseline !important;
        gap: 4px !important;
        line-height: 1 !important;
        white-space: nowrap !important;
    }
    .site-logo-copy strong {
        font-size: 1.15rem !important;
        font-weight: 700 !important;
        color: var(--color-primary) !important;
        letter-spacing: -0.025em !important;
        line-height: 1 !important;
        display: inline-block !important;
    }
    .site-logo-copy small {
        display: none !important;
    }
    .site-logo-badge {
        font-size: 0.62rem !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.05em !important;
        padding: 2px 5px !important;
        border-radius: 4px !important;
        background: var(--color-bg-tertiary) !important;
        color: var(--color-primary) !important;
        border: 1px solid var(--color-border-light) !important;
        display: inline-block !important;
    }
    .header-actions {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        flex: 0 0 auto !important;
    }
    .main-nav {
        display: none !important;
    }
    .auth-login-link,
    .user-dropdown,
    #notif-bell {
        display: none !important;
    }
    .mobile-login-btn,
    .mobile-user-btn,
    .mobile-menu-toggle {
        display: inline-flex !important;
    }
    .header-action-btn {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        min-height: 36px !important;
        max-width: 36px !important;
        max-height: 36px !important;
    }
    .header-action-btn svg,
    .header-action-btn .hdk-icon {
        width: 16px !important;
        height: 16px !important;
    }
    .hero {
        padding: 32px 0 !important;
    }
    .hero h1 {
        font-size: var(--font-size-2xl) !important;
    }
    .hero .hero-visual {
        flex: 0 0 120px !important;
    }
    .hero .hero-visual div {
        font-size: 60px !important;
    }
    .story-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .story-header > div:first-child {
        flex: 0 0 160px !important;
    }
    .section {
        padding: 28px 0;
    }
    .section-title {
        font-size: var(--font-size-lg) !important;
        padding-left: 12px;
    }
    .section-title::before {
        width: 3px;
        height: 18px;
    }
    .ranking-row {
        flex-wrap: wrap;
    }
}

@media (max-width: 375px) {
    .container {
        padding: 0 12px;
    }
    .card-body {
        padding: 8px;
    }
    .story-header > div:first-child {
        flex: 0 0 140px !important;
    }
}

/* ===== Touch-friendly ===== */
@media (hover: none) and (pointer: coarse) {
    .btn, a.btn, button.btn {
        min-height: var(--touch-target);
        min-width: var(--touch-target);
    }
    select, input[type="text"], input[type="search"] {
        min-height: var(--touch-target);
    }
}

/* ===== Print ===== */
@media print {
    .site-header, .site-footer, .pagination, .comment-form {
        display: none !important;
    }
}

/* ===== User Dropdown ===== */
.user-dropdown {
    position: relative;
    align-items: center;
    display: inline-flex;
    gap: 6px;
}

.user-dropdown-toggle {
    cursor: pointer;
    white-space: nowrap;
}

.user-dropdown-toggle .dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.user-dropdown-toggle[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-item:hover {
    background: var(--color-bg-secondary);
}

.user-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== Account Profile ===== */
.account-hero {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    margin-bottom: 18px;
    overflow: hidden;
}
.account-cover {
    min-height: 112px;
    background:
        linear-gradient(135deg, rgba(66, 49, 43, 0.92), rgba(155, 44, 44, 0.72)),
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.24), transparent 30%),
        var(--color-primary);
}
.account-profile {
    align-items: center;
    display: flex;
    gap: 20px;
    padding: 0 24px 24px;
    flex-wrap: wrap;
}
.account-avatar {
    background: var(--color-bg);
    border: 4px solid var(--color-bg);
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
    height: 96px;
    margin-top: -48px;
    overflow: hidden;
    width: 96px;
}
.account-avatar img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}
.account-profile-copy {
    flex: 1 1 220px;
    min-width: 0;
}
.account-profile-copy h1 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin: 0 0 4px;
}
.account-profile-copy p {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    margin: 0;
    overflow-wrap: anywhere;
}
.account-stats {
    display: grid;
    flex: 1 1 320px;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.account-stats div {
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    padding: 12px;
    text-align: center;
}
.account-stats strong {
    color: var(--color-primary);
    display: block;
    font-size: var(--font-size-xl);
    line-height: 1.1;
}
.account-stats span {
    color: var(--color-text-muted);
    display: block;
    font-size: var(--font-size-xs);
    margin-top: 4px;
}
.account-layout {
    align-items: start;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
}
.account-menu-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr;
    margin-bottom: 0;
    position: sticky;
    top: calc(var(--header-top) + var(--header-height) + 16px);
}
.account-menu-grid a {
    align-items: center;
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    display: flex;
    gap: 10px;
    min-height: 48px;
    padding: 12px 14px;
    text-decoration: none;
    transition: border-color 0.2s, transform 0.2s, background 0.2s;
}
.account-menu-grid a:hover {
    background: var(--color-bg-secondary);
    border-color: var(--color-primary);
    transform: translateY(-1px);
}
.account-menu-grid a.active {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
    color: var(--color-text-primary);
    font-weight: 700;
}
.account-content-main {
    min-width: 0;
}
.account-alert {
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    padding: 12px 14px;
}
.account-alert-success {
    background: rgba(16, 185, 129, 0.12);
    color: var(--color-success);
}
.account-alert-error {
    border: 1px solid var(--color-danger);
    color: var(--color-danger);
}
.form-grid-2,
.form-grid-3 {
    display: grid;
    gap: 14px;
}
.form-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.form-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.account-settings-form label {
    color: var(--color-text-muted);
    display: block;
    font-size: var(--font-size-sm);
    margin-bottom: 6px;
}

/* ===== Progress Bar ===== */
.progress-bar {
    width: 100%;
}

/* ===== History List ===== */
.history-list a:hover {
    background: var(--color-bg-secondary) !important;
}

/* ===== Empty State ===== */
.empty-state a {
    display: inline-block;
    margin-top: 8px;
}

/* ===== Mobile: hide user name, show icon only ===== */
@media (max-width: 768px) {
    .user-name {
        display: none;
    }

    .user-dropdown-menu {
        position: fixed;
        top: calc(var(--header-top) + var(--header-height));
        right: 8px;
        left: auto;
        min-width: 180px;
    }

    .account-profile {
        gap: 12px !important;
        padding: 0 16px 18px !important;
    }

    .account-profile-copy h1 {
        font-size: var(--font-size-lg) !important;
    }

    .account-avatar {
        width: 76px !important;
        height: 76px !important;
        margin-top: -38px;
    }

    .account-cover {
        min-height: 92px;
    }

    .account-stats,
    .form-grid-2,
    .form-grid-3 {
        grid-template-columns: 1fr;
    }

    .account-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .account-menu-grid {
        position: static;
    }
}

/* ===== Wallet Tab ===== */
.wallet-summary .wallet-stat {
    transition: transform 0.2s;
}

.wallet-stat:hover {
    transform: translateY(-2px);
}

.package-card:hover {
    border-color: var(--color-primary) !important;
}

.daily-claim-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#purchase-modal > div {
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@media (max-width: 768px) {
    .wallet-summary {
        flex-direction: column;
    }
    .wallet-stat {
        padding: 16px !important;
    }
    .wallet-stat div:first-child {
        font-size: 12px;
    }
    .wallet-stat div:last-child {
        font-size: var(--font-size-xl) !important;
    }
}

/* ===== Reader Settings ===== */
.reader-settings {
    user-select: none;
}

.reader-tools {
    align-items: center;
    backdrop-filter: blur(14px);
    background: color-mix(in oklch, var(--card) 94%, transparent);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 7px;
}

.chapter-reader-page .reader-page-shell {
    max-width: 1448px;
    padding-left: 24px;
    padding-right: 24px;
    width: 100%;
}

.chapter-reader-page .header-tool,
.chapter-reader-page .reader-container {
    max-width: 1400px;
    padding-left: 24px;
    padding-right: 24px;
    width: 100%;
}

.chapter-reader-page .header-tool {
    min-height: 54px;
    padding-bottom: 0;
    padding-top: 0;
}

.chapter-reader-page .reader-container {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    min-height: 60vh;
}

.chapter-reader-page .reader-container .chapter-body-text {
    padding-bottom: 24px;
    padding-top: 24px;
}
.reader-tools-group {
    align-items: center;
    display: flex;
    gap: 5px;
}
.reader-tool-btn {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--foreground);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    height: 40px;
    justify-content: center;
    min-width: 40px;
    padding: 7px;
    position: relative;
    transition: background-color .16s, border-color .16s, color .16s, transform .16s;
}
.reader-tool-btn:hover,
.reader-tool-btn.is-active,
.reader-tool-btn[aria-expanded="true"] {
    background: var(--secondary);
    border-color: var(--border);
    color: var(--primary);
}
.reader-tool-btn:active {
    transform: translateY(1px);
}
.reader-tool-btn .hdk-icon {
    height: 19px;
    width: 19px;
}
.reader-tool-btn.favorite-btn.is-active .hdk-icon {
    fill: currentColor;
}
.reader-tool-aa {
    font-family: var(--font-serif);
    font-size: .88rem;
    font-weight: 800;
    letter-spacing: -.04em;
}
.reader-tool-dropdown {
    position: relative;
}
.reader-tool-menu {
    background: var(--popover);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: grid;
    left: 0;
    min-width: 170px;
    padding: 6px;
    position: absolute;
    top: calc(100% + 8px);
    z-index: 100;
}
.reader-tool-menu[hidden],
.reader-settings-panel[hidden],
.reader-tts[hidden] {
    display: none !important;
}
.reader-tool-menu button {
    background: transparent;
    border: 0;
    border-radius: var(--radius-sm);
    color: var(--popover-foreground);
    cursor: pointer;
    font: inherit;
    font-size: var(--font-size-xs);
    padding: 9px 10px;
    text-align: left;
}
.reader-tool-menu button:hover,
.reader-tool-menu button.is-active {
    background: var(--accent);
    color: var(--accent-foreground);
}
.reader-settings-panel {
    align-items: end;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
    padding: 12px;
}
.reader-settings-panel > label,
.reader-settings-themes {
    display: grid;
    gap: 5px;
}
.reader-settings-panel > label > span,
.reader-settings-themes > span {
    color: var(--muted-foreground);
    font-size: .65rem;
    font-weight: 750;
}
.reader-settings-panel select {
    background: var(--card);
    border: 1px solid var(--input);
    border-radius: var(--radius-sm);
    color: var(--foreground);
    min-height: 36px;
    padding: 6px 9px;
}
.reader-settings-themes > div {
    display: flex;
    gap: 5px;
}
.reader-settings-themes button {
    align-items: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--foreground);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: var(--font-size-xs);
    gap: 5px;
    min-height: 36px;
    padding: 6px 9px;
}
.reader-settings-themes button.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--primary-foreground);
}
.reader-settings-themes .hdk-icon {
    height: 14px;
    width: 14px;
}
.hd-mobile-tools-inner {
    display: none;
}
.reader-auto-scroll-floating-stop {
    align-items: center;
    background: var(--primary);
    border: 1px solid color-mix(in oklch, var(--primary) 75%, var(--border));
    border-radius: 999px;
    bottom: 24px;
    box-shadow: 0 10px 30px color-mix(in oklch, var(--foreground) 22%, transparent);
    color: var(--primary-foreground);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    height: 48px;
    justify-content: center;
    line-height: 0;
    padding: 0;
    position: fixed;
    right: 24px;
    width: 48px;
    z-index: 1080;
}
.reader-auto-scroll-floating-stop[hidden] {
    display: none !important;
}
.reader-auto-scroll-floating-stop:hover {
    background: var(--primary-hover, var(--color-primary-hover));
    color: var(--primary-foreground);
}
.reader-auto-scroll-floating-stop:focus-visible {
    outline: 2px solid var(--foreground);
    outline-offset: 3px;
}
.reader-pause-mark {
    align-items: center;
    display: grid;
    gap: 4px;
    grid-template-columns: repeat(2, 4px);
    height: 22px;
    justify-content: center;
    place-content: center;
    width: 22px;
}
.reader-pause-mark i {
    background: currentColor;
    border-radius: 2px;
    display: block;
    height: 19px;
    width: 4px;
}
.reader-mobile-sheet,
.reader-mobile-modal-overlay,
.reader-settings-mobile-header,
.reader-mobile-setting-group,
.reader-mobile-line-height,
.reader-mobile-voice-list {
    display: none;
}

@media (min-width: 769px) {
    .reader-settings-panel {
        align-items: stretch;
        animation: readerModalIn .2s cubic-bezier(.2, .8, .2, 1);
        border-radius: 24px;
        box-shadow: 0 24px 70px color-mix(in oklch, var(--foreground) 24%, transparent);
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 16px;
        left: 50%;
        margin: 0;
        max-height: calc(100dvh - 32px);
        max-width: 560px;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 20px;
        position: fixed;
        top: 50%;
        transform: translate(-50%, -50%);
        width: calc(100vw - 32px);
        z-index: 1100;
    }
    .reader-settings-panel .reader-settings-mobile-header {
        align-items: center;
        display: flex;
        justify-content: space-between;
        width: 100%;
    }
    .reader-settings-panel .reader-settings-mobile-header > div {
        display: grid;
        gap: 2px;
    }
    .reader-settings-panel .reader-settings-mobile-header small {
        color: var(--muted-foreground);
        font-size: 10px;
        font-weight: 750;
        letter-spacing: .08em;
        text-transform: uppercase;
    }
    .reader-settings-panel .reader-settings-mobile-header h2 {
        font-size: 18px;
        line-height: 1.3;
        margin: 0;
    }
    .reader-settings-panel .reader-mobile-sheet-close {
        align-items: center;
        background: var(--secondary);
        border: 0;
        border-radius: 50%;
        color: var(--secondary-foreground);
        cursor: pointer;
        display: inline-flex;
        flex: 0 0 38px;
        height: 38px;
        justify-content: center;
        width: 38px;
    }
    .reader-settings-panel .reader-mobile-setting-group {
        display: flex;
        flex-direction: column;
        gap: 7px;
    }
    .reader-settings-panel .reader-mobile-setting-group > span {
        color: var(--muted-foreground);
        font-size: 11px;
        font-weight: 750;
    }
    .reader-settings-panel .reader-mobile-segmented,
    .reader-settings-panel .reader-mobile-font-grid {
        display: grid;
        gap: 6px;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .reader-settings-panel .reader-mobile-font-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .reader-settings-panel .reader-mobile-segmented button,
    .reader-settings-panel .reader-mobile-font-grid button {
        background: var(--secondary);
        border: 1px solid transparent;
        border-radius: 12px;
        color: var(--secondary-foreground);
        cursor: pointer;
        font: inherit;
        font-size: 11px;
        min-height: 42px;
        padding: 7px;
    }
    .reader-settings-panel .reader-mobile-segmented button.is-active,
    .reader-settings-panel .reader-mobile-font-grid button.is-active {
        background: var(--primary);
        border-color: var(--primary);
        color: var(--primary-foreground);
    }
    .reader-settings-panel .reader-settings-themes > div {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .reader-settings-panel .reader-settings-themes button {
        justify-content: center;
        min-height: 44px;
    }
    .reader-mobile-auto-scroll-sheet {
        animation: readerModalIn .2s cubic-bezier(.2, .8, .2, 1);
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: 20px;
        box-shadow: var(--shadow-lg);
        display: flex;
        flex-direction: column;
        gap: 16px;
        left: 50%;
        max-width: 430px;
        padding: 20px;
        position: fixed;
        top: 50%;
        transform: translate(-50%, -50%);
        width: calc(100vw - 32px);
        z-index: 1100;
    }
    .reader-mobile-auto-scroll-sheet[hidden] {
        display: none !important;
    }
    .reader-mobile-auto-scroll-sheet .reader-mobile-sheet-header {
        align-items: center;
        display: flex;
        justify-content: space-between;
    }
    .reader-mobile-auto-scroll-sheet .reader-mobile-sheet-header small {
        color: var(--muted-foreground);
        font-size: 10px;
        font-weight: 750;
        letter-spacing: .08em;
        text-transform: uppercase;
    }
    .reader-mobile-auto-scroll-sheet .reader-mobile-sheet-header h2 {
        font-size: 18px;
        margin: 2px 0 0;
    }
    .reader-mobile-auto-scroll-sheet .reader-mobile-sheet-close {
        align-items: center;
        background: var(--secondary);
        border: 0;
        border-radius: 50%;
        color: var(--secondary-foreground);
        cursor: pointer;
        display: inline-flex;
        height: 38px;
        justify-content: center;
        width: 38px;
    }
    .reader-mobile-auto-scroll-sheet .reader-auto-scroll-status {
        align-items: center;
        background: var(--muted);
        border: 1px solid var(--border);
        border-radius: 14px;
        color: var(--muted-foreground);
        display: flex;
        font-size: 12px;
        font-weight: 750;
        gap: 8px;
        min-height: 46px;
        padding: 10px 13px;
    }
    .reader-mobile-auto-scroll-sheet .reader-auto-scroll-status i {
        background: currentColor;
        border-radius: 50%;
        height: 8px;
        width: 8px;
    }
    .reader-mobile-auto-scroll-sheet .reader-auto-scroll-status.is-scrolling {
        background: var(--accent);
        border-color: var(--primary);
        color: var(--primary);
    }
    .reader-mobile-auto-scroll-sheet .reader-auto-scroll-speed {
        display: grid;
        gap: 10px;
    }
    .reader-mobile-auto-scroll-sheet .reader-auto-scroll-speed > div:first-child,
    .reader-mobile-auto-scroll-sheet .reader-auto-scroll-scale {
        display: flex;
        justify-content: space-between;
    }
    .reader-mobile-auto-scroll-sheet .reader-auto-scroll-speed label {
        font-size: 12px;
        font-weight: 700;
    }
    .reader-mobile-auto-scroll-sheet .reader-auto-scroll-speed output {
        color: var(--primary);
        font-size: 15px;
        font-weight: 850;
    }
    .reader-mobile-auto-scroll-sheet input[type="range"] {
        accent-color: var(--primary);
        cursor: pointer;
        width: 100%;
    }
    .reader-mobile-auto-scroll-sheet .reader-auto-scroll-scale {
        color: var(--muted-foreground);
        font-size: 10px;
    }
    .reader-mobile-auto-scroll-sheet .reader-auto-scroll-actions {
        display: grid;
        gap: 9px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .reader-mobile-auto-scroll-sheet .reader-auto-scroll-actions button {
        align-items: center;
        border: 0;
        border-radius: 14px;
        cursor: pointer;
        display: inline-flex;
        font: inherit;
        font-size: 12px;
        font-weight: 800;
        gap: 7px;
        justify-content: center;
        min-height: 48px;
    }
    .reader-mobile-auto-scroll-sheet .reader-auto-scroll-start {
        background: var(--primary);
        color: var(--primary-foreground);
    }
    .reader-mobile-auto-scroll-sheet .reader-auto-scroll-pause {
        background: var(--secondary);
        color: var(--secondary-foreground);
    }
    .reader-mobile-auto-scroll-sheet .reader-auto-scroll-actions button:disabled {
        cursor: not-allowed;
        opacity: .5;
    }
}

body.reader-modal-open,
body.report-modal-open {
    overflow: hidden;
}
#report-modal > div {
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
}
.reader-mobile-modal-overlay {
    animation: readerOverlayIn .2s ease-out;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    background: color-mix(in oklch, var(--foreground) 40%, transparent);
    display: block;
    inset: 0;
    position: fixed;
    z-index: 1090;
}
.reader-mobile-modal-overlay[hidden] {
    display: none !important;
}

.reader-tts {
    animation: readerModalIn .24s cubic-bezier(.2, .8, .2, 1);
    align-items: stretch;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 24px 70px color-mix(in oklch, var(--foreground) 24%, transparent);
    display: flex;
    flex-direction: column;
    gap: 16px;
    left: 50%;
    margin: 0;
    max-height: min(680px, calc(100dvh - 32px));
    max-width: 540px;
    overscroll-behavior: contain;
    overflow-y: auto;
    padding: 22px;
    position: fixed;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(100vw - 32px);
    z-index: 1100;
}
.reader-tts-heading {
    align-items: center;
    display: flex;
    gap: 10px;
    min-width: 0;
}
.reader-tts-heading > div {
    display: grid;
    min-width: 0;
}
.reader-tts-heading strong {
    font-size: var(--font-size-sm);
}
.reader-tts-heading small,
.reader-tts output {
    color: var(--muted-foreground);
    font-size: var(--font-size-xs);
}
.reader-tts-icon {
    align-items: center;
    background: var(--secondary);
    border-radius: var(--radius-sm);
    color: var(--primary);
    display: inline-flex;
    flex: 0 0 40px;
    height: 40px;
    justify-content: center;
}
.reader-tts-icon .hdk-icon {
    height: 19px;
    width: 19px;
}
.reader-tts > label {
    display: grid;
    gap: 4px;
}
.reader-tts > label > span {
    color: var(--muted-foreground);
    font-size: .65rem;
    font-weight: 750;
}
.reader-tts select {
    background-color: var(--card);
    border: 1px solid var(--input);
    border-radius: var(--radius-sm);
    color: var(--foreground);
    min-height: 38px;
    padding: 6px 36px 6px 12px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.reader-tts select:disabled {
    cursor: not-allowed;
    opacity: .65;
}
#reader-tts select {
    -webkit-appearance: none;
    appearance: none;
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px 12px;
    font-size: 16px;
}
html[data-theme="dark"] #reader-tts { color-scheme: dark; }
#reader-tts { color: var(--foreground); }
.reader-tts-actions {
    display: flex;
    gap: 6px;
}
.reader-tts output {
    min-height: 1.4em;
}
.reader-tts.is-unavailable {
    opacity: .72;
}
.reader-tts-mobile-close {
    align-items: center;
    background: var(--secondary);
    border: 0;
    border-radius: 50%;
    color: var(--secondary-foreground);
    cursor: pointer;
    display: inline-flex;
    height: 36px;
    justify-content: center;
    position: absolute;
    right: 16px;
    top: 16px;
    width: 36px;
}
.reader-tts-mobile-close .hdk-icon {
    height: 18px;
    width: 18px;
}
.reader-tts-mobile-close:focus-visible,
.reader-tool-btn:focus-visible,
.hd-mobile-tools-tts-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
.reader-tts-heading {
    padding-right: 42px;
}

.reader-share-modal {
    animation: readerModalIn .24s cubic-bezier(.2, .8, .2, 1);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 24px 70px color-mix(in oklch, var(--foreground) 24%, transparent);
    display: flex;
    flex-direction: column;
    gap: 20px;
    left: 50%;
    margin: 0;
    max-width: 520px;
    padding: 22px;
    position: fixed;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(100vw - 32px);
    z-index: 1100;
}
.reader-share-modal[hidden] { display: none !important; }
.reader-share-modal .reader-mobile-sheet-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
}
.reader-share-modal .reader-mobile-sheet-header > div {
    display: grid;
    gap: 2px;
}
.reader-share-modal .reader-mobile-sheet-header small {
    color: var(--muted-foreground);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.reader-share-modal .reader-mobile-sheet-header h2 {
    font-size: 18px;
    line-height: 1.3;
    margin: 0;
}
.reader-share-modal .reader-mobile-sheet-close {
    align-items: center;
    background: var(--secondary);
    border: 0;
    border-radius: 50%;
    color: var(--secondary-foreground);
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 38px;
    height: 38px;
    justify-content: center;
    width: 38px;
}
.reader-share-modal .reader-mobile-socials {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.reader-share-modal .reader-mobile-socials button {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--foreground);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    font: inherit;
    font-size: 11px;
    gap: 7px;
    min-width: 0;
}
.reader-share-modal .reader-mobile-socials button > span {
    align-items: center;
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: inline-flex;
    font-size: 18px;
    font-weight: 850;
    height: 48px;
    justify-content: center;
    width: 48px;
}
.reader-share-modal .reader-mobile-copy-row {
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: 14px;
    display: flex;
    gap: 6px;
    padding: 5px;
}
.reader-share-modal .reader-mobile-copy-row input {
    background: transparent;
    border: 0;
    color: var(--muted-foreground);
    flex: 1;
    font: inherit;
    font-size: 11px;
    min-width: 0;
    outline: 0;
    padding: 0 8px;
}
.reader-share-modal .reader-mobile-copy-row button {
    background: var(--primary);
    border: 0;
    border-radius: 10px;
    color: var(--primary-foreground);
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 750;
    min-height: 38px;
    padding: 0 12px;
}

@media (max-width: 768px) {
    body.chapter-reader-page {
        --bottom-nav-height: 0px;
        padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    }
    .chapter-reader-page .reader-page-shell {
        padding-left: 12px;
        padding-right: 12px;
    }
    .chapter-reader-page .reader-container {
        padding-left: 16px;
        padding-right: 16px;
    }
    body.chapter-reader-page .mobile-bottom-nav {
        display: none !important;
    }
    body.chapter-reader-page .site-footer {
        margin-bottom: 0;
        padding-bottom: 24px;
    }
    .reader-tools {
        display: none;
    }
    .hd-mobile-tools-inner {
        align-items: center;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        display: flex;
        gap: 10px;
        justify-content: center;
        left: 12px;
        position: fixed;
        right: 12px;
        z-index: 950;
    }
    .reader-auto-scroll-floating-stop {
        bottom: calc(82px + env(safe-area-inset-bottom, 0px));
        right: 12px;
        z-index: 960;
    }
    .hd-mobile-tools-pill {
        align-items: center;
        -webkit-backdrop-filter: blur(18px);
        backdrop-filter: blur(18px);
        background: color-mix(in oklch, var(--card) 94%, transparent);
        border: 1px solid var(--border);
        border-radius: 999px;
        box-shadow: 0 8px 30px color-mix(in oklch, var(--foreground) 14%, transparent);
        display: flex;
        flex: 1 1 0;
        height: 58px;
        justify-content: space-around;
        max-width: 354px;
        padding: 4px 6px;
    }
    .hd-mobile-tools-pill-btn {
        align-items: center;
        background: transparent;
        border: 0;
        border-radius: 18px;
        color: var(--muted-foreground);
        cursor: pointer;
        display: flex;
        flex-direction: column;
        flex: 1 1 0;
        font: inherit;
        font-size: 10px;
        font-weight: 650;
        gap: 3px;
        justify-content: center;
        min-width: 0;
        height: 48px;
        padding: 3px 5px;
        position: relative;
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
        transition: color .16s ease, background-color .16s ease, transform .16s ease;
    }
    .hd-mobile-tools-pill-btn:hover,
    .hd-mobile-tools-pill-btn:active {
        background: var(--secondary);
        color: var(--primary);
    }
    .hd-mobile-tools-pill-btn:active {
        transform: scale(.96);
    }
    .hd-mobile-tools-pill-btn.disabled {
        background: transparent;
        cursor: not-allowed;
        opacity: .32;
        pointer-events: none;
    }
    .hd-mobile-tools-pill-btn .hdk-icon {
        height: 20px;
        width: 20px;
    }
    .hd-mobile-tools-badge-dot {
        background: var(--destructive);
        border: 2px solid var(--card);
        border-radius: 50%;
        height: 7px;
        position: absolute;
        right: 9px;
        top: 4px;
        width: 7px;
    }
    .hd-mobile-tools-tts-btn {
        align-items: center;
        background: var(--primary);
        border: 0;
        border-radius: 50%;
        box-shadow: 0 8px 24px color-mix(in oklch, var(--primary) 34%, transparent);
        color: var(--primary-foreground);
        cursor: pointer;
        display: inline-flex;
        flex: 0 0 58px;
        height: 58px;
        justify-content: center;
        position: relative;
        text-decoration: none;
        width: 58px;
        -webkit-tap-highlight-color: transparent;
        transition: transform .16s ease, filter .16s ease;
    }
    .hd-mobile-tools-tts-btn:hover {
        color: var(--primary-foreground);
        filter: brightness(1.06);
    }
    .hd-mobile-tools-tts-btn:active {
        transform: scale(.95);
    }
    .hd-mobile-tools-tts-btn .hdk-icon {
        height: 25px;
        width: 25px;
    }
    .reader-settings-panel {
        align-items: stretch;
        flex-direction: column;
    }
    .reader-tts-actions .btn {
        flex: 1;
    }
    .reader-mobile-sheet[hidden] {
        display: none !important;
    }
    .reader-mobile-sheet,
    .reader-settings-panel,
    .reader-tts {
        animation: readerModalIn .24s cubic-bezier(.2, .8, .2, 1);
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: 28px;
        bottom: auto;
        box-shadow: 0 24px 70px color-mix(in oklch, var(--foreground) 24%, transparent);
        display: flex;
        flex-direction: column;
        gap: 16px;
        left: 50%;
        margin: 0;
        max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
        overscroll-behavior: contain;
        overflow-y: auto;
        padding: 18px;
        position: fixed;
        right: auto;
        top: 50%;
        transform: translate(-50%, -50%);
        width: min(390px, calc(100vw - 24px));
        z-index: 1100;
    }
    .reader-settings-panel[hidden],
    .reader-tts[hidden] {
        display: none !important;
    }
    .reader-mobile-sheet-header {
        align-items: center;
        display: flex;
        justify-content: space-between;
        width: 100%;
    }
    .reader-mobile-sheet-header > div {
        display: grid;
        gap: 2px;
    }
    .reader-mobile-sheet-header small {
        color: var(--muted-foreground);
        font-size: 10px;
        font-weight: 750;
        letter-spacing: .08em;
        text-transform: uppercase;
    }
    .reader-mobile-sheet-header h2 {
        font-size: 18px;
        line-height: 1.3;
        margin: 0;
    }
    .reader-mobile-sheet-close {
        align-items: center;
        background: var(--secondary);
        border: 0;
        border-radius: 50%;
        color: var(--secondary-foreground);
        cursor: pointer;
        display: inline-flex;
        flex: 0 0 38px;
        height: 38px;
        justify-content: center;
        width: 38px;
    }
    .reader-mobile-sheet-close .hdk-icon {
        height: 18px;
        width: 18px;
    }
    .reader-mobile-action-grid {
        display: grid;
        gap: 10px;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .reader-mobile-action-grid > button {
        align-items: center;
        aspect-ratio: 1 / .86;
        background: var(--secondary);
        border: 1px solid transparent;
        border-radius: 20px;
        color: var(--secondary-foreground);
        cursor: pointer;
        display: flex;
        flex-direction: column;
        font: inherit;
        gap: 9px;
        justify-content: center;
        min-width: 0;
        padding: 12px 6px;
    }
    .reader-mobile-action-grid > button:active {
        border-color: var(--primary);
        color: var(--primary);
        transform: scale(.97);
    }
    .reader-mobile-action-grid > button > span {
        align-items: center;
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: 15px;
        display: inline-flex;
        height: 42px;
        justify-content: center;
        width: 42px;
    }
    .reader-mobile-action-grid .hdk-icon {
        height: 20px;
        width: 20px;
    }
    .reader-mobile-action-grid strong {
        font-size: 11px;
        font-weight: 700;
    }
    .reader-settings-mobile-header,
    .reader-mobile-setting-group,
    .reader-mobile-line-height,
    .reader-mobile-voice-list {
        display: flex;
    }
    .reader-mobile-setting-group {
        flex-direction: column;
        gap: 7px;
    }
    .reader-mobile-setting-group > span,
    .reader-mobile-line-height > span {
        color: var(--muted-foreground);
        font-size: 11px;
        font-weight: 750;
    }
    .reader-mobile-segmented,
    .reader-mobile-font-grid {
        display: grid;
        gap: 6px;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .reader-mobile-font-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .reader-mobile-segmented button,
    .reader-mobile-font-grid button {
        background: var(--secondary);
        border: 1px solid transparent;
        border-radius: 12px;
        color: var(--secondary-foreground);
        cursor: pointer;
        font: inherit;
        font-size: 11px;
        min-height: 42px;
        padding: 7px;
    }
    .reader-mobile-segmented button.is-active,
    .reader-mobile-font-grid button.is-active {
        background: var(--primary);
        border-color: var(--primary);
        color: var(--primary-foreground);
    }
    .reader-settings-panel > label:not(.reader-mobile-line-height) {
        display: none;
    }
    .reader-mobile-line-height {
        flex-direction: column;
        gap: 8px;
    }
    .reader-mobile-line-height > span {
        display: flex;
        justify-content: space-between;
    }
    .reader-mobile-line-height input {
        accent-color: var(--primary);
        width: 100%;
    }
    .reader-settings-themes {
        gap: 7px;
    }
    .reader-settings-themes > div {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .reader-settings-themes button {
        justify-content: center;
        min-height: 44px;
    }
    .reader-mobile-socials {
        display: grid;
        gap: 8px;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .reader-mobile-socials button {
        align-items: center;
        background: transparent;
        border: 0;
        color: var(--foreground);
        cursor: pointer;
        display: flex;
        flex-direction: column;
        font: inherit;
        font-size: 10px;
        gap: 7px;
        min-width: 0;
    }
    .reader-mobile-socials button > span {
        align-items: center;
        background: var(--secondary);
        border: 1px solid var(--border);
        border-radius: 50%;
        display: inline-flex;
        font-size: 18px;
        font-weight: 850;
        height: 48px;
        justify-content: center;
        width: 48px;
    }
    .reader-mobile-socials .hdk-icon {
        height: 19px;
        width: 19px;
    }
    .reader-mobile-copy-row {
        background: var(--secondary);
        border: 1px solid var(--border);
        border-radius: 14px;
        display: flex;
        gap: 6px;
        padding: 5px;
    }
    .reader-mobile-copy-row input {
        background: transparent;
        border: 0;
        color: var(--muted-foreground);
        flex: 1;
        font: inherit;
        font-size: 11px;
        min-width: 0;
        outline: 0;
        padding: 0 8px;
    }
    .reader-mobile-copy-row button {
        background: var(--primary);
        border: 0;
        border-radius: 10px;
        color: var(--primary-foreground);
        cursor: pointer;
        font: inherit;
        font-size: 11px;
        font-weight: 750;
        min-height: 38px;
        padding: 0 12px;
    }
    .reader-auto-scroll-status {
        align-items: center;
        background: color-mix(in oklch, var(--muted) 88%, transparent);
        border: 1px solid var(--border);
        border-radius: 14px;
        color: var(--muted-foreground);
        display: flex;
        font-size: 12px;
        font-weight: 750;
        gap: 8px;
        min-height: 46px;
        padding: 10px 13px;
    }
    .reader-auto-scroll-status i {
        background: var(--muted-foreground);
        border-radius: 50%;
        height: 8px;
        width: 8px;
    }
    .reader-auto-scroll-status.is-scrolling {
        background: color-mix(in oklch, #14b8a6 13%, var(--card));
        border-color: color-mix(in oklch, #14b8a6 38%, var(--border));
        color: #0f8f83;
    }
    .reader-auto-scroll-status.is-scrolling i {
        animation: readerScrollPulse 1.25s ease-in-out infinite;
        background: #16a34a;
        box-shadow: 0 0 0 4px color-mix(in oklch, #16a34a 14%, transparent);
    }
    .reader-auto-scroll-speed {
        display: grid;
        gap: 10px;
    }
    .reader-auto-scroll-speed > div:first-child {
        align-items: center;
        display: flex;
        justify-content: space-between;
    }
    .reader-auto-scroll-speed label {
        font-size: 12px;
        font-weight: 700;
    }
    .reader-auto-scroll-speed output {
        color: #0f9f91;
        font-size: 15px;
        font-weight: 850;
    }
    .reader-auto-scroll-speed input[type="range"] {
        accent-color: #14b8a6;
        cursor: pointer;
        width: 100%;
    }
    .reader-auto-scroll-scale {
        color: var(--muted-foreground);
        display: flex;
        font-size: 10px;
        justify-content: space-between;
    }
    .reader-auto-scroll-actions {
        display: grid;
        gap: 9px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .reader-auto-scroll-actions button {
        align-items: center;
        border: 0;
        border-radius: 14px;
        cursor: pointer;
        display: inline-flex;
        font: inherit;
        font-size: 12px;
        font-weight: 800;
        gap: 7px;
        justify-content: center;
        min-height: 48px;
        padding: 9px 12px;
    }
    .reader-auto-scroll-actions .hdk-icon {
        height: 18px;
        width: 18px;
    }
    .reader-auto-scroll-start {
        background: #14b8a6;
        color: #fff;
    }
    .reader-auto-scroll-pause {
        background: var(--secondary);
        color: var(--secondary-foreground);
    }
    .reader-auto-scroll-actions button:disabled {
        cursor: not-allowed;
        opacity: .5;
    }
    .reader-tts {
        padding-top: 22px;
    }
    .reader-tts-mobile-close {
        display: inline-flex;
        position: absolute;
        right: 16px;
        top: 16px;
    }
    .reader-tts-heading {
        padding-right: 44px;
    }
    .reader-tts > label:first-of-type {
        display: none;
    }
    .reader-mobile-voice-list {
        flex-direction: column;
        gap: 7px;
        max-height: 290px;
        overflow-y: auto;
    }
    .reader-mobile-voice-list > label {
        align-items: center;
        background: var(--secondary);
        border: 1px solid transparent;
        border-radius: 14px;
        cursor: pointer;
        display: flex;
        gap: 11px;
        min-height: 58px;
        padding: 9px 12px;
    }
    .reader-mobile-voice-empty {
        background: var(--secondary);
        border: 1px solid var(--border);
        border-radius: 14px;
        color: var(--muted-foreground);
        font-size: 11px;
        line-height: 1.5;
        margin: 0;
        padding: 12px;
    }
    .reader-mobile-voice-list > label:has(input:checked) {
        background: var(--foreground);
        border-color: var(--foreground);
        color: var(--background);
    }
    .reader-mobile-voice-list > label:has(input:disabled) {
        cursor: not-allowed;
        opacity: .65;
    }
    .reader-mobile-voice-list input {
        height: 17px;
        margin: 0;
        width: 17px;
    }
    .reader-mobile-voice-list label > span {
        display: grid;
        flex: 1;
        gap: 2px;
    }
    .reader-mobile-voice-list strong {
        font-size: 12px;
    }
    .reader-mobile-voice-list small {
        color: var(--muted-foreground);
        font-size: 10px;
    }
    .reader-mobile-voice-list label:has(input:checked) small {
        color: color-mix(in oklch, var(--background) 72%, transparent);
    }
    .reader-mobile-voice-list label > i {
        display: none;
    }
    .reader-mobile-voice-list label:has(input:checked) > i {
        display: inline-flex;
    }
    .reader-mobile-voice-list .hdk-icon {
        height: 18px;
        width: 18px;
    }
    #report-modal {
        z-index: 1200 !important;
    }
}

@media (max-width: 420px) {
    .reader-mobile-sheet,
    .reader-settings-panel,
    .reader-tts {
        border-radius: 20px;
        padding: 16px;
        width: calc(100vw - 16px);
    }
    .reader-tts-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .reader-tts-actions .btn {
        min-width: 0;
        padding-inline: 10px;
        white-space: normal;
    }
    .hd-mobile-tools-inner {
        gap: 8px;
        left: 8px;
        right: 8px;
    }
    .hd-mobile-tools-tts-btn {
        flex-basis: 54px;
        height: 54px;
        width: 54px;
    }
    .reader-auto-scroll-floating-stop {
        height: 46px;
        right: 8px;
        width: 46px;
    }
    .reader-end-action-bar button {
        flex-direction: column;
        font-size: 10px;
        gap: 4px;
        min-height: 58px;
        padding: 7px 4px;
        text-align: center;
    }
    .reader-end-action-bar button span {
        line-height: 1.25;
    }
}

@media (prefers-reduced-motion: reduce) {
    .reader-mobile-modal-overlay,
    .reader-mobile-sheet,
    .reader-settings-panel,
    .reader-tts {
        animation: none;
    }
}

@keyframes readerModalIn {
    from { opacity: 0; transform: translate(-50%, -45%) scale(.96); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes readerOverlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes readerScrollPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(.75); opacity: .7; }
}

.reader-theme-btn.active {
    background: var(--color-primary);
    color: var(--color-on-primary);
}

/* ===== Reader Content ===== */
.reader-navigation-top {
    display: block;
    text-align: center;
}

.reader-navigation-top > div {
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    min-width: 0;
}

.hd-trang-truyen-chi-tiet-progress {
    background: color-mix(in srgb, var(--border) 72%, transparent);
    height: 4px;
    inset: 0 0 auto;
    opacity: 1;
    overflow: hidden;
    pointer-events: none;
    position: fixed;
    transition: opacity .18s ease;
    z-index: 1201;
}

.hd-trang-truyen-chi-tiet-progress.is-visible {
    opacity: 1;
}

body.admin-bar .hd-trang-truyen-chi-tiet-progress {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .hd-trang-truyen-chi-tiet-progress {
        top: 46px;
    }
}

.hd-trang-truyen-chi-tiet-progress-bar {
    background: var(--primary);
    box-shadow: 0 0 10px color-mix(in srgb, var(--primary) 48%, transparent);
    height: 100%;
    max-width: 100%;
    transition: width .1s linear;
}

.hd-trang-truyen-chi-tiet-progress.is-complete .hd-trang-truyen-chi-tiet-progress-bar {
    background: var(--color-success);
}

.chapter-content {
    transition: filter .14s ease, font-size .15s, line-height .15s;
    word-wrap: break-word;
}

#chapter-content.is-reader-content-blurred {
    filter: blur(9px);
}

@media (prefers-reduced-motion: reduce) {
    .hd-trang-truyen-chi-tiet-progress,
    .hd-trang-truyen-chi-tiet-progress-bar,
    .chapter-content {
        transition: none;
    }
}

@media (max-width: 768px) {
    .reader-heading { margin-bottom: 16px; padding: 0 4px; }
    .reader-heading .reader-title { font-size: 1.45rem; }
    .reader-chapter-nav {
        gap: 7px;
        grid-template-columns: 46px minmax(0, 1fr) 46px;
        margin-bottom: 10px;
    }
    .reader-chapter-nav-btn {
        min-height: 46px;
        padding: 0;
        width: 46px;
    }
    .reader-chapter-nav-btn > span { display: none; }
    .reader-chapter-select-wrap { padding-left: 10px; }
    .reader-chapter-select-wrap select { font-size: 11px; padding-right: 27px; }
    .reader-chapter-select-wrap::after { right: 11px; }
    .reader-chapter-nav-bottom { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .reader-chapter-nav-bottom .reader-chapter-nav-btn { width: 100%; }
    .reader-chapter-nav-bottom .reader-chapter-nav-btn > span { display: inline; font-size: 10px; }
    .reader-chapter-nav-bottom .reader-chapter-nav-btn { flex-direction: column; gap: 3px; min-height: 58px; }
    .reader-comments { border-radius: var(--radius); padding: 16px 12px; }
    .reader-comments-header { align-items: stretch; flex-direction: column; gap: 10px; }
    .reader-comment-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .reader-comment-filters a { text-align: center; }
    .reader-comment-form > div:last-child { align-items: flex-end; }
    .reader-comment-form small { max-width: 55%; }
    .reader-comment-login { align-items: flex-start; flex-wrap: wrap; }
    .reader-comment-login > a { margin-left: 36px; }
    .reader-comment-card { gap: 9px; }
    .reader-comment-card > img { flex-basis: 36px; height: 36px; width: 36px; }
    .reader-navigation-top .reader-title {
        overflow-wrap: anywhere;
        text-align: center;
    }
}

.chapter-content img,
#chapter-content img {
    display: block;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    margin: 16px auto;
}

.chapter-content figure,
#chapter-content figure {
    margin: 18px auto;
    max-width: 100%;
}

.chapter-content figure img,
#chapter-content figure img {
    margin: 0 auto;
}

.chapter-content iframe,
.chapter-content video,
#chapter-content iframe,
#chapter-content video {
    display: block;
    max-width: 100%;
    margin: 16px auto;
}

.chapter-content table,
#chapter-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

/* ===== Reader Themes ===== */
.reader-theme-dark #chapter-content {
    background: #1a1a1a !important;
    color: #d4d4d4 !important;
}

.reader-theme-sepia #chapter-content {
    background: #F4ECD8 !important;
    color: #5B4636 !important;
}

/* ===== Story chapter access labels ===== */
.story-chapter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    padding: 8px 12px;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-sm);
}

.story-chapter-item.is-locked {
    background: var(--color-bg-tertiary);
}

.story-chapter-link {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    color: var(--color-text-primary);
    text-decoration: none;
    font-size: 14px;
}

.story-chapter-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.story-chapter-state-icon {
    display: inline-flex;
    flex: 0 0 auto;
    margin-right: 6px;
}

.chapter-access-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 0 0 auto;
    margin-left: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    white-space: nowrap;
    font-size: var(--font-size-xs);
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
}

.chapter-access-label .hdk-icon {
    width: 15px;
    height: 15px;
}

.chapter-access-free {
    color: var(--color-success);
    background: color-mix(in srgb, var(--color-success) 10%, transparent);
}

.chapter-access-price {
    color: var(--color-warning);
    border: 1px solid color-mix(in srgb, var(--color-warning) 35%, transparent);
    background: color-mix(in srgb, var(--color-warning) 8%, transparent);
}

a.chapter-access-price:hover,
.chapter-purchase-button:hover {
    color: var(--color-warning);
    background: color-mix(in srgb, var(--color-warning) 15%, transparent);
}

.chapter-purchase-button {
    appearance: none;
    font-family: inherit;
    cursor: pointer;
}

.chapter-purchase-button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.chapter-purchase-confirm-modal {
    align-items: center;
    background: var(--color-overlay);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    position: fixed;
    z-index: 1200;
}
.chapter-purchase-confirm-modal[hidden] { display: none; }
body.chapter-purchase-confirm-open { overflow: hidden; }
.chapter-purchase-confirm-dialog {
    animation: modalIn .2s ease;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    color: var(--color-text);
    max-height: calc(100dvh - 32px);
    max-width: min(420px, calc(100vw - 32px));
    overflow-y: auto;
    overscroll-behavior: contain;
    width: 100%;
}
.chapter-purchase-confirm-dialog form { padding: 20px; }
.chapter-purchase-confirm-heading,
.chapter-purchase-confirm-heading > div,
.chapter-purchase-confirm-actions {
    align-items: center;
    display: flex;
}
.chapter-purchase-confirm-heading { justify-content: space-between; gap: 12px; }
.chapter-purchase-confirm-heading > div { gap: 9px; min-width: 0; }
.chapter-purchase-confirm-heading span { color: var(--color-primary); display: inline-flex; }
.chapter-purchase-confirm-heading h2 { font-size: 1.05rem; margin: 0; }
.chapter-purchase-confirm-heading > button {
    background: transparent;
    border: 0;
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 1.5rem;
    height: 36px;
    line-height: 1;
    width: 36px;
}
.chapter-purchase-confirm-heading > button:hover { background: var(--color-bg-muted); color: var(--color-text); }
.chapter-purchase-confirm-dialog [data-purchase-chapter] { font-weight: 700; line-height: 1.45; margin: 20px 0 4px; }
.chapter-purchase-confirm-price { color: var(--color-primary); font-size: 1.25rem; font-weight: 800; margin: 0; }
.chapter-purchase-confirm-note { color: var(--color-text-muted); font-size: .875rem; line-height: 1.5; margin: 16px 0 0; }
.chapter-purchase-confirm-actions { gap: 10px; justify-content: flex-end; margin-top: 20px; }
.chapter-purchase-confirm-actions .btn { min-height: 42px; }
@media (max-width: 480px) {
    .chapter-purchase-confirm-dialog { max-width: 100%; }
    .chapter-purchase-confirm-dialog form { padding: 18px; }
    .chapter-purchase-confirm-actions .btn { flex: 1; min-height: 44px; }
}

.chapter-access-combo {
    color: var(--color-text-muted);
    background: var(--color-bg-secondary);
}

/* ===== Chapter list modal ===== */
.toc-float-btn {
    transition: transform 0.2s, opacity 0.2s;
}

.toc-float-btn:hover {
    transform: scale(1.1);
}

.toc-overlay {
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    background: color-mix(in oklch, var(--foreground) 40%, transparent);
    inset: 0;
    position: fixed;
    z-index: 1090;
}
.toc-overlay[hidden],
.toc-dialog[hidden] {
    display: none !important;
}
.toc-dialog {
    animation: readerModalIn .24s cubic-bezier(.2, .8, .2, 1);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 24px 70px color-mix(in oklch, var(--foreground) 24%, transparent);
    display: flex;
    flex-direction: column;
    gap: 14px;
    left: 50%;
    max-height: min(720px, calc(100dvh - 32px));
    max-width: 680px;
    padding: 20px;
    position: fixed;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(100vw - 32px);
    z-index: 1100;
}
.toc-dialog-header {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    justify-content: space-between;
}
.toc-dialog-header > div { display: grid; gap: 2px; }
.toc-dialog-header small {
    color: var(--muted-foreground);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.toc-dialog-header h2 {
    font-size: 18px;
    line-height: 1.3;
    margin: 0;
}
.toc-dialog-header .reader-mobile-sheet-close {
    align-items: center;
    background: var(--secondary);
    border: 0;
    border-radius: 50%;
    color: var(--secondary-foreground);
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 38px;
    height: 38px;
    justify-content: center;
    width: 38px;
}
#toc-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.toc-chapter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--color-text-primary);
    transition: background 0.15s;
}

.toc-chapter:hover {
    background: var(--color-bg-secondary);
}

.toc-chapter.current {
    background: var(--color-primary-light);
    font-weight: 600;
}

.toc-chapter-num {
    min-width: 36px;
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}
.toc-chapter-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.toc-chapter-status {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.toc-chapter-status .hdk-icon {
    width: 15px;
    height: 15px;
}

.toc-chapter-status.is-free {
    color: var(--color-success);
}

.toc-chapter-status.is-paid {
    color: var(--color-warning);
}

.toc-chapter-status.is-combo {
    color: var(--color-text-muted);
}

/* ===== Mobile Reader ===== */
@media (max-width: 768px) {
    .reader-settings {
        gap: 4px;
        padding: 6px 10px;
    }
    
    .reader-settings select {
        max-width: 90px;
    }
    
    .toc-dialog {
        border-radius: 22px;
        max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
        padding: 18px 14px;
        width: calc(100vw - 24px);
    }

    #toc-list {
        gap: 8px !important;
    }

    .toc-chapter {
        background: var(--secondary);
        border: 1px solid transparent;
        border-radius: 15px;
        min-height: 54px;
        padding: 10px 12px;
    }

    .toc-chapter.current {
        background: color-mix(in oklch, #14b8a6 10%, var(--card));
        border-color: #14b8a6;
        box-shadow: 0 0 0 1px color-mix(in oklch, #14b8a6 35%, transparent);
        color: var(--foreground);
    }

    .toc-chapter.current .toc-chapter-num {
        color: #0f9f91;
    }
    
    .toc-float-btn {
        right: 8px;
        bottom: 60px;
        width: 42px;
        height: 42px;
    }

    .chapter-content,
    #chapter-content {
        padding: 18px !important;
    }
}

@media print {
    .reader-settings,
    .toc-float-btn,
    .toc-dialog,
    .toc-overlay {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .toc-dialog,
    .toc-overlay {
        animation: none;
    }
}

/* ===== Notification Bell ===== */
#notif-bell {
    position: relative;
}

#notif-badge {
    pointer-events: none;
}

.notif-item:hover {
    background: var(--color-bg-secondary) !important;
}

@media (max-width: 768px) {
    #notif-dropdown {
        position: fixed;
        top: calc(var(--header-top) + var(--header-height));
        right: 4px;
        left: 4px;
        min-width: auto;
        max-width: none;
    }
}

/* ===== Report Modal ===== */
#report-modal > div {
    animation: modalIn 0.2s ease;
}

@media (max-width: 768px) {
    .hdk-avatar-upload {
        flex-direction: column;
        align-items: flex-start;
    }
    .hdk-avatar-dropzone {
        width: 100%;
        min-width: auto;
    }
}

/* ===== Female Novel Home ===== */
.female-novel-home {
    background: linear-gradient(180deg, #fdf2f7 0%, var(--color-bg-secondary) 100%);
    padding: 32px 0 48px;
    transition: background 0.3s;
}
html[data-theme="dark"] .female-novel-home {
    background: linear-gradient(180deg, #2d1f28 0%, var(--color-bg-secondary) 100%);
}

.fnh-container {
    max-width: none;
    margin: 0 auto;
    padding: 0 64px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    align-items: start;
}

.fnh-main {
    min-width: 0;
    grid-column: 1 / -1;
}

.fnh-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    grid-column: 1 / -1;
}

/* ---- FNH Section Header ---- */
.fnh-section {
    margin-bottom: 32px;
}
.fnh-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.fnh-section-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 14px;
    position: relative;
}
.fnh-section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 22px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--color-primary), var(--color-primary-hover));
}
.fnh-section-title .hdk-icon {
    font-size: 1.1em;
    color: var(--color-primary);
}
.fnh-section-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}
.fnh-section-link:hover {
    color: var(--color-primary);
}
.fnh-section-link .hdk-icon {
    font-size: 14px;
}

/* ---- Đề cử hôm nay Block ---- */
.fnh-picks-block {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 32px;
}
.fnh-picks-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.fnh-picks-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--color-text-primary);
}
.fnh-picks-title .hdk-icon {
    color: var(--color-primary);
}
.fnh-picks-block .fnh-feature-card {
    border: none;
    background: transparent;
}
.fnh-picks-block .fnh-feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 1px 6px 20px -5px rgba(96,28,28,0.18);
}

/* ---- Picks Marquee Carousel ---- */
@keyframes fnh-picks-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.fnh-picks-marquee {
    overflow: hidden;
}
.fnh-picks-track {
    display: flex;
    animation: fnh-picks-scroll 60s linear infinite;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}
.fnh-picks-track:hover {
    animation-play-state: paused;
}
.fnh-picks-group {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
    padding-right: 12px;
}
.fnh-picks-group .fnh-feature-card {
    width: 160px;
    flex-shrink: 0;
}
@media (prefers-reduced-motion: reduce) {
    .fnh-picks-track {
        animation: none !important;
        transform: none !important;
    }
    .fnh-picks-marquee {
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }
    .fnh-picks-group[aria-hidden="true"] {
        display: none;
    }
    .fnh-picks-group .fnh-feature-card {
        scroll-snap-align: start;
    }
}

/* ---- Quick Categories ---- */
.fnh-categories {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 10px 12px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.fnh-categories::-webkit-scrollbar {
    display: none;
}
.fnh-cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 18px 10px;
    flex: 0 0 auto;
    min-width: 90px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--color-text-primary);
    transition: background 0.2s, transform 0.25s var(--motion-ease-out);
    scroll-snap-align: start;
}
.fnh-cat-card:hover {
    background: var(--color-bg-tertiary);
    transform: translateY(-2px);
}
.fnh-cat-icon {
    font-size: 26px;
    color: var(--color-primary);
    transition: transform 0.3s;
}
.fnh-cat-card:hover .fnh-cat-icon {
    transform: scale(1.12);
}
.fnh-cat-name {
    font-size: var(--font-size-xs);
    font-weight: 600;
    white-space: nowrap;
}

/* Desktop: 12 items stretch to fill the row */
@media (min-width: 1025px) {
    .fnh-categories {
        justify-content: space-between;
        overflow-x: visible;
    }
    .fnh-cat-card {
        flex: 1 1 0;
        min-width: 0;
        padding: 12px 8px 10px;
    }
}

/* ---- Feature Cards (Đề cử) ---- */
.fnh-feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.fnh-feature-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    color: var(--color-text-primary);
    transition: transform 0.3s var(--motion-ease-out), box-shadow 0.3s, border-color 0.3s;
}
.fnh-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 1px 8px 24px -6px rgba(96,28,28,0.20);
    border-color: var(--color-primary);
}
.fnh-feature-cover {
    position: relative;
    overflow: hidden;
    width: 100%;
    min-width: 0;
}
.fnh-feature-cover img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
    transition: transform 0.4s var(--motion-ease-out);
}
.fnh-feature-card:hover .fnh-feature-cover img {
    transform: scale(1.06);
}
.fnh-feature-rating {
    position: absolute;
    top: 6px;
    left: 6px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: rgba(0,0,0,0.62);
    color: var(--color-primary);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    line-height: 1;
}
.fnh-feature-rating .hdk-icon {
    font-size: 10px;
}
.fnh-feature-cover-meta {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    padding: 6px 8px;
    background: linear-gradient(transparent, rgba(0,0,0,0.72));
    color: #fff;
    font-size: var(--font-size-xs);
    font-weight: 600;
    line-height: 1;
    overflow: hidden;
}
.fnh-feature-cover-meta .hdk-icon {
    font-size: 11px;
}
.fnh-feature-cover-meta > span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.fnh-feature-body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.fnh-feature-title {
    font-size: var(--font-size-sm);
    font-weight: 700;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-width: 0;
    word-break: break-word;
}
.fnh-feature-status {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    margin-top: 2px;
    min-width: 0;
    overflow: hidden;
}
.fnh-feature-status .badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 10px;
    min-height: 18px;
}
.fnh-feature-status > .badge:first-child {
    flex-shrink: 0;
}
.fnh-feature-genre {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- Hot Cards ---- */
.fnh-hot-block {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 32px;
}
.fnh-hot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.fnh-hot-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--color-text-primary);
}
.fnh-hot-label .hdk-icon {
    color: var(--color-primary);
}
.fnh-hot-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
/* ---- Hot + Rank Row ---- */
.fnh-hot-rank-row {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    align-items: stretch;
}
.fnh-hot-rank-row .fnh-hot-block {
    margin-bottom: 0;
}
.fnh-hot-rank-row .fnh-top-stories {
    margin-bottom: 0;
    overflow-y: auto;
}
.fnh-hot-content {
    display: flex;
    gap: 14px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    padding: 14px;
    text-decoration: none;
    color: var(--color-text-primary);
    transition: transform 0.3s var(--motion-ease-out), box-shadow 0.3s, border-color 0.3s;
    overflow: hidden;
}
.fnh-hot-content:hover {
    transform: translateY(-3px);
    box-shadow: 1px 8px 24px -6px rgba(96,28,28,0.20);
    border-color: var(--color-primary);
}
.fnh-hot-cover {
    flex: 0 0 35%;
    min-width: 0;
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.fnh-hot-cover img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
    transition: transform 0.4s var(--motion-ease-out);
}
.fnh-hot-content:hover .fnh-hot-cover img {
    transform: scale(1.06);
}
.fnh-hot-rank {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--color-primary);
    color: var(--color-on-primary);
    font-size: 11px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 0 0 var(--radius-sm) 0;
    line-height: 1;
}
.fnh-hot-body {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.fnh-hot-title {
    font-size: var(--font-size-base);
    font-weight: 700;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}
.fnh-hot-author {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-bottom: 8px;
}
.fnh-hot-summary {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: auto;
}
.fnh-hot-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-top: 8px;
}
.fnh-hot-meta .hdk-icon {
    font-size: 11px;
}

/* ---- Latest List ---- */
.fnh-latest-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 8px;
}
.fnh-latest-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--color-text-primary);
    transition: background 0.2s;
}
.fnh-latest-row:hover {
    background: var(--color-bg-tertiary);
}
.fnh-latest-thumb {
    flex: 0 0 48px;
    width: 48px;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 6px;
}
.fnh-latest-info {
    flex: 1;
    min-width: 0;
}
.fnh-latest-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}
.fnh-latest-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}
.fnh-latest-chapter {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 140px;
}

/* ---- Grid Cards (Completed) ---- */
.fnh-grid-wrap {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.fnh-grid-card {
    display: block;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    color: var(--color-text-primary);
    transition: transform 0.3s var(--motion-ease-out), box-shadow 0.3s;
}
.fnh-grid-card:hover {
    transform: translateY(-4px);
    box-shadow: 1px 8px 24px -6px rgba(96,28,28,0.20);
}
.fnh-grid-cover {
    overflow: hidden;
}
.fnh-grid-cover img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
    transition: transform 0.4s var(--motion-ease-out);
}
.fnh-grid-card:hover .fnh-grid-cover img {
    transform: scale(1.06);
}
.fnh-grid-body {
    padding: 10px 12px 12px;
}
.fnh-grid-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}
.fnh-grid-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}

/* ---- Sidebar ---- */
.fnh-sidebar-block {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px;
}
.fnh-sidebar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-size-base);
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--color-text-primary);
}
.fnh-sidebar-title .hdk-icon {
    color: var(--color-primary);
}
.fnh-sidebar-desc {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-bottom: 12px;
    line-height: 1.5;
}
.fnh-sidebar-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    margin-top: 12px;
    transition: opacity 0.2s;
}
.fnh-sidebar-more:hover {
    opacity: 0.8;
}
.fnh-sidebar-more .hdk-icon {
    font-size: 12px;
}

/* ---- Reading List ---- */
.fnh-reading-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.fnh-reading-item {
    display: flex;
    gap: 10px;
    padding: 8px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--color-text-primary);
    transition: background 0.2s;
}
.fnh-reading-item:hover {
    background: var(--color-bg-tertiary);
}
.fnh-reading-item img {
    flex: 0 0 44px;
    width: 44px;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 6px;
}
.fnh-reading-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.fnh-reading-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.fnh-reading-chapter {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}
.fnh-reading-bar {
    display: block;
    height: 3px;
    background: var(--color-border);
    border-radius: 2px;
    margin-top: 2px;
    overflow: hidden;
}
.fnh-reading-bar i {
    display: block;
    height: 100%;
    background: var(--color-primary);
    border-radius: 2px;
    transition: width 0.3s;
}

/* ---- Ranking Tabs ---- */
.fnh-rank-tabs {
    display: flex;
    gap: 4px;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-pill);
    padding: 3px;
    margin-bottom: 12px;
}
.fnh-rank-tab {
    flex: 1;
    min-height: 32px;
    padding: 6px 8px;
    border: none;
    background: transparent;
    border-radius: var(--radius-pill);
    font-family: var(--font-family);
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.fnh-rank-tab:hover {
    color: var(--color-text-primary);
}
.fnh-rank-tab[aria-selected="true"] {
    background: var(--color-primary);
    color: var(--color-on-primary);
}
.fnh-rank-panel.hidden {
    display: none;
}

/* ---- Ranking Items ---- */
.fnh-ranking-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--color-text-primary);
    transition: background 0.2s;
}
.fnh-ranking-item:hover {
    background: var(--color-bg-tertiary);
}
.fnh-ranking-num {
    flex: 0 0 24px;
    width: 24px;
    text-align: center;
    font-size: var(--font-size-sm);
    font-weight: 800;
    color: var(--color-text-muted);
}
.fnh-rank-top .fnh-ranking-num {
    color: var(--color-primary);
}
.fnh-ranking-thumb {
    flex: 0 0 40px;
    width: 40px;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 6px;
}
.fnh-ranking-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.fnh-ranking-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.fnh-ranking-meta {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fnh-ranking-views {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
    flex-shrink: 0;
}
.fnh-ranking-views .hdk-icon {
    font-size: 10px;
}

/* ---- Daily Claim Button ---- */
.fnh-daily-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 42px;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
    color: var(--color-on-primary);
    border: none;
    border-radius: var(--radius-pill);
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
}
.fnh-daily-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    color: var(--color-on-primary);
}
.fnh-daily-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.fnh-daily-guest {
    background: var(--color-bg-tertiary);
    color: var(--color-primary);
    border: 2px dashed var(--color-primary);
}
.fnh-daily-guest:hover {
    color: var(--color-primary-hover);
}

/* ---- Empty State ---- */
.fnh-empty {
    text-align: center;
    padding: 24px 0;
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .fnh-container {
        padding: 0 32px;
        grid-template-columns: minmax(0, 1fr) 260px;
        gap: 20px;
    }
    .fnh-hot-block {
        padding: 12px;
        margin-bottom: 20px;
    }
    .fnh-picks-group {
        gap: 10px;
        padding-right: 10px;
    }
    .fnh-picks-group .fnh-feature-card {
        width: 140px;
    }
    .fnh-latest-list {
        grid-template-columns: repeat(2, 1fr);
    }
    .fnh-grid-wrap {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .female-novel-home {
        padding: 20px 0 32px;
    }
    .fnh-container {
        padding: 0 12px;
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .fnh-categories {
        padding: 8px 10px;
        gap: 8px;
        margin-bottom: 16px;
    }
    .fnh-cat-card {
        padding: 10px 14px 8px;
        min-width: 76px;
    }
    .fnh-cat-icon {
        font-size: 22px;
    }
    .fnh-picks-block {
        padding: 12px;
        margin-bottom: 20px;
    }
    .fnh-picks-title {
        font-size: 1.3rem;
    }
    .fnh-picks-group {
        gap: 8px;
        padding-right: 8px;
    }
    .fnh-picks-group .fnh-feature-card {
        width: 120px;
    }
    .fnh-hot-rank-row {
        flex-direction: column;
    }
    .fnh-hot-rank-row .fnh-hot-block,
    .fnh-hot-rank-row .fnh-top-stories {
        flex: none !important;
    }
    .fnh-section {
        margin-bottom: 24px;
    }
    .fnh-section-title {
        font-size: var(--font-size-lg);
        padding-left: 12px;
    }
    .fnh-section-title::before {
        height: 18px;
        width: 3px;
    }

    /* Hot cards: 1 column (no grid change needed) */

    /* Latest list: 2 -> 1 column */
    .fnh-latest-list {
        grid-template-columns: 1fr;
    }

    /* Grid cards: 4 -> 2 columns */
    .fnh-grid-wrap {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .fnh-grid-body {
        padding: 8px 10px 10px;
    }
}

@media (max-width: 430px) {
    .fnh-container {
        padding: 0 8px;
    }
    .fnh-categories {
        padding: 6px 8px;
        gap: 6px;
    }
    .fnh-cat-card {
        padding: 8px 12px 6px;
        min-width: 68px;
    }
    .fnh-cat-icon {
        font-size: 20px;
    }
    /* Picks marquee: smaller cards */
    .fnh-picks-group {
        gap: 6px;
        padding-right: 6px;
    }
    .fnh-picks-group .fnh-feature-card {
        width: 100px;
    }
    /* Grid cards remain 2 columns */
    .fnh-grid-wrap {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

@media (max-width: 375px) {
    .fnh-container {
        padding: 0 8px;
    }
    .fnh-categories {
        padding: 6px 6px;
        gap: 6px;
        border-radius: var(--radius-md);
    }
    .fnh-cat-card {
        padding: 8px 10px 6px;
        min-width: 64px;
        gap: 4px;
    }
    .fnh-cat-icon {
        font-size: 18px;
    }
    .fnh-hot-body {
        gap: 2px;
    }
    .fnh-hot-summary {
        display: none;
    }
}

/* ===== Elegant Luxury visual language ===== */
body {
    background-color: var(--color-bg-secondary);
    background-image:
        radial-gradient(circle at 8% 0%, rgba(155, 44, 44, 0.045), transparent 24rem),
        radial-gradient(circle at 92% 18%, rgba(183, 121, 31, 0.055), transparent 22rem);
    font-size: 14px;
}

h1, h2, h3,
.site-logo,
.banner-title,
.fnh-picks-title,
.fnh-hot-label,
.fnh-section-title,
.fnh-sidebar-title {
    font-family: var(--font-serif);
    letter-spacing: -0.025em;
}

:where(a, button, input, select, textarea):focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
}

.site-header {
    background: color-mix(in srgb, var(--color-bg) 94%, transparent);
    border-color: var(--color-border);
    box-shadow: var(--shadow-md);
}
.site-logo {
    letter-spacing: -0.035em;
}
.site-logo .hdk-icon {
    color: #b7791f;
}
.main-nav .btn-ghost {
    position: relative;
}
.main-nav .btn-ghost::after {
    background: var(--color-primary);
    bottom: 5px;
    content: "";
    height: 1px;
    left: 16px;
    position: absolute;
    right: 16px;
    transform: scaleX(0);
    transition: transform 180ms ease;
}
.main-nav .btn-ghost:hover::after,
.main-nav .btn-ghost:focus-visible::after {
    transform: scaleX(1);
}

.btn {
    letter-spacing: 0.01em;
}
.btn-primary {
    box-shadow: 1px 3px 12px -4px rgba(96, 28, 28, 0.38);
}
.btn-primary:hover {
    box-shadow: 1px 5px 16px -4px rgba(96, 28, 28, 0.42);
    transform: translateY(-1px);
}
.btn-outline {
    border-width: 1px;
}

.hero-banner {
    background-image: linear-gradient(180deg, var(--color-banner-bg), var(--color-bg-secondary));
    padding-top: 34px;
}
.hero-banner::before {
    background: radial-gradient(circle, rgba(155, 44, 44, 0.08), transparent 70%);
}
.hero-banner::after {
    background: radial-gradient(circle, rgba(183, 121, 31, 0.10), transparent 70%);
}
.hero-banner .banner-shell {
    border-radius: var(--radius-lg);
}
.hero-banner .banner-shell::after {
    display: none;
}
.hero-banner .banner-nomination-badge {
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.hero-banner .banner-title {
    font-size: clamp(2rem, 3vw, 2.75rem);
    font-weight: 700;
    line-height: 1.18;
}
.hero-banner .banner-cover-img,
.hero-banner .banner-card,
.banner-mobile-hero-card {
    border-radius: var(--radius-md);
}
.hero-banner .banner-card-rank {
    border-radius: var(--radius-sm);
}

.female-novel-home,
html[data-theme="dark"] .female-novel-home {
    background: transparent;
}
.fnh-categories,
.fnh-picks-block,
.fnh-hot-block,
.fnh-latest-list,
.fnh-sidebar-block,
.panel,
.card {
    box-shadow: var(--shadow-sm);
}
.fnh-categories {
    border-radius: var(--radius-md);
    padding-block: 8px;
}
.fnh-cat-card {
    border-radius: var(--radius-sm);
}
.fnh-cat-icon,
.fnh-picks-title .hdk-icon,
.fnh-hot-label .hdk-icon,
.fnh-section-title .hdk-icon,
.fnh-sidebar-title .hdk-icon {
    color: #b7791f;
}
.fnh-picks-title,
.fnh-hot-label {
    font-size: clamp(1.4rem, 2vw, 1.75rem);
}
.fnh-section-title::before {
    background: var(--color-primary);
    border-radius: 0;
    width: 2px;
}
.fnh-feature-card:hover,
.fnh-hot-content:hover,
.fnh-grid-card:hover,
.story-card:hover {
    border-color: color-mix(in srgb, var(--color-primary) 55%, var(--color-border));
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}
.fnh-feature-card:hover .fnh-feature-cover img,
.fnh-hot-content:hover .fnh-hot-cover img,
.fnh-grid-card:hover .fnh-grid-cover img,
.story-card:hover .card-img {
    filter: saturate(0.9) contrast(1.03);
    transform: scale(1.025);
}
.fnh-feature-rating {
    color: #f4cc72;
}
.fnh-hot-content {
    background: color-mix(in srgb, var(--color-bg) 70%, var(--color-bg-tertiary));
}
.fnh-rank-tabs {
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
}
.fnh-rank-tab {
    border-radius: var(--radius-sm);
}
.fnh-latest-row + .fnh-latest-row,
.fnh-ranking-item + .fnh-ranking-item {
    border-top: 1px solid var(--color-border-light);
}
.fnh-latest-row:hover,
.fnh-ranking-item:hover,
.fnh-reading-item:hover {
    background: color-mix(in srgb, var(--color-primary) 5%, var(--color-bg));
}
.fnh-ranking-num {
    font-family: var(--font-serif);
}

.site-footer {
    border-top: 3px solid var(--color-primary);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
}
.site-footer h4 {
    font-family: var(--font-serif);
    letter-spacing: -0.02em;
}

html[data-theme="dark"] body {
    background-image:
        radial-gradient(circle at 8% 0%, rgba(185, 67, 67, 0.07), transparent 24rem),
        radial-gradient(circle at 92% 18%, rgba(216, 174, 88, 0.06), transparent 22rem);
}
html[data-theme="dark"] .fnh-cat-icon,
html[data-theme="dark"] .fnh-picks-title .hdk-icon,
html[data-theme="dark"] .fnh-hot-label .hdk-icon,
html[data-theme="dark"] .fnh-section-title .hdk-icon,
html[data-theme="dark"] .fnh-sidebar-title .hdk-icon,
html[data-theme="dark"] .site-logo .hdk-icon {
    color: #d8ae58;
}

@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    .hero-banner {
        padding-top: 20px;
    }
    .hero-banner .banner-title {
        font-size: 1.7rem;
    }
}

/* ===== Google-only authentication ===== */
.auth-page {
    min-height: calc(100vh - var(--header-height) - 220px);
    padding-top: clamp(48px, 9vh, 96px);
}
.auth-panel {
    margin: 0 auto;
    max-width: 440px;
    padding: 36px;
    text-align: center;
}
.auth-panel h1 {
    font-size: var(--font-size-2xl);
    margin-bottom: 10px;
}
.auth-brand-mark {
    align-items: center;
    background: var(--color-primary);
    border: 3px solid color-mix(in srgb, #b7791f 72%, var(--color-bg));
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    color: var(--color-on-primary);
    display: inline-flex;
    height: 58px;
    justify-content: center;
    margin-bottom: 20px;
    width: 58px;
}
.auth-intro {
    color: var(--color-text-muted);
    line-height: 1.65;
    margin: 0 auto 26px;
    max-width: 340px;
}
.auth-error {
    background: color-mix(in srgb, var(--color-danger) 7%, var(--color-bg));
    border: 1px solid color-mix(in srgb, var(--color-danger) 45%, var(--color-border));
    border-radius: var(--radius-md);
    color: var(--color-danger);
    font-size: var(--font-size-sm);
    margin-bottom: 18px;
    padding: 12px 14px;
    text-align: left;
}
.google-login-btn {
    align-items: center;
    background: #fff;
    border: 1px solid #d6d9dc;
    border-radius: var(--radius-md);
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    color: #262626;
    display: flex;
    font-size: var(--font-size-sm);
    font-weight: 600;
    gap: 12px;
    justify-content: center;
    min-height: 48px;
    padding: 10px 18px;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
    width: 100%;
}
.google-login-btn:hover {
    border-color: #aeb2b7;
    box-shadow: var(--shadow-md);
    color: #161616;
    transform: translateY(-1px);
}
.google-login-btn svg {
    flex: 0 0 22px;
    height: 22px;
    width: 22px;
}
.auth-note {
    color: var(--color-text-muted);
    font-size: 11px;
    line-height: 1.6;
    margin: 22px auto 0;
    max-width: 340px;
}
@media (max-width: 480px) {
    .auth-page {
        padding-top: 28px;
    }
    .auth-panel {
        padding: 28px 20px;
    }
}

/* ===== Frontend bulk story import ===== */
.account-import-panel h2,
.account-import-preview h2 {
    align-items: center;
    display: flex;
    font-size: var(--font-size-xl);
    gap: 8px;
    margin-bottom: 8px;
}
.account-import-lead,
.account-import-preview-heading p,
.account-import-hint {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}
.account-import-example {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    font-family: var(--font-family);
    font-size: var(--font-size-xs);
    line-height: 1.65;
    margin: 18px 0;
    max-height: 260px;
    overflow: auto;
    padding: 14px;
    white-space: pre-wrap;
}
.account-import-file {
    align-items: center;
    background: var(--color-bg-secondary);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-md);
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
    padding: 14px;
}
.account-import-file input[type="file"] {
    color: var(--color-text-secondary);
    font: inherit;
    max-width: 100%;
}
.account-import-file small {
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
}
.account-import-divider {
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
    margin: 12px 0;
    text-align: center;
}
.account-import-divider span {
    background: var(--color-bg);
    padding: 0 10px;
}
.account-import-sample {
    font-size: var(--font-size-sm);
    margin: -6px 0 16px;
}
.account-import-text {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font: 400 var(--font-size-sm)/1.7 var(--font-family);
    min-height: 360px;
    padding: 14px;
    resize: vertical;
    width: 100%;
}
.account-import-form-footer {
    align-items: center;
    color: var(--color-text-muted);
    display: flex;
    font-size: var(--font-size-xs);
    gap: 14px;
    justify-content: space-between;
    margin-top: 14px;
}
.account-import-preview {
    margin-top: 22px;
}
.account-import-preview-heading {
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 18px;
    padding-bottom: 16px;
}
.account-import-preview-heading h2 {
    margin: 9px 0 5px;
}
.account-import-settings {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.account-import-settings p {
    min-width: 0;
}
.account-import-genre-picker,
.account-import-cover-field {
    grid-column: 1 / -1;
    min-width: 0;
}
.account-import-cover-field > label:first-child {
    display: block;
    font-size: var(--font-size-xs);
    font-weight: 600;
    margin-bottom: 6px;
}
.account-import-cover-field .account-cover-dropzone {
    max-width: 360px;
}
.account-import-cover-field .account-cover-guide {
    max-width: 360px;
}
.account-import-settings label {
    display: block;
    font-size: var(--font-size-xs);
    font-weight: 600;
    margin-bottom: 6px;
}
.account-import-settings input,
.account-import-settings select {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-primary);
    min-height: 42px;
    padding: 8px 10px;
    width: 100%;
}
.account-import-settings small {
    color: var(--color-text-muted);
    display: block;
    font-size: 10px;
    margin-top: 3px;
}
.account-import-hint {
    background: var(--color-primary-light);
    border-left: 2px solid var(--color-primary);
    margin: 18px 0 12px;
    padding: 10px 12px;
}
.account-import-chapter-table {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    max-height: 520px;
    overflow: auto;
}
.account-import-chapter-table table {
    border-collapse: collapse;
    font-size: var(--font-size-sm);
    width: 100%;
}
.account-import-chapter-table th {
    background: var(--color-bg-tertiary);
    position: sticky;
    text-align: left;
    top: 0;
    z-index: 1;
}
.account-import-chapter-table th,
.account-import-chapter-table td {
    border-bottom: 1px solid var(--color-border-light);
    padding: 10px 12px;
}
.account-import-chapter-table input {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-primary);
    max-width: 150px;
    min-height: 38px;
    padding: 6px 9px;
    width: 100%;
}
@media (max-width: 900px) {
    .account-import-settings {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 560px) {
    .account-import-settings {
        grid-template-columns: 1fr;
    }
    .account-import-form-footer {
        align-items: stretch;
        flex-direction: column;
    }
}

/* ===== UI review refinements ===== */
body {
    font-size: 15px;
    overflow-x: clip;
}
::selection {
    background: color-mix(in srgb, var(--color-primary) 22%, transparent);
}
.header-actions {
    position: relative;
}
.header-icon-button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: var(--radius-sm);
    color: var(--color-text-secondary);
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    min-height: var(--touch-target);
    min-width: var(--touch-target);
    padding: 0;
}
.header-icon-button:hover,
.header-icon-button[aria-expanded="true"] {
    background: var(--color-bg-tertiary);
    color: var(--color-primary);
}
@media (max-width: 768px) {
    body { font-size: 14px; }
    input,
    select,
    textarea { font-size: 16px; }
}
@media (hover: none) {
    .card:hover,
    .fnh-feature-card:hover,
    .fnh-hot-content:hover,
    .fnh-grid-card:hover,
    .story-card:hover,
    .btn-primary:hover {
        transform: none;
    }
}

/* ===== 2026 Editorial Library refresh ===== */
:root {
    --color-primary: #7e2332;
    --color-primary-hover: #651925;
    --color-primary-light: #f5e7e7;
    --color-text-primary: #211b1a;
    --color-text-secondary: #524846;
    --color-text-muted: #796e6b;
    --color-bg: #fffdf9;
    --color-bg-secondary: #f7f2eb;
    --color-bg-tertiary: #eee5db;
    --color-border: #dfd3c6;
    --color-border-light: #ebe3da;
    --color-rating: #b27a25;
    --color-footer-bg: #201719;
    --color-input-bg: #fffdf9;
    --color-input-border: #d9ccbf;
    --color-input-focus-ring: rgba(126, 35, 50, 0.22);
    --color-badge-primary-bg: #f5e7e7;
    --color-badge-primary-text: #7e2332;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-pill: 999px;
    --shadow-sm: 0 1px 2px rgba(49, 31, 28, 0.04), 0 8px 24px rgba(49, 31, 28, 0.045);
    --shadow-md: 0 2px 4px rgba(49, 31, 28, 0.05), 0 14px 34px rgba(49, 31, 28, 0.08);
    --shadow-lg: 0 4px 8px rgba(49, 31, 28, 0.06), 0 22px 52px rgba(49, 31, 28, 0.12);
    --header-height: 70px;
    --header-radius: 18px;
}

html[data-theme="dark"] {
    --color-primary: #d2737d;
    --color-primary-hover: #e4939b;
    --color-primary-light: #45272d;
    --color-text-primary: #fff9f2;
    --color-text-secondary: #ded3cc;
    --color-text-muted: #b9aaa2;
    --color-bg: #271f20;
    --color-bg-secondary: #1e1819;
    --color-bg-tertiary: #352a2b;
    --color-border: #4b3b3c;
    --color-border-light: #3b2f30;
    --color-footer-bg: #151011;
    --color-input-bg: #271f20;
    --color-input-border: #4b3b3c;
}

body {
    background-image:
        radial-gradient(circle at 4% 4%, rgba(126, 35, 50, 0.075), transparent 28rem),
        radial-gradient(circle at 96% 28%, rgba(178, 122, 37, 0.075), transparent 26rem);
}

.skip-link {
    background: var(--color-primary);
    border-radius: 0 0 var(--radius-sm) 0;
    color: var(--color-on-primary);
    font-weight: 700;
    left: 0;
    padding: 10px 16px;
    position: fixed;
    top: -80px;
    z-index: 2000;
}
.skip-link:focus {
    color: var(--color-on-primary);
    top: 0;
}

.site-header {
    background: color-mix(in srgb, var(--color-bg) 88%, transparent);
    border-color: color-mix(in srgb, var(--color-border) 72%, transparent);
    box-shadow: 0 14px 38px rgba(45, 27, 27, 0.10);
}
.site-header > .container {
    max-width: 1440px;
}
.site-logo {
    align-items: center;
    color: var(--color-primary);
    display: inline-flex;
    flex: 0 0 auto;
    gap: 10px;
    text-decoration: none;
}
.site-logo:hover {
    color: var(--color-primary-hover);
}
.site-logo-mark {
    align-items: center;
    background: linear-gradient(145deg, var(--color-primary), var(--color-primary-hover));
    border: 1px solid color-mix(in srgb, #c4974d 68%, var(--color-primary));
    border-radius: 11px;
    box-shadow: 0 7px 16px rgba(92, 25, 36, 0.2);
    color: #fff8ed;
    display: inline-flex;
    height: 40px;
    justify-content: center;
    width: 40px;
}
.site-logo-mark .hdk-icon {
    height: 21px;
    width: 21px;
}
.site-logo-mark img {
    display: block;
    height: 100%;
    object-fit: contain;
    width: 100%;
}
.site-logo-copy {
    display: grid;
    line-height: 1;
}
.site-logo-copy strong {
    font-size: 1.13rem;
    letter-spacing: -0.035em;
}
.site-logo-copy small {
    color: var(--color-text-muted);
    font-family: var(--font-family);
    font-size: 0.57rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    margin-top: 6px;
    text-transform: uppercase;
}
.main-nav {
    background: color-mix(in srgb, var(--color-bg-tertiary) 62%, transparent);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-pill);
    padding: 4px;
}
.main-nav .btn-ghost {
    border-radius: var(--radius-pill);
    min-height: 36px;
    padding-inline: 15px;
}
.main-nav .btn-ghost::after {
    display: none;
}
.main-nav .btn-ghost:hover,
.main-nav .btn-ghost.is-current {
    background: var(--color-bg);
    box-shadow: 0 2px 8px rgba(48, 30, 27, 0.08);
    color: var(--color-primary);
}
.header-actions > .btn-ghost,
.header-icon-button {
    border: 1px solid transparent;
    border-radius: 50%;
}
.header-actions > .btn-ghost:hover,
.header-icon-button:hover {
    border-color: var(--color-border-light);
}

.btn-primary {
    background: linear-gradient(135deg, #8f2a3b, #6f1d2a);
    box-shadow: 0 8px 18px -8px rgba(96, 23, 35, 0.72);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #7e2332, #591520);
}

.hero-banner {
    --color-banner-text: #fffaf4;
    --color-banner-text-muted: rgba(255, 247, 239, 0.72);
    --color-banner-shell-border: rgba(255, 255, 255, 0.12);
    --color-banner-card-active-border: #d5a75d;
    --color-banner-card-hover-border: rgba(213, 167, 93, 0.8);
    --color-banner-cover-border: rgba(255, 255, 255, 0.2);
    --color-banner-shell-gradient: linear-gradient(120deg, #24191c 0%, #4d2029 54%, #24191c 100%);
    --color-banner-shell-ambient: radial-gradient(circle at 62% 18%, rgba(213, 167, 93, 0.22), transparent 36%);
    background: transparent;
    padding: 42px 0 24px;
}
.hero-banner > .container {
    max-width: 1440px;
    padding: 0 24px;
}
.hero-banner .banner-shell {
    border-radius: 30px;
    box-shadow: 0 30px 70px -30px rgba(60, 16, 28, 0.68);
    min-height: 500px;
}
.hero-banner .banner-shell::before {
    background:
        linear-gradient(90deg, rgba(18, 12, 14, 0.18), transparent 42%, rgba(18, 12, 14, 0.14)),
        repeating-linear-gradient(135deg, rgba(255,255,255,0.018) 0 1px, transparent 1px 11px);
}
.hero-banner .banner-meta-badge-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 16px;
}
.hero-banner .banner-nomination-badge {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(213, 167, 93, 0.48);
    color: #f1d7a5;
}
.hero-banner .banner-slide-current {
    color: #e5bc78;
}
.hero-banner .banner-title {
    color: #fffaf4;
    font-size: clamp(2.15rem, 3.15vw, 3.15rem);
    letter-spacing: -0.045em;
    text-wrap: balance;
}
.hero-banner .banner-summary,
.hero-banner .banner-views {
    color: rgba(255, 247, 239, 0.72);
}
.hero-banner .banner-cover-img {
    border-radius: 18px;
    box-shadow: 0 28px 55px -18px rgba(0, 0, 0, 0.72);
}
.hero-banner .banner-card {
    border-radius: 13px;
}
.hero-banner .banner-card.active {
    box-shadow: 0 0 0 3px rgba(213, 167, 93, 0.16), 0 16px 30px rgba(0, 0, 0, 0.32);
}

.female-novel-home {
    padding: 28px 0 72px;
}
.fnh-container {
    max-width: 1440px;
    padding: 0 24px;
}
.fnh-categories {
    background: color-mix(in srgb, var(--color-bg) 91%, transparent);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
    padding: 8px;
}
.fnh-cat-card {
    border-radius: 12px;
    padding-block: 11px 9px;
}
.fnh-cat-card:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}
.fnh-cat-icon {
    align-items: center;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-light);
    border-radius: 50%;
    display: inline-flex;
    height: 38px;
    justify-content: center;
    width: 38px;
}
.fnh-picks-block,
.fnh-hot-block,
.fnh-latest-list,
.fnh-sidebar-block,
.panel,
.card {
    border-color: var(--color-border-light);
    border-radius: var(--radius-lg);
}
.fnh-picks-block,
.fnh-hot-block,
.fnh-sidebar-block {
    padding: clamp(16px, 2vw, 24px);
}
.fnh-picks-title,
.fnh-hot-label,
.fnh-section-title,
.fnh-sidebar-title {
    letter-spacing: -0.035em;
}
.fnh-picks-title::after,
.fnh-hot-label::after {
    background: linear-gradient(90deg, #b78435, transparent);
    content: "";
    display: inline-block;
    height: 1px;
    margin-left: 8px;
    opacity: 0.55;
    width: clamp(30px, 5vw, 72px);
}
.fnh-feature-card,
.fnh-grid-card,
.fnh-hot-content {
    border-radius: 16px;
}
.fnh-feature-cover img,
.fnh-grid-cover img,
.fnh-hot-cover img {
    transition: filter 0.35s ease, transform 0.5s cubic-bezier(.2,.8,.2,1);
}
.fnh-feature-body,
.fnh-grid-body {
    padding: 12px;
}
.fnh-feature-title,
.fnh-grid-title,
.fnh-hot-title {
    font-family: var(--font-serif);
    letter-spacing: -0.02em;
}
.fnh-rank-tabs {
    background: var(--color-bg-secondary);
    border-radius: var(--radius-pill);
    padding: 3px;
}
.fnh-rank-tab {
    border-radius: var(--radius-pill);
}
.fnh-rank-tab[aria-selected="true"] {
    background: var(--color-bg);
    box-shadow: 0 2px 8px rgba(48, 30, 27, 0.08);
}
.fnh-ranking-num {
    align-items: center;
    background: var(--color-bg-secondary);
    border-radius: 50%;
    display: inline-flex;
    height: 28px;
    justify-content: center;
    width: 28px;
}
.fnh-rank-top .fnh-ranking-num {
    background: var(--color-primary-light);
}

.site-footer {
    background:
        radial-gradient(circle at 18% 0%, rgba(143, 42, 59, 0.26), transparent 25rem),
        linear-gradient(145deg, #24191b, var(--color-footer-bg));
    border-top: 1px solid rgba(213, 167, 93, 0.38);
    color: var(--color-footer-text);
    margin-top: 0;
    padding: 58px 0 24px;
}
.site-footer-grid {
    display: grid;
    gap: clamp(32px, 7vw, 96px);
    grid-template-columns: minmax(280px, 1.5fr) repeat(2, minmax(140px, .55fr));
    margin-bottom: 40px;
}
.site-footer h4 {
    align-items: center;
    display: flex;
    font-size: 1rem;
    gap: 9px;
    margin-bottom: 16px;
}
.site-footer-brand h4 {
    font-size: 1.35rem;
}
.site-footer-mark {
    color: #d5a75d;
    display: inline-flex;
}
.site-footer-brand p {
    color: var(--color-footer-text-muted);
    font-size: var(--font-size-sm);
    line-height: 1.8;
    max-width: 480px;
}
.site-footer-column ul {
    display: grid;
    gap: 10px;
    list-style: none;
}
.site-footer-bottom {
    border-top: 1px solid var(--color-footer-border);
    color: var(--color-footer-text-muted);
    display: flex;
    font-size: var(--font-size-xs);
    justify-content: space-between;
    padding-top: 20px;
}

@media (max-width: 1100px) {
    .site-logo-copy small { display: none; }
    .main-nav .btn-ghost { padding-inline: 11px; }
    .hero-banner > .container,
    .fnh-container { padding-inline: 20px; }
}

@media (max-width: 768px) {
    :root {
        --header-height: 62px;
        --header-radius: 14px;
    }
    /* Header mobile styles handled in primary media query */
    .hero-banner {
        padding: 24px 0 12px;
    }
    .hero-banner > .container,
    .fnh-container {
        padding-inline: 12px;
    }
    .banner-mobile-hero-card {
        border-color: rgba(213, 167, 93, 0.25);
        border-radius: 20px;
        box-shadow: 0 20px 44px -22px rgba(60, 16, 28, 0.75);
    }
    .female-novel-home { padding-top: 18px; }
    .fnh-categories {
        border-radius: 15px;
        margin-bottom: 22px;
    }
    .fnh-picks-block,
    .fnh-hot-block,
    .fnh-latest-list,
    .fnh-sidebar-block,
    .panel,
    .card {
        border-radius: 16px;
    }
    .site-footer { padding-top: 42px; }
    .site-footer-grid {
        gap: 30px 24px;
        grid-template-columns: repeat(2, 1fr);
    }
    .site-footer-brand { grid-column: 1 / -1; }
    .site-footer-bottom {
        align-items: center;
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }
}

@media (max-width: 420px) {
    /* Site logo name remains visible on all small screens like Hatdaukhaai */
    .site-logo-badge { display: none !important; }
    .site-logo-copy strong { font-size: 1.08rem !important; }
    .auth-login-link { min-width: auto; padding-inline: 12px; }
    .site-footer-grid { grid-template-columns: 1fr; }
    .site-footer-brand { grid-column: auto; }
}

/* ===== Administrator traffic security dashboard ===== */
.traffic-security-dashboard {
    display: grid;
    gap: 18px;
}
.traffic-dashboard-head {
    align-items: flex-start;
    display: flex;
    gap: 20px;
    justify-content: space-between;
}
.traffic-dashboard-head h2 {
    font-size: clamp(1.55rem, 3vw, 2.1rem);
    margin: 5px 0 7px;
}
.traffic-dashboard-head p {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    max-width: 720px;
}
.traffic-eyebrow {
    align-items: center;
    color: var(--color-primary);
    display: inline-flex;
    font-size: 0.68rem;
    font-weight: 800;
    gap: 6px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.traffic-stat-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.traffic-stat-grid > div {
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    display: grid;
    min-width: 0;
    padding: 16px;
}
.traffic-stat-grid span,
.traffic-stat-grid small {
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
}
.traffic-stat-grid strong {
    color: var(--color-primary);
    font: 700 1.8rem/1.2 var(--font-serif);
    margin: 5px 0 2px;
}
.traffic-stat-warning strong { color: var(--color-warning); }
.traffic-stat-danger strong { color: var(--color-danger); }
.traffic-notice {
    background: color-mix(in srgb, var(--color-warning) 8%, var(--color-bg));
    border: 1px solid color-mix(in srgb, var(--color-warning) 30%, var(--color-border));
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    font-size: var(--font-size-xs);
    line-height: 1.65;
    padding: 12px 14px;
}
.traffic-filters {
    align-items: end;
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(120px, .65fr)) minmax(180px, 1.3fr) auto;
    padding: 12px;
}
.traffic-filters label {
    display: grid;
    gap: 5px;
    min-width: 0;
}
.traffic-filters label > span {
    color: var(--color-text-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.traffic-filters input,
.traffic-filters select,
.traffic-block-form select {
    background: var(--color-input-bg);
    border: 1px solid var(--color-input-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-primary);
    font: inherit;
    min-height: 40px;
    padding: 7px 9px;
    width: 100%;
}
.traffic-table-wrap {
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    overflow-x: auto;
}
.traffic-table {
    border-collapse: collapse;
    font-size: 0.78rem;
    min-width: 1080px;
    width: 100%;
}
.traffic-table th {
    background: var(--color-bg-secondary);
    color: var(--color-text-muted);
    font-size: 0.66rem;
    letter-spacing: .055em;
    padding: 11px 10px;
    text-align: left;
    text-transform: uppercase;
}
.traffic-table td {
    border-top: 1px solid var(--color-border-light);
    max-width: 240px;
    padding: 12px 10px;
    vertical-align: top;
}
.traffic-table td > small,
.traffic-table td > strong,
.traffic-table details {
    display: block;
}
.traffic-table td > small {
    color: var(--color-text-muted);
    line-height: 1.45;
    margin-top: 4px;
}
.traffic-table details {
    color: var(--color-text-muted);
    margin-top: 5px;
}
.traffic-table details code {
    display: block;
    font-size: 10px;
    margin-top: 5px;
    max-width: 220px;
    overflow-wrap: anywhere;
    white-space: normal;
}
.traffic-risk {
    border-radius: var(--radius-pill);
    display: inline-flex;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 4px 8px;
    white-space: nowrap;
}
.traffic-risk-normal { background: var(--color-bg-tertiary); color: var(--color-text-secondary); }
.traffic-risk-warning { background: var(--color-badge-warning-bg); color: var(--color-badge-warning-text); }
.traffic-risk-critical,
.traffic-risk-blocked { background: var(--color-badge-danger-bg); color: var(--color-badge-danger-text); }
.traffic-copy-ip {
    background: transparent;
    border: 0;
    color: var(--color-primary);
    cursor: copy;
    font: inherit;
    padding: 0;
}
.traffic-copy-ip code {
    color: inherit;
    font-weight: 700;
}
.traffic-copy-ip.is-copied::after {
    color: var(--color-success);
    content: " ✓";
}
.traffic-method {
    background: var(--color-bg-tertiary);
    border-radius: 5px;
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 800;
    margin-right: 5px;
    padding: 2px 5px;
}
.traffic-path {
    overflow-wrap: anywhere;
}
.traffic-block-form {
    display: grid;
    gap: 6px;
    min-width: 104px;
}
.traffic-block-form select {
    font-size: 0.72rem;
    min-height: 34px;
}
.traffic-block-button {
    color: var(--color-danger);
}
.traffic-pagination {
    display: flex;
    gap: 5px;
    justify-content: flex-end;
}
.traffic-pagination .page-numbers {
    align-items: center;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    display: inline-flex;
    height: 36px;
    justify-content: center;
    min-width: 36px;
    padding: 0 8px;
}
.traffic-pagination .current {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-on-primary);
}

.account-dashboard-workspace.is-admin-security-view {
    grid-template-columns: minmax(0, 1fr);
}
.account-dashboard-workspace.is-simple-content-view {
    grid-template-columns: minmax(0, 1fr);
}
.security-user-manager {
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    display: grid;
    gap: 14px;
    padding: 16px;
    scroll-margin-top: calc(var(--header-height) + 24px);
}
.security-user-manager + .security-user-manager {
    margin-top: 18px;
}
.security-user-manager-head {
    align-items: flex-start;
    display: flex;
    gap: 18px;
    justify-content: space-between;
}
.security-user-manager-head h2 {
    font-size: var(--font-size-xl);
    margin: 4px 0;
}
.security-user-manager-head p {
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
}
.security-user-summary {
    display: flex;
    gap: 8px;
}
.security-user-summary span {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
    padding: 8px 10px;
    white-space: nowrap;
}
.security-user-summary strong {
    color: var(--color-primary);
}
.security-user-filters {
    align-items: end;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(150px, .45fr) minmax(240px, 1fr) auto auto;
}
.security-user-filters label {
    display: grid;
    gap: 5px;
}
.security-user-filters label > span {
    color: var(--color-text-muted);
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
}
.security-user-filters input,
.security-user-filters select,
.security-credit-form input {
    background: var(--color-input-bg);
    border: 1px solid var(--color-input-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-primary);
    font: inherit;
    min-height: 38px;
    padding: 7px 9px;
    width: 100%;
}
.security-user-table {
    min-width: 1120px;
}
.security-user-table td {
    vertical-align: middle;
}
.security-user-presence {
    align-items: center;
    border-radius: var(--radius-pill);
    display: inline-flex;
    font-size: .68rem;
    font-weight: 800;
    gap: 6px;
    padding: 4px 8px;
}
.security-user-presence i {
    background: currentColor;
    border-radius: 50%;
    height: 7px;
    width: 7px;
}
.security-user-presence.is-online {
    background: color-mix(in srgb, var(--color-success) 12%, var(--color-bg));
    color: var(--color-success);
}
.security-user-presence.is-offline {
    background: var(--color-bg-tertiary);
    color: var(--color-text-muted);
}
.security-user-identity {
    align-items: center;
    display: flex;
    gap: 9px;
    min-width: 210px;
}
.security-user-identity img {
    border-radius: 50%;
    flex: 0 0 38px;
    height: 38px;
    object-fit: cover;
    width: 38px;
}
.security-user-identity span {
    display: grid;
    min-width: 0;
}
.security-user-identity small,
.security-user-identity em {
    color: var(--color-text-muted);
    font-size: .66rem;
    font-style: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.security-user-edit {
    font-size: .7rem;
    font-weight: 800;
}
.security-credit-cell {
    min-width: 300px;
}
.security-credit-current {
    align-items: baseline;
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}
.security-credit-current strong {
    color: var(--color-primary);
    font-size: 1.05rem;
}
.security-credit-current span {
    color: var(--color-text-muted);
    font-size: .66rem;
}
.security-credit-form {
    align-items: end;
    display: grid;
    gap: 6px;
    grid-template-columns: 92px minmax(120px, 1fr) auto;
    min-width: 285px;
}
.security-credit-form label {
    display: grid;
    gap: 3px;
}
.security-credit-form label > span {
    color: var(--color-text-muted);
    font-size: .58rem;
    font-weight: 750;
    text-transform: uppercase;
}
.security-credit-form input {
    font-size: .7rem;
    min-height: 34px;
}
.security-credit-form .btn {
    min-height: 34px;
    padding: 5px 9px;
}
.security-credit-log-table {
    min-width: 1050px;
}
.credit-log-type,
.credit-log-status {
    border-radius: var(--radius-pill);
    display: inline-flex;
    font-size: .65rem;
    font-weight: 800;
    padding: 4px 8px;
    white-space: nowrap;
}
.credit-log-type {
    background: var(--color-bg-tertiary);
    color: var(--color-text-secondary);
}
.credit-log-type.type-earn,
.credit-log-type.type-admin_add,
.credit-log-type.type-refund {
    background: color-mix(in srgb, var(--color-success) 12%, var(--color-bg));
    color: var(--color-success);
}
.credit-log-type.type-admin_deduct,
.credit-log-type.type-spend {
    background: color-mix(in srgb, var(--color-danger) 10%, var(--color-bg));
    color: var(--color-danger);
}
.credit-log-type.type-daily {
    background: var(--color-primary-light);
    color: var(--color-primary);
}
.credit-log-amount.is-positive {
    color: var(--color-success);
}
.credit-log-amount.is-negative {
    color: var(--color-danger);
}
.credit-log-status {
    background: color-mix(in srgb, var(--color-success) 10%, var(--color-bg));
    color: var(--color-success);
}

@media (max-width: 1100px) {
    .traffic-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .traffic-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .traffic-filters .btn { width: 100%; }
    .security-user-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .traffic-dashboard-head { flex-direction: column; }
    .traffic-stat-grid,
    .traffic-filters,
    .security-user-filters { grid-template-columns: 1fr; }
    .security-user-manager-head { flex-direction: column; }
    .security-user-summary { width: 100%; }
    .security-user-summary span { flex: 1; }
}

/* ===== Homepage layout: wide header, banner carousel and quick navigation ===== */
:root {
    --home-shell-max: 1440px;
    --home-shell-gutter: 24px;
}

@media (min-width: 769px) {
    .site-header {
        left: max(var(--home-shell-gutter), calc((100vw - 1392px) / 2));
        right: max(var(--home-shell-gutter), calc((100vw - 1392px) / 2));
    }
    .site-header-container {
        max-width: none;
        padding-inline: 18px;
    }
}

.main-nav {
    align-items: center;
    display: flex;
    flex: 0 1 auto;
    min-width: 0;
    white-space: nowrap;
}
.main-nav .btn-ghost {
    padding-inline: 12px;
}
.header-actions {
    margin-left: auto;
}
.header-search-form {
    align-items: center;
    background: var(--color-input-bg);
    border: 1px solid var(--color-input-border);
    border-radius: var(--radius-pill);
    display: none;
    flex: 0 1 320px;
    height: 42px;
    min-width: 220px;
    overflow: hidden;
    padding-left: 14px;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.3s;
}
.header-search-form:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-input-focus-ring);
}
.header-search-icon {
    color: var(--color-text-muted);
    display: inline-flex;
    flex: 0 0 auto;
}
.header-search-icon .hdk-icon {
    height: 17px;
    width: 17px;
}
.header-search-form input {
    background: transparent;
    border: 0;
    color: var(--color-text-primary);
    font: inherit;
    font-size: var(--font-size-sm);
    height: 100%;
    min-width: 0;
    outline: 0;
    padding: 0 10px;
    width: 100%;
}
.header-search-form input::placeholder {
    color: var(--color-text-muted);
}
.header-search-submit {
    align-self: stretch;
    background: var(--color-primary);
    border: 0;
    color: var(--color-on-primary);
    cursor: pointer;
    font: inherit;
    font-size: var(--font-size-xs);
    font-weight: 700;
    padding-inline: 15px;
    transition: background 0.2s;
}
.header-search-submit:hover {
    background: var(--color-primary-hover);
}

@media (min-width: 1200px) {
    .header-search-form { display: flex; }
    .header-actions > .search-toggle { display: none; }
}

@media (min-width: 769px) and (max-width: 1199px) {
    .main-nav .btn-ghost { padding-inline: 9px; }
    .site-logo-copy { display: none; }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .main-nav { display: none; }
    .mobile-menu-toggle { display: inline-flex; }
    .site-logo-copy { display: grid; }
}

.hero-banner {
    background: transparent;
    color: var(--color-banner-overlay-text);
    overflow: visible;
    padding: 44px 0 0;
}
.hero-banner::before,
.hero-banner::after {
    display: none;
}
.hero-banner > .container,
.fnh-container {
    max-width: var(--home-shell-max);
    padding-inline: var(--home-shell-gutter);
    width: 100%;
}
.hero-banner .banner-shell {
    background: #24191c;
    border: 1px solid rgba(213, 167, 93, 0.22);
    border-radius: 30px;
    box-shadow: 0 30px 70px -34px rgba(60, 16, 28, 0.78);
    height: clamp(430px, 32vw, 500px);
    min-height: 430px;
    overflow: hidden;
    padding: 0;
    position: relative;
    isolation: isolate;
}
.hero-banner .banner-shell::before,
.hero-banner .banner-shell::after {
    display: none;
}
.hero-banner .banner-backdrop {
    background-position: center 26%;
    background-repeat: no-repeat;
    background-size: cover;
    filter: saturate(0.88) contrast(1.04);
    inset: 0;
    opacity: 1;
    position: absolute;
    transform: scale(1.015);
    transition: opacity 0.36s ease, transform 1.2s var(--motion-ease-out);
    z-index: -2;
}
.hero-banner .banner-backdrop.is-changing {
    opacity: 0;
    transform: scale(1.045);
}
.hero-banner .banner-shade {
    background:
        linear-gradient(90deg, rgba(20, 12, 14, 0.92) 0%, rgba(28, 15, 18, 0.76) 35%, rgba(30, 16, 19, 0.25) 70%, rgba(20, 12, 14, 0.38) 100%),
        linear-gradient(0deg, rgba(15, 9, 10, 0.68), transparent 52%);
    inset: 0;
    position: absolute;
    z-index: -1;
}
.hero-banner .banner-content {
    align-items: flex-start;
    bottom: 0;
    color: var(--color-banner-overlay-text);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    left: 0;
    max-width: 720px;
    min-width: 0;
    padding: 54px 72px 64px;
    position: absolute;
    top: 0;
    z-index: 2;
}
.hero-banner .banner-content.is-changing {
    animation: banner-copy-rise 0.44s var(--motion-ease-out);
}
.hero-banner .banner-kicker {
    align-items: center;
    background: rgba(126, 35, 50, 0.78);
    border: 1px solid rgba(229, 188, 120, 0.48);
    border-radius: var(--radius-pill);
    color: #f4dba9;
    display: inline-flex;
    font-size: var(--font-size-xs);
    font-weight: 700;
    gap: 7px;
    letter-spacing: 0.06em;
    margin-bottom: 18px;
    padding: 7px 12px;
    text-transform: uppercase;
}
.hero-banner .banner-kicker .hdk-icon {
    height: 15px;
    width: 15px;
}
.hero-banner .banner-title {
    color: #fffaf4;
    font-size: clamp(2.25rem, 4vw, 3.75rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1.08;
    margin: 0 0 16px;
    max-width: 680px;
    text-shadow: 0 3px 24px rgba(0, 0, 0, 0.48);
    text-wrap: balance;
}
.hero-banner .banner-summary {
    color: rgba(255, 247, 239, 0.8);
    display: -webkit-box;
    font-size: var(--font-size-sm);
    line-height: 1.7;
    margin: 0 0 24px;
    max-width: 600px;
    overflow: hidden;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.42);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}
.hero-banner .banner-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.hero-banner .banner-read-link {
    color: var(--color-on-primary);
    min-height: 46px;
    padding-inline: 22px;
}
.hero-banner .banner-read-link .hdk-icon {
    height: 17px;
    width: 17px;
}
.hero-banner .banner-views {
    align-items: center;
    color: rgba(255, 247, 239, 0.78);
    display: inline-flex;
    font-size: var(--font-size-xs);
    gap: 7px;
}
.hero-banner .banner-views .hdk-icon {
    height: 15px;
    width: 15px;
}
.hero-banner .banner-nav {
    background: rgba(26, 15, 17, 0.56);
    border: 1px solid rgba(255, 255, 255, 0.32);
    height: 44px;
    opacity: 0.9;
    width: 44px;
    z-index: 4;
}
.hero-banner .banner-nav-prev { left: 18px; }
.hero-banner .banner-nav-next { right: 18px; }
.hero-banner .banner-indicators {
    align-items: center;
    bottom: 22px;
    display: flex;
    gap: 8px;
    justify-content: center;
    left: 50%;
    position: absolute;
    transform: translateX(-50%);
    z-index: 5;
}
.hero-banner .banner-indicator {
    appearance: none;
    background: rgba(255, 255, 255, 0.55);
    border: 0;
    border-radius: var(--radius-full);
    cursor: pointer;
    height: 7px;
    padding: 0;
    transition: background 0.25s, transform 0.25s, width 0.25s;
    width: 7px;
}
.hero-banner .banner-indicator.active {
    background: #e5bc78;
    width: 26px;
}
.hero-banner .banner-indicator:focus-visible {
    outline-color: #fffaf4;
    outline-offset: 4px;
}
.hero-banner-empty .banner-shell {
    background:
        radial-gradient(circle at 78% 25%, rgba(213, 167, 93, 0.2), transparent 30%),
        linear-gradient(120deg, #24191c, #4d2029 58%, #24191c);
}

.female-novel-home {
    padding-top: 40px;
}
.fnh-container {
    gap: 0;
}
.fnh-quick-nav {
    background: color-mix(in srgb, var(--color-bg) 94%, transparent);
    border: 1px solid var(--color-border-light);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 0;
    grid-column: 1 / -1;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 24px;
    overflow: hidden;
    padding: 8px;
}
.fnh-quick-item {
    align-items: center;
    border-radius: 14px;
    color: var(--color-text-primary);
    display: flex;
    gap: 13px;
    min-height: 78px;
    min-width: 0;
    padding: 12px 16px;
    position: relative;
    text-decoration: none;
    transition: background 0.22s, color 0.22s, transform 0.22s;
}
.fnh-quick-item:not(:last-child)::after {
    background: var(--color-border-light);
    bottom: 16px;
    content: "";
    position: absolute;
    right: -1px;
    top: 16px;
    width: 1px;
}
.fnh-quick-item:hover,
.fnh-quick-item:focus-visible {
    background: var(--color-primary-light);
    color: var(--color-primary);
    transform: translateY(-2px);
}
.fnh-quick-icon {
    align-items: center;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-light);
    border-radius: 13px;
    color: var(--color-primary);
    display: inline-flex;
    flex: 0 0 46px;
    height: 46px;
    justify-content: center;
    transition: background 0.22s, border-color 0.22s, transform 0.22s;
}
.fnh-quick-item:hover .fnh-quick-icon {
    background: var(--color-bg);
    border-color: color-mix(in srgb, var(--color-primary) 34%, var(--color-border));
    transform: scale(1.04);
}
.fnh-quick-icon .hdk-icon {
    height: 21px;
    width: 21px;
}
.fnh-quick-copy {
    display: grid;
    min-width: 0;
}
.fnh-quick-copy strong {
    font-family: var(--font-serif);
    font-size: 0.94rem;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fnh-quick-copy small {
    color: var(--color-text-muted);
    font-size: 0.68rem;
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fnh-quick-arrow {
    color: var(--color-text-muted);
    display: inline-flex;
    margin-left: auto;
    opacity: 0;
    transform: translateX(-5px);
    transition: opacity 0.2s, transform 0.2s;
}
.fnh-quick-item:hover .fnh-quick-arrow {
    opacity: 1;
    transform: none;
}
.fnh-quick-arrow .hdk-icon {
    height: 16px;
    width: 16px;
}
.fnh-categories {
    margin-bottom: 42px;
}

@media (min-width: 1025px) and (max-width: 1199px) {
    .fnh-categories {
        justify-content: flex-start;
        overflow-x: auto;
    }
    .fnh-cat-card {
        flex: 0 0 auto;
        min-width: 100px;
    }
}

@media (max-width: 1199px) {
    .fnh-quick-nav {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .fnh-quick-item:nth-child(3)::after,
    .fnh-quick-item:last-child::after {
        display: none;
    }
}

@media (max-width: 768px) {
    :root { --home-shell-gutter: 12px; }
    .header-search-form { display: none; }
    .hero-banner {
        padding: 24px 0 0;
    }
    .hero-banner .banner-shell {
        border-radius: 20px;
        height: 350px;
        min-height: 350px;
    }
    .hero-banner .banner-backdrop {
        background-position: center 22%;
    }
    .hero-banner .banner-shade {
        background:
            linear-gradient(0deg, rgba(18, 10, 12, 0.94) 0%, rgba(24, 12, 15, 0.68) 52%, rgba(20, 11, 13, 0.2) 100%),
            linear-gradient(90deg, rgba(22, 12, 14, 0.42), transparent 70%);
    }
    .hero-banner .banner-content {
        justify-content: flex-end;
        max-width: none;
        padding: 44px 48px 48px 24px;
    }
    .hero-banner .banner-kicker {
        font-size: 10px;
        margin-bottom: 10px;
        padding: 5px 9px;
    }
    .hero-banner .banner-title {
        font-size: clamp(1.65rem, 8vw, 2.35rem);
        line-height: 1.12;
        margin-bottom: 10px;
    }
    .hero-banner .banner-summary {
        font-size: 0.75rem;
        line-height: 1.55;
        margin-bottom: 15px;
        max-width: 90%;
        -webkit-line-clamp: 2;
    }
    .hero-banner .banner-actions {
        gap: 10px;
    }
    .hero-banner .banner-read-link {
        min-height: 38px;
        padding: 6px 15px;
    }
    .hero-banner .banner-nav {
        height: 36px;
        top: 36px;
        transform: none;
        width: 36px;
    }
    .hero-banner .banner-nav:hover {
        transform: scale(1.04);
    }
    .hero-banner .banner-nav-prev { left: auto; right: 58px; }
    .hero-banner .banner-nav-next { right: 16px; }
    .hero-banner .banner-indicators {
        bottom: 18px;
    }
    .female-novel-home {
        padding-top: 36px;
    }
    .fnh-quick-nav {
        border-radius: 16px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-bottom: 20px;
        padding: 6px;
    }
    .fnh-quick-item {
        gap: 10px;
        min-height: 68px;
        padding: 9px 10px;
    }
    .fnh-quick-item::after {
        display: none;
    }
    .fnh-quick-icon {
        border-radius: 11px;
        flex-basis: 40px;
        height: 40px;
    }
    .fnh-quick-icon .hdk-icon {
        height: 18px;
        width: 18px;
    }
    .fnh-quick-copy strong {
        font-size: 0.82rem;
    }
    .fnh-quick-copy small {
        font-size: 0.62rem;
    }
    .fnh-quick-arrow { display: none; }
    .fnh-categories {
        margin-bottom: 34px;
    }
    .fnh-cat-card {
        min-width: 92px;
        scroll-snap-align: start;
    }
}

@media (max-width: 380px) {
    :root { --home-shell-gutter: 8px; }
    .hero-banner .banner-shell {
        height: 330px;
        min-height: 330px;
    }
    .hero-banner .banner-content {
        padding-left: 18px;
        padding-right: 40px;
    }
    .hero-banner .banner-views { display: none; }
    .fnh-quick-item { padding-inline: 7px; }
    .fnh-quick-icon {
        flex-basis: 36px;
        height: 36px;
    }
}

/* ===== Account menu and compact account hub ===== */
.user-dropdown-toggle {
    align-items: center;
    border: 1px solid var(--color-border-light);
    display: inline-flex;
    gap: 8px;
    min-height: 42px;
    padding: 4px 10px;
}
.user-menu-avatar {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-light);
    border-radius: 50%;
    display: inline-flex;
    flex: 0 0 48px;
    height: 48px;
    overflow: hidden;
}
.user-menu-avatar-sm {
    flex-basis: 32px;
    height: 32px;
}
.user-menu-avatar img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}
.user-dropdown-menu {
    animation: account-menu-in 0.2s var(--motion-ease-out);
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    border-radius: 20px;
    box-shadow: 0 24px 56px rgba(49, 31, 28, 0.18);
    margin-top: 10px;
    max-height: min(720px, calc(100vh - var(--header-height) - 36px));
    overflow-y: auto;
    padding: 10px;
    position: absolute;
    right: 0;
    top: 100%;
    width: 380px;
    z-index: 300;
}
.user-dropdown-menu[hidden] {
    display: none;
}
@keyframes account-menu-in {
    from { opacity: 0; transform: translateY(-8px) scale(0.985); }
    to { opacity: 1; transform: none; }
}
.user-menu-profile {
    align-items: center;
    display: flex;
    gap: 13px;
    padding: 10px 10px 12px;
}
.user-menu-profile-copy {
    display: grid;
    min-width: 0;
}
.user-menu-profile-copy strong {
    color: var(--color-text-primary);
    font-family: var(--font-serif);
    font-size: 0.98rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-menu-profile-copy small {
    align-items: center;
    color: var(--color-text-muted);
    display: inline-flex;
    font-size: var(--font-size-xs);
    gap: 5px;
    margin-top: 4px;
}
.user-menu-profile-copy small .hdk-icon {
    color: var(--color-warning);
    height: 14px;
    width: 14px;
}
.user-menu-credit-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.user-menu-topup-trigger {
    background: var(--primary);
    border: 0;
    border-radius: 999px;
    color: var(--primary-foreground);
    cursor: pointer;
    font: inherit;
    font-size: .7rem;
    font-weight: 700;
    padding: .32rem .7rem;
    white-space: nowrap;
}
.user-menu-topup-trigger:hover,
.user-menu-topup-trigger:focus-visible {
    background: var(--color-primary-hover);
}
.user-menu-divider {
    background: var(--color-border-light);
    height: 1px;
    margin: 5px 8px;
}
.user-menu-links {
    display: grid;
    gap: 2px;
}
.user-menu-item {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 12px;
    color: var(--color-text-primary);
    cursor: pointer;
    display: flex;
    font: inherit;
    font-size: var(--font-size-sm);
    gap: 11px;
    min-height: 43px;
    padding: 8px 10px;
    text-align: left;
    text-decoration: none;
    transition: background 0.18s, color 0.18s, transform 0.18s;
    width: 100%;
}
.user-menu-item:hover,
.user-menu-item:focus-visible {
    background: var(--color-primary-light);
    color: var(--color-primary);
    transform: translateX(2px);
}
.user-menu-item-icon {
    align-items: center;
    background: var(--color-bg-secondary);
    border-radius: 9px;
    color: var(--color-primary);
    display: inline-flex;
    flex: 0 0 31px;
    height: 31px;
    justify-content: center;
}
.user-menu-item-icon .hdk-icon {
    height: 16px;
    width: 16px;
}
.user-menu-logout {
    color: var(--color-text-secondary);
}
.user-menu-logout:hover {
    color: var(--color-danger);
}

.account-page-shell {
    max-width: 1240px;
    padding-bottom: 72px;
    padding-top: 36px;
}
.account-breadcrumb {
    margin-bottom: 18px;
}
.account-overview {
    background: var(--color-bg);
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 22px;
    overflow: hidden;
}
.account-overview-heading {
    align-items: flex-start;
    background:
        radial-gradient(circle at 92% 0%, rgba(178, 122, 37, 0.11), transparent 16rem),
        color-mix(in srgb, var(--color-bg) 86%, var(--color-primary-light));
    border-bottom: 1px solid var(--color-border-light);
    display: flex;
    gap: 20px;
    justify-content: space-between;
    padding: 26px 28px;
}
.account-eyebrow {
    color: var(--color-primary);
    display: block;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    margin-bottom: 6px;
    text-transform: uppercase;
}
.account-overview-heading h1 {
    font-family: var(--font-serif);
    font-size: clamp(1.45rem, 2.5vw, 2rem);
    letter-spacing: -0.035em;
    line-height: 1.2;
    margin-bottom: 7px;
}
.account-overview-heading p {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    margin: 0;
}
.account-overview .account-profile {
    flex-wrap: nowrap;
    gap: 18px;
    padding: 22px 28px;
}
.account-overview .account-avatar {
    border: 2px solid var(--color-border-light);
    box-shadow: none;
    height: 72px;
    margin: 0;
    width: 72px;
}
.account-overview .account-profile-copy {
    flex: 1 1 240px;
}
.account-overview .account-profile-copy h1 {
    font-family: var(--font-serif);
}
.account-balance {
    align-items: center;
    color: var(--color-primary);
    display: inline-flex;
    font-size: var(--font-size-xs);
    font-weight: 700;
    gap: 5px;
    margin-top: 7px;
}
.account-balance .hdk-icon {
    color: var(--color-warning);
    height: 14px;
    width: 14px;
}
.account-overview .account-stats {
    flex: 0 1 390px;
}
.account-overview .account-stats div {
    background: var(--color-bg-secondary);
    border: 0;
}
.account-layout {
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(0, 1fr);
}
.account-tabs {
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 10px;
    position: static;
}
.account-tab-group {
    align-items: start;
    border-radius: 13px;
    display: grid;
    gap: 10px;
    grid-template-columns: 92px minmax(0, 1fr);
    padding: 6px 8px;
}
.account-tab-group + .account-tab-group {
    border-top: 1px solid var(--color-border-light);
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    padding-top: 10px;
}
.account-tab-group-label {
    color: var(--color-text-muted);
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 10px 4px;
    text-transform: uppercase;
}
.account-tab-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}
.account-menu-grid .account-tab-list a {
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    color: var(--color-text-secondary);
    flex: 0 0 auto;
    font-size: var(--font-size-xs);
    gap: 7px;
    min-height: 38px;
    padding: 7px 12px;
}
.account-menu-grid .account-tab-list a .hdk-icon {
    height: 15px;
    width: 15px;
}
.account-menu-grid .account-tab-list a:hover {
    background: var(--color-bg-secondary);
    border-color: var(--color-border-light);
    transform: none;
}
.account-menu-grid .account-tab-list a.active {
    background: var(--color-primary-light);
    border-color: color-mix(in srgb, var(--color-primary) 28%, var(--color-border));
    color: var(--color-primary);
}
.account-content-main {
    min-width: 0;
}
.account-content-main > .panel,
.account-content-main > .account-settings-panel {
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
    .header-actions .user-dropdown {
        display: inline-flex !important;
    }
    .user-dropdown-toggle {
        border-radius: 50%;
        height: 36px;
        min-height: 36px;
        padding: 1px;
        width: 36px;
    }
    .user-dropdown-toggle .user-name {
        display: none !important;
    }
    .user-dropdown-toggle .dropdown-arrow {
        align-items: center;
        display: inline-flex !important;
        justify-content: center;
    }
    .user-dropdown-menu {
        left: 8px;
        margin-top: 8px;
        max-height: calc(100vh - var(--header-height) - var(--bottom-nav-height) - 24px);
        max-width: none;
        min-width: 0;
        position: fixed;
        right: 8px;
        top: var(--header-height);
        width: auto;
    }
    body.admin-bar .user-dropdown-menu {
        top: calc(46px + var(--header-height));
    }
    .account-page-shell {
        padding: 22px 12px 56px;
    }
    .account-breadcrumb {
        margin-bottom: 12px;
    }
    .account-overview {
        border-radius: 18px;
    }
    .account-overview-heading {
        align-items: stretch;
        flex-direction: column;
        padding: 20px 18px;
    }
    .account-overview-heading .btn {
        align-self: flex-start;
    }
    .account-overview .account-profile {
        align-items: center;
        flex-wrap: wrap;
        padding: 18px !important;
    }
    .account-overview .account-avatar {
        height: 60px !important;
        margin: 0;
        width: 60px !important;
    }
    .account-overview .account-stats {
        flex-basis: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .account-tabs {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding: 9px;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .account-tabs::-webkit-scrollbar {
        display: none;
    }
    .account-tab-group {
        align-items: stretch;
        display: flex;
        flex: 0 0 auto;
        flex-direction: column;
        gap: 3px;
        padding: 3px 5px;
        scroll-snap-align: start;
    }
    .account-tab-group + .account-tab-group {
        border-left: 1px solid var(--color-border-light);
        border-top: 0;
        padding-left: 12px;
        padding-top: 3px;
    }
    .account-tab-group-label {
        padding: 3px 7px;
    }
    .account-tab-list {
        flex-wrap: nowrap;
    }
    .account-menu-grid .account-tab-list a {
        min-height: 40px;
        padding-inline: 11px;
    }
}

@media (max-width: 420px) {
    .user-dropdown-menu {
        border-radius: 16px;
        padding: 8px;
    }
    .user-menu-item {
        min-height: 45px;
    }
    .account-overview .account-profile-copy {
        flex-basis: calc(100% - 82px);
    }
    .account-overview .account-stats div:last-child {
        grid-column: 1 / -1;
    }
}

/* ===== Account creator dashboard shell ===== */
body.account-dashboard-page {
    --header-height: 0px;
}
.account-page-shell {
    --account-accent: var(--color-primary);
    --account-accent-dark: var(--color-primary-hover);
    --account-accent-soft: var(--color-primary-light);
    --account-canvas: var(--color-bg-secondary);
    --account-card: var(--color-bg);
    --account-line: var(--color-border-light);
    --account-copy: var(--color-text-primary);
    --account-muted: var(--color-text-muted);
    max-width: 1500px;
    min-height: calc(100vh - var(--header-height));
    padding: 30px 24px 96px;
    position: relative;
}
.account-page-shell::before {
    background: var(--account-canvas);
    bottom: 0;
    box-shadow: 0 0 0 100vmax var(--account-canvas);
    content: "";
    left: 0;
    pointer-events: none;
    position: absolute;
    right: 0;
    top: 0;
    z-index: -1;
}
.account-dashboard-shell {
    align-items: start;
    display: grid;
    gap: 24px;
    grid-template-columns: 276px minmax(0, 1fr);
    margin: 0 auto;
    transition: grid-template-columns 220ms ease;
}
.account-dashboard-shell.is-sidebar-collapsed {
    grid-template-columns: 82px minmax(0, 1fr);
}

/* Account sidebar */
.account-dashboard-sidebar {
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    max-height: calc(100vh - var(--header-height) - 48px);
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 14px;
    position: sticky;
    scrollbar-color: color-mix(in srgb, var(--account-muted) 30%, transparent) transparent;
    scrollbar-width: thin;
    top: calc(var(--header-height) + 24px);
    z-index: 12;
}
.account-sidebar-brand {
    align-items: center;
    border-bottom: 1px solid var(--account-line);
    display: flex;
    gap: 8px;
    min-height: 54px;
    padding: 2px 2px 14px;
}
.account-sidebar-logo {
    align-items: center;
    color: var(--account-copy);
    display: flex;
    flex: 1 1 auto;
    gap: 10px;
    min-width: 0;
    text-decoration: none;
}
.account-sidebar-logo-mark {
    align-items: center;
    background: linear-gradient(145deg, var(--account-accent), var(--account-accent-dark));
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    color: var(--color-on-primary);
    display: inline-flex;
    flex: 0 0 40px;
    height: 40px;
    justify-content: center;
}
.account-sidebar-logo-mark .hdk-icon {
    height: 21px;
    width: 21px;
}
.account-sidebar-brand-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.account-sidebar-brand-copy strong {
    color: var(--account-copy);
    font-size: 0.92rem;
    line-height: 1.25;
    white-space: nowrap;
}
.account-sidebar-brand-copy small {
    color: var(--account-muted);
    font-size: 0.62rem;
    line-height: 1.4;
    white-space: nowrap;
}
.account-sidebar-collapse,
.account-sidebar-mobile-close,
.account-mobile-menu-toggle {
    align-items: center;
    background: transparent;
    border: 1px solid var(--account-line);
    color: var(--account-muted);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    justify-content: center;
}
.account-sidebar-collapse {
    border-radius: 9px;
    flex: 0 0 32px;
    height: 32px;
}
.account-sidebar-collapse:hover,
.account-sidebar-mobile-close:hover,
.account-mobile-menu-toggle:hover {
    background: var(--account-accent-soft);
    border-color: color-mix(in srgb, var(--account-accent) 40%, var(--account-line));
    color: var(--account-accent-dark);
}
.account-sidebar-collapse .hdk-icon,
.account-sidebar-mobile-close .hdk-icon {
    height: 16px;
    transition: transform 220ms ease;
    width: 16px;
}
.account-sidebar-mobile-close {
    border-radius: 10px;
    display: none;
    flex: 0 0 36px;
    height: 36px;
}
.account-sidebar-profile {
    align-items: center;
    background: linear-gradient(135deg, var(--account-accent-soft), color-mix(in srgb, var(--account-card) 90%, var(--account-accent-soft)));
    border: 1px solid color-mix(in srgb, var(--account-accent) 18%, var(--account-line));
    border-radius: 14px;
    display: flex;
    gap: 11px;
    margin: 14px 0;
    min-width: 0;
    padding: 12px;
}
.account-sidebar-avatar {
    background: var(--color-primary-light);
    border: 3px solid color-mix(in srgb, var(--color-primary) 28%, transparent);
    border-radius: 50%;
    flex: 0 0 46px;
    height: 46px;
    overflow: hidden;
}
.account-sidebar-avatar img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}
.account-sidebar-profile-copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}
.account-sidebar-profile-copy strong,
.account-sidebar-profile-copy span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.account-sidebar-profile-copy strong {
    color: var(--account-copy);
    font-size: var(--font-size-sm);
}
.account-sidebar-profile-copy span {
    color: var(--account-muted);
    font-size: 0.68rem;
}
.account-sidebar-profile-copy small {
    align-self: flex-start;
    background: var(--color-primary-light);
    border-radius: 999px;
    color: var(--color-primary);
    font-size: 0.6rem;
    font-weight: 700;
    margin-top: 5px;
    padding: 2px 7px;
}
.account-sidebar-navigation {
    display: grid;
    gap: 5px;
}
.account-sidebar-group {
    border-bottom: 1px solid var(--account-line);
    padding: 0 0 6px;
}
.account-sidebar-group:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}
.account-sidebar-group > summary {
    align-items: center;
    color: var(--account-muted);
    cursor: pointer;
    display: flex;
    font-size: 0.64rem;
    font-weight: 800;
    justify-content: space-between;
    letter-spacing: 0.09em;
    list-style: none;
    min-height: 34px;
    padding: 7px 9px 5px;
    text-transform: uppercase;
    user-select: none;
}
.account-sidebar-group > summary::-webkit-details-marker {
    display: none;
}
.account-sidebar-group > summary .hdk-icon {
    height: 13px;
    transition: transform 180ms ease;
    width: 13px;
}
.account-sidebar-group:not([open]) > summary .hdk-icon {
    transform: rotate(-90deg);
}
.account-sidebar-group-items {
    display: grid;
    gap: 2px;
}
.account-sidebar-link {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--account-muted);
    display: flex;
    font-size: 0.76rem;
    font-weight: 550;
    gap: 9px;
    min-height: 39px;
    min-width: 0;
    padding: 7px 9px;
    text-decoration: none;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}
a.account-sidebar-link:hover {
    background: var(--color-bg-tertiary);
    color: var(--account-copy);
    transform: translateX(2px);
}
.account-sidebar-link.is-active {
    background: var(--account-accent-soft);
    border-color: color-mix(in srgb, var(--account-accent) 24%, var(--account-line));
    color: var(--account-accent-dark);
}
.account-sidebar-link.is-disabled {
    cursor: not-allowed;
    opacity: 0.58;
}
.account-sidebar-link.is-danger {
    color: var(--color-danger);
}
.account-sidebar-link-icon {
    align-items: center;
    display: inline-flex;
    flex: 0 0 19px;
    justify-content: center;
}
.account-sidebar-link-icon .hdk-icon {
    height: 17px;
    width: 17px;
}
.account-sidebar-link-label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.account-sidebar-badge,
.account-sidebar-coming {
    border-radius: 999px;
    flex: 0 0 auto;
    font-size: 0.57rem;
    font-style: normal;
    font-weight: 800;
    line-height: 1;
    padding: 4px 6px;
}
.account-sidebar-badge {
    background: color-mix(in srgb, var(--color-danger) 12%, var(--account-card));
    color: var(--color-danger);
}
.account-sidebar-coming {
    background: var(--color-bg-tertiary);
    color: var(--account-muted);
}
.account-dashboard-shell.is-sidebar-collapsed .account-dashboard-sidebar {
    padding-inline: 10px;
}
.account-dashboard-shell.is-sidebar-collapsed .account-sidebar-brand {
    justify-content: center;
    padding-inline: 0;
}
.account-dashboard-shell.is-sidebar-collapsed .account-sidebar-logo {
    flex: 0 0 40px;
}
.account-dashboard-shell.is-sidebar-collapsed .account-sidebar-brand-copy,
.account-dashboard-shell.is-sidebar-collapsed .account-sidebar-profile-copy,
.account-dashboard-shell.is-sidebar-collapsed .account-sidebar-group > summary,
.account-dashboard-shell.is-sidebar-collapsed .account-sidebar-link-label,
.account-dashboard-shell.is-sidebar-collapsed .account-sidebar-badge,
.account-dashboard-shell.is-sidebar-collapsed .account-sidebar-coming {
    display: none;
}
.account-dashboard-shell.is-sidebar-collapsed .account-sidebar-collapse {
    background: var(--account-accent-soft);
    border-color: color-mix(in srgb, var(--account-accent) 25%, var(--account-line));
    position: absolute;
    right: 4px;
    top: 4px;
    z-index: 2;
}
.account-dashboard-shell.is-sidebar-collapsed .account-sidebar-collapse .hdk-icon {
    transform: rotate(180deg);
}
.account-dashboard-shell.is-sidebar-collapsed .account-sidebar-profile {
    justify-content: center;
    padding: 8px;
}
.account-dashboard-shell.is-sidebar-collapsed .account-sidebar-avatar {
    flex-basis: 42px;
    height: 42px;
}
.account-dashboard-shell.is-sidebar-collapsed .account-sidebar-group {
    padding-block: 3px;
}
.account-dashboard-shell.is-sidebar-collapsed .account-sidebar-group-items {
    display: grid !important;
}
.account-dashboard-shell.is-sidebar-collapsed .account-sidebar-link {
    justify-content: center;
    padding-inline: 0;
}

/* Account content */
.account-dashboard-main {
    min-width: 0;
    transition: opacity 160ms ease, transform 160ms ease;
}
.account-dashboard-main.is-route-loading {
    opacity: 0.5;
    pointer-events: none;
    transform: translateY(5px);
}
.account-dashboard-main.is-route-entering {
    animation: account-route-enter 200ms ease both;
}
@keyframes account-route-enter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.account-dashboard-header {
    align-items: center;
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 20px;
    min-height: 104px;
    padding: 20px 24px;
}
.account-dashboard-title {
    align-items: center;
    display: flex;
    flex: 1 1 auto;
    gap: 13px;
    min-width: 0;
}
.account-dashboard-title-icon {
    align-items: center;
    background: var(--account-accent-soft);
    border: 1px solid color-mix(in srgb, var(--account-accent) 24%, var(--account-line));
    border-radius: 13px;
    color: var(--account-accent-dark);
    display: inline-flex;
    flex: 0 0 46px;
    height: 46px;
    justify-content: center;
}
.account-dashboard-title-icon .hdk-icon {
    height: 22px;
    width: 22px;
}
.account-dashboard-heading {
    flex: 1 1 auto;
    min-width: 0;
}
.account-dashboard-breadcrumb {
    align-items: center;
    color: var(--account-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.68rem;
    gap: 6px;
    margin-bottom: 4px;
}
.account-dashboard-breadcrumb a {
    color: var(--account-accent-dark);
    font-weight: 700;
    text-decoration: none;
}
.account-dashboard-breadcrumb strong {
    color: var(--account-muted);
    font-weight: 600;
}
.account-dashboard-heading h1 {
    color: var(--account-copy);
    font-family: var(--font-family);
    font-size: clamp(1.3rem, 2vw, 1.75rem);
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin: 0 0 5px;
}
.account-dashboard-heading p {
    color: var(--account-muted);
    font-size: var(--font-size-sm);
    margin: 0;
}
.account-header-action,
.account-widget-link {
    align-items: center;
    color: var(--account-accent-dark);
    display: inline-flex;
    font-size: var(--font-size-xs);
    font-weight: 700;
    gap: 6px;
    text-decoration: none;
}
.account-header-action {
    background: var(--account-accent-soft);
    border: 1px solid color-mix(in srgb, var(--account-accent) 28%, var(--account-line));
    border-radius: 10px;
    flex: 0 0 auto;
    min-height: 40px;
    padding: 8px 12px;
}
.account-header-action .hdk-icon,
.account-widget-link .hdk-icon {
    height: 15px;
    width: 15px;
}
.account-mobile-menu-toggle {
    border-radius: 10px;
    display: none;
    gap: 7px;
    min-height: 40px;
    padding: 8px 11px;
}
.account-mobile-menu-toggle .hdk-icon {
    height: 18px;
    width: 18px;
}
.account-dashboard-main > .account-alert {
    border-radius: 12px;
    margin: 0 0 20px;
}
.account-dashboard-workspace {
    align-items: start;
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 1fr) 280px;
}
.account-content-main {
    min-width: 0;
}
.account-route-placeholder {
    align-items: center;
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    min-height: 320px;
    padding: 46px 28px;
    text-align: center;
}
.account-route-placeholder-icon {
    align-items: center;
    background: var(--account-accent-soft);
    border: 1px solid color-mix(in srgb, var(--account-accent) 24%, var(--account-line));
    border-radius: 16px;
    color: var(--account-accent-dark);
    display: inline-flex;
    height: 58px;
    justify-content: center;
    margin-bottom: 18px;
    width: 58px;
}
.account-route-placeholder-icon .hdk-icon {
    height: 26px;
    width: 26px;
}
.account-route-placeholder h2 {
    color: var(--account-copy);
    font-family: var(--font-family);
    margin: 0 0 10px;
}
.account-route-placeholder p {
    color: var(--account-muted);
    line-height: 1.7;
    margin: 0;
    max-width: 600px;
}
.account-route-status {
    background: var(--account-accent-soft);
    border-radius: 999px;
    color: var(--account-accent-dark);
    font-size: var(--font-size-xs);
    font-weight: 700;
    margin-top: 20px;
    padding: 7px 11px;
}

/* Duplicate story report view */
.account-dashboard-workspace.is-duplicate-report-view {
    grid-template-columns: minmax(0, 1fr);
}
.account-duplicate-report {
    display: grid;
    gap: 18px;
    min-width: 0;
}
.account-duplicate-guide,
.account-duplicate-compare,
.account-duplicate-notes {
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    min-width: 0;
    padding: 22px;
}
.account-duplicate-card-heading {
    align-items: center;
    display: flex;
    gap: 11px;
    margin-bottom: 19px;
}
.account-duplicate-card-heading > span {
    align-items: center;
    background: var(--account-accent-soft);
    border: 1px solid color-mix(in srgb, var(--account-accent) 24%, var(--account-line));
    border-radius: 11px;
    color: var(--account-accent-dark);
    display: inline-flex;
    flex: 0 0 40px;
    height: 40px;
    justify-content: center;
}
.account-duplicate-card-heading > span .hdk-icon {
    height: 19px;
    width: 19px;
}
.account-duplicate-card-heading > div {
    display: grid;
    gap: 2px;
}
.account-duplicate-card-heading small {
    color: var(--account-muted);
    font-size: 0.67rem;
}
.account-duplicate-card-heading h2 {
    color: var(--account-copy);
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.3;
    margin: 0;
}
.account-duplicate-steps {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}
.account-duplicate-steps li {
    align-items: flex-start;
    background: var(--color-bg-secondary);
    border: 1px solid var(--account-line);
    border-radius: 12px;
    display: flex;
    gap: 9px;
    min-width: 0;
    padding: 13px;
}
.account-duplicate-steps li > b,
.account-story-picker-heading > b {
    align-items: center;
    background: var(--account-accent);
    border-radius: 50%;
    color: var(--color-on-primary);
    display: inline-flex;
    flex: 0 0 26px;
    font-size: 0.7rem;
    height: 26px;
    justify-content: center;
}
.account-duplicate-steps li > span {
    display: grid;
    gap: 4px;
    min-width: 0;
}
.account-duplicate-steps strong {
    color: var(--account-copy);
    font-size: 0.75rem;
    line-height: 1.35;
}
.account-duplicate-steps small {
    color: var(--account-muted);
    font-size: 0.64rem;
    line-height: 1.55;
}
.account-duplicate-form {
    display: grid;
    gap: 18px;
}
.account-duplicate-compare {
    align-items: stretch;
    display: grid;
    gap: 15px;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}
.account-story-picker {
    background: var(--color-bg-secondary);
    border: 1px solid var(--account-line);
    border-radius: 14px;
    min-width: 0;
    padding: 17px;
    position: relative;
}
.account-story-picker-heading {
    align-items: center;
    color: var(--account-copy);
    display: flex;
    font-size: var(--font-size-sm);
    gap: 8px;
    margin-bottom: 13px;
}
.account-story-picker-heading > .hdk-icon {
    color: var(--account-accent-dark);
    height: 17px;
    width: 17px;
}
.account-story-picker.is-duplicate .account-story-picker-heading > b {
    background: var(--color-warning);
}
.account-story-picker.is-duplicate .account-story-picker-heading > .hdk-icon {
    color: var(--color-warning);
}
.account-story-search {
    align-items: center;
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 10px;
    display: flex;
    gap: 8px;
    min-height: 44px;
    padding: 0 11px;
}
.account-story-search:focus-within {
    border-color: var(--account-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--account-accent) 16%, transparent);
}
.account-story-search > .hdk-icon {
    color: var(--account-muted);
    flex: 0 0 17px;
    height: 17px;
    width: 17px;
}
.account-story-search input {
    background: transparent;
    border: 0;
    box-shadow: none;
    color: var(--account-copy);
    flex: 1 1 auto;
    font: inherit;
    font-size: var(--font-size-sm);
    min-height: 42px;
    min-width: 0;
    outline: 0;
    width: 100%;
}
.account-story-search-results {
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 11px;
    box-shadow: var(--shadow-lg);
    left: 17px;
    max-height: 290px;
    overflow-y: auto;
    padding: 6px;
    position: absolute;
    right: 17px;
    top: 105px;
    z-index: 8;
}
.account-story-search-results button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 9px;
    color: var(--account-copy);
    cursor: pointer;
    display: flex;
    font: inherit;
    gap: 9px;
    padding: 8px;
    text-align: left;
    width: 100%;
}
.account-story-search-results button:hover,
.account-story-search-results button:focus-visible {
    background: var(--account-accent-soft);
    outline: 0;
}
.account-story-search-results button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}
.account-story-result-cover,
.account-selected-story-cover {
    align-items: center;
    background: var(--color-bg-tertiary);
    border-radius: 7px;
    display: inline-flex;
    flex: 0 0 42px;
    height: 56px;
    justify-content: center;
    overflow: hidden;
}
.account-story-result-cover img,
.account-selected-story-cover img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}
.account-story-result-cover .hdk-icon,
.account-selected-story-cover .hdk-icon {
    color: var(--account-muted);
    height: 19px;
    width: 19px;
}
.account-story-search-results button > span {
    display: grid;
    gap: 3px;
    min-width: 0;
}
.account-story-search-results strong,
.account-story-search-results small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.account-story-search-results strong {
    font-size: 0.75rem;
}
.account-story-search-results small {
    color: var(--account-muted);
    font-size: 0.64rem;
}
.account-story-search-message {
    color: var(--account-muted);
    font-size: 0.7rem;
    margin: 0;
    padding: 14px 10px;
    text-align: center;
}
.account-story-selection {
    margin-top: 13px;
    min-height: 142px;
}
.account-story-empty {
    align-items: center;
    border: 1px dashed var(--account-line);
    border-radius: 11px;
    color: var(--account-muted);
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
    min-height: 142px;
    padding: 18px;
    text-align: center;
}
.account-story-empty > .hdk-icon {
    height: 27px;
    opacity: 0.55;
    width: 27px;
}
.account-story-empty strong {
    color: var(--account-copy);
    font-size: var(--font-size-sm);
}
.account-story-empty small {
    font-size: 0.67rem;
}
.account-selected-story {
    align-items: center;
    background: var(--account-card);
    border: 1px solid color-mix(in srgb, var(--account-accent) 26%, var(--account-line));
    border-radius: 11px;
    display: flex;
    gap: 10px;
    min-height: 142px;
    padding: 13px;
}
.account-selected-story > span {
    display: grid;
    flex: 1 1 auto;
    gap: 4px;
    min-width: 0;
}
.account-selected-story span > small {
    color: var(--account-accent-dark);
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
}
.account-selected-story span > strong {
    color: var(--account-copy);
    font-size: 0.78rem;
    line-height: 1.4;
}
.account-selected-story span > em {
    color: var(--account-muted);
    font-size: 0.64rem;
    font-style: normal;
    line-height: 1.45;
}
.account-selected-story > button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 7px;
    color: var(--account-muted);
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 30px;
    height: 30px;
    justify-content: center;
}
.account-selected-story > button:hover {
    background: color-mix(in srgb, var(--color-danger) 9%, var(--account-card));
    color: var(--color-danger);
}
.account-story-swap {
    align-items: center;
    align-self: center;
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
    color: var(--account-accent-dark);
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    font: inherit;
    font-size: 0.62rem;
    font-weight: 750;
    gap: 4px;
    justify-content: center;
    min-height: 64px;
    padding: 8px;
    width: 64px;
}
.account-story-swap:hover {
    background: var(--account-accent-soft);
    border-color: color-mix(in srgb, var(--account-accent) 35%, var(--account-line));
}
.account-story-swap .hdk-icon {
    height: 18px;
    width: 18px;
}
.account-duplicate-notes textarea {
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 11px;
    color: var(--account-copy);
    font: inherit;
    line-height: 1.65;
    min-height: 130px;
    padding: 12px;
    resize: vertical;
    width: 100%;
}
.account-duplicate-notes textarea:focus {
    border-color: var(--account-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--account-accent) 16%, transparent);
    outline: 0;
}
.account-duplicate-note-meta {
    align-items: center;
    color: var(--account-muted);
    display: flex;
    font-size: 0.68rem;
    justify-content: space-between;
    margin-top: 7px;
}
.account-duplicate-note-meta > span {
    color: var(--color-danger);
}
.account-duplicate-note-meta strong {
    font-weight: 600;
}
.account-duplicate-actions {
    align-items: center;
    border-top: 1px solid var(--account-line);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 17px;
    padding-top: 17px;
}
.account-duplicate-reset,
.account-duplicate-submit {
    align-items: center;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: var(--font-size-sm);
    font-weight: 750;
    gap: 7px;
    justify-content: center;
    min-height: 42px;
    padding: 8px 14px;
}
.account-duplicate-reset {
    background: var(--account-card);
    border: 1px solid var(--account-line);
    color: var(--account-muted);
}
.account-duplicate-submit {
    background: var(--account-accent);
    border: 1px solid var(--account-accent);
    color: var(--color-on-primary);
}
.account-duplicate-submit:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

@media (max-width: 1050px) {
    .account-duplicate-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .account-duplicate-compare {
        grid-template-columns: minmax(0, 1fr);
    }
    .account-story-swap {
        flex-direction: row;
        justify-self: center;
        min-height: 42px;
        padding: 8px 13px;
        width: auto;
    }
    .account-duplicate-steps {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 520px) {
    .account-duplicate-guide,
    .account-duplicate-compare,
    .account-duplicate-notes {
        border-radius: 13px;
        padding: 16px;
    }
    .account-duplicate-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }
    .account-duplicate-reset,
    .account-duplicate-submit {
        width: 100%;
    }
}

/* Sensitive word filter view */
.account-dashboard-workspace.is-sensitive-filter-view {
    grid-template-columns: minmax(0, 1fr);
}
.account-sensitive-filter {
    display: grid;
    gap: 18px;
    min-width: 0;
}
.account-sensitive-card {
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    min-width: 0;
    padding: 22px;
}
.account-sensitive-card-heading {
    align-items: center;
    display: flex;
    gap: 11px;
    margin-bottom: 17px;
}
.account-sensitive-card-heading > span:first-child {
    align-items: center;
    background: var(--account-accent-soft);
    border: 1px solid color-mix(in srgb, var(--account-accent) 24%, var(--account-line));
    border-radius: 11px;
    color: var(--account-accent-dark);
    display: inline-flex;
    flex: 0 0 40px;
    height: 40px;
    justify-content: center;
}
.account-sensitive-card-heading > span:first-child .hdk-icon {
    height: 19px;
    width: 19px;
}
.account-sensitive-card-heading > div {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.account-sensitive-card-heading small {
    color: var(--account-muted);
    font-size: 0.67rem;
}
.account-sensitive-card-heading h2 {
    color: var(--account-copy);
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.3;
    margin: 0;
}
.account-sensitive-description {
    color: var(--account-muted);
    font-size: var(--font-size-sm);
    line-height: 1.65;
    margin: -2px 0 17px;
}
.account-sensitive-master-switch {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 10px;
    margin-left: auto;
}
.account-sensitive-master-switch > span:first-child {
    color: var(--account-accent-dark);
    font-size: var(--font-size-sm);
    font-weight: 750;
}
.account-sensitive-scope {
    background: var(--color-bg-secondary);
    border: 1px solid var(--account-line);
    border-radius: 13px;
    padding: 15px;
    transition: opacity 180ms ease;
}
.account-sensitive-scope > strong {
    color: var(--account-copy);
    display: block;
    font-size: var(--font-size-sm);
    margin-bottom: 11px;
}
.account-sensitive-scope > strong small {
    color: var(--account-muted);
    font-weight: 500;
}
.account-sensitive-scope > div {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.account-sensitive-scope label {
    align-items: center;
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 11px;
    cursor: pointer;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    min-height: 66px;
    padding: 11px 13px;
}
.account-sensitive-scope label > span:first-child {
    display: grid;
    gap: 2px;
}
.account-sensitive-scope b {
    color: var(--account-copy);
    font-size: var(--font-size-sm);
}
.account-sensitive-scope label small {
    font-size: var(--font-size-xs);
}
.account-sensitive-filter.is-filter-disabled .account-sensitive-scope,
.account-sensitive-filter.is-filter-disabled .account-sensitive-style-fieldset,
.account-sensitive-filter.is-filter-disabled .account-sensitive-preview {
    opacity: 0.56;
}
.account-sensitive-style-fieldset {
    border: 0;
    margin: 0;
    min-width: 0;
    padding: 0;
    transition: opacity 180ms ease;
}
.account-sensitive-style-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.account-sensitive-style-grid label {
    cursor: pointer;
    min-width: 0;
}
.account-sensitive-style-grid input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}
.account-sensitive-style-grid label > span {
    background: var(--color-bg-secondary);
    border: 1px solid var(--account-line);
    border-radius: 12px;
    display: grid;
    gap: 8px;
    min-height: 84px;
    padding: 13px;
    transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}
.account-sensitive-style-grid input:checked + span {
    background: color-mix(in srgb, var(--account-accent-soft) 72%, var(--account-card));
    border-color: var(--account-accent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--account-accent) 13%, transparent);
}
.account-sensitive-style-grid input:focus-visible + span {
    outline: 2px solid var(--account-accent);
    outline-offset: 2px;
}
.account-sensitive-style-grid strong {
    color: var(--account-copy);
    font-size: var(--font-size-xs);
}
.account-sensitive-style-grid code {
    color: var(--account-accent-dark);
    font-size: 0.68rem;
    overflow-wrap: anywhere;
}
.account-sensitive-preview {
    align-items: center;
    background: var(--account-accent-soft);
    border: 1px solid color-mix(in srgb, var(--account-accent) 24%, var(--account-line));
    border-radius: 12px;
    color: var(--account-copy);
    display: flex;
    flex-wrap: wrap;
    font-size: var(--font-size-sm);
    gap: 8px;
    margin-top: 14px;
    min-height: 48px;
    padding: 10px 13px;
    transition: opacity 180ms ease;
}
.account-sensitive-preview > span {
    align-items: center;
    color: var(--account-accent-dark);
    display: inline-flex;
    font-weight: 750;
    gap: 6px;
}
.account-sensitive-preview .hdk-icon {
    height: 16px;
    width: 16px;
}
.account-sensitive-preview q {
    font-family: var(--font-family-mono, monospace);
    quotes: '“' '”';
}
.account-sensitive-preview q:last-child {
    color: var(--account-accent-dark);
    font-weight: 750;
}
.account-sensitive-count {
    background: var(--account-accent-soft);
    border-radius: 999px;
    color: var(--account-accent-dark);
    font-size: var(--font-size-xs);
    margin-left: auto;
    padding: 6px 10px;
    white-space: nowrap;
}
.account-sensitive-admin-groups {
    display: grid;
    gap: 14px;
}
.account-sensitive-admin-groups > div {
    background: var(--color-bg-secondary);
    border: 1px solid var(--account-line);
    border-radius: 12px;
    padding: 14px;
}
.account-sensitive-admin-groups h3 {
    color: var(--account-copy);
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    margin: 0 0 10px;
}
.account-sensitive-term-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.account-sensitive-term-list span {
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 999px;
    color: var(--account-muted);
    font-size: var(--font-size-xs);
    padding: 5px 9px;
}
.account-sensitive-admin-link {
    align-items: center;
    color: var(--account-accent-dark);
    display: inline-flex;
    font-size: var(--font-size-xs);
    font-weight: 700;
    gap: 6px;
    margin-top: 13px;
    text-decoration: none;
}
.account-sensitive-admin-link .hdk-icon {
    height: 15px;
    width: 15px;
}
.account-sensitive-card textarea {
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 12px;
    color: var(--account-copy);
    font: inherit;
    font-size: var(--font-size-sm);
    line-height: 1.65;
    min-height: 150px;
    padding: 13px;
    resize: vertical;
    width: 100%;
}
.account-sensitive-card textarea:focus {
    border-color: var(--account-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--account-accent) 16%, transparent);
    outline: 0;
}
.account-sensitive-footer {
    align-items: center;
    border-top: 1px solid var(--account-line);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 16px;
}
.account-sensitive-footer > span {
    color: var(--account-muted);
    font-size: var(--font-size-xs);
}
.account-sensitive-save {
    align-items: center;
    background: var(--account-accent);
    border: 1px solid var(--account-accent);
    border-radius: 10px;
    color: var(--color-on-primary);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: var(--font-size-sm);
    font-weight: 750;
    gap: 7px;
    justify-content: center;
    min-height: 42px;
    padding: 8px 15px;
}
.account-sensitive-save:hover {
    background: var(--account-accent-dark);
    border-color: var(--account-accent-dark);
}

@media (max-width: 980px) {
    .account-sensitive-style-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .account-sensitive-card {
        border-radius: 13px;
        padding: 16px;
    }
    .account-sensitive-card-heading {
        align-items: flex-start;
        flex-wrap: wrap;
    }
    .account-sensitive-master-switch,
    .account-sensitive-count {
        margin-left: 51px;
    }
    .account-sensitive-scope > div,
    .account-sensitive-style-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .account-sensitive-style-grid label > span {
        min-height: 68px;
    }
    .account-sensitive-footer {
        align-items: stretch;
        flex-direction: column;
    }
    .account-sensitive-save {
        width: 100%;
    }
}

/* Library and favorite stories views */
.account-dashboard-workspace.is-library-view,
.account-dashboard-workspace.is-favorites-view {
    grid-template-columns: minmax(0, 1fr);
}
.account-library-header-badges {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: auto;
}
.account-library-header-badges > span {
    align-items: center;
    background: var(--color-bg-secondary);
    border: 1px solid var(--account-line);
    border-radius: 999px;
    color: var(--account-muted);
    display: inline-flex;
    font-size: var(--font-size-xs);
    font-weight: 700;
    gap: 6px;
    min-height: 34px;
    padding: 6px 11px;
}
.account-library-header-badges > span.is-primary {
    background: var(--account-accent-soft);
    border-color: color-mix(in srgb, var(--account-accent) 28%, var(--account-line));
    color: var(--account-accent-dark);
}
.account-library-header-badges > span.is-favorite {
    background: color-mix(in srgb, var(--color-danger) 9%, var(--account-card));
    border-color: color-mix(in srgb, var(--color-danger) 22%, var(--account-line));
    color: var(--color-danger);
}
.account-library-header-badges .hdk-icon {
    height: 15px;
    width: 15px;
}
.account-library-view,
.account-favorites-view {
    align-items: start;
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 2.05fr) minmax(260px, 0.95fr);
    min-width: 0;
}
.account-library-main,
.account-favorites-main,
.account-library-aside {
    display: grid;
    gap: 16px;
    min-width: 0;
}
.account-library-aside {
    position: sticky;
    top: 18px;
}
.account-library-tabs,
.account-favorite-filters {
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    padding: 10px;
}
.account-library-tabs {
    display: flex;
    gap: 7px;
    overflow-x: auto;
}
.account-library-tabs a {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--account-muted);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: var(--font-size-xs);
    font-weight: 700;
    gap: 7px;
    min-height: 38px;
    padding: 7px 11px;
    text-decoration: none;
}
.account-library-tabs a:hover {
    background: var(--color-bg-secondary);
    color: var(--account-copy);
}
.account-library-tabs a.is-active {
    background: var(--account-accent);
    border-color: var(--account-accent);
    color: var(--color-on-primary);
}
.account-library-tabs .hdk-icon {
    height: 15px;
    width: 15px;
}
.account-library-tabs b {
    align-items: center;
    background: color-mix(in srgb, currentColor 13%, transparent);
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.62rem;
    height: 21px;
    justify-content: center;
    min-width: 21px;
    padding: 0 5px;
}
.account-library-list {
    display: grid;
    gap: 13px;
}
.account-library-story {
    align-items: center;
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 15px;
    grid-template-columns: 82px minmax(0, 1fr) auto;
    min-width: 0;
    padding: 13px;
}
.account-library-cover,
.account-favorite-cover {
    border-radius: 10px;
    display: block;
    overflow: hidden;
    position: relative;
}
.account-library-cover {
    height: 118px;
    width: 82px;
}
.account-library-cover img,
.account-favorite-cover img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}
.account-library-cover small,
.account-favorite-cover small {
    background: color-mix(in srgb, var(--account-card) 84%, transparent);
    border-radius: 5px;
    bottom: 5px;
    color: var(--account-accent-dark);
    font-size: 0.5rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 2px 4px;
    position: absolute;
    right: 5px;
}
.account-library-story-copy {
    min-width: 0;
}
.account-library-story-copy h2,
.account-favorite-copy h2 {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.45;
    margin: 0 0 7px;
}
.account-library-story-copy h2 a,
.account-favorite-copy h2 a {
    color: var(--account-copy);
    text-decoration: none;
}
.account-library-story-copy h2 a:hover,
.account-favorite-copy h2 a:hover {
    color: var(--account-accent-dark);
}
.account-library-story-copy p {
    color: var(--account-muted);
    display: -webkit-box;
    font-size: var(--font-size-xs);
    line-height: 1.55;
    margin: 0 0 8px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.account-library-story-copy > span {
    align-items: center;
    color: var(--account-muted);
    display: inline-flex;
    font-size: 0.67rem;
    gap: 5px;
}
.account-library-story-copy > span .hdk-icon {
    height: 14px;
    width: 14px;
}
.account-library-progress {
    background: var(--color-bg-tertiary);
    border-radius: 999px;
    height: 4px;
    margin-top: 11px;
    max-width: 260px;
    overflow: hidden;
}
.account-library-progress i {
    background: var(--account-accent);
    display: block;
    height: 100%;
    width: var(--reading-progress, 0%);
}
.account-library-story-actions {
    align-items: center;
    display: flex;
    gap: 7px;
}
.account-library-story-actions > a,
.account-library-story-actions > button {
    align-items: center;
    border-radius: 9px;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: var(--font-size-xs);
    font-weight: 750;
    gap: 6px;
    justify-content: center;
    min-height: 39px;
    padding: 7px 11px;
    text-decoration: none;
}
.account-library-story-actions > a {
    background: var(--account-accent-soft);
    border: 1px solid color-mix(in srgb, var(--account-accent) 30%, var(--account-line));
    color: var(--account-accent-dark);
}
.account-library-story-actions > button {
    background: var(--account-card);
    border: 1px solid color-mix(in srgb, var(--color-danger) 24%, var(--account-line));
    color: var(--color-danger);
    padding: 7px;
    width: 39px;
}
.account-library-story-actions .hdk-icon {
    height: 16px;
    width: 16px;
}
.account-library-widget {
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    padding: 17px;
}
.account-library-widget-heading {
    align-items: center;
    display: flex;
    gap: 9px;
    margin-bottom: 14px;
}
.account-library-widget-heading > span {
    align-items: center;
    background: var(--account-accent-soft);
    border-radius: 9px;
    color: var(--account-accent-dark);
    display: inline-flex;
    height: 34px;
    justify-content: center;
    width: 34px;
}
.account-library-widget-heading .hdk-icon {
    height: 17px;
    width: 17px;
}
.account-library-widget-heading h2 {
    color: var(--account-copy);
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    margin: 0;
}
.account-library-stats {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.account-library-stats > div {
    background: var(--color-bg-secondary);
    border: 1px solid var(--account-line);
    border-radius: 11px;
    display: grid;
    gap: 3px;
    min-height: 78px;
    padding: 12px;
}
.account-library-stats strong {
    color: var(--account-copy);
    font-size: 1.15rem;
}
.account-library-stats span {
    color: var(--account-muted);
    font-size: 0.64rem;
    line-height: 1.35;
}
.account-library-compact-list {
    display: grid;
    gap: 4px;
}
.account-library-compact-list > a {
    align-items: center;
    border-radius: 9px;
    display: grid;
    gap: 9px;
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 6px;
    text-decoration: none;
}
.account-library-compact-list > a:hover {
    background: var(--color-bg-secondary);
}
.account-library-compact-list img {
    border-radius: 6px;
    height: 56px;
    object-fit: cover;
    width: 40px;
}
.account-library-compact-list span {
    display: grid;
    gap: 3px;
    min-width: 0;
}
.account-library-compact-list strong {
    color: var(--account-copy);
    font-size: var(--font-size-xs);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.account-library-compact-list small {
    color: var(--account-muted);
    font-size: 0.63rem;
}
.account-library-view-all {
    align-items: center;
    color: var(--account-accent-dark);
    display: flex;
    font-size: var(--font-size-xs);
    font-weight: 700;
    justify-content: flex-end;
    margin-top: 10px;
    text-decoration: none;
}
.account-library-view-all .hdk-icon {
    height: 14px;
    width: 14px;
}
.account-library-discover,
.account-library-actions a,
.account-library-empty > a,
.account-favorite-empty > a {
    align-items: center;
    border-radius: 9px;
    display: flex;
    font-size: var(--font-size-xs);
    font-weight: 750;
    gap: 7px;
    justify-content: center;
    min-height: 40px;
    padding: 8px 12px;
    text-decoration: none;
}
.account-library-discover,
.account-library-actions a {
    background: var(--account-card);
    border: 1px solid var(--account-line);
    color: var(--account-copy);
}
.account-library-discover {
    margin-top: 12px;
    width: 100%;
}
.account-library-actions {
    display: grid;
    gap: 8px;
}
.account-library-actions a {
    justify-content: flex-start;
}
.account-library-widget-empty {
    color: var(--account-muted);
    font-size: var(--font-size-xs);
    margin: 4px 0;
}
.account-library-empty,
.account-favorite-empty {
    align-items: center;
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    min-height: 350px;
    padding: 40px 24px;
    text-align: center;
}
.account-library-empty > span,
.account-favorite-empty > span {
    align-items: center;
    background: var(--account-accent-soft);
    border-radius: 50%;
    color: var(--account-accent-dark);
    display: inline-flex;
    height: 72px;
    justify-content: center;
    margin-bottom: 16px;
    width: 72px;
}
.account-favorite-empty > span {
    background: color-mix(in srgb, var(--color-danger) 9%, var(--account-card));
    color: var(--color-danger);
}
.account-library-empty > span .hdk-icon,
.account-favorite-empty > span .hdk-icon {
    height: 31px;
    width: 31px;
}
.account-library-empty h2,
.account-favorite-empty h2 {
    color: var(--account-copy);
    font-family: var(--font-family);
    font-size: var(--font-size-lg);
    margin: 0 0 8px;
}
.account-library-empty p,
.account-favorite-empty p {
    color: var(--account-muted);
    font-size: var(--font-size-sm);
    line-height: 1.65;
    margin: 0 0 18px;
    max-width: 450px;
}
.account-library-empty > a,
.account-favorite-empty > a {
    background: var(--account-accent);
    border: 1px solid var(--account-accent);
    color: var(--color-on-primary);
}
.account-favorite-filters {
    display: grid;
    gap: 9px;
    grid-template-columns: minmax(220px, 1.4fr) minmax(135px, 0.7fr) minmax(145px, 0.8fr) auto;
}
.account-favorite-search {
    align-items: center;
    background: var(--color-bg-secondary);
    border: 1px solid var(--account-line);
    border-radius: 9px;
    display: flex;
    gap: 8px;
    padding: 0 10px;
}
.account-favorite-search .hdk-icon {
    color: var(--account-muted);
    height: 16px;
    width: 16px;
}
.account-favorite-search input,
.account-favorite-filters select {
    background: var(--color-bg-secondary);
    border: 1px solid var(--account-line);
    border-radius: 9px;
    color: var(--account-copy);
    font: inherit;
    font-size: var(--font-size-xs);
    min-height: 42px;
    min-width: 0;
    padding: 8px 10px;
    width: 100%;
}
.account-favorite-search input {
    background: transparent;
    border: 0;
    box-shadow: none;
    outline: 0;
    padding: 0;
}
.account-favorite-search:focus-within,
.account-favorite-filters select:focus {
    border-color: var(--account-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--account-accent) 14%, transparent);
    outline: 0;
}
.account-favorite-filters > button {
    align-items: center;
    background: var(--account-accent);
    border: 1px solid var(--account-accent);
    border-radius: 9px;
    color: var(--color-on-primary);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: var(--font-size-xs);
    font-weight: 750;
    gap: 6px;
    justify-content: center;
    padding: 8px 12px;
}
.account-favorite-grid {
    display: grid;
    gap: 13px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.account-favorite-card {
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 13px;
    grid-template-columns: 92px minmax(0, 1fr);
    min-width: 0;
    padding: 12px;
}
.account-favorite-cover {
    height: 138px;
    width: 92px;
}
.account-favorite-copy {
    min-width: 0;
    padding-right: 28px;
    position: relative;
}
.account-favorite-copy h2 {
    display: -webkit-box;
    font-size: var(--font-size-sm);
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.account-favorite-copy > p {
    align-items: center;
    color: var(--account-muted);
    display: flex;
    font-size: 0.66rem;
    gap: 5px;
    margin: 0 0 8px;
}
.account-favorite-copy > p .hdk-icon,
.account-favorite-meta .hdk-icon {
    height: 13px;
    width: 13px;
}
.account-favorite-heart {
    align-items: center;
    background: color-mix(in srgb, var(--color-danger) 9%, var(--account-card));
    border: 0;
    border-radius: 50%;
    color: var(--color-danger);
    cursor: pointer;
    display: inline-flex;
    height: 28px;
    justify-content: center;
    position: absolute;
    right: 0;
    top: 0;
    width: 28px;
}
.account-favorite-heart .hdk-icon {
    fill: currentColor;
    height: 14px;
    width: 14px;
}
.account-favorite-meta {
    color: var(--account-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.62rem;
    gap: 8px;
}
.account-favorite-meta span {
    align-items: center;
    display: inline-flex;
    gap: 4px;
}
.account-favorite-tags {
    display: flex;
    gap: 5px;
    margin-top: 8px;
    overflow: hidden;
}
.account-favorite-tags span {
    background: var(--color-bg-secondary);
    border-radius: 999px;
    color: var(--account-muted);
    flex: 0 1 auto;
    font-size: 0.55rem;
    max-width: 95px;
    overflow: hidden;
    padding: 3px 6px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.account-favorite-read {
    align-items: center;
    color: var(--account-accent-dark);
    display: inline-flex;
    font-size: 0.66rem;
    font-weight: 750;
    gap: 5px;
    margin-top: 9px;
    text-decoration: none;
}
.account-favorite-read .hdk-icon {
    height: 14px;
    width: 14px;
}
.account-favorite-genres {
    display: grid;
    gap: 10px;
}
.account-favorite-genres a {
    color: var(--account-copy);
    display: grid;
    font-size: var(--font-size-xs);
    gap: 5px;
    grid-template-columns: minmax(0, 1fr) auto;
    text-decoration: none;
}
.account-favorite-genres b {
    color: var(--account-muted);
    font-size: 0.65rem;
}
.account-favorite-genres i {
    background: var(--color-bg-tertiary);
    border-radius: 999px;
    grid-column: 1 / -1;
    height: 4px;
    overflow: hidden;
    position: relative;
}
.account-favorite-genres i::after {
    background: var(--account-accent);
    border-radius: inherit;
    content: '';
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    width: var(--genre-width, 0%);
}

@media (max-width: 1120px) {
    .account-library-view,
    .account-favorites-view {
        grid-template-columns: minmax(0, 1fr);
    }
    .account-library-aside {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        position: static;
    }
}

@media (max-width: 820px) {
    .account-library-aside {
        grid-template-columns: minmax(0, 1fr);
    }
    .account-favorite-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .account-favorite-search {
        grid-column: 1 / -1;
    }
    .account-favorite-filters > button {
        grid-column: 1 / -1;
    }
}

@media (max-width: 680px) {
    .account-library-header-badges {
        margin-left: 52px;
        width: calc(100% - 52px);
    }
    .account-library-story {
        align-items: start;
        grid-template-columns: 72px minmax(0, 1fr);
    }
    .account-library-cover {
        height: 104px;
        width: 72px;
    }
    .account-library-story-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }
    .account-favorite-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 480px) {
    .account-library-tabs a span {
        display: none;
    }
    .account-library-story {
        gap: 11px;
        padding: 11px;
    }
    .account-library-story-actions > a {
        flex: 1 1 auto;
    }
    .account-favorite-filters {
        grid-template-columns: minmax(0, 1fr);
    }
    .account-favorite-search,
    .account-favorite-filters > button {
        grid-column: auto;
    }
    .account-favorite-card {
        grid-template-columns: 80px minmax(0, 1fr);
    }
    .account-favorite-cover {
        height: 120px;
        width: 80px;
    }
}

/* Create story view */
.account-dashboard-workspace.is-create-story-view {
    grid-template-columns: minmax(0, 1fr);
}
.account-create-story,
.account-create-story-form {
    min-width: 0;
}
.account-create-story-layout {
    align-items: start;
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 2.1fr) minmax(280px, 1fr);
}
.account-create-story-main,
.account-create-story-aside {
    display: grid;
    gap: 18px;
    min-width: 0;
}
.account-create-story-aside {
    position: sticky;
    top: calc(var(--header-height) + 24px);
}
.account-create-card,
.account-submission-history {
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    min-width: 0;
    padding: 22px;
}
.account-create-card-heading {
    align-items: center;
    display: flex;
    gap: 11px;
    margin-bottom: 20px;
    min-width: 0;
}
.account-create-card-heading > span {
    align-items: center;
    background: var(--account-accent-soft);
    border: 1px solid color-mix(in srgb, var(--account-accent) 22%, var(--account-line));
    border-radius: 11px;
    color: var(--account-accent-dark);
    display: inline-flex;
    flex: 0 0 40px;
    height: 40px;
    justify-content: center;
}
.account-create-card-heading > span .hdk-icon {
    height: 19px;
    width: 19px;
}
.account-create-card-heading > div {
    flex: 1 1 auto;
    min-width: 0;
}
.account-create-card-heading small {
    color: var(--account-muted);
    display: block;
    font-size: 0.67rem;
    margin-bottom: 2px;
}
.account-create-card-heading h2 {
    color: var(--account-copy);
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.3;
    margin: 0;
}
.account-create-grid-2 {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.account-create-field {
    display: grid;
    gap: 7px;
    margin-bottom: 17px;
    min-width: 0;
}
.account-create-field:last-child {
    margin-bottom: 0;
}
.account-create-field label,
.account-create-fieldset legend {
    color: var(--account-copy);
    font-size: var(--font-size-sm);
    font-weight: 700;
}
.account-create-field label em,
.account-create-fieldset legend em {
    color: var(--color-danger);
    font-style: normal;
}
.account-create-field > small,
.account-create-toggle-row small,
.account-create-actions > small {
    color: var(--account-muted);
    font-size: 0.68rem;
    line-height: 1.55;
}
.account-create-field input,
.account-create-field select,
.account-create-field textarea,
.account-character-row input,
.account-create-input-suffix {
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 10px;
    color: var(--account-copy);
    font: inherit;
    min-width: 0;
    width: 100%;
}
.account-create-field input,
.account-create-field select,
.account-character-row input {
    min-height: 44px;
    padding: 9px 12px;
}
.account-create-field textarea {
    line-height: 1.65;
    padding: 11px 12px;
    resize: vertical;
}
.account-create-field input:focus,
.account-create-field select:focus,
.account-create-field textarea:focus,
.account-character-row input:focus {
    border-color: var(--account-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--account-accent) 16%, transparent);
    outline: 0;
}
.account-character-list {
    display: grid;
    gap: 8px;
}
.account-character-row {
    align-items: center;
    display: flex;
    gap: 8px;
}
.account-character-row button,
.account-add-character {
    align-items: center;
    background: var(--account-card);
    border: 1px solid var(--account-line);
    color: var(--account-muted);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    justify-content: center;
}
.account-character-row button {
    border-radius: 9px;
    flex: 0 0 40px;
    height: 40px;
}
.account-character-row button:hover {
    background: color-mix(in srgb, var(--color-danger) 9%, var(--account-card));
    border-color: color-mix(in srgb, var(--color-danger) 28%, var(--account-line));
    color: var(--color-danger);
}
.account-add-character {
    border-radius: 9px;
    color: var(--account-accent-dark);
    font-size: var(--font-size-xs);
    font-weight: 700;
    gap: 6px;
    justify-self: start;
    min-height: 38px;
    padding: 7px 11px;
}
.account-add-character:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}
.account-create-fieldset {
    border: 0;
    display: grid;
    gap: 9px;
    margin: 0 0 17px;
    min-width: 0;
    padding: 0;
}
.account-create-fieldset legend {
    margin-bottom: 8px;
}
.account-create-radio-card {
    align-items: flex-start;
    background: var(--color-bg-secondary);
    border: 1px solid var(--account-line);
    border-radius: 11px;
    cursor: pointer;
    display: flex;
    gap: 10px;
    padding: 12px;
}
.account-create-radio-card:has(input:checked) {
    background: var(--account-accent-soft);
    border-color: color-mix(in srgb, var(--account-accent) 40%, var(--account-line));
}
.account-create-radio-card input {
    accent-color: var(--account-accent);
    flex: 0 0 auto;
    margin-top: 3px;
}
.account-create-radio-card span {
    display: grid;
    gap: 3px;
}
.account-create-radio-card strong {
    color: var(--account-copy);
    font-size: var(--font-size-sm);
}
.account-create-radio-card small {
    color: var(--account-muted);
    font-size: 0.68rem;
    line-height: 1.5;
}
.account-create-fieldset.is-inline {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}
.account-create-fieldset.is-inline legend {
    flex: 0 0 100%;
}
.account-create-fieldset.is-inline label {
    align-items: center;
    background: var(--color-bg-secondary);
    border: 1px solid var(--account-line);
    border-radius: 999px;
    color: var(--account-muted);
    cursor: pointer;
    display: inline-flex;
    font-size: var(--font-size-xs);
    gap: 6px;
    padding: 8px 11px;
}
.account-create-fieldset.is-inline label:has(input:checked) {
    background: var(--account-accent-soft);
    border-color: color-mix(in srgb, var(--account-accent) 35%, var(--account-line));
    color: var(--account-accent-dark);
    font-weight: 700;
}
.account-create-fieldset.is-inline input {
    accent-color: var(--account-accent);
}
.account-create-toggle-row {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    position: relative;
}
.account-create-toggle-row > span {
    display: grid;
    gap: 3px;
    min-width: 0;
}
.account-create-toggle-row strong {
    color: var(--account-copy);
    font-size: var(--font-size-sm);
}
.account-create-toggle-row input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}
.account-create-toggle-row > i {
    background: var(--color-bg-tertiary);
    border: 1px solid var(--account-line);
    border-radius: 999px;
    cursor: pointer;
    flex: 0 0 42px;
    height: 24px;
    position: relative;
    transition: background 160ms ease, border-color 160ms ease;
}
.account-create-toggle-row > i::after {
    background: var(--account-card);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    content: "";
    height: 18px;
    left: 2px;
    position: absolute;
    top: 2px;
    transition: transform 160ms ease;
    width: 18px;
}
.account-create-toggle-row input:checked + i {
    background: var(--account-accent);
    border-color: var(--account-accent);
}
.account-create-toggle-row input:checked + i::after {
    transform: translateX(18px);
}
.account-create-toggle-row input:focus-visible + i {
    outline: 2px solid var(--account-accent);
    outline-offset: 2px;
}
.account-genre-counter {
    background: var(--account-accent-soft);
    border-radius: 999px;
    color: var(--account-accent-dark);
    flex: 0 0 auto;
    font-size: 0.68rem;
    padding: 6px 9px;
}
.account-create-genres .hdk-genre-selector {
    border: 0;
    border-radius: 0;
    padding: 0;
}
.account-cover-dropzone {
    align-items: center;
    aspect-ratio: 2 / 3;
    background: var(--color-bg-secondary);
    border: 1px dashed color-mix(in srgb, var(--account-accent) 38%, var(--account-line));
    border-radius: 13px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.account-cover-dropzone.is-dragging {
    background: var(--account-accent-soft);
    border-color: var(--account-accent);
}
.account-cover-dropzone > input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}
.account-cover-dropzone > span {
    align-items: center;
    color: var(--account-muted);
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 18px;
    text-align: center;
}
.account-cover-dropzone > span .hdk-icon {
    color: var(--account-accent-dark);
    height: 28px;
    width: 28px;
}
.account-cover-dropzone > span strong {
    color: var(--account-copy);
    font-size: var(--font-size-sm);
}
.account-cover-dropzone > span small {
    font-size: 0.68rem;
}
.account-cover-dropzone img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}
.account-cover-guide {
    display: grid;
    gap: 8px;
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
}
.account-cover-guide li {
    align-items: center;
    color: var(--account-muted);
    display: flex;
    font-size: 0.66rem;
    gap: 8px;
    justify-content: space-between;
}
.account-cover-guide strong {
    color: var(--account-copy);
    font-weight: 650;
    text-align: right;
}
.account-pricing-notice {
    background: color-mix(in srgb, var(--color-warning) 12%, var(--account-card));
    border: 1px solid color-mix(in srgb, var(--color-warning) 30%, var(--account-line));
    border-radius: 10px;
    color: var(--account-copy);
    font-size: 0.7rem;
    line-height: 1.55;
    margin: 0 0 16px;
    padding: 10px;
}
.account-create-input-suffix {
    align-items: center;
    display: flex;
    overflow: hidden;
}
.account-create-input-suffix input {
    border: 0;
    box-shadow: none;
    flex: 1 1 auto;
}
.account-create-input-suffix span {
    border-left: 1px solid var(--account-line);
    color: var(--account-muted);
    flex: 0 0 auto;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0 10px;
}
.account-create-actions {
    display: grid;
    gap: 10px;
}
.account-draft-status {
    align-items: center;
    background: var(--color-bg-secondary);
    border-radius: 11px;
    display: flex;
    gap: 9px;
    padding: 10px;
}
.account-draft-status > .hdk-icon {
    color: var(--account-accent-dark);
    flex: 0 0 18px;
}
.account-draft-status span {
    display: grid;
    gap: 2px;
}
.account-draft-status strong {
    color: var(--account-copy);
    font-size: 0.7rem;
}
.account-draft-status small {
    color: var(--account-muted);
    font-size: 0.62rem;
}
.account-delete-draft,
.account-submit-story {
    align-items: center;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: var(--font-size-sm);
    font-weight: 750;
    gap: 7px;
    justify-content: center;
    min-height: 44px;
    padding: 9px 13px;
    width: 100%;
}
.account-delete-draft {
    background: var(--account-card);
    border: 1px solid var(--account-line);
    color: var(--color-danger);
}
.account-submit-story {
    background: var(--account-accent);
    border: 1px solid var(--account-accent);
    color: var(--color-on-primary);
}
.account-submit-story:hover {
    background: var(--account-accent-dark);
}
.account-submission-history {
    margin-top: 20px;
}
.account-submission-table-wrap {
    overflow-x: auto;
}
.account-submission-table {
    border-collapse: collapse;
    font-size: var(--font-size-xs);
    min-width: 720px;
    text-align: left;
    width: 100%;
}
.account-submission-table th,
.account-submission-table td {
    border-bottom: 1px solid var(--account-line);
    padding: 11px 10px;
    vertical-align: top;
}
.account-submission-table th {
    color: var(--account-muted);
    font-size: 0.66rem;
    text-transform: uppercase;
}
.account-submission-table td {
    color: var(--account-muted);
}
.account-submission-table td:first-child strong,
.account-submission-table td:first-child small {
    display: block;
}
.account-submission-table td:first-child strong {
    color: var(--account-copy);
}
.account-submission-table td:first-child small {
    margin-top: 3px;
}
.account-submission-table a {
    color: var(--account-accent-dark);
    display: inline-block;
    font-weight: 700;
    margin-left: 5px;
    text-decoration: none;
}
.account-submission-pending {
    background: color-mix(in srgb, var(--color-warning) 14%, var(--account-card));
    border: 1px solid color-mix(in srgb, var(--color-warning) 30%, var(--account-line));
    color: var(--color-warning);
}
.account-submission-empty {
    padding: 24px 0;
}
.account-submission-empty p {
    color: var(--account-muted);
}

@media (max-width: 1120px) {
    .account-create-story-layout {
        grid-template-columns: minmax(0, 1fr);
    }
    .account-create-story-aside {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        position: static;
    }
    .account-cover-dropzone {
        aspect-ratio: 3 / 2;
    }
}

@media (max-width: 760px) {
    .account-create-story-aside,
    .account-create-grid-2 {
        grid-template-columns: minmax(0, 1fr);
    }
    .account-cover-dropzone {
        aspect-ratio: 2 / 1;
    }
}

@media (max-width: 520px) {
    .account-create-card,
    .account-submission-history {
        border-radius: 13px;
        padding: 16px;
    }
    .account-create-card-heading {
        align-items: flex-start;
        flex-wrap: wrap;
    }
    .account-genre-counter {
        margin-left: 51px;
    }
    .account-create-fieldset.is-inline label {
        flex: 1 1 auto;
        justify-content: center;
    }
}
.account-content-main > .panel,
.account-content-main > .account-settings-panel,
.account-content-main > .empty-state {
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}
.account-content-main > .empty-state {
    padding: 52px 24px;
}
.account-content-main .btn-primary {
    background: var(--account-accent-dark);
    border-color: var(--account-accent-dark);
}
.account-content-main .btn-primary:hover {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}
.account-content-main input:focus,
.account-content-main select:focus,
.account-content-main textarea:focus {
    border-color: var(--account-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--account-accent) 18%, transparent);
    outline: none;
}
.account-security-section {
    scroll-margin-top: calc(var(--header-height) + 28px);
}
.account-profile-banner {
    align-items: flex-end;
    background: linear-gradient(135deg, var(--account-accent-soft), var(--color-bg-secondary));
    border: 1px solid var(--account-line);
    border-radius: 14px;
    display: flex;
    gap: 14px;
    margin-bottom: 22px;
    min-height: 142px;
    overflow: hidden;
    padding: 22px;
    position: relative;
}
.account-profile-banner-pattern {
    color: color-mix(in srgb, var(--account-accent) 16%, transparent);
    position: absolute;
    right: 24px;
    top: 18px;
}
.account-profile-banner-pattern .hdk-icon {
    height: 96px;
    width: 96px;
}
.account-profile-banner-avatar {
    background: var(--account-card);
    border: 4px solid var(--account-card);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    flex: 0 0 78px;
    height: 78px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}
.account-profile-banner-avatar img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}
.account-profile-banner-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    position: relative;
    z-index: 1;
}
.account-profile-banner-copy strong,
.account-profile-banner-copy span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.account-profile-banner-copy strong {
    color: var(--account-copy);
    font-size: var(--font-size-lg);
}
.account-profile-banner-copy span {
    color: var(--account-muted);
    font-size: var(--font-size-xs);
}
.account-profile-banner-copy small {
    align-self: flex-start;
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 999px;
    color: var(--account-accent-dark);
    font-size: 0.62rem;
    font-weight: 800;
    margin-top: 7px;
    padding: 3px 8px;
}
.account-preference-frame {
    border-top: 1px solid var(--account-line);
    margin-top: 20px;
    padding-top: 20px;
}
.account-preference-frame > div:first-child h3 {
    color: var(--account-copy);
    font-size: var(--font-size-base);
    margin: 0 0 4px;
}
.account-preference-frame > div:first-child p {
    color: var(--account-muted);
    font-size: var(--font-size-xs);
    margin: 0 0 14px;
}
.account-toggle-list {
    border: 1px solid var(--account-line);
    border-radius: 12px;
    overflow: hidden;
}
.account-toggle-list label {
    align-items: center;
    background: var(--account-card);
    cursor: not-allowed;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    min-height: 62px;
    opacity: 0.72;
    padding: 11px 13px;
}
.account-toggle-list label + label {
    border-top: 1px solid var(--account-line);
}
.account-toggle-list label > span {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.account-toggle-list strong {
    color: var(--account-copy);
    font-size: var(--font-size-xs);
}
.account-toggle-list small {
    color: var(--account-muted);
    font-size: 0.65rem;
}
.account-toggle-list input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}
.account-toggle-list i {
    background: var(--color-bg-tertiary);
    border: 1px solid var(--account-line);
    border-radius: 999px;
    flex: 0 0 36px;
    height: 21px;
    position: relative;
}
.account-toggle-list i::after {
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 50%;
    content: "";
    height: 15px;
    left: 2px;
    position: absolute;
    top: 2px;
    width: 15px;
}

/* Account security view */
.account-dashboard-workspace.is-security-view {
    grid-template-columns: minmax(0, 1fr);
}
.account-security-view {
    align-items: start;
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 2.08fr) minmax(270px, 1fr);
}
.account-security-primary,
.account-security-aside {
    display: grid;
    gap: 16px;
    min-width: 0;
}
.account-security-aside {
    position: sticky;
    top: calc(var(--header-height) + 24px);
}
.account-security-card {
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    min-width: 0;
    padding: 20px;
}
.account-security-card-heading {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 17px;
}
.account-security-card-heading > div {
    min-width: 0;
}
.account-security-kicker {
    color: var(--account-muted);
    display: block;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    margin-bottom: 3px;
    text-transform: uppercase;
}
.account-security-card h2 {
    color: var(--account-copy);
    font-size: var(--font-size-lg);
    line-height: 1.3;
    margin: 0;
}
.account-security-card-icon {
    align-items: center;
    background: var(--account-accent-soft);
    border: 1px solid color-mix(in srgb, var(--account-accent) 22%, var(--account-line));
    border-radius: 11px;
    color: var(--account-accent-dark);
    display: inline-flex;
    flex: 0 0 38px;
    height: 38px;
    justify-content: center;
}
.account-security-card-icon .hdk-icon {
    height: 18px;
    width: 18px;
}
.account-security-details {
    margin: 0;
}
.account-security-details > div {
    align-items: center;
    border-top: 1px solid var(--account-line);
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(110px, 0.34fr) minmax(0, 1fr);
    min-height: 58px;
    padding: 10px 0;
}
.account-security-details > div:first-child {
    border-top: 0;
    padding-top: 0;
}
.account-security-details > div:last-child {
    padding-bottom: 0;
}
.account-security-details dt {
    color: var(--account-muted);
    font-size: var(--font-size-xs);
    font-weight: 700;
}
.account-security-details dd {
    align-items: center;
    color: var(--account-copy);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    min-width: 0;
}
.account-security-details dd > strong {
    font-size: var(--font-size-sm);
    overflow-wrap: anywhere;
}
.account-security-details dd > a {
    color: var(--account-accent-dark);
    font-size: var(--font-size-xs);
    font-weight: 700;
    margin-left: auto;
}
.account-status-badge,
.account-member-rank {
    align-items: center;
    border: 1px solid currentColor;
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.65rem;
    font-weight: 800;
    gap: 4px;
    line-height: 1;
    padding: 5px 8px;
}
.account-status-badge .hdk-icon,
.account-member-rank .hdk-icon {
    height: 12px;
    width: 12px;
}
.account-status-badge.is-success {
    background: color-mix(in srgb, var(--color-success) 10%, var(--account-card));
    color: var(--color-success);
}
.account-status-badge.is-warning {
    background: color-mix(in srgb, var(--color-warning) 10%, var(--account-card));
    color: var(--color-warning);
}
.account-member-rank {
    background: var(--account-accent-soft);
    color: var(--account-accent-dark);
}
.account-inline-action {
    background: var(--account-accent-dark);
    border: 1px solid var(--account-accent-dark);
    border-radius: 8px;
    color: var(--color-on-primary);
    font: inherit;
    font-size: var(--font-size-xs);
    font-weight: 700;
    margin-left: auto;
    min-height: 32px;
    padding: 5px 10px;
}
.account-inline-action:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}
.account-password-form {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.account-password-field {
    min-width: 0;
}
.account-password-field.is-full {
    grid-column: 1 / -1;
}
.account-password-field label {
    color: var(--account-copy);
    display: block;
    font-size: var(--font-size-xs);
    font-weight: 700;
    margin-bottom: 6px;
}
.account-password-field label span {
    color: var(--color-danger);
}
.account-password-control {
    position: relative;
}
.account-password-control input {
    padding-right: 46px;
    width: 100%;
}
.account-password-control button {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--account-muted);
    cursor: pointer;
    display: inline-flex;
    height: 100%;
    justify-content: center;
    padding: 0 13px;
    position: absolute;
    right: 0;
    top: 0;
}
.account-password-control button:hover {
    color: var(--account-accent-dark);
}
.account-password-control .hdk-icon {
    height: 17px;
    width: 17px;
}
.account-password-hint {
    color: var(--account-muted);
    font-size: var(--font-size-xs);
    grid-column: 1 / -1;
    margin: -3px 0 0;
}
.account-password-form > .btn {
    justify-self: start;
}
.account-security-note {
    align-items: flex-start;
    background: var(--account-accent-soft);
    border: 1px solid color-mix(in srgb, var(--account-accent) 22%, var(--account-line));
    border-radius: 12px;
    color: var(--account-accent-dark);
    display: flex;
    gap: 10px;
    padding: 13px;
}
.account-security-note > .hdk-icon {
    flex: 0 0 20px;
    height: 20px;
    margin-top: 1px;
    width: 20px;
}
.account-security-note span {
    display: flex;
    flex-direction: column;
}
.account-security-note strong {
    color: var(--account-copy);
    font-size: var(--font-size-sm);
}
.account-security-note small,
.account-feature-state {
    color: var(--account-muted);
    font-size: var(--font-size-xs);
}
.account-security-description {
    color: var(--account-muted);
    font-size: var(--font-size-sm);
    line-height: 1.65;
    margin: 0 0 14px;
}
.account-feature-state {
    display: block;
    margin-top: 9px;
}
.account-switch {
    display: inline-flex;
    flex: 0 0 42px;
    position: relative;
}
.account-switch input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}
.account-switch i {
    background: var(--color-bg-tertiary);
    border: 1px solid var(--account-line);
    border-radius: 999px;
    cursor: pointer;
    display: block;
    height: 24px;
    position: relative;
    transition: background 160ms ease, border-color 160ms ease;
    width: 42px;
}
.account-switch i::after {
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    content: "";
    height: 18px;
    left: 2px;
    position: absolute;
    top: 2px;
    transition: transform 160ms ease;
    width: 18px;
}
.account-switch input:checked + i {
    background: var(--account-accent);
    border-color: var(--account-accent-dark);
}
.account-switch input:checked + i::after {
    transform: translateX(18px);
}
.account-switch input:focus-visible + i {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--account-accent) 20%, transparent);
}
.account-switch.is-disabled {
    opacity: 0.58;
}
.account-switch.is-disabled i {
    cursor: not-allowed;
}
.account-privacy-form {
    display: grid;
    gap: 14px;
}
.account-privacy-list {
    border: 1px solid var(--account-line);
    border-radius: 13px;
    overflow: hidden;
}
.account-privacy-list > label {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    min-height: 68px;
    padding: 11px 13px;
}
.account-privacy-list > label + label {
    border-top: 1px solid var(--account-line);
}
.account-privacy-list > label:hover {
    background: color-mix(in srgb, var(--account-accent-soft) 46%, var(--account-card));
}
.account-privacy-list > label > span:first-child {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.account-privacy-list strong {
    color: var(--account-copy);
    font-size: var(--font-size-sm);
}
.account-privacy-list small {
    color: var(--account-muted);
    font-size: var(--font-size-xs);
    line-height: 1.45;
}
.account-privacy-form > .btn {
    justify-self: start;
}
.account-security-score {
    align-items: center;
    background: conic-gradient(var(--account-accent) var(--security-score), var(--color-bg-tertiary) 0);
    border-radius: 50%;
    display: flex;
    height: 128px;
    justify-content: center;
    margin: 4px auto 10px;
    position: relative;
    width: 128px;
}
.account-security-score::before {
    background: var(--account-card);
    border-radius: 50%;
    content: "";
    height: 98px;
    position: absolute;
    width: 98px;
}
.account-security-score > div {
    align-items: center;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}
.account-security-score strong {
    color: var(--account-copy);
    font-size: 1.55rem;
    line-height: 1.1;
}
.account-security-score span {
    color: var(--account-muted);
    font-size: 0.62rem;
}
.account-score-label {
    color: var(--account-accent-dark);
    font-size: var(--font-size-sm);
    font-weight: 800;
    margin: 0 0 15px;
    text-align: center;
}
.account-security-checklist {
    border-top: 1px solid var(--account-line);
    list-style: none;
    margin: 0;
    padding: 12px 0 0;
}
.account-security-checklist li {
    align-items: center;
    display: flex;
    font-size: var(--font-size-xs);
    gap: 8px;
    padding: 5px 0;
}
.account-security-checklist .hdk-icon {
    flex: 0 0 16px;
    height: 16px;
    width: 16px;
}
.account-security-checklist .is-complete {
    color: var(--color-success);
}
.account-security-checklist .is-pending {
    color: var(--color-warning);
}
.account-security-checklist span {
    color: var(--account-copy);
}
.account-device-list,
.account-login-history,
.account-danger-actions {
    display: grid;
    gap: 0;
}
.account-device-item {
    align-items: center;
    border-top: 1px solid var(--account-line);
    display: grid;
    gap: 9px;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    padding: 11px 0;
}
.account-device-item:first-child {
    border-top: 0;
    padding-top: 0;
}
.account-device-item:last-child {
    padding-bottom: 0;
}
.account-device-icon {
    align-items: center;
    background: var(--account-accent-soft);
    border-radius: 9px;
    color: var(--account-accent-dark);
    display: inline-flex;
    height: 34px;
    justify-content: center;
}
.account-device-icon .hdk-icon {
    height: 16px;
    width: 16px;
}
.account-device-item > span:nth-child(2),
.account-login-history div > span {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.account-device-item strong,
.account-login-history strong {
    color: var(--account-copy);
    font-size: var(--font-size-xs);
}
.account-device-item small,
.account-login-history small {
    color: var(--account-muted);
    font-size: 0.62rem;
    overflow-wrap: anywhere;
}
.account-device-item em,
.account-device-item time {
    color: var(--account-muted);
    font-size: 0.6rem;
    font-style: normal;
    white-space: nowrap;
}
.account-device-item em {
    background: color-mix(in srgb, var(--color-success) 11%, var(--account-card));
    border: 1px solid var(--color-success);
    border-radius: 999px;
    color: var(--color-success);
    font-weight: 800;
    padding: 4px 7px;
}
.account-login-history > div {
    align-items: flex-start;
    border-top: 1px solid var(--account-line);
    display: flex;
    gap: 9px;
    padding: 10px 0;
}
.account-login-history > div:first-child {
    border-top: 0;
    padding-top: 0;
}
.account-login-history .hdk-icon {
    color: var(--color-success);
    flex: 0 0 16px;
    height: 16px;
    margin-top: 2px;
    width: 16px;
}
.account-security-link {
    color: var(--account-accent-dark);
    display: inline-block;
    font-size: var(--font-size-xs);
    font-weight: 800;
    margin-top: 7px;
}
.account-security-empty {
    color: var(--account-muted);
    font-size: var(--font-size-xs);
    margin: 0;
}
.account-security-danger {
    border-color: color-mix(in srgb, var(--color-danger) 42%, var(--account-line));
}
.account-security-danger .account-security-card-icon {
    background: color-mix(in srgb, var(--color-danger) 10%, var(--account-card));
    border-color: color-mix(in srgb, var(--color-danger) 30%, var(--account-line));
    color: var(--color-danger);
}
.account-danger-actions button {
    align-items: center;
    background: transparent;
    border: 0;
    border-top: 1px solid var(--account-line);
    color: var(--color-danger);
    display: flex;
    font: inherit;
    gap: 10px;
    padding: 11px 0;
    text-align: left;
    width: 100%;
}
.account-danger-actions button:first-child {
    border-top: 0;
    padding-top: 0;
}
.account-danger-actions button:last-child {
    padding-bottom: 0;
}
.account-danger-actions button:disabled {
    cursor: not-allowed;
    opacity: 0.68;
}
.account-danger-actions button > .hdk-icon {
    flex: 0 0 17px;
    height: 17px;
    width: 17px;
}
.account-danger-actions button > span {
    display: flex;
    flex-direction: column;
    font-size: var(--font-size-xs);
    font-weight: 800;
}
.account-danger-actions small {
    color: var(--account-muted);
    font-size: 0.6rem;
    font-weight: 400;
}

/* Notifications center */
.account-dashboard-workspace.is-notifications-view {
    grid-template-columns: minmax(0, 1fr);
}
.account-notifications-view {
    align-items: start;
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 2.08fr) minmax(270px, 1fr);
}
.account-notifications-main,
.account-notifications-aside {
    display: grid;
    gap: 16px;
    min-width: 0;
}
.account-notifications-aside {
    position: sticky;
    top: calc(var(--header-height) + 24px);
}
.account-notification-tabs {
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding: 9px;
    scrollbar-width: thin;
}
.account-notification-tabs a {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--account-muted);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: var(--font-size-xs);
    font-weight: 750;
    gap: 7px;
    min-height: 36px;
    padding: 7px 12px;
    text-decoration: none;
}
.account-notification-tabs a:hover {
    background: var(--account-accent-soft);
    color: var(--account-accent-dark);
}
.account-notification-tabs a.is-active {
    background: var(--account-accent-dark);
    border-color: var(--account-accent-dark);
    color: var(--color-on-primary);
}
.account-notification-tabs a span {
    align-items: center;
    background: color-mix(in srgb, currentColor 11%, transparent);
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.62rem;
    height: 20px;
    justify-content: center;
    min-width: 20px;
    padding: 0 5px;
}
.account-notification-tabs a.is-active span {
    background: color-mix(in srgb, var(--color-on-primary) 18%, transparent);
}
.account-notification-feed,
.account-notification-widget {
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    min-width: 0;
}
.account-notification-feed {
    padding: 18px;
}
.account-notification-toolbar {
    align-items: center;
    border-bottom: 1px solid var(--account-line);
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 16px;
}
.account-notification-toolbar > p {
    color: var(--account-muted);
    font-size: var(--font-size-xs);
    margin: 0;
}
.account-notification-toolbar > p strong {
    color: var(--account-copy);
}
.account-notification-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}
.account-notification-actions button {
    align-items: center;
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 9px;
    color: var(--account-copy);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: var(--font-size-xs);
    font-weight: 700;
    gap: 6px;
    min-height: 35px;
    padding: 7px 10px;
}
.account-notification-actions button:hover:not(:disabled) {
    background: var(--account-accent-soft);
    border-color: color-mix(in srgb, var(--account-accent) 35%, var(--account-line));
    color: var(--account-accent-dark);
}
.account-notification-actions button.is-danger {
    color: var(--color-danger);
}
.account-notification-actions button.is-danger:hover:not(:disabled) {
    background: color-mix(in srgb, var(--color-danger) 9%, var(--account-card));
    border-color: color-mix(in srgb, var(--color-danger) 38%, var(--account-line));
}
.account-notification-actions button:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}
.account-notification-actions .hdk-icon {
    height: 15px;
    width: 15px;
}
.account-notification-month + .account-notification-month {
    margin-top: 22px;
}
.account-notification-month > h3 {
    color: var(--account-muted);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    margin: 0 0 9px;
    text-transform: uppercase;
}
.account-notification-list {
    display: grid;
    gap: 10px;
}
.account-notification-card {
    align-items: flex-start;
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 13px;
    color: var(--account-copy);
    display: grid;
    gap: 12px;
    grid-template-columns: 42px minmax(0, 1fr);
    padding: 14px;
    position: relative;
    text-decoration: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.account-notification-card:hover {
    border-color: color-mix(in srgb, var(--account-accent) 35%, var(--account-line));
    box-shadow: var(--shadow-md);
    color: var(--account-copy);
    transform: translateY(-1px);
}
.account-notification-card.is-unread {
    background: color-mix(in srgb, var(--account-accent-soft) 38%, var(--account-card));
    border-color: color-mix(in srgb, var(--account-accent) 42%, var(--account-line));
}
.account-notification-card.is-important {
    border-color: color-mix(in srgb, var(--color-danger) 48%, var(--account-line));
}
.account-notification-type-icon {
    align-items: center;
    background: var(--account-accent-soft);
    border: 1px solid color-mix(in srgb, var(--account-accent) 22%, var(--account-line));
    border-radius: 11px;
    color: var(--account-accent-dark);
    display: inline-flex;
    height: 42px;
    justify-content: center;
    width: 42px;
}
.account-notification-type-icon .hdk-icon {
    height: 19px;
    width: 19px;
}
.account-notification-card.is-comment .account-notification-type-icon {
    background: color-mix(in srgb, var(--color-info, var(--account-accent)) 10%, var(--account-card));
    color: var(--color-info, var(--account-accent-dark));
}
.account-notification-card.is-success .account-notification-type-icon {
    background: color-mix(in srgb, var(--color-success) 10%, var(--account-card));
    color: var(--color-success);
}
.account-notification-card.is-important .account-notification-type-icon {
    background: color-mix(in srgb, var(--color-danger) 10%, var(--account-card));
    border-color: color-mix(in srgb, var(--color-danger) 28%, var(--account-line));
    color: var(--color-danger);
}
.account-notification-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.account-notification-card-topline {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    margin-bottom: 4px;
}
.account-notification-card-topline em {
    background: var(--account-accent-soft);
    border-radius: 999px;
    color: var(--account-accent-dark);
    font-size: 0.58rem;
    font-style: normal;
    font-weight: 900;
    letter-spacing: 0.06em;
    padding: 4px 7px;
}
.account-notification-card.is-important .account-notification-card-topline em {
    background: color-mix(in srgb, var(--color-danger) 11%, var(--account-card));
    color: var(--color-danger);
}
.account-notification-card-topline i {
    background: var(--account-accent);
    border-radius: 50%;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--account-accent) 12%, transparent);
    flex: 0 0 8px;
    height: 8px;
    width: 8px;
}
.account-notification-copy > strong {
    color: var(--account-copy);
    font-size: var(--font-size-sm);
    line-height: 1.5;
}
.account-notification-excerpt {
    color: var(--account-muted);
    display: -webkit-box;
    font-size: var(--font-size-xs);
    line-height: 1.6;
    margin-top: 4px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}
.account-notification-copy time {
    align-items: center;
    color: var(--account-muted);
    display: inline-flex;
    font-size: 0.64rem;
    gap: 5px;
    margin-top: 9px;
}
.account-notification-copy time .hdk-icon {
    height: 13px;
    width: 13px;
}
.account-notification-empty {
    align-items: center;
    display: flex;
    flex-direction: column;
    padding: 54px 20px;
    text-align: center;
}
.account-notification-empty > span {
    align-items: center;
    background: var(--account-accent-soft);
    border-radius: 50%;
    color: var(--account-accent-dark);
    display: inline-flex;
    height: 58px;
    justify-content: center;
    margin-bottom: 12px;
    width: 58px;
}
.account-notification-empty .hdk-icon {
    height: 25px;
    width: 25px;
}
.account-notification-empty strong {
    color: var(--account-copy);
    font-size: var(--font-size-base);
}
.account-notification-empty p {
    color: var(--account-muted);
    font-size: var(--font-size-xs);
    margin: 4px 0 0;
}
.account-notification-feed .pagination {
    margin-top: 18px;
}
.account-notification-widget {
    padding: 18px;
}
.account-notification-widget-heading {
    align-items: center;
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
.account-notification-widget-heading > span {
    align-items: center;
    background: var(--account-accent-soft);
    border-radius: 10px;
    color: var(--account-accent-dark);
    display: inline-flex;
    flex: 0 0 38px;
    height: 38px;
    justify-content: center;
}
.account-notification-widget-heading .hdk-icon {
    height: 18px;
    width: 18px;
}
.account-notification-widget-heading > div {
    display: flex;
    flex-direction: column;
}
.account-notification-widget-heading small {
    color: var(--account-muted);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.account-notification-widget-heading h2 {
    color: var(--account-copy);
    font-size: var(--font-size-base);
    margin: 0;
}
.account-notification-summary {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.account-notification-summary > div {
    background: var(--color-bg-secondary);
    border: 1px solid var(--account-line);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 14px 11px;
}
.account-notification-summary > div.is-unread {
    background: var(--account-accent-soft);
    border-color: color-mix(in srgb, var(--account-accent) 28%, var(--account-line));
}
.account-notification-summary strong {
    color: var(--account-copy);
    font-size: var(--font-size-xl);
    line-height: 1.2;
}
.account-notification-summary span {
    color: var(--account-muted);
    font-size: 0.64rem;
}
.account-notification-categories {
    display: grid;
}
.account-notification-categories a {
    align-items: center;
    border-top: 1px solid var(--account-line);
    color: var(--account-copy);
    display: grid;
    gap: 9px;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    min-height: 54px;
    padding: 8px 0;
    text-decoration: none;
}
.account-notification-categories a:first-child {
    border-top: 0;
    padding-top: 0;
}
.account-notification-categories a:last-child {
    padding-bottom: 0;
}
.account-notification-categories a:hover strong {
    color: var(--account-accent-dark);
}
.account-notification-categories a > span {
    align-items: center;
    background: var(--account-accent-soft);
    border-radius: 9px;
    color: var(--account-accent-dark);
    display: inline-flex;
    height: 34px;
    justify-content: center;
}
.account-notification-categories a > span.is-comment {
    background: color-mix(in srgb, var(--color-info, var(--account-accent)) 10%, var(--account-card));
    color: var(--color-info, var(--account-accent-dark));
}
.account-notification-categories a > span.is-system {
    background: color-mix(in srgb, var(--color-warning) 10%, var(--account-card));
    color: var(--color-warning);
}
.account-notification-categories .hdk-icon {
    height: 16px;
    width: 16px;
}
.account-notification-categories strong {
    font-size: var(--font-size-xs);
}
.account-notification-categories em {
    align-items: center;
    background: var(--color-bg-secondary);
    border: 1px solid var(--account-line);
    border-radius: 999px;
    color: var(--account-muted);
    display: inline-flex;
    font-size: 0.62rem;
    font-style: normal;
    font-weight: 800;
    height: 24px;
    justify-content: center;
    min-width: 24px;
    padding: 0 6px;
}

/* Linh Thach wallet */
.account-dashboard-workspace.is-wallet-view {
    grid-template-columns: minmax(0, 1fr);
}
.account-wallet-view {
    align-items: start;
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 2.08fr) minmax(290px, 1fr);
}
.account-wallet-main,
.account-wallet-aside {
    display: grid;
    gap: 16px;
    min-width: 0;
}
.account-wallet-aside {
    position: sticky;
    top: calc(var(--header-height) + 24px);
}
.account-wallet-balance-card,
.account-wallet-history,
.account-wallet-recharge,
.account-wallet-payment-info {
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    min-width: 0;
}
.account-wallet-balance-card {
    align-items: center;
    background: linear-gradient(135deg, var(--account-card), color-mix(in srgb, var(--account-accent-soft) 58%, var(--account-card)));
    display: grid;
    gap: 16px;
    grid-template-columns: 66px minmax(0, 1fr) auto;
    overflow: hidden;
    padding: 24px;
    position: relative;
}
.account-wallet-balance-card::after {
    background: var(--account-accent-soft);
    border-radius: 50%;
    content: "";
    height: 170px;
    opacity: 0.56;
    position: absolute;
    right: -72px;
    top: -92px;
    width: 170px;
}
.account-wallet-balance-icon {
    align-items: center;
    background: linear-gradient(145deg, var(--account-accent), var(--account-accent-dark));
    border-radius: 18px;
    box-shadow: var(--shadow-md);
    color: var(--color-on-primary);
    display: inline-flex;
    height: 66px;
    justify-content: center;
    position: relative;
    width: 66px;
    z-index: 1;
}
.account-wallet-balance-icon .hdk-icon {
    height: 30px;
    width: 30px;
}
.account-wallet-balance-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    position: relative;
    z-index: 1;
}
.account-wallet-balance-copy > span {
    color: var(--account-muted);
    font-size: var(--font-size-xs);
    font-weight: 750;
}
.account-wallet-balance-copy > strong {
    color: var(--account-copy);
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    line-height: 1.2;
    overflow-wrap: anywhere;
}
.account-wallet-balance-copy > strong small {
    color: var(--account-muted);
    font-size: var(--font-size-sm);
    font-weight: 700;
}
.account-wallet-balance-copy p {
    color: var(--account-muted);
    font-size: var(--font-size-xs);
    margin: 3px 0 0;
}
.account-wallet-balance-actions {
    align-items: stretch;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    z-index: 1;
}
.account-wallet-balance-actions .btn {
    justify-content: center;
    white-space: nowrap;
}
.account-wallet-quick-actions {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.account-wallet-quick-actions > a,
.account-wallet-quick-actions > button {
    align-items: center;
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    color: var(--account-copy);
    cursor: pointer;
    display: flex;
    font: inherit;
    gap: 12px;
    min-height: 92px;
    padding: 15px;
    text-align: left;
    text-decoration: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.account-wallet-quick-actions > a:hover,
.account-wallet-quick-actions > button:hover:not(:disabled) {
    border-color: color-mix(in srgb, var(--account-accent) 38%, var(--account-line));
    box-shadow: var(--shadow-md);
    color: var(--account-copy);
    transform: translateY(-1px);
}
.account-wallet-quick-actions > a > span,
.account-wallet-quick-actions > button > span {
    align-items: center;
    background: var(--account-accent-soft);
    border-radius: 12px;
    color: var(--account-accent-dark);
    display: inline-flex;
    flex: 0 0 44px;
    height: 44px;
    justify-content: center;
}
.account-wallet-quick-actions .hdk-icon {
    height: 20px;
    width: 20px;
}
.account-wallet-quick-actions div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.account-wallet-quick-actions strong {
    color: var(--account-copy);
    font-size: var(--font-size-sm);
}
.account-wallet-quick-actions small {
    color: var(--account-muted);
    font-size: var(--font-size-xs);
    line-height: 1.45;
}
.account-wallet-quick-actions .daily-claim-btn.is-cooldown {
    background: color-mix(in oklch, var(--account-card) 90%, var(--account-line));
    cursor: not-allowed;
    opacity: 0.78;
}
.account-wallet-quick-actions .daily-claim-btn.is-cooldown > span {
    background: var(--account-line);
    color: var(--account-muted);
}
.account-wallet-quick-actions #daily-claim-countdown {
    color: var(--account-accent-dark);
    font-variant-numeric: tabular-nums;
    font-weight: 800;
}
.account-wallet-history,
.account-wallet-recharge,
.account-wallet-payment-info {
    padding: 19px;
}
.account-wallet-history {
    scroll-margin-top: calc(var(--header-height) + 24px);
}
.account-wallet-recharge {
    scroll-margin-top: calc(var(--header-height) + 24px);
}
.account-wallet-section-heading {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 16px;
}
.account-wallet-section-heading > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.account-wallet-section-heading > div > span {
    color: var(--account-muted);
    font-size: 0.61rem;
    font-weight: 850;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}
.account-wallet-section-heading h2 {
    color: var(--account-copy);
    font-size: var(--font-size-lg);
    margin: 0;
}
.account-wallet-heading-icon {
    align-items: center;
    background: var(--account-accent-soft);
    border: 1px solid color-mix(in srgb, var(--account-accent) 22%, var(--account-line));
    border-radius: 11px;
    color: var(--account-accent-dark);
    display: inline-flex;
    flex: 0 0 38px;
    height: 38px;
    justify-content: center;
}
.account-wallet-heading-icon .hdk-icon {
    height: 18px;
    width: 18px;
}
.account-wallet-tabs {
    border-bottom: 1px solid var(--account-line);
    display: flex;
    gap: 4px;
    margin-bottom: 4px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: thin;
}
.account-wallet-tabs a {
    border-radius: 999px;
    color: var(--account-muted);
    flex: 0 0 auto;
    font-size: var(--font-size-xs);
    font-weight: 750;
    padding: 7px 11px;
    text-decoration: none;
}
.account-wallet-tabs a:hover {
    background: var(--account-accent-soft);
    color: var(--account-accent-dark);
}
.account-wallet-tabs a.is-active {
    background: var(--account-accent-dark);
    color: var(--color-on-primary);
}
.account-wallet-transactions {
    display: grid;
}
.account-wallet-transaction {
    align-items: center;
    border-top: 1px solid var(--account-line);
    display: grid;
    gap: 12px;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    min-height: 84px;
    padding: 13px 0;
}
.account-wallet-transaction:first-child {
    border-top: 0;
}
.account-wallet-transaction-icon {
    align-items: center;
    background: color-mix(in srgb, var(--color-success) 10%, var(--account-card));
    border: 1px solid color-mix(in srgb, var(--color-success) 28%, var(--account-line));
    border-radius: 11px;
    color: var(--color-success);
    display: inline-flex;
    height: 42px;
    justify-content: center;
    width: 42px;
}
.account-wallet-transaction.is-negative .account-wallet-transaction-icon {
    background: color-mix(in srgb, var(--color-danger) 9%, var(--account-card));
    border-color: color-mix(in srgb, var(--color-danger) 28%, var(--account-line));
    color: var(--color-danger);
}
.account-wallet-transaction-icon .hdk-icon {
    height: 18px;
    width: 18px;
}
.account-wallet-transaction-copy,
.account-wallet-transaction-amount {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.account-wallet-transaction-copy strong {
    color: var(--account-copy);
    font-size: var(--font-size-sm);
}
.account-wallet-transaction-copy p {
    color: var(--account-muted);
    font-size: var(--font-size-xs);
    line-height: 1.45;
    margin: 2px 0;
}
.account-wallet-transaction-copy time {
    color: var(--account-muted);
    font-size: 0.62rem;
}
.account-wallet-transaction-amount {
    align-items: flex-end;
    text-align: right;
}
.account-wallet-transaction-amount strong {
    color: var(--color-success);
    font-size: var(--font-size-base);
}
.account-wallet-transaction.is-negative .account-wallet-transaction-amount strong {
    color: var(--color-danger);
}
.account-wallet-transaction-amount span,
.account-wallet-transaction-amount small {
    color: var(--account-muted);
    font-size: 0.61rem;
    white-space: nowrap;
}
.account-wallet-empty {
    align-items: center;
    display: flex;
    flex-direction: column;
    padding: 48px 20px 38px;
    text-align: center;
}
.account-wallet-empty > span {
    align-items: center;
    background: var(--account-accent-soft);
    border-radius: 50%;
    color: var(--account-accent-dark);
    display: inline-flex;
    height: 56px;
    justify-content: center;
    margin-bottom: 11px;
    width: 56px;
}
.account-wallet-empty .hdk-icon {
    height: 24px;
    width: 24px;
}
.account-wallet-empty strong {
    color: var(--account-copy);
    font-size: var(--font-size-sm);
}
.account-wallet-empty p {
    color: var(--account-muted);
    font-size: var(--font-size-xs);
    margin: 4px 0 0;
}
.account-wallet-history .pagination {
    margin-top: 16px;
}
.account-wallet-packages {
    display: grid;
    gap: 8px;
}
.account-wallet-package {
    align-items: center;
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 12px;
    color: inherit;
    cursor: pointer;
    display: grid;
    gap: 9px;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    min-height: 64px;
    padding: 9px;
    text-align: left;
    width: 100%;
}
.account-wallet-package:hover:not(:disabled),
.account-wallet-package.is-selected { border-color: var(--account-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--account-accent) 28%, transparent); }
.account-wallet-package.is-selected { background: color-mix(in srgb, var(--account-accent-soft) 74%, var(--account-card)); border-width: 2px; padding: 8px; transform: translateY(-1px); }
.account-wallet-package.is-popular.is-selected { background: color-mix(in srgb, var(--account-accent-soft) 80%, var(--account-card)); border-color: var(--account-accent-dark); }
.account-wallet-package:disabled { cursor: not-allowed; opacity: .62; }
.account-wallet-package.is-popular {
    background: color-mix(in srgb, var(--account-accent-soft) 46%, var(--account-card));
    border-color: color-mix(in srgb, var(--account-accent) 38%, var(--account-line));
}
.account-wallet-package-icon {
    align-items: center;
    background: var(--account-accent-soft);
    border-radius: 9px;
    color: var(--account-accent-dark);
    display: inline-flex;
    height: 36px;
    justify-content: center;
}
.account-wallet-package-icon .hdk-icon {
    height: 17px;
    width: 17px;
}
.account-wallet-package.is-selected .account-wallet-package-icon {
    background: var(--account-accent-dark);
    color: var(--color-on-primary);
}
.account-wallet-package > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.account-wallet-package-name {
    align-items: center;
    color: var(--account-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.62rem;
    gap: 5px;
}
.account-wallet-package-name em {
    background: var(--account-accent-dark);
    border-radius: 999px;
    color: var(--color-on-primary);
    font-size: 0.52rem;
    font-style: normal;
    font-weight: 850;
    padding: 2px 5px;
}
.account-wallet-package > div > strong {
    color: var(--account-copy);
    font-size: var(--font-size-xs);
}
.account-wallet-package > div > small {
    color: var(--color-success);
    font-size: 0.58rem;
    font-weight: 750;
}
.account-wallet-package-price {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.account-wallet-package-price > b {
    color: var(--account-accent-dark);
    font-size: var(--font-size-xs);
    white-space: nowrap;
}
.account-wallet-package-price > small {
    align-items: center;
    color: var(--account-accent-dark);
    display: none;
    font-size: .56rem;
    font-weight: 850;
    gap: 3px;
    white-space: nowrap;
}
.account-wallet-package-price > small .hdk-icon { height: 12px; width: 12px; }
.account-wallet-package.is-selected .account-wallet-package-price > small { display: inline-flex; }
.account-wallet-checkout {
    justify-content: center;
    margin-top: 13px;
    width: 100%;
}
.account-wallet-checkout:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}
.account-wallet-checkout-note {
    color: var(--account-muted);
    font-size: 0.61rem;
    line-height: 1.5;
    margin: 7px 0 0;
    text-align: center;
}
.account-wallet-checkout-controls { display: grid; gap: 10px; margin-top: 14px; }
.account-wallet-checkout-controls label { color: var(--account-copy); display: grid; font-size: var(--font-size-xs); font-weight: 700; gap: 6px; }
.account-wallet-checkout-controls input,
.account-wallet-checkout-controls select { background: var(--background); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--foreground); font: inherit; min-height: 40px; padding: 0 10px; width: 100%; }
.account-wallet-checkout-controls small { color: var(--account-muted); font-size: .62rem; font-weight: 500; }
.account-wallet-rate {
    background: var(--account-accent-soft);
    border: 1px solid color-mix(in srgb, var(--account-accent) 24%, var(--account-line));
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    padding: 12px;
}
.account-wallet-rate span {
    color: var(--account-muted);
    font-size: 0.62rem;
}
.account-wallet-rate strong {
    color: var(--account-accent-dark);
    font-size: var(--font-size-sm);
}
.account-wallet-payment-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}
.account-wallet-payment-methods span {
    background: var(--color-bg-secondary);
    border: 1px solid var(--account-line);
    border-radius: 8px;
    color: var(--account-copy);
    font-size: 0.62rem;
    font-weight: 750;
    padding: 6px 8px;
}
.account-wallet-payment-info > small {
    color: var(--account-muted);
    display: block;
    font-size: 0.6rem;
    line-height: 1.5;
    margin-top: 10px;
}

/* Account application settings */
.account-dashboard-workspace.is-preferences-view {
    grid-template-columns: minmax(0, 1fr);
}
.account-settings-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: auto;
}
.account-settings-header-actions button {
    align-items: center;
    border: 1px solid var(--account-line);
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: var(--font-size-xs);
    font-weight: 750;
    gap: 7px;
    min-height: 40px;
    padding: 8px 12px;
}
.account-settings-header-actions .account-settings-reset {
    background: var(--account-card);
    color: var(--account-copy);
}
.account-settings-header-actions .account-settings-save {
    background: var(--account-accent-dark);
    border-color: var(--account-accent-dark);
    color: var(--color-on-primary);
}
.account-settings-header-actions button:hover {
    box-shadow: var(--shadow-sm);
}
.account-settings-header-actions .hdk-icon {
    height: 15px;
    width: 15px;
}
.account-settings-view {
    align-items: start;
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 2.08fr) minmax(290px, 1fr);
}
.account-settings-main,
.account-settings-aside {
    display: grid;
    gap: 16px;
    min-width: 0;
}
.account-settings-aside {
    position: sticky;
    top: calc(var(--header-height) + 24px);
}
.account-settings-card,
.account-settings-widget {
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    min-width: 0;
    padding: 20px;
}
.account-settings-card-heading,
.account-settings-widget-heading {
    align-items: center;
    display: flex;
    gap: 11px;
    margin-bottom: 18px;
}
.account-settings-card-icon,
.account-settings-widget-heading > span {
    align-items: center;
    background: var(--account-accent-soft);
    border: 1px solid color-mix(in srgb, var(--account-accent) 22%, var(--account-line));
    border-radius: 11px;
    color: var(--account-accent-dark);
    display: inline-flex;
    flex: 0 0 40px;
    height: 40px;
    justify-content: center;
}
.account-settings-card-icon .hdk-icon,
.account-settings-widget-heading .hdk-icon {
    height: 18px;
    width: 18px;
}
.account-settings-card-heading > div,
.account-settings-widget-heading > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.account-settings-card-heading > div > span,
.account-settings-widget-heading small {
    color: var(--account-muted);
    font-size: 0.6rem;
    font-weight: 850;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}
.account-settings-card-heading h2,
.account-settings-widget-heading h2 {
    color: var(--account-copy);
    font-size: var(--font-size-lg);
    line-height: 1.3;
    margin: 0;
}
.account-settings-widget-heading h2 {
    font-size: var(--font-size-base);
}
.account-theme-options {
    border: 0;
    margin: 0 0 20px;
    min-width: 0;
    padding: 0;
}
.account-theme-options legend,
.account-reader-options label {
    color: var(--account-copy);
    font-size: var(--font-size-xs);
    font-weight: 750;
    margin-bottom: 8px;
}
.account-theme-options > div {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.account-theme-options label {
    cursor: pointer;
    min-width: 0;
    position: relative;
}
.account-theme-options input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}
.account-theme-options label > span {
    align-items: center;
    background: var(--color-bg-secondary);
    border: 1px solid var(--account-line);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    min-height: 104px;
    padding: 15px 10px;
    text-align: center;
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.account-theme-options label:hover > span {
    border-color: color-mix(in srgb, var(--account-accent) 38%, var(--account-line));
}
.account-theme-options input:checked + span {
    background: var(--account-accent-soft);
    border-color: var(--account-accent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--account-accent) 13%, transparent);
}
.account-theme-options input:focus-visible + span {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--account-accent) 20%, transparent);
}
.account-theme-options .hdk-icon {
    color: var(--account-accent-dark);
    height: 21px;
    margin-bottom: 7px;
    width: 21px;
}
.account-theme-options strong {
    color: var(--account-copy);
    font-size: var(--font-size-xs);
}
.account-theme-options small {
    color: var(--account-muted);
    font-size: 0.6rem;
}
.account-reader-options {
    border-top: 1px solid var(--account-line);
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1.3fr) minmax(180px, 0.7fr);
    padding: 18px 0;
}
.account-reader-options > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.account-reader-options select {
    width: 100%;
}
.account-reader-range label {
    align-items: center;
    display: flex;
    justify-content: space-between;
}
.account-reader-range output {
    background: var(--account-accent-soft);
    border-radius: 999px;
    color: var(--account-accent-dark);
    font-size: 0.65rem;
    padding: 3px 8px;
}
.account-reader-range input[type="range"] {
    accent-color: var(--account-accent-dark);
    cursor: pointer;
    width: 100%;
}
.account-reader-range > div {
    color: var(--account-muted);
    display: flex;
    font-size: 0.58rem;
    justify-content: space-between;
    margin-top: 3px;
}
.account-settings-toggle-row,
.account-settings-toggle-list > label,
.account-settings-cache-row {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    min-height: 64px;
}
.account-settings-toggle-row {
    border-top: 1px solid var(--account-line);
    padding-top: 16px;
}
.account-settings-toggle-row > span:first-child,
.account-settings-toggle-list > label > span:first-child,
.account-settings-cache-row > span {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.account-settings-toggle-row strong,
.account-settings-toggle-list strong,
.account-settings-cache-row strong {
    color: var(--account-copy);
    font-size: var(--font-size-sm);
}
.account-settings-toggle-row small,
.account-settings-toggle-list small,
.account-settings-cache-row small {
    color: var(--account-muted);
    font-size: var(--font-size-xs);
    line-height: 1.45;
}
.account-settings-toggle-list {
    border: 1px solid var(--account-line);
    border-radius: 13px;
    overflow: hidden;
}
.account-settings-toggle-list > label {
    cursor: pointer;
    padding: 10px 13px;
}
.account-settings-toggle-list > label + label {
    border-top: 1px solid var(--account-line);
}
.account-settings-toggle-list > label:hover {
    background: color-mix(in srgb, var(--account-accent-soft) 42%, var(--account-card));
}
.account-settings-cache-row {
    padding-bottom: 16px;
}
.account-settings-cache-row button {
    align-items: center;
    background: var(--account-card);
    border: 1px solid color-mix(in srgb, var(--color-danger) 38%, var(--account-line));
    border-radius: 9px;
    color: var(--color-danger);
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    font: inherit;
    font-size: var(--font-size-xs);
    font-weight: 750;
    gap: 6px;
    min-height: 36px;
    padding: 7px 10px;
}
.account-settings-cache-row button:hover {
    background: color-mix(in srgb, var(--color-danger) 9%, var(--account-card));
}
.account-settings-cache-row .hdk-icon {
    height: 15px;
    width: 15px;
}
.account-settings-form-status {
    color: var(--account-accent-dark);
    font-size: var(--font-size-xs);
    margin: -5px 0 0;
    min-height: 18px;
}
.account-settings-form-status.is-error {
    color: var(--color-danger);
}
.account-settings-preview {
    --settings-preview-bg: var(--color-bg);
    --settings-preview-copy: var(--color-text-primary);
    --settings-preview-muted: var(--color-text-muted);
    background: var(--settings-preview-bg);
    border: 1px solid var(--account-line);
    border-radius: 13px;
    color: var(--settings-preview-copy);
    overflow: hidden;
}
.account-settings-preview.is-dark {
    --settings-preview-bg: var(--color-text-primary);
    --settings-preview-copy: var(--color-bg);
    --settings-preview-muted: var(--color-border);
}
.account-settings-preview.is-system {
    box-shadow: inset 4px 0 0 var(--account-accent);
}
.account-settings-preview-browser {
    align-items: center;
    background: color-mix(in srgb, var(--settings-preview-copy) 8%, var(--settings-preview-bg));
    border-bottom: 1px solid color-mix(in srgb, var(--settings-preview-copy) 15%, transparent);
    display: flex;
    gap: 4px;
    height: 28px;
    padding: 0 9px;
}
.account-settings-preview-browser i {
    background: color-mix(in srgb, var(--settings-preview-copy) 32%, transparent);
    border-radius: 50%;
    height: 5px;
    width: 5px;
}
.account-settings-preview-body {
    font-family: var(--settings-preview-font-family), sans-serif;
    padding: 16px;
}
.account-settings-preview-body > span {
    color: var(--account-accent);
    font-size: 0.56rem;
    font-weight: 850;
    letter-spacing: 0.08em;
}
.account-settings-preview-body > strong {
    color: var(--settings-preview-copy);
    display: block;
    font-size: calc(var(--settings-preview-font-size) * 0.78);
    line-height: 1.4;
    margin-top: 4px;
}
.account-settings-preview-body > p {
    color: var(--settings-preview-muted);
    font-size: calc(var(--settings-preview-font-size) * 0.58);
    line-height: 1.65;
    margin: 7px 0 13px;
}
.account-settings-preview-body > div {
    align-items: center;
    background: color-mix(in srgb, var(--account-accent) 12%, var(--settings-preview-bg));
    border-radius: 9px;
    color: var(--account-accent);
    display: flex;
    font-size: 0.66rem;
    gap: 7px;
    padding: 8px 9px;
}
.account-settings-preview-body > div .hdk-icon {
    height: 15px;
    width: 15px;
}
.account-settings-preview-body > div span {
    color: var(--settings-preview-copy);
}
.account-settings-status-list {
    margin: 0;
}
.account-settings-status-list > div {
    align-items: center;
    border-top: 1px solid var(--account-line);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    min-height: 42px;
}
.account-settings-status-list > div:first-child {
    border-top: 0;
}
.account-settings-status-list dt,
.account-settings-status-list dd {
    font-size: var(--font-size-xs);
    margin: 0;
}
.account-settings-status-list dt {
    color: var(--account-muted);
}
.account-settings-status-list dd {
    color: var(--account-copy);
    font-weight: 750;
    text-align: right;
}
.account-settings-status-list dd.is-good {
    align-items: center;
    color: var(--color-success);
    display: inline-flex;
    gap: 5px;
}
.account-settings-status-list .hdk-icon {
    height: 14px;
    width: 14px;
}
.account-settings-tips {
    background: var(--color-bg-secondary);
    border: 1px solid var(--account-line);
    border-radius: 11px;
    margin-top: 13px;
    padding: 11px 12px;
}
.account-settings-tips strong {
    color: var(--account-copy);
    font-size: var(--font-size-xs);
}
.account-settings-tips ul {
    color: var(--account-muted);
    font-size: 0.64rem;
    line-height: 1.55;
    margin: 7px 0 0;
    padding-left: 17px;
}
.account-settings-backup-copy {
    color: var(--account-muted);
    font-size: var(--font-size-xs);
    line-height: 1.55;
    margin: -4px 0 13px;
}
.account-settings-backup-actions {
    display: grid;
    gap: 8px;
}
.account-settings-backup-actions button {
    align-items: center;
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 9px;
    color: var(--account-copy);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: var(--font-size-xs);
    font-weight: 750;
    gap: 7px;
    justify-content: center;
    min-height: 38px;
    padding: 8px 10px;
    width: 100%;
}
.account-settings-backup-actions button:hover {
    background: var(--account-accent-soft);
    border-color: color-mix(in srgb, var(--account-accent) 35%, var(--account-line));
    color: var(--account-accent-dark);
}
.account-settings-backup-actions .hdk-icon {
    height: 15px;
    width: 15px;
}

/* Creator story manager */
.account-dashboard-workspace.is-stories-view {
    grid-template-columns: minmax(0, 1fr);
}
.account-header-action.account-header-action-primary {
    background: var(--account-accent-dark);
    border-color: var(--account-accent-dark);
    color: var(--color-on-primary);
}
.account-header-action.account-header-action-primary:hover {
    background: var(--color-primary-hover);
    color: var(--color-on-primary);
}
.account-story-manager {
    display: grid;
    gap: 18px;
    min-width: 0;
}
.account-story-controls,
.account-story-empty {
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}
.account-story-controls {
    padding: 17px;
}
.account-story-count-tab {
    align-items: center;
    display: inline-flex;
    gap: 8px;
    margin-bottom: 14px;
}
.account-story-count-tab > span {
    color: var(--account-copy);
    font-size: var(--font-size-sm);
    font-weight: 800;
}
.account-story-count-tab > strong {
    align-items: center;
    background: var(--account-accent-dark);
    border-radius: 999px;
    color: var(--color-on-primary);
    display: inline-flex;
    font-size: 0.64rem;
    height: 24px;
    justify-content: center;
    min-width: 24px;
    padding: 0 7px;
}
.account-story-filter-form {
    display: grid;
    gap: 9px;
    grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(135px, 1fr)) auto;
}
.account-story-filter-form label {
    min-width: 0;
}
.account-story-filter-form input,
.account-story-filter-form select {
    height: 42px;
    width: 100%;
}
.account-story-search {
    position: relative;
}
.account-story-search > .hdk-icon {
    color: var(--account-muted);
    height: 17px;
    left: 12px;
    pointer-events: none;
    position: absolute;
    top: 13px;
    width: 17px;
}
.account-story-search input {
    padding-left: 39px;
}
.account-story-filter-form > button,
.account-story-filter-form > a {
    align-items: center;
    border-radius: 9px;
    display: inline-flex;
    font: inherit;
    font-size: var(--font-size-xs);
    font-weight: 750;
    gap: 6px;
    justify-content: center;
    min-height: 42px;
    padding: 8px 12px;
}
.account-story-filter-form > button {
    background: var(--account-accent-dark);
    border: 1px solid var(--account-accent-dark);
    color: var(--color-on-primary);
    cursor: pointer;
}
.account-story-filter-form > a {
    color: var(--account-muted);
    grid-column: 1 / -1;
    justify-self: start;
    min-height: auto;
    padding: 3px 0;
}
.account-story-filter-form > button .hdk-icon {
    height: 15px;
    width: 15px;
}
.account-story-filter-summary {
    border-top: 1px solid var(--account-line);
    color: var(--account-muted);
    font-size: 0.65rem;
    margin: 13px 0 0;
    padding-top: 11px;
}
.account-story-filter-summary strong {
    color: var(--account-copy);
}
.account-story-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.account-story-card {
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.account-story-card:hover {
    border-color: color-mix(in srgb, var(--account-accent) 34%, var(--account-line));
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.account-story-cover {
    aspect-ratio: 3 / 4;
    background: var(--color-bg-secondary);
    overflow: hidden;
    position: relative;
}
.account-story-cover::after {
    background: linear-gradient(transparent, color-mix(in srgb, var(--color-text-primary) 62%, transparent));
    bottom: 0;
    content: "";
    height: 30%;
    left: 0;
    pointer-events: none;
    position: absolute;
    right: 0;
}
.account-story-cover > img {
    height: 100%;
    object-fit: cover;
    transition: transform 280ms ease;
    width: 100%;
}
.account-story-card:hover .account-story-cover > img {
    transform: scale(1.025);
}
.account-story-status,
.account-story-price {
    backdrop-filter: blur(7px);
    border: 1px solid color-mix(in srgb, var(--color-on-primary) 28%, transparent);
    border-radius: 999px;
    color: var(--color-on-primary);
    font-size: 0.56rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    padding: 5px 7px;
    position: absolute;
    top: 10px;
    z-index: 2;
}
.account-story-status {
    background: color-mix(in srgb, var(--account-accent-dark) 82%, transparent);
    left: 10px;
}
.account-story-status.is-completed {
    background: color-mix(in srgb, var(--color-success) 82%, transparent);
}
.account-story-status.is-dropped {
    background: color-mix(in srgb, var(--color-danger) 82%, transparent);
}
.account-story-price {
    align-items: center;
    background: color-mix(in srgb, var(--color-text-primary) 74%, transparent);
    display: inline-flex;
    gap: 4px;
    right: 10px;
}
.account-story-price .hdk-icon {
    height: 11px;
    width: 11px;
}
.account-story-watermark {
    bottom: 9px;
    color: var(--color-on-primary);
    font-size: 0.63rem;
    font-weight: 850;
    left: 11px;
    letter-spacing: 0.05em;
    position: absolute;
    text-shadow: var(--shadow-sm);
    z-index: 2;
}
.account-story-card-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    padding: 14px;
}
.account-story-categories {
    color: var(--account-accent-dark);
    font-size: 0.6rem;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.account-story-card-body h2 {
    display: -webkit-box;
    font-size: var(--font-size-base);
    line-height: 1.45;
    margin: 4px 0 9px;
    min-height: 2.9em;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.account-story-card-body h2 a {
    color: var(--account-copy);
    text-decoration: none;
}
.account-story-card-body h2 a:hover {
    color: var(--account-accent-dark);
}
.account-story-author-row {
    align-items: center;
    display: flex;
    gap: 7px;
    justify-content: space-between;
    min-width: 0;
}
.account-story-author-row > span {
    align-items: center;
    color: var(--account-muted);
    display: inline-flex;
    font-size: 0.63rem;
    gap: 4px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.account-story-author-row > span .hdk-icon {
    flex: 0 0 13px;
    height: 13px;
    width: 13px;
}
.account-story-author-row em {
    align-items: center;
    border: 1px solid currentColor;
    border-radius: 999px;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.55rem;
    font-style: normal;
    font-weight: 800;
    gap: 3px;
    padding: 3px 5px;
}
.account-story-author-row em.is-approved {
    background: color-mix(in srgb, var(--color-success) 9%, var(--account-card));
    color: var(--color-success);
}
.account-story-author-row em.is-draft {
    background: color-mix(in srgb, var(--color-warning) 9%, var(--account-card));
    color: var(--color-warning);
}
.account-story-author-row em .hdk-icon {
    height: 10px;
    width: 10px;
}
.account-story-metrics {
    align-items: center;
    border-top: 1px solid var(--account-line);
    display: flex;
    gap: 13px;
    margin-top: 12px;
    padding-top: 10px;
}
.account-story-metrics span {
    align-items: center;
    color: var(--account-muted);
    display: inline-flex;
    font-size: 0.64rem;
    font-weight: 750;
    gap: 4px;
}
.account-story-metrics .hdk-icon {
    height: 14px;
    width: 14px;
}
.account-story-updated {
    align-items: center;
    color: var(--account-muted);
    display: flex;
    font-size: 0.58rem;
    gap: 4px;
    margin: 8px 0 0;
}
.account-story-updated .hdk-icon {
    height: 11px;
    width: 11px;
}
.account-story-actions {
    align-items: stretch;
    border-top: 1px solid var(--account-line);
    display: grid;
    grid-template-columns: minmax(0, 1fr) repeat(3, 42px);
    min-height: 43px;
}
.account-story-actions > a,
.account-story-actions > button {
    align-items: center;
    background: transparent;
    border: 0;
    border-left: 1px solid var(--account-line);
    color: var(--account-muted);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 0.64rem;
    font-weight: 750;
    gap: 5px;
    justify-content: center;
    padding: 8px;
    text-decoration: none;
}
.account-story-actions > a:first-child {
    border-left: 0;
}
.account-story-actions > a:hover {
    background: var(--account-accent-soft);
    color: var(--account-accent-dark);
}
.account-story-actions > a.is-danger {
    color: var(--color-danger);
}
.account-story-actions > a.is-danger:hover {
    background: color-mix(in srgb, var(--color-danger) 9%, var(--account-card));
}
.account-story-actions > button:disabled {
    cursor: not-allowed;
    opacity: 0.42;
}
.account-story-actions .hdk-icon {
    height: 15px;
    width: 15px;
}
.account-story-empty {
    align-items: center;
    display: flex;
    flex-direction: column;
    padding: 58px 20px;
    text-align: center;
}
.account-story-empty > span {
    align-items: center;
    background: var(--account-accent-soft);
    border-radius: 50%;
    color: var(--account-accent-dark);
    display: inline-flex;
    height: 62px;
    justify-content: center;
    margin-bottom: 12px;
    width: 62px;
}
.account-story-empty > span .hdk-icon {
    height: 27px;
    width: 27px;
}
.account-story-empty h2 {
    color: var(--account-copy);
    font-size: var(--font-size-lg);
    margin: 0;
}
.account-story-empty p {
    color: var(--account-muted);
    font-size: var(--font-size-xs);
    margin: 5px 0 15px;
}
.account-story-manager > .pagination {
    margin-top: 2px;
}
.account-story-editor { background: var(--account-card); border: 1px solid var(--account-line); border-radius: 16px; box-shadow: var(--shadow-sm); overflow: hidden; }
.account-story-editor-heading { align-items: flex-start; border-bottom: 1px solid var(--account-line); display: flex; gap: 18px; justify-content: space-between; padding: 18px; }
.account-story-editor-heading > div > span { color: var(--account-accent-dark); display: block; font-size: .64rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.account-story-editor-heading h2 { color: var(--account-copy); font-size: var(--font-size-lg); margin: 4px 0; }
.account-story-editor-heading p { color: var(--account-muted); font-size: var(--font-size-xs); line-height: 1.5; margin: 0; }
.account-story-editor-heading > a { align-items: center; color: var(--account-muted); display: inline-flex; font-size: var(--font-size-xs); font-weight: 750; gap: 5px; text-decoration: none; white-space: nowrap; }
.account-story-editor-heading > a:hover { color: var(--account-accent-dark); }
.account-story-editor-heading > a .hdk-icon { height: 15px; width: 15px; }
.account-story-editor-form { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 18px; }
.account-story-editor-form > label { color: var(--account-copy); display: grid; font-size: var(--font-size-xs); font-weight: 750; gap: 7px; min-width: 0; }
.account-story-editor-form > .is-wide { grid-column: 1 / -1; }
.account-story-editor-form input[type="text"],
.account-story-editor-form input[type="number"],
.account-story-editor-form select,
.account-story-editor-form textarea { background: var(--background); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--foreground); font: inherit; min-height: 40px; padding: 9px 10px; width: 100%; }
.account-story-editor-form textarea { line-height: 1.55; resize: vertical; }
.account-story-price-input { align-items: center; background: var(--background); border: 1px solid var(--border); border-radius: var(--radius-sm); display: flex; min-height: 40px; overflow: hidden; }
.account-story-price-input input { border: 0 !important; min-width: 0; }
.account-story-price-input small { border-left: 1px solid var(--border); color: var(--account-muted); font-size: .66rem; padding: 0 10px; white-space: nowrap; }
.account-story-editor-combo { align-items: center; background: var(--muted); border: 1px solid var(--border); border-radius: var(--radius-sm); display: flex !important; justify-content: space-between; padding: 10px; }
.account-story-editor-combo > span { display: grid; gap: 3px; }
.account-story-editor-combo small { color: var(--account-muted); font-size: .65rem; font-weight: 500; }
.account-story-editor-combo input { height: 19px; width: 19px; }
.account-story-editor-form footer { align-items: center; border-top: 1px solid var(--account-line); display: flex; gap: 12px; justify-content: space-between; padding-top: 14px; }
.account-story-editor-form footer small { align-items: center; color: var(--account-muted); display: inline-flex; font-size: .66rem; gap: 5px; }
.account-story-editor-form footer small .hdk-icon { height: 14px; width: 14px; }
.account-story-editor-form footer button { background: var(--account-accent-dark); border: 1px solid var(--account-accent-dark); border-radius: var(--radius-sm); color: var(--color-on-primary); cursor: pointer; font: inherit; font-size: var(--font-size-xs); font-weight: 750; min-height: 40px; padding: 8px 13px; }
.account-story-editor-notice { background: var(--muted); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--account-muted); font-size: var(--font-size-xs); line-height: 1.5; margin: 0; padding: 11px; }

/* Right widgets */
.account-widget-panel {
    display: grid;
    gap: 16px;
    min-width: 0;
    position: sticky;
    top: calc(var(--header-height) + 24px);
}
.account-widget-card {
    background: var(--account-card);
    border: 1px solid var(--account-line);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    padding: 17px;
}
.account-widget-heading {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 14px;
}
.account-widget-heading > div {
    min-width: 0;
}
.account-widget-heading span:not(.account-widget-icon) {
    color: var(--account-muted);
    display: block;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}
.account-widget-heading h2 {
    color: var(--account-copy);
    font-size: 0.9rem;
    line-height: 1.3;
    margin: 2px 0 0;
}
.account-widget-icon {
    align-items: center;
    background: var(--account-accent-soft);
    border-radius: 10px;
    color: var(--account-accent-dark);
    display: inline-flex;
    flex: 0 0 36px;
    height: 36px;
    justify-content: center;
}
.account-widget-icon.is-gold {
    background: color-mix(in srgb, var(--color-warning) 12%, var(--account-card));
    color: var(--color-warning);
}
.account-widget-icon .hdk-icon {
    height: 18px;
    width: 18px;
}
.account-quick-stats {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.account-quick-stats > div {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-light);
    border-radius: 11px;
    min-width: 0;
    padding: 11px;
}
.account-quick-stats strong {
    color: var(--account-copy);
    display: block;
    font-size: 1rem;
    line-height: 1.25;
}
.account-quick-stats span {
    color: var(--account-muted);
    display: block;
    font-size: 0.62rem;
    line-height: 1.35;
    margin-top: 3px;
}
.account-wallet-balances {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 13px;
}
.account-wallet-balances > div {
    background: linear-gradient(145deg, var(--account-accent-soft), var(--account-card));
    border: 1px solid color-mix(in srgb, var(--account-accent) 18%, var(--account-line));
    border-radius: 11px;
    min-width: 0;
    padding: 10px;
}
.account-wallet-balances span {
    color: var(--account-muted);
    display: block;
    font-size: 0.62rem;
}
.account-wallet-balances strong {
    color: var(--account-copy);
    display: block;
    font-size: 0.92rem;
    margin-top: 3px;
}
.account-wallet-balances strong small {
    color: var(--account-muted);
    font-size: 0.58rem;
    font-weight: 600;
}
.account-wallet-actions {
    align-items: center;
    border-top: 1px solid var(--account-line);
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding-top: 12px;
}
.account-quick-topup {
    align-items: center;
    background: var(--account-accent);
    border: 1px solid var(--account-accent);
    border-radius: 9px;
    color: var(--color-on-primary);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: var(--font-size-xs);
    font-weight: 700;
    gap: 5px;
    min-height: 34px;
    padding: 6px 9px;
    text-decoration: none;
}
.account-quick-topup:hover {
    background: var(--account-accent-dark);
    border-color: var(--account-accent-dark);
    color: var(--color-on-primary);
}
.account-quick-topup .hdk-icon {
    height: 14px;
    width: 14px;
}
.account-widget-link {
    justify-content: space-between;
}
.account-connection-list {
    display: grid;
    gap: 3px;
}
.account-connection-list > div,
.account-connection-list > a {
    align-items: center;
    border-radius: 10px;
    color: var(--account-copy);
    display: grid;
    gap: 8px;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    min-width: 0;
    padding: 8px;
    text-decoration: none;
}
.account-connection-list > a:hover {
    background: var(--account-accent-soft);
}
.account-connection-icon {
    align-items: center;
    background: var(--color-bg-tertiary);
    border-radius: 9px;
    color: var(--account-muted);
    display: inline-flex;
    height: 32px;
    justify-content: center;
    width: 32px;
}
.account-connection-icon .hdk-icon {
    height: 15px;
    width: 15px;
}
.account-connection-list > div > span:nth-child(2),
.account-connection-list > a > span:nth-child(2) {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.account-connection-list strong {
    font-size: 0.72rem;
}
.account-connection-list small {
    color: var(--account-muted);
    font-size: 0.6rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.account-connection-list em {
    background: color-mix(in srgb, var(--color-warning) 14%, var(--account-card));
    border-radius: 999px;
    color: var(--color-warning);
    font-size: 0.58rem;
    font-style: normal;
    font-weight: 800;
    padding: 3px 6px;
}
.account-connection-list em.is-connected {
    background: color-mix(in srgb, var(--color-success) 12%, var(--account-card));
    color: var(--color-success);
}
.account-quick-links {
    border-top: 1px solid var(--account-line);
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 10px;
    padding-top: 12px;
}
.account-quick-links a {
    align-items: center;
    border: 1px solid var(--account-line);
    border-radius: 9px;
    color: var(--account-muted);
    display: flex;
    flex-direction: column;
    font-size: 0.58rem;
    gap: 4px;
    justify-content: center;
    min-height: 52px;
    padding: 7px 4px;
    text-align: center;
    text-decoration: none;
}
.account-quick-links a:hover {
    background: var(--account-accent-soft);
    border-color: color-mix(in srgb, var(--account-accent) 25%, var(--account-line));
    color: var(--account-accent-dark);
}
.account-quick-links .hdk-icon {
    height: 16px;
    width: 16px;
}
.account-widget-icon.is-danger {
    background: color-mix(in srgb, var(--color-danger) 10%, var(--account-card));
    color: var(--color-danger);
}
.account-danger-widget {
    border-color: color-mix(in srgb, var(--color-danger) 28%, var(--account-line));
}
.account-danger-widget > p {
    color: var(--account-muted);
    font-size: var(--font-size-xs);
    line-height: 1.55;
    margin: 0 0 12px;
}
.account-danger-action {
    align-items: center;
    background: color-mix(in srgb, var(--color-danger) 8%, var(--account-card));
    border: 1px solid color-mix(in srgb, var(--color-danger) 40%, var(--account-line));
    border-radius: 9px;
    color: var(--color-danger);
    cursor: not-allowed;
    display: flex;
    font: 700 var(--font-size-xs)/1.3 var(--font-family);
    gap: 7px;
    justify-content: center;
    min-height: 38px;
    opacity: 0.72;
    padding: 8px 10px;
    width: 100%;
}
.account-danger-action .hdk-icon {
    height: 15px;
    width: 15px;
}
.account-danger-widget > small {
    color: var(--account-muted);
    display: block;
    font-size: 0.58rem;
    line-height: 1.45;
    margin-top: 8px;
}

/* Fixed admin message */
.account-admin-message {
    align-items: center;
    background: var(--color-danger);
    border: 1px solid color-mix(in srgb, var(--color-on-primary) 24%, transparent);
    border-radius: 15px;
    bottom: calc(22px + var(--bottom-nav-height, 0px));
    box-shadow: var(--shadow-lg);
    color: var(--color-on-primary);
    display: flex;
    gap: 10px;
    max-width: min(300px, calc(100vw - 32px));
    padding: 11px 13px;
    position: fixed;
    right: 22px;
    text-decoration: none;
    transition: box-shadow 180ms ease, transform 180ms ease;
    z-index: 45;
}
.account-admin-message:hover {
    box-shadow: var(--shadow-lg);
    color: var(--color-on-primary);
    transform: translateY(-2px);
}
.account-admin-message-icon {
    align-items: center;
    background: color-mix(in srgb, var(--color-on-primary) 17%, transparent);
    border-radius: 10px;
    display: inline-flex;
    flex: 0 0 36px;
    height: 36px;
    justify-content: center;
}
.account-admin-message-icon .hdk-icon {
    height: 18px;
    width: 18px;
}
.account-admin-message > span:nth-child(2) {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}
.account-admin-message strong {
    font-size: 0.76rem;
}
.account-admin-message small {
    color: color-mix(in srgb, var(--color-on-primary) 82%, transparent);
    font-size: 0.6rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.account-admin-message em {
    align-items: center;
    background: var(--color-on-primary);
    border-radius: 999px;
    color: var(--color-danger);
    display: inline-flex;
    flex: 0 0 22px;
    font-size: 0.62rem;
    font-style: normal;
    font-weight: 800;
    height: 22px;
    justify-content: center;
}
.account-sidebar-overlay {
    display: none;
}

@media (max-width: 1180px) {
    .account-dashboard-workspace {
        grid-template-columns: minmax(0, 1fr);
    }
    .account-widget-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        position: static;
    }
    .account-security-view {
        grid-template-columns: minmax(0, 1fr);
    }
    .account-security-aside {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        position: static;
    }
    .account-notifications-view {
        grid-template-columns: minmax(0, 1fr);
    }
    .account-notifications-aside {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        position: static;
    }
    .account-wallet-view {
        grid-template-columns: minmax(0, 1fr);
    }
    .account-wallet-aside {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        position: static;
    }
    .account-settings-view {
        grid-template-columns: minmax(0, 1fr);
    }
    .account-settings-aside {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        position: static;
    }
    .account-story-filter-form {
        grid-template-columns: minmax(220px, 2fr) repeat(2, minmax(150px, 1fr));
    }
    .account-story-filter-form > button {
        grid-column: auto;
    }
}

@media (max-width: 900px) {
    body.account-sidebar-open {
        overflow: hidden;
    }
    .account-page-shell {
        padding: 18px 14px 80px;
    }
    .account-dashboard-shell,
    .account-dashboard-shell.is-sidebar-collapsed {
        display: block;
    }
    .account-dashboard-sidebar {
        border-bottom-left-radius: 0;
        border-top-left-radius: 0;
        bottom: 0;
        left: 0;
        max-height: none;
        max-width: 320px;
        padding: 14px;
        position: fixed;
        top: 0;
        transform: translateX(-105%);
        transition: transform 220ms ease;
        width: min(88vw, 320px);
        z-index: 202;
    }
    body.admin-bar .account-dashboard-sidebar {
        top: 46px;
    }
    .account-page-shell.is-sidebar-open .account-dashboard-sidebar {
        transform: translateX(0);
    }
    .account-sidebar-overlay {
        background: color-mix(in srgb, var(--color-text-primary) 46%, transparent);
        bottom: 0;
        display: block;
        left: 0;
        opacity: 0;
        pointer-events: none;
        position: fixed;
        right: 0;
        top: 0;
        transition: opacity 180ms ease;
        z-index: 201;
    }
    .account-page-shell.is-sidebar-open .account-sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
    }
    .account-sidebar-collapse {
        display: none;
    }
    .account-sidebar-mobile-close,
    .account-mobile-menu-toggle {
        display: inline-flex;
    }
    .account-dashboard-header {
        align-items: flex-start;
        min-height: 0;
        padding: 16px;
    }
    .account-mobile-menu-toggle span {
        display: none;
    }
    .account-mobile-menu-toggle {
        flex: 0 0 40px;
        padding: 0;
    }
    .account-widget-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .account-dashboard-header {
        flex-wrap: wrap;
        gap: 12px;
    }
    .account-dashboard-title {
        flex-basis: calc(100% - 56px);
    }
    .account-dashboard-title-icon {
        flex-basis: 40px;
        height: 40px;
    }
    .account-dashboard-title-icon .hdk-icon {
        height: 19px;
        width: 19px;
    }
    .account-dashboard-heading p {
        font-size: var(--font-size-xs);
    }
    .account-header-action {
        margin-left: 52px;
    }
    .account-widget-panel {
        grid-template-columns: minmax(0, 1fr);
    }
    .account-security-aside,
    .account-password-form,
    .account-notifications-aside,
    .account-wallet-aside,
    .account-wallet-quick-actions,
    .account-settings-aside,
    .account-reader-options {
        grid-template-columns: minmax(0, 1fr);
    }
    .account-password-field.is-full {
        grid-column: auto;
    }
    .account-security-card {
        padding: 17px;
    }
    .account-security-details > div {
        align-items: start;
        gap: 5px;
        grid-template-columns: minmax(0, 1fr);
    }
    .account-security-details dd > a,
    .account-inline-action {
        margin-left: 0;
    }
    .account-notification-feed,
    .account-notification-widget {
        padding: 15px;
    }
    .account-notification-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }
    .account-notification-actions {
        justify-content: flex-start;
        width: 100%;
    }
    .account-notification-actions button {
        justify-content: center;
    }
    .account-notification-card {
        gap: 10px;
        grid-template-columns: 38px minmax(0, 1fr);
        padding: 12px;
    }
    .account-notification-type-icon {
        height: 38px;
        width: 38px;
    }
    .account-wallet-balance-card {
        align-items: start;
        grid-template-columns: 54px minmax(0, 1fr);
        padding: 18px;
    }
    .account-wallet-balance-icon {
        border-radius: 14px;
        height: 54px;
        width: 54px;
    }
    .account-wallet-balance-actions {
        flex-direction: row;
        grid-column: 1 / -1;
    }
    .account-wallet-balance-actions .btn {
        flex: 1 1 0;
    }
    .account-wallet-history,
    .account-wallet-recharge,
    .account-wallet-payment-info {
        padding: 16px;
    }
    .account-wallet-transaction {
        align-items: start;
        grid-template-columns: 38px minmax(0, 1fr);
    }
    .account-wallet-transaction-icon {
        height: 38px;
        width: 38px;
    }
    .account-wallet-transaction-amount {
        align-items: flex-start;
        grid-column: 2;
        text-align: left;
    }
    .account-settings-header-actions {
        margin-left: 52px;
        width: calc(100% - 52px);
    }
    .account-settings-header-actions button {
        flex: 1 1 0;
        justify-content: center;
    }
    .account-settings-card,
    .account-settings-widget {
        padding: 16px;
    }
    .account-theme-options > div {
        gap: 7px;
    }
    .account-theme-options label > span {
        min-height: 94px;
        padding: 12px 6px;
    }
    .account-settings-toggle-row,
    .account-settings-toggle-list > label,
    .account-settings-cache-row {
        align-items: flex-start;
    }
    .account-settings-cache-row {
        flex-direction: column;
    }
    .account-story-filter-form {
        grid-template-columns: minmax(0, 1fr);
    }
    .account-story-filter-form > a {
        grid-column: auto;
    }
    .account-story-filter-form > button {
        width: 100%;
    }
    .account-story-grid {
        grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    }
    .account-story-editor-heading {
        flex-direction: column;
        gap: 10px;
    }
    .account-story-editor-heading > a {
        align-self: flex-start;
    }
    .account-story-editor-form {
        grid-template-columns: minmax(0, 1fr);
        padding: 16px;
    }
    .account-story-editor-form > .is-wide {
        grid-column: auto;
    }
    .account-story-editor-form footer {
        align-items: stretch;
        flex-direction: column;
    }
    .account-story-editor-form footer button {
        justify-content: center;
        width: 100%;
    }
    .account-content-main > .panel,
    .account-content-main > .account-settings-panel {
        padding: 18px;
    }
    .account-admin-message {
        border-radius: 50%;
        bottom: calc(16px + var(--bottom-nav-height, 0px));
        height: 52px;
        max-width: none;
        padding: 8px;
        right: 16px;
        width: 52px;
    }
    .account-admin-message > span:nth-child(2) {
        display: none;
    }
    .account-admin-message-icon {
        background: transparent;
        flex-basis: 34px;
    }
    .account-admin-message em {
        border: 2px solid var(--color-danger);
        height: 20px;
        position: absolute;
        right: -3px;
        top: -3px;
        width: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .account-dashboard-shell,
    .account-dashboard-sidebar,
    .account-sidebar-overlay,
    .account-admin-message,
    .account-sidebar-link {
        transition: none;
    }
}

/* Keep the canonical theme authoritative over legacy component token blocks. */
:root {
    --font-sans: Geist, ui-sans-serif, sans-serif, system-ui;
    --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --font-family: var(--font-sans);
    --radius: 0.625rem;
    --radius-sm: calc(var(--radius) - 4px);
    --radius-md: calc(var(--radius) - 2px);
    --radius-lg: var(--radius);
    --radius-xl: calc(var(--radius) + 4px);
    --radius-pill: var(--radius);
    --color-primary: var(--primary);
    --color-primary-hover: color-mix(in oklch, var(--primary) 84%, black);
    --color-primary-light: var(--secondary);
    --color-on-primary: var(--primary-foreground);
    --color-hero-accent: var(--chart-2);
    --color-hero-bg: var(--sidebar-foreground);
    --color-text-primary: var(--foreground);
    --color-text-secondary: var(--secondary-foreground);
    --color-text-muted: var(--muted-foreground);
    --color-bg: var(--card);
    --color-bg-secondary: var(--background);
    --color-bg-tertiary: var(--muted);
    --color-border: var(--border);
    --color-border-light: color-mix(in oklch, var(--border) 58%, var(--card));
    --color-danger: var(--destructive);
    --color-on-danger: var(--destructive-foreground);
    --color-warning: var(--chart-4);
    --color-rating: var(--chart-3);
    --color-input-bg: var(--card);
    --color-input-border: var(--input);
    --color-input-focus-ring: color-mix(in oklch, var(--ring) 35%, transparent);
    --color-select-indicator: var(--muted-foreground);
    --color-badge-primary-bg: var(--secondary);
    --color-badge-primary-text: var(--primary);
    --color-banner-bg: var(--background);
    --color-banner-text: var(--foreground);
    --color-banner-text-muted: var(--muted-foreground);
    --color-banner-card-bg: var(--card);
    --color-banner-shell-border: var(--border);
    --color-banner-cover-border: var(--border);
    --color-banner-card-active-border: var(--primary);
    --color-footer-bg: var(--sidebar-foreground);
    --shadow-2xs: 0 1px 30px 0 hsl(0 0% 76.8627% / 0.23);
    --shadow-xs: 0 1px 30px 0 hsl(0 0% 76.8627% / 0.23);
    --shadow-sm: 0 1px 30px 0 hsl(0 0% 76.8627% / 0.45), 0 1px 2px -1px hsl(0 0% 76.8627% / 0.45);
    --shadow: 0 1px 30px 0 hsl(0 0% 76.8627% / 0.45), 0 1px 2px -1px hsl(0 0% 76.8627% / 0.45);
    --shadow-md: 0 1px 30px 0 hsl(0 0% 76.8627% / 0.45), 0 2px 4px -1px hsl(0 0% 76.8627% / 0.45);
    --shadow-lg: 0 1px 30px 0 hsl(0 0% 76.8627% / 0.45), 0 4px 6px -1px hsl(0 0% 76.8627% / 0.45);
    --shadow-xl: 0 1px 30px 0 hsl(0 0% 76.8627% / 0.45), 0 8px 10px -1px hsl(0 0% 76.8627% / 0.45);
    --shadow-2xl: 0 1px 30px 0 hsl(0 0% 76.8627% / 1);
}

.dark,
html[data-theme="dark"] {
    --radius: 1.875rem;
    --color-primary-hover: color-mix(in oklch, var(--primary) 84%, white);
    --color-footer-bg: var(--sidebar);
    --shadow-2xs: 0 1px 30px 0 hsl(0 0% 0% / 0.23);
    --shadow-xs: 0 1px 30px 0 hsl(0 0% 0% / 0.23);
    --shadow-sm: 0 1px 30px 0 hsl(0 0% 0% / 0.45), 0 1px 2px -1px hsl(0 0% 0% / 0.45);
    --shadow: 0 1px 30px 0 hsl(0 0% 0% / 0.45), 0 1px 2px -1px hsl(0 0% 0% / 0.45);
    --shadow-md: 0 1px 30px 0 hsl(0 0% 0% / 0.45), 0 2px 4px -1px hsl(0 0% 0% / 0.45);
    --shadow-lg: 0 1px 30px 0 hsl(0 0% 0% / 0.45), 0 4px 6px -1px hsl(0 0% 0% / 0.45);
    --shadow-xl: 0 1px 30px 0 hsl(0 0% 0% / 0.45), 0 8px 10px -1px hsl(0 0% 0% / 0.45);
    --shadow-2xl: 0 1px 30px 0 hsl(0 0% 0% / 1);
}

body {
    background-color: var(--background);
    color: var(--foreground);
    font-family: var(--font-sans);
    letter-spacing: var(--tracking-normal);
}
