:root {
  color-scheme: light dark;
  --ink: #111514;
  --body: #303735;
  --muted: #737c78;
  --line: #e2e7e4;
  --paper: #fbfbfd;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-2: #f4f6f5;
  --band: #f6f8f7;
  --header-bg: rgba(251, 251, 253, 0.84);
  --nav-bg: rgba(255, 255, 255, 0.78);
  --nav-border: #d7dedb;
  --hero-overlay: rgba(255, 255, 255, 0.78);
  --hero-grid: rgba(17, 21, 20, 0.055);
  --accent: #00a67d;
  --accent-2: #d78b1f;
  --danger: #ff5c5c;
  --gold: #ffc23a;
  --blue: #55b6ed;
  --green: #8afb4d;
  --rose: #ff7f86;
  --navy: #11184a;
  --purple: #8b6cff;
  --stage-paper: #fbfaf2;
  --shadow: 0 18px 44px rgba(17, 21, 20, 0.08);
  --stage-frame: #ffffff;
  --stage-frame-border: #dfe6e2;
  --toolbar-bg: #ffffff;
  --toggle-bg: #ffffff;
  --toggle-text: #111514;
  --toggle-border: #b8c3be;
  --code-bg: #111514;
  --code-text: #e8fff6;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f4f7f5;
    --body: #d8dfdb;
    --muted: #8d9993;
    --line: #28322d;
    --paper: #0f1412;
    --panel: rgba(23, 29, 26, 0.92);
    --panel-2: #1d2521;
    --band: #121816;
    --header-bg: rgba(15, 20, 18, 0.92);
    --nav-bg: #141a17;
    --nav-border: #344139;
    --hero-overlay: rgba(15, 20, 18, 0.84);
    --hero-grid: rgba(216, 223, 219, 0.055);
    --accent: #58d6b0;
    --accent-2: #f0b45d;
    --shadow: 0 22px 48px rgba(0, 0, 0, 0.34);
    --stage-frame: #0b0f0d;
    --stage-frame-border: #39443d;
    --toolbar-bg: #121816;
    --toggle-bg: #28322d;
    --toggle-text: #f4f7f5;
    --toggle-border: #637069;
    --code-bg: #080b0a;
    --code-text: #d7f8ec;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Noto Sans TC", "PingFang TC", sans-serif;
  letter-spacing: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.topbar h1,
.hero h2,
.section-head h2 {
  margin: 0;
}

.topbar h1 {
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.2;
  color: var(--ink);
}

.eyebrow,
.section-kicker {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

nav a {
  min-width: 54px;
  padding: 8px 10px;
  border: 1px solid var(--nav-border);
  border-radius: 8px;
  color: var(--body);
  font-size: 14px;
  text-align: center;
  text-decoration: none;
  background: var(--nav-bg);
}

nav a:hover {
  border-color: var(--accent);
  color: var(--ink);
}

main {
  overflow: hidden;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.36fr);
  gap: clamp(20px, 4vw, 48px);
  min-height: 620px;
  align-items: center;
  padding: clamp(36px, 7vw, 90px) clamp(18px, 4vw, 56px);
  background:
    linear-gradient(110deg, var(--hero-overlay), rgba(255,255,255,0)),
    radial-gradient(circle at 18% 18%, rgba(255, 194, 58, 0.13), transparent 24%),
    radial-gradient(circle at 84% 18%, rgba(85, 182, 237, 0.16), transparent 28%),
    repeating-linear-gradient(90deg, var(--hero-grid) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(0deg, var(--hero-grid) 0 1px, transparent 1px 96px);
}

.hero-copy {
  max-width: 860px;
}

.hero h2 {
  max-width: 940px;
  font-size: clamp(46px, 7vw, 108px);
  line-height: 1.02;
  color: var(--ink);
}

.hero p {
  max-width: 720px;
  color: var(--body);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.75;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--nav-border);
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel);
  font-size: 15px;
  font-weight: 700;
}

.status-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.status-panel div,
.info-grid article,
.atmos-grid article,
.stage-notes,
.command-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.status-panel div {
  min-height: 108px;
  padding: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.status-panel span {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.status-panel strong {
  display: block;
  margin-top: 14px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
  color: var(--ink);
}

.band {
  padding: clamp(34px, 6vw, 76px) clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.band:nth-of-type(odd) {
  background: var(--band);
}

.section-head {
  margin-bottom: 22px;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 48px);
  color: var(--ink);
}

.info-grid,
.atmos-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.info-grid article,
.atmos-grid article {
  padding: 22px;
}

h3 {
  margin: 0 0 14px;
  font-size: 20px;
  color: var(--ink);
}

p,
li {
  line-height: 1.7;
}

.compact-list {
  margin: 0;
  padding-left: 22px;
}

.timeline {
  display: grid;
  gap: 12px;
}

.day {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 18px;
  padding: 20px;
  border-left: 5px solid var(--accent);
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.day time {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
}

.day p {
  margin: 0 0 8px;
}

.stage-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
}

.stage-board {
  overflow: hidden;
  border: 1px solid var(--stage-frame-border);
  border-radius: 8px;
  background: var(--stage-frame);
  box-shadow: var(--shadow);
}

.stage-board input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.stage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--toolbar-bg);
}

