:root {
  --bg: #f4f7f1;
  --surface: #ffffff;
  --ink: #17212b;
  --muted: #65727f;
  --line: #dce4d5;
  --soft: #edf4ec;
  --teal: #0f766e;
  --teal-2: #0d9488;
  --coral: #d95f47;
  --gold: #edb84c;
  --leaf: #5b8c5a;
  --shadow: 0 18px 44px rgba(23, 33, 43, 0.11);
  color-scheme: light;
}

@font-face {
  font-family: "NikiJiangHu";
  src: url("/assets/fonts/jianghu.ttf") format("truetype");
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.08), rgba(244, 247, 241, 0) 240px),
    var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 18px 18px 96px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0 16px;
  background: linear-gradient(180deg, var(--bg) 78%, rgba(244, 247, 241, 0));
}

.app-header h1,
.section-head h2,
.hero-copy h2,
.story-hero h2,
.persona-preview h2,
.showcase-item h3,
.expert-card h3,
.record-item h3,
.provider-card h3 {
  margin: 0;
  letter-spacing: 0;
}

.app-header h1 {
  font-size: 22px;
  line-height: 1.15;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button,
.avatar-button {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(23, 33, 43, 0.1);
  display: grid;
  place-items: center;
}

.team-entry-button {
  min-width: 58px;
  height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  color: #fff;
  background: var(--teal);
  box-shadow: 0 8px 22px rgba(23, 33, 43, 0.1);
  font-size: 13px;
  font-weight: 900;
}

.avatar-button img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hero-panel,
.story-hero {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  border-radius: 8px;
  background: #112022;
  box-shadow: var(--shadow);
}

.persona-home-hero {
  min-height: 300px;
}

.hero-panel picture,
.hero-panel img,
.story-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-panel::after,
.story-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 24, 27, 0.08), rgba(12, 24, 27, 0.86));
}

.hero-copy,
.story-hero > div {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  color: #fff;
  padding: 28px;
}

.hero-copy .eyebrow,
.story-hero .eyebrow {
  color: var(--gold);
}

.hero-copy h2,
.story-hero h2 {
  max-width: 760px;
  font-size: 38px;
  line-height: 1.12;
}

.hero-copy p:last-child,
.story-hero p:last-child {
  max-width: 620px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.7;
}

.flow-rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.flow-step {
  min-height: 72px;
  padding: 12px;
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: left;
}

.flow-step span {
  display: block;
  margin-bottom: 5px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 800;
}

.flow-step strong {
  color: inherit;
}

.flow-step.active {
  color: #fff;
  border-color: var(--teal);
  background: linear-gradient(135deg, var(--teal), var(--leaf));
}

.flow-step.active span {
  color: #ffe3a3;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(420px, 0.92fr) minmax(420px, 1.08fr);
  gap: 18px;
  align-items: start;
}

.persona-workspace {
  margin-top: 16px;
}

.surface,
.persona-preview,
.journey-preview,
.showcase-item,
.expert-card,
.record-item,
.provider-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.surface,
.journey-preview,
.persona-preview {
  padding: 18px;
}

.creator-surface {
  position: sticky;
  top: 82px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: 24px;
}

.section-head.compact {
  margin-bottom: 12px;
}

.segmented {
  display: grid;
  grid-auto-flow: column;
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  background: var(--soft);
}

