:root {
  --bg: #0f0d13;
  --surface: #17141d;
  --surface-2: #1f1b27;
  --border: #2c2636;
  --text: #f1ecf6;
  --muted: #9b91aa;
  --accent: #c792ff;
  --accent-ink: #1a0f26;
  --gold: #f2d49b;
  --danger: #ff7b8a;
  --ok: #7be0b0;
  --radius: 14px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 16px/1.55 var(--sans); min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--accent); text-underline-offset: 3px; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; }
h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 0 0 0.5rem; }
h2 { font-size: 1.3rem; margin: 1.5rem 0 0.5rem; }
main { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 24px; }
main.wide { max-width: 1200px; }
.narrow main { max-width: 480px; }
.prose main { max-width: 680px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.75rem; color: var(--gold); margin: 0 0 0.75rem; }
.break { word-break: break-all; }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; border-bottom: 1px solid var(--border); }
.topbar nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.topbar nav a:not(.btn) { color: var(--text); text-decoration: none; opacity: 0.85; }
.topbar nav a:not(.btn):hover { opacity: 1; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }
.brand-mark { width: 22px; height: 22px; border-radius: 50%; background: conic-gradient(from 200deg, var(--accent), var(--gold), var(--accent)); box-shadow: 0 0 18px rgba(199, 146, 255, 0.45); }
.tag { font-family: var(--sans); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold); border: 1px solid var(--border); padding: 2px 8px; border-radius: 99px; }
.inline { display: inline; margin: 0; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 600 0.95rem var(--sans); padding: 10px 18px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #d6aeff; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-danger { background: transparent; color: var(--danger); border-color: rgba(255, 123, 138, 0.4); }
.btn-danger:hover { background: rgba(255, 123, 138, 0.08); }
.btn-small { padding: 5px 12px; font-size: 0.82rem; }
.btn:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- cards & forms ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; margin: 16px 0; }
.form { display: flex; flex-direction: column; }
.form label { font-size: 0.9rem; font-weight: 600; margin: 14px 0 6px; }
.form .btn { margin-top: 22px; align-self: flex-start; }
input, textarea, select { width: 100%; font: 1rem var(--sans); color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; }
input[aria-invalid="true"] { border-color: var(--danger); }
input[type="checkbox"] { width: auto; accent-color: var(--accent); margin: 3px 0 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 !important; }
.hint { font-size: 0.82rem; color: var(--muted); margin: 6px 0 0; }
.field-error { color: var(--danger); font-size: 0.85rem; margin: 6px 0 0; }
.addr-input { display: flex; align-items: stretch; }
.addr-input input { border-radius: 10px 0 0 10px; }
.addr-input span { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--border); border-left: 0; border-radius: 0 10px 10px 0; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
.alert { padding: 12px 14px; border-radius: 10px; margin: 12px 0; font-size: 0.92rem; }
.alert-error { background: rgba(255, 123, 138, 0.1); border: 1px solid rgba(255, 123, 138, 0.35); }
.alert-ok { background: rgba(123, 224, 176, 0.1); border: 1px solid rgba(123, 224, 176, 0.35); }
.alert-info { background: rgba(199, 146, 255, 0.08); border: 1px solid rgba(199, 146, 255, 0.3); }
.addr { font-family: var(--mono); font-size: clamp(1.1rem, 3vw, 1.5rem); word-break: break-all; }
.settings { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; font-size: 0.92rem; }
.settings dt { color: var(--muted); }
.settings dd { margin: 0; }

/* ---------- background layer ---------- */
html { background: var(--bg); }
body { background: transparent; position: relative; }
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: radial-gradient(120% 80% at 50% -10%, #1d1430 0%, var(--bg) 55%); }
.aurora { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.55; will-change: transform; }
.aurora.a1 { width: 55vmax; height: 55vmax; left: -15vmax; top: -20vmax; background: radial-gradient(circle, rgba(167, 92, 255, 0.55), transparent 65%); animation: drift1 26s ease-in-out infinite alternate; }
.aurora.a2 { width: 45vmax; height: 45vmax; right: -12vmax; top: 10vh; background: radial-gradient(circle, rgba(242, 180, 120, 0.35), transparent 65%); animation: drift2 32s ease-in-out infinite alternate; }
.aurora.a3 { width: 50vmax; height: 50vmax; left: 25vw; bottom: -30vmax; background: radial-gradient(circle, rgba(80, 140, 255, 0.35), transparent 65%); animation: drift3 38s ease-in-out infinite alternate; }
.fx-lite .aurora { opacity: 0.28; }
@keyframes drift1 { to { transform: translate(18vw, 14vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-16vw, 20vh) scale(0.9); } }
@keyframes drift3 { to { transform: translate(-12vw, -18vh) scale(1.2); } }
#fx { position: absolute; inset: 0; width: 100%; height: 100%; }
.grain { position: absolute; inset: -50%; opacity: 0.07; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); animation: grain 1.2s steps(6) infinite; }
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -4%); } 60% { transform: translate(-4%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); } }

