/* Shared restrained palette, available before any component is mounted. */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 180ms; }
@media (prefers-reduced-motion: reduce) {
    ::view-transition-group(*),
    ::view-transition-old(*),
    ::view-transition-new(*) { animation-duration: 0s!important; animation-delay: 0s!important; }
}
:root {
    --sm-surface: #1a1a1a;
    --sm-surface-raised: #24262b;
    --sm-modal-surface: #24262b;
    --sm-field-fill: rgba(244,245,247,.05);
    --sm-field-hover: rgba(244,245,247,.07);
    --sm-field-focus: rgba(244,245,247,.075);
    --sm-field-line: rgba(244,245,247,.48);
    --sm-field-text: #f4f5f7;
    --sm-field-placeholder: #aeb4bf;
    --sm-segment-fill: rgba(244,245,247,.085);
    --sm-segment-shadow: none;
    --sm-segment-hover: rgba(244,245,247,.045);
    --sm-text: #f4f5f7;
    --sm-text-muted: #aeb4bf;
    --sm-line: rgba(228, 232, 240, .12);
    --sm-accent: #d8dee8;
    --sm-accent-rgb: 216, 222, 232;
    --sm-brand: #dc143c;
    --sm-surface-rgb: 26, 26, 26;
    --sm-ink-rgb: 244, 245, 247;
    /* Docked rows keep the page's base tone; the backdrop adds only a light tint. */
    --sm-sticky-surface: rgba(var(--sm-surface-rgb), .90);
    --sm-bottom-nav-surface: rgba(32, 32, 34, .72);
    --sm-sticky-blur: blur(28px) saturate(110%);
    color-scheme: dark;
}
:root[data-theme="light"] {
    --sm-surface: #e6e5e1;
    --sm-surface-raised: #eeede9;
    --sm-modal-surface: #eeede9;
    --sm-field-fill: #dededb;
    --sm-field-hover: #d8d9d6;
    --sm-field-focus: #daddd8;
    --sm-field-line: rgba(34,39,46,.48);
    --sm-field-text: #22272e;
    --sm-field-placeholder: #595f68;
    --sm-segment-fill: rgba(34,39,46,.075);
    --sm-segment-hover: rgba(34,39,46,.04);
    --sm-surface-rgb: 230, 229, 225;
    --sm-ink-rgb: 34, 39, 46;
    --sm-text: #22272e;
    --sm-text-muted: #555d67;
    --sm-line: rgba(34, 39, 46, .12);
    --sm-accent: #434b56;
    --sm-accent-rgb: 67, 75, 86;
    --sm-bottom-nav-surface: rgba(240, 239, 236, .72);
    --sm-glass-text: #22272e;
    color-scheme: light;
}
/* Restricted entries stay absent while the server's site mode is loading. */
:root:not([data-site-mode="full"]):not([data-site-mode="full_no_events"]) [data-site-full],
:root:is([data-site-mode="full"], [data-site-mode="full_no_events"]) [data-site-training-only] {
    display: none !important;
}

/* 防闪白CSS - 必须在页面最前面加载 */
html {
    background-color: var(--sm-surface) !important;
    overflow-y: scroll;
    /* Keep native page-edge rebound; only an active sheet gesture owns touch. */
    overscroll-behavior-y: auto;
}

body {
    background-color: var(--sm-surface) !important;
    color: var(--sm-text) !important;
    margin: 0 !important;
    padding: 0 !important;
    font-family: var(--spinmatch-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif) !important;
    opacity: 1 !important;
}


/* 防止内容跳动 */
* {
    box-sizing: border-box !important;
}

/* A pending detail keeps its real layout, including labels and icon slots.
   Removing the owner's loading attribute restores every caption atomically. */
[data-detail-loading] [data-detail-placeholder] {
    background: var(--sm-skeleton-fill);
    border-radius: 6px;
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
    text-shadow: none !important;
    pointer-events: none;
}
[data-detail-loading] [data-detail-placeholder] *,
[data-detail-loading] [data-detail-placeholder]::before,
[data-detail-loading] [data-detail-placeholder]::after {
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
    text-shadow: none !important;
}
[data-detail-loading] [data-detail-placeholder="icon"] { border-radius: 50%; }

/* 快速显示主要容器 */
.hero {
    min-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