.segment {
  min-height: 36px;
  min-width: 58px;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.segment.active {
  color: #fff;
  background: var(--teal);
}

.quick-actions,
.output-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.quick-actions {
  margin-bottom: 16px;
}

.expert-picker-wrap {
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf5;
}

.choice-block {
  margin: 14px 0 2px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf5;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.choice-pill {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-size: 13px;
  font-weight: 900;
}

.choice-pill.active {
  color: #fff;
  border-color: var(--teal);
  background: var(--teal);
}

.persona-main-actions {
  margin-top: 14px;
}

.persona-main-actions .primary-button {
  flex: 1 1 100%;
  min-height: 52px;
  font-size: 16px;
}

.saved-card-picker {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.saved-card-picker h3 {
  margin: 0 0 10px;
  font-size: 18px;
  letter-spacing: 0;
}

.saved-card-picker select {
  margin-bottom: 10px;
}

.mini-label {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.expert-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.expert-choice {
  min-height: 86px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.expert-choice strong,
.expert-choice span {
  display: block;
}

.expert-choice strong {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 14px;
}

.expert-choice span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.expert-choice.active {
  border-color: var(--teal);
  background: #eaf7f4;
}

.primary-button,
.secondary-button,
.accent-button,
.link-button {
  min-height: 44px;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 800;
}

.primary-button {
  color: #fff;
  background: var(--teal);
}

.secondary-button {
  color: var(--teal);
  background: #fff;
  border: 1px solid var(--line);
}

.accent-button {
  color: #fff;
  background: var(--coral);
}

.link-button {
  color: var(--ink);
  background: #fff5dc;
  border: 1px solid rgba(237, 184, 76, 0.55);
  display: inline-grid;
  place-items: center;
  text-decoration: none;
}

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

.avatar-field {
  display: grid;
  gap: 7px;
}

.avatar-field input[type="file"] {
  display: none;
}

.avatar-upload-button {
  justify-content: center;
}

.asset-uploader {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf5;
}

.asset-uploader input[type="file"] {
  display: none;
}

.asset-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.asset-head .muted-text,
.empty-assets {
  margin: 0;
  font-size: 13px;
}

.asset-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.asset-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.asset-item > div {
  min-width: 0;
  flex: 1;
}

.asset-mini-thumb {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  background: #f5f8f2;
}

.asset-file-mini {
  display: grid;
  place-items: center;
  padding: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.asset-item strong,
.asset-item span {
  display: block;
}

.asset-item strong {
  font-size: 14px;
  word-break: break-all;
}

.asset-item span,
.empty-assets {
  color: var(--muted);
  font-size: 12px;
}

.small-button {
  min-height: 34px;
  padding: 0 10px;
  white-space: nowrap;
}

.intent-grid {
  margin-top: 12px;
}

label {
  display: grid;
  gap: 7px;
}

label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  outline: none;
  padding: 11px 12px;
}

textarea {
  line-height: 1.65;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.wide-field {
  margin-top: 12px;
}

.span-2 {
  grid-column: span 2;
}

.preview-column {
  display: grid;
  gap: 16px;
}

.persona-preview {
  color: #fff;
  border: 0;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.96), rgba(22, 58, 63, 0.96)),
    var(--teal);
}

.persona-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.persona-top img {
  width: 76px;
  height: 76px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.55);
}

.persona-preview .eyebrow {
  color: #ffe3a3;
}

.persona-preview h2 {
  font-size: 24px;
}

.persona-preview p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.65;
}

.persona-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.persona-metrics div {
  min-height: 66px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.13);
}

.persona-metrics strong,
.persona-metrics span {
  display: block;
}

.persona-metrics strong {
  margin-bottom: 5px;
  color: #ffe3a3;
  font-size: 12px;
}

.journey-line {
  display: grid;
  gap: 10px;
}

.journey-node {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: start;
}

.journey-node span {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: #fff;
  background: var(--coral);
  display: grid;
  place-items: center;
  font-weight: 900;
}

.journey-node strong {
  display: block;
  margin-bottom: 3px;
}

.journey-node p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

#serverBadge {
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

#serverBadge.ok {
  color: var(--teal);
}

#serverBadge.fail {
  color: var(--coral);
}

.generated-card {
  overflow: hidden;
}

.status-dot {
  white-space: nowrap;
  border-radius: 999px;
  padding: 5px 9px;
  color: #fff;
  background: var(--coral);
  font-size: 12px;
  font-weight: 900;
}

.generated-card-body {
  max-height: 520px;
  overflow: auto;
  padding: 16px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.08), rgba(255, 255, 255, 0)),
    #fff;
  color: var(--ink);
  line-height: 1.72;
  white-space: pre-wrap;
}

.generated-card-body h3 {
  margin: 16px 0 8px;
  color: var(--teal);
  font-size: 17px;
}

.generated-card-body h3:first-child {
  margin-top: 0;
}

.persona-revision {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.persona-chat-panel {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #d5e7df;
  border-radius: 8px;
  background: #f7fbf8;
}

.persona-chat-panel textarea {
  min-height: 128px;
}

.output-surface textarea,
.prompt-surface textarea,
#customRules {
  min-height: 420px;
  background: #101923;
  color: #f7fafc;
  border-color: #101923;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 14px;
}

.prompt-surface textarea,
#customRules {
  min-height: 260px;
}

.output-actions {
  margin-top: 12px;
}

#view-workspace .output-surface {
  display: none;
}

.daily-shell {
  display: grid;
  gap: 16px;
}

.daily-head {
  align-items: end;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(237, 244, 236, 0.92)),
    #fff;
  box-shadow: var(--shadow);
}

.daily-head h2 {
  margin: 0;
  font-size: 30px;
}

.daily-head .muted-text {
  margin: 6px 0 0;
}

.daily-model-badge {
  white-space: nowrap;
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 900;
}

.daily-model-badge.ok {
  color: var(--teal);
}

.daily-model-badge.fail {
  color: var(--coral);
}

.daily-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.42fr) minmax(420px, 0.58fr);
  gap: 16px;
  align-items: start;
}

