:root {
  --ink: #1c2333;
  --ink-2: #4a5468;
  --ink-3: #7a8499;
  --line: #e8ecf2;
  --line-soft: #f3f5f9;
  --border-subtle: rgba(28, 35, 51, 0.08);
  --paper: #f4f6fb;
  --panel: #ffffff;
  --accent: #3b6cff;
  --accent-soft: #eef2ff;
  --accent-glow: rgba(59, 108, 255, 0.1);
  --accent-border: rgba(59, 108, 255, 0.28);
  --c-class: #6366f1;
  --c-affairs: #10b981;
  --c-comms: #f59e0b;
  --c-lib: #8b5cf6;
  --c-home: #3b6cff;
  --warm: #ff7a45;
  --warm-soft: #fff2e8;
  --grad-blue: linear-gradient(135deg, #5b8cff 0%, #3b6cff 52%, #2f5bff 100%);
  --grad-warm: linear-gradient(135deg, #ffb37a 0%, #ff7a45 100%);
  --warn: #c2410c;
  --warn-bg: #fff7ed;
  --boy: #2563eb;
  --girl: #db2777;
  --shadow: 0 8px 24px rgba(59, 108, 255, 0.1);
  --shadow-lg: 0 14px 36px rgba(59, 108, 255, 0.14);
  --shadow-card:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 8px 24px rgba(15, 23, 42, 0.05);
  --shadow-card-hover:
    0 4px 12px rgba(15, 23, 42, 0.06),
    0 16px 40px rgba(59, 108, 255, 0.12);
  --shadow-elevated:
    0 4px 12px rgba(15, 23, 42, 0.06),
    0 20px 48px rgba(15, 23, 42, 0.1);
  --radius: 18px;
  --nav-h: 58px;
  --side-w: 220px;
  --side-w-collapsed: 64px;
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei UI", sans-serif;
  --display: "Noto Sans SC", "PingFang SC", "Microsoft YaHei UI", sans-serif;
  --lat: "Barlow Semi Condensed", "Barlow", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 8% -10%, rgba(91, 140, 255, 0.12), transparent 55%),
    radial-gradient(700px 380px at 96% 0%, rgba(255, 122, 69, 0.08), transparent 50%),
    var(--paper);
}
body.no-scroll { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.app-body {
  flex: 1;
  display: flex;
  min-height: 0;
  align-items: stretch;
}
.side-backdrop {
  display: none;
}
.side-nav {
  position: sticky;
  top: var(--nav-h);
  align-self: flex-start;
  width: var(--side-w);
  height: calc(100vh - var(--nav-h));
  flex: none;
  background: #fff;
  border-right: 1px solid var(--border-subtle);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 15;
  transition: width 0.2s ease, transform 0.2s ease;
}
.side-nav-inner {
  padding: 12px 10px 28px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.side-group-label {
  margin: 14px 10px 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  text-transform: none;
}
.side-group-label::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: middle;
  background: currentColor;
  opacity: 0.9;
}
.side-group-label.c-class { color: var(--c-class); }
.side-group-label.c-affairs { color: var(--c-affairs); }
.side-group-label.c-comms { color: var(--c-comms); }
.side-group-label.c-lib { color: var(--c-lib); }
.side-group-label.c-home { color: var(--c-home); }
.side-group-label:first-child { margin-top: 4px; }
.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: background 0.15s ease, color 0.15s ease;
}
.side-link:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.side-link.is-active {
  background: transparent;
  color: var(--accent);
  border-left-color: transparent;
  font-weight: 650;
}
.side-link .side-ico {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #f3f4f6;
  color: #64748b;
  transition: all 0.15s ease;
}
.side-link:hover .side-ico {
  background: var(--accent-soft);
  color: var(--accent);
}
.side-link.is-active .side-ico {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(59, 108, 255, 0.32);
}
.side-link.c-class:hover .side-ico,
.side-link.c-class.is-active .side-ico { background: var(--c-class); color: #fff; box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3); }
.side-link.c-affairs:hover .side-ico,
.side-link.c-affairs.is-active .side-ico { background: var(--c-affairs); color: #fff; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.28); }
.side-link.c-comms:hover .side-ico,
.side-link.c-comms.is-active .side-ico { background: var(--c-comms); color: #fff; box-shadow: 0 4px 12px rgba(245, 158, 11, 0.28); }
.side-link.c-lib:hover .side-ico,
.side-link.c-lib.is-active .side-ico { background: var(--c-lib); color: #fff; box-shadow: 0 4px 12px rgba(139, 92, 246, 0.28); }
.side-link.c-set:hover .side-ico,
.side-link.c-set.is-active .side-ico { background: #64748b; color: #fff; box-shadow: 0 4px 12px rgba(100, 116, 139, 0.28); }
.side-link .side-ico svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.side-link .side-label {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.side-link .side-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
}
.side-link .side-soon {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  color: #9ca3af;
  letter-spacing: 0.04em;
}
.side-collapse {
  position: sticky;
  top: 8px;
  float: right;
  margin: 4px 6px 0 0;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-3);
  font-size: 16px;
  line-height: 1;
  z-index: 2;
}
.app-shell.side-collapsed .side-link .side-ico {
  width: 32px;
  height: 32px;
}
.app-shell.side-collapsed .side-group-label,
.app-shell.side-collapsed .side-label,
.app-shell.side-collapsed .side-soon {
  display: none;
}
.app-shell.side-collapsed .side-link {
  justify-content: center;
  padding: 10px 0;
  border-left-width: 0;
}
.app-shell.side-collapsed .side-collapse {
  float: none;
  display: block;
  margin: 8px auto 4px;
}
.side-toggle {
  display: none;
  flex: none;
  width: 36px;
  height: 36px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: #fff;
}
.side-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
}
.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.app-shell.stage-on .chrome,
.app-shell.stage-on .side-nav,
.app-shell.stage-on .side-backdrop,
.app-shell.stage-on .app-foot,
.app-shell.stage-on .site-after,
.app-shell.stage-on #statusBar { display: none !important; }
.app-shell.stage-on .app-body { display: block; }
.app-shell.stage-on .app-main { min-height: 100vh; }
.app-shell.stage-on {
  height: 100vh;
  overflow: hidden;
  background: #0c0d10;
}
.app-shell.stage-on #view {
  height: 100vh;
  max-width: none;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #0c0d10;
  color: #fff;
}
html:has(.app-shell.stage-on),
body:has(.app-shell.stage-on) {
  height: 100%;
  overflow: hidden;
  background: #0c0d10;
}
.app-shell.stage-on.stage-score,
.app-shell.stage-on.stage-score #view,
html:has(.app-shell.stage-on.stage-score),
body:has(.app-shell.stage-on.stage-score) {
  background: #0c0d10;
  color: #fff;
}

.chrome {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid rgba(229, 231, 235, 0.7);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(16px);
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex: none;
}
.brand h1 {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
}
.brand .tag { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.chrome-mid {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.chrome-mid select,
.chrome-class-name {
  height: 34px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  min-width: 0;
  max-width: 240px;
  font: inherit;
  font-weight: 650;
  color: var(--ink);
}
.chrome-class-name {
  min-width: 120px;
  max-width: 200px;
}
.chrome-class-name:focus {
  outline: none;
  border-color: #3b6cff;
}
.chrome-class-pick { max-width: 168px; }
.chrome-plus { width: 34px; padding: 0; flex: none; }
.chrome-menu-btn {
  display: none;
  flex: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  padding: 0;
}
.chrome-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chrome-actions[hidden] { display: none !important; }
.chrome-home {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}
.chrome-home:hover {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: #c7d2fe;
}

.sync-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.sync-modal[hidden] { display: none !important; }
.sync-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.sync-modal-card {
  position: relative;
  width: min(420px, 100%);
  background: #fff;
  border-radius: 18px;
  padding: 28px 24px 24px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.2);
  z-index: 1;
}
.sync-modal-x {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: var(--ink-3);
  cursor: pointer;
  border-radius: 10px;
}
.sync-modal-x:hover { background: var(--line-soft); color: var(--ink); }
.sync-modal-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
}
.sync-modal-card .hint {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
}
.sync-code-display {
  font-family: "Barlow Semi Condensed", "Barlow", sans-serif;
  font-size: 42px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-align: center;
  padding: 16px 8px 16px 0.28em;
  margin: 0 0 14px;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  color: var(--ink);
}
.sync-code-input {
  width: 100%;
  height: 52px;
  font-family: "Barlow Semi Condensed", "Barlow", sans-serif;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-align: center;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 0 12px;
  margin-bottom: 14px;
}
.sync-modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.sync-modal-status {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--ink-3);
  min-height: 1.2em;
}
.sync-modal-status.is-err { color: #b91c1c; }
.sync-modal-status.is-ok { color: #047857; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  padding: 0 12px;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: all 0.18s ease;
}
.btn:hover {
  background: #f8fafc;
  border-color: #d7dde8;
  transform: translateY(-1px);
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px rgba(47, 91, 255, 0.22);
}
.btn.primary:hover {
  background: #264de8;
  box-shadow: 0 8px 20px rgba(47, 91, 255, 0.28);
}
.btn.ghost { background: transparent; }
.btn.warn { background: var(--warn-bg); border-color: #f0c7b0; color: var(--warn); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.quiet {
  height: 32px;
  padding: 0 6px;
  border: none;
  background: transparent;
  color: var(--ink-3);
  font-weight: 600;
  font-size: 14px;
}
.quiet.on, .quiet:hover { color: var(--ink); }
.quiet:disabled { opacity: .35; }

#view {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 20px 32px;
}
.site-after {
  width: 100%;
  max-width: 900px;
  margin: 28px auto 0;
  padding: 28px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-top: 1px dashed #d7dde8;
  background: transparent;
  box-shadow: none;
}
.support-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  border: 1px solid #dbeafe;
}
.support-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: min(100%, 280px);
  flex: 1;
}
.support-copy strong {
  font-size: 15px;
  color: var(--ink);
}
.support-copy span {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
}
.support-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  flex: none;
}
.support-strip .foot-follow a,
.support-strip .foot-follow button {
  color: #64748b;
  background: #fff;
  border: 1px solid #e2e8f0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
}
.support-strip .foot-follow a:hover,
.support-strip .foot-follow button:hover {
  background: #fff;
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}
.support-strip .foot-follow .f-wechat:hover { color: #07c160; border-color: #bbf7d0; }
.support-strip .foot-follow .f-xhs:hover { color: #ff2442; border-color: #fecdd3; }
.support-strip .foot-follow .f-bili:hover { color: #00a1d6; border-color: #bae6fd; }
.faq-block {
  padding: 4px 2px 0;
}
.faq-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.faq-item {
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--panel);
  padding: 0 14px;
  margin-bottom: 8px;
}
.faq-item > summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::before {
  content: "▸ ";
  color: var(--accent);
  font-weight: 700;
}
.faq-item[open] > summary::before { content: "▾ "; }
.faq-item p {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-2);
}
.app-foot {
  margin-top: auto;
  background: #111;
  color: rgba(255, 255, 255, 0.68);
}
.dusk {
  height: 48px;
  background: linear-gradient(180deg, var(--paper) 0%, #e8eef6 42%, #111 100%);
  pointer-events: none;
}
.foot-inner {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 32px 0 22px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr auto;
  gap: 32px;
  align-items: start;
  padding-bottom: 24px;
}
.foot-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}
.foot-brand img { width: 36px; height: 36px; display: block; }
.foot-brand > span { display: flex; flex-direction: column; }
.foot-brand .zh {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.foot-brand .en {
  margin-top: 3px;
  font-family: var(--lat);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: #888;
}
.foot-slogan {
  margin: 12px 0 0;
  max-width: 260px;
  color: #8a8a8a;
  font-size: 13px;
  line-height: 1.7;
}
.foot-col h3 {
  margin: 0 0 10px;
  color: #888;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
}
.foot-col a {
  display: block;
  margin-top: 7px;
  color: #c8c8c8;
  font-size: 14px;
  line-height: 1.6;
  text-decoration: none;
}
.foot-col a:hover { color: #fff; }
.foot-follow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 4px 0 10px;
}
.foot-follow a,
.foot-follow button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: color 0.2s ease;
}
.foot-follow svg { display: block; fill: currentColor; }
.foot-follow .ic-wechat { width: 22px; height: 22px; }
.foot-follow .ic-xhs { height: 16px; width: auto; }
.foot-follow .ic-bili { height: 16px; width: auto; }
.foot-follow .f-wechat:hover { color: #07c160; }
.foot-follow .f-xhs:hover { color: #ff2442; }
.foot-follow .f-bili:hover { color: #00a1d6; }
.foot-note {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 12px;
  line-height: 1.65;
}
.foot-lower {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid #2a2a2a;
  color: #666;
  font-size: 12px;
}
.foot-lower a { color: inherit; text-decoration: none; }
.foot-lower a:hover { color: #bbb; }
.foot-beian {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 11px;
}
.foot-beian a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: inherit;
  text-decoration: none;
}
.foot-beian a:hover { color: #999; }
.foot-beian img { width: 13px; height: 13px; display: block; }
.qr-lb[hidden] { display: none !important; }
.qr-lb {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(17, 24, 39, 0.55);
}
.qr-lb img {
  width: min(520px, 88vw);
  height: auto;
  border-radius: 14px;
  background: #fff;
}
.qr-lb button {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

.status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 14px auto 0;
  width: min(1180px, calc(100% - 40px));
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
}
.status.has {
  background: var(--accent-soft);
  color: var(--ink-2);
}
.status.has .dim { color: var(--ink-3); margin-left: 8px; }
.status.empty-bar {
  background: var(--warn-bg);
  border: 1px solid #f0c7b0;
  color: var(--warn);
}
.seat-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--paper);
  color: var(--ink-3);
  font-weight: 600;
  z-index: 2;
}
.seat-loading.gone { display: none; }
.wheel-wrap canvas.wheel {
  display: block;
  width: min(360px, 86vw);
  height: min(360px, 86vw);
}

#statusBar { display: none; }

#view.is-home {
  max-width: 900px;
  padding: 24px 24px 16px;
}
#view.is-seat {
  max-width: none;
  padding: 10px 14px 12px;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
}
.dash-board {
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.7);
  border-radius: 24px;
  padding: 8px 8px 22px;
  box-shadow: var(--shadow-elevated);
  overflow: hidden;
}
.dash-board .dash-hero {
  margin: 0 0 18px;
  border-radius: 18px;
}
.dash-board .dash-tasks,
.dash-board .dash-quick {
  padding: 0 14px;
}
.everyday-card {
  margin: 22px 0 8px;
  padding: 22px 24px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
}
.everyday-card-main {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1 1 280px;
  min-width: 0;
}
.everyday-ico {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  flex: none;
}
.everyday-card-copy { min-width: 0; }
.everyday-card h3 {
  font-size: 20px;
  margin: 4px 0 6px;
}
.everyday-card .everyday-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--ink-3);
}
.everyday-card p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-3);
  margin: 0 0 4px;
}
.everyday-card .btn.primary {
  flex: none;
  align-self: center;
}
.points-manual { margin-top: 14px; }
.points-reason-field { grid-column: 1 / -1; }
.points-manual .chips { margin-top: 2px; }
.points-manual-actions { margin-top: 12px; }
.dash-head {
  margin-bottom: 22px;
}
.dash-head h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.25;
}
.dash-head p {
  margin-top: 6px;
  color: var(--ink-3);
  font-size: 14px;
}
.dash-hero {
  position: relative;
  border-radius: 22px;
  padding: 28px 28px 24px;
  margin-bottom: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255,255,255,0.2) 0%, transparent 42%),
    var(--grad-blue);
  color: #fff;
  box-shadow: 0 14px 36px rgba(59, 108, 255, 0.28);
  overflow: hidden;
}
.dash-hero::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -40px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  pointer-events: none;
}
.dash-hero .greet {
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.01em;
  position: relative;
  z-index: 1;
}
.dash-hero .sub {
  margin-top: 6px;
  font-size: 14px;
  color: rgba(255,255,255,0.88);
  position: relative;
  z-index: 1;
}
.dash-hero .stats {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 20px;
  position: relative;
  z-index: 1;
}
.dash-hero .stat-num {
  font-size: 30px;
  font-weight: 800;
  font-family: var(--lat);
  letter-spacing: -0.02em;
  line-height: 1;
}
.dash-hero .stat-label {
  font-size: 12px;
  color: rgba(255,255,255,0.78);
  margin-top: 4px;
}
.dash-tasks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}
.dash-task {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-card);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.dash-task:hover {
  border-color: var(--accent-border);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}
