/*
 * 末日模型库统一界面设计系统
 * 层级：主题令牌 → 通用组件 → 页面布局 → 响应式规则
 */

:root {
    --ui-font-sans: "Manrope", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    --ui-font-display: "Space Grotesk", "Manrope", "Noto Sans SC", sans-serif;
    --ui-font-calligraphy: "Alimama DongFangDaKai", "Noto Serif SC", "STKaiti", "KaiTi", serif;
    --ui-bg: #0a1324;
    --ui-bg-soft: #111e34;
    --ui-surface: rgba(18, 31, 52, 0.92);
    --ui-surface-strong: rgba(13, 24, 42, 0.98);
    --ui-surface-soft: rgba(29, 47, 75, 0.74);
    --ui-nav: rgba(14, 26, 45, 0.94);
    --ui-text: #f4f7fb;
    --ui-muted: #aebbd0;
    --ui-accent: #6ea8ff;
    --ui-accent-strong: #3f82f6;
    --ui-accent-soft: rgba(110, 168, 255, 0.16);
    --ui-border: rgba(172, 193, 224, 0.2);
    --ui-shadow: 0 22px 70px rgba(1, 8, 22, 0.35);
    --ui-shadow-soft: 0 12px 34px rgba(1, 8, 22, 0.2);
    --ui-radius-xl: 30px;
    --ui-radius-lg: 22px;
    --ui-radius-md: 16px;
    --ui-radius-sm: 12px;
    --ui-page-image: none;
    --ui-page-overlay: linear-gradient(135deg, rgba(7, 16, 31, 0.98), rgba(13, 28, 50, 0.9));
    --ui-hero-glow: rgba(67, 132, 255, 0.3);
    --ui-on-accent: #ffffff;
}

html[data-theme="traditional"],
html:not([data-theme]) {
    --ui-bg: #08111f;
    --ui-bg-soft: #101d30;
    --ui-surface: rgba(17, 29, 48, 0.93);
    --ui-surface-strong: rgba(10, 19, 33, 0.98);
    --ui-surface-soft: rgba(29, 45, 70, 0.76);
    --ui-nav: rgba(14, 25, 43, 0.95);
    --ui-text: #f5f8fd;
    --ui-muted: #aab8cb;
    --ui-accent: #7aafff;
    --ui-accent-strong: #4e8ff4;
    --ui-accent-soft: rgba(122, 175, 255, 0.16);
    --ui-border: rgba(169, 191, 220, 0.2);
    --ui-page-overlay: linear-gradient(135deg, #08111f 0%, #101d30 62%, #132641 100%);
}

html[data-theme="pokemon"] {
    --ui-bg: #dcecff;
    --ui-bg-soft: #f4f9ff;
    --ui-surface: rgba(255, 255, 255, 0.9);
    --ui-surface-strong: rgba(255, 255, 255, 0.97);
    --ui-surface-soft: rgba(228, 240, 255, 0.84);
    --ui-nav: rgba(255, 255, 255, 0.94);
    --ui-text: #102c58;
    --ui-muted: #506987;
    --ui-accent: #1769e8;
    --ui-accent-strong: #0759d3;
    --ui-accent-soft: rgba(255, 218, 57, 0.26);
    --ui-border: rgba(44, 105, 182, 0.17);
    --ui-shadow: 0 24px 70px rgba(36, 92, 163, 0.2);
    --ui-shadow-soft: 0 12px 32px rgba(36, 92, 163, 0.15);
    --ui-page-image: url("/static/img/themes/pokemon-wallpaper-713986.webp");
    --ui-page-overlay: linear-gradient(115deg, rgba(236, 246, 255, 0.97), rgba(212, 233, 255, 0.85));
    --ui-hero-glow: rgba(255, 218, 57, 0.42);
    --ui-on-accent: #ffffff;
}

html[data-theme="digimon"] {
    --ui-bg: #061c29;
    --ui-bg-soft: #0b2d3d;
    --ui-surface: rgba(7, 40, 54, 0.9);
    --ui-surface-strong: rgba(5, 29, 42, 0.97);
    --ui-surface-soft: rgba(13, 69, 80, 0.7);
    --ui-nav: rgba(6, 35, 49, 0.94);
    --ui-text: #edffff;
    --ui-muted: #a7d6d8;
    --ui-accent: #31e4cf;
    --ui-accent-strong: #10bdaa;
    --ui-accent-soft: rgba(49, 228, 207, 0.15);
    --ui-border: rgba(83, 230, 216, 0.2);
    --ui-page-image: url("/static/img/themes/digimon-wallpaper-781242.webp");
    --ui-page-overlay: linear-gradient(120deg, rgba(3, 25, 36, 0.96), rgba(4, 47, 60, 0.84));
    --ui-hero-glow: rgba(49, 228, 207, 0.28);
    --ui-on-accent: #032729;
}

html[data-theme="onepiece"] {
    --ui-bg: #e8f2ef;
    --ui-bg-soft: #fff7e9;
    --ui-surface: rgba(255, 251, 242, 0.92);
    --ui-surface-strong: rgba(255, 252, 245, 0.98);
    --ui-surface-soft: rgba(237, 224, 199, 0.76);
    --ui-nav: rgba(255, 252, 245, 0.95);
    --ui-text: #39291f;
    --ui-muted: #766457;
    --ui-accent: #da6744;
    --ui-accent-strong: #bd4e30;
    --ui-accent-soft: rgba(47, 150, 157, 0.15);
    --ui-border: rgba(117, 82, 55, 0.17);
    --ui-shadow: 0 24px 70px rgba(91, 58, 37, 0.18);
    --ui-shadow-soft: 0 12px 32px rgba(91, 58, 37, 0.13);
    --ui-page-image: url("/static/img/themes/onepiece-wallpaper-1329624.webp");
    --ui-page-overlay: linear-gradient(115deg, rgba(246, 252, 249, 0.95), rgba(255, 239, 213, 0.86));
    --ui-hero-glow: rgba(47, 150, 157, 0.3);
    --ui-on-accent: #ffffff;
}

html[data-theme="cute"] {
    --ui-bg: #d8e9fb;
    --ui-bg-soft: #edf5ff;
    --ui-surface: rgba(239, 247, 255, 0.94);
    --ui-surface-strong: rgba(231, 242, 254, 0.98);
    --ui-surface-soft: rgba(211, 229, 249, 0.9);
    --ui-nav: rgba(235, 245, 255, 0.96);
    --ui-text: #081d43;
    --ui-muted: #526783;
    --ui-accent: #1265ef;
    --ui-accent-strong: #0755d7;
    --ui-accent-soft: rgba(18, 101, 239, 0.11);
    --ui-border: rgba(35, 100, 177, 0.15);
    --ui-shadow: 0 26px 80px rgba(42, 99, 169, 0.2);
    --ui-shadow-soft: 0 14px 36px rgba(42, 99, 169, 0.14);
    --ui-page-overlay: radial-gradient(circle at 18% 8%, rgba(255, 255, 255, 0.95), transparent 30%), linear-gradient(135deg, #e8f3ff 0%, #cfe5ff 48%, #edf5ff 100%);
    --ui-hero-glow: rgba(18, 101, 239, 0.25);
    --ui-on-accent: #ffffff;
}

html[data-theme],
html:not([data-theme]) {
    --text-primary: var(--ui-text) !important;
    --text-secondary: var(--ui-muted) !important;
    --border: var(--ui-border) !important;
    --glass: var(--ui-surface) !important;
    --glass-strong: var(--ui-surface-strong) !important;
    --surface: var(--ui-surface-soft) !important;
    --accent: var(--ui-accent) !important;
    --accent-2: var(--ui-accent-strong) !important;
    --body-bg: var(--ui-page-overlay) !important;
    --panel-radius: var(--ui-radius-lg) !important;
    --control-radius: var(--ui-radius-sm) !important;
    --button-radius: var(--ui-radius-sm) !important;
}

html,
body {
    min-height: 100%;
}

html[data-theme] body,
html:not([data-theme]) body {
    color: var(--ui-text) !important;
    font-family: var(--ui-font-sans) !important;
    background-color: var(--ui-bg) !important;
    background-image: var(--ui-page-overlay), var(--ui-page-image) !important;
    background-size: cover !important;
    background-position: center !important;
    background-attachment: fixed !important;
}

html[data-theme] body::before,
html:not([data-theme]) body::before {
    background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent 35%) !important;
    opacity: 1 !important;
}

.tech-grid,
.tech-glow {
    opacity: 0.16 !important;
    pointer-events: none;
}

.container {
    width: min(1540px, calc(100% - 48px)) !important;
    max-width: none !important;
    margin: 0 auto !important;
    padding: 24px 0 56px !important;
}

.hero-shell.site-header {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    gap: 28px !important;
    min-height: 92px !important;
    margin: 0 0 24px !important;
    padding: 14px 24px !important;
    overflow: visible !important;
    border: 1px solid var(--ui-border) !important;
    border-radius: var(--ui-radius-lg) !important;
    background: var(--ui-nav) !important;
    box-shadow: var(--ui-shadow-soft) !important;
    backdrop-filter: blur(22px) saturate(1.15) !important;
}

.hero-shell.site-header::before,
.hero-shell.site-header::after {
    display: none !important;
}

.site-brand {
    display: inline-flex !important;
    align-items: center !important;
    gap: 12px !important;
    min-width: 250px;
    color: var(--ui-text) !important;
    text-decoration: none !important;
}

.site-brand-mark {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 15px;
    color: var(--ui-on-accent);
    font-size: 30px;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(145deg, var(--ui-accent), var(--ui-accent-strong));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), 0 10px 24px var(--ui-accent-soft);
    transform: rotate(-8deg);
}

.site-brand-copy {
    display: grid;
    gap: 1px;
}

.site-brand-copy strong {
    font-family: var(--ui-font-display);
    font-size: 21px;
    letter-spacing: 0.02em;
}

.site-brand-copy small {
    color: var(--ui-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.hero-shell.site-header .tabs {
    display: flex !important;
    align-items: stretch !important;
    justify-content: flex-end !important;
    flex: 1 1 auto !important;
    gap: 12px !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

.tab-btn {
    position: relative;
    min-height: 54px !important;
    padding: 0 18px !important;
    border: 0 !important;
    border-radius: 14px !important;
    color: var(--ui-text) !important;
    background: transparent !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    white-space: nowrap;
    transition: color 180ms ease, background 180ms ease, transform 180ms ease !important;
}

.tab-btn::after {
    content: "";
    position: absolute;
    left: 22%;
    right: 22%;
    bottom: 1px;
    height: 3px;
    border-radius: 999px;
    background: var(--ui-accent);
    opacity: 0;
    transform: scaleX(0.45);
    transition: opacity 180ms ease, transform 180ms ease;
}

.tab-btn:hover {
    color: var(--ui-accent) !important;
    background: var(--ui-accent-soft) !important;
    transform: translateY(-1px);
}

.tab-btn.active {
    color: var(--ui-accent) !important;
    background: transparent !important;
}

.tab-btn.active::after {
    opacity: 1;
    transform: scaleX(1);
}

.workspace-shell {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 220ms ease, transform 220ms ease;
}

.workspace-shell.is-switching {
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
}

.tab-content {
    display: none !important;
    opacity: 1 !important;
    padding: 0 !important;
    animation: none !important;
}

.tab-content.active {
    display: block !important;
}

.section,
.config-subtabs-shell,
.config-panels,
.records-panels,
.logs-container,
.stats-card,
.cookie-editor-card,
.theme-rule-card {
    color: var(--ui-text) !important;
    border-color: var(--ui-border) !important;
    border-radius: var(--ui-radius-lg) !important;
    background: var(--ui-surface) !important;
    box-shadow: var(--ui-shadow-soft) !important;
    backdrop-filter: blur(18px) saturate(1.08) !important;
}

.section {
    padding: 24px !important;
    margin-bottom: 20px !important;
}

.section h2,
.config-panel h2,
.records-panel h2 {
    color: var(--ui-text) !important;
    font-family: var(--ui-font-display) !important;
    letter-spacing: -0.02em;
}

small,
.muted,
.stats-subtitle,
.form-group small,
.theme-rules-help {
    color: var(--ui-muted) !important;
}

.input,
.select,
textarea,
input[type="text"],
input[type="search"],
input[type="number"],
input[type="password"],
select {
    color: var(--ui-text) !important;
    border: 1px solid var(--ui-border) !important;
    border-radius: var(--ui-radius-sm) !important;
    background: var(--ui-surface-strong) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04) !important;
}

.input:focus,
.select:focus,
textarea:focus,
input:focus,
select:focus {
    border-color: var(--ui-accent) !important;
    box-shadow: 0 0 0 4px var(--ui-accent-soft) !important;
    outline: none !important;
}

.btn,
.home-primary-action,
.home-link-action,
.theme-load-more-btn,
.download-main-btn {
    border-radius: var(--ui-radius-sm) !important;
    font-family: var(--ui-font-sans) !important;
    font-weight: 800 !important;
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease !important;
}

.btn-primary,
.home-primary-action,
.download-main-btn {
    color: var(--ui-on-accent) !important;
    border-color: transparent !important;
    background: linear-gradient(135deg, var(--ui-accent), var(--ui-accent-strong)) !important;
    box-shadow: 0 12px 26px var(--ui-accent-soft) !important;
}

.btn-secondary,
.home-link-action,
.theme-load-more-btn {
    color: var(--ui-text) !important;
    border: 1px solid var(--ui-border) !important;
    background: var(--ui-surface-strong) !important;
}

.btn:hover:not(:disabled),
.home-primary-action:hover,
.home-link-action:hover,
.theme-load-more-btn:hover:not(:disabled),
.download-main-btn:hover:not(:disabled) {
    transform: translateY(-2px) !important;
    filter: saturate(1.08);
}

.config-layout,
.records-layout {
    display: grid;
    gap: 18px;
}

.config-subtabs,
.records-subtabs {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 8px !important;
    border: 1px solid var(--ui-border) !important;
    border-radius: var(--ui-radius-md) !important;
    background: var(--ui-surface) !important;
    box-shadow: var(--ui-shadow-soft) !important;
}

.config-subtab,
.records-subtab {
    min-height: 42px !important;
    padding: 0 16px !important;
    color: var(--ui-muted) !important;
    border: 0 !important;
    border-radius: 11px !important;
    background: transparent !important;
    font-weight: 800 !important;
}

.config-subtab:hover,
.records-subtab:hover,
.config-subtab.active,
.records-subtab.active {
    color: var(--ui-accent) !important;
    background: var(--ui-accent-soft) !important;
}

.home-landing {
    display: grid;
    gap: 22px;
}

.home-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(360px, 0.95fr) minmax(520px, 1.25fr);
    align-items: stretch;
    min-height: 570px;
    padding: 48px;
    overflow: hidden;
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-xl);
    background: linear-gradient(118deg, var(--ui-surface-strong) 0%, var(--ui-surface) 52%, var(--ui-accent-soft) 100%);
    box-shadow: var(--ui-shadow);
}

.home-hero::before {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    right: 10%;
    top: -30%;
    border-radius: 50%;
    background: var(--ui-hero-glow);
    filter: blur(70px);
    pointer-events: none;
}

.home-hero-copy {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding-right: 42px;
}

.home-eyebrow {
    margin: 0 0 14px;
    color: var(--ui-accent) !important;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.home-hero h1 {
    margin: 0;
    color: var(--ui-text);
    font-family: var(--ui-font-display);
    font-size: clamp(54px, 5vw, 86px);
    line-height: 1.04;
    letter-spacing: -0.065em;
}

.home-hero h1 span {
    color: var(--ui-accent);
}

.home-description {
    margin: 28px 0 32px;
    color: var(--ui-muted);
    font-size: 17px;
    line-height: 1.9;
}

.home-primary-action,
.home-link-action {
    min-height: 48px;
    padding: 0 22px;
    cursor: pointer;
}

.home-theme-collage {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 14px;
    min-height: 474px;
    align-self: center;
}

.home-theme-item {
    position: relative;
    display: block;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    color: #ffffff;
    text-align: left;
    border: 1px solid rgba(255,255,255,0.32);
    background: var(--ui-surface-soft);
    cursor: pointer;
    box-shadow: 0 18px 36px rgba(8, 29, 65, 0.2);
    transition: transform 200ms ease, box-shadow 200ms ease;
}

.home-theme-item:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 24px 44px rgba(8, 29, 65, 0.28);
}

.home-theme-item-collage {
    min-height: 225px;
    border-radius: 22px;
}

.home-theme-item-card {
    min-height: 190px;
    border-radius: 20px;
}

.home-theme-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 500ms ease;
}

.home-theme-item:hover img {
    transform: scale(1.055);
}

.home-theme-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 32%, rgba(3, 14, 35, 0.86) 100%);
}

