/* 管理工作台：清晰的卡片与留白，窄屏重排；不依赖外部字体或资源。 */
:root {
  font-family: Inter, "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  color: #233330;
  background: #f7f9fb;
  font-synthesis: none;
  --accent: #0076bc;
  --line: #e5ebe9;
  --muted: #82918c;
  --ink: #213b33;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.45;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #9bccbd;
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #83b5a6;
  border-color: transparent;
}
a {
  color: inherit;
  text-decoration: none;
}
[hidden] {
  display: none !important;
}
h1,
h2,
p {
  margin: 0;
}
h2 {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.4px;
}
.muted {
  color: #758680;
  font-size: 13px;
  line-height: 1.7;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px;
  font-weight: 650;
  color: #8a9b93;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: 1px;
}
.brand small {
  display: block;
  font-weight: 400;
  letter-spacing: 1.5px;
  font-size: 10px;
  color: #94a99e;
  margin-top: 5px;
}
.workspace {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 218px;
  position: fixed;
  inset: 0 auto 0 0;
  background: #fff;
  color: #24364a;
  border-right: 1px solid #e1e8ef;
  padding: 32px 23px;
  display: flex;
  flex-direction: column;
}
.nav-label {
  font-size: 10px;
  letter-spacing: 2px;
  color: #8fa99c;
  margin: 55px 14px 17px;
}
.nav-item {
  background: none;
  border: 0;
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 11px;
  color: #485a6c;
  font-size: 13px;
  text-align: left;
  margin-bottom: 7px;
  transition:
    background 0.15s,
    color 0.15s;
}
.nav-item:hover {
  background: #f2f7fb;
  color: #153956;
}
.nav-item.active {
  color: #005e96;
  background: #e8f5fd;
}
.nav-icon {
  width: 16px;
  font-size: 18px;
  color: #56768d;
  line-height: 1;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 35px 10px 0;
}
.mobile-logout {
  display: none;
}
.environment {
  font-size: 10px;
  color: #aac0b2;
  display: flex;
  align-items: center;
  gap: 9px;
}
.environment i,
.pill i {
  width: 5px;
  height: 5px;
  background: #84c8a8;
  border-radius: 50%;
}
.signout {
  background: none;
  border: 0;
  color: #566a7a;
  width: 100%;
  text-align: left;
  font-size: 12px;
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  padding: 0;
}
.signout:hover {
  color: #006eab;
}
main {
  margin-left: 218px;
  padding: 45px 5.8vw 130px;
  width: calc(100% - 218px);
  max-width: 1600px;
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 31px;
  gap: 16px;
}
.breadcrumb {
  color: #82928c;
  font-size: 11px;
  margin-bottom: 20px;
}
.breadcrumb span {
  margin: 0 10px;
  color: #c3ccc7;
}
.page-header h1 {
  font-size: 29px;
  font-weight: 650;
  letter-spacing: -1px;
  margin-bottom: 10px;
}
.page-header p {
  color: #7b8982;
  font-size: 13px;
}
.button,
button.primary,
button.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 19px;
  min-height: 42px;
  padding: 0 20px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
}
.secondary {
  border: 1px solid #dce5e0;
  background: white;
  color: #465e52;
}
.secondary:hover {
  border-color: #9cb6a7;
}
.primary {
  border: 1px solid transparent;
  background: var(--accent);
  color: white;
  box-shadow: 0 3px 6px #103b2b0b;
}
.primary:hover:enabled {
  background: #005d98;
}
.model-strip {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 22px 26px;
  gap: 16px;
  margin-bottom: 23px;
}
.model-avatar {
  height: 44px;
  width: 44px;
  border-radius: 13px;
  background: #eef4fb;
  color: #527fa3;
  font-size: 26px;
  font-weight: 750;
  display: grid;
  place-items: center;
  font-style: italic;
}
.model-strip h2 {
  font-size: 16px;
  letter-spacing: 0;
  margin-top: 5px;
}
.model-strip .eyebrow {
  font-size: 9px;
  letter-spacing: 1px;
}
.model-tags {
  margin-left: auto;
  display: flex;
  gap: 9px;
}
.pill {
  font-size: 10px;
  border: 1px solid #d9eae2;
  background: #f3f9f5;
  color: #537c65;
  padding: 6px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.pill.neutral {
  background: #f6f7f6;
  border-color: #e8ece8;
  color: #79897e;
}
.card-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 23px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 29px;
  box-shadow: 0 4px 12px #223d3003;
}
.card-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 13px;
}
.card-kicker {
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 2.1px;
  color: #9aa8a0;
  display: block;
  margin-bottom: 10px;
}
.icon-tile {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: #eaf5ed;
  color: #61a17d;
  font-size: 22px;
}
.icon-tile.lavender {
  color: #a29cbe;
  background: #f2f0f7;
}
.value-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 31px 0 21px;
}
.big-value,
.big-input {
  font-size: 46px;
  line-height: 1.1;
  letter-spacing: -2px;
  font-weight: 500;
  color: #274a3c;
  font-variant-numeric: tabular-nums;
}
.value-row > span:last-child:not(.big-value) {
  font-size: 9px;
  font-weight: 550;
  letter-spacing: 1.4px;
  color: #94a099;
}
.big-input {
  border: 0;
  background: transparent;
  width: 160px;
  padding: 0;
  appearance: textfield;
}
.big-input::-webkit-inner-spin-button {
  opacity: 0;
}
.range {
  width: 100%;
  height: 5px;
  border: 0;
  border-radius: 3px;
  appearance: none;
  accent-color: var(--accent);
  background: #dcebe3;
  cursor: pointer;
  margin: 14px 0;
}
.range::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: #207a61;
  box-shadow:
    0 0 0 1px #7eac98,
    0 2px 4px #1a4b2c26;
}
.range-labels {
  display: flex;
  justify-content: space-between;
  color: #97a49b;
  font-size: 10px;
  margin-top: 8px;
}
.presets {
  display: flex;
  gap: 8px;
  margin-top: 24px;
}
.presets button {
  flex: 1;
  background: #f8faf8;
  border: 1px solid #e8eee9;
  padding: 9px 6px;
  border-radius: 8px;
  font-size: 10px;
  color: #798b7d;
  white-space: nowrap;
}
.presets button b {
  font-weight: 550;
  margin-left: 6px;
  color: #526e5c;
}
.presets button.active {
  background: #eff7f1;
  border-color: #9ec3ad;
  color: #397653;
}
.advanced {
  border-top: 1px solid #edf1ee;
  padding-top: 19px;
  margin-top: 24px;
}
.advanced summary {
  cursor: pointer;
  color: #7c8d81;
  font-size: 11px;
  list-style: none;
}
.advanced summary::after {
  content: "＋";
  float: right;
  color: #9eafa3;
}
.advanced[open] summary::after {
  content: "−";
}
.advanced-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  gap: 15px;
  font-size: 11px;
  color: #6a7c6e;
}
.advanced-row input,
.advanced-row select,
.number-unit input {
  width: 100px;
  padding: 8px 10px;
  border: 1px solid #e0e8e1;
  border-radius: 7px;
  background: #fff;
  color: #415e48;
  font-size: 12px;
}
.budget-meter {
  height: 6px;
  background: #f1eff5;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 25px;
}
.budget-meter span {
  height: 100%;
  display: block;
  width: 100%;
  background: #b7adcf;
  border-radius: 6px;
}
.compact-setting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 33px;
  padding-top: 21px;
  border-top: 1px solid #edf0ec;
}
.compact-setting label {
  font-size: 12px;
  color: #4d6556;
}
.compact-setting small {
  display: block;
  margin-top: 8px;
  font-size: 10px;
  color: #9aa69c;
}
.number-unit {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #91a18f;
}
.number-unit input {
  width: 78px;
}
.quiet-note {
  font-size: 10px;
  color: #97a297;
  margin-top: 25px;
  line-height: 1.6;
}
.quiet-note span {
  margin-right: 5px;
}
.next-link {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #7f9486;
  font-size: 11px;
  border: 0;
  background: none;
  padding: 0;
  margin: 25px 2px;
}
.next-link:hover {
  color: var(--accent);
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.editor-card + .editor-card {
  margin-top: 23px;
}
.editor-card textarea {
  resize: vertical;
  min-height: 102px;
  width: 100%;
  border: 1px solid #e0e8e2;
  border-radius: 10px;
  padding: 17px 19px;
  color: #42594b;
  font-size: 13px;
  line-height: 1.9;
  background: #fcfdfc;
  margin-top: 20px;
  transition: border-color 0.15s;
}
.editor-card textarea:hover {
  border-color: #bacdc0;
}
.character-count {
  font-size: 10px;
  color: #a1aca2;
  font-variant-numeric: tabular-nums;
}
.save-bar {
  position: fixed;
  bottom: 0;
  left: 218px;
  right: 0;
  border-top: 1px solid #e5ebe6;
  background: #ffffffed;
  backdrop-filter: blur(16px);
  padding: 18px 5.8vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 5;
}
.save-state {
  display: flex;
  align-items: center;
  gap: 13px;
}
.save-dot {
  background: #a4c9b0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.save-dot.dirty {
  background: #d2ac6f;
}
.save-state strong {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #6e8373;
}
.save-state small {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  color: #a6b0a7;
}
.save-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}
.text-button {
  border: 0;
  background: none;
  padding: 5px 0;
  color: #8a9b8d;
  font-size: 11px;
}
.text-button:hover {
  color: #326a4a;
}
.notice {
  padding: 13px 18px;
  font-size: 12px;
  line-height: 1.7;
  background: #fff5e8;
  color: #956b34;
  border: 1px solid #f0dec3;
  border-radius: 9px;
  margin-bottom: 20px;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}
