:root,
html[data-theme="dark"] {
  --bg-base: #11100E;
  --bg-surface: #1A1714;
  --bg-elevated: #24201B;
  --text-primary: #EDE4D3;
  --text-secondary: #C8BDAA;
  --border-iron: #786B59;
  --border-subtle: #4A4238;
  --accent: #E0A32E;
  --accent-contrast-text: #11100E;
  --success: #59B368;
  --warning: #E68A2E;
  --danger: #E05A56;
  --focus-ring: #F5C35B;
}

html[data-theme="light"] {
  --bg-base: #F4EFE6;
  --bg-surface: #EAE1D3;
  --bg-elevated: #DFD3C0;
  --text-primary: #1F1A14;
  --text-secondary: #3F362B;
  --border-iron: #6E5F4D;
  --border-subtle: #8C7A65;
  --accent: #8F5A00;
  --accent-contrast-text: #FFFFFF;
  --success: #1E6B2E;
  --warning: #945200;
  --danger: #A62622;
  --focus-ring: #1F1A14;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

*::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  padding: 0;
  padding-bottom: env(safe-area-inset-bottom);
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Source Sans 3', 'Segoe UI', Tahoma, sans-serif;
  font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
  line-height: 1.5;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  -webkit-tap-highlight-color: transparent;
}

/* Base interactive cursor layer per R-39 */
a[href],
button:not(:disabled),
summary,
select:not(:disabled),
label[for],
input[type="checkbox"]:not(:disabled),
input[type="radio"]:not(:disabled),
[role="button"]:not([aria-disabled="true"]),
[role="tab"]:not([aria-disabled="true"]) {
  cursor: pointer;
}

button:disabled,
select:disabled,
input:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.65;
}

/* Visible high-contrast focus indicator per R-32 */
:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--accent);
  color: var(--accent-contrast-text);
  padding: 10px 16px;
  font-weight: 700;
  z-index: 1000;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

h1, h2, h3, h4 {
  font-family: 'Cinzel', 'Georgia', 'Times New Roman', serif;
  margin-top: 0;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

.accent-text {
  color: var(--accent);
}

/* Identity Motif: Guild double forged iron frame with corner rivets */
.iron-frame {
  background-color: var(--bg-surface);
  border: 2px solid var(--border-iron);
  border-radius: 2px;
  padding: 12px 14px;
  position: relative;
}

.iron-frame::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid var(--border-subtle);
  pointer-events: none;
}

/* Top HUD Header (Identity + Bars/Orbs left, Title center, Medallion Quick Actions right) */
.guild-header {
  background:
    linear-gradient(180deg, rgba(22, 19, 15, 0.55) 0%, rgba(12, 10, 8, 0.85) 100%),
    url('/ui-topbar-bg.png') center center / cover no-repeat #110f0d;
  border-bottom: 2px solid #594730;
  box-shadow: inset 0 -1px 0 rgba(212, 168, 79, 0.22), 0 4px 12px rgba(0, 0, 0, 0.78);
  padding: calc(6px + env(safe-area-inset-top)) calc(14px + env(safe-area-inset-right)) 6px calc(14px + env(safe-area-inset-left));
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.hud-left-cluster {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.hud-avatar-box {
  width: 44px;
  height: 44px;
  border: 2px solid #6b563a;
  border-radius: 3px;
  background-color: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.8);
}

.hud-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dash-portrait-img,
.combat-portrait-img {
  border-radius: 4px;
  border: 2px solid var(--accent);
  object-fit: cover;
  background-color: var(--bg-base);
  flex-shrink: 0;
}

.hud-identity-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.hud-bars-stack {
  display: none;
}

.hud-mini-track {
  width: 100%;
  height: 6px;
  background-color: var(--bg-base);
  border: 1px solid var(--border-subtle);
}

.hud-mini-fill {
  height: 100%;
  transition: width 0.2s linear;
}

.hud-hp-fill {
  background-color: var(--danger);
}

.hud-xp-fill {
  background-color: var(--accent);
}

.hud-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  font-size: 0.92rem;
}

.hud-dot {
  color: #7d6d56;
  font-size: 0.85rem;
}

.hud-lvl-text {
  color: #cbbda6;
  font-size: 0.84rem;
}

.hud-school-badge {
  font-size: 0.82rem;
  color: #b7a88f;
}

.hud-resources-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
}

.hud-resources-row .item-icon-xs,
.hud-logo-img,
.site-title-img {
  mix-blend-mode: lighten;
}

.hud-xp-bar-track {
  width: 96px;
  height: 7px;
  background-color: #090807;
  border: 1px solid #4e3f2b;
  border-radius: 1px;
  overflow: hidden;
  flex-shrink: 0;
}

.hud-xp-bar-fill {
  height: 100%;
  background-color: #E0A32E;
  transition: width 0.2s linear;
}

.hud-res-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hud-center-title {
  text-align: center;
}

.site-title {
  font-size: clamp(1.1rem, 0.95rem + 0.7vw, 1.45rem);
  margin: 0;
  color: var(--accent);
}

.hud-right-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.hud-icon-btn {
  min-width: 38px;
  min-height: 38px;
  padding: 2px;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid transparent;
  border-radius: 50%;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: transform 0.12s ease;
}

.hud-icon-btn:hover {
  transform: translateY(-1px);
}

.hud-btn-ring {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #786242;
  outline: 1px solid #261e14;
  background: radial-gradient(circle at 35% 28%, #2e271e 0%, #14110d 72%, #0c0a08 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: var(--accent);
  box-shadow: inset 0 1px 2px rgba(255, 220, 150, 0.2), 0 2px 6px rgba(0, 0, 0, 0.85);
}

.hud-ring-img {
  filter: brightness(1.2) contrast(1.08);
}

.hud-icon-btn:hover .hud-btn-ring {
  border-color: #f0c265;
  box-shadow: 0 0 8px rgba(240, 194, 101, 0.35);
}

.hud-badge-count {
  position: absolute;
  top: -5px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background-color: #A62622;
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hud-btn-label {
  display: none;
}

.inline-icon {
  flex-shrink: 0;
  vertical-align: middle;
}

.icon-heading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Buttons (compact on desktop to reduce vertical scrolling; 44px touch target restored below 1040px) */
.btn-primary,
.btn-secondary,
.btn-text {
  min-height: 36px;
  min-width: 36px;
  padding: 5px 12px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 4px;
  transition: background-color 0.15s ease, transform 0.1s ease, border-color 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--accent-contrast-text);
  border: 2px solid var(--accent);
  box-shadow: 0 0 10px rgba(224, 163, 46, 0.25);
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.1);
  border-color: var(--text-primary);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(1px);
}

.btn-secondary {
  background-color: var(--bg-elevated);
  color: var(--text-primary);
  border: 2px solid var(--border-iron);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--accent);
  background-color: var(--bg-base);
}

.btn-secondary:active:not(:disabled) {
  transform: translateY(1px);
}

.btn-secondary.active-mode {
  border-color: var(--accent);
  background-color: var(--bg-base);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.btn-text {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  padding: 6px 12px;
}

.btn-text:hover:not(:disabled) {
  color: var(--text-primary);
  border-color: var(--border-iron);
}

.full-width {
  width: 100%;
}

/* App Shell: Full-width locked frame; only main panel scrolls on desktop */
.app-shell {
  flex: 1;
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 204px;
  align-items: stretch;
}

.guild-main {
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  padding: 10px 12px;
  background-image: linear-gradient(rgba(17, 16, 14, 0.84), rgba(17, 16, 14, 0.92)), url('/hero-bg.png');
  background-size: cover;
  background-position: center top;
}

.guild-nav-sidebar {
  background:
    linear-gradient(180deg, rgba(16, 13, 10, 0.88) 0%, rgba(11, 9, 8, 0.96) 100%),
    url('/ui-panel-bg.png') center bottom / cover no-repeat #100e0b;
  border-left: 2px solid #594730;
  box-shadow: inset 1px 0 0 rgba(212, 168, 79, 0.16);
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sidebar-nav-header {
  background:
    linear-gradient(180deg, rgba(28, 24, 19, 0.65) 0%, rgba(15, 13, 10, 0.9) 100%),
    url('/ui-topbar-bg.png') center center / cover no-repeat #14110e;
  border-bottom: 1px solid #594730;
  padding: 10px 12px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-nav-header h2 {
  margin: 0;
  font-size: 0.88rem;
  color: #d9b974;
  letter-spacing: 0.16em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-nav-header h2::before,
.sidebar-nav-header h2::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(217, 185, 116, 0.45));
}

.sidebar-nav-header h2::after {
  background: linear-gradient(90deg, rgba(217, 185, 116, 0.45), transparent);
}

.sidebar-nav-body {
  flex: 1;
  padding: 8px 8px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  overflow-y: auto;
}

.nav-group-label {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #7d7262;
  border-top: 1px solid #2c241b;
  border-bottom: none;
  padding: 7px 6px 2px;
  margin-top: 4px;
  margin-bottom: 1px;
}

.nav-list-vertical {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-tab {
  width: 100%;
  min-height: 34px;
  padding: 4px 10px;
  background-color: transparent;
  color: #c5baa8;
  border: 1px solid transparent;
  border-radius: 3px;
  font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
  font-size: 0.89rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
}

.nav-medallion {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid #594730;
  background-color: rgba(18, 15, 12, 0.9);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-medallion svg {
  width: 14px;
  height: 14px;
}

.nav-tab:hover {
  background: rgba(200, 155, 69, 0.08);
  border-color: rgba(140, 109, 63, 0.45);
}

.nav-tab:hover .nav-medallion {
  border-color: #e4c27a;
  color: #e4c27a;
}

.nav-tab.active {
  background: linear-gradient(90deg, rgba(180, 136, 56, 0.22), rgba(22, 18, 14, 0.94));
  border-color: #d4a84f;
  color: #f3d796;
  box-shadow: 0 0 10px rgba(212, 168, 79, 0.24), inset 0 0 8px rgba(212, 168, 79, 0.14);
}

.nav-tab.active .nav-medallion {
  background-color: rgba(24, 20, 15, 0.95);
  border-color: #d4a84f;
  color: #f3d796;
}

.status-banner {
  background-color: var(--bg-elevated);
  border: 2px solid var(--accent);
  padding: 12px 16px;
  margin-bottom: 18px;
  font-weight: 600;
}

.section-heading {
  font-size: clamp(0.98rem, 0.9rem + 0.28vw, 1.15rem);
  margin-bottom: 2px;
}

.subsection-heading {
  font-size: 0.94rem;
  margin-bottom: 4px;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 0.82rem;
  margin-top: 0;
  margin-bottom: 8px;
  line-height: 1.35;
}

/* Dashboard (Pulpit Wiedźmina) */
.guest-notice-bar {
  margin-bottom: 12px;
  border-color: var(--accent);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.dash-crest-caption {
  font-family: 'Cinzel', 'Georgia', serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
}

.dashboard-summary {
  margin-bottom: 12px;
  background-image: linear-gradient(rgba(20, 18, 15, 0.85), rgba(20, 18, 15, 0.94)), url('/hero-bg.png');
  background-size: cover;
  background-position: center;
}

.dash-hero-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
}

.dash-portrait-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-iron);
}

.dash-identity-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.dash-name-big {
  font-family: 'Cinzel', 'Georgia', serif;
  font-size: 1.35rem;
  color: var(--text-primary);
}

.dash-params-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
}

.dash-param-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.94rem;
}

