:root {
  color-scheme: dark;
  font-family: "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  background: #10201c;
  color: #fcf4df;
  --muted: #a9b9ab;
  --border: #d9f0d01f;
  --gold: #ffd17c;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
[hidden] { display: none !important; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.workspace { margin: 0 auto; width: min(1056px, calc(100% - 72px)); padding: 38px 0 40px; }
.workspace-heading { padding-bottom: 26px; border-bottom: 1px solid var(--border); margin-bottom: 26px; }
.wordmark { display: flex; align-items: center; gap: 7px; color: #ffdf9e; font-weight: 700; font-size: 13px; letter-spacing: .16em; }
.wordmark-icon { position: relative; display: inline-block; width: 21px; height: 19px; }
.wordmark-icon i { position: absolute; background: #ffcf77; border-radius: 50%; width: 9px; height: 9px; bottom: 1px; left: 1px; }
.wordmark-icon i:nth-child(2) { width: 6px; height: 6px; left: 11px; bottom: 10px; }
.wordmark-icon i:nth-child(3) { width: 4px; height: 4px; left: 4px; bottom: 14px; }
h1 { font-size: clamp(32px, 4.7vw, 53px); margin: 9px 0 5px; letter-spacing: .05em; line-height: 1.18; }
.workspace-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.studio-grid { display: grid; grid-template-columns: minmax(338px, 438px) minmax(330px, 1fr); align-items: start; gap: 29px; }

.scene { width: 100%; aspect-ratio: 9 / 16; position: relative; isolation: isolate; overflow: hidden; border-radius: 18px; container-type: inline-size; background: #1d4237; box-shadow: 0 20px 65px #020d0959, 0 0 0 1px #e9edda27; color: #fff7df; text-shadow: 0 2px 14px #031a15bf; }
.scene::after { position: absolute; inset: 0; z-index: -1; content: ""; pointer-events: none; background: linear-gradient(180deg, #061e184f 0%, transparent 25%, transparent 78%, #021810ae 100%); }
#wash-canvas { position: absolute; width: 100%; height: 100%; inset: 0; z-index: -2; }
.wall-sign {
  position: absolute;
  inset: 4.3% 14% auto;
  display: grid;
  justify-items: center;
  gap: .4cqw;
  padding: 2.25cqw 6cqw 2.5cqw;
  border: .45cqw solid #cba168;
  border-radius: 2.8cqw;
  background: linear-gradient(155deg, #28584d, #183c34 66%, #16372d);
  box-shadow: 0 .8cqw 0 #2c2419, 0 1.8cqw 3.2cqw #04150fcc, inset 0 .27cqw .45cqw #f4d69e70, inset 0 0 0 .8cqw #08282080;
  white-space: nowrap;
}
.wall-sign::before, .wall-sign::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 1.05cqw;
  aspect-ratio: 1;
  border-radius: 50%;
  translate: 0 -50%;
  background: radial-gradient(circle at 35% 28%, #ffe7ad, #bd8d4a 65%, #674422);
  box-shadow: 0 .2cqw .3cqw #111a14;
}
.wall-sign::before { left: 2.6cqw; }
.wall-sign::after { right: 2.6cqw; }
.wall-sign-brand {
  color: #fff0cb;
  font-size: 11.8cqw;
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: .12em;
  text-indent: .12em;
  text-shadow: 0 .15cqw #cf9f58, 0 .43cqw #68431f, 0 .72cqw .55cqw #061c16;
}
.wall-sign-services {
  color: #ffda8f;
  font-size: 5.8cqw;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: .20em;
  text-indent: .20em;
  text-shadow: 0 .25cqw .4cqw #0a2219;
}
.order-tag { position: absolute; top: 20.8%; left: 7.5%; display: flex; align-items: baseline; gap: .8cqw; max-width: 85%; white-space: nowrap; padding: 1.3cqw 2.5cqw; border-radius: 1.5cqw; border: 1px solid #f9edce3c; background: #14372bdc; font-size: 3.05cqw; font-weight: 600; }
.tag-nickname, .tag-shoe { overflow: hidden; text-overflow: ellipsis; }
.tag-nickname { max-width: 22cqw; flex-shrink: 3; }
.tag-shoe { min-width: 0; color: #ffdf9e; }
.comparison { position: absolute; inset: 76.2% 6% auto; display: flex; justify-content: space-around; font-size: 3.1cqw; text-shadow: none; font-weight: 750; }
.comparison span { padding: .72cqw 2.15cqw; border-radius: 1cqw; color: #472c1b; background: #f5dec1; box-shadow: 0 2px 10px #472c1b26; }
.comparison span + span { color: #15382c; background: #e7f5d8; }
.stage-footer { position: absolute; inset: auto 7.5% 8.2%; }
.stage-state { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.stage-state strong { font-weight: 800; font-size: 5.2cqw; letter-spacing: .04em; }
.stage-state span { font-size: 2.85cqw; color: #ffe5aa; font-weight: 650; white-space: nowrap; }
.stage-progress { margin-top: 1.7cqw; height: max(3px, .76cqw); overflow: hidden; border-radius: 15px; background: #fff1c933; }
.stage-progress i { display: block; width: 100%; height: 100%; background: #ffda8e; transform-origin: left; transform: scaleX(0); }
.stage-footer p { margin: 1.5cqw 0 0; color: #f7ead3; font-size: 3.25cqw; line-height: 1.35; }

.console { display: grid; align-content: start; gap: 16px; }
.panel { background: #172c25; border: 1px solid var(--border); border-radius: 16px; padding: 22px; min-width: 0; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel h2 { font-size: 20px; margin: 0; letter-spacing: .035em; }
.connection, .queue-count { color: #b7cebb; font-size: 12px; font-weight: 650; white-space: nowrap; }
.connection::before { content: ""; display: inline-block; vertical-align: 1px; margin-right: 6px; width: 6px; height: 6px; background: #9bcea3; border-radius: 100%; }
.connection[data-state="pending"]::before { background: #f3bf6b; }
.panel-intro { margin: 9px 0 17px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.auto-control { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 0 0 14px; }
.auto-control button { border: 1px solid #ffe2a6; border-radius: 8px; background: var(--gold); color: #322611; padding: 9px 14px; font-weight: 750; font-size: 14px; }
.auto-control button[aria-pressed="true"] { background: #314b3d; border-color: #a9c6a4; color: #eef5da; }
.auto-control button:disabled { opacity: .55; }
.auto-control span { font-size: 12px; color: var(--muted); }
.samples { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.sample { display: grid; grid-template-rows: 61px auto; align-items: center; column-gap: 8px; padding: 8px 4px; border-radius: 10px; min-width: 0; text-align: center; font-weight: 700; font-size: 11px; color: #282f22; background: #f1d8b1; border: 1px solid transparent; }
.sample:nth-child(2) { background: #dbe0ba; }
.sample:nth-child(3) { background: #d7dedb; }
.sample:nth-child(4) { background: #e7c1a9; }
.sample:hover { filter: brightness(1.09); border-color: #fff9d2; }
.sample:active { transform: translateY(1px); }
.sample img { width: 100%; height: 58px; object-fit: contain; padding: 3px; filter: drop-shadow(0 4px 2px #31241138); }
.sample small { display: block; margin-top: 3px; line-height: 1.1; font-size: 11px; font-weight: 500; }
#comment-form { margin-top: 18px; }
#comment-form label { display: block; margin-bottom: 7px; font-size: 12px; color: #e2e9d7; font-weight: 600; }
.field { display: flex; gap: 8px; }
.field input { min-width: 0; height: 43px; flex: 1; border: 1px solid #ddebd542; background: #10251e; border-radius: 8px; padding: 0 11px; color: #fcf4df; font-size: 14px; }
.field input::placeholder { color: #9eb3a3; }
.send { padding: 0 15px; border: 0; border-radius: 8px; background: var(--gold); color: #322611; font-weight: 800; white-space: nowrap; font-size: 14px; }
.send:hover { background: #ffdfa0; }
.feedback { color: #dcefc9; font-size: 12px; min-height: 1.25em; margin: 9px 0 0; }
.feedback[data-error="true"] { color: #ffd6a5; }
.shoe-catalog { margin-top: 6px; border-top: 1px solid var(--border); }
.shoe-catalog summary { cursor: pointer; padding: 13px 2px 0; color: #ffe0a5; font-size: 14px; font-weight: 650; }
.shoe-catalog summary span { margin-left: 6px; font-size: 12px; color: var(--muted); font-weight: 500; }
.catalog-filters { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin: 13px 0 10px; }
.catalog-filters input, .catalog-filters select { min-width: 0; height: 40px; border: 1px solid #ddebd542; border-radius: 8px; background: #10251e; color: #fcf4df; font: inherit; font-size: 13px; padding: 0 9px; }
.catalog-filters input::placeholder { color: #9eb3a3; }
.catalog-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(92px, 100%), 1fr)); gap: 7px; max-height: min(38vh, 320px); overflow: auto; padding: 3px; overscroll-behavior: contain; }
.catalog-shoe { display: grid; align-content: start; gap: 5px; min-width: 0; padding: 5px 4px 8px; border: 1px solid #d9e1cf28; border-radius: 8px; background: #294034; color: #faf2db; font-size: 12px; }
.catalog-shoe:hover, .catalog-shoe:focus-visible { border-color: #e3c080; background: #354c3e; }
.catalog-shoe img { height: 54px; width: 100%; object-fit: contain; }
.catalog-empty { font-size: 13px; color: var(--muted); margin-bottom: 0; }
.queue-empty { color: var(--muted); margin: 13px 0 0; font-size: 13px; }
.current-order { margin-top: 13px; border-radius: 9px; padding: 10px 12px; display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; column-gap: 10px; align-items: center; background: #263e32; }
.current-indicator { border-radius: 50%; width: 7px; height: 7px; background: #ffca72; }
.current-order strong { font-size: 14px; }
.current-order small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#current-phase { font-size: 12px; color: #ffdfab; }
#queue { margin: 0; padding: 0; list-style: none; }
#queue li { display: grid; grid-template-columns: 24px minmax(0, 1.6fr) minmax(0, 1fr); gap: 9px; padding: 9px 4px 0; font-size: 12px; align-items: baseline; }
#queue li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-index, .queue-name { color: var(--muted); }
.production { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 2px 3px; color: var(--muted); font-size: 12px; }
.production a { color: #ffe0a5; text-decoration: none; }
.production a:hover { text-decoration: underline; }
.studio-link, .watch-view .watch-link, .watch-view .obs-link, .watch-view .auto-control, .watch-view .host-panel { display: none; }
.watch-view .studio-link { display: inline; }

.host-panel { min-width: 0; }
#host-status { color: var(--muted); font-size: 12px; }
.host-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 15px; }
.host-controls button, .host-controls select { min-height: 38px; border-radius: 8px; border: 1px solid #ddebd542; background: #10251e; color: #fcf4df; font: inherit; font-size: 13px; padding: 0 11px; }
#host-toggle { background: var(--gold); color: #322611; border-color: transparent; font-weight: 700; }
#host-toggle[aria-pressed="true"] { background: #294335; color: #e2efcf; border-color: #abc59b5c; }
.host-controls :disabled { opacity: .55; cursor: default; }
.host-controls label { color: var(--muted); font-size: 12px; }
.host-controls select { margin-left: 3px; }
#host-help { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.scene.host-speaking #stage-line { display: none; }
.stage-footer .host-caption { color: #fff0ce; }
.host-caption[data-topic]:not([data-topic=""])::before { content: attr(data-topic); margin-right: .55em; color: #ffda8e; font-weight: 750; }
.host-unlock { position: absolute; right: 7.5%; top: 25%; padding: 1.6cqw 2cqw; background: #142e25; color: #ffe5ad; border: 1px solid #d1dcc379; border-radius: 1.5cqw; font: inherit; font-size: 3cqw; }

.obs-view { background: #142d25; }
.obs-view body { min-width: 0; }
.obs-view .workspace, .obs-view .studio-grid { display: grid; place-items: center; margin: 0; width: 100%; height: 100dvh; padding: 0; }
.obs-view .studio-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
.obs-view .scene { width: min(100vw, 56.25dvh); border-radius: 0; box-shadow: none; }
.obs-view .workspace-heading, .obs-view .console { display: none; }

@media (max-width: 800px) {
  .workspace { width: min(590px, calc(100% - 36px)); padding: 23px 0 28px; }
  .workspace-heading { padding-bottom: 17px; margin-bottom: 17px; }
  .studio-grid { grid-template-columns: minmax(0, 1fr); gap: 17px; }
  .scene { width: min(100%, 390px); justify-self: center; }
  .panel { padding: 16px; }
}

@media (max-width: 480px) {
  .scene { width: min(100%, 290px); }
  .workspace-heading { padding-bottom: 12px; margin-bottom: 14px; }
  .panel-intro { margin-bottom: 11px; }
  .sample { grid-template-rows: 45px auto; }
  .sample img { height: 44px; }
}

@media (max-width: 380px) {
  .workspace { width: calc(100% - 24px); }
  .samples { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sample { grid-template-rows: auto; grid-template-columns: 46% 1fr; text-align: left; }
  .sample img { height: 39px; }
}
