:root {
  --cream: #f6f4ef;
  --paper: #fffdfa;
  --ink: #1d1e1c;
  --muted: #777970;
  --line: #e7e3db;
  --orange: #f26b38;
  --orange-dark: #d84d21;
  --green: #28b874;
  --navy: #202d3b;
  --radius-lg: 28px;
  --radius-md: 20px;
  --shadow: 0 16px 40px rgba(42, 36, 26, .09);
}

* { box-sizing: border-box; }
html { background: var(--cream); }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: Inter, ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; font: inherit; }
.hidden { display: none !important; }
.app-shell { min-height: 100dvh; max-width: 560px; margin: 0 auto; position: relative; }
.main-content { min-height: 100dvh; padding: max(22px, env(safe-area-inset-top)) 20px calc(108px + env(safe-area-inset-bottom)); }
.page { display: none; animation: page-in .26s ease; }
.page.active { display: block; }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } }

.loader-screen, .error-screen { min-height: 100dvh; display: grid; place-content: center; justify-items: center; padding: 32px; text-align: center; }
.loader-screen p, .error-screen p { color: var(--muted); }
.loader-dots { display: flex; gap: 6px; margin-top: 28px; }
.loader-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); animation: pulse 1s infinite; }
.loader-dots i:nth-child(2) { animation-delay: .15s; }
.loader-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes pulse { 50% { opacity: .25; transform: translateY(-5px); } }
.error-screen h1 { margin: 16px 0 4px; font-size: 26px; }
.error-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: #fee6dc; color: var(--orange-dark); font-size: 30px; font-weight: 800; }

