:root {
  --bg: #f6f1fb;
  --bg-2: #efe6f8;
  --paper: #fffcff;
  --ink: #2b2340;
  --muted: #6f6584;
  --line: #e6dcf2;
  --violet: #6d4cb8;
  --violet-deep: #54349a;
  --violet-soft: #f3e9ff;
  --lilac: #cbb6ee;
  --good: #1f7a5a;
  --good-bg: #e7f6ef;
  --warn: #9a5a1f;
  --warn-bg: #fff1e2;
  --bad: #8d3a55;
  --bad-bg: #fdecef;
  --shadow: 0 24px 60px rgba(84, 52, 154, .08);
  --radius: 28px;
  color-scheme: light;
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(900px 480px at 8% -10%, #efe4ff 0%, transparent 60%),
    radial-gradient(700px 420px at 110% 0%, #f7e9ff 0%, transparent 55%),
    var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: var(--violet-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, select { font: inherit; color: inherit; }
code { font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace; font-size: .82em; background: var(--violet-soft); padding: .1em .4em; border-radius: 8px; }
h1, h2, h3 { font-family: "Iowan Old Style", Palatino, Georgia, serif; font-weight: 500; letter-spacing: -.03em; line-height: 1.05; margin: 0; }
h1 { font-size: clamp(2.6rem, 5vw, 4.4rem); }
h2 { font-size: clamp(1.6rem, 2vw, 2.1rem); }
p { margin: 0; }
.icon { width: 1.1em; height: 1.1em; vertical-align: -.15em; }
.mark { width: 36px; height: 36px; color: var(--violet); }
.brand { display: flex; gap: 12px; align-items: center; color: var(--ink); text-decoration: none; font-weight: 600; }
.brand small { display: block; font-weight: 500; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; font-size: .68rem; }
.kicker { color: var(--violet-deep); letter-spacing: .14em; text-transform: uppercase; font-size: .78rem; font-weight: 700; margin-bottom: 10px; }
.lead { color: var(--muted); font-size: 1.05rem; margin: 12px 0 22px; }
.fine, .quiet { color: var(--muted); font-size: .92rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 14px 22px; background: var(--violet); color: white; text-decoration: none; cursor: pointer; box-shadow: 0 10px 24px rgba(109, 76, 184, .22); }
.button:hover { background: var(--violet-deep); }
.button.secondary { background: white; color: var(--violet-deep); border: 1px solid var(--line); box-shadow: none; }
.button.full { width: 100%; margin-top: 8px; }
.icon-button, .quiet-button { border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.badge { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 6px 12px; background: var(--violet-soft); color: var(--violet-deep); font-size: .82rem; font-weight: 650; text-transform: capitalize; }
.badge i { width: 8px; height: 8px; border-radius: 99px; background: currentColor; }
.badge.good { background: var(--good-bg); color: var(--good); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.soft { background: var(--violet-soft); color: var(--violet-deep); }
.notice { border-radius: 18px; padding: 14px 16px; margin: 0 0 16px; background: var(--violet-soft); }
.notice.bad { background: var(--bad-bg); color: var(--bad); }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.field span, .sheet-head p, .count { color: var(--muted); }
.field input, .field select { width: 100%; border: 1px solid var(--line); background: white; border-radius: 16px; padding: 14px 16px; outline: none; }
.field input:focus, .field select:focus { border-color: var(--lilac); box-shadow: 0 0 0 4px rgba(109, 76, 184, .12); }
.public { min-height: 100vh; display: flex; flex-direction: column; }
.bar, .top { display: flex; justify-content: space-between; align-items: center; padding: 22px 7vw; }
.narrow, .wide { width: min(1120px, calc(100% - 40px)); margin: 0 auto; flex: 1; display: flex; align-items: center; }
.narrow { width: min(640px, calc(100% - 40px)); }
.split, .pay-layout, .card { width: 100%; }
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: stretch; }
.story, .card, .sheet, .connect, .quote { background: var(--paper); border: 1px solid rgba(255,255,255,.7); border-radius: var(--radius); box-shadow: var(--shadow); }
.story { padding: 48px; background: linear-gradient(165deg, #fbf8ff 0%, #efe4fb 55%, #f7f0ff 100%); position: relative; overflow: hidden; }
.story::after { content: ""; position: absolute; width: 280px; height: 280px; right: -60px; bottom: -80px; border-radius: 50%; background: radial-gradient(circle, #ddc8fb 0%, transparent 70%); }
.story h1, .story p, .story ul { position: relative; z-index: 1; }
.points { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.points li { background: rgba(255,255,255,.62); border-radius: 16px; padding: 12px 14px; }
.card { padding: 36px; }
.card.center, .result { text-align: left; }
.foot { margin-top: auto; display: flex; justify-content: space-between; gap: 12px; padding: 22px 7vw 28px; color: var(--muted); font-size: .92rem; }
.workspace { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }
.rail { padding: 28px 22px; display: flex; flex-direction: column; gap: 22px; background: rgba(255,252,255,.72); border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; }
.rail nav { display: grid; gap: 6px; }
.rail a { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--muted); border-radius: 16px; padding: 12px 14px; }
.rail a.on, .rail a:hover { background: white; color: var(--violet-deep); box-shadow: 0 8px 20px rgba(84, 52, 154, .06); }
.rail-note { color: var(--muted); font-size: .92rem; }
.who { margin-top: auto; display: flex; gap: 10px; align-items: center; }
.who div { min-width: 0; }
.who small, .directory small, .pay-row small { display: block; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--violet-soft); color: var(--violet-deep); font-weight: 700; }
.stage { min-width: 0; }
.top { padding: 22px 36px; }
.top span { color: var(--muted); margin-right: 8px; }
.content { padding: 8px 36px 36px; display: grid; gap: 22px; }
.hero h1 { font-size: clamp(2.4rem, 4vw, 3.6rem); max-width: 16ch; }
.stats, .pair, .grid, .pay-layout { display: grid; gap: 16px; }
.stats { grid-template-columns: repeat(3, 1fr); }
.pair, .pay-layout, .grid { grid-template-columns: 1.1fr .9fr; }
.stat, .sheet, .connect { padding: 24px; }
.stat { background: white; border-radius: 24px; border: 1px solid var(--line); }
.stat strong, .amount, .quote h2 { display: block; font-family: "Iowan Old Style", Palatino, Georgia, serif; font-size: clamp(2rem, 3vw, 3rem); letter-spacing: -.03em; margin: 8px 0; }
.stat:first-child { background: linear-gradient(180deg, #f7f1ff, #fff); }
.connect { display: flex; justify-content: space-between; gap: 20px; align-items: center; background: linear-gradient(135deg, #f8f3ff, #fff); }
.stack { display: grid; justify-items: start; gap: 8px; }
.row, .meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sheet-head, .pay-row summary, .directory article { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.list, .directory { display: grid; gap: 10px; }
.pay-row, .directory article { background: #fcfaff; border: 1px solid var(--line); border-radius: 20px; padding: 16px 18px; }
.pay-row summary { cursor: pointer; list-style: none; }
.pay-row summary::-webkit-details-marker { display: none; }
.detail { padding-top: 14px; }
.warn-copy { color: var(--warn); margin-top: 10px; }
.secret-value { font-size: 1rem; word-break: break-all; background: var(--violet-soft); border-radius: 18px; padding: 18px; margin-bottom: 12px; }
.quote { padding: 32px; background: linear-gradient(180deg, #f4ebff, #fff); }
.empty { padding: 12px 0 4px; color: var(--muted); }
details summary { cursor: pointer; }
@media (max-width: 900px) {
  .workspace, .split, .stats, .pair, .pay-layout, .grid, .connect { display: block; }
  .rail { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .content, .top, .bar, .foot { padding-left: 20px; padding-right: 20px; }
  .story, .card { padding: 28px 22px; }
  h1 { font-size: 2.5rem; }
}
