/* lovepotionai.com -- site layer on top of the Organic tokens (organic.css).
   Organic is the handoff's design system; this file adds what the ported pages need to run as a
   real site: nav, responsive fallbacks for the reference's fixed grids, placeholders, the
   Listening Library, the book reader, and the Makers' Market. */

html { scroll-padding-top: 56px; }
/* the hidden attribute must beat any display rule below (.player-state is display:flex) --
   without this the Listening Library showed the empty state above the reading state */
[hidden] { display: none !important; }
body { font-size: 15px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--color-accent); color: var(--color-bg); padding: 8px 14px; border-radius: 999px; z-index: 100; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
code { font-size: 0.92em; background: var(--color-neutral-200); padding: 1px 6px; border-radius: 6px; }

/* — nav — */
.site-nav { background: var(--color-bg); position: sticky; top: 0; z-index: 20; flex-wrap: wrap; }
.site-nav .nav-brand { color: inherit; text-decoration: none; }
.nav-links { display: flex; gap: var(--space-4); align-items: center; flex-wrap: wrap; }
.nav-toggle { display: none; font: inherit; background: none; border: 1px solid var(--color-divider); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .nav-links { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 4px 0 6px; }
  .nav-links.is-open { display: flex; }
  /* a finger-sized row per link (was 22px tall with 10px gaps) */
  .nav-links a { display: block; padding: 11px 0; }
}

/* — footer — */
.site-footer { padding: 32px 0 48px; font-size: 13px; color: var(--color-neutral-600); }
.site-footer .wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 72px); }

/* — placeholders (every illustration in the handoff is a labelled slot; no artwork exists yet) — */
.slot { display: grid; place-items: center; text-align: center; padding: 14px; color: var(--color-accent-800);
        background: repeating-linear-gradient(135deg, var(--color-accent-100) 0 12px, var(--color-neutral-100) 12px 24px);
        border: 1.5px dashed var(--color-accent-300); border-radius: var(--radius-md); font-size: 12px; line-height: 1.4; min-height: 72px; overflow: hidden; }
