:root {
    color-scheme: light;
    --ink: #17212b;
    --muted: #667381;
    --line: #dce3e8;
    --surface: #ffffff;
    --canvas: #f4f7f8;
    --accent: #1f6f78;
    --accent-dark: #15545b;
    --accent-soft: #e3f0f1;
    --success: #1e6a46;
    font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body { margin: 0; background: var(--canvas); color: var(--ink); line-height: 1.6; }

a { color: var(--accent-dark); }

.container { width: min(1080px, calc(100% - 40px)); margin: 0 auto; }

.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }

.header-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { color: var(--ink); font-size: 1.05rem; font-weight: 700; text-decoration: none; }

.nav-links { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px 16px; font-size: .95rem; }
.brand { flex-shrink: 0; }

.nav-links a { text-decoration: none; }

.user-label { color: var(--muted); }

.inline-form { display: inline; }

.main-content { padding: 56px 0 80px; }

.intro-panel { max-width: 760px; padding: 8px 0 48px; }

.eyebrow { margin: 0 0 12px; color: var(--accent-dark); font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

h1, h2 { line-height: 1.2; }

h1 { max-width: 700px; margin: 0 0 18px; font-size: clamp(2rem, 5vw, 4.2rem); letter-spacing: 0; }

h2 { margin: 8px 0; font-size: 1.2rem; }

.intro-panel p:not(.eyebrow) { max-width: 600px; color: var(--muted); font-size: 1.05rem; }

.action-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; border: 1px solid var(--accent); border-radius: 5px; padding: 0 18px; background: var(--accent); color: #fff; cursor: pointer; font: inherit; font-weight: 650; text-decoration: none; }

.button:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

.button:disabled { cursor: not-allowed; opacity: .58; }

.button-secondary { background: transparent; color: var(--accent-dark); }

.button-secondary:hover { background: var(--accent-soft); color: var(--accent-dark); }

.button-small { min-height: 36px; padding: 0 13px; }

.button-quiet { min-height: 32px; border-color: transparent; padding: 0; background: transparent; color: var(--accent-dark); font-size: .9rem; }

.button-quiet:hover { border-color: transparent; background: transparent; text-decoration: underline; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--line); }

.feature-item { min-height: 190px; padding: 28px; background: var(--surface); }

.feature-item p { margin: 0; color: var(--muted); }

.feature-number { color: var(--accent); font-size: .8rem; font-weight: 700; }

.form-panel { width: min(100%, 520px); margin: 0 auto; padding: 34px; border: 1px solid var(--line); background: var(--surface); }

.form-panel-wide { width: min(100%, 780px); }

.form-panel h1 { margin-bottom: 26px; font-size: 2.2rem; }

.stack-form { display: grid; gap: 18px; }

.form-field { display: grid; gap: 7px; }

.form-field label { font-weight: 650; }

