[hidden] { display: none !important; }
:root {
  --bg: #f5f6f8; --surface: #fff; --surface-2: #f0f2f5; --fg: #161a1f; --fg-2: #3b434d; --muted: #6b7480;
  --line: #e2e5ea; --line-2: #d3d8df;
  --accent: #1f4e9a; --accent-2: #2f63bd; --accent-soft: #e8eefa; --on-accent: #fff;
  --ok: #1e7a3c; --ok-soft: #e4f4e9; --warn: #a35d00; --warn-soft: #fdf1df; --bad: #b3261e; --bad-soft: #fbe7e5;
  --neutral-soft: #eceff3;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .14);
  --r: 14px; --r-sm: 10px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1216; --surface: #171b21; --surface-2: #1e232a; --fg: #e8eaed; --fg-2: #c3c8cf; --muted: #8f98a3;
    --line: #262c34; --line-2: #333a44;
    --accent: #7ea6ff; --accent-2: #9bbaff; --accent-soft: #1c2a44; --on-accent: #0b1220;
    --ok: #6fcf8c; --ok-soft: #15301f; --warn: #f2b45a; --warn-soft: #33270f; --bad: #ff8a80; --bad-soft: #3a1a18;
    --neutral-soft: #232930;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg); font-size: 15px; line-height: 1.55;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  -webkit-font-smoothing: antialiased; padding-bottom: var(--safe-b);
}
body.lock { overflow: hidden; }
a { color: var(--accent); }
code { white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
h1, h2, h3 { margin: 0; line-height: 1.3; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: var(--bad); }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 960px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); min-width: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 15px; white-space: nowrap; }
.brand-text small { font-size: 12px; color: var(--muted); }
.logo { width: 32px; height: 32px; border-radius: 9px; background: var(--accent); display: grid; place-items: center; flex: none; }
.logo svg { width: 22px; height: 22px; fill: none; stroke: var(--on-accent); stroke-width: 2.6; stroke-linecap: round; }
.logo.big { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 16px; }
.logo.big svg { width: 38px; height: 38px; }
#who { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; flex: 1; }
.brand { flex: none; }
.me { display: flex; align-items: center; gap: 8px; min-width: 0; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.me-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.me-text b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-text small { font-size: 12px; color: var(--muted); }
.tabs { max-width: 960px; margin: 0 auto; display: flex; gap: 4px; padding: 0 12px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { position: relative; padding: 10px 12px 12px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; white-space: nowrap; }
.tabs a.on { color: var(--fg); }
.tabs a.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }

main { max-width: 960px; margin: 0 auto; padding: 20px 16px 48px; }

/* ---------- buttons ---------- */
.btn { font: inherit; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 8px 16px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface);
  color: var(--fg); cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .05s; -webkit-tap-highlight-color: transparent; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-2); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { min-height: 32px; padding: 4px 10px; font-size: 13px; }
.btn.icon { width: 36px; min-height: 36px; padding: 0; }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn svg, .ico { width: 18px; height: 18px; flex: none; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--neutral-soft); color: var(--fg-2); white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.chip.plain::before { display: none; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.info { background: var(--accent-soft); color: var(--accent); }

/* ---------- cards / sections ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; }
.stack { display: grid; gap: 14px; }
.section-title { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .04em; margin: 8px 2px 10px; }
.page-head { margin: 2px 2px 16px; }
.page-head h1 { font-size: 22px; }
.page-head p { margin: 4px 0 0; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty svg { width: 40px; height: 40px; opacity: .5; margin-bottom: 8px; }

/* ---------- login ---------- */
.login-card { max-width: 420px; margin: 6vh auto 0; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 36px 24px 24px; }
.login-card h1 { font-size: 24px; margin-bottom: 6px; }
.login-card #gbtn { display: flex; justify-content: center; margin: 24px 0 8px; min-height: 44px; }
.login-help { text-align: left; font-size: 13px; color: var(--fg-2); background: var(--surface-2); border-radius: var(--r-sm); padding: 12px 14px; margin-top: 18px; display: grid; gap: 6px; }
#devlogin { display: flex; gap: 8px; margin-top: 12px; }
#devlogin input { flex: 1; }
input[type=text], input:not([type]), input[type=email] { font: inherit; padding: 9px 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); color: var(--fg); min-width: 0; }

/* ---------- homework list ---------- */
.hw-card { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; position: relative; overflow: hidden;
  transition: border-color .15s, box-shadow .15s, transform .1s; -webkit-tap-highlight-color: transparent; }
.hw-card:hover { border-color: var(--line-2); box-shadow: var(--shadow-lg); }
.hw-card:active { transform: scale(.995); }
.hw-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--strip, var(--line-2)); }
.hw-card[data-tone=ok] { --strip: var(--ok); } .hw-card[data-tone=warn] { --strip: var(--warn); }
.hw-card[data-tone=bad] { --strip: var(--bad); } .hw-card[data-tone=info] { --strip: var(--accent); }
.hw-main { flex: 1; min-width: 0; }
.kicker { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: .06em; }
.hw-main h3 { font-size: 17px; margin: 2px 0 6px; }
.hw-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 13px; color: var(--muted); }
.hw-side { display: flex; align-items: center; gap: 6px; flex: none; }
.chev { width: 20px; height: 20px; color: var(--muted); }
.score-mini { text-align: right; }
.score-mini b { font-size: 26px; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1; }
.score-mini span { font-size: 13px; color: var(--muted); }

