@font-face {
  font-family: 'Noto Sans SC';
  src: url('./assets/fonts/noto-sans-sc-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Noto Sans SC';
  src: url('./assets/fonts/noto-sans-sc-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0d1218;
  --panel: rgba(17, 24, 32, 0.9);
  --panel-solid: #141c25;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e9eef4;
  --muted: #93a1b0;
  --dim: #6c7a89;
  --amber: #e8b45a;
  --amber-soft: rgba(232, 180, 90, 0.16);
  --teal: #5bbfb4;
  --teal-soft: rgba(91, 191, 180, 0.14);
  --good: #6fd39a;
  --danger: #e26d6d;
  --warn: #e8a04f;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#game-root {
  position: fixed;
  inset: 0;
  z-index: 0;
}

#game-root canvas {
  display: block;
  touch-action: none;
}

.glass {
  background: linear-gradient(180deg, rgba(23, 32, 43, 0.94), rgba(14, 20, 28, 0.92));
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

button {
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ---------- top bar ---------- */

#topbar {
  position: fixed;
  top: 10px;
  left: 10px;
  right: 10px;
  height: 58px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 14px;
  z-index: 30;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 16px;
  border-right: 1px solid var(--border);
  min-width: 208px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.5px;
  color: #1b1408;
  background: linear-gradient(140deg, #f3cb7c, #d99a35);
  box-shadow: 0 6px 18px rgba(232, 180, 90, 0.3);
}

.brand-text { min-width: 0; overflow: hidden; }
.brand-text span {
  display: block;
  letter-spacing: 1.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 190px;
}

.brand-text h1 {
  margin: 0;
  font-size: 15px;
  letter-spacing: 1px;
  font-weight: 700;
}

.brand-text span {
  font-size: 9px;
  letter-spacing: 1.2px;
  color: var(--dim);
}

.topstats {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat {
  padding: 4px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  min-width: 74px;
}

.stat-label {
  display: block;
  white-space: nowrap;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.5px;
  margin-bottom: 1px;
}

.stat strong {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.stat.money {
  background: var(--amber-soft);
  border-color: rgba(232, 180, 90, 0.28);
}

.stat.money strong { color: var(--amber); }

.rating-stat { min-width: 132px; }

.rating-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.rating-bar {
  width: 74px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

#rating-fill {
  height: 100%;
  width: 55%;
  border-radius: 3px;
  background: linear-gradient(90deg, #d96f5b, #e8b45a 55%, #6fd39a);
  transition: width 0.4s ease;
}

#rating-value { font-size: 14px; min-width: 22px; }

.spacer { flex: 1; }

.speed-group {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border);
}

.speed {
  min-width: 34px;
  height: 26px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.4px;
  transition: all 0.15s ease;
}

.speed:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }

.speed.active {
  color: #1b1408;
  background: linear-gradient(140deg, #f3cb7c, #dda341);
}

.top-actions {
  display: flex;
  gap: 6px;
}

.ghost-btn {
  height: 30px;
  white-space: nowrap;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.15s ease;
}

.ghost-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.08);
}

/* ---------- toolbar ---------- */

#toolbar {
  position: fixed;
  left: 10px;
  top: 80px;
  bottom: 70px;
  width: 74px;
  border-radius: 16px;
  z-index: 25;
  display: flex;
  flex-direction: column;
  padding: 8px;
}

#tool-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.tool-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 57px;
  border-radius: 11px;
  color: var(--muted);
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.tool-btn svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tool-btn span { font-size: 10px; letter-spacing: 0.6px; }

.tool-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.tool-btn.active {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: rgba(232, 180, 90, 0.32);
  box-shadow: inset 0 0 0 1px rgba(232, 180, 90, 0.08), 0 6px 16px rgba(0, 0, 0, 0.25);
}

.tool-btn.active::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 22px;
  border-radius: 2px;
  background: var(--amber);
}

.tool-btn .kbd-badge {
  position: absolute;
  top: 5px;
  right: 7px;
  font-size: 8px;
  color: var(--dim);
}

.toolbar-foot {
  text-align: center;
  padding: 6px 0 2px;
  border-top: 1px solid var(--border);
}

.kbd {
  font-size: 9px;
  color: var(--dim);
  letter-spacing: 0.8px;
}

/* ---------- side panel ---------- */

#sidepanel {
  position: fixed;
  right: 10px;
  top: 80px;
  bottom: 70px;
  width: 326px;
  border-radius: 16px;
  z-index: 26;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.2s;
}

#sidepanel.closed {
  transform: translateX(calc(100% + 20px));
  opacity: 0;
  pointer-events: none;
}

#panel-open {
  position: fixed;
  right: 10px;
  top: 88px;
  width: 30px;
  height: 44px;
  border-radius: 10px;
  z-index: 24;
  color: var(--muted);
  display: none;
  font-size: 18px;
}

#panel-open.visible { display: block; }

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
}

.panel-head h2 {
  margin: 0 0 3px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.panel-head p {
  margin: 0;
  font-size: 10.5px;
  color: var(--dim);
}

.icon-btn {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  color: var(--muted);
  border: 1px solid var(--border);
  font-size: 15px;
  line-height: 1;
  display: grid;
  place-items: center;
  flex: none;
}

.icon-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); }

.panel-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 14px 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}

.panel-body::-webkit-scrollbar { width: 6px; }
.panel-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 3px;
}

.section { margin-bottom: 16px; }
.section:last-child { margin-bottom: 4px; }

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 1.6px;
  color: var(--dim);
  text-transform: uppercase;
  margin: 0 2px 8px;
}

.section-title .tail {
  font-size: 10px;
  letter-spacing: 0.4px;
  color: var(--muted);
  text-transform: none;
}

.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.mini-stat {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  border-radius: 10px;
  padding: 8px 10px;
}

.mini-stat span {
  display: block;
  font-size: 10px;
  color: var(--dim);
  margin-bottom: 2px;
}

.mini-stat strong {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.mini-stat.gold strong { color: var(--amber); }
.mini-stat.green strong { color: var(--good); }
.mini-stat.blue strong { color: #7fb4e8; }

.objective {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--muted);
  transition: background 0.2s;
}

.objective .box {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  flex: none;
  display: grid;
  place-items: center;
  font-size: 9px;
  color: #10161d;
}

.objective.done { color: var(--dim); }
.objective.done .box {
  background: var(--good);
  border-color: var(--good);
  color: #0d1a12;
  font-weight: 800;
}
.objective.done .txt { text-decoration: line-through; text-decoration-color: rgba(255,255,255,0.2); }

.staff-card {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 9px 10px;
  margin-bottom: 7px;
  background: rgba(255, 255, 255, 0.02);
}

.staff-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex: none;
  font-size: 13px;
  font-weight: 800;
  color: #12202a;
}