.home-theme-copy {
    position: absolute;
    z-index: 2;
    left: 18px;
    right: 18px;
    bottom: 16px;
    display: grid;
    gap: 4px;
}

.home-theme-copy strong {
    font-family: var(--ui-font-display);
    font-size: 19px;
}

.home-theme-copy small {
    color: rgba(255,255,255,0.78) !important;
    font-size: 12px;
}

.home-theme-placeholder,
.home-theme-loading,
.home-theme-empty {
    display: grid;
    place-items: center;
    min-height: 140px;
    color: var(--ui-muted);
    border: 1px dashed var(--ui-border);
    border-radius: var(--ui-radius-md);
    background: var(--ui-surface-soft);
}

.home-featured-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding: 8px 4px 0;
}

.home-featured-heading h2 {
    margin: 0;
    color: var(--ui-text);
    font-family: var(--ui-font-display);
    font-size: 30px;
}

.home-theme-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.interface-theme-section {
    display: grid;
    gap: 24px;
    min-height: 360px;
}

.interface-theme-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
}

.interface-theme-heading h2 {
    margin: 0 0 10px;
    font-size: 34px;
}

.interface-theme-heading p:not(.home-eyebrow) {
    margin: 0;
    color: var(--ui-muted);
}

.interface-theme-current {
    padding: 9px 14px;
    color: var(--ui-accent);
    border-radius: 999px;
    background: var(--ui-accent-soft);
    font-weight: 800;
}

.interface-theme-control {
    display: grid;
    gap: 10px;
    max-width: 460px;
    color: var(--ui-text);
    font-weight: 800;
}

.interface-theme-control select {
    min-height: 52px;
}

.interface-theme-preview {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 0.7fr;
    gap: 12px;
    padding: 20px;
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-lg);
    background: var(--ui-surface-strong);
}

.interface-theme-preview span {
    min-height: 86px;
    border-radius: 16px;
    background: var(--ui-accent-soft);
    box-shadow: inset 0 0 0 1px var(--ui-border);
}

.interface-theme-preview span:nth-child(2) {
    background: linear-gradient(145deg, var(--ui-accent), var(--ui-accent-strong));
}

.interface-theme-preview span:nth-child(3) {
    background: var(--ui-surface-soft);
}

.interface-theme-preview span:nth-child(4) {
    background: var(--ui-text);
    opacity: 0.84;
}

.interface-theme-status {
    min-height: 24px;
    margin: 0;
    color: var(--ui-muted);
}

.interface-theme-status[data-status="success"] { color: #20a56a; }
.interface-theme-status[data-status="error"] { color: #ef5d62; }
.interface-theme-status[data-status="pending"] { color: var(--ui-accent); }

/* 详情展示页 */
.showcase-header {
    width: min(1440px, calc(100% - 48px)) !important;
    min-height: 82px !important;
    margin: 22px auto 0 !important;
    padding: 14px 22px !important;
    color: var(--ui-text) !important;
    border: 1px solid var(--ui-border) !important;
    border-radius: var(--ui-radius-lg) !important;
    background: var(--ui-nav) !important;
    box-shadow: var(--ui-shadow-soft) !important;
    backdrop-filter: blur(22px) !important;
}

.showcase-header::before,
.showcase-header::after {
    display: none !important;
}

.showcase-logo,
.showcase-nav a {
    color: var(--ui-text) !important;
}

.showcase-logo {
    font-family: var(--ui-font-display) !important;
    font-weight: 900 !important;
}

.showcase-nav a {
    padding: 10px 14px;
    border-radius: 11px;
    font-weight: 800;
}

.showcase-nav a:hover {
    color: var(--ui-accent) !important;
    background: var(--ui-accent-soft) !important;
}

.showcase-main {
    width: min(1440px, calc(100% - 48px)) !important;
    max-width: none !important;
    margin: 22px auto 60px !important;
}

.model-cover-panel,
.model-side-panel,
.author-card,
.author-sidebar,
.author-main,
.theme-main,
.author-model-card,
.config-item,
.perf-cell,
.theme-hero {
    color: var(--ui-text) !important;
    border-color: var(--ui-border) !important;
    border-radius: var(--ui-radius-lg) !important;
    background-color: var(--ui-surface) !important;
    box-shadow: var(--ui-shadow-soft) !important;
}

.author-search-input,
.theme-load-more-btn {
    color: var(--ui-text) !important;
    border-color: var(--ui-border) !important;
    background: var(--ui-surface-strong) !important;
}

.author-model-card:hover,
.config-item:hover {
    border-color: var(--ui-accent) !important;
    transform: translateY(-3px);
}

@media (max-width: 1180px) {
    .hero-shell.site-header {
        align-items: flex-start !important;
        flex-direction: column !important;
    }

    .hero-shell.site-header .tabs {
        justify-content: flex-start !important;
        width: 100% !important;
        overflow-x: auto !important;
    }

    .home-hero {
        grid-template-columns: 0.9fr 1.1fr;
        min-height: 520px;
        padding: 34px;
    }

    .home-theme-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .container,
    .showcase-header,
    .showcase-main {
        width: min(100% - 24px, 100%) !important;
    }

    .container {
        padding-top: 12px !important;
    }

    .hero-shell.site-header {
        min-height: 72px !important;
        padding: 12px 14px !important;
        border-radius: 18px !important;
    }

    .site-brand {
        min-width: 0;
    }

    .site-brand-mark {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    .site-brand-copy strong {
        font-size: 18px;
    }

    .hero-shell.site-header > .tabs {
        display: none !important;
    }

    .home-hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 28px 20px 20px;
        border-radius: 24px;
    }

    .home-hero-copy {
        padding: 10px 4px 28px;
    }

    .home-hero h1 {
        font-size: clamp(46px, 16vw, 66px);
    }

    .home-description {
        font-size: 15px;
    }

    .home-description br {
        display: none;
    }

    .home-theme-collage {
        min-height: 420px;
        gap: 9px;
    }

    .home-theme-item-collage {
        min-height: 198px;
        border-radius: 16px;
    }

    .home-featured-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-theme-cards {
        grid-template-columns: 1fr;
    }

    .home-theme-item-card {
        min-height: 180px;
    }

    .section {
        padding: 18px !important;
        border-radius: 18px !important;
    }

    .config-subtabs,
    .records-subtabs {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
    }

    .interface-theme-heading {
        flex-direction: column;
    }

    .interface-theme-preview {
        grid-template-columns: repeat(2, 1fr);
    }

    .showcase-header {
        margin-top: 12px !important;
        border-radius: 18px !important;
    }
}

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

    .workspace-shell.is-switching {
        transform: none;
    }
}

@media (max-width: 760px) {
    .hero-shell.site-header {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 10px !important;
        min-height: 70px !important;
    }

    .hero-shell.site-header .site-brand {
        order: 1;
        flex: 1 1 auto;
    }

    .hero-shell.site-header .mobile-top-controls {
        position: static !important;
        inset: auto !important;
        order: 2;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        width: auto !important;
        min-height: 0 !important;
        margin: 0 0 0 auto !important;
        padding: 0 !important;
        transform: none !important;
    }

    .hero-shell.site-header .mobile-menu-toggle,
    .hero-shell.site-header .mobile-ui-fold-toggle {
        position: static !important;
        margin: 0 !important;
    }
}

/* Home treemap is intentionally frameless; the chart itself is the visual. */
.home-storage-panel {
    display: block;
    min-height: 474px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.home-storage-treemap {
    min-height: 474px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

@media (max-width: 1180px) {
    .home-storage-panel,
    .home-storage-treemap {
        min-height: 430px;
    }
}

@media (max-width: 760px) {
    .home-storage-panel {
        min-height: 360px;
        padding: 0;
        border-radius: 0;
    }

    .home-storage-treemap {
        min-height: 360px;
    }
}

html[data-theme],
html:not([data-theme]) {
    background-color: var(--ui-bg) !important;
    background-image: var(--ui-page-overlay), var(--ui-page-image) !important;
    background-size: cover !important;
    background-position: center !important;
    background-attachment: fixed !important;
}

.showcase-loading {
    color: var(--ui-text) !important;
    border: 1px solid var(--ui-border) !important;
    border-radius: var(--ui-radius-lg) !important;
    background: var(--ui-surface) !important;
    box-shadow: var(--ui-shadow-soft) !important;
}

.showcase-logo::before {
    display: none !important;
}

.theme-page,
.author-layout,
.model-layout {
    color: var(--ui-text) !important;
}

.author-search-label,
.author-summary,
.author-model-date,
.author-model-perf,
.download-hint,
.model-sub-stats {
    color: var(--ui-muted) !important;
}

.author-model-body,
.author-model-body h3,
.author-model-link,
.config-item-main,
.perf-cell-value-row {
    color: var(--ui-text) !important;
}

.author-model-card,
.config-item,
.perf-cell {
    background: var(--ui-surface-strong) !important;
}


/* Author archive cards: high-contrast, borderless internal layout. */
html[data-theme="cute"] {
    --ui-muted: #334d73;
    --ui-border: rgba(35, 91, 161, 0.24);
}

.authors-pagination-info,
.authors-pagination-info strong,
.section-header,
.section-header h2,
.section-header p {
    color: var(--ui-text) !important;
}

.author-card {
    color: var(--ui-text) !important;
}

.author-card .author-name,
.author-card .author-name-link {
    color: var(--ui-text) !important;
}

.author-card .author-id,
.author-card .author-id-editable {
    color: var(--ui-muted) !important;
    border-bottom-color: color-mix(in srgb, var(--ui-muted) 45%, transparent) !important;
}

.author-card .author-avatar,
.author-card .author-avatar-placeholder {
    border: 0 !important;
    background: var(--ui-accent-soft) !important;
}

.author-card .author-site-badge {
    padding: 3px 0 !important;
    color: var(--ui-muted) !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.author-card .author-model-count {
    padding: 2px 0 !important;
    color: var(--ui-accent-strong) !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.author-card .author-model-count.is-disabled {
    color: var(--ui-muted) !important;
}

.author-card .author-stats {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 24px !important;
    margin: 4px 0 8px !important;
    padding: 4px 0 !important;
    color: var(--ui-text) !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.author-card .author-stat {
    display: grid !important;
    grid-template-columns: 22px minmax(56px, 1fr) auto;
    align-items: center;
    gap: 7px !important;
    min-width: 0;
    color: var(--ui-text) !important;
}

.author-card .author-stat-icon {
    width: 22px !important;
    color: var(--ui-accent-strong) !important;
    filter: saturate(0.78) contrast(1.08);
}

.author-card .author-stat-label {
    margin: 0 !important;
    color: var(--ui-muted) !important;
    font-size: 12px !important;
    font-weight: 700;
    white-space: nowrap;
}

.author-card .author-stat-value {
    color: var(--ui-text) !important;
    font-size: 13px;
    font-weight: 800 !important;
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

.author-card .btn-danger {
    color: #a2162e !important;
    border-color: rgba(196, 36, 62, 0.34) !important;
    background: rgba(255, 235, 239, 0.96) !important;
}

.author-card .btn-danger:disabled {
    color: #7a4852 !important;
    border-color: rgba(122, 72, 82, 0.2) !important;
    background: rgba(246, 235, 238, 0.9) !important;
}

@media (max-width: 420px) {
    .author-card .author-stats {
        gap: 9px 14px !important;
    }

    .author-card .author-stat {
        grid-template-columns: 20px minmax(46px, 1fr) auto;
        gap: 5px !important;
    }
}


/* Cute statistics: mist-blue surfaces instead of stark black and white. */
html[data-theme="cute"] #stats-tab .section {
    border-color: rgba(55, 105, 166, 0.22) !important;
    background: linear-gradient(145deg, rgba(239, 247, 255, 0.96), rgba(224, 238, 253, 0.94)) !important;
    box-shadow: 0 16px 38px rgba(57, 104, 158, 0.13) !important;
}

html[data-theme="cute"] #stats-tab .stats-filter-bar {
    border: 1px solid rgba(50, 101, 164, 0.24) !important;
    background: linear-gradient(135deg, rgba(205, 225, 248, 0.94), rgba(221, 236, 252, 0.96)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58) !important;
}

html[data-theme="cute"] #stats-tab .stats-filter-item label,
html[data-theme="cute"] #stats-tab .stats-filter-hint,
html[data-theme="cute"] #stats-tab .stats-kpi-label,
html[data-theme="cute"] #stats-tab .stats-kpi-sub,
html[data-theme="cute"] #stats-tab .stats-card-title {
    color: #395474 !important;
}

html[data-theme="cute"] #stats-tab .input,
html[data-theme="cute"] #stats-tab .select,
html[data-theme="cute"] #stats-tab select {
    color: #102c52 !important;
    border-color: rgba(53, 100, 159, 0.28) !important;
    background: rgba(240, 247, 255, 0.92) !important;
}

html[data-theme="cute"] #stats-tab .stats-chart,
html[data-theme="cute"] #stats-tab .stats-chart-panel,
html[data-theme="cute"] #stats-tab .web-stats-panel {
    border: 1px solid rgba(54, 104, 164, 0.22) !important;
    background: rgba(218, 234, 251, 0.58) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48) !important;
}

html[data-theme="cute"] #stats-tab .stats-kpi-card {
    color: #0d2b50 !important;
    border: 1px solid rgba(47, 98, 159, 0.24) !important;
    background: linear-gradient(145deg, #cfe2f7, #bdd7f2) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52) !important;
}

html[data-theme="cute"] #stats-tab .stats-kpi-value {
    color: #09264b !important;
}

html[data-theme="cute"] #stats-tab .btn-secondary {
    color: #11335f !important;
    border-color: rgba(49, 98, 158, 0.28) !important;
    background: rgba(231, 242, 254, 0.94) !important;
}

html[data-theme="cute"] #stats-tab .web-stats-table th {
    color: #17365f !important;
    background: rgba(193, 218, 244, 0.72) !important;
}

html[data-theme="cute"] #stats-tab .web-stats-table td {
    color: #29496d !important;
    border-color: rgba(53, 101, 160, 0.16) !important;
}


/* Cute heatmaps: continue the mist-blue hierarchy. */
html[data-theme="cute"] #stats-tab .stats-heatmap-window {
    color: #102c52 !important;
    border: 1px solid rgba(49, 99, 160, 0.22) !important;
    background: linear-gradient(145deg, rgba(203, 224, 247, 0.72), rgba(219, 235, 251, 0.82)) !important;
}

html[data-theme="cute"] #stats-tab .stats-heatmap-window-title,
html[data-theme="cute"] #stats-tab .stats-heatmap-metric-title,
html[data-theme="cute"] #stats-tab .stats-heatmap-model-name {
    color: #102d55 !important;
}

html[data-theme="cute"] #stats-tab .stats-heatmap-window-desc,
html[data-theme="cute"] #stats-tab .stats-heatmap-window-time,
html[data-theme="cute"] #stats-tab .stats-heatmap-author-name {
    color: #486585 !important;
}

html[data-theme="cute"] #stats-tab .stats-heatmap-metric {
    border: 1px solid rgba(51, 100, 159, 0.2) !important;
    background: rgba(226, 238, 252, 0.9) !important;
}

html[data-theme="cute"] #stats-tab .stats-heatmap-item {
    border: 1px solid rgba(53, 102, 162, 0.18) !important;
    background: rgba(237, 245, 254, 0.86) !important;
    box-shadow: none !important;
}

html[data-theme="cute"] #stats-tab .stats-heatmap-item:hover {
    border-color: rgba(18, 101, 239, 0.38) !important;
    background: rgba(229, 240, 253, 0.98) !important;
    box-shadow: 0 8px 18px rgba(55, 104, 160, 0.12) !important;
}

html[data-theme="cute"] #stats-tab .stats-heatmap-rank,
html[data-theme="cute"] #stats-tab .stats-heatmap-value {
    color: #0755d7 !important;
}

html[data-theme="cute"] #stats-tab .stats-heatmap-thumb-wrap,
html[data-theme="cute"] #stats-tab .stats-heatmap-author-avatar.is-placeholder {
    color: #31577f !important;
    border-color: rgba(51, 101, 161, 0.2) !important;
    background: #cfdef0 !important;
}

html[data-theme="cute"] #stats-tab .stats-heatmap-empty {
    color: #526f90 !important;
    border-color: rgba(53, 101, 160, 0.26) !important;
    background: rgba(220, 235, 251, 0.72) !important;
}


/* Cute workspace audit: remove legacy dark controls and restore readable text. */
html[data-theme="cute"] #authors-tab .authors-toolbar,
html[data-theme="cute"] #records-tab .records-bulk-toolbar {
    color: #102d55 !important;
    border: 1px solid rgba(49, 100, 162, 0.22) !important;
    background: linear-gradient(135deg, rgba(205, 225, 248, 0.92), rgba(220, 235, 252, 0.95)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.54) !important;
}

