/* Shadowfall site - W17 (creator 2026-10-12: "conturul textbox-ului: ceva fin cu colțuri fantasy medievale; lemnul de jos:
   o singură bucată de lemn vechi, la scară mare"). A thin double gold line (border at the edge + an outline 6 px inside)
   whose corners are small fantasy pieces that CONTINUE the two lines (img/orn/fine-*.svg, drawn 1:1 to match), and one
   large old plank (img/tex/oldwood.jpg, tools/web_oldwood.py) wherever the site showed tiled wood. Loaded last. */
.theme-medieval {
  --fine-corners: url("../img/orn/fine-tl.svg") 0 0 / 64px no-repeat, url("../img/orn/fine-tr.svg") 100% 0 / 64px no-repeat,
                  url("../img/orn/fine-bl.svg") 0 100% / 64px no-repeat, url("../img/orn/fine-br.svg") 100% 100% / 64px no-repeat;
}
.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: 1px solid #b98a35; border-image: none; border-radius: 0;
  outline: 1px solid #c9a14a66; outline-offset: -7px;
  box-shadow: 0 0 0 1px #000, inset 0 0 40px #0009, 0 16px 32px #000b;
  position: relative;
}
.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)::after {
  content: ""; position: absolute; inset: -7px; pointer-events: none; z-index: 1; background: var(--fine-corners);
  filter: none; opacity: 1;
}
.theme-medieval .chapter.sealed::after { opacity: .45; filter: grayscale(.8); }
.theme-medieval .package.best { border-color: #e9c66f; box-shadow: 0 0 0 1px #000, 0 0 30px #c9a14a40, 0 16px 32px #000b; }

/* room for the corners */
.theme-medieval .feature { padding: 46px 30px 30px; }
.theme-medieval .feature .ico { top: -40px; }
.theme-medieval .class-card { padding: 58px 40px 36px; }
.theme-medieval .class-card .class-ico:not(.ghost) { top: -48px; }
.theme-medieval .chapter { padding: 30px 26px 26px; }
.theme-medieval .panel { padding: 32px 34px 32px; }
.theme-medieval .dl-card { padding: 30px 34px; }
.theme-medieval .kingdom-card { padding: 0 34px 32px; }
.theme-medieval .kingdom-card .banner-pole { margin-top: -8px; }
.theme-medieval .kingdom-card .banner { margin-top: -6px; }
.theme-medieval :is(.shop-card, .package) { padding: 30px 22px 24px; }
.theme-medieval .stat { padding: 24px 26px; }
.theme-medieval .step { padding: 40px 24px 26px; }
.theme-medieval .step span { margin-top: -74px; }
.theme-medieval .table-wrap { padding: 18px; }
/* a table inside a panel (the admin pages): materials.css takes its padding away, the filigree corners stayed on top of the
   first header letter ("ZIUA" read "UA", 2026-10-17) - the padding back, the corners sit in it */
.theme-medieval.theme-piatra .panel .table-wrap { padding: 18px; }

/* ---- one large old plank instead of tiled wood ---- */
.theme-piatra .band {
  background: linear-gradient(180deg, #000000a6, #00000040 20% 80%, #000000a6), url("../img/tex/oldwood.webp") center / cover no-repeat;
}
.theme-piatra .news-grid.board {
  background: radial-gradient(ellipse at 50% 50%, #00000000 40%, #00000066 100%), url("../img/tex/oldwood.webp") center / cover no-repeat;
  background-clip: padding-box;
}
.theme-piatra .topbar { background: linear-gradient(180deg, #00000066, #000000a0), url("../img/tex/oldwood.webp") center 30% / cover no-repeat; }
.theme-piatra .auth-card, .theme-piatra .table-wrap {
  background: linear-gradient(180deg, #00000080, #000000b0), url("../img/tex/oldwood.webp") center / cover no-repeat; background-clip: padding-box;
}

@media (max-width: 620px) {
  .theme-medieval .feature, .theme-medieval .panel, .theme-medieval .chapter { padding-left: 24px; padding-right: 24px; }
  .theme-medieval .class-card { padding: 56px 26px 32px; }
}

/* W18: the menu bar no longer uses wood (the text and the logo must read): deep near-black with a faint warm sheen,
   a fine gold line and the riveted iron strip below */
.theme-piatra .topbar, .theme-medieval .topbar {
  background: linear-gradient(180deg, #1b1714 0%, #0e0c0a 55%, #0a0908 100%);
  box-shadow: inset 0 -1px 0 #c9a14a55, 0 8px 22px #000d;
}
.theme-medieval .topbar::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 140% at 50% 0%, #c9a14a14, transparent 70%);
}
.theme-medieval .topbar-in { position: relative; }
.theme-medieval .nav a:not(.btn) { color: #efe3c6; text-shadow: none; }
.theme-medieval .nav a:not(.btn):hover, .theme-medieval .nav a.on:not(.btn) { color: #f3d27a; }
.theme-medieval .brand img { filter: drop-shadow(0 1px 0 #000) drop-shadow(0 0 10px #c9a14a33); }