.staff-icon.teacher { background: linear-gradient(140deg, #7fd6c9, #4c9aa2); }
.staff-icon.janitor { background: linear-gradient(140deg, #e8c07c, #bb8b46); }

.staff-info { flex: 1; min-width: 0; }
.staff-info strong { display: block; font-size: 12px; margin-bottom: 1px; }
.staff-info span { font-size: 10px; color: var(--dim); line-height: 1.4; display: block; }

.pill-btn {
  height: 26px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 10.5px;
  font-weight: 700;
  color: #1b1408;
  background: linear-gradient(140deg, #f3cb7c, #dda341);
  flex: none;
  transition: filter 0.15s;
}

.pill-btn:hover { filter: brightness(1.08); }
.pill-btn.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
}
.pill-btn:disabled { opacity: 0.4; cursor: default; filter: none; }

.log-list { display: flex; flex-direction: column; gap: 5px; }

.log-entry {
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--muted);
  padding-left: 9px;
  position: relative;
}

.log-entry::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--dim);
}

.log-entry.good { color: #9ed9b4; }
.log-entry.good::before { background: var(--good); }
.log-entry.warn { color: #e2bd86; }
.log-entry.warn::before { background: var(--warn); }
.log-entry.money::before { background: var(--amber); }

.empty-note {
  font-size: 11px;
  color: var(--dim);
  line-height: 1.6;
  padding: 4px 2px;
}

/* object palette */

.group-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 9px;
  flex-wrap: wrap;
}

.group-tab {
  height: 26px;
  padding: 0 11px;
  border-radius: 7px;
  font-size: 10.5px;
  color: var(--muted);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.group-tab.active {
  color: var(--amber);
  border-color: rgba(232, 180, 90, 0.4);
  background: var(--amber-soft);
}

.object-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.object-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 9px;
  text-align: left;
  background: rgba(255, 255, 255, 0.022);
  transition: all 0.15s;
}

.object-card:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.06);
}

.object-card.active {
  border-color: rgba(232, 180, 90, 0.55);
  background: var(--amber-soft);
}

.object-card strong {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  margin-bottom: 2px;
}

.object-card .o-meta {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  font-size: 10px;
  color: var(--dim);
}

.object-card .o-cost { color: var(--amber); font-weight: 700; }
.object-card.poor .o-cost { color: var(--danger); }

.object-detail {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 11px;
  background: rgba(255, 255, 255, 0.02);
}

.object-detail strong { font-size: 12px; display: block; margin-bottom: 3px; }
.object-detail p { margin: 0; font-size: 10.5px; color: var(--muted); line-height: 1.55; }
.object-detail .row { margin-top: 6px; display: flex; justify-content: space-between; font-size: 10.5px; color: var(--dim); }
.object-detail .row b { color: var(--amber); }

.room-list { display: flex; flex-direction: column; gap: 6px; }

.room-card {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 10px;
  text-align: left;
  background: rgba(255, 255, 255, 0.022);
  transition: all 0.15s;
}

.room-card:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--border-strong); }
.room-card.active { border-color: rgba(232, 180, 90, 0.55); background: var(--amber-soft); }

.room-dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  margin-top: 4px;
  flex: none;
}

.room-card strong { display: block; font-size: 11.5px; margin-bottom: 2px; }
.room-card span { display: block; font-size: 10px; color: var(--dim); line-height: 1.5; }

.req-list { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }

.req-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 10.5px;
  color: var(--muted);
}

.req-row .have { color: var(--good); font-variant-numeric: tabular-nums; }
.req-row .have.miss { color: var(--danger); }

.needs-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }

.need-row {
  display: grid;
  grid-template-columns: 46px 1fr 32px;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  color: var(--muted);
}

.need-bar {
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.need-bar div {
  height: 100%;
  border-radius: 3px;
  background: var(--teal);
  transition: width 0.3s;
}

.need-row.low .need-bar div { background: var(--danger); }
.need-row.mid .need-bar div { background: var(--warn); }
.need-row span:last-child { text-align: right; font-variant-numeric: tabular-nums; }

.info-head {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 10px;
}

.avatar {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 800;
  color: #101820;
  flex: none;
}

.info-head h3 { margin: 0 0 2px; font-size: 14px; }
.info-head p { margin: 0; font-size: 10.5px; color: var(--dim); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  margin-right: 4px;
}

.tag.good { background: var(--teal-soft); color: #8fe0d5; }
.tag.bad { background: rgba(226, 109, 109, 0.14); color: #f0a1a1; }

.kv {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  padding: 5px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.kv:last-child { border-bottom: none; }
.kv b { color: var(--text); font-weight: 600; }

/* ---------- bottom bar ---------- */

#bottombar {
  position: fixed;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  min-width: 430px;
  max-width: min(720px, calc(100vw - 460px));
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  z-index: 22;
}

.bottom-main {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
}

.tool-badge {
  flex: none;
  height: 22px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  background: var(--amber-soft);
  border: 1px solid rgba(232, 180, 90, 0.35);
  color: var(--amber);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
}

#tool-hint {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bottom-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  color: var(--dim);
  flex: none;
}

.bottom-meta .dot-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--dim);
}

#cost-info { color: var(--amber); }

/* ---------- minimap ---------- */

#minimap-wrap {
  position: fixed;
  left: 94px;
  bottom: 68px;
  width: 234px;
  height: 159px;
  border-radius: 12px;
  padding: 6px;
  z-index: 21;
  overflow: hidden;
}

#minimap {
  width: 100%;
  height: 100%;
  border-radius: 7px;
  display: block;
  cursor: pointer;
  image-rendering: auto;
}

.minimap-label {
  position: absolute;
  right: 10px;
  bottom: 8px;
  font-size: 8.5px;
  letter-spacing: 1.4px;
  color: rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

/* ---------- toasts ---------- */

#toasts {
  position: fixed;
  bottom: 108px;
  left: 50%;
  transform: translateX(-50%);
  width: min(380px, calc(100vw - 440px));
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  z-index: 60;
  pointer-events: none;
}

.toast {
  border-radius: 10px;
  padding: 9px 13px;
  background: rgba(18, 26, 35, 0.96);
  border: 1px solid var(--border);
  border-left: 3px solid var(--teal);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
  animation: toastIn 0.25s cubic-bezier(0.2, 0.9, 0.3, 1);
  pointer-events: auto;
}

.toast.good { border-left-color: var(--good); }
.toast.error { border-left-color: var(--danger); }
.toast.warn { border-left-color: var(--warn); }
.toast.info { border-left-color: var(--teal); }

.toast strong { display: block; font-size: 11.5px; margin-bottom: 2px; }
.toast p { margin: 0; font-size: 10.5px; color: var(--muted); line-height: 1.45; }

.toast.out { animation: toastOut 0.3s ease forwards; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(6px); }
}

/* ---------- modal ---------- */

#modal-root {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 9, 13, 0.62);
  backdrop-filter: blur(5px);
  display: grid;
  place-items: center;
  pointer-events: auto;
  animation: fadeIn 0.2s ease;
  padding: 20px;
}

.modal {
  width: min(620px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 18px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, #1a242f, #10171f);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  padding: 26px 28px 22px;
  animation: modalIn 0.28s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.modal { position: relative; }
.modal.wide { width: min(760px, 94vw); }
.modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  font-size: 18px; line-height: 1; color: var(--muted);
  border: 1px solid var(--border); background: rgba(255,255,255,0.05);
}
.modal-close:hover { color: var(--text); border-color: var(--border-strong); background: rgba(255,255,255,0.1); }
body[data-theme="daylight"] .modal-close { background: rgba(0,0,0,0.04); }

@keyframes fadeIn { from { opacity: 0; } }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
}

.modal .eyebrow {
  font-size: 9.5px;
  letter-spacing: 3px;
  color: var(--amber);
  margin-bottom: 8px;
}