html[data-theme="cute"] #authors-tab .authors-toolbar .input,
html[data-theme="cute"] #authors-tab .authors-toolbar .select {
    color: #102d55 !important;
    background: rgba(239, 247, 255, 0.94) !important;
}

html[data-theme="cute"] #records-tab .form-group label,
html[data-theme="cute"] #logs-tab .form-group label,
html[data-theme="cute"] #config-tab .form-group label,
html[data-theme="cute"] #config-tab .config-field-label,
html[data-theme="cute"] #config-tab .advanced-cooling-field span,
html[data-theme="cute"] #config-tab .advanced-cooling-section h3 {
    color: #395474 !important;
}

html[data-theme="cute"] #records-tab .result-count,
html[data-theme="cute"] #records-tab .records-selected-count,
html[data-theme="cute"] #records-tab .records-select-visible {
    color: #17365f !important;
}

html[data-theme="cute"] #records-tab .record-card,
html[data-theme="cute"] #records-tab .records-theme-card {
    color: #102d55 !important;
    border-color: rgba(48, 99, 160, 0.22) !important;
    background-color: rgba(225, 238, 252, 0.94) !important;
    box-shadow: 0 10px 24px rgba(57, 104, 158, 0.1) !important;
}

html[data-theme="cute"] #records-tab .record-card:hover,
html[data-theme="cute"] #records-tab .records-theme-card:hover {
    border-color: rgba(18, 101, 239, 0.4) !important;
    background-color: rgba(215, 231, 250, 0.98) !important;
}

html[data-theme="cute"] #records-tab .record-card.is-skip-download {
    background-color: rgba(250, 237, 199, 0.9) !important;
}

html[data-theme="cute"] #records-tab .record-card.is-software-print-only {
    background-color: rgba(211, 231, 251, 0.96) !important;
}

html[data-theme="cute"] #records-tab .record-card.is-link-error {
    background-color: rgba(250, 222, 229, 0.92) !important;
}

html[data-theme="cute"] #records-tab .record-cover.is-missing,
html[data-theme="cute"] #records-tab .record-image {
    color: #55708f !important;
    background: #cbdcf0 !important;
}

html[data-theme="cute"] #records-tab .record-select-control {
    border-color: rgba(48, 98, 158, 0.28) !important;
    background: rgba(237, 245, 254, 0.96) !important;
}

html[data-theme="cute"] #records-tab .record-info h3,
html[data-theme="cute"] #records-tab .record-performance-value {
    color: #0c294f !important;
}

html[data-theme="cute"] #records-tab .record-meta,
html[data-theme="cute"] #records-tab .record-meta strong,
html[data-theme="cute"] #records-tab .record-performance-label {
    color: #456283 !important;
}

html[data-theme="cute"] #records-tab .record-meta a {
    color: #0755d7 !important;
}

html[data-theme="cute"] #records-tab .record-performance-item {
    color: #17365f !important;
    border-color: rgba(52, 101, 160, 0.2) !important;
    background: rgba(236, 244, 253, 0.74) !important;
}

html[data-theme="cute"] #records-tab .badge-warning {
    color: #7b4a00 !important;
    background: rgba(250, 220, 151, 0.7) !important;
}

html[data-theme="cute"] #records-tab .badge-danger {
    color: #9a2338 !important;
    background: rgba(249, 210, 220, 0.78) !important;
}

html[data-theme="cute"] #records-tab .badge-info,
html[data-theme="cute"] #records-tab .badge-muted {
    color: #31577f !important;
    background: rgba(205, 224, 246, 0.8) !important;
}

html[data-theme="cute"] #logs-tab .section,
html[data-theme="cute"] #logs-tab .logs-container {
    color: #102d55 !important;
}

html[data-theme="cute"] #logs-tab .log-item {
    color: #102d55 !important;
    border: 1px solid rgba(54, 102, 160, 0.18) !important;
    border-left-width: 4px !important;
    background: rgba(229, 240, 252, 0.84) !important;
    box-shadow: none !important;
}

html[data-theme="cute"] #logs-tab .log-item:hover {
    transform: translateX(2px) !important;
    background: rgba(219, 233, 250, 0.96) !important;
}

html[data-theme="cute"] #logs-tab .log-time,
html[data-theme="cute"] #logs-tab .log-model {
    color: #4c6786 !important;
}

html[data-theme="cute"] #logs-tab .log-message {
    color: #17365f !important;
    font-weight: 560;
}

html[data-theme="cute"] #logs-tab .log-author {
    color: #0755d7 !important;
}

html[data-theme="cute"] #logs-tab .log-action {
    color: #17365f !important;
    border: 1px solid currentColor;
    background: rgba(214, 230, 249, 0.88) !important;
}

html[data-theme="cute"] #logs-tab .log-start { border-left-color: #6b5bd2 !important; }
html[data-theme="cute"] #logs-tab .log-success { border-left-color: #25835f !important; }
html[data-theme="cute"] #logs-tab .log-error { border-left-color: #c63f5a !important; }
html[data-theme="cute"] #logs-tab .log-info { border-left-color: #167a9b !important; }
html[data-theme="cute"] #logs-tab .log-warning { border-left-color: #b66a0b !important; }
html[data-theme="cute"] #logs-tab .log-default { border-left-color: #6883a5 !important; }

html[data-theme="cute"] #logs-tab .log-start .log-action { color: #5141ad !important; background: rgba(221, 216, 250, 0.88) !important; }
html[data-theme="cute"] #logs-tab .log-success .log-action { color: #176744 !important; background: rgba(207, 239, 226, 0.9) !important; }
html[data-theme="cute"] #logs-tab .log-error .log-action { color: #a52b43 !important; background: rgba(249, 216, 224, 0.9) !important; }
html[data-theme="cute"] #logs-tab .log-info .log-action { color: #116a88 !important; background: rgba(205, 235, 244, 0.9) !important; }
html[data-theme="cute"] #logs-tab .log-warning .log-action { color: #8a5109 !important; background: rgba(249, 231, 194, 0.9) !important; }
html[data-theme="cute"] #logs-tab .log-default .log-action { color: #476481 !important; background: rgba(213, 228, 245, 0.9) !important; }

html[data-theme="cute"] #logs-tab .log-auto-refresh-toggle,
html[data-theme="cute"] #logs-tab .date-range span {
    color: #395474 !important;
}

html[data-theme="cute"] #config-tab textarea.input,
html[data-theme="cute"] #config-tab .cookie-editor-textarea,
html[data-theme="cute"] #config-tab .theme-rule-textarea {
    color: #17365f !important;
    border-color: rgba(49, 99, 159, 0.26) !important;
    background: rgba(226, 239, 253, 0.92) !important;
}

html[data-theme="cute"] #config-tab textarea.input::placeholder,
html[data-theme="cute"] #config-tab .cookie-editor-textarea::placeholder {
    color: #647f9d !important;
}

html[data-theme="cute"] #config-tab .config-download-mode-block,
html[data-theme="cute"] #config-tab .browser-backend-status-card,
html[data-theme="cute"] #config-tab .dependency-update-card,
html[data-theme="cute"] #config-tab .download-mode-toggle,
html[data-theme="cute"] #config-tab .cookie-recovery-status {
    color: #17365f !important;
    border-color: rgba(49, 99, 159, 0.22) !important;
    background: rgba(215, 232, 250, 0.78) !important;
}

html[data-theme="cute"] #config-tab .download-mode-btn {
    color: #395474 !important;
}

html[data-theme="cute"] #config-tab .download-mode-btn.active {
    color: #0755d7 !important;
    border-color: rgba(18, 101, 239, 0.28) !important;
    background: rgba(195, 219, 248, 0.92) !important;
    box-shadow: none !important;
}

html[data-theme="cute"] #config-tab .cookie-editor-target,
html[data-theme="cute"] #config-tab .cookie-group-empty,
html[data-theme="cute"] #config-tab small {
    color: #4b6787 !important;
}

html[data-theme="cute"] #config-tab .cookie-group-badge-item {
    background: rgba(214, 231, 249, 0.62) !important;
}

html[data-theme="cute"] #config-tab .cookie-group-action-btn {
    color: #294f78 !important;
    border: 1px solid rgba(48, 98, 158, 0.2) !important;
    background: rgba(230, 241, 253, 0.94) !important;
}

html[data-theme="cute"] #config-tab .cookie-group-action-btn:hover {
    color: #0755d7 !important;
    border-color: rgba(18, 101, 239, 0.34) !important;
    background: rgba(216, 233, 251, 0.98) !important;
}

html[data-theme="cute"] #config-tab .cookie-group-name-badge.cookie-group-status-login-invalid {
    color: #9a2338 !important;
    border-color: rgba(198, 63, 90, 0.32) !important;
    background: rgba(249, 215, 223, 0.9) !important;
}

@media (max-width: 560px) {
    html[data-theme="cute"] #records-tab .record-card {
        background-color: rgba(225, 238, 252, 0.96) !important;
    }
}

html[data-theme="cute"] .btn-danger {
    color: #a2162e !important;
    border-color: rgba(196, 36, 62, 0.34) !important;
    background: rgba(249, 220, 227, 0.92) !important;
}

html[data-theme="cute"] .btn-danger:hover:not(:disabled) {
    color: #861126 !important;
    border-color: rgba(162, 22, 46, 0.46) !important;
    background: rgba(247, 208, 217, 0.98) !important;
}

html[data-theme="cute"] .btn-danger:disabled {
    color: #7a4852 !important;
    border-color: rgba(122, 72, 82, 0.2) !important;
    background: rgba(239, 224, 228, 0.9) !important;
}

@media (max-width: 760px) {
    #config-tab .config-layout,
    #config-tab .config-subtabs-shell,
    #config-tab .config-subtabs,
    #config-tab .config-subtab-actions,
    #config-tab .config-panels,
    #config-tab .config-panel {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    #config-tab .config-subtabs-shell {
        overflow: hidden !important;
    }

    #config-tab .config-subtabs {
        overflow-x: auto !important;
        overscroll-behavior-x: contain;
    }

    #config-tab .config-subtab-actions .btn {
        min-width: 0 !important;
        max-width: 100% !important;
    }
}


/* Author action segmented tabs and cute web-stat tables. */
.authors-list-header .author-action-strip {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    width: 100%;
}

.authors-list-header .crawl-duration-indicator {
    flex: 0 0 auto;
    width: auto !important;
    min-height: 42px;
    padding: 0 16px;
    color: var(--ui-text) !important;
    border: 1px solid var(--ui-border) !important;
    border-radius: 14px !important;
    background: var(--ui-surface-strong) !important;
    box-shadow: none !important;
}

.author-action-tabs {
    display: flex;
    flex: 1 1 auto;
    align-items: stretch;
    min-width: 0;
    padding: 4px;
    overflow-x: auto;
    border: 1px solid var(--ui-border);
    border-radius: 14px;
    background: var(--ui-surface-soft);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
    scrollbar-width: none;
}

.author-action-tabs::-webkit-scrollbar {
    display: none;
}

.author-action-tab {
    flex: 1 0 auto;
    min-width: max-content;
    min-height: 38px !important;
    margin: 0 !important;
    padding: 8px 13px !important;
    color: var(--ui-muted) !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    white-space: nowrap;
    transform: none !important;
}

.author-action-tab:hover:not(:disabled) {
    color: var(--ui-accent-strong) !important;
    background: color-mix(in srgb, var(--ui-accent-soft) 78%, transparent) !important;
}

.author-action-tab.is-featured {
    color: var(--ui-on-accent) !important;
    background: linear-gradient(135deg, var(--ui-accent), var(--ui-accent-strong)) !important;
    box-shadow: 0 7px 16px var(--ui-accent-soft) !important;
}

.author-action-tab.is-sync {
    color: var(--ui-text) !important;
}

.author-action-tab.is-danger {
    color: #a2162e !important;
    background: rgba(249, 220, 227, 0.9) !important;
}

.author-action-tab:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

html[data-theme="cute"] #web-stats-section .web-stats-table {
    color: #17365f !important;
    overflow: hidden auto !important;
    border: 1px solid rgba(51, 101, 161, 0.22) !important;
    border-radius: 12px !important;
    background: rgba(226, 238, 252, 0.9) !important;
}

html[data-theme="cute"] #web-stats-section .web-stats-table table {
    border-collapse: separate;
    border-spacing: 0;
    background: transparent !important;
}

html[data-theme="cute"] #web-stats-section .web-stats-table thead,
html[data-theme="cute"] #web-stats-section .web-stats-table th {
    color: #17365f !important;
    background: #bfd7f0 !important;
}

html[data-theme="cute"] #web-stats-section .web-stats-table tbody tr:nth-child(odd) {
    background: rgba(236, 244, 253, 0.96) !important;
}

html[data-theme="cute"] #web-stats-section .web-stats-table tbody tr:nth-child(even) {
    background: rgba(218, 233, 250, 0.86) !important;
}

html[data-theme="cute"] #web-stats-section .web-stats-table tbody tr:hover {
    background: rgba(203, 224, 247, 0.98) !important;
}

html[data-theme="cute"] #web-stats-section .web-stats-table td {
    color: #29496d !important;
    border-color: rgba(52, 101, 160, 0.16) !important;
    background: transparent !important;
}

html[data-theme="cute"] #web-stats-section .web-stats-empty {
    color: #4d6988 !important;
    border-color: rgba(52, 101, 160, 0.24) !important;
    background: rgba(221, 235, 251, 0.76) !important;
}

@media (max-width: 1500px) {
    .authors-list-header {
        grid-template-columns: 1fr !important;
    }

    .authors-list-header .author-action-strip {
        align-items: stretch !important;
        flex-direction: column;
    }

    .authors-list-header .crawl-duration-indicator {
        justify-content: center;
    }

    .author-action-tabs {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .author-action-tab {
        flex: 0 0 auto;
        min-width: 132px;
    }
}

.authors-list-header .author-action-tab {
    width: auto !important;
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
}

@media (max-width: 560px) {
    .authors-list-header .author-action-tab {
        width: auto !important;
        flex: 0 0 auto;
        min-width: 132px;
    }
}

/* Author archive redline refinements: compact badges, flat filters and bottom pagination. */
.authors-list-header .crawl-duration-indicator {
    min-height: 28px !important;
    padding: 5px 10px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    font-weight: 750 !important;
    letter-spacing: 0 !important;
    line-height: 1.25;
    box-shadow: none !important;
}

.authors-toolbar,
html[data-theme="cute"] #authors-tab .authors-toolbar {
    grid-template-columns: minmax(240px, 2fr) minmax(150px, 0.9fr) minmax(190px, 1.15fr) minmax(130px, 0.75fr) auto auto !important;
    gap: 10px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.authors-toolbar .btn {
    min-height: 40px;
    padding-inline: 15px !important;
}

.authors-pagination {
    margin: 20px 0 0 !important;
    padding-top: 16px;
    border-top: 1px solid var(--ui-border);
}

.authors-pagination-actions .btn {
    min-width: 78px;
}

.author-card .author-site-badge {
    top: 13px;
    right: 14px;
    max-width: 108px;
    padding: 2px 6px !important;
    border: 1px solid color-mix(in srgb, var(--ui-border) 72%, transparent) !important;
    border-radius: 999px !important;
    background: color-mix(in srgb, var(--ui-surface-soft) 74%, transparent) !important;
    font-size: 10px !important;
    font-weight: 700;
    line-height: 1.2;
}

@media (max-width: 1180px) {
    .authors-toolbar,
    html[data-theme="cute"] #authors-tab .authors-toolbar {
        grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(140px, 1fr)) !important;
    }

    .authors-toolbar .btn {
        width: 100%;
    }
}

@media (max-width: 760px) {
    .authors-toolbar,
    html[data-theme="cute"] #authors-tab .authors-toolbar {
        grid-template-columns: 1fr 1fr !important;
    }

    .authors-toolbar #authors-search-input {
        grid-column: 1 / -1;
    }

    .authors-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .authors-pagination-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .authors-toolbar,
    html[data-theme="cute"] #authors-tab .authors-toolbar {
        grid-template-columns: 1fr !important;
    }

    .authors-toolbar #authors-search-input {
        grid-column: auto;
    }
}

.authors-list-header .crawl-duration-indicator {
    align-self: flex-start !important;
    width: max-content !important;
    max-width: 100%;
}

/* Keep page-size control with the bottom-right pagination controls. */
.authors-toolbar,
html[data-theme="cute"] #authors-tab .authors-toolbar {
    grid-template-columns: minmax(240px, 2fr) minmax(150px, 0.9fr) minmax(190px, 1.15fr) auto auto !important;
}

.authors-pagination-actions {
    align-items: center;
}