.daily-control {
  position: sticky;
  top: 82px;
  display: grid;
  gap: 12px;
}

.daily-mini-grid {
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: 10px;
}

.daily-generate-button {
  width: 100%;
  min-height: 52px;
  font-size: 16px;
}

.daily-card-panel {
  min-height: 420px;
}

.daily-empty-card,
.daily-persona-card {
  min-height: 420px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.daily-empty-card {
  display: grid;
  align-content: center;
  padding: 24px;
  border: 1px dashed var(--line);
  background: #fff;
}

.daily-empty-card h3 {
  margin: 0;
  font-size: 24px;
}

.daily-empty-card p:last-child {
  color: var(--muted);
  line-height: 1.65;
}

.daily-persona-card {
  overflow: hidden;
  padding: 18px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.97), rgba(23, 33, 43, 0.96)),
    var(--teal);
}

.daily-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.daily-card-top img {
  width: 88px;
  height: 88px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.58);
}

.daily-card-top .eyebrow {
  color: #ffe3a3;
}

.daily-card-top h3 {
  margin: 0;
  font-size: 25px;
  letter-spacing: 0;
}

.daily-card-top p,
.daily-persona-summary {
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.65;
}

.daily-card-tags,
.daily-asset-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.daily-card-tags span,
.daily-asset-strip span {
  border-radius: 999px;
  padding: 6px 10px;
  color: #123236;
  background: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 900;
}

.daily-asset-strip span {
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.daily-persona-summary {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.daily-persona-summary div {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.daily-persona-summary dt {
  color: #ffe3a3;
  font-size: 12px;
  font-weight: 900;
}

.daily-persona-summary dd {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.55;
}

.daily-journey-grid {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.daily-journey-card {
  padding: 12px;
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
}

.daily-journey-card strong {
  display: block;
  margin-bottom: 5px;
  color: var(--coral);
}

.daily-journey-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.daily-journey-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.daily-journey-card dl div {
  display: grid;
  gap: 2px;
}

.daily-journey-card dt {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
}

.daily-journey-card dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.daily-output {
  margin-bottom: 12px;
}

.daily-generated-text {
  min-height: 260px;
  padding: 18px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(237, 184, 76, 0.1), rgba(255, 255, 255, 0)),
    #fff;
  color: var(--ink);
  line-height: 1.75;
  white-space: pre-wrap;
}

.daily-chat-box {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.daily-chat-box textarea {
  min-height: 112px;
}

.daily-generated-text h3 {
  margin: 18px 0 8px;
  color: var(--teal);
  font-size: 18px;
}

.daily-generated-text h3:first-child {
  margin-top: 0;
}

.daily-copy-list {
  display: grid;
  gap: 12px;
  white-space: normal;
}

.daily-copy-item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.daily-copy-item.saved {
  border-color: rgba(15, 118, 110, 0.42);
  box-shadow: 0 12px 26px rgba(15, 118, 110, 0.08);
}

.daily-copy-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #f8fbf5;
}

.daily-copy-head div {
  min-width: 0;
}

.daily-copy-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.daily-copy-head strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  line-height: 1.35;
}

.daily-copy-select {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--teal);
  font-weight: 800;
  cursor: pointer;
}

.daily-copy-select input {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
}

.daily-copy-content {
  padding: 14px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.story-hero {
  margin-bottom: 16px;
}

.showcase-grid,
.expert-grid,
.records-list,
.provider-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.showcase-item,
.expert-card,
.record-item,
.provider-card {
  overflow: hidden;
  padding: 14px;
}

.showcase-item img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 12px;
}

.showcase-item h3,
.expert-card h3,
.record-item h3,
.provider-card h3 {
  font-size: 18px;
}

.record-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.record-badges span,
.mini-badges span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #e9f4ef;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

.mini-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.record-hook {
  padding: 10px;
  border-radius: 8px;
  background: #fff9e7;
  color: #6f5818;
  font-weight: 700;
}

.showcase-item p,
.expert-card p,
.record-item p,
.provider-card p,
.muted-text {
  color: var(--muted);
  line-height: 1.62;
}

.expert-card {
  min-height: 150px;
  cursor: pointer;
}

.expert-card.active {
  border-color: var(--teal);
  background: #eff8f6;
}

.expert-tag {
  width: fit-content;
  margin-bottom: 10px;
  border-radius: 8px;
  padding: 4px 9px;
  color: #fff;
  background: var(--leaf);
  font-size: 12px;
  font-weight: 800;
}

.knowledge-tabs {
  margin: 0 0 14px;
}

.knowledge-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(0, 1.14fr);
  gap: 16px;
  align-items: start;
}

.knowledge-editor,
.record-toolbar {
  display: grid;
  gap: 14px;
}