.modal h2 {
  margin: 0 0 8px;
  font-size: 25px;
  letter-spacing: 1px;
}

.modal h2 em {
  font-style: normal;
  color: var(--amber);
}

.modal .lede {
  margin: 0 0 18px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-bottom: 18px;
}

.step {
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 10px 11px;
  background: rgba(255, 255, 255, 0.025);
}

.step b {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 10px;
  margin-bottom: 6px;
}

.step strong { display: block; font-size: 11.5px; margin-bottom: 3px; }
.step span { font-size: 10px; color: var(--dim); line-height: 1.5; display: block; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.btn {
  height: 38px;
  padding: 0 20px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  transition: all 0.15s;
}

.btn.primary {
  color: #1b1408;
  background: linear-gradient(140deg, #f3cb7c, #dda341);
  box-shadow: 0 8px 22px rgba(232, 180, 90, 0.25);
}

.btn.primary:hover { filter: brightness(1.07); transform: translateY(-1px); }

.btn.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}

.btn.secondary:hover { background: rgba(255, 255, 255, 0.1); }

.shortcuts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 18px;
  margin: 14px 0 4px;
}

.shortcut-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 10.5px;
  color: var(--muted);
  padding: 4px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

.shortcut-row .key {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 7px;
  font-size: 9.5px;
  font-family: ui-monospace, 'Noto Sans SC', monospace;
}

.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 4px 0 14px;
}

.report-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.025);
}

.report-item span { display: block; font-size: 10px; color: var(--dim); margin-bottom: 3px; }
.report-item strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.report-item.positive strong { color: var(--good); }
.report-item.negative strong { color: var(--danger); }
.report-item.gold strong { color: var(--amber); }

.help-tip {
  font-size: 10.5px;
  color: var(--dim);
  line-height: 1.6;
  margin-top: 10px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

/* ---------- responsive ---------- */

@media (max-width: 1180px) {
  #topbar { gap: 10px; }
  .brand { min-width: 0; padding-right: 10px; }
  .brand-text { display: none; }
  .topstats .stat:nth-child(5) { display: none; }
  .rating-stat { min-width: 108px; }
  .ghost-btn { padding: 0 9px; }
  .rating-bar { width: 60px; }
}

@media (max-width: 1024px) {
  #minimap-wrap { display: none; }
  .topstats .stat:nth-child(4) { display: none; }
  #bottombar { max-width: calc(100vw - 460px); min-width: 0; }
  #toasts { width: min(340px, calc(100vw - 420px)); }
}

@media (max-width: 860px) {
  .ghost-btn { padding: 0 7px; }
}

@media (max-width: 760px) {
  .top-actions .ghost-btn#btn-load,
  .top-actions .ghost-btn#btn-save { display: none; }
  .topstats { gap: 2px; }
  .stat { padding: 3px 7px; min-width: 0; }
  .speed-group { display: none; }
  #sidepanel { width: min(326px, calc(100vw - 20px)); }
  #bottombar { display: none; }
  .steps { grid-template-columns: 1fr; }
  .shortcuts { grid-template-columns: 1fr; }
}


/* ---------- mobile landscape ---------- */

@media (max-height: 560px) and (orientation: landscape), (pointer: coarse) and (orientation: landscape) {
  #topbar {
    top: 4px;
    left: 4px;
    right: 4px;
    height: 44px;
    gap: 7px;
    padding: 0 8px;
  }
  .brand { min-width: 0; padding-right: 8px; border-right: none; }
  .brand-mark { width: 30px; height: 30px; border-radius: 8px; font-size: 12px; }
  .brand-text { display: none; }
  .topstats { gap: 4px; }
  .topstats .stat:nth-child(4),
  .topstats .stat:nth-child(5) { display: none; }
  .stat { min-width: 0; padding: 2px 6px; }
  .stat-label { font-size: 8.5px; margin-bottom: 0; }
  .stat strong { font-size: 12.5px; }
  .rating-stat { min-width: 88px; }
  .rating-bar { width: 44px; }
  #rating-value { font-size: 12px; }
  .speed { min-width: 28px; height: 23px; font-size: 10px; }
  .speed-group { padding: 2px; }
  .ghost-btn { height: 25px; padding: 0 6px; font-size: 10px; }
  #toolbar {
    left: 4px;
    top: 54px;
    bottom: 6px;
    width: 46px;
    padding: 4px;
    border-radius: 12px;
  }
  #tool-list { gap: 2px; }
  .tool-btn { height: auto; flex: 1; min-height: 0; gap: 1px; border-radius: 8px; }
  .tool-btn svg { width: 17px; height: 17px; }
  .tool-btn span { font-size: 7.5px; letter-spacing: 0; }
  .kbd-badge { display: none; }
  .tool-btn.active::before { left: -5px; }
  #sidepanel {
    top: 54px;
    right: 6px;
    bottom: 6px;
    width: min(300px, 37vw);
    border-radius: 12px;
  }
  #panel-open { top: 56px; right: 6px; }
  #minimap-wrap { display: none; }
  #bottombar { display: none; }
  #toasts {
    left: 56px;
    right: auto;
    bottom: 8px;
    width: min(280px, calc(100vw - 380px));
  }
  .modal { width: calc(100vw - 20px); max-height: 92vh; padding: 16px 18px; }
  .modal.wide { width: calc(100vw - 20px); }
  .steps, .shortcuts { grid-template-columns: 1fr; }
  .modal h2 { font-size: 22px; }
  .panel-head h2 { font-size: 15px; }
  .panel-body { font-size: 11px; }
}

@media (max-height: 520px) {
  .modal-overlay { padding: 8px; }
  .modal {
    width: calc(100vw - 16px);
    max-height: 95vh;
    padding: 14px 18px 12px;
    border-radius: 14px;
  }
  .modal .eyebrow { font-size: 9px; margin-bottom: 4px; }
  .modal h2 { font-size: 19px; margin: 2px 0 4px; }
  .modal .lede { font-size: 11.5px; margin: 4px 0 8px; line-height: 1.45; }
  .shortcuts { grid-template-columns: 1fr 1fr; column-gap: 18px; }
  .shortcut-row { padding: 3px 0; font-size: 11px; }
  .modal-actions { margin-top: 10px; }
  .report-grid { gap: 6px; margin-top: 8px; }
  .report-item { padding: 8px 10px; }
  .report-item strong { font-size: 17px; }
  .help-tip { font-size: 10.5px; padding: 7px 9px; margin-top: 8px; }
}

/* ---------- tutorial coach ---------- */

#tutorial-coach {
  position: fixed;
  left: 94px;
  bottom: 70px;
  width: 300px;
  z-index: 55;
  border-radius: 14px;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(28, 38, 50, 0.97), rgba(15, 22, 30, 0.97));
  border: 1px solid rgba(232, 180, 90, 0.38);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  animation: toastIn 0.25s cubic-bezier(0.2, 0.9, 0.3, 1);
}

#tutorial-coach.hidden { display: none; }
#tutorial-coach.collapsed { width: auto; padding: 8px 12px; }
#tutorial-coach.collapsed .coach-body { display: none; }

.coach-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.coach-kicker {
  font-size: 9px;
  letter-spacing: 1.4px;
  font-weight: 700;
  color: var(--amber);
  background: var(--amber-soft);
  border: 1px solid rgba(232, 180, 90, 0.3);
  border-radius: 5px;
  padding: 1px 6px;
}

