:root {
  color-scheme: dark;
  --ink: #f2ece4;
  --muted: #b8b1a8;
  --red: #b5162b;
  --red-hot: #ff334f;
  --teal: #4db7ad;
  --gold: #c7a35a;
  --silver: #c7ccd3;
  --panel: rgba(13, 16, 21, 0.72);
  --panel-strong: rgba(9, 10, 13, 0.88);
  --line: rgba(242, 236, 228, 0.16);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(9, 5, 7, 0.88), rgba(5, 4, 6, 0.94)),
    radial-gradient(circle at 50% 8%, rgba(209, 15, 40, 0.24), transparent 38%),
    url("assets/bloodmoon-keyart.png") center / cover no-repeat fixed,
    #07080b;
  color: var(--ink);
  overflow-x: hidden;
}

button {
  font: inherit;
}

.rotate-lock {
  display: none;
}

.game-shell {
  min-height: 100vh;
  padding: clamp(12px, 2vw, 24px);
}

.stage {
  position: relative;
  min-height: calc(100vh - clamp(24px, 4vw, 48px));
  overflow: hidden;
  border: 1px solid rgba(199, 204, 211, 0.18);
  background: #101116;
  isolation: isolate;
}

.keyart {
  position: absolute;
  inset: 0;
  z-index: -5;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.05) brightness(0.74);
}

.stage::before,
.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: auto;
}

.stage::before {
  z-index: -4;
  background:
    radial-gradient(circle at 50% 14%, rgba(181, 22, 43, 0.38), transparent 24%),
    linear-gradient(90deg, rgba(7, 8, 11, 0.88), rgba(7, 8, 11, 0.26) 45%, rgba(7, 8, 11, 0.78)),
    linear-gradient(0deg, rgba(7, 8, 11, 0.96), transparent 48%);
}

.stage::after {
  z-index: 2;
  opacity: 0.34;
  mix-blend-mode: overlay;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
}

.mist {
  position: absolute;
  left: -20%;
  right: -20%;
  height: 30vh;
  z-index: -2;
  background: linear-gradient(90deg, transparent, rgba(199, 204, 211, 0.15), transparent);
  filter: blur(26px);
  transform: skewY(-3deg);
  animation: drift 16s linear infinite;
}

.mist-one {
  bottom: 20%;
}

.mist-two {
  bottom: 3%;
  animation-duration: 22s;
  animation-direction: reverse;
  opacity: 0.75;
}

.embers {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 80, 70, 0.85) 0 1px, transparent 2px),
    radial-gradient(circle, rgba(199, 163, 90, 0.75) 0 1px, transparent 2px);
  background-size: 110px 130px, 170px 190px;
  animation: emberRise 9s linear infinite;
  opacity: 0.42;
}

.topbar,
.hud,
.view-deck,
.bottom-deck {
  position: relative;
  z-index: 4;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(18px, 3vw, 36px);
  z-index: 12;
  min-width: 0;
}

.top-menu {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-self: flex-end;
  margin-top: clamp(34px, 5.5vw, 64px);
  min-width: 196px;
  max-width: 100%;
  z-index: 14;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 146px;
  max-width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(77, 183, 173, 0.44);
  border-radius: 14px;
  color: #d9f6f3;
  font-weight: 700;
  letter-spacing: 0.02em;
  background:
    linear-gradient(90deg, rgba(77, 183, 173, 0.18), transparent 40%),
    linear-gradient(160deg, rgba(8, 12, 15, 0.96), rgba(14, 20, 24, 0.92));
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.34), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.menu-toggle:hover {
  border-color: rgba(95, 232, 143, 0.64);
  box-shadow: 0 12px 34px rgba(77, 183, 173, 0.24), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.menu-caret {
  width: 10px;
  height: 10px;
  border-right: 2px solid #78e9dc;
  border-bottom: 2px solid #78e9dc;
  transform: translateY(-1px) rotate(45deg);
  transition: transform 160ms ease;
}

.top-menu.open .menu-caret {
  transform: translateY(2px) rotate(225deg);
}

.brand-block {
  min-width: 0;
  max-width: 100%;
}

.nav-logo {
  display: block;
  width: auto;
  height: clamp(34px, 6vw, 56px);
  margin-bottom: 8px;
}

.account-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

#playerNameLabel {
  display: inline-grid;
  min-height: 34px;
  place-items: center;
  padding: 0 12px;
  border: 1px solid rgba(77, 183, 173, 0.38);
  color: var(--silver);
  background: rgba(8, 9, 12, 0.58);
}

.mini-action {
  min-height: 34px;
  border: 1px solid rgba(199, 163, 90, 0.38);
  color: var(--gold);
  background: rgba(199, 163, 90, 0.1);
  cursor: pointer;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.7rem, 7vw, 7rem);
  line-height: 0.86;
  text-shadow: 0 0 34px rgba(255, 51, 79, 0.44);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  background: rgba(8, 9, 12, 0.68);
  backdrop-filter: blur(14px);
}

.dropdown-tabs {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  width: min(248px, calc(100vw - 48px));
  max-width: calc(100vw - 24px);
  padding: 8px;
  border: 1px solid rgba(77, 183, 173, 0.3);
  border-radius: 14px;
  background: rgba(8, 12, 15, 0.94);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.45);
  transform: translateY(-6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.top-menu.open .dropdown-tabs {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.tab {
  min-width: 84px;
  min-height: 40px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.dropdown-tabs .tab {
  width: 100%;
  text-align: left;
  padding: 0 12px;
  border-radius: 9px;
  line-height: 1.18;
  overflow-wrap: anywhere;
  white-space: normal;
}

.dropdown-tabs .tab:hover {
  background: rgba(77, 183, 173, 0.14);
  color: var(--ink);
}

.tab.active {
  color: var(--ink);
  background: linear-gradient(135deg, rgba(181, 22, 43, 0.88), rgba(77, 183, 173, 0.34));
  box-shadow: 0 0 24px rgba(181, 22, 43, 0.32);
}

.hud {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: clamp(14px, 2vw, 22px);
  align-items: stretch;
  padding: min(12vh, 92px) clamp(18px, 3vw, 36px) 0;
}

.hero-panel,
.action-panel,
.character-card,
.ranking-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
  gap: 22px;
  max-width: 720px;
  padding: clamp(18px, 2.6vw, 28px);
}

.hero-figure {
  display: grid;
  gap: 12px;
}

.portrait-frame {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 220px;
  margin-bottom: 86px;
  border: 1px solid rgba(199, 163, 90, 0.46);
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 51, 79, 0.28), transparent 34%),
    linear-gradient(160deg, rgba(77, 183, 173, 0.22), rgba(13, 16, 21, 0.86));
  overflow: visible;
}

.portrait-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  opacity: 0.92;
}

.portrait-glow {
  position: absolute;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: var(--red);
  filter: blur(18px);
  animation: pulse 2.8s ease-in-out infinite;
}

.sigil {
  position: relative;
  z-index: 3;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3rem;
  color: var(--silver);
  text-shadow: 0 0 18px rgba(255, 51, 79, 0.72);
}

.equipped-ring {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 8px;
  padding: 0;
  margin-top: 8px;
  z-index: 4;
  pointer-events: auto;
}

.equipped-ring .equipped-slot {
  position: relative;
  width: 100%;
  height: 62px;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  transform: none;
}

.equipped-ring .slot-item-image {
  inset: 5px;
  width: calc(100% - 10px);
  height: calc(100% - 10px);
  object-fit: contain;
  object-position: center;
  background: rgba(0, 0, 0, 0.35);
}

.equipped-ring .equipped-weapon,
.equipped-ring .equipped-talisman,
.equipped-ring .equipped-potion {
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  transform: none;
}

.equipped-slot {
  position: absolute;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(242, 236, 228, 0.22);
  background: rgba(8, 10, 12, 0.92);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.42);
  cursor: pointer;
}

.equipped-slot .slot-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(242, 236, 228, 0.34);
  background: rgba(0, 0, 0, 0.48);
}

.slot-item-image {
  position: absolute;
  inset: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  object-fit: cover;
  border: 1px solid rgba(199, 163, 90, 0.34);
}

.equipped-slot.has-item-image .slot-icon {
  display: none;
}

.equipped-weapon .slot-icon {
  background:
    linear-gradient(135deg, transparent 44%, rgba(199, 163, 90, 0.95) 44% 56%, transparent 56%),
    linear-gradient(45deg, transparent 44%, rgba(242, 236, 228, 0.88) 44% 56%, transparent 56%),
    rgba(0, 0, 0, 0.48);
}

.equipped-talisman .slot-icon {
  background:
    radial-gradient(circle at 50% 50%, rgba(77, 183, 173, 0.92) 0 35%, transparent 36%),
    radial-gradient(circle at 50% 50%, rgba(242, 236, 228, 0.8) 0 58%, transparent 59%),
    rgba(0, 0, 0, 0.48);
}

.equipped-potion .slot-icon {
  background:
    radial-gradient(circle at 50% 68%, rgba(77, 183, 173, 0.95) 0 36%, transparent 37%),
    linear-gradient(to bottom, rgba(242, 236, 228, 0.9) 0 34%, transparent 35%),
    rgba(0, 0, 0, 0.48);
}

.slot-count {
  position: absolute;
  right: -6px;
  bottom: -6px;
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  border: 1px solid rgba(242, 236, 228, 0.2);
  background: rgba(8, 10, 12, 0.96);
  color: var(--gold);
  font-size: 0.72rem;
  line-height: 1;
}

.equipped-weapon {
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
}

.equipped-talisman {
  right: -14px;
  top: 50%;
  transform: translateY(-50%);
}

.equipped-potion {
  left: -14px;
  top: 50%;
  transform: translateY(-50%);
}

.equipped-slot:hover {
  border-color: rgba(255, 51, 79, 0.44);
}

.item-nui-tooltip {
  position: fixed;
  z-index: 80;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  width: min(320px, calc(100vw - 24px));
  padding: 12px;
  border: 1px solid rgba(199, 163, 90, 0.42);
  background: rgba(8, 10, 12, 0.97);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.58), 0 0 24px rgba(255, 51, 79, 0.16);
  color: var(--ink);
  pointer-events: none;
}

.item-nui-tooltip[hidden] {
  display: none;
}

.item-nui-image {
  width: 64px;
  height: 64px;
  border: 1px solid rgba(199, 163, 90, 0.4);
  object-fit: cover;
  background: rgba(0, 0, 0, 0.35);
}

.item-nui-tooltip > div {
  display: grid;
  gap: 4px;
  align-content: center;
  min-width: 0;
}

