/* ====== Theme (základ + frakce) ====== */
:root {
  --bg: #0b0b10;
  --panel: #14141c;
  --muted: #9597a1;
  --text: #e9e9ee;

  /* Frakční barvy */
  --ignis: #E53935;
  --vitae: #43A047;
  --noctis: #6A1B9A;

  /* Akcentní zelená pro jednotný vzhled */
  --accent: #6A1B9A;
  --accent-glow: rgba(106, 27, 154, .22);
  --accent-line: rgba(106, 27, 154, .25);

  /* Fialové tóny pro taby */
  --tab-bg: #1b1524;
  --tab-bg-active: #261c38;
  --tab-border: rgba(177,129,255,.18);
  --tab-border-active: rgba(177,129,255,.35);
}

/* ====== Reset & base ====== */
* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(1000px 600px at 80% -10%, rgba(106,27,154,.18), transparent 60%),
    radial-gradient(800px 500px at 10% 0%, rgba(67,160,71,.12), transparent 65%),
    radial-gradient(900px 700px at 50% 120%, rgba(229,57,53,.10), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0));
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
}

a { color: var(--text); text-decoration: none; }
a:hover { opacity: .9; }

.container { max-width: 1040px; margin: 0 auto; padding: 24px; }

/* ====== Header / nav – obsidiánová lišta, kamenná tlačítka, Moon Dust v obsidiánu ====== */
.header {
  position: sticky; top: 0; z-index: 20;
  background:
    linear-gradient(180deg, rgba(10,7,16,.35), rgba(10,7,16,.65)),
    url('../img/obsidian-fill.webp') 0 0 / 512px repeat,
    #0E0B13;
  box-shadow: 0 8px 24px rgba(0,0,0,.6);
}
/* zářící runová linka na spodní hraně */
.header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--nr-glow-rgb), .8) 20%, rgba(var(--nr-glow-rgb), .8) 80%, transparent);
  box-shadow: 0 0 10px rgba(var(--nr-glow-rgb), .8);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 24px;
}

