:root {
    --app-shell-width: 1424px;
    --app-bg: #f6f8fb;
    --app-surface: #ffffff;
    --app-surface-soft: #f8fafc;
    --app-border: #e2e8f0;
    --app-border-strong: #cbd5e1;
    --app-text: #111827;
    --app-muted: #64748b;
    --app-primary: #2563eb;
    --app-primary-hover: #1d4ed8;
    --app-primary-soft: #dbeafe;
    --app-success: #0f9f6e;
    --app-success-soft: #dcfce7;
    --app-warning: #b7791f;
    --app-warning-soft: #fef3c7;
    --app-danger: #dc2626;
    --app-danger-soft: #fee2e2;
    --app-accent: #0891b2;
    --app-accent-soft: #cffafe;
    --app-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 16px 36px rgba(15, 23, 42, .08);
    --app-radius: 8px;
    --app-radius-sm: 6px;
}

/* Mobile web entry: guide phone visitors to the WeChat mini program. */
.mobile-mini-program-page {
    display: none;
}

html.mobile-mini-program-gate,
html.mobile-mini-program-gate body {
    min-height: 100%;
    overflow: hidden;
}

html.mobile-mini-program-gate body {
    margin: 0;
    padding: 0 !important;
    background:
        radial-gradient(circle at 12% 10%, rgba(59, 130, 246, 0.13), transparent 32%),
        radial-gradient(circle at 88% 88%, rgba(16, 185, 129, 0.11), transparent 34%),
        #f6f9ff;
}

html.mobile-mini-program-gate body > *:not(.mobile-mini-program-page):not(script) {
    display: none !important;
}

html.mobile-mini-program-gate .mobile-mini-program-page {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    justify-content: center;
    overflow: auto;
    padding: max(24px, env(safe-area-inset-top)) 22px max(24px, env(safe-area-inset-bottom));
    color: #172033;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.mobile-mini-program-shell {
    width: min(100%, 420px);
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.mobile-mini-program-brand {
    align-self: stretch;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.mobile-mini-program-brand img {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    object-fit: cover;
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.14);
}

.mobile-mini-program-brand div {
    display: grid;
    gap: 2px;
}

.mobile-mini-program-brand strong {
    font-size: 17px;
    line-height: 1.25;
}

.mobile-mini-program-brand span {
    color: #77839a;
    font-size: 12px;
}

.mobile-mini-program-copy {
    margin-top: clamp(34px, 7vh, 64px);
}

.mobile-mini-program-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 11px;
    border-radius: 999px;
    color: #1769e8;
    background: #eaf3ff;
    font-size: 12px;
    font-weight: 700;
}

.mobile-mini-program-copy h1 {
    margin: 12px 0 8px;
    color: #111827;
    font-size: clamp(26px, 7.2vw, 32px);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.mobile-mini-program-copy p {
    max-width: 330px;
    margin: 0 auto;
    color: #64748b;
    font-size: 14px;
    line-height: 1.7;
}

.mobile-mini-program-qr-wrap {
    width: min(68vw, 248px);
    margin-top: 24px;
    padding: 12px 12px 10px;
    border: 1px solid #dce7f7;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 46px rgba(30, 64, 175, 0.12);
}

.mobile-mini-program-qr-wrap.is-attention {
    animation: mobile-mini-program-attention 0.8s ease 2;
}

@keyframes mobile-mini-program-attention {
    50% {
        border-color: #22c55e;
        box-shadow: 0 18px 48px rgba(34, 197, 94, 0.3);
        transform: scale(1.02);
    }
}

.mobile-mini-program-qr-wrap img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 16px;
    object-fit: cover;
}

.mobile-mini-program-scan-tip {
    display: block;
    margin-top: 7px;
    color: #718096;
    font-size: 12px;
}

.mobile-mini-program-primary {
    width: min(100%, 320px);
    min-height: 48px;
    margin-top: 22px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #20b86a, #08a258);
    box-shadow: 0 12px 26px rgba(16, 185, 129, 0.24);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.mobile-mini-program-primary i {
    margin-right: 7px;
}

.mobile-mini-program-primary:active {
    transform: translateY(1px);
}

.mobile-mini-program-fallback {
    width: min(100%, 320px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #e1e8f3;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    text-align: left;
}

.mobile-mini-program-fallback div {
    display: grid;
    gap: 2px;
}

.mobile-mini-program-fallback small {
    color: #8792a6;
    font-size: 11px;
}

.mobile-mini-program-fallback strong {
    color: #243047;
    font-size: 15px;
}

.mobile-mini-program-fallback button {
    flex: none;
    min-height: 34px;
    padding: 0 13px;
    border: 1px solid #cbd9ed;
    border-radius: 10px;
    color: #2765c6;
    background: #f8fbff;
    font-size: 12px;
    font-weight: 700;
}

.mobile-mini-program-status {
    min-height: 21px;
    margin: 10px 0 0;
    color: #168553;
    font-size: 12px;
    line-height: 1.6;
}

.mobile-mini-program-footnote {
    margin: auto 0 0;
    padding-top: 22px;
    color: #9aa4b5;
    font-size: 11px;
}

@media (max-height: 700px) {
    html.mobile-mini-program-gate .mobile-mini-program-page {
        padding-top: max(16px, env(safe-area-inset-top));
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }

    .mobile-mini-program-copy {
        margin-top: 20px;
    }

    .mobile-mini-program-qr-wrap {
        width: min(52vw, 190px);
        margin-top: 16px;
    }

    .mobile-mini-program-primary {
        margin-top: 16px;
    }
}

@font-face {
    font-family: "Font Awesome 6 Free";
    font-style: normal;
    font-weight: 900;
    font-display: block;
    src: url("webfonts/fa-solid-900.woff2") format("woff2"),
         url("webfonts/fa-solid-900.ttf") format("truetype");
}

@font-face {
    font-family: "Font Awesome 6 Free";
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: url("webfonts/fa-regular-400.woff2") format("woff2"),
         url("webfonts/fa-regular-400.ttf") format("truetype");
}

@font-face {
    font-family: "Font Awesome 6 Brands";
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: url("webfonts/fa-brands-400.woff2") format("woff2"),
         url("webfonts/fa-brands-400.ttf") format("truetype");
}

*, *::before, *::after {
    box-sizing: border-box !important;
    letter-spacing: 0 !important;
}

html {
    font-size: 16px !important;
    background: var(--app-bg) !important;
}

body,
.font-cute,
body *:not(.fa):not(.fas):not(.far):not(.fab) {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", Arial, sans-serif !important;
}

.kawaii-title {
    font-family: "ZCOOL KuaiLe", "Noto Sans SC", sans-serif !important;
}

.fa,
.fas {
    font-family: "Font Awesome 6 Free", "FontAwesome" !important;
    font-weight: 900 !important;
}

.far {
    font-family: "Font Awesome 6 Free", "FontAwesome" !important;
    font-weight: 400 !important;
}

.fab {
    font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands" !important;
}

body {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100vh;
    color: var(--app-text) !important;
    background:
        linear-gradient(180deg, rgba(219, 234, 254, .55) 0, rgba(246, 248, 251, 0) 340px),
        var(--app-bg) !important;
    overflow-x: hidden;
    scrollbar-gutter: stable;
}

body::before,
body > .fixed.pointer-events-none,
body > .fixed.select-none,
.kawaideco,
.kawaii-deco,
.kawaii-sparkle,
.deco-star,
.deco-cloud,
.tab-icon,
.empty-emoji {
    display: none !important;
}

a {
    color: var(--app-primary);
    text-decoration: none;
}

a:hover {
    color: var(--app-primary-hover);
}

button,
[role="button"],
.tab-toggle-btn,
summary {
    cursor: pointer;
}

button,
input,
select,
textarea {
    font: inherit !important;
}

button:disabled,
input:disabled,
select:disabled {
    cursor: not-allowed !important;
    opacity: .55 !important;
}

.hidden {
    display: none !important;
}

.max-w-5xl.mx-auto.relative.z-10 {
    width: min(var(--app-shell-width), calc(100vw - 56px)) !important;
    max-width: var(--app-shell-width) !important;
    margin: 0 auto !important;
    padding: 0 0 40px !important;
}

.app-header {
    min-height: 76px;
    margin: 0 0 10px;
    padding: 14px 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    position: relative;
    z-index: 50;
    background: transparent;
    border: 0;
    backdrop-filter: none;
}

.app-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.app-logo {
    width: 58px;
    height: 58px;
    display: block;
    flex: 0 0 auto;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 16px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.app-logo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    padding: 4px;
}

.app-title-block {
    min-width: 0;
    text-align: left;
}

.site-announcement-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    min-height: 36px;
    margin: 0;
    box-sizing: border-box;
}

.app-tab-bar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    margin: 2px 0 18px;
    padding-bottom: 0;
    border-bottom: 1px solid var(--app-border);
}

.app-tab-bar.has-announcement {
    align-items: center;
}

.site-announcement-bar.site-announcement-inline {
    flex: 1 1 280px;
    min-width: 220px;
    max-width: 520px;
    min-height: 32px;
    margin-left: auto;
    padding: 4px 10px;
    border-radius: 10px;
    background: #f8fafc;
}

.app-tab-bar .tab-toggle {
    flex: none;
}

.schedule-current-settings {
    display: flex;
    align-items: center;
    gap: 12px 16px;
    overflow: visible;
    padding: 10px 14px;
}

.schedule-current-settings-head {
    display: none;
}

.schedule-current-settings-body {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
}

.schedule-current-settings-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: none;
    margin-left: auto;
}

.schedule-current-settings-actions .schedule-settings-btn,
.schedule-current-settings-actions .schedule-guide-btn {
    height: 38px;
    min-height: 38px;
    padding: 0 13px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: var(--app-text) !important;
    background: var(--app-surface) !important;
    border: 1px solid var(--app-border-strong) !important;
    border-radius: var(--app-radius) !important;
    box-shadow: none !important;
    transform: none !important;
    font-size: 14px !important;
    font-weight: 650 !important;
    white-space: nowrap;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, color .16s ease, opacity .16s ease;
}

.schedule-current-settings-actions .schedule-settings-btn:hover,
.schedule-current-settings-actions .schedule-guide-btn:hover {
    color: var(--app-primary-hover) !important;
    background: var(--app-surface-soft) !important;
    border-color: var(--app-primary) !important;
}

.schedule-current-settings-actions .schedule-settings-btn i,
.schedule-current-settings-actions .schedule-guide-btn i {
    font-size: 13px;
}

.schedule-toolbar .schedule-generate-btn {
    height: 38px;
    min-height: 38px;
    padding: 0 13px;
    color: var(--app-text) !important;
    background: var(--app-surface) !important;
    border: 1px solid var(--app-border-strong) !important;
    box-shadow: none !important;
    font-weight: 650 !important;
}

.schedule-toolbar .schedule-generate-btn:not(:disabled) {
    color: #0f766e !important;
    background: linear-gradient(180deg, #f8fffb 0%, #ecfdf5 100%) !important;
    border-color: rgba(15, 118, 110, 0.16) !important;
    font-weight: 800 !important;
}

.schedule-toolbar .schedule-generate-btn:hover:not(:disabled) {
    color: #0f766e !important;
    background: linear-gradient(180deg, #f8fffb 0%, #ecfdf5 100%) !important;
    border-color: rgba(15, 118, 110, 0.28) !important;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12) !important;
}

.schedule-toolbar .schedule-generate-btn:disabled,
.schedule-toolbar .schedule-generate-btn:disabled:hover {
    color: #94a3b8 !important;
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    opacity: 1;
    cursor: not-allowed;
}

.schedule-settings-overview {
    color: #475569;
    font-size: 13px;
    line-height: 1.55;
    word-break: break-word;
}

.schedule-settings-overview strong {
    margin-right: 8px;
    color: #0f172a;
    font-weight: 750;
}

.schedule-settings-sep {
    margin: 0 8px;
    color: #cbd5e1;
}

.site-announcement-bar.is-clickable {
    cursor: pointer;
}

.site-announcement-label {
    flex: none;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
    white-space: nowrap;
}

.site-announcement-marquee {
    flex: 1 1 0;
    min-width: 0;
    width: 0;
    overflow: hidden;
    position: relative;
}

.site-announcement-track {
    display: inline-block;
    box-sizing: content-box;
    white-space: nowrap;
    line-height: 1.45;
    will-change: transform;
}

.app-kicker {
    margin: 0 0 2px;
    color: var(--app-muted);
    font-size: 12px;
    line-height: 1.2;
    font-weight: 650;
}

.app-title-block h1 {
    max-width: 48vw;
    margin: 0;
    color: var(--app-text);
    font-size: 24px;
    line-height: 1.15;
    font-weight: 760;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-title-block p {
    margin: 5px 0 0;
    color: #52657f;
    font-size: 12px;
    line-height: 1.35;
}

.app-header-shortcuts {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
}

.app-header-mini-program {
    position: relative;
}

.app-header-mini-program > summary {
    list-style: none;
}

.app-header-mini-program > summary::-webkit-details-marker {
    display: none;
}

.app-header-mini-program > summary::marker {
    content: "";
}

.app-header-shortcut {
    min-height: 36px;
    padding: 4px 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #334155;
    background: transparent;
    border: 0;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 650;
    white-space: nowrap;
    cursor: pointer;
    transition: color .16s ease;
}

.app-header-shortcut:hover,
.app-header-mini-program[open] > .app-header-shortcut {
    color: var(--app-primary);
}

.app-header-shortcut-icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    font-size: 11px;
    transition: color .16s ease, background .16s ease, border-color .16s ease;
}

.app-header-shortcut-icon.is-mini-program {
    color: var(--app-primary);
    background: #eff6ff;
    border-color: #bfdbfe;
}

.app-header-shortcut:hover .app-header-shortcut-icon,
.app-header-mini-program[open] .app-header-shortcut-icon {
    color: var(--app-primary);
    background: #eff6ff;
    border-color: #bfdbfe;
}

.app-header-mini-panel {
    width: 220px;
    padding: 14px;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 220;
    color: var(--app-text);
    text-align: center;
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: 16px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.14);
}

.app-header-mini-panel::before {
    content: "";
    width: 10px;
    height: 10px;
    position: absolute;
    top: -6px;
    right: 28px;
    background: #fff;
    border-top: 1px solid var(--app-border);
    border-left: 1px solid var(--app-border);
    transform: rotate(45deg);
}

.app-header-mini-panel p {
    margin: 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 600;
}

.mini-program-float {
    position: fixed;
    top: 50%;
    right: 14px;
    z-index: 180;
    color: var(--app-text);
    transform: translateY(-50%);
    filter: drop-shadow(0 8px 18px rgba(7, 122, 70, 0.18));
}

.mini-program-float > summary {
    position: relative;
    width: 42px;
    min-height: 92px;
    padding: 10px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(120% 80% at 20% 0%, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 55%),
        linear-gradient(165deg, #22c57a 0%, #12a45f 48%, #0a8f52 100%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 6px 16px rgba(7, 122, 70, 0.18);
    cursor: pointer;
    list-style: none;
    transition: transform .2s ease, box-shadow .2s ease;
}

.mini-program-float > summary::-webkit-details-marker {
    display: none;
}

.mini-program-float > summary::marker {
    content: "";
}

.mini-program-float > summary::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 42%);
    pointer-events: none;
}

.mini-program-float > summary:hover {
    transform: translateX(-3px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        0 8px 18px rgba(7, 122, 70, 0.24);
}

.mini-program-float[open] > summary {
    transform: translateX(-3px);
}

.mini-program-float-icon {
    position: relative;
    z-index: 1;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    color: #0a8f52;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 8px rgba(7, 80, 48, 0.14);
}

.mini-program-float-icon i {
    font-size: 14px;
    line-height: 1;
}

.mini-program-float-label {
    position: relative;
    z-index: 1;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 750;
    writing-mode: vertical-rl;
    letter-spacing: 0.14em !important;
}

.mini-program-float-panel {
    width: 200px;
    padding: 12px;
    position: absolute;
    top: 50%;
    right: calc(100% + 10px);
    color: var(--app-text);
    text-align: center;
    background:
        linear-gradient(180deg, #f4fff8 0%, #ffffff 28%, #ffffff 100%);
    border: 1px solid rgba(16, 185, 129, 0.18);
    border-radius: 18px;
    box-shadow:
        0 18px 44px rgba(15, 23, 42, 0.14),
        0 2px 0 rgba(255, 255, 255, 0.8) inset;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(12px, -50%) scale(0.98);
    transition: opacity .22s ease, visibility .22s ease, transform .22s ease;
}

.mini-program-float-panel::before {
    content: "";
    position: absolute;
    top: 18px;
    right: -6px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-right: 1px solid rgba(16, 185, 129, 0.18);
    border-top: 1px solid rgba(16, 185, 129, 0.18);
    transform: rotate(45deg);
}

.mini-program-float-panel::after {
    content: "";
    width: 14px;
    position: absolute;
    top: 0;
    right: -14px;
    bottom: 0;
}

.mini-program-float[open] .mini-program-float-panel,
.mini-program-float:hover .mini-program-float-panel,
.mini-program-float:focus-within .mini-program-float-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(0, -50%) scale(1);
}

.mini-program-float-title span,
.mini-program-float-title strong {
    display: block;
}

.mini-program-float-title span {
    margin-bottom: 4px;
    color: #0f9f5c;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.02em;
}

.mini-program-float-title span i {
    margin-right: 4px;
}

.mini-program-float-title strong {
    color: var(--app-text);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.mini-program-float-qr {
    margin: 8px auto 8px;
    padding: 8px;
    width: fit-content;
    border-radius: 12px;
    background: linear-gradient(180deg, #ecfdf5 0%, #f8fffb 100%);
    border: 1px solid rgba(16, 185, 129, 0.16);
}

.mini-program-float-qr img {
    display: block;
    width: 148px;
    height: 148px;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
}

.mini-program-float-panel p {
    margin: 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 600;
}

.app-header-actions button {
    background: rgba(255, 255, 255, .78) !important;
}

.app-header-actions {
    margin-left: auto;
}

.app-header-actions,
.toolbar-actions,
.toolbar-title-actions,
.schedule-export-actions,
.ics-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.app-header-actions button,
.toolbar-actions button,
.toolbar-title-actions button,
.schedule-export-actions button,
.weekend-control,
.ics-actions button,
.btn-cute,
.search-btn,
.reset-btn,
.import-btn,
.tab-toggle-btn {
    min-height: 38px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 13px;
    color: var(--app-text) !important;
    background: var(--app-surface) !important;
    border: 1px solid var(--app-border-strong) !important;
    border-radius: var(--app-radius) !important;
    box-shadow: none !important;
    transform: none !important;
    text-decoration: none;
    font-size: 14px !important;
    line-height: 1.2;
    font-weight: 650 !important;
    transition: background .16s ease, border-color .16s ease, color .16s ease, opacity .16s ease;
}

.app-header-actions button:hover,
.toolbar-actions button:hover,
.toolbar-title-actions button:hover,
.schedule-export-actions button:hover,
.weekend-control:hover,
.ics-actions button:hover,
.btn-cute:hover,
.search-btn:hover,
.reset-btn:hover,
.import-btn:hover,
.tab-toggle-btn:hover {
    color: var(--app-primary-hover) !important;
    background: var(--app-surface-soft) !important;
    border-color: var(--app-primary) !important;
    box-shadow: none !important;
    transform: none !important;
}

.app-primary-action,
.app-header-actions .app-primary-action,
.schedule-export-actions .app-primary-action,
.ics-actions .app-primary-action,
.export-btn,
.search-btn,
.btn-cute-blue,
.btn-cute-green {
    color: #fff !important;
    background: var(--app-primary) !important;
    border-color: var(--app-primary) !important;
}

.app-primary-action:hover,
.export-btn:hover,
.search-btn:hover,
.btn-cute-blue:hover,
.btn-cute-green:hover {
    color: #fff !important;
    background: var(--app-primary-hover) !important;
    border-color: var(--app-primary-hover) !important;
}

.schedule-export-actions .app-primary-action:disabled,
.schedule-export-actions .app-primary-action:disabled:hover {
    color: #94a3b8 !important;
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
    opacity: 1 !important;
}

.danger-action {
    color: var(--app-danger) !important;
    border-color: #fecaca !important;
    background: #fff !important;
}

.danger-action:hover {
    color: #fff !important;
    background: var(--app-danger) !important;
    border-color: var(--app-danger) !important;
}

.flex.justify-center.mb-6 {
    justify-content: flex-start !important;
    margin: 2px 0 18px !important;
    border-bottom: 1px solid var(--app-border);
}

.app-tab-bar {
    margin: 2px 0 18px !important;
}

.tab-toggle {
    display: inline-flex !important;
    gap: 10px;
    padding: 0;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.tab-toggle-btn {
    min-width: 0;
    min-height: 50px;
    padding: 0 14px !important;
    position: relative;
    color: #475569 !important;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 0 !important;
    border-radius: 10px 10px 0 0 !important;
    font-size: 16px !important;
    font-weight: 780 !important;
    letter-spacing: 0 !important;
    transition: color .18s ease, background .18s ease, transform .18s ease;
}

.tab-toggle-btn::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: -1px;
    height: 3px;
    background: transparent;
    border-radius: 999px 999px 0 0;
    transition: background .18s ease, left .18s ease, right .18s ease;
}

.tab-toggle-btn:hover {
    color: var(--app-primary-hover) !important;
    background: rgba(37, 99, 235, 0.06) !important;
    transform: translateY(-1px);
}

.tab-toggle-btn.active {
    color: var(--app-primary) !important;
    background: rgba(37, 99, 235, 0.08) !important;
}

.tab-toggle-btn.active::after {
    left: 10px;
    right: 10px;
    background: var(--app-primary);
    box-shadow: 0 -1px 8px rgba(37, 99, 235, 0.22);
}

.tab-toggle-btn.hidden {
    display: none !important;
}

.toolbar-actions button.hidden,
.toolbar-actions .danger-action.hidden {
    display: none !important;
}

#panel-schedule {
    display: flex !important;
    flex-direction: column;
    gap: 18px;
}

#panel-schedule.hidden {
    display: none !important;
}

.card-cute,
.schedule-board,
.ics-settings,
.schedule-card-sm,
.empty-state {
    background: var(--app-surface) !important;
    border: 1px solid var(--app-border) !important;
    border-radius: var(--app-radius) !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04) !important;
    transform: none !important;
}

