/* Pedia: design tokens */
:root {
  --ink: #f4f4f5;
  --ink-soft: #a1a1aa;
  --paper: #000;
  --card: #141416;
  --mist: #1c1c1f;
  --line: #2c2c30;
  --blue: #2f6bff;
  --blue-hover: #1f55d8;
  --blue-deep: #1e3a8a;
  --blue-text: #9db8ff;
  --verify: #10b981;
  --danger: #f87171;
  --danger-bg: #2a1212;
  --info-bg: #0f1b36;
  --on-ink: #000;
  --ink-hover: #d4d4d8;
  --glass: rgba(0,0,0,.88);
  --shine: rgba(255,255,255,.04);
  --splash: #000;
  --radius: 18px;
  --violet: #8b5cf6;
  --navy: #020617;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --font-display: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
/* Light theme: switched on in Account & settings. Dark is the default. */
:root[data-theme="light"] {
  --ink: #0f172a;
  --ink-soft: #64748b;
  --paper: #f8fafc;
  --card: #fff;
  --mist: #f1f5f9;
  --line: #e2e8f0;
  --blue: #2563eb;
  --blue-hover: #1d4ed8;
  --blue-text: #1e3a8a;
  --verify: #0e9f6e;
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --info-bg: #eaf1ff;
  --on-ink: #fff;
  --ink-hover: #1e293b;
  --glass: rgba(255,255,255,.95);
  --shine: rgba(255,255,255,.65);
  --splash: radial-gradient(1200px 600px at 12% -8%, rgba(37,99,235,.10), transparent 60%), radial-gradient(900px 500px at 105% 8%, rgba(37,99,235,.07), transparent 55%), linear-gradient(180deg, #EEF3FB 0%, #F8FAFC 40%);
  --violet: #7c3aed;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: env(safe-area-inset-top, 0px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "calt", "kern";
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; letter-spacing: -0.015em; color: var(--ink); }
h1 { font-weight: 800; font-size: clamp(2.4rem, 6.2vw, 4.2rem); letter-spacing: -0.035em; }
h2 { font-weight: 800; font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-weight: 600; font-size: 1.3rem; }
p { margin: 0; }
a { color: var(--blue); text-underline-offset: 3px; }
@media (hover: hover) { a:hover { color: var(--blue-hover); } }   /* phones keep :hover after a tap, which turned post text blue */
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.muted { color: var(--ink-soft); }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 36em; }
.fine { font-size: 0.92rem; color: var(--ink-soft); }
[hidden] { display: none !important; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px; border-radius: 12px;
  font: 600 1rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 0.95rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .65; cursor: not-allowed; }
.link { font-weight: 600; color: var(--ink); text-decoration: none; padding: 8px 4px; }
.link:hover { color: var(--blue); }
.link-btn { background: none; border: 0; font: 600 1rem var(--font-body); color: var(--ink); cursor: pointer; padding: 8px 4px; }
.link-btn:hover { color: var(--blue); }

/* Top bar and logo */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1160px; margin: 0 auto; padding: 18px 24px;
}
.topbar-slim { justify-content: flex-start; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--blue); text-decoration: none; }
.logo span { font: 800 1.45rem/1 var(--font-display); letter-spacing: -0.03em; color: var(--ink); }
.logo-mark { width: 32px; height: 32px; }

