:root,
html[data-theme="night"] {
  --bg: #110f0c;
  --panel: #1a1712;
  --panel-2: #221e17;
  --line: #3a3428;
  --paper: #d9c7a2;
  --ink: #1d1812;
  --muted: #8a7d66;
  --amber: #e09a2a;
  --amber-dim: #9a6a18;
  --stamp: #b42318;
  --ok: #6f8f6a;
  --text: #ece3d2;
  --shadow: #070604;
  --surface-card: rgba(17, 14, 10, 0.55);
  --surface-card-soft: rgba(17, 14, 10, 0.45);
  --surface-card-muted: rgba(17, 14, 10, 0.35);
  --accent-soft: #ffd27a;
  --accent-strong: #fff8ea;
}

html[data-theme="day"] {
  --bg: #e8e2d6;
  --panel: #f7f3ea;
  --panel-2: #efe9dc;
  --line: #c8bfb0;
  --paper: #fffdf8;
  --ink: #1d1812;
  --muted: #6b6256;
  --amber: #c87812;
  --amber-dim: #9a6a18;
  --stamp: #b42318;
  --ok: #4a7346;
  --text: #2a241c;
  --shadow: rgba(42, 36, 28, 0.12);
  --surface-card: rgba(255, 255, 255, 0.78);
  --surface-card-soft: rgba(255, 255, 255, 0.68);
  --surface-card-muted: rgba(255, 255, 255, 0.58);
  --accent-soft: var(--amber-dim);
  --accent-strong: var(--ink);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans SC", sans-serif;
}

body {
  background-image: radial-gradient(1200px 500px at 10% -10%, #2a2318 0%, transparent 55%);
}

html[data-theme="day"] body {
  background-image: radial-gradient(1200px 500px at 10% -10%, #fff8ea 0%, transparent 55%);
}

html[data-theme="day"] .grain {
  opacity: 0.04;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4'/%3E%3C/filter%3E%3Crect width='80' height='80' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  z-index: 8;
}

.mast {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 22px 28px 12px;
  border-bottom: 1px solid var(--line);
}

.mast-code {
  display: block;
  font-family: "Share Tech Mono", monospace;
  color: var(--amber);
  letter-spacing: 0.18em;
  font-size: 11px;
}

.mast h1 {
  margin: 4px 0 0;
  font-family: "ZCOOL QingKe HuangYou", "Noto Sans SC", sans-serif;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.12em;
}

.mast-clock-wrap {
  text-align: right;
}

.mast-clock-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.mast-clock {
  font-family: "Share Tech Mono", monospace;
  font-size: 42px;
  color: var(--amber);
  line-height: 1;
}

.board {
  display: block;
  padding: 0 0 0;
  min-height: calc(100vh - 96px);
}

.stage {
  background: var(--panel);
  border: 1px solid var(--line);
  min-height: 70vh;
  padding: 28px 28px 24px;
  position: relative;
}

.stage.photo-stage {
  overflow: hidden;
  padding: 0;
  background: #0c0a08;
  min-height: calc(100vh - 96px);
  border: 0;
  border-top: 1px solid var(--line);
}

.stage-bg {
  position: absolute;
  inset: 0;
  background-color: #0c0a08;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 28% 72%;
  filter: saturate(0.95) contrast(1.02);
}

.stage[data-loc="office"] .stage-bg {
  background-position: 32% 78%;
}

.stage[data-loc="warehouse"] .stage-bg {
  background-position: 30% 75%;
}

.stage[data-loc="highway"] .stage-bg,
.stage[data-loc="highway_emergency"] .stage-bg,
.stage[data-loc="highway_dry"] .stage-bg {
  background-position: 35% 70%;
}

.stage-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 7, 5, 0.12) 0%, rgba(8, 7, 5, 0.05) 40%, rgba(8, 7, 5, 0.45) 100%),
    linear-gradient(180deg, rgba(8, 7, 5, 0.28) 0%, transparent 18%, transparent 52%, rgba(8, 7, 5, 0.82) 100%);
}

.desk-scene {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  background: #0c0a08;
  pointer-events: none;
}

.desk-scene[hidden] {
  display: none !important;
}

.desk-fit {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: auto;
  aspect-ratio: 1536 / 1024;
  transform: translate(-50%, -50%);
}

.desk-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

.desk-screen {
  position: absolute;
  left: 29.4%;
  top: 35.8%;
  width: 41.1%;
  height: 34.8%;
  overflow: hidden;
  background: #110f0c;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.65);
  pointer-events: auto;
}

.desk-screen .sys-window {
  width: 100%;
  height: 100%;
  max-height: none;
  border: 0;
  box-shadow: none;
}

.desk-screen .sys-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.desk-screen .sys-result-title {
  font-size: 15px;
}

.desk-screen .sys-fields,
.desk-screen .sys-flag,
.desk-screen .sys-history {
  font-size: 12px;
}

.desk-screen .sys-history table {
  font-size: 12px;
}

.stage.is-desk .stage-bg,
.stage.is-desk .stage-shade {
  opacity: 0;
}

.stage.is-desk .stage-copy {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: block;
  padding: 0;
  pointer-events: none;
}

.stage.is-desk .talk-col {
  display: block;
  grid-column: 1;
  padding: 0;
  height: 100%;
}

.stage.is-desk .scene-head {
  position: absolute;
  left: 22px;
  top: 16px;
  z-index: 5;
  pointer-events: none;
  max-width: 28rem;
}

.stage.is-desk .intercom {
  display: none;
}

.stage.is-desk .actions {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 8;
  margin: 0;
  pointer-events: auto;
}

.stage.is-desk .actions .cont {
  min-width: 7.5rem;
  padding: 12px 28px;
  border-color: #e09a2a;
  background: rgba(22, 16, 10, 0.92);
  color: #f3e2c0;
  font-size: 16px;
  letter-spacing: 0.22em;
  text-align: center;
}

.stage.is-desk .prompt {
  display: none;
}

.phone-scene {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 12px 260px 24px 48px;
  pointer-events: none;
}

.phone-scene[hidden] {
  display: none !important;
}

.phone-hold {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  transform: translate(-4%, 4%);
}

.phone-device {
  width: min(292px, 46vw);
  filter: drop-shadow(0 28px 48px rgba(0, 0, 0, 0.62));
  animation: phone-up 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.phone-bezel {
  position: relative;
  padding: 11px 10px 14px;
  border-radius: 38px;
  background:
    linear-gradient(160deg, #3a3530 0%, #161310 38%, #0c0b09 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 220, 0.18),
    inset 0 -2px 6px rgba(0, 0, 0, 0.55),
    0 0 0 1px #2a2420;
}

.phone-ear {
  position: absolute;
  top: 16px;
  left: 50%;
  z-index: 2;
  width: 78px;
  height: 11px;
  transform: translateX(-50%);
  border-radius: 8px;
  background: #0a0908;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.phone-screen {
  height: min(560px, 64vh);
  overflow: hidden;
  border-radius: 28px;
  background: #1d2a38;
}

.phone-thought {
  max-width: min(360px, 78vw);
  margin: 0;
  padding: 10px 16px;
  border: 1px solid rgba(224, 154, 42, 0.45);
  background: rgba(17, 14, 10, 0.88);
  color: #f3e2c0;
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: 0.04em;
  text-align: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}

@keyframes phone-up {
  from {
    opacity: 0;
    transform: perspective(900px) rotateX(22deg) translateY(48px);
  }
  to {
    opacity: 1;
    transform: perspective(900px) rotateX(7deg) rotateY(-7deg) rotateZ(-2.5deg);
  }
}

.wx-app {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 28px 16px 16px;
  color: #eef4f8;
  background:
    linear-gradient(180deg, rgba(18, 28, 38, 0.2) 0%, rgba(18, 28, 38, 0.55) 100%),
    linear-gradient(165deg, #4b6278 0%, #2a3c4e 42%, #1a2834 100%);
  overflow: hidden;
}

.wx-app::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    185deg,
    transparent 0 11px,
    rgba(210, 228, 240, 0.09) 12px 13px
  );
  animation: wx-rain 1.1s linear infinite;
  pointer-events: none;
}

.wx-status,
.wx-appbar,
.wx-hero,
.wx-timeline,
.wx-alert {
  position: relative;
  z-index: 1;
}

.wx-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "Share Tech Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(238, 244, 248, 0.72);
}

.wx-clock {
  font-size: 12px;
  color: #fff8ea;
}

.wx-appbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 14px 0 8px;
}

.wx-app-name {
  font-size: 12px;
  letter-spacing: 0.28em;
  color: #d7e4ee;
}

.wx-place {
  font-size: 13px;
  color: #f3e2c0;
}

.wx-hero {
  margin: 8px 0 18px;
  text-align: center;
}

.wx-sky {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0.18em;
  color: #d4e0ea;
}

.wx-temp {
  margin: 2px 0 0;
  font-family: "Share Tech Mono", ui-monospace, monospace;
  font-size: 72px;
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: #fff8ea;
}

.wx-range {
  margin: 4px 0 0;
  font-size: 13px;
  color: #c5d3de;
}