.brand { display: flex; align-items: center; gap: 12px; color: inherit; }
.brand:hover { opacity: 1; }
.brand-mark {
  width: 14px; height: 14px; flex-shrink: 0; transform: rotate(45deg);
  background: linear-gradient(135deg, #F0E6FF, var(--nr-glow) 55%, #4A1FB0);
  box-shadow: 0 0 12px rgba(var(--nr-glow-rgb), .9);
}
.brand-name {
  margin: 0; font-family: 'Cinzel Decorative', 'Cinzel', serif; font-weight: 700; font-size: 22px; line-height: 1;
  letter-spacing: .04em; white-space: nowrap;
  background: linear-gradient(180deg, #FFFFFF 0%, #E6D8FF 45%, #A783F0 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 8px rgba(var(--nr-glow-rgb), .7));
}
.brand-tcg {
  font-family: var(--nr-display); font-weight: 700; font-size: 11px; letter-spacing: .2em; color: #9A8DB5;
  text-shadow: 0 -1px 0 rgba(0,0,0,.95), 0 1px 0 rgba(255,255,255,.09);
}

.header-right { display: flex; align-items: center; gap: 14px; }

.nav { display: flex; gap: 6px; align-items: center; margin: 0; padding: 0; }

/* Moon Dust – neklikací obsidiánový rámeček */
.header-dust { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 10px; border-radius: 6px; }
.header-dust .dust-icon { width: 22px; height: 22px; color: #C9AEFF; filter: drop-shadow(0 0 5px rgba(var(--nr-glow-rgb), .8)); }
.header-dust-text { display: flex; flex-direction: column; line-height: 1.15; }
.header-dust-label {
  font-family: var(--nr-display); font-weight: 600; font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase;
  color: #9A8DB5; text-shadow: 0 -1px 0 rgba(0,0,0,.95), 0 1px 0 rgba(255,255,255,.09);
}
.header-energy { text-decoration: none; transition: filter .2s ease; }
.header-energy:hover { filter: brightness(1.2); }
.header-energy .dust-icon { color: #F6DCA5; filter: drop-shadow(0 0 5px rgba(246, 220, 165, .6)); }
.dust-value, .energy-value {
  font-family: var(--nr-display); font-weight: 700; font-size: 16px; color: #fff; font-variant-numeric: tabular-nums;
  text-shadow: 0 0 10px rgba(var(--nr-glow-rgb), .45);
}

/* navigace: na širokém displeji čtvercové kameny jen s ikonou (text skrytý vizuálně, ne pro čtečky) */
.nav .nr-stone-sm { gap: 8px; }
.nav-icon { width: 22px; height: 22px; flex-shrink: 0; filter: drop-shadow(0 0 4px rgba(var(--nr-glow-rgb), .7)); }
@media (min-width: 1181px) {
  .nav .nr-stone-sm { width: 54px; min-height: 52px; padding: 0; }
  .nav-label {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }
  /* skupiny (Obchod, Profil) s viditelným názvem a šipkou */
  .nav .nav-group-btn { width: auto; padding: 0 16px; }
  .nav .nav-group-btn .nav-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; clip-path: none; }
}
/* úzká obrazovka: navigace je rozbalená pod hlavičkou, položky skupin rovnou vidět */
@media (max-width: 1180px) {
  .nav-group { display: contents; }
  .nav-group-btn { display: none !important; }
  .nav-menu { position: static; display: contents; opacity: 1; visibility: visible; translate: none; box-shadow: none; padding: 0; }
  .nav-menu::before { display: none; }
}

/* skupiny navigace (autor 2026-10-27): Obchod ▾, Profil ▾ – kámen s ikonou, textem a šipkou, pod ním menu */
.nav-group { position: relative; }
.nav-caret { width: 14px; height: 14px; flex-shrink: 0; opacity: .8; transition: transform .15s ease; }
.nav-group.is-open .nav-caret, .nav-group:hover .nav-caret { transform: rotate(180deg); }
.nav-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  display: flex; flex-direction: column; gap: 2px; min-width: 220px; padding: 8px; border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(var(--nr-glow-rgb), .45), 0 0 18px rgba(var(--nr-glow-rgb), .2), 0 12px 28px rgba(0, 0, 0, .65);
  opacity: 0; visibility: hidden; translate: 0 -4px; transition: opacity .15s ease, translate .15s ease, visibility .15s;
}
/* most přes mezeru pod tlačítkem – menu se při přejetí myší dolů nezavře */
.nav-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.nav-group:hover .nav-menu, .nav-group.is-open .nav-menu, .nav-group:focus-within .nav-menu { opacity: 1; visibility: visible; translate: 0 0; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 7px;
  font-family: var(--nr-display); font-weight: 700; font-size: 14px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--nr-rune); text-decoration: none; white-space: nowrap;
}
.nav-item:hover, .nav-item:focus-visible { color: #fff; background: rgba(var(--nr-glow-rgb), .16); outline: none; }
.nav-item.is-active { color: #fff; background: rgba(var(--nr-glow-rgb), .24); }
.nav-item.has-claimable { color: #F6DCA5; }
.nav-item .nav-badge { position: static; margin-left: auto; }
.nav-item-logout { margin-top: 4px; border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 11px; border-radius: 0 0 7px 7px; color: var(--nr-muted, #A99CC2); }

/* úspěchy k vyzvednutí – zlatý pohár s odznakem počtu */
.nav .has-claimable { color: #F6DCA5; filter: drop-shadow(0 6px 10px rgba(0,0,0,.6)) drop-shadow(0 0 10px rgba(232,194,122,.7)); }
.nav .has-claimable .nav-icon { filter: drop-shadow(0 0 5px rgba(232,194,122,.9)); }
.nav-badge {
  position: absolute; top: -10px; right: -10px; z-index: 2;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  display: grid; place-items: center;
  font-family: 'Sora', system-ui, sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 0; color: #1A1206;
  background: linear-gradient(180deg, #F6DCA5, #C9973F); box-shadow: 0 0 8px rgba(232,194,122,.8);
  text-shadow: none;
}

/* tlačítko menu – jen na užších obrazovkách (.header kvůli přednosti před .nr-stone níž v souboru) */
.header .nr-menu-toggle { display: none; }

@media (max-width: 1180px) {
  .header-inner { flex-wrap: wrap; }
  .header .nr-menu-toggle { display: inline-flex; min-height: 48px; min-width: 56px; padding: 0 4px; }
  .nr-menu-toggle svg { width: 20px; height: 20px; }
  .nav {
    display: none; order: 3; width: 100%;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; padding: 6px 0 8px;
  }
  .header.is-open .nav { display: grid; }
  /* Moon Dust a menu zůstávají vedle názvu, navigace se rozbalí na celou šířku pod nimi */
  .header-right { display: contents; }
  .brand { margin-right: auto; }
}
@media (max-width: 560px) {
  .header-inner { padding: 8px 12px; gap: 8px; }
  .brand { gap: 8px; }
  .brand-mark { width: 10px; height: 10px; }
  .brand-name { font-size: 15px; }
  .header .nr-menu-toggle { min-width: 48px; min-height: 44px; }
  .header-dust { padding: 6px 10px 6px 8px; gap: 6px; }
  .brand-tcg { display: none; }
  .header-dust-label { display: none; }
}

.btn {
  background: linear-gradient(135deg, var(--accent), color-mix(in oklab, var(--accent) 80%, white 20%));
  color: #fff;
  border: 0;
}

/* ====== Buttons, inputs ====== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 10px 18px var(--accent-glow);
}

.btn-ghost {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  color: #eaeaf4;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

form { display: grid; gap: 14px; max-width: 420px; }
label { font-weight: 600; color: #d6d6e5; }

input[type="email"], input[type="password"], input[type="text"] {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: #11131a;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

input::placeholder { color: #8a8ca0; }
input:focus {
  outline: 2px solid color-mix(in oklab, var(--accent) 40%, white 10%);
  outline-offset: 2px;
}

/* ====== Cards / panely ====== */
.card, .nr-glass {
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0));
  border: 1px solid rgba(255,255,255,.06);
  box-shadow:
    0 0 0 1px var(--accent-line) inset,
    0 12px 34px rgba(0,0,0,.38),
    0 0 22px var(--accent-glow);
  border-radius: 16px;
  padding: 18px;
  position: relative;
  z-index: 1;
}

/* ====== Progress (XP) ====== */
.nr-progress {
  position: relative;
  height: 8px;
  background: rgba(255,255,255,.08);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

.nr-progress-bar {
  height: 100%;
  width: var(--pct, 0%);
  background: color-mix(in oklab, var(--accent) 75%, white 10%);
  transition: width .35s ease;
}

/* ====== Tabs ====== */
.nr-tabs .nav-link {
  background: var(--tab-bg);
  border: 1px solid var(--tab-border);
  color: #e6e2f3;
  border-radius: 12px;
  padding: 8px 14px;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.nr-tabs .nav-link:hover {
  background: color-mix(in oklab, var(--tab-bg) 70%, white 30%);
  border-color: var(--tab-border-active);
}

.nr-tabs .nav-link.active {
  background: var(--tab-bg-active);
  border-color: var(--tab-border-active);
  color: #fff;
  box-shadow: 0 6px 18px rgba(80,46,120,.35);
}

/* ====== Lišta „hra je ve vývoji“ (@layout.latte, nad hlavičkou – odroluje) ====== */
.dev-notice {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 6px 44px; position: relative;
  background: linear-gradient(90deg, rgba(14,11,19,.95), rgba(32,22,48,.95) 50%, rgba(14,11,19,.95));
  border-bottom: 1px solid rgba(var(--nr-glow-rgb), .25);
  color: #CFC4E4; font-size: 13px; line-height: 1.4; text-align: center;
}
.dev-notice[hidden] { display: none; }
.dev-notice-text { margin: 0; }
.dev-notice-badge {
  display: inline-block; margin-right: 6px; padding: 1px 8px; border-radius: 4px;
  font-family: var(--nr-display); font-weight: 700; font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--nr-rune); background: rgba(var(--nr-glow-rgb), .14); border: 1px solid rgba(var(--nr-glow-rgb), .35);
}
.dev-notice a { color: var(--nr-rune); }
.dev-notice-close {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border: 0; border-radius: 4px; background: none;
  color: #9A8DB5; font-size: 20px; line-height: 1; cursor: pointer;
}
.dev-notice-close:hover { color: #fff; background: rgba(255,255,255,.06); }

/* ====== Flash zprávy ====== */
.flashes-top {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0 20px;
}

.alert {
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 600;
  line-height: 1.3;
  border: 1px solid transparent;
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  box-shadow: 0 10px 30px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.04);
}

.alert.success {
  border-color: rgba(67,160,71,.45);
  background: linear-gradient(180deg, rgba(67,160,71,.18), rgba(67,160,71,.08));
}

.alert.warning {
  border-color: rgba(255,193,7,.45);
  background: linear-gradient(180deg, rgba(255,193,7,.18), rgba(255,193,7,.08));
}

.alert.error {
  border-color: rgba(229,57,53,.45);
  background: linear-gradient(180deg, rgba(229,57,53,.18), rgba(229,57,53,.08));
}

.alert.info {
  border-color: rgba(106,27,154,.45);
  background: linear-gradient(180deg, rgba(106,27,154,.18), rgba(106,27,154,.08));
}

/* ====== Footer ====== */
.footer {
  opacity: .8;
  color: var(--muted);
  font-size: 13px;
  padding: 24px;
  position: relative;
  z-index: 1;
}

/* ====== Pixel Rain ====== */
#pixel-rain {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
  transform: translateZ(0);
  will-change: transform;
}

.pixel {
  position: absolute;
  width: 3px;
  height: 3px;
  opacity: .9;
  border-radius: 3px;
  transform: translateY(var(--start, -20vh));
  animation: fallT linear infinite;
  animation-duration: var(--dur, 10s);
  animation-delay: var(--delay, 0s);
  will-change: transform, opacity;
  backface-visibility: hidden;
}

@keyframes fallT {
  to { transform: translateY(110vh); opacity: 0; }
}

/* ====== Jemné separátory ====== */
.hr, .divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-line), transparent);
  border: 0;
  opacity: .8;
}

/* ====== Containers (fixed vs. fluid) ====== */
/* Default fixed container (už ho máš) */
.container{
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px;
}

/* 100% fluid container přes celou šířku */
.container-fluid{
  width: 100%;
  max-width: none;
  margin: 0;               /* žádné centrování */
  padding: 24px;           /* stejné horizontální odsazení */
}

/* Page switches (volitelné, ale praktické) */
.page-fixed  .container{ max-width: 1040px; }
.page-fluid  .container{ max-width: none; width:100%; margin:0; }

/* Helper pro libovolný custom limit (když nechceš úplné full-bleed) */
.wrap{ max-width: var(--wrap, 1440px); margin:0 auto; }

/* IGNIS */
.page-faction.f-ignis {
  --accent: var(--ignis);
  --accent-line: color-mix(in oklab, var(--ignis) 30%, white 10%);
  --accent-glow: color-mix(in oklab, var(--ignis) 25%, transparent);
}

/* VITAE */
.page-faction.f-vitae {
  --accent: var(--vitae);
  --accent-line: color-mix(in oklab, var(--vitae) 30%, white 10%);
  --accent-glow: color-mix(in oklab, var(--vitae) 25%, transparent);
}

/* NOCTIS */
.page-faction.f-noctis {
  --accent: var(--noctis);
  --accent-line: color-mix(in oklab, var(--noctis) 30%, white 10%);
  --accent-glow: color-mix(in oklab, var(--noctis) 25%, transparent);
}

#backToTop {
  position: fixed;
  right: 24px;
  bottom: 28px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent, #6A1B9A);
  color: #fff;
  font-size: 22px;
  line-height: 42px;
  text-align: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 999;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--accent, #6A1B9A) 30%, black);
}
#backToTop:hover {
  background: color-mix(in srgb, var(--accent, #6A1B9A) 85%, white 10%);
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent, #6A1B9A) 55%, transparent);
}
#backToTop.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ====== Obsidiánové UI (sdílené) ======
   .nr-stone    = kamenné klikací tlačítko (9-slice z /assets/img/stone-slab.webp)
   .nr-obsidian = neklikací rámeček z leštěného černého obsidiánu (statistiky, Moon Dust)
   Barva záře z --nr-glow / --nr-glow-rgb (profil je přepisuje barvou frakce). */
:root {
  --nr-glow: #9B6BFF;
  --nr-glow-rgb: 155, 107, 255;
  --nr-rune: #D9C6FF;
  --nr-display: 'Cinzel', 'Times New Roman', serif;
}

.nr-stone {
  position: relative; box-sizing: border-box; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 64px; padding: 0 10px; line-height: 1.1; text-align: center;
  border: 20px solid transparent;
  border-image: url('../img/stone-slab.webp') 70 fill / 20px stretch;
  background: none;
  font-family: var(--nr-display); font-weight: 700; font-size: 15px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--nr-rune);
  text-shadow: 0 -1px 0 rgba(0,0,0,.85), 0 1px 0 rgba(255,255,255,.06), 0 0 10px rgba(var(--nr-glow-rgb), .75);
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.6));
  cursor: pointer;
  transition: filter .25s ease, transform .15s ease, color .25s ease;
}
.nr-stone::after {
  content: ""; position: absolute; inset: -14px -20px; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 70% at 50% 50%, rgba(var(--nr-glow-rgb), .45), transparent 70%);
  mix-blend-mode: screen; opacity: .35; transition: opacity .25s ease;
}
.nr-stone.primary,
.nr-stone.is-active { color: #fff; filter: drop-shadow(0 6px 10px rgba(0,0,0,.6)) drop-shadow(0 0 10px rgba(var(--nr-glow-rgb), .55)); }
.nr-stone.primary::after,
.nr-stone.is-active::after { opacity: .7; }
.nr-stone:hover {
  color: #fff; opacity: 1;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.6)) drop-shadow(0 0 16px rgba(var(--nr-glow-rgb), .85)) brightness(1.12);
}
.nr-stone:hover::after { opacity: 1; }
.nr-stone:active {
  transform: translateY(2px) scale(.98);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.7)) drop-shadow(0 0 22px rgba(var(--nr-glow-rgb), 1)) brightness(1.2);
}
.nr-stone:focus-visible { outline: 2px solid var(--nr-rune); outline-offset: 6px; }
/* neaktivní (odkaz .is-disabled, tlačítko :disabled) – zešedne a nejde kliknout */
.nr-stone.is-disabled, .nr-stone:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.6); pointer-events: none; }