.dash-param-row span {
  color: var(--text-secondary);
}

.dash-param-val-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-attr-mini {
  min-height: 26px;
  min-width: 34px;
  padding: 2px 8px;
  font-size: 0.8rem;
  font-weight: 700;
}

.dashboard-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 18px;
  align-items: start;
}

.dash-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-daily-list,
.dash-notifications-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-daily-mini {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Activities Layout: Locked left KONTYNENT bar + scrollable center column (desktop) */
.guild-main.is-hunt-active {
  overflow: hidden;
  padding: 0;
}

#panel-hunt.active {
  height: 100%;
}

.activities-layout {
  display: grid;
  grid-template-columns: 248px 1fr;
  gap: 0;
  height: 100%;
  align-items: stretch;
}

.regions-directory {
  height: 100%;
  overflow: hidden;
  border-top: none;
  border-left: none;
  border-bottom: none;
  border-right: 2px solid var(--border-iron);
  border-radius: 0;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.regions-directory::after {
  display: none;
}

.directory-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 5px;
  flex-shrink: 0;
}

.regions-directory-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.region-dir-card {
  width: 100%;
  min-height: 36px;
  padding: 4px 8px;
  background-color: var(--bg-elevated);
  color: var(--text-primary);
  border: 2px solid var(--border-iron);
  border-radius: 3px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.region-dir-card:hover {
  border-color: var(--accent);
}

.region-dir-card.active {
  border-color: var(--accent);
  background-color: var(--bg-base);
}

.region-dir-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.quest-tag-mini {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 6px;
  border: 1px solid var(--accent);
  color: var(--accent);
}

.directory-roach-box {
  border-top: 1px solid var(--border-subtle);
  padding-top: 7px;
  flex-shrink: 0;
}

.directory-roach-box .subsection-heading {
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.directory-roach-box .small-note {
  margin: 0 0 6px;
  line-height: 1.3;
}

.directory-roach-box .btn-secondary {
  min-height: 32px;
  padding: 4px 8px;
  font-size: 0.84rem;
}

.activities-main-col {
  height: 100%;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.subregion-rows-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 6px;
}

.subregion-row-card {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-iron);
  padding: 6px 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.subregion-row-card.is-current {
  border: 2px solid var(--accent);
  background-color: var(--bg-base);
}

.subregion-row-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.subregion-row-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.level-pill {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 8px;
  border: 1px solid var(--success);
  color: var(--success);
}

.level-pill.locked {
  border-color: var(--border-iron);
  color: var(--text-secondary);
}

.arena-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.region-tag {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 2px;
}

.arena-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.combat-stage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 8px;
}

.combatant-box {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-iron);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.combatant-portrait {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

.combatant-portrait svg {
  width: 42px;
  height: 42px;
}

.placeholder-tag {
  font-size: 0.78rem;
  color: var(--text-secondary);
  border: 1px dashed var(--border-iron);
  padding: 4px 8px;
}

.combatant-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.bar-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  margin-bottom: 4px;
}

/* Progress bars: compact height */
.progress-track {
  width: 100%;
  height: 11px;
  background-color: var(--bg-base);
  border: 1px solid var(--border-iron);
  border-radius: 0;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  transition: width 0.2s linear;
}

.hp-fill {
  background-color: var(--success);
}

.monster-fill {
  background-color: var(--danger);
}

.accent-fill {
  background-color: var(--accent);
}

.combat-substats {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.combat-substats strong {
  color: var(--text-primary);
}

.swing-timer-block {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-iron);
  padding: 8px 12px;
  margin-bottom: 10px;
}

.combat-potions-bar {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-iron);
  padding: 8px 12px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.potions-bar-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.checkbox-inline input[type="checkbox"] {
  width: 20px;
  height: 20px;
}

.potions-buttons-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.potion-btn {
  flex: 1 1 180px;
}

.active-buffs-line {
  font-size: 0.88rem;
  color: var(--accent);
  font-weight: 600;
}

.active-shop-buffs-line {
  font-size: 0.85rem;
  color: var(--success);
  font-weight: 600;
}

.travel-progress-wrap {
  margin-bottom: 10px;
}

.sword-selector-bar {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-iron);
  padding: 8px 12px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sword-buttons-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sword-buttons-row button {
  flex: 1 1 220px;
}

.sword-effectiveness-note {
  font-size: 0.9rem;
  font-weight: 700;
}

.sword-warning {
  color: var(--danger);
}

.sword-optimal {
  color: var(--success);
}

.region-tabs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}

.region-tab-pill {
  min-height: 44px;
  padding: 6px 8px;
  font-size: 0.85rem;
  font-weight: 600;
  background-color: var(--bg-elevated);
  color: var(--text-primary);
  border: 2px solid var(--border-iron);
  border-radius: 3px;
  text-align: left;
}

.region-tab-pill.active {
  border-color: var(--accent);
  background-color: var(--bg-base);
  color: var(--accent);
}

#subregion-selector-list {
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

.backpack-heading {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.backpack-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding: 4px 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-iron);
}

.backpack-pagination-btns {
  display: flex;
  gap: 6px;
}

.backpack-grid-5x10 {
  display: grid;
  grid-template-columns: repeat(5, 52px);
  grid-auto-rows: 52px;
  gap: 6px;
  width: fit-content;
  background: rgba(10, 9, 8, 0.7);
  padding: 8px;
  border: 1px solid var(--border-iron);
  border-radius: 4px;
}

.backpack-slot-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  user-select: none;
}

.backpack-slot-cell.empty-slot {
  cursor: default;
  background: rgba(20, 18, 15, 0.35);
  border: 1px dashed rgba(255, 255, 255, 0.08);
}

.empty-slot-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.backpack-slot-cell.has-item:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
  z-index: 10;
}

.backpack-slot-cell.slot-relic {
  border-color: rgba(200, 140, 40, 0.6);
  background: linear-gradient(135deg, var(--bg-elevated) 60%, rgba(200, 140, 40, 0.15));
}

.backpack-cell-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d8c29d;
}

.backpack-cell-lvl {
  position: absolute;
  bottom: 2px;
  right: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 1px 2px #000;
  line-height: 1;
}

/* Tooltip on hover */
.backpack-item-tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 108%;
  left: 50%;
  transform: translateX(-50%);
  width: 250px;
  background: #14120f;
  border: 1px solid var(--accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.95), 0 0 12px rgba(200, 140, 40, 0.3);
  padding: 9px 12px;
  border-radius: 4px;
  z-index: 999;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.backpack-slot-cell.has-item:hover .backpack-item-tooltip {
  visibility: visible;
  opacity: 1;
}

.backpack-item-tooltip .tooltip-title {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
  color: #fff;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 4px;
}

.backpack-item-tooltip .tooltip-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 3px;
  color: #b7a88f;
}

.backpack-item-tooltip .tooltip-row strong {
  color: #e5d5be;
}

.backpack-item-tooltip .tooltip-action-hint {
  margin-top: 6px;
  padding-top: 4px;
  border-top: 1px dashed var(--border-subtle);
  font-size: 10px;
  color: var(--accent);
  text-align: center;
}

.rarity-relic {
  color: var(--accent);
}

.market-layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 12px;
  align-items: start;
}

.market-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.market-offer-card {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-iron);
  padding: 8px 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

/* ItemShop Grid Layout (Full width, compact) */
.shop-container,
.ranking-container {
  max-width: none;
  background-image: linear-gradient(rgba(20, 18, 15, 0.88), rgba(20, 18, 15, 0.95)), url('/hero-bg.png');
  background-size: cover;
  background-position: center;
}

.shop-bundle-banner {
  background-color: var(--bg-elevated);
  border: 2px solid var(--accent);
  padding: 8px 12px;
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.shop-catalog-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

.shop-item-row {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-iron);
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.shop-item-info {
  flex: 1 1 auto;
}

.shop-item-info .small-note {
  margin: 4px 0 0;
  font-size: 0.82rem;
}

.shop-variants-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.shop-variants-row button {
  flex: 1 1 auto;
}

/* Quests (Main Story + Daily Board - full width, low vertical height) */
.quests-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: none;
  align-items: start;
}

.active-quest-card,
.daily-quest-card {
  background-color: var(--bg-elevated);
  border: 2px solid var(--border-iron);
  padding: 9px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.active-quest-card {
  border-color: var(--accent);
}

.quest-act-tag {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
}

.quest-story-text {
  margin: 0;
  color: var(--text-secondary);
  font-style: italic;
  font-size: 0.86rem;
}

.quest-rewards-line {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--accent);
}

.daily-quests-list,
.quests-roadmap-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quests-roadmap-list {
  max-height: 205px;
  overflow-y: auto;
  padding-right: 4px;
}

.roadmap-item {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-iron);
  padding: 5px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.roadmap-item.is-done {
  opacity: 0.72;
}

.roadmap-item.is-current {
  border-color: var(--accent);
}

.quests-side-col {
  grid-column: 1 / -1;
}

.side-quests-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}

/* 5 NPCs & Investigation Dialogues */
.npc-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 14px;
  align-items: start;
}

