/* Portal theme — light editorial. The viewer itself stays dark; screenshots sit in device frames. */
:root {
  --bg: #fbfbfd;
  --bg-2: #f3f4f7;
  --surface: #ffffff;
  --ink: #111318;
  --ink-2: #3a3f4b;
  --muted: #6b7280;
  --line: rgba(17, 19, 24, 0.08);
  --line-strong: rgba(17, 19, 24, 0.16);
  --accent: #2f5bff;
  --accent-ink: #1d3fd6;
  --accent-soft: #eef2ff;
  --grad: linear-gradient(120deg, #0ea5e9 0%, #4f46e5 55%, #8b5cf6 100%);
  --danger: #dc2626;
  --warn: #b45309;
  --ok: #15803d;
  --radius: 18px;
  --shadow-sm: 0 1px 2px rgba(17, 19, 24, 0.06), 0 1px 1px rgba(17, 19, 24, 0.04);
  --shadow-lg: 0 40px 80px -30px rgba(30, 41, 90, 0.35), 0 18px 36px -18px rgba(17, 19, 24, 0.25);
  --font: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', system-ui, -apple-system, 'Noto Sans JP', 'Segoe UI', 'Yu Gothic UI', sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 16px; line-height: 1.8; -webkit-font-smoothing: antialiased; font-feature-settings: 'palt';
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; height: auto; display: block; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.nw { white-space: nowrap; }
.small { font-size: 13.5px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---------- header */
.site-head { position: sticky; top: 0; z-index: 20; background: rgba(251, 251, 253, 0.78); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 20px; height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; font-size: 15.5px; }
.brand:hover { color: var(--ink); }
.brand img { width: 26px; height: 26px; }
.beta { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); letter-spacing: 0.04em; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 26px; font-size: 14px; }
.nav a { color: var(--ink-2); }
.nav a:hover { color: var(--ink); }
@media (max-width: 760px) { .nav .hide-sm { display: none; } }

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 24px;
  border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
}
.btn:hover { color: var(--ink); background: var(--bg-2); }
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: #2a2e38; color: #fff; box-shadow: 0 8px 20px -8px rgba(17, 19, 24, 0.5); }
.btn.sm { height: 36px; padding: 0 16px; font-size: 13.5px; }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: 0.4; cursor: default; transform: none; }
.link-arrow { font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; }
.link-arrow::after { content: '→'; transition: transform 0.2s; }
.link-arrow:hover::after { transform: translateX(3px); }

/* ---------- hero */
.hero { position: relative; padding: 88px 0 0; text-align: center; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -20% -10% auto; height: 720px; z-index: -1; pointer-events: none;
  background: radial-gradient(40% 50% at 30% 30%, rgba(14, 165, 233, 0.16), transparent 70%), radial-gradient(40% 50% at 70% 25%, rgba(139, 92, 246, 0.14), transparent 70%);
  filter: blur(10px);
}
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); margin-bottom: 28px; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18); }
.hero h1 { font-size: clamp(38px, 7.2vw, 80px); line-height: 1.12; letter-spacing: -0.035em; font-weight: 800; margin: 0 0 24px; }
.hero .lead { font-size: clamp(16.5px, 2.1vw, 20px); color: var(--ink-2); max-width: 620px; margin: 0 auto 36px; line-height: 1.85; }
.cta { display: flex; gap: 22px; justify-content: center; align-items: center; flex-wrap: wrap; }