.item-nui-type {
  color: var(--gold);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.item-nui-name {
  color: var(--silver);
  font-size: 0.98rem;
  line-height: 1.15;
}

.item-nui-ability {
  color: var(--muted);
  line-height: 1.35;
}

.item-nui-action {
  width: fit-content;
  margin-top: 6px;
  padding: 7px 12px;
  border: 1px solid rgba(199, 163, 90, 0.52);
  background: rgba(255, 51, 79, 0.12);
  color: var(--silver);
  font-weight: 800;
  cursor: pointer;
}

.item-nui-action:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.portrait-picker {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  color: var(--muted);
}

.portrait-picker legend {
  margin-bottom: 8px;
}

.portrait-choices {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.portrait-choice {
  aspect-ratio: 1 / 1.25;
  min-height: 0;
  padding: 0;
  border: 1px solid rgba(242, 236, 228, 0.16);
  background: rgba(0, 0, 0, 0.34);
  overflow: hidden;
  cursor: pointer;
}

.portrait-choice img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portrait-choice.selected {
  border-color: var(--red-hot);
  box-shadow: 0 0 18px rgba(255, 51, 79, 0.38);
}

.hero-copy h2 {
  margin-bottom: 10px;
  font-size: clamp(1.7rem, 3vw, 3.2rem);
  line-height: 1;
}

.character-level-badge {
  display: inline-grid;
  min-height: 24px;
  place-items: center;
  margin-bottom: 8px;
  padding: 0 9px;
  border: 1px solid rgba(199, 163, 90, 0.46);
  background: rgba(199, 163, 90, 0.12);
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lore {
  max-width: 48ch;
  color: var(--muted);
  line-height: 1.55;
}

.active-boost-list {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.character-stat-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 12px;
}

.character-stat-list div {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(242, 236, 228, 0.1);
  background: rgba(0, 0, 0, 0.28);
}

.character-stat-list span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.character-stat-list strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 0.9rem;
}

.level-progress-panel {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid rgba(139, 176, 211, 0.24);
  background: rgba(4, 11, 19, 0.58);
}

.level-progress-head,
.level-progress-grid {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.level-progress-head span,
.level-progress-grid span {
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.level-progress-head strong,
.level-progress-grid strong {
  color: var(--ink);
  font-size: 0.82rem;
}

.level-progress-track {
  height: 8px;
  overflow: hidden;
  border: 1px solid rgba(139, 176, 211, 0.24);
  background: rgba(0, 0, 0, 0.34);
}

.level-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #c75a63, #d4b46c, #77d0b4);
  transition: width 220ms ease;
}

.level-progress-grid div {
  min-width: 0;
}

.active-boost-list[hidden] {
  display: none;
}

.active-boost {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid rgba(199, 125, 255, 0.42);
  background:
    radial-gradient(circle at 100% 0%, rgba(199, 125, 255, 0.18), transparent 44%),
    rgba(0, 0, 0, 0.3);
}

.active-boost span,
.active-boost small {
  color: var(--muted);
  font-size: 0.72rem;
}

.active-boost strong {
  color: #e4c8ff;
  font-size: 0.86rem;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 22px;
}

.hero-figure .resource-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0;
}

.resource-grid div,
.ranking-panel div,
.equipment-row div,
.inventory-card,
.clan-grid div {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(242, 236, 228, 0.1);
  background: rgba(0, 0, 0, 0.28);
}

.resource-grid span,
.ranking-panel span,
.equipment-row span,
.inventory-card span,
.clan-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.resource-grid strong,
.ranking-panel strong,
.equipment-row strong,
.inventory-card strong,
.clan-grid strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.energy-panel {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid rgba(77, 183, 173, 0.35);
  background: rgba(0, 0, 0, 0.3);
}

.energy-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.energy-panel-head span {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.energy-panel-head strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.energy-track {
  height: 11px;
  border: 1px solid rgba(242, 236, 228, 0.16);
  background: rgba(8, 12, 18, 0.9);
}

.energy-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #2b7a74, #4db7ad);
  box-shadow: 0 0 12px rgba(77, 183, 173, 0.45);
  transition: width 220ms ease;
}

.action-panel {
  padding: 20px;
  background: var(--panel-strong);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-heading span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 51, 79, 0.48);
  color: var(--red-hot);
  font-weight: 900;
  box-shadow: inset 0 0 18px rgba(181, 22, 43, 0.28);
}

.stats {
  display: grid;
  gap: 14px;
  margin: 20px 0;
}

.stat-bonus {
  display: inline-block;
  margin-top: 5px;
  color: #5fe88f;
  font-size: 0.78rem;
}

.stat-bonus span {
  color: #5fe88f;
}

.stat-bonus .clan-stat-bonus {
  color: #7ec8ff;
  text-shadow: 0 0 10px rgba(126, 200, 255, 0.42);
}

.stat-bonus .potion-stat-bonus {
  color: #c77dff;
  text-shadow: 0 0 10px rgba(199, 125, 255, 0.48);
}

.stat-bonus:empty {
  display: none;
}

.main-raid-status {
  margin: 10px 0 0;
  padding: 9px 10px;
  border: 1px solid rgba(199, 163, 90, 0.28);
  color: var(--ink);
  background: rgba(199, 163, 90, 0.08);
  font-size: 0.82rem;
  line-height: 1.35;
}

.main-raid-status[hidden] {
  display: none;
}

.primary-action.raid-running {
  border-color: rgba(199, 163, 90, 0.58);
  box-shadow: 0 0 18px rgba(199, 163, 90, 0.18);
}

.stats label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.88rem;
}

meter {
  width: 100%;
  height: 10px;
}

meter::-webkit-meter-bar {
  border: 1px solid rgba(242, 236, 228, 0.12);
  background: #14171d;
}

meter::-webkit-meter-optimum-value {
  background: linear-gradient(90deg, var(--red), var(--gold), var(--teal));
}

.actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.primary-action,
.ghost-action {
  min-height: 48px;
  border: 1px solid rgba(242, 236, 228, 0.16);
  color: var(--ink);
  cursor: pointer;
}

.primary-action {
  background: linear-gradient(135deg, #9f1225, #d64c3f);
  box-shadow: 0 0 28px rgba(181, 22, 43, 0.42);
}

.ghost-action {
  background: rgba(77, 183, 173, 0.14);
}

.primary-action:hover,
.ghost-action:hover,
.tab:hover {
  transform: translateY(-1px);
}

.combat-log {
  min-height: 58px;
  margin: 16px 0 0;
  padding: 12px;
  border-left: 3px solid var(--gold);
  color: var(--silver);
  background: rgba(0, 0, 0, 0.28);
  line-height: 1.45;
}

.view-deck {
  padding: 14px clamp(18px, 3vw, 36px) 0;
}

.view-panel {
  display: none;
  border: 1px solid var(--line);
  background: rgba(9, 10, 13, 0.74);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  padding: clamp(16px, 2.2vw, 24px);
}

.view-panel.active {
  display: block;
}

.game-footer {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  color: rgba(242, 236, 228, 0.72);
  font-size: 0.78rem;
  letter-spacing: 0;
}

.game-footer strong {
  color: var(--gold);
  font-weight: 700;
}

.event-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 9px;
  border: 1px solid rgba(98, 224, 214, 0.55);
  background: rgba(20, 80, 84, 0.28);
  color: #b7fff7;
  font-weight: 800;
  text-transform: uppercase;
}

.event-badge[hidden] {
  display: none;
}

.shop-row {
  display: none !important;
}

.module-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.module-heading h3 {
  margin-bottom: 0;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
}

.module-intro {
  margin: 8px 0 0;
  max-width: 70ch;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.icon-action,
.threat-badge {
  border: 1px solid rgba(199, 163, 90, 0.38);
  color: var(--gold);
  background: rgba(199, 163, 90, 0.1);
}

.icon-action {
  min-height: 38px;
  padding: 0 12px;
  cursor: pointer;
}

.threat-badge {
  display: inline-grid;
  place-items: center;
  min-height: 38px;
  padding: 0 12px;
  white-space: nowrap;
}

.upgrade-grid,
.enemy-list,
.clan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.raid-prep-panel {
  display: none;
  grid-template-columns: minmax(0, 0.8fr) minmax(180px, 0.8fr) minmax(360px, 1.2fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid rgba(77, 183, 173, 0.28);
  background:
    radial-gradient(circle at 100% 0%, rgba(181, 22, 43, 0.2), transparent 34%),
    rgba(0, 0, 0, 0.3);
}

.raid-prep-panel.active {
  display: grid;
}

.raid-countdown {
  display: grid;
  align-items: center;
  min-width: 180px;
  min-height: 52px;
  border: 1px solid rgba(199, 163, 90, 0.42);
  color: var(--gold);
  background:
    linear-gradient(180deg, rgba(199, 163, 90, 0.08), rgba(0, 0, 0, 0.36)),
    rgba(0, 0, 0, 0.28);
  padding: 10px;
}

.raid-progress {
  position: relative;
  height: 28px;
  border: 1px solid rgba(242, 236, 228, 0.14);
  background: rgba(0, 0, 0, 0.46);
  overflow: hidden;
}

.hero-copy {
  margin-top: 0;
}

.raid-progress i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, rgba(181, 22, 43, 0.86), rgba(199, 163, 90, 0.9), rgba(77, 183, 173, 0.74));
  box-shadow: 0 0 18px rgba(199, 163, 90, 0.24);
  transition: width 0.25s linear;
}

.raid-countdown span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--silver);
  font-size: 1rem;
  font-weight: 900;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.75);
}

.raid-duel-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  opacity: 0.62;
}

.duel-fighter {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  min-height: 188px;
  padding: 12px;
  border: 1px solid rgba(242, 236, 228, 0.12);
  background: rgba(8, 9, 12, 0.66);
}

.duel-fighter span,
.duel-fighter strong {
  display: block;
}

.duel-fighter span {
  color: var(--muted);
  font-size: 0.78rem;
}

.duel-fighter strong {
  margin-top: 8px;
}

.duel-portrait {
  width: min(132px, 78%);
  aspect-ratio: 1;
  border: 1px solid rgba(199, 163, 90, 0.36);
  object-fit: cover;
  object-position: center 18%;
  background: rgba(0, 0, 0, 0.36);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.44);
}

.duel-hp {
  width: 100%;
  height: 9px;
  border: 1px solid rgba(242, 236, 228, 0.18);
  background: rgba(0, 0, 0, 0.5);
}

.duel-hp i {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #b5162b, #ff334f, #c7a35a);
  transition: width 420ms ease;
}

.duel-effect {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
}

.duel-strike {
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--red-hot), var(--gold), transparent);
  transform: scaleX(0.35);
  opacity: 0.44;
}

.raid-duel-panel.fighting {
  opacity: 1;
}

.raid-duel-panel.fighting.player-strike .player-side {
  animation: playerLunge 420ms ease-out;
}

.raid-duel-panel.fighting.bot-strike .bot-side {
  animation: botLunge 420ms ease-out;
}