.wx-timeline {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.wx-slot {
  display: grid;
  gap: 4px;
  padding: 10px 6px 8px;
  border: 1px solid rgba(210, 228, 240, 0.16);
  background: rgba(10, 16, 22, 0.28);
  text-align: center;
}

.wx-slot.is-alert {
  border-color: rgba(224, 154, 42, 0.85);
  background: rgba(120, 62, 18, 0.45);
}

.wx-slot-when {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: #c5d3de;
}

.wx-slot-sky {
  font-size: 16px;
  color: #fff8ea;
}

.wx-slot-temp {
  font-family: "Share Tech Mono", ui-monospace, monospace;
  font-size: 12px;
  color: #e09a2a;
}

.wx-alert {
  margin-top: auto;
  padding: 10px 12px;
  border-left: 3px solid #e09a2a;
  background: rgba(17, 14, 10, 0.55);
}

.wx-alert strong {
  display: block;
  font-size: 15px;
  letter-spacing: 0.16em;
  color: #e09a2a;
}

.wx-alert p {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #f3e2c0;
}

@keyframes wx-rain {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 0 24px;
  }
}

.stage.is-phone .stage-bg {
  filter: saturate(0.72) brightness(0.52) contrast(1.05);
}

.stage.is-phone .stage-shade {
  background:
    radial-gradient(ellipse at 46% 58%, transparent 18%, rgba(6, 5, 4, 0.62) 70%),
    linear-gradient(180deg, rgba(8, 7, 5, 0.28) 0%, transparent 24%, rgba(8, 7, 5, 0.55) 100%);
}

.stage.is-phone .stage-copy {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: block;
  padding: 0;
  pointer-events: none;
}

.stage.is-phone .talk-col {
  display: block;
  grid-column: 1;
  padding: 0;
  height: 100%;
}

.stage.is-phone .scene-head {
  position: absolute;
  left: 22px;
  top: 16px;
  z-index: 5;
  pointer-events: none;
  max-width: 28rem;
}

.stage.is-phone .intercom,
.stage.is-phone .prompt,
.stage.is-phone .portrait-slot {
  display: none;
}

.stage.is-phone .actions {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 8;
  margin: 0;
  pointer-events: auto;
}

.stage.is-phone .actions .cont {
  min-width: 7.5rem;
  padding: 12px 28px;
  border-color: #e09a2a;
  background: rgba(22, 16, 10, 0.92);
  color: #f3e2c0;
  font-size: 16px;
  letter-spacing: 0.22em;
  text-align: center;
}

.voip-toast {
  position: absolute;
  right: 16px;
  bottom: 22px;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(268px, calc(100vw - 32px));
  padding: 11px 14px 11px 12px;
  background: linear-gradient(180deg, rgba(28, 24, 18, 0.94) 0%, rgba(16, 14, 11, 0.94) 100%);
  border: 1px solid rgba(224, 154, 42, 0.45);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45),
    0 14px 32px rgba(0, 0, 0, 0.48);
  color: #f3ebda;
  pointer-events: none;
}

.voip-toast.is-in {
  animation: voip-jump 0.7s cubic-bezier(0.22, 1.4, 0.36, 1) both;
}

.voip-toast-pulse {
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #7dba74;
  box-shadow: 0 0 0 0 rgba(111, 143, 106, 0.55);
  animation: voip-pulse 1.15s ease-out infinite;
}

.voip-toast-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.voip-toast-copy small {
  font-family: "Share Tech Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: #e09a2a;
  text-transform: uppercase;
}

.voip-toast-copy strong {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.voip-toast-copy span {
  font-size: 12px;
  color: #8a7d66;
  letter-spacing: 0.08em;
}

.stage.is-voip .talk-col {
  padding-right: 292px;
  padding-bottom: 18px;
}

@keyframes voip-jump {
  0% {
    opacity: 0;
    transform: translateY(16px);
  }
  28% {
    opacity: 1;
    transform: translateY(0);
  }
  46% {
    transform: translateY(-8px);
  }
  62% {
    transform: translateY(0);
  }
  76% {
    transform: translateY(-4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes voip-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(111, 143, 106, 0.5);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(111, 143, 106, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(111, 143, 106, 0);
  }
}

.stage-rail {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: min(240px, calc(100vw - 32px));
  --rail-width: min(240px, calc(100vw - 32px));
  pointer-events: none;
}

.stage-rail > * {
  pointer-events: auto;
}

.hud-float {
  position: static;
  width: 100%;
  padding: 14px 16px 12px;
  background: rgba(17, 14, 10, 0.72);
  border: 1px solid rgba(236, 227, 210, 0.22);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  color: #f3ebda;
}

.hud-float-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.35;
}

.hud-float-row span {
  color: rgba(236, 227, 210, 0.78);
  letter-spacing: 0.06em;
  font-size: 13px;
}

.hud-float-row strong {
  font-family: "Share Tech Mono", monospace;
  font-weight: 400;
  font-size: 17px;
  color: #ffe7b0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.hud-float-bar {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(236, 227, 210, 0.16);
}

.hud-float-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(236, 227, 210, 0.78);
  margin-bottom: 6px;
}

.hud-float .bar {
  height: 8px;
  background: rgba(0, 0, 0, 0.35);
}

.hud-float .bar i {
  background: var(--amber);
}

.journal-stack {
  position: relative;
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.note-fab {
  position: relative;
  z-index: 2;
  width: 64px;
  height: 72px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex: none;
}

.note-fab.is-open .note-fab-book {
  animation-play-state: paused;
  transform: translateY(-2px) rotate(-4deg);
}

.note-fab-book {
  position: relative;
  display: block;
  width: 52px;
  height: 62px;
  margin: 0 auto;
  transform-origin: left center;
  animation: note-bob 2.4s ease-in-out infinite;
}

.note-fab-cover {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, #c9a06a 0%, #8f6230 100%);
  border: 2px solid #5c3b16;
  border-radius: 3px 8px 8px 3px;
  box-shadow: 4px 6px 0 rgba(0, 0, 0, 0.35);
}

.note-fab-cover::before {
  content: "笔记";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #2a1a0a;
  font-size: 13px;
  letter-spacing: 0.2em;
  font-weight: 700;
}

.note-fab-page {
  position: absolute;
  top: 4px;
  left: 4px;
  right: 6px;
  bottom: 4px;
  background: #f4e7c8;
  border-radius: 2px 6px 6px 2px;
  transform-origin: left center;
  animation: note-flip 2.4s ease-in-out infinite;
}

.note-fab-page-2 {
  animation-delay: 0.2s;
  opacity: 0.85;
}

.note-fab-badge {
  position: absolute;
  top: -4px;
  right: -2px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--stamp);
  color: #fff;
  font-size: 12px;
  line-height: 22px;
  font-family: "Share Tech Mono", monospace;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}

.note-fab:hover .note-fab-book {
  animation-play-state: paused;
  transform: translateY(-2px) rotate(-4deg);
}

@keyframes note-flip {
  0%,
  55%,
  100% {
    transform: rotateY(0deg);
  }
  70% {
    transform: rotateY(-18deg);
  }
}

.journal-drawer {
  position: absolute;
  top: 50%;
  right: 76px;
  transform: translateY(-50%);
  width: min(820px, calc(100vw - var(--rail-width) - 96px));
  max-height: min(48vh, 380px);
  z-index: 1;
}

.journal-drawer[hidden] {
  display: none !important;
}

.journal-drawer-card {
  display: flex;
  flex-direction: column;
  max-height: min(48vh, 380px);
  overflow: hidden;
  background: #ebe1c8;
  color: #1d1812;
  border: 1px solid #3a3428;
  box-shadow: 8px 8px 0 rgba(7, 6, 4, 0.55);
  padding: 16px 16px 14px;
}

.journal-board {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 16px;
  min-height: 0;
  flex: 1;
}

.journal-board-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.journal-board-memo {
  padding-right: 2px;
}

.journal-board-col ol,
.journal-memo-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: #8a6a18 #dccfb0;
}

.journal-board-col ol {
  padding-left: 18px;
}

.journal-memo-scroll .user-notes {
  margin: 0;
  padding-left: 18px;
  padding-right: 2px;
}

.journal-board-col ol::-webkit-scrollbar,
.journal-memo-scroll::-webkit-scrollbar {
  width: 8px;
}

.journal-board-col ol::-webkit-scrollbar-track,
.journal-memo-scroll::-webkit-scrollbar-track {
  background: #dccfb0;
  border-radius: 4px;
}

.journal-board-col ol::-webkit-scrollbar-thumb,
.journal-memo-scroll::-webkit-scrollbar-thumb {
  background: #8a6a18;
  border-radius: 4px;
}

.journal-board-col ol::-webkit-scrollbar-thumb:hover,
.journal-memo-scroll::-webkit-scrollbar-thumb:hover {
  background: #9a2a18;
}

.journal-board-col .journal-section {
  margin-top: 0;
  flex: none;
}

.journal-board-col .note-form {
  flex: none;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(58, 52, 40, 0.14);
  min-width: 0;
}

@keyframes note-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

.journal-panel-head {
  margin-bottom: 8px;
}