.npc-roster-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.npc-roster-card {
  width: 100%;
  text-align: left;
  background-color: var(--bg-elevated);
  color: var(--text-primary);
  border: 2px solid var(--border-iron);
  border-radius: 3px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.npc-roster-card:hover {
  border-color: var(--accent);
}

.npc-roster-card.active {
  border-color: var(--accent);
  background-color: var(--bg-base);
}

.npc-roster-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.npc-roster-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.npc-roster-avatar {
  width: 42px;
  height: 42px;
  border-radius: 3px;
  border: 1px solid var(--border-iron);
  object-fit: cover;
  flex-shrink: 0;
  background-color: var(--bg-base);
}

.npc-roster-card.active .npc-roster-avatar {
  border-color: var(--accent);
}

.npc-roster-meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.npc-active-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.npc-active-avatar {
  width: 60px;
  height: 60px;
  border-radius: 4px;
  border: 2px solid var(--accent);
  object-fit: cover;
  flex-shrink: 0;
  background-color: var(--bg-base);
}

.npc-dialogue-card {
  background-color: var(--bg-elevated);
  border: 2px solid var(--border-iron);
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.npc-dialogue-card.has-active-clue {
  border-color: var(--accent);
}

.npc-clue-quote {
  margin: 0;
  padding: 8px 10px;
  background-color: var(--bg-base);
  border-left: 3px solid var(--accent);
  font-style: italic;
  color: var(--text-primary);
}

.bestiary-grid,
.estate-grid,
.gwent-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  gap: 8px;
}

.set-card,
.gwent-card,
.estate-card,
.bestiary-card {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-iron);
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.9rem;
}

.gwent-card.owned {
  border-color: var(--accent);
}

.gwent-card.locked {
  opacity: 0.65;
}

.gwent-arena-box {
  background-color: var(--bg-elevated);
  background-image: linear-gradient(rgba(22, 20, 17, 0.85), rgba(22, 20, 17, 0.94)), url('/hero-bg.png');
  background-size: cover;
  background-position: center;
  border: 2px solid var(--border-iron);
  padding: 9px 12px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.world-boss-card {
  background-color: var(--bg-elevated);
  background-image: linear-gradient(rgba(22, 20, 17, 0.84), rgba(22, 20, 17, 0.93)), url('/enemies/wb_caretaker.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: right center;
  border: 2px solid var(--accent);
  padding: 9px 12px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.equip-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Horse & PvP Arena */
.horse-stats-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pvp-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 20px;
  align-items: start;
}

.pvp-my-stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.vital-chip {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-iron);
  border-radius: 2px;
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 120px;
}

.vital-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.afk-session-bar {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.afk-session-track {
  height: 7px;
}

.afk-session-bar.is-expired #hunt-session-timer {
  color: #F28B82;
}

.loot-accordion {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-iron);
  border-radius: 2px;
}

.loot-accordion-summary {
  list-style: none;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.loot-accordion-summary::-webkit-details-marker {
  display: none;
}

.loot-accordion-summary:hover {
  background-color: var(--bg-surface);
}

.loot-summary-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.loot-summary-title {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.loot-chevron {
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid var(--border-iron);
  padding: 4px 10px;
  border-radius: 2px;
  background-color: var(--bg-base);
}

.loot-chevron::after {
  content: "Rozwiń ▾";
}

.loot-accordion[open] .loot-chevron::after {
  content: "Ukryj ▴";
}

.loot-accordion-body {
  border-top: 1px solid var(--border-subtle);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.loot-drops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 6px;
}

.loot-drop-chip {
  background-color: var(--bg-base);
  border: 1px solid var(--border-subtle);
  padding: 5px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
}

.loot-drop-chance {
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

.loot-special-block {
  border-top: 1px dashed var(--border-subtle);
  padding-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.86rem;
}

/* Sidebar */
.trail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.region-selector-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.region-btn {
  min-height: 54px;
  width: 100%;
  text-align: left;
  background-color: var(--bg-elevated);
  color: var(--text-primary);
  border: 2px solid var(--border-iron);
  border-radius: 3px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.region-btn:hover {
  border-color: var(--accent);
}

.region-btn.active {
  border-color: var(--accent);
  background-color: var(--bg-base);
}

.region-btn-top {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.region-req {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 700;
}

.region-sub {
  font-size: 0.83rem;
  color: var(--text-secondary);
}

.small-note {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 0;
  margin-bottom: 10px;
}

.log-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.combat-log-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
}

.log-entry {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  padding: 6px 10px;
}

/* Panel 2: Forge Layout (Full width, low vertical height) */
.forge-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: none;
  align-items: start;
}

.equipment-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.equip-item-btn {
  width: 100%;
  min-height: 44px;
  background-color: var(--bg-elevated);
  color: var(--text-primary);
  border: 2px solid var(--border-iron);
  border-radius: 3px;
  padding: 6px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  font-size: 0.88rem;
}

.equip-item-btn:hover {
  border-color: var(--accent);
}

.equip-item-btn.selected {
  border-color: var(--accent);
  background-color: var(--bg-base);
}

.equip-slot-tag {
  display: block;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.equip-plus-badge {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
  padding: 4px 10px;
  border: 1px solid var(--border-iron);
  background-color: var(--bg-surface);
}

.anvil-detail-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.anvil-item-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
}

.anvil-slot-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.anvil-item-title {
  margin: 2px 0 0;
  font-size: 1.15rem;
}

.anvil-comparison {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-iron);
  padding: 10px 12px;
}

.anvil-stat-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.anvil-stat-col strong {
  font-size: 1.15rem;
  font-family: 'Cinzel', Georgia, serif;
}

.highlight-col strong {
  color: var(--accent);
}

.anvil-odds-box {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-iron);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.odds-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.req-list {
  margin: 8px 0 0;
  padding-left: 20px;
}

.blessing-toggle-box {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-iron);
  padding: 12px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 44px;
}

.checkbox-label input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  flex-shrink: 0;
}

.forge-feedback {
  background-color: var(--bg-elevated);
  border: 2px solid var(--border-iron);
  padding: 12px 14px;
  font-weight: 600;
}

/* Panel 3: Signs & Alchemy (Full width, multi-column compact height) */
.signs-section,
.alchemy-bench {
  max-width: none;
}

.signs-section {
  margin-bottom: 12px;
}

.section-header-split {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.resource-badge {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-iron);
  padding: 5px 10px;
  font-size: 0.86rem;
}

.signs-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.sign-item-box {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-iron);
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}

.sign-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.9rem;
}

.sign-tier-label {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 700;
  color: var(--accent);
}

.alchemy-recipes-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.alchemy-row {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-iron);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  gap: 6px;
}

.alchemy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Panel 4: Character Attributes & School */
.character-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 22px;
  align-items: start;
}

.attributes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.attr-row {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-iron);
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.attr-row p {
  margin: 4px 0 0;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.attr-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.attr-val {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  min-width: 36px;
  text-align: center;
}

.schools-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.school-option-btn {
  width: 100%;
  min-height: 60px;
  background-color: var(--bg-elevated);
  color: var(--text-primary);
  border: 2px solid var(--border-iron);
  border-radius: 3px;
  padding: 12px 14px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.school-option-btn.selected {
  border-color: var(--accent);
  background-color: var(--bg-base);
}

.school-bonus-line {
  font-size: 0.84rem;
  color: var(--accent);
  font-weight: 600;
}

/* Panel 5: Ranking Table & UI States (R-27) */
.ui-state-box {
  background-color: var(--bg-elevated);
  border: 2px solid var(--border-iron);
  padding: 24px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.ui-state-box.error-state {
  border-color: var(--danger);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.guild-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.guild-table th,
.guild-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-iron);
}

.guild-table th {
  background-color: var(--bg-elevated);
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.88rem;
}

.guild-table tr:hover td {
  background-color: var(--bg-elevated);
}

/* Footer */
.guild-footer {
  background-color: var(--bg-surface);
  border-top: 2px solid var(--border-iron);
  padding: 14px 16px;
  margin-top: auto;
}

.footer-inner {
  width: 100%;
  max-width: none;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.footer-inner p {
  margin: 0;
}

/* Modals (Only element using elevation shadow per R-12) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(10, 9, 8, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 900;
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal-dialog {
  width: 100%;
  max-width: 540px;
  max-height: 90dvh;
  overflow-y: auto;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.75);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-group label {
  font-weight: 600;
}

.form-group input,
.form-group select {
  min-height: 44px;
  padding: 8px 12px;
  background-color: var(--bg-base);
  color: var(--text-primary);
  border: 2px solid var(--border-iron);
  border-radius: 3px;
  font-family: inherit;
  font-size: 1rem;
}

.form-feedback {
  margin-bottom: 12px;
  font-weight: 600;
  min-height: 24px;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Welcome Gate (Landing Screen for First-Time / Logged-Out Visitors) */
.welcome-gate {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background-color: #0D0C0A;
  overflow-y: auto;
}

.welcome-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.welcome-scrim {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(17, 16, 14, 0.58) 0%, rgba(10, 9, 8, 0.88) 100%);
  pointer-events: none;
}

.welcome-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 600px;
  background-color: rgba(20, 18, 15, 0.94);
  padding: clamp(20px, 4vw, 34px);
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
}

.welcome-title {
  font-size: clamp(1.65rem, 1.3rem + 1.5vw, 2.3rem);
  color: #E0A32E;
  margin-bottom: 10px;
}

.welcome-subtitle {
  color: #C8BDAA;
  font-size: 0.95rem;
  margin: 0 auto 20px;
  max-width: 480px;
}

.welcome-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.welcome-stat-box {
  background-color: #12100D;
  border: 1px solid #4A4238;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.welcome-stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: #C8BDAA;
}

.welcome-stat-val {
  font-family: 'Cinzel', 'Georgia', serif;
  font-size: 1.25rem;
  color: #EDE4D3;
}

.welcome-online-val {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #59B368;
}

.online-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: #59B368;
  flex-shrink: 0;
}

.welcome-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.welcome-actions button {
  min-width: 160px;
  min-height: 44px;
}

.welcome-guest-wrap {
  margin-top: 6px;
}

