:root {
  --paper: #f6f4ec;
  --sheet: #fffcf6;
  --ink: #1a1c16;
  --ink-soft: #4a4d42;
  --muted: #7c7f73;
  --line: #ddd8c8;
  --line-strong: #c9c3b2;
  --lime: #7cc64a;
  --lime-deep: #5aa62e;
  --lime-soft: #e7f6d8;
  --gold: #f0b429;
  --gold-soft: #fff3d0;
  --orange: #e8832c;
  --sage: #3f6f58;
  --sage-soft: #dce8df;
  --feishu: #3370ff;
  --feishu-hot: #245bdb;
  --shadow: 0 16px 36px rgba(48, 72, 36, .08);
  --shadow-lift: 0 22px 48px rgba(48, 72, 36, .12);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI Variable", "Segoe UI", "Microsoft YaHei UI", sans-serif;
}

body {
  background:
    radial-gradient(circle at 88% -8%, rgba(240, 180, 41, .14), transparent 28%),
    radial-gradient(circle at 8% 0%, rgba(124, 198, 74, .12), transparent 30%),
    linear-gradient(180deg, #f8f6ee, var(--paper));
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.88' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.23'/%3E%3C/svg%3E");
}

.kicker {
  margin: 0 0 8px;
  color: var(--lime-deep);
  font: 700 11px/1.2 "Bahnschrift", "Segoe UI", sans-serif;
  letter-spacing: .16em;
}

.primary-button,
.ghost-button,
.secondary-button,
.text-button,
.feishu-button {
  border: 0;
  background: none;
}

.primary-button,
.feishu-button {
  min-height: 54px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 14px;
  font-weight: 700;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.primary-button {
  justify-content: space-between;
  background: var(--lime);
  color: #14300c;
  box-shadow: 0 10px 24px rgba(90, 166, 46, .22);
}

.primary-button:hover {
  background: #88d054;
  transform: translateY(-1px);
}

.primary-button i { font: 28px/1 "Palatino Linotype", "STSong", serif; }
.primary-button:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.feishu-button {
  width: 100%;
  background: var(--feishu);
  color: #fff;
  box-shadow: 0 10px 24px rgba(51, 112, 255, .22);
}

.feishu-button:hover {
  background: var(--feishu-hot);
  transform: translateY(-1px);
}

.feishu-mark {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background:
    linear-gradient(135deg, #5b8cff 0 46%, #3370ff 46%);
  box-shadow: inset -3px -3px 0 #245bdb;
}

.ghost-button,
.secondary-button {
  min-height: 46px;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  padding: 8px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .7);
}

.secondary-button:hover { border-color: var(--lime-deep); color: var(--lime-deep); }

.ghost-button {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  opacity: .55;
  cursor: not-allowed;
}

.ghost-button small { color: var(--muted); font-size: 10px; }

.text-button {
  color: var(--lime-deep);
  font-size: 12px;
  border-bottom: 1px solid rgba(90, 166, 46, .35);
  padding: 0 0 3px;
}

.field { display: flex; flex-direction: column; gap: 8px; }
.field > span { color: var(--ink-soft); font-size: 12px; }
.field.compact { min-width: 160px; }

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

input:focus, select:focus, textarea:focus {
  border-color: #9ed46e;
  box-shadow: 0 0 0 4px rgba(124, 198, 74, .16);
}

input, select { height: 46px; padding: 0 12px; }
input[readonly] {
  background: #eef2e8;
  color: var(--ink-soft);
}
textarea { padding: 12px; resize: vertical; line-height: 1.65; }
.hint { color: var(--muted); font-size: 12px; }

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(520px, 36vw);
  background: var(--paper);
}

.login-stage {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.login-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 38% 42%;
}

.login-wash { display: none; }

.login-copy {
  position: absolute;
  left: 36px;
  bottom: 36px;
  z-index: 2;
  max-width: 28em;
  padding: 22px 26px 20px 28px;
  background: rgba(255, 252, 246, .94);
  border: 1px solid var(--line);
}

.login-copy .scroll-kicker {
  color: var(--lime-deep);
}

.login-copy h1 {
  margin: 10px 0 0;
  color: var(--ink);
  font: 400 clamp(28px, 2.8vw, 40px)/1.3 "STSong", "SimSun", serif;
}

.login-copy .scroll-lead {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font: 400 15px/1.8 "STSong", "SimSun", "Microsoft YaHei UI", serif;
}

.login-rail {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 48px 56px;
  background: var(--sheet);
  border-left: 1px solid var(--line);
  position: relative;
}

.login-rail::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--lime), var(--gold) 55%, var(--orange));
}