.card-cute:hover,
.schedule-card-sm:hover {
    box-shadow: var(--app-shadow) !important;
    transform: none !important;
}

.schedule-board {
    overflow: hidden;
}

.schedule-reminder-settings,
.schedule-current-settings {
    overflow: visible;
}

.schedule-reminder-heading {
    padding: 0;
    display: block;
    border-bottom: 0;
}

.schedule-reminder-heading h2 {
    margin: 0 0 4px;
    color: var(--app-text);
    font-size: 17px;
    line-height: 1.35;
    font-weight: 780;
}

.schedule-reminder-heading h2 i {
    margin-right: 6px;
    color: var(--app-primary);
}

.schedule-reminder-heading p {
    margin: 0;
    color: var(--app-muted);
    font-size: 12px;
    line-height: 1.45;
}

.schedule-reminder-heading > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #52657f;
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
}

.schedule-settings-btn {
    min-height: 38px;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: var(--app-primary) !important;
    background: var(--app-primary-soft) !important;
    border: 1px solid rgba(37, 99, 235, 0.18) !important;
    border-radius: var(--app-radius) !important;
    font-size: 14px !important;
    font-weight: 780 !important;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, color .16s ease;
    flex-shrink: 0;
    box-shadow: none !important;
    transform: none !important;
}

.schedule-settings-btn:hover {
    color: var(--app-primary-hover) !important;
    background: #dbeafe !important;
    border-color: rgba(37, 99, 235, 0.28) !important;
}

.schedule-settings-btn i {
    font-size: 13px;
}

.schedule-guide-btn {
    min-height: 38px;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #0f766e !important;
    background: #ecfdf5 !important;
    border: 1px solid rgba(15, 118, 110, 0.18) !important;
    border-radius: var(--app-radius) !important;
    font-size: 14px !important;
    font-weight: 780 !important;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, color .16s ease;
    flex-shrink: 0;
    box-shadow: none !important;
}

.schedule-guide-btn:hover {
    color: #115e59 !important;
    background: #d1fae5 !important;
    border-color: rgba(15, 118, 110, 0.28) !important;
}

.schedule-guide-btn i {
    font-size: 13px;
}

.schedule-settings-actions-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.schedule-settings-guide {
    min-height: 32px;
    padding: 0 8px;
    color: #0f766e;
    background: transparent;
    border: 0;
    border-radius: var(--app-radius-sm);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.schedule-settings-guide:hover {
    color: #115e59;
    background: #ecfdf5;
}

.schedule-reminder-summary,
.generate-schedule-summary {
    padding: 0;
    display: block;
    color: #52657f;
    font-size: 13px;
    line-height: 1.45;
}

.generate-schedule-summary {
    margin-bottom: 10px;
    padding: 12px 14px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: var(--app-surface-soft);
}

.schedule-settings-modal {
    width: min(540px, calc(100vw - 24px)) !important;
    max-width: min(540px, calc(100vw - 24px)) !important;
    max-height: min(86vh, 600px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 16px !important;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.16) !important;
}

.schedule-settings-header {
    flex-shrink: 0;
    padding: 16px 18px 0 !important;
    background: #fff;
    border-bottom: 0 !important;
}

.schedule-settings-header-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.schedule-settings-title-wrap {
    min-width: 0;
}

.schedule-settings-modal .schedule-settings-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0;
    color: #0f172a;
    font-size: 18px !important;
    font-weight: 820 !important;
    line-height: 1.2;
}

.schedule-settings-modal .schedule-settings-header h3::before {
    content: '\f013';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 8px;
    color: var(--app-primary);
}

.schedule-settings-subtitle {
    margin: 3px 0 0 26px;
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.3;
}

.schedule-settings-modal .modal-close-btn {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #94a3b8;
    background: #f1f5f9;
    border: 0;
    font-size: 18px;
    line-height: 1;
    transition: background .16s ease, color .16s ease;
}

.schedule-settings-modal .modal-close-btn:hover {
    color: #475569;
    background: #e2e8f0;
}

.schedule-settings-tabs {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 22px;
    margin: 0;
    padding: 0 0 10px;
    border: 0;
    border-bottom: 1px solid #e8eef7;
    border-radius: 0;
    background: transparent;
}

/* 覆盖 .modal-header button 的关闭按钮样式（边框/灰底/固定宽高） */
.schedule-settings-header .schedule-settings-tab,
.modal-header .schedule-settings-tab {
    position: relative;
    width: auto !important;
    height: auto !important;
    min-height: 30px;
    padding: 6px 4px !important;
    border: 0 !important;
    outline: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
    color: #64748b !important;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    transition: color .16s ease;
}

.schedule-settings-header .schedule-settings-tab:hover,
.modal-header .schedule-settings-tab:hover {
    color: #334155 !important;
    background: transparent !important;
}

.schedule-settings-header .schedule-settings-tab.is-active,
.modal-header .schedule-settings-tab.is-active {
    color: #334155 !important;
    font-weight: 720;
    background: transparent !important;
    box-shadow: none !important;
}

.schedule-settings-header .schedule-settings-tab.is-active::after,
.modal-header .schedule-settings-tab.is-active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -11px;
    width: 22px;
    height: 2.5px;
    border-radius: 999px;
    background: var(--app-primary);
    transform: translateX(-50%);
}

.schedule-settings-panels {
    display: block;
}

.schedule-settings-panel {
    display: none;
    padding: 14px;
    border: 1px solid #e8eef7;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.schedule-settings-panel.is-active {
    display: block;
    animation: settings-panel-in .16s ease;
}

@keyframes settings-panel-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.schedule-settings-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.schedule-settings-form.schedule-settings-form-semester {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px 10px !important;
}

.schedule-settings-form-semester > .schedule-settings-field {
    grid-column: span 1;
}

.semester-holiday-hint {
    margin: 12px 0 10px;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
}

.semester-holiday-hint.is-found {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1e40af;
}

.semester-holiday-hint.is-none {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #64748b;
}

.semester-holiday-hint.is-empty {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

.schedule-settings-toggles-semester {
    margin-top: 0;
}

.holiday-class-date-picker {
    padding: 12px 14px;
    border-top: 1px solid #e8eef7;
    background: #fff;
    transition: background .16s ease;
}

.holiday-class-date-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
    transition: margin-bottom .2s ease;
}

.holiday-class-date-picker-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.holiday-class-date-picker-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.holiday-class-date-picker-head strong {
    color: #0f172a;
    font-size: 13px;
    font-weight: 740;
    line-height: 1.3;
}

.holiday-class-date-picker-head small {
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
}

.holiday-class-date-count {
    flex: 0 0 auto;
    padding: 2px 7px;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 10px;
    font-weight: 750;
    line-height: 1.5;
}

.holiday-class-date-picker-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.holiday-class-mode-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    cursor: pointer;
}

.holiday-class-mode-switch input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.holiday-class-mode-switch input:checked + .schedule-settings-switch-ui {
    background: var(--app-primary);
}

.holiday-class-mode-switch input:checked + .schedule-settings-switch-ui::after {
    transform: translateX(18px);
}

.holiday-class-mode-switch input:focus-visible + .schedule-settings-switch-ui {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

.holiday-class-date-collapse-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: 24px;
    height: 24px;
    justify-content: center;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: #2563eb;
    cursor: pointer;
}

.holiday-class-date-collapse-btn i {
    width: 14px;
    font-size: 10px;
    text-align: center;
    transition: transform .2s ease;
}

.holiday-class-date-collapse-btn:hover .holiday-class-date-count {
    background: #dbeafe;
}

.holiday-class-date-collapse-btn:hover {
    border-color: #dbeafe;
    background: #eff6ff;
}

.holiday-class-date-collapse-btn:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 3px;
}

.holiday-class-date-collapse-btn:disabled {
    opacity: .32;
    cursor: not-allowed;
}

.holiday-class-date-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
    max-height: 132px;
    overflow-y: auto;
    padding-right: 3px;
    opacity: 1;
    scrollbar-width: thin;
    scrollbar-color: #bfdbfe transparent;
    transition: max-height .22s ease, opacity .18s ease;
}

.holiday-class-date-list::-webkit-scrollbar {
    width: 5px;
}

.holiday-class-date-list::-webkit-scrollbar-track {
    background: transparent;
}

.holiday-class-date-list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #bfdbfe;
}

.holiday-class-date-picker.is-collapsed .holiday-class-date-picker-head {
    margin-bottom: 0;
}