.form-field input:not([type="file"]), .form-field select { width: 100%; min-height: 44px; border: 1px solid #b9c6ce; border-radius: 4px; padding: 8px 11px; background: var(--surface); color: var(--ink); font: inherit; }

.form-field input:focus, .form-field select:focus { border-color: var(--accent); outline: 3px solid var(--accent-soft); }

.form-field input[type="file"] { width: 100%; border: 1px dashed #a9bac3; border-radius: 4px; padding: 13px; background: #f8fafb; color: var(--muted); }

.form-field small { color: var(--muted); font-size: .83rem; }

.errorlist { margin: 0; padding-left: 18px; color: #a52b2b; font-size: .88rem; }

.form-errors { padding: 10px 12px; border-left: 3px solid #a52b2b; background: #fff1f1; color: #7c2020; }

.form-footer { margin: 22px 0 0; color: var(--muted); font-size: .93rem; }

.message { margin-bottom: 24px; padding: 12px 14px; border-left: 3px solid var(--success); background: #eaf6ef; color: var(--success); }

.hero-panel { display: flex; align-items: end; justify-content: space-between; gap: 32px; padding: 8px 0 52px; }

.hero-panel h1 { max-width: 720px; margin-bottom: 16px; }

.hero-copy { max-width: 590px; margin: 0; color: var(--muted); font-size: 1.05rem; }

.hero-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 16px; padding-bottom: 8px; }

.text-link { color: var(--accent-dark); text-decoration: none; }

.text-link:hover { text-decoration: underline; }

.department-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; border: 1px solid var(--line); background: var(--line); }

.department-card { display: flex; min-height: 300px; flex-direction: column; padding: 28px; background: var(--surface); color: var(--ink); text-decoration: none; transition: background .15s ease, transform .15s ease; }

.department-card:hover { background: #fbfdfd; transform: translateY(-2px); }

.department-card-featured { background: var(--accent-soft); }

.department-card h2 { margin: 16px 0 12px; font-size: 1.65rem; }

.department-card p { max-width: 250px; margin: 0; color: var(--muted); }

.card-kicker { color: var(--accent-dark); font-size: .78rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }

.card-action { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; color: var(--accent-dark); font-size: .92rem; font-weight: 700; }

.workflow-note { display: flex; align-items: baseline; gap: 18px; border-bottom: 1px solid var(--line); padding: 20px 0; color: var(--muted); }

.workflow-note p { margin: 0; }

.breadcrumb { display: flex; gap: 10px; margin-bottom: 28px; color: var(--muted); font-size: .9rem; }

.breadcrumb a { text-decoration: none; }

.section-heading { max-width: 700px; padding: 8px 0 34px; }

.section-heading h1 { margin-bottom: 14px; font-size: clamp(2.15rem, 4vw, 3.5rem); }

.section-heading p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 1.02rem; }

.section-heading-row { display: flex; align-items: end; justify-content: space-between; gap: 24px; max-width: none; }

.count-badge { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; padding: 8px 13px; color: var(--muted); font-size: .85rem; }

.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line); background: var(--line); }

.media-tool-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 42px; }
.multimedia-home-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.breadcrumb { flex-wrap: wrap; }
.management-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.management-nav a { border-radius: 5px; padding: 8px 15px; text-decoration: none; }
.management-nav a:hover, .management-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-dark); }
.management-nav a[aria-current="page"] { font-weight: 700; }
.management-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid var(--line); padding: 22px; background: var(--surface); }
.management-note p { margin: 6px 0 0; color: var(--muted); }
.asset-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.danger-link { color: #a52b2b; font-size: .88rem; text-decoration: none; }
.danger-link:hover { text-decoration: underline; }
.button-danger { background: #a52b2b; border-color: #a52b2b; }
.button-danger:hover { background: #7c2020; border-color: #7c2020; }
.confirm-trigger { border: 0; padding: 0; background: transparent; font-family: inherit; cursor: pointer; }
.confirm-trigger:disabled { opacity: .5; cursor: not-allowed; }
.confirm-dialog { width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 48px); margin: auto; border: 1px solid var(--line); border-radius: 12px; padding: 28px; background: var(--surface); color: var(--ink); box-shadow: 0 20px 70px #17212b33; overflow-y: auto; }
.confirm-dialog::backdrop { background: #17212b88; }
.confirm-dialog h2 { margin: 0 0 18px; font-size: 1.5rem; }
.confirm-dialog p { color: var(--muted); }
.confirm-dialog-details { border-radius: 6px; padding: 14px; background: var(--canvas); white-space: pre-line; overflow-wrap: anywhere; }
.confirm-dialog .action-row { justify-content: flex-end; }
.activity-create-panel { max-width: none; margin: 0 0 28px; }
.activity-create-panel h2 { margin: 0 0 22px; }
.activity-form-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 18px; }
.activity-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr)); gap: 18px; }
.activity-card { border: 1px solid var(--line); padding: 24px; background: var(--surface); overflow-wrap: anywhere; }
.activity-card h2 { margin: 16px 0; }
.activity-card p { color: var(--muted); font-size: .9rem; }
.asset-activity { overflow-wrap: anywhere; }

.tutorial-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 900px; }
.tutorial-card { min-height: 260px; }