.dash-task .task-icon {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
}
.dash-task .task-icon svg { display: block; }
.dash-task.is-warn .task-icon { background: var(--warm-soft); color: #ea580c; }
.dash-task.is-ok .task-icon { background: #ecfdf5; color: #059669; }
.dash-task.is-muted .task-icon { background: #f3f4f6; color: #94a3b8; }
.dash-task-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dash-task .dash-task-label {
  flex: none;
  min-width: 4.5em;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-3);
}
.dash-task .dash-task-body {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.dash-task .dash-task-go {
  flex: none;
  font-size: 13px;
  font-weight: 650;
  color: var(--accent);
}
.dash-task.is-ok .dash-task-body { color: #047857; }
.dash-task.is-warn .dash-task-body { color: #b45309; }
.dash-task.is-muted .dash-task-body { color: var(--ink-3); }
.dash-task.is-soon {
  opacity: 0.72;
  box-shadow: none;
}
.dash-quick {
  margin-bottom: 6px;
}
.class-launch {
  width: 100%;
  min-height: 96px;
  border: 0;
  border-radius: 16px;
  background: #111318;
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 18px 16px;
  font: inherit;
}
.class-launch:hover { background: #1c212c; }
.class-launch-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
}
.class-launch-title svg { display: block; }
.class-launch small {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
}
.dash-quick h3,
.dash-stats h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.dash-quick-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.dash-quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 100px;
  padding: 16px 12px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--ink);
  font-weight: 650;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.dash-quick-btn[data-tone="random"] { background: linear-gradient(160deg, #eef2ff, #fff); color: #4f46e5; }
.dash-quick-btn[data-tone="score"] { background: linear-gradient(160deg, #fef3c7, #fff); color: #d97706; }
.dash-quick-btn[data-tone="timer"] { background: linear-gradient(160deg, #dbeafe, #fff); color: #2563eb; }
.dash-quick-btn[data-tone="light"] { background: linear-gradient(160deg, #ecfdf5, #fff); color: #059669; }
.dash-quick-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 108, 255, 0.12);
  color: inherit;
}
.dash-quick-btn .side-ico,
.dash-quick-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  color: inherit;
}
.dash-stat-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.dash-stat-card {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--shadow-card);
}
.dash-stat-card span {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.dash-stat-card strong {
  font-size: 22px;
  font-weight: 800;
  font-family: var(--lat);
  color: var(--ink);
  letter-spacing: -0.02em;
}
.dash-stats {
  margin-bottom: 8px;
}
.dash-stats strong { color: var(--ink); font-weight: 650; }
.dash-unlock {
  margin-top: 20px;
  padding: 20px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, #eef2ff 0%, #fff 70%);
  border: 1px solid #c7d2fe;
}
.dash-unlock h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}
.dash-unlock p {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.55;
  margin-bottom: 14px;
}
.coming-panel {
  text-align: center;
  padding: 36px 20px;
}
.coming-panel p {
  color: var(--ink-3);
  margin: 8px 0 18px;
  line-height: 1.6;
}
.coming-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 650;
  margin-bottom: 12px;
}
.promo {
  position: relative;
  text-align: center;
  padding: 80px 24px 72px;
  background:
    radial-gradient(circle at 50% 0%, rgba(47, 91, 255, 0.12), transparent 28%),
    linear-gradient(180deg, #eef2ff 0%, var(--paper) 82%);
}
.promo-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 auto 20px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(47, 91, 255, 0.08);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}
.promo-kicker svg { width: 13px; height: 13px; }
.promo h2 {
  font-family: var(--font);
  font-size: clamp(40px, 5.2vw, 64px);
  letter-spacing: 0;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}
.promo h2 em {
  font-style: normal;
  color: var(--accent);
}
.promo > p {
  margin: 24px auto 0;
  max-width: 36em;
  color: var(--ink-3);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
}
.promo > p span { display: block; }
.proofs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 240px));
  justify-content: center;
  gap: 32px 48px;
  margin: 40px auto 0;
}
.proofs > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.proof-ico {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fff;
  color: var(--accent);
  display: grid;
  place-items: center;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
}
.proof-ico svg { width: 22px; height: 22px; }
.proofs strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.proofs p {
  margin: 0;
  max-width: 22em;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-3);
  font-weight: 400;
  text-align: center;
}
.proofs p.proof-nowrap {
  white-space: nowrap;
  max-width: none;
}
.promo-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 36px;
}
.promo .btn.primary {
  height: 48px;
  padding: 0 28px;
  font-size: 15px;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(47, 91, 255, 0.16);
}
.text-link {
  height: auto;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
}
.text-link:hover { text-decoration: underline; }
.home-wrap {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 32px 0 56px;
}
.library-entry {
  margin-top: 48px;
  text-decoration: none;
  color: inherit;
}
.library-entry .library-entry-ico {
  display: grid;
  place-items: center;
  background: #eef4ff;
  color: var(--accent);
  border: 1px solid #dbe4ff;
}
.library-entry .sister-copy {
  flex: 1;
  min-width: 0;
}
.library-entry p,
.library-entry .library-entry-desc {
  max-width: none;
  margin: 10px 0 0;
  white-space: nowrap;
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.5;
}
.library-entry .btn.primary {
  flex: none;
  pointer-events: none;
}
.lib-page {
  width: min(960px, calc(100% - 48px));
  margin: 0 auto;
  padding: 8px 0 64px;
}
.lib-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
}
.lib-head h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.lib-stat {
  margin: 0;
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.lib-intro {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
}
.lib-shelf-blurb {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.5;
}
.lib-pack {
  flex: none;
  height: 40px;
  padding: 0 18px;
}
.lib-catalog {
  margin-top: 28px;
  border-top: 1px solid var(--line);
}
.lib-shelf-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: var(--ink);
}
.lib-shelf.open .lib-shelf-head { border-bottom-color: transparent; }
.lib-shelf-title {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: 0.06em;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.lib-idx {
  font-family: "Barlow Semi Condensed", "Barlow", sans-serif;
  font-weight: 500;
  color: #c4c4c4;
  letter-spacing: 0.04em;
  font-size: 0.85em;
}
.lib-name .lib-idx {
  margin-left: 8px;
  font-size: 11px;
}
.lib-shelf-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: none;
}
.lib-count {
  font-family: "Barlow Semi Condensed", "Barlow", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #c4c4c4;
  letter-spacing: 0.04em;
}
.lib-chev {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #c4c4c4;
  border-bottom: 1.5px solid #c4c4c4;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}
.lib-shelf.open .lib-chev {
  transform: rotate(-135deg) translateY(-1px);
}
.lib-panel {
  border-bottom: 1px solid var(--line);
  padding: 0 0 18px;
}
.lib-panel[hidden] { display: none; }
.lib-files {
  list-style: none;
  margin: 0;
  padding: 0;
}
.lib-files li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 0;
}
.lib-name {
  font-size: 14px;
  color: var(--ink-2, #4a4a4a);
  line-height: 1.5;
  word-break: break-all;
}
.lib-dl {
  flex: none;
  background: none;
  border: 0;
  padding: 0;
  color: #888;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
}
.lib-dl:hover { color: var(--ink); }
.lib-disclaimer {
  margin-top: 36px;
  font-size: 11px;
  line-height: 1.85;
  color: #b0b0b0;
}
.app-shell.page-library .chrome-mid,
.app-shell.page-library .chrome-actions,
.app-shell.page-library #statusBar {
  display: none !important;
}
.app-shell.hide-site-after .site-after {
  display: none !important;
}
.app-shell.hide-app-foot .app-foot {
  display: none !important;
}
.sister {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 48px;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}
.sister-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.sister-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: block;
  flex: none;
}
.sister h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}
.sister p {
  margin: 10px 0 0;
  max-width: 42em;
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.65;
}
.chips-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 24px;
}
.chips-nav button {
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: #fff;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.18s ease;
}
.chips-nav button:hover {
  background: var(--accent-soft);
  color: var(--accent);
  transform: translateY(-1px);
}
.chips-nav button.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(47, 91, 255, 0.16);
}
.roster-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 12px 16px 12px 14px;
  background: #f3f4f6;
  border: 0;
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  font-size: 14px;
}
.roster-strip b { color: var(--ink); }
.roster-strip a { font-weight: 600; text-decoration: none; }
.roster-strip.empty {
  color: var(--ink-3);
  border-left-color: #cbd5e1;
}
.tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.home-cols {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.home-section > h3 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ink-3);
}
.home-section .tool-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.tool-card {
  position: relative;
  background: #fff;
  border: 1px solid rgba(47, 91, 255, 0.06);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  min-height: 188px;
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.05),
    0 6px 16px rgba(15, 23, 42, 0.04);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease;
}
.tool-card:hover {
  transform: translateY(-4px);
  border-color: rgba(47, 91, 255, 0.18);
  box-shadow:
    0 8px 24px rgba(47, 91, 255, 0.12),
    0 2px 6px rgba(47, 91, 255, 0.08);
}
.tool-card.is-featured {
  border-color: var(--accent-border);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 8px 22px rgba(47, 91, 255, 0.09);
}
.tool-card.is-featured::after {
  content: "常用";
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 2px 8px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(47, 91, 255, 0.35);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
}
.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #e0e8ff 0%, #d0dcff 100%);
  color: var(--accent);
  display: grid;
  place-items: center;
  box-shadow:
    inset 0 0 0 1px rgba(47, 91, 255, 0.12),
    0 4px 12px rgba(47, 91, 255, 0.10);
}
.card-icon svg {
  width: 28px;
  height: 28px;
}
.tool-card h3 {
  font-size: 19px;
  font-weight: 700;
  margin: 2px 0 0;
  color: var(--ink);
  letter-spacing: -0.015em;
}
.tool-card p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.55;
  min-height: 43px;
}
.card-tags {
  display: flex;
  gap: 6px;
  margin-top: auto;
  flex-wrap: wrap;
}
.card-tags span {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--line-soft);
  color: var(--ink-3);
  font-weight: 500;
}
.card-tags span.cat-affairs {
  background: #ecfdf5;
  color: #059669;
}
.card-tags span.cat-layout {
  background: #eef2ff;
  color: #4338ca;
}
.card-tags span.cat-class {
  background: #eff6ff;
  color: #2563eb;
}
.card-tags span.cat-ready {
  background: #ecfdf5;
  color: #059669;
}
.card-tags span.cat-roster {
  background: #eff6ff;
  color: #2563eb;
}
.card-tags span.cat-optional {
  background: #f3f4f6;
  color: var(--ink-3);
}
.home-unlock-tip {
  background: #fff;
  border: 1px dashed rgba(47, 91, 255, 0.28);
  border-radius: 16px;
  padding: 22px 20px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.65;
}
.home-unlock-tip .hint { margin-top: 6px; }
.home-unlock-hero {
  background: linear-gradient(165deg, #eff6ff 0%, #fff 55%);
  border: 1px solid rgba(47, 91, 255, 0.22);
  border-radius: 20px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 10px 28px rgba(47, 91, 255, 0.08);
}
.home-unlock-ico {
  display: inline-flex;
  color: var(--accent);
  margin-bottom: 10px;
}
.home-unlock-hero h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.home-unlock-hero p {
  margin: 0 auto;
  max-width: 28em;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.65;
}
.home-unlock-actions {
  justify-content: center;
  margin-top: 18px;
  gap: 12px;
  flex-wrap: wrap;
}
.home-ready-tip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #ecfdf5;
  border: 1px solid rgba(5, 150, 105, 0.22);
  color: #065f46;
  font-size: 14px;
  font-weight: 600;
}
.home-ready-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.need-roster-empty {
  text-align: center;
  padding: 28px 20px;
  max-width: 480px;
  margin: 0 auto;
}
.need-roster-empty p {
  color: var(--ink-2);
  line-height: 1.65;
}

