:root {
  color-scheme: light;
  --paper: #f8f4ed;
  --cream: #fffdf8;
  --ink: #171326;
  --ink-soft: #3d3552;
  --muted: #6c657e;
  --line: rgba(23, 19, 38, .11);
  --line-strong: rgba(49, 32, 68, .22);
  --brand: #7c3aed;
  --brand-deep: #5b21b6;
  --pale: #f2eaff;
  --gradient-brand: linear-gradient(135deg, #7c3aed, #af20b8 56%, #c62e77);
  --shadow: 0 14px 36px -28px rgba(69, 26, 124, .37), 0 2px 5px rgba(59, 38, 78, .035);
  --radius: 24px;
  font-family: "SF Pro Text", Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  background: var(--paper);
  isolation: isolate;
}
body::before, body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
body::before {
  background: radial-gradient(ellipse at 8% -10%, #e8dbfa 0, transparent 44%),
    radial-gradient(ellipse at 98% 2%, #fae1eb 0, transparent 36%),
    radial-gradient(ellipse at 92% 96%, #fbe6d3 0, transparent 36%),
    radial-gradient(ellipse at 2% 102%, #e5efdf 0, transparent 32%);
}
body::after {
  background-image: radial-gradient(circle, rgba(72, 46, 100, .15) .7px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(black, transparent 76%);
}
::selection { background: #e5d4ff; color: var(--ink); }
.rail, main {
  width: min(100%, 1264px);
  margin-inline: auto;
  padding-inline: clamp(16px, 3.5vw, 40px);
}
main { padding-block: 30px max(48px, env(safe-area-inset-bottom)); }
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, .93);
}
.rail, .brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.rail { justify-content: space-between; min-height: 68px; }
.brand { color: var(--ink); white-space: nowrap; }
.brand strong { font-size: 18px; font-weight: 800; letter-spacing: -.04em; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  background: var(--gradient-brand);
  color: white;
  border-radius: 14px;
  box-shadow: 0 5px 14px -6px #7c3aed9c;
}
.brand-mark svg { width: 23px; height: 23px; }
h1, h2, h3, p, dl, ol { margin: 0; }
h1, h2, h3 { line-height: 1.25; text-wrap: pretty; }
h1 { font-size: clamp(28px, 3.2vw, 44px); font-weight: 820; letter-spacing: -.04em; }
h2 { font-size: 19px; font-weight: 760; letter-spacing: -.025em; }
h3 { font-size: 16px; }
p { line-height: 1.65; }
small, .muted, .notice { color: var(--muted); }
small, .notice { font-size: 13px; }
a { color: var(--brand-deep); text-underline-offset: 3px; }
.hero, .section-top, .between, .btns { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hero { margin-block-end: 24px; }
.hero p { margin-top: 8px; }
.card, .panel {
  min-width: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(18px, 2.3vw, 30px);
  box-shadow: var(--shadow);
}
.section-top { margin-block-end: 20px; }
.section-gap { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.between > * { min-width: 0; }
.stack { display: grid; gap: 12px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.full { grid-column: 1 / -1; }
label { display: grid; gap: 7px; color: var(--ink-soft); font-size: 13px; font-weight: 680; }
input, textarea, select, button { font: inherit; }
input, textarea, select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  background-color: #fff;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  padding: 10px 13px;
  font-size: 14px;
  font-weight: 450;
  line-height: 1.45;
  transition: border-color .16s, box-shadow .16s;
}
textarea { resize: vertical; }
select { cursor: pointer; }
input::placeholder, textarea::placeholder { color: #766e83; }
input:focus, textarea:focus, select:focus {
  border-color: var(--brand);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, .13);
}
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
input:disabled, select:disabled, textarea:disabled { background: #f6f3f8; color: var(--muted); }
.check { display: flex; align-items: center; gap: 9px; cursor: pointer; }
input[type="checkbox"] { width: 18px; min-height: 0; height: 18px; margin: 0; accent-color: var(--brand); flex-shrink: 0; }
button, .link, .toplink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .16s, border-color .16s, box-shadow .16s;
}
button:hover:enabled, .link:hover, .toplink:hover { background-color: #faf6ff; border-color: #bb9cde; }
button.primary {
  background: var(--gradient-brand);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 5px 14px -7px #7028a6b3;
}
button.primary:hover:enabled { box-shadow: 0 5px 16px -4px #7028a67a; }
button:disabled { opacity: .55; cursor: default; }
.small { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.btns { justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }
.tag {
  display: inline-flex;
  align-items: center;
  flex: none;
  padding: 4px 10px;
  color: #6d28d9;
  background: #f3e8ff;
  border: 1px solid #ebd9ff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 720;
  line-height: 1.45;
  white-space: nowrap;
}
.tag.pending, .tag.unknown, .tag.needs_action { color: #92400e; background: #fffbeb; border-color: #fde5ab; }
.tag.sent { color: #047857; background: #ecfdf5; border-color: #ccefe3; }
.tag.sending, .tag.queued { color: #1d4ed8; background: #eff6ff; border-color: #dbeafe; }
.tag.returned, .tag.rejected { color: #a9143c; background: #fff1f2; border-color: #ffdbe5; }
.tag.withdrawn { color: var(--muted); background: #f5f3f6; border-color: var(--line); }
.statusmsg:not(:empty) {
  margin: 0 0 18px;
  padding: 12px 16px;
  border: 1px solid #ddc9f2;
  border-radius: 14px;
  color: var(--brand-deep);
  background: #faf4ff;
  overflow-wrap: anywhere;
  white-space: pre-line;
}
.statusmsg:empty { display: none; }
.statusmsg.error:not(:empty) { color: #a21536; background: #fff1f2; border-color: #f5bbc8; }
.empty { padding: 26px 14px; text-align: center; color: var(--muted); }
.details { display: grid; grid-template-columns: minmax(80px, auto) minmax(0, 1fr); gap: 9px 16px; margin: 18px 0; font-size: 14px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
.id { font: 12px/1.65 ui-monospace, monospace; color: var(--muted); overflow-wrap: anywhere; }
.break, .infolink, .log { overflow-wrap: anywhere; }
.log { padding-left: 20px; color: var(--muted); font-size: 13px; }
.log li { padding-block: 4px; }
summary { cursor: pointer; font-size: 14px; font-weight: 650; }
dialog {
  width: min(540px, calc(100% - 32px));
  max-height: min(92dvh, 920px);
  padding: clamp(20px, 3vw, 30px);
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px -36px rgba(55, 24, 85, .56);
  overflow-wrap: anywhere;
}
dialog::backdrop { background: rgba(27, 18, 43, .48); backdrop-filter: blur(6px); }
dialog h2 { margin-bottom: 12px; }
dialog .notice { margin-block: 12px; }
body:has(dialog[open]) { overflow: hidden; }
@media (max-width: 650px) {
  .rail { min-height: 60px; }
  .brand { gap: 8px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 11px; }
  .brand strong { font-size: 16px; }
  main { padding-top: 20px; }
  .hero { align-items: flex-start; flex-wrap: wrap; }
  .grid { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .small { min-height: 44px; }
  input, select, textarea { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