/* Multi-breakpoint reflow (Desktop -> Tablet/Small Laptop -> Mobile per R-03 & antislop-layoutmobile) */
@media (max-width: 1040px) {
  body {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .guild-header {
    position: sticky;
    top: 0;
    z-index: 500;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hud-center-title {
    display: none;
  }

  .hud-right-actions {
    justify-content: flex-start;
  }

  .app-shell {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .guild-main,
  .guild-main.is-hunt-active {
    height: auto;
    overflow: visible;
    padding: 14px;
  }

  #panel-hunt.active {
    height: auto;
  }

  .activities-layout {
    height: auto;
    gap: 12px;
  }

  .regions-directory {
    height: auto;
    overflow: visible;
    border: 2px solid var(--border-iron);
    border-radius: 2px;
    padding: 12px 14px;
  }

  .regions-directory::after {
    display: block;
  }

  .activities-main-col {
    height: auto;
    overflow: visible;
    padding: 0;
  }

  .guild-nav-sidebar {
    order: -1;
    height: auto;
    overflow: visible;
    border-left: none;
    border-bottom: 2px solid var(--border-iron);
  }

  .nav-list-vertical {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
    gap: 6px;
  }

  .hunt-layout,
  .activities-layout,
  .dashboard-bottom-grid,
  .dash-hero-grid,
  .dash-params-grid,
  .forge-layout,
  .character-layout,
  .market-layout,
  .quests-layout,
  .side-quests-split,
  .npc-layout,
  .pvp-layout,
  .subregion-rows-list,
  .alchemy-recipes-list,
  .equipment-list {
    grid-template-columns: 1fr;
  }

  .signs-row,
  .shop-catalog-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .btn-primary,
  .btn-secondary,
  .btn-text,
  .nav-tab {
    min-height: 44px;
    padding: 6px 10px;
  }

  .btn-attr-mini {
    min-width: 44px;
  }
}

@media (max-width: 680px) {
  .combat-stage,
  .signs-row,
  .shop-catalog-list,
  .welcome-stats-grid {
    grid-template-columns: 1fr;
  }

  .anvil-comparison {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .nav-list-vertical {
    grid-template-columns: 1fr 1fr;
  }

  .nav-tab {
    padding: 6px 8px;
    font-size: 0.86rem;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Brand Logo, Title Banner & Dark-Fantasy Item Icons */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.welcome-logo-img {
  display: block;
  margin: 0 auto 8px;
  border-radius: 50%;
  border: 1px solid rgba(212, 168, 67, 0.45);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.75);
  object-fit: cover;
}

.welcome-title-img {
  display: block;
  width: min(360px, 92%);
  height: auto;
  margin: 0 auto 10px;
  mix-blend-mode: lighten;
}

.hud-center-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.hud-logo-img {
  border-radius: 50%;
  border: 1px solid rgba(212, 168, 67, 0.4);
  object-fit: cover;
  flex-shrink: 0;
}

.site-title-img {
  height: 38px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  mix-blend-mode: lighten;
}

.item-icon-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 3px;
  flex-shrink: 0;
}

.item-icon-sm {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 3px;
  vertical-align: middle;
}

.item-icon-xs {
  width: 21px;
  height: 21px;
  object-fit: contain;
  border-radius: 0;
  vertical-align: middle;
  mix-blend-mode: lighten;
  background: transparent;
}

.backpack-cell-icon .item-icon-img {
  width: 42px;
  height: 42px;
  border-radius: 4px;
}

.equip-title-row .item-icon-img {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-iron);
  background: rgba(0, 0, 0, 0.45);
}

.alchemy-recipe-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.alchemy-recipe-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-iron);
  border-radius: 4px;
  flex-shrink: 0;
}

.alchemy-recipe-icon .item-icon-img {
  width: 32px;
  height: 32px;
}

.nav-medallion-img,
.hud-ring-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.card-art-img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border-iron);
  flex-shrink: 0;
}

/* Arena World Boss & Player Stage */
.wb-arena-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 10px 0;
  padding: 10px 14px;
  background: rgba(12, 10, 8, 0.65);
  border: 1px solid var(--border-iron);
  border-radius: 4px;
}

.wb-combatant-player,
.wb-combatant-boss {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.wb-boss-hp-head {
  width: 180px;
}

.wb-avatar-img,
.wb-boss-img {
  border-radius: 6px;
  border: 1px solid var(--accent);
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
}

.wb-vs-badge {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 2px;
}

/* Full-tab backgrounds for Kuźnia & Wierzchowiec under translucent frames (covers full viewport height) */
#panel-blacksmith {
  min-height: calc(100vh - 130px);
  background: linear-gradient(rgba(14, 12, 10, 0.25) 0%, rgba(14, 12, 10, 0.65) 55%, rgba(14, 12, 10, 0.85) 100%), url('/blacksmith-bg.png') center top / cover no-repeat #11100E;
  border-radius: 6px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

#panel-blacksmith[hidden] {
  display: none;
}

.blacksmith-equip-picker {
  display: grid;
  grid-template-columns: repeat(6, 48px);
  gap: 6px;
  margin-bottom: 8px;
}

.blacksmith-icon-tile.is-selected {
  border-color: #ef4444 !important;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.65), inset 0 0 8px rgba(239, 68, 68, 0.3);
}

.blacksmith-icon-tile.selected-for-anvil {
  border-color: #f5b942;
  box-shadow: 0 0 10px rgba(245, 185, 66, 0.5), inset 0 0 8px rgba(245, 185, 66, 0.25);
}

#panel-horse {
  min-height: calc(100vh - 130px);
  background: linear-gradient(rgba(14, 12, 10, 0.52), rgba(14, 12, 10, 0.75)), url('/stable-bg.png') center center / cover no-repeat #11100E;
  border-radius: 6px;
  padding: 10px;
}

#blacksmith-npc-shop {
  display: block;
  width: 100%;
}

#panel-blacksmith .iron-frame,
#panel-horse .iron-frame {
  background-color: rgba(20, 18, 15, 0.85);
  backdrop-filter: blur(2px);
  padding: 8px 10px;
}

#panel-forge .iron-frame {
  background-color: rgba(20, 18, 15, 0.85);
  padding: 8px 10px;
}

#panel-blacksmith .forge-layout {
  gap: 8px;
  margin-top: 6px !important;
  align-items: end;
}

#panel-horse .character-layout {
  gap: 8px;
  margin-top: 6px !important;
}

#panel-horse .section-heading,
#panel-blacksmith .section-heading,
#panel-forge .section-heading {
  font-size: 0.96rem;
  margin-bottom: 2px;
}

#panel-horse .section-desc,
#panel-blacksmith .section-desc,
#panel-forge .section-desc {
  font-size: 0.76rem;
  margin-bottom: 6px;
}

#panel-horse .alchemy-row {
  padding: 4px 8px;
  font-size: 0.8rem;
}

#panel-horse .alchemy-recipes-list {
  gap: 4px;
}

#panel-horse .npc-active-avatar {
  width: 40px;
  height: 40px;
}

#panel-horse .horse-stats-box .anvil-odds-box {
  margin-top: 6px !important;
  padding: 6px 8px;
  font-size: 0.8rem;
}

#panel-horse .modal-actions {
  margin-top: 8px !important;
}

/* Compact Ekwipunek scaling */
#panel-forge .paperdoll-frame {
  padding: 8px;
  margin-bottom: 4px;
}

#panel-forge .paperdoll-grid {
  grid-template-columns: repeat(4, 54px);
  grid-template-rows: repeat(3, 54px);
  gap: 5px;
}

#panel-forge .paperdoll-slot .item-icon-img {
  width: 36px;
  height: 36px;
}

#panel-forge .backpack-grid-5x10 {
  grid-template-columns: repeat(5, 44px);
  grid-auto-rows: 44px;
  gap: 4px;
  padding: 6px;
}

#panel-forge .backpack-cell-icon .item-icon-img {
  width: 34px;
  height: 34px;
}

#panel-forge .bestiary-grid {
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 5px;
}

#panel-forge .bestiary-card {
  padding: 5px 8px;
  font-size: 0.76rem;
}

#panel-forge .forge-subblock {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

#panel-forge .subsection-heading {
  font-size: 0.86rem;
  margin-bottom: 4px;
}

#panel-forge .blacksmith-icon-tile {
  width: 50px;
  height: 50px;
}

#panel-forge .blacksmith-icon-tile .item-icon-img {
  width: 34px;
  height: 34px;
}

/* Compact Kuźnia scaling */
#panel-blacksmith .anvil-detail-box {
  gap: 5px;
  font-size: 0.8rem;
}

#panel-blacksmith .anvil-item-header {
  padding-bottom: 4px;
}

#panel-blacksmith .anvil-item-title {
  font-size: 1.02rem;
}

#panel-blacksmith .anvil-comparison {
  padding: 6px 10px;
}

#panel-blacksmith .anvil-stat-col strong {
  font-size: 1rem;
}

#panel-blacksmith .anvil-odds-box {
  padding: 7px 10px;
  gap: 3px;
}

#panel-blacksmith .anvil-requirements h4 {
  margin: 0 0 2px;
  font-size: 0.82rem;
}

#panel-blacksmith .req-list {
  margin: 2px 0 0;
  line-height: 1.35;
}

#panel-blacksmith .anvil-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.blessing-checkbox-hidden {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.blessing-toggle-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 4px 10px;
  background: rgba(24, 20, 16, 0.92);
  border: 1px solid var(--border-iron);
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.blessing-toggle-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.blessing-toggle-btn.active {
  border-color: #f5b942;
  background: linear-gradient(135deg, rgba(46, 35, 16, 0.95), rgba(24, 20, 14, 0.95));
  color: #f5cf67;
  box-shadow: 0 0 8px rgba(245, 185, 66, 0.35), inset 0 0 6px rgba(245, 185, 66, 0.15);
}

.blessing-btn-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  mix-blend-mode: lighten;
}

#panel-blacksmith .blacksmith-icon-tile {
  width: 50px;
  height: 50px;
}

#panel-blacksmith .blacksmith-icon-tile .item-icon-img {
  width: 34px;
  height: 34px;
}

.account-hero-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Compact Blacksmith Icon Grid (Shop & Sell) */
.blacksmith-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 6px;
  width: 100%;
}