.layout-map.is-page {
  margin: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}
.layout-map.is-page .lm-cell.seat { min-height: 72px; }
.layout-map.is-page .lm-name { font-size: 13px; }
.layout-map {
  margin: 0 0 18px;
  border: 1px solid rgba(47, 91, 255, 0.12);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.layout-map.is-empty {
  box-shadow: none;
  background: var(--line-soft);
}
.layout-map-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.layout-map.is-empty .layout-map-bar { cursor: default; }
.layout-map-bar .hint { font-weight: 400; color: var(--ink-3); }
.layout-map-toggle {
  flex: none;
  color: var(--accent);
  font-weight: 600;
}
.layout-map-body {
  padding: 0 16px 16px;
  border-top: 1px solid var(--line-soft);
}
.layout-map-empty {
  padding: 20px 4px 8px;
  color: var(--ink-3);
  font-size: 13px;
}
.layout-map-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}
.layout-map-links .quiet,
.layout-map-links a {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  color: var(--ink-3);
  text-decoration: none;
  cursor: pointer;
}
.layout-map-links .quiet.on {
  color: var(--ink);
}
.layout-map-links a {
  color: var(--accent);
}
.layout-map-links a:hover,
.layout-map-links .quiet:hover {
  color: var(--accent);
}
.lm-podium {
  margin: 12px auto 10px;
  max-width: 220px;
  text-align: center;
  padding: 6px 12px;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
}
.lm-grid {
  display: grid;
  gap: 4px;
  padding: 4px 0;
  overflow: visible;
}
.lm-cell {
  min-height: 36px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 4px;
  text-align: center;
  line-height: 1.2;
  overflow: hidden;
}
.lm-cell.aisle, .lm-cell.other {
  background: repeating-linear-gradient(-45deg, transparent, transparent 3px, #d1d5db 3px, #d1d5db 4px);
  min-height: 36px;
}
.lm-cell.seat {
  position: relative;
  flex-direction: column;
  gap: 2px;
  min-height: 42px;
  padding: 10px 4px 4px;
  background: #f3f4f6;
  border: 1px solid var(--line);
  color: var(--ink);
}
.lm-cell.seat.gM { background: #dbeafe; border-color: #bfdbfe; }
.lm-cell.seat.gF { background: #fce7f3; border-color: #fbcfe8; }
.lm-cell.seat.empty {
  background: #fafafa;
  border-style: dashed;
  color: transparent;
}
.lm-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lm-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 12px;
  height: 12px;
  padding: 0 2px;
  border-radius: 3px;
  background: transparent;
  color: var(--ink-3);
  border: 1px solid rgba(17, 24, 39, 0.18);
  font-size: 9px;
  line-height: 10px;
  font-weight: 600;
  opacity: 0.85;
}
.lm-cell.seat.gM .lm-badge {
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.35);
}
.lm-cell.seat.gF .lm-badge {
  color: #db2777;
  border-color: rgba(219, 39, 119, 0.3);
}
.lm-note {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  padding: 0 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.88);
  color: #374151;
}

.hero { margin-bottom: 22px; }
.hero h2 {
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: -0.04em;
  font-weight: 700;
}
.hero p { margin-top: 8px; color: var(--ink-2); font-size: 14px; line-height: 1.65; max-width: 640px; }
.hero .pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pill {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
}