.journal-panel-head h2 {
  margin: 0;
  font-family: "ZCOOL QingKe HuangYou", sans-serif;
  font-weight: 400;
  font-size: 24px;
  color: var(--stamp);
  letter-spacing: 0.16em;
}

.journal-panel-hint {
  margin: 0 0 14px;
  color: #5c4f3a;
  font-size: 13px;
  line-height: 1.6;
}

.journal-section {
  margin: 14px 0 8px;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: #8a6a18;
  font-weight: 500;
}

.journal-drawer-card ol,
.user-notes {
  margin: 0;
  padding-left: 18px;
}

.journal-drawer-card li {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.6;
}

.journal-drawer-card li strong {
  display: block;
  margin-bottom: 2px;
  color: #9a2a18;
  font-size: 13px;
}

.user-notes li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.user-notes button {
  flex: none;
  background: transparent;
  border: 0;
  color: #9a2a18;
  font-size: 12px;
  padding: 0;
  cursor: pointer;
}

.note-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 8px;
}

.note-form input {
  background: #fff8e8;
  border: 1px solid #3a3428;
  color: #1d1812;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  min-width: 0;
  width: 100%;
}

.note-form .cont {
  color: #fff8ea;
  background: #9a2a18;
  border-color: #7a1f12;
  padding: 10px 16px;
  font-weight: 500;
}

.note-form .cont:hover {
  color: #fff8ea;
  background: #b42318;
  border-color: #9a2a18;
}

.journal-drawer-card .again {
  color: #1d1812;
  border-color: #1d1812;
}

.journal-drawer-card .again:hover {
  color: #9a2a18;
  border-color: #9a2a18;
}

.stage-copy {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(200px, 0.4fr) minmax(0, 1fr);
  gap: 8px;
  min-height: calc(100vh - 96px);
  height: 100%;
  padding: 22px 22px 0;
  align-items: stretch;
}

.portrait-slot {
  position: absolute;
  left: 2%;
  bottom: 0;
  z-index: 2;
  height: min(64vh, 620px);
  width: min(38%, 420px);
  pointer-events: none;
  line-height: 0;
}

.portrait-slot::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 18%;
  bottom: 1.5%;
  height: 4.5%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.38) 0%, transparent 72%);
  pointer-events: none;
  z-index: 0;
}

.portrait-slot img {
  position: relative;
  z-index: 1;
  display: block;
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left bottom;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.28));
}

.stage[data-loc="office"] .portrait-slot {
  left: 3%;
  height: min(62vh, 600px);
  width: min(36%, 400px);
}

.stage[data-loc="warehouse"] .portrait-slot {
  left: 4%;
  height: min(64vh, 620px);
  width: min(37%, 410px);
}

.stage[data-loc="highway"] .portrait-slot,
.stage[data-loc="highway_emergency"] .portrait-slot,
.stage[data-loc="highway_dry"] .portrait-slot {
  left: 5%;
  height: min(66vh, 640px);
  width: min(38%, 420px);
}

.talk-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  grid-column: 2;
  padding: 20px 88px 18px 0;
  position: relative;
  z-index: 3;
}

.scene-head {
  margin: 0 0 14px;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  max-width: 42rem;
}

.photo-stage .scene-kicker {
  margin: 0;
  color: #ffe7b0;
  font-size: 15px;
  letter-spacing: 0.14em;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.95),
    0 0 12px rgba(0, 0, 0, 0.55),
    0 2px 10px rgba(0, 0, 0, 0.7);
}

.photo-stage .scene-title {
  margin: 6px 0 0;
  color: #fff8ea;
  font-size: 30px;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.95),
    0 2px 12px rgba(0, 0, 0, 0.75),
    0 0 18px rgba(0, 0, 0, 0.45);
}

.photo-stage .intercom {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}

.intercom.is-document {
  justify-content: center;
  align-items: center;
  padding: 16px 0 28px;
}

.intercom.is-system {
  justify-content: center;
  align-items: stretch;
}

.talk-col:has(.intercom.is-system) {
  padding-bottom: 18px;
}

.sys-window {
  width: min(100%, 480px);
  max-height: min(62vh, 540px);
  display: flex;
  flex-direction: column;
  background: #16130f;
  border: 1px solid #5a4e38;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45),
    0 18px 48px rgba(0, 0, 0, 0.55);
  color: var(--text);
}

.sys-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: #2a241c;
  border-bottom: 1px solid #4a4030;
  flex-shrink: 0;
}

.sys-app {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: #d4c4a0;
}

.sys-dots {
  width: 42px;
  height: 10px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 6px 5px, #8a7d66 3px, transparent 4px),
    radial-gradient(circle at 21px 5px, #8a7d66 3px, transparent 4px),
    radial-gradient(circle at 36px 5px, #e09a2a 3px, transparent 4px);
}

.sys-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  background: #221e17;
  border-bottom: 1px solid #3a3428;
  flex-shrink: 0;
}

.sys-search-label {
  font-size: 12px;
  color: #8a7d66;
  white-space: nowrap;
}

.sys-search-input {
  min-width: 0;
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #5a4e38;
  background: #110f0c;
  color: #ffd27a;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 0.04em;
}

.sys-search-input:focus {
  outline: 1px solid var(--amber);
}

.sys-query-btn {
  padding: 7px 14px;
  border: 0;
  background: var(--amber);
  color: #1d1812;
  letter-spacing: 0.14em;
  font-size: 13px;
  cursor: pointer;
}

.sys-query-btn:hover:not(:disabled) {
  filter: brightness(1.08);
}

.sys-query-btn:disabled {
  background: #5a4e38;
  color: #c8b896;
  cursor: default;
}

.sys-body {
  overflow: auto;
  padding: 14px 16px 16px;
  background: #f3ece0;
  color: #1d1812;
}

.sys-empty {
  margin: 28px 0;
  text-align: center;
  color: #7a6e5c;
  font-size: 14px;
}

.sys-result-title {
  margin: 0 0 12px;
  font-size: 17px;
  letter-spacing: 0.04em;
}

.sys-fields {
  margin: 0 0 12px;
  display: grid;
  grid-template-columns: 5em 1fr;
  gap: 6px 12px;
  font-size: 14px;
}

.sys-fields dt {
  margin: 0;
  color: #7a6e5c;
  font-size: 12px;
}

.sys-fields dd {
  margin: 0;
}

.sys-flags {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.sys-flag {
  padding: 7px 10px;
  font-size: 13px;
  line-height: 1.5;
  border-left: 3px solid currentColor;
}

.sys-flag-warn {
  background: #f4e4d8;
  color: #9a2a18;
}

.sys-flag-ok {
  background: #dde8d8;
  color: #3d5c38;
}

.sys-history h4 {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #7a6e5c;
}

.sys-history table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.sys-history th,
.sys-history td {
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid #d4c4a0;
}

.sys-history th {
  color: #7a6e5c;
  font-weight: 500;
}

.sys-history tr:last-child td {
  border-bottom: 0;
}

html[data-theme="day"] .sys-window {
  background: #efe9dc;
  border-color: #c8bfb0;
  box-shadow: 0 14px 36px rgba(42, 36, 28, 0.16);
}

html[data-theme="day"] .sys-titlebar {
  background: #e4dccb;
  border-bottom-color: #c8bfb0;
}

html[data-theme="day"] .sys-app {
  color: #4a4034;
}

html[data-theme="day"] .sys-search {
  background: #f7f3ea;
  border-bottom-color: #c8bfb0;
}

html[data-theme="day"] .sys-search-input {
  background: #fffdf8;
  border-color: #c8bfb0;
  color: #9a6a18;
}

html[data-theme="day"] .sys-body {
  background: #fffdf8;
}

html[data-theme="day"] .phone-thought {
  background: rgba(255, 253, 248, 0.92);
  border-color: #c8bfb0;
  color: #2a241c;
  box-shadow: 0 10px 28px rgba(42, 36, 28, 0.16);
}

@media (prefers-reduced-motion: reduce) {
  .phone-device,
  .wx-app::before {
    animation: none;
  }
}

.doc-sheet {
  width: min(100%, 420px);
  background: linear-gradient(180deg, #faf6ee 0%, #f0e8d4 100%);
  color: var(--ink);
  border: 1px solid #c9b896;
  box-shadow:
    0 2px 0 #b8a682,
    0 12px 40px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  padding: 20px 22px 18px;
  transform: rotate(-0.6deg);
  position: relative;
}

.doc-sheet::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: repeating-linear-gradient(
    90deg,
    var(--stamp) 0,
    var(--stamp) 8px,
    transparent 8px,
    transparent 16px
  );
  opacity: 0.35;
}

.doc-sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
  font-family: "Share Tech Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: #7a6e5c;
}

.doc-sheet-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-bottom: 1px dashed #c9b896;
  padding-bottom: 10px;
}

.doc-sheet-fields {
  margin: 0;
  display: grid;
  grid-template-columns: 5.5em 1fr;
  gap: 8px 12px;
  font-size: 14px;
  line-height: 1.5;
}

.doc-sheet-fields dt {
  margin: 0;
  color: #7a6e5c;
  font-size: 12px;
}

.doc-sheet-fields dd {
  margin: 0;
  font-weight: 500;
}

.doc-sheet-appendix {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #d4c4a0;
}

