:root {
  color-scheme: light;
  --ink: #172c28;
  --muted: #597067;
  --line: #d4dfd9;
  --bg: #f3f6f3;
  --panel: #fff;
  --brand: #12664e;
  --deep: #102e27;
  --lime: #c3e993;
  --amber: #946118;
  --focus: #19815f;
  font-family:
    "Inter", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100dvh;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a.download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  cursor: pointer;
  text-decoration: none;
  min-height: 2.45rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 0.43rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 570;
  line-height: 1.35;
}
button:hover,
a.download:hover {
  border-color: #81a696;
  background: #f4f9f5;
}
button:disabled,
a.disabled {
  opacity: 0.48;
  cursor: not-allowed;
}
button.primary,
a.primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
button.primary:hover,
a.primary:hover {
  background: #0a513c;
}
button.secondary {
  color: #175d48;
  background: #edf6ed;
  border-color: #c7dcca;
}
button.quiet {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
button.small {
  min-height: 2rem;
  font-size: 0.83rem;
  padding: 0.24rem 0.6rem;
}
button.danger {
  color: #92452d;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #78b995;
  outline-offset: 2px;
}
input:not([type="checkbox"]),
select,
textarea {
  border: 1px solid #bfcfc5;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0.55rem 0.65rem;
  max-width: 100%;
  min-width: 0;
}
input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--brand);
}
textarea {
  resize: vertical;
  line-height: 1.55;
  min-height: 4rem;
}
label.field {
  display: grid;
  align-content: start;
  gap: 0.38rem;
  font-size: 0.88rem;
  font-weight: 580;
}
.field > small,
.hint,
.sub {
  font-size: 0.85rem;
  line-height: 1.6;
  font-weight: 400;
  color: var(--muted);
}
pre {
  white-space: pre-wrap;
  font-family: inherit;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(1.7rem, 2vw, 2.1rem);
  letter-spacing: -0.04em;
  font-weight: 710;
  line-height: 1.25;
}
h2 {
  font-size: 1.1rem;
  letter-spacing: -0.025em;
}
h3 {
  font-size: 1rem;
}
.mono,
time {
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-variant-numeric: tabular-nums;
}
.top {
  height: 64px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1rem, 2.8vw, 3.2rem);
  gap: 1rem;
}
.brand,
.brand:focus,
.brand:hover {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.08rem;
  letter-spacing: 0.02em;
  font-weight: 710;
  border: 0;
  background: none;
  padding: 0;
  color: var(--ink);
}
.mark {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  justify-content: center;
  background: var(--deep);
  height: 34px;
  width: 36px;
  border-radius: 8px;
  flex-shrink: 0;
}
.mark i {
  width: 3px;
  background: var(--lime);
  border-radius: 3px;
  height: 12px;
}
.mark i:nth-child(2) {
  height: 21px;
}
.mark i:nth-child(3) {
  height: 16px;
}
.mark i:nth-child(4) {
  height: 9px;
}
.actions,
.inline,
.meta,
.tags {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.meta {
  font-size: 0.85rem;
  color: var(--muted);
}
.dot {
  color: #acbcb2;
}
.layout {
  max-width: 1720px;
  margin: auto;
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  min-height: calc(100dvh - 64px);
}
.rail {
  background: #eaf0e9;
  border-right: 1px solid var(--line);
  padding: 2rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.rail-title {
  padding: 0.15rem 0.7rem 1.35rem;
  border-bottom: 1px solid #cbd7ce;
  margin-bottom: 1.2rem;
}
.rail-title strong {
  display: block;
  font-size: 1.08rem;
  overflow-wrap: anywhere;
  margin: 0.4rem 0;
}
.rail-title small,
.eyebrow {
  font-size: 0.76rem;
  font-weight: 630;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.nav {
  border: 0;
  border-radius: 7px;
  background: transparent;
  justify-content: flex-start;
  min-height: 2.85rem;
  gap: 0.7rem;
  color: #42594f;
  text-align: left;
}
.nav.on,
.nav.on:hover {
  background: #d4e4d5;
  color: #123d29;
  font-weight: 700;
}
.nav span {
  font-family: monospace;
  font-size: 0.83rem;
  letter-spacing: 0.05em;
  color: #587063;
  display: inline-grid;
  place-items: center;
  width: 1.55rem;
}
.rail-foot {
  margin-top: auto;
  padding-top: 2rem;
}
.work {
  min-width: 0;
  padding: clamp(1.2rem, 2.4vw, 2.6rem);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.head,
.panelhead,
.spread,
.rowhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}
.head {
  align-items: flex-end;
  flex-wrap: wrap;
}
.head .meta {
  margin-top: 0.45rem;
}
.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 11px;
  min-width: 0;
}
.panelhead {
  padding: 1rem 1.05rem;
  border-bottom: 1px solid var(--line);
  min-height: 59px;
  flex-wrap: wrap;
}
.panelbody {
  padding: 1.05rem;
  display: grid;
  gap: 1rem;
}
.two {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  align-items: start;
  gap: 1rem;
}
.stack {
  display: grid;
  gap: 0.9rem;
}
.splitfield {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}
.end {
  justify-content: flex-end;
}
.transport {
  border-radius: 11px;
  background: var(--deep);
  color: #eff8ed;
  padding: 1rem 1.15rem;
  display: grid;
  grid-template-columns: 2.9rem minmax(96px, 0.55fr) minmax(100px, 3fr) auto;
  gap: 1rem;
  align-items: center;
}
.transport small {
  display: block;
  color: #aac3b4;
  font-size: 0.77rem;
  margin-bottom: 0.2rem;
}
.transport strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.94rem;
}
.transport time {
  font-size: 0.8rem;
  color: #d3e1d5;
}
.transport .play {
  height: 42px;
  width: 42px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--deep);
  background: var(--lime);
  font-size: 1.05rem;
}
.wave {
  position: relative;
  min-width: 0;
  cursor: pointer;
  height: 48px;
}
.wave canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.wave input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}
.wave:focus-within {
  outline: 2px solid #aaca91;
}
.wave input:disabled {
  cursor: default;
}
.listtools {
  padding: 0.8rem 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
.listtools select,
.listtools input {
  font-size: 0.87rem;
  flex: 1;
  min-width: 7rem;
}
.scroll {
  max-height: clamp(22rem, 53vh, 48rem);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #b7c7bc transparent;
}
.cuerow,
.shotrow {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #e5ebe6;
  background: #fff;
  border-radius: 0;
  display: block;
  padding: 0.8rem 1rem;
  text-align: left;
  font-weight: 400;
}
.cuerow:last-child,
.shotrow:last-child {
  border-bottom: 0;
}
.cuerow.current,
.shotrow.current {
  background: #edf6ed;
  box-shadow: inset 3px 0 var(--brand);
}
.cuerow:hover,
.shotrow:hover {
  background: #f4f7f4;
}
.cuerow p,
.shotrow p {
  line-height: 1.52;
  margin: 0.36rem 0 0;
  overflow-wrap: anywhere;
}
.rowhead {
  justify-content: flex-start;
  gap: 0.6rem;
  font-size: 0.79rem;
  color: var(--muted);
}
.rowhead .badge {
  margin-left: auto;
}
.badge {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-size: 0.76rem;
  font-weight: 610;
  color: #38564a;
  background: #e9f0e9;
  border-radius: 4px;
  padding: 0.18rem 0.42rem;
}
.badge.keep {
  color: #176246;
  background: #dff1df;
}
.badge.visual {
  color: #7a5016;
  background: #fbebc7;
}
.badge.omit {
  color: #59625c;
  background: #edf0ed;
}
.quote {
  line-height: 1.6;
  font-size: 1.12rem;
  font-weight: 560;
  padding: 0.8rem 1rem;
  background: #f2f6f2;
  border-left: 3px solid #97b9a1;
  border-radius: 3px;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
}
.choices button {
  padding: 0.5rem 0.2rem;
}
.choices .on {
  color: #16583d;
  border-color: #6fa486;
  background: #e7f3e7;
}
.choices .visual.on {
  background: #fbefcf;
  border-color: #d0a45c;
  color: #704817;
}
.choices .omit.on {
  background: #edf0ed;
  border-color: #97a29a;
  color: #3d4941;
}
details {
  border-top: 1px solid var(--line);
  padding-top: 0.7rem;
}
summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.89rem;
}
details .stack {
  margin-top: 0.8rem;
}
.listfoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}
.scene-select {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  flex-wrap: wrap;
}
.rhythm {
  display: flex;
  min-width: 0;
  overflow: hidden;
  border-radius: 6px;
  height: 40px;
  background: #edf1ed;
}
.rhythm button {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  padding: 0 0.1rem;
  border: 0;
  border-right: 2px solid white;
  min-height: 0;
  border-radius: 0;
  background: #a5c4ae;
  color: #133b29;
  font-family: monospace;
  font-size: 0.78rem;
}
.rhythm button:nth-child(even) {
  background: #cedfc8;
}
.rhythm button.on {
  background: #277e5c;
  color: white;
}
.lineitem {
  padding: 0.65rem 0.75rem;
  background: #f5f7f4;
  border-radius: 6px;
  line-height: 1.5;
}
.lineitem small,
.sourceid {
  font-size: 0.78rem;
  color: var(--muted);
}
.lineitem p {
  margin-top: 0.16rem;
}
.callout {
  padding: 0.85rem 1rem;
  border: 1px solid #dab775;
  background: #fff6df;
  color: #694922;
  border-radius: 8px;
  font-size: 0.91rem;
  line-height: 1.5;
}
.jobbar {
  background: #e7f2eb;
  border: 1px solid #bcd6c5;
  color: #244b35;
  padding: 0.65rem 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  border-radius: 8px;
}
.error {
  color: #9b402b;
  font-size: 0.9rem;
  line-height: 1.5;
}
.pick {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  border-bottom: 1px solid #e0e7e1;
  padding: 0.65rem 0.9rem;
  font-size: 0.92rem;
  line-height: 1.5;
}
.pick input {
  margin-top: 0.22rem;
}
.pick strong {
  font-family: monospace;
  font-size: 0.8rem;
  color: #3f6750;
}
.pick .buttons {
  margin-left: auto;
  display: flex;
  gap: 0.25rem;
}
.buttons button {
  min-width: 2rem;
  padding: 0;
}
.groupname {
  padding: 0.6rem 0.9rem;
  background: #f2f5f1;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  font-weight: 650;
  display: flex;
  gap: 0.55rem;
  align-items: center;
}
.empty,
.loading {
  padding: 2.7rem 1.3rem;
  text-align: center;
  color: var(--muted);
  line-height: 1.7;
}
.empty h3 {
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.empty button {
  margin-top: 0.8rem;
}
.home {
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 4rem) 1.2rem;
}
.home .head {
  margin-bottom: 1.4rem;
}
.importcard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  align-items: center;
  gap: 2rem;
  background: var(--deep);
  color: #f3fbef;
  padding: clamp(1.4rem, 3vw, 2.6rem);
  border-radius: 13px;
  margin-bottom: 1.3rem;
}
.importcard h2 {
  font-size: 1.5rem;
}
.importcard p {
  color: #c0d3c6;
  line-height: 1.7;
  margin: 0.6rem 0 1.2rem;
  max-width: 40rem;
}
.importcard .primary {
  background: var(--lime);
  color: var(--deep);
  border: 0;
}
.importcard .quiet {
  color: #c5dccb;
}
.importcard .quiet:hover {
  background: #224439;
}
.signal {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 5px;
  justify-content: center;
}
.signal i {
  width: 5px;
  background: #afd696;
  border-radius: 1rem;
}
.project {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 1rem 1.2rem;
  display: flex;
  justify-content: space-between;
  text-align: left;
}
.project:last-child {
  border: 0;
  border-radius: 0 0 10px 10px;
}
.login {
  max-width: 440px;
  margin: clamp(3rem, 12vh, 8rem) auto;
  padding: 1.7rem;
  display: grid;
  gap: 1rem;
}
.login h1 {
  font-size: 1.65rem;
}
.login .mark {
  height: 40px;
  width: 42px;
}
dialog {
  background: #fff;
  color: var(--ink);
  border: 1px solid #cdd8ce;
  border-radius: 12px;
  width: min(580px, calc(100vw - 1.2rem));
  max-height: 88dvh;
  padding: 0;
  box-shadow: 0 22px 75px #0a261c32;
}
dialog::backdrop {
  background: #112b235c;
}
dialog.wide {
  width: min(800px, calc(100vw - 1.2rem));
}
dialog header,
dialog footer {
  padding: 0.85rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: #fff;
}
dialog header {
  border-bottom: 1px solid var(--line);
}
dialog footer {
  border-top: 1px solid var(--line);
  justify-content: flex-end;
}
.dialogbody {
  padding: 1.15rem;
  display: grid;
  gap: 1rem;
  max-height: 62dvh;
  overflow: auto;
}
#notice {
  position: fixed;
  z-index: 20;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(640px, 95vw);
  background: #19372b;
  color: white;
  border-radius: 7px;
  padding: 0.65rem 1rem;
  pointer-events: none;
  opacity: 0;
  font-size: 0.9rem;
  box-shadow: 0 3px 18px #15352226;
}
#notice.visible {
  opacity: 1;
}
#notice.bad {
  background: #743e30;
}
.formcheck {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  font-size: 0.89rem;
}
.pagejump {
  min-width: 2.2rem;
}
@media (min-width: 1650px) {
  .layout {
    border-inline: 1px solid var(--line);
  }
}
@media (max-width: 1060px) {
  .layout {
    grid-template-columns: 158px minmax(0, 1fr);
  }
  .work {
    padding: 1.05rem;
  }
  .two {
    grid-template-columns: minmax(0, 1fr) minmax(275px, 0.8fr);
  }
  .rail {
    padding-inline: 0.5rem;
  }
  .transport {
    gap: 0.6rem;
  }
  .transport time {
    font-size: 0.73rem;
  }
}
@media (max-width: 780px) {
  .layout {
    display: block;
  }
  .top {
    height: auto;
    min-height: 56px;
    padding: 0.55rem 0.8rem;
  }
  .rail {
    display: flex;
    flex-direction: row;
    gap: 0.25rem;
    align-items: center;
    padding: 0.4rem 0.6rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .rail-title,
  .rail-foot {
    display: none;
  }
  .nav {
    flex: 1;
    justify-content: center;
    min-height: 2.4rem;
    padding: 0.35rem;
    gap: 0.2rem;
    font-size: 0.84rem;
  }
  .nav span {
    width: 1.15rem;
  }
  .work {
    padding: 0.85rem;
    gap: 0.8rem;
  }
  .two {
    grid-template-columns: 1fr;
  }
  .scroll {
    max-height: 19rem;
  }
  .transport {
    grid-template-columns: 38px 1fr auto;
    padding: 0.7rem 0.85rem;
  }
  .transport .wave {
    grid-row: 2;
    grid-column: 1/-1;
    height: 34px;
  }
  .transport .play {
    width: 36px;
    height: 36px;
  }
  .head {
    align-items: flex-start;
  }
  .importcard {
    grid-template-columns: 1fr;
  }
  .signal {
    display: none;
  }
  .top .actions {
    gap: 0.2rem;
  }
  .top button {
    font-size: 0.85rem;
  }
  .brand {
    font-size: 0.95rem;
  }
  .home {
    padding-top: 1.4rem;
  }
  .quote {
    font-size: 1rem;
  }
  .project .mono {
    font-size: 0.78rem;
  }
  .listfoot .hint {
    font-size: 0.77rem;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button,
  a {
    transition:
      background 0.12s,
      border-color 0.12s;
  }
}
label.shotvoice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.45rem;
  font-size: 0.79rem;
  font-weight: 400;
  color: var(--muted);
}
.shotvoice select,
.listfoot select {
  padding: 0.2rem 0.4rem;
  font-size: 0.81rem;
}
@media (max-width: 520px) {
  .top .brand {
    white-space: nowrap;
    font-size: 0.93rem;
    gap: 0.4rem;
  }
  .top .actions {
    flex-wrap: nowrap;
  }
  .top .actions [data-act="home"] {
    display: none;
  }
  .top .actions button {
    white-space: nowrap;
  }
  .top .brand .mark {
    width: 31px;
    height: 31px;
  }
}