/* laptop frame */
.device { margin: 72px auto 0; max-width: 1000px; padding: 0 12px; perspective: 2000px; }
.laptop { transform: rotateX(8deg); transform-origin: 50% 100%; transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.device:hover .laptop { transform: rotateX(0deg); }
.laptop-screen { background: #0b0d12; border-radius: 22px 22px 0 0; padding: 2.2% 2.2% 1.4%; box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, 0.06); position: relative; }
.laptop-screen::before { content: ''; position: absolute; top: 0.9%; left: 50%; width: 6px; height: 6px; transform: translateX(-50%); border-radius: 50%; background: #23262f; }
.laptop-screen img { border-radius: 6px; }
.laptop-base { height: 18px; margin: 0 -6%; border-radius: 0 0 22px 22px; background: linear-gradient(#e7e8ec, #c9cbd1); box-shadow: 0 30px 50px -20px rgba(17, 19, 24, 0.35); position: relative; }
.laptop-base::before { content: ''; position: absolute; top: 0; left: 50%; width: 16%; height: 7px; transform: translateX(-50%); border-radius: 0 0 10px 10px; background: #b9bcc4; }
.hero-fade { height: 120px; }

/* ---------- sections */
section { padding: 120px 0; }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
h2 { font-size: clamp(30px, 4.6vw, 52px); line-height: 1.22; letter-spacing: -0.03em; font-weight: 800; margin: 0 0 20px; }
h3 { letter-spacing: -0.01em; }
.section-lead { font-size: clamp(16px, 1.9vw, 18.5px); color: var(--ink-2); max-width: 640px; margin: 0; }
.center { text-align: center; }
.center .section-lead { margin: 0 auto; }

/* statement */
.statement { background: var(--ink); color: #fff; border-radius: 36px; margin: 0 16px; padding: 110px 0; position: relative; overflow: hidden; }
.statement::after { content: ''; position: absolute; inset: auto -20% -60% -20%; height: 90%; background: radial-gradient(50% 50% at 50% 50%, rgba(79, 70, 229, 0.45), transparent 70%); pointer-events: none; }
.statement .wrap { position: relative; z-index: 1; }
.statement h2 { color: #fff; }
.statement .section-lead { color: rgba(255, 255, 255, 0.72); }
.statement .kicker { color: #93c5fd; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 64px; background: rgba(255, 255, 255, 0.12); border-radius: 20px; overflow: hidden; }
.fact { background: #15171d; padding: 28px 24px; text-align: left; }
.fact b { display: block; font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -0.03em; line-height: 1.2; margin-bottom: 6px; }
.fact span { color: rgba(255, 255, 255, 0.65); font-size: 14px; }
@media (max-width: 720px) { .facts { grid-template-columns: 1fr; } .statement { margin: 0 8px; border-radius: 28px; padding: 80px 0; } }

/* feature rows */
.feature { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: center; margin-top: 110px; }
.feature.flip { grid-template-columns: 7fr 5fr; }
.feature.flip .feature-text { order: 2; }
.feature h3 { font-size: clamp(24px, 3vw, 34px); line-height: 1.3; letter-spacing: -0.025em; font-weight: 800; margin: 0 0 16px; }
.feature p { color: var(--ink-2); margin: 0 0 18px; }
.feature ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.feature li { display: flex; gap: 10px; color: var(--ink-2); font-size: 15px; }
.feature li::before { content: ''; flex-shrink: 0; width: 18px; height: 18px; margin-top: 5px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f5bff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat; }
.frame { border-radius: 20px; overflow: hidden; background: #0b0d12; box-shadow: var(--shadow-lg); border: 1px solid rgba(17, 19, 24, 0.12); }
.frame.float { padding: 10px; background: linear-gradient(135deg, #e0e7ff, #f5f3ff); border: 0; }
.frame.float img { border-radius: 12px; box-shadow: 0 20px 40px -20px rgba(30, 41, 90, 0.5); }
@media (max-width: 860px) {
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 32px; margin-top: 80px; }
  .feature.flip .feature-text { order: 0; }
}

/* mini grid */
.minis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 96px; }
.mini { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.mini .icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 18px; }
.mini .icon svg { width: 20px; height: 20px; }
.mini h4 { margin: 0 0 6px; font-size: 16.5px; letter-spacing: -0.01em; }
.mini p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.7; }

/* terms + steps */
.bg-2 { background: var(--bg-2); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; margin-top: 56px; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; gap: 48px; } }
.cols h3 { font-size: 20px; margin: 0 0 18px; }
.terms { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line-strong); }
.terms li { padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 15.5px; }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: 14px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.steps li::before { content: counter(step, decimal-leading-zero); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; line-height: 1.3; }
.steps b { display: block; font-size: 16px; }
.steps span { color: var(--muted); font-size: 14.5px; }

/* downloads */
.dl { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; }
@media (max-width: 640px) { .dl { grid-template-columns: 1fr; } }
.dl-card { display: flex; align-items: center; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.dl-card svg { width: 36px; height: 36px; flex-shrink: 0; color: var(--ink); }
.dl-card b { display: block; font-size: 17px; }
.dl-card span { color: var(--muted); font-size: 14px; }
.dl-card .soon { margin-left: auto; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--bg-2); color: var(--muted); }

/* final cta */
.final { text-align: center; padding: 140px 0; }
.final h2 { margin-bottom: 28px; }

/* footer */
.site-foot { border-top: 1px solid var(--line); padding: 32px 0 44px; color: var(--muted); font-size: 13.5px; }
.site-foot .wrap { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.site-foot nav { display: flex; gap: 22px; margin-left: auto; flex-wrap: wrap; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--ink); }
.credit { flex-basis: 100%; margin: 8px 0 0; font-size: 12px; line-height: 1.7; color: var(--muted); }
.credit a { text-decoration: underline; text-underline-offset: 2px; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- forms */
.form-page { padding: 64px 0 96px; }
.form-page .wrap { max-width: 640px; }
.form-page h1 { font-size: clamp(30px, 5vw, 42px); letter-spacing: -0.03em; line-height: 1.25; margin: 0 0 12px; }
.form { display: grid; gap: 22px; margin-top: 36px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 32px; box-shadow: var(--shadow-sm); }
@media (max-width: 560px) { .form { padding: 22px 18px; border-radius: 20px; } }
.field label, .field .label { display: block; font-weight: 700; font-size: 14.5px; margin-bottom: 8px; }
.field .req { color: var(--danger); font-size: 11.5px; margin-left: 8px; font-weight: 700; }
.field .hint { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.6; }
.input, select.input, textarea.input {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-strong); border-radius: 12px; padding: 11px 14px; min-height: 50px; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
textarea.input { min-height: 110px; resize: vertical; }
.input:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px rgba(47, 91, 255, 0.14); }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span { display: inline-block; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg); font-size: 14.5px; color: var(--ink-2); transition: all 0.15s; }
.choice input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.agree { display: flex; gap: 14px; align-items: flex-start; background: var(--bg-2); border-radius: 16px; padding: 18px; cursor: pointer; }
.agree input { width: 20px; height: 20px; margin-top: 4px; accent-color: var(--ink); flex-shrink: 0; }
.agree ul { margin: 8px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; line-height: 1.75; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.error { color: var(--danger); font-size: 14px; min-height: 1em; }
.notice { border-radius: 16px; padding: 16px 18px; border: 1px solid var(--line-strong); background: var(--surface); }
.notice.warn { border-color: rgba(180, 83, 9, 0.3); background: #fffbeb; color: #78350f; }
.done { text-align: center; padding: 56px 20px; }
.done .mark { width: 64px; height: 64px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; margin: 0 auto 20px; }
.prose h2 { font-size: 20px; letter-spacing: -0.01em; margin: 40px 0 10px; }
.prose p, .prose li { color: var(--ink-2); }

/* ---------- admin */
.admin-page { padding: 32px 0 72px; }
.admin-page .wrap { max-width: 1200px; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; margin: 16px 0 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 18px; min-width: 130px; box-shadow: var(--shadow-sm); }
.stat b { display: block; font-size: 24px; letter-spacing: -0.02em; }
.stat span { font-size: 12px; color: var(--muted); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs button { font: inherit; font-size: 13px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.tabs button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.req-list { display: grid; gap: 10px; }
.req-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: grid; gap: 10px; box-shadow: var(--shadow-sm); }
.req-card-top { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.req-card-top b { font-size: 16px; }
.req-meta { font-size: 13.5px; color: var(--ink-2); display: grid; gap: 2px; }
.req-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { font-size: 11.5px; font-weight: 700; padding: 1px 9px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); }
.pill.pending { background: #fef3c7; color: var(--warn); }
.pill.approved { background: #dcfce7; color: var(--ok); }
.pill.waitlist { background: var(--accent-soft); color: var(--accent); }
.pill.rejected, .pill.revoked { background: #fee2e2; color: var(--danger); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.card h3 { margin: 0 0 6px; }
.setup { margin-top: 36px; }
.setup-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 14px 0; border-bottom: 1px solid var(--line); }
.setup-row:last-child { border-bottom: 0; }
.ok { color: var(--ok); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; z-index: 50; max-width: calc(100% - 32px); box-shadow: var(--shadow-lg); }