.stage-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 16px;
  border: 2px solid var(--toggle-border);
  border-radius: 8px;
  color: var(--toggle-text);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  background: var(--toggle-bg);
  box-shadow: var(--shadow);
}

.stage-toolbar label::before {
  content: "";
  width: 11px;
  height: 11px;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: transparent;
}

#mic-layer:checked ~ .stage-toolbar label {
  border-color: var(--accent);
  color: #07100d;
  background: var(--accent);
}

#mic-layer:checked ~ .stage-toolbar label::before {
  background: #07100d;
}

#mic-layer:not(:checked) ~ .stage-svg .mic-layer {
  opacity: 0;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend i {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 1px solid #111;
  border-radius: 3px;
}

.legend .wind { background: var(--rose); }
.legend .pluck { background: var(--gold); }
.legend .string { background: var(--blue); }
.legend .low { background: var(--green); }
.legend .solo-dot { background: #f61515; }

.stage-svg {
  display: block;
  width: 100%;
  height: auto;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.1), transparent),
    var(--stage-frame);
}

.paper {
  fill: var(--stage-paper);
  stroke: #d7d0bf;
  stroke-width: 2;
}

.percussion-box {
  fill: #fffdf7;
  stroke: #1c1c1c;
  stroke-width: 2.2;
}

.section-label,
.section-note,
.instrument-text,
.seat text,
.tilted-seat text,
.mic text {
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  letter-spacing: 0;
}

.section-label {
  fill: #20231f;
  font-size: 24px;
  font-weight: 800;
}

.section-note {
  fill: #53564f;
  font-size: 20px;
}

.seat,
.tilted-seat,
.instrument-shape {
  filter: url(#seatShadow);
}

.seat rect,
.long-seat rect {
  width: 96px;
  height: 62px;
  rx: 10px;
  stroke: #191919;
  stroke-width: 2;
}

.long-seat rect {
  width: 168px;
}

.seat text,
.tilted-seat text,
.instrument-text {
  fill: #202420;
  font-size: 21px;
  font-weight: 700;
}

.seat text {
  text-anchor: middle;
}

.wind-seat rect {
  fill: var(--rose);
}

.pluck-seat rect,
.pluck-seat path,
.tilted-seat path,
.instrument-shape {
  fill: var(--gold);
  stroke: #191919;
  stroke-width: 2;
}

.string-seat rect {
  fill: var(--blue);
}

.low-seat rect {
  fill: var(--green);
}

.solo-seat rect {
  fill: var(--danger);
}

.solo-seat text,
.conductor-seat text {
  fill: #fff;
  font-size: 24px;
  font-weight: 900;
}

.conductor-seat rect {
  width: 116px;
  height: 68px;
  rx: 12px;
  fill: var(--navy);
  stroke: #191919;
  stroke-width: 2;
}

.control-wing path {
  fill: #202a25;
  stroke: #56645b;
  stroke-width: 2;
  stroke-dasharray: 8 7;
}

.control-wing text {
  fill: var(--accent);
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
}

.control-wing .wing-note {
  fill: #d8dfdb;
  font-size: 15px;
  font-weight: 800;
}

.mic-layer {
  opacity: 1;
  transition: opacity 180ms ease;
}

.mic-arc {
  fill: none;
  stroke: rgba(88, 214, 176, 0.7);
  stroke-width: 3;
  stroke-dasharray: 9 9;
}

.main-arc {
  stroke: rgba(38, 185, 143, 0.58);
  stroke-width: 2.5;
}

.height-square {
  fill: rgba(123, 105, 215, 0.045);
  stroke: rgba(123, 105, 215, 0.76);
  stroke-width: 2;
  stroke-dasharray: 8 7;
}

.mic circle {
  r: 8px;
  fill: #fffef9;
  stroke-width: 3;
}

.mic text {
  fill: #111512;
  font-size: 11px;
  font-weight: 900;
  text-anchor: middle;
  transform: translateY(-17px);
  paint-order: stroke;
  stroke: #fffef9;
  stroke-width: 3px;
  stroke-linejoin: round;
}

.mic.main circle {
  stroke: #26b98f;
}

.mic.room circle {
  stroke: #b07734;
}

.mic.height circle {
  stroke: #7b69d7;
}

.mic.spot circle {
  stroke: #d35d58;
}

.mic.string-mic circle {
  fill: var(--blue);
  stroke: #1b4e72;
}

.mic.low-mic circle {
  fill: var(--green);
  stroke: #386d24;
}

.mic.pluck-mic circle {
  fill: var(--gold);
  stroke: #7d5a0b;
}

.mic.wind-mic circle,
.mic.wind-all-mic circle {
  fill: var(--rose);
  stroke: #8d2e36;
}

.mic.solo-mic circle {
  fill: var(--danger);
  stroke: #9c1111;
}

.mic.perc-mic circle {
  fill: var(--purple);
  stroke: #402a9a;
}

.stage-notes {
  display: grid;
  grid-template-columns: minmax(180px, 0.28fr) minmax(0, 1fr);
  gap: 14px;
  padding: 16px 18px;
}

.stage-notes h3 {
  margin: 0;
}

.stage-notes p {
  margin: 0;
}

.hall-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: start;
}

