.panel {
  background: var(--ds-card);
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-card);
  box-shadow: var(--ds-shadow-soft);
  padding: 14px;
}
.panel--flat { box-shadow: none; }
.panel--glass {
  background: var(--ds-grad);
  color: #fff;
  border: 0;
}
.panel--hero { padding: 0; overflow: hidden; }

.sec-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sec-h b { font-size: 15px; font-weight: 800; }
.section-title { display: block; font-size: 15px; font-weight: 800; margin-bottom: 8px; }
.muted { color: var(--ds-muted); font-size: 12.5px; line-height: 1.5; }

.pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.pill.ok { background: var(--ds-ok-bg); color: var(--ds-ok-fg); }
.pill.run { background: var(--ds-run-bg); color: var(--ds-run-fg); }
.pill.err { background: var(--ds-err-bg); color: var(--ds-err-fg); }
.pill.draft { background: var(--ds-draft-bg); color: var(--ds-draft-fg); }
.pill.primary { background: var(--ds-primary-soft); color: var(--ds-primary); }

.btn {
  border: 0;
  border-radius: var(--ds-radius-btn);
  font-weight: 700;
  cursor: pointer;
  font-family: var(--ds-font);
}
.btn-primary {
  background: var(--ds-grad);
  color: #fff;
  height: 48px;
  font-size: 15.5px;
  box-shadow: 0 10px 22px rgba(47, 107, 255, 0.24);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-sec {
  background: #fff;
  border: 1px solid var(--ds-line);
  color: var(--ds-primary);
  height: 38px;
  padding: 0 14px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-mini {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid var(--ds-line);
  color: var(--ds-primary);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-danger { color: var(--ds-err-fg); border-color: rgba(192, 57, 43, 0.25); }
.btn-ghost {
  background: transparent;
  color: var(--ds-muted);
  height: 40px;
  width: 100%;
  font-size: 13px;
}

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.chips button {
  flex: none;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  background: #fff;
  border: 1px solid var(--ds-line);
  color: var(--ds-muted);
  cursor: pointer;
  font-family: inherit;
}
.chips button.on { background: var(--ds-ink); color: #fff; border-color: var(--ds-ink); }

.field { margin-bottom: 12px; }
.field:last-child { margin-bottom: 0; }
.field-label { display: block; font-size: 12.5px; color: var(--ds-muted); margin-bottom: 6px; font-weight: 600; }
.field-ctl {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--ds-line);
  border-radius: 10px;
  background: #fff;
  padding: 0 12px;
  font-size: 14px;
  color: var(--ds-ink);
  display: flex;
  align-items: center;
}
.field-ctl.area { min-height: 64px; padding: 10px 12px; align-items: flex-start; }
.field-ctl.ph { color: #9aa7bd; }

.seg { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--ds-soft); }
.seg button {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--ds-muted);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 0;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}
.seg button.on { background: #fff; color: var(--ds-primary); box-shadow: var(--ds-shadow-soft); }

.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.grad-cover {
  position: relative;
  border-radius: 12px;
  background: var(--ds-cover);
  display: grid;
  place-items: center;
}
.grad-cover.alt { background: var(--ds-cover-alt); }
.play-dot {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  display: grid;
  place-items: center;
  color: #16202e;
}
.dur {
  position: absolute;
  right: 6px; bottom: 6px;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
}

.card-store {
  border: 1px solid var(--ds-line);
  border-radius: 12px;
  padding: 12px;
}
.card-store + .card-store { margin-top: 10px; }

.upload-poster {
  display: flex;
  gap: 10px;
}
.upload-poster__example {
  flex: 1;
  height: 120px;
  border-radius: 12px;
  background: var(--ds-cover);
  position: relative;
  overflow: hidden;
  display: grid;
  align-items: end;
}
.upload-poster__example-cap {
  background: linear-gradient(transparent, rgba(0,0,0,.55));
  padding: 8px;
  color: #fff;
}
.upload-poster__btn {
  flex: none;
  width: 96px;
  height: 120px;
  border-radius: 12px;
  border: 1.5px dashed #c6d2e6;
  background: var(--ds-soft);
  color: var(--ds-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.amount-chip {
  border: 1px solid var(--ds-line);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  font-weight: 700;
  cursor: pointer;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
}
.amount-chip.on {
  border: 2px solid var(--ds-primary);
  box-shadow: var(--ds-shadow-soft);
}

.plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.plan-card {
  border: 1px solid var(--ds-line);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  background: #fff;
  font-family: inherit;
  text-align: left;
}
.plan-card.on { border: 2px solid var(--ds-primary); box-shadow: var(--ds-shadow-soft); }
.plan-card__price { color: var(--ds-primary); font-weight: 800; font-size: 18px; margin-top: 4px; }

.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; text-align: center; }
.summary-value { font-size: 22px; font-weight: 800; color: var(--ds-primary); }
.summary-label { font-size: 12px; color: var(--ds-muted); margin-top: 4px; }

.ledger-row { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.ledger-amount.income { color: var(--ds-ok-fg); font-weight: 800; }
.ledger-amount.expense { color: var(--ds-err-fg); font-weight: 800; }

.avatar-pick {
  width: 120px; height: 120px;
  border-radius: 50%;
  margin: 0 auto 12px;
  border: 0;
  background: var(--ds-soft);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #93a8a4;
  font-size: 13px;
}

.split-layout { display: flex; gap: 8px; min-height: 280px; }
.split-left, .split-right {
  flex: 1;
  border-radius: var(--ds-radius-card);
  border: 1px solid var(--ds-line);
  background: var(--ds-card);
  overflow-y: auto;
  max-height: 360px;
}
.split-left button, .split-right button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--ds-line);
  background: transparent;
  font-family: inherit;
  font-size: 13.5px;
  cursor: pointer;
}
.split-left button.on { background: var(--ds-primary-soft); color: var(--ds-primary); font-weight: 700; }
.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; }
.chip-item {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--ds-line);
  background: #fff;
  font-size: 12.5px;
  cursor: pointer;
  font-family: inherit;
}

.webview-placeholder {
  flex: 1;
  display: grid;
  place-items: center;
  background: #1a2332;
  color: #93a0b8;
  font-size: 13px;
  text-align: center;
  padding: 24px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 26, 43, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal {
  width: 100%;
  max-width: 300px;
  background: #fff;
  border-radius: 16px;
  padding: 20px 16px 12px;
  box-shadow: var(--ds-shadow);
}
.modal h3 { margin: 0 0 8px; font-size: 17px; font-weight: 800; }
.modal p { margin: 0 0 16px; font-size: 13px; color: var(--ds-muted); line-height: 1.5; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions button { flex: 1; height: 42px; border-radius: 10px; font-weight: 700; font-family: inherit; cursor: pointer; border: 1px solid var(--ds-line); background: #fff; }
.modal-actions button.confirm { background: var(--ds-grad); color: #fff; border: 0; }
.modal-actions button.danger { color: var(--ds-err-fg); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 80px;
  transform: translateX(-50%) translateY(12px);
  background: rgba(15, 26, 43, 0.88);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 200;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.badge-todo {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--ds-run-bg);
  color: var(--ds-run-fg);
  margin-left: 6px;
  vertical-align: middle;
}