/* menší varianta (navigace) */
.nr-stone-sm {
  min-height: 46px; padding: 0 4px;
  border-width: 14px; border-image-width: 14px;
  font-size: 11px; letter-spacing: .1em; white-space: nowrap;
}
.nr-stone-sm::after { inset: -8px -12px; }

.nr-obsidian {
  background:
    linear-gradient(155deg, rgba(255,255,255,.11) 0%, rgba(255,255,255,.03) 26%, transparent 42%),
    radial-gradient(120% 90% at 85% 125%, rgba(var(--nr-glow-rgb), .12), transparent 60%),
    linear-gradient(rgba(3,2,6,.86), rgba(3,2,6,.92)),
    url('../img/obsidian-fill.webp') center / 256px,
    #050407;
  border: 1px solid rgba(255,255,255,.06);
  border-top-color: rgba(255,255,255,.16);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.07),
    inset 0 -3px 8px rgba(0,0,0,.85),
    0 0 0 1px rgba(0,0,0,.7),
    0 6px 12px rgba(0,0,0,.55);
}

/* ====== Sdílené prvky stránek (profil, frakce, …) ======
   Kořen stránky: .nr-theme.f-{slug} – barva záře a přebarvení rámů podle frakce (Noctis = výchozí fialová). */
.nr-theme { --nr-hue: none; --nr-muted: #A99CC2; --nr-fg: #ECE6F5; --nr-gold: #E8C27A; }
.nr-theme.f-noctis { --nr-glow: #9B6BFF; --nr-glow-rgb: 155, 107, 255; --nr-rune: #D9C6FF; } /* výslovně – kvůli vnoření do jiné frakce */
.nr-theme.f-ignis { --nr-glow: #FF7A52; --nr-glow-rgb: 255, 122, 82; --nr-rune: #FFD9C8; --nr-hue: hue-rotate(105deg) saturate(1.2); }
.nr-theme.f-vitae { --nr-glow: #5FD38A; --nr-glow-rgb: 95, 211, 138; --nr-rune: #CDF5DA; --nr-hue: hue-rotate(-140deg); }
/* neutrální (balíček s kartami všech frakcí) – stříbřitá záře, rámy bez přebarvení do frakce */
.nr-theme.f-neutral { --nr-glow: #CFC8DC; --nr-glow-rgb: 207, 200, 220; --nr-rune: #EEEAF5; --nr-hue: saturate(0); }

/* Panel: obsidiánová výplň (::before) + kamenný rám s runami (::after, 9-slice); obojí pod obsahem */
.nr-panel {
  position: relative;
  isolation: isolate;
  padding: 44px 46px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.nr-panel::before {
  content: ""; position: absolute; inset: 0; z-index: -2; border-radius: 8px;
  background:
    linear-gradient(160deg, rgba(10,7,16,.35), rgba(10,7,16,.6)),
    url('../img/obsidian-fill.webp') 0 0 / 512px repeat,
    #0E0B13;
  box-shadow: inset 0 0 40px rgba(var(--nr-glow-rgb), .10), 0 0 30px rgba(var(--nr-glow-rgb), .14);
  filter: var(--nr-hue, none);
}
.nr-panel::after {
  content: ""; position: absolute; inset: -14px; z-index: -1; pointer-events: none;
  box-sizing: border-box;
  border: 72px solid transparent;
  border-image: url('../img/panel-frame.webp') 320 / 72px round;
  filter: var(--nr-hue, none) drop-shadow(0 8px 14px rgba(0,0,0,.6));
}
@media (max-width: 720px) {
  .nr-panel { padding: 40px 30px; }
}

/* hlavička panelu, nadpis s kosočtvercem, podtitul, oddělovač, poznámka */
.nr-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.nr-title {
  display: flex; align-items: center; gap: 10px; margin: 0;
  font-family: var(--nr-display); font-weight: 700; font-size: 18px; letter-spacing: .1em; text-transform: uppercase;
  color: #F1EAFF; text-shadow: 0 0 12px rgba(var(--nr-glow-rgb), .6);
}
.nr-title::before {
  content: ""; width: 9px; height: 9px; flex-shrink: 0; transform: rotate(45deg);
  background: var(--nr-rune); box-shadow: 0 0 6px var(--nr-glow);
}
.nr-sub { color: var(--nr-muted, #A99CC2); font-size: 12px; }
.nr-divider { height: 1px; background: linear-gradient(90deg, transparent, rgba(var(--nr-glow-rgb), .5), transparent); }
.nr-note { color: var(--nr-muted, #A99CC2); font-size: 13px; margin: 0; }

/* vytesaný popisek (Cinzel, verzálky; tmavý stín nad, světlá linka pod = drážka v kameni) */
.nr-label,
.nr-stat-label,
.nr-pill-label,
.nr-filter label {
  font-family: var(--nr-display); font-weight: 600; font-size: 10.5px; line-height: 1.3;
  letter-spacing: .14em; text-transform: uppercase; color: #9A8DB5;
  text-shadow: 0 -1px 0 rgba(0,0,0,.95), 0 1px 0 rgba(255,255,255,.09);
}

/* dlaždice hodnoty (s .nr-obsidian) – štítek nahoře, číslo pod ním */
.nr-stat { border-radius: 6px; padding: 10px 12px; }
.nr-stat-label { letter-spacing: .07em; }
.nr-stat-value {
  margin-top: 2px; font-family: var(--nr-display); font-weight: 700; font-size: 20px; letter-spacing: .03em;
  color: #fff; text-shadow: 0 0 10px rgba(var(--nr-glow-rgb), .45); font-variant-numeric: tabular-nums;
}
/* vystředěná varianta (Pozice / Body) */
.nr-pill { min-width: 110px; padding: 8px 14px; border-radius: 6px; text-align: center; }
.nr-pill-label { letter-spacing: .08em; }
.nr-pill-value {
  font-family: var(--nr-display); font-weight: 700; font-size: 22px; line-height: 1.2;
  color: #fff; text-shadow: 0 0 10px rgba(var(--nr-glow-rgb), .45); font-variant-numeric: tabular-nums;
}

/* výběr (sezóna apod.) – popisek nad selectem */
.nr-filter { display: flex; flex-direction: column; gap: 4px; }
.nr-select {
  min-width: 180px; min-height: 40px; padding: 8px 10px; border-radius: 10px;
  color: var(--nr-fg, #ECE6F5); background: #0E0A15; border: 1px solid rgba(var(--nr-glow-rgb), .35);
}

/* kamenné dlaždice s počty karet podle rarity */
.nr-rarities { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.nr-rarity {
  box-sizing: border-box; min-height: 150px;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 6px;
  border: 16px solid transparent;
  border-image: url('../img/stone-slab.webp') 70 fill / 16px stretch;
  filter: drop-shadow(0 5px 8px rgba(0,0,0,.6));
  text-align: center;
}
.nr-rarity img { width: 46px; height: auto; border-radius: 4px; box-shadow: 0 4px 10px rgba(0,0,0,.6); }
.nr-rarity-name {
  font-family: var(--nr-display); font-weight: 700; font-size: 11px; letter-spacing: .1em;
  color: var(--nr-muted, #A99CC2); text-shadow: 0 -1px 0 rgba(0,0,0,.9);
}
.nr-rarity-value {
  font-family: var(--nr-display); font-weight: 700; font-size: 24px; line-height: 1;
  color: var(--r, #fff); text-shadow: 0 1px 2px rgba(0,0,0,.9), 0 0 10px var(--r, transparent);
  font-variant-numeric: tabular-nums;
}
.nr-rarity.r-common    { --r: #C9C6BF; }
.nr-rarity.r-uncommon  { --r: #9FE0B0; }
.nr-rarity.r-rare      { --r: #8FD0FF; }
.nr-rarity.r-epic      { --r: #C9AEFF; }
.nr-rarity.r-legendary { --r: #F0CD8A; filter: drop-shadow(0 5px 8px rgba(0,0,0,.6)) drop-shadow(0 0 10px rgba(232,194,122,.45)); }
@media (max-width: 720px) {
  .nr-rarities { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nr-rarity-name { font-size: 9px; letter-spacing: .04em; }
}

/* ====== Stránka z nr-panelů (obchod, kolekce) ======
   Kořen: .nr-page.nr-theme.f-{frakce hráče}, nadpis .nr-page-title, pole .nr-input.nr-obsidian */
.nr-page {
  max-width: 1240px; margin: 28px auto 64px; padding: 0 24px;
  display: flex; flex-direction: column; gap: 48px;
  font-family: 'Sora', system-ui, sans-serif; color: var(--nr-fg);
}
.nr-page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; }
.nr-page-title {
  margin: 0; font-family: 'Cinzel Decorative', var(--nr-display); font-weight: 700; font-size: clamp(28px, 4vw, 40px);
  letter-spacing: .06em; color: #F4EEFF; text-shadow: 0 0 18px rgba(var(--nr-glow-rgb), .55);
}
.nr-input {
  min-height: 46px; padding: 8px 12px; border-radius: 6px;
  color: #fff; font-family: var(--nr-display); font-weight: 700; font-size: 16px;
}
.nr-input:focus { outline: 2px solid var(--nr-rune); outline-offset: 2px; }
@media (max-width: 560px) {
  .nr-page { padding: 0 14px; }
}

/* text v barvě rarity (např. kamenná tlačítka filtru): .nr-r-C … .nr-r-L, .nr-r-G (božská) */
.nr-r-C { --nr-r: #C9C6BF; --nr-r-rgb: 201, 198, 191; }
.nr-r-U { --nr-r: #9FE0B0; --nr-r-rgb: 95, 211, 138; }
.nr-r-R { --nr-r: #8FD0FF; --nr-r-rgb: 70, 150, 255; }
.nr-r-E { --nr-r: #C9AEFF; --nr-r-rgb: 165, 95, 255; }
.nr-r-L { --nr-r: #F0CD8A; --nr-r-rgb: 240, 190, 90; }
.nr-r-G { --nr-r: #FF8FA8; --nr-r-rgb: 225, 40, 80; }
.nr-stone[class*="nr-r-"],
.nr-stone[class*="nr-r-"]:hover {
  color: var(--nr-r);
  text-shadow: 0 -1px 0 rgba(0,0,0,.85), 0 1px 0 rgba(255,255,255,.06), 0 0 10px rgba(var(--nr-r-rgb), .85);
}
.nr-stone[class*="nr-r-"].is-active { text-shadow: 0 -1px 0 rgba(0,0,0,.85), 0 0 14px rgba(var(--nr-r-rgb), 1); }

/* dlaždice karty z obsidiánu (katalog, kolekce) */
.nr-card-tile { display: flex; flex-direction: column; gap: 10px; border-radius: 10px; padding: 14px 14px 12px; color: inherit; text-decoration: none; }
.nr-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 20px; }
@media (max-width: 560px) {
  .nr-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .nr-card-tile { padding: 8px; }
}

/* ====== Obrázek balíčku (obchod, batoh) ======
   průhledné pozadí – záře jde po obrysu (drop-shadow); dlaždice s balíčkem má .nr-booster-host */
.nr-booster {
  height: 240px; width: auto; aspect-ratio: 996 / 1753;
  filter: drop-shadow(0 10px 14px rgba(0,0,0,.7)) drop-shadow(0 0 18px rgba(var(--nr-glow-rgb), .45));
  transition: transform .25s ease, filter .25s ease;
}
.nr-booster-host:hover .nr-booster {
  transform: translateY(-4px) rotate(-1.5deg);
  filter: drop-shadow(0 14px 18px rgba(0,0,0,.7)) drop-shadow(0 0 26px rgba(var(--nr-glow-rgb), .75));
}
@media (max-width: 560px) { .nr-booster { height: 190px; } }
@media (prefers-reduced-motion: reduce) { .nr-booster, .nr-booster-host:hover .nr-booster { transition: none; transform: none; } }

/* Staty bojovníka (@fighter.latte) – zbrojnice a aréna; velikost podle font-size rodiče (scény počítají v cqw) */
.nr-fstats { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .45em .7em; }
.nr-fstats div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 .6em; padding: .3em .55em; border-radius: .45em; background: rgba(255, 255, 255, .05); }
.nr-fstats dt { color: var(--nr-muted); font-size: .88em; }
.nr-fstats dd { margin: 0; color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nr-fstats dd { text-align: right; }
/* hodnota pod 50 % životů – druhý řádek dlaždice přes celou šířku */
.nr-fstats .nr-fstats-below { flex-basis: 100%; color: var(--nr-muted); font-size: .78em; font-weight: 500; }
.nr-fstats .is-over { background: rgba(214, 60, 60, .2); }
.nr-fstats .is-over dd { color: #FF9C9C; }
.nr-fstats-over { margin: .45em 0 0; font-size: .85em; color: #FF9C9C; }