.knowledge-editor {
  position: sticky;
  top: 14px;
}

.knowledge-upload-card {
  background: #f8fbf5;
}

.knowledge-editor input[type="file"] {
  display: none;
}

.knowledge-list {
  display: grid;
  gap: 12px;
}

.knowledge-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.knowledge-item .asset-mini-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

.knowledge-item h3 {
  margin: 0;
  font-size: 17px;
}

.knowledge-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.edit-shell {
  display: grid;
  gap: 16px;
}

.digital-shell {
  display: grid;
  gap: 16px;
}

.edit-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(242, 246, 232, 0.94)),
    #fff;
}

.edit-hero h2 {
  margin: 0;
  font-size: 30px;
}

.edit-hero .muted-text {
  margin: 6px 0 0;
}

.edit-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.42fr) minmax(420px, 0.58fr);
  gap: 16px;
  align-items: start;
}

.digital-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.46fr) minmax(420px, 0.54fr);
  gap: 16px;
  align-items: start;
}

.edit-uploader,
.edit-job-panel,
.digital-control,
.digital-panel {
  display: grid;
  gap: 14px;
}

.edit-uploader,
.digital-control {
  position: sticky;
  top: 82px;
}

.edit-upload-box {
  background: #f8fbf5;
}

.digital-upload-box {
  background: #f8fbf5;
}

.niki-only {
  display: none !important;
}

[data-team="niki"] .niki-only,
[data-team="xizi"] .niki-only {
  display: grid !important;
}

[data-team="niki"] option.niki-only,
[data-team="xizi"] option.niki-only {
  display: block !important;
}

.edit-upload-box input[type="file"],
.digital-upload-box input[type="file"] {
  display: none;
}

.digital-relay-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(86, 86, 120, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(242, 244, 255, 0.96)),
    #fff;
}

.digital-advice {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 8px;
  background: #f2faf7;
}

.digital-advice h3,
.digital-advice p {
  margin: 0;
}

.digital-advice h3 {
  font-size: 17px;
}

.digital-job-item .record-badges {
  margin: 0;
}

.teleprompter-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdfa;
}

.teleprompter-panel textarea {
  min-height: 128px;
  line-height: 1.75;
}

.teleprompter-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 14px;
  background: rgba(12, 20, 18, 0.88);
}

.teleprompter-modal[hidden] {
  display: none;
}

.teleprompter-stage {
  position: relative;
  width: min(430px, 100%);
  height: min(88vh, 820px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: #111;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
}

.teleprompter-stage video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  background: #111;
}

.teleprompter-camera-fallback {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 58px;
  z-index: 4;
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  text-align: center;
  color: #fff;
  background: rgba(8, 14, 14, 0.72);
  backdrop-filter: blur(12px);
}

.teleprompter-camera-fallback[hidden] {
  display: none;
}

.teleprompter-camera-fallback h3,
.teleprompter-camera-fallback p {
  margin: 0;
}

.teleprompter-camera-fallback p {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.65;
}

.teleprompter-topbar {
  position: absolute;
  left: 14px;
  right: 14px;
  top: max(14px, env(safe-area-inset-top));
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  padding: 8px 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.24);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(12px);
}

.teleprompter-script-shell {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 18%;
  bottom: 166px;
  z-index: 2;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(7, 12, 12, 0.2), rgba(7, 12, 12, 0.42));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 18px 60px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(7px);
}

.teleprompter-script-shell::before,
.teleprompter-script-shell::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  height: 46px;
  pointer-events: none;
}

.teleprompter-script-shell::before {
  top: 0;
  background: linear-gradient(180deg, rgba(7, 12, 12, 0.74), rgba(7, 12, 12, 0));
}

.teleprompter-script-shell::after {
  bottom: 0;
  background: linear-gradient(0deg, rgba(7, 12, 12, 0.74), rgba(7, 12, 12, 0));
}

