/* 《应到实到》 shared styles.
   Three isolated UI systems: portal-* (public site), oa-* (teacher office),
   term-* (legacy terminal), plus g01-* (mail client) and the persistent wig-* shell. */

:root {
  --wig-font: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif;
  --wig-mono: "Courier New", Consolas, "Courier", monospace;
  --portal-ink: #1c2a3a;
  --portal-blue: #16498c;
  --portal-blue-deep: #0e3568;
  --portal-sky: #eef4fb;
  --portal-line: #d4dfe9;
  --oa-paper: #f7f8f5;
  --oa-green: #2e4d40;
  --oa-line: #b9c4bb;
  --oa-red: #9a2b1f;
  --term-bg: #071409;
  --term-panel: #0b1d10;
  --term-ink: #9fdcb0;
  --term-dim: #5b8f6b;
  --term-line: rgba(159, 220, 176, 0.28);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--wig-font);
  font-size: 15px;
  line-height: 1.75;
  color: var(--portal-ink);
  background: #f4f6f9;
}
img, svg { max-width: 100%; }
button { font-family: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}
.skip-link {
  position: absolute; left: 8px; top: -48px; z-index: 60;
  background: #fff; color: var(--portal-blue); padding: 8px 14px;
  border: 1px solid var(--portal-blue); transition: top .12s ease;
}
.skip-link:focus { top: 8px; }

/* ============ meta blackout ============ */
.wig-meta-blackout {
  position: fixed; inset: 0; z-index: 200;
  background: #000; color: #111;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--wig-mono); letter-spacing: .3em;
}
.wig-meta-blackout span { opacity: .25; }

/* ============ persistent shell ============ */
#siteShell { display: contents; }

.wig-header { background: var(--portal-blue); color: #fff; }
.wig-header-inner {
  max-width: 1080px; margin: 0 auto; padding: 14px 16px 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.wig-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.wig-seal {
  width: 44px; height: 44px; flex: none; border-radius: 6px;
  background: #fff; color: var(--portal-blue);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px; letter-spacing: 2px;
}
.wig-seal-term { background: transparent; color: var(--term-ink); border: 1px solid var(--term-line); font-family: var(--wig-mono); }
.wig-brand strong { display: block; font-size: 19px; line-height: 1.3; }
.wig-brand small { display: block; font-size: 12px; opacity: .82; }
.wig-office { text-align: right; font-size: 12.5px; line-height: 1.6; opacity: .95; }
.wig-office-hours b { display: block; font-size: 13px; }

.wig-nav {
  max-width: 1080px; margin: 0 auto; padding: 0 12px;
  display: flex; flex-wrap: wrap; gap: 2px;
  background: rgba(255, 255, 255, 0.08);
}
.wig-nav-link {
  color: #fff; text-decoration: none; font-size: 14.5px;
  padding: 9px 13px; display: inline-block;
}
.wig-nav-link:hover { background: rgba(255, 255, 255, 0.14); }
.wig-nav-link.is-current { background: #fff; color: var(--portal-blue); font-weight: 600; }
.wig-nav-link.is-disabled, .wig-nav-link.is-locked { opacity: .45; cursor: help; }
.wig-nav-link.is-locked:hover { opacity: .8; }

body[data-wig-shell-mode="office"] .wig-header { background: var(--oa-green); }
body[data-wig-shell-mode="office"] .wig-nav { background: rgba(255, 255, 255, 0.07); }
body[data-wig-shell-mode="office"] .wig-nav-link.is-current { color: var(--oa-green); }
body[data-wig-shell-mode="term"] .wig-header { background: var(--term-panel); border-bottom: 1px solid var(--term-line); }
body[data-wig-shell-mode="term"] .wig-nav { background: transparent; border-top: 1px solid var(--term-line); }
body[data-wig-shell-mode="term"] .wig-nav-link { font-family: var(--wig-mono); font-size: 13.5px; }
body[data-wig-shell-mode="term"] .wig-nav-link.is-current { background: var(--term-ink); color: var(--term-bg); }

.wig-shell-breadcrumb {
  max-width: 1080px; margin: 10px auto 0; padding: 0 16px;
  font-size: 12.5px; color: #66748a;
}
.wig-toolbar {
  max-width: 1080px; margin: 6px auto 0; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 12.5px; color: #66748a;
}
.wig-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wig-progress-badge { color: #8a97ab; font-size: 12px; outline: none; }
.wig-page-pos { color: #9aa7ba; font-size: 12px; font-family: var(--wig-mono); }
.wig-tool-button {
  border: 1px solid var(--portal-line); background: #fff; color: #33465e;
  font-size: 12.5px; padding: 4px 10px; cursor: pointer; border-radius: 3px;
}
.wig-tool-button:hover { border-color: var(--portal-blue); color: var(--portal-blue); }
.wig-about { position: relative; }
.wig-about summary {
  list-style: none; cursor: pointer; border: 1px solid var(--portal-line); background: #fff;
  font-size: 12.5px; padding: 4px 10px; border-radius: 3px; color: #33465e;
}
.wig-about summary::-webkit-details-marker { display: none; }
.wig-about-body {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; width: min(320px, 86vw);
  background: #fff; border: 1px solid var(--portal-line); box-shadow: 0 8px 22px rgba(20, 40, 70, .18);
  padding: 12px 14px; font-size: 12.5px; color: #4a5a70;
}
.wig-about-body p { margin: 0 0 10px; }
.wig-reset-button { width: 100%; }
.wig-shell-notice {
  max-width: 1080px; margin: 4px auto 0; padding: 0 16px; min-height: 20px;
  font-size: 12.5px; color: #2c6e49;
}

/* Ending B veil: dormant snapshot desaturation (layout-safe: fixed overlay). */
.wig-seal-veil {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  backdrop-filter: grayscale(0.88) contrast(0.97);
  -webkit-backdrop-filter: grayscale(0.88) contrast(0.97);
  background: rgba(238, 238, 232, 0.14);
}
.wig-seal-veil[hidden] { display: none; }

/* mailbox drawer */
.wig-mail-drawer { position: fixed; inset: 0; z-index: 80; }
.wig-mail-backdrop { position: absolute; inset: 0; background: rgba(10, 24, 40, 0.42); }
.wig-mail-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(720px, 96vw);
  background: #f2f5f8; border-left: 1px solid #c3cfdb; box-shadow: -12px 0 30px rgba(10, 24, 40, .25);
  display: flex; flex-direction: column;
}
.wig-mail-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--portal-blue); color: #fff;
}
.wig-mail-head h2 { margin: 0; font-size: 16px; }
.wig-mail-close {
  background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.4);
  padding: 4px 12px; cursor: pointer; font-size: 13px;
}
.wig-mail-root { flex: 1; overflow: auto; padding: 12px 14px; }

main#main-content:focus { outline: none; }
.wig-main-loading { opacity: .55; }
.wig-main-enter { animation: wig-enter .3s cubic-bezier(.22, .61, .36, 1); }
@keyframes wig-enter { from { opacity: .3; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ============ motion layer ============ */
@keyframes wig-fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes caret-blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }
@keyframes stamp-in {
  0% { opacity: 0; transform: scale(2.1) rotate(-16deg); }
  62% { opacity: 1; transform: scale(.94) rotate(-4deg); }
}
@keyframes soft-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(22,73,140,.28); } 50% { box-shadow: 0 0 0 5px rgba(22,73,140,0); } }

