/* The Judahverse website: Read page.
   Colors match the app (mood colors come from the app's mood palette, set in read.js).
   Every look-and-feel number is a variable in :root so it's easy to change. */

@font-face { font-family: "Cinzel"; src: url("assets/fonts/Cinzel-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("assets/fonts/Cinzel-Bold.otf") format("opentype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Literata"; src: url("assets/fonts/Literata-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Literata"; src: url("assets/fonts/Literata-Italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Literata"; src: url("assets/fonts/Literata-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
  --ink: #e9e4d8;            /* story text */
  --ink-soft: #a9a59c;       /* small labels */
  --gold: #d8b46a;           /* titles, buttons, the app's gold */
  --night: #06080f;          /* page behind everything */
  --panel: rgba(14, 17, 28, 0.94);
  --line: rgba(216, 180, 106, 0.28);
  --accent: #8cbfff;         /* character names; changes with the mood */
  --mood-bg: #1a1f33;
  --mood-pulse: #242d48;
  --text-scale: 1;           /* the Aa setting */
  --read-size: calc(17px * var(--text-scale));
  --read-leading: 1.5;
  --read-width: 34rem;       /* how wide the text column gets on a computer */
  --mood-fade: 1.6s;         /* how slowly the background changes between moods */
  --pulse-seconds: 9s;       /* the slow "living" drift of the background */

  /* Effects (reading page). Set any strength to 0% / 0 to turn it off. */
  --glow-strength: 5%;       /* the breathing glow in the middle (was 14%: too bright, Markez 2026-11-18) */
  --breathe-seconds: 9s;
  --ray-strength: 0%;        /* the slow light rays: off (Markez found them distracting); try 2% for a hint */
  --ray-seconds: 40s;        /* how slowly the rays sway side to side */
  --vignette-strength: 0.55; /* dark edges */
  --grain-strength: 0.12;    /* paper grain */
  --card-rise: 14px;         /* how far the text rises as a page arrives */
  --card-fade: 0.8s;

  /* Book touches */
  --page-ink: #ece3cf;       /* warmer, like ink on old paper */
  --dropcap-size: 3.4;       /* the big first letter, in lines of text */
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--night);
  color: var(--ink);
  font-family: "Literata", Georgia, serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
[hidden] { display: none !important; }
.screen { min-height: 100%; }

/* ---------- Library ---------- */
#library {
  max-width: 46rem;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 16px 40px;
}
.brand { text-align: center; padding: 8px 0 4px; }
.brand-mark { font-family: "Cinzel", serif; letter-spacing: 0.32em; font-size: 12px; color: var(--ink-soft); }
.library-title {
  font-family: "Cinzel", serif; font-weight: 700; color: var(--gold);
  font-size: clamp(30px, 8vw, 44px); letter-spacing: 0.06em; text-align: center; margin: 10px 0 26px;
}
.book {
  display: grid; grid-template-columns: minmax(110px, 34%) 1fr; gap: 18px;
  padding: 16px; border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(160deg, rgba(30, 36, 60, 0.7), rgba(10, 12, 20, 0.7));
}
.book-cover { width: 100%; height: auto; align-self: start; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.6); display: block; }
.book-title { font-family: "Cinzel", serif; font-weight: 700; font-size: clamp(19px, 5vw, 26px); margin: 2px 0 4px; line-height: 1.2; }
.book-author { color: var(--ink-soft); font-size: 14px; margin: 0 0 14px; }
.start-btn {
  display: inline-block; padding: 12px 20px; border-radius: 999px;
  background: var(--gold); color: #17130a; font-weight: 600; font-size: 16px;
  box-shadow: 0 0 24px rgba(216, 180, 106, 0.35);
}
.start-btn:hover { filter: brightness(1.08); }
.book-chapters { margin: 14px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.book-chapters button {
  font-size: 13px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-soft);
}
.book-chapters button:hover { color: var(--gold); border-color: var(--gold); }
.synopsis { grid-column: 1 / -1; margin: 4px 0 0; line-height: 1.6; font-size: 16px; color: #d6d1c5; }
.synopsis.clipped { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.read-more { grid-column: 1 / -1; justify-self: start; color: var(--gold); font-size: 15px; padding: 0; }
.library-foot { text-align: center; color: var(--ink-soft); font-size: 12px; margin-top: 34px; }

@media (max-width: 420px) {
  .book { grid-template-columns: 38% 1fr; gap: 14px; padding: 14px; }
  .start-btn { padding: 11px 16px; font-size: 15px; }
}

/* ---------- Reader ---------- */
#reader { position: fixed; inset: 0; overflow: hidden; }
.mood {
  position: absolute; inset: -20%;
  background:
    radial-gradient(60% 45% at 30% 30%, var(--mood-pulse), transparent 70%),
    radial-gradient(55% 50% at 75% 75%, var(--mood-pulse), transparent 70%),
    var(--mood-bg);
  transition: background-color var(--mood-fade) ease;
  animation: drift var(--pulse-seconds) ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(-3%, -2%, 0) scale(1); opacity: 0.85; }
  to   { transform: translate3d(3%, 2%, 0) scale(1.08); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .mood { animation: none; } }

/* A soft glow in the middle that breathes with the mood. */
.mood::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(40% 32% at 50% 45%, color-mix(in srgb, var(--accent) var(--glow-strength), transparent), transparent 70%);
  animation: breathe var(--breathe-seconds) ease-in-out infinite;
}
@keyframes breathe { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }

/* Slow light rays from above, tinted by the mood. */
/* The rays' center sits above the top of the screen, so only soft beams falling from above show. */
.rays {
  position: absolute; left: 50%; top: calc(-100vmax - 20vh); width: 200vmax; height: 200vmax; margin-left: -100vmax;
  background: repeating-conic-gradient(from 0deg at 50% 50%,
    transparent 0deg, color-mix(in srgb, var(--accent) var(--ray-strength), transparent) 5deg, transparent 10deg, transparent 23deg);
  -webkit-mask: radial-gradient(closest-side, transparent 45%, #000 62%, transparent 100%);
          mask: radial-gradient(closest-side, transparent 45%, #000 62%, transparent 100%);
  animation: sway var(--ray-seconds) ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes sway { from { transform: rotate(-8deg); } to { transform: rotate(8deg); } }
/* Rays are off (Markez, 2026-11-18: too distracting). Delete this line and raise --ray-strength to bring them back. */
.rays { display: none; }

/* Floating dust and embers (drawn by read.js). */
.motes { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* Dark edges and a fine paper grain over everything, like an old printed page. */
.vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(0, 0, 0, var(--vignette-strength)) 100%);
}
.vignette::after {
  content: ""; position: absolute; inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 0.95  0 0 0 0 0.85  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: var(--grain-strength);
  mix-blend-mode: overlay;
}

@media (prefers-reduced-motion: reduce) {
  .rays, .mood::after { animation: none; }
}

.reader-bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: max(10px, env(safe-area-inset-top)) 12px 10px;
  background: linear-gradient(to bottom, rgba(4,5,10,0.85), rgba(4,5,10,0));
}
.bar-btn { padding: 8px 10px; font-size: 15px; color: var(--gold); border-radius: 10px; }
.bar-btn:hover { background: rgba(255,255,255,0.06); }
.bar-chapter {
  font-family: "Cinzel", serif; font-size: 13px; letter-spacing: 0.14em; color: var(--ink-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase;
}
.size-pop {
  position: absolute; z-index: 4; right: 12px; top: calc(max(10px, env(safe-area-inset-top)) + 46px);
  display: flex; align-items: center; gap: 6px; padding: 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
}
.size-btn { width: 46px; height: 42px; border-radius: 10px; font-size: 18px; color: var(--gold); }
.size-btn:hover { background: rgba(255,255,255,0.07); }
.size-btn:disabled { opacity: 0.35; cursor: default; }
.size-value { min-width: 48px; text-align: center; font-size: 14px; color: var(--ink-soft); }

.feed {
  position: absolute; inset: 0; z-index: 2;
  overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain;
  scrollbar-width: none; outline: none;
}
.feed::-webkit-scrollbar { display: none; }
.card {
  min-height: 100%; scroll-snap-align: start; scroll-snap-stop: always;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(max(10px, env(safe-area-inset-top)) + 48px) 18px calc(22px + env(safe-area-inset-bottom));
}
.card-inner { width: 100%; max-width: var(--read-width); margin: 0 auto; }
/* Scene headings, with a small gold ornament: a line, a diamond, a line. */
.scene {
  font-family: "Cinzel", serif; font-size: calc(13px * var(--text-scale)); letter-spacing: 0.2em;
  color: var(--accent); text-transform: uppercase; margin: 0 0 20px; text-align: center;
  transition: color var(--mood-fade);
}
.scene::before {
  content: "◆"; display: block; width: 120px; margin: 0 auto 10px;
  font-size: 8px; line-height: 12px; letter-spacing: 0; color: var(--gold);
  background:
    linear-gradient(to right, transparent, var(--gold)) left center / 50px 1px no-repeat,
    linear-gradient(to left, transparent, var(--gold)) right center / 50px 1px no-repeat;
  opacity: 0.8;
}

/* Story text set like a printed book: warm ink, justified, with hyphens, and an indent on each new paragraph. */
.beat { color: var(--page-ink); }
.beat p {
  font-size: var(--read-size); line-height: var(--read-leading); margin: 0;
  hyphens: auto; -webkit-hyphens: auto; text-wrap: pretty;
}
/* Justified like a printed book only where lines are long enough; on a phone it leaves big gaps. */
@media (min-width: 600px) { .beat p { text-align: justify; } }
.beat p + p { text-indent: 1.4em; margin-top: 0.35em; }
.beat .scene + p, .beat p.cont { text-indent: 0; }

/* The big decorated first letter at the start of each chapter. */
.dropcap {
  float: left; font-family: "Cinzel", serif; font-weight: 700; color: var(--gold);
  font-size: calc(var(--read-size) * var(--read-leading) * var(--dropcap-size) * 0.82);
  line-height: 0.82; margin: 0.06em 0.1em 0 0; padding-top: 0.02em;
  text-shadow: 0 0 18px rgba(216, 180, 106, 0.45);
}
.name .dropcap { color: var(--gold); }
.chapter-start::after { content: ""; display: table; clear: both; }

/* Pages arrive softly: the text fades in and rises a little. */
.card .card-inner { opacity: 0; transform: translateY(var(--card-rise)); transition: opacity var(--card-fade) ease, transform var(--card-fade) ease; }
.card.shown .card-inner { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .card .card-inner { opacity: 1; transform: none; transition: none; } }

.name {
  padding: 0; color: var(--accent); font-weight: 600;
  text-shadow: 0 0 12px color-mix(in srgb, var(--accent) 55%, transparent);
  border-bottom: 1px dotted color-mix(in srgb, var(--accent) 60%, transparent);
  transition: color var(--mood-fade);
}
.name:hover { filter: brightness(1.15); }

.title-card { text-align: center; }
.title-book { font-family: "Cinzel", serif; letter-spacing: 0.3em; font-size: 12px; color: var(--ink-soft); margin: 0 0 18px; }
.title-chapter {
  font-family: "Cinzel", serif; font-weight: 700; color: var(--gold);
  font-size: clamp(34px, 10vw, 58px); letter-spacing: 0.05em; margin: 0; line-height: 1.1;
}
.title-rule {
  width: 200px; margin: 24px auto; opacity: 0.85; text-align: center;
  color: var(--gold); font-size: 10px; line-height: 14px;
  background:
    linear-gradient(to right, transparent, var(--gold)) left center / 82px 1px no-repeat,
    linear-gradient(to left, transparent, var(--gold)) right center / 82px 1px no-repeat;
}
.title-rule::before { content: "◆"; }
.title-chapter { text-shadow: 0 0 30px rgba(216, 180, 106, 0.35); }
.epigraph {
  text-align: left; white-space: pre-line; font-size: calc(15px * var(--text-scale)); line-height: 1.55;
  color: #cfcabe; border-left: 2px solid var(--line); padding: 4px 0 4px 16px; margin: 0 auto; max-width: 28rem;
}
.swipe-hint { color: var(--ink-soft); font-size: 13px; margin-top: 30px; letter-spacing: 0.08em; animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(-6px); opacity: 0.6; } }

.end-card { text-align: center; }
.end-title { font-family: "Cinzel", serif; color: var(--gold); font-size: clamp(24px, 7vw, 34px); margin: 0 0 14px; }
.end-text { font-size: 17px; line-height: 1.6; color: #d6d1c5; margin: 0 auto 26px; max-width: 26rem; }
.end-copy { color: var(--ink-soft); font-size: 12px; margin-top: 30px; }

.progress { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,0.06); }
.progress-fill { height: 100%; width: 0; background: var(--gold); transition: width 0.3s ease; }

/* ---------- Read / Support tabs (like the app: active tab gold with an underline) ---------- */
.tabs { display: flex; justify-content: center; gap: 28px; margin-top: 14px; }
.tab {
  font-family: "Cinzel", serif; font-size: 15px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft); text-decoration: none; padding: 6px 2px; border-bottom: 2px solid transparent;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--gold); border-bottom-color: var(--gold); }