.teleprompter-focus-line {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 50%;
  z-index: 3;
  height: 2px;
  background: rgba(255, 255, 255, 0.44);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

.teleprompter-script {
  position: absolute;
  inset: 0;
  overflow: auto;
  padding: 44% 18px 46%;
  color: #fff;
  background: transparent;
  font-size: var(--teleprompter-font-size, 24px);
  font-weight: 900;
  line-height: 1.72;
  text-align: center;
  white-space: pre-wrap;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.teleprompter-script::-webkit-scrollbar {
  display: none;
}

.teleprompter-control-strip {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 84px;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.teleprompter-control-strip label {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #fff;
  background: rgba(0, 0, 0, 0.28);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(12px);
}

.teleprompter-control-strip input {
  width: 100%;
  accent-color: #f5c74f;
}

.teleprompter-toolbar {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));
  gap: 8px;
}

.teleprompter-toolbar button {
  min-height: 44px;
  padding-inline: 8px;
}

.teleprompter-toolbar button[hidden] {
  display: none;
}

.edit-publish-check {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.yixiaoer-account-list {
  display: grid;
  gap: 8px;
}

.yixiaoer-account-select {
  margin: 0;
}

.yixiaoer-account {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.yixiaoer-account img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: #eef4f0;
}

.yixiaoer-account strong,
.yixiaoer-account span,
.yixiaoer-account p {
  margin: 0;
}

.yixiaoer-account strong {
  display: block;
  font-size: 13px;
}

.yixiaoer-account p {
  color: var(--muted);
  font-size: 12px;
}

.yixiaoer-account span {
  border-radius: 999px;
  padding: 4px 7px;
  color: #7a5a0b;
  background: #fff6d8;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.yixiaoer-account.available span {
  color: var(--leaf);
  background: #edf7e7;
}

.yixiaoer-account.expired span {
  color: var(--coral);
  background: #fff0eb;
}

.edit-job-list,
.edit-review-list {
  display: grid;
  gap: 12px;
}

.edit-job-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.edit-job-item h3 {
  margin: 0;
  font-size: 18px;
}

.edit-job-item p {
  margin: 0;
}

.edit-status {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--teal);
  background: #e9f4ef;
  font-size: 12px;
  font-weight: 900;
}

.edit-status.failed {
  color: var(--coral);
  background: #fff0eb;
}

.edit-status.running,
.edit-status.queued {
  color: #7a5a0b;
  background: #fff6d8;
}

.edit-status.review-ready {
  color: var(--leaf);
  background: #edf7e7;
}

.digital-step-list {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
}

.digital-step {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
}

.digital-step > span {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: #cfd8d2;
}

.digital-step.done > span {
  background: var(--leaf);
}

.digital-step.running > span {
  background: #f4b740;
  box-shadow: 0 0 0 4px rgba(244, 183, 64, 0.16);
}

.digital-step.failed > span {
  background: var(--coral);
}

.digital-step.skipped > span {
  background: #d7d2c8;
}

.digital-step strong,
.digital-step p {
  margin: 0;
}

.digital-step strong {
  font-size: 13px;
}

.digital-step p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.edit-review-panel textarea {
  min-height: 180px;
}

.edit-final-preview {
  margin: 12px 0;
  max-width: 360px;
  border-radius: 8px;
  overflow: hidden;
  background: #101815;
  box-shadow: 0 12px 28px rgba(20, 35, 28, 0.14);
}

.edit-final-preview video {
  display: block;
  width: 100%;
  max-height: 68vh;
  background: #101815;
}

.edit-compare-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.edit-compare-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.edit-compare-head h3 {
  margin: 2px 0 0;
  font-size: 17px;
}

.edit-compare-stack {
  display: grid;
  gap: 12px;
}

.edit-compare-block {
  display: grid;
  gap: 8px;
}

.edit-compare-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.edit-compare-block video {
  width: 100%;
  max-height: 460px;
  border-radius: 8px;
  background: #101815;
  object-fit: contain;
}

.edit-production-panel {
  display: grid;
  grid-template-columns: minmax(140px, 0.38fr) minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdf9;
}

.edit-production-panel[hidden] {
  display: none;
}

.edit-cover-preview {
  position: relative;
  aspect-ratio: 9 / 16;
  min-height: 250px;
  border-radius: 8px;
  overflow: hidden;
  background: #121814;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 18px 38px rgba(18, 32, 25, 0.16);
  cursor: ns-resize;
  touch-action: none;
  --cover-y: 55;
  --subtitle-y: 84;
  --subtitle-font-px: 22px;
  --subtitle-stroke: 5;
}

.edit-cover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.04) contrast(1.03);
}

.edit-cover-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), transparent 32%, rgba(0, 0, 0, 0.22));
  pointer-events: none;
}

.edit-cover-band {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--cover-y) * 1%);
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  justify-content: center;
  padding: 12px 14px;
  color: #fff;
  background: rgba(176, 80, 94, 0.9);
  box-shadow: 0 12px 28px rgba(45, 18, 26, 0.2);
  touch-action: none;
}

.edit-cover-band strong {
  max-width: 92%;
  text-align: center;
  font-family: "NikiJiangHu", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: clamp(20px, 8.4vw, 31px);
  line-height: 1.02;
  font-weight: 950;
  text-wrap: balance;
  paint-order: stroke fill;
  -webkit-text-stroke: 1.7px rgba(0, 0, 0, 0.9);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.88), 0 5px 12px rgba(0, 0, 0, 0.28);
  display: grid;
  justify-items: center;
  gap: 4px;
}

