/* Shadowfall site - W14 (creator 2026-10-12: "unele colțuri par fără sens; îmbunătățim tot designul medieval fantasy").
   One frame for every card (img/orn/frame.svg: a bronze band, a gold inlay, gold bosses with rubies at the corners -
   the corners ARE the frame now, no second set inside), icons set in gold medallions that sit on the frame's top edge,
   torchlight flickering at the page's edges. Loaded last, medieval / stone themes. */

/* ---- the frame ---- */
.theme-medieval :is(.feature, .class-card, .panel, .dl-card, .place, .chapter, .kingdom-card, .shop-card, .package, .step,
                    .news-grid.board, .table-wrap, .item-detail, .stat) {
  border: 30px solid transparent; border-image: url("../img/orn/frame.svg") 32 / 30px stretch; border-radius: 0;
  background-clip: padding-box; box-shadow: 0 14px 30px #000b;
}
.theme-medieval :is(.shop-card, .step, .stat, .package) { border-width: 24px; border-image-width: 24px; }
/* the inner filigree corners are gone (they doubled the frame); the stage (hero) and the login card keep theirs */
.theme-medieval :is(.feature, .class-card, .panel, .chapter, .chapter.open, .chapter.sealed, .kingdom-card, .dl-card, .package,
                    .table-wrap, .step, .shop-card)::after { content: none; }