.authors-pagination-actions .authors-page-size {
    width: auto;
    min-width: 132px;
    min-height: 36px;
    margin: 0;
}

@media (max-width: 1180px) {
    .authors-toolbar,
    html[data-theme="cute"] #authors-tab .authors-toolbar {
        grid-template-columns: minmax(220px, 2fr) minmax(140px, 1fr) minmax(180px, 1.2fr) auto auto !important;
    }
}

@media (max-width: 760px) {
    .authors-pagination-actions {
        grid-template-columns: minmax(112px, 1.25fr) repeat(2, minmax(0, 1fr));
    }

    .authors-pagination-actions .authors-page-size {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 760px) {
    .authors-toolbar,
    html[data-theme="cute"] #authors-tab .authors-toolbar {
        grid-template-columns: 1fr 1fr !important;
    }

    .authors-toolbar #authors-search-input {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .authors-toolbar,
    html[data-theme="cute"] #authors-tab .authors-toolbar {
        grid-template-columns: 1fr !important;
    }

    .authors-toolbar #authors-search-input {
        grid-column: auto;
    }
}

/* Cute author-card highlight: use the primary blue instead of legacy near-black. */
html[data-theme="cute"] #authors-tab .author-card:hover,
html[data-theme="cute"] #authors-tab .author-card:focus-within {
    color: #ffffff !important;
    border-color: rgba(7, 85, 215, 0.76) !important;
    background: linear-gradient(145deg, #3b82f6 0%, #1265ef 58%, #0755d7 100%) !important;
    box-shadow: 0 18px 38px rgba(18, 101, 239, 0.25) !important;
    transform: translateY(-2px);
}

html[data-theme="cute"] #authors-tab .author-card:hover .author-name,
html[data-theme="cute"] #authors-tab .author-card:hover .author-name-link,
html[data-theme="cute"] #authors-tab .author-card:hover .author-stat-value,
html[data-theme="cute"] #authors-tab .author-card:focus-within .author-name,
html[data-theme="cute"] #authors-tab .author-card:focus-within .author-name-link,
html[data-theme="cute"] #authors-tab .author-card:focus-within .author-stat-value {
    color: #ffffff !important;
}

html[data-theme="cute"] #authors-tab .author-card:hover .author-id,
html[data-theme="cute"] #authors-tab .author-card:hover .author-id-editable,
html[data-theme="cute"] #authors-tab .author-card:hover .author-stat-label,
html[data-theme="cute"] #authors-tab .author-card:focus-within .author-id,
html[data-theme="cute"] #authors-tab .author-card:focus-within .author-id-editable,
html[data-theme="cute"] #authors-tab .author-card:focus-within .author-stat-label {
    color: rgba(239, 247, 255, 0.86) !important;
    border-bottom-color: rgba(255, 255, 255, 0.48) !important;
}

html[data-theme="cute"] #authors-tab .author-card:hover .author-model-count,
html[data-theme="cute"] #authors-tab .author-card:hover .author-stat-icon,
html[data-theme="cute"] #authors-tab .author-card:focus-within .author-model-count,
html[data-theme="cute"] #authors-tab .author-card:focus-within .author-stat-icon {
    color: #dcecff !important;
    filter: brightness(1.18) saturate(0.82);
}

html[data-theme="cute"] #authors-tab .author-card:hover .author-site-badge,
html[data-theme="cute"] #authors-tab .author-card:focus-within .author-site-badge {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.34) !important;
    background: rgba(255, 255, 255, 0.16) !important;
}

html[data-theme="cute"] #authors-tab .author-card:hover .author-update-btn,
html[data-theme="cute"] #authors-tab .author-card:focus-within .author-update-btn {
    color: #0755d7 !important;
    border-color: rgba(255, 255, 255, 0.72) !important;
    background: #ffffff !important;
    box-shadow: 0 8px 20px rgba(3, 46, 119, 0.18) !important;
}

/* Model completion actions: dedicated second row with segmented tabs. */
#records-tab .records-search-actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 0;
}

#records-tab .records-search-actions .btn {
    margin: 0;
}

#records-tab .records-completion-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-width: 0;
    margin-top: -2px;
}

#records-tab .records-completion-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 5px 10px;
    color: var(--ui-accent-strong);
    border: 1px solid color-mix(in srgb, var(--ui-accent) 30%, var(--ui-border));
    border-radius: 999px;
    background: var(--ui-accent-soft);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

#records-tab .records-completion-tabs {
    display: flex;
    align-items: stretch;
    min-width: 0;
    padding: 4px;
    overflow-x: auto;
    border: 1px solid var(--ui-border);
    border-radius: 14px;
    background: var(--ui-surface-soft);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
    scrollbar-width: none;
}

#records-tab .records-completion-tabs::-webkit-scrollbar {
    display: none;
}

#records-tab .records-completion-tab {
    flex: 1 0 auto;
    min-width: max-content;
    min-height: 38px !important;
    margin: 0 !important;
    padding: 8px 15px !important;
    color: var(--ui-muted) !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    white-space: nowrap;
    transform: none !important;
}

#records-tab .records-completion-tab:hover:not(:disabled) {
    color: var(--ui-accent-strong) !important;
    background: color-mix(in srgb, var(--ui-accent-soft) 82%, transparent) !important;
}

#records-tab .records-completion-tab.is-correct {
    color: var(--ui-text) !important;
    background: color-mix(in srgb, var(--ui-surface-strong) 82%, transparent) !important;
}

#records-tab .records-completion-tab:disabled {
    color: var(--ui-accent-strong) !important;
    background: color-mix(in srgb, var(--ui-accent-soft) 88%, var(--ui-surface-strong)) !important;
    opacity: 0.78;
    cursor: wait;
}

@media (max-width: 760px) {
    #records-tab .records-completion-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    #records-tab .records-completion-badge {
        justify-self: start;
    }

    #records-tab .records-completion-tab {
        flex: 0 0 auto;
        min-width: 126px;
    }
}

/* Model completion tabs: match the blue segmented navigation language. */
#records-tab .records-completion-tabs {
    border-color: color-mix(in srgb, var(--ui-accent) 32%, var(--ui-border)) !important;
    background: color-mix(in srgb, var(--ui-accent-soft) 62%, var(--ui-surface-soft)) !important;
}

#records-tab .records-completion-tab {
    color: var(--ui-text) !important;
}

#records-tab .records-completion-tab.is-correct {
    color: var(--ui-on-accent) !important;
    background: linear-gradient(135deg, var(--ui-accent), var(--ui-accent-strong)) !important;
    box-shadow: 0 8px 18px var(--ui-accent-soft) !important;
}

/* User activity dashboard titles stay flat and readable. */
#web-stats-section > h2,
#web-stats-section .stats-card-title {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

#web-stats-section > h2 {
    margin: 0 0 18px !important;
}

#web-stats-section .stats-card-title {
    margin: 0 0 10px !important;
}

/* Home author storage treemap replaces the four-image collage. */
.home-storage-panel {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
    min-width: 0;
    min-height: 474px;
    align-self: center;
    padding: 16px;
    overflow: hidden;
    border: 1px solid var(--ui-border);
    border-radius: 24px;
    background: color-mix(in srgb, var(--ui-surface-strong) 90%, transparent);
    box-shadow: 0 18px 40px rgba(42, 99, 169, 0.14);
}

.home-storage-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 2px 4px 0;
}

.home-storage-heading .home-eyebrow {
    margin-bottom: 5px;
}

.home-storage-heading h2 {
    margin: 0;
    color: var(--ui-text);
    font-family: var(--ui-font-display);
    font-size: 22px;
    letter-spacing: -0.025em;
}

.home-storage-meta {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    color: var(--ui-muted);
    border: 1px solid var(--ui-border);
    border-radius: 999px;
    background: var(--ui-surface-soft);
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.home-storage-treemap {
    width: 100%;
    min-width: 0;
    min-height: 394px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--ui-accent) 18%, var(--ui-border));
    border-radius: 16px;
    background: color-mix(in srgb, var(--ui-bg-soft) 78%, var(--ui-surface));
}

.home-storage-treemap .home-theme-loading,
.home-storage-treemap .home-theme-empty {
    min-height: 394px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

@media (max-width: 1180px) {
    .home-storage-panel {
        min-height: 430px;
    }

    .home-storage-treemap,
    .home-storage-treemap .home-theme-loading,
    .home-storage-treemap .home-theme-empty {
        min-height: 350px;
    }
}

@media (max-width: 760px) {
    .home-storage-panel {
        min-height: 420px;
        padding: 12px;
        border-radius: 18px;
    }

    .home-storage-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .home-storage-treemap,
    .home-storage-treemap .home-theme-loading,
    .home-storage-treemap .home-theme-empty {
        min-height: 330px;
    }
}

/* Final frameless override for the homepage storage treemap. */
.home-storage-panel {
    display: block !important;
    min-height: 474px;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.home-storage-treemap {
    min-height: 474px;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

@media (max-width: 1180px) {
    .home-storage-panel,
    .home-storage-treemap {
        min-height: 430px;
    }
}

@media (max-width: 760px) {
    .home-storage-panel,
    .home-storage-treemap {
        min-height: 360px;
    }
}

/* Cute UI v19 polish: requested theme cards, image gallery, form contrast. */
#home-tab .home-theme-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

#home-tab .home-theme-item-card {
    min-height: 218px;
    border: 0 !important;
    border-radius: 22px !important;
    background: transparent !important;
    box-shadow: 0 16px 34px rgba(48, 101, 166, 0.14) !important;
}

#home-tab .home-theme-item-card img {
    transform: scale(1.03);
}

#records-tab .records-themes-section {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

#records-tab .records-themes-grid {
    grid-template-columns: repeat(2, minmax(420px, 1fr)) !important;
    gap: 18px !important;
}

#records-tab .records-theme-card {
    min-height: clamp(250px, 22vw, 360px) !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 22px !important;
    background: transparent !important;
    box-shadow: 0 16px 34px rgba(48, 101, 166, 0.12) !important;
}

#records-tab .records-theme-card:hover {
    border: 0 !important;
    box-shadow: 0 22px 44px rgba(48, 101, 166, 0.18) !important;
}

#records-tab .records-theme-card-bg {
    transform: scale(1.04);
    transition: transform 0.28s ease;
}

#records-tab .records-theme-card:hover .records-theme-card-bg {
    transform: scale(1.09);
}

#records-tab .records-theme-card-shade {
    background:
        linear-gradient(90deg, rgba(9, 22, 48, 0.72), rgba(9, 22, 48, 0.36) 45%, rgba(9, 22, 48, 0.05) 100%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(8, 23, 48, 0.16)) !important;
}

#records-tab .records-theme-card-body {
    width: min(58%, 460px) !important;
    padding: clamp(24px, 4vw, 48px) !important;
}

#records-tab .records-theme-name {
    color: #ffffff !important;
    font-size: clamp(34px, 5.2vw, 64px) !important;
    line-height: 1.02 !important;
    text-shadow: 0 4px 20px rgba(5, 18, 43, 0.42) !important;
}

#records-panel-single .single-model-url-input {
    color: var(--ui-text) !important;
    border: 1px solid color-mix(in srgb, var(--ui-accent) 18%, var(--ui-border)) !important;
    background: color-mix(in srgb, var(--ui-surface-strong) 80%, var(--ui-bg-soft)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34) !important;
}

#records-panel-single .single-model-url-input::placeholder {
    color: color-mix(in srgb, var(--ui-muted) 82%, var(--ui-text)) !important;
}

html[data-theme="cute"] #records-panel-single .single-model-url-input {
    color: #17365f !important;
    border-color: rgba(52, 104, 168, 0.24) !important;
    background-color: #e7f2fe !important;
    background-image: linear-gradient(135deg, rgba(224, 238, 253, 0.96), rgba(239, 247, 255, 0.98)) !important;
}

html[data-theme="cute"] #records-panel-single .single-model-url-input::placeholder {
    color: #6c829f !important;
}

html[data-theme="cute"] #records-tab .badge-success {
    color: #176244 !important;
    border-color: rgba(46, 157, 112, 0.34) !important;
    background: rgba(201, 241, 225, 0.82) !important;
}

html[data-theme="cute"] #records-tab .records-theme-card,
html[data-theme="cute"] #records-tab .records-theme-card:hover {
    border: 0 !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

@media (max-width: 1024px) {
    #home-tab .home-theme-cards,
    #records-tab .records-themes-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    #records-tab .records-theme-card {
        min-height: 230px !important;
    }
}

@media (max-width: 760px) {
    #home-tab .home-theme-cards,
    #records-tab .records-themes-grid {
        grid-template-columns: 1fr !important;
    }

    #home-tab .home-theme-item-card {
        min-height: 188px;
    }

    #records-tab .records-theme-card {
        min-height: 200px !important;
        border-radius: 18px !important;
    }

    #records-tab .records-theme-card-body {
        width: min(72%, 300px) !important;
        padding: 22px !important;
    }

    #records-tab .records-theme-name {
        font-size: clamp(28px, 12vw, 46px) !important;
    }
}

/* ==========================================================
   Awwwards immersive gallery: homepage, records, authors
   ========================================================== */
:root {
    --immersive-ink: #f7fbff;
    --immersive-muted: rgba(231, 240, 250, 0.78);
    --immersive-panel: #07111f;
    --immersive-panel-soft: #0d1d32;
    --immersive-line: rgba(255, 255, 255, 0.16);
    --immersive-shadow: 0 28px 70px rgba(3, 13, 31, 0.3);
}

.home-featured-section {
    position: relative;
    isolation: isolate;
    margin-top: clamp(28px, 4vw, 54px);
    padding: clamp(24px, 3.5vw, 46px);
    overflow: hidden;
    color: var(--immersive-ink);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 30px;
    background:
        radial-gradient(circle at 82% -15%, color-mix(in srgb, var(--ui-accent) 34%, transparent), transparent 38%),
        radial-gradient(circle at 6% 110%, rgba(52, 161, 215, 0.2), transparent 34%),
        linear-gradient(145deg, #07111f 0%, #0a1829 48%, #102641 100%);
    box-shadow: var(--immersive-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.home-featured-section::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.24;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(180deg, #000, transparent 88%);
}

.home-featured-section .home-featured-heading {
    margin: 0 0 clamp(22px, 3vw, 34px);
}

.home-featured-section .home-eyebrow {
    color: color-mix(in srgb, var(--ui-accent) 74%, #ffffff) !important;
}

.home-featured-section .home-featured-heading h2 {
    color: #ffffff !important;
    text-shadow: 0 6px 30px rgba(0, 0, 0, 0.24);
}

.home-featured-section .home-link-action {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.home-featured-section .home-link-action:hover,
.home-featured-section .home-link-action:focus-visible {
    color: #07111f !important;
    border-color: #ffffff !important;
    background: #ffffff !important;
}

#home-tab .home-featured-section .home-theme-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(14px, 1.8vw, 24px);
}

#home-tab .home-featured-section .home-theme-item-card {
    min-height: clamp(230px, 21vw, 330px);
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 24px !important;
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.28) !important;
    transition: transform 260ms ease, box-shadow 260ms ease, border-color 260ms ease;
}

#home-tab .home-featured-section .home-theme-item-card:hover,
#home-tab .home-featured-section .home-theme-item-card:focus-visible {
    transform: translateY(-7px);
    border-color: rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 30px 58px rgba(0, 0, 0, 0.38) !important;
}

#home-tab .home-featured-section .home-theme-shade {
    background: linear-gradient(180deg, rgba(3, 11, 23, 0.02) 34%, rgba(3, 11, 23, 0.3) 65%, rgba(3, 11, 23, 0.9) 100%);
}

.home-storage-panel {
    display: block !important;
    min-height: 474px;
    padding: 0 !important;
    overflow: hidden;
    border: 0 !important;
    border-radius: 18px !important;
    background: transparent !important;
    box-shadow: none !important;
}

.home-storage-treemap {
    min-height: 474px;
    overflow: hidden;
    border: 0 !important;
    border-radius: 18px !important;
    background: transparent !important;
    box-shadow: none !important;
}

.records-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 14px !important;
    align-items: stretch;
}

.authors-list {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px !important;
    align-items: stretch;
}

.record-card[data-immersive-card],
.author-card[data-immersive-card] {
    position: relative;
    isolation: isolate;
    display: block !important;
    width: 100%;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    color: var(--immersive-ink) !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: var(--immersive-panel) !important;
    box-shadow: none !important;
    transform: translateZ(0);
    transition: transform 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
}

.record-card[data-immersive-card] {
    aspect-ratio: 4 / 3;
}

.author-card[data-immersive-card] {
    aspect-ratio: 1 / 1;
}

.record-card[data-immersive-card]::before,
.record-card[data-immersive-card]::after,
.author-card[data-immersive-card]::before,
.author-card[data-immersive-card]::after {
    display: none !important;
}

