/* ---- أفلام القصيدة — Editorial Deck Styles ---- */

/* Thmanyah typeface — sans + serif display + serif text */
@font-face { font-family: 'Thmanyah Sans'; src: url('fonts/thmanyahsans-Light.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: block; }
@font-face { font-family: 'Thmanyah Sans'; src: url('fonts/thmanyahsans-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: block; }
@font-face { font-family: 'Thmanyah Sans'; src: url('fonts/thmanyahsans-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: block; }
@font-face { font-family: 'Thmanyah Sans'; src: url('fonts/thmanyahsans-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: block; }
@font-face { font-family: 'Thmanyah Sans'; src: url('fonts/thmanyahsans-Black.woff2') format('woff2'); font-weight: 900; font-style: normal; font-display: block; }

@font-face { font-family: 'Thmanyah Display'; src: url('fonts/thmanyahserifdisplay-Light.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: block; }
@font-face { font-family: 'Thmanyah Display'; src: url('fonts/thmanyahserifdisplay-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: block; }
@font-face { font-family: 'Thmanyah Display'; src: url('fonts/thmanyahserifdisplay-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: block; }
@font-face { font-family: 'Thmanyah Display'; src: url('fonts/thmanyahserifdisplay-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: block; }
@font-face { font-family: 'Thmanyah Display'; src: url('fonts/thmanyahserifdisplay-Black.woff2') format('woff2'); font-weight: 900; font-style: normal; font-display: block; }

@font-face { font-family: 'Thmanyah Text'; src: url('fonts/thmanyahseriftext-Light.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: block; }
@font-face { font-family: 'Thmanyah Text'; src: url('fonts/thmanyahseriftext-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: block; }
@font-face { font-family: 'Thmanyah Text'; src: url('fonts/thmanyahseriftext-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: block; }
@font-face { font-family: 'Thmanyah Text'; src: url('fonts/thmanyahseriftext-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: block; }
@font-face { font-family: 'Thmanyah Text'; src: url('fonts/thmanyahseriftext-Black.woff2') format('woff2'); font-weight: 900; font-style: normal; font-display: block; }

:root {
  --paper: #f0ece2;
  --paper-2: #e6e0d2;
  --ink: #322e2a;
  --ink-2: #2a2622;
  --ink-soft: #6e6960;
  --line: #cdc6b8;
  --accent: #b87a3d;     /* Kodak amber */
  --accent-soft: #d9b48a;
  --dust: #efeadc;
  --noir: #2a2724;
}

* { box-sizing: border-box; }

deck-stage {
  --slide-bg: var(--paper);
}

deck-stage > section {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Thmanyah Sans', system-ui, sans-serif;
  font-weight: 400;
  position: relative;
  overflow: hidden;
  direction: rtl;
}

/* ---- Type primitives ---- */
.display, .display-en { font-family: 'Thmanyah Display', 'Thmanyah Sans', serif; letter-spacing: -0.01em; }
.display-en { font-family: 'Space Grotesk', 'Thmanyah Sans', monospace; letter-spacing: -0.02em; }
.mono { font-family: 'Thmanyah Sans', monospace; font-weight: 400; letter-spacing: 0.02em; }
.label { font-family: 'Thmanyah Sans', monospace; font-size: 18px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.18em; }
.eyebrow { font-family: 'Thmanyah Sans', monospace; font-size: 16px; color: var(--ink-soft); letter-spacing: 0.22em; text-transform: uppercase; }

h1.huge {
  font-family: 'Thmanyah Display', serif;
  font-weight: 700;
  font-size: 220px;
  line-height: 1.16;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--ink);
}
h1.big {
  font-family: 'Thmanyah Display', serif;
  font-weight: 700;
  font-size: 150px;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0;
}
h2.mid {
  font-family: 'Thmanyah Display', serif;
  font-weight: 700;
  font-size: 92px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
}
h3.sub {
  font-family: 'Thmanyah Sans', sans-serif;
  font-weight: 700;
  font-size: 44px;
  line-height: 1.15;
  margin: 0;
}
.body { font-size: 26px; line-height: 1.55; color: var(--ink-2); max-width: 30em; text-wrap: pretty; }
.body-sm { font-size: 22px; line-height: 1.5; color: var(--ink-2); }
.caption { font-family: 'Thmanyah Sans', monospace; font-size: 14px; color: var(--ink-soft); letter-spacing: 0.12em; text-transform: uppercase; }

/* ---- Slide chrome / paginator ---- */
.chrome {
  position: absolute;
  top: 48px;
  inset-inline: 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Thmanyah Sans', monospace;
  font-size: 14px;
  color: var(--ink-soft);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 10;
}
.chrome .bullet { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); display: inline-block; margin-inline-end: 14px; vertical-align: middle; }
.chrome .num { font-variant-numeric: tabular-nums; display: none; }
.sig5 > div { grid-column: span 2; }
.sig5 > div:nth-child(4) { grid-column: 1 / span 3; }
.sig5 > div:nth-child(5) { grid-column: 4 / span 3; }
.sig5 > div .body-sm { font-size: 13px !important; }
.sig5 > div > div:last-child { width: 200px !important; }
.sig5 image-slot { height: 130px !important; }
.pagefoot {
  position: absolute;
  bottom: 48px;
  inset-inline: 80px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  font-family: 'Thmanyah Sans', monospace;
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 10;
}

/* ---- Pill panels (inspired by reference) ---- */
.pill {
  background: #fbf8f1;
  border-radius: 56px;
  padding: 56px 64px;
  position: relative;
}
.pill.dark { background: var(--noir); color: #ece6d8; }
.pill.amber { background: var(--accent); color: #18120a; }
.pill .tag {
  position: absolute;
  inset-inline-start: 36px;
  bottom: 28px;
  font-family: 'Thmanyah Sans', monospace;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.pill.dark .tag { color: #908576; }

/* ---- Image slots ---- */
.shot {
  background:
    repeating-linear-gradient(135deg, #c7bfae 0 2px, transparent 2px 14px),
    linear-gradient(180deg, #d6cebc 0%, #b8ad97 100%);
  border-radius: 32px;
  position: relative;
  overflow: hidden;
}
.shot.tall { aspect-ratio: 3/4; }
.shot.wide { aspect-ratio: 16/9; }
.shot.square { aspect-ratio: 1/1; }
.shot.poster { aspect-ratio: 2/3; }
.shot .shot-label {
  position: absolute;
  inset-inline-start: 20px;
  bottom: 20px;
  font-family: 'Thmanyah Sans', monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(20,16,10,0.75);
  background: rgba(255,253,247,0.7);
  padding: 6px 12px;
  border-radius: 8px;
  backdrop-filter: blur(8px);
}
image-slot[shape="rect"][fit="contain"] {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
image-slot {
  border-radius: 32px;
  background:
    repeating-linear-gradient(135deg, rgba(120,108,86,0.22) 0 2px, transparent 2px 14px),
    linear-gradient(180deg, #d6cebc 0%, #b8ad97 100%);
}
image-slot::after {
  /* faint corner ticks so the slot reads as a placeholder, not an empty box */
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: inherit;
  pointer-events: none;
}

/* ---- Common helpers ---- */
.row { display: flex; gap: 28px; }
.col { display: flex; flex-direction: column; gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }

.divider { height: 1px; background: var(--line); width: 100%; }

.slide-pad {
  position: absolute;
  inset: 120px 80px 120px 80px;
  display: flex;
  flex-direction: column;
}

/* ---- Specific accents ---- */
.amber-text { color: var(--accent); }
.under-amber { background: linear-gradient(transparent 60%, var(--accent-soft) 60%); padding: 0 0.1em; }

/* Big stat number */
.bignum {
  font-family: 'Thmanyah Display', sans-serif;
  font-weight: 500;
  font-size: 240px;
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.bignum.sm { font-size: 140px; }

/* Color swatches */
.swatch { aspect-ratio: 3/4; border-radius: 28px; padding: 32px; display: flex; flex-direction: column; justify-content: space-between; }
.swatch .nm { font-family: 'Thmanyah Sans', monospace; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; }
.swatch .ar { font-family: 'Thmanyah Display', serif; font-size: 42px; font-weight: 700; line-height: 1; }

/* ---- Cards (Featured-works style) ---- */
.case-card {
  background: #fbf8f1;
  border-radius: 36px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
}
.case-card .meta { font-family: 'Thmanyah Sans', monospace; font-size: 14px; color: var(--ink-soft); letter-spacing: 0.16em; text-transform: uppercase; }
.case-card .tt { font-family: 'Thmanyah Display', serif; font-size: 38px; font-weight: 700; line-height: 1.05; }

/* ---- Print poster ---- */
.poster-card {
  background: var(--noir);
  border-radius: 32px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 2/3;
}

/* ---- Dark sections ---- */
.dark-section { background: var(--noir); color: #ede7d8; }
.dark-section .body { color: #b9b1a0; }
.dark-section .label, .dark-section .eyebrow, .dark-section .caption { color: #908576; }
.dark-section .chrome, .dark-section .pagefoot { color: #908576; }
.dark-section .chrome .bullet { background: #ede7d8; }

/* Timeline pill bars (inspired by ref 4) */
.tl-row { display: flex; align-items: center; height: 76px; gap: 12px; }
.tl-pill { background: var(--noir); color: #f0ece2; padding: 0 36px; height: 76px; border-radius: 38px; display: flex; align-items: center; font-family: 'Thmanyah Sans', sans-serif; font-weight: 700; font-size: 28px; }
.tl-pill.amber { background: var(--accent); color: var(--ink); }

/* Quote */
.bigquote {
  font-family: 'Thmanyah Display', serif;
  font-weight: 600;
  font-size: 96px;
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* Marquee ribbon */
.ribbon {
  font-family: 'Thmanyah Sans', monospace;
  font-size: 16px;
  letter-spacing: 0.32em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

/* sprocket strip — Kodak edge */
.sprocket {
  background:
    linear-gradient(90deg, transparent 0, transparent 18px, #2a2724 18px, #2a2724 calc(100% - 18px), transparent calc(100% - 18px)),
    radial-gradient(circle at 22px 50%, #2a2724 8px, transparent 9px),
    radial-gradient(circle at calc(100% - 22px) 50%, #2a2724 8px, transparent 9px);
  height: 36px;
  position: relative;
  display: flex;
  align-items: center;
}

/* ---- Poem dissection slides ---- */
.verse {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: baseline;
  font-family: 'Thmanyah Display', serif;
  font-weight: 500;
  font-size: 30px;
  line-height: 1.4;
  color: var(--ink);
  text-wrap: balance;
  padding-block: 5px;
  border-bottom: 1px dashed rgba(110,105,96,0.18);
}
.verse:last-child { border-bottom: none; }
.verse-num { display: none; }
.verse .h {
  text-align: center;
}
.verse .h.start { text-align: end; }
.verse .h.end { text-align: start; }
.verse .sep {
  color: var(--accent);
  font-family: 'Thmanyah Sans', sans-serif;
  font-size: 22px;
  letter-spacing: 0.3em;
}
.verse-num {
  font-family: 'Thmanyah Sans', monospace;
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.2em;
  min-width: 32px;
  text-align: center;
}
.dissect-card {
  background: #fbf8f1;
  border-radius: 28px;
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dissect-card .dx {
  font-family: 'Thmanyah Sans', monospace;
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.dissect-card .dt {
  font-family: 'Thmanyah Display', serif;
  font-weight: 700;
  font-size: 28px;
  line-height: 1.2;
}
.dissect-card .db {
  font-family: 'Thmanyah Sans', sans-serif;
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink-2);
}
.dissect-card.dark { background: var(--noir); }
.dissect-card.dark .dx { color: var(--accent-soft); }
.dissect-card.dark .dt { color: #ede7d8; }
.dissect-card.dark .db { color: #b9b1a0; }
.dissect-card.amber { background: var(--accent-soft); }
.dissect-card.amber .dx { color: #6b3d12; }

/* "other works by poet" footer strip on anatomy slides */
.poems-strip {
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.poems-strip-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.poem-tag {
  font-family: 'Thmanyah Display', serif;
  font-weight: 500;
  font-size: 19px;
  padding: 8px 18px;
  background: #fbf8f1;
  border-radius: 999px;
  white-space: nowrap;
  color: var(--ink);
  line-height: 1;
}
.poem-tag.amber { background: var(--accent-soft); color: #2a1408; }
.poem-tag.dark { background: var(--noir); color: #ede7d8; }
.poem-tag.line { background: transparent; border: 1px solid var(--ink); }

/* ============ BACKGROUND-PHOTO SLIDES: force light text ============ */
.bg-photo h1, .bg-photo h2, .bg-photo h3,
.bg-photo .body, .bg-photo .body-sm, .bg-photo p,
.bg-photo .display, .bg-photo .bigquote, .bg-photo .sub,
.bg-photo .label, .bg-photo .eyebrow {
  color: #fff !important;
  text-shadow: 0 2px 22px rgba(0,0,0,0.45);
}
.bg-photo .caption { color: #e6dcc7 !important; }
.bg-photo .chrome, .bg-photo .pagefoot { color: #f0ece2 !important; }
.bg-photo .amber-text, .bg-photo .under-amber { color: var(--accent-soft) !important; }
/* keep glass pills readable but let their own inline colors win for accents */
.bg-photo .pill { background: rgba(20,17,14,0.55); backdrop-filter: blur(6px); }
.bg-photo .pill .caption { color: #d9c9ad !important; }

/* ============ SOCIAL PLATFORM MOCKUPS ============ */
/* Phone shell for IG */
.device {
  background: #14110e;
  border-radius: 38px;
  padding: 12px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.28), 0 0 0 1px rgba(255,255,255,0.04) inset;
  display: flex;
  flex-direction: column;
}
.device-screen {
  background: #fff;
  border-radius: 28px;
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.ig-topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #efefef;
}
.ig-ava {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  flex-shrink: 0;
  padding: 2px;
}
.ig-ava > div { width: 100%; height: 100%; border-radius: 50%; background: #2a2724; }
.ig-handle { font-family: 'Thmanyah Sans', sans-serif; font-weight: 700; font-size: 14px; color: #111; }
.ig-sub { font-family: 'Thmanyah Sans', sans-serif; font-size: 11px; color: #888; }
.ig-actions { display: flex; gap: 16px; padding: 12px 14px; color: #111; }
.ig-actions svg { width: 24px; height: 24px; }
.ig-caption { font-family: 'Thmanyah Sans', sans-serif; font-size: 12.5px; line-height: 1.5; color: #222; padding: 0 14px 12px; }
.ig-caption b { color: #111; }

/* Story ring strip */
.ig-story-ring {
  width: 100%; aspect-ratio: 9/16; border-radius: 18px; overflow: hidden; position: relative;
}
.ig-story-bars { position: absolute; top: 10px; inset-inline: 12px; display: flex; gap: 4px; z-index: 3; }
.ig-story-bars > span { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,0.4); }
.ig-story-bars > span.on { background: #fff; }
.ig-story-head {
  position: absolute; top: 26px; inset-inline: 14px; z-index: 3;
  display: flex; align-items: center; gap: 8px;
}
.ig-story-head .nm { font-family: 'Thmanyah Sans'; font-weight: 700; font-size: 12px; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.4); }

/* Browser window chrome */
.browser {
  background: #2a2724;
  border-radius: 18px 18px 14px 14px;
  overflow: hidden;
  box-shadow: 0 24px 50px rgba(0,0,0,0.22);
  display: flex; flex-direction: column;
}
.browser-bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: #1f1c19; }
.browser-dots { display: flex; gap: 7px; }
.browser-dots > span { width: 11px; height: 11px; border-radius: 50%; }
.browser-url {
  flex: 1; background: #14110e; border-radius: 8px; padding: 7px 14px;
  font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: #a59c8a;
}
.browser-body { background: #fff; flex: 1; min-height: 0; overflow: hidden; }

/* Pinterest masonry */
.pin-grid { column-count: 4; column-gap: 12px; padding: 16px; }
.pin-grid > * { break-inside: avoid; margin-bottom: 12px; display: block; }

/* X / Twitter */
.x-post { padding: 18px 20px; border-bottom: 1px solid #2f3336; display: flex; gap: 12px; }
.x-ava { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg,var(--accent),var(--accent-soft)); flex-shrink: 0; }
.x-name { font-family: 'Thmanyah Sans'; font-weight: 700; font-size: 15px; color: #e7e9ea; }
.x-handle { font-family: 'Thmanyah Sans'; font-size: 14px; color: #71767b; }
.x-text { font-family: 'Thmanyah Sans'; font-size: 15px; line-height: 1.5; color: #e7e9ea; margin-top: 4px; }

/* ---- Director's treatment ---- */
.reader-input{flex:1;min-height:0;resize:none;border:1px solid var(--line);border-radius:22px;background:#fbf8f1;padding:22px 26px;font-family:'Thmanyah Display',serif;font-size:22px;line-height:1.7;color:var(--ink);outline:none;direction:rtl}
.reader-input:focus{border-color:var(--accent)}
.reader-input::placeholder{color:var(--ink-soft);font-family:'Thmanyah Sans',sans-serif;font-size:17px}
.reader-btn{appearance:none;border:0;border-radius:999px;background:var(--accent);color:#1a0f04;font-family:'Thmanyah Sans',sans-serif;font-weight:700;font-size:17px;padding:14px 26px;cursor:pointer}
.reader-btn:hover{filter:brightness(1.06)}
.reader-btn:disabled{opacity:.6;cursor:progress}
.reader-btn.ghost{background:transparent;border:1px solid var(--line);color:var(--ink-soft)}
.reader-verses{flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;padding-inline-end:6px}
.reader-verses .verse{font-size:26px;gap:56px}
.reader-hint{color:var(--ink-soft);font-family:'Thmanyah Sans',sans-serif;font-size:18px;line-height:1.7;max-width:28em;margin:auto;text-align:center}
.goal-list{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:10px;counter-reset:g}
.goal-list li{position:relative;padding-inline-start:34px;font-family:'Thmanyah Sans',sans-serif;font-size:15px;line-height:1.5;color:#ede7d8;counter-increment:g}
.goal-list li::before{content:counter(g);position:absolute;inset-inline-start:0;top:0;width:24px;height:24px;border-radius:50%;background:var(--accent);color:#1a0f04;font-size:12px;font-weight:700;display:flex;align-items:center;justify-content:center}
.shot-tag{position:absolute;bottom:12px;inset-inline-start:12px;inset-inline-end:12px;display:flex;gap:10px;align-items:center;pointer-events:none;background:rgba(20,17,14,.72);backdrop-filter:blur(6px);color:#ede7d8;border-radius:10px;padding:8px 12px;font-family:'Thmanyah Sans',sans-serif;font-size:13px}
.shot-tag span:first-child{font-weight:700;color:var(--accent)}
.shot-tag span:last-child{margin-inline-start:auto;font-size:12px;color:#a59c8a}

/* ---- Poem library ---- */
.poem-card{display:flex;flex-direction:column;gap:10px;background:#fbf8f1;border-radius:24px;padding:20px 22px;min-height:0}
.poem-card.on-dark{background:#36322d}
.poem-card.on-dark .dt,.poem-card.on-dark .poem-verses{color:#ede7d8}
.poem-card.on-dark .db{color:#b9b1a0}
.poem-card.rec{background:var(--accent-soft);outline:2px solid var(--accent);outline-offset:-2px}
.poem-card.rec .dx{color:#6b3d12}.poem-card.rec .db{color:#2a1408}
.poem-card .dx{font-family:'Thmanyah Sans',monospace;font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:var(--accent)}
.poem-card .dt{font-family:'Thmanyah Display',serif;font-weight:700;line-height:1.25}
.poem-card .db{font-family:'Thmanyah Sans',sans-serif;line-height:1.5;color:var(--ink-2)}
.poem-verses{flex:1;min-height:0;overflow:auto;font-family:'Thmanyah Display',serif;font-size:23px;line-height:1.7;color:var(--ink);padding-top:8px;border-top:1px dashed rgba(110,105,96,.25)}
.poem-verses .pv{display:grid;grid-template-columns:1fr 1fr;gap:18px;padding:3px 0}
.poem-verses .pv span:first-child{text-align:end}.poem-verses .pv span:last-child{text-align:start}
.poem-verses:empty{display:none}
.poem-paste{resize:none;height:64px;border:1px dashed rgba(110,105,96,.4);border-radius:12px;background:rgba(255,255,255,.35);padding:12px 14px;font-family:'Thmanyah Sans',sans-serif;font-size:15px;line-height:1.6;color:var(--ink);outline:none;direction:rtl}
.poem-card:not(.filled) .poem-paste{flex:1;min-height:0;height:auto}
.poem-paste::placeholder{color:var(--ink-soft)}
.poem-card.on-dark .poem-paste::placeholder{color:#a59c8a}
.poem-card.on-dark .poem-paste{background:rgba(0,0,0,.2);color:#ede7d8;border-color:#5a5248}
.poem-paste:focus{border-color:var(--accent);border-style:solid}
.poem-card.filled .poem-paste{height:36px;font-size:12px;opacity:.6;padding:8px 12px}
.poem-open{font-family:'Thmanyah Display',serif;font-size:19px;line-height:1.55;color:var(--ink);margin-top:10px;padding-top:8px;border-top:1px dashed rgba(110,105,96,.25)}
.poem-card.on-dark .poem-open{color:#ede7d8}
.poem-src{display:inline-block;margin-top:8px;font-family:'Thmanyah Sans',sans-serif;font-size:12px;letter-spacing:.06em;color:var(--accent);text-decoration:none}
.poem-src:hover{text-decoration:underline}
.poem-src.muted{color:var(--ink-soft)}.poem-card.on-dark .poem-src.muted{color:#a59c8a}
.poem-shot{display:flex;flex-direction:column;gap:3px;margin-top:12px;font-family:'Thmanyah Sans',sans-serif;font-size:17px;line-height:1.5;color:var(--ink-2)}
.poem-card.on-dark .poem-shot{color:#b9b1a0}.poem-card.rec .poem-shot{color:#2a1408}
.poem-open{font-size:24px;line-height:1.6}
.poem-card{gap:16px;justify-content:flex-start!important}
.poem-card .dt{font-size:30px!important}
.poem-card .poem-head .caption{font-size:13px!important}
.poem-card>.db{font-size:21px!important;line-height:1.6!important;flex:1}
.poem-src{font-size:14px;margin-top:10px}

/* ---- Editing philosophy ---- */
.edit-grid{margin-top:26px;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(2,1fr);gap:14px;flex:1;min-height:0}
.edit-card{background:#fbf8f1;border-radius:24px;padding:22px 24px;display:flex;flex-direction:column;gap:12px;justify-content:space-between}
.edit-card.amber{background:var(--accent-soft)}.edit-card.dark{background:var(--noir);color:#ede7d8}
.edit-ico{width:44px;height:44px;color:var(--accent)}.edit-card.amber .edit-ico{color:#6b3d12}
.edit-t{font-family:'Thmanyah Display',serif;font-size:28px;font-weight:700;line-height:1.2}
.edit-d{font-family:'Thmanyah Sans',sans-serif;font-size:16px;line-height:1.55;color:var(--ink-2);margin-top:6px}.edit-card.dark .edit-d{color:#b9b1a0}
.edit-rule{font-family:'Thmanyah Sans',sans-serif;font-size:13px;letter-spacing:.04em;color:var(--accent);border-top:1px dashed rgba(110,105,96,.3);padding-top:10px}.edit-card.amber .edit-rule{color:#6b3d12}
.edit-strip{margin-top:16px;display:flex;align-items:center;gap:10px;background:var(--noir);border-radius:16px;padding:12px 18px}
.edit-strip>.caption{color:#a59c8a;white-space:nowrap;margin-inline-end:8px}
.edit-seg{background:#3a352f;border-radius:8px;padding:8px 12px;display:flex;justify-content:space-between;gap:10px;font-family:'Thmanyah Sans',sans-serif;font-size:13px;color:#b9b1a0;min-width:0;overflow:hidden;white-space:nowrap}
.edit-seg b{color:#ede7d8;font-weight:600}.edit-seg:nth-child(3){background:var(--accent);color:#1a0f04}.edit-seg:nth-child(3) b{color:#1a0f04}
/* ---- Poem library ×8 ---- */
.lib8{margin-top:18px;flex:1;min-height:0;display:grid;grid-template-columns:repeat(4,1fr);grid-template-rows:repeat(2,1fr);gap:12px}
.lib-card{background:#fbf8f1;border-radius:20px;padding:18px 20px;display:flex;flex-direction:column;gap:9px;min-height:0;overflow:hidden;position:relative}
.lib8.on-dark .lib-card{background:#36322d;color:#ede7d8}
.lib-card.r1{background:var(--accent)!important;color:#1a0f04}
.lib-card.r2{background:var(--accent-soft)!important;color:#2a1408}
.lib-card.r3{background:#e8d9bf!important;color:#2a1408}
.lib-card.r4{background:#efe6d3!important;color:#2a1408}
.lib-head{display:flex;gap:10px;align-items:flex-start}
.lib-n{flex:none;width:28px;height:28px;border-radius:50%;background:rgba(0,0,0,.12);display:flex;align-items:center;justify-content:center;font-family:'Thmanyah Sans',sans-serif;font-size:13px;font-weight:700}
.lib8.on-dark .lib-card:not([class*=" r"]) .lib-n{background:rgba(255,255,255,.12)}
.lib-t{font-family:'Thmanyah Display',serif;font-size:26px;font-weight:700;line-height:1.25}
.lib-m{font-family:'Thmanyah Sans',sans-serif;font-size:13px;opacity:.75;margin-top:3px}
.lib-open{font-family:'Thmanyah Display',serif;font-size:21px;line-height:1.6;padding-top:8px;border-top:1px dashed rgba(0,0,0,.18)}
.lib8.on-dark .lib-card:not([class*=" r"]) .lib-open{border-color:rgba(255,255,255,.18)}
.lib-story{font-family:'Thmanyah Sans',sans-serif;font-size:18px;line-height:1.6;opacity:.92;flex:1;min-height:0;overflow:hidden}
.lib-story span{display:block;font-size:11px;letter-spacing:.12em;text-transform:uppercase;opacity:.65;margin-bottom:4px}
.lib-src{font-family:'Thmanyah Sans',sans-serif;font-size:13px;color:inherit;opacity:.8;text-decoration:none}.lib-src:hover{opacity:1;text-decoration:underline}
.lib-legend{display:flex;align-items:center;gap:6px}
.lg{width:26px;height:26px;border-radius:7px;display:flex;align-items:center;justify-content:center;font-family:'Thmanyah Sans',sans-serif;font-size:12px;font-weight:700;color:#1a0f04}
.lg.r1{background:var(--accent)}.lg.r2{background:var(--accent-soft)}.lg.r3{background:#e8d9bf}.lg.r4{background:#efe6d3}
.lib-legend .caption{margin-inline-start:8px}

.lib8.on-dark .lib-card.r1{color:#1a0f04}.lib8.on-dark .lib-card.r2,.lib8.on-dark .lib-card.r3,.lib8.on-dark .lib-card.r4{color:#2a1408}
.lib8.on-dark .lib-card.r2 .lib-open,.lib8.on-dark .lib-card.r3 .lib-open,.lib8.on-dark .lib-card.r4 .lib-open{color:#2a1408}