/* Landing: hero */
.hero {
  max-width: 1160px; margin: 0 auto; padding: 40px 24px 88px;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center;
}
.hero-copy { display: grid; gap: 24px; justify-items: start; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-visual { position: relative; padding: 0 18px 22px 0; }
.sheet { position: absolute; inset: 22px 0 0 22px; background: var(--blue); border-radius: 26px; }
.profile-card {
  position: relative; background: var(--paper); border: 1px solid var(--line);
  border-radius: 22px; padding: 28px; display: grid; gap: 22px;
  box-shadow: 0 18px 40px -22px rgba(23, 23, 122, .45);
}
.sample-tag {
  position: absolute; top: 16px; right: 18px; font-size: .8rem; font-weight: 600;
  color: var(--ink-soft); background: var(--mist); border-radius: 999px; padding: 3px 10px;
}
.pc-head { display: flex; gap: 16px; align-items: center; padding-top: 14px; }
.pc-head h2 { font-size: 1.5rem; }
.pc-head p { font-size: .95rem; color: var(--ink-soft); line-height: 1.4; }
.avatar {
  flex: none; width: 60px; height: 60px; border-radius: 50%;
  background: var(--blue-deep); color: #fff; display: grid; place-items: center;
  font: 800 1.2rem var(--font-display);
}
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checks li { display: flex; align-items: flex-start; gap: 12px; font-weight: 500; line-height: 1.35; }
.tick {
  flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--verify); position: relative; margin-top: 1px;
}
.tick::after {
  content: ""; position: absolute; left: 7px; top: 3.5px; width: 6px; height: 11px;
  border: solid var(--card); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; border-top: 1px solid var(--line); padding-top: 18px; }
.chips span { background: var(--info-bg); color: var(--blue-text); font-weight: 600; font-size: .92rem; padding: 6px 14px; border-radius: 999px; }