.sec-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  margin: 8px 0 12px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  box-shadow: var(--shadow);
  min-height: 132px;
}
.card:hover { border-color: #b7d8cc; }
.card.hub {
  border-color: #9dcebf;
  background: linear-gradient(180deg, #f4fbf8 0%, #fff 48%);
  box-shadow: 0 16px 36px rgba(15, 110, 86, 0.12);
}
.card .ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 14px;
  background: var(--line-soft);
  margin-bottom: 8px;
}
.card.hub .ico { background: var(--accent); color: #fff; }
.card .kicker { font-size: 11px; font-weight: 700; color: var(--accent); letter-spacing: 0.08em; }
.card h3 { font-size: 17px; margin: 6px 0 6px; }
.card p { font-size: 13px; color: var(--ink-2); line-height: 1.55; }
.card .meta { margin-top: 10px; font-size: 12px; color: var(--ink-3); }

.panel {
  background: var(--panel);
  border: 1px solid rgba(229, 231, 235, 0.55);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-card);
}
.panel + .panel { margin-top: 14px; }
.panel h3 { font-size: 16px; margin-bottom: 8px; }
.hint { font-size: 13px; color: var(--ink-3); line-height: 1.55; margin-bottom: 12px; }
.panel.empty {
  padding: 40px 20px;
  text-align: center;
}
.panel.empty::before {
  content: "📋";
  display: block;
  font-size: 48px;
  line-height: 1;
  margin-bottom: 14px;
  opacity: 0.7;
}
.panel.empty[data-empty="roster"]::before { content: "👥"; }
.att-confirmed-hint { margin: 10px 0 0; color: #059669; }
.talk-auto-tip { margin: 0 0 10px; color: var(--warm); font-weight: 600; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row.center { justify-content: center; }
.roster-guide {
  margin: 0 0 12px;
  padding-left: 1.25em;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.65;
}
.roster-guide li + li { margin-top: 2px; }
.roster-import-actions .roster-sample-side {
  margin-left: auto;
}
.roster-howto {
  margin: 0 0 10px;
  font-size: 13px;
}
.roster-howto > summary {
  cursor: pointer;
  color: var(--ink-2);
  font-weight: 600;
}
.roster-howto .hint { margin: 8px 0 0; }
.roster-confirm-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 12px 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}
.seat-flow-opts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 0;
}
.seat-flow-opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: #fafbfc;
  cursor: pointer;
}
.seat-flow-opt:has(input:checked) {
  border-color: #bfdbfe;
  background: #eff6ff;
}
.seat-flow-opt input {
  margin-top: 3px;
  flex: none;
}
.seat-flow-opt-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.seat-flow-opt-body strong {
  font-size: 14px;
  color: var(--ink);
}
.seat-flow-opt-body span {
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.45;
}
.mode-line {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin-top: 8px;
}
.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
}
.board-tools {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: min(520px, 92vw);
}
.board-input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  text-align: center;
  font-size: 15px;
}
.hw-board { margin-top: 8px; display: flex; flex-direction: column; gap: 16px; }
.hw-board.is-split {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 16px;
  align-items: start;
}
.hw-block.is-miss h4 { color: #b45309; font-size: 13px; letter-spacing: 0.08em; }
.hw-block.is-done h4 { color: var(--ink-3); }
.hw-block.is-miss .chip.miss { border-color: #fcd34d; background: #fffbeb; }
.hw-block h4 {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.name-item.gM { background: #e0edff; color: var(--boy); }
.name-item.gF { background: #fce7f3; color: var(--girl); }
.grow { flex: 1; min-width: 160px; }
input[type="text"], input[type="number"], input[type="date"], textarea, select.field {
  height: 36px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  width: 100%;
}
textarea {
  height: 220px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.5;
}
.stat { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.stat b {
  font-size: 12px;
  font-weight: 700;
  background: var(--line-soft);
  padding: 4px 8px;
  border-radius: 999px;
}

.table-wrap { overflow: auto; margin-top: 10px; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th, td {
  border-bottom: 1px solid var(--line-soft);
  padding: 8px 6px;
  text-align: left;
}
th { color: var(--ink-3); font-weight: 600; font-size: 12px; }
td input { height: 32px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 8px 10px;
  min-width: 72px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}
.chip.M { color: var(--boy); background: #e8f0fc; border-color: #c5d8f5; }
.chip.F { color: var(--girl); background: #fceef5; border-color: #f0c9dc; }
.chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.chip.miss { border-color: #f0c7b0; background: var(--warn-bg); color: var(--warn); }
.chip.dim { opacity: .4; }

.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tab {
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 600;
  font-size: 13px;
}
.tab.on { background: var(--accent); color: #fff; border-color: var(--accent); }

.pick-stage {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  background: #111;
  color: #fff;
  border-radius: 16px;
  margin: 12px 0;
}
.pick-stage .name {
  font-size: clamp(40px, 8vw, 72px);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.pick-stage { cursor: pointer; }
.pick-stage .name:empty::before { content: ""; }

.groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.group {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px;
  background: #fff;
  min-height: 120px;
}
.group.tint-0 { background: #eff6ff; }
.group.tint-1 { background: #eef2ff; }
.group.tint-2 { background: #e0e7ff; }
.group.tint-3 { background: #dbeafe; }
.group.tint-4 { background: #e0f2fe; }
.group.tint-5 { background: #ede9fe; }
.group.drop-on { outline: 2px solid var(--accent); background: var(--accent-soft); }
.group.dropped { background: #e7f8ee; }
.group h4 { font-size: 13px; margin-bottom: 8px; }
.group .name-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 6px 6px 0;
  padding: 4px 8px;
  background: rgba(255,255,255,.72);
  border: none;
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: grab;
  color: inherit;
}
.group .name-item.is-leader {
  outline: 1.5px solid rgba(47, 91, 255, 0.55);
  background: #fff;
}
.group .name-item i {
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0;
}

.wheel-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 12px 0 8px;
  cursor: pointer;
}
.wheel-wrap.has-winner .wheel {
  opacity: .14;
  filter: blur(2px) saturate(.7);
  transition: opacity .35s ease, filter .35s ease;
}
.wheel-wrap.has-winner .wheel-pointer { opacity: 0; }
.wheel-winner {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  max-width: 78%;
  padding: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
  white-space: nowrap;
  font-size: clamp(32px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: 0;
  pointer-events: none;
  color: #0c0d10;
  line-height: 1;
}
.wheel-winner[data-len="1"],
.wheel-winner[data-len="2"] { font-size: clamp(56px, 11vw, 112px); }
.wheel-winner[data-len="3"] { font-size: clamp(44px, 8vw, 88px); }
.wheel-winner[data-len="4"] { font-size: clamp(34px, 6.2vw, 64px); }
.wheel-winner:empty { display: none; }
.wheel-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.wheel-pointer {
  width: 0; height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 16px solid var(--ink);
  position: relative;
  z-index: 2;
}
.wheel {
  width: min(360px, 86vw);
  height: min(360px, 86vw);
  border-radius: 50%;
  border: 8px solid #fff;
  box-shadow: var(--shadow);
  transition: transform 2.2s cubic-bezier(.12,.8,.16,1);
  position: relative;
}

.duty-grid { width: 100%; font-size: 13px; }
.duty-grid th, .duty-grid td { border: 1px solid var(--line); text-align: center; padding: 8px 4px; }
.score-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 20px;
  margin: 0 0 16px;
}
.score-toolbar .score-modes {
  display: inline-flex;
  gap: 6px;
}
.score-toolbar .score-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.score-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.score-rest-label {
  margin: 16px 0 8px;
  text-align: center;
}
.score-rest {
  opacity: 0.96;
}
.score-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 108px;
  height: 108px;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  text-align: center;
  overflow: hidden;
}
.score-card .meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  width: 100%;
}
.score-card .who {
  font-weight: 700;
  margin: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.score-card .pts {
  font-size: 36px;
  font-weight: 700;
  font-family: var(--display);
  line-height: 1;
}
.score-card .ops {
  position: absolute;
  inset: 0;
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  place-content: center;
  place-items: stretch;
  padding: 14px;
  background: rgba(255, 255, 255, 0.96);
  z-index: 2;
}
.score-card .ops .btn {
  height: 34px;
  padding: 0 4px;
  min-width: 0;
  font-size: 13px;
}
.score-card:hover .ops {
  display: grid;
}
@media (hover: none) {
  .score-card .ops {
    position: static;
    display: grid;
    background: transparent;
    padding: 6px 0 0;
    gap: 4px;
  }
  .score-card .ops .btn {
    height: 30px;
    font-size: 12px;
  }
  .score-card {
    height: auto;
    min-height: 108px;
    padding-bottom: 8px;
  }
  .score-seat .score-card .ops {
    padding: 6px 0 0;
  }
  .app-shell.stage-on .score-card .ops {
    display: grid !important;
    position: static;
    background: transparent;
    padding: 6px 0 0;
  }
}
.score-seat .score-card .ops {
  padding: 10px;
  gap: 4px;
}
.score-card.gM { background: #f4f7fb; }
.score-card.gF { background: #fdf6f8; }
.score-seat {
  display: grid;
  gap: 8px;
}
.score-slot { min-height: 108px; }
.score-slot.aisle {
  border-radius: 10px;
  background: repeating-linear-gradient(-45deg, transparent, transparent 4px, rgba(209, 213, 219, .8) 4px, rgba(209, 213, 219, .8) 5px);
}
.score-podium {
  margin: 0 auto 8px;
  width: min(180px, 36%);
  text-align: center;
  padding: 4px 0;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.18em;
}

.timer-stage {
  position: relative;
  min-height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.timer-bang {
  display: none;
  margin-top: 4px;
  pointer-events: none;
  z-index: 1;
}
.timer-bang:not([hidden]) {
  display: block;
}
.timer-bang[hidden] { display: none !important; }

.roster-report {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-2);
}
.roster-report.has-warn { color: #92400e; }
.roster-bad {
  margin: 8px 0 0;
  padding-left: 1.2em;
  font-size: 12px;
  color: #9a3412;
  line-height: 1.55;
}
.roster-dup-hint {
  text-align: center;
  margin: 0 0 12px;
  color: #92400e;
}
#rosterTable tr.is-dup {
  background: #fffbeb;
}
#rosterTable tr.is-dup td:first-child {
  box-shadow: inset 3px 0 0 #f59e0b;
}
.archive-card[hidden] { display: none !important; }

.score-toolbar .score-order {
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 600;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
}
.score-toolbar .score-order.on {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 4px 12px rgba(47, 91, 255, 0.28);
}

.timer-bang b {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  color: #dc2626;
  letter-spacing: 0.16em;
}
.timer-stage.flash {
  animation: timeflash 0.55s ease 3;
}
@keyframes timeflash {
  0%, 100% { box-shadow: inset 0 0 0 0 transparent; }
  35% { box-shadow: inset 0 0 0 18px rgba(220, 38, 38, 0.55); }
  70% { box-shadow: inset 0 0 0 8px rgba(220, 38, 38, 0.25); }
}
.timer-stage.ended .timer-bang:not([hidden]) b,
.timer-stage.flash .timer-bang:not([hidden]) b {
  animation: bangPulse 0.7s ease-in-out 3;
}
@keyframes bangPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(1.04); }
}
input.timer-custom {
  width: 120px;
  flex: 0 0 120px;
  max-width: 160px;
  text-align: center;
}
.timer-stage.is-run .presets,
.timer-stage.is-run .mode-line,
.timer-stage.is-run .timer-tools { display: none; }
.timer-stage.is-run:hover .mode-line,
.timer-stage.is-run:hover .timer-tools { display: flex; }
.timer-stage.is-run .flip,
.timer-stage.is-run .flip-colon { font-size: clamp(108px, 22vw, 240px); }
.timer-stage { cursor: pointer; }
.timer-stage.full {
  min-height: 100vh;
  background: #0c0d10;
  color: #fff;
}
.flip-clock {
  display: flex;
  align-items: center;
  gap: 0.04em;
  user-select: none;
}
.flip {
  position: relative;
  width: 0.66em;
  height: 1.02em;
  border-radius: 0.08em;
  background: #1a1c22;
  color: #f8fafc;
  overflow: hidden;
  font-family: var(--lat);
  font-size: clamp(72px, 16vw, 168px);
  font-weight: 600;
  line-height: 1.02em;
  text-align: center;
}
.flip::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: rgba(0, 0, 0, .55);
}
.flip.turn b { animation: flap .42s ease; }
@keyframes flap {
  0% { transform: rotateX(-80deg); opacity: .35; }
  100% { transform: rotateX(0); opacity: 1; }
}
.flip-colon {
  font-family: var(--lat);
  font-size: clamp(72px, 16vw, 168px);
  line-height: .8;
  opacity: .72;
  padding: 0 0.02em;
}
.board-clock {
  font-family: var(--lat);
  font-weight: 600;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: 0.06em;
  color: var(--ink-3);
  cursor: pointer;
}
.light-clock {
  font-size: clamp(24px, 3.2vw, 40px);
  margin-top: 4px;
}
input.board-mins {
  width: 88px;
  flex: 0 0 88px;
  max-width: 88px;
  height: 36px;
  padding: 0 8px;
  text-align: center;
  color: var(--ink);
  background: #fff;
}
button.light-housing {
  width: 112px;
  padding: 16px 14px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-radius: 56px;
  background: linear-gradient(180deg, #2c303a 0%, #14161c 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 16px 40px rgba(0, 0, 0, 0.35);
}
.app-shell.stage-on button.light-housing {
  border-color: rgba(255, 255, 255, 0.42);
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.14),
    0 0 0 8px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 20px 48px rgba(0, 0, 0, 0.55);
}
.light-housing .bulb {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #2a2e36;
  box-shadow: inset 0 8px 12px rgba(0, 0, 0, .35);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.light-housing .bulb.on.red {
  background: radial-gradient(circle at 38% 32%, #fecaca, #e11d48 58%, #9f1239);
  box-shadow: 0 0 28px rgba(225, 29, 72, .45);
}
.light-housing .bulb.on.yellow {
  background: radial-gradient(circle at 38% 32%, #fef3c7, #f59e0b 58%, #b45309);
  box-shadow: 0 0 28px rgba(245, 158, 11, .4);
}
.light-housing .bulb.on.green {
  background: radial-gradient(circle at 38% 32%, #bbf7d0, #16a34a 58%, #166534);
  box-shadow: 0 0 28px rgba(22, 163, 74, .4);
}
.light-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 12px;
}
input.light-caption {
  display: block;
  width: 8em;
  height: 32px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  line-height: 32px;
  letter-spacing: 0;
  color: var(--ink-3);
}
input.light-caption:focus { outline: none; color: var(--ink-2); }
.light-ops {
  width: 100%;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
}
.light-ops .quiet {
  height: 32px;
  line-height: 32px;
  padding: 0 4px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
}
.timer-caption {
  max-width: 16em;
  text-align: center;
  font-size: clamp(18px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.3;
}
.timer-stage.full .timer-caption { color: rgba(255, 255, 255, 0.88); }
.timer-digits {
  font-family: var(--lat);
  font-size: clamp(64px, 18vw, 160px);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
}
.timer-date {
  font-size: clamp(16px, 2.4vw, 24px);
  color: var(--ink-3);
  letter-spacing: 0.06em;
}
.timer-bar {
  width: min(480px, 86vw);
  height: 8px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
}
.timer-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: inherit;
}
.timer-stage.full .timer-bar { background: rgba(255,255,255,.16); }
.timer-stage.full .timer-bar i { background: #fff; }
.timer-stage.full .timer-date { color: rgba(255, 255, 255, 0.62); }
.timer-stage.full .btn { color: #fff; background: transparent; border-color: rgba(255,255,255,.28); }
.timer-stage.ended .timer-digits { color: #dc2626; }
.timer-stage.urgent .flip-clock .flip b,
.timer-stage.urgent #timerDigits {
  color: #dc2626;
}
.timer-stage.urgent .flip {
  animation: urgentPulse 0.9s ease-in-out infinite;
}
@keyframes urgentPulse {
  0%, 100% { filter: none; }
  50% { filter: brightness(1.08); }
}
.tool-back {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
}
.tool-back a { color: var(--ink-2); text-decoration: none; }
.tool-back a:hover { color: var(--accent); }

.archive-privacy {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
  line-height: 1.5;
}
.archive-toolbar {
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.archive-count {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.archive-search {
  height: 36px;
  min-width: 140px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0 10px;
  background: #fff;
}
.archive-more-wrap { position: relative; }
.archive-more-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 18px;
  line-height: 1;
}
.archive-more-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 180px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  padding: 6px;
  z-index: 30;
}
.archive-more-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 550;
  color: var(--ink-2);
  cursor: pointer;
}
.archive-more-menu button:hover { background: var(--line-soft); }
.archive-more-menu hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 4px 6px;
}
.archive-table tbody tr { cursor: pointer; }
.archive-table tbody tr:hover { background: var(--accent-soft); }
.archive-table tbody tr.is-focus { background: #e0e7ff; }
.archive-table td,
.archive-table th { white-space: nowrap; }
.archive-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.archive-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.archive-card:hover {
  border-color: #c7d2fe;
  box-shadow: 0 4px 14px rgba(59, 108, 255, 0.08);
}
.archive-card.is-focus {
  border-color: #93c5fd;
  background: #f5f8ff;
  box-shadow: 0 0 0 3px rgba(59, 108, 255, 0.12);
}
.archive-card.is-dup { background: #fffbeb; }
.archive-avatar {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #475569;
  background: #e2e8f0;
}
.archive-avatar.M { color: var(--boy); background: #dbeafe; }
.archive-avatar.F { color: var(--girl); background: #fce7f3; }
.archive-card-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.archive-card-name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.archive-card-name strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.archive-card-meta {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.4;
}
.archive-card-meta.is-empty { color: #b0b8c4; }
.archive-card-side {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.archive-stat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #f1f5f9;
  color: #475569;
}
.archive-stat.is-pos { background: #ecfdf5; color: #047857; }
.archive-stat.is-neg { background: #fef2f2; color: #b91c1c; }
.archive-stat.is-score { background: #eff6ff; color: #1d4ed8; }
.archive-delta {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
}
.archive-delta.is-up { color: #047857; background: #ecfdf5; }
.archive-delta.is-down { color: #b91c1c; background: #fef2f2; }
.tag-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 6px;
  vertical-align: middle;
}
.sex-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}
.sex-pill.M { color: var(--boy); background: #e8f0fc; }
.sex-pill.F { color: var(--girl); background: #fceef5; }
.archive-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.28);
  z-index: 80;
}
.archive-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(400px, 94vw);
  height: 100vh;
  background: #fff;
  box-shadow: -12px 0 40px rgba(15, 23, 42, 0.14);
  z-index: 90;
  display: flex;
  flex-direction: column;
}
.archive-drawer-scroll {
  flex: 1;
  overflow: auto;
  padding: 20px 18px 28px;
}
body.archive-drawer-open { overflow: hidden; }
.archive-sec { margin-bottom: 16px; }
.archive-sec-title {
  font-size: 12px;
  font-weight: 750;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.archive-fields .span-2 { grid-column: 1 / -1; }
.readonly-field {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #f8fafc;
  color: var(--ink-3);
}
.archive-more-fold {
  border-top: 1px dashed var(--line);
  padding-top: 12px;
  margin-bottom: 8px;
}
.archive-more-fold > summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-2);
  list-style: none;
}
.archive-more-fold > summary::-webkit-details-marker { display: none; }
.archive-more-fold > summary::after { content: " ▾"; color: var(--ink-3); }
.archive-more-fold[open] > summary::after { content: " ▴"; }
.notice-saved {
  margin-left: auto;
  font-size: 12px;
  color: var(--ink-3);
}
.notice-saved.is-saved { color: #047857; font-weight: 650; }
.tag-chip,
.tag-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid transparent;
}
.tag-chip.is-removable,
.tag-toggle {
  cursor: pointer;
  border-color: #c7d2fe;
  background: #fff;
  color: var(--ink-2);
}
.tag-toggle.on {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent-border);
}
.tag-empty { color: var(--ink-3); font-size: 13px; }
.tag-toggle-row,
.tag-chips,
.avoid-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.archive-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.archive-detail-head h3 { margin: 0; font-size: 20px; }
.archive-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  margin-bottom: 12px;
}
.archive-grid label,
.archive-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
.archive-block { margin-bottom: 14px; }
.archive-remark {
  width: 100%;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  resize: vertical;
  background: #fff;
  font-weight: 500;
  color: var(--ink);
}
.archive-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 4px;
}
.archive-stats > div {
  padding: 10px;
  border-radius: 10px;
  background: var(--line-soft);
  text-align: center;
}
.archive-stats span {
  display: block;
  font-size: 11px;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.archive-stats strong {
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-2);
}
.att-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
}
.att-stat {
  min-width: 72px;
  text-align: center;
}
.att-stat span {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
}
.att-stat strong {
  font-size: 22px;
  font-weight: 700;
}
.att-actions { margin-left: auto; }
.att-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.att-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: #fff;
  text-align: left;
  font: inherit;
}
.att-chip strong { font-size: 14px; color: var(--ink); }
.att-chip span { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.att-chip.ok { background: #f0fdf4; border-color: #bbf7d0; }
.att-chip.ok span { color: #047857; }
.att-chip.absent { background: #fef2f2; border-color: #fecaca; }
.att-chip.absent span { color: #b91c1c; }
.att-chip.late { background: #fff7ed; border-color: #fed7aa; }
.att-chip.late span { color: #c2410c; }
.att-chip.sick { background: #eff6ff; border-color: #bfdbfe; }
.att-chip.sick span { color: #1d4ed8; }
.tt-next {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
}
.tt-next strong {
  color: var(--accent);
  font-size: 13px;
}
.tt-wrap { overflow-x: auto; margin-top: 12px; }
.tt-grid {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}
.tt-grid th,
.tt-grid td {
  border: 1px solid var(--border-subtle);
  padding: 10px 8px;
  text-align: center;
  font-size: 13px;
}
.tt-grid thead th { background: var(--line-soft); font-weight: 650; }
.tt-grid tbody th {
  background: #fafafa;
  font-weight: 650;
  text-align: left;
  white-space: nowrap;
}
.tt-grid .is-today {
  background: #eef2ff;
  font-weight: 650;
}
.tt-edit-row.is-break,
.tt-grid tr.is-break th,
.tt-grid tr.is-break td {
  background: #f1f5f9;
}
.tt-edit-row.is-break input {
  background: transparent;
  color: var(--ink-3);
  font-weight: 600;
}
.tt-weekend-lab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  margin-left: auto;
}
.tt-edit [data-tt-time] { min-width: 96px; }
.tt-sample {
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--line-soft);
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre;
}
.tt-preview { opacity: 0.92; }
#ttPaste {
  width: 100%;
  min-height: 140px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  font: inherit;
  resize: vertical;
}
.pts-pos { color: #047857; font-weight: 700; }
.pts-neg { color: #b91c1c; font-weight: 700; }
.grade-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.grade-stats > div {
  padding: 12px;
  border-radius: 12px;
  background: var(--line-soft);
  text-align: center;
}
.grade-stats span {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.grade-stats strong {
  font-size: 18px;
  font-weight: 700;
}
.grade-bands { margin-top: 4px; display: flex; flex-direction: column; gap: 4px; }
.grade-bar-row {
  display: grid;
  grid-template-columns: 11em 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}
button.grade-bar-row {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 6px 8px;
  border-radius: 8px;
}
button.grade-bar-row em { font-style: normal; color: var(--ink-3); margin-left: 4px; }
button.grade-bar-row.on { background: #eef2ff; }
.grade-bar-meta { font-size: 13px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.grade-bar-track {
  height: 10px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}
.grade-bar-track i {
  display: block;
  height: 100%;
  border-radius: 999px;
}
.grade-bar-track .b-excel { background: #2563eb; }
.grade-bar-track .b-good { background: #0d9488; }
.grade-bar-track .b-pass { background: #ca8a04; }
.grade-bar-track .b-fail { background: #ea580c; }
.grade-bar-track .b-low { background: #9f1239; }
.grade-table .grade-score { max-width: 88px; }
.grade-exam-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
}
.grade-exam-pick { justify-content: space-between; width: 100%; }
.grade-exam-edit { width: 100%; margin-top: 10px; }
.grade-exam-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.grade-exam-actions > .quiet,
.grade-exam-actions .grade-menu > summary.quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  line-height: 1;
  box-sizing: border-box;
  margin: 0;
  padding: 0 8px;
  vertical-align: middle;
}
.grade-exam-actions > .quiet.is-danger { color: #b91c1c; }
.grade-exam-actions > .quiet.is-danger:hover { color: #991b1b; }
.grade-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.grade-field > span {
  font-size: 12px;
  font-weight: 650;
  color: var(--ink-3);
}
.grade-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.grade-menu > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.grade-menu > summary::-webkit-details-marker { display: none; }
.grade-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  min-width: 168px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.grade-menu-list button {
  width: 100%;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
  cursor: pointer;
}
.grade-menu-list button:hover { background: #f1f5f9; }
.grade-menu-list button.is-danger { color: #b91c1c; }
.grade-menu-list button.is-danger:hover { background: #fef2f2; }
.grade-exam-chip {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-2);
}
.grade-exam-chip.on {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.grade-title {
  height: 36px;
  min-width: 10em;
  max-width: 18em;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 650;
}
.grade-title:focus {
  outline: none;
  border-color: #3b6cff;
  box-shadow: 0 0 0 3px rgba(59, 108, 255, 0.15);
}
.grade-date {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 10px;
  background: #fff;
  font: inherit;
  font-size: 13px;
}
.grade-subs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.grade-empty { margin: 0 0 12px; }
.grade-edit { margin-top: 14px; }
.grade-line { width: 100%; height: auto; display: block; }
.grade-kpi {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.grade-select {
  height: 36px;
  min-width: 11em;
  max-width: 280px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
  font-size: 14px;
}
.grade-type { max-width: 8em; min-width: 7em; }
.grade-fulls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  margin: 10px 0 12px;
}
.grade-fulls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
}
.grade-fulls label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  line-height: 32px;
  color: var(--ink-2);
  white-space: nowrap;
}
.grade-fulls label span {
  font-weight: 650;
  min-width: 4.5em;
}
.grade-fulls input {
  width: 72px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  font: inherit;
  line-height: 32px;
  box-sizing: border-box;
}
.grade-fulls-lines {
  margin: 0;
  line-height: 1.4;
}
.grade-copy {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}
.grade-copy p { margin: 0; line-height: 1.65; flex: 1; }
.grade-compare-panel {
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid #bfdbfe;
  background: #f8fbff;
}
.grade-compare-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}
.grade-compare-head strong { font-size: 15px; }
.grade-compare {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 650;
}
.grade-compare .grade-select { max-width: 320px; min-width: 12em; }
button.grade-name {
  border: 0;
  background: transparent;
  padding: 0;
  font-weight: 700;
  color: #3b6cff;
  cursor: pointer;
}
button.grade-name.on { color: #1d4ed8; text-decoration: underline; }
.grade-table tr.is-focus td { background: #eef2ff; }
.grade-card-drawer { width: min(460px, 96vw); }
.grade-card-exam { margin: 0 0 6px; font-size: 12px; color: var(--ink-3); }
.grade-card-lead {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.45;
}
.grade-card-line { margin: 0 0 12px; font-size: 14px; color: var(--ink-2); }
.grade-card-signals { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.grade-card-signals span {
  font-size: 12px;
  font-weight: 650;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
}
.grade-card-sec { margin: 16px 0; }
.grade-card-lab {
  font-size: 12px;
  font-weight: 750;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.grade-card-table { font-size: 13px; }
.grade-card-spark { margin: 0 0 10px; }
.grade-card-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 12px;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
}
.grade-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.grade-card-embed { margin-top: 4px; }
.grade-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 16px;
  padding: 6px;
  border-radius: 14px;
  background: #e8eefc;
  border: 1px solid #c7d7f5;
}
.grade-tab {
  height: 44px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  font-size: 15px;
  font-weight: 750;
  color: var(--ink-2);
}
.grade-tab:hover { background: #fff; }
.grade-tab.on {
  background: var(--accent, #3b6cff);
  border-color: var(--accent, #3b6cff);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59, 108, 255, 0.28);
}
.grade-panel-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
  margin-bottom: 4px;
}
.grade-panel-head h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
}
.grade-panel-head .hint {
  margin: 0;
  line-height: 1.3;
}
.grade-line-wrap { overflow-x: auto; }
.grade-rank h4 { margin: 14px 0 8px; font-size: 14px; }
.grade-rank .quiet { margin-top: 10px; }
.grade-rank-table {
  table-layout: fixed;
  width: 100%;
}
.grade-rank-table th:nth-child(1),
.grade-rank-table td:nth-child(1) { width: 3.2em; }
.grade-rank-table th:nth-child(2),
.grade-rank-table td:nth-child(2) { width: auto; }
.grade-rank-table th:nth-child(3),
.grade-rank-table td:nth-child(3) { width: 4.5em; }
.grade-rank-table th:nth-child(4),
.grade-rank-table td:nth-child(4) { width: 4.8em; }
.grade-rank-table th:nth-child(5),
.grade-rank-table td:nth-child(5) { width: 5.2em; }
.grade-lines-ro { margin: 8px 0 10px; }
.grade-kpi-delta { display: block; margin-top: 6px; font-size: 12px; font-weight: 650; }
.grade-kpi-delta.is-up { color: #047857; }
.grade-kpi-delta.is-down { color: #b91c1c; }
.grade-kpi-delta.is-flat { color: var(--ink-3); }
.grade-delta-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--line-soft);
  font-size: 14px;
  color: var(--ink-2);
}
.grade-delta-summary strong { font-size: 16px; }
.grade-sub-compare { margin-bottom: 12px; }
.grade-sub-compare > .hint { margin: 6px 0 10px; }
.grade-sub-bars { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
button.grade-sub-row {
  display: grid;
  grid-template-columns: 4.2em minmax(0, 1fr) minmax(10em, auto);
  gap: 10px 12px;
  align-items: center;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 8px;
  border-radius: 10px;
  color: inherit;
}
button.grade-sub-row:hover { background: #eef2ff; }
button.grade-sub-row.on { background: #eef2ff; box-shadow: inset 3px 0 0 var(--accent); }
button.grade-sub-row.is-total { background: #f8fafc; }
button.grade-sub-row.is-total.on { background: #eef2ff; }
button.grade-sub-row.is-total .grade-sub-name { font-size: 15px; }
.grade-subject-pick { margin-bottom: 12px; }
.grade-entry h3 { margin: 18px 0 10px; }
.grade-entry h3:first-child { margin-top: 0; }
.grade-sub-name { font-weight: 700; font-size: 14px; }
.grade-sub-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.grade-sub-main .grade-bar-track { flex: 1; min-width: 64px; }
.grade-sub-avg { flex: none; font-size: 15px; font-weight: 750; white-space: nowrap; }
.grade-sub-avg em { font-style: normal; font-weight: 500; color: var(--ink-3); font-size: 12px; }
.grade-sub-side { display: flex; flex-direction: column; gap: 2px; align-items: flex-end; }
.grade-sub-side .grade-kpi-delta { margin: 0; }
.grade-sub-meta { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.grade-scatter { width: 100%; height: auto; display: block; }
.grade-scatter-dot { cursor: pointer; }
.grade-import { margin-bottom: 14px; border: 1px dashed #93c5fd; background: #f8fbff; }
.grade-import-warn { color: #b45309; }
.grade-kpi-card {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: var(--shadow-card);
}
.grade-kpi-card span {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 650;
}
.grade-kpi-card strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
}
.grade-kpi-card em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 13px;
  color: var(--ink-2);
}
.grade-kpi-card.is-top strong { color: #4f46e5; }
.grade-kpi-card.is-low strong { color: #c2410c; }
.grade-kpi-card.is-avg strong { color: #047857; }
.grade-kpi-card.is-pass strong { color: #b45309; }
.grade-hist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 8px;
  margin-top: 16px;
  align-items: end;
}
.grade-hist-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  min-height: 160px;
  justify-content: flex-end;
}
.grade-hist-n { font-size: 13px; font-weight: 750; color: var(--ink-2); }
.grade-hist-bar {
  width: 100%;
  max-width: 48px;
  height: 120px;
  border-radius: 10px 10px 4px 4px;
  background: #eef2ff;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.grade-hist-bar i {
  display: block;
  width: 100%;
  align-self: flex-end;
  background: #3b6cff;
  border-radius: 10px 10px 4px 4px;
  min-height: 4px;
}
.grade-hist-col.on .grade-hist-bar { background: #dbeafe; box-shadow: 0 0 0 2px #3b6cff; }
.grade-hist-lab { font-size: 11px; color: var(--ink-3); font-weight: 650; }
.grade-band-detail { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.grade-band-detail h4 { margin: 0 0 8px; font-size: 14px; }
.grade-insight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.grade-people { display: flex; flex-wrap: wrap; gap: 8px; }
.grade-person {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--line-soft);
  font-size: 13px;
  font-weight: 600;
  border: 0;
  color: inherit;
  cursor: pointer;
}
button.grade-person:hover { background: #eef2ff; }
.grade-trend {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  min-height: 120px;
  margin-top: 12px;
  overflow-x: auto;
}
.grade-trend-pt {
  flex: 1;
  min-width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.grade-trend-bar {
  width: 28px;
  height: 80px;
  background: #ecfdf5;
  border-radius: 8px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.grade-trend-bar i {
  display: block;
  width: 100%;
  background: #10b981;
  border-radius: 8px;
  min-height: 8px;
}
.grade-trend-pt em {
  font-style: normal;
  font-size: 11px;
  color: var(--ink-3);
  text-align: center;
}
.grade-table-slim td { padding: 6px 8px; }
@media (max-width: 720px) {
  .grade-stats { grid-template-columns: 1fr 1fr; }
  .grade-bar-row { grid-template-columns: 7.2em minmax(0, 1fr) auto; gap: 6px; }
  button.grade-bar-row em { display: block; margin-left: 0; }
  button.grade-sub-row { grid-template-columns: 4.2em 1fr; }
  .grade-sub-side { grid-column: 1 / -1; align-items: flex-start; }
  .grade-sub-meta { white-space: normal; }
  .grade-copy { flex-direction: column; }
  .grade-select { max-width: 100%; }
  .grade-kpi { grid-template-columns: 1fr 1fr; }
  .grade-insight { grid-template-columns: 1fr; }
  .grade-delta-summary { flex-direction: column; gap: 8px; }
}
@media (max-width: 720px) {
  .archive-grid { grid-template-columns: 1fr; }
  .archive-fields { grid-template-columns: 1fr; }
  .archive-stats { grid-template-columns: 1fr; }
  .att-actions { margin-left: 0; width: 100%; }
  .notice-actions { flex-wrap: wrap; }
  .notice-saved { margin-left: 0; width: 100%; }
}

.board-stage, .light-stage {
  min-height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
  padding: 24px;
}
.app-shell.stage-on input.light-caption {
  color: rgba(255, 255, 255, 0.82);
}
.app-shell.stage-on input.light-caption:focus {
  color: #fff;
}
.board-text {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.03em;
  max-width: 16em;
  word-break: break-word;
  white-space: pre-wrap;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
}
.board-edit {
  position: relative;
  width: min(640px, 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
  z-index: 15;
}
.board-edit-toggle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 12;
  opacity: 0.45;
}
.board-edit-toggle:hover { opacity: 1; }
.board-presets {
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 12px;
}
.board-tools {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: min(520px, 92vw);
}
.preset-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; }
.preset-row .x {
  height: 28px;
  width: 28px;
  padding: 0;
  border-radius: 8px;
}
.board-presets { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip.away { background: var(--warn-bg); color: var(--warn); border-color: #f0c7b0; }

.seat-frame-wrap {
  flex: 1;
  height: auto;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper);
  position: relative;
}
.seat-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--paper);
}
.banner {
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--ink-2);
  font-size: 13px;
}

.empty {
  padding: 28px 12px;
  text-align: center;
  color: var(--ink-3);
  font-size: 14px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(16px);
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: .25s ease;
  z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.stage-exit {
  display: none;
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  height: 36px;
  padding: 0 12px;
  border: none;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.55);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.stage-exit span { opacity: .7; margin-left: 6px; font-weight: 500; }
.app-shell.stage-on .stage-exit {
  display: inline-flex;
  align-items: center;
}
.app-shell.stage-on.stage-peek .stage-exit {
  opacity: 1;
  pointer-events: auto;
}
.app-shell.stage-on .stage-exit:hover { background: rgba(17, 24, 39, 0.82); }
.app-shell.stage-on .pick-stage,
.app-shell.stage-on .timer-stage,
.app-shell.stage-on .board-stage,
.app-shell.stage-on .light-stage {
  min-height: 100vh;
  width: 100%;
  margin: 0;
  border-radius: 0;
  background: #0c0d10;
  color: #fff;
}
.app-shell.stage-on .score-board .score-card,
.app-shell.stage-on .score-seat .score-card {
  color: #fff;
}
.app-shell.stage-on .pick-stage .name {
  font-size: clamp(64px, 12vw, 140px);
}
.app-shell.stage-on .score-board {
  width: min(1100px, 100%);
  padding: 24px;
  align-content: center;
}
.app-shell.stage-on .hero,
.app-shell.stage-on .tabs,
.app-shell.stage-on .row,
.app-shell.stage-on .panel,
.app-shell.stage-on .presets,
.app-shell.stage-on .mode-line,
.app-shell.stage-on .board-tools,
.app-shell.stage-on .board-edit,
.app-shell.stage-on .board-edit-toggle,
.app-shell.stage-on .light-ops,
.app-shell.stage-on .preset-row,
.app-shell.stage-on .timer-bar,
.app-shell.stage-on .pick-stage .sub {
  display: none !important;
}
.app-shell.stage-on.stage-timer .presets,
.app-shell.stage-on.stage-timer .mode-line,
.app-shell.stage-on.stage-timer .timer-tools {
  display: flex !important;
}
.app-shell.stage-on.stage-timer .timer-stage.is-run .presets,
.app-shell.stage-on.stage-timer .timer-stage.is-run .mode-line,
.app-shell.stage-on.stage-timer .timer-stage.is-run .timer-tools {
  display: none !important;
}
.app-shell.stage-on.stage-peek.stage-timer .timer-stage.is-run .mode-line,
.app-shell.stage-on.stage-peek.stage-timer .timer-stage.is-run .timer-tools {
  display: flex !important;
}
.app-shell.stage-on.stage-timer .timer-stage {
  padding-bottom: 88px;
}
.app-shell.stage-on.stage-light .light-ops {
  display: flex !important;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
}
.app-shell.stage-on.stage-light .light-ops .quiet {
  color: rgba(255, 255, 255, 0.82);
  height: 32px;
  line-height: 32px;
  padding: 0 4px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
}
.app-shell.stage-on.stage-light .light-ops.is-idle,
.app-shell.stage-on.stage-light .light-stage.is-run .light-ops {
  display: none !important;
}
.app-shell.stage-on.stage-peek.stage-light .light-ops.is-idle,
.app-shell.stage-on.stage-peek.stage-light .light-stage.is-run .light-ops {
  display: flex !important;
}
.app-shell.stage-on .board-clock {
  color: #fff;
}
.board-clock[hidden] { display: none !important; }
.app-shell.stage-on.stage-board .board-stage.is-run:not(.is-edit) .board-edit-toggle {
  display: none !important;
}
.app-shell.stage-on.stage-peek.stage-board .board-stage.is-run:not(.is-edit) .board-edit-toggle {
  display: inline-flex !important;
}
.app-shell.stage-on.stage-board .board-edit,
.app-shell.stage-on.stage-board .board-edit-toggle,
.app-shell.stage-on.stage-board .board-edit .row {
  display: flex !important;
}
.app-shell.stage-on.stage-board .board-edit {
  z-index: 2;
}
.app-shell.stage-on.stage-board .board-stage {
  padding-bottom: 108px;
}
.app-shell.stage-on.stage-board .board-edit-toggle {
  bottom: 92px;
  right: 20px;
}
.app-shell.stage-on.stage-board .board-stage.is-run .board-text {
  font-size: clamp(56px, 9vw, 128px) !important;
}
.app-shell.stage-on.stage-board .board-stage.is-run .board-clock {
  font-size: clamp(64px, 12vw, 160px);
  letter-spacing: 0;
}
.app-shell.stage-on.stage-board .board-text {
  pointer-events: auto;
  cursor: pointer;
}
.app-shell.stage-on .board-text {
  cursor: default;
  pointer-events: none;
}
.app-shell.stage-on .stage-hide {
  display: none !important;
}
.app-shell.stage-on.stage-peek .stage-hide {
  display: none !important;
}
.class-hud {
  display: none;
}
.app-shell.stage-on ~ .class-hud,
body:has(.app-shell.stage-on) .class-hud {
  display: block;
}
.class-hud[hidden] { display: none !important; }
.picked-strip[hidden] { display: none !important; }
.picked-strip {
  position: fixed;
  top: 16px;
  left: 16px;
  right: 140px;
  z-index: 43;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 72px;
  overflow: auto;
  pointer-events: none;
}
.picked-strip span {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  color: #e5e7eb;
  font-size: 12px;
  font-weight: 650;
}
.class-dock {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 47;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 56px;
  padding: 6px 8px 6px 10px;
  border-radius: 999px;
  background: rgba(11, 18, 32, 0.92);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.app-shell.stage-on.stage-peek ~ .class-hud .class-dock,
body:has(.app-shell.stage-on.stage-peek) .class-dock {
  opacity: 1;
  pointer-events: auto;
}
.class-dock button {
  border: 0;
  background: transparent;
  color: #cbd5e1;
  padding: 8px 14px;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}
.class-dock button.on { background: #fff; color: var(--ink); }
.class-dock button:disabled { opacity: .35; }
.class-dock .dock-gap {
  width: 1px;
  height: 22px;
  margin: 0 4px;
  background: rgba(255,255,255,.18);
}
.app-shell:not(.stage-pick) ~ .class-hud .dock-pick-only,
.app-shell:not(.stage-score) ~ .class-hud .dock-score-only,
body:has(.app-shell:not(.stage-pick)) .dock-pick-only,
body:has(.app-shell:not(.stage-score)) .dock-score-only {
  display: none;
}
.pick-seat {
  font-size: 22px;
  color: #93c5fd;
  font-weight: 700;
}
.pick-again {
  margin-top: 18px;
  height: 48px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 800;
}
.app-shell.stage-on .pick-again { display: inline-flex; align-items: center; }
.app-shell.stage-on .pick-stage { padding-bottom: 88px; }
.app-shell.stage-on.stage-score #view {
  justify-content: safe center;
  align-items: center;
  overflow: auto;
  padding: 48px 24px 108px;
}
.app-shell.stage-on .score-seat,
.app-shell.stage-on .score-board {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 8px 8px 12px;
}
@media (hover: none) {
  body:has(.app-shell.stage-on) .class-dock {
    opacity: 1;
    pointer-events: auto;
  }
}
.app-shell.stage-on.stage-pick .pick-stage {
  min-height: 0;
}
.pick-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
select.pick-group {
  width: auto;
  min-width: 7em;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
.app-shell.stage-on.stage-pick .pick-switch .tab,
.app-shell.stage-on.stage-score .score-toolbar .tab,
.app-shell.stage-on.stage-score .score-order {
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  border-color: rgba(255, 255, 255, 0.24);
}
.app-shell.stage-on.stage-pick .pick-switch .tab.on,
.app-shell.stage-on.stage-score .score-toolbar .tab.on,
.app-shell.stage-on.stage-score .score-order.on {
  background: #fff;
  color: #111;
  border-color: #fff;
}
.app-shell.stage-on.stage-pick select.pick-group {
  width: auto;
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.24);
}
.app-shell.stage-on.stage-pick select.pick-group option {
  color: #1c2333;
  background: #fff;
}
.app-shell.stage-on.stage-score .score-actions .quiet {
  color: rgba(255, 255, 255, 0.82);
}
.app-shell.stage-on .wheel-winner {
  color: #fff;
}
.app-shell.stage-on.stage-score .score-card {
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid transparent;
  color: #fff;
  box-shadow: none;
}
.app-shell.stage-on.stage-score .score-card .who {
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
}
.app-shell.stage-on.stage-score .score-card .pts {
  color: #fff;
  font-size: 40px;
}
.app-shell.stage-on.stage-score .score-card.gM {
  background: rgba(96, 165, 250, 0.18);
}
.app-shell.stage-on.stage-score .score-card.gF {
  background: rgba(244, 114, 182, 0.18);
}
.app-shell.stage-on.stage-score .score-card.flash,
.app-shell.stage-on.stage-score .score-card.is-last {
  border-color: #fff;
  outline: 2px solid #fff;
}
.app-shell.stage-on.stage-score .score-card .ops {
  background: rgba(12, 13, 16, 0.78);
}
.app-shell.stage-on.stage-score .score-card .ops .btn {
  height: 40px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: transparent;
  box-shadow: none;
  font-size: 16px;
}
.app-shell.stage-on.stage-score .score-card .ops .btn:hover {
  background: #fff;
  color: #111;
  transform: none;
}
.app-shell.stage-on.stage-score .score-slot.aisle {
  background: repeating-linear-gradient(-45deg, transparent, transparent 5px, rgba(255, 255, 255, 0.1) 5px, rgba(255, 255, 255, 0.1) 6px);
}
.app-shell.stage-on.stage-score .score-podium {
  width: auto;
  margin: 0 auto 16px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  letter-spacing: 0.28em;
}
.app-shell.stage-on.stage-score .score-rest-label {
  color: rgba(255, 255, 255, 0.5);
}
.app-shell.stage-on .score-card {
  cursor: pointer;
  border: 2px solid transparent;
}
.app-shell.stage-on .score-card.flash {
  border-color: #fff;
}
.score-card.flash {
  outline: 2px solid var(--accent);
}
button.score-card {
  width: 100%;
  font: inherit;
  color: inherit;
}
button.dash-quick-btn { width: 100%; }
.dash-quick-btn.is-main {
  background: #1c2333;
  color: #fff;
  border-color: #1c2333;
}
.dash-quick-btn.is-main small {
  display: block;
  font-weight: 500;
  font-size: 11px;
  opacity: .75;
  margin-top: 2px;
}
.dash-quick-row.is-class { grid-template-columns: 1.35fr 1fr 1fr 1fr; }
.grade-lead {
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.grade-lead .grade-conclusion {
  font-size: 16px;
  font-weight: 650;
  line-height: 1.65;
  margin: 0;
  flex: 1;
  min-width: 16em;
}
.grade-empty-card {
  text-align: left;
  padding: 20px 22px;
}
.grade-empty-card p {
  margin: 0 0 12px;
  color: var(--ink-2);
  line-height: 1.65;
}
.grade-rates { width: 100%; height: auto; display: block; }
.grade-hist-bar .b-excel { background: #2563eb; }
.grade-hist-bar .b-good { background: #0d9488; }
.grade-hist-bar .b-pass { background: #ca8a04; }
.grade-hist-bar .b-fail { background: #ea580c; }
.grade-hist-bar .b-low { background: #9f1239; }
.grade-select optgroup { font-weight: 700; color: var(--ink-3); }
.grade-select option:disabled { color: #94a3b8; }
.att-page .att-summary { align-items: center; }
.att-grid {
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
}
.att-chip {
  min-height: 64px;
  padding: 12px 14px;
}
.att-chip strong { font-size: 16px; }
.duty-grid tr.is-today td,
.duty-grid tr.is-today th {
  background: #eff6ff;
}
.tt-view .tt-grid td,
.tt-view .tt-grid th { text-align: center; }
.backup-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 auto 16px;
  max-width: 1080px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff8eb;
  color: #7c4a12;
  font-size: 13px;
  line-height: 1.5;
}
.backup-hint a {
  color: #9a3412;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.backup-hint a:hover { color: #7c2d12; }
.foot-note a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cell-btn {
  border: none;
  background: transparent;
  font: inherit;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
}
.cell-btn.M { color: var(--boy); background: #e8f0fc; }
.cell-btn.F { color: var(--girl); background: #fceef5; }
.cell-btn:hover { background: var(--accent-soft); }
.cell-btn.M:hover { background: #d9e7fb; }
.cell-btn.F:hover { background: #f9e0ed; }
.roster-edit { width: 100%; min-width: 72px; height: 32px; border: 1px solid transparent; border-radius: 8px; padding: 0 6px; background: transparent; }
.roster-edit:hover, .roster-edit:focus { border-color: var(--line); background: #fff; }
.seat-back { margin-bottom: 8px; font-size: 14px; font-weight: 600; }

@media (max-width: 860px) {
  .home-section .tool-grid { grid-template-columns: 1fr 1fr; }
  .home-wrap { width: min(1280px, calc(100% - 32px)); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .sister { flex-direction: column; align-items: flex-start; }
  .hw-board.is-split { grid-template-columns: 1fr; }
  .score-toolbar { gap: 10px; }
  .side-toggle { display: inline-flex; }
  .side-collapse { display: none; }
  .side-backdrop {
    display: none;
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    background: rgba(15, 23, 42, 0.35);
    z-index: 24;
    border: none;
    padding: 0;
    cursor: pointer;
  }
  .app-shell.side-open .side-backdrop {
    display: block;
  }
  .side-nav {
    position: fixed;
    left: 0;
    top: var(--nav-h);
    height: calc(100vh - var(--nav-h));
    width: min(var(--side-w), 86vw);
    transform: translateX(-105%);
    box-shadow: 8px 0 24px rgba(15, 23, 42, 0.12);
    z-index: 25;
  }
  .app-shell.side-open .side-nav {
    transform: translateX(0);
  }
  .app-shell.side-collapsed .side-nav {
    width: min(var(--side-w), 86vw);
  }
  .app-shell.side-collapsed .side-group-label,
  .app-shell.side-collapsed .side-label,
  .app-shell.side-collapsed .side-soon {
    display: initial;
  }
  .app-shell.side-collapsed .side-link {
    justify-content: flex-start;
    padding: 9px 12px;
    border-left-width: 3px;
  }
  .dash-quick-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-quick-row.is-class { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-quick-btn.is-main { grid-column: 1 / -1; min-height: 88px; }
}
@media (max-width: 720px) {
  .brand .tag { display: none; }
  .hero h2 { font-size: 22px; }
  #view { padding: 16px 14px 24px; }
  #view.is-home { padding: 16px 14px 28px; }
  .site-after { padding: 0 14px 28px; }
  .seat-frame-wrap { min-height: 60vh; }
  .dash-head h2 { font-size: 22px; }
  .dash-hero { padding: 22px 18px 18px; border-radius: 18px; }
  .everyday-card { flex-direction: column; align-items: stretch; }
  .everyday-card .btn.primary { align-self: stretch; text-align: center; }
  .archive-fields { grid-template-columns: 1fr; }
  .tag-toggle-row { flex-wrap: wrap; }
  .dash-board { border-radius: 18px; padding: 4px 4px 16px; }
  .dash-hero .greet { font-size: 20px; }
  .dash-hero .stat-num { font-size: 26px; }
  .dash-hero .stats { gap: 16px; }
  .dash-stat-cards { grid-template-columns: 1fr; }
  .dash-task { flex-wrap: wrap; gap: 6px 12px; }
  .dash-task .dash-task-go { width: 100%; text-align: right; }

  .chrome {
    height: auto;
    min-height: var(--nav-h);
    flex-wrap: wrap;
    padding: 8px 12px;
    gap: 8px;
  }
  .chrome-menu-btn { display: inline-flex; margin-left: auto; }
  .chrome-mid {
    flex: 1 1 100%;
    order: 3;
  }
  .chrome-mid select,
  .chrome-class-name {
    flex: 1;
    min-width: 0;
    max-width: none;
  }
  .chrome-actions {
    display: none;
    order: 4;
    flex: 1 1 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 4px 0 2px;
  }
  .chrome.is-menu-open .chrome-actions { display: flex; }
  .chrome-actions .btn,
  .chrome-actions .chrome-home {
    width: 100%;
    justify-content: center;
    height: 40px;
  }
  .chrome-home {
    font-size: 13px;
    padding: 0 10px;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: #fff;
  }

  .promo { padding: 36px 16px 28px; }
  .promo-kicker { margin-bottom: 12px; }
  .promo h2 { font-size: 28px; line-height: 1.25; }
  .promo > p {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.6;
  }
  .promo > p span { display: inline; }
  .promo-actions { margin-top: 20px; }
  .promo .btn.primary { height: 44px; padding: 0 22px; }
  .proofs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 10px;
    margin-top: 22px;
    max-width: 100%;
  }
  .proof-ico {
    width: 40px;
    height: 40px;
  }
  .proof-ico svg { width: 18px; height: 18px; }
  .proofs strong { font-size: 13px; }
  .proofs p { display: none; }

  .home-wrap {
    width: calc(100% - 28px);
    padding: 18px 0 28px;
  }
  .home-cols { gap: 24px; }
  .home-section .tool-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .tool-card {
    padding: 14px 12px;
    border-radius: 12px;
    min-height: 0;
    gap: 8px;
  }
  .tool-card h3 { font-size: 15px; }
  .tool-card p {
    font-size: 12px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .card-icon { width: 36px; height: 36px; }
  .card-icon svg { width: 20px; height: 20px; }

  .library-entry,
  .sister {
    margin-top: 20px;
    padding: 16px;
    gap: 14px;
  }
  .library-entry {
    flex-wrap: wrap;
  }
  .library-entry .btn.primary,
  .sister > .btn.primary {
    width: 100%;
    justify-content: center;
    pointer-events: auto;
  }
  .library-entry .library-entry-desc {
    white-space: normal;
    font-size: 13px;
    line-height: 1.55;
  }
  .sister h3 { font-size: 16px; }
  .sister p {
    max-width: none;
    font-size: 13px;
  }
  .sister-icon { width: 44px; height: 44px; border-radius: 12px; }

  .lib-page { width: calc(100% - 28px); padding-bottom: 40px; }
  .lib-head { gap: 12px; }
  .lib-head h2 { font-size: 24px; }
  .lib-pack { width: 100%; justify-content: center; }
  .lib-shelf-title { font-size: 16px; }
  .lib-files li { gap: 12px; }

  .support-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 16px;
  }
  .support-actions { justify-content: flex-start; }
  .faq-title { font-size: 16px; }
  .faq-item > summary { font-size: 14px; padding: 12px 14px; }

  .foot-inner { width: calc(100% - 28px); }
  .foot-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .foot-col h3 { margin-bottom: 8px; }
  .foot-lower {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .foot-legal {
    font-size: 11px;
    line-height: 1.6;
  }
}
@media (min-width: 721px) {
  .library-entry .library-entry-desc {
    white-space: nowrap;
  }
}

.comment-text {
  width: 100%;
  margin-top: 12px;
  min-height: 160px;
  resize: vertical;
  font-size: 14px;
  line-height: 1.65;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 12px 14px;
  font-family: inherit;
}
.archive-sec + .archive-sec { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.archive-sec-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
}
.archive-sec-title.c-base { color: var(--c-class); }
.archive-sec-title.c-tag { color: var(--c-affairs); }
.archive-sec-title.c-data { color: var(--c-comms); }
.home-ready-tip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  font-size: 14px;
  font-weight: 600;
  color: #1e3a8a;
}
.home-ready-tip > span { flex: 1 1 220px; min-width: 0; line-height: 1.45; }
.score-points-link { margin: 14px 0 0; }
.seat-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 4px 12px;
  font-size: 13px;
}
.seat-bar strong {
  font-size: 15px;
  font-weight: 750;
}
.seat-page {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 0;
}
#view.is-seat .seat-frame-wrap {
  flex: 1;
  height: auto;
  min-height: 0;
}
.tt-edit input {
  width: 100%;
  min-width: 56px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 8px;
  background: #fff;
}
.tt-edit input[data-tt-start],
.tt-edit input[data-tt-end] { min-width: 72px; font-variant-numeric: tabular-nums; }
.tt-edit input:focus { border-color: var(--accent-border); outline: none; }
.tt-time-cell { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.tt-everyday-hint { margin-top: 14px; }
.archive-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  margin-bottom: 12px;
}
.archive-fields label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
.archive-lab {
  display: block;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-2);
  margin-bottom: 8px;
}
.archive-meta {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--ink-3);
}
.tag-toggle-row { flex-wrap: wrap; }
.settings-check {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-2);
}
.chip-add { border-style: dashed; opacity: 0.85; }

@media print {
  .chrome, .side-nav, .side-backdrop, .app-foot, .site-after, .no-print, .toast, .stage-exit, .class-hud { display: none !important; }
  #view { max-width: none; padding: 0; }
  .panel { box-shadow: none; border: none; }
}