.holiday-class-date-picker.is-collapsed .holiday-class-date-list {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

.holiday-class-date-picker.is-collapsed .holiday-class-date-collapse-btn i {
    transform: rotate(180deg);
}

.holiday-class-date-group {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: start;
    gap: 6px;
}

.holiday-class-date-group + .holiday-class-date-group {
    padding-top: 7px;
    border-top: 1px dashed #e2e8f0;
}

.holiday-class-date-group-name {
    padding-top: 6px;
    color: #475569;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.3;
    white-space: nowrap;
}

.holiday-class-date-group-days {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.holiday-class-date-btn {
    min-width: 0;
    min-height: 29px;
    padding: 4px 6px;
    display: inline-flex;
    align-items: center;
    gap: 1px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    background: #f8fafc;
    color: #334155;
    text-align: left;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.holiday-class-date-btn:hover {
    border-color: #93c5fd;
    background: #fff;
}

.holiday-class-date-btn span {
    color: #1e293b;
    font-size: 10.5px;
    font-weight: 750;
    white-space: nowrap;
}

.holiday-class-date-btn small {
    color: #64748b;
    font-size: 9.5px;
    line-height: 1.2;
    white-space: nowrap;
}

.holiday-class-date-btn.is-selected {
    border-color: #60a5fa;
    background: #eff6ff;
    color: #1d4ed8;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.holiday-class-date-btn.is-selected span {
    color: #1d4ed8;
}

.holiday-class-date-btn.is-selected small {
    color: #2563eb;
}

@media (max-width: 560px) {
    .holiday-class-date-group {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .holiday-class-date-group-name {
        padding-top: 0;
    }
}

.holiday-class-date-btn:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.holiday-class-date-empty {
    grid-column: 1 / -1;
    padding: 8px 0;
    color: #94a3b8;
    font-size: 11px;
    text-align: center;
}

.holiday-class-date-picker + .schedule-settings-switch {
    border-top: 1px solid #e8eef7 !important;
}

.schedule-settings-form-semester .schedule-settings-field > span {
    color: #64748b;
    font-size: 12px;
    font-weight: 650;
}

.schedule-settings-form-semester .input-cute,
.schedule-settings-form-semester .cute-select-trigger {
    min-height: 36px !important;
    padding-left: 10px !important;
    padding-right: 28px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
}

.schedule-settings-form-semester input[type="date"].input-cute {
    padding-right: 8px !important;
    font-variant-numeric: tabular-nums;
}

.schedule-settings-group-head h4,
.schedule-settings-block h4 {
    margin: 0;
    color: #0f172a;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
}

/* 兼容旧类名（引导高亮仍使用） */
.schedule-settings-block {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.schedule-settings-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.period-sections-total {
    flex: none;
    padding: 3px 9px;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--app-primary);
    font-size: 11px;
    font-weight: 780;
    line-height: 1.2;
    white-space: nowrap;
}

.settings-period-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.settings-period-card {
    min-width: 0;
    margin: 0;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: #f8fafc;
    cursor: default;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.settings-period-card:hover {
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.settings-period-card-morning {
    background: linear-gradient(180deg, #f5f8ff 0%, #eef4ff 100%);
    border-color: #dbe7ff;
}

.settings-period-card-afternoon {
    background: linear-gradient(180deg, #fff8f3 0%, #fff4eb 100%);
    border-color: #f6e3d2;
}

.settings-period-card-evening {
    background: linear-gradient(180deg, #f8f6ff 0%, #f3f0ff 100%);
    border-color: #e6def8;
}

.settings-period-card-head {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.settings-period-badge {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
}

.settings-period-card-morning .settings-period-badge {
    color: #3e73c4;
    background: rgba(62, 115, 196, 0.14);
}

.settings-period-card-afternoon .settings-period-badge {
    color: #d9793b;
    background: rgba(217, 121, 59, 0.14);
}

.settings-period-card-evening .settings-period-badge {
    color: #6b5bb5;
    background: rgba(107, 91, 181, 0.14);
}

.settings-period-label {
    color: #475569;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.2;
}

.settings-period-select {
    width: 100%;
    min-width: 0;
    max-width: none;
    min-height: 32px !important;
    padding: 4px 8px !important;
    border-radius: 8px !important;
    border-color: rgba(148, 163, 184, 0.35) !important;
    background: rgba(255, 255, 255, 0.92) !important;
    font-size: 12px;
    font-weight: 750;
    box-shadow: none !important;
}

.schedule-settings-toggles {
    margin-top: 12px;
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-items: stretch;
    gap: 0 !important;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    overflow: visible;
}

.schedule-settings-switch {
    margin: 0;
    min-width: 0;
    width: auto !important;
    max-width: none !important;
    padding: 12px 14px;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 14px;
    cursor: pointer;
    position: relative;
    transition: background .16s ease;
}

.schedule-settings-switch:hover {
    background: #f1f5f9;
}

.schedule-settings-switch + .schedule-settings-switch {
    border-top: 1px solid #e8eef7 !important;
    border-left: 0 !important;
}

@media (max-width: 720px) {
    .schedule-settings-toggles {
        grid-template-columns: 1fr !important;
    }
    .schedule-settings-switch + .schedule-settings-switch {
        border-left: 0 !important;
        border-top: 1px solid #e8eef7 !important;
    }
}

.schedule-settings-weekend-copy small {
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
    display: block;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-break: break-word;
}

.schedule-settings-switch input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.schedule-settings-switch-ui {
    width: 42px;
    height: 24px;
    position: relative;
    flex-shrink: 0;
    margin-top: 0;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background .18s ease;
}

.schedule-settings-switch-ui::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
    transition: transform .18s ease;
}

.schedule-settings-switch input:checked + .schedule-settings-switch-ui {
    background: var(--app-primary);
}

.schedule-settings-switch input:checked + .schedule-settings-switch-ui::after {
    transform: translateX(18px);
}

.schedule-settings-weekend-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 4px;
}

.schedule-settings-weekend-copy strong {
    color: #0f172a;
    font-size: 13px;
    font-weight: 740;
    line-height: 1.3;
}

.cute-select {
    position: relative;
    width: 100%;
}

.cute-select-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.cute-select-trigger {
    position: relative;
    width: 100%;
    min-height: 42px;
    padding: 0 38px 0 14px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    color: #1e293b;
    background: #fff;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .92);
    font-size: 15px;
    font-weight: 780;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease, transform .12s ease;
}

.cute-select-trigger::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 14px;
    width: 8px;
    height: 8px;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: translateY(calc(-50% - 2px)) rotate(45deg);
    transition: transform .18s ease, border-color .16s ease;
    pointer-events: none;
}

.cute-select.is-open .cute-select-trigger::after {
    transform: translateY(calc(-50% + 2px)) rotate(-135deg);
}

.cute-select-trigger:hover {
    border-color: #b8c8de;
    background: #fcfdff;
}

.cute-select.is-open .cute-select-trigger,
.cute-select-trigger:focus-visible {
    border-color: var(--app-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
    outline: none;
}

.cute-select-morning .cute-select-trigger {
    border-color: #c8d9f5;
    background: linear-gradient(180deg, #fff 0%, #f7faff 100%);
}

.cute-select-morning.is-open .cute-select-trigger,
.cute-select-morning .cute-select-trigger:hover {
    border-color: #7da7e8;
    box-shadow: 0 0 0 3px rgba(62, 115, 196, .12);
}

.cute-select-afternoon .cute-select-trigger {
    border-color: #efd3bc;
    background: linear-gradient(180deg, #fff 0%, #fffaf6 100%);
}

.cute-select-afternoon.is-open .cute-select-trigger,
.cute-select-afternoon .cute-select-trigger:hover {
    border-color: #e0a56d;
    box-shadow: 0 0 0 3px rgba(217, 121, 59, .12);
}

.cute-select-evening .cute-select-trigger {
    border-color: #ddd3f2;
    background: linear-gradient(180deg, #fff 0%, #faf8ff 100%);
}

.cute-select-evening.is-open .cute-select-trigger,
.cute-select-evening .cute-select-trigger:hover {
    border-color: #a895df;
    box-shadow: 0 0 0 3px rgba(107, 91, 181, .12);
}

.cute-select-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: auto;
    max-height: 240px;
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 2px;
    overflow: auto;
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .12), 0 2px 8px rgba(15, 23, 42, .06);
    z-index: 1600;
}

.cute-select.is-open .cute-select-menu,
.cute-select-menu.is-open {
    display: flex;
}

.cute-select-option {
    width: 100%;
    min-height: 36px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: #334155;
    background: transparent;
    border: 0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
    transition: background .14s ease, color .14s ease;
}

.cute-select-option:hover {
    background: var(--app-primary-soft);
    color: var(--app-primary-hover);
}

.cute-select-option.is-selected {
    color: var(--app-primary-hover);
    background: rgba(37, 99, 235, .1);
    font-weight: 780;
}

.cute-select-morning .cute-select-option:hover,
.cute-select-morning .cute-select-option.is-selected,
.cute-select-menu-morning .cute-select-option:hover,
.cute-select-menu-morning .cute-select-option.is-selected {
    color: #3e73c4;
    background: rgba(62, 115, 196, .12);
}

.cute-select-afternoon .cute-select-option:hover,
.cute-select-afternoon .cute-select-option.is-selected,
.cute-select-menu-afternoon .cute-select-option:hover,
.cute-select-menu-afternoon .cute-select-option.is-selected {
    color: #c56a24;
    background: rgba(217, 121, 59, .12);
}

.cute-select-evening .cute-select-option:hover,
.cute-select-evening .cute-select-option.is-selected,
.cute-select-menu-evening .cute-select-option:hover,
.cute-select-menu-evening .cute-select-option.is-selected {
    color: #6b5bb5;
    background: rgba(107, 91, 181, .12);
}

.schedule-settings-field .cute-select-trigger {
    min-height: 34px;
}

.schedule-settings-content {
    flex: 1;
    min-height: 0;
    padding: 12px 16px 0;
    overflow-x: hidden;
    overflow-y: auto;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.schedule-settings-form-reminder {
    display: flex !important;
    flex-direction: column;
    gap: 6px;
    grid-template-columns: none !important;
}

.reminder-settings-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.reminder-settings-row > .schedule-settings-field {
    flex: 1 1 0;
    min-width: 0;
}

.reminder-settings-row .schedule-settings-field-advance {
    flex: 0.95 1 0;
}

.reminder-settings-note {
    margin: 0;
    color: #94a3b8;
    font-size: 11px;
    line-height: 1.35;
}

.schedule-settings-form-reminder .schedule-settings-field > span {
    color: #64748b;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.3;
}

.schedule-settings-form-reminder .input-cute,
.schedule-settings-form-reminder .cute-select-trigger {
    min-height: 36px !important;
    padding-left: 10px !important;
    padding-right: 28px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
}

.schedule-settings-form-reminder .advance-reminder-control {
    display: grid;
    grid-template-columns: minmax(52px, 0.72fr) minmax(68px, 1fr);
    gap: 6px;
    align-items: center;
}

.schedule-settings-form-reminder .advance-reminder-control input[type="number"] {
    min-width: 0;
    text-align: center;
    font-variant-numeric: tabular-nums;
    -moz-appearance: textfield;
}

.schedule-settings-form-reminder .advance-reminder-control input[type="number"]::-webkit-outer-spin-button,
.schedule-settings-form-reminder .advance-reminder-control input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.schedule-settings-actions {
    margin-top: 0;
    padding: 12px 16px 14px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid #e8eef7;
    background: #fff;
}

.schedule-settings-intro {
    display: none;
}

.schedule-settings-form {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px 8px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.schedule-settings-form.schedule-settings-form-semester {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px 10px !important;
}

.schedule-settings-form.schedule-settings-form-reminder {
    display: flex !important;
    flex-direction: column;
    gap: 6px;
    grid-template-columns: none !important;
}

.schedule-settings-field {
    min-width: 0;
    margin: 0;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.schedule-settings-field-wide {
    grid-column: 1 / -1;
}

.advance-reminder-control {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(88px, 0.8fr);
    gap: 8px;
    align-items: center;
}

.advance-reminder-control input[type="number"] {
    min-width: 0;
    -moz-appearance: textfield;
}

.advance-reminder-control input[type="number"]::-webkit-outer-spin-button,
.advance-reminder-control input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.advance-reminder-hint {
    margin: 0;
    color: #94a3b8;
    font-size: 11px;
    line-height: 1.35;
}

.schedule-settings-field > span {
    color: #52657f !important;
    font-size: 11px !important;
    line-height: 1.3 !important;
    font-weight: 650 !important;
}

.schedule-settings-field .input-cute,
.schedule-settings-field select,
.schedule-settings-field input[type="date"] {
    width: 100%;
    min-width: 0;
    min-height: 30px;
    padding-top: 3px;
    padding-bottom: 3px;
    font-size: 12px;
}

.schedule-settings-cancel {
    min-height: 32px;
    min-width: 72px;
    padding: 0 12px;
    color: var(--app-text);
    background: #fff;
    border: 1px solid var(--app-border-strong);
    border-radius: var(--app-radius-sm);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease;
}

.schedule-settings-cancel:hover {
    background: var(--app-surface-soft);
}

.schedule-settings-save {
    min-height: 32px;
    min-width: 80px;
    padding: 0 14px;
    color: #fff !important;
    background: var(--app-primary) !important;
    border: 1px solid var(--app-primary) !important;
    border-radius: var(--app-radius-sm);
    font-size: 13px;
    font-weight: 780;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.schedule-settings-save:hover {
    background: var(--app-primary-hover) !important;
    border-color: var(--app-primary-hover) !important;
    transform: translateY(-1px);
}

.schedule-onboarding-banner {
    margin: 0 0 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    color: #1e3a8a;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fbff 100%);
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(37, 99, 235, .08);
}

.schedule-onboarding-banner-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.45;
}

.schedule-onboarding-banner-main i {
    color: #2563eb;
    font-size: 14px;
}

.schedule-onboarding-banner-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.schedule-onboarding-banner-skip,
.schedule-onboarding-banner-next {
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.schedule-onboarding-banner-skip {
    color: #64748b;
    background: #fff;
    border: 1px solid #dbe3ef;
}

.schedule-onboarding-banner-skip:hover {
    color: #334155;
    border-color: #cbd5e1;
}

.schedule-onboarding-banner-next {
    color: #fff;
    background: #2563eb;
    border: 1px solid #2563eb;
}

.schedule-onboarding-banner-next:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.schedule-onboarding {
    position: fixed;
    inset: 0;
    /* 必须高于引导中的业务弹窗，避免引导卡片被遮挡 */
    z-index: 1600;
    pointer-events: none;
}

.schedule-onboarding:not(.hidden) {
    pointer-events: none;
}

.schedule-onboarding-blocker {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: transparent;
}

.schedule-onboarding-spotlight {
    position: fixed;
    z-index: 1;
    border: 2px solid rgba(255, 255, 255, .95);
    border-radius: 14px;
    box-shadow: 0 0 0 9999px rgba(15, 23, 42, .58), 0 12px 30px rgba(37, 99, 235, .22);
    transition:
        top .42s cubic-bezier(.16, 1, .28, 1),
        left .42s cubic-bezier(.16, 1, .28, 1),
        width .42s cubic-bezier(.16, 1, .28, 1),
        height .42s cubic-bezier(.16, 1, .28, 1),
        opacity .22s ease,
        box-shadow .22s ease,
        border-radius .42s cubic-bezier(.16, 1, .28, 1);
    pointer-events: none;
    animation: onboarding-spotlight-pulse 1.5s ease-in-out infinite;
}

.schedule-onboarding.is-step-transitioning .schedule-onboarding-spotlight {
    animation: none;
    transition-duration: .42s;
}

.schedule-onboarding.is-instant-layout .schedule-onboarding-spotlight,
.schedule-onboarding.is-instant-layout .schedule-onboarding-card {
    transition: none !important;
}

.schedule-onboarding-card {
    position: fixed;
    z-index: 3;
    width: min(340px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow: auto;
    padding: 16px 16px 14px;
    color: #0f172a;
    background: #fff;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .18);
    pointer-events: auto;
    transition:
        top .42s cubic-bezier(.16, 1, .28, 1),
        left .42s cubic-bezier(.16, 1, .28, 1),
        width .42s cubic-bezier(.16, 1, .28, 1),
        opacity .18s ease,
        transform .18s ease,
        box-shadow .32s ease;
}

.schedule-onboarding-card.is-fading {
    opacity: 0;
    transform: translateY(6px) scale(.985);
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
}

.schedule-onboarding-card.is-entering {
    animation: onboarding-card-enter .38s cubic-bezier(.16, 1, .28, 1) both;
}

.schedule-onboarding.is-step-transitioning .schedule-onboarding-step-badge,
.schedule-onboarding.is-step-transitioning .schedule-onboarding-card h4,
.schedule-onboarding.is-step-transitioning .schedule-onboarding-card p {
    transition: opacity .24s ease, transform .24s ease;
}

.schedule-onboarding-card.is-fading .schedule-onboarding-step-badge,
.schedule-onboarding-card.is-fading h4,
.schedule-onboarding-card.is-fading p {
    opacity: 0;
    transform: translateY(4px);
}

@keyframes onboarding-card-enter {
    0% {
        opacity: 0;
        transform: translateY(-6px) scale(.985);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .schedule-onboarding-spotlight,
    .schedule-onboarding-card,
    .schedule-onboarding-card.is-entering {
        animation: none !important;
        transition-duration: .01ms !important;
    }
}

@keyframes onboarding-spotlight-pulse {
    0%, 100% {
        border-color: rgba(255, 255, 255, .95);
        box-shadow:
            0 0 0 9999px rgba(15, 23, 42, .58),
            0 0 0 0 rgba(59, 130, 246, .45),
            0 12px 30px rgba(37, 99, 235, .22);
    }

    50% {
        border-color: #93c5fd;
        box-shadow:
            0 0 0 9999px rgba(15, 23, 42, .58),
            0 0 0 5px rgba(59, 130, 246, .55),
            0 0 18px rgba(59, 130, 246, .35);
    }
}

@keyframes onboarding-target-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, .6);
    }

    50% {
        box-shadow: 0 0 0 4px rgba(59, 130, 246, .45), 0 0 0 9px rgba(59, 130, 246, .18);
    }
}

.onboarding-pulse-highlight {
    position: relative;
    z-index: auto;
    pointer-events: auto !important;
    animation: onboarding-target-pulse 1.5s ease-in-out infinite;
}

.onboarding-clickable-scope {
    pointer-events: auto !important;
}

/*
 * 引导中的业务弹窗：高于页面内容，但低于引导层(1600)。
 * 引导层 pointer-events:none，点击可穿透到弹窗；引导卡片仍盖在弹窗之上。
 */
#importGuideModal.onboarding-clickable-scope,
#aiRecognitionModal.onboarding-clickable-scope,
#scheduleSettingsModal.onboarding-clickable-scope,
#timeEditModal.onboarding-clickable-scope,
#courseModal.onboarding-clickable-scope,
#generateScheduleModal.onboarding-clickable-scope {
    z-index: 1500 !important;
}

.schedule-onboarding-card-head {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.schedule-onboarding-step-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    color: #1d4ed8;
    background: #eff6ff;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
}

.schedule-onboarding-close {
    min-height: 28px;
    padding: 0 10px;
    color: #64748b;
    background: transparent;
    border: 0;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.schedule-onboarding-close:hover {
    color: #334155;
    background: #f8fafc;
}

.schedule-onboarding-card h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
}

.schedule-onboarding-card p {
    margin: 8px 0 0;
    color: #52657f;
    font-size: 13px;
    line-height: 1.6;
}

.schedule-onboarding-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 14px;
}

.schedule-onboarding-nav {
    min-height: 38px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, opacity .16s ease;
}

.schedule-onboarding-prev {
    color: #475569;
    background: #fff;
    border: 1px solid #cbd5e1;
}

.schedule-onboarding-prev:hover:not(:disabled) {
    background: #f8fafc;
}

.schedule-onboarding-next {
    margin-left: auto;
    color: #fff;
    background: #2563eb;
    border: 1px solid #2563eb;
}

.schedule-onboarding-next:hover:not(:disabled) {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.schedule-onboarding-nav:disabled {
    opacity: .42;
    cursor: not-allowed;
}

.schedule-onboarding-banner-nav:disabled,
.schedule-onboarding-banner-next:disabled,
.schedule-onboarding-banner-skip:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.schedule-onboarding-banner-nav {
    min-height: 30px;
    padding: 0 12px;
    color: #475569;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.schedule-onboarding-banner-nav-primary {
    color: #fff;
    background: #2563eb;
    border-color: #2563eb;
}

.schedule-onboarding-banner-nav:disabled {
    opacity: .42;
    cursor: not-allowed;
}

.schedule-onboarding-continue {
    min-height: 34px;
    padding: 0 4px;
    color: #2563eb;
    background: transparent;
    border: 0;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.schedule-onboarding-continue:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.schedule-onboarding-continue.schedule-onboarding-ack {
    min-height: 38px;
    padding: 0 18px;
    color: #fff;
    background: #2563eb;
    border: 1px solid #2563eb;
    border-radius: 10px;
    text-decoration: none;
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
}

.schedule-onboarding-continue.schedule-onboarding-ack.is-revealed {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    animation: onboarding-ack-reveal .42s cubic-bezier(.4, 0, .2, 1) forwards;
}

.schedule-onboarding-continue.schedule-onboarding-ack:hover {
    color: #fff;
    background: #1d4ed8;
    border-color: #1d4ed8;
    text-decoration: none;
}

@keyframes onboarding-ack-reveal {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.schedule-onboarding-primary,
.schedule-onboarding-secondary {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 780;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.schedule-onboarding-secondary {
    color: #475569;
    background: #fff;
    border: 1px solid #cbd5e1;
}

.schedule-onboarding-secondary:hover {
    background: #f8fafc;
}

.schedule-onboarding-primary {
    color: #fff;
    background: #2563eb;
    border: 1px solid #2563eb;
}

.schedule-onboarding-primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .schedule-onboarding-card {
        width: min(300px, calc(100vw - 24px));
        max-height: calc(100vh - 24px);
    }
}

.schedule-reminder-grid {
    padding: 14px 18px 16px;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.schedule-reminder-grid label {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.schedule-reminder-grid label > span {
    color: #52657f;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 650;
}

.schedule-reminder-grid .input-cute {
    min-width: 0;
}

.schedule-export-actions {
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
    border-top: 0;
    background: var(--app-surface);
}

.generate-schedule-modal {
    width: min(980px, calc(100vw - 32px));
    max-height: 90vh;
    overflow: hidden;
}

.generate-schedule-content {
    padding: 18px;
    overflow: auto;
}

.generate-schedule-intro {
    margin-bottom: 14px;
}

.generate-schedule-intro h4 {
    margin: 0 0 5px;
    color: var(--app-text);
    font-size: 17px;
    font-weight: 820;
}

.generate-schedule-intro p {
    margin: 0;
    color: var(--app-muted);
    font-size: 13px;
    line-height: 1.5;
}

.generate-schedule-content .ics-settings-body {
    padding: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: var(--app-surface-soft);
}

.generate-schedule-content .ics-settings-body label {
    padding-top: 0;
}

.generate-schedule-actions {
    margin-top: 18px;
    padding-top: 14px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid var(--app-border);
}

.generate-schedule-actions button {
    min-height: 40px;
    padding: 0 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--app-text);
    background: #fff;
    border: 1px solid var(--app-border-strong);
    border-radius: var(--app-radius-sm);
    font-size: 14px;
    font-weight: 780;
}

.generate-schedule-actions .app-primary-action {
    color: #fff;
    background: var(--app-primary);
    border-color: var(--app-primary);
}

.generate-schedule-actions .calendar-use-btn[hidden] {
    display: none !important;
}

.generate-schedule-actions .calendar-use-btn:disabled {
    color: #94a3b8 !important;
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
    cursor: not-allowed;
    opacity: 1;
}

.clear-confirm-modal {
    width: min(420px, calc(100vw - 32px));
    padding: 24px;
    text-align: center;
}

.clear-confirm-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--app-danger);
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 50%;
    font-size: 19px;
}

.clear-confirm-modal h3 {
    margin: 0 0 8px;
    color: var(--app-text);
    font-size: 19px;
    font-weight: 840;
}

.clear-confirm-modal p {
    margin: 0;
    color: var(--app-muted);
    font-size: 13px;
    line-height: 1.65;
}

.clear-confirm-modal p strong {
    color: var(--app-danger);
}

.clear-confirm-modal kbd {
    padding: 2px 5px;
    color: var(--app-text);
    background: var(--app-surface-soft);
    border: 1px solid var(--app-border-strong);
    border-radius: 4px;
    font-family: inherit;
    font-size: 11px;
}

.clear-confirm-actions {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.clear-confirm-actions button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: var(--app-text);
    background: #fff;
    border: 1px solid var(--app-border-strong);
    border-radius: var(--app-radius-sm);
    font-size: 14px;
    font-weight: 780;
}

.clear-confirm-actions .danger-confirm {
    color: #fff;
    background: var(--app-danger);
    border-color: var(--app-danger);
}

.clear-confirm-actions .danger-confirm:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.import-confirm-icon {
    color: var(--app-primary);
    background: var(--app-primary-soft);
    border-color: rgba(37, 99, 235, 0.24);
}

.import-confirm-modal p strong {
    color: var(--app-primary);
}

.clear-confirm-actions .primary-confirm {
    color: #fff;
    background: var(--app-primary);
    border-color: var(--app-primary);
}

.clear-confirm-actions .primary-confirm:hover {
    background: var(--app-primary-hover);
    border-color: var(--app-primary-hover);
}

.share-panel-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.share-panel-title h3 {
    margin: 0;
    color: var(--app-text);
    font-size: 18px;
    line-height: 1.25;
    font-weight: 800;
}

.share-panel-title p {
    margin: 5px 0 0;
    color: var(--app-muted);
    font-size: 12px;
    line-height: 1.45;
    font-weight: 500;
}

.share-panel-badge {
    flex: 0 0 auto;
    padding: 5px 9px;
    color: var(--app-primary);
    background: var(--app-primary-soft);
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 999px;
    font-size: 12px;
    line-height: 1;
    font-weight: 750;
}

.share-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 14px;
}

.share-form-grid label {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 6px;
}

.share-form-grid label span {
    color: var(--app-muted);
    font-size: 12px;
    line-height: 1.2;
    font-weight: 700;
}

.share-form-grid label span em {
    color: var(--app-danger);
    font-style: normal;
    font-weight: 800;
}

.share-actions {
    margin-top: 18px;
    display: flex;
    justify-content: flex-end;
}

.share-actions button {
    min-height: 40px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
    background: var(--app-primary);
    border: 1px solid var(--app-primary);
    border-radius: var(--app-radius-sm);
    font-size: 14px;
    font-weight: 800;
    transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.share-actions button:hover {
    background: var(--app-primary-hover);
    border-color: var(--app-primary-hover);
    transform: translateY(-1px);
}

.schedule-toolbar {
    min-height: 0;
    padding: 12px 18px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: 16px;
    border-bottom: 0;
}

.schedule-toolbar-left,
.schedule-toolbar-center,
.schedule-toolbar-right,
.schedule-toolbar .toolbar-actions {
    display: flex;
    align-items: center;
    min-height: 38px;
}

.schedule-toolbar-left {
    justify-self: start;
    justify-content: flex-start;
    min-width: 0;
}

.schedule-toolbar-center {
    justify-self: center;
    justify-content: center;
    min-width: 0;
    text-align: center;
}

.schedule-toolbar-right,
.schedule-toolbar .toolbar-actions {
    justify-self: end;
    justify-content: flex-end;
    flex-shrink: 0;
}

.schedule-home-summary {
    flex: 1;
    min-width: 0;
    padding: 2px 0 0 2px;
}

.schedule-home-switch-bar {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.schedule-home-switch-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex-wrap: nowrap;
    min-height: 38px;
}

.home-switch-nav-group {
    position: relative;
    display: inline-flex;
    align-items: stretch;
    height: 38px;
    min-height: 38px;
    overflow: visible;
    border: 0;
    border-radius: var(--app-radius);
    background: transparent;
    box-shadow: none;
    box-sizing: border-box;
}

.home-switch-nav-group.is-primary {
    border-color: transparent;
    background: transparent;
}

.schedule-home-date-text {
    min-height: 30px;
    margin: 0 18px 8px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    color: #64748b;
    background: #f4f8ff;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.35;
    letter-spacing: 0.01em;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
    box-sizing: border-box;
}

.schedule-home-date-text > i {
    margin-right: 2px;
    color: var(--app-primary);
    font-size: 12px;
}

.schedule-home-date-label {
    color: #3b82f6;
    font-weight: 650;
}

.schedule-home-date-range,
.schedule-home-week-range {
    overflow: hidden;
    text-overflow: ellipsis;
}

.schedule-home-date-divider {
    width: 1px;
    height: 12px;
    margin: 0 7px;
    flex: 0 0 1px;
    background: #cbd5e1;
}

.home-switch {
    position: relative;
    display: flex;
    align-items: stretch;
}

.home-switch-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
    font: inherit;
    color: inherit;
    transition: background .16s ease, color .16s ease;
}

.home-switch-trigger:hover {
    opacity: 1;
}

.home-switch-trigger[aria-expanded="true"] {
    opacity: 1;
}

.home-switch-year .home-switch-trigger,
.home-switch-month .home-switch-trigger,
.home-switch-week .home-switch-trigger {
    min-height: 36px;
    min-width: 68px;
    padding: 0 7px;
    gap: 4px;
    justify-content: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.home-switch-year .home-switch-trigger:hover,
.home-switch-month .home-switch-trigger:hover,
.home-switch-week .home-switch-trigger:hover,
.home-switch-nav-group.is-primary .home-switch-trigger:hover {
    background: var(--app-surface-soft);
}

.home-switch-year .home-switch-trigger[aria-expanded="true"],
.home-switch-month .home-switch-trigger[aria-expanded="true"],
.home-switch-week .home-switch-trigger[aria-expanded="true"],
.home-switch-year .home-switch-trigger:focus,
.home-switch-month .home-switch-trigger:focus,
.home-switch-week .home-switch-trigger:focus,
.home-switch-year .home-switch-trigger:active,
.home-switch-month .home-switch-trigger:active,
.home-switch-week .home-switch-trigger:active {
    background: var(--app-surface-soft);
    color: var(--app-text);
    box-shadow: none;
    outline: none;
}

.home-switch-year .home-switch-value,
.home-switch-month .home-switch-value,
.home-switch-week .home-switch-value,
.home-switch-nav-group.is-primary .home-switch-value {
    color: var(--app-text);
    font-size: 14px;
    font-weight: 650;
    letter-spacing: 0;
    line-height: 1.2;
}

.home-switch-year .home-switch-chevron,
.home-switch-month .home-switch-chevron,
.home-switch-week .home-switch-chevron,
.home-switch-nav-group.is-primary .home-switch-chevron {
    margin-top: 0;
    color: #94a3b8;
    font-size: 10px;
    opacity: 1;
}

.home-switch-nav {
    width: 26px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--app-primary);
    cursor: pointer;
    transition: background .16s ease, color .16s ease, opacity .16s ease;
}

.home-switch-nav:first-child {
    border-right: 0;
    border-radius: var(--app-radius) 0 0 var(--app-radius);
}

.home-switch-nav:last-child {
    border-left: 0;
    border-radius: 0 var(--app-radius) var(--app-radius) 0;
}

.home-switch-nav-group.is-primary .home-switch-nav:first-child,
.home-switch-nav-group.is-primary .home-switch-nav:last-child {
    border-color: transparent;
}

.home-switch-nav:hover:not(:disabled),
.home-switch-nav-group.is-primary .home-switch-nav:hover:not(:disabled) {
    background: var(--app-primary-soft);
    color: var(--app-primary-hover);
}

.home-switch-nav:disabled {
    color: #94a3b8;
    opacity: 0.35;
    cursor: default;
}

.home-switch-nav i {
    font-size: 11px;
    line-height: 1;
}

.home-switch-today {
    min-height: 38px;
    height: 38px;
    padding: 0 13px;
    border-radius: var(--app-radius);
    border: 1px solid var(--app-border-strong);
    background: var(--app-surface);
    color: var(--app-text);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: none;
    box-sizing: border-box;
    transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.home-switch-today:hover {
    background: var(--app-surface-soft);
    border-color: var(--app-border-strong);
    color: var(--app-text);
    filter: none;
    box-shadow: none;
    transform: none;
}

.home-switch-chevron {
    transition: transform .18s ease;
    line-height: 1;
}

.home-switch-trigger[aria-expanded="true"] .home-switch-chevron {
    transform: rotate(180deg);
}

.home-switch-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    z-index: 120;
    min-width: 112px;
    max-height: 240px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.06);
    display: none;
    transform: translateX(-50%);
}

.home-switch-menu.show {
    display: block;
    animation: home-switch-in .16s ease;
}

@keyframes home-switch-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.home-switch-option {
    display: block;
    width: 100%;
    padding: 9px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--app-text);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
    transition: background .14s ease, color .14s ease;
}

.home-switch-option:hover {
    background: var(--app-primary-soft);
    color: var(--app-primary-hover);
}

.home-switch-option.is-active {
    background: var(--app-primary);
    color: #fff;
    font-weight: 760;
}

.home-switch-week .home-switch-menu {
    min-width: 132px;
}

.home-switch-import {
    position: relative;
    margin-left: 0;
}

.home-import-trigger {
    min-height: 38px;
    height: 38px;
    padding: 0 13px;
    border-radius: var(--app-radius);
    background: linear-gradient(180deg, #f8fffb 0%, #ecfdf5 100%);
    border: 1px solid rgba(15, 118, 110, 0.16);
    box-shadow: none;
    box-sizing: border-box;
}

.home-import-trigger[aria-expanded="true"] {
    border-color: rgba(15, 118, 110, 0.28);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.home-import-trigger .fa-file-import {
    color: #0f766e;
    font-size: 12px;
}

.home-import-label {
    font-size: 13px;
    font-weight: 800;
    color: #0f766e;
    line-height: 1;
}

.home-switch-import .home-switch-chevron {
    color: #647086;
    font-size: 10px;
}

.home-import-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 90;
    width: min(280px, calc(100vw - 32px));
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 4px;
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
}

.home-import-menu.show {
    display: flex;
    animation: home-import-in .16s ease;
}

@keyframes home-import-in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.home-import-option {
    width: 100%;
    padding: 10px 10px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
    color: var(--app-text);
    background: transparent;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    transition: background .14s ease;
}

.home-import-option:hover {
    background: #f8fafc;
}

.home-import-option-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 14px;
}

.home-import-option-icon-ai {
    color: #0f766e;
    background: #ecfdf5;
}

.home-import-option-icon-qr {
    color: #2563eb;
    background: #eff6ff;
}

.home-import-option-icon-ics {
    color: #7c3aed;
    background: #f5f3ff;
}

.home-import-option-icon-excel {
    color: #15803d;
    background: #f0fdf4;
}

.home-import-option-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.home-import-option-text strong {
    font-size: 13px;
    font-weight: 780;
    line-height: 1.35;
}

.home-import-option-text small {
    color: #64748b;
    font-size: 11px;
    line-height: 1.45;
}

#emptyImportModal.modal-overlay {
    padding: 16px;
    background: rgba(15, 23, 42, 0.38) !important;
    backdrop-filter: blur(3px);
}

.modal-cute.empty-import-modal {
    width: min(480px, calc(100vw - 32px)) !important;
    max-width: min(480px, calc(100vw - 32px)) !important;
    max-height: calc(100vh - 32px);
    overflow: hidden !important;
    border: 1px solid rgba(203, 213, 225, 0.86) !important;
    border-radius: 20px !important;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22) !important;
}

.empty-import-modal-header {
    padding: 18px 20px 16px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%) !important;
    border-bottom: 1px solid #e8eef7 !important;
}

.empty-import-modal-header > div {
    min-width: 0;
}

.empty-import-modal-header h3 {
    display: flex;
    align-items: center;
    color: #0f172a !important;
    font-size: 20px !important;
    font-weight: 800 !important;
}

.empty-import-modal-header h3 i {
    width: 34px;
    height: 34px;
    margin-right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--app-primary);
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 11px;
    font-size: 15px;
}

.empty-import-modal-header p {
    margin: 4px 0 0 44px;
    color: var(--app-muted);
    font-size: 12px;
    line-height: 1.35;
}

.modal-header.empty-import-modal-header > button {
    width: 32px !important;
    height: 32px !important;
    flex: 0 0 32px;
    color: #64748b !important;
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    font-size: 18px;
    line-height: 1;
}

.modal-header.empty-import-modal-header > button:hover {
    color: #1e40af !important;
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
}

.empty-import-modal-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f8fafc;
}

.empty-import-option {
    min-height: 68px;
    padding: 12px 14px !important;
    align-items: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.empty-import-option:hover {
    background: #fff;
    border-color: #bfdbfe;
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.09);
    transform: translateY(-1px);
}

.empty-import-option .home-import-option-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 16px;
}

.empty-import-option .home-import-option-text {
    flex: 1 1 auto;
    gap: 3px;
}

.empty-import-option .home-import-option-text strong {
    font-size: 14px;
    color: #0f172a;
}

.empty-import-option-arrow {
    flex: 0 0 auto;
    color: #94a3b8;
    font-size: 11px;
    transition: color .16s ease, transform .16s ease;
}

.empty-import-option:hover .empty-import-option-arrow {
    color: var(--app-primary);
    transform: translateX(2px);
}

.schedule-toolbar .toolbar-actions button,
.schedule-toolbar .schedule-guide-btn,
.schedule-toolbar .home-import-trigger,
.schedule-toolbar .home-switch-today,
.schedule-toolbar .home-switch-nav-group {
    height: 38px;
    min-height: 38px;
    box-sizing: border-box;
}

.toolbar-title h2 {
    margin: 0;
    color: var(--app-text);
    font-size: 18px;
    line-height: 1.2;
    font-weight: 760;
}

.toolbar-title p {
    margin: 5px 0 0;
    color: var(--app-muted);
    font-size: 12px;
    line-height: 1.35;
}

.toolbar-title-actions {
    margin-top: 12px;
    justify-content: flex-start;
}

.weekend-control input {
    width: 15px;
    height: 15px;
    accent-color: var(--app-primary);
}

.schedule-grid-wrap {
    position: relative;
    width: 100%;
}

.empty-state.schedule-grid-empty,
.schedule-grid-empty.empty-state {
    position: absolute;
    top: 130px;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translateX(-50%);
    z-index: 5;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    width: 100%;
    max-width: 420px;
    padding: 0 16px;
    margin: 0;
    text-align: center;
    pointer-events: none;
    background: transparent;
    box-sizing: border-box;
}

.empty-state.schedule-grid-empty.is-visible,
.schedule-grid-empty.empty-state.is-visible {
    display: flex;
}

.empty-state-image {
    display: block;
    width: 150px;
    max-width: 40vw;
    height: auto;
    margin: 0;
    object-fit: contain;
    user-select: none;
    pointer-events: none;
}

.empty-state-title {
    margin-top: 6px;
    color: #1f2937;
    font-size: 20px;
    line-height: 28px;
    font-weight: 600;
}

.empty-state-desc {
    margin-top: 4px;
    max-width: 360px;
    color: #64748b;
    font-size: 14px;
    line-height: 22px;
    text-align: center;
}

.empty-state-actions {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    pointer-events: auto;
}

.empty-state-button {
    margin: 0;
    min-height: 36px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
    background: var(--app-primary);
    border: 1px solid var(--app-primary);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
    transition: background .16s ease, transform .12s ease, box-shadow .16s ease;
}

.empty-state-button:hover {
    background: var(--app-primary-hover);
    border-color: var(--app-primary-hover);
    transform: translateY(-1px);
}

.empty-state-discover-link {
    min-height: 36px;
    margin: 0;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #475569;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid #dbe5ef;
    border-radius: 999px;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 650;
    cursor: pointer;
    pointer-events: auto;
    transition: color .16s ease, background .16s ease, border-color .16s ease;
}

.empty-state-discover-link > i:first-child {
    color: #64748b;
    font-size: 12px;
}

.empty-state-discover-link strong {
    color: var(--app-primary);
    font-weight: 650;
}

.empty-state-discover-arrow {
    margin-left: 1px;
    color: #94a3b8;
    font-size: 9px;
    transition: transform .16s ease;
}

.empty-state-discover-link:hover {
    color: var(--app-primary-hover);
    background: #eff6ff;
    border-color: #dbeafe;
}

.empty-state-discover-link:hover strong {
    color: var(--app-primary-hover);
}

.empty-state-discover-link:hover .empty-state-discover-arrow {
    transform: translateX(2px);
}

@media (max-width: 767px) {
    .empty-state-image {
        width: 110px;
        max-width: 36vw;
    }

    .empty-state-title {
        font-size: 18px;
        line-height: 26px;
    }

    .empty-state-desc {
        max-width: 280px;
        font-size: 13px;
        line-height: 20px;
    }
}

.schedule-grid.is-empty .grid-cell.drop-zone > span {
    opacity: 0 !important;
}

.schedule-grid {
    display: grid;
    position: relative;
    width: 100%;
    min-height: 560px;
    overflow-x: hidden;
    overflow-y: visible;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
}

.schedule-grid .grid-header,
.schedule-grid .grid-time,
.schedule-grid .grid-cell {
    border: 1px solid var(--app-border) !important;
    box-shadow: none !important;
}

.schedule-grid .grid-time-extra {
    border-bottom: 1px dashed #e8d4c4 !important;
}

.schedule-grid .grid-lunch-divider {
    border-bottom: 1px dashed #e8d4c4 !important;
}

.schedule-grid.weekend-grid {
    width: 100%;
    min-width: 100%;
}

.schedule-grid.weekend-grid .grid-header {
    padding-left: 4px !important;
    padding-right: 4px !important;
}

.schedule-grid.weekend-grid .grid-cell {
    padding: 6px !important;
}

.schedule-grid.weekend-grid .course-card {
    padding: 8px 7px !important;
}

.schedule-grid.weekend-grid .course-title,
.schedule-grid.weekend-grid .course-room,
.schedule-grid.weekend-grid .course-teacher,
.schedule-grid.weekend-grid .course-time {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.schedule-grid.weekend-grid .course-week-tag {
    max-width: 100%;
}

.grid-header {
    position: relative;
    z-index: 6;
    min-height: 62px !important;
    min-width: 0;
    padding: 10px 6px !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--app-text) !important;
    background: #fff !important;
    border-color: var(--app-border) !important;
    font-size: 15px !important;
    font-weight: 700 !important;
}

.grid-day-header {
    position: relative;
    gap: 6px !important;
    min-height: 64px !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    overflow: hidden;
    background: #f7f9fc !important;
    color: #334155 !important;
}

.grid-day-copy-btn {
    position: absolute;
    top: 6px;
    left: 7px;
    z-index: 4;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #64748b;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #dbe4f0;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    opacity: 0;
    transform: translateY(-2px);
    cursor: pointer;
    transition: opacity .16s ease, transform .16s ease, color .16s ease, border-color .16s ease, background .16s ease;
}

.grid-day-header:hover .grid-day-copy-btn,
.grid-day-copy-btn:focus-visible {
    opacity: 1;
    transform: translateY(0);
}

.grid-day-copy-btn:hover,
.grid-day-copy-btn:focus-visible {
    color: #2563eb;
    background: #eff6ff;
    border-color: #93c5fd;
    outline: none;
}

.grid-day-copy-btn i {
    font-size: 12px;
}

@media (hover: none) {
    .grid-day-copy-btn {
        opacity: .72;
        transform: none;
    }
}

.day-copy-modal {
    width: min(430px, calc(100vw - 32px)) !important;
    max-width: min(430px, calc(100vw - 32px)) !important;
    overflow: hidden !important;
}

.day-copy-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 17px 18px;
    border-bottom: 1px solid #e5edf6;
}

.day-copy-modal-heading {
    display: flex;
    align-items: center;
    gap: 12px;
}

.day-copy-modal-icon {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 11px;
}

.day-copy-modal-heading h3 {
    margin: 0;
    color: #0f172a;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 800;
}

.day-copy-modal-close {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #dbe4f0;
    border-radius: 10px;
    cursor: pointer;
}

.day-copy-modal-close:hover {
    color: #0f172a;
    background: #fff;
    border-color: #b8c6d9;
}

.day-copy-modal-body {
    padding: 16px 18px;
}

.day-copy-source-summary {
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 8px 11px;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
}

.day-copy-source-label {
    color: #64748b;
}

.day-copy-source-summary strong {
    color: #0f172a;
    font-size: 14px;
}

.day-copy-source-summary span:last-child {
    margin-left: auto;
}

#dayCopySourceMeta {
    padding-left: 8px;
    color: #64748b;
    border-left: 1px solid #dbe4f0;
}

.day-copy-source-summary b {
    color: #2563eb;
}

.day-copy-field-label,
.day-copy-scope legend,
.day-copy-strategy legend {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-size: 13px;
    font-weight: 750;
}

.day-copy-scope {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin: 0 0 14px;
    padding: 0;
    border: 0;
}

.day-copy-scope-option {
    position: relative;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #dbe4f0;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.day-copy-scope-option:has(input:checked) {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #93c5fd;
}

.day-copy-scope-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.day-copy-target-select {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    color: #0f172a;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
}

.day-copy-target-select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.day-copy-strategy {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 14px 0 0;
    padding: 0;
    border: 0;
}

.day-copy-strategy-option {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 9px 10px;
    background: #fff;
    border: 1px solid #dbe4f0;
    border-radius: 11px;
    cursor: pointer;
}

.day-copy-strategy-option:has(input:checked) {
    background: #f5f9ff;
    border-color: #93c5fd;
}

.day-copy-strategy-option input {
    margin-top: 3px;
    accent-color: #2563eb;
}

.day-copy-strategy-option span {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.day-copy-strategy-option strong {
    color: #1e293b;
    font-size: 14px;
}

.day-copy-strategy-option small {
    color: #64748b;
    font-size: 12px;
    line-height: 1.3;
    white-space: nowrap;
}

.day-copy-notice {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 auto 0 0;
    color: #64748b;
    font-size: 12px;
}

.day-copy-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 18px 16px;
    border-top: 1px solid #e5edf6;
}

.day-copy-modal-actions button {
    min-width: 96px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 750;
    cursor: pointer;
}

.day-copy-cancel {
    color: #475569;
    background: #fff;
    border: 1px solid #cbd5e1;
}

.day-copy-confirm {
    color: #fff;
    background: #2563eb;
    border: 1px solid #2563eb;
    box-shadow: 0 6px 14px rgba(37, 99, 235, .18);
}

.day-copy-confirm:disabled {
    color: #94a3b8;
    background: #f1f5f9;
    border-color: #e2e8f0;
    box-shadow: none;
    cursor: not-allowed;
}

/* 整天课程复制：直接选择星期的轻量交互 */
.day-copy-modal {
    width: min(500px, calc(100vw - 28px)) !important;
    max-width: min(500px, calc(100vw - 28px)) !important;
    border-radius: 18px !important;
    outline: none;
}

.day-copy-modal-header {
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f8fbff 0%, #ffffff 72%);
}

.day-copy-modal-icon {
    width: 32px;
    height: 32px;
    color: #2563eb;
    background: #eaf2ff;
    border-color: #bfdbfe;
    border-radius: 9px;
}

.day-copy-modal-heading {
    gap: 10px;
}

.day-copy-modal-heading h3 {
    font-size: 17px;
}

.day-copy-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 9px;
}

