/* Shadowfall site (web/README.md). Dark fantasy: near-black stone, parchment text, worn gold; kingdom colours come
   from assets/data/kingdoms.json through the --k custom property. */
@font-face {
  font-family: "Cinzel";
  src: url("../fonts/Cinzel.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --bg: #0c0b0a;
  --bg2: #141210;
  --panel: #1a1714;
  --line: #2e2923;
  --text: #e6dcc8;
  --muted: #9a8f7c;
  --gold: #c9a14a;
  --gold2: #e8c977;
  --blood: #8e1f24;
  --ok: #4f8a4a;
  --radius: 6px;
  --serif: "Cinzel", "Trajan Pro", Georgia, serif;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: .02em; line-height: 1.2; margin: 0 0 .5em; color: #f1e6cd; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
code { font-family: Consolas, "Cascadia Mono", monospace; font-size: .9em; background: #0006; padding: .1em .35em; border-radius: 3px; }
pre code { display: block; padding: .8em 1em; overflow-x: auto; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.lead { font-size: 1.15rem; color: #d6ccb6; max-width: 62ch; }
.center .lead, .lead.center { margin-left: auto; margin-right: auto; }
.kicker { font-family: var(--serif); color: var(--gold); text-transform: uppercase; letter-spacing: .25em; font-size: .78rem; margin-bottom: .6em; }
.section { padding: 72px 16px; }
.inline { display: inline; margin: 0; }

/* buttons: bevelled frame (clip-path) = outer gradient "metal" + inner fill on ::before + light sweep on ::after */
.btn {
  --cut: 9px;
  --frame: linear-gradient(180deg, #f6dd9a, #9b7228 55%, #5e4316);
  --fill: linear-gradient(180deg, #1f1b16, #110f0d);
  --ink: var(--gold2);
  --bevel: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)),
                   calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
  position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: .65em;
  min-height: 46px; padding: 0 1.8em; border: 0; cursor: pointer; user-select: none;
  font: 600 .86rem/1 var(--serif); letter-spacing: .14em; text-transform: uppercase; color: var(--ink);
  background: var(--frame); clip-path: var(--bevel); text-decoration: none !important; white-space: nowrap;
  transition: transform .14s ease, filter .2s ease, color .2s ease;
}
.btn::before {
  content: ""; position: absolute; inset: 1.5px; z-index: -1; background: var(--fill);
  clip-path: polygon(calc(var(--cut) - .6px) 0, calc(100% - var(--cut) + .6px) 0, 100% calc(var(--cut) - .6px),
                     100% calc(100% - var(--cut) + .6px), calc(100% - var(--cut) + .6px) 100%, calc(var(--cut) - .6px) 100%,
                     0 calc(100% - var(--cut) + .6px), 0 calc(var(--cut) - .6px));
  box-shadow: inset 0 1px 0 #ffffff22, inset 0 -3px 6px #00000055;
}
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, #fff7d640 50%, transparent 65%);
  transform: translateX(-130%); transition: transform .7s ease;
}
.btn:hover { filter: brightness(1.12) saturate(1.05); transform: translateY(-1px); }
.btn:hover::after { transform: translateX(130%); }
.btn:active { transform: translateY(1px); filter: brightness(.9); }
.btn:focus-visible { outline: none; --frame: linear-gradient(180deg, #fff6d2, #f0cf7a); }
.btn-gold {
  --frame: linear-gradient(180deg, #fff1c2, #c08f3a 45%, #6b4a17);
  --fill: linear-gradient(180deg, #f0d083 0%, #d4a750 46%, #b98a35 54%, #8f6522 100%);
  --ink: #241605;
  text-shadow: 0 1px 0 #f8e2a680;
}
.btn-gold::before { box-shadow: inset 0 1px 0 #fff6d4cc, inset 0 -3px 5px #5b3d0f66; }
.btn-ghost:hover { --fill: linear-gradient(180deg, #2a2318, #16120d); color: #fbe3a4; }
.btn-lg { min-height: 54px; font-size: .95rem; padding: 0 2.2em; --cut: 11px; }
.btn-block { display: flex; width: 100%; }
.btn-ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.btn:hover .btn-ico { transform: translateX(3px); }
.btn .spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.btn.is-loading { pointer-events: none; filter: saturate(.7); }
.btn.is-loading .spinner { display: block; }
.btn.is-loading .btn-ico { display: none; }
.btn[disabled] { cursor: not-allowed; filter: grayscale(.7) brightness(.7); transform: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.linkish { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 0; }
.linkish:hover { color: var(--text); }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 50; background: #0c0b0ae6; backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand img { width: 170px; }
.nav { display: flex; align-items: center; gap: 22px; margin-left: auto; font-size: .95rem; }
.nav a { color: #cfc4ad; }
.nav a:hover, .nav a.on { color: var(--gold2); text-decoration: none; }
.nav .btn { min-height: 38px; padding: 0 1.2em; font-size: .74rem; --cut: 7px; }
.nav a.btn-gold, .nav a.btn-gold:hover { color: #241605; }
.nav a.btn-ghost { color: var(--gold2); }
.nav-sep { width: 1px; height: 22px; background: var(--line); }
.nav-toggle, .nav-burger { display: none; }

/* flashes */
.flashes { padding-top: 16px; }
.flash { padding: .8em 1em; border-radius: var(--radius); border: 1px solid; margin-bottom: 8px; background: var(--panel); }
.flash-ok { border-color: #4f8a4a; color: #cfe8c8; }
.flash-error { border-color: #a5363b; color: #f2c9c9; }

/* hero */
.hero { position: relative; min-height: min(92vh, 860px); display: flex; align-items: center; overflow: hidden; }
.hero-slides, .hero-slide, .hero-shade { position: absolute; inset: 0; }
.hero-slide { background: center / cover no-repeat; opacity: 0; transition: opacity 2s ease; transform: scale(1.06); }
.hero-slide.on { opacity: 1; animation: drift 14s ease-out forwards; }
.hero-slide:first-child { background-image: url("../img/01_oras_rotund_zi.webp"); }
@keyframes drift { from { transform: scale(1.12); } to { transform: scale(1.02); } }
.hero-shade { background: radial-gradient(ellipse at 50% 40%, #0c0b0a33 0%, #0c0b0acc 70%, #0c0b0a 100%), linear-gradient(180deg, #0c0b0a99 0%, transparent 30%, transparent 60%, var(--bg) 100%); }
.hero-in { position: relative; text-align: center; padding: 80px 16px; }
.hero-logo { width: min(640px, 92%); margin: 0 auto 18px; filter: drop-shadow(0 6px 30px #000); }
.hero-tag { font: 500 clamp(1.15rem, 2.4vw, 1.6rem)/1.4 var(--serif); color: #f3e7cb; text-shadow: 0 2px 12px #000; margin-bottom: .4em; }
.hero-sub { color: #d9cfba; max-width: 56ch; margin: 0 auto 2em; text-shadow: 0 2px 10px #000; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; justify-content: center; margin: 48px 0 0; flex-wrap: wrap; }
.hero-stats div { text-align: center; }
.hero-stats dt { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .15em; }
.hero-stats dd { margin: 0; font: 600 2rem var(--serif); color: var(--gold2); }

.page-hero { position: relative; padding: 110px 0 70px; background: center / cover no-repeat var(--bg2); border-bottom: 1px solid var(--line); }
.page-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #0c0b0af2 0%, #0c0b0ab3 55%, #0c0b0a66 100%), linear-gradient(0deg, var(--bg) 0%, transparent 40%); }
.page-hero .wrap { position: relative; }

/* features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
.feature { background: linear-gradient(180deg, var(--panel), var(--bg2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; transition: border-color .2s, transform .2s; }
.feature:hover { border-color: #c9a14a66; transform: translateY(-2px); }
.feature p { color: #c7bca6; margin: 0; }
.ico, .class-ico { width: 40px; height: 40px; fill: none; stroke: var(--gold); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 14px; }
.kname { color: color-mix(in srgb, var(--k) 70%, white); font-weight: 600; }

.band { background: linear-gradient(180deg, var(--bg2), #100e0c); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 64px 0; }
.band-in { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.class-chips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.class-chips li { font: 600 1.15rem var(--serif); text-align: center; padding: 26px 10px; border: 1px solid #c9a14a44; border-radius: var(--radius); background: radial-gradient(circle at 50% 0%, #c9a14a22, transparent 70%), var(--panel); color: #f1e6cd; }

.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 24px; }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.news-card { border: 1px solid var(--line); border-left: 3px solid var(--gold); background: var(--panel); padding: 22px; border-radius: var(--radius); }
.news-card time, .news-item time { color: var(--gold); font-size: .85rem; letter-spacing: .08em; }
.news-card p { color: #c7bca6; margin: 0; }
.news-item { border-bottom: 1px solid var(--line); padding: 28px 0; }
.news-item ul { color: #cfc4ad; }

.cta-final { text-align: center; padding: 90px 16px; background: radial-gradient(ellipse at 50% 100%, #8e1f2433, transparent 70%); border-top: 1px solid var(--line); }
.cta-final p { color: var(--muted); }

/* world */
.prose p, .prose li { color: #d3c9b3; }
.prose h2 { margin-top: 1.6em; }
blockquote { margin: 2em 0; padding: 1.2em 1.5em; border-left: 3px solid var(--gold); background: var(--panel); font: 1.1rem/1.6 var(--serif); color: #efe3c6; }
.kingdoms { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: 32px 0 20px; }
.kingdom { position: relative; padding: 34px 30px 30px 110px; border: 1px solid color-mix(in srgb, var(--k) 50%, transparent); border-radius: var(--radius); background: linear-gradient(135deg, color-mix(in srgb, var(--k) 22%, transparent), var(--panel) 60%); }
.kingdom h3 { font-size: 1.6rem; color: color-mix(in srgb, var(--k) 55%, white); }
.kingdom p { margin: 0; color: #d3c9b3; }
.kingdom-banner { position: absolute; left: 30px; top: 0; width: 52px; height: 92px; background: var(--k); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%); box-shadow: inset 0 -8px 0 #0004; }
.places { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 36px; }
.place { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.place img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.place figcaption { padding: 14px 16px; color: #c7bca6; font-size: .95rem; }

/* classes */
.classes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.class-card { padding: 34px; border: 1px solid var(--line); border-radius: var(--radius); background: radial-gradient(circle at 100% 0%, #c9a14a14, transparent 50%), var(--panel); }
.class-card h2 { margin-bottom: .2em; }
.class-ico { width: 54px; height: 54px; }
.class-role { color: var(--gold); font-size: .9rem; letter-spacing: .06em; margin-bottom: 1em; text-transform: uppercase; }
.class-card p { color: #d3c9b3; }
.tags { list-style: none; padding: 0; margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.tags li { font-size: .8rem; padding: .3em .8em; border: 1px solid #c9a14a55; border-radius: 99px; color: #e2d3ad; }

/* forms / auth */
.sprite { position: absolute; }
.auth { min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center; padding: 56px 16px; background: center / cover no-repeat var(--bg2); position: relative; }
.auth::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, #0c0b0a99, #0c0b0af5 75%); }
.auth-card {
  position: relative; width: 100%; max-width: 460px; padding: 30px 36px;
  background: radial-gradient(ellipse at 50% 0%, #c9a14a14, transparent 60%), linear-gradient(180deg, #1a1612f5, #110f0df5);
  border: 1px solid #c9a14a40; box-shadow: 0 0 0 6px #0c0b0ad0, 0 0 0 7px #c9a14a26, 0 40px 90px #000d;
  animation: rise .5s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.corner { position: absolute; width: 22px; height: 22px; border: 2px solid var(--gold); pointer-events: none; }
.corner.tl { top: -4px; left: -4px; border-right: 0; border-bottom: 0; }
.corner.tr { top: -4px; right: -4px; border-left: 0; border-bottom: 0; }
.corner.bl { bottom: -4px; left: -4px; border-right: 0; border-top: 0; }
.corner.br { bottom: -4px; right: -4px; border-left: 0; border-top: 0; }
.corner::after { content: ""; position: absolute; width: 6px; height: 6px; background: var(--gold); transform: rotate(45deg); }
.corner.tl::after { top: 4px; left: 4px; }
.corner.tr::after { top: 4px; right: 4px; }
.corner.bl::after { bottom: 4px; left: 4px; }
.corner.br::after { bottom: 4px; right: 4px; }
.auth-card h1 { font-size: 1.9rem; margin: 22px 0 .15em; text-align: center; }
.auth-sub { text-align: center; color: var(--muted); margin: 0; }
.auth-foot { text-align: center; color: var(--muted); font-size: .85rem; margin: 20px 0 0; }
.ornament { display: flex; align-items: center; gap: 10px; margin: 18px auto 20px; width: 70%; }
.ornament span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, #c9a14a99); }
.ornament span:last-child { background: linear-gradient(90deg, #c9a14a99, transparent); }
.ornament i { width: 9px; height: 9px; background: var(--blood); border: 1px solid var(--gold2); transform: rotate(45deg); box-shadow: 0 0 10px #8e1f2499; }

.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: #0a0908; border: 1px solid #2f2922; border-radius: 4px; box-shadow: inset 0 2px 6px #000a; }
.seg a { text-align: center; padding: .7em; font: 600 .78rem/1 var(--serif); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); border-radius: 3px; transition: color .2s, background .2s; text-decoration: none !important; }
.seg a:hover { color: var(--text); }
.seg a.on { color: #241605; background: linear-gradient(180deg, #e9c878, #b78a37); box-shadow: inset 0 1px 0 #fff4, 0 2px 6px #0008; }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: .8em 1em; margin-bottom: 14px; font-size: .92rem; border: 1px solid; border-left-width: 3px; background: #0c0b0a; animation: rise .3s ease both; }
.alert svg { flex: none; width: 18px; height: 18px; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.alert-error { border-color: #a5363b; color: #f2c9c9; background: linear-gradient(90deg, #3a1214aa, #0c0b0a); }
.alert-ok { border-color: #4f8a4a; color: #d0ebc9; background: linear-gradient(90deg, #17301599, #0c0b0a); }

.form { display: grid; gap: 18px; margin-top: 6px; }
.field { display: grid; gap: 7px; }
.field-label { font: 600 .74rem/1 var(--serif); letter-spacing: .16em; text-transform: uppercase; color: #c9b88f; }
.control { position: relative; }
.control input, select {
  width: 100%; height: 50px; padding: 0 46px; font: 1rem var(--sans); color: var(--text);
  background: linear-gradient(180deg, #080706, #12100d); border: 1px solid #3a3228; border-radius: 3px; outline: none;
  box-shadow: inset 0 2px 8px #000c, 0 1px 0 #ffffff08; caret-color: var(--gold2);
  transition: border-color .2s, box-shadow .2s;
}
.control input::placeholder { color: #6b6253; }
.control input:hover, select:hover { border-color: #554a3b; }
.control input:focus, select:focus { border-color: var(--gold); box-shadow: inset 0 2px 8px #000c, 0 0 0 3px #c9a14a22, 0 0 22px #c9a14a1f; }
.control input:-webkit-autofill { -webkit-text-fill-color: var(--text); -webkit-box-shadow: inset 0 0 0 100px #14110d; transition: background-color 9999s; }
.control-ico { position: absolute; left: 15px; top: 50%; width: 19px; height: 19px; margin-top: -9.5px; fill: none; stroke: #7d7262; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; transition: stroke .2s; }
.control:focus-within .control-ico { stroke: var(--gold2); }
.control-state { position: absolute; right: 15px; top: 50%; width: 18px; height: 18px; margin-top: -9px; fill: none; stroke: #6fbf63; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.6); transition: opacity .2s, transform .2s; pointer-events: none; }
.control:has(.eye) .control-state { right: 48px; }
.control:has(.eye) input { padding-right: 78px; }
.eye { position: absolute; right: 6px; top: 50%; width: 38px; height: 38px; margin-top: -19px; display: grid; place-items: center; background: none; border: 0; border-radius: 3px; cursor: pointer; color: #7d7262; transition: color .2s, background .2s; }
.eye:hover { color: var(--gold2); background: #ffffff08; }
.eye svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.field.is-valid .control input { border-color: #4f7d47; }
.field.is-valid .control-state { opacity: 1; transform: none; }
.field.is-invalid .control input { border-color: #a5363b; box-shadow: inset 0 2px 8px #000c, 0 0 0 3px #a5363b22; }
.field.is-invalid .control-ico { stroke: #d46a6f; }
.field-msg { display: flex; gap: 7px; align-items: flex-start; font-size: .8rem; color: var(--muted); }
.field-msg:empty { display: none; }
.field-msg svg { flex: none; width: 15px; height: 15px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.field.is-invalid .field-msg { color: #ec9ea2; }
.field.is-valid .field-msg { color: #9fd394; }
.field.shake .control { animation: shake .35s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

.strength { display: flex; align-items: center; gap: 12px; }
.strength-bar { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.strength-bar i { height: 4px; background: #2a251f; border-radius: 2px; transition: background .25s; }
.strength-label { font-size: .75rem; color: var(--muted); min-width: 9.5em; text-align: right; }
.strength[data-level="1"] i:nth-child(-n+1) { background: #b13c41; }
.strength[data-level="2"] i:nth-child(-n+2) { background: #d07a35; }
.strength[data-level="3"] i:nth-child(-n+3) { background: #c9a14a; }
.strength[data-level="4"] i { background: #5fa553; }
.rules { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .78rem; color: var(--muted); }
.rules li { display: flex; align-items: center; gap: 5px; transition: color .2s; }
.rules svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; padding: 1px; border: 1px solid #4a4236; border-radius: 50%; color: transparent; transition: color .2s, border-color .2s, background .2s; }
.rules li.ok { color: #b6dcae; }
.rules li.ok svg { color: #142411; background: #6fbf63; border-color: #6fbf63; }

.checkbox { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; cursor: pointer; font-size: .9rem; color: #d3c7ad; }
.checkbox input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.checkbox .box { width: 22px; height: 22px; margin-top: 1px; display: grid; place-items: center; background: linear-gradient(180deg, #080706, #12100d); border: 1px solid #5a4d39; border-radius: 3px; box-shadow: inset 0 2px 5px #000b; transition: background .2s, border-color .2s, box-shadow .2s; }
.checkbox .box svg { width: 15px; height: 15px; fill: none; stroke: #241605; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.4); transition: opacity .15s, transform .2s cubic-bezier(.3, 1.6, .5, 1); }
.checkbox:hover .box { border-color: var(--gold); }
.checkbox input:checked + .box { background: linear-gradient(180deg, #f0d083, #b98a35); border-color: #f6dd9a; }
.checkbox input:checked + .box svg { opacity: 1; transform: none; }
.checkbox input:focus-visible + .box { box-shadow: 0 0 0 3px #c9a14a44; }
.field.is-invalid .checkbox .box { border-color: #a5363b; }

select {
  appearance: none; padding: 0 42px 0 14px; height: 44px; cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9a14a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 14px center / 16px no-repeat, linear-gradient(180deg, #080706, #12100d);
}
select option { background: #14110e; color: var(--text); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* panels, tables */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.account-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 20px; margin-top: 24px; }
.account-grid .panel:last-child { grid-column: 1 / -1; max-width: 520px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 20px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; }
/* 26.10: a small button inside a detail row (account page: "send the confirmation link") stays inside its panel */
.btn-small { min-height: 34px; padding: .45em 1.1em; font-size: .72rem; letter-spacing: .08em; }
.kv dd .btn { max-width: 100%; white-space: normal; line-height: 1.25; text-align: center; }
.hash { word-break: break-all; font-size: .78rem; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { padding: .65em .8em; border-bottom: 1px solid var(--line); text-align: left; }
.table th { color: var(--muted); font-weight: 500; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.ranking tr.top1 td { color: #f3d27a; }
.ranking tr.top2 td { color: #d9d9d9; }
.ranking tr.top3 td { color: #d79a62; }
.ranking tbody tr:hover { background: #ffffff06; }
.filters { display: flex; gap: 16px; margin: 24px 0; flex-wrap: wrap; }
.filters label { display: grid; gap: 4px; color: var(--muted); font-size: .85rem; min-width: 180px; }
.kbar { display: flex; height: 34px; border-radius: var(--radius); overflow: hidden; margin: 20px 0 6px; border: 1px solid var(--line); }
.kbar div { background: color-mix(in srgb, var(--k) 70%, black); display: flex; align-items: center; justify-content: center; font-size: .85rem; white-space: nowrap; overflow: hidden; }

/* download */
.downloads { display: grid; gap: 18px; }
.dl-card { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 28px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.dl-card.main { border-color: #c9a14a77; background: radial-gradient(circle at 0% 0%, #c9a14a1c, transparent 60%), var(--panel); }
.dl-card .kv { margin: 0; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 48px 0; }
.step { position: relative; padding: 24px 20px 20px; border-top: 2px solid var(--gold); background: var(--bg2); border-radius: 0 0 var(--radius) var(--radius); }
.step span { font: 700 1.8rem var(--serif); color: var(--gold); }
.step p { color: #c7bca6; margin: 0; font-size: .95rem; }
.two-col { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }

.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 16px 20px; font: 600 1.02rem var(--serif); color: #efe3c6; list-style: none; }
.faq summary::after { content: "+"; float: right; color: var(--gold); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 20px 16px; margin: 0; color: #d3c9b3; }

.error-page { padding-top: 110px; padding-bottom: 130px; }
.error-code { font: 700 6rem/1 var(--serif); color: #c9a14a33; }

/* footer */
.footer { border-top: 1px solid var(--line); background: #090807; padding: 40px 0 24px; margin-top: 0; }
.footer-in { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer-in img { width: 150px; margin-bottom: 10px; }
.footer-in p { max-width: 40ch; font-size: .9rem; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; align-items: start; }
.footer-links a { color: #bfb39b; font-size: .92rem; }
.copy { margin-top: 24px; font-size: .82rem; }

/* responsive */
@media (max-width: 960px) {
  .features, .news-grid, .places { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .band-in, .two-col, .account-grid, .kingdoms { grid-template-columns: 1fr; }
  .nav-burger { display: flex; flex-direction: column; gap: 5px; margin-left: auto; cursor: pointer; padding: 10px; }
  .nav-burger span { width: 24px; height: 2px; background: var(--gold2); }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: #0c0b0afa; border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .nav a, .nav form { padding: 12px 0; border-bottom: 1px solid #ffffff0a; }
  .nav .btn { margin-top: 10px; }
  .nav-sep { display: none; }
  .nav-toggle:checked ~ .nav { display: flex; }
}
@media (max-width: 620px) {
  .features, .news-grid, .places, .classes, .steps, .class-chips { grid-template-columns: 1fr; }
  .section { padding: 52px 16px; }
  .dl-card { flex-direction: column; align-items: stretch; }
  .kingdom { padding: 110px 22px 24px; }
  .hero-stats { gap: 24px; }
  .auth-card { padding: 28px 20px; }
  .section-head { flex-direction: column; align-items: start; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide, .hero-slide.on { animation: none; transition: none; transform: none; }
}
.classes + p { margin-top: 28px; }

/* ---- W5 (web audit): accessibility ---- */
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: .7em 1.1em; background: var(--gold); color: #1b1307; font-weight: 600; border-radius: 3px; }
.skip:focus { top: 10px; text-decoration: none; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
main:focus { outline: none; }
a:focus-visible, button:focus-visible, summary:focus-visible, select:focus-visible, input[type=checkbox]:focus-visible + .box {
  outline: 2px solid #f3d27a; outline-offset: 3px; }
.btn:focus-visible { outline: 2px solid #f3d27a; outline-offset: 4px; }
.control input::placeholder { color: #8a7f6c; }
.nav-burger { background: none; border: 0; }
@media (max-width: 960px) {
  .no-js .nav { display: flex; position: static; flex-direction: column; align-items: stretch; background: none; padding: 0 0 12px; }
  .no-js .nav-burger { display: none; }
  .nav.open { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---- rubies, shop ---- */
.ruby-pill { display: inline-flex; align-items: center; gap: .35em; padding: .3em .7em; border: 1px solid #8e1f2499; border-radius: 99px; color: #f6c5c8 !important; background: #3a0b0e66; font-variant-numeric: tabular-nums; }
.ruby-pill svg, .ruby-ico, .shop-price svg, .item-price svg, .ruby-balance svg { width: 16px; height: 16px; fill: #a3171e; stroke: #ff8a8f; stroke-width: 1.4; stroke-linejoin: round; vertical-align: -2px; }
.ruby-pill.big { font-size: 1.1rem; }
.shop-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.ruby-balance { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; }
.ruby-balance svg { width: 26px; height: 26px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.shop-card { display: grid; justify-items: center; gap: 10px; padding: 22px 14px 18px; text-align: center; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .15s, border-color .15s; }
.shop-card:hover { transform: translateY(-3px); border-color: #c9a14a88; text-decoration: none; }
.shop-icon { width: 84px; height: 84px; display: grid; place-items: center; background: radial-gradient(circle, #c9a14a22, transparent 70%); border: 1px solid #c9a14a44; border-radius: 6px; }
.shop-icon img { width: 64px; height: 64px; image-rendering: auto; }
.shop-name { font: 600 1rem var(--serif); color: #f1e6cd; }
.shop-price { display: inline-flex; align-items: center; gap: 5px; color: #f6c5c8; font-weight: 600; }
.empty-shop { padding: 48px 24px; }
.big-ico { width: 56px; height: 56px; fill: none; stroke: var(--gold); stroke-width: 1.6; margin: 0 auto 10px; display: block; }
.shop-info { margin-top: 34px; }
.steps-list { margin: 0; padding-left: 1.2em; color: #d3c9b3; }
.steps-list li { margin-bottom: .4em; }
.crumbs { color: var(--muted); font-size: .9rem; }
.item-detail { display: grid; grid-template-columns: 160px 1fr; gap: 28px; align-items: start; }
.item-figure { width: 160px; height: 160px; display: grid; place-items: center; background: radial-gradient(circle, #c9a14a26, transparent 70%); border: 1px solid #c9a14a55; border-radius: 8px; }
.item-figure img { width: 128px; height: 128px; }
.tag-cosmetic { display: inline-block; font-size: .8rem; padding: .2em .7em; border: 1px solid #c9a14a66; border-radius: 99px; color: #e2d3ad; }
.item-price { display: flex; align-items: center; gap: 8px; font-size: 1.3rem; color: #f6c5c8; }
.item-price svg { width: 22px; height: 22px; }
.packages { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin: 30px 0 18px; }
.package { position: relative; display: grid; justify-items: center; gap: 6px; padding: 30px 22px 22px; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.package.best { border-color: #c9a14a99; box-shadow: 0 0 40px #c9a14a22; }
.package form, .package .btn { width: 100%; margin-top: 10px; }
.package-ico { width: 46px; height: 46px; fill: #a3171e; stroke: #ff8a8f; stroke-width: 1; stroke-linejoin: round; filter: drop-shadow(0 0 10px #ff3b4a55); }
.package-amount { font: 700 2rem var(--serif); color: #f6d6d8; }
.package-label { color: var(--muted); }
.package-label .bonus { color: #9fd394; }
.package-price { font: 600 1.3rem var(--serif); color: var(--gold2); }
.ribbon { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); padding: .25em .9em; font: 600 .72rem var(--serif); letter-spacing: .12em; text-transform: uppercase; color: #f6e3b4; background: var(--blood); border: 1px solid #c9a14a; white-space: nowrap; }
.notice-test { max-width: 760px; }
.pay-box { margin-top: 20px; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.center-row { justify-content: center; }
.status { display: inline-block; font-size: .78rem; padding: .15em .6em; border-radius: 99px; border: 1px solid; }
.status-paid, .status-created { border-color: #c9a14a88; color: #f0d58f; }
.status-delivered { border-color: #4f8a4a; color: #a9d69d; }
.status-refunded, .status-failed { border-color: #a5363b; color: #eba2a6; }
.table .plus { color: #a9d69d; }
.table .minus { color: #eba2a6; }
.rules li.advice:not(.ok) { opacity: .75; }
.account-grid .panel.wide { grid-column: 1 / -1; }
.account-grid .panel:last-child { max-width: none; }

/* ---- admin ---- */
.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 24px; }
.admin-nav a { padding: .45em .9em; border: 1px solid var(--line); border-radius: 3px; color: #cfc4ad; }
.admin-nav a.on, .admin-nav a:hover { border-color: var(--gold); color: var(--gold2); text-decoration: none; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { display: grid; gap: 2px; padding: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.stat span { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.stat b { font: 600 1.7rem var(--serif); color: var(--gold2); }
.stat b.mode { font-size: 1.2rem; }
.stat small { color: var(--muted); }
.admin-split { display: grid; grid-template-columns: 420px 1fr; gap: 20px; align-items: start; }
.admin-form .field-label { display: block; margin-bottom: 4px; }
.plain, textarea.plain { width: 100%; padding: .6em .7em; font: inherit; color: var(--text); background: #0b0a09; border: 1px solid #3a342c; border-radius: 3px; }
.plain:focus { border-color: var(--gold); outline: none; }
.form-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form .plain { width: auto; min-width: 70px; }
.wrap-form .field { flex: 1 1 160px; }
.wrap-form .field.grow { flex: 3 1 260px; }
.wrap-form .plain { width: 100%; }
tr.muted td { opacity: .6; }
@media (max-width: 960px) { .admin-split, .item-detail { grid-template-columns: 1fr; } .form-row { grid-template-columns: 1fr 1fr; } }
html { background: var(--bg); }
@media (max-width: 960px) { .js .nav.open { background: #0c0b0a; box-shadow: 0 14px 30px #000c; } }

/* class emblems on the home plaques (W10); the faint one behind the cards only in the medieval themes */
.class-chips svg { width: 30px; height: 30px; fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.class-chips li a { display: grid; justify-items: center; gap: 6px; color: inherit; text-decoration: none; }
.class-card .class-ico.ghost { display: none; }
.theme-medieval .class-card .class-ico.ghost { display: block; }
