:root {
  color-scheme: light;
  --ink: #25223a;
  --muted: #686677;
  --line: #e5e0ed;
  --purple: #62439d;
  --pale: #f2edf9;
  --green: #3a7059;
  --bg: #f8f7fb;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    'PingFang SC',
    'Microsoft YaHei',
    sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.52;
  cursor: default;
}
a {
  color: var(--purple);
}
:focus-visible {
  outline: 3px solid #a48dc4;
  outline-offset: 2px;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
h1 {
  font-size: clamp(25px, 3vw, 35px);
  line-height: 1.25;
  letter-spacing: -0.04em;
}
h2 {
  font-size: 20px;
  letter-spacing: -0.025em;
}
h3 {
  font-size: 16px;
}
p {
  overflow-wrap: anywhere;
}
.skip {
  position: absolute;
  left: 8px;
  top: -5em;
  z-index: 9;
}
.skip:focus {
  top: 4px;
}
.starting {
  padding: 3rem;
}
.btn,
.x,
.channel,
.nav-item,
.day,
.slot {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.5;
  background: white;
  color: #5e536f;
}
.btn:hover:not(:disabled),
.channel:hover {
  border-color: #ac97c8;
  background: #f9f6fd;
}
.btn.primary {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}
.btn.primary:hover:not(:disabled) {
  background: #4f3385;
}
.btn.slim {
  padding: 5px 10px;
  font-size: 13px;
}
.x {
  font-size: 20px;
  padding: 0;
  width: 31px;
  height: 31px;
}
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 20px;
  padding: 3px 9px;
  background: #f1edf7;
  color: #70538d;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
.tag.ok {
  background: #eaf4ec;
  color: #336c49;
}
.tag.warn {
  background: #fff1dd;
  color: #915d27;
}
.muted,
small,
.sub {
  color: var(--muted);
}
small,
.sub {
  font-size: 13px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 720;
}
.mark {
  display: inline-grid;
  place-items: center;
  color: #fff;
  border-radius: 11px;
  width: 34px;
  height: 34px;
  font-weight: 800;
  font-size: 23px;
  background: linear-gradient(140deg, #a593c6, #5b398b);
  font-family: system-ui;
}
.mast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 0 clamp(14px, 2.5vw, 36px);
  height: 60px;
}
.userbar,
.row,
.actions,
.tabs,
.line,
.cluster {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.actions {
  margin-top: 16px;
}
.line {
  justify-content: space-between;
}
.layout {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  min-height: calc(100vh - 60px);
}
.side {
  padding: 25px 12px;
  background: #fff;
  border-right: 1px solid var(--line);
}
.side nav {
  display: grid;
  gap: 5px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border-color: transparent;
  background: transparent;
  text-align: left;
}
.nav-item svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
}
.nav-item.sel {
  color: var(--purple);
  background: var(--pale);
}
.nav-item:hover {
  background: #f7f4fa;
}
.nav-group {
  font-size: 12px;
  color: #86808c;
  margin: 16px 10px 6px;
}
.nav-group:first-child {
  margin-top: 0;
}
.work {
  min-width: 0;
  padding: 24px clamp(12px, 2.2vw, 36px) 64px;
  max-width: 1700px;
  width: 100%;
  margin: 0 auto;
}
.head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
}
.crumb {
  color: #80768b;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}
.head .sub {
  margin-top: 4px;
  font-size: 14px;
}
.panel,
.kpi,
.content-card,
.channel-peek {
  border: 1px solid var(--line);
  background: white;
  border-radius: 15px;
}
.panel {
  padding: clamp(15px, 1.7vw, 25px);
  margin-bottom: 16px;
  min-width: 0;
}
.panel h2,
.panel h3 {
  line-height: 1.4;
}
.banner {
  position: relative;
  isolation: isolate;
  color: #fff;
  overflow: hidden;
  background: #344538;
  border: 0;
  padding: clamp(20px, 3vw, 40px);
}
.banner:before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #1d3228e8, #203c2ed9 42%, transparent 95%),
    url('media/hero.webp') 50% 56% / cover;
  z-index: -1;
}
.banner h2 {
  font-size: clamp(24px, 2.8vw, 34px);
  margin: 7px 0;
}
.banner p,
.banner small {
  color: #f6f8f1;
}
.banner .btn {
  border: 0;
  color: #394f43;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}
.kpi {
  padding: 15px 17px;
}
.kpi span {
  font-size: 13px;
  color: var(--muted);
}
.kpi b {
  display: block;
  font-size: 29px;
  line-height: 1.4;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.twocol,
.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(250px, 1fr);
  gap: 16px;
  align-items: start;
}
.rows {
  display: grid;
  gap: 0;
}
.item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.item:last-child {
  border: 0;
}
.item-title {
  font-size: 16px;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.item p {
  font-size: 14px;
  margin: 4px 0;
}
.item .line {
  align-items: flex-start;
}
.empty {
  border: 1px dashed #d6ccdf;
  background: #fbf9fd;
  padding: 22px;
  border-radius: 10px;
  margin: 13px 0;
  color: var(--muted);
}
.empty b {
  display: block;
  color: #4f465a;
  margin-bottom: 4px;
}
.tag + .tag {
  margin-left: 4px;
}
.field {
  display: grid;
  gap: 4px;
  margin: 11px 0;
  font-size: 14px;
  font-weight: 600;
}
.field > input,
.field > textarea,
.field > select,
.select,
.filter,
.input {
  width: 100%;
  border: 1px solid #d3cbdc;
  border-radius: 8px;
  padding: 8px 10px;
  line-height: 1.5;
  font-size: 15px;
  background: white;
  font-weight: 400;
}
.field input:focus,
.field textarea:focus {
  border-color: #8c71b0;
}
.field > textarea {
  resize: vertical;
  min-height: 66px;
}
.field .hint {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}
.checks {
  display: grid;
  gap: 6px;
  color: #4b425a;
}
.checks label,
.check {
  display: flex;
  align-items: center;
  gap: 6px;
}
.check {
  font-size: 14px;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr));
  gap: 13px;
}
.content-card {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.content-card .actions {
  margin-top: auto;
  padding-top: 7px;
}
.channel {
  font-size: 13px;
  padding: 5px 10px;
}
.channel.sel,
.slot.sel,
.day.sel {
  background: var(--pale);
  border-color: #bfa6da;
  color: var(--purple);
}
.tabs {
  margin: 10px 0;
}
.peek {
  position: sticky;
  top: 12px;
  overflow: hidden;
  padding: 16px 13px;
}
.phone-area {
  background: #f2eff6;
  background-image: radial-gradient(#a494b936 0.8px, transparent 0.8px);
  background-size: 10px 10px;
  border-radius: 12px;
  padding: 18px 4px;
  margin-top: 12px;
}
.phone-area .gp-device {
  max-width: 100%;
}
.draft-rule {
  padding: 10px 14px;
  border-left: 3px solid #a68dc4;
  background: #f7f4fa;
  font-size: 14px;
}
.checks-box {
  background: #f6f4f9;
  padding: 12px;
  border-radius: 10px;
}
.checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  margin: 7px 0;
}
.list-title {
  margin-bottom: 10px;
}
.state-line {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.history small {
  display: block;
}
.body-copy {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
  margin-top: 14px;
}
.marketing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(290px, 1fr);
  gap: 16px;
  align-items: start;
}
.marketing-nav, .marketing-picker, .marketing-actions, .marketing-date {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.marketing-nav, .marketing-actions { justify-content: space-between; }
.marketing-picker { font-size: 14px; }
.marketing-picker select { width: auto; max-width: 100%; }
.marketing-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin-top: 18px;
}
.marketing-weekday { text-align: center; font-size: 13px; color: var(--muted); }
.marketing-day {
  min-width: 0;
  min-height: 63px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 5px 6px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  text-align: left;
}
.marketing-day b { font-variant-numeric: tabular-nums; font-weight: 550; line-height: 1.5; }
.marketing-day.has-event { background: #f4effa; color: #51317b; border-color: #e9dff1; }
.marketing-day.has-event small { color: inherit; line-height: 1.35; font-size: 12px; overflow-wrap: anywhere; }
.marketing-day.has-event:hover, .marketing-day.sel { border-color: var(--purple); }
.marketing-day.sel { box-shadow: inset 0 0 0 1px var(--purple); }
.marketing-day.is-today b { background: var(--purple); color: white; padding: 0 5px; border-radius: 4px; }
.marketing-event { padding: 14px 0; border-top: 1px solid var(--line); }
.marketing-event:first-of-type { padding-top: 0; border-top: 0; }
.marketing-date { margin-bottom: 5px; }
.marketing-date time { font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--purple); }
.marketing-event p { margin: 6px 0 10px; }
.marketing-actions a, .marketing-origin a { font-size: 14px; }
.marketing-origin { margin: 0 0 16px; }
@media (max-width: 980px) {
  .marketing-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
@media (max-width: 520px) {
  .marketing-grid { gap: 2px; }
  .marketing-day { padding: 3px; min-height: 44px; }
}
.day {
  padding: 8px 4px;
  display: grid;
  justify-items: center;
  gap: 3px;
}
.day b {
  font-size: 19px;
  color: #413949;
}
.day small {
  font-size: 11px;
}
.tablebox {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 14px;
}
td,
th {
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
}
th {
  font-size: 12px;
  color: var(--muted);
}
dialog {
  width: min(560px, 94vw);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 80px #24213335;
  color: var(--ink);
  max-height: 90vh;
  padding: 20px;
}
dialog::backdrop {
  background: #241b344d;
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
#notice {
  position: fixed;
  right: 20px;
  bottom: 18px;
  z-index: 22;
  max-width: min(520px, 92vw);
  background: #30263c;
  color: #fff;
  padding: 9px 15px;
  border-radius: 10px;
  box-shadow: 0 4px 24px #32233b26;
}
#notice:empty {
  display: none;
}
.form-error {
  color: #962f39;
  background: #fff1f1;
  padding: 8px 12px;
  border-radius: 8px;
  margin-top: 12px;
}
.form-error:empty {
  display: none;
}
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(320px, 1fr);
  align-items: stretch;
}
.auth-art {
  color: white;
  padding: clamp(26px, 6vw, 88px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 60px;
  background:
    linear-gradient(150deg, #263228c9, #242e1e38 55%, #1d2a26d9),
    url('media/hero.webp') center/cover;
}
.auth-art .brand {
  font-size: 20px;
}
.auth-art h1 {
  font-size: clamp(30px, 4.3vw, 64px);
  margin-bottom: 9px;
}
.auth-art p {
  color: #fff;
}
.auth-box {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #fcfbfd;
}
.auth-form {
  width: min(380px, 100%);
}
.auth-form h2 {
  font-size: 28px;
}
.auth-form .btn {
  width: 100%;
  margin-top: 14px;
}
.book {
  max-width: 830px;
}
.readonly {
  color: var(--muted);
  font-size: 13px;
}
.linkish {
  background: transparent;
  color: var(--purple);
  border: 0;
  padding: 0;
  text-decoration: underline;
}
.section-gap {
  margin-top: 15px;
}
.hero-thumb {
  width: 86px;
  height: 55px;
  object-fit: cover;
  border-radius: 8px;
}
.adv {
  margin-top: 12px;
}
.adv summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 14px;
}
.sidebar-icon {
  width: 18px;
  text-align: center;
}
.form-inline {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.form-inline .field {
  flex: 1;
  min-width: 0;
}
.model-cost {
  white-space: pre-wrap;
}
.filter {
  width: auto;
  max-width: 100%;
}
ul {
  padding-left: 20px;
}
@media (max-width: 1120px) {
  .layout {
    grid-template-columns: 145px minmax(0, 1fr);
  }
  .side {
    padding: 16px 8px;
  }
  .work {
    padding: 18px 14px 50px;
  }
  .studio-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(256px, 0.9fr);
  }
}
@media (max-width: 850px) {
  .layout {
    display: block;
  }
  .side {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 6px 10px;
    overflow-x: auto;
  }
  .side nav {
    display: flex;
    gap: 3px;
  }
  .side .nav-group {
    display: none;
  }
  .nav-item {
    white-space: nowrap;
    padding: 7px 9px;
    font-size: 13px;
  }
  .nav-item svg {
    display: none;
  }
  .mast {
    height: 48px;
  }
  .userbar,
  .brand {
    gap: 6px;
  }
  .userbar {
    font-size: 12px;
  }
  .twocol {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 630px) {
  .twocol,
  .studio-grid {
    grid-template-columns: 1fr;
  }
  .peek {
    position: static;
  }
  .head {
    align-items: flex-start;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .auth {
    display: flex;
    flex-direction: column;
  }
  .auth-art {
    gap: 24px;
    padding: 20px;
  }
  .auth-box {
    padding: 28px 20px;
    flex: 1;
  }
  .mast {
    padding: 0 10px;
  }
  .mast .mark {
    width: 25px;
    height: 25px;
    font-size: 17px;
  }
  .calendar {
    gap: 3px;
  }
  .day {
    font-size: 12px;
  }
  .day small {
    font-size: 10px;
  }
  .fields {
    grid-template-columns: 1fr;
  }
  .work {
    padding: 15px 10px 36px;
  }
  .phone-area {
    padding: 12px 4px;
  }
  .userbar .tag {
    display: none;
  }
  .panel {
    padding: 14px;
  }
  .peek {
    padding: 14px;
  }
}
.journey {
  display: flex;
  align-items: stretch;
  gap: 5px;
  background: #eeeaf4;
  border: 1px solid #e2dbe9;
  padding: 5px;
  border-radius: 12px;
  margin-bottom: 16px;
}
.journey .channel {
  flex: 1;
  border-color: transparent;
  background: transparent;
}
.journey .channel.sel {
  background: white;
  box-shadow: 0 2px 5px #32224014;
}
.journey .channel b {
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #ded6e8;
  font-size: 11px;
}
.journey .channel.sel b {
  background: #6e4b9d;
  color: #fff;
}
.field input[type='file'] {
  max-width: 100%;
}
@media (max-width: 650px) {
  .journey {
    gap: 2px;
  }
  .journey .channel {
    font-size: 11px;
    padding: 4px 1px;
  }
  .journey .channel b {
    display: grid;
    margin: 0 auto;
  }
  .fields select {
    min-width: 0;
  }
}

.preview-channels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 12px 0 10px;
}
.preview-channels .channel { padding: 7px 4px; font-size: 14px; white-space: nowrap; }
.preview-context { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-size: 14px; color: var(--muted); }
.preview-context .btn { color: var(--purple); }

.channel-fields {border-block:1px solid #e7e0ed;margin:14px 0;padding:12px 0}
.channel-fields summary {font-size:15px;font-weight:650;cursor:pointer}
.channel-meta {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(155px,100%),1fr));gap:6px 12px;margin:10px 0 4px}
.channel-meta .check {grid-column:1/-1;align-items:center}
.gallery-editor {padding-top:8px}
.gallery-editor summary {font-weight:550}
.gallery-count {font-size:13px;color:var(--muted);font-weight:400}
.gallery-list {padding:0;list-style:none;margin:8px 0;display:grid;gap:6px}
.gallery-list li {display:grid;align-items:center;grid-template-columns:20px minmax(0,1fr) auto;gap:4px 8px;border:1px solid #e7e1ed;border-radius:8px;padding:8px}
.gallery-list label {font-size:12px;display:flex;align-items:center;gap:6px}
.gallery-list input {min-width:0;width:100%;padding:4px}
.gallery-list small {grid-column:2;grid-row:2;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--muted)}
.gallery-index {color:var(--muted);align-self:center}
.gallery-actions {grid-column:3;grid-row:1/3;display:flex;flex-wrap:wrap;gap:4px}
.gallery-actions button {font-size:12px;border:0;background:var(--pale);color:var(--purple);padding:4px;cursor:pointer;border-radius:4px}
.gallery-actions button:disabled {opacity:.35}
.gallery-pick {display:flex;gap:8px;align-items:flex-end}
.gallery-pick label {display:grid;flex:1;min-width:0;font-size:14px}
.gallery-pick select {min-width:0}
#preview-note {overflow-wrap:anywhere}
.preview-disclaimer { margin: 8px 0 0; line-height: 1.55; }
@media(max-width:680px){.gallery-actions {max-width:80px}}

.channel-workflow,
.channel-review-checks {
  margin: 16px 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.channel-workflow-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.channel-workflow-head small { color: var(--muted); font-size: 12px; }
.channel-workflow-head h3 { margin-top: 2px; }
.channel-workflow-head > span {
  flex: 0 0 auto;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--green);
  background: #edf7f1;
  font-size: 12px;
}
.channel-workflow > p,
.channel-workflow ol,
.channel-review-checks ul { margin: 8px 0; }
.channel-workflow ol,
.channel-review-checks ul { padding-left: 22px; }
.channel-workflow li,
.channel-review-checks li { margin: 4px 0; }
.channel-workflow-note { color: var(--muted); font-size: 13px; }
.channel-review-checks > b { display: block; margin-bottom: 6px; }
.channel-review-checks .channel-review-common { margin-top: 14px; }
.channel-review-item { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.channel-review-item input { flex: 0 0 auto; margin-top: 3px; accent-color: var(--purple); }
.channel-review-item span { line-height: 1.6; }
.channel-review-note { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.workspace-note {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: #fff;
}
