/* ============================================================================
 *  JUDE CALDER — "Lamplight"
 *  Dark, cinematic literary romance. Warm gold light on deep ink — the palette
 *  every cover shares (sunset, lamp, candle against navy and stone).
 * ========================================================================== */

:root {
  --bg:        #0d141d;   /* deep ink-navy (Weight of Stone dark / Distance Home sky) */
  --bg-2:      #111b26;
  --surface:   #18222f;   /* card surface */
  --surface-2: #1f2c3b;
  --line:      rgba(228, 196, 132, .16);
  --line-cool: rgba(255, 255, 255, .07);

  --text:      #f2e8d5;   /* warm parchment (the cream cover lettering) */
  --text-soft: #c4bba8;
  --muted:     #8f8775;

  --gold:        #d8a850; /* lamplight amber — the signature accent */
  --gold-bright: #f0cd83;
  --gold-deep:   #a87c34;
  --sea:         #5b86ab; /* cool coastal blue from the dawn covers */

  --ok:        #76c08a;   /* available */
  --shadow:    0 30px 60px -30px rgba(0, 0, 0, .85);
  --glow-gold: 0 0 0 1px rgba(228,196,132,.14), 0 24px 48px -24px rgba(216,168,80,.35);
  --max:       1140px;
  --ease:      cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; line-height: 1.04; margin: 0; letter-spacing: .3px; }
img { max-width: 100%; display: block; }
a { color: var(--gold-bright); text-decoration: none; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }

.eyebrow {
  text-transform: uppercase; letter-spacing: .32em; font-size: .72rem; font-weight: 600;
  color: var(--gold); margin: 0 0 16px;
}
.eyebrow.center { margin-left: auto; margin-right: auto; }

.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-title { font-size: clamp(2rem, 5.2vw, 3.3rem); margin-bottom: 8px; }

/* skip link */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--gold); color: #1a130a; padding: 10px 18px; border-radius: 0 0 8px 0; font-weight: 700;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; border-radius: 4px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px; justify-content: center;
  padding: 13px 26px; border-radius: 999px; cursor: pointer;
  font-family: "Inter", sans-serif; font-size: .94rem; font-weight: 600; letter-spacing: .01em;
  border: 1px solid transparent; transition: transform .18s var(--ease), background .25s, box-shadow .25s, border-color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 16px; height: 16px; }
.btn-primary {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #1c1408; box-shadow: 0 14px 30px -14px rgba(216,168,80,.7);
}
.btn-primary:hover { box-shadow: 0 20px 40px -16px rgba(240,205,131,.8); color: #160f06; }
.btn-ghost { background: rgba(255,255,255,.03); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-bright); background: rgba(216,168,80,.06); }
.btn-sm { padding: 9px 16px; font-size: .82rem; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(13, 20, 29, .72);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line-cool);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--gold); color: var(--gold-bright);
  font-family: "Cormorant Garamond", serif; font-weight: 700; font-size: 1rem; letter-spacing: .5px;
}
.brand-name { font-family: "Cormorant Garamond", serif; font-size: 1.45rem; font-weight: 600; }
.nav { display: flex; gap: 30px; align-items: center; }
.nav a { color: var(--text-soft); font-size: .92rem; font-weight: 500; }
.nav a:hover { color: var(--gold-bright); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 42px; height: 42px; padding: 9px; }
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.nav-toggle span + span { margin-top: 5px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- promo strip ---------- */
.promo-banner {
  display: flex; align-items: center; justify-content: center; gap: 8px 16px; flex-wrap: wrap;
  text-align: center; padding: 11px 22px; position: relative; z-index: 45;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold) 50%, var(--gold-deep));
  color: #1d1407; font-size: .92rem; font-weight: 500;
}
.promo-banner:hover { filter: brightness(1.05); }
.promo-spark { color: #2a1d08; }
.promo-text strong { font-family: "Cormorant Garamond", serif; font-size: 1.18rem; font-weight: 700; }
.promo-clock { font-variant-numeric: tabular-nums; font-weight: 700; }
.promo-cta {
  font-weight: 700; padding: 5px 15px; border-radius: 999px;
  background: rgba(28,18,5,.16); border: 1px solid rgba(28,18,5,.3);
}

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(90px, 16vh, 170px) 0 clamp(70px, 12vh, 130px); overflow: hidden; }
.hero-atmosphere {
  position: absolute; inset: -10% -10% auto; height: 130%; pointer-events: none;
  background:
    radial-gradient(48% 40% at 22% 18%, rgba(216,168,80,.20), transparent 70%),
    radial-gradient(46% 42% at 82% 30%, rgba(91,134,171,.18), transparent 72%),
    radial-gradient(60% 50% at 50% 100%, rgba(168,124,52,.16), transparent 70%);
  filter: blur(8px);
  animation: drift 22s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: translate3d(-2%, -1%, 0) scale(1.02); } to { transform: translate3d(2%, 2%, 0) scale(1.08); } }