.blacksmith-icon-tile {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 16, 13, 0.92);
  border: 1px solid #6b583d;
  border-radius: 6px;
  cursor: pointer;
  padding: 6px;
  transition: border-color 0.15s ease, transform 0.1s ease;
}

.blacksmith-icon-tile:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  z-index: 15;
}

.blacksmith-icon-tile.slot-relic {
  border-color: #c88c28;
  background: linear-gradient(135deg, rgba(24, 20, 15, 0.95) 60%, rgba(200, 140, 40, 0.18));
}

.blacksmith-icon-tile .item-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: lighten;
}

.bs-tile-price {
  position: absolute;
  bottom: 2px;
  right: 3px;
  font-size: 9px;
  font-weight: 700;
  color: #f5cf67;
  background: rgba(12, 10, 8, 0.85);
  padding: 1px 3px;
  border-radius: 2px;
  line-height: 1.1;
}

.bs-tile-price.sell-price {
  color: #4ade80;
}

.bs-tile-lvl {
  position: absolute;
  top: 2px;
  left: 3px;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(12, 10, 8, 0.8);
  padding: 1px 3px;
  border-radius: 2px;
  line-height: 1.1;
}

.blacksmith-icon-tile:hover .backpack-item-tooltip {
  visibility: visible;
  opacity: 1;
}

/* Hearthstone-style Ornate TCG Card */
.tcg-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 8px 14px;
  background: linear-gradient(180deg, #27221d 0%, #171411 100%);
  border: 2px solid #5c4b34;
  border-radius: 10px;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.85), 0 4px 10px rgba(0, 0, 0, 0.6);
  text-align: center;
}

.tcg-card.rarity-hero {
  border-color: #d4a843;
}

.tcg-card.rarity-rare {
  border-color: #5b8ec9;
}

.tcg-card.locked {
  filter: grayscale(0.85) brightness(0.65);
}

.tcg-portrait-oval {
  width: 92px;
  height: 106px;
  border-radius: 50% 50% 45% 45%;
  overflow: hidden;
  border: 2px solid #8a7352;
  box-shadow: inset 0 0 8px #000, 0 2px 6px rgba(0, 0, 0, 0.8);
  margin-bottom: -10px;
  z-index: 1;
}

.tcg-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tcg-ribbon-title {
  position: relative;
  z-index: 2;
  width: 96%;
  padding: 4px 6px;
  background: linear-gradient(90deg, #4b3923 0%, #7c5f37 50%, #4b3923 100%);
  border: 1px solid #cfa355;
  border-radius: 4px;
  color: #fff6df;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  text-shadow: 0 1px 2px #000;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

.tcg-parchment-box {
  width: 92%;
  margin-top: 4px;
  padding: 6px 8px 8px;
  background: linear-gradient(180deg, #d7c7a7 0%, #bfae8a 100%);
  border: 1px solid #756145;
  border-radius: 4px;
  color: #211912;
  min-height: 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.tcg-faction {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #5c4630;
  font-weight: 700;
}

.tcg-effect {
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.25;
}

.tcg-power-badge {
  position: absolute;
  bottom: -6px;
  left: -6px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #f7cf67, #9c6a1b);
  border: 2px solid #2b1d0b;
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 1px 2px #000;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
}

.tcg-rarity-gem {
  position: absolute;
  bottom: 4px;
  right: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid #1b140d;
  background: #9ca3af;
}

.tcg-card.rarity-rare .tcg-rarity-gem {
  background: #3b82f6;
}

.tcg-card.rarity-hero .tcg-rarity-gem {
  background: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
}

/* Ornate Paper-Doll Ekwipunek (Metin2 / Dark-Fantasy style) */
.paperdoll-frame {
  background: radial-gradient(circle at center, #1e1a15 0%, #100e0c 100%);
  border: 2px solid #5c4b34;
  border-radius: 6px;
  padding: 12px;
  max-width: 360px;
  margin: 0 auto 10px;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.9);
}

.paperdoll-title {
  text-align: center;
  font-family: var(--font-heading);
  color: #e6c678;
  font-size: 0.95rem;
  letter-spacing: 2px;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(212, 168, 67, 0.3);
}

.paperdoll-grid {
  display: grid;
  grid-template-columns: repeat(4, 66px);
  grid-template-rows: repeat(3, 66px);
  gap: 8px;
  justify-content: center;
}

.paperdoll-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(12, 10, 8, 0.85);
  border: 1px solid #756145;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.85);
  cursor: pointer;
  padding: 4px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.paperdoll-slot::before {
  content: '';
  position: absolute;
  inset: 2px;
  border: 1px solid rgba(212, 168, 67, 0.22);
  pointer-events: none;
}

.paperdoll-slot.selected {
  border-color: #f5b942;
  box-shadow: 0 0 12px rgba(245, 185, 66, 0.45), inset 0 0 10px rgba(245, 185, 66, 0.2);
}

.paperdoll-slot.tall-slot {
  grid-row: span 2;
}

.paperdoll-slot.slot-steel { grid-column: 1; grid-row: 1 / span 2; }
.paperdoll-slot.slot-trophy { grid-column: 2; grid-row: 1; }
.paperdoll-slot.slot-silver { grid-column: 3; grid-row: 1 / span 2; }
.paperdoll-slot.slot-gauntlets { grid-column: 4; grid-row: 1; }
.paperdoll-slot.slot-armor { grid-column: 2; grid-row: 2 / span 2; }
.paperdoll-slot.slot-boots { grid-column: 4; grid-row: 2; }

.paperdoll-slot .item-icon-img {
  width: 44px;
  height: 44px;
  mix-blend-mode: lighten;
}

.paperdoll-slot-lvl {
  position: absolute;
  bottom: 2px;
  right: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 1px 2px #000;
}

.paperdoll-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-width: 360px;
  margin: 0 auto;
}

/* Backpack selection & toolbar */
.backpack-slot-cell.is-selected {
  border-color: #ef4444 !important;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.65), inset 0 0 8px rgba(239, 68, 68, 0.3);
}

.backpack-controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
}

.backpack-select-input {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-iron);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.backpack-select-input:hover {
  border-color: var(--accent);
}

.backpack-select-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 6px rgba(200, 140, 40, 0.4);
}

.backpack-select-input option {
  background-color: #14120f;
  color: #eae5d9;
}

/* Bestiary Open Book Layout */
.bestiary-book-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bestiary-continent-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bestiary-book-spread {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  padding: 24px 30px;
  min-height: 520px;
  background: linear-gradient(rgba(16, 13, 10, 0.35), rgba(16, 13, 10, 0.42)), url('/bestiary-book-bg.png') center center / 100% 100% no-repeat #1a1612;
  border: 2px solid var(--border-iron);
  border-radius: 6px;
}

.bestiary-book-page {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 560px;
  overflow-y: auto;
  padding: 6px 10px;
}

.bestiary-page-title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.98rem;
  color: #f5cf67;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  border-bottom: 1px solid rgba(200, 140, 40, 0.45);
  padding-bottom: 4px;
  margin: 0 0 4px;
}

.bestiary-page-entries {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.bestiary-book-card {
  background: rgba(18, 15, 12, 0.84);
  border: 1px solid rgba(130, 104, 66, 0.65);
  border-radius: 5px;
  padding: 6px 8px;
  font-size: 0.78rem;
}

.bestiary-sub-meta {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.bestiary-empty-note {
  color: #eae5d9;
  background: rgba(18, 15, 12, 0.78);
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
}

@media (max-width: 900px) {
  .bestiary-book-spread {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px;
    background-size: cover;
  }
}

/* Compact Relic Racks Mini-Inventory (Słoneczna Winnica) */
.racks-mini-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rack-mini-slot {
  position: relative;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-iron);
  border-radius: 4px;
  cursor: pointer;
}

.rack-mini-slot.is-mounted {
  border-color: #d4a843;
  box-shadow: 0 0 10px rgba(212, 168, 67, 0.4);
  background: linear-gradient(135deg, var(--bg-elevated), rgba(212, 168, 67, 0.16));
}

.rack-mini-slot .item-icon-img {
  width: 40px;
  height: 40px;
}

.rack-mini-slot:hover .backpack-item-tooltip {
  visibility: visible;
  opacity: 1;
}

.forge-banner-overlay,
.stable-banner-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(to top, rgba(17, 16, 14, 0.92), rgba(17, 16, 14, 0.45));
}

.stable-banner-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.stable-horse-avatar {
  border-radius: 6px;
  border: 1px solid var(--accent);
  object-fit: cover;
}

/* Compact spacing across tabs to minimize scrolling */
.iron-frame {
  padding: 12px 14px;
}

.section-heading {
  margin-bottom: 4px;
  font-size: 1.08rem;
}

.section-desc {
  margin-bottom: 10px;
  font-size: 0.85rem;
}

.alchemy-row {
  padding: 8px 10px;
}


/* ==========================================================================
   KONCEPCJA ZAKŁADKI EKWIPUNEK (DARK FANTASY RPG - MONSTER SLAYER IDLE)
   ========================================================================== */
#panel-forge.active:not([hidden]) {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

#panel-forge .eq-concept-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 14px;
  align-items: stretch;
}

#panel-forge .eq-left-chamber,
#panel-forge .eq-right-chamber {
  background:
    linear-gradient(180deg, rgba(16, 14, 11, 0.72) 0%, rgba(12, 10, 8, 0.88) 100%),
    url('/ui-panel-bg.png') center bottom / cover no-repeat #12100d;
  border: 2px solid #5e4b32;
  box-shadow: inset 0 0 0 1px rgba(212, 168, 79, 0.16), inset 0 0 28px rgba(0, 0, 0, 0.88), 0 8px 20px rgba(0, 0, 0, 0.75);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

#panel-forge .eq-left-chamber {
  position: relative;
  z-index: 50;
  overflow: visible;
}

#panel-forge .eq-right-chamber {
  position: relative;
  z-index: 10;
  overflow: visible;
}

#panel-forge .equipment-list {
  flex: 1;
  display: flex;
  flex-direction: column;
}

#panel-forge #backpack-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: visible;
}

#panel-forge .eq-slate-grid {
  flex: 0 0 auto;
  align-content: start;
}

.eq-chamber-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(197, 155, 72, 0.35);
  background: linear-gradient(90deg, transparent, rgba(200, 155, 69, 0.08), transparent);
}