.day-copy-modal-body {
    padding: 12px 16px 14px;
}

.day-copy-source-summary {
    min-height: 46px;
    margin-bottom: 12px;
    padding: 7px 10px;
    background: linear-gradient(135deg, #f8fbff 0%, #f8fafc 100%);
    border-color: #dbeafe;
}

.day-copy-source-icon {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    background: #fff;
    border: 1px solid #dbeafe;
    border-radius: 10px;
}

.day-copy-source-text {
    min-width: 0;
    display: grid;
    grid-template-columns: auto auto;
    align-items: baseline;
    column-gap: 8px;
    row-gap: 2px;
}

.day-copy-source-text .day-copy-source-label {
    grid-column: 1 / -1;
    color: #64748b;
    font-size: 11px;
    line-height: 1;
}

.day-copy-source-text strong {
    color: #0f172a;
    font-size: 15px;
}

#dayCopySourceMeta {
    padding: 0;
    color: #64748b;
    border: 0;
    font-size: 12px;
}

.day-copy-source-count {
    margin-left: auto;
    padding: 5px 9px;
    color: #475569;
    background: #fff;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    white-space: nowrap;
}

.day-copy-source-count b {
    color: #2563eb;
    font-size: 15px;
}

.day-copy-field-label,
.day-copy-scope legend,
.day-copy-strategy legend {
    margin-bottom: 6px;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.day-copy-scope {
    gap: 6px;
    margin-bottom: 12px;
}

.day-copy-scope-option {
    min-height: 44px;
    justify-content: flex-start;
    padding: 6px 10px;
    text-align: left;
    background: #fff;
    border-color: #dbe4f0;
}

.day-copy-scope-option > span {
    display: grid;
    gap: 2px;
}

.day-copy-scope-option strong {
    color: #334155;
    font-size: 13px;
}

.day-copy-scope-option small {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 600;
}

.day-copy-scope-option:has(input:checked) {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #60a5fa;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, .08);
}

.day-copy-scope-option:has(input:checked) strong {
    color: #1d4ed8;
}

.day-copy-target-select {
    display: none !important;
}

.day-copy-target-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 12px;
}

.day-copy-target-btn {
    position: relative;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 10px;
    color: #475569;
    background: #fff;
    border: 1px solid #dbe4f0;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
    transition: color .16s ease, background .16s ease, border-color .16s ease, transform .16s ease;
}

.day-copy-target-btn:hover {
    color: #2563eb;
    background: #f8fbff;
    border-color: #93c5fd;
    transform: translateY(-1px);
}

.day-copy-target-btn.is-rest-day,
.day-copy-target-btn.is-rest-day:hover {
    color: #94a3b8;
    background:
        repeating-linear-gradient(
            -45deg,
            rgba(248, 113, 113, .045) 0,
            rgba(248, 113, 113, .045) 6px,
            rgba(255, 255, 255, .82) 6px,
            rgba(255, 255, 255, .82) 12px
        ),
        #f8fafc;
    border-color: #e2e8f0;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.day-copy-rest-badge {
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: #f05252;
    border-radius: 6px;
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
    line-height: 1;
}

.day-copy-target-btn i {
    display: none;
    font-size: 10px;
}

.day-copy-target-btn.is-selected {
    color: #fff;
    background: #2563eb;
    border-color: #2563eb;
    box-shadow: 0 5px 12px rgba(37, 99, 235, .18);
}

.day-copy-target-btn.is-selected i {
    display: inline-block;
}

.day-copy-strategy {
    gap: 6px;
    margin-top: 0;
}

.day-copy-strategy-option {
    position: relative;
    min-height: 46px;
    align-items: center;
    padding: 6px 9px;
    background: #fff;
}

.day-copy-strategy-option > input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.day-copy-strategy-option > i {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 8px;
    font-size: 12px;
}

.day-copy-strategy-option span {
    display: grid;
    align-items: initial;
    gap: 1px;
}

.day-copy-strategy-option small {
    white-space: normal;
}

.day-copy-strategy-option:has(input:checked) {
    background: #f8fbff;
    border-color: #93c5fd;
}

.day-copy-strategy-option:has(input:checked) > i {
    color: #2563eb;
    background: #dbeafe;
}

.day-copy-modal-actions {
    align-items: center;
    padding: 10px 16px 12px;
    background: #fbfdff;
}

.day-copy-modal-actions button {
    height: 36px;
}

.day-copy-notice {
    color: #94a3b8;
}

.day-copy-confirm:not(:disabled):hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    transform: translateY(-1px);
}

@media (max-width: 520px) {
    .day-copy-target-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .day-copy-notice {
        display: none;
    }
}

.grid-day-header.has-holiday {
    overflow: visible;
}

.grid-day-week,
.grid-day-month,
.grid-day-date {
    position: relative;
    z-index: 1;
}