.hero::before {
  /* subtle film grain */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.035'/%3E%3C/svg%3E");
}
.hero-inner { position: relative; text-align: center; }
.hero-name { font-size: clamp(3.2rem, 11vw, 7rem); font-weight: 700; letter-spacing: 1px; }
.hero-tagline {
  font-family: "Cormorant Garamond", serif; font-style: italic; font-weight: 500;
  font-size: clamp(1.3rem, 3.2vw, 2rem); color: var(--text-soft);
  max-width: 24ch; margin: 18px auto 34px; line-height: 1.25;
}
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(transparent, var(--bg)); pointer-events: none; }

/* ---------- spotlight (featured / free book) ---------- */
.spotlight { padding: clamp(20px, 4vw, 40px) 0 clamp(56px, 8vw, 96px); }
.spotlight-inner {
  position: relative; display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: clamp(28px, 5vw, 64px);
  align-items: center; max-width: var(--max); margin: 0 auto; padding: clamp(28px, 4vw, 48px) clamp(24px, 4vw, 52px);
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden;
}
.spotlight-inner::after {
  content: ""; position: absolute; width: 60%; height: 160%; top: -30%; right: -10%;
  background: radial-gradient(circle, rgba(216,168,80,.18), transparent 65%); pointer-events: none;
}
.spotlight-cover { position: relative; justify-self: center; }
.spotlight-cover img {
  width: 100%; max-width: 300px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px;
  box-shadow: 0 40px 70px -30px rgba(0,0,0,.9), 0 0 60px -10px rgba(216,168,80,.35);
  transform: perspective(1400px) rotateY(-8deg); transition: transform .5s var(--ease);
}
.spotlight-cover img:hover { transform: perspective(1400px) rotateY(0deg) translateY(-4px); }
.spotlight-body { position: relative; z-index: 1; }
.spotlight-kicker { color: var(--gold-bright); }
.spotlight-title { font-size: clamp(2.2rem, 5.5vw, 3.6rem); font-weight: 700; margin: 4px 0 6px; }
.spotlight-series { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.spotlight-blurb { color: var(--text-soft); margin: 16px 0 22px; max-width: 56ch; font-size: 1.05rem; }
.spotlight-countdown {
  display: inline-flex; gap: 14px; margin: 0 0 24px; padding: 12px 18px;
  background: rgba(216,168,80,.08); border: 1px solid var(--line); border-radius: 14px;
}
.spotlight-countdown .cd-unit { text-align: center; min-width: 46px; }
.spotlight-countdown .cd-num { font-family: "Cormorant Garamond", serif; font-size: 1.9rem; font-weight: 700; color: var(--gold-bright); line-height: 1; font-variant-numeric: tabular-nums; }
.spotlight-countdown .cd-lab { font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.spotlight-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.spotlight-price { font-size: .85rem; color: var(--text-soft); margin: 14px 0 0; }
.spotlight-price strong { color: var(--gold-bright); }

/* ---------- series sections ---------- */
.series-group { margin-top: clamp(48px, 7vw, 84px); }
.series-group:first-child { margin-top: 52px; }
.series-head { text-align: center; margin-bottom: 12px; }
.series-head .series-name { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 600; }
.series-head .series-tag {
  display: block; font-family: "Inter", sans-serif; font-style: normal;
  font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-top: 8px;
}
.series-head .series-desc { color: var(--text-soft); max-width: 60ch; margin: 12px auto 0; font-size: 1rem; }
.series-divider { width: 64px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); margin: 22px auto 36px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 26px; }

.card {
  display: grid; grid-template-columns: 132px 1fr; gap: 20px; align-items: start;
  background: var(--surface); border: 1px solid var(--line-cool); border-radius: 16px; padding: 20px;
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); border-color: var(--line); box-shadow: var(--shadow); }
.card-cover { position: relative; width: 132px; height: 198px; flex: none; }
.card-cover img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 6px; display: block;
  box-shadow: 0 18px 30px -16px rgba(0,0,0,.85); background: var(--bg-2);
}
.badge {
  position: absolute; top: 9px; left: 9px;
  font-size: .64rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px;
}
.badge-free { background: linear-gradient(180deg, var(--gold-bright), var(--gold)); color: #1b1206; box-shadow: 0 0 18px -2px rgba(240,205,131,.7); }
.badge-live { background: rgba(118,192,138,.16); color: var(--ok); border: 1px solid rgba(118,192,138,.4); }
.badge-soon { background: rgba(255,255,255,.06); color: var(--text-soft); border: 1px solid var(--line-cool); }

.card-body { display: flex; flex-direction: column; min-width: 0; align-self: stretch; }
.card-title { font-size: clamp(1.35rem, 2.4vw, 1.6rem); }
.card-meta { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--gold); margin: 5px 0 10px; font-weight: 600; }
.card-blurb {
  font-size: .9rem; color: var(--text-soft); margin: 0 0 12px;
  display: -webkit-box; -webkit-line-clamp: 6; line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden;
}
.card-price { font-size: .76rem; color: var(--muted); margin: 0 0 14px; font-weight: 500; }
.card-price.is-free { color: var(--gold-bright); font-weight: 700; }
.card-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- about ---------- */
.section-about { background: linear-gradient(180deg, var(--bg), var(--bg-2)); border-top: 1px solid var(--line-cool); }
.about-inner { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: start; }
.about-photo { justify-self: center; position: sticky; top: 90px; }
.about-photo img {
  width: min(320px, 72vw); height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 18px;
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.about-text p:not(.eyebrow):not(.about-links) { color: var(--text-soft); max-width: 62ch; font-size: 1.05rem; }
.about-bio p { margin: 0 0 1.05em; }
.about-bio p:last-child { margin-bottom: 0; }
.about-text .section-title { margin-bottom: 16px; }
.about-links { margin-top: 22px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line-cool); padding: 46px 0; background: var(--bg-2); }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.footer-brand { font-family: "Cormorant Garamond", serif; font-size: 1.5rem; color: var(--text); margin: 0; }
.footer-meta { font-size: .85rem; color: var(--muted); margin: 0; }
.footer-note { font-size: .82rem; color: var(--gold); font-weight: 600; letter-spacing: .04em; margin: 0; }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (min-width: 760px) {
  .about-inner { grid-template-columns: 300px 1fr; }
  .about-text .section-title { text-align: left; }
}