.raid-duel-panel.bot-hit .bot-side,
.raid-duel-panel.player-hit .player-side {
  animation: hitShake 320ms ease-out;
}

.raid-duel-panel.fighting .duel-strike {
  animation: strikePulse 420ms ease-in-out infinite;
}

.raid-duel-panel.effect-vampire.player-strike .player-side .duel-effect,
.raid-duel-panel.effect-vampire.bot-hit .bot-side .duel-effect {
  opacity: 1;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 35, 62, 0.9), transparent 24%),
    linear-gradient(135deg, transparent 38%, rgba(181, 22, 43, 0.78), transparent 62%);
  animation: bloodBurst 480ms ease-out;
}

.raid-duel-panel.effect-werewolf.player-strike .player-side .duel-effect,
.raid-duel-panel.effect-werewolf.bot-hit .bot-side .duel-effect {
  opacity: 1;
  background:
    linear-gradient(35deg, transparent 34%, rgba(199, 163, 90, 0.88), transparent 40%),
    linear-gradient(145deg, transparent 48%, rgba(242, 236, 228, 0.72), transparent 55%);
  animation: clawSlash 480ms ease-out;
}

.raid-duel-panel.effect-hunter.player-strike .player-side .duel-effect,
.raid-duel-panel.effect-hunter.bot-hit .bot-side .duel-effect {
  opacity: 1;
  background:
    radial-gradient(circle at 50% 50%, rgba(77, 183, 173, 0.92), transparent 18%),
    linear-gradient(90deg, transparent 42%, rgba(199, 204, 211, 0.78), transparent 58%);
  animation: silverFlash 480ms ease-out;
}

.report-list,
.ranking-list {
  display: grid;
  gap: 8px;
}

.ranking-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.ranking-mode {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(77, 183, 173, 0.38);
  color: var(--muted);
  background: rgba(0, 0, 0, 0.28);
  cursor: pointer;
}

.ranking-mode.active {
  color: var(--ink);
  border-color: rgba(255, 51, 79, 0.48);
  background: rgba(181, 22, 43, 0.28);
}

.upgrade-card,
.enemy-card,
.report-card,
.ranking-row {
  min-height: 112px;
  padding: 14px;
  border: 1px solid rgba(242, 236, 228, 0.12);
  color: var(--ink);
  background:
    radial-gradient(circle at 100% 0%, rgba(181, 22, 43, 0.22), transparent 34%),
    rgba(0, 0, 0, 0.24);
  text-align: left;
  cursor: default;
}

.enemy-card {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto auto auto auto;
  column-gap: 0;
  row-gap: 6px;
  align-items: start;
  min-height: 0;
  padding: 12px;
  border-color: rgba(139, 176, 211, 0.24);
  background:
    linear-gradient(180deg, rgba(13, 24, 38, 0.86), rgba(5, 11, 18, 0.9)),
    radial-gradient(circle at 100% 0%, rgba(181, 22, 43, 0.18), transparent 42%);
  overflow: hidden;
}

.enemy-card-image {
  grid-row: auto;
  width: 88px;
  aspect-ratio: 1;
  border: 1px solid rgba(139, 176, 211, 0.42);
  border-radius: 6px;
  object-fit: cover;
  object-position: center center;
  background: rgba(0, 0, 0, 0.32);
  justify-self: center;
}

.enemy-card-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
}

.enemy-card-head strong {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.2;
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: center;
}

.enemy-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.enemy-meta-grid small {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(139, 176, 211, 0.28);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(17, 33, 52, 0.72), rgba(8, 16, 28, 0.72));
  box-shadow: inset 0 0 0 1px rgba(173, 214, 255, 0.06);
  color: #98b2c9;
  font-size: 0.73rem;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.enemy-meta-grid b {
  color: #f3fbff;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
}

.enemy-reward-line {
  margin-top: 2px;
  padding: 8px 10px;
  border: 1px solid rgba(205, 171, 100, 0.46);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(97, 68, 19, 0.35), rgba(54, 37, 8, 0.34));
  color: #f4e2b3;
  font-size: 0.79rem;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 221, 156, 0.09);
  overflow-wrap: anywhere;
}

.enemy-loot-line {
  padding: 7px 10px;
  border: 1px solid rgba(96, 177, 191, 0.34);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(14, 49, 61, 0.34), rgba(8, 29, 36, 0.32));
  color: #9fe4ee;
  font-size: 0.75rem;
  box-shadow: inset 0 0 0 1px rgba(171, 244, 255, 0.07);
  overflow-wrap: anywhere;
}

.raid-refresh-status {
  margin: 10px 0 12px;
}

.upgrade-card span,
.enemy-card span,
.report-card span,
.ranking-row span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.upgrade-card strong,
.enemy-card strong,
.report-card strong,
.ranking-row strong {
  display: block;
  margin: 7px 0;
  font-size: 1.08rem;
}

.upgrade-card small,
.enemy-card small,
.report-card small,
.ranking-row small {
  color: var(--gold);
}

.ranking-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 6px 0;
}

.ranking-main > span {
  display: inline;
  color: var(--muted);
}

.species-pill {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: fit-content;
  min-width: 136px;
  min-height: 26px;
  padding: 3px 8px 3px 4px;
  border: 1px solid rgba(139, 176, 211, 0.28);
  border-radius: 999px;
  box-sizing: border-box;
  color: var(--ink);
  background: rgba(8, 16, 26, 0.62);
  font-size: 0.76rem;
  white-space: nowrap;
}

.ranking-row .species-pill {
  display: inline-flex;
  flex: 0 0 auto;
  width: max-content;
  min-width: 136px;
  font-size: 0.76rem;
}

.species-pill b {
  display: inline-grid;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 0.72rem;
  line-height: 1;
}

.species-pill em {
  display: inline-block;
  font-style: normal;
  color: #dcecff;
  white-space: nowrap;
}

.player-name,
.clan-name {
  font-weight: 800;
}

.species-text-vampire,
.ranking-main > span.species-text-vampire {
  color: #ff6a7d;
  text-shadow: 0 0 12px rgba(255, 51, 79, 0.24);
}

.species-text-werewolf,
.ranking-main > span.species-text-werewolf {
  color: #d9bd78;
  text-shadow: 0 0 12px rgba(199, 163, 90, 0.22);
}

.species-text-hunter,
.ranking-main > span.species-text-hunter {
  color: #73d7d5;
  text-shadow: 0 0 12px rgba(77, 183, 173, 0.22);
}

.species-text-unknown,
.ranking-main > span.species-text-unknown {
  color: #c6d6e6;
}

.ranking-row.species-row-vampire {
  border-color: rgba(255, 51, 79, 0.24);
}

.ranking-row.species-row-werewolf {
  border-color: rgba(199, 163, 90, 0.24);
}

.ranking-row.species-row-hunter {
  border-color: rgba(77, 183, 173, 0.24);
}

.species-vampire b {
  background: linear-gradient(135deg, #8d1222, #ff334f);
}

.species-werewolf b {
  background: linear-gradient(135deg, #5d4930, #c7a35a);
}

.species-hunter b {
  background: linear-gradient(135deg, #1f6f78, #4db7ad);
}

.species-unknown b {
  background: linear-gradient(135deg, #405166, #8ba4bb);
}

.upgrade-buy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.report-preview-open,
.report-replay-button,
.report-preview-toggle {
  min-height: 30px;
  width: fit-content;
  padding: 0 10px;
  border: 1px solid rgba(77, 183, 173, 0.42);
  background: rgba(77, 183, 173, 0.14);
  color: #d8fff7;
  font-size: 0.78rem;
  cursor: pointer;
}

.report-replay-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.report-replay-arena {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(139, 176, 211, 0.32);
  background:
    linear-gradient(180deg, rgba(15, 25, 36, 0.78), rgba(2, 5, 8, 0.72)),
    rgba(0, 0, 0, 0.28);
}

.report-replay-side {
  display: grid;
  gap: 6px;
  min-width: 0;
  text-align: center;
}

.report-replay-side span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-replay-side b {
  color: var(--ink);
  font-size: 0.82rem;
}

.report-replay-hp {
  height: 8px;
  border: 1px solid rgba(242, 236, 228, 0.18);
  background: rgba(0, 0, 0, 0.48);
}

.report-replay-hp i {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #b5162b, #ff334f, #c7a35a);
  transition: width 360ms ease;
}

.report-replay-strike {
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--red-hot), var(--gold), transparent);
  opacity: 0.42;
  transform: scaleX(0.4);
}

.report-replay-status {
  grid-column: 1 / -1;
  color: var(--muted);
  font-style: normal;
  text-align: center;
}

.report-replay-arena.player-strike .player-side,
.report-replay-arena.enemy-strike .enemy-side {
  animation: duelLunge 420ms ease;
}

.report-replay-arena.player-hit .player-side,
.report-replay-arena.enemy-hit .enemy-side {
  animation: hitShake 320ms ease-out;
}

.report-replay-arena.player-strike .report-replay-strike,
.report-replay-arena.enemy-strike .report-replay-strike {
  animation: strikePulse 420ms ease-in-out;
}

.report-preview-content {
  margin: 8px 0 0;
  padding: 8px;
  border: 1px solid rgba(139, 176, 211, 0.32);
  background: rgba(2, 10, 18, 0.62);
  color: #cbe6ff;
  font-size: 0.76rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.upgrade-buy {
  min-width: 34px;
  height: 34px;
  border: 1px solid rgba(77, 183, 173, 0.42);
  color: #5fe88f;
  background: rgba(77, 183, 173, 0.14);
  font-weight: 800;
  cursor: pointer;
}

.enemy-card > em {
  display: inline-grid;
  width: fit-content;
  min-height: 24px;
  place-items: center;
  margin-top: 10px;
  padding: 0 8px;
  border: 1px solid rgba(77, 183, 173, 0.28);
  color: var(--teal);
  font-style: normal;
  font-size: 0.76rem;
}

.stat-compare {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin: 8px 0;
}

.enemy-card .stat-compare span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid rgba(139, 176, 211, 0.2);
  background: rgba(8, 16, 26, 0.65);
  color: #a4bdd5;
  font-size: 0.72rem;
}

.stat-compare b,
.stat-compare i,
.stat-compare em {
  font-style: normal;
}

.stat-compare b {
  color: #e5f1fd;
  font-weight: 700;
}

.stat-compare i {
  color: #a4bdd5;
}

.enemy-card[disabled] {
  opacity: 0.46;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(0.75);
}

.enemy-card.active-raid-target[disabled] {
  opacity: 1;
  border-color: rgba(212, 180, 108, 0.72);
  background:
    linear-gradient(180deg, rgba(24, 42, 62, 0.96), rgba(9, 18, 30, 0.94)),
    radial-gradient(circle at 100% 0%, rgba(212, 180, 108, 0.24), transparent 42%);
  box-shadow:
    0 0 22px rgba(212, 180, 108, 0.18),
    inset 0 0 0 1px rgba(242, 236, 228, 0.08);
  color: var(--ink);
  filter: none;
}

.enemy-card.active-raid-target[disabled] .enemy-card-image {
  filter: saturate(1.08) contrast(1.08) brightness(1.08);
}

.enemy-card.inactive-raid-target[disabled] {
  opacity: 0.28;
  filter: grayscale(0.9) brightness(0.58);
}

.tab.locked,
.locked-action {
  opacity: 0.46;
  cursor: not-allowed;
}

.locked-action:hover {
  transform: none;
  border-color: rgba(242, 236, 228, 0.16);
}

.upgrade-card:hover,
.enemy-card:hover,
.icon-action:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 51, 79, 0.42);
}