.topbar { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand > div:last-child { display: flex; flex-direction: column; }
.brand strong { font-size: 17px; letter-spacing: -.02em; }
.brand small { color: var(--muted); font-size: 11px; margin-top: 1px; }
.brand-mark { width: 42px; height: 42px; border-radius: 14px 14px 14px 5px; background: var(--orange); color: white; display: grid; place-items: center; transform: rotate(-5deg); box-shadow: 0 8px 16px rgba(242, 107, 56, .25); }
.brand-mark span { font-size: 22px; font-weight: 900; font-style: italic; transform: rotate(5deg); }
.brand-mark--large { width: 78px; height: 78px; border-radius: 25px 25px 25px 8px; }
.brand-mark--large span { font-size: 42px; }
.avatar, .profile-avatar { border: 0; background: #252b2b; color: white; font-weight: 750; display: grid; place-items: center; overflow: hidden; background-size: cover; background-position: center; }
.avatar { width: 42px; height: 42px; border-radius: 50%; }
.welcome { padding: 36px 2px 24px; }
.welcome h1, .page-header h1 { margin: 5px 0 8px; font-size: clamp(30px, 8vw, 40px); line-height: 1.03; letter-spacing: -.045em; }
.welcome > p:last-child, .page-header > p { max-width: 390px; color: var(--muted); line-height: 1.5; margin: 0; font-size: 15px; }
.eyebrow { margin: 0; color: var(--orange-dark); font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.wave { display: inline-block; font-size: .78em; margin-left: 7px; transform: rotate(-10deg); }

.subscription-card { position: relative; overflow: hidden; min-height: 306px; padding: 24px; background: var(--navy); border-radius: var(--radius-lg); color: white; box-shadow: 0 22px 48px rgba(28, 39, 52, .22); }
.subscription-card--empty { background: #464a49; }
.subscription-card__top { display: flex; justify-content: space-between; align-items: center; position: relative; }
.status-pill { display: inline-flex; gap: 8px; align-items: center; padding: 8px 11px; background: rgba(255,255,255,.11); border: 1px solid rgba(255,255,255,.13); border-radius: 100px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: #a9aaa7; }
.subscription-card.active .status-pill i { background: #58e49e; box-shadow: 0 0 0 4px rgba(88,228,158,.12); }
.shield { width: 38px; height: 42px; display: grid; place-items: center; background: rgba(255,255,255,.12); clip-path: polygon(50% 0, 95% 18%, 85% 72%, 50% 100%, 15% 72%, 5% 18%); font-weight: 900; }
.subscription-card__content { position: relative; margin: 34px 0 24px; }
.subscription-card__content small { color: rgba(255,255,255,.6); }
.countdown { margin: 6px 0 3px; font-size: clamp(34px, 9vw, 48px); font-weight: 780; letter-spacing: -.055em; }
.subscription-card__content p { margin: 0; color: rgba(255,255,255,.55); font-size: 13px; }
.card-glow { position: absolute; width: 230px; height: 230px; right: -80px; bottom: -100px; background: radial-gradient(circle, rgba(242,107,56,.38), transparent 67%); }
.button { width: 100%; min-height: 52px; border: 0; border-radius: 16px; padding: 0 18px; display: flex; align-items: center; justify-content: center; gap: 9px; font-weight: 750; cursor: pointer; transition: transform .15s, opacity .15s; }
.button:active { transform: scale(.98); }
.button:disabled { opacity: .55; }
.button--light { position: relative; background: #fff; color: #202528; justify-content: space-between; }
.button--primary { background: var(--orange); color: white; max-width: 300px; }
.button--secondary { background: #292e2d; color: white; }

.section-block { margin-top: 30px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 14px; }
.section-heading h2 { margin: 4px 0 0; font-size: 23px; letter-spacing: -.035em; }
.secure-label { color: var(--green); font-size: 11px; font-weight: 700; }
.key-box { display: flex; align-items: center; gap: 12px; padding: 16px 14px 16px 18px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.key-box code { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #555a57; font-size: 12px; }
.icon-button { flex: 0 0 auto; border: 0; background: #efede7; width: 36px; height: 36px; border-radius: 11px; cursor: pointer; }

.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 30px; }
.quick-card { min-height: 174px; padding: 18px; border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius-md); text-align: left; display: flex; flex-direction: column; align-items: flex-start; cursor: pointer; box-shadow: 0 7px 24px rgba(43,39,31,.04); }
.quick-card--orange { background: #fae4d6; border-color: #f5d5c2; }
.quick-icon { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 13px; background: #fff; color: var(--orange-dark); font-size: 21px; margin-bottom: auto; }
.quick-card strong { font-size: 16px; margin-bottom: 5px; }
.quick-card small { color: var(--muted); line-height: 1.35; }

.page-header { padding: 24px 2px 28px; }
.page-header h1 { max-width: 400px; }
.plans-list, .guides-list { display: grid; gap: 12px; }
.plan-card { position: relative; border: 1px solid var(--line); background: var(--paper); padding: 21px; border-radius: var(--radius-md); cursor: pointer; display: grid; grid-template-columns: 1fr auto; align-items: center; text-align: left; }
.plan-card.recommended { border: 2px solid var(--orange); box-shadow: 0 12px 30px rgba(242,107,56,.11); }
.plan-card .badge { position: absolute; top: -10px; right: 17px; padding: 5px 10px; background: var(--orange); color: white; font-size: 10px; text-transform: uppercase; font-weight: 800; border-radius: 20px; }
.plan-card h3 { margin: 0 0 5px; font-size: 19px; }
.plan-card p { margin: 0; color: var(--muted); font-size: 13px; }
.plan-price { text-align: right; }
.plan-price strong { font-size: 23px; letter-spacing: -.04em; }
.plan-price small { display: block; color: var(--muted); }
.info-note { display: flex; gap: 13px; align-items: center; margin-top: 20px; padding: 16px; border-radius: 16px; background: #e9efe9; }
.info-note > span { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--green); font-weight: 800; }
.info-note p { margin: 0; display: flex; flex-direction: column; font-size: 12px; color: var(--muted); }
.info-note strong { color: var(--ink); margin-bottom: 2px; }

.guide-card { border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius-md); overflow: hidden; }
.guide-head { width: 100%; padding: 18px; border: 0; background: transparent; display: flex; align-items: center; gap: 14px; cursor: pointer; text-align: left; }
.platform-icon { width: 44px; height: 44px; border-radius: 14px; background: #eeece6; display: grid; place-items: center; font-size: 18px; font-weight: 800; }
.guide-head div:nth-child(2) { display: flex; flex-direction: column; flex: 1; }
.guide-head strong { font-size: 16px; }
.guide-head small { color: var(--muted); margin-top: 3px; }
.guide-chevron { transition: transform .2s; }
.guide-card.open .guide-chevron { transform: rotate(90deg); }
.guide-body { display: none; padding: 0 18px 20px; border-top: 1px solid var(--line); }
.guide-card.open .guide-body { display: block; }
.guide-body ol { list-style: none; padding: 15px 0 0; margin: 0; counter-reset: step; }
.guide-body li { position: relative; min-height: 34px; padding: 5px 0 14px 38px; color: #575a56; font-size: 14px; line-height: 1.45; counter-increment: step; }
.guide-body li::before { content: counter(step); position: absolute; left: 0; top: 2px; width: 27px; height: 27px; border-radius: 9px; background: #fae4d6; color: var(--orange-dark); display: grid; place-items: center; font-weight: 800; font-size: 12px; }
.download-link { text-decoration: none; background: #292e2d; color: white; }

.profile-card { text-align: center; padding: 30px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.profile-avatar { width: 82px; height: 82px; margin: 0 auto 15px; border-radius: 50%; font-size: 24px; }
.profile-card h2 { margin: 0 0 5px; font-size: 24px; }
.profile-card p { margin: 0; color: var(--muted); }
.settings-list { margin-top: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.settings-list > div, .settings-list > button { min-height: 58px; width: 100%; padding: 0 17px; border: 0; border-bottom: 1px solid var(--line); background: transparent; display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.settings-list > *:last-child { border-bottom: 0; }
.settings-list span { color: var(--muted); }
.settings-list strong { font-size: 13px; }
.settings-list button { cursor: pointer; }
.version { text-align: center; color: #aaa9a3; font-size: 11px; margin-top: 28px; }

.bottom-nav { position: fixed; z-index: 20; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(calc(100% - 28px), 526px); min-height: 68px; padding: 7px; border: 1px solid rgba(232,228,220,.9); border-radius: 23px; background: rgba(255,253,250,.9); backdrop-filter: blur(18px); box-shadow: var(--shadow); display: grid; grid-template-columns: repeat(4, 1fr); }
.bottom-nav button { border: 0; background: transparent; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #95958f; cursor: pointer; }
.bottom-nav button span { font-size: 20px; line-height: 1; }
.bottom-nav button small { font-size: 9px; font-weight: 650; }
.bottom-nav button.active { background: #f2efe8; color: var(--orange-dark); }
.toast { position: fixed; z-index: 30; left: 50%; bottom: calc(95px + env(safe-area-inset-bottom)); transform: translate(-50%, 15px); min-width: 180px; max-width: calc(100% - 40px); padding: 12px 18px; border-radius: 13px; background: #252b2b; color: white; text-align: center; font-size: 13px; opacity: 0; pointer-events: none; transition: .25s; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 560px) {
  body { background: #e8e5de; }
  .app-shell { background: var(--cream); box-shadow: 0 0 70px rgba(0,0,0,.08); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