@media (max-width: 820px) {
  .spotlight-inner { grid-template-columns: 1fr; text-align: center; }
  .spotlight-cover img { transform: none; max-width: 240px; }
  .spotlight-blurb { margin-left: auto; margin-right: auto; }
  .spotlight-actions, .spotlight-countdown { justify-content: center; }
}

@media (max-width: 680px) {
  .nav-toggle { display: block; z-index: 50; }
  .nav {
    position: fixed; inset: 66px 0 auto; flex-direction: column; gap: 0;
    background: rgba(13,20,29,.97); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line); padding: 8px 0 16px;
    transform: translateY(-120%); transition: transform .35s var(--ease); pointer-events: none;
  }
  .nav.open { transform: translateY(0); pointer-events: auto; }
  .nav a { padding: 15px 24px; width: 100%; font-size: 1.05rem; border-top: 1px solid var(--line-cool); }
}

@media (max-width: 520px) {
  .card { grid-template-columns: 104px 1fr; gap: 15px; padding: 15px; }
  .card-cover { width: 104px; height: 156px; }
  .cards { grid-template-columns: 1fr; }
  .promo-banner { font-size: .84rem; padding: 10px 14px; }
  .promo-text strong { font-size: 1.05rem; }
  .spotlight-countdown { gap: 10px; padding: 10px 14px; }
  .spotlight-countdown .cd-unit { min-width: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-atmosphere { animation: none; }
}

/* ============================================================================
 *  SOCIAL ICON ROW (footer)
 * ========================================================================== */
.footer-social { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin: 6px 0 4px; }
.social-link {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line-cool); color: var(--text-soft); background: rgba(255,255,255,.02);
  transition: color .2s, border-color .2s, transform .2s, background .2s;
}
.social-link:hover { color: var(--gold-bright); border-color: var(--gold); transform: translateY(-2px); background: rgba(216,168,80,.07); }
.social-link svg { width: 19px; height: 19px; }