.scroll-kicker {
  margin: 0;
  color: var(--lime-deep);
  font: 400 14px/1 "STKaiti", "KaiTi", "STSong", serif;
  letter-spacing: .42em;
}

.login-logo {
  width: 120px;
  height: auto;
}

.login-rail-points {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.login-rail-points li {
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.login-rail-points li:last-child { border-bottom: 1px solid var(--line); }

.login-rail-body { width: 100%; }

.login-rail-main {
  margin-top: 32px;
  padding: 0;
}

.login-rail-main .field { margin-bottom: 12px; }
.form-error {
  margin: 0 0 12px;
  color: #b42318;
  font-size: 13px;
}
.login-rail .scroll-kicker { margin-bottom: 10px; }

.login-rail h2 {
  margin: 0 0 12px;
  font: 400 30px/1.25 "STSong", "SimSun", serif;
}

.login-lead {
  margin: 0 0 28px;
  max-width: 18em;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.8;
}

.password-gate {
  margin-top: 22px;
}
.password-gate summary {
  color: var(--ink-soft);
  font-size: 13px;
  cursor: pointer;
  list-style: none;
}
.password-gate summary::-webkit-details-marker { display: none; }
.password-gate summary::after {
  content: " · 配应用、救急";
  color: var(--muted);
}
.password-gate[open] summary { margin-bottom: 14px; }
.password-gate .secondary-button { margin-top: 4px; }

.login-rail .hint {
  position: absolute;
  left: 48px;
  right: 48px;
  bottom: 28px;
  margin: 0;
}

.app-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 236px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, .78);
  display: flex;
  flex-direction: column;
}

.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 34px; }
.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.brand-copy { display: flex; flex-direction: column; gap: 3px; }
.brand-copy strong { font: 700 14px "Bahnschrift SemiCondensed", sans-serif; }
.brand-copy small { color: var(--muted); font: 10px "Bahnschrift", sans-serif; letter-spacing: .14em; }

.sidebar nav { display: grid; gap: 4px; }
.sidebar nav p {
  margin: 18px 0 6px;
  color: #93a08c;
  font: 11px "Bahnschrift", sans-serif;
  letter-spacing: .16em;
}
.sidebar nav a {
  padding: 11px 12px;
  color: var(--ink-soft);
  font-size: 14px;
  border-radius: 12px;
}
.sidebar nav a.active,
.sidebar nav a:hover {
  background: var(--lime-soft);
  color: var(--lime-deep);
}
.sidebar-foot { margin-top: auto; color: #93a08c; font-size: 11px; }

.workspace { min-width: 0; }
.topbar {
  min-height: 92px;
  padding: 22px 36px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.topbar h1 {
  margin: 0 0 16px;
  font: 400 34px "Palatino Linotype", "STSong", serif;
}
.topbar-meta { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; }
.acting-team {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px 5px 12px;
  border: 1px solid #14300c;
  background: #14300c;
  border-radius: 999px;
  font-size: 11px;
  box-shadow: var(--shadow);
  color: #dff6c8;
}
.acting-team span { color: #b7e08a; font-weight: 700; letter-spacing: .08em; }
.acting-team select {
  width: auto;
  min-width: 148px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 0 8px 0 0;
}
.meta-chip,
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  background: var(--sheet);
  border-radius: 999px;
  font-size: 11px;
  box-shadow: var(--shadow);
}
.status-chip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(124, 198, 74, .18);
}
.status-chip.status-error i {
  background: #c45c26;
  box-shadow: 0 0 0 4px rgba(196, 92, 38, .16);
}

main { padding: 28px 36px 80px; }
.page { animation: rise .45s ease; }
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.stat-card,
.panel {
  background: var(--sheet);
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: var(--shadow);
  border-radius: 22px;
}

.stat-card {
  padding: 20px 18px 16px;
  min-height: 138px;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--lime);
}