.doc-sheet-appendix h4 {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--amber-dim);
}

.doc-sheet-appendix ul {
  margin: 0;
  padding-left: 1.1em;
  font-size: 14px;
  line-height: 1.6;
}

.doc-sheet-note {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px dotted #c9b896;
  font-size: 13px;
  line-height: 1.65;
  color: #4a4034;
}

html[data-theme="day"] .doc-sheet {
  background: linear-gradient(180deg, #fffdf8 0%, #f5eedc 100%);
  box-shadow:
    0 2px 0 #ddd4c4,
    0 10px 32px rgba(42, 36, 28, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.photo-stage .beat-narrator {
  background: transparent;
  border-left: 0;
  padding-left: 0;
  backdrop-filter: none;
}

.photo-stage .beat-narrator .say {
  font-style: italic;
  color: #e8dcc8;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
}

.beat-narrator {
  border-left: 0;
  padding-left: 0;
}

.beat-narrator .say {
  color: var(--muted);
  font-style: italic;
}

.photo-stage .beat {
  background: rgba(17, 14, 10, 0.78);
  border-left-width: 3px;
  padding: 14px 16px;
  backdrop-filter: blur(8px);
}

.photo-stage .beat .who {
  color: #ffd27a;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}

.photo-stage .beat .say {
  font-size: 17px;
  line-height: 1.75;
  color: #f6efe2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.photo-stage .prompt {
  background: rgba(17, 14, 10, 0.78);
  backdrop-filter: blur(6px);
}

.photo-stage .actions {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.photo-stage .actions .cont,
.photo-stage .actions .again {
  align-self: flex-end;
  text-align: right;
}

.photo-stage .actions .opt {
  align-self: stretch;
  text-align: left;
}

.photo-stage .opt,
.photo-stage .cont,
.photo-stage .again {
  background: rgba(17, 14, 10, 0.78);
  backdrop-filter: blur(6px);
}

html[data-theme="day"] .photo-stage {
  --text: #ece3d2;
  --line: #3a3428;
  --muted: #8a7d66;
  --amber: #e09a2a;
  --amber-dim: #9a6a18;
  --paper: #d9c7a2;
  --panel: #1a1712;
  --panel-2: #221e17;
  --stamp: #b42318;
  --ok: #6f8f6a;
  color: #ece3d2;
}

html[data-theme="day"] .photo-stage .opt,
html[data-theme="day"] .photo-stage .cont,
html[data-theme="day"] .photo-stage .again {
  background: rgba(17, 14, 10, 0.78);
}

.still-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: rgba(7, 6, 4, 0.88);
  cursor: pointer;
}

.still-overlay[hidden] {
  display: none !important;
}

.still-overlay img {
  max-width: min(1100px, 92vw);
  max-height: 78vh;
  object-fit: contain;
  border: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}

.still-hint {
  position: absolute;
  bottom: 28px;
  margin: 0;
  color: var(--amber);
  letter-spacing: 0.16em;
  font-size: 13px;
}

@media (max-width: 880px) {
  .voip-toast {
    left: 12px;
    right: 12px;
    width: auto;
    bottom: calc(38vh + 12px);
  }
  .stage.is-voip .talk-col {
    padding-bottom: 38vh;
    padding-right: 16px;
  }
  .stage-copy {
    grid-template-columns: 1fr;
    padding-bottom: 0;
  }
  .talk-col {
    grid-column: 1;
    padding: 16px 16px 38vh;
  }
  .stage.is-desk .talk-col {
    padding: 0;
  }
  .stage.is-desk .scene-head {
    left: 14px;
    top: 10px;
  }
  .stage.is-desk .actions {
    right: 12px;
    bottom: 12px;
  }
  .stage.is-phone .scene-head {
    left: 14px;
    top: 10px;
  }
  .stage.is-phone .actions {
    right: 12px;
    bottom: 12px;
  }
  .phone-hold {
    transform: none;
    gap: 12px;
    padding: 0;
  }
  .phone-scene {
    padding: 64px 12px 80px;
  }
  .phone-device {
    width: min(260px, 78vw);
  }
  .phone-screen {
    height: min(470px, 56vh);
  }
  .wx-temp {
    font-size: 58px;
  }
  .talk-col:has(.intercom.is-system),
  .talk-col:has(.intercom.is-document) {
    padding-bottom: 16px;
  }
  .sys-window {
    max-height: min(70vh, 520px);
  }
  .sys-search {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .sys-search-label {
    grid-column: 1 / -1;
  }
  .portrait-slot,
  .stage[data-loc="office"] .portrait-slot,
  .stage[data-loc="warehouse"] .portrait-slot,
  .stage[data-loc="highway"] .portrait-slot,
  .stage[data-loc="highway_emergency"] .portrait-slot,
  .stage[data-loc="highway_dry"] .portrait-slot {
    left: 0;
    height: 36vh;
    width: min(68%, 300px);
  }
  .stage-rail {
    top: 60px;
    right: 12px;
    width: min(200px, calc(100vw - 24px));
  }
  .hud-float {
    padding: 12px;
  }
  .hud-float-row {
    font-size: 14px;
    margin-bottom: 6px;
  }
  .hud-float-row strong {
    font-size: 15px;
  }
  .journal-stack {
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 8px;
  }
  .toast.is-note {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    padding-right: 12px;
  }
  .toast.is-note::after {
    display: none;
  }
  @keyframes note-toast-in {
    from {
      opacity: 0;
      transform: translateY(6px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
  .journal-drawer {
    position: static;
    right: auto;
    transform: none;
    width: min(calc(100vw - 24px), 820px);
    max-height: min(48vh, 380px);
  }
  .journal-drawer-card {
    max-height: min(48vh, 380px);
  }
  .journal-board {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .journal-board-col ol,
  .journal-memo-scroll {
    max-height: 16vh;
  }
  .scene-head {
    max-width: none;
  }
  .photo-stage .scene-title {
    font-size: 24px;
  }
}

.scene-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.16em;
}

.scene-title {
  margin: 6px 0 22px;
  font-family: "ZCOOL QingKe HuangYou", "Noto Sans SC", sans-serif;
  font-size: 26px;
  font-weight: 400;
}

.intercom {
  min-height: 240px;
}

.boot {
  color: var(--muted);
}

.beat {
  margin: 0 0 18px;
  padding-left: 14px;
  border-left: 2px solid var(--line);
}

.beat .who {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--amber-dim);
  margin-bottom: 6px;
}

.beat[data-speaker="zhang_lei"] { border-color: var(--stamp); }
.beat[data-speaker="xiao_wang"] { border-color: var(--ok); }
.beat[data-speaker="lao_liu"] { border-color: #5d7ea3; }
.beat[data-speaker="li_manager"] { border-color: var(--amber); }
.beat[data-speaker="player"] { border-color: var(--paper); }
.beat .say {
  white-space: pre-wrap;
  line-height: 1.75;
  font-size: 16px;
}

.prompt {
  margin: 8px 0 16px;
  padding: 14px 16px;
  background: var(--panel-2);
  border-left: 4px solid var(--amber);
}

.prompt strong {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}

.prompt span {
  color: var(--muted);
  font-size: 13px;
}

.actions {
  display: grid;
  gap: 10px;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.opt,
.cont,
.again {
  text-align: left;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 12px 14px;
  font-size: 15px;
}

.opt:hover,
.cont:hover,
.again:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.opt .id {
  font-family: "Share Tech Mono", monospace;
  color: var(--amber);
  margin-right: 8px;
}

.opt small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.cont,
.again {
  display: inline-block;
  width: max-content;
  letter-spacing: 0.12em;
}

.dock {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.meter,
.waybill {
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 16px;
}

.meter h3,
.waybill h3 {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: 0.14em;
  font-weight: 500;
  color: var(--muted);
}

.meter dl {
  margin: 0 0 14px;
  display: grid;
  gap: 8px;
}

.meter dl div {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

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

.meter dd {
  margin: 0;
  font-family: "Share Tech Mono", monospace;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

.bar {
  margin-top: 6px;
  height: 8px;
  background: #2c261c;
}

.bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--amber);
}

.waybill {
  background: var(--paper);
  color: var(--ink);
  flex: 1;
  box-shadow: 6px 6px 0 var(--shadow);
}

.waybill h3 {
  color: var(--stamp);
  font-family: "ZCOOL QingKe HuangYou", sans-serif;
  font-size: 20px;
  letter-spacing: 0.2em;
}

.waybill ol {
  margin: 0;
  padding-left: 18px;
}

.waybill li {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.55;
}

.waybill li strong {
  display: block;
  font-size: 12px;
}

.toast {
  position: absolute;
  right: 118px;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  background: var(--ink);
  color: var(--paper);
  border-left: 4px solid var(--amber);
  padding: 12px 16px;
  z-index: 4;
  max-width: 280px;
  pointer-events: none;
}

.toast.is-note {
  right: 70px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  max-width: none;
  width: max-content;
  padding: 8px 28px 8px 12px;
  border-left: 0;
  border: 1px solid #5c3b16;
  background: linear-gradient(180deg, #f3e2c0 0%, #d9c7a2 100%);
  color: var(--ink);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.35);
  pointer-events: auto;
  cursor: pointer;
  animation: note-toast-in 0.28s ease-out;
}

.toast.is-note::after {
  content: "";
  position: absolute;
  right: -7px;
  top: 50%;
  width: 12px;
  height: 12px;
  border: 1px solid #5c3b16;
  border-left: 0;
  border-bottom: 0;
  background: #d9c7a2;
  transform: translateY(-50%) rotate(45deg);
}

.toast.is-note strong {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.toast.is-global {
  position: fixed;
  right: 24px;
  bottom: 24px;
  top: auto;
  transform: none;
  z-index: 9;
  pointer-events: auto;
}

@keyframes note-toast-in {
  from {
    opacity: 0;
    transform: translate(8px, -50%);
  }
  to {
    opacity: 1;
    transform: translate(0, -50%);
  }
}

.result-stamp {
  display: inline-block;
  margin: 8px 0 16px;
  padding: 6px 16px;
  border: 3px solid var(--stamp);
  color: #ffd0c8;
  background: rgba(180, 35, 24, 0.22);
  font-family: "ZCOOL QingKe HuangYou", sans-serif;
  font-size: 36px;
  transform: rotate(-6deg);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.55);
}

.photo-stage .result-stamp {
  color: #ffd0c8;
}

.dims {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 14px 0 22px;
}

.dim-card {
  background: rgba(17, 14, 10, 0.82);
  border: 1px solid rgba(224, 154, 42, 0.45);
  padding: 12px 14px;
  backdrop-filter: blur(8px);
}

.dim-card .dim-label {
  display: block;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: #ffd27a;
  margin-bottom: 4px;
}

.dim-card .dim-score {
  font-family: "Share Tech Mono", monospace;
  font-size: 28px;
  color: #fff8ea;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.photo-stage .say {
  color: #f6efe2;
  font-size: 16px;
  line-height: 1.7;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.mast-right {
  display: flex;
  align-items: flex-end;
  gap: 18px;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--amber);
  cursor: pointer;
  align-self: center;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--amber);
}

.theme-toggle[aria-pressed="false"] {
  color: var(--muted);
  opacity: 0.75;
}

.theme-icon,
.voice-icon {
  display: block;
}

html[data-theme="day"] .theme-icon-sun {
  display: none;
}

html[data-theme="night"] .theme-icon-moon,
html:not([data-theme]) .theme-icon-moon {
  display: none;
}

.userchip {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  font-size: 13px;
  color: var(--muted);
}

.userchip-avatar {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 4px;
  border-radius: 50%;
  background: rgba(232, 168, 56, 0.18);
  border: 1px solid rgba(232, 168, 56, 0.45);
  color: var(--amber);
  font-family: "ZCOOL QingKe HuangYou", sans-serif;
  font-size: 14px;
}

.userchip button {
  margin-top: 4px;
  background: transparent;
  color: var(--amber);
  border: 0;
  padding: 0;
  font-size: 12px;
}

.gate {
  min-height: 70vh;
  display: grid;
  place-items: center;
  padding: 40px 16px;
}

.gate-card {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 28px;
}

.gate-tabs {
  display: flex;
  gap: 0;
  margin: 8px 0 18px;
  border-bottom: 1px solid var(--line);
}

.gate-tab {
  flex: 1;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  padding: 10px 0;
  font-size: 13px;
  letter-spacing: 0.12em;
  cursor: pointer;
  margin-bottom: -1px;
}

.gate-tab:hover {
  color: var(--text);
}

.gate-tab.active {
  color: var(--amber);
  border-bottom-color: var(--amber);
}

.gate-form {
  margin-top: 4px;
}

.gate-submit {
  display: block;
  width: 100%;
  margin-top: 8px;
  text-align: center;
}

.gate-card h2 {
  margin: 0 0 12px;
  font-family: "ZCOOL QingKe HuangYou", sans-serif;
  font-weight: 400;
}

.gate-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.gate-hint {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.gate-card label {
  display: block;
  margin: 12px 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.gate-card input {
  display: block;
  width: 100%;
  margin-top: 6px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}

.gate-error {
  color: var(--stamp);
  font-size: 13px;
}

.records {
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 16px;
  max-height: 280px;
  overflow: auto;
}

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

.records h3 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 500;
}

.records-hint {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted);
}

.records ol {
  margin: 0;
  padding-left: 18px;
}

.records li {
  margin: 0 0 10px;
  font-size: 13px;
  cursor: pointer;
}

.records li:hover,
.history-pane li:hover,
.desk-table tbody tr:hover {
  color: var(--amber);
}

.linkish {
  background: transparent;
  border: 0;
  color: var(--amber);
  padding: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.hub {
  position: relative;
  isolation: isolate;
  min-height: calc(100vh - 96px);
  min-height: calc(100dvh - 96px);
  padding: 0;
  overflow: hidden;
  --text: #fff8ea;
  --ink: #fff8ea;
  --muted: rgba(244, 234, 214, 0.78);
  --line: rgba(255, 248, 234, 0.42);
  --paper: #fff8ea;
  color: #fff8ea;
}

.hub-bg {
  position: absolute;
  inset: 0;
  background: #1a1712 url("/art/cel/bg/season_end.jpg") center / cover no-repeat;
  transform: scale(1.04);
  filter: saturate(1.05) contrast(1.04);
}

.hub-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 6, 4, 0.82) 0%, rgba(8, 6, 4, 0.58) 28%, rgba(8, 6, 4, 0.18) 52%, transparent 72%),
    linear-gradient(180deg, rgba(8, 6, 4, 0.28) 0%, transparent 22%, transparent 62%, rgba(8, 6, 4, 0.72) 100%);
}

.hub-stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: calc(100vh - 96px);
  min-height: calc(100dvh - 96px);
  padding: 36px 40px 28px;
}

.hub-copy {
  max-width: 520px;
  color: #f4ead6;
}

.hub-stamp {
  margin: 0 0 14px;
  font-family: "Share Tech Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: #e09a2a;
}

.hub-copy h2 {
  margin: 0;
  font-family: "ZCOOL QingKe HuangYou", sans-serif;
  font-weight: 400;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.12;
  letter-spacing: 0.06em;
  color: #fff8ea;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.hub-note {
  margin: 16px 0 0;
  font-size: 15px;
  line-height: 1.75;
  color: rgba(244, 234, 214, 0.86);
  max-width: 28em;
}

.hub-chapters {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.hub-chapters li {
  display: grid;
  grid-template-columns: 9.5em 3.2em 1fr;
  gap: 10px;
  align-items: baseline;
  font-size: 13px;
  color: rgba(244, 234, 214, 0.72);
}

.hub-chapters em {
  font-style: normal;
  font-family: "Share Tech Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #e09a2a;
}

.hub-chapters strong {
  font-weight: 500;
  color: #fff8ea;
}

.hub-actions {
  margin-top: 28px;
}

.hub .cont {
  color: #fff8ea;
  border-color: rgba(255, 248, 234, 0.55);
  background: rgba(12, 9, 6, 0.42);
}

.hub .cont:hover {
  color: #e09a2a;
  border-color: #e09a2a;
}

.hub-cast {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  justify-content: flex-end;
  max-width: min(720px, 100%);
  margin-left: auto;
}

.hub-cast li {
  padding: 7px 12px 8px;
  border: 1px solid rgba(224, 154, 42, 0.35);
  background: rgba(12, 9, 6, 0.58);
  backdrop-filter: blur(8px);
  color: #fff8ea;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.hub-cast li b {
  display: block;
  font-weight: 500;
}

.hub-cast li span {
  color: rgba(244, 234, 214, 0.7);
  font-size: 11px;
}

body.season-end {
  background: #110f0c;
}

body.season-end .mast {
  position: relative;
  z-index: 5;
  background: linear-gradient(180deg, rgba(8, 6, 4, 0.55), transparent);
  border-bottom-color: rgba(224, 154, 42, 0.18);
}

body.season-end .mast h1,
body.season-end .userchip,
html[data-theme="day"] body.season-end .mast h1,
html[data-theme="day"] body.season-end .userchip {
  color: #fff8ea;
}

html[data-theme="day"] .hub,
html[data-theme="day"] .hub-copy,
html[data-theme="day"] .hub-copy h2,
html[data-theme="day"] .hub-note,
html[data-theme="day"] .hub-stamp,
html[data-theme="day"] .hub-chapters li,
html[data-theme="day"] .hub-chapters em,
html[data-theme="day"] .hub-chapters strong,
html[data-theme="day"] .hub-chapters span,
html[data-theme="day"] .hub-cast li,
html[data-theme="day"] .hub-cast li b,
html[data-theme="day"] .hub-cast li span {
  color: inherit;
}

html[data-theme="day"] .hub-copy h2,
html[data-theme="day"] .hub-chapters strong,
html[data-theme="day"] .hub-cast li b {
  color: #fff8ea;
}

html[data-theme="day"] .hub-stamp,
html[data-theme="day"] .hub-chapters em {
  color: #e09a2a;
}

html[data-theme="day"] .hub-note,
html[data-theme="day"] .hub-chapters li,
html[data-theme="day"] .hub-chapters span,
html[data-theme="day"] .hub-cast li span {
  color: rgba(244, 234, 214, 0.86);
}

html[data-theme="day"] .hub .cont {
  color: #fff8ea;
  border-color: rgba(255, 248, 234, 0.55);
  background: rgba(12, 9, 6, 0.42);
}

.season-line {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  max-width: 560px;
}

.season-line li {
  border-left: 2px solid var(--amber);
  padding: 0 0 18px 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.season-line li strong {
  display: block;
  color: var(--ink);
  font-weight: 500;
}

.scene-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin: 8px 0 28px;
}

.scene-card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 16px 16px 14px;
}

.scene-card h3 {
  margin: 4px 0 8px;
  font-family: "ZCOOL QingKe HuangYou", sans-serif;
  font-weight: 400;
  font-size: 22px;
}

.scene-card p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.scene-card-meta {
  font-family: "Share Tech Mono", monospace;
  color: var(--amber) !important;
  font-size: 12px !important;
}

.scene-card .cont {
  margin-top: 8px;
}

.desk {
  padding: 28px 32px 64px;
  max-width: 1280px;
}

.desk-head h2 {
  margin: 4px 0 8px;
  font-family: "ZCOOL QingKe HuangYou", sans-serif;
  font-weight: 400;
  font-size: 32px;
}

.desk-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.desk-head-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px;
}

.desk-filter {
  min-width: 220px;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 12px 14px;
  display: grid;
  gap: 6px;
}

.desk-filter span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.14em;
}

.desk-filter select {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 8px 10px;
  font: inherit;
}

.class-code-card {
  min-width: 180px;
  background: var(--panel);
  border: 1px solid var(--amber-dim);
  padding: 12px 14px;
  display: grid;
  gap: 6px;
}

.class-code-card span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.14em;
}

.class-code-card strong {
  font-family: "Share Tech Mono", monospace;
  font-size: 28px;
  color: var(--amber);
  letter-spacing: 0.12em;
}

.desk-toolbar .desk-actions {
  margin: 0 0 4px;
}

.desk-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.desk-tab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  padding: 10px 16px;
  font-size: 13px;
  letter-spacing: 0.12em;
  cursor: pointer;
  margin-bottom: -1px;
}

.desk-tab:hover {
  color: var(--text);
}

.desk-tab.is-active {
  color: var(--amber);
  border-bottom-color: var(--amber);
}

.desk-section {
  margin: 8px 0 28px;
}

.desk-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 10px;
}

.desk-section-head h3 {
  margin: 0;
  font-family: "ZCOOL QingKe HuangYou", sans-serif;
  font-weight: 400;
  font-size: 22px;
}

.desk-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.desk-sub {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-family: "Share Tech Mono", monospace;
}

.desk-table.is-roster tbody tr,
.desk-matrix tbody tr,
.data-board tbody tr[data-student-id] {
  cursor: pointer;
}

.data-board-charts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.data-card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 16px 16px 12px;
  min-height: 180px;
}