.theme-piatra .step { background: linear-gradient(180deg, #ffffff0a, #0000006e), url("../img/tex/iron_soft.webp") 0 0 / 256px; background-clip: padding-box; }
.theme-medieval .package.best { border-image-source: url("../img/orn/frame.svg"); box-shadow: 0 0 34px #c9a14a33, 0 14px 30px #000b; }

/* padding inside the frame (the frame itself is now the margin) */
.theme-medieval .feature { padding: 26px 22px 24px; }
.theme-medieval .class-card { padding: 30px 30px 28px; }
.theme-medieval .chapter { padding: 22px 18px 20px; }
.theme-medieval .panel { padding: 22px 24px 24px; }
.theme-medieval .dl-card { padding: 22px 26px; }
.theme-medieval .kingdom-card { padding: 0 26px 26px; }
.theme-medieval .package { padding: 26px 20px 20px; }
.theme-medieval .step { padding: 26px 16px 16px; }

/* ---- icons in gold medallions sitting on the top edge of the frame ---- */
.theme-medieval .feature { text-align: center; padding-top: 44px; }
.theme-medieval .feature .ico {
  position: absolute; left: 50%; top: -58px; width: 76px; height: 76px; margin: 0 0 0 -38px; padding: 19px; box-sizing: border-box;
  background: url("../img/orn/medallion.svg") center / contain no-repeat; z-index: 2;
}
.theme-medieval .features { row-gap: 64px; margin-top: 70px; }
.theme-medieval .class-card .class-ico:not(.ghost) {
  width: 92px; height: 92px; padding: 24px; box-sizing: border-box; margin: -66px 0 6px -8px; display: block;
  background: url("../img/orn/medallion.svg") center / contain no-repeat;
}
.theme-medieval .classes { row-gap: 70px; margin-top: 40px; }
.theme-medieval .class-chips li { padding-top: 16px; }
.theme-medieval .class-chips svg { width: 58px; height: 58px; padding: 15px; box-sizing: border-box; background: url("../img/orn/medallion.svg") center / contain no-repeat; }
.theme-medieval .shop-icon { border: 0; box-shadow: none; width: 96px; height: 96px; background: url("../img/orn/medallion.svg") center / contain no-repeat; }
.theme-medieval .shop-icon img { width: 52px; height: 52px; filter: drop-shadow(0 2px 3px #000); }
.theme-medieval .item-figure { border: 0; background: url("../img/orn/medallion.svg") center / contain no-repeat; }
.theme-medieval .item-figure img { width: 92px; height: 92px; }

/* chapters: the numeral on a small gold plate */
.theme-medieval .chapter .num {
  display: inline-block; padding: .25em .8em; margin-bottom: .4em; color: #2a1704; font-size: .7rem;
  background: linear-gradient(180deg, #f6dc98, #c99a44 50%, #9a6c26); box-shadow: inset 0 1px 0 #fff4, 0 2px 4px #000a;
}
.theme-medieval .chapter.sealed .num { filter: grayscale(.7) brightness(.7); }

/* ---- torchlight at the page's edges (fixed, flickering, very soft) ---- */
body.theme-medieval::before, body.theme-medieval::after {
  content: ""; position: fixed; top: 0; bottom: 0; width: 34vw; pointer-events: none; z-index: 0; mix-blend-mode: screen;
  animation: torch 4.5s ease-in-out infinite;
}
body.theme-medieval::before { left: 0; background: radial-gradient(ellipse 60% 45% at 0% 55%, #ff8a2a1f, transparent 70%); }
body.theme-medieval::after { right: 0; background: radial-gradient(ellipse 60% 45% at 100% 45%, #ff8a2a1a, transparent 70%); animation-delay: -2.1s; }
@keyframes torch { 0%, 100% { opacity: .85; } 18% { opacity: .6; } 33% { opacity: 1; } 52% { opacity: .7; } 70% { opacity: .95; } 86% { opacity: .65; } }
.theme-medieval main, .theme-medieval .footer { position: relative; z-index: 1; }

@media (max-width: 620px) {
  .theme-medieval :is(.feature, .class-card, .panel, .dl-card, .chapter, .kingdom-card) { border-width: 22px; border-image-width: 22px; }
  .theme-medieval .features { row-gap: 60px; }
}
@media (prefers-reduced-motion: reduce) { body.theme-medieval::before, body.theme-medieval::after { animation: none; } }

/* classes page: the medallion sits on the frame like the home cards (the card no longer clips; the faint emblem stays inside) */
.theme-medieval .class-card { overflow: visible; padding-top: 52px; }
.theme-medieval .class-card .class-ico:not(.ghost) {
  position: absolute; left: 50%; top: -66px; margin: 0 0 0 -46px; z-index: 2;
}
.theme-medieval .class-card .class-ico.ghost { right: 8px; bottom: 8px; width: 150px; height: 150px; }
.theme-medieval .class-card h2, .theme-medieval .class-card .class-role { text-align: center; }
.theme-medieval .class-card p { text-align: center; }
.theme-medieval .class-card .tags { justify-content: center; }
.theme-medieval .classes { row-gap: 84px; margin-top: 64px; }

/* W16 (creator: "colțurile nu-mi plac la textbox-uri"): the frame keeps its bronze band and gold inlay, without the
   corner bosses - clean mitred corners */
.theme-medieval :is(.feature, .class-card, .panel, .dl-card, .place, .chapter, .kingdom-card, .shop-card, .package, .step,
                    .news-grid.board, .table-wrap, .item-detail, .stat) {
  border-image-source: url("../img/orn/frame-plain.svg");
}
.theme-medieval .package.best { border-image-source: url("../img/orn/frame-plain.svg"); }

/* W16b: a continuous frame drawn by CSS (no corner pieces at all): outer gold line, a bronze band, an inner gold filet */
.theme-medieval :is(.feature, .class-card, .panel, .dl-card, .place, .chapter, .kingdom-card, .shop-card, .package, .step,
                    .news-grid.board, .table-wrap, .item-detail, .stat, .package.best) {
  border: 7px solid #2a2016;
  border-image: linear-gradient(160deg, #6a5338 0%, #2a2016 30%, #4a3a28 55%, #1c150e 80%, #3a2d1f 100%) 1;
  outline: 1px solid #b98a35; outline-offset: 0;
  box-shadow: inset 0 0 0 1px #c9a14a99, inset 0 0 0 2px #00000099, 0 0 0 2px #000, 0 14px 30px #000b;
}
.theme-medieval .package.best { outline-color: #e9c66f; box-shadow: inset 0 0 0 1px #e9c66f, inset 0 0 0 2px #000, 0 0 0 2px #000, 0 0 30px #c9a14a33, 0 14px 30px #000b; }
.theme-medieval .feature { padding: 46px 28px 30px; }
.theme-medieval .feature .ico { top: -44px; }
.theme-medieval .class-card { padding: 58px 36px 34px; }
.theme-medieval .class-card .class-ico:not(.ghost) { top: -52px; }
.theme-medieval .chapter { padding: 26px 22px 24px; }
.theme-medieval .panel { padding: 28px 30px 30px; }
.theme-medieval .kingdom-card { padding: 0 30px 30px; }
.theme-medieval .kingdom-card .banner-pole { margin-top: -12px; }
.theme-medieval .kingdom-card .banner { margin-top: -6px; }
.theme-medieval :is(.shop-card, .step, .stat, .package) { padding: 22px 16px 18px; }
.theme-medieval .step { padding-top: 32px; }
.theme-medieval .step span { margin-top: -66px; }

/* W16c (creator: "ramele sunt prea simple, nu au stil medieval"): a riveted iron strap with a row of gold beads,
   repeated along every side (no corner pieces, as asked) */
.theme-medieval :is(.feature, .class-card, .panel, .dl-card, .place, .chapter, .kingdom-card, .shop-card, .package, .step,
                    .news-grid.board, .table-wrap, .item-detail, .stat, .package.best) {
  border: 24px solid #1f1913; border-image: url("../img/orn/frame-band.svg") 32 / 24px round;
  outline: 0; box-shadow: 0 0 0 1px #000, 0 16px 32px #000c;
}
.theme-medieval :is(.shop-card, .step, .stat, .package) { border-width: 20px; border-image-width: 20px; }
.theme-medieval .package.best { box-shadow: 0 0 0 1px #000, 0 0 34px #c9a14a40, 0 16px 32px #000c; }
.theme-medieval .feature { padding: 36px 20px 20px; }
.theme-medieval .feature .ico { top: -62px; }
.theme-medieval .class-card { padding: 46px 26px 24px; }
.theme-medieval .class-card .class-ico:not(.ghost) { top: -70px; }
.theme-medieval .chapter { padding: 16px 14px 14px; }
.theme-medieval .panel { padding: 18px 20px 20px; }
.theme-medieval .kingdom-card { padding: 0 20px 20px; }
.theme-medieval .kingdom-card .banner-pole { margin-top: -30px; }
.theme-medieval :is(.shop-card, .step, .stat, .package) { padding: 14px 10px 12px; }
.theme-medieval .step { padding-top: 26px; }
.theme-medieval .step span { margin-top: -74px; }