.edit-cover-title-line {
  display: block;
  max-width: 100%;
  white-space: nowrap;
}

.edit-cover-title-line.main {
  font-size: 0.92em;
}

.edit-cover-title-line.sub {
  font-size: 1.08em;
}

.edit-cover-preview[data-cover-lines="1"] .edit-cover-title-line.main {
  font-size: 1em;
}

.edit-subtitle-sample {
  position: absolute;
  left: 50%;
  top: calc(var(--subtitle-y) * 1%);
  z-index: 3;
  width: 88%;
  transform: translate(-50%, -50%);
  color: #fff;
  text-align: center;
  font-family: "NikiJiangHu", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: var(--subtitle-font-px);
  line-height: 1.18;
  font-weight: 950;
  letter-spacing: 0;
  paint-order: stroke fill;
  pointer-events: auto;
  touch-action: none;
}

.edit-cover-preview-badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 4;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.42);
  font-size: 11px;
  font-weight: 900;
}

.edit-production-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.edit-production-fields label:first-child,
.edit-production-fields label:last-child {
  grid-column: 1 / -1;
}

.edit-production-fields .cover-frame-field,
.edit-cover-frame-rail {
  grid-column: 1 / -1;
}

.edit-production-fields .range-field span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.edit-production-fields .range-field b {
  color: #b4535d;
  font-size: 12px;
}

.edit-production-fields input[type="range"] {
  width: 100%;
  accent-color: #b4535d;
}

.edit-cover-frame-rail {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 0 5px;
  scroll-snap-type: x proximity;
}

.edit-cover-frame-rail button {
  flex: 0 0 52px;
  position: relative;
  aspect-ratio: 9 / 16;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #dfeae1;
  scroll-snap-align: start;
}

.edit-cover-frame-rail button.active {
  border-color: #b4535d;
  box-shadow: 0 0 0 2px rgba(180, 83, 93, 0.16);
}

.edit-cover-frame-rail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.edit-cover-frame-rail span {
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 3px;
  padding: 1px 3px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.58);
  font-size: 9px;
  font-weight: 900;
}

.edit-review-card {
  display: grid;
  grid-template-columns: minmax(210px, 0.74fr) minmax(240px, 1.26fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.coach-demo-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(236, 248, 244, 0.95), rgba(255, 247, 218, 0.92));
}

.coach-demo-panel h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.coach-demo-panel p:last-child {
  margin: 0;
  color: #40534e;
  font-size: 14px;
  line-height: 1.65;
  font-weight: 750;
}

.coach-side-note {
  margin: 8px 0 0;
  padding: 8px 9px;
  border-left: 3px solid #0f766e;
  border-radius: 8px;
  color: #31534d;
  background: #eef8f5;
  font-size: 12px;
  line-height: 1.55;
  font-weight: 850;
}

.edit-frame-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.edit-frame-grid figure {
  margin: 0;
}

.edit-frame-grid img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 8px;
  background: #edf4ec;
}

.edit-missing-asset {
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border: 1px solid var(--line);
}

.edit-composite-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 8px;
  overflow: hidden;
  background: #edf4ec;
  touch-action: none;
  --broll-x: 8;
  --broll-y: 58;
  --broll-w: 84;
  --broll-h: 30;
}

.edit-frame-grid .edit-composite-stage img {
  border-radius: 0;
}

.edit-composite-base {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.96);
}

.edit-composite-asset {
  position: absolute;
  z-index: 2;
  left: calc(var(--broll-x) * 1%);
  top: calc(var(--broll-y) * 1%);
  width: calc(var(--broll-w) * 1%) !important;
  height: calc(var(--broll-h) * 1%) !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  border: 0;
  outline: 0;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
  background: transparent;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-tap-highlight-color: transparent;
}

.edit-composite-asset:active {
  cursor: grabbing;
  outline: 0;
}

.edit-broll-resize-handle {
  position: absolute;
  z-index: 4;
  left: min(max(calc((var(--broll-x) + var(--broll-w)) * 1%), 6%), 94%);
  top: min(max(calc((var(--broll-y) + var(--broll-h)) * 1%), 6%), 94%);
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.82);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
  cursor: nwse-resize;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

.edit-broll-resize-handle::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.86);
}

.edit-composite-figure.upper .edit-composite-asset {
  object-fit: contain !important;
}

.edit-composite-figure.lower .edit-composite-asset,
.edit-composite-asset.broll-fit-contain {
  object-fit: contain !important;
}

.edit-composite-asset.broll-fit-cover {
  object-fit: cover !important;
}

.edit-composite-figure.full .edit-composite-asset {
  object-fit: contain !important;
  background: transparent;
}