/* ============================================================================
 *  THE READING ROOM
 * ========================================================================== */
.section-reading { background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-top: 1px solid var(--line-cool); }
.rr-intro { color: var(--text-soft); max-width: 60ch; margin: 14px auto 4px; font-size: 1.05rem; }

.rr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; margin-top: 44px; }
.rr-card {
  position: relative; text-align: left; cursor: pointer; color: inherit;
  background: var(--surface); border: 1px solid var(--line-cool); border-radius: 14px;
  padding: 26px 24px; display: flex; flex-direction: column; gap: 10px; min-height: 200px;
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
  font-family: inherit; width: 100%;
}
.rr-card:hover { transform: translateY(-4px); border-color: var(--line); box-shadow: var(--shadow); }
.rr-kind {
  align-self: flex-start; font-size: .64rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold-bright); padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(216,168,80,.08);
}
.rr-card h3 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); line-height: 1.08; }
.rr-meta { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.rr-teaser { color: var(--text-soft); font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 1.18rem; line-height: 1.35; }
.rr-open { margin-top: auto; font-size: .82rem; font-weight: 600; color: var(--gold); }
.rr-card:hover .rr-open { color: var(--gold-bright); }

/* Reading-room teaser strip on the home page */
.rr-teaser-strip { text-align: center; }
.rr-teaser-strip .btn { margin-top: 22px; }

/* ============================================================================
 *  READER — letter / document overlay (and standalone piece pages)
 * ========================================================================== */
.reader { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: clamp(14px, 3vw, 28px); }
.reader[hidden] { display: none; }
.reader-backdrop { position: absolute; inset: 0; background: rgba(6,10,15,.85); backdrop-filter: blur(5px); }
.reader-stage { position: relative; z-index: 1; width: 100%; max-height: 92vh; overflow: auto; display: flex; justify-content: center; -webkit-overflow-scrolling: touch; }
.reader-close {
  position: fixed; top: 16px; right: 18px; z-index: 3; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.22); background: rgba(20,28,38,.72); color: #f2e8d5; font-size: 1.5rem;
  line-height: 1; cursor: pointer; backdrop-filter: blur(6px); transition: background .2s, transform .2s;
}
.reader-close:hover { background: rgba(42,54,68,.92); transform: scale(1.06); }

