/* Shadowfall site - W12 (creator 2026-10-12: "insistă pe detalii, pe rame, pe stilul modern medieval, e prea sec").
   The site's own ornaments (img/orn/*.svg, drawn for the site): filigree corners on every framed card, a flourish
   under section headings, a shield divider, a fleur-de-lis damask over the wall, laurels around the hero numbers,
   a crest watermark on page heroes and in the footer. Loaded last, for the medieval / stone themes. */
:root {
  --orn-corners: url("../img/orn/corner-tl.svg") 0 0 / 46px no-repeat, url("../img/orn/corner-tr.svg") 100% 0 / 46px no-repeat,
                 url("../img/orn/corner-bl.svg") 0 100% / 46px no-repeat, url("../img/orn/corner-br.svg") 100% 100% / 46px no-repeat;
}

/* ---- filigree corners on the framed cards (an overlay; the card keeps its own background) ---- */
.theme-medieval :is(.feature, .class-card, .panel, .chapter, .kingdom-card, .dl-card, .package, .place, .shop-card, .step, .table-wrap) {
  position: relative;
}
.theme-medieval :is(.feature, .class-card, .panel, .chapter.open, .kingdom-card, .dl-card, .package, .table-wrap)::after {
  content: ""; position: absolute; inset: 3px; pointer-events: none; z-index: 1;
  background: var(--orn-corners); opacity: .85; transition: opacity .3s, inset .3s;
}
.theme-medieval :is(.feature, .class-card, .chapter.open, .package, .kingdom-card):hover::after { opacity: 1; inset: 0; }
.theme-medieval .chapter.sealed::after {
  content: ""; position: absolute; inset: 3px; pointer-events: none; background: var(--orn-corners); opacity: .3; filter: grayscale(1);
}
.theme-medieval :is(.step, .shop-card)::after {
  content: ""; position: absolute; inset: 2px; pointer-events: none;
  background: url("../img/orn/corner-tl.svg") 0 0 / 30px no-repeat, url("../img/orn/corner-tr.svg") 100% 0 / 30px no-repeat,
              url("../img/orn/corner-bl.svg") 0 100% / 30px no-repeat, url("../img/orn/corner-br.svg") 100% 100% / 30px no-repeat;
  opacity: .8;
}
.theme-medieval .package.best::after { opacity: 1; filter: drop-shadow(0 0 6px #c9a14a66); }
/* the riveted iron plaques had their own corner rivets: the filigree replaces them */
.theme-piatra .step { background-size: 0 0, 0 0, 0 0, 0 0, auto, 256px; }

/* ---- a flourish under section headings ---- */
.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 {
  content: ""; display: block; width: 220px; height: 18px; margin-top: 12px;
  background: url("../img/orn/flourish.svg") 0 50% / contain no-repeat;
}
.theme-medieval .panel > h2::after { width: 160px; height: 13px; margin-top: 8px; }
.theme-medieval :is(.center h2, .cta-final h2, .center h1)::after { margin-left: auto; margin-right: auto; }
.theme-medieval .page-hero h1::after { width: 260px; height: 21px; }

/* ---- the divider between sections: a shield with crossed swords ---- */
.divider svg { display: none; }
.divider span { display: none; }
.divider { padding: 26px 16px; }
.divider::before { content: ""; display: block; width: min(560px, 92vw); height: 68px; margin: 0 auto;
  background: url("../img/orn/divider.svg") center / contain no-repeat; filter: drop-shadow(0 2px 6px #000); }

/* ---- fleur-de-lis damask over the wall, and a vignette ---- */
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%),
    var(--t-stone) 0 0 / 420px;
  background-attachment: scroll, fixed, fixed;
}
body.theme-medieval:not(.theme-piatra) { background: url("../img/orn/damask.svg") 0 0 / 120px, var(--bg); }

/* ---- hero: big corner ornaments framing the stage, laurels around the numbers ---- */
.theme-medieval .hero::after {
  content: ""; position: absolute; inset: 22px 22px 70px; pointer-events: none; z-index: 1; opacity: .75;
  background: url("../img/orn/corner-tl.svg") 0 0 / 96px no-repeat, url("../img/orn/corner-tr.svg") 100% 0 / 96px no-repeat,
              url("../img/orn/corner-bl.svg") 0 100% / 96px no-repeat, url("../img/orn/corner-br.svg") 100% 100% / 96px no-repeat;
}
.theme-medieval .hero-stats { position: relative; overflow: visible; }
.theme-medieval .hero-stats::before, .theme-medieval .hero-stats::after {
  content: ""; position: absolute; top: 50%; width: 62px; height: 46px; margin-top: -23px; pointer-events: none;
  background: url("../img/orn/laurel.svg") center / contain no-repeat;
}
.theme-medieval .hero-stats::before { left: -70px; }
.theme-medieval .hero-stats::after { right: -70px; transform: scaleX(-1); }

/* ---- page heroes: a faint crest on the right ---- */
.theme-medieval .page-hero .wrap::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 200px; height: 208px; margin-top: -104px; pointer-events: none;
  background: url("../img/orn/crest.svg") center / contain no-repeat; opacity: .14;
}
.theme-medieval .page-hero .wrap { min-height: 160px; }

/* ---- the kicker: a small gem on each side instead of the plain star ---- */
.theme-medieval .kicker::before, .theme-medieval .kicker::after {
  content: ""; display: inline-block; width: 8px; height: 8px; margin: 0 .9em 0 0; vertical-align: .1em;
  background: var(--blood); border: 1px solid var(--gold2); transform: rotate(45deg);
}
.theme-medieval .kicker::after { margin: 0 0 0 .9em; }
.theme-medieval :is(.sheet, section.prose.narrow) .kicker::before, .theme-medieval :is(.sheet, section.prose.narrow) .kicker::after { border-color: #8a6d3f; }

/* ---- footer: crest, motto, an ornamental rule ---- */
.footer-crest { text-align: center; padding: 6px 16px 26px; }
.footer-crest img { width: 74px; height: 76px; margin: 0 auto 8px; filter: drop-shadow(0 4px 10px #000); }
.footer-crest p { margin: 0; font: italic 1.08rem var(--fell, Georgia, serif); color: #b8a682; }
.footer-crest::after { content: ""; display: block; width: min(420px, 80vw); height: 18px; margin: 18px auto 0;
  background: url("../img/orn/flourish.svg") center / contain no-repeat; opacity: .8; }
.theme-clasic .footer-crest { display: none; }

/* ---- tables: a filigree frame on the board, small gem before each row's first cell on hover ---- */
.theme-medieval .ranking tbody tr td:first-child { position: relative; }
.theme-medieval .ranking tbody tr:hover td:first-child::before {
  content: ""; position: absolute; left: 4px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px;
  background: var(--blood); border: 1px solid var(--gold2); transform: rotate(45deg);
}

/* ---- auth card: filigree corners over the game frame ---- */
.theme-medieval .auth-card::after {
  content: ""; position: absolute; inset: -14px; pointer-events: none;
  background: url("../img/orn/corner-tl.svg") 0 0 / 64px no-repeat, url("../img/orn/corner-tr.svg") 100% 0 / 64px no-repeat,
              url("../img/orn/corner-bl.svg") 0 100% / 64px no-repeat, url("../img/orn/corner-br.svg") 100% 100% / 64px no-repeat;
}

@media (max-width: 620px) {
  .theme-medieval .hero::after { inset: 10px 10px 40px; background-size: 56px, 56px, 56px, 56px; }
  .theme-medieval .hero-stats::before, .theme-medieval .hero-stats::after { display: none; }
  .theme-medieval .page-hero .wrap::after { width: 110px; height: 114px; margin-top: -57px; opacity: .1; }
}

/* the content keeps clear of the filigree corners */
:root { --orn-corners: url("../img/orn/corner-tl.svg") 0 0 / 40px no-repeat, url("../img/orn/corner-tr.svg") 100% 0 / 40px no-repeat,
                       url("../img/orn/corner-bl.svg") 0 100% / 40px no-repeat, url("../img/orn/corner-br.svg") 100% 100% / 40px no-repeat; }
.theme-medieval .feature { padding: 34px 34px 36px; }
.theme-medieval .class-card { padding: 42px 44px 44px; }
.theme-medieval .chapter { padding: 30px 28px 32px; }
.theme-medieval .panel { padding: 30px 32px 32px; }
.theme-medieval .dl-card { padding: 32px 36px; }
.theme-medieval .kingdom-card { padding: 0 40px 40px; }
.theme-medieval .package { padding: 34px 28px 28px; }
.theme-medieval .feature .ico { margin-left: 4px; }
.theme-medieval .class-card .class-ico:not(.ghost) { margin-left: 6px; }
@media (max-width: 620px) {
  .theme-medieval .feature, .theme-medieval .panel, .theme-medieval .chapter { padding: 30px 26px 30px; }
  .theme-medieval .class-card { padding: 36px 30px 38px; }
}