.edit-composite-figure.upper .edit-composite-asset.broll-fit-cover,
.edit-composite-figure.lower .edit-composite-asset.broll-fit-cover,
.edit-composite-figure.full .edit-composite-asset.broll-fit-cover {
  object-fit: cover !important;
}

.edit-composite-label {
  position: absolute;
  z-index: 3;
  left: 8px;
  right: 8px;
  bottom: 8px;
  width: fit-content;
  max-width: calc(100% - 16px);
  padding: 4px 7px;
  border-radius: 999px;
  color: #6c4c00;
  background: #ffe172;
  font-size: 11px;
  font-weight: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16);
  pointer-events: none;
}

.edit-composite-figure.long-time .edit-composite-stage {
  outline: 3px solid #f0c541;
  outline-offset: -3px;
}

.edit-composite-none {
  position: absolute;
  inset: auto 10% 18% 10%;
  z-index: 2;
  display: grid;
  place-items: center;
  min-height: 54px;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.84);
  font-size: 12px;
  font-weight: 900;
}

.edit-missing-asset {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 132px;
  border-radius: 8px;
  color: var(--muted);
  background: #f3f7f1;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  padding: 12px;
}

.edit-frame-grid figcaption {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.edit-review-copy {
  display: grid;
  gap: 8px;
}

.edit-review-copy textarea {
  min-height: 116px;
}

.edit-subtitle-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.edit-subtitle-tools span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.edit-subtitle-tools label {
  display: grid;
  grid-template-columns: auto 56px;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.edit-subtitle-tools label span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.edit-subtitle-tools input {
  min-height: 34px;
  height: 34px;
  padding: 0 8px;
}

.edit-subtitle-tools button {
  min-height: 34px;
  padding: 0 10px;
}

.edit-highlight-control {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid #f1d983;
  border-radius: 8px;
  background: #fffbee;
}

.edit-highlight-control > span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #725000;
  font-size: 12px;
  font-weight: 900;
}

.edit-highlight-control input[type="range"] {
  width: 100%;
  accent-color: #e2aa00;
}

.edit-highlight-control p {
  margin: 0;
  padding: 8px;
  border-radius: 7px;
  background: #fff;
  color: #6c6253;
  font-size: 13px;
  line-height: 1.65;
  word-break: break-all;
}

.edit-highlight-control mark {
  padding: 2px 1px;
  border-radius: 4px;
  color: #4c3600;
  background: #ffe36b;
  font-weight: 900;
}

.edit-highlight-row {
  display: grid;
  gap: 6px;
}

.edit-broll-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.edit-broll-actions button {
  min-height: 34px;
  padding: 0 10px;
}

.edit-broll-actions .ai-button {
  color: #fff;
  border-color: #0f766e;
  background: #0f766e;
}

.edit-broll-actions .danger-button {
  color: #8a2a1c;
  border-color: #f0c7ba;
  background: #fff3ef;
}

.output-actions .ai-button {
  color: #fff;
  border-color: #0f766e;
  background: #0f766e;
}

.edit-feedback-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.edit-note-textarea {
  min-height: 70px !important;
  font-size: 13px;
}

.edit-asset-reason {
  padding: 10px;
  border-radius: 8px;
  background: #f8fbf5;
  color: var(--muted);
  line-height: 1.55;
}

.record-toolbar {
  grid-template-columns: minmax(220px, 0.8fr) minmax(240px, 1.2fr);
  margin-bottom: 14px;
}

.daily-card-actions {
  margin-top: 12px;
}

.daily-card-actions .secondary-button {
  width: 100%;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.24);
}

.prompt-surface {
  margin-top: 14px;
}

.aliyun-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
  padding: 18px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.96), rgba(13, 148, 136, 0.88)),
    var(--teal);
  box-shadow: var(--shadow);
}

.aliyun-card::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -70px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: rgba(237, 184, 76, 0.22);
}

.openai-card {
  background:
    linear-gradient(135deg, rgba(23, 33, 43, 0.96), rgba(15, 118, 110, 0.9)),
    var(--ink);
}

.openai-card::after {
  background: rgba(91, 140, 90, 0.28);
}

.aliyun-card > * {
  position: relative;
  z-index: 1;
}

.aliyun-card .eyebrow {
  color: #ffe3a3;
}

.aliyun-card h2 {
  margin: 0;
  font-size: 28px;
}

.aliyun-card p {
  margin: 8px 0 16px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.65;
}

.aliyun-card label span {
  color: rgba(255, 255, 255, 0.86);
}

.record-meta,
.provider-meta {
  color: var(--muted);
  font-size: 13px;
}

.provider-list {
  margin-top: 14px;
}

.material-item {
  gap: 10px;
}

.material-group-label {
  display: inline-flex;
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: #0f766e;
  font-size: 12px;
  font-weight: 700;
}