/* ---------- Support ---------- */
.support-body {
  background:
    radial-gradient(70% 40% at 50% 0%, rgba(216, 180, 106, 0.12), transparent 70%),
    var(--night);
  background-attachment: fixed;
}
#support { max-width: 46rem; margin: 0 auto; padding: max(20px, env(safe-area-inset-top)) 16px 40px; }
.support-title {
  font-family: "Cinzel", serif; font-weight: 700; color: var(--gold); text-align: center;
  font-size: clamp(28px, 8vw, 42px); letter-spacing: 0.04em; margin: 26px 0 8px; line-height: 1.15;
}
.support-intro { text-align: center; color: #d6d1c5; font-size: 16px; line-height: 1.5; margin: 0 auto 10px; max-width: 28rem; }
.support-section { margin-top: 30px; }
.section-title {
  font-family: "Cinzel", serif; font-size: 14px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-soft); margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.novel {
  width: 100%; display: flex; align-items: center; gap: 14px; text-align: left;
  padding: 12px; border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(160deg, rgba(30, 36, 60, 0.7), rgba(10, 12, 20, 0.7));
}
.novel:hover { border-color: var(--gold); }
.novel-cover { width: 64px; height: auto; border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,0.5); }
.novel-text { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.novel-title { font-family: "Cinzel", serif; font-weight: 700; font-size: 18px; }
.novel-sub { color: var(--ink-soft); font-size: 13px; }
.novel-arrow { color: var(--gold); font-size: 28px; padding-right: 6px; }

.tips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tip {
  display: flex; align-items: center; justify-content: center; height: 64px; border-radius: 14px;
  font-family: "Cinzel", serif; font-weight: 700; font-size: 20px; text-decoration: none;
  color: var(--gold); border: 1px solid var(--gold); background: rgba(216, 180, 106, 0.08);
}
a.tip:hover { background: var(--gold); color: #17130a; }
.tip-off { opacity: 0.45; cursor: default; }
.tip-is-custom { flex-direction: column; gap: 2px; }
.tip-custom { font-size: 16px; letter-spacing: 0.04em; }
.tip-sub { font-family: "Literata", serif; font-weight: 400; font-size: 11px; letter-spacing: 0.06em; opacity: 0.8; }
.tips-note { text-align: center; color: var(--ink-soft); font-size: 13px; margin: 12px 0 0; }
@media (max-width: 420px) { .tips { grid-template-columns: repeat(2, 1fr); } }

.merch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.merch-item { padding: 10px; border: 1px solid var(--line); border-radius: 14px; text-align: center; }
.merch-item img { width: 100%; border-radius: 8px; }
.merch-name { margin: 8px 0 2px; font-weight: 600; }
.merch-price { margin: 0 0 10px; color: var(--ink-soft); }

.back-link { margin: 18px 0 6px -10px; }
.book-hero { display: flex; gap: 18px; align-items: flex-end; margin: 6px 0 22px; }
.book-hero-cover { width: 120px; height: auto; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.6); }
.book-hero-title { font-family: "Cinzel", serif; font-weight: 700; font-size: clamp(22px, 6vw, 32px); margin: 0 0 6px; line-height: 1.15; }
.formats { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.format {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(20, 24, 40, 0.6);
}
.format-name { font-family: "Cinzel", serif; font-weight: 700; font-size: 17px; margin: 0 0 4px; }
.format-desc { color: #cfcabe; font-size: 14px; margin: 0 0 4px; line-height: 1.4; }
.format-price { color: var(--gold); font-size: 14px; margin: 0; }
.buy { text-decoration: none; white-space: nowrap; }
.soon {
  white-space: nowrap; font-size: 13px; color: var(--ink-soft); padding: 8px 12px;
  border: 1px dashed rgba(255,255,255,0.18); border-radius: 999px;
}

/* ---------- Play ---------- */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.game-card {
  display: flex; flex-direction: column; text-align: left; overflow: hidden; padding: 0;
  border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(160deg, rgba(30, 36, 60, 0.7), rgba(10, 12, 20, 0.7));
}
.game-card:hover { border-color: var(--gold); }
.game-art { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.game-art-blank, .game-hero-art.game-art-blank {
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(60% 70% at 50% 40%, rgba(216, 180, 106, 0.18), transparent 70%), #0b0e18;
  border-bottom: 1px solid var(--line);
}
.game-art-blank span { font-family: "Cinzel", serif; font-weight: 700; font-size: 44px; color: var(--gold); opacity: 0.55; }
.game-card-text { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.game-card-kind { font-family: "Cinzel", serif; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.game-soon { opacity: 0.8; }

.game-hero-art { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; display: flex; margin: 4px 0 18px; box-shadow: 0 12px 30px rgba(0,0,0,0.55); }
.game-kind { font-family: "Cinzel", serif; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); margin: 0 0 10px; }
.game-blurb { text-align: left; margin: 0 0 14px; max-width: none; }
.game-facts { list-style: none; padding: 0; margin: 0 0 22px; color: var(--ink-soft); font-size: 14px; }
.game-facts li { padding: 6px 0; border-top: 1px solid rgba(255,255,255,0.07); }
.game-enter { text-align: center; }
.game-enter-btn { font-family: "Cinzel", serif; font-weight: 700; letter-spacing: 0.2em; font-size: 18px; padding: 14px 44px; }
.game-enter-btn.ghost { background: transparent; color: var(--gold); border: 1px solid var(--gold); box-shadow: none; margin-top: 10px; }

.game-stage { position: fixed; inset: 0; z-index: 20; background: #000; display: flex; flex-direction: column; }
.game-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: max(6px, env(safe-area-inset-top)) 10px 6px; background: #05070d; border-bottom: 1px solid var(--line);
}
.game-frame { flex: 1; width: 100%; border: 0; background: #000; }
.game-loading {
  position: absolute; inset: 48px 0 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; background: radial-gradient(50% 40% at 50% 45%, rgba(216, 180, 106, 0.12), transparent 70%), #05070d;
}
.game-loading-title { font-family: "Cinzel", serif; font-size: 22px; letter-spacing: 0.24em; color: var(--gold); margin: 0; }
.game-loading-bar { width: min(280px, 70vw); height: 3px; background: rgba(255,255,255,0.08); overflow: hidden; border-radius: 2px; }
.game-loading-fill { width: 40%; height: 100%; background: var(--gold); animation: loading 1.4s ease-in-out infinite; }
@keyframes loading { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* ---------- Character card ---------- */
.sheet-dim { position: fixed; inset: 0; z-index: 10; background: rgba(0,0,0,0.55); }
.sheet {
  position: fixed; z-index: 11; left: 0; right: 0; bottom: 0; margin: 0 auto;
  width: 100%; max-width: 36rem; max-height: 78vh; overflow-y: auto;
  padding: 10px 22px calc(26px + env(safe-area-inset-bottom));
  background: var(--panel); border: 1px solid var(--line); border-bottom: 0;
  border-radius: 22px 22px 0 0; box-shadow: 0 -18px 50px rgba(0,0,0,0.6);
  transform: translateY(0); transition: transform 0.28s ease;
}
.sheet.closing { transform: translateY(105%); }
.sheet-grip { width: 44px; height: 5px; border-radius: 3px; background: rgba(255,255,255,0.22); margin: 2px auto 14px; }
.sheet-close { position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; border-radius: 50%; color: var(--ink-soft); font-size: 16px; }
.sheet-close:hover { background: rgba(255,255,255,0.07); }
.sheet-name { font-family: "Cinzel", serif; font-weight: 700; color: var(--accent); font-size: 24px; margin: 0 40px 6px 0; }
.sheet-meta { color: var(--ink-soft); font-size: 14px; margin: 0 0 14px; }
.sheet-meta:empty { display: none; }
.sheet-facts { list-style: none; padding: 0; margin: 0; }
.sheet-facts li { padding: 10px 0; border-top: 1px solid rgba(255,255,255,0.07); line-height: 1.5; font-size: 16px; }
.sheet-facts .from { display: block; font-size: 12px; color: var(--ink-soft); margin-top: 3px; letter-spacing: 0.04em; }
.sheet-note { color: var(--ink-soft); font-size: 13px; margin: 14px 0 0; font-style: italic; }