.upgrade-card:hover {
  transform: none;
  border-color: rgba(242, 236, 228, 0.12);
}

.upgrade-buy:hover {
  border-color: rgba(95, 232, 143, 0.64);
  background: rgba(95, 232, 143, 0.18);
}

.equipment-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.shop-row {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.shop-panel,
.inventory-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(199, 163, 90, 0.28);
  background: rgba(0, 0, 0, 0.22);
}

.compact-heading {
  min-height: auto;
  margin-bottom: 10px;
}

.shop-offer-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(92px, 1fr));
  gap: 8px;
}

.shop-offer-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(242, 236, 228, 0.1);
  background: rgba(0, 0, 0, 0.28);
}

.shop-offer-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid rgba(199, 163, 90, 0.34);
}

.shop-offer-card strong,
.shop-offer-card small {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.shop-offer-card strong {
  line-height: 1.3;
}

.shop-offer-card small {
  color: var(--muted);
  font-size: 0.76rem;
}

.shop-offer-card .regular-price {
  color: var(--gold);
  font-weight: 800;
}

.shop-offer-card .item-level-requirement {
  width: fit-content;
  padding: 3px 7px;
  border: 1px solid rgba(139, 176, 211, 0.26);
  background: rgba(139, 176, 211, 0.1);
  color: #cbe6ff;
  font-weight: 800;
}

.shop-offer-card .discount-price {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.shop-offer-card .discount-price s {
  color: rgba(242, 236, 228, 0.5);
}

.shop-offer-card .discount-price b {
  color: #ff4c63;
  font-size: 0.92rem;
}

.shop-offer-card .discount-price em {
  color: #ffd1d8;
  font-style: normal;
}

.shop-offer-card button {
  min-height: 32px;
  border: 1px solid rgba(77, 183, 173, 0.38);
  color: var(--ink);
  background: rgba(77, 183, 173, 0.14);
  cursor: pointer;
}

.shop-offer-card.cannot-afford {
  opacity: 0.56;
}

.shop-offer-card.cannot-afford button,
.shop-offer-card button:disabled {
  border-color: rgba(242, 236, 228, 0.12);
  color: rgba(242, 236, 228, 0.42);
  background: rgba(0, 0, 0, 0.28);
  cursor: not-allowed;
}

.shop-refresh-status {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(242, 236, 228, 0.1);
}

.shop-refresh-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.shop-refresh-row strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.shop-refresh-track {
  height: 8px;
  overflow: hidden;
  border: 1px solid rgba(199, 163, 90, 0.28);
  background: rgba(0, 0, 0, 0.32);
}

.shop-refresh-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, rgba(199, 163, 90, 0.72), rgba(77, 183, 173, 0.74));
  transition: width 240ms ease;
}

.shop-action {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  text-align: left;
}

.shop-action img {
  width: 42px;
  aspect-ratio: 1;
  border: 1px solid rgba(199, 163, 90, 0.34);
  object-fit: cover;
  background: rgba(0, 0, 0, 0.34);
}

.inventory-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 10px;
  width: 100%;
  overflow: hidden;
}

.inventory-card {
  display: grid;
  gap: 7px;
  min-height: 192px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.inventory-image-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.inventory-item-image {
  width: 100%;
  aspect-ratio: 1;
  max-width: 100%;
  border: 1px solid rgba(199, 163, 90, 0.34);
  object-fit: cover;
  object-position: center;
  background: rgba(0, 0, 0, 0.34);
}

.inventory-card strong,
.inventory-card small,
.inventory-card span {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.inventory-image-button:hover .inventory-item-image,
.inventory-card.actions-open .inventory-item-image {
  border-color: rgba(255, 51, 79, 0.58);
}

.item-ability {
  color: var(--muted);
}

.item-duration {
  color: #e8c56a;
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.inventory-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
}

.inventory-actions[hidden] {
  display: none;
}

.inventory-actions button {
  min-height: 34px;
  border: 1px solid rgba(77, 183, 173, 0.38);
  color: var(--ink);
  background: rgba(77, 183, 173, 0.14);
  cursor: pointer;
  white-space: normal;
  line-height: 1.2;
}

.inventory-actions button[data-action="sell"] {
  border-color: rgba(199, 163, 90, 0.38);
  background: rgba(199, 163, 90, 0.12);
}

.gravedigger-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px) auto;
  gap: 12px;
  align-items: end;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(199, 163, 90, 0.28);
  background:
    radial-gradient(circle at 100% 0%, rgba(77, 183, 173, 0.16), transparent 38%),
    rgba(0, 0, 0, 0.28);
}

.clan-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px) auto;
  gap: 12px;
  align-items: end;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(199, 163, 90, 0.28);
  background:
    radial-gradient(circle at 100% 0%, rgba(77, 183, 173, 0.16), transparent 38%),
    rgba(0, 0, 0, 0.28);
}

#clanCreatePanel .primary-action {
  align-self: end;
  margin-top: 24px;
  white-space: normal;
  line-height: 1.2;
}

.clan-panel[hidden] {
  display: none;
}

.clan-panel h3 {
  margin-bottom: 6px;
}

.clan-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.clan-panel input {
  min-height: 44px;
  border: 1px solid rgba(242, 236, 228, 0.16);
  color: var(--ink);
  background: rgba(0, 0, 0, 0.36);
  padding: 0 10px;
  font: inherit;
}

.clan-actions {
  display: grid;
  gap: 8px;
}

.gravedigger-panel h3 {
  margin-bottom: 6px;
}

.gravedigger-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.tavern-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid rgba(181, 22, 43, 0.28);
  background:
    radial-gradient(circle at 95% 0%, rgba(181, 22, 43, 0.2), transparent 34%),
    rgba(0, 0, 0, 0.3);
}

.tavern-panel h3 {
  margin-bottom: 6px;
}

.tavern-raids {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tavern-raid {
  min-height: 108px;
  padding: 12px;
  border: 1px solid rgba(242, 236, 228, 0.12);
  color: var(--ink);
  background:
    radial-gradient(circle at 100% 0%, rgba(181, 22, 43, 0.25), transparent 34%),
    rgba(0, 0, 0, 0.28);
  text-align: left;
  cursor: pointer;
}

.tavern-raid span,
.tavern-raid strong,
.tavern-raid small {
  display: block;
}

.tavern-raid span {
  color: var(--muted);
  font-size: 0.8rem;
}

.tavern-raid strong {
  margin: 7px 0;
  font-size: 1.04rem;
}

.tavern-raid small {
  color: var(--gold);
}

.tavern-raid:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 51, 79, 0.42);
}

.gravedigger-panel select {
  min-height: 44px;
  border: 1px solid rgba(242, 236, 228, 0.16);
  color: var(--ink);
  background: rgba(0, 0, 0, 0.36);
  padding: 0 10px;
  font: inherit;
}

.work-status {
  margin-bottom: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.work-progress {
  position: relative;
  width: 100%;
  height: 8px;
  margin-top: 10px;
  border: 1px solid rgba(242, 236, 228, 0.16);
  background: rgba(0, 0, 0, 0.34);
  overflow: hidden;
}

.work-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(77, 183, 173, 0.65), rgba(199, 163, 90, 0.9));
  transition: width 0.25s linear;
}

.work-progress-label {
  display: inline-block;
  margin-top: 6px;
  color: var(--gold);
}

.report-card,
.ranking-row {
  min-height: auto;
  cursor: default;
}

.ranking-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) minmax(110px, auto) minmax(90px, auto) minmax(92px, auto);
  align-items: center;
  gap: 12px;
}

.ranking-row.current-player {
  border-color: rgba(255, 51, 79, 0.58);
  box-shadow: inset 0 0 28px rgba(181, 22, 43, 0.18);
}

.ranking-row button {
  min-height: 34px;
  border: 1px solid rgba(77, 183, 173, 0.38);
  color: var(--ink);
  background: rgba(77, 183, 173, 0.14);
  cursor: pointer;
}

.ranking-row button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.clan-member-row {
  display: grid;
  grid-template-columns: minmax(70px, auto) minmax(0, 1fr) minmax(70px, auto) auto;
  gap: 8px;
  align-items: center;
  min-height: 72px;
}

.clan-member-row strong,
.clan-member-row span,
.clan-member-row small {
  margin: 0;
}

.clan-war-row {
  min-height: 128px;
}

.clan-war-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.clan-war-animation {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(199, 163, 90, 0.34);
  background:
    radial-gradient(circle at 50% 0%, rgba(181, 22, 43, 0.18), transparent 42%),
    rgba(0, 0, 0, 0.34);
  overflow: hidden;
}

.clan-war-animation[hidden] {
  display: none;
}

.clan-war-fighters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  text-align: center;
  color: var(--silver);
}

.clan-war-animation.strike-left .clan-war-fighters strong:first-child {
  animation: duelLunge 520ms ease;
}

.clan-war-animation.strike-right .clan-war-fighters strong:last-child {
  animation: duelLunge 520ms ease;
}

.onboarding {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  place-items: center;
  padding: 18px;
  overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(9, 5, 7, 0.9), rgba(5, 4, 6, 0.94)),
    radial-gradient(circle at 50% 20%, rgba(181, 22, 43, 0.28), transparent 30%),
    url("assets/bloodmoon-keyart.png") center / cover no-repeat,
    rgba(4, 5, 8, 0.82);
  backdrop-filter: blur(18px);
}

.onboarding.active {
  display: grid;
}

.tutorial-overlay,
.support-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 18%, rgba(126, 28, 38, 0.28), transparent 32%),
    rgba(0, 0, 0, 0.72);
}

.tutorial-overlay[hidden],
.support-overlay[hidden] {
  display: none;
}

.tutorial-card,
.support-card {
  width: min(560px, 100%);
  padding: 20px;
  border: 1px solid rgba(199, 163, 90, 0.38);
  background:
    linear-gradient(180deg, rgba(15, 25, 36, 0.96), rgba(2, 5, 8, 0.94)),
    var(--panel);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.64);
}