.record-card[data-immersive-card]:hover,
.record-card[data-immersive-card]:focus-within,
.record-card[data-immersive-card].is-revealed,
.author-card[data-immersive-card]:hover,
.author-card[data-immersive-card]:focus-within,
.author-card[data-immersive-card].is-revealed {
    border-color: transparent !important;
    background: var(--immersive-panel) !important;
    box-shadow: 0 16px 34px rgba(2, 12, 30, 0.24) !important;
    transform: translateY(-4px);
}

.record-card[data-immersive-card]:focus-visible,
.author-card[data-immersive-card]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent) 62%, transparent), 0 30px 64px rgba(2, 12, 30, 0.38) !important;
}

.immersive-card-media-layer,
.immersive-card-media {
    position: absolute !important;
    inset: 0;
    z-index: 0;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
}

.immersive-card-media-layer {
    aspect-ratio: auto !important;
    background:
        radial-gradient(circle at 20% 10%, color-mix(in srgb, var(--ui-accent) 36%, transparent), transparent 38%),
        linear-gradient(145deg, #10233c, #07111f) !important;
}

.immersive-card-media {
    display: block;
    object-fit: cover;
    transform: scale(1.015);
    filter: saturate(1.02) contrast(1.01);
    transition: transform 520ms cubic-bezier(0.2, 0.75, 0.25, 1), filter 320ms ease;
}

.author-avatar-placeholder.immersive-card-media {
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.82) !important;
    background:
        radial-gradient(circle at 28% 18%, color-mix(in srgb, var(--ui-accent) 76%, #ffffff), transparent 34%),
        linear-gradient(145deg, color-mix(in srgb, var(--ui-accent) 72%, #132943), #07111f) !important;
    font-family: var(--ui-font-display);
    font-size: clamp(72px, 8vw, 128px);
    font-weight: 800;
    letter-spacing: -0.08em;
}

.immersive-card-scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.48;
    background:
        linear-gradient(180deg, rgba(2, 8, 18, 0.02) 26%, rgba(2, 9, 20, 0.14) 51%, rgba(2, 9, 20, 0.78) 100%),
        linear-gradient(135deg, rgba(2, 8, 18, 0.1), transparent 52%);
    transition: opacity 280ms ease, background 280ms ease;
}

.record-card[data-immersive-card]:hover .immersive-card-media,
.record-card[data-immersive-card]:focus-within .immersive-card-media,
.record-card[data-immersive-card].is-revealed .immersive-card-media,
.author-card[data-immersive-card]:hover .immersive-card-media,
.author-card[data-immersive-card]:focus-within .immersive-card-media,
.author-card[data-immersive-card].is-revealed .immersive-card-media {
    transform: scale(1.075);
    filter: saturate(0.86) brightness(0.58) contrast(1.08);
}

.record-card[data-immersive-card]:hover .immersive-card-scrim,
.record-card[data-immersive-card]:focus-within .immersive-card-scrim,
.record-card[data-immersive-card].is-revealed .immersive-card-scrim,
.author-card[data-immersive-card]:hover .immersive-card-scrim,
.author-card[data-immersive-card]:focus-within .immersive-card-scrim,
.author-card[data-immersive-card].is-revealed .immersive-card-scrim {
    opacity: 1;
    background:
        linear-gradient(180deg, rgba(2, 8, 18, 0.2) 0%, rgba(2, 9, 20, 0.54) 40%, rgba(2, 9, 20, 0.96) 100%),
        linear-gradient(90deg, rgba(4, 13, 28, 0.38), transparent 66%);
}

.immersive-card-content {
    position: absolute !important;
    inset: auto 0 0;
    z-index: 3;
    display: flex;
    max-height: 100%;
    flex-direction: column;
    padding: clamp(18px, 2vw, 26px) !important;
    overflow-y: auto;
    color: var(--immersive-ink) !important;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
    scrollbar-width: thin;
    transition: opacity 220ms ease, transform 280ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.record-card[data-immersive-card]:hover .immersive-card-content,
.record-card[data-immersive-card]:focus-within .immersive-card-content,
.record-card[data-immersive-card].is-revealed .immersive-card-content,
.author-card[data-immersive-card]:hover .immersive-card-content,
.author-card[data-immersive-card]:focus-within .immersive-card-content,
.author-card[data-immersive-card].is-revealed .immersive-card-content {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.record-card[data-immersive-card] .record-info h3,
.author-card[data-immersive-card] .author-name,
.author-card[data-immersive-card] .author-name-link,
.author-card[data-immersive-card] .author-stat-value {
    color: #ffffff !important;
    text-shadow: 0 3px 18px rgba(0, 0, 0, 0.46) !important;
}

.record-card[data-immersive-card] .record-info h3,
.author-card[data-immersive-card] .author-name {
    margin: 0 0 8px;
    font-family: var(--ui-font-display);
    font-size: 17px;
    line-height: 1.12;
    letter-spacing: 0;
}

.record-card[data-immersive-card] .record-meta,
.record-card[data-immersive-card] .record-meta strong,
.author-card[data-immersive-card] .author-id,
.author-card[data-immersive-card] .author-id-editable,
.author-card[data-immersive-card] .author-stat-label {
    color: var(--immersive-muted) !important;
}

.record-card[data-immersive-card] .record-meta {
    margin-bottom: 4px;
    font-size: 11px;
    line-height: 1.42;
}

.record-card[data-immersive-card] .record-meta a,
.record-card[data-immersive-card] .record-author-link,
.author-card[data-immersive-card] .author-name-link {
    color: #ffffff !important;
    text-decoration-color: color-mix(in srgb, var(--ui-accent) 72%, transparent) !important;
}

.record-card[data-immersive-card] .record-performance {
    margin: 6px 0;
}

.record-card[data-immersive-card] .record-performance-item {
    border-color: rgba(255, 255, 255, 0.14) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

.record-card[data-immersive-card] .record-performance-label {
    color: rgba(234, 242, 252, 0.72) !important;
}

.record-card[data-immersive-card] .record-performance-value {
    color: #ffffff !important;
}

.record-card[data-immersive-card] .record-actions,
.author-card[data-immersive-card] .author-actions {
    position: sticky;
    bottom: 0;
    z-index: 1;
    display: flex;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    background: linear-gradient(180deg, transparent, rgba(2, 9, 20, 0.86) 28%);
}

.record-card[data-immersive-card] .record-actions .btn,
.author-card[data-immersive-card] .author-actions .btn {
    min-height: 32px;
    flex: 1 1 auto;
    padding: 7px 9px !important;
    font-size: 11px !important;
}

.record-card[data-immersive-card] .record-select-control {
    z-index: 5;
    border-color: rgba(255, 255, 255, 0.32);
    background: rgba(4, 12, 25, 0.74);
    backdrop-filter: blur(10px);
}

.author-card[data-immersive-card] .author-site-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 4;
    padding: 5px 8px !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.26) !important;
    border-radius: 999px !important;
    background: rgba(4, 12, 25, 0.62) !important;
    opacity: 0;
    backdrop-filter: blur(12px);
    transform: translateY(-8px);
    transition: opacity 220ms ease, transform 260ms ease;
}

.author-card[data-immersive-card]:hover .author-site-badge,
.author-card[data-immersive-card]:focus-within .author-site-badge,
.author-card[data-immersive-card].is-revealed .author-site-badge {
    opacity: 1;
    transform: translateY(0);
}

.author-card[data-immersive-card] .author-info {
    display: block;
    margin: 0 0 9px;
}

.author-card[data-immersive-card] .author-text {
    padding: 0;
}

.author-card[data-immersive-card] .author-model-count {
    display: inline-flex;
    margin-top: 5px;
    padding: 4px 7px !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

.author-card[data-immersive-card] .author-stats {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px 9px !important;
    margin: 0 !important;
    padding: 8px 0 0 !important;
    border: 0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.author-card[data-immersive-card] .author-stat {
    display: grid !important;
    grid-template-columns: 16px minmax(0, 1fr) auto;
    gap: 4px !important;
    color: #ffffff !important;
}

.author-card[data-immersive-card] .author-stat-icon {
    width: 16px !important;
    color: color-mix(in srgb, var(--ui-accent) 66%, #ffffff) !important;
    font-size: 12px;
    filter: none !important;
}

.author-card[data-immersive-card] .author-stat-label,
.author-card[data-immersive-card] .author-stat-value {
    font-size: 10px !important;
}

@media (max-width: 1279px) {
    .records-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }

    .authors-list {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 1023px) {
    #home-tab .home-featured-section .home-theme-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .records-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }

    .authors-list {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }

    .home-storage-panel,
    .home-storage-treemap {
        min-height: 420px;
    }
}

@media (max-width: 768px) {
    .home-featured-section {
        margin-inline: -4px;
        padding: 20px;
        border-radius: 24px;
    }

    .home-featured-section .home-featured-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .records-grid,
    .authors-list {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    #home-tab .home-featured-section .home-theme-cards {
        grid-template-columns: 1fr !important;
    }

    #home-tab .home-featured-section .home-theme-item-card {
        min-height: 240px;
    }

    .home-storage-panel {
        min-height: 368px;
        padding: 0 !important;
        border-radius: 16px !important;
    }

    .home-storage-treemap {
        min-height: 368px;
        border-radius: 16px !important;
    }

    .record-card[data-immersive-card],
    .author-card[data-immersive-card] {
        min-height: 0 !important;
        aspect-ratio: 4 / 3;
        border-radius: 8px !important;
    }

    .author-card[data-immersive-card] {
        aspect-ratio: 1 / 1;
    }

    .immersive-card-content {
        inset: 0 !important;
        justify-content: flex-end;
        padding: 8px !important;
        overflow: hidden;
    }

    .record-card[data-immersive-card] .record-info h3,
    .author-card[data-immersive-card] .author-name {
        display: -webkit-box;
        margin-bottom: 3px;
        overflow: hidden;
        font-size: 12px !important;
        line-height: 1.12;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .record-card[data-immersive-card] .record-meta,
    .record-card[data-immersive-card] .record-meta strong,
    .author-card[data-immersive-card] .author-id,
    .author-card[data-immersive-card] .author-id-editable {
        overflow: hidden;
        font-size: 8.5px !important;
        line-height: 1.18;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .author-card[data-immersive-card] .author-info {
        margin-bottom: 4px;
    }

    .author-card[data-immersive-card] .author-model-count {
        margin-top: 3px;
        padding: 2px 5px !important;
        font-size: 8.5px !important;
        line-height: 1.15;
    }

    .record-card[data-immersive-card] .record-performance {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 3px;
        margin: 4px 0 0;
    }

    .record-card[data-immersive-card] .record-performance-item {
        min-width: 0;
        padding: 3px 4px !important;
        gap: 2px !important;
        font-size: 9px !important;
        line-height: 1;
    }

    .record-card[data-immersive-card] .record-performance-icon,
    .author-card[data-immersive-card] .author-stat-icon {
        width: 12px !important;
        font-size: 9px !important;
        line-height: 1;
    }

    .record-card[data-immersive-card] .record-performance-value,
    .record-card[data-immersive-card] .record-performance-delta {
        font-size: 9px !important;
        line-height: 1;
    }

    .author-card[data-immersive-card] .author-stats {
        gap: 3px 5px !important;
        padding-top: 5px !important;
    }

    .author-card[data-immersive-card] .author-stat {
        grid-template-columns: 12px minmax(0, 1fr) auto;
        gap: 2px !important;
        align-items: center;
        min-width: 0;
    }

    .author-card[data-immersive-card] .author-stat-label,
    .author-card[data-immersive-card] .author-stat-value {
        overflow: hidden;
        font-size: 8px !important;
        line-height: 1.05;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .record-card[data-immersive-card] .record-actions,
    .author-card[data-immersive-card] .author-actions {
        position: static;
        margin-top: auto;
        padding-top: 5px;
        gap: 4px;
        background: linear-gradient(180deg, transparent, rgba(2, 9, 20, 0.9) 40%);
    }

    .record-card[data-immersive-card] .record-actions {
        grid-template-columns: minmax(48px, 0.8fr) minmax(0, 1fr);
    }

    .record-card[data-immersive-card] .record-badge,
    .record-card[data-immersive-card] .record-actions .record-download-btn,
    .author-card[data-immersive-card] .author-actions .btn {
        min-height: 24px;
        padding: 0 6px !important;
        overflow: hidden;
        font-size: 8.5px !important;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (min-width: 921px) {
    #records-tab .record-card[data-immersive-card] .immersive-card-content {
        inset: 0 !important;
        justify-content: flex-start;
        gap: 3px;
        padding: clamp(42px, 4vw, 58px) clamp(16px, 2vw, 28px) clamp(16px, 2vw, 24px) !important;
        overflow: hidden;
    }

    #records-tab .record-card[data-immersive-card] .record-info h3 {
        display: -webkit-box;
        min-height: 2.24em;
        max-height: 2.24em;
        margin: 0 0 6px !important;
        overflow: hidden;
        font-size: clamp(14px, 1.35vw, 18px) !important;
        line-height: 1.12 !important;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    #records-tab .record-card[data-immersive-card] .record-meta {
        margin: 2px 0 0 !important;
        font-size: clamp(9px, 0.85vw, 11px) !important;
        line-height: 1.3 !important;
    }

    #records-tab .record-card[data-immersive-card] .record-performance {
        gap: 5px !important;
        margin: 7px 0 2px !important;
    }

    #records-tab .record-card[data-immersive-card] .record-performance-item {
        min-height: 26px;
        padding: 4px 7px !important;
        font-size: 10px !important;
        line-height: 1.1 !important;
    }

    #records-tab .record-card[data-immersive-card] .record-performance-icon,
    #records-tab .record-card[data-immersive-card] .record-performance-value,
    #records-tab .record-card[data-immersive-card] .record-performance-delta {
        font-size: 10px !important;
        line-height: 1.1 !important;
    }

    #records-tab .record-card[data-immersive-card] .record-actions {
        margin-top: auto !important;
        padding-top: 7px !important;
    }
}

@media (hover: none), (pointer: coarse) {
    .record-card[data-immersive-card]:hover,
    .author-card[data-immersive-card]:hover {
        transform: none;
    }

    .record-card[data-immersive-card]:not(.is-revealed) .immersive-card-content,
    .author-card[data-immersive-card]:not(.is-revealed) .immersive-card-content {
        opacity: 0;
        pointer-events: none;
        transform: translateY(20px);
    }

    .record-card[data-immersive-card].is-revealed,
    .author-card[data-immersive-card].is-revealed {
        transform: translateY(-3px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-theme-item-card,
    .record-card[data-immersive-card],
    .author-card[data-immersive-card],
    .immersive-card-media,
    .immersive-card-scrim,
    .immersive-card-content,
    .author-site-badge {
        transition-duration: 0.01ms !important;
        transition-delay: 0ms !important;
    }

    .record-card[data-immersive-card]:hover,
    .record-card[data-immersive-card]:focus-within,
    .record-card[data-immersive-card].is-revealed,
    .author-card[data-immersive-card]:hover,
    .author-card[data-immersive-card]:focus-within,
    .author-card[data-immersive-card].is-revealed,
    #home-tab .home-featured-section .home-theme-item-card:hover {
        transform: none;
    }
}

.record-card[data-immersive-card].is-selected {
    border-color: transparent !important;
    box-shadow:
        0 0 0 3px color-mix(in srgb, var(--ui-accent) 38%, transparent),
        0 16px 34px rgba(2, 12, 30, 0.22) !important;
}

html[data-theme="cute"] #records-tab .record-card[data-immersive-card] .record-info h3,
html[data-theme="cute"] #records-tab .record-card[data-immersive-card] .record-performance-value {
    color: #ffffff !important;
}

html[data-theme="cute"] #records-tab .record-card[data-immersive-card] .record-meta,
html[data-theme="cute"] #records-tab .record-card[data-immersive-card] .record-meta strong,
html[data-theme="cute"] #records-tab .record-card[data-immersive-card] .record-performance-label {
    color: rgba(231, 240, 250, 0.82) !important;
}

html[data-theme="cute"] #records-tab .record-card[data-immersive-card] .record-meta a,
html[data-theme="cute"] #records-tab .record-card[data-immersive-card] .record-author-link {
    color: #8ec5ff !important;
}

html[data-theme="cute"] #records-tab .record-card[data-immersive-card] .record-performance-item {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
    background: rgba(255, 255, 255, 0.14) !important;
}

.record-card[data-immersive-card] .record-actions {
    display: grid;
    grid-template-columns: minmax(78px, max-content) minmax(0, 1fr);
    align-items: center;
}

.record-card[data-immersive-card] .record-badge,
.record-card[data-immersive-card] .record-actions .record-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    margin: 0 !important;
    line-height: 1;
    white-space: nowrap;
}

.record-card[data-immersive-card] .record-badge {
    width: 100%;
    padding: 0 12px !important;
    border-radius: 999px !important;
}

@media (max-width: 920px), (hover: none) and (pointer: coarse) {
    #records-tab .records-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    #records-tab .record-card[data-immersive-card] {
        aspect-ratio: 4 / 5 !important;
        border-radius: 8px !important;
    }

    #records-tab .record-card[data-immersive-card] .record-select-control {
        top: 6px !important;
        left: 6px !important;
        width: 22px !important;
        height: 22px !important;
        border-radius: 7px !important;
    }

    #records-tab .record-card[data-immersive-card] .record-select-checkbox {
        width: 12px !important;
        height: 12px !important;
    }

    #records-tab .record-card[data-immersive-card] .immersive-card-content {
        inset: 0 !important;
        justify-content: flex-start;
        gap: 2px;
        padding: clamp(42px, 14vw, 62px) 7px 8px !important;
        overflow: hidden;
    }

    #records-tab .record-card[data-immersive-card] .record-info h3 {
        display: -webkit-box;
        margin: 0 0 4px !important;
        overflow: hidden;
        font-size: 10px !important;
        line-height: 1.18 !important;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    #records-tab .record-card[data-immersive-card] .record-meta,
    #records-tab .record-card[data-immersive-card] .record-meta strong,
    #records-tab .record-card[data-immersive-card] .record-meta a {
        margin: 0 !important;
        overflow: hidden;
        font-size: 7.5px !important;
        line-height: 1.45 !important;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    #records-tab .record-card[data-immersive-card] .record-meta {
        margin-top: 2px !important;
    }

    #records-tab .record-card[data-immersive-card] .record-performance {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4px !important;
        margin: 9px 0 2px !important;
    }

    #records-tab .record-card[data-immersive-card] .record-performance-item {
        min-height: 18px !important;
        min-width: 0 !important;
        gap: 3px !important;
        padding: 2px 5px !important;
        border-radius: 8px !important;
        font-size: 7.5px !important;
        line-height: 1.12 !important;
    }

    #records-tab .record-card[data-immersive-card] .record-performance-icon {
        width: 9px !important;
        font-size: 7.5px !important;
        line-height: 1.12 !important;
    }

    #records-tab .record-card[data-immersive-card] .record-performance-value,
    #records-tab .record-card[data-immersive-card] .record-performance-delta {
        font-size: 7.5px !important;
        line-height: 1.12 !important;
    }

    #records-tab .record-card[data-immersive-card] .record-actions {
        display: grid !important;
        grid-template-columns: minmax(42px, 0.82fr) minmax(0, 1fr) !important;
        gap: 3px !important;
        margin-top: auto !important;
        padding-top: 3px !important;
        background: linear-gradient(180deg, transparent, rgba(2, 9, 20, 0.9) 42%);
    }

    #records-tab .record-card[data-immersive-card] .record-badge,
    #records-tab .record-card[data-immersive-card] .record-actions .record-download-btn {
        min-height: 19px !important;
        max-height: 19px !important;
        padding: 0 4px !important;
        overflow: hidden;
        border-radius: 10px !important;
        font-size: 7.5px !important;
        line-height: 1 !important;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (hover: none), (pointer: coarse) {
    .record-card[data-immersive-card]:not(.is-revealed):focus-within,
    .author-card[data-immersive-card]:not(.is-revealed):focus-within {
        transform: none;
    }

    .record-card[data-immersive-card]:not(.is-revealed):focus-within .immersive-card-media,
    .author-card[data-immersive-card]:not(.is-revealed):focus-within .immersive-card-media {
        transform: scale(1.015);
        filter: saturate(1.02) contrast(1.01);
    }

    .record-card[data-immersive-card]:not(.is-revealed):focus-within .immersive-card-scrim,
    .author-card[data-immersive-card]:not(.is-revealed):focus-within .immersive-card-scrim {
        opacity: 0.48;
        background:
            linear-gradient(180deg, rgba(2, 8, 18, 0.02) 26%, rgba(2, 9, 20, 0.14) 51%, rgba(2, 9, 20, 0.78) 100%),
            linear-gradient(135deg, rgba(2, 8, 18, 0.1), transparent 52%);
    }

    .author-card[data-immersive-card]:not(.is-revealed):focus-within .author-site-badge {
        opacity: 0;
        transform: translateY(-8px);
    }
}