.data-card h4 {
  margin: 0 0 14px;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 500;
}

.tally-chart {
  display: grid;
  gap: 10px;
}

.tally-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 8px;
  align-items: center;
}

.tally-label {
  font-size: 12px;
  color: var(--muted);
}

.tally-track {
  height: 8px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  overflow: hidden;
}

.tally-track i {
  display: block;
  height: 100%;
  background: var(--amber);
}

.tally-value {
  font-family: "Share Tech Mono", monospace;
  font-size: 12px;
  color: var(--amber);
  min-width: 4.5em;
  text-align: right;
}

.desk-matrix th,
.desk-matrix td {
  text-align: center;
  white-space: nowrap;
}

.desk-matrix th:first-child,
.desk-matrix td:first-child,
.desk-matrix tbody th {
  text-align: left;
}

.matrix-cell {
  display: inline-flex;
  min-width: 28px;
  justify-content: center;
  font-family: "Share Tech Mono", monospace;
  font-weight: 700;
}

.matrix-cell.grade-s,
.matrix-cell.grade-a {
  color: var(--amber);
}

.matrix-cell.grade-b,
.matrix-cell.grade-c {
  color: var(--ok);
}

.matrix-cell.is-busy {
  color: var(--muted);
}

.matrix-cell.is-fail {
  color: var(--stamp);
}