.grid-day-week {
    color: #334155;
    font-size: 15px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.grid-day-date {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 0;
    min-height: 0;
    padding: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.1;
    font-weight: 600;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.grid-day-month {
    color: #94a3b8;
    font-size: 11px;
    line-height: 1;
    font-weight: 650;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.grid-day-header.has-holiday .grid-day-month {
    color: #f87171;
}

.grid-day-header.has-holiday .grid-day-date {
    color: #f87171;
}

.grid-day-holiday {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    user-select: none;
    color: rgba(220, 38, 38, 0.16);
    font-size: clamp(26px, 3.2vw, 38px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.grid-day-holiday-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 2;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 850;
    line-height: 1;
    letter-spacing: 0;
    pointer-events: none;
    user-select: none;
}

.grid-day-holiday-badge.is-rest {
    color: #fff;
    background: #ef4444;
    box-shadow: 0 1px 3px rgba(239, 68, 68, 0.28);
}

.grid-day-holiday-badge.is-work {
    color: #fff;
    background: #2563eb;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.28);
}

.grid-day-header.is-today {
    background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%) !important;
}

.grid-day-header.is-today .grid-day-week {
    color: var(--app-primary);
}

.grid-day-header.is-today .grid-day-month {
    color: #60a5fa;
}

.grid-day-header.is-today .grid-day-date {
    color: var(--app-primary);
    background: transparent;
    border-color: transparent;
    font-weight: 800;
    box-shadow: none;
}

.grid-day-header.is-today .grid-day-holiday {
    color: rgba(37, 99, 235, 0.18);
}

.grid-holiday-watermark {
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-width: 0 !important;
    max-width: 100%;
    pointer-events: none;
}

.grid-holiday-watermark-text {
    width: 0;
    min-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    color: rgba(220, 38, 38, 0.18);
    font-size: clamp(36px, 5vw, 84px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.12em;
    text-align: center;
    user-select: none;
    white-space: nowrap;
    transform: rotate(-18deg);
}

.grid-corner-action {
    padding: 0 !important;
    color: var(--app-text);
    border: 1px solid var(--app-border) !important;
    border-radius: 0 !important;
    box-shadow: none;
    transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.grid-corner-action i {
    color: var(--app-primary);
    font-size: 18px;
    line-height: 1;
}

.grid-corner-action:hover {
    color: var(--app-primary-hover);
    background: var(--app-primary-soft);
    border-color: var(--app-border) !important;
}

.grid-header-en {
    color: var(--app-muted);
    font-size: 12px;
    line-height: 1;
    font-weight: 650;
}

.grid-header-cn {
    color: var(--app-text);
    font-size: 14px;
    line-height: 1.1;
    font-weight: 760;
}

.grid-section-watermark {
    position: relative;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    overflow: hidden;
    min-width: 0;
}

.grid-section-watermark-letter {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(74px, 14vw, 155px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.06em;
    user-select: none;
    white-space: nowrap;
}

.grid-section-watermark-morning .grid-section-watermark-letter {
    color: rgba(62, 115, 196, 0.16);
}

.grid-section-watermark-afternoon .grid-section-watermark-letter {
    color: rgba(217, 121, 59, 0.16);
}

.grid-section-watermark-evening .grid-section-watermark-letter {
    color: rgba(107, 91, 181, 0.16);
}

.period-section-tag {
    margin-bottom: 4px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #eef5ff;
    color: #3e73c4;
    font-size: 11px;
    font-weight: 850;
    line-height: 1.1;
}

.grid-time.cell-section-morning,
.grid-cell.cell-section-morning {
    background: rgba(246, 249, 255, 0.28) !important;
}

.grid-time.cell-section-afternoon,
.grid-cell.cell-section-afternoon {
    background: rgba(255, 249, 244, 0.28) !important;
}

.grid-time.cell-section-evening,
.grid-cell.cell-section-evening {
    background: rgba(248, 246, 255, 0.28) !important;
}

.grid-cell.cell-section-morning.has-course,
.grid-cell.cell-section-afternoon.has-course,
.grid-cell.cell-section-evening.has-course {
    background: #fff !important;
}

.grid-cell.cell-section-morning:hover,
.grid-cell.cell-section-afternoon:hover,
.grid-cell.cell-section-evening:hover {
    background: rgba(246, 249, 255, 0.32) !important;
}

.grid-time,
.grid-cell {
    position: relative;
    z-index: 1;
    border-color: var(--app-border) !important;
}

.schedule-grid .grid-cell:hover {
    z-index: 1 !important;
    border-color: var(--app-border) !important;
}

.schedule-grid .grid-cell.cell-section-morning:hover {
    background: rgba(246, 249, 255, 0.32) !important;
}

.schedule-grid .grid-cell.cell-section-afternoon:hover {
    background: rgba(255, 249, 244, 0.32) !important;
}

.schedule-grid .grid-cell.cell-section-evening:hover {
    background: rgba(248, 246, 255, 0.32) !important;
}

.grid-time {
    min-height: 92px !important;
    padding: 8px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--app-muted) !important;
}

.grid-time-num {
    color: var(--app-text) !important;
    font-size: 17px !important;
    font-weight: 760 !important;
}

.grid-time-label {
    margin-top: 5px;
    color: var(--app-muted) !important;
    font-size: 12px !important;
}

.grid-cell {
    min-height: 92px !important;
    min-width: 0;
    padding: 8px !important;
    background: rgba(255, 255, 255, 0.55) !important;
    overflow: hidden;
}

.grid-cell:hover {
    background: rgba(248, 251, 255, 0.32) !important;
}

.grid-cell.unavailable {
    cursor: default;
    background: #f8fafc !important;
    background-image: repeating-linear-gradient(
        -45deg,
        rgba(148, 163, 184, 0.12) 0,
        rgba(148, 163, 184, 0.12) 6px,
        transparent 6px,
        transparent 12px
    ) !important;
}

.grid-cell.unavailable:hover {
    background-color: #f8fafc !important;
}

.grid-cell.holiday-locked,
.grid-cell.holiday-locked.cell-section-morning,
.grid-cell.holiday-locked.cell-section-afternoon,
.grid-cell.holiday-locked.cell-section-evening {
    cursor: not-allowed;
    pointer-events: none;
    background-color: transparent !important;
    background-image: repeating-linear-gradient(
        -45deg,
        rgba(248, 113, 113, 0.08) 0,
        rgba(248, 113, 113, 0.08) 5px,
        transparent 5px,
        transparent 11px
    ) !important;
}

.grid-cell.holiday-locked:hover,
.schedule-grid .grid-cell.holiday-locked.cell-section-morning:hover,
.schedule-grid .grid-cell.holiday-locked.cell-section-afternoon:hover,
.schedule-grid .grid-cell.holiday-locked.cell-section-evening:hover {
    background-color: transparent !important;
}

.grid-cell.has-course {
    background: #fff !important;
    border: 1px solid var(--app-border) !important;
    margin: 0 !important;
    box-shadow: none !important;
}

.grid-cell.has-course.is-long-course {
    display: flex;
    flex-direction: column;
}

.grid-cell.dragging {
    opacity: .62 !important;
}

.course-drag-preview {
    min-width: 170px;
    max-width: 260px;
    min-height: 40px;
    padding: 0 11px;
    display: flex;
    align-items: center;
    gap: 8px;
    position: fixed;
    top: -200px;
    left: -300px;
    color: var(--app-text);
    background: #fff;
    border: 1px solid var(--app-primary);
    border-left: 4px solid var(--app-primary);
    border-radius: var(--app-radius);
    box-shadow: 0 8px 20px rgba(15, 23, 42, .18);
    font-size: 12px;
    pointer-events: none;
}

.course-drag-preview i {
    color: var(--app-primary);
}

.course-drag-preview span {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.course-drag-preview em {
    color: var(--app-muted);
    font-size: 11px;
    font-style: normal;
}

.grid-cell .text-slate-300 {
    color: var(--app-primary) !important;
}

.course-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 100%;
}

.grid-cell.is-long-course .course-list {
    flex: 1 1 auto;
    min-height: 0;
}

.grid-cell.is-long-course .course-card {
    flex: 1 1 auto;
    min-height: 0;
    align-items: flex-start;
}

.course-list-multi {
    justify-content: center;
    gap: 5px;
}

.course-card {
    min-width: 0;
    min-height: 74px;
    padding: 9px 10px !important;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    color: var(--app-text) !important;
    background: var(--course-bg, var(--app-primary-soft)) !important;
    border: 0 !important;
    border-left: 4px solid var(--course-accent, var(--app-primary)) !important;
    border-radius: var(--app-radius-sm) !important;
    box-shadow: none !important;
    font-size: 14px !important;
    font-weight: 760 !important;
    cursor: pointer;
    animation: none !important;
    transform: none !important;
}

.course-list-multi .course-card {
    min-height: 36px;
    padding: 7px 28px 7px 9px !important;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.course-title {
    min-width: 0;
    color: var(--app-text) !important;
    font-size: 14px;
    line-height: 1.25;
    font-weight: 760;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
}

.course-list-multi .course-title {
    min-width: 0;
    flex: 1 1 auto;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.course-room,
.course-teacher,
.course-time {
    color: var(--app-muted) !important;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.course-list-multi .course-room,
.course-list-multi .course-teacher,
.course-list-multi .course-time {
    display: none;
}

.course-week-tag {
    align-self: flex-start;
    max-width: 100%;
    padding: 2px 7px;
    color: var(--course-accent, var(--app-primary));
    background: rgba(255, 255, 255, 0.62);
    border-radius: 999px;
    font-size: 11px;
    line-height: 1.35;
    font-weight: 750;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.course-list-multi .course-week-tag {
    flex: 0 0 auto;
    align-self: center;
    max-width: 74px;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.72);
}

.delete-btn {
    top: 6px !important;
    right: 6px !important;
    width: 22px !important;
    height: 22px !important;
    border: 0 !important;
    border-radius: 999px !important;
    color: #fff !important;
    background: var(--app-danger) !important;
    opacity: 0;
    transition: opacity .16s ease, transform .16s ease;
}

.course-card:hover .delete-btn {
    opacity: 1;
}

.course-list-multi .delete-btn {
    top: 50% !important;
    right: 5px !important;
    width: 18px !important;
    height: 18px !important;
    transform: translateY(-50%);
    font-size: 13px !important;
}

.course-tooltip {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1300;
    width: 248px;
    max-width: calc(100vw - 24px);
    padding: 0;
    color: var(--app-text);
    background: transparent;
    border: 0;
    border-radius: 14px;
    box-shadow: none;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translate3d(var(--tooltip-x, 0), var(--tooltip-y, 0), 0) scale(0.96);
    transform-origin: 50% 100%;
    transition: opacity .14s ease, visibility .14s ease, transform .18s cubic-bezier(.2, .8, .2, 1);
    will-change: transform, opacity;
    contain: layout paint;
}

.course-tooltip::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -6px;
    width: 12px;
    height: 12px;
    margin-left: -6px;
    background: #fff;
    border-right: 1px solid var(--app-border);
    border-bottom: 1px solid var(--app-border);
    transform: rotate(45deg);
    box-shadow: 4px 4px 10px rgba(15, 23, 42, 0.06);
}

.course-tooltip.is-below::after {
    top: -6px;
    bottom: auto;
    border-right: 0;
    border-bottom: 0;
    border-left: 1px solid var(--app-border);
    border-top: 1px solid var(--app-border);
    box-shadow: -2px -2px 8px rgba(15, 23, 42, 0.04);
}

.course-tooltip.hidden {
    display: block !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.course-tooltip:not(.hidden) {
    opacity: 1;
    visibility: visible;
    transform: translate3d(var(--tooltip-x, 0), var(--tooltip-y, 0), 0) scale(1);
}

.course-tooltip-card {
    overflow: hidden;
    border: 1px solid var(--app-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
}

.course-tooltip-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--course-accent) 10%, #fff) 0%, #fff 100%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.course-tooltip-dot {
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--course-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--course-accent) 18%, transparent);
}

.course-tooltip-title {
    margin: 0;
    color: var(--app-text);
    font-size: 14px;
    line-height: 1.25;
    font-weight: 820;
    overflow-wrap: anywhere;
}

.course-tooltip-body {
    display: grid;
    gap: 1px;
    padding: 6px 8px 8px;
}

.course-tooltip-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 0;
    padding: 3px 4px;
    border-radius: 8px;
}

.course-tooltip-icon {
    width: 22px;
    height: 22px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: color-mix(in srgb, var(--course-accent) 12%, #fff);
    color: var(--course-accent);
    font-size: 11px;
}

.course-tooltip-line {
    flex: 1;
    min-width: 0;
    color: #334155;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.course-tooltip-label {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    margin-right: 4px;
}

.course-tooltip-label::after {
    content: '·';
    margin-left: 4px;
    color: #cbd5e1;
    font-weight: 400;
}

.cell-add-btn {
    position: absolute;
    bottom: 6px;
    right: 6px;
    z-index: 3;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--app-primary);
    background: #fff;
    border: 1px solid var(--app-border-strong);
    border-radius: 999px;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
    font-size: 15px;
    line-height: 1;
    font-weight: 800;
    opacity: 0;
    transition: opacity .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}

.grid-cell.has-course:hover .cell-add-btn {
    opacity: 1;
}

.cell-add-btn:hover {
    color: #fff;
    background: var(--app-primary);
    border-color: var(--app-primary);
    transform: scale(1.04);
}

.ics-settings {
    overflow: hidden;
}

.ics-settings summary {
    min-height: 60px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    list-style: none;
}

.ics-settings summary::-webkit-details-marker {
    display: none;
}

.ics-settings summary span {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--app-text);
    font-size: 18px;
    font-weight: 760;
}

.ics-settings summary em {
    color: var(--app-muted);
    font-size: 12px;
    font-style: normal;
}

.ics-settings-body {
    padding: 0 18px 18px;
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    gap: 14px;
    border-top: 1px solid var(--app-border);
}

.ics-settings-body label {
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.ics-settings-body label span,
label {
    color: var(--app-muted) !important;
    font-size: 12px !important;
    font-weight: 650 !important;
}

.input-cute,
select,
input[type="date"],
input[type="time"],
input[type="text"],
input[type="email"],
input[type="number"],
textarea {
    width: 100%;
    min-height: 40px;
    color: var(--app-text) !important;
    background: #fff !important;
    border: 1px solid var(--app-border-strong) !important;
    border-radius: var(--app-radius) !important;
    box-shadow: none !important;
    outline: none !important;
}

.input-cute,
input,
select,
textarea {
    padding: 8px 10px;
}

textarea {
    min-height: 92px;
    resize: vertical;
}

select:focus,
input:focus,
textarea:focus,
.input-cute:focus {
    border-color: var(--app-primary) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .14) !important;
}

.ics-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
}

.export-btn,
.export-btn::before,
.export-btn::after {
    animation: none !important;
    background-image: none !important;
    box-shadow: none !important;
}

#panel-discover {
    display: block;
}

#panel-discover.hidden {
    display: none !important;
}

#panel-discover > .mb-4 {
    margin: 0 0 12px !important;
    color: var(--app-muted) !important;
}

#panel-discover .card-cute {
    padding: 16px !important;
}

.discover-results-header {
    margin: 14px 2px 10px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.discover-results-header h3 {
    margin: 0;
    color: var(--app-text);
    font-size: 16px;
    font-weight: 820;
}

.discover-results-header span {
    color: var(--app-muted);
    font-size: 12px;
}

.discover-pagination {
    margin-top: 14px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--app-muted);
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    font-size: 12px;
}

.discover-pagination.hidden {
    display: none !important;
}

.discover-page-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.discover-page-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--app-text);
    background: #fff;
    border: 1px solid var(--app-border-strong);
    border-radius: var(--app-radius-sm);
    font-size: 13px;
    font-weight: 720;
}

.discover-page-btn:hover:not(:disabled),
.discover-page-btn.active {
    color: #fff;
    background: var(--app-primary);
    border-color: var(--app-primary);
}

.discover-page-btn:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.discover-page-nav {
    min-width: 66px;
}

.discover-page-total,
.discover-page-summary {
    white-space: nowrap;
}

#panel-help.hidden {
    display: none !important;
}

.help-manual-shell {
    padding: 0 !important;
    overflow: visible;
    border-radius: var(--app-radius) !important;
}

.help-manual-header {
    min-height: 92px;
    padding: 20px 24px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--app-border);
}

.help-manual-header span {
    color: var(--app-primary);
    font-size: 12px;
    font-weight: 700;
}

.help-manual-header h2 {
    margin: 3px 0 4px;
    color: var(--app-text);
    font-size: 22px;
    line-height: 1.3;
}

.help-manual-header p,
.help-manual-header small {
    margin: 0;
    color: var(--app-muted);
    font-size: 12px;
}

.help-manual-layout {
    display: grid;
    grid-template-columns: 224px minmax(0, 1fr);
    align-items: stretch;
}

.help-manual-sidebar {
    min-width: 0;
    padding: 18px 12px 28px;
    background: #f8fafc;
    border-right: 1px solid var(--app-border);
}

.help-manual-sidebar-title {
    padding: 0 10px 11px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-size: 12px;
    font-weight: 750;
}

.help-manual-sidebar-title i { color: var(--app-primary); }

#helpManualToc {
    position: sticky;
    top: 18px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#helpManualToc a {
    min-height: 34px;
    padding: 8px 10px;
    display: block;
    overflow: hidden;
    color: #475569;
    border-left: 2px solid transparent;
    border-radius: 0 6px 6px 0;
    font-size: 12px;
    line-height: 1.45;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#helpManualToc a:hover {
    color: var(--app-primary);
    background: #eff6ff;
}

#helpManualToc a.active {
    color: var(--app-primary);
    background: #dbeafe;
    border-left-color: var(--app-primary);
    font-weight: 700;
}

#helpManualToc .help-toc-level-1 { font-weight: 700; }
#helpManualToc .help-toc-level-3 { padding-left: 22px; color: #64748b; }
.help-manual-loading-line { padding: 8px 10px; color: var(--app-muted); font-size: 12px; }

.help-manual-main {
    min-width: 0;
    padding: 24px 34px 46px;
}

.help-manual-video {
    margin-bottom: 28px;
    padding: 18px 20px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 288px;
    align-items: center;
    gap: 24px;
    background: #f8fafc;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    scroll-margin-top: 20px;
}

.help-manual-video > div:first-child > span {
    color: var(--app-primary);
    font-size: 12px;
    font-weight: 700;
}

.help-manual-video h3 {
    margin: 7px 0 6px;
    color: var(--app-text);
    font-size: 17px;
}

.help-manual-video p {
    max-width: 470px;
    margin: 0 0 11px;
    color: var(--app-muted);
    font-size: 12px;
    line-height: 1.7;
}

