:root {
  color-scheme: light;
  --paper: #f3f3ed;
  --card: #fdfdf8;
  --ink: #263a35;
  --muted: #66766e;
  --rule: #dcdfd5;
  --green: #24584c;
  --sage: #dfeadf;
  --warm: #eab575;
  font-family: 'Inter', 'Microsoft YaHei UI', 'Microsoft YaHei', 'Segoe UI', sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
}
button,
select,
input {
  font: inherit;
}
button,
select {
  cursor: pointer;
  color: inherit;
}
button {
  background: transparent;
  border: 0;
}
button:focus-visible,
select:focus-visible,
input:focus-visible,
#stage:focus-visible {
  outline: 2px solid #bf7a3c;
  outline-offset: 3px;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button[aria-pressed='true'] {
  color: var(--green);
}
.svg-bank {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.topbar {
  background: #fcfcf7;
  border-bottom: 1px solid var(--rule);
}
.bar-inner,
.workspace {
  width: min(1360px, 100%);
  margin: auto;
}
.bar-inner {
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 clamp(16px, 3vw, 44px);
}
.identity,
.file-tools,
.card-title h2,
.view-controls,
.view-controls button,
.file-tools button,
.play-controls,
.view-foot,
.directions,
.stage-readout,
.time-foot {
  display: flex;
  align-items: center;
}
.identity {
  gap: 13px;
}
.identity h1 {
  font-size: 27px;
  letter-spacing: 0.09em;
  margin: 0;
  line-height: 1;
  font-weight: 800;
}
.logo {
  width: 34px;
  height: 34px;
  background: var(--green);
  position: relative;
  border-radius: 7px;
  box-shadow: inset 0 0 0 1px #1a493b;
}
.logo i {
  position: absolute;
  width: 7px;
  height: 7px;
  background: #e2ebd4;
}
.logo i:nth-child(1) {
  left: 7px;
  top: 8px;
}
.logo i:nth-child(2) {
  left: 15px;
  top: 8px;
  background: #a5c99c;
}
.logo i:nth-child(3) {
  left: 7px;
  top: 16px;
  background: #a5c99c;
}
.logo i:nth-child(4) {
  left: 15px;
  top: 16px;
  width: 10px;
  height: 10px;
  background: #e8b87e;
}
.brand-line {
  width: 1px;
  height: 19px;
  background: var(--rule);
}
.brand-detail {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.file-tools {
  gap: 8px;
}
.file-tools button {
  gap: 7px;
  padding: 9px 13px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
}
.file-tools button:hover,
.view-controls button:hover,
.icon-button:hover {
  background: #ebeee6;
}
.file-tools button.primary {
  background: var(--green);
  color: white;
  padding: 10px 16px;
}
.file-tools button.primary:hover {
  background: #174336;
}
.workspace {
  padding: 22px clamp(16px, 3vw, 44px) 32px;
  display: grid;
  grid-template-columns: minmax(0, 2.35fr) minmax(295px, 0.92fr);
  gap: 18px;
  align-items: start;
}
.viewer-column {
  display: grid;
  gap: 15px;
  min-width: 0;
}
.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 13px;
  overflow: hidden;
  box-shadow: 0 2px 4px #263a3506;
}
.card-title {
  min-height: 55px;
  padding: 9px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.card-title h2,
.props h3,
#face-detail h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
}
.card-title h2 {
  gap: 9px;
}
.card-title h2 svg {
  color: #4c7566;
}
.seg {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--rule);
  background: #eff1e9;
  border-radius: 8px;
}
.seg button {
  flex: 1;
  white-space: nowrap;
  font-size: 12px;
  color: var(--muted);
  border-radius: 5px;
  padding: 5px 11px;
}
.seg button[aria-pressed='true'] {
  color: var(--green);
  background: #fffef9;
  box-shadow: 0 1px 3px #23372a20;
  font-weight: 700;
}
#stage {
  height: clamp(375px, 52vh, 505px);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-color: #274541;
  background-image:
    linear-gradient(#a6c8ad12 1px, transparent 1px),
    linear-gradient(90deg, #a6c8ad12 1px, transparent 1px),
    radial-gradient(ellipse at 52% 46%, #3e5f55 0%, #2b4944 55%, #223e3c 100%);
  background-size:
    24px 24px,
    24px 24px,
    100% 100%;
  background-position: center;
}
.stage-screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  z-index: 1;
  display: block;
}
.axis {
  background: #9bc6aa2a;
  position: absolute;
  pointer-events: none;
}
.axis-v {
  width: 1px;
  height: 100%;
  left: 50%;
}
.axis-h {
  height: 1px;
  width: 100%;
  top: 50%;
}
.stage-readout,
.stage-meta,
.stage-hint {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  color: #dce6d9;
  font-size: 11px;
  letter-spacing: 0.03em;
}
.touch-hint { display: none; }
@media (pointer: coarse) {
  .stage-hint .key-hint { display: none; }
  .stage-hint .touch-hint { display: inline; }
  .directions button { touch-action: none; user-select: none; }
}
.stage-readout {
  top: 15px;
  left: 17px;
  gap: 7px;
}
.stage-readout i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cfdda2;
}
.stage-meta {
  top: 15px;
  right: 17px;
  color: #b2c2b4;
  font-family: 'IBM Plex Mono', Consolas, monospace;
  font-size: 11px;
}
.stage-meta span {
  opacity: 0.7;
}
.stage-hint {
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 4px 8px;
  background: #1c3731d0;
  border-radius: 4px;
}
.corner {
  position: absolute;
  width: 8px;
  height: 8px;
  opacity: 0.48;
  border-color: #adc0b3;
  border-style: solid;
  z-index: 2;
  pointer-events: none;
}
.tl {
  top: 38px;
  left: 13px;
  border-width: 1px 0 0 1px;
}
.tr {
  top: 38px;
  right: 13px;
  border-width: 1px 1px 0 0;
}
.bl {
  bottom: 12px;
  left: 13px;
  border-width: 0 0 1px 1px;
}
.br {
  bottom: 12px;
  right: 13px;
  border-width: 0 1px 1px 0;
}
.view-foot {
  justify-content: space-between;
  min-height: 48px;
  padding: 7px 14px;
  gap: 5px;
}
.directions {
  gap: 4px;
}
.directions button,
.view-controls button,
.play-controls button,
.play-controls select,
.view-controls select {
  border-radius: 5px;
  padding: 5px 9px;
  font-size: 12px;
  border: 1px solid transparent;
}
.directions button[aria-pressed='true'] {
  background: var(--sage);
  font-weight: 700;
}
.view-controls {
  gap: 6px;
}
.view-controls button {
  gap: 4px;
}
.view-controls button[aria-pressed='true'] {
  background: #f4e6d0;
  color: #704b22;
}
.view-controls select,
.play-controls select,
.preset-row select {
  background: var(--card);
  border: 1px solid var(--rule);
}
.view-controls svg {
  width: 15px;
  height: 15px;
}
.motion-card .card-title {
  min-height: 45px;
}
.play-controls {
  gap: 2px;
}
.play-controls button {
  min-width: 26px;
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: 19px;
}
.play-controls #play {
  background: var(--green);
  color: white;
  font-size: 12px;
  min-width: 30px;
}
.actions {
  display: flex;
  gap: 5px;
  padding: 0 16px 10px;
  flex-wrap: wrap;
}
.actions button,
.prop-options button {
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 5px 10px;
  font-size: 12px;
}
.actions button[aria-pressed='true'],
.prop-options button[aria-pressed='true'] {
  color: var(--green);
  background: var(--sage);
  border-color: #a0baaa;
  font-weight: 700;
}
.filmstrip {
  display: flex;
  padding: 0 16px 5px;
  gap: 6px;
  overflow: auto;
  scrollbar-width: thin;
}
.filmstrip button {
  min-width: 48px;
  flex: 1;
  max-width: 95px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: #f0f2e9;
  position: relative;
  height: 60px;
  padding: 1px;
  display: grid;
  place-items: center;
}
.filmstrip button[aria-pressed='true'] {
  background: #e3ecde;
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
}
.filmstrip canvas {
  width: 28px;
  height: 42px;
  image-rendering: pixelated;
}
.filmstrip small {
  font:
    9px Consolas,
    monospace;
  position: absolute;
  right: 4px;
  bottom: 2px;
  color: var(--muted);
}
.time-foot {
  justify-content: space-between;
  padding: 1px 18px 10px;
  font-size: 11px;
  color: var(--muted);
}
.mono {
  font-family: 'IBM Plex Mono', Consolas, monospace;
}
.inspector .card-title {
  border-bottom: 1px solid var(--rule);
}
.icon-button {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 5px;
}
.inspector-in {
  padding: 16px 17px;
}
.tabs {
  margin-bottom: 14px;
}
.tabs button {
  padding: 7px;
}
.preset-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 9px 0 12px;
  color: var(--muted);
  font-size: 12px;
}
.preset-row select {
  border-radius: 5px;
  min-width: 112px;
  padding: 4px 8px;
  color: var(--ink);
}
.param {
  padding: 6px 0 4px;
}
.param > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.param label {
  font-size: 12px;
  font-weight: 600;
}
.param output {
  font:
    11px 'IBM Plex Mono',
    Consolas,
    monospace;
  color: var(--muted);
}
input[type='range'] {
  display: block;
  width: 100%;
  height: 17px;
  margin: 3px 0 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}
