:root {
  --ink: #10130f;
  --ink-soft: #1b2119;
  --paper: #f6f3ed;
  --surface: #fff;
  --surface-soft: #efede7;
  --line: #dedbd3;
  --muted: #696d66;
  --coral: #ff5e48;
  --coral-soft: #fff0ec;
  --lime: #c8ff36;
  --lime-dark: #86ad13;
  --shadow: 0 22px 60px rgba(16, 19, 15, .1);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); font-family: "DM Sans", Arial, sans-serif; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3, .brand strong, .brand-mark { font-family: "Manrope", Arial, sans-serif; }
.overline { display: inline-block; color: var(--coral); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.overline.lime { color: var(--lime); }
.overline.coral { color: var(--coral); }

.brand { display: inline-flex; align-items: center; gap: 12px; position: relative; z-index: 2; }
.brand-mark { display: grid; place-items: center; width: 54px; height: 42px; transform: skew(-6deg); border-radius: 7px; background: var(--lime); color: var(--ink); font-size: 21px; font-weight: 900; letter-spacing: -.08em; }
.brand > span:last-child, .mobile-brand > span:last-child { display: grid; line-height: 1; }
.brand strong, .mobile-brand strong { font-size: 18px; letter-spacing: -.05em; }
.brand small, .mobile-brand small { margin-top: 5px; color: #9ba197; font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.brand-light { color: #fff; }

.login-view { display: grid; grid-template-columns: minmax(420px, .95fr) minmax(500px, 1.05fr); min-height: 100vh; }
.login-brand { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; padding: 54px clamp(42px, 6vw, 92px) 68px; background: var(--ink); color: #fff; }
.login-brand::before { content: ""; position: absolute; inset: auto -15% -32% 12%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(200,255,54,.22), transparent 66%); }
.login-copy { position: relative; z-index: 2; max-width: 610px; padding: 90px 0 50px; }
.login-copy h1 { max-width: 590px; margin: 19px 0 22px; font-size: clamp(50px, 5.8vw, 82px); line-height: .99; letter-spacing: -.075em; }
.login-copy > p { max-width: 540px; color: #b8bdb5; font-size: 18px; line-height: 1.65; }
.login-points { display: grid; gap: 17px; margin: 36px 0 0; padding: 0; list-style: none; color: #e8ebe5; }
.login-points li { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; }
.login-points span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--lime); color: var(--ink); font-size: 12px; font-weight: 900; }
.brand-orbit { position: absolute; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; }
.orbit-one { right: -260px; bottom: -210px; width: 650px; height: 650px; }
.orbit-two { right: -110px; bottom: -72px; width: 370px; height: 370px; }

.login-panel { display: grid; place-items: center; min-height: 100vh; padding: 54px; background: linear-gradient(135deg, #faf8f4, #eeeae2); }
.login-card { width: min(510px, 100%); padding: 52px; border: 1px solid rgba(16,19,15,.06); border-radius: 30px; background: rgba(255,255,255,.9); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 34px; }
.login-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 24px; border-radius: 16px; background: var(--ink); color: var(--lime); font-size: 24px; font-weight: 900; }
.login-card h2 { margin: 10px 0 12px; font-size: 38px; line-height: 1.05; letter-spacing: -.055em; }
.login-intro { color: var(--muted); line-height: 1.6; }
.purchase-alert { display: flex; align-items: flex-start; gap: 12px; margin: 26px 0; padding: 16px; border: 1px solid #ffd2c9; border-radius: 14px; background: var(--coral-soft); color: #793426; }
.purchase-alert > span { display: grid; flex: 0 0 auto; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: var(--coral); color: #fff; font-size: 12px; font-weight: 900; }
.purchase-alert p { margin: 0; font-size: 13px; line-height: 1.5; }
.login-form { display: grid; }
.login-form label { margin-bottom: 9px; font-size: 13px; font-weight: 800; }
.input-wrap { display: grid; grid-template-columns: 42px 1fr; align-items: center; height: 58px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: .2s ease; }
.input-wrap:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(200,255,54,.38); }
.input-wrap span { color: var(--muted); text-align: center; font-weight: 800; }
.input-wrap input { width: 100%; height: 100%; padding: 0 16px 0 0; border: 0; outline: 0; color: var(--ink); }
.form-error { min-height: 19px; margin: 7px 0 5px; color: #bd3424; font-size: 12px; }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 24px; border: 0; border-radius: 14px; cursor: pointer; font-weight: 800; transition: transform .18s ease, box-shadow .18s ease; }
.primary-button { background: var(--coral); color: #fff; box-shadow: 0 13px 28px rgba(255,94,72,.28); }
.secondary-button { background: var(--ink); color: #fff; }
.primary-button:hover, .secondary-button:hover { transform: translateY(-2px); }
.full { width: 100%; }
.install-link { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin: 20px 0 0; padding: 10px; border: 0; background: transparent; color: var(--ink); cursor: pointer; font-size: 13px; font-weight: 700; }
.privacy-note { margin: 23px 0 0; color: #999d96; font-size: 10px; line-height: 1.45; text-align: center; }

.app-shell { display: grid; grid-template-columns: 258px 1fr; min-height: 100vh; }
.sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; display: flex; flex-direction: column; width: 258px; padding: 32px 22px 24px; background: var(--ink); color: #fff; }
.sidebar .brand { margin: 0 10px 52px; }
.side-nav { display: grid; gap: 8px; }
.nav-item { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; width: 100%; min-height: 50px; padding: 0 14px; border: 0; border-radius: 12px; background: transparent; color: #a9afa5; text-align: left; cursor: pointer; font-size: 13px; }
.nav-item span { font-size: 18px; }
.nav-item b { font-weight: 600; }
.nav-item em { padding: 4px 7px; border-radius: 999px; background: #2d351f; color: var(--lime); font-size: 8px; font-style: normal; font-weight: 900; letter-spacing: .1em; }
.nav-item.active { background: var(--lime); color: var(--ink); }
.nav-item:hover:not(.active) { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-bottom { display: grid; gap: 7px; margin-top: auto; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.09); }

.main-column { grid-column: 2; min-width: 0; }
.topbar { position: sticky; z-index: 15; top: 0; display: flex; align-items: center; justify-content: space-between; height: 78px; padding: 0 clamp(24px, 4vw, 58px); border-bottom: 1px solid var(--line); background: rgba(246,243,237,.9); backdrop-filter: blur(16px); }
.topbar-kicker { margin: 0 0 3px; color: var(--coral); font-size: 8px; font-weight: 900; letter-spacing: .18em; }
.topbar > div:first-child > strong { font-family: "Manrope", Arial, sans-serif; font-size: 14px; }
.profile-chip { display: flex; align-items: center; gap: 11px; }
.profile-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: var(--lime); font-size: 13px; font-weight: 900; }
.profile-chip > span:nth-child(2) { display: grid; min-width: 150px; }
.profile-chip strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.profile-chip small { overflow: hidden; max-width: 230px; margin-top: 3px; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.profile-chip button { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 10px; background: #e9e6df; cursor: pointer; }

.content { width: min(1240px, calc(100% - 56px)); margin: 0 auto; padding: 40px 0 86px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: panelIn .28s ease; }
@keyframes panelIn { from { opacity: 0; transform: translateY(7px); } }
.welcome-card, .bonus-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; align-items: center; min-height: 255px; padding: clamp(32px, 5vw, 62px); border-radius: 28px; background: var(--ink); color: #fff; box-shadow: var(--shadow); }
.welcome-card::after, .bonus-hero::after { content: ""; position: absolute; right: -90px; top: -120px; width: 380px; height: 380px; border: 55px solid rgba(200,255,54,.08); border-radius: 50%; }
.welcome-card > div:first-child, .bonus-hero > div:first-child { position: relative; z-index: 2; max-width: 770px; }
.welcome-card h1, .bonus-hero h1 { margin: 12px 0 13px; font-size: clamp(38px, 4.3vw, 60px); line-height: 1; letter-spacing: -.065em; }
.welcome-card p, .bonus-hero p { max-width: 690px; margin: 0; color: #b9bdb6; line-height: 1.6; }
.progress-ring { position: relative; z-index: 2; display: grid; place-items: center; align-content: center; width: 140px; height: 140px; border: 12px solid rgba(255,255,255,.1); border-top-color: var(--lime); border-right-color: var(--lime); border-radius: 50%; transform: rotate(45deg); }
.progress-ring > * { transform: rotate(-45deg); }
.progress-ring strong { font-family: "Manrope", Arial, sans-serif; font-size: 28px; }
.progress-ring span { color: #aeb3aa; font-size: 9px; text-transform: uppercase; }
.release-alert { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 15px; margin: 24px 0 42px; padding: 20px 22px; border: 1px solid #e7d9a4; border-radius: 18px; background: #fff9df; }
.alert-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: #f4df8f; font-size: 20px; }
.release-alert strong { font-size: 14px; }
.release-alert p { margin: 4px 0 0; color: #766b43; font-size: 12px; }
.countdown-chip { padding: 9px 13px; border-radius: 999px; background: #2e2d21; color: #fff; font-size: 9px; font-weight: 800; white-space: nowrap; }
.section-title { display: flex; align-items: end; justify-content: space-between; margin-bottom: 20px; }
.section-title h2 { margin: 6px 0 0; font-size: 30px; letter-spacing: -.05em; }
.library-count { color: var(--muted); font-size: 11px; }
.library-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.content-card { display: grid; grid-template-columns: 185px 1fr; min-height: 278px; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: 0 12px 32px rgba(16,19,15,.06); }
.content-card.locked { opacity: .82; }
.book-cover { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; min-height: 100%; padding: 25px; color: #fff; }
.book-cover::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(-19deg, transparent 0 18px, rgba(255,255,255,.05) 18px 19px); }
.book-cover span, .book-cover b, .book-cover small, .book-cover i { position: relative; z-index: 1; }
.book-cover span { align-self: flex-start; margin-bottom: auto; padding: 6px 9px; border-radius: 7px; background: var(--lime); color: var(--ink); font-size: 11px; font-weight: 900; }
.book-cover b { font: 800 21px/1.03 "Manrope", Arial, sans-serif; letter-spacing: -.05em; }
.book-cover small { margin-top: 8px; color: rgba(255,255,255,.7); font-size: 9px; text-transform: uppercase; }
.book-cover i { position: absolute; top: 47%; left: 50%; display: grid; place-items: center; width: 52px; height: 52px; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(16,19,15,.8); color: var(--lime); font-size: 23px; font-style: normal; }
.cover-one { background: linear-gradient(150deg, #1d6f38, #0f2918); }
.cover-two { background: linear-gradient(150deg, #e0543e, #6e2117); }
.cover-three, .cover-four, .cover-five { background: linear-gradient(150deg, #51564e, #20241f); }
.card-body { display: flex; flex-direction: column; padding: 26px; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #979a94; font-size: 9px; }
.status { padding: 5px 8px; border-radius: 999px; font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.available-status { background: #eaf8c4; color: #466106; }
.locked-status { background: #e8e7e3; color: #73766f; }
.card-body h3 { margin: 22px 0 9px; font-size: 21px; letter-spacing: -.04em; }
.card-body p { margin-bottom: 20px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.download-button, .locked-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 43px; margin-top: auto; border: 0; border-radius: 11px; font-size: 11px; font-weight: 800; }
.download-button { background: var(--coral); color: #fff; box-shadow: 0 9px 19px rgba(255,94,72,.2); }
.locked-button { background: #e7e6e1; color: #777a74; cursor: pointer; }

.bonus-hero { background: linear-gradient(135deg, #10130f, #27351a); }
.bonus-hero-icon { position: relative; z-index: 2; display: grid; place-items: center; width: 130px; height: 130px; border-radius: 34px; background: var(--lime); color: var(--ink); font-size: 55px; transform: rotate(8deg); }
.bonus-alert { border-color: #d5e7a7; background: #f2fadf; }
.bonus-library { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.bonus-library article { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; min-height: 180px; padding: 25px; border: 1px solid var(--line); border-radius: 21px; background: #fff; box-shadow: 0 10px 28px rgba(16,19,15,.05); }
.bonus-number { display: grid; place-items: center; width: 72px; height: 88px; border-radius: 15px; background: var(--ink); color: var(--lime); font: 800 25px "Manrope", Arial, sans-serif; }
.bonus-library small { color: var(--coral); font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.bonus-library h3 { margin: 8px 0; font-size: 17px; line-height: 1.2; }
.bonus-library p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.bonus-library button { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #ebeae5; color: #72756f; cursor: pointer; }

.mobile-nav { display: none; }
.modal { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 22px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(8,10,8,.76); backdrop-filter: blur(8px); }
.modal-card { position: relative; z-index: 1; width: min(620px, 100%); max-height: min(850px, calc(100vh - 35px)); overflow: auto; padding: 42px; border-radius: 26px; background: var(--surface); box-shadow: 0 30px 90px rgba(0,0,0,.35); }
.modal-close { position: absolute; top: 15px; right: 16px; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #eeece6; cursor: pointer; font-size: 24px; }
.modal-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 19px; border-radius: 14px; background: var(--ink); color: var(--lime); font-size: 22px; }
.modal-card h2 { margin: 9px 0 10px; font-size: 32px; letter-spacing: -.05em; }
.modal-lead, .locked-modal > p:not(.overline) { color: var(--muted); line-height: 1.6; }
.device-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 27px 0 20px; padding: 5px; border-radius: 13px; background: #eeeae4; }
.device-tabs button { min-height: 42px; border: 0; border-radius: 9px; background: transparent; cursor: pointer; font-size: 12px; font-weight: 800; }
.device-tabs button.active { background: #fff; box-shadow: 0 4px 13px rgba(16,19,15,.08); }
.device-panel { display: none; }
.device-panel.active { display: block; }
.device-panel ol { display: grid; gap: 13px; margin: 0 0 25px; padding: 0; list-style: none; }
.device-panel li { display: grid; grid-template-columns: auto 1fr; gap: 13px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; }
.device-panel li > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--lime); font-size: 11px; font-weight: 900; }
.device-panel strong { font-size: 12px; }
.device-panel p { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.locked-modal { max-width: 480px; text-align: center; }
.lock-illustration { display: grid; place-items: center; width: 82px; height: 82px; margin: 0 auto 22px; border-radius: 50%; background: var(--ink); color: var(--lime); font-size: 34px; }
.locked-modal .primary-button { margin-top: 10px; }

button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }

@media (max-width: 1100px) {
  .login-view { grid-template-columns: .85fr 1.15fr; }
  .login-brand { padding-inline: 45px; }
  .login-copy h1 { font-size: 55px; }
  .content-card { grid-template-columns: 150px 1fr; }
  .bonus-library { grid-template-columns: 1fr; }
}

@media (max-width: 840px) {
  .login-view { display: block; min-height: 100vh; background: linear-gradient(145deg, var(--ink) 0 28%, var(--paper) 28%); }
  .login-brand { display: none; }
  .login-panel { min-height: 100vh; padding: 25px 18px; background: transparent; }
  .login-card { padding: 32px 25px; border-radius: 24px; }
  .mobile-brand { display: flex; }
  .mobile-brand .brand-mark { width: 48px; height: 38px; font-size: 19px; }
  .login-card h2 { font-size: 32px; }

  .app-shell { display: block; padding-bottom: 72px; }
  .sidebar { display: none; }
  .main-column { grid-column: auto; }
  .topbar { height: 66px; padding: 0 16px; }
  .topbar > div:first-child { max-width: 48%; }
  .topbar > div:first-child > strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .profile-chip > span:nth-child(2), .profile-chip button { display: none; }
  .content { width: min(100% - 28px, 700px); padding: 22px 0 42px; }
  .welcome-card, .bonus-hero { grid-template-columns: 1fr; min-height: 0; padding: 32px 25px; }
  .welcome-card h1, .bonus-hero h1 { font-size: 39px; }
  .progress-ring { width: 96px; height: 96px; margin-top: 27px; border-width: 8px; }
  .progress-ring strong { font-size: 21px; }
  .bonus-hero-icon { width: 80px; height: 80px; margin-top: 26px; border-radius: 23px; font-size: 34px; }
  .release-alert { grid-template-columns: auto 1fr; margin-bottom: 31px; padding: 17px; }
  .countdown-chip { grid-column: 1 / -1; justify-self: start; }
  .section-title { align-items: start; }
  .section-title h2 { font-size: 27px; }
  .library-grid { grid-template-columns: 1fr; }
  .content-card { grid-template-columns: 125px 1fr; min-height: 245px; }
  .book-cover { padding: 17px; }
  .book-cover b { font-size: 16px; }
  .book-cover span { font-size: 9px; }
  .card-body { padding: 21px; }
  .card-body h3 { margin-top: 18px; font-size: 18px; }
  .card-meta span:last-child { display: none; }
  .mobile-nav { position: fixed; z-index: 30; inset: auto 0 0; display: flex; justify-content: space-around; min-height: 67px; padding: 6px max(12px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); border-top: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(18px); }
  .mobile-nav button { display: grid; place-items: center; gap: 1px; min-width: 76px; border: 0; background: transparent; color: #888c84; font-size: 9px; font-weight: 700; }
  .mobile-nav span { font-size: 19px; }
  .mobile-nav button.active { color: var(--coral); }
}

@media (max-width: 520px) {
  .login-card { padding-inline: 21px; }
  .content-card { grid-template-columns: 108px 1fr; }
  .book-cover { padding: 13px; }
  .book-cover b { font-size: 14px; }
  .book-cover small { font-size: 7px; }
  .book-cover i { width: 43px; height: 43px; }
  .card-body { padding: 18px 15px; }
  .card-body p { font-size: 11px; }
  .download-button, .locked-button { min-height: 40px; font-size: 10px; }
  .library-count { display: none; }
  .bonus-library article { grid-template-columns: auto 1fr; gap: 14px; padding: 18px; }
  .bonus-library article button { grid-column: 1 / -1; width: 100%; border-radius: 10px; }
  .bonus-number { width: 52px; height: 70px; font-size: 19px; }
  .modal-card { padding: 36px 20px 24px; border-radius: 22px; }
  .modal-card h2 { font-size: 27px; }
}

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