.matrix-cell.is-empty {
  color: var(--line);
}

.desk-dossier {
  position: fixed;
  top: 0;
  right: 0;
  width: min(720px, 100%);
  height: 100%;
  background: var(--panel);
  border-left: 1px solid var(--line);
  z-index: 13;
  display: flex;
  flex-direction: column;
  box-shadow: -18px 0 48px rgba(0, 0, 0, 0.28);
}

.desk-dossier-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 22px 12px;
  border-bottom: 1px solid var(--line);
}

.desk-dossier-head h2 {
  margin: 4px 0 6px;
  font-family: "ZCOOL QingKe HuangYou", sans-serif;
  font-weight: 400;
  font-size: 28px;
}

.desk-dossier-body {
  overflow: auto;
  padding: 16px 22px 40px;
}

@media (max-width: 980px) {
  .data-board-charts {
    grid-template-columns: 1fr;
  }

  .desk {
    padding: 20px 16px 48px;
  }
}

.desk-note {
  max-width: 640px;
  color: var(--muted);
  line-height: 1.7;
}

.desk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 28px;
}

.desk-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.desk-stat {
  min-width: 120px;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 12px 16px;
}

.desk-stat b {
  display: block;
  font-family: "Share Tech Mono", monospace;
  font-size: 22px;
  color: var(--amber);
}

.desk-stat span {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.desk-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
}

.desk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.desk-table th,
.desk-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.desk-table th {
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.08em;
  font-size: 12px;
}

.desk-table tbody tr {
  cursor: pointer;
}

.desk-table tbody tr.is-active {
  background: rgba(224, 154, 42, 0.12);
}

.history {
  position: fixed;
  top: 0;
  right: 0;
  width: min(920px, 100%);
  height: 100%;
  background: var(--panel);
  border-left: 1px solid var(--line);
  z-index: 14;
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) 1fr;
}

.history.is-detail-only {
  width: min(560px, 100%);
  grid-template-columns: 1fr;
  box-shadow: -18px 0 48px rgba(0, 0, 0, 0.28);
}

.history.is-detail-only .history-pane {
  display: none;
}

.history-pane,
.history-detail {
  overflow: auto;
  padding: 20px;
  height: 100%;
}

.history-pane {
  border-right: 1px solid var(--line);
  background: var(--panel-2);
}

.history-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.history-head h2,
.history-detail h2 {
  margin: 0 0 8px;
  font-family: "ZCOOL QingKe HuangYou", sans-serif;
  font-weight: 400;
}

.history-pane ol {
  padding-left: 18px;
}

.history-pane li {
  margin: 0 0 12px;
  font-size: 13px;
  cursor: pointer;
  line-height: 1.45;
}

.history-pane li.active {
  color: var(--amber);
}

.history-detail ol {
  padding-left: 18px;
}

.history-detail li {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.55;
}

.history-detail li strong {
  display: block;
  color: var(--amber);
  font-size: 12px;
}

.guide-btn {
  background: transparent;
  color: var(--amber);
  border: 1px solid var(--amber-dim);
  padding: 6px 12px;
  font-size: 13px;
  letter-spacing: 0.12em;
  align-self: center;
}

.guide-btn:hover {
  border-color: var(--amber);
}

.guide {
  position: fixed;
  top: 0;
  right: 0;
  width: min(460px, 100%);
  height: 100%;
  background: var(--panel);
  border-left: 1px solid var(--line);
  padding: 24px 24px 40px;
  overflow: auto;
  z-index: 12;
}

.guide-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.guide-head h2 {
  margin: 0;
  font-family: "ZCOOL QingKe HuangYou", sans-serif;
  font-weight: 400;
  font-size: 26px;
}

.guide-body h3 {
  margin: 22px 0 8px;
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--amber);
  font-weight: 500;
}

.guide-body p,
.guide-body li {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text);
}

.guide-body ol {
  padding-left: 18px;
}

.guide-body code {
  font-family: "Share Tech Mono", monospace;
  color: var(--amber);
}

body.coach-lock {
  overflow: hidden;
}

.coach-mask {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: transparent;
}

.coach-spot {
  position: absolute;
  border-radius: 6px;
  box-shadow: 0 0 0 9999px rgba(7, 6, 4, 0.78);
  outline: 2px solid var(--amber);
  outline-offset: 0;
  pointer-events: none;
}

.coach {
  position: fixed;
  z-index: 22;
  width: min(320px, calc(100vw - 24px));
  background: var(--paper);
  color: var(--ink);
  padding: 16px 16px 14px;
  box-shadow: 6px 6px 0 var(--shadow);
  pointer-events: auto;
}

.coach-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--stamp);
}

.coach-title {
  margin: 0 0 8px;
  font-family: "ZCOOL QingKe HuangYou", sans-serif;
  font-size: 20px;
}

.coach-body {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.65;
}

.coach-actions {
  display: flex;
  gap: 8px;
}

.coach .cont,
.coach .again {
  color: var(--ink);
  border-color: var(--ink);
}

.coach-target {
  outline: 1px solid var(--amber);
  outline-offset: 4px;
}