.hall-board {
  overflow: hidden;
  border: 1px solid var(--stage-frame-border);
  border-radius: 8px;
  background: var(--stage-frame);
  box-shadow: var(--shadow);
}

.hall-svg {
  display: block;
  width: 100%;
  height: auto;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035), transparent),
    var(--stage-frame);
}

.hall-shell {
  fill: #111613;
  stroke: #424f47;
  stroke-width: 2;
}

.hall-stage {
  fill: url(#hallStage);
  stroke: #d7d0bf;
  stroke-width: 2;
}

.apron {
  fill: none;
  stroke: #27231d;
  stroke-width: 3;
}

.center-line {
  stroke: rgba(88, 214, 176, 0.48);
  stroke-width: 2;
  stroke-dasharray: 12 12;
}

.hall-label,
.hall-small,
.stage-reference text,
.hall-zones text,
.control-zone text {
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  letter-spacing: 0;
}

.hall-label {
  fill: #20231f;
  font-size: 30px;
  font-weight: 900;
}

.hall-small {
  fill: #5d5b54;
  font-size: 18px;
  font-weight: 800;
}

.stage-reference rect {
  fill: rgba(255, 255, 255, 0.65);
  stroke: #222;
  stroke-width: 1.5;
}

.stage-reference text {
  fill: #222;
  font-size: 18px;
  font-weight: 800;
}

.audience path {
  fill: none;
  stroke: #d8dfdb;
  stroke-width: 18;
  stroke-linecap: round;
  opacity: 0.62;
}

.stage-svg .audience path {
  stroke: #9aa59e;
  opacity: 0.58;
}

.aisles path {
  fill: none;
  stroke: #0b0f0d;
  stroke-width: 16;
  stroke-linecap: round;
}

.stage-svg .aisles path {
  stroke: var(--stage-paper);
}

.hall-zones text {
  fill: #b9c5bf;
  font-size: 20px;
  font-weight: 800;
}

.stage-svg .hall-zones text {
  fill: #59625c;
}

.control-zone rect {
  fill: #1b2420;
  stroke: #4a584f;
  stroke-width: 1.5;
}

.stage-svg .control-zone rect {
  fill: #e7e4d8;
  stroke: #626a64;
}

.control-zone text {
  fill: var(--accent);
  font-size: 16px;
  font-weight: 800;
}

.stage-svg .control-zone text {
  fill: #1c3f35;
}

.sketch-points circle {
  fill: #0b0f0d;
  stroke: var(--accent-2);
  stroke-width: 4;
}

.stage-svg .sketch-points circle {
  fill: var(--stage-paper);
  stroke: #cc8b32;
}

.hall-points circle {
  fill: #8a5a24;
  stroke: #fff7e6;
  stroke-width: 3;
}

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

table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--panel-2);
  color: var(--accent);
  font-size: 14px;
}

td {
  color: var(--body);
}

.share-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
  gap: 18px;
}

.steps {
  margin: 0;
  padding: 22px 22px 22px 42px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.command-box {
  padding: 22px;
}

.command-box p {
  margin-top: 0;
  color: var(--muted);
}

code {
  display: block;
  overflow-x: auto;
  padding: 14px;
  border-radius: 8px;
  background: var(--code-bg);
  color: var(--code-text);
  font-family: "SFMono-Regular", Consolas, monospace;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .topbar,
  .hero,
  .info-grid,
  .atmos-grid,
  .stage-wrap,
  .hall-wrap,
  .share-layout {
    grid-template-columns: 1fr;
  }

  .topbar {
    position: static;
    display: grid;
  }

  nav {
    justify-content: flex-start;
  }

  .hero {
    min-height: auto;
  }

  .day {
    grid-template-columns: 1fr;
  }

  .stage {
    min-height: 0;
  }

  .winds,
  .plucked,
  .strings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0;
  }
}

@media (max-width: 520px) {
  .status-panel {
    grid-template-columns: 1fr;
  }

  .front {
    grid-template-columns: 1fr;
  }
}