/* --- letter / document (parchment) --- */
.reader-panel {
  position: relative; width: min(680px, 100%); align-self: flex-start;
  background: linear-gradient(180deg, #f7efdc, #f1e6cd); color: #2a2114;
  border-radius: 14px; padding: clamp(28px, 5vw, 56px); box-shadow: 0 40px 90px -30px rgba(0,0,0,.9);
  border: 1px solid #e4d4ab;
}
.reader-panel::before { content: ""; position: absolute; inset: 0; border-radius: 14px; pointer-events: none; box-shadow: inset 0 0 90px rgba(120,90,40,.12); }
.reader-kind { font-size: .68rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #9a7b3e; margin: 0 0 6px; }
.reader-title { font-family: "Cormorant Garamond", serif; font-weight: 700; font-size: clamp(1.9rem, 5vw, 2.8rem); line-height: 1.05; color: #241c10; margin: 0; }
.reader-meta { font-size: .8rem; letter-spacing: .04em; color: #8a744a; margin: 6px 0 22px; font-style: italic; }
.reader-body { font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(1.15rem, 2.2vw, 1.35rem); line-height: 1.62; }
.reader-body p { margin: 0 0 1.05em; }
.reader-sign { font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 1.35rem; color: #4a3c22; margin-top: 1.4em; }

/* --- journal (ruled paper, handwriting) --- */
.journal {
  position: relative; width: min(620px, 100%); align-self: flex-start; color: #2a2418;
  background-color: #fbf6e9;
  background-image: repeating-linear-gradient(#fbf6e9 0, #fbf6e9 31px, #cdbf9e 32px);
  border-radius: 6px; padding: 26px 40px 40px 66px;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.9); border: 1px solid #e7dcc2;
}
.journal::before { content: ""; position: absolute; top: 0; bottom: 0; left: 48px; width: 2px; background: #d98b86; opacity: .65; }
.journal-kind { font-family: "Inter", sans-serif; font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: #a98e57; font-weight: 700; margin: 8px 0 2px; }
.journal-date { font-family: "Caveat", cursive; font-size: 1.2rem; color: #6b5e3e; margin: 0; }
.journal-title { font-family: "Caveat", cursive; font-weight: 600; font-size: clamp(2rem, 6vw, 2.7rem); line-height: 1; color: #241c10; margin: 2px 0 14px; }
.journal-body { font-family: "Caveat", cursive; font-size: clamp(1.35rem, 3.4vw, 1.6rem); line-height: 32px; color: #2a2418; }
.journal-body p { margin: 0 0 12px; }
.journal-body em { font-style: italic; }
.journal-sign { font-family: "Caveat", cursive; font-size: 1.7rem; color: #3a3220; margin-top: 14px; text-align: right; }

/* --- email (Mail-app look, responsive) --- */
.mail {
  width: min(620px, 100%); align-self: flex-start; background: #fff; color: #1d1d1f; overflow: hidden;
  border-radius: 14px; box-shadow: 0 40px 90px -30px rgba(0,0,0,.9); border: 1px solid #e3e3e6;
  font-family: -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Inter", sans-serif;
}
.mail-top { padding: 22px 26px 16px; border-bottom: 1px solid #ededee; }
.mail-subject { font-size: clamp(1.18rem, 3.4vw, 1.5rem); font-weight: 600; line-height: 1.25; margin-bottom: 14px; }
.mail-meta { display: grid; grid-template-columns: 42px 1fr auto; gap: 2px 12px; align-items: center; }
.mail-ava { grid-row: span 2; width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(160deg,#7aa7e0,#46699f); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 15px; }
.mail-fromline { min-width: 0; }
.mail-from { font-weight: 600; font-size: 15px; }
.mail-addr { color: #86868b; font-weight: 400; font-size: 13px; }
.mail-to { font-size: 13px; color: #86868b; }
.mail-date { font-size: 13px; color: #86868b; white-space: nowrap; align-self: start; }
.mail-body { padding: 22px 26px 28px; font-size: 16px; line-height: 1.55; color: #2b2b2e; }
.mail-body p { margin: 0 0 1em; }
.mail-body .mail-sign { margin-top: 1.2em; color: #1d1d1f; }
@media (max-width: 540px) {
  .mail-meta { grid-template-columns: 38px 1fr; }
  .mail-ava { width: 38px; height: 38px; font-size: 14px; }
  .mail-date { grid-column: 2; grid-row: 3; }
  .mail-top { padding: 18px 18px 14px; }
  .mail-body { padding: 18px 18px 24px; font-size: 15px; }
}

/* --- voicemail (visual voicemail + audio) --- */
.vmail { width: min(440px, 100%); align-self: flex-start; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: 20px; padding: 24px; box-shadow: var(--shadow); }
.vmail-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.vmail-ava { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(160deg,#3a4a5e,#26303d); color: var(--gold-bright); display: grid; place-items: center; font-weight: 600; font-size: 18px; border: 1px solid var(--line); }
.vmail-name { font-family: "Cormorant Garamond", serif; font-size: 1.5rem; font-weight: 600; line-height: 1; }
.vmail-sub { font-size: .76rem; color: var(--muted); margin-top: 4px; letter-spacing: .04em; }
.vmail-audio { width: 100%; height: 38px; margin: 4px 0 18px; }
.vmail-transcript { border-top: 1px solid var(--line-cool); padding-top: 16px; font-size: 1rem; line-height: 1.62; color: var(--text-soft); }
.vmail-label { font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin: 0 0 8px; }
.vmail-transcript p { margin: 0 0 .8em; }
.vmail .reader-sign { color: var(--text-soft); font-style: italic; font-family: "Cormorant Garamond", serif; }

/* standalone piece page wrapper (generated pages) */
.piece-page { min-height: 70vh; display: flex; flex-direction: column; align-items: center; padding: clamp(34px, 7vw, 80px) 22px; }
.piece-back { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 clamp(20px,4vw,30px); color: var(--gold); font-weight: 600; }
.piece-back:hover { color: var(--gold-bright); }

/* ============================================================================
 *  AGE GATE (18+)  —  shown until the visitor confirms; remembered per device.
 *  Content stays in the DOM (crawlable); the gate is a visual/interaction veil.
 * ========================================================================== */
html:not(.adult-ok) .age-gated body { overflow: hidden; }
.age-gate { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(120% 120% at 50% 0%, #14202e, #070c12 80%); }
html.adult-ok .age-gate { display: none; }
.age-card {
  max-width: 460px; text-align: center; background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; padding: clamp(28px, 5vw, 44px); box-shadow: var(--shadow);
}
.age-card .age-mark { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 50%;
  border: 1px solid var(--gold); color: var(--gold-bright); font-family: "Cormorant Garamond", serif;
  font-weight: 700; font-size: 1.05rem; margin-bottom: 18px; letter-spacing: .5px; }
.age-card h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: 10px; }
.age-card p { color: var(--text-soft); font-size: .98rem; margin: 0 auto 22px; max-width: 42ch; }
.age-card .age-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.age-card .age-fine { font-size: .76rem; color: var(--muted); margin-top: 18px; }

/* small 18+ flag on adult reading-room cards */
.rr-adult { display: inline-block; margin-left: 8px; font-size: .6rem; font-weight: 800; letter-spacing: .08em;
  color: #f2c8c0; background: rgba(150,60,55,.22); border: 1px solid rgba(190,90,80,.5);
  padding: 2px 7px; border-radius: 999px; vertical-align: middle; }
.rr-teaser-note { font-size: .8rem; color: var(--muted); margin-top: 8px; }

/* ============================================================================
 *  iOS MESSAGES MOCKUP (Texts pieces render as a phone screen)
 * ========================================================================== */
.imsg-note { text-align: center; font-style: italic; color: #8a744a; font-family: "Cormorant Garamond", serif; font-size: 1.05rem; margin: 0 0 16px; }
.imsg { display: flex; justify-content: center; margin: 2px 0 6px; }
.imsg-screen {
  width: 100%; max-width: 358px; background: #fff; color: #000; overflow: hidden;
  border: 10px solid #111114; border-radius: 38px;
  box-shadow: 0 36px 70px -28px rgba(0,0,0,.75), 0 0 0 2px rgba(255,255,255,.04);
  font-family: -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Inter", sans-serif;
}
.imsg-status { display: flex; justify-content: space-between; align-items: center; padding: 10px 22px 2px; font-size: 13px; font-weight: 700; color: #000; }
.imsg-status .sys { display: inline-flex; align-items: center; gap: 6px; }
.imsg-status svg { display: block; }
.imsg-nav { display: grid; grid-template-columns: 30px 1fr 30px; align-items: center; padding: 2px 12px 9px; border-bottom: .5px solid #d3d3d7; }
.imsg-chev { color: #0b8cff; font-size: 27px; line-height: 1; text-align: center; }
.imsg-peer { display: flex; flex-direction: column; align-items: center; }
.imsg-ava { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(160deg, #b9c1cd, #868f9d); color: #fff; display: grid; place-items: center; font-size: 17px; font-weight: 600; margin-bottom: 2px; }
.imsg-pname { display: flex; flex-direction: column; align-items: center; line-height: 1.1; font-size: 12px; font-weight: 600; color: #000; }
.imsg-pname small { font-size: 10px; color: #8a8a8e; font-weight: 500; }
.imsg-cam { justify-self: end; color: #0b8cff; }
.imsg-body { padding: 10px 12px 6px; display: flex; flex-direction: column; background: #fff; max-height: 64vh; overflow-y: auto; }
.imsg-day { text-align: center; font-size: 11px; color: #8a8a8e; font-weight: 600; margin: 4px 0 8px; }
.imsg-sender { font-size: 10px; color: #8a8a8e; margin: 8px 0 1px 13px; }
.imsg-line { display: flex; margin-top: 2px; }
.imsg-line.run { margin-top: 9px; }
.imsg-line.sent { justify-content: flex-end; }
.imsg-line.received { justify-content: flex-start; }
.imsg-b { position: relative; max-width: 76%; padding: 8px 13px; border-radius: 18px; font-size: 15px; line-height: 1.32; word-wrap: break-word; }
.imsg-line.received .imsg-b { background: #e9e9eb; color: #000; }
.imsg-line.sent .imsg-b { background: #0b8cff; color: #fff; }
.imsg-line.sent .imsg-b.tail::before { content: ""; position: absolute; z-index: 0; bottom: 0; right: -8px; height: 20px; width: 20px; background: #0b8cff; border-bottom-left-radius: 16px 14px; }
.imsg-line.sent .imsg-b.tail::after { content: ""; position: absolute; z-index: 1; bottom: 0; right: -10px; width: 10px; height: 20px; background: #fff; border-bottom-left-radius: 10px; }
.imsg-line.received .imsg-b.tail::before { content: ""; position: absolute; z-index: 0; bottom: 0; left: -8px; height: 20px; width: 20px; background: #e9e9eb; border-bottom-right-radius: 16px 14px; }
.imsg-line.received .imsg-b.tail::after { content: ""; position: absolute; z-index: 1; bottom: 0; left: -10px; width: 10px; height: 20px; background: #fff; border-bottom-right-radius: 10px; }
.imsg-input { display: flex; align-items: center; gap: 8px; padding: 8px 13px 14px; }
.imsg-input span { flex: 1; border: 1px solid #d3d3d7; border-radius: 17px; padding: 7px 13px; font-size: 14px; color: #8a8a8e; }
.imsg-input .send { width: 28px; height: 28px; border-radius: 50%; background: #0b8cff; color: #fff; display: grid; place-items: center; font-size: 15px; }

/* ---------- Reading Room filter tabs ---------- */
.rr-filter { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin: 30px auto 4px; }
.rr-pill {
  font-family: "Inter", sans-serif; font-size: .82rem; font-weight: 600; cursor: pointer;
  padding: 8px 16px; border-radius: 999px; color: var(--text-soft);
  background: rgba(255,255,255,.03); border: 1px solid var(--line-cool);
  transition: color .2s, border-color .2s, background .2s;
}
.rr-pill:hover { color: var(--gold-bright); border-color: var(--line); }
.rr-pill.active { color: #1c1408; background: linear-gradient(180deg, var(--gold-bright), var(--gold)); border-color: transparent; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ============================================================================
 *  IMMERSIVE SURFACES — close-inside + world objects (napkin/menu/sign/card)
 * ========================================================================== */
.imsg { position: relative; width: max-content; max-width: 100%; }
.mail, .vmail, .napkin, .menu-surf, .sign-surf, .card-surf { position: relative; }

.surf-close {
  position: absolute; top: 9px; right: 9px; z-index: 6; width: 33px; height: 33px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; font-size: 1.2rem; line-height: 1;
  border: 1px solid rgba(255,255,255,.4); background: rgba(28,34,44,.6); color: #fff;
  backdrop-filter: blur(4px); transition: background .2s, transform .2s;
}
.surf-close:hover { background: rgba(48,58,72,.88); transform: scale(1.08); }

/* napkin (cocktail-napkin note) */
.napkin {
  width: min(420px, 92vw); aspect-ratio: 1 / 1; align-self: center; border-radius: 4px; padding: 38px;
  display: grid; place-items: center; color: #2b3a4a; background: #fbfaf6; transform: rotate(-1.3deg);
  box-shadow: 0 30px 60px -26px rgba(0,0,0,.8);
  background-image: linear-gradient(rgba(0,0,0,.02) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,.02) 1px, transparent 1px);
  background-size: 22px 22px;
}
.napkin::before, .napkin::after { content: ""; position: absolute; background: rgba(0,0,0,.05); }
.napkin::before { left: 6%; right: 6%; top: 50%; height: 1px; }
.napkin::after { top: 6%; bottom: 6%; left: 50%; width: 1px; }
.napkin-ink { font-family: "Caveat", cursive; font-size: clamp(1.3rem, 4.4vw, 1.75rem); line-height: 1.35; text-align: center; transform: rotate(.5deg); }
.napkin-ink p { margin: 0 0 .55em; }
.napkin-sign { text-align: right; font-size: 1.5rem; margin-top: .3em; }

/* menu (pub specials card) */
.menu-surf {
  width: min(520px, 100%); align-self: flex-start; color: #2a2114; background: #f6efdd;
  border: 1px solid #e1d3ac; border-radius: 8px; padding: clamp(28px, 5vw, 44px);
  box-shadow: 0 36px 80px -30px rgba(0,0,0,.85); font-family: "Cormorant Garamond", serif;
}
.menu-eyebrow { font-family: "Inter", sans-serif; font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: #9a7b3e; text-align: center; margin: 0 0 6px; }
.menu-name { text-align: center; font-size: clamp(1.8rem, 5vw, 2.5rem); font-weight: 700; color: #241c10; margin: 0; }
.menu-list { margin-top: 18px; border-top: 1px solid #d8c8a0; padding-top: 16px; }
.menu-row { display: flex; align-items: baseline; gap: 12px; margin: 0 0 13px; }
.menu-il { flex: 1; min-width: 0; }
.menu-item { font-size: 1.2rem; color: #2a2114; }
.menu-note { display: block; font-size: .92rem; font-style: italic; color: #7a6a45; margin-top: 1px; }
.menu-price { font-size: 1.1rem; color: #5a4a28; white-space: nowrap; font-variant-numeric: tabular-nums; }
.menu-hand { margin-top: 20px; border-top: 1px dashed #cdbf9e; padding-top: 14px; font-family: "Caveat", cursive; font-size: 1.4rem; line-height: 1.4; color: #3a3220; }
.menu-hand p { margin: 0; }

/* sign (taped-up printed sign) */
.sign-surf {
  width: min(460px, 92vw); align-self: center; text-align: center; color: #1c1c1c; background: #fdfcf8;
  border: 1px solid #dcdcdc; padding: clamp(34px, 6vw, 52px) clamp(24px, 5vw, 40px);
  box-shadow: 0 30px 60px -26px rgba(0,0,0,.8); transform: rotate(.7deg);
}
.sign-tape { position: absolute; width: 76px; height: 26px; background: rgba(210,198,166,.5); top: -12px; box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.sign-tape-l { left: 22px; transform: rotate(-7deg); }
.sign-tape-r { right: 22px; transform: rotate(6deg); }
.sign-inner p { font-family: "Inter", sans-serif; margin: 0 0 .5em; color: #444; }
.sign-inner p:first-child { font-family: "Cormorant Garamond", serif; font-weight: 700; font-size: clamp(1.9rem, 6vw, 2.7rem); letter-spacing: .03em; text-transform: uppercase; color: #1c1c1c; margin-bottom: .3em; }
.sign-inner p:nth-child(2) { text-transform: uppercase; letter-spacing: .22em; font-size: .78rem; color: #666; }
.sign-hand { font-family: "Caveat", cursive; font-size: 1.5rem; color: #2b3a4a; margin-top: 1em; line-height: 1.3; }

/* card (folded greeting card) */
.card-surf { width: min(440px, 92vw); align-self: center; border-radius: 8px; overflow: hidden; background: #fff; box-shadow: 0 36px 80px -28px rgba(0,0,0,.85); }
.card-front {
  background: linear-gradient(160deg, #8a3b3f, #5d2429); color: #f6e6c9; text-align: center;
  padding: clamp(40px, 9vw, 60px) 28px; font-family: "Cormorant Garamond", serif; font-style: italic;
  font-size: clamp(2rem, 7vw, 3rem); font-weight: 600; border-bottom: 3px solid var(--gold);
}
.card-inside { background: #fbf7ee; color: #2a2418; padding: clamp(26px, 5vw, 40px); font-family: "Caveat", cursive; font-size: clamp(1.4rem, 4.4vw, 1.8rem); line-height: 1.4; }
.card-inside p { margin: 0 0 .45em; }
.card-sign { text-align: right; margin-top: .4em; }