.coach-step {
  font-size: 9.5px;
  color: var(--dim);
  letter-spacing: 0.6px;
}

.coach-icon {
  margin-left: auto;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.coach-icon:hover { color: var(--text); border-color: var(--border-strong); }

.coach-body strong {
  display: block;
  font-size: 13px;
  margin: 7px 0 3px;
  color: var(--text);
}

.coach-body p {
  margin: 0 0 9px;
  font-size: 10.5px;
  line-height: 1.55;
  color: var(--muted);
}

.coach-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.coach-skip {
  font-size: 9.5px;
  color: var(--dim);
  border-bottom: 1px dashed var(--dim);
  background: none;
  padding: 0;
}

.coach-skip:hover { color: var(--muted); }

.coach-progress {
  height: 3px;
  margin-top: 10px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.coach-progress i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--amber), #f0cf8a);
  transition: width 0.3s ease;
}

.tool-btn.tutorial-target {
  border-color: rgba(232, 180, 90, 0.55);
  animation: tutorialPulse 1.8s ease-in-out infinite;
}

@keyframes tutorialPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 180, 90, 0); }
  50% { box-shadow: 0 0 0 3px rgba(232, 180, 90, 0.18); }
}

.tutorial-card {
  border: 1px solid rgba(232, 180, 90, 0.28);
  background: rgba(232, 180, 90, 0.05);
  border-radius: 10px;
  padding: 9px 10px;
}

.tutorial-current { font-size: 11.5px; font-weight: 700; color: var(--amber); margin-bottom: 2px; }
.tutorial-text { font-size: 10.5px; color: var(--muted); line-height: 1.5; }
.tutorial-progress {
  height: 3px;
  margin-top: 7px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.tutorial-progress i {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--amber), #f0cf8a);
}