.eq-chamber-header .section-heading {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e4c27a;
}

.eq-capacity-pill {
  font-size: 0.8rem;
  color: #cbb894;
  background: transparent;
  border: none;
  padding: 0 4px 0 0;
}

/* Hunter Stage: Miecz Stalowy | Sylwetka + Rynsztunek + Runy | Miecz Srebrny */
.eq-header-centered {
  justify-content: center;
  position: relative;
}

.eq-header-centered .section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  justify-content: center;
}

.eq-header-centered .section-heading::before,
.eq-header-centered .section-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(197, 155, 72, 0.45));
}

.eq-header-centered .section-heading::after {
  background: linear-gradient(90deg, rgba(197, 155, 72, 0.45), transparent);
}

.eq-hunter-stage {
  width: 100%;
  flex: 1;
  min-height: 360px;
  display: grid;
  grid-template-columns: 112px 1fr 112px;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  background:
    linear-gradient(180deg, rgba(12, 10, 8, 0.08) 0%, rgba(12, 10, 8, 0.35) 58%, rgba(10, 9, 7, 0.92) 100%),
    radial-gradient(ellipse at 50% 42%, transparent 34%, rgba(10, 9, 7, 0.88) 84%),
    url('/eq-hunter-scene.png') center top / cover no-repeat #100e0b;
  border: 1px solid #4a3c28;
  border-radius: 4px;
  position: relative;
  overflow: visible;
}

.eq-wing-label {
  font-size: 0.78rem;
  color: #cbb894;
  text-shadow: 0 1px 4px #000;
  letter-spacing: 0.02em;
  text-align: center;
  margin-bottom: -2px;
}

.eq-preset-switch {
  position: absolute;
  top: 44px;
  right: 18px;
  display: flex;
  gap: 4px;
  z-index: 20;
}

.eq-preset-switch .btn-attr-mini {
  padding: 2px 7px;
  font-size: 0.72rem;
  min-height: 22px;
  opacity: 0.86;
}

.eq-preset-switch .btn-attr-mini:hover {
  opacity: 1;
}

.eq-weapon-wing {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 100;
}

.eq-weapon-wing:hover,
.eq-weapon-wing:focus-within {
  z-index: 2000;
}

.eq-slot-card {
  position: relative;
  width: 100%;
  background: linear-gradient(180deg, rgba(24, 21, 17, 0.92) 0%, rgba(12, 10, 8, 0.96) 100%);
  border: 1px solid #594730;
  border-radius: 3px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.eq-slot-card:hover {
  border-color: #e4b962;
  box-shadow: 0 0 12px rgba(228, 185, 98, 0.25);
  z-index: 50000;
}

.eq-slot-card:hover .backpack-item-tooltip {
  visibility: visible;
  opacity: 1;
  z-index: 999999;
}

.eq-sword-slot .backpack-item-tooltip {
  top: 0;
  bottom: auto;
  transform: none;
}

.eq-weapon-wing-left .backpack-item-tooltip,
.eq-sword-slot-left .backpack-item-tooltip {
  left: 0;
  right: auto;
  top: 0;
  bottom: auto;
  transform: none;
  z-index: 999999;
}

/* Prawy miecz: tooltip kotwiczony do prawej krawędzi slotu, aby nie wychodził poza prawą komorę */
.eq-weapon-wing:last-of-type .backpack-item-tooltip,
.eq-weapon-wing-right .backpack-item-tooltip,
.eq-sword-slot-right .backpack-item-tooltip {
  left: auto;
  right: 0;
  top: 0;
  bottom: auto;
  transform: none;
  z-index: 999999;
}

.eq-slot-card.selected {
  border-color: #f5c869;
  box-shadow: 0 0 14px rgba(245, 200, 105, 0.45), inset 0 0 10px rgba(245, 200, 105, 0.18);
}

.eq-slot-card.is-set-piece {
  border-color: #4f6e58;
  box-shadow: inset 0 0 8px rgba(79, 110, 88, 0.18);
}

.eq-slot-card.is-relic-piece {
  border-color: #b8842e;
  box-shadow: inset 0 0 8px rgba(184, 132, 46, 0.22);
}

.eq-stat-label-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.eq-sword-slot {
  min-height: 270px;
  background:
    radial-gradient(circle at center, rgba(46, 38, 28, 0.35) 0%, rgba(12, 10, 8, 0.86) 100%);
  box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.85);
}

.eq-center-core {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 222px;
  gap: 6px;
  position: relative;
  z-index: 80;
}

.eq-core-matrix {
  display: grid;
  grid-template-columns: repeat(3, 75px);
  grid-template-rows: repeat(3, 75px);
  gap: 7px;
  align-items: center;
  justify-items: center;
  padding: 2px;
  background: transparent;
  border: none;
}

.eq-core-slot {
  width: 75px;
  height: 75px;
  padding: 5px;
}

.eq-matrix-spacer {
  width: 75px;
  height: 75px;
}

.eq-accessory-slot {
  min-height: 66px;
}

.eq-slot-caption {
  font-size: 0.68rem;
  color: #cbb894;
  text-align: center;
  line-height: 1.15;
  margin-bottom: 4px;
}

.eq-slot-art {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eq-sword-slot .item-icon-img {
  width: 94px;
  height: 230px;
  object-fit: contain;
}

.eq-accessory-slot .item-icon-img,
.eq-core-slot .item-icon-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

/* Carved Rune Orbs inside square iron frames (1:1 z konceptem) */
.eq-rune-socket {
  position: relative;
  width: 75px;
  height: 75px;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(24, 21, 17, 0.92) 0%, rgba(12, 10, 8, 0.96) 100%);
  border: 1px solid #594730;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: help;
}

.eq-rune-socket::before {
  content: '';
  position: absolute;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle, #181411 45%, #0a0907 100%);
  border: 2px solid #4d4030;
  box-shadow: inset 0 0 8px #000;
  pointer-events: none;
}

.eq-rune-socket.rune-crimson {
  background: radial-gradient(circle at 20% 80%, rgba(220, 76, 62, 0.28), rgba(14, 12, 10, 0.96) 72%);
}

.eq-rune-socket.rune-crimson::before {
  border-color: rgba(220, 76, 62, 0.65);
  box-shadow: inset 0 0 10px rgba(220, 76, 62, 0.35), 0 0 8px rgba(220, 76, 62, 0.22);
}

.eq-rune-socket.rune-azure {
  background: radial-gradient(circle at 80% 20%, rgba(74, 158, 255, 0.28), rgba(14, 12, 10, 0.96) 72%);
}

.eq-rune-socket.rune-azure::before {
  border-color: rgba(74, 158, 255, 0.65);
  box-shadow: inset 0 0 10px rgba(74, 158, 255, 0.35), 0 0 8px rgba(74, 158, 255, 0.22);
}

.eq-rune-socket.rune-violet {
  background: radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.24), rgba(14, 12, 10, 0.96) 72%);
}

.eq-rune-socket.rune-violet::before {
  border-color: rgba(168, 85, 247, 0.65);
  box-shadow: inset 0 0 10px rgba(168, 85, 247, 0.35), 0 0 8px rgba(168, 85, 247, 0.22);
}

.eq-rune-core {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eq-rune-socket:hover .backpack-item-tooltip {
  visibility: visible;
  opacity: 1;
  z-index: 999999;
}

.eq-rune-core .item-icon-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

/* Bottom Split: Active Set 4/4 (Emerald-Gold Frame) + Statystyki */
.eq-bottom-split {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 10px;
  align-items: stretch;
}

.eq-set-panel {
  background: linear-gradient(180deg, rgba(22, 20, 16, 0.95) 0%, rgba(14, 12, 10, 0.98) 100%);
  border: 1px solid #5c4b34;
  border-radius: 4px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.eq-set-panel.is-half-set {
  border-color: #3d9970;
}

.eq-set-panel.is-full-set {
  background:
    radial-gradient(circle at 20% 0%, rgba(52, 211, 153, 0.16), transparent 65%),
    linear-gradient(180deg, rgba(18, 32, 24, 0.96) 0%, rgba(12, 18, 14, 0.98) 100%);
  border: 2px solid #4ade80;
  box-shadow: 0 0 16px rgba(74, 222, 128, 0.25), inset 0 0 14px rgba(74, 222, 128, 0.12);
}

.eq-set-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.82rem;
  color: #f3d796;
}

.eq-full-badge {
  color: #4ade80;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.eq-partial-badge {
  color: var(--text-secondary);
  font-size: 0.72rem;
}

.eq-set-bonuses {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.eq-bonus-line.active {
  color: #86efac;
  font-weight: 600;
}

.eq-set-pieces-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-top: 2px;
}

.eq-set-piece-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  background: rgba(12, 10, 8, 0.82);
  border: 1px solid #473b2b;
  border-radius: 3px;
  font-size: 0.73rem;
}

.eq-set-piece-chip.equipped {
  border-color: #3d9970;
  color: #e6f7ee;
}

.eq-set-piece-chip.missing {
  opacity: 0.55;
}

.eq-set-piece-icon .item-icon-img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  mix-blend-mode: lighten;
}

.eq-set-piece-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eq-set-piece-check {
  font-weight: 700;
  color: #4ade80;
}

.eq-stats-panel {
  background: linear-gradient(180deg, rgba(22, 19, 15, 0.95) 0%, rgba(14, 12, 10, 0.98) 100%);
  border: 1px solid #5c4b34;
  border-radius: 4px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 7px;
}

.eq-subpanel-title {
  margin: 0;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #e4c27a;
  text-align: center;
}

.eq-stat-meter-row {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 8px;
}

.eq-stat-left-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  mix-blend-mode: lighten;
}

.eq-stat-meter {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.eq-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.77rem;
  color: #d6c8ae;
}

.eq-stat-track {
  width: 100%;
  height: 6px;
  background: #0d0b09;
  border: 1px solid #3f3324;
  border-radius: 2px;
  overflow: hidden;
}

.eq-stat-fill {
  height: 100%;
  border-radius: 1px;
}