/* Homepage canvas: light figure-one panels floating on a dark outer stage. */
:root {
    --home-figure-surface: linear-gradient(135deg, #e8f3ff 0%, #d7eaff 48%, #edf5ff 100%);
    --home-figure-surface-soft: linear-gradient(145deg, rgba(239, 247, 255, 0.98), rgba(214, 233, 255, 0.94));
    --home-figure-text: #081d43;
    --home-figure-muted: #516985;
    --home-figure-line: rgba(46, 101, 170, 0.16);
    --home-outer-stage: #050b16;
}

html[data-theme] body:has(#home-tab.active),
html:not([data-theme]) body:has(#home-tab.active) {
    background-color: var(--home-outer-stage) !important;
    background-image:
        radial-gradient(circle at 12% 0%, rgba(18, 101, 239, 0.18), transparent 34%),
        radial-gradient(circle at 88% 8%, rgba(99, 173, 255, 0.13), transparent 32%),
        linear-gradient(135deg, #050b16 0%, #081426 54%, #030711 100%) !important;
}

html[data-theme] body:has(#home-tab.active)::before,
html:not([data-theme]) body:has(#home-tab.active)::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 42%) !important;
}

body:has(#home-tab.active) .hero-shell.site-header {
    color: var(--home-figure-muted) !important;
    background: var(--home-figure-surface) !important;
    box-shadow: 0 22px 54px rgba(1, 10, 24, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.62) !important;
}

body:has(#home-tab.active) .site-brand-copy strong,
body:has(#home-tab.active) .tab-btn {
    color: var(--home-figure-text) !important;
}

body:has(#home-tab.active) .tab-btn:hover,
body:has(#home-tab.active) .tab-btn.active {
    color: var(--ui-accent) !important;
    background: rgba(18, 101, 239, 0.08) !important;
}

body:has(#home-tab.active) .site-brand-copy small {
    color: var(--home-figure-muted) !important;
}

#home-tab .home-landing {
    gap: clamp(10px, 1.5vw, 18px);
    padding: clamp(22px, 3.2vw, 46px);
    overflow: hidden;
    border: 0;
    border-radius: 32px;
    background: var(--home-figure-surface);
    box-shadow: 0 30px 86px rgba(1, 10, 24, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.hero-shell.site-header,
.hero-shell.site-header *,
#home-tab,
#home-tab * {
    font-family: var(--ui-font-calligraphy) !important;
    font-synthesis: none !important;
    font-weight: 400 !important;
}

#home-tab .home-hero,
#home-tab .home-featured-section {
    color: var(--home-figure-text) !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

#home-tab .home-featured-section {
    margin-top: 0;
    padding: clamp(6px, 1vw, 12px) 0 0;
    overflow: visible;
}

#home-tab .home-featured-section::before {
    display: none !important;
}

#home-tab .home-eyebrow,
#home-tab .home-hero h1 span,
#home-tab .home-featured-section .home-eyebrow {
    color: var(--ui-accent) !important;
}

#home-tab .home-hero h1,
#home-tab .home-featured-section .home-featured-heading h2 {
    color: var(--home-figure-text) !important;
    text-shadow: none !important;
}

#home-tab .home-description,
#home-tab .home-featured-heading p,
#home-tab .home-featured-section .home-featured-heading p {
    color: var(--home-figure-muted) !important;
}

#home-tab .home-featured-section .home-link-action {
    color: var(--home-figure-text) !important;
    border-color: rgba(39, 91, 157, 0.22) !important;
    background: rgba(239, 247, 255, 0.72) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
}

#home-tab .home-featured-section .home-link-action:hover,
#home-tab .home-featured-section .home-link-action:focus-visible {
    color: #ffffff !important;
    border-color: var(--ui-accent) !important;
    background: linear-gradient(135deg, var(--ui-accent), var(--ui-accent-strong)) !important;
}

#home-tab .home-storage-panel,
#home-tab .home-storage-treemap {
    background: transparent !important;
}

@media (max-width: 760px) {
    #home-tab .home-landing {
        margin-inline: -4px;
        padding: 18px;
        gap: 10px;
        border-radius: 24px;
    }

    #home-tab .home-hero,
    #home-tab .home-featured-section {
        background: transparent !important;
    }
}

/* Liquid background hero experiment inspired by frame-liquid-bg-hero. */
:root {
    --home-liquid-ink: #fafaf8;
    --home-liquid-muted: rgba(248, 250, 252, 0.72);
    --home-liquid-deep: #11133d;
    --home-liquid-night: #040914;
    --home-liquid-violet: #7c5cff;
    --home-liquid-aqua: #5ac8fa;
    --home-liquid-blue: #0a84ff;
    --home-liquid-panel: rgba(7, 13, 31, 0.42);
    --home-liquid-line: rgba(255, 255, 255, 0.16);
}

html[data-theme] body:has(#home-tab.active),
html:not([data-theme]) body:has(#home-tab.active) {
    background-color: var(--home-liquid-night) !important;
    background-image:
        radial-gradient(circle at 18% 8%, rgba(124, 92, 255, 0.28), transparent 34%),
        radial-gradient(circle at 88% 14%, rgba(90, 200, 250, 0.2), transparent 30%),
        linear-gradient(135deg, #040914 0%, #0b1530 48%, #080716 100%) !important;
}

body:has(#home-tab.active) .hero-shell.site-header {
    color: var(--home-liquid-muted) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    background: rgba(6, 13, 29, 0.56) !important;
    box-shadow: 0 24px 72px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(24px) saturate(1.18) !important;
}

body:has(#home-tab.active) .site-brand-copy strong,
body:has(#home-tab.active) .tab-btn {
    color: rgba(250, 250, 248, 0.88) !important;
}

body:has(#home-tab.active) .site-brand-copy small {
    color: rgba(248, 250, 252, 0.58) !important;
}

body:has(#home-tab.active) .tab-btn:hover,
body:has(#home-tab.active) .tab-btn.active {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

#home-tab .home-landing {
    position: relative;
    isolation: isolate;
    gap: clamp(16px, 2vw, 26px);
    padding: clamp(30px, 4vw, 60px);
    color: var(--home-liquid-ink) !important;
    border-radius: 38px;
    background:
        linear-gradient(135deg, rgba(17, 19, 61, 0.92) 0%, rgba(4, 9, 20, 0.96) 58%, rgba(9, 6, 31, 0.96) 100%);
    box-shadow:
        0 44px 120px rgba(0, 0, 0, 0.44),
        inset 0 1px 0 rgba(255, 255, 255, 0.13);
}

#home-tab .home-landing::before,
#home-tab .home-landing::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

#home-tab .home-landing::before {
    inset: -18%;
    z-index: -2;
    opacity: 0.86;
    background:
        radial-gradient(ellipse at 18% 30%, rgba(124, 92, 255, 0.72) 0%, rgba(124, 92, 255, 0) 38%),
        radial-gradient(ellipse at 72% 18%, rgba(90, 200, 250, 0.62) 0%, rgba(90, 200, 250, 0) 34%),
        radial-gradient(ellipse at 82% 76%, rgba(10, 132, 255, 0.58) 0%, rgba(10, 132, 255, 0) 38%),
        radial-gradient(ellipse at 28% 86%, rgba(167, 139, 250, 0.5) 0%, rgba(167, 139, 250, 0) 42%);
    filter: blur(28px) saturate(1.15);
    animation: homeLiquidDrift 14s ease-in-out infinite alternate;
}

#home-tab .home-landing::after {
    inset: 0;
    z-index: -1;
    opacity: 0.64;
    background:
        radial-gradient(circle at 50% -18%, rgba(255, 255, 255, 0.18), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02) 38%, rgba(0, 0, 0, 0.1));
    backdrop-filter: blur(70px);
}

#home-tab .home-hero {
    min-height: clamp(500px, 52vw, 660px);
}

#home-tab .home-hero::before {
    display: none !important;
}

#home-tab .home-hero-copy {
    mix-blend-mode: screen;
}

#home-tab .home-eyebrow,
#home-tab .home-featured-section .home-eyebrow {
    color: rgba(250, 250, 248, 0.68) !important;
    text-shadow: 0 12px 42px rgba(0, 0, 0, 0.32);
}

#home-tab .home-hero h1,
#home-tab .home-featured-section .home-featured-heading h2 {
    color: var(--home-liquid-ink) !important;
    text-shadow: 0 20px 70px rgba(0, 0, 0, 0.42) !important;
}

#home-tab .home-hero h1 span {
    color: #ffffff !important;
    text-shadow: 0 0 36px rgba(90, 200, 250, 0.68);
}

#home-tab .home-description,
#home-tab .home-featured-heading p,
#home-tab .home-featured-section .home-featured-heading p {
    color: var(--home-liquid-muted) !important;
}

#home-tab .home-primary-action {
    color: #06101f !important;
    background: #fafaf8 !important;
    box-shadow: 0 16px 42px rgba(90, 200, 250, 0.24) !important;
}

#home-tab .home-primary-action:hover,
#home-tab .home-primary-action:focus-visible {
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--home-liquid-aqua), var(--home-liquid-violet)) !important;
}

#home-tab .home-storage-panel {
    padding: 18px !important;
    border: 1px solid var(--home-liquid-line) !important;
    border-radius: 28px !important;
    background: var(--home-liquid-panel) !important;
    box-shadow:
        0 28px 80px rgba(0, 0, 0, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(18px) saturate(1.16);
}

#home-tab .home-storage-treemap {
    border-radius: 20px !important;
}

#home-tab .home-featured-section {
    position: relative;
    padding: clamp(18px, 2vw, 28px) !important;
    border: 1px solid var(--home-liquid-line) !important;
    border-radius: 30px !important;
    background: rgba(7, 13, 31, 0.34) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.11) !important;
    backdrop-filter: blur(20px) saturate(1.14);
}

#home-tab .home-featured-section .home-link-action {
    color: var(--home-liquid-ink) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

#home-tab .home-featured-section .home-link-action:hover,
#home-tab .home-featured-section .home-link-action:focus-visible {
    color: #06101f !important;
    border-color: #fafaf8 !important;
    background: #fafaf8 !important;
}

@keyframes homeLiquidDrift {
    0% {
        transform: translate3d(-2%, -1%, 0) scale(1) rotate(0deg);
        filter: blur(28px) saturate(1.08) hue-rotate(0deg);
    }
    50% {
        transform: translate3d(3%, 2%, 0) scale(1.08) rotate(6deg);
        filter: blur(34px) saturate(1.22) hue-rotate(10deg);
    }
    100% {
        transform: translate3d(-1%, 3%, 0) scale(1.04) rotate(-5deg);
        filter: blur(30px) saturate(1.15) hue-rotate(-8deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    #home-tab .home-landing::before {
        animation: none !important;
        transform: none !important;
    }
}

@media (max-width: 760px) {
    #home-tab .home-landing {
        padding: 18px;
        border-radius: 26px;
    }

    #home-tab .home-hero {
        min-height: 0;
    }

    #home-tab .home-storage-panel,
    #home-tab .home-featured-section {
        padding: 14px !important;
        border-radius: 22px !important;
    }
}