/* ---------- glass ---------- */
.glass { background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015)); border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 20px; backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); box-shadow: 0 20px 60px -30px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.glass-bar { position: sticky; top: 0; z-index: 20; background: rgba(15, 13, 19, 0.55); backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%); border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.spot { position: relative; overflow: hidden; }
.spot::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.3s; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(199, 146, 255, 0.16), transparent 45%); }
.spot:hover::before { opacity: 1; }
.spot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity 0.3s; background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(242, 212, 155, 0.7), transparent 60%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.spot:hover::after { opacity: 1; }

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); filter: blur(6px); transition: opacity 0.9s cubic-bezier(.2,.7,.2,1) var(--d, 0ms), transform 0.9s cubic-bezier(.2,.7,.2,1) var(--d, 0ms), filter 0.9s ease var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; filter: none; }
.split .word { display: inline-block; opacity: 0; transform: translateY(0.6em) rotate(4deg); filter: blur(8px); transition: opacity 0.8s ease, transform 0.9s cubic-bezier(.2,.8,.2,1), filter 0.8s ease; transition-delay: calc(var(--i) * 90ms + 150ms); }
.in .word, .split.in .word { opacity: 1; transform: none; filter: none; }

/* ---------- landing ---------- */
.landing-main { max-width: 1160px; padding-top: 0; }
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 40px; align-items: center; min-height: calc(100vh - 80px); padding: 40px 0 60px; }
.live-pill { display: inline-flex; align-items: center; gap: 10px; font-size: 0.8rem; letter-spacing: 0.04em; color: #e8dcff; padding: 6px 14px 6px 10px; border-radius: 99px; border: 1px solid rgba(199, 146, 255, 0.3); background: rgba(199, 146, 255, 0.08); }
.live-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(123, 224, 176, 0.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(123, 224, 176, 0); } 100% { box-shadow: 0 0 0 0 rgba(123, 224, 176, 0); } }
.hero-title { font-size: clamp(3rem, 8.5vw, 6.4rem); line-height: 0.98; letter-spacing: -0.035em; margin: 22px 0 22px; color: var(--text); }
.shine { background: linear-gradient(100deg, var(--gold) 0%, #fff4da 20%, var(--accent) 45%, #8fc3ff 65%, var(--gold) 90%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 7s linear infinite; font-style: italic; padding-right: 0.08em; }
@keyframes shine { to { background-position: -250% 0; } }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: #d4cadf; max-width: 560px; }
.cta { display: flex; gap: 14px; margin: 32px 0 26px; flex-wrap: wrap; }
.magnetic { transform: translate(var(--tx, 0), var(--ty, 0)); transition: transform 0.25s cubic-bezier(.2,.8,.2,1), box-shadow 0.25s, background 0.2s, border-color 0.2s; }
.btn-glow { position: relative; color: #160b22; padding: 14px 26px; font-size: 1rem; background: linear-gradient(110deg, var(--accent), #e7b8ff 40%, var(--gold) 80%); background-size: 200% 100%; box-shadow: 0 10px 40px -8px rgba(199, 146, 255, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.5); animation: glowshift 6s ease-in-out infinite alternate; }
.btn-glow:hover { box-shadow: 0 14px 50px -6px rgba(199, 146, 255, 0.95), 0 0 0 4px rgba(199, 146, 255, 0.15); }
.btn-glow span:last-child { transition: transform 0.25s; }
.btn-glow:hover span:last-child { transform: translateX(4px); }
@keyframes glowshift { to { background-position: 100% 0; } }
.landing .btn-ghost { padding: 14px 24px; font-size: 1rem; background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(8px); }
.address-preview { font-family: var(--mono); color: var(--muted); font-size: clamp(1rem, 2vw, 1.2rem); display: flex; align-items: center; }
.typer { color: var(--accent); text-shadow: 0 0 18px rgba(199, 146, 255, 0.6); }
.caret { display: inline-block; width: 2px; height: 1.2em; background: var(--accent); margin: 0 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* invite ticket */
.hero-art { position: relative; display: grid; place-items: center; min-height: 420px; perspective: 1200px; }
.ticket { position: relative; width: min(400px, 88%); aspect-ratio: 1.6; border-radius: 22px; transform-style: preserve-3d; transform: rotateX(var(--rx, 6deg)) rotateY(var(--ry, -14deg)); transition: transform 0.6s cubic-bezier(.2,.8,.2,1); animation: float 7s ease-in-out infinite; z-index: 2; }
.ticket.tilting { transition: transform 0.08s linear; animation-play-state: paused; }
@keyframes float { 50% { translate: 0 -14px; } }
.ticket-foil { position: absolute; inset: 0; border-radius: inherit; background: conic-gradient(from 210deg at 30% 40%, #2a1745, #3b1f63, #6b3fa0, #c792ff, #f2d49b, #8fc3ff, #3b1f63, #2a1745); box-shadow: 0 40px 80px -20px rgba(120, 60, 200, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.15) inset; }
.ticket-foil::after { content: ""; position: absolute; inset: 1px; border-radius: 21px; background: linear-gradient(150deg, rgba(20, 12, 32, 0.92), rgba(30, 18, 48, 0.75)); }
.ticket-glare { position: absolute; inset: 0; border-radius: inherit; z-index: 3; pointer-events: none; mix-blend-mode: soft-light; background: radial-gradient(circle at var(--gx, 30%) var(--gy, 20%), rgba(255, 255, 255, 0.7), transparent 45%), repeating-linear-gradient(115deg, transparent 0 12px, rgba(255, 255, 255, 0.05) 12px 14px); }
.ticket-inner { position: absolute; inset: 0; z-index: 2; padding: 24px 26px; display: flex; flex-direction: column; justify-content: space-between; transform: translateZ(40px); }
.ticket-top, .ticket-bottom { display: flex; justify-content: space-between; align-items: center; font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.7); }
.ticket-brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--serif); font-size: 1rem; letter-spacing: 0; text-transform: none; color: #fff; }
.ticket-brand .brand-mark { width: 16px; height: 16px; }
.ticket-admit { color: var(--gold); border: 1px solid rgba(242, 212, 155, 0.5); padding: 3px 8px; border-radius: 6px; }
.ticket-label { margin: 0 0 4px; font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.ticket-code { margin: 0; font-family: var(--mono); font-size: clamp(1rem, 2.4vw, 1.35rem); color: #fff; letter-spacing: 0.06em; }
.ticket-code b { color: var(--accent); font-weight: 600; }
.ticket-seal { color: var(--ok); }
.ticket-notch { position: absolute; top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%; background: var(--bg); z-index: 4; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.ticket-notch.l { left: -13px; } .ticket-notch.r { right: -13px; }
.orbit { position: absolute; border-radius: 50%; border: 1px dashed rgba(199, 146, 255, 0.25); }
.orbit.o1 { width: 118%; aspect-ratio: 1; animation: spin 60s linear infinite; }
.orbit.o2 { width: 88%; aspect-ratio: 1; border-color: rgba(242, 212, 155, 0.18); animation: spin 40s linear infinite reverse; }
.orbit::before { content: ""; position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.orbit.o2::before { background: var(--gold); box-shadow: 0 0 14px var(--gold); }
@keyframes spin { to { transform: rotate(360deg); } }

/* marquee */
.marquee { overflow: hidden; border-block: 1px solid rgba(255, 255, 255, 0.07); margin: 0 -24px 64px; padding: 16px 0; -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 28px; width: max-content; animation: marquee 40s linear infinite; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8rem; color: #bcb2c9; white-space: nowrap; }
.marquee-track .sep { color: var(--gold); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* pillars & steps */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin: 0 0 96px; }
.pillars article { padding: 28px 24px; transition: transform 0.4s cubic-bezier(.2,.8,.2,1); }
.pillars article:hover { transform: translateY(-6px); }
.pillars h2 { margin: 18px 0 8px; font-size: 1.2rem; color: var(--text); }
.pillars p { margin: 0; color: #c9bfd6; font-size: 0.95rem; }
.ico-wrap { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: var(--gold); background: linear-gradient(140deg, rgba(199, 146, 255, 0.25), rgba(242, 212, 155, 0.08)); border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 8px 24px -10px rgba(199, 146, 255, 0.8); }
.ico { width: 24px; height: 24px; }
.section-title { font-size: clamp(2rem, 4.5vw, 3rem); text-align: center; margin: 0 0 36px; }
.steps ol { list-style: none; padding: 0; margin: 0 0 96px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; counter-reset: s; }
.steps li { padding: 30px 26px; }
.steps li .ico { color: var(--accent); width: 28px; height: 28px; }
.steps h3 { font-family: var(--serif); font-size: 1.3rem; margin: 14px 0 8px; }
.steps p { margin: 0; color: #c9bfd6; }
.step-n { position: absolute; top: 14px; right: 20px; font-family: var(--serif); font-size: 3.4rem; line-height: 1; font-weight: 700; background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rules { max-width: 760px; margin: 0 auto 96px; padding: 30px 34px; }
.rules h2 { margin-top: 0; }
.rules li { margin: 10px 0; color: #d4cadf; }
.final-cta { text-align: center; padding: 40px 0 90px; }
.final-cta h2 { font-size: clamp(1.8rem, 4.5vw, 3.2rem); margin: 0 auto 28px; max-width: 760px; }
.footer { border-top: 1px solid rgba(255, 255, 255, 0.06); }

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: 28px; gap: 10px; }
  .hero-art { min-height: 300px; order: -1; }
  .ticket { width: min(320px, 82%); }
}

/* ---------- forms & cards on top of the background ---------- */
.card { background: linear-gradient(160deg, rgba(31, 27, 39, 0.82), rgba(23, 20, 29, 0.72)); border-color: rgba(255, 255, 255, 0.08); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.05); border-radius: 20px; }
.narrow main > .card, .narrow main > form.card { animation: rise 0.7s cubic-bezier(.2,.8,.2,1) both; margin-top: 7vh; }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(0.98); } }
input, textarea, select { background: rgba(10, 8, 14, 0.6); transition: border-color 0.2s, box-shadow 0.2s; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(199, 146, 255, 0.15); }
.btn-primary { background: linear-gradient(110deg, var(--accent), #e2b6ff 60%, var(--gold)); box-shadow: 0 8px 30px -10px rgba(199, 146, 255, 0.8); }
.btn-primary:hover { background: linear-gradient(110deg, #d6aeff, #ecc9ff 60%, #f6dfb2); box-shadow: 0 10px 36px -8px rgba(199, 146, 255, 1); }
.stat, .pillars article { backdrop-filter: blur(12px); }
.stat { background: rgba(23, 20, 29, 0.7); border-radius: 18px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .split .word { opacity: 1; transform: none; filter: none; }
}

/* ---------- admin ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 16px 0; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; color: var(--muted); font-size: 0.85rem; display: flex; flex-direction: column; justify-content: center; }
.stat span { display: block; font-family: var(--serif); font-size: 1.8rem; color: var(--text); }
.row { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 14px; align-items: start; }
.row .end { align-self: end; }
.row-form h2 { margin-top: 0; }
.row-form .btn { margin-top: 0; }
@media (max-width: 720px) { .row { grid-template-columns: 1fr; } }
.new-code { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(199, 146, 255, 0.12); }
.new-code .code { font-family: var(--mono); font-size: clamp(1.1rem, 3vw, 1.7rem); letter-spacing: 0.04em; margin: 4px 0 10px; user-select: all; word-break: break-all; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
th, td { padding: 10px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.pill { font-size: 0.75rem; padding: 2px 10px; border-radius: 99px; border: 1px solid var(--border); white-space: nowrap; }
.pill-active { color: var(--ok); border-color: rgba(123, 224, 176, 0.4); }
.pill-used, .pill-expired { color: var(--muted); }
.pill-revoked { color: var(--danger); border-color: rgba(255, 123, 138, 0.4); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.danger-zone summary { list-style: none; }
.danger-zone summary::-webkit-details-marker { display: none; }
.danger-zone[open] .form { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-top: 8px; min-width: 260px; }
.danger-zone .form label { font-weight: 400; }

/* ---------- web inbox ---------- */
body.app { height: 100vh; overflow: hidden; }
#app { flex: 1; display: grid; grid-template-columns: 230px minmax(300px, 400px) 1fr; height: 100vh; }
.side { border-right: 1px solid var(--border); padding: 16px 12px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.side .brand { padding: 4px 8px 14px; }
.side .compose-btn { margin: 0 4px 12px; }
.folder { display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; background: none; border: 0; color: var(--text); font: 0.95rem var(--sans); padding: 8px 12px; border-radius: 10px; cursor: pointer; }
.folder:hover { background: var(--surface); }
.folder.active { background: var(--surface-2); color: var(--accent); }
.folder .count { font-size: 0.78rem; color: var(--accent); font-weight: 700; }
.side .spacer { flex: 1; }
.side .me { font-size: 0.8rem; color: var(--muted); padding: 8px 12px; word-break: break-all; }
.side .side-links { display: flex; gap: 8px; padding: 0 8px; flex-wrap: wrap; }
.list { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.list-head { padding: 12px; border-bottom: 1px solid var(--border); display: flex; gap: 8px; }
.list-head input { padding: 8px 12px; }
.list-body { overflow-y: auto; flex: 1; }
.msg { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--border); background: none; color: var(--text); padding: 12px 16px; cursor: pointer; font: inherit; }
.msg:hover { background: var(--surface); }
.msg.active { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }
.msg .top { display: flex; justify-content: space-between; gap: 8px; font-size: 0.9rem; }
.msg .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg .when { color: var(--muted); font-size: 0.78rem; white-space: nowrap; }
.msg .subj { font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.msg .prev { font-size: 0.82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg.unread .who, .msg.unread .subj { font-weight: 700; }
.msg.unread .who::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 7px; vertical-align: middle; }
.list-foot { padding: 10px; text-align: center; }
.empty { color: var(--muted); padding: 40px 20px; text-align: center; }
.reader { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.reader-head { padding: 18px 24px 12px; border-bottom: 1px solid var(--border); }
.reader-head h1 { font-size: 1.4rem; margin: 0 0 10px; word-break: break-word; }
.meta { font-size: 0.85rem; color: var(--muted); }
.meta b { color: var(--text); font-weight: 600; }
.toolbar { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.toolbar select { width: auto; padding: 5px 10px; font-size: 0.82rem; border-radius: 999px; }
.notice { font-size: 0.82rem; color: var(--gold); margin-top: 8px; }
.atts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.att { font-size: 0.82rem; border: 1px solid var(--border); border-radius: 8px; padding: 4px 10px; color: var(--text); text-decoration: none; }
.att:hover { border-color: var(--accent); }
.reader iframe { flex: 1; width: 100%; border: 0; background: #fff; }
.back { display: none; }

/* compose / dialogs */
dialog { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); padding: 0; width: min(720px, 96vw); max-height: 92vh; }
dialog::backdrop { background: rgba(5, 4, 8, 0.7); }
dialog form { padding: 22px; display: flex; flex-direction: column; gap: 8px; }
dialog h2 { margin: 0 0 6px; }
dialog textarea { min-height: 260px; resize: vertical; font-family: var(--sans); }
dialog .row-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; align-items: center; }
dialog .row-btns .grow { flex: 1; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 0.8rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; display: inline-flex; gap: 6px; align-items: center; }
.chip button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; font-size: 1rem; line-height: 1; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--surface-2); border: 1px solid var(--border); padding: 10px 18px; border-radius: 999px; font-size: 0.9rem; z-index: 10; }
.toast.err { border-color: var(--danger); color: var(--danger); }
.hidden { display: none !important; }

@media (max-width: 900px) {
  #app { grid-template-columns: minmax(0, 1fr); }
  .list, .reader { min-width: 0; }
  .side { display: none; }
  #app.show-side .side { display: flex; position: fixed; inset: 0; background: var(--bg); z-index: 5; }
  #app.reading .list { display: none; }
  #app:not(.reading) .reader { display: none; }
  .back, .menu-btn { display: inline-flex; }
}
@media (min-width: 901px) { .menu-btn { display: none; } }

/* ---------- inbox on the glass background ---------- */
.app .side { background: rgba(12, 10, 17, 0.62); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-right-color: rgba(255, 255, 255, 0.06); }
.app .list { background: rgba(15, 13, 20, 0.5); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-right-color: rgba(255, 255, 255, 0.06); }
.app .reader { background: rgba(15, 13, 20, 0.35); }
.app .msg { border-bottom-color: rgba(255, 255, 255, 0.05); transition: background 0.15s; }
.app .msg:hover { background: rgba(255, 255, 255, 0.04); }
.app .msg.active { background: linear-gradient(90deg, rgba(199, 146, 255, 0.16), rgba(199, 146, 255, 0.03)); }
.app .folder.active { background: linear-gradient(90deg, rgba(199, 146, 255, 0.2), rgba(199, 146, 255, 0.04)); }
.app .msg.unread .who::before { box-shadow: 0 0 10px var(--accent); }
.app .reader iframe { border-radius: 14px 14px 0 0; margin: 12px 12px 0; width: calc(100% - 24px); }
dialog { background: linear-gradient(160deg, rgba(31, 27, 39, 0.96), rgba(20, 17, 26, 0.96)); border-color: rgba(255, 255, 255, 0.1); border-radius: 20px; box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(199, 146, 255, 0.08); }
dialog[open] { animation: rise 0.35s cubic-bezier(.2,.8,.2,1); }
dialog::backdrop { backdrop-filter: blur(6px); }
.toast { backdrop-filter: blur(12px); animation: rise 0.3s ease; }

/* ---------- phishing warnings ---------- */
.risk-tag { display: inline-block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 1px 7px; border-radius: 6px; margin-right: 6px; vertical-align: 1px; }
.risk-tag.danger { color: #fff; background: linear-gradient(110deg, #ff5d73, #ff8a5c); box-shadow: 0 0 14px -2px rgba(255, 93, 115, 0.7); }
.risk-tag.caution { color: #2a1b00; background: var(--gold); }
.msg.risk-danger { box-shadow: inset 3px 0 0 #ff5d73; }
.msg.risk-caution { box-shadow: inset 3px 0 0 var(--gold); }
.phish { margin-top: 12px; padding: 14px 16px; border-radius: 14px; font-size: 0.88rem; border: 1px solid; animation: rise 0.4s ease; }
.phish.danger { background: linear-gradient(135deg, rgba(255, 93, 115, 0.16), rgba(255, 138, 92, 0.06)); border-color: rgba(255, 93, 115, 0.55); box-shadow: 0 0 40px -16px rgba(255, 93, 115, 0.9); }
.phish.caution { background: rgba(242, 212, 155, 0.08); border-color: rgba(242, 212, 155, 0.45); }
.phish-title { font-weight: 700; font-size: 0.98rem; }
.phish.danger .phish-title { color: #ff8b9b; }
.phish.caution .phish-title { color: var(--gold); }
.phish p { margin: 6px 0; color: #e4dbee; }
.phish ul { margin: 6px 0 4px; padding-left: 20px; color: #e4dbee; }
.phish li { margin: 3px 0; }
.phish .phish-foot { font-size: 0.76rem; color: var(--muted); margin-bottom: 0; }
.stat small { font-family: var(--sans); font-size: 0.8rem; color: var(--muted); }
.stat-alert { border-color: rgba(255, 93, 115, 0.5); box-shadow: 0 0 30px -14px rgba(255, 93, 115, 0.9); }

/* ---------- admin panel ---------- */
body.admin { min-height: 100vh; }
.ad { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.ad-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 22px 14px; background: rgba(12, 10, 17, 0.66); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-right: 1px solid rgba(255, 255, 255, 0.06); }
.ad-side .brand { padding: 0 10px 18px; font-size: 1.1rem; }
.ad-nav { display: flex; flex-direction: column; gap: 3px; }
.ad-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: #cfc6da; text-decoration: none; font-size: 0.94rem; transition: background 0.15s, color 0.15s; position: relative; }
.ad-nav a:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.ad-nav a.on { color: #fff; background: linear-gradient(90deg, rgba(199, 146, 255, 0.24), rgba(199, 146, 255, 0.05)); box-shadow: inset 0 0 0 1px rgba(199, 146, 255, 0.25); }
.ad-nav a.on::before { content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.ad-nav .ico { width: 19px; height: 19px; flex: none; }
.ad-me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.ad-me .avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #1a0f26; background: conic-gradient(from 200deg, var(--accent), var(--gold), var(--accent)); flex: none; }
.ad-me .who { flex: 1; min-width: 0; font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; }
.ad-me .who small { display: block; color: var(--muted); font-size: 0.74rem; }
.ad-main { padding: 28px clamp(16px, 3vw, 40px) 60px; min-width: 0; max-width: 1320px; }
.ad-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.ad-head h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 0; word-break: break-word; }
.ad-head p { margin: 4px 0 0; }
.ad-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.admin .card { margin: 0 0 18px; padding: 22px 24px; }
.admin .card h2 { margin-top: 0; font-size: 1.15rem; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.admin .card h3 { font-size: 0.95rem; margin: 18px 0 6px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile { padding: 16px 18px; border-radius: 18px; position: relative; overflow: hidden; }
.tile::after { content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle, rgba(199, 146, 255, 0.22), transparent 70%); }
.tile-label { margin: 0; color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }
.tile-value { margin: 6px 0 2px; font-family: var(--serif); font-size: 1.75rem; font-weight: 600; line-height: 1.1; word-break: break-word; }
.tile-sub { margin: 0; color: var(--muted); font-size: 0.8rem; }
.tile-alert { border-color: rgba(255, 93, 115, 0.5); box-shadow: 0 0 34px -14px rgba(255, 93, 115, 0.9); }
.tile-alert .tile-value { color: #ff8b9b; }
.tile-alert::after { background: radial-gradient(circle, rgba(255, 93, 115, 0.3), transparent 70%); }
.charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-bottom: 18px; }
.chart { margin: 0; padding: 16px 16px 10px; border-radius: 18px; }
.chart figcaption { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; font-size: 0.85rem; color: #cfc6da; }
.chart figcaption b { margin-left: auto; font-family: var(--serif); font-size: 1.35rem; color: var(--text); }
.chart figcaption small { color: var(--muted); }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .axis { stroke: rgba(255, 255, 255, 0.1); }
.chart .bar-hit { fill: transparent; }
.chart g:hover .bar-hit { fill: rgba(255, 255, 255, 0.04); }
.chart .bar-zero { fill: rgba(255, 255, 255, 0.08); }
.chart text { fill: var(--muted); font-size: 8px; text-anchor: middle; font-family: var(--sans); }
.c-violet .bar { fill: #c792ff; }
.c-blue .bar { fill: #8fc3ff; }
.c-gold .bar { fill: #f2d49b; }
.c-red .bar { fill: #ff6b81; }
.chart .bar { transition: opacity 0.15s; opacity: 0.85; }
.chart g:hover .bar { opacity: 1; }
.ad-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.ad-grid > .card { margin: 0; }
.span-2 { grid-column: 1 / -1; }
.status-list, .checks { list-style: none; padding: 0; margin: 0; }
.status-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.status-list li:last-child { border-bottom: 0; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot.ok { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.dot.warn { background: #ff8a5c; box-shadow: 0 0 10px #ff8a5c; }
.dot.info { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.dot.idle { background: var(--muted); }
.checks li { padding: 6px 0 6px 26px; position: relative; color: #d4cadf; font-size: 0.92rem; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.rank { margin: 0; padding: 0; list-style: none; counter-reset: r; }
.rank li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); counter-increment: r; }
.rank li::before { content: counter(r); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 0.75rem; background: rgba(199, 146, 255, 0.15); color: var(--accent); }
.rank li b { margin-left: auto; }
table.compact td, table.compact th { padding: 7px 8px; }
.nowrap { white-space: nowrap; }
.act { font-family: var(--mono); font-size: 0.78rem; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.act-good { color: var(--ok); background: rgba(123, 224, 176, 0.1); }
.act-bad { color: #ff8b9b; background: rgba(255, 93, 115, 0.12); }
.act-warn { color: var(--gold); background: rgba(242, 212, 155, 0.1); }
.act-info { color: #bcb2c9; background: rgba(255, 255, 255, 0.05); }
.meter { display: inline-block; width: 70px; vertical-align: middle; margin-left: 6px; }
.meter svg { width: 100%; height: 6px; display: block; }
.meter-bg { fill: rgba(255, 255, 255, 0.08); }
.meter-fill { fill: var(--accent); }
.meter.hot .meter-fill { fill: #ff6b81; }
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 16px !important; }
.filters input { flex: 1; min-width: 200px; padding: 9px 12px; }
.filters select { width: auto; padding: 9px 12px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs a { padding: 6px 12px; border-radius: 999px; color: #cfc6da; text-decoration: none; font-size: 0.86rem; border: 1px solid transparent; }
.tabs a:hover { background: rgba(255, 255, 255, 0.05); }
.tabs a.on { color: #fff; border-color: rgba(199, 146, 255, 0.4); background: rgba(199, 146, 255, 0.14); }
.tabs small { color: var(--muted); margin-left: 3px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.code-list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 8px; }
.code-list li { padding: 8px 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.25); }
.code-list .code { margin: 0; }
.action-list { list-style: none; padding: 0; margin: 0 0 16px; }
.action-list li { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.action-list p { margin: 2px 0 0; }
.danger-zone.big[open] .form { margin-top: 10px; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: rgba(0, 0, 0, 0.2); cursor: pointer; font-weight: 400 !important; margin: 0 !important; transition: border-color 0.15s, background 0.15s; }
.choice:hover { border-color: rgba(199, 146, 255, 0.45); }
.choice:has(input:checked) { border-color: var(--accent); background: rgba(199, 146, 255, 0.1); box-shadow: 0 0 24px -12px var(--accent); }
.choice input { width: auto; accent-color: var(--accent); margin-top: 4px; }
.choice span { display: flex; flex-direction: column; }
.choice small { color: var(--muted); font-size: 0.8rem; }
.switch { display: flex !important; align-items: center; gap: 12px; cursor: pointer; font-weight: 500 !important; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 44px; height: 24px; border-radius: 99px; background: rgba(255, 255, 255, 0.12); position: relative; transition: background 0.2s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.switch input:checked + .track { background: linear-gradient(110deg, var(--accent), var(--gold)); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.settings-form .form .btn { align-self: auto; }
.sticky-save { position: sticky; bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: 16px; z-index: 5; }
.sticky-save .btn { margin: 0 !important; }
.admin .form .btn { align-self: flex-start; }
.announce { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; margin: 10px 12px 0; border-radius: 12px; font-size: 0.86rem; background: linear-gradient(110deg, rgba(199, 146, 255, 0.18), rgba(242, 212, 155, 0.1)); border: 1px solid rgba(199, 146, 255, 0.35); }
.announce b { color: var(--gold); }
@media (max-width: 980px) {
  .ad { grid-template-columns: minmax(0, 1fr); }
  .ad-side { position: sticky; height: auto; flex-direction: row; align-items: center; padding: 10px 12px; z-index: 10; overflow-x: auto; }
  .ad-side .brand { padding: 0 8px 0 0; }
  .ad-side .brand .tag { display: none; }
  .ad-nav { flex-direction: row; }
  .ad-nav a { padding: 8px 10px; white-space: nowrap; }
  .ad-nav a span { display: none; }
  .ad-nav a.on::before { display: none; }
  .ad-me { margin: 0 0 0 auto; padding: 0; border: 0; }
  .ad-me .who, .ad-me .avatar { display: none; }
  .ad-grid, .grid-5, .grid-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 980px) {
  .ad-side .brand { font-size: 0; gap: 0; }
  .ad-side .brand .brand-mark { width: 26px; height: 26px; }
  .ad-me .btn { padding: 5px 10px; white-space: nowrap; }
}
dialog .row-btns select { flex: 1; width: auto; } dialog .row-btns .btn { white-space: nowrap; }
.offline { text-align: center; } .offline img { border-radius: 18px; margin: 0 auto 8px; display: block; }
.app-page .app-icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 20px 50px -14px rgba(199, 146, 255, 0.8); display: block; margin-bottom: 18px; }
.prose main:has(.app-page) { max-width: 880px; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 22px 0; }
.app-grid section { padding: 18px 20px; }
.app-grid h2 { margin-top: 0; font-size: 1.1rem; }
.app-grid ol { padding-left: 20px; margin: 0 0 8px; }
.app-grid li { margin: 6px 0; }
.steps-mini { padding-left: 20px; margin: 6px 0; }
.steps-mini li { margin: 4px 0; }
@media (display-mode: standalone) { .footer { padding-bottom: calc(28px + env(safe-area-inset-bottom)); } }
.footer { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; padding: 28px; color: var(--muted); font-size: 0.85rem; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--text); }

/* ---------- security: home "under the hood" ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 26px; }
.chip-spec { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.04em; color: #e8dcff; padding: 5px 11px; border-radius: 8px; border: 1px solid rgba(199, 146, 255, 0.28); background: linear-gradient(140deg, rgba(199, 146, 255, 0.12), rgba(242, 212, 155, 0.04)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.hood { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 44px; align-items: center; margin: 0 0 96px; }
.hood h2 { font-size: clamp(2rem, 4.5vw, 3rem); margin: 0 0 16px; }
.hood-copy > p:not(.eyebrow) { color: #d4cadf; font-size: 1.05rem; }
.terminal { border-radius: 18px; overflow: hidden; box-shadow: 0 40px 90px -40px rgba(120, 60, 200, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); background: rgba(255, 255, 255, 0.03); }
.term-bar span { width: 11px; height: 11px; border-radius: 50%; background: #3a3345; }
.term-bar span:nth-child(1) { background: #ff7b8a; } .term-bar span:nth-child(2) { background: var(--gold); } .term-bar span:nth-child(3) { background: var(--ok); }
.term-bar b { margin-left: 10px; font: 500 0.75rem var(--mono); color: var(--muted); letter-spacing: 0.04em; }
.terminal pre { margin: 0; padding: 20px 22px 24px; font: 0.86rem/1.85 var(--mono); color: #e6def0; overflow-x: auto; white-space: pre; }
.t-dim { color: #7d7290; } .t-ok { color: var(--ok); } .t-key { color: var(--accent); } .t-hex { color: var(--gold); }
@media (max-width: 860px) { .hood { grid-template-columns: minmax(0, 1fr); gap: 26px; } .terminal pre { font-size: 0.76rem; } }

/* ---------- security page ---------- */
.sec-hero { text-align: center; padding: 60px 0 36px; }
.sec-hero .lede { margin: 0 auto; }
.sec-hero .chips { justify-content: center; max-width: 760px; margin: 28px auto 0; }
.sec h2 { color: var(--text); }
.diagram { margin: 24px 0 72px; padding: 22px 22px 16px; border-radius: 24px; }
.diagram svg { display: block; width: 100%; height: auto; overflow: visible; }
.diagram figcaption { color: var(--muted); font-size: 0.85rem; text-align: center; margin-top: 8px; }
.dg-node rect { fill: rgba(23, 20, 29, 0.92); stroke: rgba(255, 255, 255, 0.14); stroke-width: 1.2; }
.dg-node.dg-hot rect { stroke: url(#dg-seal); stroke-width: 2; fill: rgba(60, 32, 92, 0.75); filter: drop-shadow(0 0 14px rgba(199, 146, 255, 0.45)); }
.dg-node.dg-you rect { stroke: rgba(123, 224, 176, 0.55); fill: rgba(20, 40, 34, 0.75); }
.dg-title { fill: var(--text); font: 600 15px var(--sans); text-anchor: middle; }
.dg-sub { fill: #a89cb8; font: 11.5px var(--mono); text-anchor: middle; }
.dg-hot .dg-title { fill: #f3e6ff; }
.dg-link { stroke: rgba(199, 146, 255, 0.45); stroke-width: 1.6; fill: none; stroke-dasharray: 5 6; animation: dash 1.4s linear infinite; }
.dg-store { stroke: rgba(242, 212, 155, 0.55); }
@keyframes dash { to { stroke-dashoffset: -22; } }
.dg-arrowhead { fill: rgba(199, 146, 255, 0.8); }
.dg-lane { fill: var(--gold); font: 600 13px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
.dg-divider { stroke: rgba(255, 255, 255, 0.07); stroke-dasharray: 2 6; }
.packet { fill: var(--accent); filter: drop-shadow(0 0 6px var(--accent)) drop-shadow(0 0 12px rgba(199, 146, 255, 0.8)); }
.packet.gold { fill: var(--gold); filter: drop-shadow(0 0 6px var(--gold)) drop-shadow(0 0 12px rgba(242, 212, 155, 0.8)); }
.diagram-steps { display: none; margin: 4px 0 8px; padding-left: 1.3em; color: #d4cadf; }
.diagram-steps li { margin: 10px 0; }
.diagram-steps b { color: var(--gold); }
@media (max-width: 700px) { .diagram svg { display: none; } .diagram-steps { display: block; } }

.sec-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 18px; margin: 0 0 72px; }
.sec-grid article { padding: 28px 28px 24px; }
.sec-grid h2 { margin: 0 0 16px; font-size: 1.5rem; }
.mono-flow { margin: 0; font: 0.8rem/1.75 var(--mono); color: #b7acc6; overflow-x: auto; white-space: pre; }
.k-you { color: var(--ok); font-weight: 600; } .k-key { color: var(--accent); font-weight: 600; } .k-dim { color: #7d7290; }
.spec { margin: 0; display: grid; grid-template-columns: minmax(120px, 0.38fr) minmax(0, 1fr); gap: 0; }
.spec dt, .spec dd { padding: 11px 0; border-top: 1px solid rgba(255, 255, 255, 0.07); margin: 0; }
.spec dt { font: 600 0.78rem var(--mono); color: var(--gold); text-transform: uppercase; letter-spacing: 0.06em; padding-right: 14px; }
.spec dd { color: #d4cadf; font-size: 0.92rem; }
.spec dt:first-of-type, .spec dt:first-of-type + dd { border-top: 0; }
@media (max-width: 860px) { .sec-grid { grid-template-columns: minmax(0, 1fr); } }

.matrix-wrap { overflow-x: auto; padding: 6px 10px; border-radius: 20px; margin: 0 0 72px; }
.matrix { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 0.92rem; }
.matrix th, .matrix td { padding: 14px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); text-align: center; }
.matrix thead th { font: 600 0.74rem var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--gold); vertical-align: bottom; }
.matrix tbody th { text-align: left; font: 500 0.92rem var(--sans); text-transform: none; letter-spacing: 0; color: #e3d9ee; }
.matrix tbody tr:last-child th, .matrix tbody tr:last-child td { border-bottom: 0; }
.matrix tbody tr { transition: background 0.2s; }
.matrix tbody tr:hover { background: rgba(199, 146, 255, 0.05); }
.cell { display: inline-block; }
.cell.yes { color: var(--ok); text-shadow: 0 0 10px rgba(123, 224, 176, 0.7); font-size: 1.1rem; }
.cell.no { color: #6d627e; font-size: 1.1rem; }
.cell.part { font: 0.74rem var(--mono); color: var(--gold); border: 1px solid rgba(242, 212, 155, 0.3); border-radius: 6px; padding: 2px 7px; }

.sec-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin: 0 0 72px; }
.sec-cards article { padding: 26px 24px; transition: transform 0.4s cubic-bezier(.2,.8,.2,1); }
.sec-cards article:hover { transform: translateY(-5px); }
.sec-cards h3 { font-family: var(--serif); font-size: 1.25rem; margin: 0 0 8px; }
.sec-cards p { margin: 0; color: #c9bfd6; font-size: 0.94rem; }
.honest { max-width: 860px; margin: 0 auto 72px; padding: 32px 36px; border-color: rgba(242, 212, 155, 0.22); }
.honest h2 { margin-top: 0; font-size: 1.7rem; }
.honest li { margin: 12px 0; color: #d4cadf; }
.honest li b { color: var(--gold); }
.final-cta .muted { margin: -12px 0 26px; }
@media (prefers-reduced-motion: reduce) { .packet { display: none; } }
@media (max-width: 520px) {
  .topbar { padding: 12px 16px; gap: 10px; }
  .topbar .brand { white-space: nowrap; }
  .topbar nav { gap: 12px; flex-wrap: nowrap; }
  .topbar nav { font-size: 0.9rem; }
  .topbar nav .btn { padding: 8px 14px; }
  .spec { grid-template-columns: minmax(0, 1fr); }
  .spec dd { border-top: 0; padding-top: 0; }
  .mono-flow { font-size: 0.68rem; }
}
.notice-internal { color: var(--ok); }

/* ---------- film ---------- */
.film-sec { margin: 0 0 96px; text-align: center; }
.film-sec .section-title { margin-bottom: 26px; }
.film { max-width: 960px; margin: 0 auto; padding: 10px; border-radius: 24px; box-shadow: 0 50px 120px -50px rgba(120, 60, 200, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.film video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 16px; background: #0f0d13; }
.mail-settings { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 10px 0; font-size: 0.86rem; }
.mail-settings dt { color: var(--muted); }
.mail-settings dd { margin: 0; font-family: var(--mono); overflow-wrap: anywhere; }
.app-pw-list { list-style: none; padding: 0; margin: 10px 0 0; }
.app-pw-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); }
.app-pw-new { margin: 12px 0; padding: 14px; border-radius: 12px; border: 1px solid rgba(123, 224, 176, 0.35); background: rgba(123, 224, 176, 0.06); }
.app-pw-code { display: block; font-size: 1.15rem; letter-spacing: 0.06em; padding: 10px 12px; user-select: all; }