.material-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.material-tag-row span {
  padding: 4px 7px;
  border-radius: 999px;
  border: 1px solid rgba(220, 228, 213, 0.9);
  color: var(--muted);
  font-size: 12px;
  background: #fbfdf9;
}

.material-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(15, 118, 110, 0.08);
  border: 1px solid rgba(220, 228, 213, 0.9);
}

.material-file-thumb {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 20;
  transform: translateX(-50%);
  width: min(720px, calc(100% - 24px));
  height: 70px;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 4px;
  padding: 7px;
  border: 1px solid rgba(220, 228, 213, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 54px rgba(23, 33, 43, 0.18);
  backdrop-filter: blur(16px);
}

.nav-item {
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
}

.nav-item span {
  font-size: 18px;
  line-height: 1;
}

.nav-item strong {
  font-size: 12px;
}

.nav-item.active {
  color: #fff;
  background: var(--teal);
}

body.public-user [data-view-target="settings"],
body.public-user #view-settings {
  display: none !important;
}

body.public-user .bottom-nav {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

body.access-locked .app {
  pointer-events: none;
  user-select: none;
  filter: blur(5px);
}

.access-gate {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(12, 24, 27, 0.58);
  backdrop-filter: blur(14px);
}

.access-gate[hidden] {
  display: none;
}

.access-card {
  width: min(420px, 100%);
  padding: 22px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 72px rgba(23, 33, 43, 0.28);
}

.access-card h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0;
}

.access-card p:not(.eyebrow) {
  margin: 10px 0 16px;
  color: var(--muted);
  line-height: 1.65;
}

.access-card .primary-button {
  width: 100%;
  margin-top: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  z-index: 30;
  transform: translateX(-50%) translateY(18px);
  width: min(420px, calc(100% - 32px));
  padding: 12px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 980px) {
  .app {
    padding: 14px 14px 96px;
  }

  .workspace-grid,
  .daily-layout,
  .knowledge-layout,
  .edit-layout,
  .digital-layout,
  .showcase-grid,
  .expert-grid,
  .records-list,
  .provider-list,
  .record-toolbar {
    grid-template-columns: 1fr;
  }

  .creator-surface {
    position: static;
  }

  .daily-control {
    position: static;
  }

  .knowledge-editor {
    position: static;
  }

  .edit-uploader,
  .digital-control {
    position: static;
  }

  .edit-review-card {
    grid-template-columns: 1fr;
  }

  .coach-demo-panel {
    grid-template-columns: 1fr;
  }

  .edit-production-panel {
    grid-template-columns: minmax(150px, 0.46fr) minmax(0, 0.54fr);
    align-items: start;
  }

  .edit-cover-preview {
    min-height: 250px;
  }

  .edit-production-fields {
    grid-template-columns: 1fr;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 2px;
  }

  .hero-panel,
  .story-hero {
    min-height: 430px;
  }

  .hero-copy h2,
  .story-hero h2 {
    font-size: 32px;
  }
}

@media (max-width: 640px) {
  .app-header h1 {
    font-size: 19px;
  }

  .hero-panel,
  .story-hero {
    min-height: 470px;
    margin-left: -14px;
    margin-right: -14px;
    border-radius: 0 0 8px 8px;
  }

  .hero-copy,
  .story-hero > div {
    padding: 22px 16px;
  }

  .hero-copy h2,
  .story-hero h2 {
    font-size: 29px;
  }

  .flow-rail {
    grid-template-columns: 1fr;
  }

  .flow-step {
    min-height: 56px;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .flow-step span {
    margin: 0;
  }

  .edit-production-panel {
    grid-template-columns: minmax(136px, 42vw) minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
  }

  .edit-cover-preview {
    min-height: 242px;
  }

  .edit-cover-band {
    padding: 9px 8px;
  }

  .edit-cover-band strong {
    font-size: clamp(18px, 6.8vw, 25px);
  }

  .edit-production-fields {
    max-height: 242px;
    gap: 8px;
  }

  .section-head,
  .daily-head,
  .persona-top {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented {
    width: 100%;
  }

  .form-grid,
  .daily-mini-grid,
  .persona-metrics {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: span 1;
  }

  .quick-actions .primary-button,
  .quick-actions .secondary-button,
  .quick-actions .accent-button,
  .output-actions .primary-button,
  .output-actions .secondary-button {
    flex: 1 1 calc(50% - 10px);
  }

  .output-surface textarea {
    min-height: 360px;
  }

  .expert-picker {
    grid-template-columns: 1fr;
  }

  .option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .asset-head,
  .asset-item {
    align-items: stretch;
    flex-direction: column;
  }

  .edit-hero {
    align-items: stretch;
    flex-direction: column;
  }
}