.staff-icon.nurse { background: linear-gradient(140deg, #e8eef2, #b9c9d6); color: #3c4a5a; }
.staff-icon.cook { background: linear-gradient(140deg, #e8b45a, #b07a3c); color: #2a1c10; }
.staff-icon.guard { background: linear-gradient(140deg, #6b7f96, #3f4a55); color: #f0f4f8; }

@media (max-width: 760px) {
  #tutorial-coach {
    left: 74px;
    right: 10px;
    bottom: 10px;
    width: auto;
  }
}

@media (max-height: 560px) and (orientation: landscape), (pointer: coarse) and (orientation: landscape) {
  #tutorial-coach {
    left: 56px;
    right: auto;
    top: 56px;
    bottom: auto;
    width: min(260px, calc(100vw - 380px));
    padding: 8px 10px;
    border-radius: 10px;
  }
  .coach-body strong { font-size: 11.5px; margin: 5px 0 2px; }
  .coach-body p { font-size: 9.5px; line-height: 1.45; margin-bottom: 6px; }
  .coach-progress { margin-top: 6px; }
  .coach-actions .pill-btn { height: 24px; padding: 0 9px; font-size: 9.5px; }
}

/* ==========================================================================
   v2.0 · 云端校园、天气季节、成就科研、财务政策、事件与主题
   ========================================================================== */

body {
  --bg-deep: #060b10;
  --shadow-strong: 0 30px 80px rgba(0, 0, 0, 0.6);
}

body[data-theme="midnight"] {
  --bg: #07111f;
  --panel: rgba(10, 22, 38, 0.92);
  --panel-solid: #0c1a2b;
  --border: rgba(150, 200, 255, 0.1);
  --border-strong: rgba(150, 200, 255, 0.2);
  --text: #e6f0fb;
  --muted: #91a8c2;
  --dim: #607894;
  --amber: #f0c36a;
  --amber-soft: rgba(240, 195, 106, 0.15);
  --teal: #58a6ff;
  --teal-soft: rgba(88, 166, 255, 0.15);
  --good: #6fd39a;
  --danger: #ef7b7b;
  --warn: #e8a04f;
}

body[data-theme="forest"] {
  --bg: #0a1510;
  --panel: rgba(13, 29, 21, 0.92);
  --panel-solid: #10241a;
  --border: rgba(190, 235, 200, 0.1);
  --border-strong: rgba(190, 235, 200, 0.2);
  --text: #e8f2e9;
  --muted: #9ab6a2;
  --dim: #6c8a75;
  --amber: #e6c078;
  --amber-soft: rgba(230, 192, 120, 0.15);
  --teal: #6fd0a5;
  --teal-soft: rgba(111, 208, 165, 0.15);
  --good: #82d9a5;
  --danger: #e57f7f;
  --warn: #e3a95d;
}

body[data-theme="daylight"] {
  --bg: #eef2ec;
  --panel: rgba(252, 254, 250, 0.94);
  --panel-solid: #ffffff;
  --border: rgba(30, 50, 42, 0.12);
  --border-strong: rgba(30, 50, 42, 0.24);
  --text: #1d3028;
  --muted: #5d7168;
  --dim: #87988f;
  --amber: #a86b12;
  --amber-soft: rgba(190, 130, 30, 0.14);
  --teal: #1c8578;
  --teal-soft: rgba(28, 133, 120, 0.12);
  --good: #238a55;
  --danger: #b83f3f;
  --warn: #a86410;
  color-scheme: light;
}

body[data-theme="daylight"] .glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(242, 247, 241, 0.94));
  box-shadow: 0 16px 40px rgba(30, 50, 42, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

body[data-theme="daylight"] .modal {
  background: linear-gradient(180deg, #ffffff, #f4f8f3);
  box-shadow: 0 30px 80px rgba(30, 50, 42, 0.28);
}

body[data-theme="daylight"] #page-bg { opacity: 0.16; mix-blend-mode: multiply; }
body[data-theme="daylight"] .brand-mark { color: #fff8e8; }
body[data-theme="daylight"] .btn.primary,
body[data-theme="daylight"] .pill-btn { color: #fff8e8; }
body[data-theme="daylight"] .staff-icon,
body[data-theme="daylight"] .cmd-icon,
body[data-theme="daylight"] .research-icon,
body[data-theme="daylight"] .ach-icon,
body[data-theme="daylight"] .policy-icon,
body[data-theme="daylight"] .event-icon,
body[data-theme="daylight"] .weather-hero-icon { color: #fff; text-shadow: none; }
body[data-theme="daylight"] .toast { background: rgba(255, 255, 255, 0.97); }
body[data-theme="daylight"] .modal-overlay { background: rgba(30, 45, 38, 0.32); }

#page-bg {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.32;
  mix-blend-mode: screen;
}

.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  animation: auroraFloat 22s ease-in-out infinite alternate;
}
.aurora.a1 { width: 52vw; height: 42vh; left: -8vw; top: -16vh; background: radial-gradient(circle, rgba(91, 191, 180, 0.55), transparent 70%); }
.aurora.a2 { width: 46vw; height: 38vh; right: -6vw; top: -10vh; background: radial-gradient(circle, rgba(232, 180, 90, 0.4), transparent 70%); animation-delay: -7s; }
.aurora.a3 { width: 60vw; height: 40vh; left: 20vw; bottom: -26vh; background: radial-gradient(circle, rgba(120, 150, 255, 0.32), transparent 70%); animation-delay: -13s; }

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

@keyframes auroraFloat {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(3vw, 2vh, 0) scale(1.08); }
  100% { transform: translate3d(-2vw, -3vh, 0) scale(0.96); }
}

body.reduce-motion .aurora,
body.reduce-motion .grain { animation: none; }
body.reduce-motion * { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }

body.season-spring { --season-accent: #8fc9a5; }
body.season-summer { --season-accent: #c9d97a; }
body.season-autumn { --season-accent: #e0b46a; }
body.season-winter { --season-accent: #a9c8da; }

/* 顶栏天气 */
.weather-widget {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 11px 0 9px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(140deg, rgba(91, 191, 180, 0.16), rgba(232, 180, 90, 0.08));
  text-align: left;
  transition: border-color 0.18s, transform 0.18s;
}
.weather-widget:hover { border-color: rgba(232, 180, 90, 0.45); transform: translateY(-1px); }
.weather-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: #12202a;
  background: linear-gradient(140deg, var(--season-accent, #8fc9a5), #5bbfb4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.weather-copy { display: flex; flex-direction: column; line-height: 1.15; }
.weather-copy strong { font-size: 11.5px; letter-spacing: 0.4px; }
.weather-copy small { font-size: 8.5px; color: var(--dim); letter-spacing: 0.5px; white-space: nowrap; }
.weather-temp { font-size: 14px; font-weight: 800; color: var(--amber); font-variant-numeric: tabular-nums; }

body.weather-rain .weather-icon,
body.weather-storm .weather-icon { background: linear-gradient(140deg, #6b8fb5, #3f5c7a); color: #eaf4ff; }
body.weather-snow .weather-icon { background: linear-gradient(140deg, #dfeef8, #9fbfd4); color: #264154; }
body.weather-heat .weather-icon { background: linear-gradient(140deg, #e8a35a, #cf6a3c); color: #2a1208; }
body.weather-fog .weather-icon { background: linear-gradient(140deg, #aab6bd, #74828b); color: #17232b; }

/* 主题/功能按钮 */
.top-actions #btn-save,
.top-actions #btn-load,
.top-actions #btn-new,
.top-actions .admin-link { display: none; }
.feature-btn { border-color: rgba(232, 180, 90, 0.3); color: #f0d49a; }
.feature-btn:hover { background: rgba(232, 180, 90, 0.16); border-color: rgba(232, 180, 90, 0.55); }
body[data-theme="daylight"] .feature-btn { color: var(--amber); }
.admin-link { text-decoration: none; display: inline-flex; align-items: center; }

#player-chip { color: var(--amber); font-style: normal; }

/* 公告条 */
#announcement-bar {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 29;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(780px, calc(100vw - 40px));
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid rgba(232, 180, 90, 0.3);
  background: linear-gradient(90deg, rgba(40, 33, 18, 0.95), rgba(24, 30, 34, 0.95));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
  animation: announceIn 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
}
#announcement-bar.hidden { display: none; }
#announcement-bar.announce-warn { border-color: rgba(232, 160, 79, 0.45); }
#announcement-bar.announce-good { border-color: rgba(111, 211, 154, 0.4); }
.announce-badge {
  flex: none;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.4px;
  color: #1b1408;
  background: linear-gradient(140deg, #f3cb7c, #dda341);
  padding: 3px 7px;
  border-radius: 5px;
}
.announce-copy { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.announce-copy strong { font-size: 11.5px; white-space: nowrap; }
.announce-copy span { font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.announce-more { flex: none; font-size: 10px; color: var(--amber); border-bottom: 1px dashed rgba(232, 180, 90, 0.5); }
.announce-close { flex: none; width: 22px; height: 22px; border-radius: 6px; color: var(--muted); font-size: 16px; line-height: 1; }
.announce-close:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }
@keyframes announceIn { from { opacity: 0; transform: translate(-50%, -10px); } }

/* 云存档状态 */
#cloud-flag {
  position: fixed;
  right: 16px;
  bottom: 170px;
  z-index: 40;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #12202a;
  background: linear-gradient(140deg, #7fd6c9, #4c9aa2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: transform 0.18s, filter 0.18s;
}
#cloud-flag:hover { transform: translateY(-2px); filter: brightness(1.08); }
#cloud-flag.offline { background: linear-gradient(140deg, #9aa4ac, #6d7880); color: #1b2228; }

/* 概览快捷入口 */
.command-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.command-tile {
  display: grid;
  grid-template-columns: 30px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 1px 8px;
  text-align: left;
  padding: 8px 9px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01));
  transition: transform 0.16s, border-color 0.16s, background 0.16s;
}
.command-tile:hover { transform: translateY(-1px); border-color: rgba(232, 180, 90, 0.4); background: rgba(232, 180, 90, 0.07); }
.cmd-icon {
  grid-row: span 2;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: #13202a;
  background: linear-gradient(140deg, #c8d4de, #8fa2b2);
}
.cmd-icon.gold { background: linear-gradient(140deg, #f3cb7c, #d99a35); }
.cmd-icon.teal { background: linear-gradient(140deg, #7fd6c9, #4c9aa2); }
.cmd-icon.blue { background: linear-gradient(140deg, #9ec3ef, #5f8ec4); }
.cmd-icon.violet { background: linear-gradient(140deg, #c0a6ef, #8769c9); }
.command-tile strong { font-size: 11.5px; }
.command-tile small { font-size: 9px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.weather-card {
  cursor: pointer;
  border: 1px solid rgba(91, 191, 180, 0.28);
  background: linear-gradient(150deg, rgba(91, 191, 180, 0.12), rgba(232, 180, 90, 0.06));
  border-radius: 12px;
  padding: 10px 12px;
  transition: border-color 0.18s, transform 0.18s;
}
.weather-card:hover { border-color: rgba(232, 180, 90, 0.45); transform: translateY(-1px); }
.weather-main { display: flex; align-items: center; gap: 10px; }
.weather-big {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
  background: linear-gradient(140deg, var(--season-accent, #8fc9a5), #4c9aa2);
  color: #12202a;
}
.weather-main strong { display: block; font-size: 12.5px; }
.weather-main span { display: block; font-size: 9.5px; color: var(--dim); margin-top: 2px; }
.weather-card > p { margin: 8px 0 0; font-size: 10.5px; line-height: 1.55; color: var(--muted); }

.finance-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
  padding: 4px 2px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}
.finance-row:last-child { border-bottom: none; }
.finance-row b { font-variant-numeric: tabular-nums; font-weight: 700; }
.finance-row b.positive, .positive { color: var(--good); }
.finance-row b.negative, .negative { color: var(--danger); }

.staff-actions { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
.staff-icon { position: relative; }
.lv-badge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  font-size: 7.5px;
  font-style: normal;
  font-weight: 800;
  padding: 1px 3px;
  border-radius: 4px;
  background: #101820;
  color: #f3cb7c;
  border: 1px solid rgba(232, 180, 90, 0.45);
}
body[data-theme="daylight"] .lv-badge { background: #ffffff; color: #8a5a10; }

/* 日报扩展 */
.report-weather {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
  background: linear-gradient(140deg, rgba(91, 191, 180, 0.1), rgba(232, 180, 90, 0.05));
}
.report-weather > span {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  font-weight: 800; color: #12202a; background: linear-gradient(140deg, #8fc9a5, #4c9aa2);
}
.report-weather strong { display: block; font-size: 12.5px; }
.report-weather small { font-size: 10px; color: var(--dim); }
.report-rating { margin-left: auto; text-align: right; }
.report-rating span { display: block; font-size: 9px; color: var(--dim); }
.report-rating b { font-size: 22px; color: var(--amber); }
.report-foot {
  display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px;
  font-size: 10px; color: var(--dim);
}

/* 成就 */
.ach-summary {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 16px; margin-bottom: 14px;
  border: 1px solid var(--border); border-radius: 13px;
  background: linear-gradient(140deg, rgba(232, 180, 90, 0.08), transparent);
}
.ach-ring {
  width: 58px; height: 58px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: conic-gradient(var(--amber) calc(var(--pct) * 1%), rgba(255,255,255,0.08) 0);
}
.ach-ring::before {
  content: ''; position: absolute; width: 44px; height: 44px; border-radius: 50%; background: var(--panel-solid);
}
.ach-ring span { position: relative; font-size: 11px; font-weight: 800; color: var(--amber); }
.ach-summary > div:nth-child(2) strong { display: block; font-size: 13px; }
.ach-summary > div:nth-child(2) span { font-size: 10px; color: var(--dim); }
.ach-tiers { margin-left: auto; display: flex; flex-direction: column; gap: 3px; font-size: 9.5px; }
.tier-dot.bronze { color: #d59a6a; }
.tier-dot.silver { color: #c3d0dc; }
.tier-dot.gold { color: #f3cb7c; }

.ach-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ach-card {
  display: flex; gap: 10px; padding: 9px 11px;
  border: 1px solid var(--border); border-radius: 11px; background: rgba(255,255,255,0.02);
  opacity: 0.6; filter: saturate(0.6);
}
.ach-card.unlocked { opacity: 1; filter: none; background: linear-gradient(140deg, rgba(232,180,90,0.08), rgba(91,191,180,0.05)); }
.ach-card.unlocked.bronze { border-color: rgba(213,154,106,0.4); }
.ach-card.unlocked.silver { border-color: rgba(195,208,220,0.4); }
.ach-card.unlocked.gold { border-color: rgba(243,203,124,0.5); }
.ach-icon {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  display: grid; place-items: center; font-size: 12px; font-weight: 800;
  color: #12202a; background: linear-gradient(140deg, #dfe7ee, #a9b9c6);
}
.ach-card.gold .ach-icon { background: linear-gradient(140deg, #f6d794, #d99a35); }
.ach-card.silver .ach-icon { background: linear-gradient(140deg, #e6edf3, #aebdc9); }
.ach-card.bronze .ach-icon { background: linear-gradient(140deg, #e8c2a0, #bd875c); }
.ach-copy { flex: 1; min-width: 0; }
.ach-copy strong { display: block; font-size: 11.5px; }
.ach-copy small { display: block; font-size: 9.5px; color: var(--dim); line-height: 1.4; margin: 2px 0 5px; }
.ach-bar { height: 4px; border-radius: 2px; background: rgba(255,255,255,0.09); overflow: hidden; }
.ach-bar i { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--teal), var(--amber)); }
.ach-progress { display: block; font-size: 8.5px; color: var(--dim); margin-top: 3px; font-variant-numeric: tabular-nums; }

/* 科研 */
.research-head {
  display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 14px;
  padding: 9px 13px; border: 1px solid var(--border); border-radius: 11px;
  font-size: 10.5px; color: var(--muted); background: rgba(255,255,255,0.02);
}
.research-head b { color: var(--text); }
.research-grid { display: flex; flex-direction: column; gap: 7px; }
.research-card {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px;
  border: 1px solid var(--border); border-radius: 11px; background: rgba(255,255,255,0.02);
}
.research-card.owned { border-color: rgba(111,211,154,0.32); background: rgba(111,211,154,0.045); }
.research-icon {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  display: grid; place-items: center; font-size: 12px; font-weight: 800;
  color: #12202a; background: linear-gradient(140deg, #b9ded9, #6fb3ad);
}
.research-card.owned .research-icon { background: linear-gradient(140deg, #8fe0b1, #4da97a); }
.research-copy { flex: 1; min-width: 0; }
.research-copy strong { display: block; font-size: 12px; }
.research-copy small { display: block; font-size: 10px; color: var(--muted); line-height: 1.45; margin: 1px 0 2px; }
.research-req { font-size: 8.5px; color: var(--dim); }
.research-card .pill-btn { min-width: 78px; text-align: center; }
.pill-btn.done { background: rgba(111,211,154,0.18); color: var(--good); }
.pill-btn.danger { background: rgba(226,109,109,0.16); color: var(--danger); border: 1px solid rgba(226,109,109,0.3); }
.pill-btn.active { background: rgba(91,191,180,0.18); color: var(--teal); border: 1px solid rgba(91,191,180,0.35); }

/* 财务 */
.finance-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.finance-kpi {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 11px;
  background: rgba(255,255,255,0.025);
}
.finance-kpi span { display: block; font-size: 9.5px; color: var(--dim); }
.finance-kpi b { font-size: 17px; font-variant-numeric: tabular-nums; }
.finance-kpi.warn b { color: var(--danger); }
.finance-chart {
  display: flex; align-items: flex-end; gap: 8px; height: 120px;
  padding: 8px 10px 2px; border: 1px solid var(--border); border-radius: 11px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
}
.chart-col { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; position: relative; }
.chart-col .bar { width: 42%; max-width: 16px; border-radius: 3px 3px 0 0; min-height: 3px; }
.chart-col .bar.income { background: linear-gradient(180deg, #f3cb7c, #c08a2e); }
.chart-col .bar.net.up { background: linear-gradient(180deg, #7fd6a0, #3b9c62); }
.chart-col .bar.net.down { background: linear-gradient(180deg, #e88b8b, #a83c3c); }
.chart-col span { position: absolute; bottom: -14px; font-size: 8px; color: var(--dim); }
.finance-chart { margin-bottom: 18px; }
.chart-legend { display: flex; gap: 14px; font-size: 9px; color: var(--dim); }
.chart-legend .dot, .dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 4px; }
.dot.income { background: #f3cb7c; } .dot.up { background: #6fd39a; } .dot.down { background: #e26d6d; }

.segmented { display: flex; gap: 4px; padding: 3px; border-radius: 10px; background: rgba(255,255,255,0.05); margin-bottom: 8px; }
.segmented button {
  flex: 1; height: 32px; border-radius: 8px; font-size: 11px; color: var(--muted);
  border: 1px solid transparent; transition: all 0.15s;
}
.segmented button.active { color: var(--amber); background: rgba(232,180,90,0.14); border-color: rgba(232,180,90,0.34); font-weight: 700; }

.policy-list { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.policy-card {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; text-align: left;
  border: 1px solid var(--border); border-radius: 10px; background: rgba(255,255,255,0.02);
  transition: border-color 0.15s, background 0.15s;
}
.policy-card:hover { border-color: var(--border-strong); }
.policy-card.active { border-color: rgba(91,191,180,0.45); background: rgba(91,191,180,0.08); }
.policy-icon {
  width: 28px; height: 28px; border-radius: 8px; flex: none;
  display: grid; place-items: center; font-size: 10.5px; font-weight: 800;
  color: #12202a; background: linear-gradient(140deg, #cfd9e2, #97a8b6);
}
.policy-card.active .policy-icon { background: linear-gradient(140deg, #8fe0d2, #4c9aa2); }
.policy-card > div { flex: 1; min-width: 0; }
.policy-card strong { display: block; font-size: 11px; }
.policy-card small { display: block; font-size: 8.5px; color: var(--dim); line-height: 1.35; }
.toggle { width: 26px; height: 15px; border-radius: 9px; background: rgba(255,255,255,0.12); position: relative; flex: none; transition: background 0.18s; }
.toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: #cbd4dc; transition: transform 0.18s; }
.policy-card.active .toggle { background: rgba(91,191,180,0.55); }
.policy-card.active .toggle::after { transform: translateX(11px); background: #fff; }

.loan-row { display: flex; align-items: center; gap: 8px; }
.loan-row input, .rename-form input {
  height: 32px; border-radius: 8px; border: 1px solid var(--border); background: rgba(0,0,0,0.22);
  color: var(--text); padding: 0 10px; font-family: inherit; font-size: 11px; width: 120px;
}
body[data-theme="daylight"] .loan-row input,
body[data-theme="daylight"] .rename-form input { background: rgba(255,255,255,0.7); }
.loan-row input:focus, .rename-form input:focus { outline: none; border-color: rgba(232,180,90,0.5); }

/* 排行榜 */
.board-loading { padding: 26px; text-align: center; font-size: 11px; color: var(--dim); }
.board-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.board-table th {
  text-align: left; font-size: 9px; letter-spacing: 1px; color: var(--dim);
  font-weight: 600; padding: 7px 8px; border-bottom: 1px solid var(--border);
}
.board-table td { padding: 8px; border-bottom: 1px dashed rgba(255,255,255,0.055); font-variant-numeric: tabular-nums; }
.board-table tr.me { background: rgba(232,180,90,0.08); }
.board-table tr.me td { color: #f4d9a3; }
.board-table em { font-style: normal; font-size: 8.5px; color: var(--amber); border: 1px solid rgba(232,180,90,0.35); padding: 0 4px; border-radius: 4px; }
.rank { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: rgba(255,255,255,0.06); font-size: 10px; }
.rank-1 { background: linear-gradient(140deg, #f6d794, #d99a35); color: #2a1d08; font-weight: 800; }
.rank-2 { background: linear-gradient(140deg, #e6edf3, #aebdc9); color: #26303a; font-weight: 800; }
.rank-3 { background: linear-gradient(140deg, #e8c2a0, #bd875c); color: #2a1a0c; font-weight: 800; }

/* 云存档 */
.cloud-status {
  padding: 8px 12px; border-radius: 9px; font-size: 10.5px; margin-bottom: 14px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.02); color: var(--muted);
}
.cloud-status.online { border-color: rgba(111,211,154,0.3); background: rgba(111,211,154,0.06); color: #9ed9b4; }
.cloud-status.offline { border-color: rgba(226,109,109,0.3); background: rgba(226,109,109,0.06); color: #e8a3a3; }
.cloud-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cloud-slot {
  border: 1px dashed var(--border-strong); border-radius: 11px; padding: 10px;
  display: flex; flex-direction: column; gap: 7px; background: rgba(255,255,255,0.015);
}
.cloud-slot.filled { border-style: solid; border-color: rgba(91,191,180,0.3); background: rgba(91,191,180,0.045); }
.cloud-slot-head { display: flex; justify-content: space-between; font-size: 10px; color: var(--dim); }
.cloud-slot-head strong { font-size: 11.5px; color: var(--text); }
.cloud-slot-body { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 9px; color: var(--dim); min-height: 48px; }
.cloud-slot-body b { font-size: 14px; color: var(--amber); }
.cloud-slot-body small { font-size: 8px; color: var(--dim); }
.cloud-slot-actions { display: flex; gap: 4px; }
.cloud-slot-actions .pill-btn { flex: 1; padding: 0 4px; height: 24px; font-size: 9px; }
.cloud-local { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cloud-local span { font-size: 9px; color: var(--dim); }
.rename-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rename-form span { font-size: 9px; color: var(--dim); }

/* 设置 */
.theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.theme-card {
  text-align: left; padding: 9px 11px; border-radius: 10px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.02);
  transition: border-color 0.15s, background 0.15s;
}
.theme-card strong { display: block; font-size: 11.5px; }
.theme-card span { display: block; font-size: 9px; color: var(--dim); margin-top: 2px; }
.theme-card.active { border-color: rgba(232,180,90,0.45); background: rgba(232,180,90,0.08); }
.settings-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 2px; border-bottom: 1px dashed rgba(255,255,255,0.055);
}
.settings-row:last-child { border-bottom: none; }
.settings-row strong { display: block; font-size: 11px; }
.settings-row span { display: block; font-size: 9px; color: var(--dim); margin-top: 1px; }
.settings-row a { text-decoration: none; }

/* 天气页 */
.weather-hero {
  display: flex; align-items: center; gap: 16px; padding: 16px;
  border: 1px solid var(--border); border-radius: 14px; margin-bottom: 14px;
  background: linear-gradient(150deg, rgba(91,191,180,0.12), rgba(232,180,90,0.06));
}
.weather-hero-icon {
  width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center;
  font-size: 24px; font-weight: 800; color: #12202a;
  background: linear-gradient(140deg, var(--season-accent, #8fc9a5), #4c9aa2);
  box-shadow: 0 12px 28px rgba(0,0,0,0.25);
}
.weather-hero-main strong { display: block; font-size: 30px; line-height: 1.1; }
.weather-hero-main span { display: block; font-size: 10.5px; color: var(--muted); max-width: 300px; margin-top: 4px; }
.weather-hero-meta { margin-left: auto; text-align: right; font-size: 10px; color: var(--dim); display: flex; flex-direction: column; gap: 4px; }
.season-track { display: flex; gap: 6px; margin-bottom: 14px; }
.season-node {
  flex: 1; text-align: center; padding: 8px 4px; border-radius: 10px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.02); color: var(--dim);
}
.season-node span { display: block; font-size: 14px; font-weight: 800; }
.season-node small { font-size: 9px; }
.season-node.active { border-color: rgba(232,180,90,0.45); background: rgba(232,180,90,0.1); color: var(--amber); }

/* 事件 */
.event-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.event-icon {
  width: 58px; height: 58px; border-radius: 16px; flex: none;
  display: grid; place-items: center; font-size: 22px; font-weight: 800; color: #2a1d08;
  background: linear-gradient(140deg, #f6d794, #d99a35);
  box-shadow: 0 12px 30px rgba(232,180,90,0.28);
}
.event-hero h2 { margin: 2px 0 0; }
.event-options { display: flex; flex-direction: column; gap: 8px; }
.event-option {
  text-align: left; padding: 12px 14px; border-radius: 11px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.025);
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.event-option:hover { border-color: rgba(232,180,90,0.45); background: rgba(232,180,90,0.07); transform: translateX(2px); }
.event-option strong { display: block; font-size: 12.5px; margin-bottom: 2px; }
.event-option span { font-size: 10.5px; color: var(--muted); line-height: 1.5; }

/* 公告列表 */
.announce-list { display: flex; flex-direction: column; gap: 8px; }
.announce-card {
  padding: 10px 13px; border-radius: 10px; border: 1px solid var(--border);
  background: rgba(255,255,255,0.02); border-left: 3px solid var(--teal);
}
.announce-card.warn { border-left-color: var(--warn); }
.announce-card.good { border-left-color: var(--good); }
.announce-head { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; }
.announce-head span { font-size: 8.5px; color: var(--dim); flex: none; }
.announce-card p { margin: 4px 0 0; font-size: 10.5px; color: var(--muted); line-height: 1.55; }

/* v2 responsive */
@media (max-width: 1399px) {
  #btn-help { display: none; }
}

@media (max-width: 1360px) {
  #topbar { gap: 10px; }
  .weather-copy small { display: none; }
  .weather-widget { height: 34px; padding: 0 8px; }
}

@media (max-width: 1180px) {
  #btn-help, #btn-new, .admin-link { display: none; }
  .weather-copy { display: none; }
  .weather-widget { padding: 0 7px; gap: 5px; }
  .weather-temp { font-size: 12px; }
  #cloud-flag { bottom: 150px; }
  #announcement-bar { width: calc(100vw - 40px); }
}

@media (max-width: 980px) {
  #btn-leaderboard { display: none; }
  .finance-kpis { grid-template-columns: 1fr 1fr; }
  .cloud-grid { grid-template-columns: 1fr; }
  .ach-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .feature-btn { padding: 0 7px; font-size: 9.5px; }
  #btn-finance { display: none; }
  .weather-widget { display: none; }
  #announcement-bar { top: 66px; padding: 7px 10px; }
  .announce-copy { flex-direction: column; gap: 1px; align-items: flex-start; }
  .announce-copy span { width: 100%; }
  #cloud-flag { right: 10px; bottom: 14px; width: 34px; height: 34px; }
  .policy-list, .theme-grid { grid-template-columns: 1fr; }
  .finance-chart { height: 92px; }
  .weather-hero { flex-wrap: wrap; }
  .weather-hero-meta { margin-left: 0; text-align: left; flex-direction: row; gap: 10px; width: 100%; }
}

@media (max-height: 560px) and (orientation: landscape), (pointer: coarse) and (orientation: landscape) {
  .weather-widget { height: 28px; padding: 0 6px; }
  .weather-icon { width: 21px; height: 21px; font-size: 10px; border-radius: 6px; }
  .weather-temp { font-size: 11px; }
  #btn-help, #btn-new, #btn-leaderboard, #btn-finance, #btn-save, #btn-load, .admin-link { display: none; }
  #announcement-bar { top: 52px; width: min(520px, calc(100vw - 390px)); left: 52px; transform: none; padding: 5px 9px; }
  .announce-copy span { display: none; }
  #cloud-flag { right: calc(min(300px, 37vw) + 14px); bottom: 8px; width: 28px; height: 28px; border-radius: 8px; font-size: 9px; }
  .modal.wide { width: calc(100vw - 20px); }
  .ach-summary { padding: 8px 10px; gap: 10px; margin-bottom: 8px; }
  .ach-ring { width: 44px; height: 44px; }
  .ach-ring::before { width: 34px; height: 34px; }
  .finance-kpis { grid-template-columns: repeat(4, 1fr); gap: 5px; margin-bottom: 8px; }
  .finance-kpi { padding: 6px 8px; }
  .finance-kpi b { font-size: 13px; }
  .finance-chart { height: 64px; margin-bottom: 12px; }
  .cloud-grid { grid-template-columns: repeat(3, 1fr); }
  .ach-grid { grid-template-columns: 1fr 1fr; }
  .research-card { padding: 6px 8px; }
  .research-copy small { font-size: 9px; }
  .event-icon { width: 42px; height: 42px; font-size: 16px; border-radius: 11px; }
  .weather-hero { padding: 8px 10px; margin-bottom: 8px; }
  .weather-hero-icon { width: 42px; height: 42px; font-size: 16px; border-radius: 12px; }
  .weather-hero-main strong { font-size: 22px; }
}

@media (max-height: 460px) and (orientation: landscape) {
  .finance-chart { display: none; }
  .chart-legend { display: none; }
  .section { margin-bottom: 10px; }
  .modal .lede { display: none; }
}

/* 开场与帮助扩展 */
.steps.four { grid-template-columns: 1fr 1fr; }
.intro-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 14px; }
.intro-badges span {
  font-size: 9.5px; color: var(--teal); padding: 3px 8px; border-radius: 20px;
  border: 1px solid rgba(91, 191, 180, 0.28); background: rgba(91, 191, 180, 0.07);
}
.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.help-grid > div {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px;
  background: rgba(255,255,255,0.02);
}
.help-grid strong { display: block; font-size: 11px; margin-bottom: 2px; }
.help-grid span { display: block; font-size: 9.5px; color: var(--dim); line-height: 1.45; }

@media (max-width: 760px) {
  .steps.four, .help-grid { grid-template-columns: 1fr; }
}

@media (max-height: 560px) and (orientation: landscape), (pointer: coarse) and (orientation: landscape) {
  .steps.four { grid-template-columns: repeat(4, 1fr); }
  .help-grid { grid-template-columns: 1fr 1fr; }
  .intro-badges { margin-bottom: 8px; }
}

body[data-theme="daylight"] #announcement-bar {
  background: linear-gradient(90deg, rgba(255, 252, 243, 0.98), rgba(245, 250, 245, 0.98));
  border-color: rgba(168, 107, 18, 0.3);
  box-shadow: 0 14px 34px rgba(30, 50, 42, 0.18);
}
body[data-theme="daylight"] .announce-copy span { color: var(--muted); }
body[data-theme="daylight"] #tutorial-coach {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 249, 244, 0.98));
  border-color: rgba(168, 107, 18, 0.36);
  box-shadow: 0 18px 40px rgba(30, 50, 42, 0.18);
}
body[data-theme="daylight"] .coach-body p { color: var(--muted); }
body[data-theme="daylight"] .modal-overlay { backdrop-filter: blur(4px); }

.trait-row { display: flex; flex-wrap: wrap; gap: 4px; }
.trait-tag { border: 1px solid currentColor; background: transparent; }

.maintenance-card {
  display: flex; flex-direction: column; gap: 2px;
  margin-bottom: 12px; padding: 9px 12px; border-radius: 10px;
  border: 1px solid rgba(232, 160, 79, 0.4);
  background: rgba(232, 160, 79, 0.08);
}
.maintenance-card strong { font-size: 11px; color: var(--warn); }
.maintenance-card span { font-size: 9.5px; color: var(--muted); line-height: 1.45; }

/* 窄屏竖屏保底布局 */
@media (max-width: 520px) {
  #topbar { gap: 6px; padding: 0 8px; }
  .brand { flex: none; min-width: 30px; padding-right: 0; border-right: none; }
  .brand-mark { width: 28px; height: 28px; font-size: 11px; }
  .topstats .stat:nth-child(5) { display: none; }
  .topstats .stat { padding: 2px 6px; }
  .top-actions { display: none; }
  #announcement-bar {
    top: 64px; left: 8px; right: 8px; width: auto; transform: none;
    padding: 7px 9px;
  }
  .announce-copy span { display: none; }
  #tutorial-coach { left: 62px; }
}