/* page-content cascade: every major surface fades up once per navigation */
main#main-content :is(.portal-hero,.portal-card,.doc-article,.query-panel,.oa-titlebar,.oa-panel,.rollcall-sheet,.file-manager,.print-stage,.paper-a4,.term-frame,.topology-svg,.session-table,.log-stream,.ending-scene,.reversal-banner,.archive-paper,.qa-window,.final-original-mail,.final-compare,.bbs-thread,.film-gallery,.film-viewer,.teacher-grid,.handover-entry) {
  animation: wig-fade-up .5s cubic-bezier(.22,.61,.36,1) both;
}
main#main-content :is(.portal-card,.oa-panel,.term-frame,.bbs-thread,.final-option):nth-of-type(2) { animation-delay: .07s; }
main#main-content :is(.portal-card,.oa-panel,.term-frame,.bbs-thread,.final-option):nth-of-type(3) { animation-delay: .13s; }
main#main-content :is(.portal-card,.oa-panel,.term-frame,.bbs-thread,.final-option):nth-of-type(4) { animation-delay: .19s; }
main#main-content :is(.portal-card,.oa-panel,.term-frame,.bbs-thread,.final-option):nth-of-type(5) { animation-delay: .25s; }

/* stamps land instead of just appearing */
.stamp-mark { animation: stamp-in .38s cubic-bezier(.34,1.56,.64,1) both; }

/* terminal: CRT scanlines + typing caret */
body[data-wig-shell-mode="term"] .term-page::before,
.term-page::before {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(159,220,176,.045) 0 1px, transparent 1px 3px);
}
.term-frame > h1::after {
  content: "▌"; margin-left: 7px; color: var(--term-dim);
  animation: caret-blink 1.15s steps(1, end) infinite;
}

/* buttons: tactile press + hover lift */
.oa-button, .wig-tool-button, .term-button, .play-button, .site-search button {
  transition: transform .08s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
}
.oa-button:active, .wig-tool-button:active, .term-button:active, .play-button:active, .site-search button:active { transform: translateY(1px); }
.portal-quicklinks a, .row-actions .oa-button { transition: transform .12s ease, box-shadow .18s ease, border-color .15s ease, color .15s ease; }
.portal-quicklinks a:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(20, 40, 70, .14); }
.wig-progress-badge[data-progress-percent]:not([data-progress-percent=""]) { animation: soft-pulse 2.6s ease-in-out infinite; }

/* mailbox drawer: slide + backdrop fade */
.wig-mail-panel {
  transform: translateX(calc(100% + 46px));
  transition: transform .32s cubic-bezier(.22,.61,.36,1);
}
.wig-mail-drawer:not([hidden]) .wig-mail-panel { transform: translateX(0); }
.wig-mail-backdrop { opacity: 0; transition: opacity .26s ease; }
.wig-mail-drawer:not([hidden]) .wig-mail-backdrop { opacity: 1; }

/* unread badge breathing */
.todo-state.is-open { animation: soft-pulse 2.4s ease-in-out infinite; }