.tutorial-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 26px; min-height: 620px; border: 1px solid #e7e8e3; border-radius: 16px; padding: 0; background: var(--surface); box-shadow: 0 10px 30px rgba(43, 55, 39, .06); overflow: hidden; }
.tutorial-sidebar { display: flex; min-height: 620px; flex-direction: column; border-right: 1px solid #e5e7df; background: #fbfaf6; }
.tutorial-sidebar-title { display: flex; align-items: center; gap: 12px; min-height: 68px; border-bottom: 1px solid #e6e5dd; padding: 0 22px; color: #3f663b; font-size: 1.2rem; font-weight: 750; text-decoration: none; }
.tutorial-menu-icon { color: #6d9761; font-size: 1.35rem; line-height: 1; }
.tutorial-nav { display: grid; }
.tutorial-nav-item { display: flex; align-items: center; gap: 14px; min-height: 64px; border-bottom: 1px solid #e9e9e5; padding: 0 22px; color: #555b56; font-size: .98rem; text-decoration: none; transition: background .15s ease, color .15s ease; }
.tutorial-nav-item:hover, .tutorial-nav-item-active { background: #f1f2ed; color: #315f31; }
.tutorial-nav-item-active { box-shadow: inset 3px 0 0 #6b9a60; font-weight: 700; }
.tutorial-external-icon { color: #a1a8a0; font-size: .9rem; }
.tutorial-nav-item-active .tutorial-external-icon { color: #6b9a60; }
.tutorial-back-link { margin: auto 22px 22px; color: var(--muted); font-size: .86rem; text-decoration: none; }
.tutorial-back-link:hover { color: var(--accent-dark); text-decoration: underline; }
.tutorial-main { min-width: 0; padding: 30px 28px 40px; }
.tutorial-main-header { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #e5e7df; padding: 8px 0 20px; }
.tutorial-main-header h1 { margin: 0; color: #313632; font-size: clamp(1.6rem, 3vw, 2rem); letter-spacing: .01em; }
.tutorial-header-icon { color: #363d38; font-size: 1.55rem; line-height: 1; }
.tutorial-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; padding-top: 24px; }
.tutorial-card-reference { min-height: 172px; border-radius: 8px; padding: 17px 18px; background: #f4f4f3; }
.tutorial-card-reference h2 { margin: 0 0 20px; color: #285b2c; font-size: 1.08rem; line-height: 1.25; }
.tutorial-card-body { display: flex; align-items: center; gap: 16px; min-height: 72px; color: #7b7e7b; }
.tutorial-card-body p { margin: 0; font-size: .94rem; }
.tutorial-placeholder-icon { display: grid; width: 54px; height: 54px; flex: 0 0 54px; place-items: center; border-radius: 8px; color: #fff; font-size: 1.8rem; font-weight: 800; box-shadow: 0 2px 5px rgba(35, 47, 35, .13); }
.tutorial-camera-icon { background: linear-gradient(145deg, #88ad74, #4c7950); }
.tutorial-writing-icon { background: linear-gradient(145deg, #98a796, #526b56); }

.tool-card { display: flex; min-height: 250px; flex-direction: column; padding: 28px; background: var(--surface); color: var(--ink); text-decoration: none; }

.tool-card-primary { background: var(--accent-soft); }

.tool-card h2 { margin: 18px 0 12px; font-size: 1.55rem; }

.tool-card p { max-width: 360px; margin: 0; color: var(--muted); }

.tool-card .card-action, .tool-card .card-status { margin-top: auto; }

.card-status { color: var(--muted); font-size: .9rem; }

.empty-panel { max-width: 720px; margin: 24px auto 0; border: 1px solid var(--line); padding: 38px; background: var(--surface); }

.empty-panel h1 { margin-bottom: 16px; font-size: 2.6rem; }

.empty-panel h2 { margin-top: 0; }

.empty-panel p { max-width: 580px; margin: 0 0 24px; color: var(--muted); }

.empty-panel-compact { max-width: none; margin-top: 0; padding: 32px; }

.upload-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 28px; margin-bottom: 28px; border: 1px solid var(--line); padding: 24px; background: var(--surface); }

.upload-panel h2 { margin: 0 0 8px; }

.upload-panel p { margin: 0; color: var(--muted); font-size: .92rem; }

.upload-form { display: flex; align-items: center; gap: 14px; }

.upload-form .form-field { flex: 1; }

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

.asset-card { overflow: hidden; border: 1px solid var(--line); background: var(--surface); }

.asset-preview { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #edf2f3; }

.asset-preview img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }

.asset-preview:hover img { transform: scale(1.03); }

.asset-info { padding: 15px 16px 17px; }

.asset-info h2 { overflow: hidden; margin: 0 0 4px; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; }

.asset-info p { margin: 0 0 13px; color: var(--muted); font-size: .8rem; }

.download-link { color: var(--accent-dark); font-size: .88rem; font-weight: 700; text-decoration: none; }

.download-link:hover { text-decoration: underline; }

.recent-heading { padding: 0 0 18px; }
.recent-heading h2 { margin: 0; font-size: 1.7rem; }
.asset-type-icon { display: grid; width: 72px; height: 72px; place-items: center; border: 1px solid #c9d6da; border-radius: 12px; background: var(--accent-soft); color: var(--accent-dark); font-size: 1.2rem; font-weight: 750; letter-spacing: .03em; }
.asset-preview:has(.asset-type-icon) { display: grid; place-items: center; }
.asset-video { display: block; width: 100%; height: 100%; min-height: 160px; object-fit: cover; background: #17212b; }
.upload-page-panel { max-width: 820px; margin: 0; }
.dropzone { display: grid; justify-items: center; gap: 8px; border: 2px dashed #afc2c8; border-radius: 8px; padding: 34px 22px 26px; background: #f8fbfb; text-align: center; transition: border-color .15s ease, background .15s ease; }
.dropzone:hover, .dropzone-active { border-color: var(--accent); background: var(--accent-soft); }
.dropzone-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; font-size: 1.8rem; line-height: 1; }
.dropzone h2 { margin: 0; font-size: 1.35rem; }
.dropzone p { margin: 0 0 5px; color: var(--muted); }
.dropzone input[type="file"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; clip-path: inset(50%); }
.dropzone-files { max-width: 100%; color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-bottom: 28px; border: 1px solid var(--line); padding: 18px; background: var(--surface); }
.filter-field { display: grid; min-width: 150px; flex: 1 1 150px; gap: 5px; }
.filter-search { flex-basis: 230px; }
.filter-field label { color: var(--muted); font-size: .82rem; font-weight: 650; }
.filter-field input, .filter-field select { width: 100%; min-height: 42px; border: 1px solid #b9c6ce; border-radius: 4px; padding: 7px 10px; background: var(--surface); color: var(--ink); font: inherit; }
.filter-bar > .button { min-height: 42px; }
.asset-library-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.asset-author { color: var(--ink); font-weight: 600; }
.legacy-upload-errors { margin: 0 0 28px; }

.import-panel { max-width: 820px; margin: 0; }
.import-help { margin: -8px 0 22px; color: var(--muted); }
.provider-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.provider-list li { border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; background: var(--accent-soft); color: var(--accent-dark); font-size: .86rem; }
.import-source-note { margin-top: 20px; border-left: 3px solid var(--accent); padding: 12px 14px; background: var(--accent-soft); color: var(--muted); font-size: .9rem; }
.import-source-note strong { color: var(--ink); }
.import-table { width: 100%; border-collapse: collapse; margin: 22px 0; background: var(--surface); }
.import-table th, .import-table td { border-bottom: 1px solid var(--line); padding: 12px 10px; text-align: left; vertical-align: middle; }
.import-table th { color: var(--muted); font-size: .83rem; font-weight: 650; }
.import-table td:first-child { width: 42px; }
.import-table input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
.import-file-name { overflow-wrap: anywhere; font-weight: 650; }
.import-file-meta { color: var(--muted); font-size: .82rem; }
.import-url { overflow-wrap: anywhere; color: var(--muted); font-size: .82rem; }
.status-panel { max-width: 820px; margin: 0; }
.status-mark { display: inline-flex; align-items: center; min-height: 32px; border-radius: 999px; padding: 0 12px; background: var(--accent-soft); color: var(--accent-dark); font-size: .88rem; font-weight: 700; }
.status-mark-success { background: #e3f3e9; color: var(--success); }
.status-mark-error { background: #fff1f1; color: #8a2525; }
.status-message { margin: 18px 0; color: var(--muted); }
.import-result-list { margin: 20px 0 0; padding-left: 20px; }
.import-result-list li { margin: 7px 0; }

.panel-intro { margin: -10px 0 26px; color: var(--muted); }

.method-fieldset, .date-options { margin: 0; border: 0; padding: 0; }

.method-fieldset legend, .date-options legend { margin-bottom: 10px; font-weight: 650; }

.method-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }

.method-option { display: flex; min-height: 58px; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 5px; padding: 12px 14px; cursor: pointer; }

.method-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

.method-fieldset input { width: 18px; height: 18px; accent-color: var(--accent); }

.upload-box { display: grid; gap: 18px; border: 1px solid var(--line); padding: 20px; background: #f8fafb; }

.finished-note { border-left: 3px solid var(--accent); padding: 14px 16px; background: var(--accent-soft); color: var(--ink); }

.finished-note p { margin: 4px 0 0; color: var(--muted); }

.summary-strip { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-bottom: 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; color: var(--muted); }

.date-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.date-options legend { grid-column: 1 / -1; }

.date-option { display: grid; grid-template-columns: 22px 1fr; align-items: center; gap: 2px 10px; min-height: 74px; border: 1px solid var(--line); border-radius: 5px; padding: 12px 14px; background: var(--surface); cursor: pointer; }

.date-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

.date-option input { grid-row: 1 / 3; width: 18px; height: 18px; accent-color: var(--accent); }

.date-main { font-weight: 650; }

.date-capacity { color: var(--muted); font-size: .86rem; }

.date-option-disabled { background: #eef1f2; color: #8a949b; cursor: not-allowed; }

.receipt-panel { width: min(100%, 680px); margin: 0 auto; padding: 38px; border: 1px solid var(--line); background: var(--surface); }

.receipt-panel h1 { margin-bottom: 18px; font-size: 2.5rem; }

.receipt-mark { display: grid; width: 48px; height: 48px; place-items: center; margin-bottom: 22px; border-radius: 50%; background: #e3f3e9; color: var(--success); font-size: 1.55rem; font-weight: 750; }

.receipt-details { margin: 28px 0; border-top: 1px solid var(--line); }

.receipt-details div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 18px; border-bottom: 1px solid var(--line); padding: 13px 0; }

.receipt-details dt { color: var(--muted); }

.receipt-details dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }

@media (max-width: 680px) {
    .container { width: min(100% - 28px, 540px); }
    .header-inner { min-height: 60px; align-items: flex-start; flex-direction: column; gap: 8px; padding: 14px 0; }
    .nav-links { width: 100%; flex-wrap: wrap; justify-content: flex-start; gap: 8px 12px; }
    .main-content { padding-top: 36px; }
    h1 { font-size: 2.25rem; }
    .feature-grid { grid-template-columns: 1fr; }
    .feature-item { min-height: auto; }
    .form-panel { padding: 24px 18px; }
    .method-options, .date-options { grid-template-columns: 1fr; }
    .receipt-panel { padding: 26px 20px; }
    .receipt-details div { grid-template-columns: 1fr; gap: 2px; }
    .hero-panel, .section-heading-row { align-items: flex-start; flex-direction: column; }
    .department-grid, .tool-grid, .asset-grid, .media-tool-grid, .asset-library-grid, .tutorial-card-grid { grid-template-columns: 1fr; }
    .department-card { min-height: 220px; }
    .workflow-note { align-items: flex-start; flex-direction: column; gap: 6px; }
    .upload-panel { grid-template-columns: 1fr; gap: 18px; }
    .upload-form { align-items: stretch; flex-direction: column; }
    .filter-bar { align-items: stretch; flex-direction: column; }
    .filter-field { width: 100%; }
    .filter-bar > .button { width: 100%; }
    .import-table { display: block; overflow-x: auto; white-space: nowrap; }
    .tutorial-shell { grid-template-columns: 1fr; min-height: 0; border-radius: 10px; }
    .tutorial-sidebar { min-height: 0; border-right: 0; border-bottom: 1px solid #e5e7df; }
    .tutorial-sidebar-title { min-height: 58px; }
    .tutorial-nav-item { min-height: 52px; }
    .tutorial-back-link { margin: 16px 22px; }
    .tutorial-main { padding: 24px 18px 30px; }
}