.help-manual-video a {
    color: var(--app-primary);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.help-manual-video-player {
    width: 288px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0f172a;
    border-radius: 6px;
}

.help-manual-video-player iframe { width: 100%; height: 100%; display: block; border: 0; }

.help-manual-content {
    width: min(100%, 820px);
    color: #334155;
    font-size: 14px;
    line-height: 1.85;
}

.help-manual-content h1,
.help-manual-content h2,
.help-manual-content h3,
.help-manual-content h4,
.help-manual-content h5,
.help-manual-content h6 {
    position: relative;
    color: var(--app-text);
    line-height: 1.4;
    scroll-margin-top: 20px;
}

.help-manual-content h1 { margin: 0 0 14px; font-size: 26px; }
.help-manual-content h2 { margin: 36px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--app-border); font-size: 20px; }
.help-manual-content h3 { margin: 24px 0 8px; font-size: 16px; }
.help-manual-content h4 { margin: 20px 0 7px; font-size: 15px; }
.help-manual-content p { margin: 0 0 13px; }
.help-manual-content ul,
.help-manual-content ol { margin: 0 0 16px; padding-left: 24px; }
.help-manual-content li { margin: 4px 0; padding-left: 2px; }
.help-manual-content strong { color: #1e293b; }
.help-manual-content a { color: var(--app-primary); text-decoration: underline; text-underline-offset: 3px; }
.help-manual-content code { padding: 2px 5px; color: #be123c; background: #fff1f2; border-radius: 4px; font-family: Consolas, monospace; font-size: .9em; }
.help-manual-content pre { margin: 16px 0; padding: 15px; overflow: auto; color: #e2e8f0; background: #0f172a; border-radius: 6px; line-height: 1.6; }
.help-manual-content pre code { padding: 0; color: inherit; background: transparent; }
.help-manual-content blockquote { margin: 16px 0; padding: 10px 14px; color: #475569; background: #f8fafc; border-left: 3px solid var(--app-primary); }
.help-manual-content hr { margin: 28px 0; border: 0; border-top: 1px solid var(--app-border); }
.help-manual-content img { max-width: 100%; height: auto; margin: 14px 0; display: block; border: 1px solid var(--app-border); border-radius: 6px; }
.help-heading-anchor { margin-left: 8px; opacity: 0; font-size: .75em; text-decoration: none !important; }
.help-manual-content h1:hover .help-heading-anchor,
.help-manual-content h2:hover .help-heading-anchor,
.help-manual-content h3:hover .help-heading-anchor { opacity: 1; }

.help-table-wrap { max-width: 100%; margin: 16px 0; overflow-x: auto; border: 1px solid var(--app-border); border-radius: 6px; }
.help-table-wrap table { width: 100%; border-collapse: collapse; }
.help-table-wrap th,
.help-table-wrap td { padding: 9px 11px; text-align: left; border-bottom: 1px solid var(--app-border); font-size: 12px; }
.help-table-wrap th { color: #475569; background: #f8fafc; }

.help-manual-loading,
.help-manual-error {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    color: var(--app-muted);
}

.help-manual-loading span {
    width: 28px;
    height: 28px;
    border: 3px solid #dbeafe;
    border-top-color: var(--app-primary);
    border-radius: 50%;
    animation: ai-recognition-spin .8s linear infinite;
}

.help-manual-error i { color: var(--app-danger); font-size: 24px; }
.help-manual-error button { min-height: 34px; padding: 0 12px; color: #fff; background: var(--app-primary); border: 0; border-radius: 6px; cursor: pointer; }

@media (max-width: 820px) {
    .help-manual-header { padding: 17px 18px; align-items: flex-start; flex-direction: column; gap: 8px; }
    .help-manual-layout { grid-template-columns: 1fr; }
    .help-manual-sidebar { padding: 10px 12px; position: sticky; top: 0; z-index: 20; border-right: 0; border-bottom: 1px solid var(--app-border); }
    .help-manual-sidebar-title { display: none; }
    #helpManualToc { position: static; overflow-x: auto; flex-direction: row; gap: 4px; scrollbar-width: thin; }
    #helpManualToc a { min-width: max-content; border-left: 0; border-bottom: 2px solid transparent; border-radius: 6px; }
    #helpManualToc a.active { border-left-color: transparent; border-bottom-color: var(--app-primary); }
    #helpManualToc .help-toc-level-3 { padding-left: 10px; }
    .help-manual-main { padding: 18px 16px 34px; }
    .help-manual-video { padding: 16px; grid-template-columns: 1fr; gap: 14px; }
    .help-manual-video-player { width: min(100%, 320px); }
    .help-manual-content h1 { font-size: 23px; }
    .help-manual-content h2 { font-size: 19px; }
}

#panel-messages.hidden {
    display: none !important;
}

.message-board-page {
    overflow: hidden;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    box-shadow: var(--app-shadow);
}

.message-board-header {
    min-height: 78px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--app-border);
}

.message-board-header h2,
.message-board-header p {
    margin: 0;
}

.message-board-header h2 {
    color: var(--app-text);
    font-size: 20px;
    font-weight: 800;
}

.message-board-header p {
    margin-top: 4px;
    color: var(--app-muted);
    font-size: 13px;
}

.message-board-header > span {
    padding: 7px 10px;
    color: var(--app-muted);
    background: var(--app-surface-soft);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    font-size: 12px;
    white-space: nowrap;
}

.message-board-header > span strong {
    color: var(--app-primary);
    font-size: 14px;
}

.message-board-layout {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    min-height: 530px;
}

.message-composer {
    padding: 20px;
    background: var(--app-surface-soft);
    border-right: 1px solid var(--app-border);
}

.message-composer-title {
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 11px;
}

.message-composer-title > i {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: #fff;
    background: var(--app-primary);
    border-radius: var(--app-radius);
}

.message-composer-title h3,
.message-composer-title p {
    margin: 0;
}

.message-composer-title h3 {
    color: var(--app-text);
    font-size: 16px;
    font-weight: 800;
}

.message-composer-title p {
    margin-top: 2px;
    color: var(--app-muted);
    font-size: 11px;
}

.message-composer label {
    margin-top: 13px;
    display: block;
}

.message-composer label > span {
    display: block;
    margin-bottom: 6px;
    color: var(--app-muted);
    font-size: 12px;
    font-weight: 700;
}

.message-composer input,
.message-composer textarea {
    width: 100%;
    padding: 10px 11px;
    color: var(--app-text);
    background: #fff;
    border: 1px solid var(--app-border-strong);
    border-radius: var(--app-radius);
    font: inherit;
    font-size: 13px;
    outline: none;
}

.message-composer input {
    min-height: 40px;
}

.message-composer textarea {
    min-height: 150px;
    resize: vertical;
    line-height: 1.65;
}

.message-composer input:focus,
.message-composer textarea:focus {
    border-color: var(--app-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}

.message-board-honeypot {
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
}

.message-composer-meta {
    margin: 8px 0 14px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    color: var(--app-muted);
    font-size: 10px;
    line-height: 1.45;
}

.message-province-indicator {
    min-height: 34px;
    margin-top: 10px;
    padding: 0 9px;
    display: flex;
    align-items: center;
    gap: 7px;
    color: #0f766e;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: var(--app-radius);
    font-size: 11px;
}

.message-composer-meta > span {
    display: flex;
    gap: 5px;
}

.message-composer-meta i {
    margin-top: 2px;
    color: #059669;
}

.message-composer-meta b {
    font-weight: 700;
    white-space: nowrap;
}

.message-submit-button {
    width: 100%;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
    background: var(--app-primary);
    border: 1px solid var(--app-primary);
    border-radius: var(--app-radius);
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
}

.message-submit-button:hover {
    background: var(--app-primary-hover);
    border-color: var(--app-primary-hover);
}

.message-submit-button:disabled {
    cursor: wait;
    opacity: .65;
}

.message-feed {
    min-width: 0;
    padding: 20px;
}

.message-feed-toolbar {
    min-height: 42px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--app-border);
}

.message-feed-toolbar h3,
.message-feed-toolbar span {
    margin: 0;
}

.message-feed-toolbar h3 {
    color: var(--app-text);
    font-size: 16px;
    font-weight: 800;
}

.message-feed-toolbar span {
    display: block;
    margin-top: 2px;
    color: var(--app-muted);
    font-size: 11px;
}

.message-feed-toolbar button {
    width: 34px;
    height: 34px;
    padding: 0;
    display: grid;
    place-items: center;
    color: var(--app-muted);
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    cursor: pointer;
}

.message-feed-toolbar button:hover {
    color: var(--app-primary);
    background: var(--app-primary-soft);
    border-color: var(--app-primary);
}

.message-board-list {
    display: grid;
}

.message-item {
    padding: 17px 4px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    border-bottom: 1px solid var(--app-border);
}

.message-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: var(--message-avatar-text, #1d4ed8);
    background: var(--message-avatar-bg, #dbeafe);
    border-radius: 50%;
    font-size: 15px;
    font-weight: 800;
}

.message-item-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.message-item-head strong {
    min-width: 0;
    color: var(--app-text);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.message-item-head time {
    color: var(--app-muted);
    font-size: 11px;
    white-space: nowrap;
}

.message-item-content {
    margin: 7px 0 0;
    color: #334155;
    font-size: 13px;
    line-height: 1.7;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.message-item-actions {
    margin-top: 9px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.message-item-actions > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--app-muted);
    font-size: 11px;
}

.message-item-actions > span i {
    color: #0f766e;
}

.message-item-actions button {
    min-height: 30px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--app-primary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.message-item-actions button:hover {
    background: var(--app-primary-soft);
    border-color: #bfdbfe;
}

.message-replies {
    margin-top: 10px;
    padding-left: 12px;
    border-left: 2px solid #dbeafe;
}

.message-reply {
    padding: 10px 0;
    border-bottom: 1px dashed var(--app-border);
}

.message-reply:last-child {
    border-bottom: 0;
}

.message-reply.is-admin {
    margin: 3px 0;
    padding: 6px 8px;
    background: #eff6ff;
    border-left: 3px solid #60a5fa;
    border-radius: 4px;
}

.message-reply-head {
    display: flex;
    align-items: center;
    gap: 7px;
}

.message-reply-head strong {
    color: var(--app-text);
    font-size: 12px;
}

.message-reply.is-admin .message-reply-head strong {
    color: #1d4ed8;
    white-space: nowrap;
}

.message-reply.is-admin .message-reply-head > p {
    min-width: 0;
    margin: 0;
    flex: 1;
    color: #334155;
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.message-reply-head > span,
.message-reply-head time {
    color: var(--app-muted);
    font-size: 10px;
}

.message-reply-head time {
    margin-left: auto;
}

.message-reply > p {
    margin: 5px 0 0;
    color: #475569;
    font-size: 12px;
    line-height: 1.6;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.message-reply-form {
    margin-top: 10px;
    padding: 10px;
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px;
    background: var(--app-surface-soft);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
}

.message-reply-form.hidden {
    display: none;
}

.message-reply-form input,
.message-reply-form textarea {
    width: 100%;
    padding: 8px 9px;
    color: var(--app-text);
    background: #fff;
    border: 1px solid var(--app-border-strong);
    border-radius: 6px;
    font: inherit;
    font-size: 12px;
    outline: none;
}

.message-reply-form > div {
    position: relative;
}

.message-reply-form textarea {
    min-height: 58px;
    padding-right: 42px;
    display: block;
    resize: vertical;
}

.message-reply-form > div > span {
    position: absolute;
    right: 7px;
    bottom: 6px;
    color: var(--app-muted);
    font-size: 9px;
}

.message-reply-form button {
    min-height: 36px;
    padding: 0 10px;
    color: #fff;
    background: var(--app-primary);
    border: 1px solid var(--app-primary);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.message-board-state {
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    color: var(--app-muted);
    text-align: center;
}

.message-board-state > i {
    color: #94a3b8;
    font-size: 28px;
}

.message-board-state p {
    margin: 0;
    font-size: 13px;
}

.message-board-state button {
    min-height: 34px;
    padding: 0 12px;
    color: var(--app-primary);
    background: #fff;
    border: 1px solid var(--app-primary);
    border-radius: var(--app-radius);
    cursor: pointer;
}

.message-board-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #dbeafe;
    border-top-color: var(--app-primary);
    border-radius: 50%;
    animation: ai-recognition-spin .8s linear infinite;
}

.message-board-pagination {
    min-height: 42px;
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.message-board-pagination.hidden {
    display: none;
}

.message-board-pagination button {
    width: 34px;
    height: 34px;
    padding: 0;
    color: #475569;
    background: #fff;
    border: 1px solid var(--app-border-strong);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.message-board-pagination button:hover:not(:disabled),
.message-board-pagination button.active {
    color: #fff;
    background: var(--app-primary);
    border-color: var(--app-primary);
}

.message-board-pagination button:disabled {
    color: #94a3b8;
    background: var(--app-surface-soft);
}

.message-board-pagination > span {
    padding: 0 6px;
    color: var(--app-muted);
    font-size: 11px;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .app-slogan {
        display: none;
    }

    .message-board-layout {
        grid-template-columns: 1fr;
    }

    .message-composer {
        border-right: 0;
        border-bottom: 1px solid var(--app-border);
    }

    .message-reply-form {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
}

.help-page {
    padding: 18px !important;
    border-radius: var(--app-radius) !important;
}

.help-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--app-border);
}

.help-page-header h2 {
    margin: 0 0 6px;
    color: var(--app-text);
    font-size: 20px;
    line-height: 1.25;
    font-weight: 850;
}

.help-page-header p {
    margin: 0;
    color: var(--app-muted);
    font-size: 13px;
}

.help-video-section {
    margin-bottom: 18px;
    padding: 20px;
    display: grid;
    grid-template-columns: minmax(220px, 280px) 320px;
    justify-content: center;
    align-items: center;
    gap: 28px;
    background: var(--app-surface-soft);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
}

.help-video-copy {
    text-align: left;
}

.help-video-copy h3 {
    margin: 8px 0 7px;
    color: var(--app-text);
    font-size: 17px;
    line-height: 1.35;
    font-weight: 840;
}

.help-video-copy p {
    margin: 0 0 12px;
    max-width: 280px;
    color: var(--app-muted);
    font-size: 13px;
    line-height: 1.65;
}

.help-video-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--app-primary);
    font-size: 12px;
    font-weight: 800;
}

.help-video-copy a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--app-primary);
    font-size: 13px;
    font-weight: 760;
    text-decoration: none;
}

.help-video-copy a:hover {
    color: var(--app-primary-hover);
}

.help-video-player {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0f172a;
    border-radius: var(--app-radius);
}

.help-video-player iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
}

.schedule-examples-modal {
    width: min(940px, calc(100vw - 32px)) !important;
    max-width: min(940px, calc(100vw - 32px)) !important;
    max-height: calc(100vh - 40px) !important;
    overflow: hidden !important;
}

.schedule-examples-header-note {
    margin-top: 3px;
    color: var(--app-muted);
    font-size: 12px;
}

.schedule-examples-body {
    padding: 18px;
    overflow-y: auto;
    max-height: calc(100vh - 118px);
}

.schedule-example-preview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 16px;
    align-items: center;
    padding-bottom: 16px;
}

.schedule-example-preview-media {
    height: min(48vh, 430px);
    position: relative;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    cursor: zoom-in;
}

.schedule-example-preview-media:focus-visible {
    outline: 2px solid var(--app-primary);
    outline-offset: 2px;
}

.schedule-example-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.schedule-example-zoom {
    width: 38px;
    height: 38px;
    padding: 0;
    display: grid;
    place-items: center;
    position: absolute;
    top: 12px;
    right: 12px;
    color: var(--app-primary);
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .14);
    cursor: pointer;
}

.schedule-example-zoom:hover {
    color: #fff;
    background: var(--app-primary);
    border-color: var(--app-primary);
}

.schedule-example-preview strong,
.schedule-example-preview span {
    display: block;
}

.schedule-example-preview strong {
    margin-bottom: 8px;
    color: var(--app-text);
    font-size: 16px;
}

.schedule-example-preview span {
    color: var(--app-muted);
    font-size: 13px;
    line-height: 1.65;
}

.schedule-example-thumbnails {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.schedule-example-item {
    min-width: 0;
    padding: 6px;
    color: var(--app-text);
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.schedule-example-item:hover,
.schedule-example-item.active {
    border-color: var(--app-primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, .12);
}

.schedule-example-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    display: block;
    object-fit: cover;
    background: #f8fafc;
    border-radius: 4px;
}

.schedule-example-item span {
    display: block;
    margin-top: 6px;
    overflow: hidden;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedule-examples-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--app-border);
}

.schedule-examples-button {
    min-height: 40px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--app-border-strong);
    border-radius: var(--app-radius);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.schedule-examples-button-secondary {
    color: var(--app-text);
    background: #fff;
}

.schedule-examples-button-secondary:hover {
    color: var(--app-primary);
    background: var(--app-primary-soft);
    border-color: var(--app-primary);
}

.schedule-examples-button-primary {
    color: #fff;
    background: var(--app-primary);
    border-color: var(--app-primary);
}

.schedule-examples-button-primary:hover {
    color: #fff;
    background: var(--app-primary-hover);
    border-color: var(--app-primary-hover);
}

.schedule-example-lightbox {
    padding: 26px;
    display: grid;
    place-items: center;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(15, 23, 42, .92);
}

.schedule-example-lightbox.hidden {
    display: none;
}

.schedule-example-lightbox img {
    max-width: calc(100vw - 52px);
    max-height: calc(100vh - 52px);
    display: block;
    object-fit: contain;
}

.schedule-example-lightbox-close {
    width: 42px;
    height: 42px;
    padding: 0;
    display: grid;
    place-items: center;
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 1;
    color: #fff;
    background: rgba(15, 23, 42, .72);
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 50%;
    cursor: pointer;
}

.schedule-example-lightbox-close:hover {
    color: var(--app-text);
    background: #fff;
}

.ai-recognition-modal {
    width: min(1120px, calc(100vw - 32px)) !important;
    max-width: min(1120px, calc(100vw - 32px)) !important;
    max-height: calc(100vh - 40px) !important;
    overflow: hidden !important;
}

.ai-recognition-header-note {
    margin-top: 3px;
    color: var(--app-muted);
    font-size: 12px;
}

.ai-recognition-body {
    min-height: 220px;
    max-height: calc(100vh - 106px);
    padding: 18px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ai-recognition-state {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 9px;
    text-align: center;
}

.ai-recognition-state strong {
    color: var(--app-text);
    font-size: 17px;
}

.ai-recognition-state p {
    max-width: 560px;
    margin: 0;
    color: var(--app-muted);
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-line;
}

.ai-recognition-spinner {
    width: 34px;
    height: 34px;
    border: 3px solid #dbeafe;
    border-top-color: var(--app-primary);
    border-radius: 50%;
    animation: ai-recognition-spin .8s linear infinite;
}

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

.ai-recognition-error > i {
    color: var(--app-danger);
    font-size: 30px;
}

#aiRecognitionResults {
    min-height: 0;
    display: flex;
    flex: 1;
    flex-direction: column;
}

#aiRecognitionResults.hidden {
    display: none;
}

.ai-recognition-summary {
    padding: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-recognition-summary > div {
    margin-right: auto;
    display: flex;
    align-items: center;
    gap: 9px;
}

.ai-training-privacy-note {
    max-width: 310px;
    margin: 0 4px;
    color: #64748b;
    font-size: 11px;
    line-height: 1.5;
}

.ai-recognition-summary button {
    min-height: 32px;
    padding: 0 10px;
    color: var(--app-primary);
    background: #fff;
    border: 1px solid var(--app-border-strong);
    border-radius: var(--app-radius);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.ai-recognition-summary button:hover {
    background: var(--app-primary-soft);
    border-color: var(--app-primary);
}

.ai-provider-badge {
    padding: 3px 8px;
    color: #047857;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.ai-import-mode {
    margin-bottom: 12px;
    padding: 7px;
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--app-surface-soft);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
}

.ai-import-mode > span {
    padding: 0 5px;
    color: var(--app-muted);
    font-size: 12px;
    font-weight: 700;
}

.ai-import-mode label {
    min-height: 34px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    color: var(--app-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}

.ai-import-mode label:has(input:checked) {
    color: var(--app-primary);
    background: #fff;
    border-color: var(--app-primary);
    box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
}

.ai-import-mode input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ai-import-mode strong {
    font-weight: 750;
}

.ai-import-mode small {
    margin-left: auto;
    padding-right: 5px;
    color: var(--app-muted);
    font-size: 11px;
}

.ai-recognition-table-wrap {
    min-height: 0;
    overflow: auto;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
}

.ai-recognition-table {
    width: 100%;
    min-width: 980px;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
}

.ai-recognition-table th {
    padding: 10px 8px;
    position: sticky;
    top: 0;
    z-index: 1;
    color: var(--app-muted);
    background: var(--app-surface-soft);
    border-bottom: 1px solid var(--app-border);
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
}

.ai-recognition-table th:first-child {
    width: 38px;
}

.ai-recognition-table td {
    padding: 7px;
    border-bottom: 1px solid var(--app-border);
    vertical-align: middle;
}

.ai-recognition-table tr:last-child td {
    border-bottom: 0;
}

.ai-recognition-table input[type="text"],
.ai-recognition-table select {
    width: 100%;
    min-height: 36px;
    padding: 0 9px;
    color: var(--app-text);
    background: #fff;
    border: 1px solid var(--app-border-strong);
    border-radius: 6px;
    font-size: 12px;
}

.ai-recognition-table input[data-field="name"] {
    min-width: 150px;
    font-weight: 700;
}

.ai-recognition-table input[data-field="location"],
.ai-recognition-table input[data-field="teacher"] {
    min-width: 112px;
}

.ai-recognition-table input[data-field="weeks"] {
    min-width: 100px;
}

.ai-recognition-table input:focus,
.ai-recognition-table select:focus {
    border-color: var(--app-primary);
    outline: 2px solid rgba(37, 99, 235, .12);
}

.ai-recognition-table input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: var(--app-primary);
}

.ai-recognition-actions {
    padding-top: 14px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex: 0 0 auto;
}

.ai-guide-panel {
    padding: 18px;
    background: var(--app-surface-soft);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
}

.ai-guide-intro {
    padding-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--app-border);
}

.ai-guide-intro-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: #fff;
    background: var(--app-primary);
    border-radius: var(--app-radius);
    font-size: 17px;
}

.ai-guide-intro h4 {
    margin: 0 0 4px;
    color: var(--app-text);
    font-size: 16px;
    font-weight: 800;
}

.ai-guide-intro p {
    margin: 0;
    color: var(--app-muted);
    font-size: 12px;
    line-height: 1.5;
}

.ai-guide-steps {
    padding-top: 18px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.ai-guide-step {
    min-width: 0;
    position: relative;
    display: flex;
    align-items: center;
    flex-direction: column;
    text-align: center;
}

.ai-guide-step:not(:last-child)::after {
    content: "";
    width: calc(100% - 52px);
    height: 1px;
    position: absolute;
    top: 23px;
    left: calc(50% + 32px);
    background: var(--app-border-strong);
}

.ai-guide-step-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    position: relative;
    z-index: 1;
    border-radius: 50%;
    font-size: 16px;
}

.ai-guide-step-icon b {
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    position: absolute;
    right: -4px;
    bottom: -2px;
    color: #fff;
    background: var(--app-text);
    border: 2px solid var(--app-surface-soft);
    border-radius: 50%;
    font-size: 9px;
}

.ai-guide-step-download .ai-guide-step-icon {
    color: #2563eb;
    background: #dbeafe;
}

.ai-guide-step-upload .ai-guide-step-icon {
    color: #0f766e;
    background: #ccfbf1;
}

.ai-guide-step-check .ai-guide-step-icon {
    color: #c2410c;
    background: #ffedd5;
}

.ai-guide-step strong {
    margin-top: 10px;
    color: var(--app-text);
    font-size: 13px;
    font-weight: 750;
}

.ai-guide-step small {
    margin-top: 3px;
    color: var(--app-muted);
    font-size: 11px;
    line-height: 1.4;
}

.ai-guide-actions {
    margin-top: 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ai-guide-button {
    min-height: 42px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--app-border-strong);
    border-radius: var(--app-radius);
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
    transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.ai-guide-button-primary {
    color: #fff;
    background: var(--app-primary);
    border-color: var(--app-primary);
}

.ai-guide-button-primary:hover {
    color: #fff;
    background: var(--app-primary-hover);
    border-color: var(--app-primary-hover);
}

.ai-guide-button-secondary {
    color: var(--app-text);
    background: #fff;
}

.ai-guide-button-secondary:hover {
    color: var(--app-primary);
    background: var(--app-primary-soft);
    border-color: var(--app-primary);
}

.qr-import-modal {
    max-width: 560px;
}

.qr-import-modal .modal-header {
    padding: 18px 20px;
}

.qr-import-modal .modal-header h3 {
    color: var(--app-text) !important;
    font-size: 20px;
    font-weight: 850;
}

.qr-import-modal .modal-header button {
    color: #64748b !important;
    background: #f8fafc !important;
    border: 1px solid var(--app-border);
    border-radius: 10px;
}

.qr-import-modal > .p-6 {
    padding: 18px 20px 20px;
}

.qr-import-guide {
    padding: 18px;
    overflow: hidden;
    position: relative;
    background:
        radial-gradient(circle at 12% 8%, rgba(37, 99, 235, .10), transparent 26%),
        linear-gradient(135deg, #f8fbff 0%, #ffffff 55%, #f0fdf4 100%);
    border: 1px solid #dbe5f2;
    border-radius: 12px;
}

.qr-import-hero {
    display: flex;
    align-items: center;
    gap: 13px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(148, 163, 184, .28);
}

.qr-import-hero-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #16a34a);
    border-radius: 14px;
    box-shadow: 0 12px 24px rgba(37, 99, 235, .20);
    font-size: 20px;
}

.qr-import-hero h4 {
    margin: 0 0 5px;
    color: var(--app-text);
    font-size: 17px;
    font-weight: 850;
}

.qr-import-hero p {
    margin: 0;
    color: var(--app-muted);
    font-size: 13px;
    line-height: 1.6;
}

.qr-import-steps {
    margin-top: 16px;
    display: grid;
    gap: 10px;
}

.qr-import-step {
    min-height: 64px;
    padding: 12px 13px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, .82);
    border: 1px solid rgba(203, 213, 225, .86);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
}

.qr-import-step-num {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: #fff;
    background: #2563eb;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 850;
    box-shadow: 0 7px 15px rgba(37, 99, 235, .22);
}

.qr-import-step strong {
    display: block;
    color: var(--app-text);
    font-size: 14px;
    font-weight: 800;
}

.qr-import-step small {
    display: block;
    margin-top: 3px;
    color: var(--app-muted);
    font-size: 12px;
    line-height: 1.45;
}

.qr-import-actions {
    margin-top: 16px;
}

.qr-import-primary {
    width: 100%;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border: 0;
    border-radius: 10px;
    box-shadow: 0 12px 24px rgba(37, 99, 235, .22);
    font-size: 15px;
    font-weight: 850;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.qr-import-primary:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    box-shadow: 0 15px 30px rgba(37, 99, 235, .28);
}

.ics-import-guide { display: grid; gap: 14px; }
.ics-import-hero { display: flex; gap: 12px; align-items: flex-start; }
.ics-import-hero-icon {
    width: 44px; height: 44px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    color: #047857; background: #ecfdf5; border-radius: 12px; font-size: 18px;
}
.ics-import-hero h4 { margin: 0 0 4px; font-size: 16px; font-weight: 800; color: #0f172a; }
.ics-import-hero p { margin: 0; font-size: 13px; line-height: 1.55; color: #64748b; }
.ics-import-steps { display: grid; gap: 10px; }
.ics-import-step {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 10px 12px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px;
}
.ics-import-step-num {
    width: 24px; height: 24px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    color: #047857; background: #d1fae5; border-radius: 999px; font-size: 12px; font-weight: 800;
}
.ics-import-step strong { display: block; margin-bottom: 2px; font-size: 13px; color: #0f172a; }
.ics-import-step small { display: block; font-size: 12px; line-height: 1.45; color: #64748b; }
.ics-import-actions { margin-top: 16px; }
.ics-import-primary {
    width: 100%; min-height: 48px;
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    color: #fff; background: linear-gradient(135deg, #059669, #047857);
    border: 0; border-radius: 10px; box-shadow: 0 12px 24px rgba(5, 150, 105, .22);
    font-size: 15px; font-weight: 850; cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.ics-import-primary:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #047857, #065f46);
    box-shadow: 0 15px 30px rgba(5, 150, 105, .28);
}

.ai-import-review-tour {
    position: fixed;
    inset: 0;
    z-index: 12000;
}

.ai-import-review-tour.hidden {
    display: none;
}

.ai-tour-focus-ring {
    position: fixed;
    z-index: 1;
    pointer-events: none;
    border: 3px solid #60a5fa;
    border-radius: 10px;
    box-shadow: 0 0 0 9999px rgba(15, 23, 42, .62), 0 0 0 6px rgba(96, 165, 250, .22);
    opacity: 0;
    transition: left .24s ease, top .24s ease, width .24s ease, height .24s ease, opacity .15s ease;
}

.ai-tour-focus-ring.is-positioned {
    opacity: 1;
}

.ai-tour-tooltip {
    width: min(360px, calc(100vw - 24px));
    padding: 18px;
    position: fixed;
    z-index: 2;
    color: var(--app-text);
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    box-shadow: 0 18px 48px rgba(15, 23, 42, .3);
    opacity: 0;
    visibility: hidden;
    transition: opacity .16s ease;
}

.ai-tour-tooltip.is-positioned {
    opacity: 1;
    visibility: visible;
}

.ai-tour-close {
    width: 30px;
    height: 30px;
    padding: 0;
    display: grid;
    place-items: center;
    position: absolute;
    top: 12px;
    right: 12px;
    color: var(--app-muted);
    background: var(--app-surface-soft);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    font-size: 13px;
    cursor: pointer;
}

.ai-tour-close:hover {
    color: var(--app-danger);
    background: var(--app-danger-soft);
}

.ai-tour-step-label {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--app-primary);
    font-size: 11px;
    font-weight: 800;
}

.ai-tour-tooltip h3 {
    margin: 0 34px 7px 0;
    color: var(--app-text);
    font-size: 18px;
    line-height: 1.35;
    font-weight: 800;
}

.ai-tour-tooltip > p {
    margin: 0;
    color: var(--app-muted);
    font-size: 13px;
    line-height: 1.6;
}

.ai-tour-tooltip ul {
    margin: 13px 0 0;
    padding: 11px 12px;
    display: grid;
    gap: 8px;
    list-style: none;
    background: var(--app-surface-soft);
    border-radius: var(--app-radius);
}

.ai-tour-tooltip li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--app-text);
    font-size: 12px;
    line-height: 1.45;
}

.ai-tour-tooltip li i {
    margin-top: 3px;
    color: #059669;
    font-size: 10px;
}

.ai-tour-actions {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.ai-tour-button {
    min-height: 38px;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid var(--app-border-strong);
    border-radius: var(--app-radius);
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
}

.ai-tour-button-secondary {
    color: var(--app-text);
    background: #fff;
}

.ai-tour-button-primary {
    color: #fff;
    background: var(--app-primary);
    border-color: var(--app-primary);
}

.ai-tour-button-primary:hover {
    background: var(--app-primary-hover);
    border-color: var(--app-primary-hover);
}

.help-section-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.help-audience {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.help-audience > div {
    padding: 14px;
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
}

.help-audience h3 {
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--app-text);
    font-size: 15px;
    line-height: 1.3;
    font-weight: 840;
}

.help-audience h3 i {
    color: var(--app-primary);
}

.help-audience p {
    margin: 0 0 8px;
    color: var(--app-muted);
    font-size: 13px;
    line-height: 1.6;
}

.help-audience ul {
    margin: 0;
    padding-left: 18px;
    color: var(--app-text);
    font-size: 13px;
    line-height: 1.7;
}

.help-section {
    padding: 14px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 34%);
    grid-template-rows: auto auto 1fr;
    column-gap: 14px;
    background: var(--app-surface-soft);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
}

.help-section h3 {
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--app-text);
    font-size: 15px;
    line-height: 1.3;
    font-weight: 820;
}

.help-section h3,
.help-section p,
.help-section ul {
    grid-column: 1;
}

.help-section::after {
    content: "";
    grid-column: 2;
    grid-row: 1 / 4;
    min-height: 128px;
    align-self: stretch;
    background:
        linear-gradient(rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.72)),
        url("../assets/logo.png") center / 76px auto no-repeat,
        #fff;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
}