.notice button {
  border: 0;
  background: none;
  color: #976733;
  font-size: 11px;
  text-decoration: underline;
  white-space: nowrap;
}
.history-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.history-row {
  display: flex;
  align-items: center;
  gap: 19px;
  padding: 23px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  margin-bottom: 12px;
}
.version-number {
  height: 40px;
  width: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: #f0f5f0;
  font-size: 12px;
  font-weight: 600;
  color: #6c8f76;
  flex-shrink: 0;
}
.history-meta {
  flex: 1;
  min-width: 0;
}
.history-meta strong {
  font-size: 12px;
  font-weight: 500;
  color: #536958;
}
.history-meta p {
  font-size: 11px;
  line-height: 1.6;
  color: #9aa79c;
  margin-top: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.history-row button {
  background: none;
  border: 1px solid #e2eae3;
  padding: 7px 13px;
  border-radius: 7px;
  font-size: 11px;
  color: #718b77;
}
.empty {
  padding: 70px 20px;
  border: 1px dashed #dce6dd;
  border-radius: 14px;
  text-align: center;
  font-size: 12px;
  color: #97a79b;
  background: #fbfcfb;
}
.error-text {
  color: #a76e59;
  font-size: 11px;
  margin-top: 14px;
  line-height: 1.8;
}
.toast {
  position: fixed;
  bottom: 102px;
  left: calc(50% + 109px);
  transform: translateX(-50%);
  background: #244c3a;
  color: #f6fbf7;
  padding: 13px 22px;
  border-radius: 10px;
  font-size: 12px;
  box-shadow: 0 10px 35px #1c3b3220;
  z-index: 30;
}
dialog {
  border: 1px solid #dee7df;
  border-radius: 17px;
  padding: 29px;
  width: min(560px, calc(100vw - 32px));
  max-height: 85vh;
  color: #405c46;
  box-shadow: 0 18px 90px #102d2930;
}
dialog::backdrop {
  background: #0d29284d;
  backdrop-filter: blur(3px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.dialog-heading h2 {
  margin-top: 8px;
}
.close-button {
  border: 0;
  background: #f4f7f3;
  border-radius: 8px;
  width: 30px;
  height: 30px;
  font-size: 21px;
  color: #7c8e7c;
}
.dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}
#version-detail {
  margin-top: 18px;
  max-height: 40vh;
  overflow: auto;
}
#version-detail h3 {
  font-size: 11px;
  font-weight: 500;
  color: #91a48e;
  margin: 17px 0 9px;
}
#version-detail p {
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.9;
  background: #f8faf6;
  border-radius: 8px;
  padding: 13px 16px;
  overflow-wrap: anywhere;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (min-width: 1500px) {
  main {
    padding-left: 80px;
    padding-right: 80px;
  }
  .save-bar {
    padding-right: 80px;
    padding-left: 80px;
  }
}
@media (max-width: 1100px) {
  main {
    padding-left: 32px;
    padding-right: 32px;
  }
  .save-bar {
    padding-left: 32px;
    padding-right: 32px;
  }
  .sidebar {
    width: 190px;
    padding-left: 18px;
    padding-right: 18px;
  }
  main {
    margin-left: 190px;
    width: calc(100% - 190px);
  }
  .save-bar {
    left: 190px;
  }
  .card {
    padding: 24px;
  }
  .card-grid {
    gap: 16px;
  }
  .presets {
    gap: 5px;
  }
  .presets button b {
    margin-left: 3px;
  }
  .toast {
    left: calc(50% + 95px);
  }
}
@media (max-width: 860px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
  .sidebar {
    width: 175px;
    padding-left: 13px;
    padding-right: 13px;
  }
  .brand {
    font-size: 15px;
    gap: 9px;
  }
  .nav-item {
    padding-left: 13px;
  }
  main {
    margin-left: 175px;
    width: calc(100% - 175px);
    padding: 33px 24px 125px;
  }
  .save-bar {
    left: 175px;
    padding: 16px 24px;
  }
  .page-header {
    align-items: flex-start;
  }
  .page-header h1 {
    font-size: 25px;
  }
  .page-header .button {
    padding: 0 13px;
    font-size: 11px;
    gap: 8px;
    margin-top: 3px;
  }
  .model-strip {
    padding: 18px;
    gap: 12px;
  }
  .model-tags {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 110px;
  }
  .model-strip h2 {
    font-size: 14px;
  }
  .toast {
    left: calc(50% + 87px);
  }
}
@media (max-width: 600px) {
  .mobile-logout {
    display: block;
    position: absolute;
    right: 22px;
    top: 26px;
    border: 0;
    background: none;
    color: #40647a;
    font-size: 11px;
    padding: 0;
  }
  .workspace {
    display: block;
  }
  .sidebar {
    position: relative;
    width: 100%;
    padding: 18px 20px 10px;
    background: #fff;
  }
  .brand {
    font-size: 16px;
  }
  .brand small {
    display: none;
  }
  .nav-label,
  .sidebar-bottom {
    display: none;
  }
  nav {
    display: flex;
    gap: 5px;
    margin-top: 20px;
  }
  .nav-item {
    justify-content: center;
    margin: 0;
    padding: 12px 8px;
    font-size: 12px;
    gap: 7px;
  }
  .nav-icon {
    font-size: 15px;
    width: 13px;
  }
  main {
    margin: 0;
    width: 100%;
    padding: 27px 18px 120px;
  }
  .breadcrumb {
    display: none;
  }
  .page-header {
    margin-bottom: 23px;
  }
  .page-header h1 {
    font-size: 24px;
  }
  .page-header p {
    font-size: 11px;
  }
  .page-header .button {
    font-size: 10px;
    min-height: 35px;
    padding: 0 10px;
  }
  .model-strip {
    padding: 16px;
    margin-bottom: 16px;
  }
  .model-tags {
    max-width: 104px;
    gap: 5px;
  }
  .pill {
    font-size: 9px;
    padding: 5px 7px;
  }
  .model-avatar {
    height: 35px;
    width: 35px;
    font-size: 22px;
  }
  .card {
    padding: 24px;
    border-radius: 13px;
  }
  .card-grid {
    gap: 16px;
  }
  .save-bar {
    left: 0;
    padding: 16px 19px;
  }
  .save-actions {
    gap: 12px;
  }
  .save-actions .primary {
    padding: 0 15px;
    font-size: 11px;
    gap: 10px;
  }
  .save-state strong {
    font-size: 10px;
  }
  .save-state small {
    font-size: 9px;
  }
  .save-state {
    gap: 8px;
  }
  .save-actions .text-button {
    font-size: 10px;
  }
  .toast {
    left: 50%;
    max-width: 90%;
    width: max-content;
    text-align: center;
    bottom: 98px;
  }
  .history-row {
    padding: 17px;
    gap: 12px;
  }
  .history-heading {
    gap: 10px;
  }
  .history-heading .muted {
    font-size: 11px;
  }
  .character-count {
    font-size: 9px;
  }
  .editor-card textarea {
    padding: 13px;
    font-size: 12px;
  }
  .notice {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* 原则和资料使用短卡片，字段内容按需编辑。 */
.catalog-heading,
.catalog-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.catalog-heading {
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.catalog-heading h2 {
  margin: 8px 0;
}
.catalog-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 20px;
}
.catalog-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
}
.catalog-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}
.catalog-field textarea {
  width: 100%;
  resize: vertical;
  min-height: 92px;
}
.catalog-field input,
.catalog-field select {
  width: 100%;
  min-width: 0;
}
.catalog-toggle {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 13px;
}
.catalog-toggle input {
  width: 16px;
  height: 16px;
}
.catalog-field input,
.catalog-field select,
.catalog-field textarea {
  box-sizing: border-box;
  border: 1px solid #dce6e0;
  border-radius: 10px;
  background: #f8fbf9;
  color: #233e33;
  font: inherit;
  font-size: 13px;
  line-height: 1.7;
  padding: 10px 12px;
}
.catalog-field input:focus,
.catalog-field select:focus,
.catalog-field textarea:focus {
  outline: 2px solid #9fcebc;
  outline-offset: 2px;
  background: #fff;
}
.strict-tag {
  color: #944620;
  background: #fff0e5;
  border-color: #f5d7bd;
}
/* 统一操作条与可折叠规则保持紧凑；完整正文只在管理员展开后出现。 */
.control-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  margin-bottom: 24px;
  background: #fff;
  border: 1px solid #e5e9ee;
  border-radius: 14px;
}
.control-status,
.control-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.stop-button {
  border-color: #e9c8c5;
  color: #9b3f37;
}
.pill.paused {
  color: #a14336;
  background: #fff0eb;
}
.skill-card summary,
.expression-card summary {
  cursor: pointer;
  font-weight: 600;
  color: #243b42;
}
.skill-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: inherit;
  line-height: 1.8;
  font-size: 14px;
  color: #43555e;
  margin: 20px 0 0;
}
.expression-card .catalog-field:first-of-type {
  margin-top: 20px;
}
@media (max-width: 700px) {
  .control-strip {
    padding: 12px;
  }
  .control-actions {
    width: 100%;
  }
  .control-actions .button {
    font-size: 12px;
    padding: 8px 10px;
  }
}
/* 登录页共用原版字标。包装盒仅裁去原稿白边，不改变标识比例。 */
.company-logo {
  display: inline-block;
  width: 99px;
  aspect-ratio: 2.8;
  overflow: hidden;
  flex: none;
}
.company-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 49%;
  transform: scale(1.43);
}
.brand-divider { width: 1px; height: 19px; background: #dce2e8; flex: none; }
.sidebar .company-logo { width: 73px; }
.sidebar .brand { font-size: 13px; gap: 10px; white-space: nowrap; }
.nav-label, .environment { color: #596e7c; }

.entry {
  min-height: 100vh;
  min-height: 100svh;
  background: white;
  color: #14273a;
  display: flex;
  flex-direction: column;
}
.entry-header {
  margin: 0 clamp(22px, 5vw, 90px);
  height: 84px;
  flex: none;
  border-bottom: 1px solid #e5ebef;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.entry-brand, .entry-link { display: inline-flex; align-items: center; }
.entry-brand { gap: 18px; font-size: 14px; font-weight: 600; }
.entry-link { gap: 9px; color: #36536b; font-size: 13px; min-height: 44px; }
.entry-link:hover { color: #0076bc; text-decoration: underline; }
.entry-link span { font-size: 17px; }
.entry-content {
  flex: 1;
  width: min(1180px, 90%);
  margin: auto;
  padding: clamp(32px, 6vh, 74px) 0;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(284px, .83fr);
  align-items: center;
  gap: clamp(42px, 7vw, 112px);
}
.entry-form { width: min(100%, 365px); justify-self: center; }
.entry-form h1 {
  font-size: clamp(32px, 3.5vw, 48px);
  font-weight: 720;
  line-height: 1.17;
  letter-spacing: -.06em;
}
.entry-intro { margin: 14px 0 35px; color: #586a7a; font-size: 14px; line-height: 1.7; }
.entry-form label { display: block; margin: 21px 0 9px; font-size: 13px; font-weight: 600; }
.entry-form input {
  width: 100%; height: 50px; padding: 0 15px;
  color: #14273a; border: 1px solid #cbd6df; border-radius: 9px; background: #fff;
  font-size: 15px;
}
.entry-form input::placeholder { color: #748391; }
.entry-form input:focus { outline: 2px solid #1686c5; outline-offset: 2px; }
.entry-submit {
  width: 100%; min-height: 51px; margin-top: 28px; padding: 0 19px;
  border: 0; border-radius: 9px; background: #006eae; color: white;
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 650; font-size: 15px;
}
.entry-submit:hover:enabled { background: #00588e; }
.entry-submit span { font-size: 22px; font-weight: 400; }
.entry-form .error-text { font-size: 13px; color: #a2352d; }
.entry :focus-visible { outline-color: #0076bc; }

/* 一张手绘图集承载三个独立角色。乘色使纸张底色融入浅色背景。 */
.mascot-scene {
  position: relative; isolation: isolate; overflow: hidden;
  aspect-ratio: 1.17; width: 100%; border-radius: 32px;
  background: radial-gradient(ellipse at 38% 64%, #e9f5ff 0, #f4faff 48%, #fbfdff 77%, white 99%);
}
.mascot-scene::before {
  content: ""; position: absolute; inset: 0; opacity: .55;
  background-image: radial-gradient(#accbe0 1px, transparent 1px);
  background-size: 17px 17px;
  mask-image: radial-gradient(ellipse, black 18%, transparent 73%);
}
.mascot-group { position: absolute; inset: 3%; mix-blend-mode: multiply; }
.mascot {
  position: absolute; display: block; mix-blend-mode: multiply;
  background-image: url('/admin/assets/mascots.webp'); background-repeat: no-repeat;
}
.whale {
  width: 62%; aspect-ratio: 493/470; left: 6%; top: 19%;
  background-size: 150.1% auto; background-position: left 25%;

}
.claude {
  width: 19%; aspect-ratio: 215/219; left: 65%; top: 13%;
  background-size: 344.2% auto; background-position: 99% 6%;

}
.openai {
  width: 20%; aspect-ratio: 215/222; left: 74%; top: 58%;
  background-size: 344.2% auto; background-position: 98% 94%;

}
.bubble { position: absolute; border: 2px solid #a5d5e8; border-radius: 48% 53% 45% 50%; }
.bubble-one { width: 12px; height: 13px; left: 18%; top: 23%; }
.bubble-two { width: 6px; height: 6px; left: 21%; top: 18%; background: #ffce4a; border: 0; }
.bubble-three { width: 9px; height: 9px; left: 68%; top: 84%; }
@media (max-width: 720px) {
  .entry-header { height: 69px; margin: 0 22px; }
  .entry-brand { gap: 11px; font-size: 13px; }
  .entry-header .company-logo { width: 78px; }
  .entry-content { width: min(100% - 44px, 440px); display: flex; flex-direction: column;
    justify-content: center; gap: 26px; padding: 20px 0 36px; }
  .entry-form { width: 100%; }
  .entry-intro { margin: 10px 0 22px; }
  .mascot-scene { width: 100%; aspect-ratio: 1.95; border-radius: 18px; }
  .mascot-group { inset: -3% 13% 0; }
  .entry-form input { font-size: 16px; }
}
@media (max-width: 600px) {
  .workspace nav { overflow-x: auto; }
  .workspace .nav-item { flex: none; width: auto; white-space: nowrap; }
}
.companion-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.mascot-scene.rendered .mascot-group { visibility: hidden; }
.motion-toggle {
  display: none; position: absolute; top: 12px; right: 12px; align-items: center;
  gap: 7px; min-height: 35px; padding: 0 13px; border: 1px solid #d3e0e9;
  border-radius: 24px; color: #42617a; background: #fff; font-size: 12px;
}
.mascot-scene.rendered .motion-toggle { display: inline-flex; }
.motion-toggle:hover { color: #005d98; border-color: #83b9d6; }

@media (max-width: 720px) and (max-height: 620px) {
  .entry-form { order: -1; }
}
/* 工作台按任务导航，表单按行排列，聊天保留独立布局和滚动位置。 */
.workspace .sidebar nav { margin-top: 36px; }
.work-main { max-width: 1320px; padding-bottom: 40px; }
.work-main > h1 { margin: 0 0 25px; font-size: clamp(23px, 3vw, 32px); }
.work-main iframe { display: block; width:100%; height:calc(100dvh - 145px); min-height:380px; border:0; border-radius:12px; background:white; }
.work-main .settings-sheet,.work-details,.work-main #skill-content { padding: 10px 22px; background:white; border:1px solid #e0e8ee; border-radius:12px; }
.setting-row { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:15px 0; border-bottom:1px solid #edf1f4; font-size:15px; }
.setting-row:last-child { border:0; }
.sampling-choice { display:flex; flex-wrap:wrap; gap:8px; margin:16px 0 4px; padding:0; border:0; }
.sampling-choice legend { margin-bottom:10px; font-weight:600; }
.sampling-choice small { color:#556875; font-weight:400; }
.sampling-choice label { display:inline-flex; align-items:center; gap:7px; padding:7px 12px; border:1px solid #b7c8d2; border-radius:8px; cursor:pointer; }
.sampling-choice label:has(:checked) { color:#005d89; background:#e9f6fc; border-color:#2386ae; }
.sampling-choice input { width:16px; height:16px; margin:0; accent-color:#0075a5; }
.parameter-label { position:relative; display:inline-flex; align-items:center; gap:6px; }
.parameter-help { display:grid; place-items:center; width:24px; height:24px; padding:0; background:white; border:1px solid #aabecb; border-radius:50%; color:#36566a; font-size:13px; cursor:help; }
.parameter-label [role="tooltip"] { display:none; position:absolute; z-index:5; top:100%; left:0; width:min(270px, calc(100vw - 76px)); box-sizing:border-box; padding:10px 14px; border-radius:8px; background:#21394b; color:white; box-shadow:0 4px 14px #19394d26; font-size:14px; font-weight:400; line-height:1.6; }
.parameter-label[data-help-open] [role="tooltip"] { display:block; }
.setting-row input,.setting-row select { border:1px solid #bdccd6; border-radius:6px; padding:8px 10px; width:118px; background:white;color:inherit;font-size:15px; }
.work-actions,.work-save { display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin:18px 0; }
.work-save { justify-content:flex-end; }
.work-save span { margin-right:auto; color:#516773; }
.work-details { margin:14px 0; padding:16px; }
.work-details summary { cursor:pointer; font-weight:600; }
.work-details .catalog-list { margin:16px 0; }
.work-details .empty { padding:16px; text-align:left; }
.work-main #skill-content { margin:18px 0; padding:20px; font-family:inherit; font-size:15px; line-height:1.8; white-space:pre-wrap; overflow-wrap:anywhere; max-height:none; }
@media (max-width:600px) {
  .workspace .sidebar nav { margin-top:12px; }
  .work-main { padding:20px 14px; }
  .work-main > h1 { margin:0 0 14px; }
  .work-main iframe { min-height:320px;height:calc(100dvh - 175px); }
  .setting-row { flex-wrap:wrap; }
}

.billing-filters { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.billing-filters input { width:auto; }
.billing-filters a { margin-inline-start:auto; color:#17608a; }
.billing-scroll { overflow-x:auto; }
.billing-table { width:100%; border-collapse:collapse; font-variant-numeric:tabular-nums; }
.billing-table th,.billing-table td { text-align:right; padding:12px; border-bottom:1px solid #dce4e8; white-space:nowrap; }
.billing-table :is(th,td):first-child { text-align:left; }
#panel-billing p { color:#475569; }