/* Landing: sections */
.band { background: var(--mist); }
.band-inner { max-width: 1160px; margin: 0 auto; padding: 88px 24px; }
.split { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: start; }
.split h2 { position: sticky; top: 24px; }
.rows { display: grid; }
.row { padding: 28px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.row:first-child { border-top: 0; padding-top: 4px; }
.row p { color: var(--ink-soft); max-width: 34em; }
.trust { background: var(--blue-deep); color: #fff; }
.trust h2, .trust h3 { color: #fff; }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 44px; }
.trust-grid h3 { margin-bottom: 10px; }
.trust-grid p { color: #d6d9ff; }
.final { max-width: 1160px; margin: 0 auto; padding: 96px 24px; display: grid; gap: 20px; justify-items: start; }
.footer {
  max-width: 1160px; margin: 0 auto; padding: 28px 24px 40px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--ink-soft); font-size: .95rem;
}
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--ink-soft); }

/* Forms and account pages */
.auth-wrap { min-height: 100vh; background: var(--mist); }
.auth-card {
  width: min(480px, calc(100% - 32px)); margin: 8px auto 56px; background: var(--paper);
  border: 1px solid var(--line); border-radius: 20px; padding: 32px 28px 30px; display: grid; gap: 18px;
}
.auth-card h1 { font-size: clamp(1.8rem, 5vw, 2.2rem); letter-spacing: -0.03em; }
.auth-card .lead { font-size: 1rem; }
.field { display: grid; gap: 6px; }
.field label, .field .label { font-weight: 600; font-size: .95rem; }
.optional { font-weight: 400; color: var(--ink-soft); }
input, select {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--paper); color: var(--ink); font: 400 1rem var(--font-body);
}
select {
  appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1.5l6 6 6-6' fill='none' stroke='%23475467' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
select:disabled { background-color: var(--mist); color: var(--ink-soft); }
input:hover, select:hover { border-color: #b8bfce; }
input:focus-visible, select:focus-visible { outline: 3px solid rgba(59, 59, 245, .35); outline-offset: 0; border-color: var(--blue); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.two > .field:only-child { grid-column: 1 / -1; }
.pw { position: relative; }
.pw input { padding-right: 72px; }
.pw-toggle {
  position: absolute; right: 4px; top: 4px; bottom: 4px; padding: 0 12px; border: 0; border-radius: 9px;
  background: none; color: var(--blue); font: 600 .92rem var(--font-body); cursor: pointer;
}
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; margin: 0; border: 0; background: var(--mist); border-radius: 14px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.seg span { display: grid; place-items: center; min-height: 42px; border-radius: 10px; font-weight: 600; font-size: .95rem; color: var(--ink-soft); }
.seg input:checked + span { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(16, 24, 40, .15); }
.seg input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
#form { display: grid; gap: 16px; }
.forgot { font-size: .95rem; }
.msg { padding: 12px 14px; border-radius: 12px; font-size: .95rem; line-height: 1.45; }
.msg-error { background: var(--danger-bg); color: var(--danger); }
.msg-info { background: var(--info-bg); color: var(--blue-text); }

/* Signed-in shell */
.shell { max-width: 760px; margin: 0 auto; padding: 32px 24px 80px; display: grid; gap: 24px; }
.shell h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); }
.me-card { display: flex; gap: 20px; align-items: flex-start; border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
.me-card h2 { font-size: 1.5rem; }
.facts { margin: 14px 0 0; display: grid; gap: 10px; }
.facts div { display: grid; gap: 0; }
.facts dt { font-size: .85rem; color: var(--ink-soft); }
.facts dd { margin: 0; font-weight: 600; }

/* Phones and small tablets */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 48px; padding-top: 24px; padding-bottom: 64px; }
  .split { grid-template-columns: 1fr; gap: 28px; }
  .split h2 { position: static; }
  .band-inner { padding: 64px 20px; }
  .trust-grid { grid-template-columns: 1fr; gap: 28px; }
  .final { padding: 72px 20px; }
}
@media (max-width: 520px) {
  .topbar, .hero, .footer { padding-left: 16px; padding-right: 16px; }
  .two { grid-template-columns: 1fr; }
  .cta-row .btn { width: 100%; }
  .auth-card { padding: 26px 18px 24px; }
  .me-card { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- boot splash ---------- */
/* The opening sequence: the white part of the P, then the blue part, then the name, then the app. */
@keyframes rise{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes pin{from{opacity:0;transform:scale(.92)}to{opacity:1;transform:none}}

/* ---------- styled dropdowns ---------- */
.sel-native{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.sel-btn{width:100%;min-height:48px;padding:0 14px;display:flex;align-items:center;justify-content:space-between;gap:8px;border: 1px solid var(--line);border-radius:var(--radius);background: var(--card);color:var(--ink);font:inherit;text-align:left;cursor:pointer}
.sel-btn::after{content:"";width:8px;height:8px;border-right: 2px solid var(--ink-soft);border-bottom: 2px solid var(--ink-soft);transform:rotate(45deg) translateY(-2px);flex:none}
.sel-btn.is-empty{color:var(--ink-soft)}
.sel-btn:disabled{background:var(--mist);cursor:not-allowed}
.sel-btn:focus-visible{outline: 3px solid rgba(37,99,235,.35);border-color: var(--blue)}
.sel-veil{position:fixed;inset:0;z-index:10003;background:rgba(15,23,42,.45);display:flex;align-items:flex-end;justify-content:center}
.sel-sheet{width:100%;max-width:520px;max-height:75vh;display:flex;flex-direction:column;background: var(--card);border-radius:20px 20px 0 0;padding:8px 0 calc(12px + env(safe-area-inset-bottom));animation:selUp .22s ease-out}
@keyframes selUp{from{transform:translateY(40px);opacity:0}to{transform:none;opacity:1}}
.sel-grip{width:40px;height:4px;border-radius:2px;background:var(--line);margin:4px auto 8px}
.sel-title{margin:0;padding:4px 20px 10px;font-family:var(--font-display);font-weight:700}
.sel-find{margin:0 16px 8px;width:auto}
.sel-list{overflow-y:auto}
.sel-opt{display:flex;justify-content:space-between;width:100%;padding:14px 20px;border: 0;border-top: 1px solid var(--mist);background:none;color:var(--ink);font:inherit;text-align:left;cursor:pointer}
.sel-opt:hover{background:var(--mist)}
.sel-opt[aria-selected=true]{color:var(--blue);font-weight:600}
.sel-opt[aria-selected=true]::after{content:"\2713"}
.sel-none{padding:16px 20px;color:var(--ink-soft)}

/* theme switch (Account & settings) */
.thm { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 9999px; background: var(--mist); }
.thm-b { border: 0; background: none; color: var(--ink-soft); font: 600 .85rem var(--font-body); padding: 7px 16px; border-radius: 9999px; cursor: pointer; }
.thm-b.on { background: var(--blue); color: #fff; }
/* the floating P was a black disc; give it an edge so it shows on a black page */
:root:not([data-theme="light"]) .pd-fab.p { background: #1c1c1e; box-shadow: 0 0 0 1px #3a3a3c, 0 10px 24px -6px rgba(0,0,0,.6); }

/* Receipt: a paper sheet in both themes, so it reads and prints the same everywhere. */
.rcpt { background: #fff; color: #111; border-radius: 10px; padding: 22px 18px; text-align: left; max-width: 640px; margin: 14px auto 0; font-family: "Times New Roman", Georgia, serif; }
.rcpt .rc-logo { display: block; margin: 0 auto 6px; border-radius: 14px; }
.rcpt .rc-t { text-align: center; font: 700 1.5rem var(--font-display); letter-spacing: .08em; margin: 0; color: #111; }
.rcpt .rc-s { text-align: center; margin: 2px 0; font-size: .85rem; color: #333; }
.rcpt .rc-h { text-align: center; font: 600 1.05rem Arial, sans-serif; margin: 14px 0 4px; color: #111; }
.rcpt h4 { margin: 18px 0 6px; font-size: 1rem; border-top: 2px solid #111; padding-top: 8px; color: #111; }
.rcpt .rc-r { display: flex; justify-content: space-between; gap: 12px; padding: 7px 8px; border: 1px solid #bbb; margin-top: -1px; font-size: .88rem; }
.rcpt .rc-r span { color: #333; flex: 0 0 38%; } .rcpt .rc-r b { text-align: right; word-break: break-word; color: #111; }
.rcpt .rc-tb { border: 1px solid #bbb; font-size: .85rem; }
.rcpt .rc-th, .rcpt .rc-tr { display: grid; grid-template-columns: 1fr 1.4fr .9fr; gap: 8px; padding: 7px 8px; border-top: 1px solid #bbb; color: #111; }
.rcpt .rc-th { font-weight: 700; border-top: 0; } .rcpt .rc-th span:last-child, .rcpt .rc-tr span:last-child { text-align: right; }
.rcpt .rc-tot { font-weight: 700; }
.rcpt .rc-f { margin: 16px 0 0; font-size: .75rem; color: #444; text-align: center; }
.rc-acts { display: flex; gap: 10px; justify-content: center; margin: 16px 0 6px; }
.rc-acts .btn2 { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 20px; border-radius: 9999px; text-decoration: none; }
@media print {
  .pd-top, .pd-nav, .pd-fab, .rc-acts, #boot-splash { display: none !important; }
  html, body, main, .s-soon { background: #fff !important; padding: 0 !important; }
  .rcpt { border-radius: 0; max-width: none; margin: 0; }
}
.rc-acts .btn2 { background: var(--mist); color: var(--ink); border: 1px solid var(--line); font: 600 .95rem var(--font-body); cursor: pointer; }
.rc-acts .btn2.pri { background: var(--blue); border-color: var(--blue); color: #fff; }

/* Settings: icon, title and hint on the left, switch or value on the right. */
.st { max-width: 640px; margin: 0 auto; padding: 4px 0 96px; }
.st-title { margin: 0; padding: 18px 20px 8px; font: 700 1.6rem var(--font-display); letter-spacing: -.02em; color: var(--ink); }
.st-me { display: flex; align-items: center; gap: 16px; padding: 14px 20px 18px; }
.st-av { flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--blue), var(--violet)); color: #fff; font: 700 1.6rem var(--font-display); }
.st-who { min-width: 0; } .st-who b { display: block; font-size: 1.15rem; color: var(--ink); overflow-wrap: anywhere; }
.st-who small { display: block; margin-top: 2px; color: var(--ink-soft); font-size: .86rem; overflow-wrap: anywhere; }
.st-sec { border-top: 1px solid var(--line); padding: 6px 0; }
.st-h { margin: 0; padding: 14px 20px 4px; font: 600 .86rem var(--font-body); color: var(--blue-text); }
.st-r { display: flex; align-items: center; gap: 18px; width: 100%; min-height: 62px; padding: 12px 20px; margin: 0; background: none; border: 0; color: var(--ink); text-align: left; font: inherit; text-decoration: none; cursor: pointer; box-sizing: border-box; }
.st-r:active { background: var(--mist); }
.st-i { flex: none; color: var(--ink-soft); }
.st-t { flex: 1; min-width: 0; }
.st-t b { display: block; font-weight: 500; font-size: 1rem; color: var(--ink); }
.st-t small { display: block; margin-top: 2px; color: var(--ink-soft); font-size: .84rem; line-height: 1.35; font-weight: 400; }
.st-r.danger .st-t b, .st-r.danger .st-i { color: var(--danger); }
input.st-sw[type="checkbox"] { -webkit-appearance: none; appearance: none; flex: none; position: relative; box-sizing: border-box; width: 52px; min-width: 52px; max-width: 52px; height: 32px; min-height: 32px; padding: 0; margin: 0; border-radius: 16px; border: 2px solid var(--ink-soft); background: var(--mist); cursor: pointer; transition: background .15s, border-color .15s; }
input.st-sw[type="checkbox"]::after { content: ""; position: absolute; top: 50%; left: 4px; width: 20px; height: 20px; transform: translateY(-50%); border-radius: 50%; background: var(--ink-soft); transition: left .15s, width .15s, height .15s, background .15s; }
input.st-sw[type="checkbox"]:checked { background: var(--blue); border-color: var(--blue); }
input.st-sw[type="checkbox"]:checked::after { content: "✓"; left: 22px; width: 24px; height: 24px; background: #fff; color: var(--blue); font: 700 14px/24px var(--font-body); text-align: center; }
.st-btn { flex: none; border: 1px solid var(--blue); background: none; color: var(--blue-text); border-radius: 9999px; padding: 8px 16px; font: 600 .85rem var(--font-body); cursor: pointer; }
.st-btn:disabled { opacity: .5; }
.st-bl { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); color: var(--ink); } .st-bl:first-child { border-top: 0; } .st-bl small { color: var(--ink-soft); }
.st-o { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 16px 4px; background: none; border: 0; border-top: 1px solid var(--line); color: var(--ink); font: 500 1rem var(--font-body); text-align: left; cursor: pointer; }
.st-o:first-child { border-top: 0; } .st-ck { color: var(--blue); font-weight: 700; }
.st-f label { display: block; margin: 12px 0 4px; font: 600 .82rem var(--font-body); color: var(--ink-soft); }
.st-f input, .st-f textarea, .st-f select { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 12px; background: var(--mist); color: var(--ink); padding: 11px 12px; font: 400 1rem var(--font-body); }
.st-save { display: block; width: 100%; height: 46px; margin-top: 14px; border: 0; border-radius: 12px; background: var(--blue); color: #fff; font: 600 1rem var(--font-body); cursor: pointer; }
.st-save:disabled { opacity: .6; }

/* Plain checkboxes and radio buttons stay small everywhere. Settings use the switch style (st-sw). */
input[type="checkbox"]:not(.st-sw), input[type="radio"] { width: 20px; min-width: 20px; height: 20px; min-height: 0; padding: 0; margin: 0; flex: none; accent-color: var(--blue); }

/* Pedia confirm and ask boxes */
.dlg-ov{position:fixed;inset:0;z-index:10000;background:rgba(0,0,0,.6);display:grid;place-items:center;padding:20px}
.dlg{width:100%;max-width:380px;background:var(--card);color:var(--ink);border:1px solid var(--line);border-radius:22px;padding:22px 20px 16px;box-shadow:0 20px 60px rgba(0,0,0,.5)}
.dlg h3{margin:0 0 8px;font-size:1.15rem}
.dlg p{margin:0 0 14px;color:var(--ink-soft);line-height:1.45;white-space:pre-wrap}
.dlg textarea{width:100%;box-sizing:border-box;border:1px solid var(--line);border-radius:12px;background:var(--mist);color:var(--ink);padding:10px 12px;font:inherit;margin-bottom:14px}
.dlg-b{display:flex;gap:10px;justify-content:flex-end}
.dlg-b button{height:44px;padding:0 20px;border-radius:9999px;border:0;font:inherit;font-weight:600;cursor:pointer}
.dlg-c{background:var(--mist);color:var(--ink)}
.dlg-o{background:var(--ink);color:var(--on-ink,#fff)}
.dlg-o.danger{background:#dc2626;color:#fff}

/* No scroll bars, no sideways wobble */
/* The same two lines as the first Pedia: nothing can pan sideways, so the page stays firm while you scroll. */
/* clip, not hidden: it blocks sideways panning but does not turn the page into a scroll box, so the top bar stays pinned. */
html, body { overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; }
.pd-wrap { min-height: 100vh; }

/* Confirm and ask boxes: a bottom sheet that matches the story options */
.dlg-ov{place-items:end center;padding:0;animation:dlgfade .18s ease}
.dlg{max-width:560px;border:0;border-radius:26px 26px 0 0;padding:10px 20px calc(20px + env(safe-area-inset-bottom,0px));box-shadow:0 -10px 40px rgba(0,0,0,.35);animation:dlgup .22s ease}
.dlg-grab{display:block;width:44px;height:5px;border-radius:3px;background:var(--line);margin:0 auto 14px}
.dlg h3{font-size:1.2rem;margin:0 0 6px}
.dlg-b{gap:10px;justify-content:stretch}
.dlg-b button{flex:1;height:50px;padding:0 12px}
.dlg-c{border:1px solid var(--line)!important}
@keyframes dlgup{from{transform:translateY(40px);opacity:0}to{transform:none;opacity:1}}
@keyframes dlgfade{from{opacity:0}to{opacity:1}}

/* step-by-step register form */
.stp-top { display: grid; gap: 8px; margin-bottom: 14px; font-size: .85rem; color: var(--ink-soft); font-weight: 600; }
.stp-bar { height: 6px; border-radius: 6px; background: var(--mist); overflow: hidden; }
.stp-bar i { display: block; height: 100%; width: 33%; background: var(--blue); border-radius: 6px; transition: width .25s ease; }
.stp-h { font-size: 1.15rem; margin: 4px 0 14px; }
.stp .field { margin-top: 12px; }
.stp .seg + .field { margin-top: 16px; }
.stp-back { margin-top: 8px; background: transparent; color: var(--ink-soft); }
/* Admin hub */
.adh { display: flex; gap: 14px; align-items: center; margin: 12px 16px; padding: 16px; border-radius: 18px; background: linear-gradient(135deg, #3b1d12, #5b2e1f); color: #fff; }
.adh-av { flex: none; width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.18); display: grid; place-items: center; overflow: hidden; font-weight: 800; font-size: 20px; }
.adh-av img { width: 100%; height: 100%; object-fit: cover; }
.adh-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.stf { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 9999px; background: linear-gradient(135deg, #f6d365, #e0a526); color: #3b1d12; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.adh-role { padding: 3px 10px; border-radius: 9999px; border: 1px solid rgba(255,255,255,.4); font-size: .72rem; }
.adh-stat { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; margin: 0 16px 10px; }
.adh-stat div { padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.adh-stat small { display: block; color: var(--ink-soft); } .adh-stat b { font-size: 1.25rem; }
.adh-q { display: block; width: calc(100% - 32px); margin: 0 16px 6px; box-sizing: border-box; }
.adh-h { margin: 16px 16px 8px; font-size: 1rem; }
.adh-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 16px 24px; }
.adh-c { position: relative; text-align: left; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink); cursor: pointer; display: grid; gap: 4px; }
.adh-c small { color: var(--ink-soft); line-height: 1.3; }
.adh-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--mist); display: grid; place-items: center; }
.adh-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.adh-c .adh-n { position: absolute; top: 10px; right: 10px; }
.adh-n { font-style: normal; min-width: 22px; padding: 2px 7px; border-radius: 9999px; background: #c0392b; color: #fff; font-size: .75rem; font-weight: 700; text-align: center; }
.adh-list { margin: 0 16px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); overflow: hidden; }
.adh-r { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.adh-r:first-child { border-top: 0; } .adh-r span { flex: 1; min-width: 0; } .adh-r small { display: block; color: var(--ink-soft); }
.adh-r em { font-style: normal; color: var(--ink-soft); font-size: 1.3rem; }
.adh-back { margin: 4px 16px 0; background: none; border: 0; color: var(--ink); font-size: .95rem; padding: 8px 0; cursor: pointer; }
.adh-ok { margin: 12px 16px; padding: 12px 14px; border-radius: 14px; background: var(--mist); }