.profile {
  position: fixed;
  inset: 0;
  z-index: 13;
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  --profile-panel-bg: linear-gradient(180deg, rgba(34, 30, 23, 0.92), rgba(26, 23, 18, 0.88));
  --profile-panel-border: rgba(224, 154, 42, 0.18);
  --profile-panel-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  --profile-title: #fff8ea;
  --profile-nav-bg: linear-gradient(180deg, rgba(26, 23, 18, 0.98), rgba(17, 15, 12, 0.98));
  --profile-nav-border: rgba(224, 154, 42, 0.22);
  --profile-nav-inset: inset -1px 0 0 rgba(255, 255, 255, 0.03);
  --profile-nav-active-text: #ffe7b8;
  --profile-nav-active-bg: linear-gradient(90deg, rgba(224, 154, 42, 0.22), rgba(224, 154, 42, 0.04));
  --profile-nav-hover-bg: rgba(255, 255, 255, 0.03);
  --profile-avatar-text: #ffe7b8;
  --profile-ability-score: #fff8ea;
  --profile-ach-medal-text: #ffe7b8;
  --profile-ability-bar-bg: rgba(255, 255, 255, 0.06);
  --profile-stat-bg: var(--panel);
  background:
    radial-gradient(900px 420px at 0% 0%, rgba(224, 154, 42, 0.12), transparent 55%),
    radial-gradient(700px 360px at 100% 100%, rgba(58, 52, 40, 0.55), transparent 60%),
    var(--bg);
}

.profile-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  height: 100%;
  min-height: 0;
  max-width: 1180px;
  margin: 0 auto;
}

.profile-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 0 24px 20px;
  background: var(--profile-nav-bg);
  border-right: 1px solid var(--profile-nav-border);
  box-shadow: var(--profile-nav-inset);
}

.profile-nav-hero {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px 16px 18px 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}

.profile-nav-avatar {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(224, 154, 42, 0.35), rgba(224, 154, 42, 0.08));
  border: 2px solid rgba(224, 154, 42, 0.55);
  font-family: "ZCOOL QingKe HuangYou", sans-serif;
  font-size: 24px;
  color: var(--profile-avatar-text);
  box-shadow: 0 0 18px rgba(224, 154, 42, 0.18);
}

.profile-nav-who {
  min-width: 0;
}

.profile-nav-who strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-nav-who span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.profile-nav-who em {
  display: block;
  margin-top: 6px;
  font-style: normal;
  font-size: 11px;
  color: var(--amber);
  letter-spacing: 0.06em;
}

.profile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 8px;
  flex: 1;
}

.profile-nav-item {
  position: relative;
  text-align: left;
  padding: 12px 16px 12px 18px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.12em;
  cursor: pointer;
  border-radius: 0 999px 999px 0;
  transition: color 0.15s, background 0.15s;
}

.profile-nav-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 2px;
  background: transparent;
}

.profile-nav-item:hover {
  color: var(--text);
  background: var(--profile-nav-hover-bg);
}

.profile-nav-item.is-active {
  color: var(--profile-nav-active-text);
  background: var(--profile-nav-active-bg);
}

.profile-nav-item.is-active::before {
  background: var(--amber);
  box-shadow: 0 0 10px rgba(224, 154, 42, 0.55);
}

.profile-nav-close {
  margin: 8px 16px 0;
  align-self: stretch;
}

.profile-main {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 28px 32px 56px;
}

.profile-replay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 28px 20px;
}

.profile-replay-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(7, 6, 4, 0.62);
  cursor: pointer;
}

.profile-replay-sheet {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(86vh, 860px);
  overflow: auto;
  padding: 22px 24px 28px;
  border: 1px solid var(--profile-panel-border);
  background: var(--profile-panel-bg);
  box-shadow: var(--profile-panel-shadow), 0 0 0 1px rgba(224, 154, 42, 0.08);
}

.profile-replay-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.profile-replay-head h3 {
  margin: 4px 0 0;
  font-family: "ZCOOL QingKe HuangYou", sans-serif;
  font-weight: 400;
  font-size: 26px;
  color: var(--profile-title);
}

.profile-replay-log {
  list-style: none;
  margin: 16px 0 0;
  padding: 0 0 0 18px;
  border-left: 1px solid var(--line);
}

.profile-replay-log li {
  position: relative;
  padding: 0 0 16px 16px;
  font-size: 14px;
  line-height: 1.55;
}

.profile-replay-log li:last-child {
  padding-bottom: 0;
}

.profile-replay-log li::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(224, 154, 42, 0.18);
}

.profile-replay-log li strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--amber);
  letter-spacing: 0.06em;
}

.profile-replay-empty {
  margin: 18px 0 0;
}

.profile-play-row {
  cursor: pointer;
}

.profile-play-row:hover,
.profile-play-row.is-active {
  background: rgba(224, 154, 42, 0.08);
}

.profile-play-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.profile-scores tbody tr.profile-play-row:hover,
.profile-scores tbody tr.profile-play-row.is-active {
  background: rgba(224, 154, 42, 0.08);
}

.profile-pane-head {
  margin-bottom: 22px;
}

.profile-pane-head h2 {
  margin: 4px 0 0;
  font-family: "ZCOOL QingKe HuangYou", sans-serif;
  font-weight: 400;
  font-size: 34px;
  color: var(--profile-title);
}

.profile-panel {
  margin-bottom: 22px;
  padding: 20px 22px;
  background: var(--profile-panel-bg);
  border: 1px solid var(--profile-panel-border);
  box-shadow: var(--profile-panel-shadow);
}

.profile-panel h3 {
  margin: 0 0 14px;
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--amber);
  font-weight: 500;
}

.profile-panel-note {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.profile-panel-note strong {
  color: var(--amber);
}

.profile-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px 18px;
}

.profile-meta-grid span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.profile-meta-grid strong {
  font-size: 14px;
  font-weight: 500;
}

.profile-identity {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.profile-identity span {
  flex: 1 0 100%;
  margin-bottom: 0;
}

.profile-identity strong {
  flex: 1 1 auto;
}

.profile-identity .again {
  margin-top: 4px;
}

.profile-join-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.profile-join-form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.profile-join-form input {
  min-width: 180px;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 8px 10px;
  font: inherit;
}

.profile-campaign {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
}

.profile-stats {
  margin-bottom: 8px;
}

.profile-grade-line {
  margin: 0;
}

.profile-dim-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.profile-dim-mini {
  padding: 14px 16px;
  background: var(--surface-card);
  border: 1px solid rgba(224, 154, 42, 0.28);
}

.profile-dim-mini span {
  display: block;
  font-size: 12px;
  color: var(--accent-soft);
  margin-bottom: 6px;
}

.profile-dim-mini strong {
  font-family: "Share Tech Mono", monospace;
  font-size: 28px;
  color: var(--accent-strong);
}

.ability-panel-head {
  margin-bottom: 20px;
}

.ability-panel-head h3 {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--amber);
  font-weight: 500;
}

.ability-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.ability-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px 14px;
  align-items: center;
  padding: 16px 16px 16px 14px;
  background: var(--surface-card-soft);
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber-dim);
  min-height: 112px;
}

.ability-card.tier-s {
  border-left-color: #ffd27a;
  box-shadow: inset 0 0 0 1px rgba(255, 210, 122, 0.12);
}

.ability-card.tier-a {
  border-left-color: var(--amber);
}

.ability-card.tier-b {
  border-left-color: rgba(224, 154, 42, 0.55);
}

.ability-card.tier-c {
  border-left-color: rgba(180, 35, 24, 0.45);
}

.ability-card.is-empty {
  opacity: 0.72;
  border-left-color: var(--line);
}

.ability-card-glyph {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 16px;
  color: var(--amber);
  background: rgba(224, 154, 42, 0.12);
  border: 1px solid rgba(224, 154, 42, 0.28);
}

.ability-card-body {
  min-width: 0;
}

.ability-card-body h4 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-strong);
}

.ability-card-hint {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
}

.ability-card-meta {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.ability-ring {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}

.ability-ring-track {
  fill: none;
  stroke: rgba(224, 154, 42, 0.14);
  stroke-width: 5;
}

.ability-ring-fill {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
}

.ability-ring-fill.tier-s {
  stroke: #ffd27a;
}

.ability-ring-fill.tier-a {
  stroke: var(--amber);
}

.ability-ring-fill.tier-b {
  stroke: rgba(224, 154, 42, 0.65);
}

.ability-ring-fill.tier-c {
  stroke: rgba(180, 35, 24, 0.75);
}

.ability-ring-fill.tier-empty {
  stroke: transparent;
}

.ability-ring-score {
  fill: var(--accent-strong);
  font-family: "Share Tech Mono", monospace;
  font-size: 18px;
  font-weight: 700;
  text-anchor: middle;
}

.ability-mini.is-empty strong {
  color: var(--muted);
}

.profile-ability-history h3 {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--amber);
  font-weight: 500;
}

.profile-ability-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-ability-row {
  padding: 16px 18px;
  background: var(--surface-card-soft);
  border: 1px solid var(--line);
}

.profile-ability-row.tier-s {
  border-color: rgba(255, 215, 120, 0.45);
}