/* Final no-frame pass: keep liquid atmosphere, remove added outer boxes. */
html[data-theme] body:has(#workspace-shell),
html:not([data-theme]) body:has(#workspace-shell) {
    background-color: var(--home-liquid-night) !important;
    background-image:
        radial-gradient(circle at 18% 8%, rgba(124, 92, 255, 0.28), transparent 34%),
        radial-gradient(circle at 88% 14%, rgba(90, 200, 250, 0.2), transparent 30%),
        linear-gradient(135deg, #040914 0%, #0b1530 48%, #080716 100%) !important;
}

body:has(#workspace-shell) .hero-shell.site-header {
    color: var(--home-liquid-muted) !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

body:has(#workspace-shell) .site-brand-copy strong,
body:has(#workspace-shell) .tab-btn,
body:has(#workspace-shell) .section h2,
body:has(#workspace-shell) .section-header h2,
body:has(#workspace-shell) .records-panel h2,
body:has(#workspace-shell) .config-panel h2 {
    color: var(--home-liquid-ink) !important;
}

body:has(#workspace-shell) .site-brand-copy small,
body:has(#workspace-shell) .section-header p,
body:has(#workspace-shell) .result-count,
body:has(#workspace-shell) .records-selected-count,
body:has(#workspace-shell) .records-select-visible,
body:has(#workspace-shell) .authors-pagination-info,
body:has(#workspace-shell) .stats-filter-hint,
body:has(#workspace-shell) .stats-kpi-sub,
body:has(#workspace-shell) .stats-kpi-label,
body:has(#workspace-shell) .stats-card-title,
body:has(#workspace-shell) .form-group label {
    color: var(--home-liquid-muted) !important;
}

#home-tab .home-storage-panel,
#home-tab .home-featured-section {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

#home-tab .home-storage-treemap {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body:has(#workspace-shell) .section,
body:has(#workspace-shell) .records-panels,
body:has(#workspace-shell) .config-panels,
body:has(#workspace-shell) .config-subtabs-shell,
body:has(#workspace-shell) .logs-container,
body:has(#workspace-shell) .stats-card,
body:has(#workspace-shell) .stats-chart-panel,
body:has(#workspace-shell) .stats-kpi-card,
body:has(#workspace-shell) .cookie-editor-card,
body:has(#workspace-shell) .theme-rule-card,
body:has(#workspace-shell) .authors-toolbar,
body:has(#workspace-shell) .records-bulk-toolbar,
body:has(#workspace-shell) .stats-filter-bar,
body:has(#workspace-shell) .stats-chart,
body:has(#workspace-shell) .web-stats-panel,
body:has(#workspace-shell) .records-themes-section {
    color: var(--home-liquid-ink) !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

body:has(#workspace-shell) .config-subtabs,
body:has(#workspace-shell) .records-subtabs {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Liquid readability pass: stronger contrast, compact controls, dark inputs. */
html[data-theme] body:has(#workspace-shell),
html:not([data-theme]) body:has(#workspace-shell) {
    --liquid-readable-text: #f8fbff;
    --liquid-readable-muted: rgba(226, 238, 255, 0.78);
    --liquid-readable-soft: rgba(191, 214, 248, 0.66);
    --liquid-control-bg: rgba(6, 13, 31, 0.62);
    --liquid-control-bg-strong: rgba(9, 19, 42, 0.78);
    --liquid-control-bg-hover: rgba(17, 36, 76, 0.82);
    --liquid-control-line: rgba(147, 183, 255, 0.22);
}

body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) .form-group label,
body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) .config-field-label,
body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) .advanced-cooling-field span,
body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) .advanced-cooling-section h3,
body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) .records-selected-count,
body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) .records-select-visible,
body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) .result-count,
body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) .authors-pagination-info,
body:has(#workspace-shell) #records-tab .date-range span,
body:has(#workspace-shell) .config-subtab,
body:has(#workspace-shell) .records-subtab {
    color: var(--liquid-readable-muted) !important;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.24);
}

body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) .section h2,
body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) .section-header h2,
body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) .records-panel h2,
body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) .config-panel h2 {
    color: var(--liquid-readable-text) !important;
}

body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) .input,
body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) .select,
body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) textarea.input,
body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) .author-search-input,
body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) input[type="text"],
body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) input[type="search"],
body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) input[type="number"],
body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) input[type="password"],
body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) input[type="date"],
body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) input[type="datetime-local"],
body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) select {
    color: var(--liquid-readable-text) !important;
    border-color: var(--liquid-control-line) !important;
    background: var(--liquid-control-bg) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
}

body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) .input::placeholder,
body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) textarea.input::placeholder,
body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) .author-search-input::placeholder,
body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) input::placeholder {
    color: var(--liquid-readable-soft) !important;
}

body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) .input:focus,
body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) .select:focus,
body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) textarea.input:focus,
body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) .author-search-input:focus,
body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) input:focus,
body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) select:focus {
    border-color: rgba(90, 200, 250, 0.72) !important;
    background: var(--liquid-control-bg-strong) !important;
    box-shadow: 0 0 0 3px rgba(90, 200, 250, 0.14) !important;
}

body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) input[type="date"]::-webkit-calendar-picker-indicator,
body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1) opacity(0.82);
}

body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) .btn-secondary,
body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) .theme-load-more-btn {
    color: var(--liquid-readable-text) !important;
    border-color: var(--liquid-control-line) !important;
    background: var(--liquid-control-bg) !important;
}

body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) .btn-secondary:hover,
body:has(#workspace-shell) :is(#records-tab, #authors-tab, #logs-tab, #config-tab) .theme-load-more-btn:hover:not(:disabled) {
    color: #ffffff !important;
    background: var(--liquid-control-bg-hover) !important;
}

body:has(#workspace-shell) .config-subtab.active,
body:has(#workspace-shell) .records-subtab.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, rgba(18, 101, 239, 0.98), rgba(10, 132, 255, 0.9)) !important;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.28);
    box-shadow: none !important;
}

body:has(#workspace-shell) .config-subtab:hover:not(.active),
body:has(#workspace-shell) .records-subtab:hover:not(.active),
body:has(#workspace-shell) .config-subtab:focus-visible,
body:has(#workspace-shell) .records-subtab:focus-visible {
    color: #ffffff !important;
    background: rgba(90, 200, 250, 0.12) !important;
    box-shadow: none !important;
}

body:has(#workspace-shell) .config-subtab[aria-selected="false"],
body:has(#workspace-shell) .records-subtab[aria-selected="false"] {
    color: rgba(226, 238, 255, 0.7) !important;
}

#records-tab .search-form {
    grid-template-columns: repeat(5, minmax(150px, 1fr)) !important;
    gap: 10px 14px !important;
    margin-bottom: 12px !important;
    align-items: end;
}

#records-tab .search-form .form-group {
    margin-bottom: 0 !important;
}

#records-tab .date-range {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 8px !important;
    align-items: center;
}

#records-tab .records-search-actions {
    grid-column: auto !important;
    gap: 8px !important;
    margin: 0 !important;
    align-self: end;
}

#records-tab .records-search-actions .btn {
    min-width: 68px;
}

#records-tab .records-completion-row {
    grid-column: 1 / -1;
    display: flex !important;
    align-items: center;
    gap: 8px !important;
    margin-top: 2px !important;
}

#records-tab .records-completion-badge {
    min-height: 28px !important;
    padding: 5px 9px !important;
    color: #7dbdff !important;
    border: 0 !important;
    background: rgba(18, 101, 239, 0.14) !important;
}

#records-tab .records-completion-tabs {
    flex: 0 1 auto !important;
    width: auto !important;
    max-width: 100%;
    gap: 3px;
    padding: 3px !important;
    border: 0 !important;
    background: rgba(6, 13, 31, 0.46) !important;
    box-shadow: none !important;
}

#records-tab .records-completion-tab {
    flex: 0 0 auto !important;
    min-height: 34px !important;
    padding: 7px 14px !important;
    color: var(--liquid-readable-muted) !important;
    font-size: 11px !important;
}

#records-tab .records-completion-tab.is-correct {
    color: #ffffff !important;
    background: linear-gradient(135deg, #1265ef, #0a84ff) !important;
}

#records-tab .records-bulk-toolbar {
    min-height: 56px;
    gap: 8px !important;
    padding: 10px 12px !important;
    color: var(--liquid-readable-text) !important;
    border: 0 !important;
    background: rgba(6, 13, 31, 0.42) !important;
    box-shadow: none !important;
}

#records-tab .records-bulk-toolbar .btn {
    min-height: 34px;
    padding: 7px 12px !important;
}

@media (max-width: 1180px) {
    #records-tab .search-form {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    #records-tab .records-search-actions,
    #records-tab .records-completion-row {
        grid-column: 1 / -1 !important;
    }
}

@media (max-width: 760px) {
    #records-tab .search-form,
    #records-tab .date-range {
        grid-template-columns: 1fr !important;
    }

    #records-tab .records-completion-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Homepage theme rhythm: cinematic 16:9 cards, three per row on desktop. */
#home-tab .home-featured-section .home-theme-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: clamp(10px, 1.25vw, 18px) !important;
}

#home-tab .home-featured-section .home-theme-item-card {
    aspect-ratio: 16 / 9 !important;
    min-height: 0 !important;
    height: auto !important;
    border: 0 !important;
    box-shadow: none !important;
}

#home-tab .home-theme-cards > .home-theme-loading,
#home-tab .home-theme-cards > .home-theme-empty {
    grid-column: 1 / -1;
}

@media (max-width: 1023px) {
    #home-tab .home-featured-section .home-theme-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 760px) {
    #home-tab .home-featured-section .home-theme-cards {
        grid-template-columns: 1fr !important;
    }
}

/* Stats page readability: chart card titles sit on light surfaces. */
body:has(#workspace-shell) #stats-tab .section > h2,
body:has(#workspace-shell) #stats-tab .stats-card-title {
    color: #102c52 !important;
    text-shadow: none !important;
}

/* Apple workspace layer: quiet materials, system typography, direct feedback. */
html[data-theme] body:has(#workspace-shell),
html:not([data-theme]) body:has(#workspace-shell) {
    --apple-font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", system-ui, sans-serif;
    --apple-hairline: color-mix(in srgb, var(--ui-border) 86%, transparent);
    --apple-toolbar-surface: color-mix(in srgb, var(--ui-surface-strong) 82%, transparent);
    --apple-panel-surface: color-mix(in srgb, var(--ui-surface) 92%, transparent);
    --apple-control-surface: color-mix(in srgb, var(--ui-surface-strong) 96%, transparent);
    --apple-shadow-panel: 0 12px 34px rgba(2, 12, 30, 0.18), 0 2px 8px rgba(2, 12, 30, 0.08);
    --apple-shadow-toolbar: 0 14px 36px rgba(2, 12, 30, 0.2), 0 2px 8px rgba(2, 12, 30, 0.08);
    font-family: var(--apple-font-sans) !important;
    font-optical-sizing: auto;
}

html[data-theme] body:has(#workspace-shell) .hero-shell.site-header,
html:not([data-theme]) body:has(#workspace-shell) .hero-shell.site-header {
    position: sticky !important;
    top: 12px !important;
    z-index: 100 !important;
    display: grid !important;
    grid-template-columns: minmax(220px, auto) minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 20px !important;
    min-height: 68px !important;
    padding: 8px 10px !important;
    overflow: visible !important;
    border: 1px solid var(--apple-hairline) !important;
    border-radius: 18px !important;
    background: var(--ui-surface-strong) !important;
    background: var(--apple-toolbar-surface) !important;
    box-shadow: var(--apple-shadow-toolbar) !important;
    backdrop-filter: blur(24px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(140%) !important;
}

body:has(#workspace-shell) .hero-shell.site-header::before {
    display: none !important;
}

body:has(#workspace-shell) .tabs {
    justify-content: flex-end;
    gap: 2px;
    margin: 0 !important;
    padding: 4px !important;
    border: 1px solid var(--apple-hairline) !important;
    border-radius: 12px !important;
    background: color-mix(in srgb, var(--ui-surface) 82%, transparent) !important;
    box-shadow: none !important;
    backdrop-filter: blur(16px) saturate(130%);
}

body:has(#workspace-shell) .tab-btn {
    min-height: 38px;
    padding: 0 14px;
    color: var(--ui-muted) !important;
    border-radius: 9px;
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: -0.005em;
    transition: background-color 140ms ease, color 140ms ease, transform 100ms ease !important;
}

body:has(#workspace-shell) .tab-btn:hover {
    color: var(--ui-text) !important;
    background: var(--ui-accent-soft) !important;
}

body:has(#workspace-shell) .tab-btn.active {
    color: var(--ui-accent) !important;
    background: var(--ui-accent-soft) !important;
    box-shadow: inset 0 0 0 1px var(--apple-hairline) !important;
}

html[data-theme] body:has(#workspace-shell) :is(#authors-tab, #records-tab, #stats-tab, #logs-tab, #config-tab) .section,
html:not([data-theme]) body:has(#workspace-shell) :is(#authors-tab, #records-tab, #stats-tab, #logs-tab, #config-tab) .section {
    padding: 24px !important;
    color: var(--ui-text) !important;
    border: 1px solid var(--apple-hairline) !important;
    border-radius: 18px !important;
    background: var(--ui-surface) !important;
    background: var(--apple-panel-surface) !important;
    box-shadow: var(--apple-shadow-panel) !important;
    backdrop-filter: blur(20px) saturate(125%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(125%) !important;
}

body:has(#workspace-shell) :is(#authors-tab, #records-tab, #stats-tab, #logs-tab, #config-tab) .section h2,
body:has(#workspace-shell) :is(#authors-tab, #records-tab, #stats-tab, #logs-tab, #config-tab) .section-header h2,
body:has(#workspace-shell) :is(#authors-tab, #records-tab, #stats-tab, #logs-tab, #config-tab) .records-panel h2,
body:has(#workspace-shell) :is(#authors-tab, #records-tab, #stats-tab, #logs-tab, #config-tab) .config-panel h2 {
    margin-bottom: 18px;
    color: var(--ui-text) !important;
    font-family: var(--apple-font-sans) !important;
    font-size: 1.3rem;
    font-weight: 650 !important;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

html[data-theme] body:has(#workspace-shell) :is(#authors-tab, #records-tab, #stats-tab, #logs-tab, #config-tab) :is(.input, .select, textarea),
html:not([data-theme]) body:has(#workspace-shell) :is(#authors-tab, #records-tab, #stats-tab, #logs-tab, #config-tab) :is(.input, .select, textarea) {
    min-height: 42px;
    padding: 10px 12px !important;
    color: var(--ui-text) !important;
    border: 1px solid var(--apple-hairline) !important;
    border-radius: 10px !important;
    background: var(--ui-surface-strong) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
    font-family: var(--apple-font-sans) !important;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.35;
    transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease !important;
}

body:has(#workspace-shell) :is(#authors-tab, #records-tab, #stats-tab, #logs-tab, #config-tab) :is(.input, .select, textarea):focus-visible {
    outline: none !important;
    border-color: var(--ui-accent) !important;
    box-shadow: 0 0 0 3px var(--ui-accent-soft), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

body:has(#workspace-shell) :is(.btn, .home-primary-action, .home-link-action, .theme-load-more-btn, .download-main-btn) {
    min-height: 38px;
    border-radius: 10px !important;
    font-family: var(--apple-font-sans) !important;
    font-size: 0.84rem;
    font-weight: 600 !important;
    letter-spacing: -0.005em;
    transform-origin: center;
    transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease, filter 140ms ease !important;
    will-change: transform;
}

body:has(#workspace-shell) .btn-primary {
    color: var(--ui-on-accent) !important;
    border-color: transparent !important;
    background: var(--ui-accent) !important;
    box-shadow: 0 6px 16px var(--ui-accent-soft) !important;
}

body:has(#workspace-shell) .btn-primary:hover:not(:disabled) {
    background: var(--ui-accent-strong) !important;
    filter: none !important;
    transform: translateY(-1px) !important;
}

body:has(#workspace-shell) .btn-secondary {
    color: var(--ui-text) !important;
    border: 1px solid var(--apple-hairline) !important;
    background: var(--ui-surface-strong) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

body:has(#workspace-shell) .btn-secondary:hover:not(:disabled) {
    color: var(--ui-text) !important;
    border-color: var(--ui-accent) !important;
    background: var(--ui-accent-soft) !important;
    transform: translateY(-1px) !important;
}

body:has(#workspace-shell) .btn-danger:hover:not(:disabled) {
    transform: translateY(-1px) !important;
}

body:has(#workspace-shell) .btn:active:not(:disabled) {
    transform: scale(0.98) !important;
    transition-duration: 90ms !important;
}

body:has(#workspace-shell) .btn:focus-visible,
body:has(#workspace-shell) .home-primary-action:focus-visible,
body:has(#workspace-shell) .home-link-action:focus-visible,
body:has(#workspace-shell) .theme-load-more-btn:focus-visible,
body:has(#workspace-shell) .download-main-btn:focus-visible {
    outline: 2px solid var(--ui-accent) !important;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px var(--ui-accent-soft) !important;
}

body:has(#workspace-shell) .btn:disabled,
body:has(#workspace-shell) .btn[aria-busy="true"] {
    cursor: not-allowed;
    opacity: 0.48 !important;
    filter: saturate(0.72);
    transform: none !important;
    box-shadow: none !important;
}

body:has(#workspace-shell) .config-subtab,
body:has(#workspace-shell) .records-subtab {
    min-height: 38px !important;
    padding: 0 13px !important;
    border-radius: 10px !important;
    font-family: var(--apple-font-sans) !important;
    font-size: 0.84rem;
    font-weight: 600 !important;
    transition: background-color 140ms ease, color 140ms ease, transform 100ms ease !important;
}

body:has(#workspace-shell) .config-subtab.active,
body:has(#workspace-shell) .records-subtab.active {
    color: var(--ui-accent) !important;
    background: var(--ui-accent-soft) !important;
    box-shadow: inset 0 0 0 1px var(--apple-hairline) !important;
    text-shadow: none !important;
}

body:has(#workspace-shell) .config-subtab:hover:not(.active),
body:has(#workspace-shell) .records-subtab:hover:not(.active) {
    color: var(--ui-text) !important;
    background: color-mix(in srgb, var(--ui-accent-soft) 65%, transparent) !important;
}

/* The records overview uses a 12-column desktop filter workspace. */
#records-tab .records-search-form {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 14px 12px !important;
    margin: 2px 0 0 !important;
    padding: 16px !important;
    border: 1px solid var(--apple-hairline) !important;
    border-radius: 14px !important;
    background: var(--ui-surface-strong) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

#records-tab .records-search-form .form-group {
    min-width: 0;
    margin: 0 !important;
}

#records-tab .records-search-form .form-group label {
    display: block;
    margin: 0 0 7px;
    color: var(--ui-muted) !important;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.25;
}

#records-tab .records-search-form .records-filter-author,
#records-tab .records-search-form .records-filter-model,
#records-tab .records-search-form .records-filter-date {
    grid-column: span 4;
}

#records-tab .records-search-form .records-filter-status,
#records-tab .records-search-form .records-filter-site,
#records-tab .records-search-form .records-filter-config,
#records-tab .records-search-form .records-search-actions {
    grid-column: span 3;
}

#records-tab .records-search-form :is(.input, .select) {
    width: 100%;
    max-width: none;
}

#records-tab .records-search-form .date-range {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
    align-items: center;
    gap: 8px !important;
}

#records-tab .records-search-form .date-range span {
    color: var(--ui-muted) !important;
    font-size: 0.78rem;
    font-weight: 600;
}

#records-tab .records-search-actions {
    display: flex !important;
    align-items: flex-end;
    gap: 8px !important;
}

#records-tab .records-search-actions .btn {
    flex: 1 1 0;
    min-width: 0;
    padding-inline: 12px !important;
}

#records-tab .records-search-form[aria-busy="true"] {
    cursor: progress;
}

#records-tab .records-completion-row {
    grid-column: 1 / -1;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px !important;
    margin: 2px 0 0 !important;
    padding-top: 12px;
    border-top: 1px solid var(--apple-hairline) !important;
}

#records-tab .records-completion-badge {
    min-height: 30px !important;
    padding: 6px 10px !important;
    color: var(--ui-accent) !important;
    border: 1px solid var(--apple-hairline) !important;
    border-radius: 9px !important;
    background: var(--ui-accent-soft) !important;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

#records-tab .records-completion-tabs {
    display: flex;
    min-width: 0;
    max-width: 100%;
    gap: 4px !important;
    padding: 3px !important;
    overflow-x: auto;
    border: 1px solid var(--apple-hairline) !important;
    border-radius: 11px !important;
    background: var(--ui-surface-strong) !important;
    box-shadow: none !important;
    scrollbar-width: thin;
}

#records-tab .records-completion-tab {
    flex: 0 0 auto !important;
    min-height: 32px !important;
    padding: 6px 12px !important;
    font-size: 0.75rem !important;
    white-space: nowrap;
}

#records-tab .records-completion-tab.is-correct {
    color: var(--ui-on-accent) !important;
    background: var(--ui-accent) !important;
}

@media (max-width: 1180px) {
    #records-tab .records-search-form {
        grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    }

    #records-tab .records-search-form .records-filter-author,
    #records-tab .records-search-form .records-filter-model {
        grid-column: span 3;
    }

    #records-tab .records-search-form .records-filter-date,
    #records-tab .records-search-form .records-search-actions {
        grid-column: span 6;
    }

    #records-tab .records-search-form .records-filter-status,
    #records-tab .records-search-form .records-filter-site,
    #records-tab .records-search-form .records-filter-config {
        grid-column: span 3;
    }
}

@media (max-width: 760px) {
    body:has(#workspace-shell) .hero-shell.site-header {
        position: relative !important;
        top: 0 !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 8px !important;
    }

    body:has(#workspace-shell) .tabs {
        justify-content: flex-start;
        overflow-x: auto;
    }

    #records-tab .records-search-form {
        grid-template-columns: 1fr !important;
        padding: 12px !important;
    }

    #records-tab .records-search-form .records-filter-author,
    #records-tab .records-search-form .records-filter-model,
    #records-tab .records-search-form .records-filter-date,
    #records-tab .records-search-form .records-filter-status,
    #records-tab .records-search-form .records-filter-site,
    #records-tab .records-search-form .records-filter-config,
    #records-tab .records-search-form .records-search-actions {
        grid-column: 1 / -1;
    }

    #records-tab .records-search-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #records-tab .records-completion-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    #records-tab .records-search-form .date-range {
        grid-template-columns: 1fr !important;
    }

    #records-tab .records-search-form .date-range span {
        text-align: center;
    }

    #records-tab .records-search-actions {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    body:has(#workspace-shell) :is(.btn, .tab-btn, .config-subtab, .records-subtab, .home-primary-action, .home-link-action, .theme-load-more-btn, .download-main-btn) {
        transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease !important;
        transform: none !important;
        will-change: auto;
    }

    body:has(#workspace-shell) .btn:active:not(:disabled) {
        transform: none !important;
    }
}