.eq-stat-fill.dmg-fill {
  background: linear-gradient(90deg, #8b261d, #dc4c3e);
}

.eq-stat-fill.def-fill {
  background: linear-gradient(90deg, #4b5563, #9ca3af);
}

.eq-stat-fill.crit-fill {
  background: linear-gradient(90deg, #8a6424, #e4b962);
}

/* Collapsible Schemas & Runes Drawer */
.eq-craft-drawer {
  border: 1px solid #4e3f2b;
  background: rgba(15, 13, 10, 0.9);
  border-radius: 4px;
}

.eq-craft-drawer-toggle {
  list-style: none;
  cursor: pointer;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  color: #dfc080;
}

.eq-craft-drawer-toggle::-webkit-details-marker {
  display: none;
}

.eq-craft-drawer-body {
  padding: 8px 10px 10px;
  border-top: 1px solid #3c3021;
}

/* Right Column: Backpack Medallions + 8x5 Carved Slate Grid + Brass Sell Button */
.eq-bp-categories {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.eq-cat-medallions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.eq-cat-orb {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #2a241c 0%, #14110e 100%);
  border: 2px solid #594730;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 5px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.eq-cat-orb:hover,
.eq-cat-orb.active {
  border-color: #f0c265;
  box-shadow: 0 0 0 2px #14110e, 0 0 0 3px #d4a84f, 0 0 12px rgba(212, 168, 79, 0.45);
}

.eq-cat-orb .item-icon-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  mix-blend-mode: lighten;
  filter: brightness(1.25) contrast(1.08);
}

.eq-bp-sort-page {
  display: flex;
  align-items: center;
  gap: 6px;
}

.eq-slate-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 2px;
  padding: 4px;
  background: rgba(11, 10, 8, 0.88);
  border: 1px solid #4e3f2b;
  border-radius: 4px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.eq-slate-slot {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1 / 1;
  background: linear-gradient(180deg, #1b1814 0%, #110f0c 100%);
  border: 1px solid #3b3124;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  box-sizing: border-box;
  overflow: visible;
}

.eq-slate-slot.has-item {
  border-color: #6b563a;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.1s ease;
}

.eq-slate-slot.has-item:hover {
  border-color: #f0c265;
  transform: translateY(-1px);
  z-index: 50000;
}

.eq-slate-slot.has-item:hover .backpack-item-tooltip {
  visibility: visible;
  opacity: 1;
  z-index: 999999;
}

.eq-slate-slot.slot-edge-left .backpack-item-tooltip {
  left: 0;
  right: auto;
  transform: none;
}

.eq-slate-slot.slot-edge-right .backpack-item-tooltip {
  left: auto;
  right: 0;
  transform: none;
}

.eq-slate-slot.slot-relic {
  border-color: #c88c28;
  background: linear-gradient(135deg, rgba(28, 22, 15, 0.96) 55%, rgba(200, 140, 40, 0.24));
}

.eq-slate-slot.slot-set {
  border-color: #3d9970;
  background: linear-gradient(135deg, rgba(18, 28, 22, 0.96) 55%, rgba(61, 153, 112, 0.24));
}

.eq-slate-slot.is-selected {
  border-color: #ef4444 !important;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.65), inset 0 0 8px rgba(239, 68, 68, 0.3);
}

.eq-slate-slot .item-icon-img {
  width: 92%;
  height: 92%;
  max-width: 96%;
  max-height: 96%;
  object-fit: contain;
  mix-blend-mode: lighten;
  display: block;
  margin: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

.eq-bp-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.eq-slate-slot .bs-tile-price {
  bottom: 1px;
  right: 2px;
  background: transparent;
  padding: 0;
  color: #f3ead8;
  font-size: 9px;
  font-weight: 700;
  text-shadow: 0 1px 3px #000, 0 0 4px #000;
}

.eq-brass-sell-btn {
  min-width: 260px;
  padding: 9px 32px;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #f3d796;
  background: linear-gradient(180deg, #433422 0%, #1d160e 100%);
  border: 1px solid #b58d4a;
  clip-path: polygon(14px 0%, calc(100% - 14px) 0%, 100% 50%, calc(100% - 14px) 100%, 14px 100%, 0% 50%);
  box-shadow: inset 0 0 12px rgba(243, 215, 150, 0.2), 0 3px 8px rgba(0, 0, 0, 0.8);
  cursor: pointer;
  transition: filter 0.15s ease, color 0.15s ease;
}

.eq-brass-sell-btn:hover,
.eq-brass-sell-btn.is-active {
  border-color: #f5c869;
  filter: brightness(1.18);
  color: #fff3d1;
  box-shadow: 0 0 12px rgba(245, 200, 105, 0.35);
}

@media (max-width: 1080px) {
  #panel-forge .eq-concept-layout {
    grid-template-columns: 1fr;
  }
  .eq-bottom-split {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   KONCEPT SZLAKU 1:1 (#panel-hunt)
   ========================================================= */
#panel-hunt {
  padding: 0;
}

#panel-hunt .hunt-v2-layout {
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

#panel-hunt .hunt-left-rail {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#panel-hunt .hunt-main-rail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

#panel-hunt .hunt-box {
  background:
    linear-gradient(180deg, rgba(18, 16, 13, 0.84) 0%, rgba(11, 10, 8, 0.94) 100%),
    url('/ui-panel-bg.png') center bottom / cover no-repeat #12100d;
  border: 2px solid #5a4830;
  box-shadow: inset 0 0 0 1px rgba(212, 168, 79, 0.14), inset 0 0 24px rgba(0, 0, 0, 0.85), 0 6px 16px rgba(0, 0, 0, 0.72);
  padding: 0;
  overflow: hidden;
}

#panel-hunt .hunt-box-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 7px 12px;
  background:
    linear-gradient(180deg, rgba(44, 37, 27, 0.92) 0%, rgba(21, 18, 14, 0.96) 100%),
    url('/ui-topbar-bg.png') center center / cover no-repeat;
  border-bottom: 1px solid rgba(197, 155, 72, 0.42);
}

#panel-hunt .hunt-box-header h2,
#panel-hunt .hunt-box-header h3 {
  margin: 0;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e6c884;
  text-shadow: 0 1px 3px #000;
}

/* KONTYNENT */
#panel-hunt .hunt-continent-sub {
  text-align: center;
  font-size: 0.75rem;
  color: #b7a68a;
  padding: 6px 8px 4px;
}

#panel-hunt .regions-directory-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 4px 9px 10px;
}

#panel-hunt .region-dir-card {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 8px;
  background: linear-gradient(180deg, #1b1814 0%, #110f0c 100%);
  border: 1px solid #443726;
  color: #d6c5a7;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

#panel-hunt .region-dir-card:hover {
  border-color: #9e7c44;
  color: #f4dfae;
}

#panel-hunt .region-dir-card.active {
  background: linear-gradient(180deg, #3c2f1b 0%, #241b0f 100%);
  border-color: #d2a856;
  color: #ffe7ac;
  box-shadow: inset 0 0 12px rgba(210, 168, 86, 0.22);
}

#panel-hunt .region-dir-card.is-locked {
  opacity: 0.65;
}

#panel-hunt .quest-tag-mini {
  font-size: 0.64rem;
  padding: 1px 5px;
  border: 1px solid #c59b48;
  background: rgba(197, 155, 72, 0.2);
  color: #f6d992;
  text-transform: uppercase;
}

/* STOKROTKA (POZ. 20+) */
#panel-hunt .hunt-roach-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

#panel-hunt .hunt-roach-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px 4px;
  min-height: 150px;
  background: radial-gradient(circle at 50% 58%, rgba(62, 48, 30, 0.24) 0%, rgba(12, 10, 8, 0.1) 70%);
}

#panel-hunt .hunt-roach-sprite {
  max-width: 100%;
  max-height: 146px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.85));
}

#panel-hunt .hunt-roach-energy-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px 6px;
}

#panel-hunt .hunt-roach-bolt {
  color: #e5b84b;
  font-size: 0.9rem;
  line-height: 1;
}

#panel-hunt .hunt-roach-energy-track {
  flex: 1;
  height: 10px;
  background: #14110d;
  border: 1px solid #594730;
  padding: 1px;
}

#panel-hunt .hunt-roach-energy-fill {
  height: 100%;
  background: linear-gradient(90deg, #9d6f24 0%, #e1ae47 100%);
  transition: width 0.25s ease;
}

#panel-hunt .travel-progress-wrap {
  margin: 0 10px 6px;
  padding: 5px 7px;
  background: rgba(16, 13, 9, 0.9);
  border: 1px solid #6c5533;
  font-size: 0.72rem;
}

#panel-hunt .hunt-roach-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 4px 10px 10px;
}

#panel-hunt .hunt-rail-btn {
  width: 100%;
  padding: 7px 8px;
  background: linear-gradient(180deg, #211d17 0%, #14110d 100%);
  border: 1px solid #4e3f2b;
  color: #dfcfb0;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

#panel-hunt .hunt-rail-btn:hover {
  border-color: #c59b48;
  color: #ffebc2;
}

/* ARENA SZLAKU */
#panel-hunt .hunt-arena-topbar {
  position: relative;
  justify-content: center;
  min-height: 36px;
}

#panel-hunt .hunt-arena-title-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #e6c884;
  text-shadow: 0 1px 3px #000;
}

#panel-hunt .hunt-arena-top-actions {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
}

#panel-hunt .hunt-top-btn {
  padding: 4px 11px;
  font-size: 0.74rem;
  font-weight: 600;
  border: 1px solid #594730;
  background: linear-gradient(180deg, #231f19 0%, #15120e 100%);
  color: #d8c7a8;
  cursor: pointer;
}

#panel-hunt .hunt-top-btn:hover {
  border-color: #c59b48;
  color: #fff2cf;
}

#panel-hunt .hunt-top-btn-gold {
  background: linear-gradient(180deg, #8b7338 0%, #58451e 100%);
  border-color: #d5ac57;
  color: #fff3d4;
}

#panel-hunt .hunt-sword-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: #13110e;
  border-bottom: 1px solid #3c3020;
}

#panel-hunt .hunt-sword-btn {
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #b5a68e;
  background: linear-gradient(180deg, #211d17 0%, #15120e 100%);
  border: 1px solid #443726;
  cursor: pointer;
  transition: all 0.15s ease;
}

#panel-hunt .hunt-sword-btn.active-mode {
  background: linear-gradient(180deg, #756440 0%, #4d4026 100%);
  border-color: #d7b261;
  color: #fff3d6;
  box-shadow: inset 0 0 10px rgba(255, 224, 150, 0.22);
}