.profile-ability-row.tier-a {
  border-color: rgba(224, 154, 42, 0.35);
}

.profile-ability-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}

.profile-ability-head strong {
  font-size: 15px;
  font-weight: 600;
}

.profile-ability-score {
  font-family: "Share Tech Mono", monospace;
  font-size: 28px;
  color: var(--profile-ability-score);
  line-height: 1;
}

.profile-ability-bar {
  height: 8px;
  background: var(--profile-ability-bar-bg);
  border-radius: 999px;
  overflow: hidden;
}

.profile-ability-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--amber-dim), var(--amber));
  box-shadow: 0 0 12px rgba(224, 154, 42, 0.35);
}

.profile-ability-meta {
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.profile-progress {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
}

.profile-progress-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-card-muted);
}

.profile-progress-item:last-child {
  border-bottom: 0;
}

.profile-progress-item.is-locked {
  opacity: 0.62;
}

.profile-progress-item .profile-play-scene {
  margin-left: 4px;
}

.profile-progress-main strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
}

.profile-progress-main span {
  color: var(--muted);
  font-size: 13px;
}

.profile-progress-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}

.profile-tag {
  padding: 2px 8px;
  border: 1px solid var(--line);
  letter-spacing: 0.06em;
}

.profile-tag.passed {
  color: var(--amber);
  border-color: rgba(224, 154, 42, 0.45);
}

.profile-tag.in_progress {
  color: var(--text);
}

.profile-status-plain {
  color: var(--muted);
}

.profile-tag.failed,
.profile-tag.not_started {
  color: var(--muted);
}

.profile-ach-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  padding-bottom: 8px;
}

.profile-dim-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-dim-chips.compact {
  gap: 6px;
}

.profile-dim-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid rgba(224, 154, 42, 0.28);
  background: var(--surface-card-soft);
  font-size: 11px;
}

.profile-dim-chip em {
  font-style: normal;
  color: var(--muted);
}

.profile-dim-chip strong {
  font-family: "Share Tech Mono", monospace;
  color: var(--accent-strong);
  font-size: 13px;
}

.profile-dim-empty {
  color: var(--muted);
  font-size: 12px;
}

.profile-score-history {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-score-card {
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--surface-card-muted);
}

.profile-score-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.profile-score-card-head strong {
  display: block;
  margin-bottom: 4px;
}

.profile-score-card-head span {
  font-size: 12px;
  color: var(--muted);
}

.profile-score-card-grade {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-score-card-grade b {
  font-family: "Share Tech Mono", monospace;
  font-size: 22px;
  color: var(--accent-strong);
}

.profile-scores-dims {
  min-width: 220px;
}

.profile-ach-badge {
  position: relative;
  padding: 20px 16px 16px;
  min-height: 196px;
  background: var(--surface-card);
  border: 1px solid var(--line);
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s;
}

.profile-ach-badge.is-earned {
  border-color: rgba(224, 154, 42, 0.55);
  background:
    radial-gradient(circle at 50% 0%, rgba(224, 154, 42, 0.18), transparent 58%),
    var(--panel-2);
  box-shadow: 0 0 24px rgba(224, 154, 42, 0.12);
}

.profile-ach-badge.is-locked {
  opacity: 0.62;
  filter: grayscale(0.35);
}

.profile-ach-medal {
  width: 84px;
  height: 84px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  font-size: 34px;
  color: var(--profile-ach-medal-text);
  background: transparent;
  border: 0;
  overflow: visible;
}

.profile-ach-medal:has(.ach-icon),
.profile-ach-medal:has(.ach-icon-fallback) {
  width: auto;
  height: auto;
  min-height: 80px;
}

.ach-icon {
  width: 56px;
  height: 56px;
  display: block;
  object-fit: contain;
  object-position: center;
  box-sizing: border-box;
  padding: 2px;
}

.profile-ach-medal .ach-icon,
.profile-ach-medal .ach-icon-fallback {
  width: 80px;
  height: 80px;
  font-size: 34px;
}

.ach-icon-fallback {
  display: block;
  line-height: 1;
}

.ach-icon.is-locked,
.ach-icon-fallback.is-locked {
  filter: grayscale(0.85);
  opacity: 0.42;
}

.ach-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 6px;
}

.ach-strip-label {
  width: 100%;
  margin: 0 0 2px;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: #ffd27a;
}

.ach-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 8px;
  background: rgba(17, 14, 10, 0.78);
  border: 1px solid rgba(224, 154, 42, 0.35);
  backdrop-filter: blur(6px);
}

.ach-chip .ach-icon,
.ach-chip .ach-icon-fallback {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  font-size: 28px;
}

.ach-chip span {
  color: #f6efe2;
  font-size: 14px;
  letter-spacing: 0.04em;
}

html[data-theme="day"] .photo-stage .ach-strip-label {
  color: #ffd27a;
}

html[data-theme="day"] .photo-stage .ach-chip {
  background: rgba(17, 14, 10, 0.78);
  border-color: rgba(224, 154, 42, 0.35);
}

html[data-theme="day"] .photo-stage .ach-chip span {
  color: #f6efe2;
}

.profile-ach-badge.is-earned .profile-ach-medal:not(:has(.ach-icon)) {
  border-radius: 50%;
  border: 2px solid rgba(224, 154, 42, 0.65);
  background: linear-gradient(145deg, rgba(224, 154, 42, 0.35), rgba(224, 154, 42, 0.08));
  box-shadow: 0 0 16px rgba(224, 154, 42, 0.25);
}

.profile-ach-badge.is-locked .profile-ach-medal:not(:has(.ach-icon)) {
  border-radius: 50%;
  border: 2px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.profile-ach-badge h4 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-strong);
}

.profile-ach-badge p {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
  min-height: 38px;
}

.profile-ach-meta {
  display: block;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.profile-scores-wrap {
  overflow: auto;
  border: 1px solid var(--line);
}

.profile-resume-play {
  padding: 6px 12px;
  font-size: 13px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.profile-scores td:last-child {
  width: 1%;
}

.profile-grade {
  font-family: "Share Tech Mono", monospace;
  font-weight: 700;
}

.profile-grade.grade-s,
.profile-grade.grade-a {
  color: var(--amber);
}

@media (max-width: 880px) {
  .board {
    padding: 0;
  }
  .mast {
    padding: 16px;
  }
  .mast-clock {
    font-size: 28px;
  }
  .history {
    grid-template-columns: 1fr;
  }
  .profile-shell {
    grid-template-columns: 1fr;
  }
  .profile-nav {
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .profile-nav-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  .profile-nav-item {
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
  }
  .profile-nav-item::before {
    display: none;
  }
  .profile-main {
    padding: 20px 16px 40px;
  }
  .profile-replay {
    padding: 12px;
    align-items: stretch;
  }
  .profile-replay-sheet {
    max-height: none;
    height: 100%;
  }
  .profile-ach-wall {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
  .profile-progress-item {
    flex-direction: column;
  }
  .hub-stage {
    padding: 20px 16px 20px;
  }
  .hub-copy h2 {
    font-size: 34px;
  }
  .hub-chapters li {
    grid-template-columns: 1fr;
    gap: 2px;
    padding-bottom: 8px;
  }
  .hub-cast {
    justify-content: flex-start;
    margin-left: 0;
    margin-top: 18px;
  }
}

html[data-theme="day"] .profile {
  --profile-panel-bg: linear-gradient(180deg, #fffdf8, #f5efe4);
  --profile-panel-border: rgba(200, 160, 80, 0.32);
  --profile-panel-shadow: 0 8px 24px rgba(42, 36, 28, 0.06);
  --profile-title: var(--ink);
  --profile-nav-bg: linear-gradient(180deg, rgba(247, 243, 234, 0.98), rgba(239, 233, 220, 0.98));
  --profile-nav-border: rgba(200, 160, 80, 0.25);
  --profile-nav-inset: inset -1px 0 0 rgba(42, 36, 28, 0.06);
  --profile-nav-active-text: var(--amber-dim);
  --profile-nav-active-bg: linear-gradient(90deg, rgba(200, 120, 18, 0.16), rgba(200, 120, 18, 0.04));
  --profile-nav-hover-bg: rgba(42, 36, 28, 0.04);
  --profile-avatar-text: var(--amber-dim);
  --profile-ability-score: var(--ink);
  --profile-ach-medal-text: var(--amber-dim);
  --profile-ability-bar-bg: rgba(42, 36, 28, 0.08);
  --profile-stat-bg: #ffffff;
  --surface-card: #faf6ee;
  --surface-card-soft: #f5efe4;
  --surface-card-muted: #efe9dc;
  background:
    radial-gradient(900px 420px at 0% 0%, rgba(224, 154, 42, 0.08), transparent 55%),
    radial-gradient(700px 360px at 100% 100%, rgba(200, 191, 176, 0.35), transparent 60%),
    var(--bg);
}

html[data-theme="day"] .profile-replay-backdrop {
  background: rgba(42, 36, 28, 0.42);
}

html[data-theme="day"] .profile .desk-stat {
  background: var(--profile-stat-bg);
  border-color: rgba(200, 160, 80, 0.28);
}