@media (prefers-reduced-transparency: reduce) {
    html[data-theme] body:has(#workspace-shell) .hero-shell.site-header,
    html:not([data-theme]) body:has(#workspace-shell) .hero-shell.site-header,
    html[data-theme] body:has(#workspace-shell) :is(#authors-tab, #records-tab, #stats-tab, #logs-tab, #config-tab) .section,
    html:not([data-theme]) body:has(#workspace-shell) :is(#authors-tab, #records-tab, #stats-tab, #logs-tab, #config-tab) .section {
        background: var(--ui-surface-strong) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}

@media (prefers-contrast: more) {
    body:has(#workspace-shell) :is(.btn, .tab-btn, .config-subtab, .records-subtab, .input, .select, textarea) {
        border-color: currentColor !important;
    }

    body:has(#workspace-shell) .hero-shell.site-header,
    body:has(#workspace-shell) :is(#authors-tab, #records-tab, #stats-tab, #logs-tab, #config-tab) .section,
    body:has(#workspace-shell) #records-tab .records-search-form {
        border-width: 2px !important;
    }
}

/* Context corrections: home hero stays dark; light workspace surfaces keep dark ink. */
html[data-theme] body:has(#home-tab.active) .hero-shell.site-header,
html:not([data-theme]) body:has(#home-tab.active) .hero-shell.site-header {
    color: var(--home-liquid-muted) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    background: rgba(6, 13, 29, 0.68) !important;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

body:has(#home-tab.active) .tabs {
    border-color: rgba(255, 255, 255, 0.14) !important;
    background: rgba(6, 13, 29, 0.34) !important;
    backdrop-filter: blur(18px) saturate(130%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(130%) !important;
}

body:has(#home-tab.active) .tab-btn {
    color: var(--home-liquid-muted) !important;
}

body:has(#home-tab.active) .tab-btn:hover,
body:has(#home-tab.active) .tab-btn.active {
    color: var(--home-liquid-ink) !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

html[data-theme] body:has(#records-tab.active) #records-tab .records-search-form .form-group label,
html:not([data-theme]) body:has(#records-tab.active) #records-tab .records-search-form .form-group label {
    color: var(--ui-muted) !important;
    text-shadow: none !important;
}

html[data-theme] body:has(#records-tab.active) #records-tab .records-search-form :is(.input, .select, textarea),
html:not([data-theme]) body:has(#records-tab.active) #records-tab .records-search-form :is(.input, .select, textarea) {
    color: var(--ui-text) !important;
    border-color: var(--ui-border) !important;
    background: var(--ui-surface-strong) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

html[data-theme] body:has(#records-tab.active) #records-tab .records-search-form :is(.input, .select, textarea)::placeholder,
html:not([data-theme]) body:has(#records-tab.active) #records-tab .records-search-form :is(.input, .select, textarea)::placeholder {
    color: var(--ui-muted) !important;
    opacity: 0.86 !important;
    text-shadow: none !important;
}

html[data-theme] body:has(#records-tab.active) #records-tab .records-search-form .date-range span,
html:not([data-theme]) body:has(#records-tab.active) #records-tab .records-search-form .date-range span {
    color: var(--ui-muted) !important;
    text-shadow: none !important;
}

html[data-theme] body:has(#records-tab.active) #records-tab .records-subtab[aria-selected="false"],
html:not([data-theme]) body:has(#records-tab.active) #records-tab .records-subtab[aria-selected="false"] {
    color: var(--ui-muted) !important;
    text-shadow: none !important;
}

html[data-theme] body:has(#records-tab.active) #records-tab .records-completion-tab:not(.is-correct),
html:not([data-theme]) body:has(#records-tab.active) #records-tab .records-completion-tab:not(.is-correct) {
    color: var(--ui-text) !important;
    border-color: var(--ui-border) !important;
    background: var(--ui-surface-strong) !important;
    text-shadow: none !important;
}

html[data-theme] body:has(#records-tab.active) #records-tab .records-bulk-toolbar,
html:not([data-theme]) body:has(#records-tab.active) #records-tab .records-bulk-toolbar {
    color: var(--ui-text) !important;
    border: 1px solid var(--ui-border) !important;
    background: var(--ui-surface-strong) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

html[data-theme] body:has(#records-tab.active) #records-tab .records-bulk-toolbar :is(.records-select-visible, .records-selected-count),
html:not([data-theme]) body:has(#records-tab.active) #records-tab .records-bulk-toolbar :is(.records-select-visible, .records-selected-count),
html[data-theme] body:has(#records-tab.active) #records-tab .result-count,
html:not([data-theme]) body:has(#records-tab.active) #records-tab .result-count {
    color: var(--ui-muted) !important;
    text-shadow: none !important;
}

html[data-theme] body:has(#records-tab.active) #records-tab .records-bulk-toolbar .btn-secondary,
html:not([data-theme]) body:has(#records-tab.active) #records-tab .records-bulk-toolbar .btn-secondary {
    color: var(--ui-text) !important;
    border-color: var(--ui-border) !important;
    background: var(--ui-surface) !important;
}

html[data-theme="cute"] body:has(#records-tab.active) #records-tab .records-search-form input[type="date"]::-webkit-calendar-picker-indicator,
html[data-theme="pokemon"] body:has(#records-tab.active) #records-tab .records-search-form input[type="date"]::-webkit-calendar-picker-indicator,
html[data-theme="onepiece"] body:has(#records-tab.active) #records-tab .records-search-form input[type="date"]::-webkit-calendar-picker-indicator {
    filter: none !important;
    opacity: 0.62;
}

/* Apple navigation: natural document flow. */
html[data-theme] body:has(#workspace-shell) .hero-shell.site-header,
html:not([data-theme]) body:has(#workspace-shell) .hero-shell.site-header {
    position: relative !important;
    top: auto !important;
}

/* Apple navigation: one outer material, retain individual menu surfaces. */
body:has(#workspace-shell) .tabs {
    position: static !important;
    top: auto !important;
    z-index: auto !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body:has(#workspace-shell) .tab-btn {
    color: var(--ui-muted) !important;
    background: transparent !important;
    box-shadow: none !important;
}

body:has(#workspace-shell) .tab-btn:hover {
    color: var(--ui-text) !important;
    background: var(--ui-accent-soft) !important;
    box-shadow: none !important;
}

body:has(#workspace-shell) .tab-btn.active {
    color: var(--ui-accent) !important;
    background: var(--ui-accent-soft) !important;
    box-shadow: inset 0 0 0 1px var(--apple-hairline) !important;
}

body:has(#home-tab.active) .tab-btn {
    color: var(--home-liquid-muted) !important;
}

body:has(#home-tab.active) .tab-btn.active,
body:has(#home-tab.active) .tab-btn:hover {
    color: var(--home-liquid-ink) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    box-shadow: none !important;
}

/* Workspace contrast contract: every light material gets theme-aware ink. */
html[data-theme] body:has(#workspace-shell),
html:not([data-theme]) body:has(#workspace-shell) {
    --liquid-readable-text: var(--ui-text);
    --liquid-readable-muted: var(--ui-muted);
    --liquid-readable-soft: color-mix(in srgb, var(--ui-muted) 78%, var(--ui-text) 22%);
    --liquid-control-bg: var(--ui-surface-strong);
    --liquid-control-bg-strong: var(--ui-surface-strong);
    --liquid-control-bg-hover: color-mix(in srgb, var(--ui-accent-soft) 72%, var(--ui-surface-strong));
    --liquid-control-line: var(--ui-border);
    --control-bg: var(--ui-bg);
    --control-bg-soft: var(--ui-bg-soft);
    --control-panel: var(--ui-surface);
    --control-panel-strong: var(--ui-surface-strong);
    --control-panel-muted: var(--ui-surface-soft);
    --control-line: var(--ui-border);
    --control-line-strong: color-mix(in srgb, var(--ui-border) 70%, var(--ui-text) 30%);
    --control-text: var(--ui-text);
    --control-text-soft: var(--ui-muted);
    --control-text-muted: color-mix(in srgb, var(--ui-muted) 82%, var(--ui-text) 18%);
    --control-accent: var(--ui-accent);
    --control-accent-strong: var(--ui-accent-strong);
    --control-accent-ink: var(--ui-on-accent);
    --control-info: var(--ui-accent);
    --control-focus: 0 0 0 3px var(--ui-accent-soft);
}

body:has(#workspace-shell) :is(
    #authors-tab .form-group label,
    #records-tab .form-group label,
    #logs-tab .form-group label,
    #config-tab .form-group label,
    #config-tab .config-field-label,
    #config-tab .advanced-cooling-field span,
    #stats-tab .stats-filter-item label,
    #stats-tab .stats-kpi-label,
    #config-tab .config-download-mode-row > span,
    #config-tab .browser-backend-status-label,
    #config-tab .dependency-update-main,
    #config-tab .cookie-editor-target,
    #config-tab .cookie-group-empty,
    #logs-tab .log-auto-refresh-toggle
) {
    color: var(--ui-muted) !important;
    text-shadow: none !important;
}

body:has(#workspace-shell) :is(
    #authors-tab .section h2,
    #records-tab .section h2,
    #records-tab .records-panel h2,
    #stats-tab .section h2,
    #stats-tab .stats-card-title,
    #logs-tab .section h2,
    #config-tab .section h2,
    #config-tab .advanced-cooling-section h3,
    #config-tab .interface-theme-heading h2
) {
    color: var(--ui-text) !important;
    text-shadow: none !important;
}

body:has(#workspace-shell) :is(
    #authors-tab .form-group small,
    #records-tab .form-group small,
    #logs-tab .form-group small,
    #config-tab .form-group small,
    #config-tab .theme-rules-help,
    #config-tab .interface-theme-heading p:not(.home-eyebrow),
    #config-tab .interface-theme-status,
    #config-tab .single-model-crawl-hint,
    #logs-tab .stats-filter-hint
) {
    color: var(--ui-muted) !important;
    text-shadow: none !important;
}

body:has(#workspace-shell) :is(.config-subtab, .records-subtab) {
    color: var(--home-liquid-muted) !important;
    background: transparent !important;
    text-shadow: none !important;
}

body:has(#workspace-shell) :is(.config-subtab, .records-subtab)[aria-selected="false"] {
    color: var(--home-liquid-muted) !important;
    background: transparent !important;
    text-shadow: none !important;
}

body:has(#workspace-shell) :is(.config-subtab, .records-subtab):is(:hover, :focus-visible):not(.active) {
    color: var(--home-liquid-ink) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    box-shadow: none !important;
}

body:has(#workspace-shell) :is(.config-subtab, .records-subtab).active {
    color: var(--ui-accent) !important;
    background: var(--ui-accent-soft) !important;
    box-shadow: inset 0 0 0 1px var(--apple-hairline) !important;
}

html[data-theme] body:has(#records-tab.active) #records-tab .records-subtab[aria-selected="false"],
html:not([data-theme]) body:has(#records-tab.active) #records-tab .records-subtab[aria-selected="false"] {
    color: var(--home-liquid-muted) !important;
    background: transparent !important;
    text-shadow: none !important;
}

body:has(#workspace-shell) :is(
    .btn-secondary,
    .theme-load-more-btn,
    .cookie-group-action-btn,
    .theme-select,
    .showcase-theme-switcher,
    .showcase-theme-switcher select
) {
    color: var(--ui-text) !important;
    border-color: var(--ui-border) !important;
    background: var(--ui-surface-strong) !important;
    text-shadow: none !important;
}

body:has(#workspace-shell) :is(.btn-secondary, .theme-load-more-btn, .cookie-group-action-btn):hover:not(:disabled) {
    color: var(--ui-text) !important;
    border-color: var(--ui-accent) !important;
    background: var(--ui-accent-soft) !important;
}
