/* Lived — warm, photo-forward, by Opti */
:root {
  --bg: #f7f1e8;
  --bg2: #efe4d4;
  --ink: #2a1f16;
  --muted: #6b5748;
  --accent: #c45c26;
  --accent2: #2f6f5e;
  --surface: #fffaf4;
  --border: #e0d2c0;
  --demo: #8a6d3b;
  --paid: #8b3a3a;
  --ok: #2f6f5e;
  --shadow: 0 10px 30px rgba(42, 31, 22, 0.08);
  --radius: 18px;
  --font: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #f3d9b8 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #d9ebe3 0%, transparent 50%),
    var(--bg);
  line-height: 1.55;
  min-height: 100vh;
}
a { color: var(--accent2); }
img { max-width: 100%; display: block; }
.wrap { width: min(1100px, calc(100% - 2rem)); margin: 0 auto; }
.site-header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(247, 241, 232, 0.88);
  border-bottom: 1px solid var(--border);
}
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.85rem 0;
}
.brand { display: flex; align-items: baseline; gap: 0.55rem; text-decoration: none; color: inherit; }
.brand .mark {
  font-family: var(--font); font-weight: 700; font-size: 1.55rem; letter-spacing: -0.02em;
}
.brand .by { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.nav { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.95rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  padding: 0.7rem 1.1rem; border-radius: 999px; font-weight: 700; text-decoration: none;
  cursor: pointer; font-family: inherit; font-size: 0.95rem;
  box-shadow: var(--shadow); transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled, .btn.is-disabled {
  opacity: 0.55; cursor: not-allowed; transform: none; pointer-events: none;
}
.btn-primary { background: var(--accent); border-color: transparent; color: #fff; }
.btn-secondary { background: var(--accent2); border-color: transparent; color: #fff; }
.btn-ghost { box-shadow: none; background: transparent; }
.hero {
  padding: 2.5rem 0 1.5rem;
  display: grid; gap: 1.5rem;
}
@media (min-width: 860px) {
  .hero { grid-template-columns: 1.3fr 0.9fr; align-items: end; }
}
.hero h1 {
  font-family: var(--font); font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.1; margin: 0 0 0.75rem; letter-spacing: -0.02em;
}
.lede { font-size: 1.1rem; color: var(--muted); margin: 0 0 1rem; max-width: 38rem; }
.policy-banner {
  background: #fff6ea; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.9rem 1.1rem; color: var(--muted); font-size: 0.92rem;
}
.pricing-strip {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem; box-shadow: var(--shadow); display: grid; gap: 1rem;
}
.pricing-strip h2 { font-family: var(--font); margin: 0; font-size: 1.35rem; }
.price-cards { display: grid; gap: 0.75rem; }
@media (min-width: 560px) { .price-cards { grid-template-columns: 1fr 1fr; } }
.price-card {
  border: 1px dashed var(--border); border-radius: 14px; padding: 1rem; background: #fff;
}
.price-card h3 { margin: 0 0 0.35rem; font-size: 1rem; }
.price-card p { margin: 0 0 0.8rem; color: var(--muted); font-size: 0.9rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.25rem 0; }
.chip {
  border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  border-radius: 999px; padding: 0.4rem 0.85rem; font-weight: 600; font-size: 0.88rem;
  cursor: pointer; font-family: inherit;
}
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.grid {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  padding-bottom: 3rem;
}
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  text-decoration: none; color: inherit; transition: transform .15s ease;
}
.card:hover { transform: translateY(-3px); }
.card .thumb {
  aspect-ratio: 4/3; background: var(--bg2); object-fit: cover; width: 100%;
}
.card .body { padding: 1rem 1.05rem 1.15rem; display: grid; gap: 0.45rem; flex: 1; }
.card h3 { font-family: var(--font); margin: 0; font-size: 1.2rem; line-height: 1.25; }
.meta { color: var(--muted); font-size: 0.85rem; }
.badges { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.badge {
  display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; padding: 0.2rem 0.5rem; border-radius: 999px;
  background: var(--bg2); color: var(--muted);
}
.badge.demo { background: #f0e0b8; color: var(--demo); }
.badge.paid { background: #f3d4d4; color: var(--paid); }
.badge.free { background: #d9ebe3; color: var(--ok); }
.site-footer {
  border-top: 1px solid var(--border); padding: 2rem 0 2.5rem; color: var(--muted); font-size: 0.9rem;
}
.site-footer .wrap { display: grid; gap: 0.75rem; }
.trust { max-width: 48rem; }
.status { color: var(--muted); }
.status.err { color: var(--paid); }
.status.ok { color: var(--ok); }
form.stack { display: grid; gap: 1rem; max-width: 640px; }
label { display: grid; gap: 0.35rem; font-weight: 600; font-size: 0.92rem; }
label span.hint { font-weight: 500; color: var(--muted); font-size: 0.85rem; }
input, select, textarea {
  font: inherit; padding: 0.75rem 0.85rem; border-radius: 12px;
  border: 1px solid var(--border); background: #fff; color: var(--ink);
}
textarea { min-height: 180px; resize: vertical; }
.toggle-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.toggle-row .chip { user-select: none; }
.story-page { padding: 2rem 0 3rem; display: grid; gap: 1.25rem; max-width: 760px; }
.story-page h1 { font-family: var(--font); font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0; line-height: 1.15; }
.gallery { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.gallery img { border-radius: 14px; border: 1px solid var(--border); background: var(--bg2); }
.lock-box {
  background: #fff6ea; border: 1px dashed var(--paid); border-radius: var(--radius);
  padding: 1.1rem; display: grid; gap: 0.75rem;
}
.video-wrap { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 14px; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.owner-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 1rem; display: grid; gap: 0.5rem;
}
.owner-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.preview-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.preview-row img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }

.fab-support {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 40;
  background: var(--ink); color: #fff; border: none; border-radius: 999px;
  padding: 0.75rem 1.1rem; font-weight: 700; font-family: inherit;
  text-decoration: none; box-shadow: var(--shadow);
}
.fab-support:hover { background: var(--accent); color: #fff; }

/* Long-form writing + reading */
textarea.longform {
  min-height: 420px;
  font-family: var(--font);
  font-size: 1.08rem;
  line-height: 1.7;
  padding: 1.1rem 1.15rem;
}
@media (min-width: 720px) {
  textarea.longform { min-height: 520px; }
}
.story-page {
  max-width: 720px;
}
.story-body {
  font-family: var(--font);
  font-size: clamp(1.08rem, 2.2vw, 1.22rem);
  line-height: 1.75;
  white-space: pre-wrap;
  max-width: 42rem;
  letter-spacing: 0.01em;
}
.series-summary {
  color: var(--muted);
  font-size: 1.02rem;
  border-left: 3px solid var(--accent);
  padding: 0.35rem 0 0.35rem 1rem;
  margin: 0.25rem 0 1rem;
}
.part-nav {
  display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center;
  position: sticky; top: 3.4rem; z-index: 15;
  background: rgba(247, 241, 232, 0.94);
  backdrop-filter: blur(8px);
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  margin: 0 0 0.75rem;
}
.part-nav .chip { font-size: 0.82rem; padding: 0.3rem 0.7rem; }
.part-progress {
  height: 3px; background: var(--border); border-radius: 999px; overflow: hidden;
  margin: 0 0 1rem;
}
.part-progress > span {
  display: block; height: 100%; background: var(--accent); width: 0%;
  transition: width .2s ease;
}
.part-block {
  display: grid; gap: 1rem;
  padding: 0.5rem 0 1.75rem;
  border-bottom: 1px dashed var(--border);
  margin-bottom: 1.25rem;
}
.part-block:last-of-type { border-bottom: 0; }
.part-label {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted);
}
.proof-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: grid; gap: 0.75rem;
}
.proof-section h3 {
  font-family: var(--font); margin: 0; font-size: 1.1rem;
}
.proof-section .gallery img {
  cursor: zoom-in; transition: transform .15s ease;
}
.proof-section .gallery img:hover { transform: scale(1.02); }
.story-layout {
  display: grid; gap: 1.25rem;
}
@media (min-width: 960px) {
  .story-layout.has-proof {
    grid-template-columns: minmax(0, 1fr) 260px;
    max-width: 980px;
    align-items: start;
  }
  .story-layout.has-proof .proof-rail {
    position: sticky; top: 4.5rem;
  }
}
.lightbox {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(20, 14, 10, 0.88);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem; cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: min(960px, 100%); max-height: 90vh;
  border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.45);
}
.lightbox .lb-close {
  position: absolute; top: 1rem; right: 1rem;
  background: #fff; color: var(--ink); border: 0; border-radius: 999px;
  padding: 0.5rem 0.9rem; font-weight: 700; cursor: pointer; font-family: inherit;
}
.next-part-bar {
  display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center;
  justify-content: space-between;
  background: #fff6ea; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.1rem; margin: 0.5rem 0 1rem;
}
.char-meter { font-weight: 500; color: var(--muted); font-size: 0.85rem; }
.char-meter.ok { color: var(--ok); }
.submit-wide { max-width: 820px !important; }
.owner-part {
  border-top: 1px dashed var(--border); padding-top: 0.6rem; margin-top: 0.5rem;
}


/* Mass-UX: trust chips, empty state, stronger demo, bigger taps */
.hero-actions {
  display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0 0 1rem;
}
.trust-chips {
  list-style: none; padding: 0; margin: 0 0 1rem;
  display: flex; flex-wrap: wrap; gap: 0.45rem;
}
.trust-chips li {
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.02em;
  padding: 0.35rem 0.75rem; border-radius: 999px;
  background: #d9ebe3; color: var(--ok);
  border: 1px solid #b7d6c9;
}
.badge.demo {
  background: #f5e6a8; color: #5c4808;
  border: 1px solid #d4b84a;
  font-size: 0.7rem; letter-spacing: 0.02em;
  text-transform: none; font-weight: 800;
  padding: 0.28rem 0.65rem; max-width: 100%;
  line-height: 1.25;
}
.card .badge.demo { white-space: normal; }
.empty-state {
  grid-column: 1 / -1;
  background: var(--surface); border: 1px dashed var(--border);
  border-radius: var(--radius); padding: 1.75rem 1.25rem;
  text-align: center; box-shadow: var(--shadow);
}
.empty-state p { margin: 0 0 1rem; color: var(--muted); font-size: 1.05rem; }
.nav-apk { padding: 0.45rem 0.85rem; font-size: 0.85rem; box-shadow: none; }
@media (max-width: 720px) {
  .nav .nav-apk { display: none; } /* hero + footer still have APK */
  .btn, .chip, .toggle-row .chip {
    min-height: 44px; padding: 0.75rem 1.15rem;
  }
  .chip { display: inline-flex; align-items: center; }
  input[type="file"] { min-height: 48px; font-size: 1rem; }
}
.proof-callout {
  background: #fff1d6; border: 2px solid var(--accent);
  border-radius: var(--radius); padding: 1rem 1.1rem;
  margin: 0 0 1rem; color: var(--ink);
}
.proof-callout strong { display: block; margin-bottom: 0.25rem; font-size: 1.02rem; }
.proof-callout p { margin: 0; color: var(--muted); font-size: 0.92rem; }
