:root {
  --ink: #141313;
  --ink-soft: #1b1a1a;
  --panel: #221f1e;
  --panel-light: #2b2725;
  --line: rgba(246, 239, 229, 0.12);
  --muted: #a49d96;
  --cream: #f7f0e6;
  --coral: #ff6b5e;
  --yellow: #f3c969;
  --mint: #87c3b3;
  --lavender: #b5a6e8;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; }
html { background: var(--ink); }
body { margin: 0; background: var(--ink); color: var(--cream); font-family: "DM Sans", Arial, sans-serif; letter-spacing: 0; }
button, input { font: inherit; }
button { border: 0; cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
.app-frame { min-height: 100vh; max-width: 1600px; margin: 0 auto; background: var(--ink); }
.topbar { height: 78px; display: flex; align-items: center; justify-content: space-between; padding: 0 34px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; background: rgba(20, 19, 19, 0.96); backdrop-filter: blur(16px); }
.brand { display: flex; align-items: center; gap: 11px; color: var(--cream); background: none; padding: 0; text-align: left; }
.brand-mark { width: 31px; height: 31px; display: flex; align-items: end; gap: 3px; padding: 5px; border: 1px solid rgba(247, 240, 230, 0.38); border-radius: 8px; transform: rotate(-8deg); }
.brand-mark span { display: block; width: 5px; border-radius: 2px; background: var(--coral); }
.brand-mark span:nth-child(1) { height: 9px; background: var(--yellow); }
.brand-mark span:nth-child(2) { height: 15px; }
.brand-mark span:nth-child(3) { height: 12px; background: var(--mint); }
.brand-copy { display: grid; line-height: 1; gap: 4px; }
.brand-copy strong { font-family: "Space Grotesk", Arial, sans-serif; font-size: 19px; letter-spacing: .13em; }
.brand-copy small { color: var(--muted); font-size: 8px; letter-spacing: .18em; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.search-box { width: min(330px, 32vw); height: 38px; display: flex; align-items: center; gap: 9px; padding: 0 13px; border: 1px solid var(--line); border-radius: 5px; background: rgba(255, 255, 255, 0.045); color: var(--muted); }
.search-box svg { width: 16px; height: 16px; flex: 0 0 auto; }
.search-box input { width: 100%; border: 0; background: transparent; color: var(--cream); outline: 0; font-size: 12px; }
.search-box input::placeholder { color: #7c7570; }
.top-link, .profile-chip { display: inline-flex; align-items: center; gap: 8px; color: var(--cream); background: none; font-size: 12px; }
.top-link svg { width: 16px; }
.profile-chip { padding: 5px 8px 5px 5px; border: 1px solid var(--line); border-radius: 24px; }
.profile-chip svg { width: 14px; color: var(--muted); }
.avatar { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: var(--yellow); color: var(--ink); font-weight: 700; font-size: 12px; }
.app-layout { display: grid; grid-template-columns: 218px minmax(0, 1fr); }
.sidebar { min-height: calc(100vh - 78px); padding: 29px 17px 23px; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.side-group { display: grid; gap: 11px; }
.side-group-spaced { margin-top: 27px; }
.side-label, .section-label, .eyebrow { color: var(--muted); text-transform: uppercase; letter-spacing: .16em; font-size: 9px; font-weight: 700; }
.side-label { padding: 0 12px; }
.side-nav { display: grid; gap: 4px; }
.nav-item { min-height: 39px; display: flex; align-items: center; gap: 11px; width: 100%; padding: 0 12px; color: var(--muted); background: none; border-radius: 5px; text-align: left; font-size: 13px; }
.nav-item svg { width: 17px; height: 17px; }
.nav-item:hover, .nav-item.active { color: var(--cream); background: rgba(255, 255, 255, 0.08); }
.nav-item.active svg { color: var(--coral); }
.nav-count { margin-left: auto; min-width: 18px; height: 18px; display: grid; place-items: center; border-radius: 20px; color: var(--ink); background: var(--yellow); font-size: 10px; font-weight: 700; }
.wallet-card { margin-top: auto; padding: 15px; border: 1px solid rgba(243, 201, 105, .24); border-radius: 7px; background: #2b2520; }
.wallet-top { display: flex; justify-content: space-between; color: #d4b87a; font-size: 10px; letter-spacing: .04em; }
.wallet-top svg { width: 15px; color: var(--yellow); }
.coin-line { display: flex; align-items: baseline; gap: 7px; margin-top: 12px; }
.coin-line strong { font-family: "Space Grotesk", Arial, sans-serif; font-size: 27px; }
.coin-line span:last-child { color: var(--muted); font-size: 11px; }
.coin-icon { color: var(--yellow); font-size: 17px; }
.wallet-button { width: 100%; height: 34px; display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 13px; border-radius: 4px; color: var(--ink); background: var(--yellow); font-size: 11px; font-weight: 700; }
.wallet-button svg { width: 14px; }
.wallet-card p { margin: 11px 0 0; color: #9d8b70; font-size: 10px; line-height: 1.45; }
.side-foot { display: flex; align-items: center; gap: 7px; margin: 19px 12px 0; color: #77716c; font-size: 10px; }
.live-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 4px rgba(255, 107, 94, .12); }
.content { min-width: 0; padding: 29px 34px 80px; }
.content-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.eyebrow { margin: 0 0 8px; color: var(--coral); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: "Space Grotesk", Arial, sans-serif; letter-spacing: -.015em; }
h1 { margin-bottom: 0; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.05; }
h2 { margin-bottom: 0; font-size: 24px; }
.outline-button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 13px; border: 1px solid var(--line); border-radius: 4px; color: var(--cream); background: transparent; font-size: 11px; white-space: nowrap; }
.outline-button:hover { border-color: rgba(247, 240, 230, .5); background: rgba(255,255,255,.05); }
.outline-button svg { width: 14px; height: 14px; }
.outline-button strong { color: var(--yellow); font-size: 11px; }
.filter-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 18px; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip { min-height: 28px; padding: 0 12px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); background: transparent; font-size: 11px; white-space: nowrap; }
.filter-chip:hover, .filter-chip.active { color: var(--ink); background: var(--cream); border-color: var(--cream); }
.hero { min-height: 419px; position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 37px 39px; border-radius: 8px; isolation: isolate; box-shadow: var(--shadow); background: #2a2524; }
.hero-backdrop { position: absolute; inset: 0; z-index: -2; background-image: url("https://images.unsplash.com/photo-1524250502761-1ac6f2e30d43?auto=format&fit=crop&w=1800&q=85"); background-size: cover; background-position: center 33%; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(18, 16, 16, .58); }
.hero-content { max-width: 510px; }
.hero-kicker { display: flex; align-items: center; gap: 9px; margin-bottom: 17px; color: #d2c7bc; text-transform: uppercase; letter-spacing: .12em; font-size: 9px; font-weight: 700; }
.dot-separator { color: var(--coral); }
.hero h2 { margin: 0; font-size: clamp(39px, 5.2vw, 70px); line-height: .97; }
.hero h2 em { color: var(--yellow); font-style: normal; }
.hero p { max-width: 440px; margin: 19px 0 14px; color: #d9d1c9; line-height: 1.55; font-size: 13px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.hero-tags span { padding: 5px 8px; border: 1px solid rgba(247,240,230,.25); border-radius: 3px; color: #ddd4cb; font-size: 10px; }
.hero-actions { display: flex; gap: 9px; margin-top: 22px; }
.primary-button { min-height: 39px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; border-radius: 4px; color: var(--ink); background: var(--coral); font-size: 11px; font-weight: 700; }
.primary-button:hover { background: #ff8076; }
.primary-button svg { width: 15px; height: 15px; }
.primary-button.full-width { width: 100%; }
.icon-button { width: 35px; height: 35px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 4px; color: var(--cream); background: rgba(255,255,255,.04); }
.icon-button:hover { background: rgba(255,255,255,.1); }
.icon-button svg { width: 16px; height: 16px; }
.icon-button.light { border-color: rgba(247,240,230,.36); background: rgba(12,11,11,.28); }
.hero-foot { display: flex; align-items: center; gap: 18px; margin-top: 21px; color: #bcb1a7; font-size: 10px; }
.hero-rating { display: inline-flex; align-items: center; gap: 4px; color: var(--yellow); }
.hero-rating svg { width: 13px; height: 13px; fill: var(--yellow); }
.hero-badge { position: absolute; top: 26px; right: 29px; display: grid; gap: 1px; text-align: right; color: #d4c8bc; }
.hero-badge span { font-size: 9px; letter-spacing: .15em; }
.hero-badge strong { color: var(--yellow); font-family: "Space Grotesk", Arial, sans-serif; font-size: 30px; line-height: 1; }
.continue-strip { min-height: 99px; display: grid; grid-template-columns: 105px minmax(0, 1fr) auto; align-items: center; gap: 16px; margin-top: 22px; padding: 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.continue-art { align-self: stretch; min-height: 74px; position: relative; overflow: hidden; border-radius: 4px; background: var(--panel); background-image: var(--art); background-size: cover; background-position: center; }
.continue-art::after { content: ""; position: absolute; inset: 0; background: rgba(17,15,15,.35); }
.play-orb { position: absolute; z-index: 1; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); background: var(--cream); }
.play-orb svg { width: 13px; height: 13px; fill: var(--ink); }
.continue-copy { min-width: 0; }
.continue-copy h3 { margin: 4px 0 4px; font-size: 16px; }
.continue-copy p { margin: 0 0 9px; color: var(--muted); font-size: 10px; }
.continue-copy p span { padding: 0 4px; color: var(--coral); }
.progress { height: 3px; overflow: hidden; background: #3a3532; }
.progress span { display: block; height: 100%; background: var(--coral); }
.continue-button { min-height: 33px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid var(--line); border-radius: 4px; color: var(--cream); background: none; font-size: 10px; white-space: nowrap; }
.continue-button:hover { background: rgba(255,255,255,.07); }
.continue-button svg { width: 14px; }
.content-section { margin-top: 38px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-heading .section-label { display: block; margin-bottom: 7px; color: var(--muted); }
.text-button { display: inline-flex; align-items: center; gap: 6px; padding: 0; color: var(--yellow); background: none; font-size: 11px; }
.text-button svg { width: 14px; }
.text-button:hover { color: var(--cream); }
.story-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.story-card { min-width: 0; position: relative; }
.poster { aspect-ratio: .72; position: relative; overflow: hidden; border-radius: 6px; background: var(--panel); }
.poster img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .4s ease; }
.story-card:hover .poster img { transform: scale(1.045); }
.poster::after { content: ""; position: absolute; inset: 0; background: rgba(8, 8, 8, .08); pointer-events: none; }
.poster-badge { position: absolute; z-index: 1; top: 8px; left: 8px; padding: 4px 6px; border-radius: 3px; color: var(--ink); background: var(--yellow); font-size: 8px; font-weight: 700; letter-spacing: .08em; }
.poster-save { position: absolute; z-index: 1; right: 8px; top: 8px; width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid rgba(247,240,230,.3); border-radius: 4px; color: var(--cream); background: rgba(10,10,10,.38); opacity: 0; transition: opacity .2s; }
.story-card:hover .poster-save, .poster-save.saved { opacity: 1; }
.poster-save svg { width: 13px; }
.poster-save.saved svg { color: var(--yellow); fill: var(--yellow); }
.poster-play { position: absolute; z-index: 1; left: 50%; top: 50%; width: 41px; height: 41px; display: grid; place-items: center; transform: translate(-50%,-50%); border-radius: 50%; color: var(--ink); background: rgba(247,240,230,.93); opacity: 0; transition: opacity .2s, transform .2s; }
.story-card:hover .poster-play { opacity: 1; transform: translate(-50%,-50%) scale(1.03); }
.poster-play svg { width: 16px; height: 16px; fill: var(--ink); }
.story-info { padding: 10px 2px 0; }
.story-info h3 { margin: 0 0 5px; overflow: hidden; color: var(--cream); font-size: 14px; line-height: 1.16; text-overflow: ellipsis; white-space: nowrap; }
.story-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; }
.story-meta span:last-child { display: inline-flex; align-items: center; gap: 3px; }
.story-meta svg { width: 11px; height: 11px; color: var(--yellow); fill: var(--yellow); }
.quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 13px; }
.quick-card { min-height: 122px; display: grid; grid-template-columns: 94px minmax(0,1fr); gap: 13px; padding: 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.quick-art { min-height: 101px; overflow: hidden; border-radius: 4px; background-size: cover; background-position: center; }
.quick-copy { display: flex; flex-direction: column; min-width: 0; }
.quick-copy h3 { margin: 4px 0 7px; overflow: hidden; font-size: 14px; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.quick-copy p { display: -webkit-box; overflow: hidden; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.quick-bottom { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin-top: auto; color: var(--yellow); font-size: 10px; }
.quick-bottom button { display: inline-flex; align-items: center; gap: 4px; color: var(--yellow); background: none; font-size: 10px; }
.quick-bottom svg { width: 13px; }
.editor-note { min-height: 116px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 17px; margin-top: 42px; padding: 19px 21px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.note-icon { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); background: var(--mint); }
.note-icon svg { width: 17px; }
.editor-note h2 { margin: 4px 0 5px; font-size: 21px; }
.editor-note p { margin: 0; color: var(--muted); font-size: 11px; }
.mobile-nav { display: none; }
.empty-state { grid-column: 1/-1; padding: 35px 0; color: var(--muted); text-align: center; font-size: 12px; }
.toast { position: fixed; z-index: 30; left: 50%; bottom: 27px; max-width: min(92vw, 400px); padding: 11px 16px; border: 1px solid rgba(247,240,230,.2); border-radius: 5px; color: var(--cream); background: #322d2a; box-shadow: var(--shadow); font-size: 12px; opacity: 0; pointer-events: none; transform: translate(-50%, 14px); transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.modal-shell { position: fixed; z-index: 25; inset: 0; display: none; place-items: center; padding: 20px; }
.modal-shell.open { display: grid; }
.modal-scrim { position: absolute; inset: 0; background: rgba(5,5,5,.72); backdrop-filter: blur(5px); }
.modal { width: min(100%, 420px); position: relative; padding: 29px; border: 1px solid rgba(247,240,230,.15); border-radius: 8px; background: #231f1e; box-shadow: var(--shadow); }
.modal-close { position: absolute; top: 15px; right: 15px; }
.modal-kicker { display: flex; align-items: center; gap: 6px; color: var(--yellow); font-size: 9px; font-weight: 700; letter-spacing: .15em; }
.modal h2 { margin: 13px 0 9px; font-size: 29px; line-height: 1.05; }
.modal-lead { margin-bottom: 18px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.wallet-summary, .unlock-summary { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.wallet-summary strong, .unlock-summary strong { display: inline-flex; align-items: center; gap: 4px; color: var(--cream); font-size: 13px; }
.package-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin: 17px 0 19px; }
.package-option { min-height: 76px; position: relative; display: grid; align-content: center; justify-items: start; gap: 4px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 5px; color: var(--cream); background: rgba(255,255,255,.035); text-align: left; }
.package-option:hover, .package-option.selected { border-color: var(--yellow); background: rgba(243,201,105,.09); }
.package-option span { font-family: "Space Grotesk", Arial, sans-serif; font-size: 19px; }
.package-option small { color: var(--muted); font-size: 11px; }
.package-option b { position: absolute; right: 8px; top: 8px; color: var(--yellow); font-size: 8px; font-weight: 700; }
.fine-print { margin: 13px 0 0; color: #766f69; font-size: 9px; text-align: center; }
.unlock-art { height: 116px; margin: -29px -29px 23px; border-radius: 8px 8px 0 0; background-image: url("https://images.unsplash.com/photo-1488426862026-3ee34a7d66df?auto=format&fit=crop&w=800&q=80"); background-size: cover; background-position: center 30%; }
.unlock-summary { margin: 15px 0 17px; }
.centered { width: 100%; justify-content: center; margin-top: 13px; color: var(--muted); }

@media (max-width: 1120px) {
  .topbar { padding: 0 23px; }
  .content { padding: 25px 23px 75px; }
  .story-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quick-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 780px) {
  .topbar { height: 68px; padding: 0 16px; }
  .topbar-actions { gap: 9px; }
  .search-box { width: 38px; padding: 0 10px; border: 0; background: transparent; }
  .search-box input { position: absolute; width: 1px; height: 1px; opacity: 0; }
  .search-box.expanded { width: min(52vw, 220px); padding: 0 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.045); }
  .search-box.expanded input { position: static; width: 100%; height: auto; opacity: 1; }
  .top-link span, .profile-name, .profile-chip > svg { display: none; }
  .top-link { padding: 6px; }
  .profile-chip { border: 0; padding: 0; }
  .app-layout { display: block; }
  .sidebar { display: none; }
  .content { padding: 22px 16px 94px; }
  .mobile-nav { position: fixed; z-index: 15; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(4,1fr); padding: 8px max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(20,19,19,.96); backdrop-filter: blur(16px); }
  .mobile-nav .nav-item { min-height: 53px; display: grid; justify-items: center; align-content: center; gap: 4px; padding: 0; border-radius: 4px; font-size: 9px; }
  .mobile-nav .nav-item svg { width: 18px; height: 18px; }
  .mobile-nav .nav-item.active { background: rgba(255,255,255,.07); }
  .content-toolbar { align-items: center; }
  .content-toolbar .outline-button span { display: none; }
  .content-toolbar .outline-button { padding: 0 10px; }
  .hero { min-height: 468px; padding: 26px 23px; }
  .hero-backdrop { background-position: 62% center; }
  .hero::after { background: rgba(18,16,16,.63); }
  .hero h2 { font-size: 46px; }
  .continue-strip { grid-template-columns: 74px minmax(0,1fr); gap: 11px; }
  .continue-art { min-height: 66px; }
  .continue-button { grid-column: 2; justify-self: start; }
  .story-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px 11px; }
  .quick-grid { grid-template-columns: 1fr; }
  .editor-note { grid-template-columns: auto minmax(0,1fr); }
  .editor-note .outline-button { grid-column: 2; justify-self: start; }
}

@media (max-width: 420px) {
  h1 { font-size: 28px; }
  h2 { font-size: 21px; }
  .hero { min-height: 485px; }
  .hero h2 { font-size: 42px; }
  .hero p { font-size: 12px; }
  .hero-badge { right: 19px; top: 20px; }
  .modal { padding: 23px; }
  .unlock-art { margin: -23px -23px 20px; }
}