input[type='range']::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 5px;
  background: linear-gradient(to right, #628a74 var(--p), #d9dfd3 var(--p));
}
input[type='range']::-webkit-slider-thumb {
  appearance: none;
  width: 13px;
  height: 13px;
  margin-top: -4.5px;
  border-radius: 100%;
  border: 2px solid #fafbf5;
  background: #426c56;
  box-shadow: 0 0 0 1px #8aa28e;
}
input[type='range']::-moz-range-track {
  height: 4px;
  background: #d9dfd3;
}
input[type='range']::-moz-range-thumb {
  background: #426c56;
  border: 2px solid #fafbf5;
  border-radius: 50%;
}
.props {
  border-top: 1px solid var(--rule);
  padding-top: 14px;
  margin-top: 14px;
}
.props h3,
#face-detail h3 {
  font-size: 13px;
}
.prop-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-top: 8px;
}
.prop-options button {
  padding: 6px 2px;
}
#face-detail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #e8ede3;
  padding: 6px 11px;
  border-radius: 6px;
  margin-bottom: 8px;
}
#face-close {
  width: 76px;
  height: 76px;
  image-rendering: pixelated;
}
.dim {
  font-size: 11px;
  color: var(--muted);
}
#face-detail h3 {
  margin-bottom: 5px;
}
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  background: #263c34;
  color: white;
  padding: 10px 16px;
  border-radius: 7px;
  max-width: 90vw;
  box-shadow: 0 3px 12px #14221d22;
  font-size: 13px;
}
[hidden] {
  display: none !important;
}
@media (min-width: 1450px) {
  .workspace {
    padding-top: 28px;
  }
}
@media (max-width: 900px) {
  .workspace {
    grid-template-columns: minmax(0, 1.65fr) minmax(250px, 1fr);
    gap: 10px;
    padding: 14px;
  }
  .bar-inner {
    padding: 0 16px;
  }
  .filmstrip button {
    min-width: 39px;
  }
  .actions {
    gap: 4px;
  }
  .actions button {
    padding: 4px 7px;
  }
  .view-controls button span {
    display: none;
  }
  .view-foot {
    padding: 6px;
  }
  .directions button {
    padding: 5px 6px;
  }
}
@media (max-width: 700px) {
  .workspace {
    grid-template-columns: 1fr;
    padding: 10px;
    gap: 12px;
  }
  .bar-inner {
    height: 60px;
    padding: 0 12px;
  }
  .identity {
    gap: 7px;
  }
  .identity h1 {
    font-size: 22px;
  }
  .brand-detail,
  .brand-line {
    display: none;
  }
  .file-tools {
    gap: 2px;
  }
  .file-tools button {
    padding: 7px;
    font-size: 11px;
  }
  .file-tools button.primary {
    padding: 8px;
  }
  .view-card .card-title {
    min-height: 45px;
  }
  .card-title {
    padding: 8px 12px;
  }
  #stage {
    height: 335px;
  }
  .viewer-column {
    gap: 10px;
  }
  .inspector-in {
    padding: 12px 15px;
  }
  .inspector #parameters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 18px;
  }
  .filmstrip {
    gap: 4px;
    padding: 0 10px 5px;
  }
  .filmstrip button {
    min-width: 34px;
    height: 52px;
  }
  .actions {
    padding: 0 10px 8px;
  }
  .view-foot {
    flex-wrap: wrap;
  }
  .stage-meta {
    top: 12px;
  }
  .stage-readout {
    top: 11px;
  }
  .file-tools button svg {
    width: 14px;
  }
  .props {
    margin-top: 8px;
  }
}