/* ============ search component (shared) ============ */
.site-search { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.site-search input[type="search"], .site-search input[type="text"] {
  flex: 1 1 180px; min-width: 0; padding: 7px 10px; font-size: 14px;
  border: 1px solid var(--portal-line); background: #fff; color: inherit;
}
.site-search button {
  padding: 7px 18px; background: var(--portal-blue); color: #fff;
  border: 1px solid var(--portal-blue-deep); cursor: pointer; font-size: 14px;
}
.site-search button:hover { background: var(--portal-blue-deep); }
.search-result { margin-top: 8px; font-size: 13px; min-height: 20px; color: #4a5a70; }
.search-result[data-search-state="unmatched"] { color: #9a3b2f; }
.search-result[data-search-state="located"] { color: #2c6e49; }
.search-backlink {
  display: inline-block; margin-left: 10px; font-size: 12px;
  color: #24507e; border-bottom: 1px dashed #9db4cd; text-decoration: none; cursor: pointer;
}
.search-backlink:hover { color: var(--portal-blue); border-bottom-color: var(--portal-blue); }

/* ============================================================
   PORTAL system (public school website)
   ============================================================ */

.portal-page { background: var(--portal-sky); }
.portal-layout {
  max-width: 1080px; margin: 14px auto 28px; padding: 0 16px;
  display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px;
}
.portal-layout.no-sidebar { grid-template-columns: minmax(0, 1fr); }
.portal-side, .portal-main { min-width: 0; }
.portal-card {
  background: #fff; border: 1px solid var(--portal-line); margin-bottom: 16px;
}
.portal-card-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 10px 14px; border-bottom: 2px solid var(--portal-blue);
}
.portal-card-head h2, .portal-card-head h1 { margin: 0; font-size: 17px; color: var(--portal-blue-deep); }
.portal-card-head a, .portal-card-head span { font-size: 12px; color: #7d8ca1; text-decoration: none; }
.portal-card-body { padding: 12px 14px; }

.portal-breadcrumb { font-size: 12.5px; color: #66748a; margin: 0; padding: 10px 0 0; }
.portal-breadcrumb a { color: #4a6ea8; text-decoration: none; }

.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li {
  display: flex; gap: 10px; align-items: baseline;
  padding: 8px 2px; border-bottom: 1px dashed var(--portal-line); font-size: 14px;
}
.news-list li:last-child { border-bottom: 0; }
.news-list time { flex: none; color: #8a97ab; font-size: 12.5px; }
.new-badge {
  display: inline-block; margin-left: 6px; padding: 0 5px; font-size: 10.5px; line-height: 1.5;
  background: #c23b2e; color: #fff; border-radius: 2px; vertical-align: 1px; letter-spacing: 1px;
}
/* image slots */
.doc-figure { margin: 0 0 16px; }
.doc-figure img { width: 100%; display: block; border: 1px solid var(--portal-line); background: #e8ecf1; }
.doc-figure figcaption { font-size: 12px; color: #7d8ca1; padding: 6px 2px 0; }
.portal-banner img { aspect-ratio: 1200 / 420; object-fit: cover; }
.doc-figure.half-row img { aspect-ratio: 900 / 560; object-fit: cover; }
.doc-figure.history-row img { aspect-ratio: 760 / 500; object-fit: cover; }
.formal-image-fallback { margin: 8px 0 0; padding: 8px 10px; border: 1px dashed var(--portal-line); background: #f5f7fa; color: #53647a; font-size: 12px; line-height: 1.55; }
.broadcast-room-image img { aspect-ratio: 22 / 13; object-fit: cover; }
.alumni-group-image img { aspect-ratio: 5 / 3; object-fit: cover; }
.school-song-image img { aspect-ratio: 10 / 7; object-fit: contain; }
.formal-rollcall-image { width: min(320px, 100%); margin: 0; }
.formal-rollcall-image img { display: block; width: 100%; aspect-ratio: 16 / 11; object-fit: cover; border: 1px solid #b9c4bb; background: #dfe4dc; }
.id-photo-real { position: absolute; inset: 0; z-index: 2; width: 56px; height: 72px; object-fit: cover; border: 0; background: #dfe7f2; }
.teacher-image-fallback { display: block; margin-bottom: 4px; color: #53647a; font-size: 11px; line-height: 1.35; }
.paper-photo-real { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; }
.paper-photo-box[data-version="develop"] .paper-photo-real { opacity: .45; filter: blur(1.5px) grayscale(.4); }
.paper-photo-box[data-version="gaze"] .paper-photo-real { opacity: .92; filter: grayscale(.15); }
.paper-photo-fallback:not([hidden]) { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; padding: 8px; background: rgba(236,234,226,.94); color: #4e4b43; font-size: 10px; line-height: 1.35; text-align: center; }
.news-list a { color: #26466e; text-decoration: none; }
.news-list a:hover { color: var(--portal-blue); text-decoration: underline; }

.portal-hero {
  background: linear-gradient(160deg, #ffffff 0%, #eaf1fa 100%);
  border: 1px solid var(--portal-line); padding: 22px 26px; margin-bottom: 16px;
}
.portal-hero h1 { margin: 0 0 10px; font-size: 24px; color: var(--portal-blue-deep); letter-spacing: 1px; }
.portal-hero h1 small { font-size: 14px; font-weight: 400; color: #6d7f96; letter-spacing: 3px; margin-left: 12px; }
/* portal top utility bar */
.portal-topbar {
  background: var(--portal-blue-deep); color: #cdd9ea; font-size: 12px;
  padding: 6px 16px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.portal-topbar-links a { color: #cdd9ea; text-decoration: none; margin: 0 4px; }
.portal-topbar-links a:hover { color: #fff; text-decoration: underline; }
.portal-topbar i { margin: 0 7px; opacity: .45; font-style: normal; }
/* notice ticker */
.notice-ticker { display: flex; align-items: center; gap: 14px; }
.notice-ticker-label { background: var(--oa-red); color: #fff; font-size: 12.5px; padding: 4px 10px; border-radius: 2px; flex: none; letter-spacing: 2px; }
.notice-ticker-viewport { overflow: hidden; height: 24px; flex: 1; min-width: 0; }
.notice-ticker-track { list-style: none; margin: 0; padding: 0; animation: ticker-up 16s infinite; }
.notice-ticker-track li { height: 24px; line-height: 24px; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notice-ticker-track a { color: #26466e; text-decoration: none; }
.notice-ticker-track a:hover { color: var(--portal-blue); text-decoration: underline; }
@keyframes ticker-up {
  0%, 18% { transform: none; }
  24%, 43% { transform: translateY(-25%); }
  49%, 68% { transform: translateY(-50%); }
  74%, 93% { transform: translateY(-75%); }
  100% { transform: translateY(-100%); }
}
/* headline overlay caption */
.portal-headline { position: relative; }
.portal-headline figcaption {
  position: absolute; left: -1px; right: -1px; bottom: -1px;
  background: linear-gradient(transparent, rgba(10, 25, 45, .8));
  color: #fff; padding: 30px 14px 10px; border: 0;
}
.portal-quicklinks { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.portal-quicklinks a {
  border: 1px solid var(--portal-line); background: #fff; color: #26466e;
  text-decoration: none; font-size: 13.5px; padding: 8px 16px;
}
.portal-quicklinks a:hover { border-color: var(--portal-blue); color: var(--portal-blue); }

.fact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.fact-grid > div { border: 1px solid var(--portal-line); background: #fafcff; padding: 10px 12px; }
.fact-grid span { display: block; font-size: 12px; color: #7d8ca1; }
.fact-grid strong { font-size: 16px; color: var(--portal-blue-deep); }
.stat-note { font-size: 11.5px; color: #9aa7ba; margin: 2px 0 0; }

.doc-article { background: #fff; border: 1px solid var(--portal-line); padding: 22px 26px; }
.doc-article h1 { font-size: 21px; margin: 0 0 4px; color: var(--portal-blue-deep); }
.doc-article .doc-meta { font-size: 12.5px; color: #8a97ab; margin: 0 0 14px; }
.doc-article h2 { font-size: 17px; margin: 20px 0 8px; color: var(--portal-blue-deep); border-left: 4px solid var(--portal-blue); padding-left: 10px; }
.doc-article p { margin: 8px 0; }
.doc-article table { border-collapse: collapse; width: 100%; font-size: 13.5px; margin: 10px 0; }
.doc-article th, .doc-article td { border: 1px solid var(--portal-line); padding: 7px 10px; text-align: left; vertical-align: top; }
.doc-article th { background: var(--portal-sky); font-weight: 600; }

.timeline-year { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--portal-line); }
.timeline-year li { position: relative; padding: 4px 0 12px; }
.timeline-year li::before {
  content: ""; position: absolute; left: -23px; top: 13px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--portal-blue);
}
.timeline-year b { color: var(--portal-blue-deep); }

.teacher-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.teacher-card { border: 1px solid var(--portal-line); background: #fff; padding: 12px; display: flex; gap: 10px; }
.id-photo {
  width: 56px; height: 72px; flex: none; background: linear-gradient(170deg, #dfe7f2, #c6d4e6);
  position: relative; overflow: hidden; border: 1px solid #b6c5d8;
}
.id-photo::after {
  content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 34px; height: 34px; border-radius: 50% 50% 0 0; background: #93a9c4;
}
.id-photo::before {
  content: ""; position: absolute; left: 50%; top: 10px; transform: translateX(-50%);
  width: 20px; height: 20px; border-radius: 50%; background: #a9bcd2; z-index: 1;
}
.teacher-card b { display: block; font-size: 15px; }
.teacher-card small { color: #7d8ca1; font-size: 12px; line-height: 1.6; display: block; }

.notice-tag { display: inline-block; font-size: 11.5px; border: 1px solid currentColor; padding: 0 6px; margin-right: 8px; color: #8a6d1f; }
.notice-tag.is-hot { color: var(--oa-red); }

/* broadcast page */
.broadcast-page { --portal-blue: #1f6e54; --portal-blue-deep: #14503b; --portal-sky: #edf6f1; --portal-line: #cfe4d8; }
.programme-table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.programme-table th, .programme-table td { border: 1px solid var(--portal-line); padding: 7px 10px; text-align: left; }
.programme-table th { background: #e7f3ec; }
.song-row-old td { background: #f2f8f4; }
.play-button {
  border: 1px solid var(--portal-line); background: #fff; cursor: pointer;
  font-size: 12.5px; padding: 3px 10px; color: var(--portal-blue-deep);
}
.play-button:hover { border-color: var(--portal-blue); }

/* xjcx query page */
.query-panel { background: #fff; border: 1px solid var(--portal-line); padding: 20px 22px; }
.query-field { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.query-field input {
  flex: 1 1 220px; padding: 8px 10px; font-size: 15px; border: 1px solid var(--portal-line);
}
.query-result { margin-top: 12px; font-size: 14px; min-height: 24px; }
.query-result[data-state="found"] { color: #2c6e49; }
.query-result[data-state="special"] { color: #8a6d1f; }
.query-result[data-state="none"] { color: #9a3b2f; }

/* ============================================================
   OFFICE system (teacher OA)
   ============================================================ */

.oa-page { background: var(--oa-paper); }
.oa-wrap { max-width: 1080px; margin: 14px auto 30px; padding: 0 16px; }
.oa-titlebar {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-bottom: 3px double var(--oa-green); padding-bottom: 8px; margin-bottom: 14px;
}
.oa-titlebar h1 { margin: 0; font-size: 20px; color: var(--oa-green); letter-spacing: 2px; }
.oa-titlebar small { color: #6d7a6f; font-size: 12.5px; }
.oa-panel { background: #fff; border: 1px solid var(--oa-line); margin-bottom: 16px; }
.oa-panel-head {
  display: flex; justify-content: space-between; align-items: baseline;
  background: #eef2ee; border-bottom: 1px solid var(--oa-line); padding: 8px 14px;
}
.oa-panel-head h2 { margin: 0; font-size: 15.5px; color: var(--oa-green); }
.oa-panel-head small { color: #77857a; font-size: 12px; }
.oa-panel-body { padding: 12px 14px; }

.todo-list { list-style: none; margin: 0; padding: 0; }
.todo-list li { display: flex; gap: 10px; align-items: baseline; padding: 7px 2px; border-bottom: 1px dotted var(--oa-line); font-size: 14px; }
.todo-list li:last-child { border-bottom: 0; }
.todo-state { flex: none; font-size: 12px; padding: 0 6px; border: 1px solid currentColor; }
.todo-state.is-open { color: var(--oa-red); }
.todo-state.is-done { color: #2c6e49; }
.todo-list a { color: #2c4a38; text-decoration: none; }
.todo-list a:hover { text-decoration: underline; }

.roster-table, .grade-table { border-collapse: collapse; width: 100%; font-size: 13.5px; background: #fff; }
.roster-table th, .roster-table td, .grade-table th, .grade-table td {
  border: 1px solid var(--oa-line); padding: 6px 10px; text-align: left; vertical-align: top;
}
.roster-table thead th, .grade-table thead th { background: #eef2ee; color: var(--oa-green); }
.roster-table tr.is-flagged td { background: #fdf6ec; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.oa-button {
  border: 1px solid var(--oa-green); background: #fff; color: var(--oa-green);
  font-size: 13px; padding: 5px 14px; cursor: pointer;
}
.oa-button:hover { background: var(--oa-green); color: #fff; }
.oa-button[disabled] { opacity: .45; cursor: not-allowed; }
.oa-button.is-primary { background: var(--oa-green); color: #fff; }
.oa-button.is-primary:hover { background: #24402f; }
.oa-feedback { margin: 10px 0 0; font-size: 13px; min-height: 20px; color: #55655a; }
.oa-feedback[data-state="ok"] { color: #2c6e49; }
.oa-feedback[data-state="warn"] { color: #8a6d1f; }
.oa-feedback[data-state="err"] { color: var(--oa-red); }

/* rollcall scan style */
.rollcall-sheet {
  background: #fdfcf7; border: 1px solid #d8d2bd; box-shadow: 0 2px 8px rgba(90, 80, 40, .08);
  padding: 22px 26px; font-family: "SimSun", "Songti SC", serif;
}
.rollcall-sheet h2 { text-align: center; font-size: 19px; letter-spacing: 6px; margin: 0 0 4px; }
.rollcall-sheet .sheet-sub { text-align: center; font-size: 12.5px; color: #7a7460; margin: 0 0 14px; }
.rollcall-summary { display: flex; gap: 26px; justify-content: center; font-size: 15px; margin: 10px 0 14px; }
.rollcall-summary b { font-size: 20px; }
.sheet-note { font-size: 13px; color: #6d6753; border-top: 1px dashed #c9c2a8; padding-top: 10px; }
.stamp-mark {
  display: inline-block; border: 2px solid var(--oa-red); color: var(--oa-red);
  font-size: 13px; padding: 2px 8px; transform: rotate(-6deg); letter-spacing: 2px;
}

/* handover book */
.handover-entry { border-left: 3px solid var(--oa-line); padding: 6px 0 6px 14px; margin: 0 0 14px; }
.handover-entry time { display: block; font-size: 12.5px; color: #77857a; }
.handover-entry p { margin: 4px 0; }
.handover-entry.is-special { border-left-color: #4a6ea8; background: #f5f8fc; }
.handover-sign { font-size: 13px; color: #4a5a70; }

/* file manager */
.file-manager { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 0; border: 1px solid var(--oa-line); background: #fff; }
.file-tree { border-right: 1px solid var(--oa-line); padding: 10px 0; font-size: 13.5px; }
.file-tree ul { list-style: none; margin: 0; padding: 0; }
.file-tree li { padding: 0; }
.file-tree button {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  padding: 6px 14px; cursor: pointer; font-size: 13.5px; color: #2c4a38;
}
.file-tree button:hover { background: #eef2ee; }
.file-tree button[aria-expanded="true"], .file-tree button.is-current { background: #e2ebe3; font-weight: 600; }
.file-pane { padding: 12px 16px; min-height: 300px; }
.file-list { list-style: none; margin: 0; padding: 0; }
.file-list li { display: flex; gap: 10px; align-items: baseline; padding: 6px 2px; border-bottom: 1px dotted var(--oa-line); font-size: 13.5px; }
.file-list li:last-child { border-bottom: 0; }
.file-list .file-size { margin-left: auto; color: #8a978c; font-size: 12px; flex: none; }
.file-list button { background: none; border: 0; color: #24507e; cursor: pointer; font-size: 13.5px; padding: 0; text-decoration: underline; }
.file-preview { border-top: 1px solid var(--oa-line); background: #fbfcfa; padding: 14px 16px; font-size: 13.5px; }
.file-preview h3 { margin: 0 0 8px; font-size: 14.5px; color: var(--oa-green); }
.doc-viewer { background: #fff; border: 1px solid var(--oa-line); padding: 18px 22px; }
.doc-viewer h4 { text-align: center; margin: 0 0 2px; font-size: 16px; letter-spacing: 2px; }
.doc-viewer .doc-number { text-align: center; font-size: 12px; color: #77857a; margin: 0 0 12px; }
.doc-viewer table { border-collapse: collapse; width: 100%; font-size: 13px; margin: 8px 0; }
.doc-viewer th, .doc-viewer td { border: 1px solid var(--oa-line); padding: 5px 9px; text-align: left; }

/* print preview */
.print-stage { background: #8f979b; padding: 26px 12px; display: flex; justify-content: center; }
.paper-a4 {
  background: #fffdf8; width: min(660px, 100%); min-height: 840px; padding: 46px 52px;
  box-shadow: 0 4px 18px rgba(30, 40, 50, .35); font-family: "SimSun", "Songti SC", serif;
  color: #222; position: relative;
}
.paper-a4 h2 { text-align: center; letter-spacing: 8px; font-size: 22px; margin: 0 0 2px; }
.paper-a4 .paper-sub { text-align: center; font-size: 12px; color: #555; margin: 0 0 18px; }
.paper-table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.paper-table th, .paper-table td { border: 1px solid #333; padding: 6px 10px; text-align: left; }
.paper-table th { background: #f0ede2; font-weight: 600; }
.paper-photo-box {
  float: right; width: 92px; height: 120px; margin: 0 0 10px 14px;
  border: 1px solid #333; background: #eceae2; position: relative; overflow: hidden;
}
.paper-photo-box .photo-latent {
  position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease;
  background:
    radial-gradient(circle at 62% 34%, rgba(40, 50, 60, .85) 0 7%, transparent 8%),
    radial-gradient(ellipse at 50% 88%, rgba(40, 50, 60, .5) 0 30%, transparent 32%),
    linear-gradient(165deg, rgba(120, 130, 140, .35), rgba(70, 80, 90, .5));
}
.paper-photo-box[data-version="develop"] .photo-latent { opacity: .55; }
.paper-photo-box[data-version="gaze"] .photo-latent { opacity: .85; }
.photo-caption { clear: both; font-size: 11.5px; color: #777; }
.print-toolbar { display: flex; gap: 10px; justify-content: center; padding: 14px 0; flex-wrap: wrap; }

/* ============================================================
   TERMINAL system (legacy node)
   ============================================================ */

.term-page { background: var(--term-bg); color: var(--term-ink); font-family: var(--wig-mono); }
.term-wrap { max-width: 1020px; margin: 16px auto 40px; padding: 0 16px; }
.term-frame { border: 1px solid var(--term-line); background: var(--term-panel); padding: 14px 18px; margin-bottom: 16px; }
.term-frame > h1, .term-frame > h2 { font-size: 15px; letter-spacing: 2px; margin: 0 0 10px; color: var(--term-ink); }
.term-frame h1::before, .term-frame h2::before { content: "▚ "; color: var(--term-dim); }
.term-note { font-size: 12.5px; color: var(--term-dim); line-height: 1.8; }
.term-statusline { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--term-dim); border-bottom: 1px dashed var(--term-line); padding-bottom: 8px; margin-bottom: 10px; }
.term-statusline b { color: var(--term-ink); font-weight: 400; }

.topology-svg { display: block; width: 100%; height: auto; }
.node-dot { fill: var(--term-ink); }
.node-label { fill: var(--term-ink); font-size: 12px; font-family: var(--wig-mono); }
.node-label.dim { fill: var(--term-dim); }
.node-link { stroke: var(--term-line); stroke-width: 1.2; }
.node-unknown { animation: node-blink 2.4s steps(2, jump-none) infinite; }
@keyframes node-blink { 0% { opacity: 1; } 100% { opacity: .25; } }
.session-table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.session-table th, .session-table td { border: 1px solid var(--term-line); padding: 5px 10px; text-align: left; }
.session-table th { color: var(--term-dim); font-weight: 400; }
.term-button {
  background: transparent; border: 1px solid var(--term-line); color: var(--term-ink);
  font-family: var(--wig-mono); font-size: 13px; padding: 5px 14px; cursor: pointer;
}
.term-button:hover { background: rgba(159, 220, 176, 0.12); }
.term-button[disabled] { opacity: .4; cursor: not-allowed; }
.term-confirm { margin-top: 10px; font-size: 12.5px; color: var(--term-dim); min-height: 18px; }

.log-stream { list-style: none; margin: 0; padding: 0; font-size: 13px; line-height: 1.9; }
.log-stream li { border-bottom: 1px dashed rgba(159, 220, 176, 0.14); padding: 4px 0; word-break: break-all; }
.log-stream time { color: var(--term-dim); margin-right: 10px; }
.log-stream .log-tag { color: #d8c07a; }
.log-stream .log-player { color: #7ec8e3; }
.log-order-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 10px 0; font-size: 12.5px; color: var(--term-dim); }
.log-order-controls select {
  background: var(--term-bg); color: var(--term-ink); border: 1px solid var(--term-line);
  font-family: var(--wig-mono); padding: 4px 8px;
}

/* BBS archive */
.bbs-thread { border: 1px solid var(--term-line); margin-bottom: 12px; }
.bbs-post { padding: 10px 14px; border-bottom: 1px dashed var(--term-line); font-size: 13px; }
.bbs-post:last-child { border-bottom: 0; }
.bbs-post header { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--term-dim); margin-bottom: 4px; }
.bbs-post header b { color: var(--term-ink); font-weight: 400; }
.bbs-post p { margin: 4px 0; }
.bbs-crosslink { color: #7ec8e3; }

/* film cabinet */
.film-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.film-frame {
  border: 1px solid var(--term-line); background: #050d07; padding: 8px; cursor: pointer;
  text-align: center; font-size: 12px; color: var(--term-dim);
}
.film-frame:hover, .film-frame.is-current { border-color: var(--term-ink); color: var(--term-ink); }
.film-image-shell { position: relative; display: block; width: 100%; aspect-ratio: 8 / 5; overflow: hidden; background: #101c12; }
.film-image-shell img { display: block; width: 100%; height: 100%; object-fit: cover; }
.film-image-fallback:not([hidden]) { display: grid; width: 100%; height: 100%; place-items: center; padding: 10px; color: var(--term-dim); font-size: 11px; line-height: 1.4; }
.film-viewer { border: 1px solid var(--term-line); background: #050d07; padding: 16px; margin-top: 14px; }
.film-viewer .film-image-shell { max-width: 960px; margin: 0 auto; }
.film-duty-label { position: absolute; left: 22%; top: 58%; padding: 3px 6px; border: 1px solid rgba(71,63,45,.65); background: rgba(222,213,185,.88); color: #312d24; font: 12px/1.2 "SimSun", "Songti SC", serif; transform: rotate(-1deg); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.film-caption { font-size: 12.5px; color: var(--term-dim); margin-top: 8px; min-height: 18px; }

/* ============================================================
   FINAL decision + endings
   ============================================================ */

.final-compare { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.final-option {
  border: 1px solid var(--oa-line); background: #fff; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px;
}
.final-option h3 { margin: 0; font-size: 16px; color: var(--oa-green); }
.final-option dl { margin: 0; font-size: 13px; }
.final-option dt { color: #77857a; font-size: 12px; margin-top: 6px; }
.final-option dd { margin: 1px 0 0; }
.final-option label { display: flex; gap: 8px; align-items: baseline; font-size: 13.5px; margin-top: 8px; }
.final-warning { border: 1px solid var(--oa-red); background: #fdf3f1; color: var(--oa-red); padding: 10px 14px; font-size: 13px; margin: 12px 0; }
.final-original-mail { background: #fff; border: 1px dashed var(--oa-line); padding: 14px 18px; font-size: 13px; color: #4a5a70; }
.final-original-mail mark { background: #fdf0c8; padding: 0 2px; }

.ending-stage { max-width: 860px; margin: 30px auto; padding: 0 16px; }
.ending-scene { border: 1px solid var(--term-line); background: var(--term-panel); padding: 26px 30px; font-family: var(--wig-mono); color: var(--term-ink); }
.ending-scene h1 { font-size: 18px; letter-spacing: 4px; margin: 0 0 14px; }
.ending-scene p { font-size: 13.5px; line-height: 2; margin: 10px 0; }
.ending-scene .dim { color: var(--term-dim); }
.ending-actions { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }

/* reversal page */
.reversal-banner {
  max-width: 860px; margin: 26px auto; padding: 22px 26px;
  border: 1px solid var(--term-line); background: var(--term-panel); color: var(--term-ink); font-family: var(--wig-mono);
}
.reversal-banner h1 { font-size: 16px; letter-spacing: 3px; margin: 0 0 10px; }
.reversal-banner p { font-size: 13px; line-height: 2; }
.reversal-plan { border: 1px dashed var(--term-line); padding: 12px 16px; margin: 12px 0; font-size: 12.5px; color: var(--term-dim); }

/* ============================================================
   G01 mail client (Win7-flavoured desktop app)
   ============================================================ */

.g01-page {
  background: linear-gradient(180deg, #2f6fb4 0%, #1d4f86 46%, #123a67 100%);
  min-height: 100dvh; display: grid; place-items: center; padding: 28px; overflow: auto;
}
.g01-desktop-hint { position: fixed; left: 0; right: 0; bottom: 16px; text-align: center; color: rgba(255,255,255,.85); font-size: 13px; }
@media (max-width: 700px) {
  .g01-page { padding-bottom: 24px; }
  .g01-desktop-hint { position: static; margin-top: 14px; }
}
.g01-window {
  width: min(980px, 100%); background: #f0f0f0; border: 1px solid #10305a;
  box-shadow: 0 18px 50px rgba(0, 10, 25, .5); display: flex; flex-direction: column;
  margin-inline: auto;
  height: clamp(520px, calc(100dvh - 170px), 690px);
}
.g01-titlebar {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(180deg, #5b93cf, #2c67b6 55%, #235aa6);
  color: #fff; padding: 7px 12px; font-size: 13.5px;
}
.g01-titlebar .g01-win-buttons { display: flex; gap: 6px; }
.g01-titlebar .g01-win-buttons span {
  width: 26px; height: 18px; border: 1px solid rgba(255,255,255,.55); border-radius: 3px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px;
  background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,.06));
}
.g01-menubar { display: flex; gap: 2px; background: #f6f9fd; border-bottom: 1px solid #d4dfeb; padding: 3px 8px; font-size: 12.5px; color: #2c4a6e; }
.g01-menubar span { padding: 3px 10px; }
.g01-menubar span:hover { background: #e2ecf7; }
.g01-client { flex: 1; display: grid; grid-template-columns: 172px minmax(0, 0.92fr) minmax(0, 1.35fr); min-height: 0; }
.g01-folders { background: #eef3f9; border-right: 1px solid #d4dfeb; padding: 10px 0; font-size: 13.5px; }
.g01-folders ul { list-style: none; margin: 0; padding: 0; }
.g01-folders li { padding: 0; }
.g01-folders button {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  padding: 7px 16px; font-size: 13.5px; color: #24425f; cursor: pointer;
}
.g01-folders button.is-current { background: #d8e6f5; font-weight: 600; }
.g01-folders .folder-count { color: #6b84a0; font-size: 12px; }
.g01-list-pane { border-right: 1px solid #d4dfeb; overflow: auto; background: #fff; }
.g01-thread-item {
  display: flex; gap: 8px; align-items: baseline; width: 100%;
  background: none; border: 0; border-bottom: 1px solid #eef2f7;
  padding: 9px 12px; cursor: pointer; text-align: left; font-size: 13px; color: #2c4a6e;
}
.g01-thread-item:hover { background: #f2f7fc; }
.g01-thread-item.is-current { background: #dcebf9; }
.g01-thread-item.is-unread { font-weight: 700; }
.g01-thread-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: transparent; border: 1px solid #b9c9da; }
.is-unread .g01-thread-dot { background: #2c67b6; border-color: #2c67b6; }
.g01-thread-main { flex: 1; min-width: 0; }
.g01-thread-main b { display: block; font-size: 13px; }
.g01-thread-main small { display: block; color: #6b84a0; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g01-thread-item time { flex: none; font-size: 11.5px; color: #8ba0b5; }
.g01-detail-pane { overflow: auto; background: #fbfdff; padding: 16px 20px; }
.g01-detail h3 { margin: 0 0 6px; font-size: 16px; color: #1d3d5c; }
.g01-detail-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: #6b84a0; border-bottom: 1px solid #e2ebf3; padding-bottom: 8px; margin: 0 0 12px; }
.g01-mail-body p { margin: 8px 0; font-size: 13.5px; color: #2c4258; }
.g01-mail-note { color: #8a6d1f; font-size: 12.5px; border-left: 3px solid #d8c07a; padding-left: 10px; }
.g01-mail-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.g01-mail-links a {
  font-size: 12.5px; color: #24507e; text-decoration: none;
  border: 1px solid #cdd9e6; background: #f7fafd; padding: 4px 12px; border-radius: 3px;
}
.g01-mail-links a:hover { border-color: var(--portal-blue); color: var(--portal-blue); }
.g01-chat-lines { display: flex; flex-direction: column; gap: 8px; }
.g01-chat-line { display: flex; flex-direction: column; font-size: 13.5px; }
.g01-chat-side { font-size: 11.5px; color: #8ba0b5; }
.g01-chat-text { background: #eef4fb; border: 1px solid #dbe7f3; padding: 7px 11px; border-radius: 6px; max-width: 34em; }
.g01-chat-line.is-me { align-items: flex-end; }
.g01-chat-line.is-me .g01-chat-text { background: #dcf0e4; border-color: #c4e2d0; }
.g01-thread-empty { color: #6b84a0; font-size: 13px; padding: 18px; }
.g01-statusbar { display: flex; justify-content: space-between; gap: 10px; background: #eef3f9; border-top: 1px solid #d4dfeb; padding: 5px 12px; font-size: 12px; color: #527092; }
.g01-desktop-hint { position: fixed; left: 0; right: 0; bottom: 14px; text-align: center; color: rgba(255,255,255,.85); font-size: 12.5px; }

.g01-list-pane { overflow-y: auto; }
.g01-desktop-hint a { color: #fff; }
.g01-fallback { text-align: center; padding: 60px 20px; color: #fff; }
.g01-fallback a { color: #cfe2f6; }

/* ============ footer ============ */
.site-footer {
  border-top: 1px solid var(--portal-line); background: #fff; margin-top: 26px;
  font-size: 12.5px; color: #7d8ca1;
}
.site-footer-inner { max-width: 1080px; margin: 0 auto; padding: 14px 16px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.site-footer details summary { cursor: pointer; }
.oa-page .site-footer, .term-page .site-footer { background: transparent; border-color: var(--term-line); color: var(--term-dim); }

/* ============ QA assistant (小七) ============ */
.qa-window { background: #fff; border: 1px solid var(--portal-line); display: flex; flex-direction: column; min-height: 420px; }
.qa-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--portal-line); background: var(--portal-sky); }
.qa-avatar {
  width: 36px; height: 36px; flex: none; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #cfe3f7, #7fa8d4);
  position: relative;
}
.qa-avatar::after {
  content: ""; position: absolute; left: 11px; top: 13px;
  width: 4px; height: 4px; border-radius: 50%; background: #1c2a3a;
  box-shadow: 10px 0 0 #1c2a3a;
}
.qa-head b { font-size: 14.5px; color: var(--portal-blue-deep); }
.qa-head small { display: block; font-size: 11.5px; color: #7d8ca1; }
.qa-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; max-height: 460px; }
.qa-msg { max-width: 85%; font-size: 13.5px; line-height: 1.8; }
.qa-msg.is-bot { align-self: flex-start; background: #f0f5fb; border: 1px solid #dbe7f3; border-radius: 8px 8px 8px 2px; padding: 8px 12px; color: #26466e; }
.qa-msg.is-user { align-self: flex-end; background: #e7f0ea; border: 1px solid #cfe4d8; border-radius: 8px 8px 2px 8px; padding: 8px 12px; color: #2c4a38; }
.qa-msg a { color: #24507e; }
.qa-quick { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 10px; }
.qa-quick button {
  border: 1px solid var(--portal-line); background: #fff; color: #26466e;
  font-size: 12.5px; padding: 5px 12px; cursor: pointer; border-radius: 14px;
}
.qa-quick button:hover { border-color: var(--portal-blue); color: var(--portal-blue); }
.qa-input-row { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--portal-line); background: #fafcff; }
.qa-input-row input { flex: 1; min-width: 0; padding: 8px 10px; font-size: 14px; border: 1px solid var(--portal-line); }
.qa-input-row button { padding: 8px 18px; background: var(--portal-blue); color: #fff; border: 1px solid var(--portal-blue-deep); cursor: pointer; }
.qa-quiz { border: 1px dashed #b8912f; background: #fdf9ee; padding: 10px 12px; margin-top: 6px; font-size: 13px; color: #6d5a1f; }
.qa-quiz input { padding: 5px 8px; width: 8em; border: 1px solid #d8c07a; margin-right: 8px; }

/* ============ archive paper (ex layer) ============ */
.archive-paper {
  background: #fbfaf4; border: 1px solid #d8d2bd; box-shadow: 0 2px 10px rgba(90, 80, 40, .08);
  padding: 30px 40px; font-family: "SimSun", "Songti SC", serif; color: #2a2a24; max-width: 720px; margin: 0 auto;
}
.archive-paper h1 { text-align: center; font-size: 20px; letter-spacing: 4px; margin: 0 0 4px; }
.archive-paper .paper-meta { text-align: center; font-size: 12px; color: #7a7460; margin: 0 0 16px; }
.archive-paper p { margin: 10px 0; line-height: 2; }
.archive-paper .qa-answer { border-left: 3px solid #b8912f; padding-left: 12px; color: #6d5a1f; }
.archive-ex-note { text-align: center; font-size: 12px; color: #9aa090; margin-top: 14px; letter-spacing: 1px; }

/* ============ responsive ============ */
@media (max-width: 900px) {
  .portal-layout { grid-template-columns: minmax(0, 1fr); }
  .file-manager { grid-template-columns: minmax(0, 1fr); }
  .file-tree { border-right: 0; border-bottom: 1px solid var(--oa-line); }
  .final-compare { grid-template-columns: minmax(0, 1fr); }
  .g01-client { grid-template-columns: minmax(0, 1fr); }
  .g01-folders { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid #d4dfeb; }
  .g01-folders ul { display: flex; }
  .g01-folders button { white-space: nowrap; width: auto; }
  .g01-list-pane { max-height: 230px; border-right: 0; border-bottom: 1px solid #d4dfeb; }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .wig-header-inner { flex-direction: column; align-items: flex-start; gap: 6px; }
  .wig-office { text-align: left; }
  .wig-nav-link { padding: 8px 10px; font-size: 13.5px; }
  .doc-article { padding: 16px 16px; }
  .rollcall-sheet { padding: 16px 14px; }
  .paper-a4 { padding: 26px 20px; min-height: 640px; }
  .g01-addr { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* folder tabs: uniform width, always match 收件箱 */
body.g01-page .g01-folders, body.g01-page .g01-folders ul, body.g01-page .g01-folders li { width: 100%; }
body.g01-page .g01-folders button {
  display: block; width: 100%; box-sizing: border-box;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 700px) {
  body.g01-page .g01-folders ul { gap: 4px; }
  body.g01-page .g01-folders button { width: auto; min-width: 86px; text-align: center; padding: 7px 12px; }
}

/* G01: content row always fills window, regardless of folder emptiness */
.g01-client { grid-template-rows: minmax(0, 1fr); }
