/* Shadowfall site - "piatra" theme = medieval.css + real materials (W1d). CC0 textures from ambientCG in img/tex
   (LICENSE.txt there): stone wall, black stone, dark / warm wood, iron, rusted plates, hammered gold, parchment.
   Loaded after medieval.css; the body carries both .theme-piatra and .theme-medieval. */
:root {
  --t-stone: url("../img/tex/stone.webp");
  --t-black: url("../img/tex/blackstone.webp");
  --t-wood: url("../img/tex/wood.webp");
  --t-wood2: url("../img/tex/wood_warm.webp");
  --t-iron: url("../img/tex/iron.webp");
  --t-rust: url("../img/tex/iron_rust.webp");
  --t-gold: url("../img/tex/gold.webp");
  --t-parch: url("../img/tex/parchment.webp");
  /* an iron band with a rivet every 64 px (header / footer / band edges) */
  --band-rivets: radial-gradient(circle at 50% 50%, #c4a15e 0 1.4px, #6b5226 2.2px, #1a130a 3.2px, transparent 3.8px) 0 50% / 64px 100% repeat-x;
}

/* ---- the wall behind everything ---- */
body.theme-piatra {
  background:
    radial-gradient(ellipse 120% 70% at 50% 0%, #0c0b0a00 0%, #0c0b0acc 55%, #0c0b0af2 100%),
    var(--t-stone) 0 0 / 420px;
  background-attachment: fixed, fixed;
}

/* header: dark planks on an iron band */
.theme-piatra .topbar {
  background: linear-gradient(180deg, #00000055, #0000008a), var(--t-wood) 0 0 / 360px;
  border-bottom: 0; box-shadow: 0 6px 18px #000c;
}
.theme-piatra .topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 8px;
  background: var(--band-rivets), linear-gradient(180deg, #000 0 1px, transparent 1px), var(--t-iron) 0 0 / 256px;
  box-shadow: inset 0 1px 0 #ffffff1c, inset 0 -1px 0 #000, 0 3px 6px #000a;
}
.theme-piatra .nav a:not(.btn) { color: #e4d6b8; text-shadow: 0 1px 2px #000; }

/* section band (classes on the home page): warm wood between two iron bands */
.theme-piatra .band {
  position: relative; border: 0;
  background: linear-gradient(180deg, #0000008c, #00000059 30% 70%, #0000008c), var(--t-wood2) 0 0 / 420px;
  box-shadow: inset 0 14px 22px -10px #000, inset 0 -14px 22px -10px #000;
}
.theme-piatra .band::before, .theme-piatra .band::after {
  content: ""; position: absolute; left: 0; right: 0; height: 10px;
  background: var(--band-rivets), var(--t-iron) 0 0 / 256px; box-shadow: inset 0 1px 0 #ffffff1a, inset 0 -1px 0 #000;
}
.theme-piatra .band::before { top: 0; }
.theme-piatra .band::after { bottom: 0; }

/* footer: black stone */
.theme-piatra .footer { background: linear-gradient(180deg, #000000a0, #000000d0), var(--t-black) 0 0 / 380px; border-top: 0; position: relative; }
.theme-piatra .footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px;
  background: var(--band-rivets), var(--t-iron) 0 0 / 256px; box-shadow: inset 0 1px 0 #ffffff1a, 0 2px 6px #000;
}
.theme-piatra .cta-final { background: radial-gradient(ellipse at 50% 100%, #8e1f2440, transparent 70%); border-top: 0; }

/* ---- panels: the game frame stays, the surface becomes carved black stone ---- */
.theme-piatra .feature, .theme-piatra .class-card, .theme-piatra .panel, .theme-piatra .dl-card, .theme-piatra .faq details, .theme-piatra .place {
  background: linear-gradient(160deg, #ffffff0c, #00000066), var(--t-black) 0 0 / 300px; background-clip: padding-box;
}
.theme-piatra .feature h3, .theme-piatra .class-card h2 { text-shadow: 0 2px 0 #000, 0 0 12px #000; }
.theme-piatra .ico, .theme-piatra .class-ico { filter: drop-shadow(0 1px 0 #000) drop-shadow(0 0 6px #c9a14a55); }

/* home "classes" chips: small iron plaques with four rivets */
.theme-piatra .class-chips li {
  border: 1px solid #000; border-radius: 0; color: #f1e0b4; text-shadow: 0 1px 0 #000, 0 0 10px #000;
  background: var(--rivet) 6px 6px / 9px 9px no-repeat, var(--rivet) calc(100% - 6px) 6px / 9px 9px no-repeat,
              var(--rivet) 6px calc(100% - 6px) / 9px 9px no-repeat, var(--rivet) calc(100% - 6px) calc(100% - 6px) / 9px 9px no-repeat,
              linear-gradient(180deg, #ffffff14, #00000055), var(--t-iron) 0 0 / 256px;
  box-shadow: inset 0 1px 0 #ffffff26, inset 0 -2px 4px #000a, 0 4px 10px #000c;
}

/* ---- news = parchment notes nailed to a wooden board ---- */
.theme-piatra .news-grid.board {
  padding: 34px 28px 28px; gap: 26px;
  background: linear-gradient(180deg, #0000004d, #00000080), var(--t-wood2) 0 0 / 420px;
  border: 14px solid transparent; border-image: url("../img/ui/panel_plain.png") 40 / 20px;
  box-shadow: 0 20px 40px #000c;
}
.theme-piatra .news-grid.board .news-card {
  position: relative; border: 0; border-image: none; padding: 26px 22px 20px; color: var(--ink);
  background: linear-gradient(180deg, #00000000 70%, #4a2c1022), var(--t-parch) 0 0 / 300px;
  box-shadow: 0 10px 18px #000b, inset 0 0 26px #6b4a1e88;
  clip-path: polygon(0 2%, 4% 0, 40% 1.5%, 70% 0, 100% 1%, 99% 40%, 100% 75%, 98% 100%, 60% 98%, 25% 100%, 1% 98%, 0 60%);
  transform: rotate(-1.2deg);
}
.theme-piatra .news-grid.board .news-card:nth-child(2) { transform: rotate(.9deg) translateY(6px); }
.theme-piatra .news-grid.board .news-card:nth-child(3) { transform: rotate(-.4deg); }
.theme-piatra .news-grid.board .news-card::before {  /* the iron nail */
  content: ""; position: absolute; top: 8px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #d9d4c8 0 1.5px, #7a7468 3px, #2a2622 6px, #0f0d0b 7px);
  box-shadow: 0 2px 2px #0009;
}
.theme-piatra .news-grid.board .news-card time { color: var(--wax); font-family: var(--fell); font-style: italic; font-size: .98rem; }
.theme-piatra .news-grid.board .news-card h3 { color: #2b1a0c; text-shadow: none; font-size: 1.05rem; }
.theme-piatra .news-grid.board .news-card p { color: #3d2a16; font: 1.08rem/1.4 var(--fell); }

/* ---- hero numbers on an iron plaque ---- */
.theme-piatra .hero-stats {
  display: inline-flex; padding: 16px 34px; gap: 44px; position: relative;
  background: var(--rivet) 8px 8px / 9px 9px no-repeat, var(--rivet) calc(100% - 8px) 8px / 9px 9px no-repeat,
              var(--rivet) 8px calc(100% - 8px) / 9px 9px no-repeat, var(--rivet) calc(100% - 8px) calc(100% - 8px) / 9px 9px no-repeat,
              linear-gradient(180deg, #ffffff12, #00000080), var(--t-iron) 0 0 / 256px;
  border: 1px solid #000; box-shadow: inset 0 1px 0 #ffffff26, inset 0 -3px 6px #000, 0 10px 30px #000d;
}
.theme-piatra .hero-stats dd { text-shadow: 0 1px 0 #000, 0 0 16px #c9a14a66; }

/* ---- auth: the card interior is a dark wooden board ---- */
.theme-piatra .auth-card { background: linear-gradient(180deg, #00000040, #00000080), var(--t-wood) 0 0 / 360px; background-clip: padding-box; }
.theme-piatra .auth::before { background: radial-gradient(ellipse at center, #0c0b0a88, #0c0b0af0 75%); }

/* fields: real iron slot, real parchment */
.theme-piatra .control {
  background: linear-gradient(180deg, #ffffff10, #00000070), var(--t-iron) 0 0 / 256px;
  box-shadow: inset 0 1px 0 #ffffff22, inset 0 -1px 0 #000, 0 0 0 1px #000, 0 4px 10px #000c;
}
.theme-piatra .control input, .theme-piatra .control input:focus {
  background: radial-gradient(ellipse at 50% 50%, #00000000 50%, #5a3a1440 100%), var(--t-parch) 0 0 / 300px;
  background-blend-mode: normal;
}
.theme-piatra .field.is-valid .control { box-shadow: inset 0 1px 0 #ffffff22, 0 0 0 1px #4d6b37, 0 0 12px #4d6b3755; }
.theme-piatra .field.is-invalid .control { box-shadow: inset 0 1px 0 #ffffff22, 0 0 0 1px #a5363b, 0 0 14px #a5363b55; }
.theme-piatra .alert { background: linear-gradient(180deg, #00000000, #4a2c1022), var(--t-parch) 0 0 / 300px; }
.theme-piatra .field-label, .theme-piatra .checkbox, .theme-piatra .auth-sub, .theme-piatra .auth-foot { text-shadow: 0 1px 2px #000; }

/* rune stones are carved from the black stone */
.theme-piatra .strength-bar i { background: linear-gradient(160deg, #ffffff14, #00000088), var(--t-black) 0 0 / 120px; }
.theme-piatra .strength[data-level="1"] i:nth-child(-n+1) { background: linear-gradient(160deg, #ff3b3b33, #00000088), var(--t-black) 0 0 / 120px; }
.theme-piatra .strength[data-level="2"] i:nth-child(-n+2) { background: linear-gradient(160deg, #ff8a2a33, #00000088), var(--t-black) 0 0 / 120px; }
.theme-piatra .strength[data-level="3"] i:nth-child(-n+3) { background: linear-gradient(160deg, #ffc23a33, #00000088), var(--t-black) 0 0 / 120px; }
.theme-piatra .strength[data-level="4"] i { background: linear-gradient(160deg, #6dff4a33, #00000088), var(--t-black) 0 0 / 120px; }

/* unchecked seal spot = an iron ring */
.theme-piatra .checkbox .box { border: 2px solid #5b5248; background: radial-gradient(circle, #00000088 55%, transparent 56%), var(--t-iron) 0 0 / 128px; box-shadow: inset 0 1px 0 #ffffff22, 0 2px 4px #000c; }
.theme-piatra .checkbox:hover .box { border-color: var(--gold); }

/* ---- buttons: hammered gold; iron for the secondary ---- */
.theme-piatra .btn-gold { --frame: linear-gradient(180deg, #fff1c2, #a87a2a 45%, #4a3210); }
.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, #fff3c855 0%, #ffffff00 40%, #00000000 55%, #3a220855 100%),
              var(--t-gold) 0 0 / 220px;
}
.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, #5a3a1077 30px 31px, transparent 31px calc(100% - 31px), #5a3a1077 calc(100% - 31px) calc(100% - 30px), transparent calc(100% - 30px)),
              linear-gradient(180deg, #fff3c855 0%, #ffffff00 40%, #00000000 55%, #3a220855 100%),
              var(--t-gold) 0 0 / 220px;
}
.theme-piatra .nav .btn-gold::before { background: linear-gradient(180deg, #fff3c855 0%, #ffffff00 40%, #3a220855 100%), var(--t-gold) 0 0 / 220px; }
.theme-piatra .btn-gold { color: #2a1704; text-shadow: 0 1px 0 #ffe9b088, 0 -1px 0 #5a3a10; }
.theme-piatra .btn-ghost { background: var(--t-iron) 0 0 / 256px; background-clip: padding-box; }

/* select and ranking: iron and wood */
.theme-piatra select { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e0b860' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 4px center / 15px no-repeat, var(--t-iron) 0 0 / 256px; background-clip: padding-box; }
.theme-piatra .table-wrap {
  padding: 0 0 6px; background: linear-gradient(180deg, #00000066, #00000099), var(--t-wood) 0 0 / 360px;
  border: 14px solid transparent; border-image: url("../img/ui/panel_plain.png") 40 / 20px;
}
.theme-piatra .table td { border-bottom-color: #00000099; box-shadow: 0 1px 0 #ffffff0d; text-shadow: 0 1px 2px #000; }
.theme-piatra .ranking tbody tr:hover { background: #c9a14a14; }
.theme-piatra .kbar { border: 0; box-shadow: 0 0 0 1px #000, 0 0 0 4px #2a241c, 0 0 0 5px #000, 0 6px 14px #000a; border-radius: 0; }
.theme-piatra .kbar div { background: linear-gradient(180deg, #ffffff1a, #00000066), color-mix(in srgb, var(--k) 65%, black); text-shadow: 0 1px 0 #000; }

/* world page */
.theme-piatra .kingdom { background: linear-gradient(135deg, color-mix(in srgb, var(--k) 26%, transparent), #00000099 65%), var(--t-black) 0 0 / 300px; }
.theme-piatra blockquote { background: linear-gradient(180deg, #00000000, #4a2c1022), var(--t-parch) 0 0 / 300px; color: #3a2210; box-shadow: 0 10px 20px #000b, inset 0 0 30px #6b4a1e99; }
.theme-piatra blockquote b { color: #6d0f14; }
.theme-piatra .page-hero { border-bottom: 0; }
.theme-piatra .page-hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px;
  background: var(--band-rivets), var(--t-iron) 0 0 / 256px; box-shadow: inset 0 1px 0 #ffffff1a, 0 3px 6px #000a;
}
html:has(body.theme-piatra) { background: #0c0b0a; }
/* tables inside a panel: the panel is the frame already */
.theme-piatra .panel .table-wrap { border: 0; border-image: none; background: none; padding: 0; }
@media (max-width: 960px) {
  .theme-piatra.theme-piatra .nav.open { background: linear-gradient(180deg, #000000b0, #000000d8), var(--t-wood) 0 0 / 360px; }
}