/* ---------- homework detail ---------- */
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; margin: 0 0 12px; padding: 4px 0; }
.back:hover { color: var(--fg); }
.detail-head h1 { font-size: 22px; margin: 4px 0 8px; }
.detail-head .desc { margin: 12px 0 0; color: var(--fg-2); white-space: pre-wrap; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.layout > * { min-width: 0; }
@media (min-width: 900px) { .layout.two { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } .layout.two .side { position: sticky; top: calc(var(--hh, 100px) + 12px); } }

.grade-hero { display: flex; align-items: center; gap: 18px; }
.ring { --p: 0; width: 88px; height: 88px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-2) 0); }
.ring > div { width: 72px; height: 72px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; text-align: center; line-height: 1.05; }
.ring b { font-size: 26px; font-variant-numeric: tabular-nums; }
.ring small { display: block; font-size: 12px; color: var(--muted); }
.overall { margin: 14px 0 0; padding: 12px 14px; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--fg); font-size: 14px; }
.qlist { display: grid; gap: 2px; margin-top: 14px; }
.q { display: grid; grid-template-columns: 30px 1fr auto; gap: 4px 10px; align-items: center; padding: 8px 2px; border-top: 1px solid var(--line); }
.qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; margin-top: 12px; }
.qok { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 6px 4px; border-radius: 8px; background: var(--ok-soft); color: var(--ok); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.qok span { font-weight: 500; opacity: .85; }
.q-n { width: 28px; height: 28px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--fg-2); }
.q-bar { height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.q-bar i { display: block; height: 100%; background: var(--ok); border-radius: 6px; }
.q.lost .q-bar i { background: var(--warn); }
.q-s { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.q.lost .q-s { color: var(--warn); }
.q-c { grid-column: 2 / -1; font-size: 13.5px; color: var(--fg-2); }

/* upload */
.drop { display: block; border: 2px dashed var(--line-2); border-radius: var(--r); padding: 22px 16px; text-align: center; cursor: pointer; background: var(--surface-2); transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop svg { width: 32px; height: 32px; color: var(--accent); }
.drop b { display: block; margin-top: 6px; }
.drop input { display: none; }
.picked { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 12px; }
.thumb { position: relative; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; font-size: 11px; color: var(--muted); text-align: center; padding: 4px; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb .idx { position: absolute; left: 4px; top: 4px; background: rgba(0,0,0,.6); color: #fff; border-radius: 6px; font-size: 11px; padding: 0 6px; font-weight: 700; }
.thumb .rm { position: absolute; right: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; }
.bar { height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; margin-top: 12px; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.tips { margin: 10px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.tips li { margin: 2px 0; }
.sub-status { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- document viewer ---------- */
.docs { padding: 0; overflow: clip; }
.doc-tabs { display: flex; gap: 4px; padding: 8px 8px 0; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.doc-tabs::-webkit-scrollbar { display: none; }
.doc-tabs button { font: inherit; font-size: 14px; font-weight: 600; border: 0; background: none; color: var(--muted); padding: 10px 12px 12px; position: relative; cursor: pointer; white-space: nowrap; }
.doc-tabs button.on { color: var(--fg); }
.doc-tabs button.on::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
.viewer { background: var(--surface-2); }
.vbar { display: flex; align-items: center; gap: 4px; padding: 6px 8px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: var(--hh, 0px); z-index: 5; }
.vbar .grow { flex: 1; }
.vbar .info { font-size: 13px; color: var(--muted); padding: 0 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vpages { padding: 12px; display: grid; gap: 12px; justify-items: center; overflow-x: auto; }
.vpage { background: #fff; box-shadow: var(--shadow); border-radius: 4px; position: relative; overflow: hidden; max-width: none; }
.vpage canvas, .vpage img { display: block; width: 100%; height: auto; }
.vpage .pno { position: absolute; right: 6px; bottom: 6px; font-size: 11px; background: rgba(0,0,0,.55); color: #fff; padding: 0 6px; border-radius: 5px; }
.vmsg { padding: 40px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.viewer.fs { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; }
.viewer.fs .vbar { top: 0; padding-top: max(6px, env(safe-area-inset-top)); }
.viewer.fs .vpages { flex: 1; overflow: auto; overscroll-behavior: contain; align-content: start; padding-bottom: calc(12px + var(--safe-b)); }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; margin: 0 auto 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s ease-in-out infinite; border-radius: var(--r); }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- attendance ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; box-shadow: var(--shadow); }
.stat small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat b { font-size: 24px; font-variant-numeric: tabular-nums; }
.stat.ok b { color: var(--ok); } .stat.info b { color: var(--accent); } .stat.warn b { color: var(--warn); } .stat.bad b { color: var(--bad); }
.att-list { padding: 4px 0; }
.att-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); }
.att-row:first-child { border-top: 0; }
.date-badge { width: 46px; flex: none; text-align: center; line-height: 1.1; }
.date-badge b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.date-badge small { font-size: 11px; color: var(--muted); font-weight: 600; }
.att-row .grow { flex: 1; min-width: 0; }
.att-row .note { font-size: 13px; color: var(--muted); }

/* ---------- admin ---------- */
.admin-hw { display: grid; gap: 12px; }
.admin-hw .top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.kpis { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.kpis b { font-size: 18px; color: var(--fg); font-variant-numeric: tabular-nums; margin-right: 2px; }
.toggle-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--line); }
.tbl-wrap { overflow: auto; max-height: 70vh; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
table.matrix { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13.5px; }
.matrix th, .matrix td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; background: var(--surface); }
.matrix thead th { position: sticky; top: 0; z-index: 2; color: var(--muted); font-weight: 700; font-size: 12.5px; background: var(--surface-2); }
.matrix .stick { position: sticky; left: 0; z-index: 1; text-align: left; border-right: 1px solid var(--line); }
.matrix thead .stick { z-index: 3; }
.matrix .sid { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; display: block; }
.matrix tbody tr:hover td { background: var(--surface-2); }
.matrix .num { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- toast ---------- */
#toast { position: fixed; left: 50%; bottom: calc(20px + var(--safe-b)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg);
  transition: opacity .2s, transform .2s; z-index: 200; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: var(--bad); color: #fff; }

/* ---------- mobile ---------- */
@media (max-width: 640px) {
  main { padding: 14px 12px 40px; }
  .card { padding: 15px; border-radius: 12px; }
  .topbar-in { padding: 8px 12px; }
  .me-text small, .brand-text small { display: none; }
  .tabs { padding: 0 6px; }
  .page-head h1, .detail-head h1 { font-size: 20px; }
  .stats { gap: 6px; }
  .stat { padding: 8px 6px; text-align: center; border-radius: 12px; }
  .stat b { font-size: 20px; }
  .hw-main h3 { font-size: 16px; }
  .vpages { padding: 8px; gap: 8px; }
  .ring { width: 76px; height: 76px; } .ring > div { width: 62px; height: 62px; } .ring b { font-size: 22px; }
  .att-row { padding: 12px 15px; }
  .btn-row .btn.wide-m { flex: 1; }
}
@media (hover: none) { .hw-card:hover { box-shadow: var(--shadow); border-color: var(--line); } }
.overlay { position: fixed; inset: 0; z-index: 100; }
@media (min-width: 900px) { .layout.two .side { order: 2; } }
.vtitle { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; padding: 0 4px; }
.linkchip { border: 0; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600; }
.linkchip:hover { filter: brightness(.95); text-decoration: underline; }
.sub-row { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); }
.sub-row:first-child { border-top: 0; }
.sub-row .grow { flex: 1; min-width: 0; }
.sub-row .num { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent); }
.sub-row.none b { color: var(--muted); }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { font: inherit; font-size: 13.5px; font-weight: 600; border: 0; background: none; color: var(--muted); padding: 6px 14px; border-radius: 8px; cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--fg); box-shadow: var(--shadow); }
@media (max-width: 640px) { .viewer.fs:has(.vtitle) .vbar .info, .viewer.fs:has(.vtitle) .vbar [data-z="0"] { display: none; } }
.rowlink { color: inherit; text-decoration: none; display: block; }
.rowlink:hover b { color: var(--accent); text-decoration: underline; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.row-between .back { margin: 0; }
.matrix a.num { color: var(--accent); text-decoration: none; }
.matrix a.num:hover { text-decoration: underline; }
.attach { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.attach .btn { max-width: 100%; }

/* ---------- 簽到單 ---------- */
.sheet-form { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.sheet-form label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.sheet-form input { font: inherit; font-size: 15px; color: var(--fg); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 7px 10px; min-height: 40px; }
.sheet-form input[type=number] { width: 84px; }
#print-sheet { display: none; }
@media print {
  @page { size: A4 portrait; margin: 12mm 12mm 10mm; }
  body { background: #fff !important; padding: 0; }
  body > *:not(#print-sheet) { display: none !important; }
  #print-sheet { display: block; color: #000; font-family: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif; }
  .ps-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 4mm; }
  .ps-title { font-size: 20pt; font-weight: 700; }
  .ps-sub { font-size: 10pt; color: #444; }
  .ps-date { font-size: 14pt; font-weight: 600; text-align: right; }
  .ps-date b { margin-left: 3mm; padding: 1mm 3mm; border: 1.5px solid #000; border-radius: 2mm; }
  .ps-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12.5pt; }
  .ps-table th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; font-size: 11pt; height: 8mm; }
  .ps-table th, .ps-table td { border: 1px solid #000; padding: 0 2mm; text-align: center; }
  .ps-table td { height: var(--rh); }
  .ps-table td:nth-child(3) { text-align: left; padding-left: 3mm; }
  .ps-table .ps-id { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
  .ps-table tr { break-inside: avoid; }
  .ps-foot { margin-top: 3mm; font-size: 9pt; color: #555; text-align: right; }
}
