/* The Home Screen Method · Y2K Lock Screen brand */
:root {
  --ink: #13121A;
  --ink-2: #3E3D4A;
  --ink-3: #6E6D7A;
  --red: #FF3B4E;
  --flip: #FF9FC3;
  --blue: #CFE8FF;
  --grid: #B9DAFB;
  --hi: #CFE8FF;
  --paper: #FFFFFF;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 4px 4px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --bubble: "Bagel Fat One", system-ui, sans-serif;
  --pixel: "VT323", ui-monospace, monospace;
  --body: "DM Sans", system-ui, -apple-system, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; color: var(--ink); }
body {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  background-color: var(--blue);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
img { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
[hidden] { display: none !important; }

/* Type */
.bubble { font-family: var(--bubble); font-weight: 400; letter-spacing: .015em; }
.big { font-family: var(--bubble); color: var(--red); letter-spacing: .015em; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 4px 4px 0 var(--ink); line-height: .98; }
.eyebrow { font-family: var(--pixel); font-size: 21px; line-height: 1; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.mark { color: var(--red); }

/* ---------- Layout ---------- */
.shell { min-height: 100vh; }
.sidebar { display: none; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(12px + var(--safe-t)) 18px 12px;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--bubble); line-height: 1; letter-spacing: .015em; }
.brand img { border-radius: 9px; border: 2px solid var(--ink); }
.brand-sm { font-size: 17px; }
.main { padding: 26px 18px calc(118px + var(--safe-b)); outline: none; max-width: 640px; margin: 0 auto; }

.tabbar {
  position: fixed; left: 10px; right: 10px; bottom: calc(10px + var(--safe-b)); z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px;
  background: var(--paper);
  border: 2px solid var(--ink); border-radius: 22px; box-shadow: var(--shadow);
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-height: 54px; justify-content: center;
  font-family: var(--pixel); font-size: 16px; line-height: 1; letter-spacing: .02em; color: var(--ink-3);
  border-radius: 16px;
}
.tab svg { width: 22px; height: 22px; }
.tab.active { color: var(--ink); background: var(--hi); }

@media (min-width: 960px) {
  .shell { display: grid; grid-template-columns: 280px 1fr; }
  .topbar, .tabbar { display: none; }
  .sidebar {
    display: flex; flex-direction: column; gap: 26px;
    position: sticky; top: 0; height: 100vh;
    padding: 26px 18px;
    background: var(--paper);
    border-right: 2px solid var(--ink);
  }
  .sidebar .brand { font-size: 21px; padding: 0 6px; }
  .side-nav { display: flex; flex-direction: column; gap: 6px; }
  .side-link {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 14px; border: 2px solid transparent;
    font-family: var(--pixel); font-size: 23px; line-height: 1; letter-spacing: .04em; color: var(--ink-2);
    transition: background .15s, border-color .15s;
  }
  .side-link svg { width: 20px; height: 20px; }
  .side-link:hover { background: var(--blue); }
  .side-link.active { background: var(--hi); border-color: var(--ink); color: var(--ink); box-shadow: var(--shadow-sm); }
  .side-progress { margin-top: auto; }
  .main { padding: 44px 48px 80px; max-width: 1120px; width: 100%; margin: 0 auto; }
  .modules, .posts, .events, .composer, .channel-row { max-width: 820px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 22px;
  border-radius: 14px; border: 2px solid var(--ink);
  font-family: var(--pixel); font-size: 24px; line-height: 1; letter-spacing: .06em; text-transform: uppercase;
  background: var(--paper); box-shadow: var(--shadow-sm);
  transition: transform .1s, box-shadow .1s, background .15s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-dark { background: var(--ink); color: var(--hi); }
.btn-pink { background: var(--red); color: #fff; }
.btn-hi { background: var(--hi); }
.btn-outline { background: var(--paper); }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 20px; }
.btn[disabled] { opacity: .5; cursor: default; transform: none; }
.pill {
  border: 2px solid var(--ink); background: var(--hi); box-shadow: var(--shadow-sm);
  border-radius: 12px; padding: 6px 12px; font-family: var(--pixel); font-size: 19px; line-height: 1; letter-spacing: .05em; text-transform: uppercase;
}

/* ---------- Windows & cards ---------- */
.win { background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.win-bar {
  height: 36px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px; background: var(--flip); border-bottom: 2px solid var(--ink);
  font-family: var(--pixel); font-size: 19px; letter-spacing: .05em; line-height: 1;
}
.dots { display: flex; gap: 6px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--ink); background: #fff; }
.dots i:first-child { background: var(--red); }
.dots i:nth-child(2) { background: var(--hi); }
.win-body { padding: 20px; }
.card { background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }

.page-head { margin-bottom: 26px; }
.page-head h1 { font-size: 46px; margin-top: 10px; }
.page-head p { margin-top: 14px; color: var(--ink-2); max-width: 560px; font-size: 17px; font-weight: 500; }
@media (min-width: 960px) { .page-head h1 { font-size: 64px; } }
.section { margin-top: 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { font-family: var(--bubble); font-size: 28px; letter-spacing: .015em; }
.section-head a { font-family: var(--pixel); font-size: 21px; letter-spacing: .05em; text-transform: uppercase; }
.section-head a:hover { color: var(--red); }
.sample-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--pixel); font-size: 19px; line-height: 1; letter-spacing: .04em;
  background: var(--ink); color: var(--hi); padding: 6px 12px;
}

/* Hero (continue window) */
.hero { display: grid; }
.hero .win-body { display: grid; gap: 16px; padding: 22px; }
.hero h2 { font-family: var(--bubble); font-size: 30px; line-height: 1.05; letter-spacing: .015em; }
.hero p { color: var(--ink-2); font-weight: 500; }
.bar { height: 14px; background: #fff; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--red); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.hero-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-family: var(--pixel); font-size: 21px; letter-spacing: .05em; line-height: 1; }
@media (min-width: 960px) {
  .hero .win-body { grid-template-columns: 1.2fr 1fr; align-items: center; gap: 36px; padding: 32px; }
  .hero h2 { font-size: 40px; }
}

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.stat { background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius-sm); padding: 14px; box-shadow: var(--shadow-sm); }
.stat b { display: block; font-family: var(--bubble); font-weight: 400; font-size: 30px; line-height: 1; }
.stat span { font-family: var(--pixel); font-size: 18px; letter-spacing: .04em; line-height: 1; display: block; margin-top: 6px; color: var(--ink-2); }

/* Portals */
.portals { display: grid; gap: 14px; }
@media (min-width: 720px) { .portals { grid-template-columns: repeat(3, 1fr); } }
.portal {
  text-align: left; border: 2px solid var(--ink); background: var(--paper); box-shadow: var(--shadow);
  border-radius: var(--radius); padding: 18px; display: grid; gap: 8px;
  transition: transform .1s, box-shadow .1s, background .15s;
}
.portal:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.portal.selected { background: var(--hi); }
.portal-top { display: flex; align-items: center; justify-content: space-between; }
.portal-emoji { font-size: 28px; }
.portal h3 { font-family: var(--bubble); font-size: 30px; letter-spacing: .015em; line-height: 1; }
.portal .check { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--ink); display: grid; place-items: center; background: #fff; }
.portal.selected .check { background: var(--red); color: #fff; }
.portal p { font-size: 15px; color: var(--ink-2); }
.portal strong { font-size: 16px; }

/* 4 D's band */
.band { margin-top: 40px; background: var(--flip); border: 2px solid var(--ink); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
.band h2 { font-family: var(--bubble); font-size: 32px; letter-spacing: .015em; margin-top: 6px; }
.ds { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 16px; }
@media (min-width: 720px) { .ds { grid-template-columns: repeat(4, 1fr); } }
.d { background: var(--paper); border-radius: var(--radius-sm); padding: 14px; border: 2px solid var(--ink); }
.d b { font-family: var(--bubble); font-weight: 400; font-size: 24px; display: block; letter-spacing: .015em; line-height: 1.1; }
.d span { font-size: 14px; color: var(--ink-2); display: block; margin-top: 2px; }
.d .n { font-family: var(--pixel); font-size: 19px; line-height: 1; color: var(--red); margin: 0 0 4px; }

/* Showcase */
.show { display: grid; gap: 14px; }
@media (min-width: 720px) { .show { grid-template-columns: repeat(3, 1fr); } }
.app-card { background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); padding: 18px; display: grid; gap: 10px; box-shadow: var(--shadow); }
.app-card .icon { width: 56px; height: 56px; border-radius: 15px; border: 2px solid var(--ink); display: grid; place-items: center; font-family: var(--bubble); font-size: 22px; box-shadow: var(--shadow-sm); }
.app-card h3 { font-family: var(--bubble); font-size: 22px; letter-spacing: .015em; line-height: 1.05; }
.app-card p { font-size: 15px; color: var(--ink-2); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-family: var(--pixel); font-size: 18px; line-height: 1; letter-spacing: .04em; padding: 5px 10px; border-radius: 8px; border: 1.5px solid var(--ink); background: #fff; }
.chip.pink { background: var(--flip); }

/* Learn */
.modules { display: grid; gap: 18px; }
.module { background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.module-head { display: flex; align-items: center; gap: 14px; padding: 16px 18px 14px; background: var(--paper); }
.module-head h3 { font-family: var(--bubble); font-size: 26px; letter-spacing: .015em; line-height: 1; margin-top: 4px; }
.ring { width: 48px; height: 48px; flex: none; }
.ring circle { fill: none; stroke-width: 5; }
.ring .bg { stroke: var(--blue); }
.ring .fg { stroke: var(--red); stroke-linecap: round; transition: stroke-dashoffset .6s; transform: rotate(-90deg); transform-origin: center; }
.ring text { font: 400 17px var(--pixel); fill: var(--ink); }
.lesson-row {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 14px 18px; border-top: 2px solid var(--ink); background: var(--paper);
  text-align: left; min-height: 66px;
}
.lesson-row:hover { background: var(--blue); }
.lesson-row .dot { width: 28px; height: 28px; flex: none; border-radius: 8px; border: 2px solid var(--ink); display: grid; place-items: center; background: #fff; }
.lesson-row.done .dot { background: var(--red); color: #fff; }
.lesson-row .t { font-weight: 700; font-size: 16px; display: block; line-height: 1.3; }
.lesson-row .m { font-family: var(--pixel); font-size: 18px; letter-spacing: .04em; line-height: 1; color: var(--ink-3); }
.lesson-row .chev { margin-left: auto; color: var(--ink); flex: none; }

/* Lesson page */
.lesson-layout { display: grid; gap: 24px; }
@media (min-width: 960px) { .lesson-layout { grid-template-columns: 1fr 330px; align-items: start; } }
.video { aspect-ratio: 16 / 9; background: var(--ink); display: grid; place-items: center; color: #fff; position: relative; }
.video .play { width: 74px; height: 74px; border-radius: 20px; background: var(--red); border: 2px solid #fff; display: grid; place-items: center; }
.video .vlabel { position: absolute; left: 14px; bottom: 12px; font-family: var(--pixel); font-size: 19px; letter-spacing: .05em; color: var(--hi); }
.lesson-body h1 { font-size: 38px; margin-top: 10px; }
.lesson-body p { margin-top: 12px; color: var(--ink-2); font-size: 17px; }
.lesson-actions { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.lesson-side { background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.lesson-side h3 { font-family: var(--bubble); font-size: 20px; letter-spacing: .015em; padding: 14px 18px; background: var(--flip); }
@media (max-width: 959px) { .lesson-side { display: none; } }
.back { display: inline-flex; align-items: center; gap: 6px; font-family: var(--pixel); font-size: 21px; letter-spacing: .05em; line-height: 1; text-transform: uppercase; margin-bottom: 16px; border: 0; background: none; padding: 0; }
.back:hover { color: var(--red); }

/* Builder */
.builder-hero { display: grid; gap: 22px; }
@media (min-width: 960px) { .builder-hero { grid-template-columns: 1.2fr 1fr; align-items: start; } }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: start; padding: 14px; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.steps li::before { content: counter(s); width: 38px; height: 38px; border-radius: 10px; background: var(--hi); border: 2px solid var(--ink); font-family: var(--pixel); font-size: 24px; display: grid; place-items: center; line-height: 1; }
.steps b { display: block; font-size: 16px; }
.steps span { font-size: 15px; color: var(--ink-2); }
.say {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--ink); color: var(--hi); border-radius: var(--radius-sm); padding: 14px 16px; margin-top: 16px; border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--red);
}
.say code { font-family: var(--pixel); font-size: 28px; letter-spacing: .05em; line-height: 1; }
.say button { background: var(--hi); color: var(--ink); border: 2px solid var(--hi); border-radius: 10px; padding: 6px 12px; font-family: var(--pixel); font-size: 20px; line-height: 1; letter-spacing: .05em; }
.say button:hover { background: #fff; }

/* Community */
.channel-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 4px 8px 2px; margin-bottom: 12px; scrollbar-width: none; }
.channel-row::-webkit-scrollbar { display: none; }
.channel { flex: none; border: 2px solid var(--ink); background: var(--paper); border-radius: 12px; padding: 7px 12px; font-family: var(--pixel); font-size: 20px; line-height: 1; letter-spacing: .04em; }
.channel.active { background: var(--ink); color: var(--hi); }
.posts { display: grid; gap: 14px; max-width: 720px; }
.post { background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.post p { font-size: 16px; }
.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.avatar { width: 42px; height: 42px; border-radius: 12px; background: var(--flip); border: 2px solid var(--ink); display: grid; place-items: center; font-family: var(--bubble); font-size: 16px; flex: none; }
.post-head b { display: block; font-size: 16px; }
.post-head span { font-family: var(--pixel); font-size: 18px; letter-spacing: .04em; line-height: 1; color: var(--ink-3); }
.post-foot { display: flex; gap: 18px; margin-top: 14px; font-weight: 700; font-size: 15px; }
.post-foot button { border: 0; background: none; padding: 0; display: inline-flex; gap: 6px; align-items: center; font-weight: 700; }
.post-foot button.liked { color: var(--red); }
.post-foot button.liked svg { fill: var(--red); }
.composer { display: flex; gap: 10px; align-items: center; background: var(--paper); border: 2px solid var(--ink); border-radius: 16px; padding: 6px 6px 6px 16px; margin-bottom: 16px; max-width: 720px; color: var(--ink-3); box-shadow: var(--shadow-sm); }
.composer span { flex: 1; }

/* Live */
.events { display: grid; gap: 14px; max-width: 720px; }
.event { display: grid; grid-template-columns: 70px 1fr; gap: 14px; align-items: center; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.event .date { background: var(--hi); border: 2px solid var(--ink); border-radius: 14px; text-align: center; padding: 8px 0; font-family: var(--pixel); font-size: 19px; line-height: 1; letter-spacing: .05em; }
.event .date b { display: block; font-family: var(--bubble); font-weight: 400; font-size: 28px; margin-top: 2px; }
.event h3 { font-size: 18px; font-weight: 700; font-family: var(--body); }
.event p { font-size: 15px; color: var(--ink-2); }
.event .btn { margin-top: 10px; }

/* Side progress */
.sp { background: var(--blue); border: 2px solid var(--ink); border-radius: var(--radius); padding: 16px; display: grid; gap: 10px; box-shadow: var(--shadow-sm); }
.sp b { font-family: var(--bubble); font-weight: 400; font-size: 34px; line-height: 1; }
.sp span { font-family: var(--pixel); font-size: 19px; letter-spacing: .04em; line-height: 1; }

/* Install banner */
.install-banner {
  position: fixed; left: 12px; right: 12px; bottom: calc(92px + var(--safe-b)); z-index: 40;
  display: grid; grid-template-columns: 46px 1fr auto auto; gap: 12px; align-items: center;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 18px; padding: 12px;
  box-shadow: var(--shadow);
  animation: up .35s cubic-bezier(.2,.8,.2,1);
}
.install-banner img { border-radius: 11px; border: 2px solid var(--ink); }
.install-banner strong { display: block; font-family: var(--bubble); font-weight: 400; font-size: 18px; letter-spacing: .015em; }
.install-banner span { font-size: 14px; color: var(--ink-2); }
.install-banner .x { border: 0; background: none; font-size: 24px; width: 32px; height: 32px; }
@media (min-width: 960px) { .install-banner { left: auto; right: 24px; bottom: 24px; width: 440px; } }

/* Sheet */
.sheet-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(19,18,26,.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--paper); width: 100%; max-width: 480px; border-top: 2px solid var(--ink); border-radius: 24px 24px 0 0; padding: 12px 20px calc(20px + var(--safe-b)); display: grid; gap: 16px; animation: up .3s cubic-bezier(.2,.8,.2,1); }
.sheet h3 { font-family: var(--bubble); font-size: 26px; letter-spacing: .015em; }
.sheet-grab { width: 44px; height: 5px; border-radius: 3px; background: var(--ink); margin: 0 auto; opacity: .3; }
@media (min-width: 960px) { .sheet-wrap { align-items: center; } .sheet { border: 2px solid var(--ink); border-radius: 22px; box-shadow: var(--shadow); } }

/* Tour */
.tour { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; padding: calc(20px + var(--safe-t)) 24px calc(24px + var(--safe-b));
  background-color: var(--blue); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 32px 32px; }
.tour-inner { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 440px; width: 100%; margin: 0 auto; gap: 18px; animation: fade .35s ease; }
.tour-art { width: 112px; height: 112px; border-radius: 28px; display: grid; place-items: center; font-size: 52px; background: var(--hi); border: 2px solid var(--ink); box-shadow: var(--shadow); }
.tour-art img { border-radius: 26px; }
.tour-art.img { background: none; border: 0; box-shadow: none; }
.tour-art.img img { border: 2px solid var(--ink); box-shadow: var(--shadow); }
.tour h2 { font-size: 44px; }
.tour p { color: var(--ink-2); font-size: 18px; font-weight: 500; }
.tour-list { display: grid; gap: 12px; }
.tour-list div { display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: center; background: var(--paper); border: 2px solid var(--ink); border-radius: 16px; padding: 10px; box-shadow: var(--shadow-sm); }
.tour-list i { font-style: normal; width: 48px; height: 48px; border-radius: 12px; background: var(--flip); border: 2px solid var(--ink); display: grid; place-items: center; font-size: 22px; }
.tour-list b { display: block; font-size: 16px; }
.tour-list span { font-size: 14px; color: var(--ink-2); }
.tour input { width: 100%; min-height: 54px; border: 2px solid var(--ink); border-radius: 14px; padding: 0 16px; font: inherit; font-size: 18px; background: #fff; box-shadow: var(--shadow-sm); }
.tour input:focus { outline: none; background: #F3F9FF; }
.tour-foot { max-width: 440px; width: 100%; margin: 0 auto; display: grid; gap: 12px; }
.tour-dots { display: flex; gap: 6px; justify-content: center; }
.tour-dots span { width: 10px; height: 10px; border-radius: 3px; background: #fff; border: 1.5px solid var(--ink); transition: width .2s, background .2s; }
.tour-dots span.on { width: 28px; background: var(--red); }
.tour-skip { position: absolute; top: calc(16px + var(--safe-t)); right: 20px; border: 0; background: none; font-family: var(--pixel); font-size: 22px; letter-spacing: .05em; padding: 8px; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(100px + var(--safe-b)); transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--hi); padding: 12px 18px; border-radius: 14px; font-family: var(--pixel); font-size: 22px; letter-spacing: .04em; line-height: 1; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 80; white-space: nowrap; box-shadow: 4px 4px 0 var(--red); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (min-width: 960px) { .toast { bottom: 32px; } }

/* Celebration */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 10px; height: 14px; border-radius: 2px; border: 1.5px solid var(--ink); animation: fall 1.4s cubic-bezier(.3,.6,.4,1) forwards; }

@keyframes up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fall { to { transform: translateY(105vh) rotate(540deg); opacity: .9; } }
.page { animation: fade .25s ease; }
.narrow { max-width: 820px; margin: 0 auto; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Install gate ---------- */
body.gated { overflow: hidden; }
body.gated .shell { filter: blur(7px); pointer-events: none; user-select: none; }
.gate { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; background: rgba(207,232,255,.55); padding: 16px 16px calc(16px + var(--safe-b)); }
.gate-card { width: 100%; max-width: 440px; background: var(--paper); border: 2px solid var(--ink); border-radius: 24px; box-shadow: var(--shadow); padding: 20px; display: grid; gap: 14px; position: relative; animation: up .35s cubic-bezier(.2,.8,.2,1); }
.gate-top { display: flex; gap: 12px; align-items: center; }
.gate-top img { border-radius: 15px; border: 2px solid var(--ink); }
.gate-top b { display: block; font-size: 17px; }
.gate-top span { font-size: 14px; color: var(--ink-2); }
.gate-progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gate-progress span { height: 8px; border-radius: 4px; background: #fff; border: 1.5px solid var(--ink); }
.gate-progress .on { background: var(--red); }
.gate-progress .now { background: var(--hi); }
.gate-title { font-size: 30px; line-height: 1.05; }
.gate-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; counter-reset: s; }
.gate-steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: center; }
.gate-steps li::before { content: counter(s); width: 34px; height: 34px; border-radius: 10px; background: var(--hi); border: 2px solid var(--ink); display: grid; place-items: center; font-family: var(--pixel); font-size: 22px; }
.gate-steps p { font-size: 17px; margin: 0; line-height: 1.5; }
.gate-steps span { font-size: 14px; color: var(--ink-2); }
.kbd { vertical-align: middle; margin-left: 4px; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; border: 2px solid var(--ink); background: var(--blue, #CFE8FF); color: #0A84FF; }
.gate-arrow { position: absolute; left: 50%; bottom: -48px; transform: translateX(-50%); font-family: var(--bubble); font-size: 34px; color: var(--red); -webkit-text-stroke: 1.5px var(--ink); animation: bob 1.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate(-50%, 8px); } }
.btn-lg { min-height: 56px; font-size: 20px; }

/* ---------- Welcome form ---------- */
.tour-form { display: grid; gap: 14px; }
.tour-form label { display: grid; gap: 6px; }
.tour-form label span { font-weight: 700; font-size: 15px; }
.form-err { color: var(--red); font-weight: 700; font-size: 15px; margin: 0; }
.tour .gate-progress { max-width: 200px; }

/* ---------- Membership ---------- */
.member-box { display: grid; gap: 8px; margin-bottom: 10px; }
.member-box b { word-break: break-all; }
.linklike { background: none; border: 0; padding: 4px 0; font: inherit; font-size: 15px; font-weight: 700; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; justify-self: center; }
.lesson-row.locked .t { color: var(--ink-2); }
.lesson-row.locked .dot { background: var(--blue); color: var(--ink); display: grid; place-items: center; }
.locked-video { background: repeating-linear-gradient(135deg, #1d1c26 0 14px, #13121A 14px 28px); }
.lock-badge { width: 64px; height: 64px; border-radius: 18px; background: var(--red); color: #fff; border: 2px solid var(--ink); box-shadow: var(--shadow-sm); display: grid; place-items: center; }
.lock-badge svg { width: 28px; height: 28px; }
.lock-badge.sm { width: 44px; height: 44px; border-radius: 13px; flex: none; }
.lock-badge.sm svg { width: 20px; height: 20px; }
.locked-video .lock-badge { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.locked-banner { display: flex; align-items: center; gap: 14px; background: #fff; border: 2px solid var(--ink); border-radius: 18px; box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 20px; }
.locked-banner b { display: block; font-size: 16px; }
.locked-banner span { font-size: 14px; color: var(--ink-2); }
.locked-banner .btn { margin-left: auto; flex: none; }
.home-unlock { margin: 24px 0 24px; }
.blurred { filter: blur(5px); pointer-events: none; user-select: none; }
.unlock-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.unlock-list li { padding-left: 30px; position: relative; }
.unlock-list li::before { content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 6px; background: var(--red); border: 2px solid var(--ink); }
.unlock-list b { display: block; }
.unlock-list span { font-size: 14px; color: var(--ink-2); }
.price { display: flex; align-items: baseline; gap: 10px; border-top: 2px dashed #D7D6DE; padding-top: 12px; }
.price b { font-family: var(--bubble); font-weight: 400; font-size: 36px; color: var(--red); -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; }
.price span { color: var(--ink-2); font-size: 15px; }
.code-input { letter-spacing: .4em; font-size: 24px !important; text-align: center; }
@media (max-width: 600px) { .locked-banner { flex-wrap: wrap; } .locked-banner .btn { width: 100%; } }
.sheet input { width: 100%; min-height: 54px; border: 2px solid var(--ink); border-radius: 14px; padding: 0 16px; font: inherit; font-size: 18px; background: #fff; box-shadow: var(--shadow-sm); }
.sheet input:focus { outline: none; background: #F3F9FF; }
.sheet .tour-form label span { font-weight: 700; font-size: 15px; }

/* ---------- Admin ---------- */
.admin-pill { margin-left: auto; text-decoration: none; }
.admin-pill + .install-btn { margin-left: 8px; }
.admin { display: grid; gap: 22px; }
#adminBody { display: grid; gap: 22px; }
.astats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.astat { background: #fff; border: 2px solid var(--ink); border-radius: 18px; box-shadow: var(--shadow); padding: 16px 18px; display: grid; gap: 2px; }
.astat b { font-family: var(--bubble); font-weight: 400; font-size: 38px; line-height: 1.05; letter-spacing: .015em; }
.astat.red b { color: var(--red); -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; }
.astat span { font-family: var(--pixel); font-size: 20px; letter-spacing: .05em; text-transform: uppercase; }
.astat small { font-size: 13px; color: var(--ink-2); }
.agrid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.funnel { display: grid; gap: 16px; }
.fhead { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.fhead b { font-size: 15px; }
.fhead span { font-family: var(--pixel); font-size: 19px; letter-spacing: .04em; }
.atabs { display: flex; gap: 8px; flex-wrap: wrap; }
.atools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.atools input, .atools select, .grant input { min-height: 46px; border: 2px solid var(--ink); border-radius: 12px; padding: 0 14px; font: inherit; font-size: 16px; background: #fff; }
.atools input { flex: 1 1 220px; }
.alist { display: grid; }
.arow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 2px dashed #D7D6DE; }
.arow:last-child { border-bottom: 0; }
.arow b { display: block; font-size: 15px; word-break: break-all; }
.arow span { font-size: 14px; color: var(--ink-2); word-break: break-all; }
.ameta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; flex: none; }
.ameta small { font-family: var(--pixel); font-size: 17px; color: var(--ink-2); }
.tag { font-size: 12px !important; font-weight: 700; color: var(--ink) !important; background: var(--blue); border: 1.5px solid var(--ink); border-radius: 999px; padding: 2px 9px; white-space: nowrap; word-break: normal !important; }
.tag.vault { background: var(--flip); }
.tag.on { background: #fff; }
.linklike.danger { color: var(--red); font-size: 13px; }
.grant { display: grid; gap: 12px; }
.grant p { margin: 0; }
.grant-row { display: flex; gap: 10px; flex-wrap: wrap; }
.grant-row input { flex: 1 1 240px; }
.guide-card { background: #fff; border: 2px dashed var(--ink); border-radius: 18px; padding: 18px; display: grid; gap: 14px; }
.guide-card h2 { font-size: 24px; margin: 0; }
.howto { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.howto div { background: var(--blue); border: 2px solid var(--ink); border-radius: 14px; padding: 12px 14px; display: grid; gap: 4px; }
.howto b { font-size: 15px; }
.howto span { font-size: 14px; }
.howto code { background: #fff; border-radius: 6px; padding: 1px 6px; font-weight: 700; }
@media (max-width: 900px) { .astats { grid-template-columns: repeat(2, 1fr); } .agrid, .howto { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .astat b { font-size: 30px; } .arow { flex-direction: column; align-items: flex-start; } .ameta { justify-content: flex-start; } }

/* ---------- Written lessons ---------- */
.lesson-content { display: grid; gap: 12px; margin: 22px 0 6px; max-width: 680px; }
.lesson-content h2 { font-family: var(--bubble); font-weight: 400; font-size: 24px; letter-spacing: .015em; margin: 14px 0 0; }
.lesson-content p { font-size: 17px; line-height: 1.6; margin: 0; }
.lc-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.lc-list li { position: relative; padding-left: 26px; font-size: 17px; line-height: 1.5; }
.lc-list li::before { content: ""; position: absolute; left: 0; top: 7px; width: 12px; height: 12px; border-radius: 4px; background: var(--red); border: 2px solid var(--ink); }
.lc-steps { margin: 0; }
.lc-portals .portal { text-align: left; }
.lesson-content .locked-banner { margin: 6px 0 0; }
.lesson-content > .btn { justify-self: start; }

/* ---------- Starting points ---------- */
.section-sub { color: var(--ink-2); font-size: 16px; margin: -4px 0 16px; max-width: 640px; }
.portal { text-align: left; display: flex; flex-direction: column; gap: 8px; }
.portal-ic { width: 46px; height: 46px; border-radius: 13px; background: var(--blue); border: 2px solid var(--ink); display: grid; place-items: center; color: var(--ink); }
.portal-ic svg { width: 24px; height: 24px; }
.portal-ic.sm { width: 38px; height: 38px; border-radius: 11px; flex: none; }
.portal-ic.sm svg { width: 20px; height: 20px; }
.portal.selected .portal-ic { background: var(--red); color: #fff; }
.portal h3 { font-family: var(--bubble); font-weight: 400; font-size: 22px; line-height: 1.15; letter-spacing: .015em; }
.pname { font-family: "DM Sans", sans-serif; font-size: 14px; font-weight: 700; color: var(--ink-2); letter-spacing: 0; white-space: nowrap; }
.portal p { margin: 0; }
.ppick { margin-top: auto; padding-top: 6px; font-family: var(--pixel); font-size: 20px; letter-spacing: .05em; text-transform: uppercase; color: var(--red); }
.pnext { margin-top: auto; padding-top: 10px; border-top: 2px dashed var(--ink); font-size: 14px; color: var(--ink-2); }
.pnext b { display: block; color: var(--ink); font-size: 15px; }
.portal.selected { background: #fff; box-shadow: 4px 4px 0 var(--red); }
.mini-portal { display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: center; }
.toast { white-space: normal !important; max-width: calc(100vw - 32px); width: max-content; text-align: center; line-height: 1.15; }
.portal .check { border-radius: 50%; }

/* ---------- Learn path + coming soon ---------- */
.path-note { display: grid; grid-template-columns: 38px 1fr 20px; gap: 12px; align-items: center; background: #fff; border: 2px solid var(--ink); border-radius: 16px; box-shadow: var(--shadow-sm); padding: 12px 14px; margin-bottom: 20px; text-decoration: none; color: var(--ink); }
.path-note b { display: block; font-size: 16px; }
.path-note > span:nth-child(2) > span { display: block; font-size: 14px; color: var(--ink-2); }
.path-note .pname { display: inline; }
.other-lessons { margin-top: 26px; }
.other-lessons summary { cursor: pointer; list-style: none; display: grid; gap: 2px; padding: 14px 16px; border: 2px dashed var(--ink); border-radius: 16px; background: #fff; font-weight: 700; font-size: 16px; }
.other-lessons summary::-webkit-details-marker { display: none; }
.other-lessons summary::after { content: "Show ▾"; font-family: var(--pixel); font-size: 19px; letter-spacing: .05em; text-transform: uppercase; color: var(--red); font-weight: 400; }
.other-lessons[open] summary::after { content: "Hide ▴"; }
.other-lessons .module { margin-top: 12px; }
.soon .win-body { display: grid; gap: 14px; }
.soon h2 { font-size: 26px; margin: 0; }
.soon p { margin: 0; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.legal-links{font-size:13px;color:var(--ink-2,#4A4957);text-align:center;margin:14px 0 0}.legal-links a{color:inherit}

.push-ask .push-btns{display:grid;gap:4px;justify-items:center}
.push-form{display:grid;gap:12px;margin-top:6px}
.push-form label{display:grid;gap:4px;font-weight:700;font-size:14px}
.push-form input,.push-form textarea,.push-form select{font:inherit;font-weight:400;font-size:16px;padding:10px 12px;border:2px solid var(--ink);border-radius:12px;background:#fff;color:var(--ink);width:100%;box-sizing:border-box}
.push-form textarea{resize:vertical}
.push-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.push-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.push-log{margin-top:18px;display:grid;gap:4px}
@media (max-width:600px){.push-row{grid-template-columns:1fr}.push-actions{flex-direction:column-reverse}.push-actions .btn{width:100%}}