#panel-hunt .hunt-vs-sep {
  font-size: 0.72rem;
  font-weight: 700;
  color: #9e8a6b;
  letter-spacing: 0.08em;
}

#panel-hunt .hunt-combat-stage {
  position: relative;
  height: 250px;
  background:
    linear-gradient(180deg, rgba(10, 12, 13, 0.1) 0%, rgba(10, 12, 13, 0.04) 60%, rgba(10, 10, 9, 0.88) 100%),
    url('/hunt-arena-bg.png') 50% 18% / cover no-repeat #0f1211;
  border-bottom: 1px solid #3c3020;
  overflow: hidden;
}

#panel-hunt .hunt-stage-overlay {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  padding: 10px 14px 12px;
  gap: 10px;
}

#panel-hunt .hunt-hero-corner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 4px;
}

#panel-hunt .hunt-hp-readout {
  font-size: 0.92rem;
  font-weight: 700;
  text-shadow: 0 1px 4px #000, 0 0 8px #000;
}

#panel-hunt .hunt-hp-hero {
  color: #5ee36b;
}

#panel-hunt .hunt-hp-monster {
  color: #ef5348;
  text-align: right;
  width: 100%;
}

#panel-hunt .hunt-hp-track {
  width: 100%;
  max-width: 280px;
  height: 9px;
  background: rgba(12, 11, 9, 0.86);
  border: 1px solid #493b28;
  overflow: hidden;
}

#panel-hunt .hunt-hp-fill {
  height: 100%;
  transition: width 0.2s ease;
}

#panel-hunt .hunt-hp-fill-hero {
  background: linear-gradient(90deg, #2d8734 0%, #5de369 100%);
}

#panel-hunt .hunt-hp-fill-monster {
  background: linear-gradient(90deg, #ef5348 0%, #9b221a 100%);
  margin-left: auto;
}

#panel-hunt .hunt-center-stats {
  align-self: flex-end;
  margin-bottom: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 14px;
  background: radial-gradient(ellipse at center, rgba(10, 12, 11, 0.65) 0%, transparent 85%);
  color: #efe2cb;
  font-size: 0.82rem;
  text-shadow: 0 1px 4px #000, 0 0 8px #000;
}

#panel-hunt .hunt-center-stats strong {
  color: #ffffff;
}

#panel-hunt .hunt-monster-corner {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
}

#panel-hunt .hunt-monster-title-wrap {
  z-index: 3;
}

#panel-hunt .hunt-monster-heading {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 700;
  color: #f3e4cb;
  text-shadow: 0 1px 5px #000, 0 0 10px #000;
}

#panel-hunt .hunt-monster-sprite {
  position: absolute;
  right: 50px;
  bottom: 20px;
  height: 140px;
  width: auto;
  max-width: 195px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 4px rgba(0, 0, 0, 0.8));
  pointer-events: none;
  z-index: 1;
}

#panel-hunt .hunt-monster-hp-block {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  z-index: 3;
}

#panel-hunt .hunt-cycle-strip {
  position: relative;
  height: 28px;
  background: #14110c;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0 12px;
}

#panel-hunt .hunt-session-fill-bg {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: rgba(162, 114, 38, 0.18);
  pointer-events: none;
  z-index: 0;
}

#panel-hunt .hunt-cycle-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(163, 115, 39, 0.72) 0%, rgba(223, 173, 73, 0.85) 100%);
  pointer-events: none;
  z-index: 1;
  transition: width 0.1s linear;
}

#panel-hunt .hunt-cycle-text {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.75rem;
  color: #f3e4c7;
  text-shadow: 0 1px 3px #000, 0 0 6px #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#panel-hunt .hunt-cycle-text .accent-text {
  color: #f6cf78;
}

#panel-hunt .hunt-lvl-eta {
  color: #c2b093;
  font-size: 0.71rem;
}

/* ŚRODKOWY RZĄD: ELIKSIRY + KRONIKA */
#panel-hunt .hunt-middle-row {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 10px;
  align-items: stretch;
}

#panel-hunt .hunt-potions-box,
#panel-hunt .hunt-log-box {
  display: flex;
  flex-direction: column;
}

#panel-hunt .hunt-potions-header,
#panel-hunt .hunt-log-header {
  position: relative;
  justify-content: center;
}

#panel-hunt .hunt-autoheal-inline {
  position: absolute;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: #cbb894;
}

#panel-hunt .hunt-autoheal-label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
}

#panel-hunt .hunt-heal-select {
  background: #171410;
  color: #e4cfa2;
  border: 1px solid #4c3d29;
  font-size: 0.68rem;
  padding: 1px 3px;
}

#panel-hunt .hunt-potions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 10px 14px 6px;
}

#panel-hunt .hunt-potion-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #dfcfb0;
}

#panel-hunt .hunt-potion-frame {
  position: relative;
  width: 82px;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 45%, #2b241c 0%, #13100d 78%);
  border: 1px solid #594730;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.85);
  transition: border-color 0.15s ease, transform 0.12s ease;
}

#panel-hunt .hunt-potion-tile:hover .hunt-potion-frame {
  border-color: #d4a84f;
  transform: translateY(-1px);
}

#panel-hunt .hunt-potion-shield {
  position: absolute;
  top: 4px;
  left: 5px;
  font-size: 0.72rem;
  color: #a9a192;
  opacity: 0.85;
}

#panel-hunt .hunt-potion-img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.9));
}

#panel-hunt .hunt-potion-badge {
  position: absolute;
  right: 5px;
  bottom: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #f3e1b8;
  text-shadow: 0 1px 3px #000;
}

#panel-hunt .hunt-potion-name {
  font-size: 0.71rem;
  color: #d6c5a7;
  text-align: center;
  line-height: 1.2;
}

#panel-hunt .hunt-potions-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 12px 7px;
  font-size: 0.68rem;
  color: #9e8d72;
  border-top: 1px solid rgba(90, 72, 48, 0.3);
}

#panel-hunt .hunt-loot-popover {
  position: relative;
}

#panel-hunt .hunt-loot-popover summary {
  cursor: pointer;
  color: #d8ba76;
  list-style: none;
}

#panel-hunt .hunt-loot-popover[open] .loot-accordion-body {
  position: absolute;
  right: 0;
  bottom: 22px;
  width: 300px;
  z-index: 30;
  background: #14110e;
  border: 1px solid #b58d4a;
  padding: 8px 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.92);
}

#panel-hunt .hunt-clear-log-btn {
  position: absolute;
  right: 10px;
  background: transparent;
  border: 1px solid rgba(197, 155, 72, 0.35);
  color: #b7a27e;
  font-size: 0.68rem;
  padding: 2px 7px;
  cursor: pointer;
}

#panel-hunt .hunt-clear-log-btn:hover {
  color: #ffe3a3;
  border-color: #d4a84f;
}

#panel-hunt .hunt-log-list {
  flex: 1;
  margin: 0;
  padding: 8px 12px;
  list-style: none;
  max-height: 138px;
  min-height: 122px;
  overflow-y: auto;
  font-size: 0.74rem;
  line-height: 1.45;
  color: #d6c8b2;
  background: rgba(12, 10, 8, 0.72);
}

#panel-hunt .hunt-log-list .log-entry {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding: 1px 0;
}

/* DOLNY MODUŁ: LOKACJE REGIONU (SIATKA 2x4) */
#panel-hunt .hunt-locations-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 9px 10px;
}

#panel-hunt .subregion-row-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 5px 8px;
  background: linear-gradient(180deg, #1a1713 0%, #12100d 100%);
  border: 1px solid #433625;
  min-height: 58px;
}

#panel-hunt .subregion-row-card.is-current {
  border-color: #d4a84f;
  background: linear-gradient(180deg, #2d2416 0%, #19140d 100%);
  box-shadow: inset 0 0 14px rgba(212, 168, 79, 0.18);
}

#panel-hunt .subregion-row-card.is-locked {
  opacity: 0.68;
}

#panel-hunt .subregion-thumb-wrap {
  position: relative;
  width: 46px;
  height: 46px;
  border: 1px solid #594730;
  background: #0e0c0a;
  overflow: hidden;
  flex-shrink: 0;
}

#panel-hunt .subregion-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#panel-hunt .subregion-lvl-badge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 9, 7, 0.88);
  color: #f0d79e;
  font-size: 0.62rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.25;
  padding: 1px 0;
}

#panel-hunt .subregion-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#panel-hunt .subregion-name-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

#panel-hunt .subregion-name {
  font-size: 0.82rem;
  color: #f0dfc0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#panel-hunt .subregion-sub {
  font-size: 0.7rem;
  color: #a9987d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#panel-hunt .subregion-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

#panel-hunt .hunt-loc-btn {
  padding: 5px 9px;
  font-size: 0.71rem;
  font-weight: 600;
  border: 1px solid #55452e;
  cursor: pointer;
  white-space: nowrap;
}

#panel-hunt .hunt-loc-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#panel-hunt .hunt-loc-hunt {
  background: linear-gradient(180deg, #324a2d 0%, #1f301b 100%);
  border-color: #547e49;
  color: #ddf2d4;
}

#panel-hunt .hunt-loc-hunt.is-active {
  background: linear-gradient(180deg, #436a39 0%, #2b4724 100%);
  border-color: #7ac166;
  color: #ffffff;
  box-shadow: 0 0 8px rgba(104, 186, 84, 0.3);
}

#panel-hunt .hunt-loc-boss {
  background: linear-gradient(180deg, #4f3d23 0%, #312514 100%);
  border-color: #8f6e3c;
  color: #f2dcb0;
}

#panel-hunt .hunt-loc-boss.is-active {
  background: linear-gradient(180deg, #866531 0%, #563f1c 100%);
  border-color: #e2b45d;
  color: #fff6dc;
  box-shadow: 0 0 8px rgba(226, 180, 93, 0.32);
}

@media (max-width: 1120px) {
  #panel-hunt .hunt-v2-layout {
    grid-template-columns: 1fr;
  }
  #panel-hunt .hunt-middle-row {
    grid-template-columns: 1fr;
  }
  #panel-hunt .hunt-locations-grid {
    grid-template-columns: 1fr;
  }
}