.slot span { max-width: 36ch; }
.slot-circle { border-radius: 50%; padding: 10px; font-size: 13px; font-weight: 700; }
.is-soon { opacity: 0.55; cursor: not-allowed; }
.is-soon small { font-weight: 700; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.join-note { margin: 12px 0 0; font-weight: 600; color: var(--color-accent-2-800); }

/* — responsive fallbacks for the reference's fixed grids — */
@media (max-width: 900px) {
  main section[style*="grid-template-columns:minmax(0,1.1fr)"] { grid-template-columns: 1fr !important; }
  main div[style*="grid-template-columns:repeat(3,1fr)"] { grid-template-columns: 1fr !important; }
  main div[style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
  main div[style*="grid-template-columns:repeat(2,1fr)"] { grid-template-columns: 1fr !important; }
  main div[style*="grid-template-columns:repeat(4,1fr)"] { grid-template-columns: 1fr 1fr !important; }
}

/* — shared page shells — */
.narrow { max-width: 720px; margin: 0 auto; padding: 48px clamp(20px, 5vw, 64px) 80px; }
.narrow h1 { font-size: clamp(32px, 5vw, 44px); margin: 14px 0 10px; }
.lede { font-size: 17px; line-height: 1.65; color: var(--color-neutral-800); max-width: 60ch; }
.kicker { font-weight: 700; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-accent-700); margin: 0 0 10px; }
.kicker-sage { color: var(--color-accent-2-700); }
.back { font-weight: 600; font-size: 14px; }
.notice { background: var(--color-accent-2-100); color: var(--color-accent-2-800); padding: 12px 16px; border-radius: var(--radius-md); font-weight: 600; }
/* a wide table scrolls inside its card instead of panning the whole page sideways on a phone */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap .table { min-width: 420px; }
.doc-wrap { max-width: 900px; margin: 0 auto; padding: 40px clamp(20px, 5vw, 64px) 80px; }
.doc-page { font-size: 16px; line-height: 1.7; }
.doc-page h1 { font-size: clamp(30px, 4.5vw, 44px); margin: 24px 0 12px; }
.doc-page h2 { font-size: 26px; margin: 32px 0 8px; }
.doc-page h3 { font-size: 20px; margin: 24px 0 6px; }
.doc-page ul, .doc-page ol { padding-left: 1.3em; }
.doc-page table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.doc-page td, .doc-page th { padding: 8px 10px; border-bottom: 1px solid var(--color-divider); vertical-align: top; text-align: left; }
.doc-page hr { border: 0; height: 1px; background: var(--color-divider); margin: 28px 0; }
.doc-page blockquote { margin: 0; padding-left: 16px; border-left: 3px solid var(--color-accent-300); color: var(--color-neutral-800); }

/* — pills (tabs, choices, pace) — */
.pill { font: inherit; font-family: var(--font-heading); font-size: 14px; border: 0; border-radius: 999px; padding: 9px 16px; cursor: pointer; background: var(--color-neutral-200); color: var(--color-text); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.pill.is-story { background: var(--color-accent); color: var(--color-neutral-100); }
.pill.is-board { background: var(--color-accent-2); color: var(--color-neutral-100); }
.pill.is-neutral { background: var(--color-neutral-200); color: var(--color-text); }
.tabs .pill:not(.is-on) { background: var(--color-neutral-200); color: var(--color-text); }
.pill-lg { font-size: 17px; padding: 14px 24px; }
.pill:hover { filter: brightness(0.96); }

/* — Listening Library — */
.listen-wrap { max-width: 1220px; margin: 0 auto; padding: 48px 32px 80px; }
.listen-head h1 { font-size: clamp(34px, 4.5vw, 52px); margin: 0 0 10px; }
.listen-head .lede { max-width: 66ch; margin-bottom: 28px; }
.listen-grid { display: grid; grid-template-columns: 390px 1fr; gap: 28px; align-items: start; }
@media (max-width: 900px) { .listen-grid { grid-template-columns: 1fr; } .listen-wrap { padding: 32px 18px 64px; } }
.tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.book-list { list-style: none; margin: 0; padding: 0; max-height: 70vh; overflow: auto; border-radius: var(--radius-md); }
.book-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; background: transparent; border: 0; padding: 10px 12px; border-radius: var(--radius-md); cursor: pointer; color: inherit; }
.book-row:hover, .book-row.is-selected { background: var(--color-accent-100); }
.book-row:disabled { cursor: progress; opacity: 0.8; }
.badge { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-heading); font-size: 15px; color: var(--color-neutral-100); }
.badge-accent { background: var(--color-accent); }
.badge-sage { background: var(--color-accent-2); }
.book-row-text { display: flex; flex-direction: column; min-width: 0; }
.book-row-title { font-weight: 700; font-size: 15.5px; }
.book-row-meta { font-size: 12.5px; color: var(--color-neutral-600); }
.book-row-resume { font-size: 12.5px; font-weight: 700; color: var(--color-accent-2-800); }
.player { padding: 36px 40px; min-height: 520px; border-radius: var(--radius-lg); gap: 0; }
@media (max-width: 600px) { .player { padding: 24px 18px; } }
.player-state { min-height: 300px; display: flex; flex-direction: column; }
.player-state[data-state="empty"] { align-items: center; justify-content: center; text-align: center; }
.empty-orb { width: 72px; height: 72px; border-radius: 50%; background: var(--color-accent-2-100); color: var(--color-accent-2-700); display: grid; place-items: center; margin-bottom: 14px; }
.player-title { font-family: var(--font-heading); font-size: 22px; margin: 0 0 8px; }
.player-help { color: var(--color-neutral-700); max-width: 44ch; margin: 0; }
.player-book { font-size: 30px; margin: 0 0 4px; }
.player-pos { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; color: var(--color-neutral-600); margin: 0 0 10px; }
.progress { height: 8px; background: var(--color-neutral-200); border-radius: 999px; overflow: hidden; margin-bottom: 20px; }
.progress-fill { height: 100%; width: 0; background: var(--color-accent-2); transition: width 0.4s; }
.page-text { font-size: 24px; line-height: 1.7; margin: 0; }
.page-text mark { background: var(--color-accent-200); border-radius: 6px; padding: 0 2px; color: inherit; }
.choice-heading { font-size: 28px; margin: 8px 0 14px; }
.choice-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.choice-caption { color: var(--color-neutral-600); font-size: 14px; margin: 0; }
.transport { display: flex; align-items: center; justify-content: center; gap: 22px; margin: 22px 0 18px; }
.tbtn { position: relative; border: 0; cursor: pointer; display: grid; place-items: center; border-radius: 50%; color: var(--color-text); }
.tbtn:disabled { opacity: 0.4; cursor: not-allowed; }
.tbtn-side { width: 52px; height: 52px; background: var(--color-neutral-200); }
.tbtn-main { width: 76px; height: 76px; background: var(--color-accent); color: var(--color-neutral-100); box-shadow: var(--shadow-md); }
.tbtn-main .pulse { position: absolute; inset: 0; border-radius: 50%; background: var(--color-accent); opacity: 0; z-index: -1; }
.tbtn-main.is-playing .pulse { animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.35); opacity: 0.55; } }
.player-settings { border-top: 1px solid var(--color-neutral-200); padding-top: 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.voice-select { font: inherit; font-size: 13px; border-radius: 999px; border: 1.5px solid var(--color-neutral-300); background: var(--color-neutral-100); padding: 8px 14px; max-width: 220px; }
.pace { display: flex; gap: 6px; flex-wrap: wrap; }
.pace .pill { font-size: 12.5px; padding: 7px 12px; }
.read-link { margin-left: auto; font-weight: 600; font-size: 14px; }

/* — book reader — */
.reader { max-width: 860px; margin: 0 auto; padding: 40px clamp(20px, 5vw, 64px) 80px; }
.reader-head h1 { font-size: clamp(34px, 5vw, 52px); margin: 6px 0 12px; }
.reader-tools { display: flex; gap: 10px; flex-wrap: wrap; }
.spread { position: relative; margin: 36px 0; }
.spread-art { aspect-ratio: 16/9; border-radius: var(--radius-lg); margin-bottom: 18px; font-size: 13px; }
.spread-text { font-size: 22px; line-height: 1.7; margin: 0; }
.spread-num { position: absolute; right: 0; top: 0; font-size: 12px; color: var(--color-neutral-500); margin: 8px 10px; }
.spread-turn .spread-art { background: repeating-linear-gradient(135deg, var(--color-accent-2-100) 0 12px, var(--color-neutral-100) 12px 24px); border-color: var(--color-accent-2-300); color: var(--color-accent-2-800); }
.fork { padding: 32px; margin-top: 40px; }
.fork h2 { font-size: 28px; margin: 4px 0 10px; }

/* — makers' market + storefront — */
.dash { max-width: 980px; margin: 0 auto; padding: 40px clamp(20px, 5vw, 64px) 80px; display: flex; flex-direction: column; gap: 20px; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.dash-head h1 { font-size: clamp(30px, 4.5vw, 44px); margin: 10px 0 6px; }
.dash .card { padding: 26px 28px; gap: 12px; }
.dash .card-title { font-size: 22px; }
.dash .card-body { font-size: 15px; opacity: 1; color: var(--color-neutral-800); }
.warn { background: var(--color-accent-100); }
.warn-text { color: var(--color-accent-800); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.status { display: flex; gap: 28px; flex-wrap: wrap; margin: 0; }
.status div { display: flex; flex-direction: column; gap: 4px; }
.status dt { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-neutral-600); }
.status dd { margin: 0; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--color-neutral-400); }
.dot.ok { background: var(--color-accent-2); }
.dot.off { background: var(--color-accent-400); }
.form .field { margin-bottom: 12px; }
.form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.form fieldset:disabled { opacity: 0.55; }
.card-subtitle { font-size: 17px; margin: 18px 0 6px; }
.shop-url { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14.5px; margin: 0; }
.shop-url code { user-select: all; word-break: break-all; }
.form-grid { display: grid; grid-template-columns: 2fr 2fr 1fr 1fr auto; gap: 12px; align-items: end; }
@media (max-width: 760px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.product-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.product-list li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--color-divider); }
.product-list .price { margin-left: auto; }
.price { font-family: var(--font-heading); font-size: 18px; color: var(--color-accent-800); margin: 0; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.product { padding: 18px; }
.product img { border-radius: var(--radius-md); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.product-art { aspect-ratio: 4/3; }
.qty .input { width: 72px; }
.how { margin-top: 24px; font-size: 14.5px; color: var(--color-neutral-800); }
.how summary { cursor: pointer; font-weight: 700; }
.how ol { padding-left: 1.3em; line-height: 1.6; }
