/* Shadowfall site - W20 (creator 2026-10-12: "scoate torțele, continuă cu detaliile mai HD și mai premium").
   The 1024 px textures (tools/web_textures.py) shown at a larger scale (more detail, fewer repeats), engraved gold
   buttons with a slow shine, cards with depth and a fine gold glow on hover. Loaded last, medieval / stone themes. */

/* ---- HD textures at a larger scale ---- */
body.theme-piatra {
  background:
    url("../img/orn/damask.svg") 0 0 / 120px,
    radial-gradient(ellipse 120% 70% at 50% 0%, #0c0b0a00 0%, #0c0b0acc 55%, #0c0b0af2 100%),
    url("../img/tex/stone.webp") 0 0 / 760px;
  background-attachment: scroll, fixed, fixed;
}
.theme-piatra :is(.feature, .class-card, .panel, .dl-card, .place, .shop-card, .package, .chapter, .kingdom-card, .stat, .step) {
  background: radial-gradient(ellipse 85% 80% at 50% 40%, #131110f2 0%, #121110de 55%, #12111088 100%),
              url("../img/tex/blackstone.webp") 0 0 / 560px;
  background-clip: padding-box;
}
.theme-piatra :is(section.prose.narrow, .sheet) {
  background: radial-gradient(ellipse 80% 75% at 50% 45%, #e2cfa8ee 0%, #dcc79cd8 55%, #dcc79c50 100%),
              url("../img/tex/parchment.webp") 0 0 / 640px;
}
.theme-medieval section.sheet.manuscript.prose {
  background-image: url("../img/orn/vine.svg"), radial-gradient(ellipse 80% 75% at 50% 45%, #e2cfa8ee 0%, #dcc79cd8 55%, #dcc79c50 100%),
                    url("../img/tex/parchment.webp");
  background-size: 40px 134px, auto, 640px;
}

/* ---- cards: depth inside the fine gold frame, a soft gold glow on hover ---- */
.theme-medieval :is(.feature, .class-card, .panel, .chapter.open, .package, .kingdom-card, .shop-card, .dl-card) {
  box-shadow: 0 0 0 1px #000, inset 0 0 0 1px #00000080, inset 0 30px 60px -30px #c9a14a12, inset 0 -40px 60px -30px #000c,
              0 18px 36px #000c;
  transition: box-shadow .35s ease, transform .3s ease, border-color .35s ease;
}
.theme-medieval :is(.feature, .class-card, .chapter.open, .package, .kingdom-card, .shop-card):hover {
  border-color: #e9c66f;
  box-shadow: 0 0 0 1px #000, 0 0 0 4px #c9a14a1f, 0 0 26px #c9a14a33, inset 0 30px 60px -30px #c9a14a22,
              inset 0 -40px 60px -30px #000c, 0 22px 42px #000d;
}

/* ---- engraved gold buttons with a slow shine ---- */
.theme-piatra .btn-gold::before {
  background: var(--rivet) 14px 50% / 9px 9px no-repeat, var(--rivet) calc(100% - 14px) 50% / 9px 9px no-repeat,
              linear-gradient(180deg, #f7dd98e0 0%, #d9ac58d0 46%, #b9883ad0 54%, #8a5f20e6 100%),
              url("../img/tex/gold.webp") 0 0 / 360px;
}
.theme-piatra .btn-lg.btn-gold::before {
  background: var(--rivet) 18px 50% / 9px 9px no-repeat, var(--rivet) calc(100% - 18px) 50% / 9px 9px no-repeat,
              linear-gradient(90deg, transparent 30px, #5a3a1066 30px 31px, transparent 31px calc(100% - 31px), #5a3a1066 calc(100% - 31px) calc(100% - 30px), transparent calc(100% - 30px)),
              linear-gradient(180deg, #f7dd98e0 0%, #d9ac58d0 46%, #b9883ad0 54%, #8a5f20e6 100%),
              url("../img/tex/gold.webp") 0 0 / 360px;
}
.theme-medieval .btn-gold { box-shadow: none; }
.theme-medieval .btn-gold > .btn-text, .theme-medieval .btn-gold { letter-spacing: .2em; }
.theme-medieval .btn-gold::after {
  background: linear-gradient(105deg, transparent 40%, #fff7da88 50%, transparent 60%);
  animation: gold-shine 6s ease-in-out 2s infinite;
}
@keyframes gold-shine { 0%, 70% { transform: translateX(-130%); } 90%, 100% { transform: translateX(130%); } }
.theme-medieval .btn-ghost { letter-spacing: .16em; }

/* ---- headings: a fine engraved line under the kicker, a little more air ---- */
.theme-medieval .section > .kicker { margin-bottom: 1em; }
.theme-medieval .section > h2 { letter-spacing: .04em; }

@media (prefers-reduced-motion: reduce) { .theme-medieval .btn-gold::after { animation: none; } }

/* the torches are gone (creator): their light on the wall goes with them */
body.theme-medieval::before, body.theme-medieval::after { content: none; }

/* the picture behind the home title stays still (creator 2026-10-12: "imaginea de fundal de la titlu trebuie să fie fixă") */
.hero-slide, .hero-slide.on { transform: none; animation: none; transition: none; }

/* creator 2026-10-12: "când apăs click apare ca o mână, e urâtă, scoate-o" - the game's own arrow everywhere */
.theme-medieval :is(a, button, label, select, summary, .btn, .linkish, .eye, .checkbox, .nav-burger) {
  cursor: url("../img/ui/cursor.png") 3 2, default;
}
.theme-medieval :is(input, textarea) { cursor: text; }

/* the shop stands out in the menu: a ruby, a fine gold frame, a warm red glow */
.theme-medieval .nav a.nav-shop {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px 7px 11px; margin: 0 4px;
  color: #ffe9b0; border: 1px solid #c9a14a; border-radius: 2px;
  background: linear-gradient(180deg, #5a0f18 0%, #330810 60%, #22050a 100%);
  box-shadow: inset 0 1px 0 #ff9aa233, inset 0 0 0 1px #00000080, 0 0 14px #b0182833, 0 2px 6px #000c;
  text-shadow: 0 1px 0 #000;
}
.theme-medieval .nav a.nav-shop svg {
  width: 15px; height: 15px; fill: #ff4a5c; stroke: #ffd7a0; stroke-width: 1.2; filter: drop-shadow(0 0 4px #ff3b4a99);
}
.theme-medieval .nav a.nav-shop:hover, .theme-medieval .nav a.nav-shop.on {
  color: #fff4d6; border-color: #f0cf7a;
  box-shadow: inset 0 1px 0 #ff9aa244, inset 0 0 0 1px #00000080, 0 0 22px #e0283c55, 0 2px 6px #000c;
}
.theme-medieval .nav a.nav-shop.on::after { content: none; }

/* the showcase of coming cosmetics */
.showcase-head { text-align: center; margin: 56px auto 26px; max-width: 640px; }
.showcase-head h2 { margin: .2em 0 .3em; }
.showcase { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-bottom: 48px; }
.show-card {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 30px 18px 22px;
  border: 1px solid #b98a35; outline: 1px solid #c9a14a55; outline-offset: -7px;
  background: radial-gradient(ellipse 80% 60% at 50% 30%, #2a2018f0 0%, #14110ef2 60%, #0e0c0af5 100%), url("../img/tex/blackstone.webp") 0 0 / 560px;
  box-shadow: 0 0 0 1px #000, inset 0 -40px 60px -30px #000c, 0 16px 32px #000b;
  transition: transform .3s ease, box-shadow .35s ease, border-color .35s ease;
}
.show-card:hover {
  transform: translateY(-4px); border-color: #e9c66f;
  box-shadow: 0 0 0 1px #000, 0 0 0 4px #c9a14a1f, 0 0 26px #c9a14a33, inset 0 -40px 60px -30px #000c, 0 22px 42px #000d;
}
.show-icon {
  width: 118px; height: 118px; display: grid; place-items: center; margin-bottom: 14px; border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, #3a2c1c 0%, #17120d 62%, #0b0907 100%);
  box-shadow: 0 0 0 2px #8a6526, 0 0 0 5px #120e0a, 0 0 0 6px #c9a14a88, inset 0 6px 18px #000c, 0 8px 20px #000c;
}
.show-icon img { width: 92px; height: 92px; transition: transform .35s ease, filter .35s ease; }
.show-card:hover .show-icon img { transform: scale(1.06); filter: drop-shadow(0 0 10px #ffd27a55); }
.show-kind { font: 600 .68rem var(--serif, serif); letter-spacing: .22em; text-transform: uppercase; color: #c9a14a; }
.show-name { font: 600 1.12rem var(--serif, serif); color: #f3e6c4; margin: .3em 0 .4em; letter-spacing: .02em; }
.show-desc { font-size: .88rem; color: #b9ad94; line-height: 1.5; }
.show-tag {
  position: absolute; top: 14px; right: 14px; padding: 3px 9px; font: 600 .62rem var(--serif, serif); letter-spacing: .16em;
  text-transform: uppercase; color: #ffe0a6; background: linear-gradient(180deg, #5a0f18, #2a060c); border: 1px solid #c9a14a88;
}
@media (max-width: 980px) { .showcase { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .showcase { gap: 12px; } .show-card { padding: 26px 10px 16px; } .show-icon { width: 92px; height: 92px; }
  .show-icon img { width: 72px; height: 72px; } .show-desc { display: none; } }

/* ======== W23 (creator 2026-10-12: "lemnul să pară mai real", pergamentele, ornamentele de sub subtitluri, "toate elementele
   fantasy mai profesionale, ca și cum ar fi lucrate foarte mult"): real planks, aged parchment on turned rods, an engraved
   flourish, an illuminated margin, the auth tabs drawn whole (the red no longer spills out). ======== */

/* ---- real old planks (tools/web_hd_materials.py, ambientCG Planks037A, CC0) ---- */
.theme-piatra .band {
  background: linear-gradient(180deg, #000000b8 0%, #00000040 16% 84%, #000000b8 100%),
              radial-gradient(ellipse 75% 95% at 50% 50%, #00000000 45%, #00000080 100%),
              url("../img/tex/planks.webp") 0 0 / 1200px;
}
.theme-piatra .news-grid.board {
  background: radial-gradient(ellipse 80% 90% at 50% 50%, #00000000 40%, #00000094 100%), url("../img/tex/planks.webp") 0 0 / 1200px;
  background-clip: padding-box;
}
.theme-piatra .auth-card, .theme-piatra .table-wrap {
  background: linear-gradient(180deg, #00000073, #000000b3), url("../img/tex/planks.webp") 0 0 / 1000px; background-clip: padding-box;
}

/* ---- parchment: aged sheet (stains, foxing, burnt edges) between two turned wooden rods with gold finials ---- */
.theme-medieval.theme-piatra :is(section.prose.narrow, .sheet) {
  background: radial-gradient(ellipse 72% 68% at 50% 46%, #00000000 52%, #6b421640 82%, #4a2a0c66 100%),
              url("../img/tex/parchment2.webp") 0 0 / 768px;
  box-shadow: 0 34px 70px #000e, 0 0 0 1px #3a2408, inset 0 0 0 1px #8a6d3f99, inset 0 0 22px #5a3410b3, inset 0 0 90px #7a4c1a66,
              inset 0 18px 18px -10px #3a220a99, inset 0 -18px 18px -10px #3a220a99;
}
.theme-medieval :is(section.prose.narrow, .sheet)::before, .theme-medieval :is(section.prose.narrow, .sheet)::after {
  left: -36px; right: -36px; height: 32px; border-radius: 0; box-shadow: none;
  background: url("../img/orn/rod-cap-l.svg") 0 50% / auto 100% no-repeat, url("../img/orn/rod-cap-r.svg") 100% 50% / auto 100% no-repeat,
              linear-gradient(180deg, #2a1406 0%, #7a4a22 18%, #c08a52 30%, #8a5428 48%, #5a3214 72%, #24110470 92%, #1a0c03 100%)
              center / calc(100% - 92px) 60% no-repeat;
  filter: drop-shadow(0 7px 7px #000c);
}
.theme-medieval :is(section.prose.narrow, .sheet)::before { top: -17px; }
.theme-medieval :is(section.prose.narrow, .sheet)::after { bottom: -17px; }

/* the manuscript: an illuminated gold-and-vermilion margin instead of the drawn vine */
.theme-medieval.theme-piatra section.sheet.manuscript.prose {
  background-image: url("../img/orn/margin-illum.svg"), radial-gradient(ellipse 72% 68% at 50% 46%, #00000000 52%, #6b421640 82%, #4a2a0c66 100%),
                    url("../img/tex/parchment2.webp");
  background-size: 44px 200px, auto, 768px; background-repeat: repeat-y, no-repeat, repeat; background-position: 22px 0, 0 0, 0 0;
}

/* ---- the engraved flourish under headings (img/orn/flourish.svg, 520 x 48) ---- */
.theme-medieval :is(.section > h2, .section-head h2, .band-in h2, .page-hero h1, .panel > h2, .sheet h1, section.prose.narrow h1, .cta-final h2)::after {
  width: 270px; height: 25px; margin-top: 14px; background-size: contain; opacity: 1;
}
.theme-medieval .page-hero h1::after { width: 300px; height: 28px; }
.theme-medieval .panel > h2::after { width: 190px; height: 18px; margin-top: 10px; }
.theme-medieval :is(.sheet, section.prose.narrow) h2 { border-bottom: 0; padding-bottom: 0; }
.theme-medieval :is(.sheet, section.prose.narrow) h2::after {
  content: ""; display: block; width: 220px; height: 20px; margin: 10px 0 6px; background: url("../img/orn/flourish.svg") 0 50% / contain no-repeat;
}

/* ---- the auth tabs (Intră / Cont nou): drawn whole in CSS, the crimson stays inside the gold frame ---- */
.theme-medieval .seg { gap: 8px; }
.theme-medieval .seg a {
  border: 1px solid #5a4630; border-image: none; border-radius: 2px; padding: .85em .6em; overflow: hidden;
  background: linear-gradient(180deg, #2a2520 0%, #16130f 55%, #0e0c0a 100%);
  box-shadow: inset 0 1px 0 #ffffff14, inset 0 0 0 1px #00000099, 0 2px 6px #000b; color: #a8987a;
}
.theme-medieval .seg a:hover { border-color: #b98a35; color: var(--gold2); background: linear-gradient(180deg, #332b22, #18140f 60%, #100d0a); }
.theme-medieval .seg a.on {
  border-color: #d9b25c; color: #fbe7b8; text-shadow: 0 1px 0 #2a0507;
  background: linear-gradient(180deg, #7a1822 0%, #5a0f18 45%, #3a0910 100%);
  box-shadow: inset 0 1px 0 #ff9aa233, inset 0 0 0 1px #00000080, inset 0 0 0 3px #c9a14a33, 0 0 12px #b0182840, 0 2px 6px #000b;
}

/* the account's referral code: a small gold-framed plaque */
.referral .ref-code {
  display: inline-flex; align-items: center; gap: 12px; margin: 6px 0 14px; padding: 12px 20px 12px 16px;
  border: 1px solid #c9a14a; outline: 1px solid #c9a14a44; outline-offset: -5px;
  background: linear-gradient(180deg, #2a2018, #14100c); box-shadow: inset 0 1px 0 #ffffff12, 0 4px 12px #000b;
}
.referral .ref-code svg { width: 26px; height: 26px; fill: none; stroke: #e9c66f; stroke-width: 1.6; stroke-linejoin: round; }
.referral .ref-code b { font: 600 1.5rem var(--serif, serif); letter-spacing: .22em; color: #f6dc95; font-variant-numeric: lining-nums; }
.referral code { font-size: .82rem; color: #d9c79e; word-break: break-all; }

/* RO | EN: two small engraved plates in the menu */
.lang-switch { display: inline-flex; margin: 0 6px; border: 1px solid #6e5532; border-radius: 2px; overflow: hidden; box-shadow: 0 2px 6px #000a; }
.nav .lang-switch a, .lang-switch a {
  padding: 5px 9px; font: 600 .7rem/1 var(--serif, serif); letter-spacing: .14em; color: #a8987a;
  background: linear-gradient(180deg, #221d18, #110e0b);
}
.lang-switch a + a { border-left: 1px solid #6e5532; }
.nav .lang-switch a:hover { color: #f3d27a; }
.nav .lang-switch a.on { color: #241605; background: linear-gradient(180deg, #f2d68a, #b98a35); text-shadow: none; }
.nav .lang-switch a.on::after, .nav .lang-switch a::after { content: none; }

/* the logo never shrinks when the menu gets crowded (RO | EN added a plate) */
.topbar .brand { flex-shrink: 0; }
.topbar .brand img { width: 190px; height: auto; max-width: none; }
@media (max-width: 1280px) { .theme-medieval .nav a:not(.btn) { letter-spacing: .1em; } .theme-medieval .nav { gap: 14px; } }
.theme-medieval .nav a, .theme-medieval .nav .linkish { white-space: nowrap; }
.nav .lang-switch a { display: inline-block; min-width: 2.6em; text-align: center; padding: 6px 8px; line-height: 1; letter-spacing: .1em; }
.theme-medieval .nav .lang-switch a.on:not(.btn) { color: #241605; text-shadow: 0 1px 0 #ffe9a866; }
.theme-medieval .nav .lang-switch a:not(.on):not(.btn) { color: #b9a986; }

/* signed in (rubies, Admin, the account name, Ieșire): a tighter menu so everything stays on screen */
@media (max-width: 1600px) {
  .theme-medieval .topbar-in { gap: 14px; }
  .theme-medieval .nav { gap: 12px; }
  .theme-medieval .nav a:not(.btn) { letter-spacing: .08em; font-size: .74rem; }
  .theme-medieval .nav .btn { padding-left: 1.1em; padding-right: 1.1em; }
}
@media (max-width: 1500px) { .topbar .brand img { width: 150px; } }
.page-admin .wrap-form select { min-width: 13em; }
.page-admin .field.narrow { max-width: 9em; }
.page-admin .admin-actions { display: grid; gap: 0; }
.page-admin form.compact { display: flex; gap: 6px; align-items: end; flex-wrap: wrap; }
.page-admin form.compact .field { margin: 0; }

/* reveal on scroll: shorter and subtler (no blank areas when scrolling fast) */
.js .reveal { transform: translateY(12px); transition: opacity .5s ease, transform .5s cubic-bezier(.2, .7, .2, 1); }
.js .reveal-stagger > * { transform: translateY(10px); transition: opacity .45s ease, transform .45s ease; }

/* W27: the heading ornament drawn 1:1 (tools/web_ornaments_w27.py) and shown at exactly that size: sharp at any zoom */
.theme-medieval :is(.section > h2, .section-head h2, .band-in h2, .page-hero h1, .sheet h1, section.prose.narrow h1, .cta-final h2)::after,
.theme-medieval .page-hero h1::after {
  width: 300px; height: 32px; margin-top: 12px; background: url("../img/orn/flourish.svg") 0 50% / 300px 32px no-repeat;
}
.theme-medieval .panel > h2::after, .theme-medieval :is(.sheet, section.prose.narrow) h2::after {
  width: 220px; height: 24px; margin-top: 8px; background: url("../img/orn/flourish-sm.svg") 0 50% / 220px 24px no-repeat;
}
.theme-medieval :is(.center h2, .cta-final h2, .center h1, .showcase-head h2)::after { margin-left: auto; margin-right: auto; background-position: 50% 50%; }
@media (max-width: 420px) {
  .theme-medieval :is(.section > h2, .section-head h2, .band-in h2, .page-hero h1, .sheet h1, section.prose.narrow h1, .cta-final h2)::after {
    width: 220px; height: 24px; background-image: url("../img/orn/flourish-sm.svg"); background-size: 220px 24px;
  }
}

/* ======== W27: the sign-in / sign-up card reframed (creator: "chenarul din exterior e urât, fă-i un redesign frumos") ========
   No more steel game frame: a double gold filet (border + an inner line 9 px in), 1:1 corner pieces that continue both lines
   (tools/web_auth_frame.py), a crest plaque riding the top edge, a velvet title band with gold edges. */
.theme-medieval .auth-card {
  border: 1px solid #c9a14a; border-image: none; border-radius: 0; outline: 1px solid #c9a14abf; outline-offset: -10px;
  padding: 40px 38px 32px; max-width: 500px;
  background: radial-gradient(ellipse 90% 55% at 50% 0%, #c9a14a1c, transparent 70%),
              linear-gradient(180deg, #00000066, #000000a6), url("../img/tex/planks.webp") 0 0 / 1000px;
  background-clip: padding-box;
  box-shadow: 0 0 0 1px #000, 0 0 0 6px #0b0907, 0 0 0 7px #c9a14a40, 0 44px 90px #000e, 0 0 140px #8e1f2426;
}
.theme-medieval .auth-card::after {
  content: ""; position: absolute; inset: -5px; pointer-events: none; z-index: 2;
  background: url("../img/orn/frame-c-tl.svg") 0 0 / 80px 80px no-repeat, url("../img/orn/frame-c-tr.svg") 100% 0 / 80px 80px no-repeat,
              url("../img/orn/frame-c-bl.svg") 0 100% / 80px 80px no-repeat, url("../img/orn/frame-c-br.svg") 100% 100% / 80px 80px no-repeat;
}
.theme-medieval .auth-card::before {
  content: ""; position: absolute; left: 50%; top: -19px; width: 150px; height: 36px; margin-left: -75px; z-index: 3; pointer-events: none;
  background: url("../img/orn/frame-crest.svg") 0 0 / 150px 36px no-repeat;
}
.theme-medieval .auth-card h1 {
  margin: 20px -38px 6px; padding: 15px 40px 13px; border: 0; border-image: none; position: relative;
  background: linear-gradient(180deg, #84202b 0%, #5e111b 48%, #3c0a11 100%);
  box-shadow: inset 0 1px 0 #ffa3ab33, inset 0 -1px 0 #00000080, 0 -1px 0 #d9b25c, 0 1px 0 #d9b25c, 0 -3px 0 #120b07, 0 3px 0 #120b07,
              0 -4px 0 #c9a14a66, 0 4px 0 #c9a14a66, 0 10px 18px #000b;
}
.theme-medieval .auth-card h1::before, .theme-medieval .auth-card h1::after {
  content: ""; position: absolute; top: 50%; width: 11px; height: 11px; margin-top: -5.5px; transform: rotate(45deg);
  background: linear-gradient(135deg, #fff1c4, #c9a14a 55%, #7a5216); box-shadow: 0 0 0 1px #3a2408, 0 2px 4px #000;
}
.theme-medieval .auth-card h1::before { left: 16px; }
.theme-medieval .auth-card h1::after { right: 16px; }
@media (max-width: 520px) {
  .theme-medieval .auth-card { padding: 36px 20px 26px; }
  .theme-medieval .auth-card h1 { margin-left: -20px; margin-right: -20px; font-size: 1.35rem; }
}

/* W27: the section divider drawn 1:1 (640 x 80, tools/web_divider_w27.py), shown at exactly that size */
.theme-medieval .divider::before { width: 640px; max-width: 100%; height: 80px; background: url("../img/orn/divider.svg") 50% 50% / 640px 80px no-repeat; filter: none; }
@media (max-width: 680px) { .theme-medieval .divider::before { background-size: 480px 60px; height: 60px; } }

/* W27: /lumea - the kingdoms in the same fine gold frame as the rest of the site; centred banners on a phone */
.theme-medieval .kingdom {
  border: 1px solid #b98a35; border-radius: 0; outline: 1px solid #c9a14a66; outline-offset: -7px;
  box-shadow: 0 0 0 1px #000, inset 0 -40px 60px -30px #000c, 0 16px 32px #000b;
}
.theme-medieval .kingdom::after {
  content: ""; position: absolute; inset: -7px; pointer-events: none; z-index: 1; background: var(--fine-corners);
}
@media (max-width: 720px) {
  .theme-medieval .kingdom { padding: 112px 24px 26px; text-align: center; }
  .theme-medieval .kingdom-banner { left: 50%; margin-left: -26px; }
  /* the scroll stays inside the screen: shorter rods, the illuminated margin narrower and clear of the text */
  .theme-medieval :is(section.prose.narrow, .sheet) { margin-left: 14px; margin-right: 14px; width: auto; max-width: calc(100% - 28px); box-sizing: border-box; }
  .theme-medieval :is(section.prose.narrow, .sheet)::before, .theme-medieval :is(section.prose.narrow, .sheet)::after {
    left: -10px; right: -10px; height: 26px;
    background-size: auto 100%, auto 100%, calc(100% - 64px) 60%;
  }
  .theme-medieval.theme-piatra section.sheet.manuscript.prose { padding-left: 52px; background-position: 4px 0, 0 0, 0 0; background-size: 34px 154px, auto, 768px; }
}

/* the first hero picture comes from data-bg (site.js) with the same versioned address as the <link rel=preload>;
   the old url() here made the browser fetch the same 1920 px picture a second time */
.hero-slide:first-child { background-image: none; }

/* ======== W28: the parchment pages (News, World, rules ...) as a real scroll: a rolled sheet with its spiral ends on turned wooden
   handles (tools/web_scroll_roll.py, drawn 1:1 for a 44 px band), top and bottom ======== */
.theme-medieval :is(section.prose.narrow, .sheet)::before, .theme-medieval :is(section.prose.narrow, .sheet)::after {
  left: -44px; right: -44px; height: 44px; border-radius: 0; box-shadow: none;
  background: url("../img/orn/scroll-end-l.svg") 0 0 / 72px 44px no-repeat, url("../img/orn/scroll-end-r.svg") 100% 0 / 72px 44px no-repeat,
              url("../img/orn/scroll-roll.svg") 50% 0 / calc(100% - 140px) 44px no-repeat;
  filter: drop-shadow(0 6px 6px #000000b3);
}
.theme-medieval :is(section.prose.narrow, .sheet)::before { top: -30px; }
.theme-medieval :is(section.prose.narrow, .sheet)::after { bottom: -30px; transform: none; }
.theme-medieval :is(section.prose.narrow, .sheet) { margin-top: 74px; margin-bottom: 86px; padding-top: 62px; padding-bottom: 66px; }
@media (max-width: 720px) {
  .theme-medieval :is(section.prose.narrow, .sheet)::before, .theme-medieval :is(section.prose.narrow, .sheet)::after {
    left: -12px; right: -12px; height: 36px; background-size: 59px 36px, 59px 36px, calc(100% - 114px) 36px;
  }
  .theme-medieval :is(section.prose.narrow, .sheet)::before { top: -24px; }
  .theme-medieval :is(section.prose.narrow, .sheet)::after { bottom: -24px; }
}

/* ======== W29: the scroll's rolls rendered in Blender (tools/blender/web_scroll.py + tools/web_scroll_pieces.py, 3x):
   a telescoped roll of the site's parchment on a turned wooden rod with gilt knobs - two ends + a middle that tiles ======== */
.theme-medieval :is(section.prose.narrow, .sheet)::before, .theme-medieval :is(section.prose.narrow, .sheet)::after {
  left: -50px; right: -50px; height: 58px; filter: drop-shadow(0 7px 7px #000000a6); transform: none;
  /* the ends sit on the padding (110.67 px each side), the middle tiles only between them */
  padding: 0 78px;
  background: url("../img/orn/scroll-end-l.webp") 0 0 / 78px 58px no-repeat padding-box border-box,
              url("../img/orn/scroll-end-r.webp") 100% 0 / 78px 58px no-repeat padding-box border-box,
              url("../img/orn/scroll-mid.webp") 50% 0 / 1200px 58px no-repeat content-box content-box;
}
.theme-medieval :is(section.prose.narrow, .sheet)::before { top: -36px; }
.theme-medieval :is(section.prose.narrow, .sheet)::after { bottom: -36px; }
@media (max-width: 720px) {
  .theme-medieval :is(section.prose.narrow, .sheet)::before, .theme-medieval :is(section.prose.narrow, .sheet)::after {
    left: -14px; right: -14px; height: 42px; padding: 0 56.48px;
    background-size: 56.48px 42px, 56.48px 42px, 868.97px 42px;
  }
  .theme-medieval :is(section.prose.narrow, .sheet)::before { top: -26px; }
  .theme-medieval :is(section.prose.narrow, .sheet)::after { bottom: -26px; }
}