.help-section h3 i {
    color: var(--app-primary);
}

.help-section p {
    margin: 0 0 8px;
    color: var(--app-muted);
    font-size: 13px;
    line-height: 1.6;
}

.help-section ul {
    margin: 0;
    padding-left: 18px;
    color: var(--app-text);
    font-size: 13px;
    line-height: 1.7;
}

.help-note {
    margin-top: 14px;
    padding: 12px 14px;
    display: flex;
    gap: 10px;
    color: var(--app-text);
    background: var(--app-primary-soft);
    border: 1px solid var(--app-border-strong);
    border-radius: var(--app-radius);
    font-size: 13px;
    line-height: 1.6;
}

.help-note strong {
    flex: 0 0 auto;
    color: var(--app-primary);
}

.help-flow-map {
    padding: 18px 18px 16px;
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
}

.help-flow-heading {
    margin-bottom: 16px;
    text-align: center;
}

.help-flow-heading > span {
    color: var(--app-primary);
    font-size: 12px;
    font-weight: 800;
}

.help-flow-heading h3 {
    margin: 4px 0 0;
    color: var(--app-text);
    font-size: 18px;
    font-weight: 850;
}

.help-flow-steps {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 64px;
}

.help-flow-steps::before {
    content: "";
    height: 2px;
    position: absolute;
    top: 29px;
    left: 16.5%;
    right: 16.5%;
    z-index: 0;
    background: #dbe4f0;
}

.help-flow-step {
    min-height: 128px;
    padding: 0 8px;
    position: relative;
    z-index: 1;
    text-align: center;
    background: transparent;
    border: 0;
}

.help-flow-number {
    width: 20px;
    height: 20px;
    position: absolute;
    top: -4px;
    left: calc(50% + 17px);
    display: grid;
    place-items: center;
    color: #fff;
    background: #334155;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 800;
}

.help-flow-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 12px;
    display: grid;
    place-items: center;
    color: #1d4ed8;
    background: #dbeafe;
    border: 5px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px #bfdbfe;
    font-size: 19px;
}

.help-flow-step:nth-of-type(2) .help-flow-icon {
    color: #047857;
    background: #d1fae5;
    box-shadow: 0 0 0 1px #a7f3d0;
}

.help-flow-step:nth-of-type(3) .help-flow-icon {
    color: #b45309;
    background: #fef3c7;
    box-shadow: 0 0 0 1px #fde68a;
}

.help-flow-step h4 {
    margin: 0 0 7px;
    color: var(--app-text);
    font-size: 15px;
    font-weight: 820;
}

.help-flow-step p {
    margin: 0;
    color: var(--app-muted);
    font-size: 12px;
    line-height: 1.65;
}

.help-flow-arrow {
    display: none;
}

.help-flow-branches {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.help-branch-heading {
    grid-column: 1 / -1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--app-muted);
    font-size: 11px;
    font-weight: 750;
}

.help-branch-heading::before,
.help-branch-heading::after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--app-border);
}

.help-branch-heading span {
    padding: 0 12px;
}

.help-flow-branches article {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--app-surface-soft);
    border: 1px solid var(--app-border);
    border-left: 4px solid #2563eb;
    border-radius: var(--app-radius);
}

.help-flow-branches article:last-child {
    border-left-color: #059669;
}

.help-branch-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    color: #1d4ed8;
    background: #dbeafe;
    border-radius: 50%;
}

.help-flow-branches article:last-child .help-branch-icon {
    color: #047857;
    background: #d1fae5;
}

.help-flow-branches strong {
    color: var(--app-text);
    font-size: 14px;
}

.help-flow-branches p {
    margin: 3px 0 0;
    color: var(--app-muted);
    font-size: 12px;
    line-height: 1.55;
}

.pill-select {
    position: relative;
}

.pill-select-btn {
    min-width: 154px;
    min-height: 40px;
    padding: 0 12px !important;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--app-text) !important;
    background: var(--app-surface-soft) !important;
    border: 1px solid var(--app-border-strong) !important;
    border-radius: var(--app-radius) !important;
    box-shadow: none !important;
}

.pill-select-btn.pink,
.pill-select-btn.blue,
.pill-select-btn.yellow,
.pill-select-btn.mint,
.pill-select-btn.lavender {
    background: var(--app-surface-soft) !important;
    border-color: var(--app-border-strong) !important;
}

.pill-dropdown {
    min-width: 100%;
    max-height: 280px;
    overflow: auto;
    padding: 6px;
    margin-top: 6px;
    background: #fff !important;
    border: 1px solid var(--app-border) !important;
    border-radius: var(--app-radius) !important;
    box-shadow: var(--app-shadow) !important;
    z-index: 80;
}

.pill-option {
    padding: 8px 10px !important;
    color: var(--app-text) !important;
    border-radius: var(--app-radius-sm) !important;
    font-size: 14px;
}

.pill-option-group {
    padding: 7px 10px 4px !important;
    color: var(--app-muted) !important;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
}

.pill-option:hover {
    background: var(--app-primary-soft) !important;
    color: var(--app-primary-hover) !important;
}

.discover-filter-hint {
    width: fit-content;
    max-width: 100%;
    margin-top: 12px;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--app-muted);
    background: #f8fafc;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    font-size: 13px;
    line-height: 1.4;
}

.discover-filter-card {
    padding: 12px 14px;
}

.discover-filter-row {
    margin: 0;
}

.discover-filter-hint i {
    color: var(--app-primary);
    font-size: 12px;
}

.discover-filter-hint.is-warning {
    color: #9f1239;
    background: #fff1f2;
    border-color: #fecdd3;
}

.discover-filter-hint.is-warning i {
    color: #e11d48;
}

.schedule-card-sm {
    min-height: 76px;
    padding: 10px 12px !important;
    margin-bottom: 8px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "summary actions";
    align-items: center;
    gap: 14px;
}

.schedule-card-sm h3 {
    margin: 0;
    color: var(--app-text) !important;
    font-size: 15px !important;
    line-height: 1.35;
    font-weight: 760;
}

.schedule-card-summary {
    grid-area: summary;
    min-width: 0;
    display: grid;
    gap: 7px;
}

.schedule-card-actions {
    grid-area: actions;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.qr-subscribe-btn i {
    color: #0d9488;
}

.download-ics-btn i {
    color: var(--app-primary);
}

.subscription-qr-modal {
    width: min(940px, calc(100vw - 32px));
    overflow: hidden;
}

.subscription-qr-header {
    padding: 16px 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--app-border);
}

.subscription-qr-header h3 {
    margin: 0 0 4px;
    color: var(--app-text);
    font-size: 18px;
    line-height: 1.3;
    font-weight: 800;
}

.subscription-qr-header p {
    margin: 0;
    color: var(--app-muted);
    font-size: 12px;
}

.subscription-qr-header button {
    width: 34px;
    height: 34px;
    padding: 0;
    display: grid;
    place-items: center;
    color: var(--app-muted);
    background: var(--app-surface-soft);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    font-size: 16px;
}

.subscription-qr-body {
    padding: 22px;
}

.subscription-use-methods {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.subscription-use-method {
    min-width: 0;
    padding: 0 18px;
}

.subscription-use-method:first-child {
    padding-left: 0;
}

.subscription-use-method + .subscription-use-method {
    border-left: 1px solid var(--app-border);
}

.subscription-use-method:last-child {
    padding-right: 0;
}

.subscription-method-heading {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
}

.subscription-method-heading > span {
    width: 25px;
    height: 25px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--app-primary);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 800;
}

.subscription-method-heading strong,
.subscription-method-heading small {
    display: block;
}

.subscription-method-heading strong {
    color: var(--app-text);
    font-size: 14px;
    line-height: 1.35;
}

.subscription-method-heading small {
    margin-top: 3px;
    color: var(--app-muted);
    font-size: 11px;
    line-height: 1.4;
}

.subscription-qr-code {
    width: 212px;
    height: 212px;
    margin: 16px auto 12px;
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(37, 99, 235, .10);
}

.subscription-qr-code > img {
    width: 196px;
    height: 196px;
    display: block;
    image-rendering: pixelated;
}

.subscription-qr-logo {
    width: 48px;
    height: 48px;
    padding: 5px;
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    background: #fff;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .16);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.subscription-schedule-id {
    width: fit-content;
    max-width: 100%;
    margin: -2px auto 12px;
    padding: 5px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1;
}

.subscription-schedule-id[hidden] {
    display: none !important;
}

.subscription-schedule-id span {
    color: #64748b;
    font-weight: 650;
}

.subscription-schedule-id strong {
    color: #1e40af;
    font-weight: 850;
}

.subscription-qr-logo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    image-rendering: auto;
}

.subscription-use-method ol {
    margin: 14px 0 0;
    padding-left: 21px;
    color: var(--app-muted);
    font-size: 12px;
    line-height: 1.8;
    text-align: left;
}

.subscription-use-method li::marker {
    color: var(--app-primary);
    font-weight: 700;
}

.subscription-copy-action {
    margin-top: 24px;
    padding: 18px 14px;
    text-align: center;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--app-radius);
}

.subscription-copy-action > i {
    margin-bottom: 10px;
    color: var(--app-primary);
    font-size: 32px;
}

.subscription-copy-action p {
    min-height: 52px;
    margin: 0 0 14px;
    color: var(--app-muted);
    font-size: 12px;
    line-height: 1.55;
}

.subscription-copy-action button {
    width: 100%;
    min-height: 40px;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #fff;
    background: var(--app-primary);
    border: 1px solid var(--app-primary);
    border-radius: var(--app-radius-sm);
    font-size: 13px;
    font-weight: 760;
    white-space: nowrap;
}

.subscription-copy-action button:hover {
    background: var(--app-primary-hover);
    border-color: var(--app-primary-hover);
}

.subscription-download-box {
    margin-top: 24px;
    padding: 18px 14px;
    text-align: center;
    background: var(--app-surface-soft);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
}

.subscription-download-box > i {
    margin-bottom: 10px;
    color: var(--app-primary);
    font-size: 34px;
}

.subscription-download-box p {
    min-height: 52px;
    margin: 0 0 14px;
    color: var(--app-muted);
    font-size: 12px;
    line-height: 1.55;
}

.subscription-download-box button {
    width: 100%;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #fff;
    background: var(--app-primary);
    border: 1px solid var(--app-primary);
    border-radius: var(--app-radius-sm);
    font-size: 13px;
    font-weight: 760;
}

.subscription-download-box button:hover {
    background: var(--app-primary-hover);
    border-color: var(--app-primary-hover);
}