.stat-card:nth-child(2)::before { background: var(--gold); }
.stat-card:nth-child(3)::before { background: var(--orange); }
.stat-card:nth-child(4)::before { background: #6e8ca3; }

.stat-card span, .stat-card small { color: var(--muted); font-size: 12px; }
.stat-card b {
  display: block;
  margin: 14px 0;
  font: 400 42px "Bahnschrift Light", "Segoe UI", sans-serif;
  color: var(--ink);
}

.usage-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}
.usage-card {
  padding: 20px 20px 16px;
  border-radius: 22px;
  background: var(--sheet);
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: var(--shadow);
}
.usage-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.usage-card-head h3 {
  margin: 0;
  font: 400 22px "Palatino Linotype", "STSong", serif;
}
.usage-card-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.usage-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.usage-metrics span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.usage-metrics b {
  display: block;
  margin-top: 6px;
  font: 400 22px "Bahnschrift Light", "Segoe UI", sans-serif;
}
.usage-metrics em {
  font-style: normal;
  color: var(--sage);
}
.split-grid, .generate-grid, .settings-grid {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}
.split-grid, .settings-grid { grid-template-columns: 1.1fr .9fr; }
.generate-grid { grid-template-columns: 1.5fr .7fr; }

.panel { padding: 22px; }
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}
.panel-head h2 {
  margin: 0;
  font: 400 24px "Palatino Linotype", "STSong", serif;
}