.tutorial-card h2,
.support-card h2 {
  margin: 4px 0 10px;
  color: var(--ink);
}

.tutorial-card p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.support-card {
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
}

.support-card label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
}

.support-card input,
.support-card select,
.support-card textarea {
  width: 100%;
  border: 1px solid rgba(242, 236, 228, 0.16);
  color: var(--ink);
  background: rgba(0, 0, 0, 0.36);
  padding: 0 12px;
  font: inherit;
}

.support-card input,
.support-card select {
  min-height: 46px;
}

.support-card textarea {
  min-height: 150px;
  padding-top: 12px;
  resize: vertical;
}

.support-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

/* Értesítések beállító ablak (notifications.js) */
.notif-card .notif-hint {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.9rem;
}

.notif-perm-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.32);
}

.notif-perm-row .notif-hint {
  flex-basis: 100%;
  margin: 0;
}

.notif-perm {
  padding: 4px 10px;
  border: 1px solid currentColor;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.notif-perm.on {
  color: var(--teal);
}

.notif-perm.off {
  color: var(--red-hot);
}

.notif-perm.pending {
  color: var(--gold);
}

.notif-toggle-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.support-card .notif-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  color: var(--ink);
  cursor: pointer;
}

.support-card .notif-toggle.disabled {
  opacity: 0.45;
  cursor: default;
}

.support-card .notif-toggle input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  padding: 0;
  accent-color: var(--red-hot);
}

.tutorial-progress {
  height: 8px;
  margin: 18px 0;
  border: 1px solid rgba(242, 236, 228, 0.18);
  background: rgba(0, 0, 0, 0.45);
}

.tutorial-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--gold), #4db7ad);
  transition: width 220ms ease;
}

.tutorial-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.onboarding-card {
  width: min(100%, 430px);
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(242, 236, 228, 0.18);
  background: rgba(9, 10, 13, 0.94);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.56);
  padding: clamp(20px, 4vw, 34px);
}

.onboarding-card h2 {
  margin-bottom: 20px;
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1;
}

.onboarding-card label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
}

.onboarding.login-mode .auth-register-field {
  display: none;
}

.onboarding-card input,
.onboarding-card select {
  min-height: 46px;
  width: 100%;
  border: 1px solid rgba(242, 236, 228, 0.16);
  color: var(--ink);
  background: rgba(0, 0, 0, 0.36);
  padding: 0 12px;
  font: inherit;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 54px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 38px;
  height: 30px;
  border: 1px solid rgba(242, 236, 228, 0.24);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.46);
  display: grid;
  place-items: center;
  color: rgba(242, 236, 228, 0.9);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.password-toggle::before {
  content: none;
}

.password-toggle::after {
  content: none;
}

.password-toggle[aria-pressed="true"]::before {
  content: none;
}

.password-toggle[aria-pressed="true"]::after {
  content: none;
}

.password-toggle[aria-pressed="true"] {
  color: rgba(77, 183, 173, 0.95);
}

.auth-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.auth-remember-row {
  margin-top: 10px;
}

.auth-remember-row button {
  width: 100%;
  min-height: 40px;
}

.auth-message {
  min-height: 22px;
  margin-top: 10px;
  color: rgba(242, 236, 228, 0.9);
  font-size: 0.92rem;
}

.auth-message[data-state="error"] {
  color: #ff6f8f;
}

.auth-message[data-state="ok"] {
  color: #61d0b2;
}

.bottom-deck {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: clamp(18px, 3vw, 36px);
  margin-top: clamp(26px, 7vh, 72px);
}

.character-card {
  position: relative;
  min-height: 142px;
  padding: 18px;
  cursor: pointer;
}

.character-card.selected {
  border-color: rgba(255, 51, 79, 0.58);
  box-shadow: 0 0 38px rgba(181, 22, 43, 0.25);
}

.character-card h3 {
  margin-bottom: 8px;
  font-size: 1.25rem;
}

.character-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.faction-mark {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(199, 163, 90, 0.5);
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
}

.ranking-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-content: center;
  padding: 18px;
}

@keyframes drift {
  from {
    transform: translateX(-12%) skewY(-3deg);
  }
  to {
    transform: translateX(12%) skewY(-3deg);
  }
}

@keyframes duelLunge {
  0% {
    transform: translateX(0) scale(1);
    filter: brightness(1);
  }
  45% {
    transform: translateX(10px) scale(1.04);
    filter: brightness(1.28);
  }
  100% {
    transform: translateX(0) scale(1);
    filter: brightness(1);
  }
}

@keyframes emberRise {
  from {
    background-position: 0 100%, 0 120%;
  }
  to {
    background-position: 0 -120%, 0 -160%;
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.88);
    opacity: 0.62;
  }
  50% {
    transform: scale(1.18);
    opacity: 0.95;
  }
}

@keyframes playerLunge {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(12px);
  }
}

@keyframes botLunge {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-12px);
  }
}

@keyframes strikePulse {
  0%,
  100% {
    transform: scaleX(0.35);
    opacity: 0.34;
  }
  50% {
    transform: scaleX(1);
    opacity: 1;
  }
}

@keyframes hitShake {
  0%,
  100% {
    transform: translateX(0);
    filter: none;
  }
  35% {
    transform: translateX(-7px);
    filter: brightness(1.5) saturate(1.3);
  }
  70% {
    transform: translateX(5px);
  }
}

@keyframes bloodBurst {
  from {
    transform: scale(0.55) rotate(-8deg);
    opacity: 0;
  }
  45% {
    opacity: 1;
  }
  to {
    transform: scale(1.25) rotate(8deg);
    opacity: 0;
  }
}

@keyframes clawSlash {
  from {
    transform: translateX(-28px) scaleX(0.65);
    opacity: 0;
  }
  35% {
    opacity: 1;
  }
  to {
    transform: translateX(28px) scaleX(1.1);
    opacity: 0;
  }
}

@keyframes silverFlash {
  from {
    transform: scaleX(0.2);
    opacity: 0;
  }
  40% {
    opacity: 1;
  }
  to {
    transform: scaleX(1.25);
    opacity: 0;
  }
}

@media (min-width: 861px), (orientation: landscape) {
  body {
    background:
      linear-gradient(90deg, rgba(2, 5, 9, 0.72), rgba(5, 8, 12, 0.18) 48%, rgba(2, 5, 9, 0.74)),
      url("assets/bloodmoon-keyart.png") center / cover no-repeat fixed,
      #05070a;
  }

  .game-shell {
    display: grid;
    place-items: center;
    padding: 16px;
  }

  .stage {
    display: grid;
    grid-template-columns: 138px minmax(420px, 1fr) 360px;
    grid-template-rows: 92px minmax(0, 1fr) 46px;
    gap: 10px;
    width: min(1180px, calc(100vw - 32px));
    min-height: min(760px, calc(100vh - 32px));
    padding: 10px;
    border-color: rgba(93, 112, 126, 0.72);
    background:
      linear-gradient(180deg, rgba(25, 31, 37, 0.94), rgba(6, 8, 12, 0.96)),
      #0a0d11;
    box-shadow:
      0 0 0 2px rgba(0, 0, 0, 0.78),
      0 24px 90px rgba(0, 0, 0, 0.72),
      inset 0 0 48px rgba(118, 12, 25, 0.2);
  }

  .stage::before {
    z-index: -1;
    background:
      radial-gradient(circle at 7% 0%, rgba(153, 29, 35, 0.38), transparent 18%),
      radial-gradient(circle at 94% 6%, rgba(59, 101, 132, 0.36), transparent 22%),
      linear-gradient(90deg, rgba(2, 4, 7, 0.72), transparent 18%, transparent 82%, rgba(2, 4, 7, 0.72));
  }

  .stage::after,
  .mist,
  .embers {
    opacity: 0.16;
  }

  .topbar {
    grid-column: 1 / -1;
    grid-row: 1;
    display: grid;
    grid-template-columns: 138px minmax(0, 1fr) 360px;
    align-items: center;
    padding: 0;
    border: 1px solid rgba(93, 112, 126, 0.6);
    background:
      radial-gradient(circle at 50% 0%, rgba(197, 218, 238, 0.22), transparent 45%),
      linear-gradient(180deg, rgba(34, 44, 56, 0.94), rgba(8, 11, 15, 0.92));
    box-shadow: inset 0 -1px 0 rgba(199, 163, 90, 0.22);
  }

  .brand-block {
    grid-column: 2;
    justify-self: center;
    text-align: center;
  }

  .brand-block .eyebrow,
  .account-strip {
    display: none;
  }

  h1 {
    font-size: clamp(2.4rem, 4.8vw, 4.6rem);
    letter-spacing: 0;
    color: #d8e3ee;
    text-shadow:
      0 2px 0 #101820,
      0 0 18px rgba(145, 190, 230, 0.52),
      0 0 28px rgba(181, 22, 43, 0.28);
  }

  .top-menu {
    position: absolute;
    left: 12px;
    top: 104px;
    width: 126px;
    min-width: 0;
    margin: 0;
    z-index: 9;
  }

  .menu-toggle {
    display: none;
  }

  .dropdown-tabs {
    position: static;
    display: grid;
    width: 100%;
    max-height: none;
    gap: 6px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .dropdown-tabs .tab {
    min-width: 0;
    min-height: 30px;
    padding: 0 8px;
    border: 1px solid rgba(137, 154, 166, 0.62);
    border-radius: 0;
    color: #d1d8dc;
    font-size: 0.72rem;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
    background:
      linear-gradient(180deg, rgba(58, 70, 78, 0.96), rgba(11, 15, 20, 0.98));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.1),
      inset 0 -2px 0 rgba(0, 0, 0, 0.56),
      0 4px 10px rgba(0, 0, 0, 0.34);
  }

  .dropdown-tabs .tab:hover,
  .dropdown-tabs .tab.active {
    color: #fff3d3;
    border-color: rgba(199, 163, 90, 0.72);
    background:
      linear-gradient(180deg, rgba(105, 31, 39, 0.98), rgba(23, 18, 21, 0.98));
    box-shadow: inset 0 0 12px rgba(181, 22, 43, 0.28);
  }

  .hud {
    grid-column: 3;
    grid-row: 2;
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: max-content;
    gap: 10px;
    align-self: start;
    padding: 0;
  }

  .hero-panel,
  .action-panel,
  .view-panel {
    border-color: rgba(75, 91, 105, 0.78);
    background:
      linear-gradient(180deg, rgba(23, 29, 36, 0.94), rgba(5, 8, 12, 0.94));
    backdrop-filter: none;
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.035),
      0 10px 28px rgba(0, 0, 0, 0.52);
  }

  .hero-panel {
    grid-template-columns: 1fr;
    gap: 10px;
    max-width: none;
    padding: 10px;
  }

  .hero-copy {
    order: 1;
    padding: 6px 8px;
    border: 1px solid rgba(199, 163, 90, 0.18);
    background: rgba(0, 0, 0, 0.22);
  }

  .hero-figure .resource-grid {
    display: none;
  }

  .hero-copy h2 {
    margin: 0;
    font-size: 1rem;
    color: var(--gold);
  }

  .hero-copy .eyebrow,
  .hero-copy .lore {
    display: none;
  }

  .portrait-frame {
    min-height: 236px;
    margin-bottom: 92px;
    border-color: rgba(126, 28, 38, 0.72);
    background: #080a0d;
  }

  .sigil {
    opacity: 0.16;
  }

  .equipped-slot {
    width: 62px;
    height: 62px;
    border-color: rgba(87, 102, 116, 0.9);
    background:
      linear-gradient(180deg, rgba(34, 42, 50, 0.96), rgba(8, 11, 15, 0.96));
  }

  .equipped-weapon {
    top: auto;
    left: 10px;
    bottom: 10px;
    transform: none;
  }

  .equipped-talisman {
    top: auto;
    right: 10px;
    bottom: 10px;
    transform: none;
  }

  .equipped-potion {
    left: 50%;
    top: auto;
    bottom: 10px;
    transform: translateX(-50%);
  }

  .hero-figure .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .resource-grid div {
    min-height: 42px;
    padding: 7px 9px;
    border-color: rgba(75, 91, 105, 0.58);
    background: rgba(0, 0, 0, 0.36);
  }

  .resource-grid span,
  .stats label {
    font-size: 0.72rem;
  }

  .resource-grid strong {
    color: #b9f2e5;
    font-size: 0.82rem;
  }

  .action-panel {
    padding: 10px;
  }

  .energy-panel {
    margin-top: 8px;
    margin-bottom: 8px;
    padding: 7px;
    border-color: rgba(139, 176, 211, 0.42);
    background:
      linear-gradient(180deg, rgba(12, 24, 36, 0.84), rgba(2, 5, 8, 0.72)),
      var(--bm-slot);
  }

  .energy-panel-head span {
    color: #93a9be;
    font-size: 0.64rem;
  }

  .energy-panel-head strong {
    color: #edf6ff;
    font-size: 0.8rem;
  }

  .energy-track {
    height: 9px;
    border-color: rgba(116, 143, 170, 0.38);
    background: rgba(5, 10, 16, 0.84);
  }

  .energy-fill {
    background: linear-gradient(90deg, #34597a, #7bb1e5);
    box-shadow: 0 0 10px rgba(123, 177, 229, 0.4);
  }

  .panel-heading {
    margin-bottom: 8px;
  }

  .panel-heading span {
    width: 38px;
    height: 30px;
  }

  .stats {
    gap: 8px;
    margin: 8px 0 10px;
  }

  .actions {
    grid-template-columns: 1fr 1fr;
  }

  .primary-action,
  .ghost-action {
    min-height: 36px;
    font-size: 0.78rem;
  }

  .combat-log {
    min-height: 30px;
    margin: 10px 0 0;
    padding: 5px 14px;
    border: 1px solid rgba(255, 51, 79, 0.62);
    color: #fff;
    text-align: center;
    background:
      linear-gradient(90deg, rgba(35, 0, 5, 0.95), rgba(210, 18, 36, 0.95), rgba(35, 0, 5, 0.95));
    box-shadow: 0 0 22px rgba(181, 22, 43, 0.62);
  }

  .view-deck {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    padding: 0;
    overflow: auto;
  }

  .game-footer {
    grid-column: 1 / -1;
    grid-row: 3;
    min-height: 100%;
    border: 1px solid rgba(75, 91, 105, 0.54);
    background: linear-gradient(180deg, rgba(24, 31, 38, 0.88), rgba(8, 11, 15, 0.9));
  }

  .view-panel {
    min-height: 100%;
    padding: 12px;
  }

  .module-heading {
    min-height: 38px;
    margin-bottom: 10px;
    padding: 7px 10px;
    border: 1px solid rgba(75, 91, 105, 0.7);
    background: linear-gradient(180deg, rgba(24, 31, 38, 0.94), rgba(8, 11, 15, 0.94));
  }

  .module-heading h3 {
    font-size: 1rem;
  }

  .upgrade-grid,
  .enemy-list,
  .inventory-list,
  .shop-row,
  .tavern-raids {
    gap: 8px;
  }

  .inventory-list {
    grid-template-columns: repeat(5, minmax(78px, 1fr));
  }

  .shop-offer-list {
    grid-template-columns: repeat(5, minmax(78px, 1fr));
  }

  .inventory-card {
    min-height: 168px;
    padding: 8px;
  }
}

