:root {
  --brand: #1d6bff;
  --brand-hover: #1454d4;
  --brand-tint: #eaf2ff;
  --brand-tint-2: #f5f9ff;
  --ink: #17233d;
  --ink-2: #4b5d7a;
  --ink-3: #8394b0;
  --border: #e4ecf8;
  --border-strong: #cedcf0;
  --success: #16a34a;
  --success-tint: #dcfce7;
  --warn: #d97706;
  --warn-tint: #fef3c7;
  --danger: #e11d48;
  --danger-tint: #ffe4e6;
  --radius: 12px;
  --radius-sm: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei UI", "Hiragino Sans GB", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(640px 240px at 64% 0%, rgba(18, 198, 255, 0.34), transparent 72%),
    radial-gradient(480px 300px at 12% 0%, rgba(56, 132, 255, 0.3), transparent 68%),
    linear-gradient(135deg, #062583 0%, #0d43ce 44%, #062174 76%, #03124d 100%);
}
button, input, textarea, select { font: inherit; color: inherit; }
code, pre { font-family: "Cascadia Code", "JetBrains Mono", "Consolas", monospace; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   StSeek Deep-Blue Outer Frame
   ============================================================ */
.st-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  position: relative;
}
.st-topbar {
  height: 56px;
  padding: 0 18px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  z-index: 40;
}
.st-topbar-left {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}
.st-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #ffffff;
  text-decoration: none;
  flex-shrink: 0;
}
.st-brand:hover { text-decoration: none; opacity: 0.94; }
.st-logo-word {
  display: inline-flex;
  align-items: center;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.st-logo-word em {
  font-style: italic;
  background: linear-gradient(90deg, #ffffff 30%, #8be9ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.st-logo-star {
  width: 12px;
  height: 12px;
  color: #ff7a1a;
  margin-left: 1px;
  margin-top: -10px;
}
.st-logo-cn {
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

/* Company / Brand Switcher */
.company-switcher-wrap { position: relative; }
.st-company-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  max-width: 320px;
}
.st-company-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-company-pill:hover { background: rgba(255, 255, 255, 0.16); }

.company-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 320px;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: 0 18px 42px rgba(5, 24, 92, 0.24);
  padding: 8px;
  z-index: 80;
}
.company-dropdown[hidden] { display: none; }
.company-dd-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-3);
  padding: 6px 10px;
}
.company-dd-list {
  display: grid;
  gap: 4px;
  max-height: 240px;
  overflow-y: auto;
}
.company-dd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.company-dd-item:hover { background: var(--brand-tint-2); }
.company-dd-item.active { background: var(--brand-tint); border-color: #bfd7ff; }
.company-dd-name { font-weight: 700; font-size: 13px; color: var(--ink); }
.company-dd-meta { font-size: 11.5px; color: var(--ink-3); }
.company-dd-footer {
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 8px;
  display: grid;
  gap: 6px;
}
.company-dd-row { display: flex; gap: 6px; }

.st-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.st-header-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(6, 26, 98, 0.35);
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  white-space: nowrap;
}
.st-header-pill-btn { cursor: pointer; }
.st-header-pill-btn:hover { background: rgba(255, 255, 255, 0.16); }
.st-avatar-pill {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  background: linear-gradient(135deg, #f43f5e 0%, #ec4899 100%);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}

/* Body & Left Icon Rail */
.st-body { display: flex; flex: 1; min-height: 0; }
.st-rail {
  width: 82px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 8px;
  user-select: none;
}
.st-rail-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.st-rail-item {
  width: 66px;
  height: 64px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(219, 234, 254, 0.86);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: background-color .15s ease, color .15s ease;
}
.st-rail-item svg { width: 20px; height: 20px; }
.st-rail-item:hover { color: #ffffff; background: rgba(255, 255, 255, 0.1); }
.st-rail-item.active {
  color: #ffffff;
  font-weight: 600;
  background: linear-gradient(180deg, #2b86ff 0%, #0ea5e9 100%);
  border-color: rgba(165, 243, 252, 0.45);
  box-shadow: 0 8px 22px rgba(14, 165, 233, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.st-rail-watermark {
  margin-top: auto;
  font-size: 46px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: rgba(3, 18, 72, 0.55);
  line-height: 1;
  pointer-events: none;
}

/* Floating Rounded White Canvas */
.st-stage {
  flex: 1;
  min-width: 0;
  min-height: 0;
  background: #ffffff;
  border-radius: 14px;
  margin: 0 12px 12px 0;
  box-shadow: 0 12px 34px rgba(3, 16, 62, 0.26);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   Serene StSeek Homepage
   ============================================================ */
.st-home {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 36px 32px;
  background:
    radial-gradient(520px 320px at 0% 100%, rgba(219, 232, 255, 0.65), transparent 68%),
    radial-gradient(520px 320px at 100% 100%, rgba(219, 232, 255, 0.65), transparent 68%),
    #ffffff;
}
.st-home-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 278px));
  gap: 24px;
  justify-content: center;
  width: 100%;
  max-width: 900px;
  margin-bottom: 44px;
}
.st-feature-card {
  position: relative;
  min-height: 310px;
  border-radius: 16px;
  border: 1px solid #c9dffe;
  background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
  padding: 24px 22px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(29, 107, 255, 0.06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.st-feature-card:hover {
  transform: translateY(-4px);
  border-color: #4f8fff;
  box-shadow: 0 16px 34px rgba(29, 107, 255, 0.14);
}
.st-feature-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  z-index: 2;
}
.st-feature-card-title { font-size: 19px; font-weight: 700; color: var(--ink); margin: 0 0 4px; }
.st-feature-card-sub { font-size: 13px; color: var(--ink-3); margin: 0; }
.st-feature-card-arrow {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e9f2ff;
  color: var(--brand);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background-color .15s ease, color .15s ease;
}
.st-feature-card:hover .st-feature-card-arrow { background: var(--brand); color: #ffffff; }
.st-feature-card-visual {
  position: relative;
  height: 158px;
  margin: 12px -22px -16px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}
.st-feature-card-visual::before {
  content: "";
  position: absolute;
  bottom: -26px;
  width: 206px;
  height: 162px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(125, 179, 255, 0.24) 0%, rgba(191, 219, 254, 0.1) 66%, transparent 76%);
}
.st-feature-card-visual svg {
  position: relative;
  z-index: 1;
  width: 132px;
  height: 132px;
  margin-bottom: 12px;
  filter: drop-shadow(0 10px 18px rgba(29, 107, 255, 0.2));
}

.st-ai-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}
.st-ai-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.st-ai-icon-box {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e6eefb;
  box-shadow: 0 6px 16px rgba(17, 50, 128, 0.08);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
}
.st-ai-badge span { font-size: 11.5px; color: var(--ink-3); }

/* ============================================================
   Single-Column Clean Inner Page Container (No nested sidebars!)
   ============================================================ */
.page-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px 40px;
  background: #fafcff;
}
.page-inner {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}
.page-full {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 22px 20px;
  background: #fafcff;
  gap: 14px;
}

/* Segmented Tabs */
.seg-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: #edf3fc;
  border-radius: 10px;
  width: fit-content;
}
.seg-tab {
  border: none;
  background: transparent;
  padding: 7px 18px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color .14s ease, color .14s ease, box-shadow .14s ease;
}
.seg-tab:hover { color: var(--ink); }
.seg-tab.active {
  background: #ffffff;
  color: var(--brand);
  box-shadow: 0 2px 8px rgba(16, 48, 120, 0.08);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .14s ease, border-color .14s ease;
}
.btn-sm { padding: 6px 13px; font-size: 12.5px; }
.btn-xs { padding: 4px 10px; font-size: 12px; }
.btn-primary {
  background: linear-gradient(180deg, #2a7bff 0%, #1660f2 100%);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(29, 107, 255, 0.22);
}
.btn-primary:hover { background: linear-gradient(180deg, #1d6bff 0%, #1050d2 100%); }
.btn-secondary { background: #edf4ff; color: var(--brand); border-color: #c6dcff; }
.btn-secondary:hover { background: #dfecff; }
.btn-ghost { background: #ffffff; color: var(--ink-2); border-color: var(--border-strong); }
.btn-ghost:hover { background: #f4f8ff; color: var(--ink); }
.btn-danger { background: #ffffff; color: var(--danger); border-color: #fecdd3; }
.btn-danger:hover { background: var(--danger-tint); }
.icon-btn {
  width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--border);
  background: #fff; cursor: pointer; display: grid; place-items: center; font-size: 18px;
}

/* Cards & Forms */
.card-box {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: 0 2px 10px rgba(15, 42, 102, 0.03);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.card-head h2 { margin: 0; font-size: 16px; font-weight: 700; }
.card-sub { margin: 3px 0 0; font-size: 12.5px; color: var(--ink-3); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field-hint { font-size: 12px; color: var(--ink-3); }
.input, .textarea, .select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #ffffff;
  font-size: 13.5px;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(29, 107, 255, 0.12);
}
.textarea { min-height: 76px; resize: vertical; line-height: 1.6; }

/* Collapsible Advanced Section */
details.adv-details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  overflow: hidden;
}
details.adv-details summary {
  padding: 13px 18px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--brand-tint-2);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
details.adv-details summary::-webkit-details-marker { display: none; }
details.adv-details summary::after {
  content: "展开 ▾";
  font-size: 12px;
  color: var(--brand);
}
details.adv-details[open] summary::after { content: "收起 ▴"; }
.adv-details-body {
  padding: 18px 20px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 16px;
}

/* Compact Upload Row */
.upload-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.upload-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px dashed #bfd5f5;
  border-radius: 10px;
  background: var(--brand-tint-2);
}
.upload-thumb {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
  font-size: 11px;
  color: var(--ink-3);
}
.upload-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }

/* Clean Table */
.table-box {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow-x: auto;
  background: #ffffff;
}
.simple-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.simple-table th, .simple-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}
.simple-table thead th {
  background: var(--brand-tint-2);
  color: var(--ink-2);
  font-weight: 600;
  font-size: 12.5px;
  white-space: nowrap;
}
.simple-table tbody tr:last-child td { border-bottom: none; }
.simple-table tbody tr:hover { background: #f9fbff; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.pill-pass { background: var(--success-tint); color: var(--success); }
.pill-warn { background: var(--warn-tint); color: #92400e; }
.pill-fail { background: var(--danger-tint); color: var(--danger); }
.pill-brand { background: var(--brand-tint); color: var(--brand); }
.pill-neutral { background: #eef3fa; color: var(--ink-2); }

/* Preview Stage */
.toolbar-bar {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.toolbar-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.preview-stage {
  flex: 1;
  min-height: 0;
  background: #edf3fc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  justify-content: center;
  align-items: stretch;
  overflow: auto;
}
.preview-frame {
  width: 100%;
  height: 100%;
  min-height: 520px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #ffffff;
  transition: width .2s ease;
}
.preview-frame.mobile {
  width: 390px;
  border: 10px solid #162238;
  border-radius: 28px;
  box-shadow: 0 18px 40px rgba(10, 32, 92, 0.18);
}

/* Article Writer */
.platform-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.plat-btn {
  padding: 9px 15px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink-2);
}
.plat-btn:hover { border-color: #7aa8ff; color: var(--ink); }
.plat-btn.active {
  background: var(--brand-tint);
  border-color: var(--brand);
  color: var(--brand);
}
.plat-sub { font-size: 11.5px; font-weight: 500; color: var(--ink-3); }
.plat-btn.active .plat-sub { color: #3b7bff; }

.audit-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 9px;
  background: var(--brand-tint-2);
  border: 1px solid #dbe8fc;
  font-size: 13px;
}
.rich-sheet {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  padding: 24px 28px;
  max-height: 560px;
  overflow-y: auto;
}
.md-editor {
  width: 100%;
  min-height: 460px;
  padding: 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font-family: "Cascadia Code", "Consolas", "Microsoft YaHei UI", monospace;
  font-size: 13px;
  line-height: 1.7;
  resize: vertical;
}
.code-viewer {
  width: 100%;
  height: 420px;
  margin: 0;
  padding: 14px;
  background: #0d1a38;
  color: #dcebff;
  border-radius: 8px;
  overflow: auto;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.check-item { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--ink-2); }
.check-dot {
  width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0; margin-top: 2px;
}
.check-dot.pass { background: var(--success-tint); color: var(--success); }
.check-dot.warn { background: var(--warn-tint); color: #92400e; }
.check-dot.fail { background: var(--danger-tint); color: var(--danger); }

.qa-card {
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 12px 14px;
  background: var(--brand-tint-2);
  display: grid;
  gap: 8px;
}

/* Modal & Toast */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(5, 22, 74, 0.52);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 120;
}
.modal-backdrop[hidden] { display: none; }
.modal-dialog {
  background: #ffffff; border-radius: 14px; width: 100%; max-width: 680px; max-height: 88vh;
  display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(4, 18, 68, 0.28); overflow: hidden;
}
.modal-dialog.wide { max-width: 920px; }

/* Dynamic TDK Studio Modal */
.tdk-studio {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 18px;
  align-items: start;
}
.tdk-side {
  display: grid;
  gap: 14px;
  padding-right: 16px;
  border-right: 1px solid var(--border);
}
.tdk-tag-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.tdk-tag-btn {
  padding: 7px 9px;
  border-radius: 7px;
  border: 1px solid #d5e5ff;
  background: #eef5ff;
  color: #1554c8;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background-color .14s ease, border-color .14s ease, transform .12s ease;
}
.tdk-tag-btn:hover {
  background: #dcebff;
  border-color: var(--brand);
  transform: translateY(-1px);
}
.tdk-preview-card {
  background: #f5f9ff;
  border: 1px solid #d4e4fb;
  border-radius: 10px;
  padding: 13px 15px;
  display: grid;
  gap: 8px;
  font-size: 13px;
}
.tdk-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.tdk-preview-row {
  display: grid;
  gap: 2px;
}
.tdk-preview-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-3);
}
.tdk-preview-val {
  color: var(--ink);
  word-break: break-word;
  line-height: 1.55;
}
.tdk-warn-list {
  margin: 4px 0 0;
  padding: 8px 10px 8px 24px;
  background: var(--warn-tint);
  border-radius: 7px;
  color: #92400e;
  font-size: 12px;
  display: grid;
  gap: 4px;
}
.tdk-warn-list[hidden] { display: none; }
@media (max-width: 820px) {
  .tdk-studio { grid-template-columns: 1fr; }
  .tdk-side { padding-right: 0; border-right: none; border-bottom: 1px solid var(--border); padding-bottom: 14px; }
}

/* Nationwide GB/T 2260 Region Code Picker */
.code-tag {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  color: #3b5998;
  background: #edf4ff;
  border: 1px solid #d5e5ff;
  padding: 1px 6px;
  border-radius: 5px;
  margin-right: 6px;
  vertical-align: middle;
}
.rp-shell { display: grid; gap: 12px; }
.rp-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.rp-search-wrap { flex: 1; min-width: 240px; }
.rp-meta { font-size: 12px; color: var(--ink-3); }
.rp-grid {
  display: grid;
  grid-template-columns: 195px 225px 1fr;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
  height: 350px;
}
.rp-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--border);
}
.rp-col:last-child { border-right: none; }
.rp-col-head {
  padding: 9px 12px;
  background: #f5f9ff;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-shrink: 0;
}
.rp-col-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rp-item {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 7px 10px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  transition: background-color .12s ease;
}
.rp-item:hover { background: #f2f7ff; }
.rp-item.active { background: #e6f0ff; color: var(--brand); font-weight: 700; }
.rp-item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-item-right { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.rp-count-dot {
  font-size: 11px;
  font-weight: 700;
  padding: 0 6px;
  line-height: 18px;
  border-radius: 999px;
  background: var(--brand);
  color: #ffffff;
}
.rp-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  color: var(--ink-3);
  flex-shrink: 0;
}
.rp-area-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink);
  user-select: none;
  transition: background-color .12s ease;
}
.rp-area-row:hover { background: #f2f7ff; }
.rp-area-row.checked { background: #eaf2ff; }
.rp-area-row.added { background: #f8fafc; color: var(--ink-3); cursor: default; }
.rp-area-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rp-area-left input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; flex-shrink: 0; }
.rp-badge-added {
  font-size: 11px;
  font-weight: 600;
  color: #059669;
  background: #e8f8f0;
  padding: 1px 7px;
  border-radius: 999px;
  flex-shrink: 0;
}
.rp-search-box {
  border: 1px solid var(--border);
  border-radius: 10px;
  height: 350px;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: #ffffff;
}
.rp-selected-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 9px 12px;
  background: #f5f9ff;
  border: 1px solid #d5e5ff;
  border-radius: 9px;
  font-size: 12px;
}
.rp-selected-bar[hidden] { display: none; }
.rp-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #c9ddff;
  color: #1554c8;
  font-weight: 600;
}
.rp-chip button {
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  padding: 0 2px;
  font-size: 13px;
  line-height: 1;
}
.rp-chip button:hover { color: #dc2626; }
.rp-tip {
  font-size: 12px;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  padding: 8px 12px;
  border-radius: 8px;
  line-height: 1.5;
}
.rp-footer-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
@media (max-width: 820px) {
  .rp-grid { grid-template-columns: 1fr; height: auto; max-height: 420px; }
  .rp-col { border-right: none; border-bottom: 1px solid var(--border); max-height: 140px; }
  .rp-col:last-child { border-bottom: none; max-height: 200px; }
}
.modal-header {
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { margin: 0; font-size: 15.5px; }
.modal-body { padding: 18px 20px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 12px 20px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px; background: var(--brand-tint-2);
}

.toast-stack { position: fixed; right: 22px; bottom: 22px; display: grid; gap: 8px; z-index: 150; }
.toast-item {
  background: #0d2159; color: #ffffff; padding: 10px 16px; border-radius: 9px;
  font-size: 13px; box-shadow: 0 12px 28px rgba(4, 18, 68, 0.26);
}
.toast-item.error { background: #be123c; }

/* Published Sites Registry, Domain Pool & Login Overlay */
.pub-link {
  color: var(--brand);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
  text-decoration: none;
}
.pub-link:hover { text-decoration: underline; }
.theme-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.mode-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  background: #edf4ff;
  color: #1554c8;
  white-space: nowrap;
}
.mode-pill.path { background: #ecfdf5; color: #047857; }
.pub-empty {
  padding: 56px 24px;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 10px;
  color: var(--ink-2);
}
.pub-empty h3 { margin: 0; font-size: 16.5px; color: var(--ink); }
.pub-empty p { margin: 0; font-size: 13.5px; max-width: 480px; line-height: 1.65; }
.pool-add-row {
  display: grid;
  grid-template-columns: 1.3fr 140px 1.1fr auto;
  gap: 8px;
  align-items: end;
}
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: radial-gradient(700px 360px at 78% 15%, rgba(29, 107, 255, 0.32), transparent 70%), linear-gradient(145deg, #061b52 0%, #0d3282 100%);
  display: grid;
  place-items: center;
  padding: 20px;
}
.login-overlay[hidden] { display: none; }
.login-card {
  width: 100%;
  max-width: 380px;
  background: #ffffff;
  border-radius: 16px;
  padding: 28px 26px;
  box-shadow: 0 28px 64px rgba(3, 14, 52, 0.42);
}
.login-logo { font-size: 20px; font-weight: 800; color: #0b2669; margin-bottom: 4px; }
.login-logo span { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-left: 6px; }
.login-sub { margin: 0 0 18px; font-size: 13px; color: var(--ink-3); }
.login-err {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12.5px;
}
.login-err[hidden] { display: none; }

@media (max-width: 900px) {
  .st-home-cards { grid-template-columns: 1fr; max-width: 340px; }
  .form-grid, .upload-row, .pool-add-row { grid-template-columns: 1fr; }
}