.take-list, .prompt-list { display: grid; gap: 12px; }
.take-list article {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #f4f8f0;
}
.take-list b, .prompt-list span { display: block; }
.take-list span, .prompt-list p, .archive-row span, .archive-row p {
  color: var(--muted);
  font-size: 12px;
}
.take-list em { color: var(--lime-deep); font-style: normal; font-weight: 700; }
.prompt-list article { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.prompt-list span {
  color: var(--lime-deep);
  font: 11px "Bahnschrift", sans-serif;
  margin-bottom: 6px;
}

.thumb {
  width: 72px;
  height: 46px;
  display: block;
  border-radius: 10px;
  background: #dce8c8 center/cover;
}
.thumb-a { background-image: linear-gradient(135deg, #c8e89a, #7cc64a); }
.thumb-b { background-image: linear-gradient(135deg, #ffe7a3, #f0b429); }
.thumb-c { background-image: linear-gradient(135deg, #ffd0a6, #e8832c); }

.composer { padding: 28px; }
.mode-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.mode-button {
  min-height: 90px;
  border: 1px solid var(--line);
  background: #f8fbf5;
  text-align: left;
  padding: 14px;
  border-radius: 16px;
}
.mode-button.active {
  background: var(--lime-soft);
  border-color: #9ed46e;
  color: var(--lime-deep);
}
.mode-button span { float: right; color: #b4a89a; font-size: 10px; }
.mode-button b { display: block; font: 700 20px "Bahnschrift SemiCondensed", sans-serif; }
.mode-button small { color: var(--muted); font-size: 11px; }

.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 20px 0; }
.parameter-deck { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }

.asset-box {
  margin-top: 8px;
  padding: 14px;
  border: 1px dashed #c3d0bd;
  border-radius: 16px;
  background: #f8fbf5;
}
.section-label { display: flex; justify-content: space-between; color: var(--ink-soft); font-size: 12px; }
.section-label small { color: var(--muted); }
.picker { display: flex; gap: 10px; margin-top: 12px; }
.pick {
  width: 92px;
  padding: 0 0 8px;
  border: 1px solid var(--line);
  background: var(--sheet);
  border-radius: 12px;
}
.pick i { width: 100%; height: 58px; border-radius: 12px 12px 0 0; }
.pick span { display: block; margin-top: 6px; font-size: 10px; color: var(--muted); }
.pick.is-selected { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(124, 198, 74, .16); }
.pick.add { min-height: 84px; color: var(--lime-deep); }

.submit-strip {
  display: grid;
  grid-template-columns: 1fr .8fr;
  gap: 12px;
  align-items: center;
}
.cost-estimate {
  padding: 14px 16px;
  background: #fff3c4;
  border: 1px solid #e0b84a;
  border-radius: 16px;
}
.cost-estimate .cost-label {
  color: var(--ink-soft);
  font-size: 12px;
}
.cost-estimate .cost-value {
  display: block;
  margin: 4px 0 2px;
  color: #1a1c16;
  font: 700 32px/1.1 "Bahnschrift", "Segoe UI", sans-serif;
}
.cost-estimate .cost-value b {
  font: inherit;
  color: inherit;
}
.cost-estimate .cost-formula {
  color: var(--ink-soft);
  font-size: 12px;
}

.job-card {
  padding: 14px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  background: #f8fbf5;
  border-radius: 16px;
}
.job-top, .job-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.job-meta { color: var(--muted); margin: 8px 0; font-size: 11px; }
.progress-track { height: 4px; background: #e4eedc; border-radius: 99px; overflow: hidden; }
.progress-track i { display: block; height: 100%; background: var(--lime); width: 8%; }
.progress-track i.is-p20 { width: 20%; }
.progress-track i.is-p40 { width: 40%; }
.progress-track i.is-mid,
.progress-track i.is-p50 { width: 50%; }
.progress-track i.is-p60 { width: 60%; }
.progress-track i.is-p80 { width: 80%; }
.progress-track i.is-p96 { width: 96%; }
.progress-track i.is-full { width: 100%; background: var(--sage); }
.job-card.is-active { box-shadow: inset 3px 0 0 var(--lime); }
.job-card.is-complete { box-shadow: inset 3px 0 0 var(--sage); }
.job-card.is-failed { box-shadow: inset 3px 0 0 #c45c26; }
.job-error { margin: 8px 0 0; color: #b42318; font-size: 12px; }
.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 13px;
}
.check-line input {
  width: 16px;
  height: 16px;
  padding: 0;
}
.file-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.file-pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef5e6;
  color: var(--ink-soft);
  font-size: 11px;
}
.picker { flex-wrap: wrap; }
.pick img,
.asset-card img.thumb,
.take-list img.thumb {
  width: 100%;
  object-fit: cover;
}
.pick img { height: 58px; border-radius: 12px 12px 0 0; }
.asset-box .pick.add {
  margin-top: 12px;
  width: 92px;
  min-height: 84px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.empty-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  padding: 8px 2px 4px;
}
.library-board .empty-note,
.prompt-board .empty-note { grid-column: 1 / -1; }
.take-list article { cursor: pointer; }
.badge.fail { color: #8a2c16; background: #f8e4dc; }
.autosave {
  color: var(--sage);
  background: var(--sage-soft);
  padding: 6px 10px;
  font-size: 11px;
  border-radius: 999px;
}

.tab-bar, .filter-bar {
  display: flex;
  gap: 10px;
  align-items: end;
  margin-bottom: 18px;
}
.tab {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: var(--sheet);
  border-radius: 999px;
}
.tab.active {
  background: var(--lime);
  border-color: var(--lime);
  color: #14300c;
}

.library-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.asset-card, .add-card {
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--sheet);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.asset-card .thumb { width: 100%; height: 132px; }
.asset-card b { display: block; margin: 10px 0 4px; font-size: 13px; }
.asset-card span { color: var(--muted); font-size: 11px; }
.asset-card.is-selected { box-shadow: 0 0 0 3px rgba(124, 198, 74, .16); border-color: #9ed46e; }
.add-card {
  min-height: 196px;
  display: grid;
  place-items: center;
  color: var(--lime-deep);
  text-align: center;
  background: repeating-linear-gradient(135deg, #fff, #fff 10px, #f3f8ee 10px, #f3f8ee 20px);
}

.prompt-board { display: grid; gap: 12px; }
.prompt-card, .archive-row {
  padding: 16px 18px;
  border: 1px solid var(--line);
  background: var(--sheet);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.prompt-card span { color: var(--lime-deep); font-size: 11px; }
.prompt-card p, .settings-copy { color: var(--ink-soft); line-height: 1.7; font-size: 14px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.row-actions button {
  border: 0;
  border-bottom: 1px solid rgba(90, 166, 46, .35);
  background: none;
  color: var(--lime-deep);
  font-size: 12px;
  padding: 0 0 3px;
}

.archive-row {
  display: grid;
  grid-template-columns: 90px 180px 50px 1fr 80px auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 10px;
}
.archive-row time { color: var(--muted); font-size: 11px; }
.archive-row em { color: var(--lime-deep); font-style: normal; font-size: 12px; font-weight: 700; }
.badge {
  padding: 4px 8px;
  font-size: 11px;
  width: fit-content;
  border-radius: 999px;
}
.badge.done { color: var(--sage); background: var(--sage-soft); }
.badge.run { color: #8a5a10; background: var(--gold-soft); }
.admin-lead {
  margin-bottom: 22px;
  padding: 22px 24px 20px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(20, 48, 12, .94), rgba(63, 111, 88, .88));
  color: #f4f8f0;
  box-shadow: var(--shadow);
}
.admin-lead .kicker { color: #b7e08a; }
.admin-lead h2 {
  margin: 0 0 8px;
  font: 400 28px "Palatino Linotype", "STSong", serif;
}
.admin-lead p:last-child {
  margin: 0;
  max-width: 46em;
  color: rgba(244, 248, 240, .82);
  font-size: 14px;
  line-height: 1.7;
}
.admin-layout {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 16px;
}
.admin-card { margin: 0; }
.admin-card .settings-copy { margin: 0 0 16px; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }
.admin-card .field { margin-top: 12px; }
.admin-card .two-columns { margin: 0 0 12px; }
.admin-card-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}
.admin-card-foot .hint { margin: 0; }
.admin-section { margin-top: 28px; }
.admin-section > .panel-head { margin-bottom: 14px; }
.admin-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.team-card {
  margin: 0;
  padding: 22px;
  border-radius: 22px;
  background: var(--sheet);
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: var(--shadow);
}
.team-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.team-card-head h2 {
  margin: 0;
  font: 400 24px "Palatino Linotype", "STSong", serif;
}
.key-pill {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #f4efe2;
  color: var(--muted);
}
.key-pill.is-on { background: var(--lime-soft); color: var(--sage); }
.team-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.team-path { margin: 14px 0 0; color: var(--muted); font-size: 12px; word-break: break-all; }
.team-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.people-form {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 12px;
  margin-bottom: 14px;
}
.member-list { margin-top: 18px; }
.member-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 168px 72px auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.member-row b { font-weight: 700; }
.member-row span { color: var(--ink-soft); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.member-row select { height: 38px; }
.member-bind { color: var(--sage); font-size: 12px; font-weight: 700; }
.member-bind.is-wait { color: var(--muted); font-weight: 400; }
.admin-password { margin-top: 16px; }
.admin-password .secondary-button { margin-top: 8px; }
#saveTeamName { margin-top: 14px; }
.key-line { margin-top: 18px; padding: 14px; background: #f4f8f0; border-radius: 14px; }
.key-line span, .key-line small { color: var(--muted); font-size: 12px; }
.key-line strong { display: block; color: var(--sage); margin: 6px 0; }

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  max-width: 360px;
  padding: 12px 14px;
  border-left: 4px solid var(--lime);
  background: var(--sheet);
  color: var(--ink);
  border-radius: 12px;
  box-shadow: var(--shadow-lift);
  font-size: 13px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: .2s;
}
.toast.show { opacity: 1; transform: none; }
.toast.error { border-left-color: #c45c26; }

.sheet-dialog {
  width: min(760px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px 22px 22px;
  background: var(--sheet);
  box-shadow: var(--shadow-lift);
}
.sheet-dialog::backdrop { background: rgba(26, 28, 22, .28); }
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.dialog-head h2 {
  margin: 0;
  font: 400 22px "Palatino Linotype", "STSong", serif;
}
.sheet-dialog video {
  width: 100%;
  max-height: 56vh;
  background: #111;
  border-radius: 12px;
}
.sheet-dialog .secondary-button {
  display: inline-flex;
  margin-top: 14px;
  text-decoration: none;
}
.detail-pre {
  margin: 0;
  max-height: 56vh;
  overflow: auto;
  padding: 14px;
  border-radius: 12px;
  background: #f4f8f0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
}

@media (max-width: 1100px) {
  .login-screen, .app-screen, .stat-grid, .split-grid, .generate-grid, .settings-grid, .library-board,
  .admin-layout, .admin-board, .people-form, .team-card-grid, .usage-board, .usage-metrics {
    grid-template-columns: 1fr;
  }
  .member-row { grid-template-columns: 1fr 1fr; }
  .login-screen { grid-template-columns: 1fr; }
  .login-stage { min-height: 58vh; }
  .login-copy { padding: 28px 24px; }
  .login-rail { min-height: auto; justify-content: flex-start; padding: 36px 32px 48px; }
  .login-rail .hint { position: static; margin-top: 28px; }
  .sidebar { height: auto; position: relative; }
  .archive-row { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