@media (max-width: 860px) and (orientation: landscape) {
  .game-shell {
    min-width: 100vw;
    min-height: 100vh;
    padding: 8px;
    overflow: auto;
  }

  .stage {
    grid-template-columns: 112px minmax(360px, 1fr) 300px;
    grid-template-rows: 70px minmax(0, 1fr) 38px;
    width: max(820px, calc(100vw - 16px));
    min-height: max(520px, calc(100vh - 16px));
    gap: 8px;
    padding: 8px;
  }

  .topbar {
    grid-template-columns: 112px minmax(0, 1fr) 300px;
  }

  .top-menu {
    left: 10px;
    top: 88px;
    width: 104px;
  }

  .dropdown-tabs .tab {
    min-height: 27px;
    padding: 0 5px;
    font-size: 0.62rem;
  }

  h1 {
    font-size: 2.4rem;
  }

  .hero-panel,
  .action-panel,
  .view-panel {
    padding: 8px;
  }

  .portrait-frame {
    min-height: 176px;
  }

  .equipped-slot {
    width: 48px;
    height: 48px;
  }

  .resource-grid div {
    min-height: 36px;
    padding: 5px 7px;
  }

  .resource-grid span,
  .stats label,
  .dropdown-tabs .tab,
  .inventory-card span,
  .shop-offer-card small {
    font-size: 0.66rem;
  }

  .stats {
    gap: 6px;
  }

  .primary-action,
  .ghost-action {
    min-height: 32px;
  }

  .inventory-list,
  .shop-offer-list {
    grid-template-columns: repeat(4, minmax(72px, 1fr));
  }

  .shop-offer-card {
    gap: 5px;
    padding: 6px;
  }

  .shop-offer-card strong {
    font-size: 0.72rem;
    line-height: 1.25;
  }

  .shop-offer-card small {
    font-size: 0.66rem;
    line-height: 1.25;
  }

  .shop-offer-card button {
    min-height: 28px;
    font-size: 0.68rem;
    padding: 0 6px;
  }

  .gravedigger-panel,
  .clan-panel {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 8px;
  }

  #clanCreatePanel .primary-action {
    width: 100%;
    margin-top: 6px;
  }

  .gravedigger-panel h3,
  .clan-panel h3 {
    font-size: 0.96rem;
    line-height: 1.25;
  }

  .work-status,
  .work-progress-label {
    font-size: 0.74rem;
    line-height: 1.35;
  }

  .gravedigger-panel select,
  .clan-panel input,
  #startGravediggerButton {
    min-height: 34px;
    font-size: 0.74rem;
  }
}