.schedule-card-title-row {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.schedule-card-title-row h3 {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedule-grade {
    flex: 0 0 auto;
    min-height: 25px;
    padding: 3px 9px;
    display: inline-flex;
    align-items: center;
    color: #be123c;
    background: #fff1f2;
    border: 1px solid #fda4af;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 750;
    white-space: nowrap;
}

.schedule-card-meta {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px 12px;
    flex-wrap: wrap;
    color: var(--app-muted);
    font-size: 11px;
}

.schedule-card-meta .badge {
    min-height: 21px;
    padding: 2px 7px !important;
    font-size: 11px !important;
}

.schedule-reminder-rule {
    min-height: 21px;
    padding: 2px 7px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.schedule-calendar-range {
    min-height: 21px;
    padding: 2px 7px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #075985;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: var(--app-radius-sm);
    font-weight: 700;
    white-space: nowrap;
}

.schedule-calendar-range i {
    color: #0284c7;
}

.schedule-reminder-rule i {
    color: #d97706;
}

.schedule-id {
    flex: 0 0 auto;
    min-width: 34px;
    min-height: 22px;
    padding: 2px 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--app-primary);
    background: var(--app-primary-soft);
    border: 1px solid #bfdbfe;
    border-radius: var(--app-radius-sm);
    font-size: 12px;
    font-weight: 800;
}

.schedule-card-sm .preview-btn,
.schedule-card-sm .qr-subscribe-btn,
.schedule-card-sm .download-ics-btn,
.schedule-card-sm .import-btn {
    min-height: 34px !important;
    padding: 0 11px !important;
    gap: 6px;
    font-size: 13px !important;
}

.preview-btn {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 13px;
    color: var(--app-primary) !important;
    background: var(--app-primary-soft) !important;
    border: 1px solid #bfdbfe !important;
    border-radius: var(--app-radius) !important;
    font-size: 14px !important;
    font-weight: 750 !important;
    transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.preview-btn:hover {
    color: #fff !important;
    background: var(--app-primary) !important;
    border-color: var(--app-primary) !important;
}

.qr-subscribe-btn,
.download-ics-btn {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 13px;
    color: var(--app-text) !important;
    background: #fff !important;
    border: 1px solid var(--app-border-strong) !important;
    border-radius: var(--app-radius) !important;
    font-size: 14px !important;
    font-weight: 750 !important;
    transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.qr-subscribe-btn:hover {
    color: #0f766e !important;
    background: #f0fdfa !important;
    border-color: #99f6e4 !important;
}

.download-ics-btn:hover {
    color: var(--app-primary) !important;
    background: var(--app-primary-soft) !important;
    border-color: #bfdbfe !important;
}

.badge {
    display: inline-flex !important;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px !important;
    color: var(--app-text) !important;
    background: var(--app-surface-soft) !important;
    border: 1px solid var(--app-border) !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    line-height: 1.2;
    font-weight: 650;
}

.badge-pink { background: #fdf2f8 !important; color: #be185d !important; border-color: #fbcfe8 !important; }
.badge-blue { background: #eff6ff !important; color: #1d4ed8 !important; border-color: #bfdbfe !important; }
.badge-mint { background: #ecfdf5 !important; color: #047857 !important; border-color: #a7f3d0 !important; }
.badge-yellow { background: #fffbeb !important; color: #92400e !important; border-color: #fde68a !important; }
.badge-lavender { background: #f5f3ff !important; color: #6d28d9 !important; border-color: #ddd6fe !important; }
.badge-peach { background: #fff7ed !important; color: #c2410c !important; border-color: #fed7aa !important; }

.empty-state {
    padding: 42px 20px !important;
    text-align: center;
}

/* 课表网格空状态直接浮在网格上，不使用通用空状态卡片外观。 */
.empty-state.schedule-grid-empty,
.schedule-grid-empty.empty-state {
    padding: 0 16px !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: translateX(-50%) !important;
}

.empty-state h3 {
    margin: 0 0 8px !important;
    color: var(--app-text) !important;
    font-size: 20px !important;
}

.empty-state p {
    margin: 0 0 8px !important;
    color: var(--app-muted) !important;
    font-size: 14px !important;
}

#uploadZone {
    padding: 36px 20px !important;
    background: var(--app-surface-soft) !important;
    border: 1px dashed var(--app-border-strong) !important;
    border-radius: var(--app-radius) !important;
}

#uploadZone:hover {
    border-color: var(--app-primary) !important;
    background: #f8fbff !important;
}

.modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1000 !important;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, .48) !important;
    backdrop-filter: blur(4px);
}

.modal-overlay.hidden {
    display: none !important;
}

.modal-cute {
    width: min(720px, calc(100vw - 32px)) !important;
    max-width: min(720px, calc(100vw - 32px)) !important;
    max-height: calc(100vh - 48px);
    overflow: auto;
    background: #fff !important;
    border: 1px solid var(--app-border) !important;
    border-radius: var(--app-radius) !important;
    box-shadow: var(--app-shadow) !important;
    transform: none !important;
}

.modal-cute.max-w-md {
    width: min(460px, calc(100vw - 32px)) !important;
}

.modal-cute.max-w-lg {
    width: min(560px, calc(100vw - 32px)) !important;
}

.modal-cute.max-w-2xl {
    width: min(760px, calc(100vw - 32px)) !important;
}

.modal-cute.max-w-5xl {
    width: min(1180px, calc(100vw - 32px)) !important;
    max-width: min(1180px, calc(100vw - 32px)) !important;
}

.schedule-preview-modal {
    max-height: min(86vh, 820px);
    overflow: hidden !important;
}

#schedulePreviewMeta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

#schedulePreviewMeta span {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    color: var(--app-muted);
    background: var(--app-surface-soft);
    border: 1px solid var(--app-border);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.schedule-preview-notes {
    margin-top: 10px;
    padding: 10px 12px;
    color: #5f4a3a;
    background: #fff8ef;
    border: 1px solid #ffe2c8;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

.schedule-preview-notes::before {
    content: '提交者备注：';
    display: block;
    margin-bottom: 4px;
    color: #c56d2c;
    font-size: 12px;
    font-weight: 800;
}

.schedule-preview-notes.hidden {
    display: none;
}

.schedule-preview-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    min-height: 0;
}

.schedule-preview-grid-wrap {
    min-height: 0;
    max-height: calc(86vh - 220px);
    overflow: auto;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: #fff;
}

.preview-schedule-grid {
    min-width: 860px;
    display: grid;
    gap: 1px;
    background: var(--app-border);
}

.preview-cell {
    min-width: 0;
    background: #fff;
}

.preview-head {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #334155;
    background: #f8fafc;
    font-size: 13px;
    font-weight: 850;
    position: sticky;
    top: 0;
    z-index: 2;
}

.preview-period {
    min-height: 82px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--app-muted);
    background: #f8fafc;
    position: sticky;
    left: 0;
    z-index: 1;
}

.preview-period strong {
    color: var(--app-text);
    font-size: 17px;
    line-height: 1;
}

.preview-period span {
    font-size: 11px;
    white-space: nowrap;
}

.preview-course-cell {
    min-height: 82px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.preview-course-cell.is-long-course {
    min-height: 0;
}

.preview-course-card {
    min-height: 56px;
    padding: 8px 9px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    color: var(--app-text);
    background: color-mix(in srgb, var(--course-color, #dbeafe) 62%, #fff);
    border-left: 4px solid color-mix(in srgb, var(--course-color, #2563eb) 82%, #1e40af);
    border-radius: 7px;
    overflow: hidden;
}

.preview-course-cell.is-long-course .preview-course-card {
    flex: 1 1 auto;
    min-height: 0;
    justify-content: center;
}

.preview-course-card strong {
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-course-card span,
.preview-course-card em {
    color: #475569;
    font-size: 11px;
    line-height: 1.2;
    font-style: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.schedule-preview-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.time-edit-modal {
    max-height: min(86vh, 760px) !important;
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
}

.time-edit-modal .modal-header {
    flex: 0 0 auto;
}

.time-edit-body {
    min-height: 0;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.time-edit-list {
    min-height: 0;
    max-height: calc(86vh - 286px);
    overflow-y: auto;
    padding-right: 4px;
}

.time-edit-mode-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    background: #f8fafc;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
}

.time-edit-mode-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.time-edit-tabs {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    align-self: flex-start;
    background: var(--app-surface-soft);
    border: 0;
    border-radius: 10px;
}

.time-edit-tab {
    min-width: 72px;
    min-height: 32px;
    padding: 0 12px;
    color: var(--app-muted);
    background: transparent;
    border: 1px solid var(--app-border-strong);
    border-radius: var(--app-radius-sm);
    font-weight: 800;
}

.time-edit-tab.active {
    color: #fff;
    background: var(--app-primary);
    border-color: var(--app-primary);
}

.time-edit-mode-notice {
    min-width: 0;
    min-height: 32px;
    display: flex;
    align-items: center;
    gap: 7px;
    color: #475569;
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    box-shadow: none;
}

.time-edit-mode-notice::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    background: var(--app-primary);
    border-radius: 50%;
}

.time-edit-mode-notice.weekend {
    color: #475569;
}

.time-edit-mini-actions button {
    height: 34px;
    padding: 0 12px;
    color: var(--app-primary);
    background: #fff;
    border: 1px solid var(--app-border-strong);
    border-radius: var(--app-radius-sm);
    font-weight: 800;
}

.time-edit-mini-actions button:hover {
    color: #fff;
    background: var(--app-primary);
    border-color: var(--app-primary);
}

.time-edit-mini-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.time-slot-editor-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.time-slot-pair-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr);
    align-items: stretch;
    gap: 8px;
}

.time-session-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0 0;
    color: #475569;
    font-size: 12px;
    font-weight: 900;
}

.time-session-heading::after {
    content: "";
    height: 1px;
    flex: 1 1 auto;
    background: var(--app-border);
}

.time-session-heading span {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid var(--app-border);
    background: #fff;
}

.time-session-heading.morning span {
    color: #0369a1;
    background: #f0f9ff;
    border-color: #bae6fd;
}

.time-session-heading.afternoon span {
    color: #9a3412;
    background: #fff7ed;
    border-color: #fed7aa;
}

.time-session-heading.evening span {
    color: #3730a3;
    background: #eef2ff;
    border-color: #c7d2fe;
}

.time-slot-editor-row {
    min-width: 0;
    padding: 8px 9px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid var(--app-border);
    border-radius: 10px;
}

.time-gap-divider {
    margin: 2px 0;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #475569;
    background: #f8fafc;
    border: 1px dashed var(--app-border-strong);
    border-radius: var(--app-radius);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    user-select: none;
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.time-row-break {
    width: 100%;
}

.time-pair-break {
    width: 48px;
    min-height: 100%;
    margin: 0;
    padding: 6px 4px;
    flex-direction: column;
    gap: 2px;
    align-self: stretch;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.15;
    text-align: center;
}

.time-pair-break em {
    font-size: 11px;
}

.time-pair-break-placeholder {
    width: 48px;
}

.time-gap-divider:hover {
    filter: brightness(0.985);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.18);
}

.time-gap-divider span {
    letter-spacing: 0;
}

.time-gap-divider em {
    color: var(--app-muted);
    font-style: normal;
    font-size: 12px;
    font-weight: 700;
}

.time-gap-divider.editing {
    min-height: 42px;
    justify-content: center;
    padding: 6px 10px;
    gap: 6px;
    color: var(--app-text);
    background: #fff;
    border-style: solid;
    border-color: var(--app-primary);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.12);
    cursor: default;
}

.time-pair-break.editing {
    position: relative;
    z-index: 4;
    width: 148px;
    min-height: 44px;
    margin-left: -50px;
    flex-direction: row;
    padding: 6px;
    white-space: nowrap;
}

.time-gap-divider.editing input {
    width: 72px;
    height: 30px;
    padding: 0 8px;
    color: var(--app-text);
    background: #fff;
    border: 1px solid var(--app-border-strong);
    border-radius: var(--app-radius-sm);
    font-size: 13px;
    font-weight: 800;
    outline: none;
}

.time-gap-divider.editing-hours {
    gap: 10px;
}

.time-gap-divider.editing-hours label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--app-muted);
    font-size: 12px;
    font-weight: 800;
}

.time-gap-divider.editing-hours input {
    width: 58px;
}

.time-gap-divider.editing input:focus {
    border-color: var(--app-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.time-gap-divider.editing button {
    height: 30px;
    padding: 0 9px;
    color: #fff;
    background: var(--app-primary);
    border: 1px solid var(--app-primary);
    border-radius: var(--app-radius-sm);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.time-gap-divider.lunch {
    color: #9a3412;
    background: #fff7ed;
    border-color: #fed7aa;
}

.time-gap-divider.evening {
    color: #3730a3;
    background: #eef2ff;
    border-color: #c7d2fe;
}

.time-gap-divider.long-break {
    color: #0f766e;
    background: #f0fdfa;
    border-color: #99f6e4;
}

.time-gap-divider.short-break {
    color: #2563eb;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.time-slot-editor-label {
    flex: 0 0 50px;
    color: var(--app-text);
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.time-slot-editor-inputs {
    min-width: 0;
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 7px;
}

.time-slot-editor-input {
    min-width: 0;
    width: 100%;
    height: 38px;
    padding: 0 8px;
    color: var(--app-text);
    background: #fff;
    border: 1px solid var(--app-border-strong);
    border-radius: var(--app-radius-sm);
    font-size: 14px;
}

.time-slot-editor-separator {
    color: var(--app-muted);
}

.time-edit-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--app-border);
    background: var(--app-surface);
}

.modal-header {
    padding: 16px 18px !important;
    color: var(--app-text) !important;
    background: var(--app-surface) !important;
    border-bottom: 1px solid var(--app-border) !important;
}

.modal-header h3,
.modal-header h3.text-white {
    margin: 0 !important;
    color: var(--app-text) !important;
    font-size: 18px !important;
    line-height: 1.3;
    font-weight: 760;
}

.modal-header button {
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    color: var(--app-muted) !important;
    background: var(--app-surface-soft) !important;
    border: 1px solid var(--app-border) !important;
    border-radius: var(--app-radius) !important;
    box-shadow: none !important;
    transform: none !important;
}

.modal-header button:hover {
    color: var(--app-danger) !important;
    background: var(--app-danger-soft) !important;
}

.modal-cute > .p-6,
.modal-cute > .p-4,
.modal-cute > .course-modal-body {
    padding: 18px !important;
}

.course-modal-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.course-form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.course-form-field-compact {
    max-width: 220px;
}

.course-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.course-form-label {
    display: block;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}

.course-week-select-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.course-week-select-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
}

.course-modal-actions {
    padding-top: 4px;
}

#courseModal .weekday-badge {
    min-width: 34px;
    min-height: 30px;
    padding: 0 8px !important;
    font-size: 12px;
}

#courseModal .week-mode-group {
    width: 100%;
}

#courseModal .week-select-hint {
    color: #64748b;
    font-size: 12px;
    line-height: 1.4;
}

@media (max-width: 520px) {
    .course-form-row {
        grid-template-columns: 1fr;
    }

    .course-form-field-compact {
        max-width: none;
    }
}

.modal-cute [style*="gradient"],
.modal-cute .bg-gradient-to-r,
.modal-cute .bg-gradient-to-br {
    background: var(--app-surface-soft) !important;
    border: 1px solid var(--app-border) !important;
    border-radius: var(--app-radius) !important;
}

.weekday-badge {
    min-width: 38px;
    min-height: 32px;
    padding: 0 10px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--app-muted) !important;
    background: var(--app-surface-soft) !important;
    border: 1px solid var(--app-border-strong) !important;
    border-radius: var(--app-radius) !important;
    font-size: 13px;
    font-weight: 650;
}

.weekday-badge:hover,
.weekday-badge.selected {
    color: #fff !important;
    background: var(--app-primary) !important;
    border-color: var(--app-primary) !important;
}

.week-mode-group {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px;
    background: var(--app-surface-soft);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
}

.week-count-control {
    margin-top: 10px;
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    color: var(--app-muted);
    background: var(--app-surface-soft);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    font-size: 13px;
    font-weight: 700;
}

.week-count-control button {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--app-primary);
    background: #fff;
    border: 1px solid var(--app-border-strong);
    border-radius: var(--app-radius-sm);
}

.week-count-control button:hover:not(:disabled) {
    color: #fff;
    background: var(--app-primary);
    border-color: var(--app-primary);
}

.week-count-control button:disabled {
    cursor: not-allowed;
    opacity: .4;
}

.week-count-control strong {
    color: var(--app-text);
    font-size: 14px;
}

.week-mode-btn,
.week-select-action {
    min-height: 32px;
    padding: 0 12px;
    color: var(--app-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--app-radius-sm);
    font-size: 13px;
    line-height: 1;
    font-weight: 750;
    transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.week-mode-btn:hover,
.week-select-action:hover {
    color: var(--app-primary-hover);
    background: #fff;
    border-color: var(--app-border);
}

.week-mode-btn.active {
    color: #fff;
    background: var(--app-primary);
    border-color: var(--app-primary);
    box-shadow: 0 5px 12px rgba(37, 99, 235, 0.18);
}

.week-select-action {
    color: var(--app-text);
    background: #fff;
    border-color: var(--app-border);
}

.week-select-hint {
    width: 100%;
    margin-bottom: 2px;
    color: var(--app-muted);
    font-size: 12px;
    line-height: 1.35;
    font-weight: 650;
}

.toast {
    position: fixed !important;
    left: 50% !important;
    top: 50% !important;
    bottom: auto !important;
    z-index: 1700 !important;
    min-width: 220px;
    max-width: min(460px, calc(100vw - 32px));
    padding: 12px 14px !important;
    color: var(--app-text) !important;
    background: #fff !important;
    border: 1px solid var(--app-border) !important;
    border-radius: var(--app-radius) !important;
    box-shadow: var(--app-shadow) !important;
    transform: translate(-50%, -50%) !important;
    text-align: center;
    font-size: 14px;
}

.toast.success,
.toast-success {
    color: #166534 !important;
    background: var(--app-success-soft) !important;
    border-color: #bbf7d0 !important;
}

.toast.error,
.toast-error {
    color: #991b1b !important;
    background: var(--app-danger-soft) !important;
    border-color: #fecaca !important;
}

.toast.info,
.toast-info {
    color: #1e40af !important;
    background: var(--app-primary-soft) !important;
    border-color: #bfdbfe !important;
}

footer {
    color: var(--app-muted) !important;
}

footer a,
footer button {
    color: var(--app-muted) !important;
}

footer a:hover,
footer button:hover {
    color: var(--app-primary) !important;
}

.site-footer {
    padding: 0 16px;
}

.site-footer-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    min-height: 58px;
    padding: 16px 20px;
    color: var(--app-muted);
    font-size: 12px;
    line-height: 1.6;
    border-top: 1px solid var(--app-border);
}

.site-footer p {
    margin: 0;
}

.site-footer-copyright {
    color: #475569;
    white-space: nowrap;
}

.site-footer-filings {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px 10px;
}

.site-footer-filings a,
.site-footer-filings span {
    text-decoration: none;
    transition: color .2s ease;
}

.site-footer-police {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.site-footer-police img {
    display: block;
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.site-footer-divider {
    width: 3px;
    height: 3px;
    flex: 0 0 3px;
    border-radius: 50%;
    background: var(--app-border-strong);
}

@media (max-width: 640px) {
    .site-footer {
        padding: 0 6px;
    }

    .site-footer-inner {
        flex-direction: column;
        gap: 6px;
        padding: 16px 10px;
        text-align: center;
    }

    .site-footer-filings {
        flex-direction: column;
        gap: 4px;
    }

    .site-footer-divider {
        display: none;
    }

    .mini-program-float {
        top: auto;
        right: 12px;
        bottom: 76px;
        transform: none;
        filter: drop-shadow(0 10px 20px rgba(7, 122, 70, 0.2));
    }

    .mini-program-float > summary {
        width: 44px;
        min-height: 44px;
        padding: 0;
        border-radius: 14px;
        justify-content: center;
    }

    .mini-program-float > summary:hover,
    .mini-program-float[open] > summary {
        transform: translateY(-2px);
    }

    .mini-program-float-label {
        display: none;
    }

    .mini-program-float-icon {
        width: 28px;
        height: 28px;
        border-radius: 9px;
    }

    .mini-program-float-panel {
        width: 200px;
        max-width: calc(100vw - 24px);
        top: auto;
        right: 0;
        bottom: calc(100% + 12px);
        transform: translateY(10px) scale(0.98);
    }

    .mini-program-float-panel::before {
        top: auto;
        right: 18px;
        bottom: -6px;
        border-right: 1px solid rgba(16, 185, 129, 0.18);
        border-top: 0;
        border-bottom: 1px solid rgba(16, 185, 129, 0.18);
    }

    .mini-program-float-panel::after {
        width: 100%;
        height: 14px;
        top: auto;
        right: 0;
        bottom: -14px;
    }

    .mini-program-float[open] .mini-program-float-panel,
    .mini-program-float:hover .mini-program-float-panel,
    .mini-program-float:focus-within .mini-program-float-panel {
        transform: translateY(0) scale(1);
    }
}

.export-btn:active,
.btn-cute:active,
.search-btn:active,
.reset-btn:active,
.import-btn:active {
    transform: none !important;
    box-shadow: none !important;
}

@media (max-width: 1180px) {
    .schedule-reminder-grid,
    .schedule-settings-form {
        grid-template-columns: 1fr !important;
    }

    .schedule-settings-form.schedule-settings-form-semester {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .schedule-toolbar {
        grid-template-columns: 1fr;
        justify-items: stretch;
        row-gap: 12px;
    }

    .schedule-toolbar-left,
    .schedule-toolbar-center,
    .schedule-toolbar-right {
        justify-self: stretch;
    }

    .schedule-toolbar-left {
        order: 1;
    }

    .schedule-toolbar-center {
        order: 2;
    }

    .schedule-toolbar-right {
        order: 3;
    }

    .toolbar-actions {
        justify-content: flex-end;
    }

    .ics-settings-body {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .share-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app-title-block h1 {
        max-width: 42vw;
    }
}

@media (max-width: 760px) {
    .toast {
        width: calc(100vw - 28px);
    }

    .site-announcement-bar {
        gap: 8px;
        min-height: 34px;
    }

    .site-announcement-bar.site-announcement-inline {
        flex: 1 1 100%;
        min-width: 0;
        max-width: none;
        width: 100%;
        margin-left: 0;
        margin-bottom: 10px;
        order: 2;
    }

    .app-tab-bar {
        flex-wrap: wrap;
        align-items: stretch;
    }

    .app-tab-bar .tab-toggle {
        order: 1;
    }

    .schedule-current-settings {
        flex-wrap: wrap;
        gap: 10px;
    }

    .schedule-current-settings-body {
        flex: 1 1 100%;
    }

    .schedule-current-settings-actions {
        width: 100%;
        margin-left: 0;
        justify-content: flex-end;
    }

    .schedule-settings-content {
        padding: 8px 10px 10px;
    }

    .schedule-settings-panel {
        padding: 8px 10px;
    }

    .settings-period-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .settings-period-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 8px 10px;
    }

    .settings-period-select {
        width: auto;
        min-width: 88px;
        max-width: 120px;
    }

    .schedule-settings-form.schedule-settings-form-reminder {
        display: flex !important;
        flex-direction: column;
    }

    .reminder-settings-row {
        flex-direction: column;
        gap: 8px;
    }

    .schedule-settings-field-wide {
        grid-column: 1 / -1;
    }

    .schedule-settings-tabs {
        gap: 16px;
        padding-bottom: 8px;
    }

    .schedule-settings-header .schedule-settings-tab,
    .modal-header .schedule-settings-tab {
        min-height: 28px;
        padding: 5px 2px !important;
        font-size: 12px;
    }

    .schedule-settings-header .schedule-settings-tab.is-active::after,
    .modal-header .schedule-settings-tab.is-active::after {
        bottom: -9px;
        width: 18px;
    }

    .schedule-card-sm {
        grid-template-columns: 1fr;
        grid-template-areas:
            "summary"
            "actions";
        gap: 10px;
    }

    .schedule-card-title-row h3 {
        white-space: normal;
    }

    .help-video-section {
        grid-template-columns: 1fr;
        padding: 14px;
        gap: 16px;
    }

    .help-video-player {
        max-width: 320px;
        justify-self: center;
    }

    .help-flow-map {
        padding: 14px;
    }

    .help-flow-steps {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .help-flow-steps::before {
        width: 2px;
        height: auto;
        top: 29px;
        bottom: 29px;
        left: 29px;
        right: auto;
    }

    .help-flow-step {
        min-height: 0;
        padding: 0;
        display: grid;
        grid-template-columns: 58px minmax(0, 1fr);
        grid-template-rows: auto auto;
        align-items: center;
        column-gap: 14px;
        text-align: left;
    }

    .help-flow-step .help-flow-icon {
        grid-column: 1;
        grid-row: 1 / 3;
        margin: 0;
    }

    .help-flow-step .help-flow-number {
        top: -4px;
        left: 42px;
    }

    .help-flow-step h4,
    .help-flow-step p {
        grid-column: 2;
    }

    .help-flow-step h4 {
        margin-bottom: 3px;
    }

    .help-flow-arrow {
        transform: rotate(90deg);
    }

    .help-flow-branches {
        grid-template-columns: 1fr;
    }

    .schedule-example-preview {
        grid-template-columns: 1fr;
    }

    .schedule-example-preview-media {
        height: 36vh;
    }

    .schedule-example-thumbnails {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ai-recognition-body {
        padding: 14px;
    }

    .ai-recognition-summary {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .ai-recognition-summary > div {
        width: 100%;
    }

    .ai-training-privacy-note {
        width: 100%;
        max-width: none;
        margin: 0;
    }

    .ai-import-mode {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .ai-import-mode > span,
    .ai-import-mode small {
        width: 100%;
        margin: 0;
    }

    .ai-import-mode label {
        flex: 1 1 0;
        justify-content: center;
    }

    .ai-recognition-actions .schedule-examples-button {
        flex: 1 1 0;
    }

    .ai-guide-panel {
        padding: 15px;
    }

    .ai-guide-steps {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    .ai-guide-step {
        display: grid;
        grid-template-columns: 46px minmax(0, 1fr);
        column-gap: 12px;
        text-align: left;
    }

    .ai-guide-step:not(:last-child)::after {
        width: 1px;
        height: 18px;
        top: 44px;
        left: 23px;
    }

    .ai-guide-step-icon {
        grid-row: 1 / span 2;
    }

    .ai-guide-step strong {
        margin-top: 4px;
    }

    .ai-guide-step small {
        margin-top: 0;
    }

    .ai-guide-actions {
        grid-template-columns: 1fr;
    }

    .generate-schedule-content .ics-settings-body {
        grid-template-columns: 1fr;
    }

    .generate-schedule-actions {
        flex-direction: column;
    }

    .generate-schedule-actions button {
        width: 100%;
    }

    .discover-pagination {
        flex-wrap: wrap;
        justify-content: center;
    }

    .discover-page-controls {
        order: 3;
        width: 100%;
        flex-wrap: wrap;
    }

    .help-page-header {
        flex-direction: column;
    }

    .help-section-grid {
        grid-template-columns: 1fr;
    }

    .help-audience {
        grid-template-columns: 1fr;
    }

    .help-section {
        grid-template-columns: 1fr;
    }

    .help-section::after {
        grid-column: 1;
        grid-row: auto;
        min-height: 150px;
    }

    .help-note {
        flex-direction: column;
    }

    .max-w-5xl.mx-auto.relative.z-10 {
        width: calc(100vw - 28px) !important;
        padding: 0 0 28px !important;
    }

    .app-header {
        margin: 0 0 14px;
        padding: 12px 14px;
        min-height: auto;
        display: flex;
        align-items: center;
        flex-direction: column;
    }

    .app-title-block h1 {
        max-width: calc(100vw - 84px);
        font-size: 21px;
    }

    .app-brand {
        width: 100%;
        justify-content: flex-start;
    }

    .schedule-reminder-heading {
        flex-direction: column;
        gap: 7px;
    }

    .schedule-reminder-grid,
    .schedule-settings-form {
        grid-template-columns: 1fr;
    }

    .schedule-settings-form.schedule-settings-form-semester {
        grid-template-columns: 1fr !important;
    }

    .schedule-settings-form.schedule-settings-form-reminder {
        display: flex !important;
        flex-direction: column;
    }

    .reminder-settings-row {
        flex-direction: column;
        gap: 8px;
    }

    .schedule-settings-form-semester > .schedule-settings-field {
        grid-column: span 1;
    }

    .app-header-shortcuts {
        width: 100%;
        margin: 8px 0 0;
        justify-content: flex-end;
        gap: 14px;
    }

    .app-header-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .app-header-actions,
    .toolbar-actions,
    .ics-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .app-header-actions button,
    .toolbar-actions button,
    .weekend-control,
    .ics-actions button {
        flex: 1 1 calc(50% - 8px);
        min-width: 0;
    }

    .ics-settings-body {
        grid-template-columns: 1fr;
    }

    .share-panel-title {
        flex-direction: column;
    }

    .share-form-grid {
        grid-template-columns: 1fr;
    }

    .share-actions button {
        width: 100%;
    }

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

    .schedule-export-actions button {
        width: 100%;
    }

    .schedule-card-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .subscription-use-methods {
        grid-template-columns: 1fr;
    }

    .subscription-use-method {
        padding: 0;
    }

    .subscription-use-method + .subscription-use-method {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid var(--app-border);
        border-left: 0;
    }

    .subscription-qr-code {
        width: min(212px, 100%);
        height: auto;
        aspect-ratio: 1;
    }

    .subscription-qr-code > img {
        width: calc(100% - 16px);
        height: calc(100% - 16px);
    }

    .tab-toggle {
        width: 100%;
    }

    .tab-toggle-btn {
        flex: 1 1 0;
        min-width: 0;
    }

    .schedule-grid {
        min-width: 0;
    }

    .schedule-board {
        overflow-x: hidden;
    }

    .pill-select,
    .pill-select-btn {
        width: 100%;
    }

    #panel-discover .discover-filter-row {
        align-items: stretch !important;
    }

    .modal-overlay {
        padding: 12px;
        align-items: flex-start;
    }

    .modal-cute,
    .modal-cute.max-w-md,
    .modal-cute.max-w-lg,
    .modal-cute.max-w-2xl {
        width: calc(100vw - 24px) !important;
        max-width: calc(100vw - 24px) !important;
        max-height: calc(100vh - 24px);
    }

    .modal-cute .flex.gap-3 {
        flex-wrap: wrap;
    }

    .time-slot-editor-grid {
        gap: 8px;
    }

    .time-edit-mode-card {
        align-items: stretch;
        flex-direction: column;
    }

    .time-edit-mode-main {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
        gap: 6px;
    }

    .time-edit-mode-notice {
        min-height: 20px;
    }

    .time-edit-tabs {
        width: 100%;
    }

    .time-edit-tab {
        flex: 1 1 0;
    }

    .time-edit-mini-actions {
        justify-content: stretch;
    }

    .time-edit-mini-actions button {
        flex: 1 1 0;
    }

    .time-slot-pair-row {
        grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
        gap: 6px;
    }

    .time-pair-break {
        width: 42px;
        font-size: 11px;
    }

    .time-pair-break.editing {
        width: 142px;
        margin-left: -50px;
    }

    .time-edit-actions {
        flex-direction: column;
    }

    .qr-import-modal > .p-6 {
        padding: 14px;
    }

    .qr-import-guide {
        padding: 14px;
    }

    .qr-import-hero {
        align-items: flex-start;
    }

    .qr-import-hero-icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        font-size: 18px;
    }

    .qr-import-step {
        min-height: 58px;
        padding: 10px 11px;
    }
}
