:root {
  --blue: #1F44E0; --blue-d: #142E9E; --blue-l: #E8EDFD; --blue-xl: #F1F4FE;
  --orange: #FF6A1A; --orange-t: #C2410C; --peach: #FFF1EA; --peach-b: #E2B9A7; --brown: #7A2A0B;
  --ink: #141B33; --ink-2: #4A5370; --ink-3: #5E6680; --line: #E4E7F0; --line-2: #C8CEDD;
  --bg: #FFFFFF; --soft: #F3F5FA; --ok: #0F7B4B; --err: #B42318; --cream: #FFF8EE;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--soft); color: var(--ink); font-family: 'Onest', system-ui, -apple-system, sans-serif; font-size: 16px; -webkit-text-size-adjust: 100%; }
#app { max-width: 480px; min-height: 100vh; margin: 0 auto; background: var(--bg); position: relative; padding-bottom: env(safe-area-inset-bottom); }
button { font-family: inherit; }
a { color: var(--blue); }
h1 { font-family: 'Unbounded', sans-serif; font-size: 23px; line-height: 1.3; margin: 0; }
h2 { font-family: 'Unbounded', sans-serif; font-size: 19px; line-height: 1.3; margin: 8px 0 0; }
.h-topic { font-size: 20px; }
.pad { padding: 20px 20px 32px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.stack-s { display: flex; flex-direction: column; gap: 10px; }
.muted { color: var(--ink-2); margin: 0; line-height: 1.5; }
.strong { font-weight: 600; color: var(--ink-2); }
.small { font-size: 14px; }
.note { font-size: 14px; color: var(--ink-3); line-height: 1.45; margin: 0; }
.center { text-align: center; }

/* header */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
.brand { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 44px; height: 44px; border: 0; border-radius: 14px; background: var(--soft); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.icon-sp { width: 44px; }
.lang-code { min-width: 44px; height: 32px; border-radius: 10px; background: var(--blue-l); color: var(--blue); font-size: 13px; font-weight: 700; display: grid; place-items: center; }

/* hero */
.hero { background: var(--blue); color: #fff; padding: calc(30px + env(safe-area-inset-top)) 22px 26px; border-radius: 0 0 32px 32px; display: flex; flex-direction: column; gap: 16px; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; width: 230px; height: 230px; border-radius: 50%; background: #3558F0; right: -80px; top: -90px; }
.hero > * { position: relative; z-index: 1; }
.hero h1 { font-family: 'Onest', sans-serif; font-size: 25px; font-weight: 700; }
.hero-sub { margin: 0; color: #DCE3FF; line-height: 1.5; }
.hero-logo { max-width: 60%; height: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { padding: 5px 10px; border-radius: 999px; background: #3A5CF0; font-size: 13px; font-weight: 600; }
.hook-card { background: #fff; color: var(--ink); border-radius: 18px; padding: 14px 16px; font-weight: 600; line-height: 1.4; }
.hook-card.light { background: var(--peach); border: 1px solid #FFE3D6; font-weight: 500; }
.hook-card .label { font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--orange-t); margin-bottom: 4px; }

/* controls */
.btn { min-height: 54px; border: 0; border-radius: 16px; padding: 0 18px; font-size: 17px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; }
.btn.primary { background: var(--orange); color: var(--ink); }
.btn.primary:disabled { opacity: .6; cursor: wait; }
.btn.ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line-2); font-weight: 600; }
.btn.ghost.danger { color: var(--err); }
.btn.small { min-height: 40px; font-size: 15px; padding: 0 14px; border-radius: 12px; }
.btn.wa { background: #1DA851; color: #fff; flex: 1; }
.btn.tg { background: #229ED9; color: #fff; flex: 1; }
.link { background: none; border: 0; padding: 6px 0; color: var(--blue); font-size: 16px; font-weight: 600; text-decoration: underline; cursor: pointer; text-align: left; }
.link.small { font-size: 14px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { min-height: 46px; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--line-2); background: #fff; color: var(--ink); font-size: 16px; font-weight: 600; cursor: pointer; }
.pill.sm { min-height: 40px; padding: 0 12px; font-size: 15px; }
.pill.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.angles { display: flex; flex-wrap: wrap; gap: 8px; }
.angle { min-height: 42px; padding: 0 13px; border-radius: 12px; border: 1.5px solid var(--peach-b); background: #FFF6F2; color: var(--brown); font-size: 15px; font-weight: 600; cursor: pointer; }
.angle.on { background: var(--orange-t); border-color: var(--orange-t); color: #fff; }
.field { display: flex; flex-direction: column; gap: 8px; font-weight: 600; color: var(--ink-2); }
.field input { min-height: 54px; border: 1.5px solid var(--line-2); border-radius: 14px; padding: 0 16px; font-size: 17px; font-family: inherit; color: var(--ink); }
.field input:focus { outline: 3px solid var(--blue-l); border-color: var(--blue); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.check input { width: 24px; height: 24px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--blue); }

/* blocks */
.notice { background: var(--peach); border-radius: 18px; padding: 16px; line-height: 1.5; color: #5A3A2C; }
.notice p { margin: 6px 0 0; }
.features { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 12px; }
.features li { line-height: 1.45; }
.features strong { display: block; }
.features span { color: var(--ink-2); }
.ok-box { background: #E9F7EF; color: var(--ok); border-radius: 14px; padding: 14px 16px; line-height: 1.45; font-weight: 500; }
.credits { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--blue-xl); border-radius: 14px; padding: 10px 14px; font-weight: 600; font-size: 15px; }
.invite-banner { display: flex; gap: 12px; align-items: center; text-align: left; border: 0; background: var(--peach); border-radius: 18px; padding: 14px 16px; color: var(--brown); font-size: 16px; cursor: pointer; }
.invite-banner small { color: #5A3A2C; font-size: 14px; }
.gift { font-size: 26px; }
.days { display: flex; flex-direction: column; gap: 10px; }
.day { display: flex; align-items: center; gap: 14px; text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: 18px; padding: 14px; cursor: pointer; color: var(--ink); font-size: 16px; }
.dow { width: 44px; flex-shrink: 0; font-weight: 700; color: var(--blue); text-align: center; }
.day-main { flex: 1; display: flex; flex-direction: column; gap: 4px; line-height: 1.35; }
.day-main small { color: var(--ink-3); font-size: 14px; }
.result { white-space: pre-wrap; background: var(--soft); border: 1.5px solid var(--line); border-radius: 18px; padding: 16px; line-height: 1.55; font-size: 16px; user-select: text; }
.loader { display: flex; align-items: center; gap: 12px; color: var(--ink-2); padding: 20px 0; }
.loader.full { justify-content: center; min-height: 60vh; }
.spin { width: 20px; height: 20px; border: 3px solid var(--line-2); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.badge { align-self: flex-start; background: #E9F7EF; color: var(--ok); border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 700; }
.badge.orange { background: var(--peach); color: var(--brown); margin-top: 4px; }
.checks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.checks li::before { content: '✓  '; color: var(--blue); font-weight: 700; }
.packs { display: flex; flex-direction: column; gap: 10px; }
.pack { display: flex; flex-direction: column; gap: 6px; align-items: stretch; text-align: left; border: 1.5px solid #D4DAE8; background: #fff; border-radius: 20px; padding: 16px 18px; cursor: pointer; font-size: 16px; color: var(--ink); }
.pack.on { border: 2.5px solid var(--blue); background: var(--blue-xl); }
.pack-top { display: flex; justify-content: space-between; align-items: baseline; }
.price { font-family: 'Unbounded', sans-serif; font-size: 20px; font-weight: 700; }
.paypal-box { min-height: 60px; }
.gifts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gift-card { border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.4; }
.gift-card b { font-family: 'Unbounded', sans-serif; font-size: 26px; }
.gift-card.blue { background: var(--blue-l); color: var(--blue-d); }
.gift-card.orange { background: var(--peach); color: var(--brown); }
.steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; line-height: 1.45; }
.linkbox { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line-2); border-radius: 14px; padding: 8px 8px 8px 14px; }
.linkbox span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.share { display: flex; gap: 10px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stats div { background: var(--soft); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.stats b { font-family: 'Unbounded', sans-serif; font-size: 22px; }
.stats span { font-size: 14px; color: var(--ink-2); }
.install { background: var(--blue-xl); border: 1.5px dashed var(--blue); border-radius: 16px; padding: 14px; color: var(--ink); font-size: 15px; line-height: 1.45; text-align: left; cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(440px, calc(100% - 32px)); padding: 14px 16px; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 500; line-height: 1.4; z-index: 20; box-shadow: 0 8px 30px rgba(20,27,51,.25); }
.toast.err { background: var(--err); }
.toast.ok { background: var(--ok); }
.legal { font-size: 13px; color: var(--ink-3); text-align: center; padding-top: 8px; }
.legal a { color: var(--ink-3); }