@media (max-width: 860px) and (orientation: portrait) {
  html,
  body {
    min-height: 100%;
    overflow: auto;
  }

  .game-shell {
    filter: none;
    pointer-events: auto;
  }

  .rotate-lock {
    display: none;
  }

  .topbar,
  .hud,
  .view-deck,
  .bottom-deck {
    padding-left: 14px;
    padding-right: 14px;
  }

  .topbar,
  .hud,
  .bottom-deck,
  .hero-panel,
  .upgrade-grid,
  .enemy-list,
  .raid-prep-panel,
  .tavern-raids,
  .equipment-row,
  .shop-row,
  .inventory-list,
  .gravedigger-panel,
  .clan-grid,
  .ranking-row {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    padding-top: 14px;
    gap: 10px;
  }

  .brand-block {
    padding-right: 0;
  }

  .top-menu {
    position: static;
    justify-self: end;
    align-self: end;
    margin-top: 18px;
    min-width: 0;
  }

  .menu-toggle {
    min-width: 104px;
    min-height: 38px;
    padding: 0 10px;
    font-size: 0.84rem;
  }

  .dropdown-tabs {
    width: min(220px, calc(100vw - 28px));
    max-height: min(70vh, 420px);
    overflow-y: auto;
  }

  .tabs:not(.dropdown-tabs) {
    overflow-x: auto;
  }

  .hero-panel {
    max-width: none;
  }

  .portrait-frame {
    min-height: 168px;
    margin-bottom: 82px;
  }

  .equipped-slot {
    width: 48px;
    height: 48px;
  }

  .equipped-weapon {
    top: -10px;
  }

  .equipped-talisman {
    right: -8px;
  }

  .equipped-potion {
    left: -8px;
  }

  .portrait-image {
    object-position: center 8%;
  }

  .resource-grid,
  .ranking-panel {
    grid-template-columns: 1fr 1fr;
  }

  .hero-copy h2 {
    font-size: 1.5rem;
    line-height: 1.12;
  }

  .lore,
  .combat-log,
  .work-status,
  .report-card small,
  .ranking-row small,
  .tavern-raid small {
    font-size: 0.84rem;
    line-height: 1.35;
  }

  .ranking-row {
    gap: 8px;
    padding: 10px;
  }

  .ranking-row span,
  .upgrade-card span,
  .enemy-card span {
    font-size: 0.78rem;
  }

  .enemy-card {
    grid-template-columns: 1fr;
    padding: 10px;
    row-gap: 5px;
  }

  .enemy-card-image {
    width: 76px;
  }

  .enemy-meta-grid {
    grid-template-columns: 1fr;
  }

  .enemy-card-head strong {
    font-size: 1rem;
  }

  .ranking-row strong,
  .upgrade-card strong,
  .enemy-card strong {
    font-size: 1rem;
  }

  .module-heading {
    display: grid;
  }

  .raid-duel-panel {
    grid-template-columns: 1fr;
  }

  .duel-strike {
    height: 2px;
  }

  .auth-actions {
    grid-template-columns: 1fr;
  }

  .onboarding {
    place-items: start stretch;
    align-content: start;
    padding: 12px;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .onboarding.active {
    display: grid;
  }

  .onboarding-card {
    width: 100%;
    max-height: none;
    min-height: auto;
    margin: 0 auto;
    overflow: visible;
    padding: 16px;
  }

  .onboarding-card h2 {
    margin-bottom: 12px;
    font-size: 1.55rem;
  }

  .onboarding-card label {
    gap: 6px;
    margin-bottom: 10px;
  }

  .onboarding-card input,
  .onboarding-card select {
    min-height: 42px;
  }

  .portrait-choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .portrait-choice {
    min-height: 96px;
  }

  .inventory-list,
  .shop-offer-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shop-offer-card {
    gap: 6px;
    padding: 7px;
  }

  .shop-offer-card strong {
    font-size: 0.8rem;
    line-height: 1.28;
  }

  .shop-offer-card small {
    font-size: 0.72rem;
    line-height: 1.28;
  }

  .shop-offer-card button {
    min-height: 30px;
    font-size: 0.72rem;
  }

  .gravedigger-panel,
  .clan-panel,
  .tavern-panel,
  .view-panel,
  .hero-panel,
  .action-panel {
    padding: 12px;
  }

  .gravedigger-panel,
  .clan-panel {
    gap: 8px;
  }

  .work-progress-label {
    font-size: 0.78rem;
    line-height: 1.3;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 520px) {
  .topbar {
    gap: 8px;
  }

  .top-menu {
    width: 100%;
    min-width: 0;
    justify-self: stretch;
  }

  .menu-toggle {
    width: 100%;
    min-width: 0;
  }

  .dropdown-tabs {
    left: 0;
    right: auto;
    width: 100%;
    max-width: 100%;
  }
}

/* Bloodmoon-style gothic game frame */
@media (min-width: 901px) {
  :root {
    --bm-blue: #6fa1cb;
    --bm-ice: #d8ecff;
    --bm-frame: #2a3540;
    --bm-black: rgba(4, 7, 10, 0.9);
    --bm-slot: rgba(11, 18, 26, 0.84);
  }

  body {
    background:
      radial-gradient(circle at 94% 14%, rgba(180, 214, 255, 0.2), transparent 11%),
      linear-gradient(90deg, rgba(4, 9, 14, 0.92), rgba(9, 15, 22, 0.78) 45%, rgba(4, 9, 14, 0.95)),
      url("assets/bloodmoon-keyart.png") center / cover no-repeat fixed,
      #05080c;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  }

  .game-shell {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 10px;
  }

  .stage {
    display: grid;
    grid-template-columns: 184px minmax(560px, 1fr) 320px;
    grid-template-rows: 104px minmax(560px, 1fr) 42px;
    gap: 0 12px;
    width: min(1240px, calc(100vw - 20px));
    min-height: min(760px, calc(100vh - 20px));
    border: 2px solid #415060;
    border-radius: 2px;
    background:
      linear-gradient(180deg, rgba(17, 28, 39, 0.96), rgba(4, 7, 10, 0.97)),
      #070a0f;
    box-shadow:
      0 0 0 4px rgba(0, 0, 0, 0.72),
      inset 0 0 0 2px rgba(180, 205, 230, 0.12),
      inset 0 0 95px rgba(0, 0, 0, 0.86),
      0 24px 80px rgba(0, 0, 0, 0.7);
  }

  .stage::before {
    z-index: -4;
    background:
      radial-gradient(circle at 92% 18%, rgba(204, 228, 255, 0.34), transparent 8%),
      linear-gradient(90deg, rgba(5, 9, 13, 0.96), rgba(8, 16, 24, 0.42) 45%, rgba(5, 9, 13, 0.96)),
      linear-gradient(180deg, rgba(0, 0, 0, 0.28), transparent 22%, rgba(0, 0, 0, 0.74));
  }

  .stage::after {
    z-index: 3;
    opacity: 0.28;
    background:
      linear-gradient(180deg, rgba(220, 236, 255, 0.09) 0 1px, transparent 1px 18px),
      linear-gradient(90deg, rgba(220, 236, 255, 0.05) 0 1px, transparent 1px 18px);
    background-size: 18px 18px;
    mix-blend-mode: screen;
  }

  .keyart {
    filter: saturate(0.86) contrast(1.12) brightness(0.42);
  }

  .embers {
    opacity: 0.13;
  }

  .mist {
    opacity: 0.42;
  }

  .topbar {
    grid-column: 1 / -1;
    grid-row: 1;
    display: grid;
    place-items: start center;
    padding: 0;
    min-height: 104px;
    border-bottom: 1px solid rgba(142, 171, 198, 0.32);
    background:
      radial-gradient(ellipse at 50% 0%, rgba(129, 174, 220, 0.26), transparent 55%),
      linear-gradient(180deg, rgba(12, 20, 29, 0.98), rgba(4, 7, 10, 0.82));
  }

  .brand-block {
    position: relative;
    min-width: 410px;
    padding: 8px 48px 0;
    text-align: center;
  }

  .brand-block::before,
  .brand-block::after {
    content: "";
    position: absolute;
    top: 22px;
    width: 148px;
    height: 24px;
    border-top: 2px solid rgba(176, 199, 223, 0.54);
    border-bottom: 1px solid rgba(130, 28, 42, 0.58);
    filter: drop-shadow(0 0 7px rgba(111, 161, 203, 0.35));
  }

  .brand-block::before {
    right: 100%;
    background: linear-gradient(90deg, transparent, rgba(110, 18, 32, 0.7));
  }

  .brand-block::after {
    left: 100%;
    background: linear-gradient(90deg, rgba(110, 18, 32, 0.7), transparent);
  }

  .brand-block .eyebrow {
    display: none;
  }

  h1 {
    color: var(--bm-ice);
    font-size: 4.1rem;
    letter-spacing: 0.035em;
    line-height: 0.9;
    text-transform: uppercase;
    text-shadow:
      0 2px 0 #17222d,
      0 0 10px rgba(154, 201, 255, 0.8),
      0 0 28px rgba(82, 133, 190, 0.68);
  }

  .account-strip {
    justify-content: center;
    margin-top: 4px;
  }

  #playerNameLabel {
    min-height: 22px;
    border: 0;
    color: #99b7d5;
    background: transparent;
    font-size: 0.72rem;
    text-transform: uppercase;
  }

  .top-menu {
    position: absolute;
    top: 124px;
    left: 16px;
    z-index: 25;
    display: block;
    width: 158px;
    min-width: 0;
    margin: 0;
  }

  .menu-toggle {
    display: none;
  }

  .dropdown-tabs {
    position: static;
    display: grid;
    width: 100%;
    max-width: none;
    gap: 7px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .dropdown-tabs .tab {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 31px;
    padding: 0 12px;
    border: 1px solid rgba(158, 184, 210, 0.5);
    border-radius: 18px;
    color: #d6e8fb;
    background:
      linear-gradient(180deg, rgba(99, 121, 143, 0.7), rgba(24, 31, 39, 0.95) 48%, rgba(7, 10, 14, 0.98)),
      #111820;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.2),
      inset 0 -8px 12px rgba(0, 0, 0, 0.46),
      0 2px 0 rgba(0, 0, 0, 0.68);
    font-size: 0.73rem;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
  }

  .dropdown-tabs .tab::before,
  .dropdown-tabs .tab::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0c1117;
    box-shadow: inset 0 0 0 1px rgba(209, 226, 242, 0.32);
    transform: translateY(-50%);
  }

  .dropdown-tabs .tab::before {
    left: 8px;
  }

  .dropdown-tabs .tab::after {
    right: 8px;
  }

  .dropdown-tabs .tab:hover,
  .dropdown-tabs .tab.active {
    color: #fff;
    border-color: rgba(225, 239, 255, 0.78);
    background:
      linear-gradient(180deg, rgba(113, 34, 48, 0.92), rgba(32, 43, 55, 0.95) 52%, rgba(7, 10, 14, 0.98)),
      #151d27;
    box-shadow:
      inset 0 0 16px rgba(118, 172, 224, 0.18),
      0 0 14px rgba(154, 23, 44, 0.4);
  }

  .hud {
    grid-column: 3;
    grid-row: 2;
    display: grid;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 10px;
    padding: 8px 14px 0 0;
  }

  .hero-panel,
  .action-panel,
  .view-panel {
    border: 1px solid rgba(137, 162, 188, 0.48);
    background:
      linear-gradient(180deg, rgba(16, 25, 34, 0.92), rgba(4, 7, 11, 0.9)),
      var(--bm-black);
    backdrop-filter: none;
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.04),
      inset 0 0 42px rgba(0, 0, 0, 0.62),
      0 12px 30px rgba(0, 0, 0, 0.38);
  }

  .hero-panel {
    display: flex;
    flex-direction: column;
    max-width: none;
    padding: 10px;
    gap: 8px;
  }

  .hero-figure {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    align-items: start;
  }

  .portrait-frame {
    width: 100%;
    min-height: 180px;
    aspect-ratio: 1.5;
    margin-bottom: 76px;
    border-color: rgba(139, 176, 211, 0.65);
    background:
      radial-gradient(circle at 50% 24%, rgba(118, 172, 224, 0.2), transparent 42%),
      #06090d;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.78);
  }

  .portrait-image {
    opacity: 1;
    object-position: center top;
  }

  .portrait-glow {
    display: none;
  }

  .equipped-slot {
    width: 30px;
    height: 30px;
    border-color: rgba(139, 176, 211, 0.45);
    background:
      radial-gradient(circle at 50% 35%, rgba(85, 125, 165, 0.3), transparent 50%),
      #07101a;
  }

  .equipped-slot .slot-icon {
    width: 16px;
    height: 16px;
  }

  .slot-item-image {
    inset: 3px;
    width: calc(100% - 6px);
    height: calc(100% - 6px);
  }

  .slot-count {
    right: -5px;
    bottom: -5px;
    min-width: 18px;
    height: 18px;
    font-size: 0.62rem;
  }

  .equipped-weapon {
    top: 6px;
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
  }

  .equipped-talisman {
    top: 50%;
    right: 6px;
    bottom: auto;
    transform: translateY(-50%);
  }

  .equipped-potion {
    top: 50%;
    left: 6px;
    bottom: auto;
    transform: translateY(-50%);
  }

  .hero-figure .resource-grid {
    display: none;
  }

  .resource-grid div,
  .inventory-card,
  .clan-grid div,
  .ranking-panel div,
  .equipment-row div {
    border-color: rgba(116, 143, 170, 0.34);
    background:
      linear-gradient(180deg, rgba(15, 25, 36, 0.8), rgba(2, 5, 8, 0.72)),
      var(--bm-slot);
  }

  .resource-grid div {
    min-height: 38px;
    padding: 5px 7px;
  }

  .resource-grid span {
    color: #93a9be;
    font-size: 0.64rem;
    text-transform: uppercase;
  }

  .resource-grid strong {
    color: #e7f3ff;
    font-size: 0.86rem;
  }

  .hero-copy {
    margin-top: 42px;
    text-align: center;
  }

  .hero-copy .eyebrow {
    margin-bottom: 4px;
    color: #8eb5df;
    font-size: 0.68rem;
  }

  .hero-copy h2 {
    margin-bottom: 4px;
    color: #f0f7ff;
    font-size: 1.25rem;
    text-shadow: 0 0 12px rgba(111, 161, 203, 0.46);
  }

  .hero-copy .lore {
    max-width: none;
    margin-bottom: 0;
    color: #a6b3bf;
    font-size: 0.75rem;
    line-height: 1.35;
  }

  .active-boost-list {
    margin-top: 8px;
  }

  .character-stat-list {
    gap: 5px;
    margin-top: 8px;
  }

  .character-stat-list div {
    padding: 5px 6px;
    border-color: rgba(116, 143, 170, 0.34);
    background:
      linear-gradient(180deg, rgba(15, 25, 36, 0.8), rgba(2, 5, 8, 0.72)),
      var(--bm-slot);
  }

  .character-stat-list span {
    color: #93a9be;
    font-size: 0.58rem;
  }

  .character-stat-list strong {
    color: #e7f3ff;
    font-size: 0.76rem;
  }

  .active-boost {
    padding: 6px 7px;
    border-color: rgba(139, 176, 211, 0.42);
    background:
      linear-gradient(180deg, rgba(12, 24, 36, 0.84), rgba(2, 5, 8, 0.72)),
      var(--bm-slot);
  }

  .active-boost span,
  .active-boost small {
    color: #9db0c4;
    font-size: 0.62rem;
  }

  .active-boost strong {
    color: #edf6ff;
    font-size: 0.68rem;
  }

  .action-panel {
    padding: 10px;
  }

  .panel-heading span {
    width: 38px;
    height: 38px;
    border-color: rgba(159, 31, 47, 0.74);
    color: #ff5264;
  }

  .stats {
    gap: 8px;
    margin: 12px 0;
  }

  .stats label {
    gap: 4px;
    font-size: 0.73rem;
  }

  meter {
    height: 10px;
  }

  .primary-action,
  .ghost-action,
  .icon-action {
    min-height: 33px;
    border: 1px solid rgba(133, 161, 190, 0.58);
    color: #e6f2ff;
    background:
      linear-gradient(180deg, rgba(82, 104, 126, 0.76), rgba(10, 16, 23, 0.94)),
      #0c1219;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  }

  .primary-action {
    border-color: rgba(161, 31, 48, 0.78);
    background:
      linear-gradient(180deg, rgba(147, 30, 46, 0.9), rgba(27, 10, 15, 0.96)),
      #230a10;
  }

  .combat-log {
    min-height: 48px;
    margin-top: 10px;
    border-left-color: #8eb5df;
    color: #c7d3df;
    background: rgba(0, 0, 0, 0.38);
    font-size: 0.75rem;
  }

  .view-deck {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    padding: 8px 0 0;
  }

  .view-panel {
    min-height: 100%;
    padding: 14px;
    overflow: auto;
    scrollbar-color: #586d82 #070b10;
  }

  .view-panel::before,
  .hero-panel::before {
    content: "";
    display: block;
    height: 22px;
    margin: -8px auto 8px;
    max-width: 360px;
    border-top: 2px solid rgba(180, 205, 230, 0.46);
    border-bottom: 1px solid rgba(122, 22, 36, 0.68);
    background:
      radial-gradient(circle at 50% 50%, rgba(220, 236, 255, 0.72) 0 4px, transparent 5px),
      linear-gradient(90deg, transparent, rgba(52, 68, 84, 0.9), transparent);
  }

  .module-heading {
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(129, 156, 184, 0.26);
  }

  .module-heading h3 {
    color: #edf6ff;
    font-size: 1.2rem;
    text-shadow: 0 0 12px rgba(111, 161, 203, 0.34);
  }

  .eyebrow {
    color: #87add3;
    font-size: 0.68rem;
  }

  .upgrade-grid,
  .enemy-list,
  .clan-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .enemy-card,
  .upgrade-card,
  .shop-offer-card,
  .report-card,
  .ranking-row,
  .tavern-raid,
  .gravedigger-panel,
  .clan-panel,
  .tavern-panel,
  .raid-prep-panel {
    border-color: rgba(118, 145, 173, 0.38);
    background:
      linear-gradient(180deg, rgba(15, 25, 36, 0.82), rgba(3, 6, 10, 0.82)),
      rgba(0, 0, 0, 0.4);
    box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.48);
  }

  .enemy-card {
    min-height: 0;
    padding: 8px;
  }

  .stat-compare {
    grid-template-columns: 1fr;
  }

  .enemy-card .stat-compare span {
    display: flex;
  }

  .enemy-card-image {
    border-color: rgba(139, 176, 211, 0.54);
    filter: saturate(0.92) contrast(1.08);
  }

  .enemy-card strong,
  .inventory-card strong,
  .ranking-row strong,
  .upgrade-card strong {
    color: #edf6ff;
  }

  .enemy-card small,
  .inventory-card small,
  .report-card small,
  .ranking-row small,
  .work-status,
  .lore {
    color: #aab7c4;
  }

  .shop-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .shop-action {
    grid-template-columns: 34px minmax(0, 1fr);
    min-height: 46px;
    padding: 6px;
  }

  .shop-action img {
    width: 34px;
  }

  .inventory-list,
  .shop-offer-list {
    grid-template-columns: repeat(5, minmax(72px, 1fr));
    gap: 7px;
  }

  .inventory-card {
    min-height: 142px;
    padding: 7px;
  }

  .inventory-item-image,
  .shop-offer-card img {
    border-color: rgba(139, 176, 211, 0.48);
    background:
      radial-gradient(circle at 50% 32%, rgba(80, 119, 156, 0.35), transparent 52%),
      #05090d;
  }

  .inventory-card span,
  .inventory-card small,
  .item-ability {
    font-size: 0.68rem;
  }

  .inventory-card strong {
    font-size: 0.76rem;
  }

  .gravedigger-panel {
    grid-template-columns: minmax(0, 1fr) 210px auto;
    padding: 10px;
  }

  .clan-panel {
    grid-template-columns: minmax(0, 1fr) 210px auto;
    padding: 10px;
  }

  .tavern-raids {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .raid-prep-panel {
    grid-template-columns: minmax(0, 1fr);
    padding: 10px;
  }

  .raid-duel-panel {
    grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr);
  }

  .game-footer {
    grid-column: 1 / -1;
    grid-row: 3;
    min-height: 42px;
    border-top: 1px solid rgba(142, 171, 198, 0.24);
    background: linear-gradient(180deg, rgba(4, 7, 10, 0.2), rgba(0, 0, 0, 0.58));
  }
}

@media (min-width: 901px) and (max-width: 1080px) {
  .stage {
    grid-template-columns: 160px minmax(480px, 1fr) 290px;
    gap: 0 8px;
  }

  .top-menu {
    left: 10px;
    width: 142px;
  }

  .dropdown-tabs .tab {
    font-size: 0.66rem;
  }

  .inventory-list,
  .shop-offer-list {
    grid-template-columns: repeat(4, minmax(68px, 1fr));
  }
}

.portrait-frame {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 58px;
  grid-template-rows: repeat(5, 54px);
  gap: 7px;
  min-height: 0;
  aspect-ratio: auto;
  margin: 0 0 16px;
  padding: 8px;
  overflow: hidden;
}

.equipped-ring {
  display: contents;
  pointer-events: none;
}

.equipped-ring .equipped-slot {
  width: 100%;
  height: 100%;
  min-width: 0;
  pointer-events: auto;
}

.portrait-frame .portrait-image {
  position: relative;
  inset: auto;
  grid-column: 2;
  grid-row: 1 / 6;
  z-index: 1;
}

.equipped-ring .slot-item-image {
  border-color: rgba(126, 176, 211, 0.42);
  background:
    radial-gradient(circle at 50% 32%, rgba(89, 143, 186, 0.24), transparent 56%),
    rgba(0, 0, 0, 0.48);
}

.equipment-preview-slot {
  cursor: help;
}

.equipped-helm {
  grid-column: 1;
  grid-row: 1;
}

.equipped-bracelet {
  grid-column: 3;
  grid-row: 1;
}

.equipped-coat {
  grid-column: 1;
  grid-row: 2;
}

.equipped-pants {
  grid-column: 3;
  grid-row: 2;
}

.equipped-weapon {
  grid-column: 1;
  grid-row: 3;
}

.equipped-talisman {
  grid-column: 3;
  grid-row: 3;
}

.equipped-vest {
  grid-column: 1;
  grid-row: 4;
}

.equipped-ring .equipped-ring-slot {
  grid-column: 3;
  grid-row: 4;
}

.equipped-boots {
  grid-column: 3;
  grid-row: 5;
}

.equipped-ring .equipped-potion {
  grid-column: 1;
  grid-row: 5;
}

.equipped-ring .equipped-weapon,
.equipped-ring .equipped-talisman,
.equipped-ring .equipped-potion,
.equipped-ring .equipped-helm,
.equipped-ring .equipped-bracelet,
.equipped-ring .equipped-coat,
.equipped-ring .equipped-pants,
.equipped-ring .equipped-vest,
.equipped-ring .equipped-ring-slot,
.equipped-ring .equipped-boots {
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  transform: none;
}

@media (max-width: 860px) {
  .portrait-frame {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    grid-template-rows: repeat(5, 42px);
    gap: 6px;
    margin-right: 0;
    margin-left: 0;
    padding: 6px;
  }

  .equipped-ring .equipped-slot,
  .equipped-ring .equipped-potion,
  .equipped-ring .equipped-ring-slot {
    width: 42px;
    height: 42px;
  }
}

.hero-copy {
  margin-top: 0;
}

/* Mindig látható pénz / kristály kijelző */
.wallet {
  display: flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  margin-left: auto;
  z-index: 13;
}

.wallet-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(199, 163, 90, 0.4);
  background: rgba(8, 9, 12, 0.68);
  white-space: nowrap;
}

.wallet-item strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.wallet-label {
  color: var(--muted);
  font-size: 0.74rem;
}

.wallet-gold .wallet-icon { color: var(--gold); }
.wallet-crystal { border-color: rgba(120, 190, 255, 0.45); }
.wallet-crystal .wallet-icon { color: #7cc7ff; }

@media (max-width: 640px) {
  .wallet-label { display: none; }
  .wallet-item { padding: 0 8px; min-height: 30px; }
}

@media (min-width: 861px), (orientation: landscape) {
  .wallet {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    margin: 0 12px;
  }
}

@media (max-width: 860px) and (orientation: landscape) {
  .wallet { gap: 4px; margin: 0 6px; }
  .wallet-label { display: none; }
  .wallet-item { min-height: 28px; padding: 0 7px; }
}

/* Felszerelés-slotok: üres helyen halvány előnézet, felszerelt tárgynál teljes kép */
.equipment-preview-slot.is-empty-slot .slot-item-image {
  opacity: 0.32;
  filter: grayscale(0.7);
}

.equipment-preview-slot:not(.is-empty-slot) {
  cursor: pointer;
}
