/* ============================================================================
   AVALOM: HERÓIS ANCESTRAIS — Tema Visual Gótico (Full-Width 100%)
   Paleta, Tipografia Serifada e Botões com Ornamentos Losangulares baseados na Referência
   ============================================================================ */

:root {
  /* Paleta da Referência: Obsidiana Esfumaçada, Bronze Envelhecido e Ouro Marfim */
  --bg-void: #080708;
  --bg-deep: #100e0f;
  --bg-card: rgba(16, 14, 14, 0.88);
  --bg-card-hover: rgba(26, 22, 19, 0.94);
  --bg-inset: rgba(10, 9, 9, 0.84);

  --border-dim: rgba(196, 178, 138, 0.18);
  --border-gold: rgba(203, 184, 144, 0.45);
  --border-gold-bright: rgba(235, 219, 182, 0.78);

  --gold: #c6b289;
  --gold-bright: #f2e8cf;
  --gold-dim: #8a7b5d;
  --stone-text: #aba296;

  --crimson: #8f2323;
  --crimson-bright: #c43c3c;
  --arcane: #8f7ba8;
  --emerald: #5f8c66;
  --ice: #7ea3b8;

  --text-main: #ded6c6;
  --text-muted: #9c9387;
  --text-dim: #6f675d;

  --font-display: 'Cinzel', 'Trajan Pro', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  --font-body: 'Cormorant Garamond', 'Palatino Linotype', Georgia, serif;
  --font-ui: 'Cinzel', 'Palatino Linotype', Georgia, serif;

  --radius: 2px;
  --shadow-card: 0 12px 34px rgba(0, 0, 0, 0.78);
  --hairline-gold: linear-gradient(90deg, transparent 0%, rgba(208, 189, 148, 0.52) 50%, transparent 100%);
  --hairline-dim: linear-gradient(90deg, transparent 0%, rgba(196, 178, 138, 0.24) 50%, transparent 100%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  min-height: 100vh;
  overflow-x: clip;
}

:fullscreen,
:-webkit-full-screen {
  background-color: var(--bg-void, #080708);
  width: 100%;
  height: 100%;
}

::backdrop {
  background-color: var(--bg-void, #080708);
}

/* ==================== SCROLLBARS GLOBAIS (OURO ENVELHECIDO & OBSIDIANA) ==================== */
* {
  scrollbar-width: thin;
  scrollbar-color: #b89a5e #0b0a0c;
}

*::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

*::-webkit-scrollbar-track {
  background: linear-gradient(90deg, #070608 0%, #121014 50%, #070608 100%);
  border: 1px solid rgba(196, 178, 138, 0.16);
  border-radius: 6px;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.92);
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #6e5830 0%, #c8ae74 32%, #e6d19c 50%, #b59555 70%, #5c4724 100%);
  border-radius: 6px;
  border: 1.5px solid #0c0b0d;
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 214, 0.55),
    0 0 8px rgba(198, 178, 137, 0.28);
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #9c7d42 0%, #e5cc8e 35%, #fff0c2 52%, #cfa960 72%, #856834 100%);
  border-color: #161310;
  box-shadow:
    inset 0 1px 0 rgba(255, 252, 236, 0.8),
    0 0 12px rgba(242, 224, 172, 0.65);
}

*::-webkit-scrollbar-thumb:active {
  background: linear-gradient(180deg, #b88b36 0%, #f5d88a 50%, #9e7328 100%);
}

*::-webkit-scrollbar-corner {
  background: #09080a;
}

*::-webkit-scrollbar-button:single-button {
  display: block;
  width: 12px;
  height: 14px;
  background-color: #161310;
  border: 1px solid rgba(203, 184, 144, 0.35);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 8px 8px;
}

*::-webkit-scrollbar-button:single-button:vertical:decrement {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath fill='%23e6c687' d='M5 2L9 8H1z'/%3E%3C/svg%3E");
}

*::-webkit-scrollbar-button:single-button:vertical:increment {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath fill='%23e6c687' d='M1 2h8L5 8z'/%3E%3C/svg%3E");
}

*::-webkit-scrollbar-button:single-button:horizontal:decrement {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath fill='%23e6c687' d='M2 5l6-4v8z'/%3E%3C/svg%3E");
}

*::-webkit-scrollbar-button:single-button:horizontal:increment {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath fill='%23e6c687' d='M8 5L2 9V1z'/%3E%3C/svg%3E");
}

body {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(38, 30, 22, 0.38), transparent 62%),
    linear-gradient(180deg, rgba(10, 9, 10, 0.84) 0%, rgba(7, 6, 7, 0.94) 100%),
    url('../assets/images/Background2K.jpg') center / cover fixed no-repeat;
  background-color: var(--bg-void);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 18.5px;
  font-weight: 500;
  line-height: 1.55;
}

h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-bright);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
}

h2 { font-size: 23px; }
h3 { font-size: 18.5px; }
h4 { font-size: 16px; }

/* ==================== BARRA DE NAVEGAÇÃO SUPERIOR (FULL-WIDTH) ==================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: linear-gradient(180deg, rgba(12, 10, 10, 0.96), rgba(9, 8, 8, 0.92));
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-gold);
  box-shadow: 0 6px 26px rgba(0, 0, 0, 0.85);
  padding: 9px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.topbar::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--hairline-gold);
  pointer-events: none;
}

/* ==================== RELÓGIO GLOBAL & CALENDÁRIO (TOPO DIREITO) ==================== */
.world-clock {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  padding: 5px 12px;
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(22, 18, 16, 0.94), rgba(11, 9, 10, 0.96));
  border: 1px solid rgba(212, 176, 100, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.14), 0 3px 12px rgba(0, 0, 0, 0.72);
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
}

.world-clock.world-clock-floating {
  position: fixed;
  top: 14px;
  right: 18px;
  z-index: 150;
  margin-left: 0;
  backdrop-filter: blur(6px);
}

.wc-top-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text-main);
}

.wc-period-icon {
  font-size: 13.5px;
}

.wc-time {
  font-family: var(--font-display);
  font-size: 13.5px;
  letter-spacing: 0.06em;
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
}

.wc-sep {
  color: rgba(212, 176, 100, 0.55);
}

.wc-date {
  font-size: 13px;
  font-weight: 600;
  color: #e9dec5;
}

.wc-era {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: #b9a47e;
  margin-top: 2px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-crest {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(38, 30, 22, 0.95), rgba(10, 9, 9, 0.98));
  border: 1px solid var(--border-gold);
  display: grid;
  place-items: center;
  box-shadow: 0 0 14px rgba(203, 184, 144, 0.22);
}

.brand-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--gold-bright);
  line-height: 1.05;
}

.brand-sub {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--stone-text);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.nav-tabs {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  align-items: center;
}

/* Botões de Menu da Barra Superior — Estilo Referência */
.nav-btn {
  position: relative;
  background: transparent;
  border: 1px solid transparent;
  border-top: 1px solid transparent;
  border-bottom: 1px solid transparent;
  color: var(--stone-text);
  padding: 7px 11px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.22s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nav-btn:hover:not(:disabled) {
  color: var(--gold-bright);
  background: linear-gradient(90deg, transparent, rgba(32, 26, 20, 0.85) 20%, rgba(32, 26, 20, 0.85) 80%, transparent);
  border-top-color: rgba(203, 184, 144, 0.35);
  border-bottom-color: rgba(203, 184, 144, 0.35);
}

.nav-btn:disabled {
  opacity: 0.34;
  cursor: not-allowed;
  filter: grayscale(0.75);
}

.nav-btn.active {
  color: var(--gold-bright);
  background: linear-gradient(90deg, transparent 0%, rgba(34, 27, 20, 0.92) 15%, rgba(44, 34, 24, 0.96) 50%, rgba(34, 27, 20, 0.92) 85%, transparent 100%);
  border-top-color: rgba(218, 198, 152, 0.65);
  border-bottom-color: rgba(218, 198, 152, 0.65);
  text-shadow: 0 0 12px rgba(242, 232, 207, 0.5);
}

.nav-btn.active::before,
.nav-btn.active::after {
  content: '✦';
  font-size: 11.5px;
  color: var(--gold-bright);
  opacity: 0.9;
}

.nav-btn.combat-alert {
  color: #f0c2c2;
  border-top-color: rgba(196, 60, 60, 0.7);
  border-bottom-color: rgba(196, 60, 60, 0.7);
  animation: pulseBorder 1.8s infinite;
}

@keyframes pulseBorder {
  0%, 100% { box-shadow: 0 0 6px rgba(196, 60, 60, 0.25); }
  50% { box-shadow: 0 0 16px rgba(196, 60, 60, 0.65); }
}

.hud-pills {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(10, 9, 12, 0.72);
  border: 1px solid rgba(204, 174, 114, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.06), 0 4px 14px rgba(0, 0, 0, 0.55);
}

.hud-pill {
  background: linear-gradient(180deg, rgba(22, 19, 17, 0.92), rgba(11, 10, 10, 0.96));
  border: 1px solid var(--border-dim);
  height: 30px;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.06em;
  white-space: nowrap;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.hud-pill .gold-amount-inline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1;
}

.hud-pill .gold-coin-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}

.hud-pill.gold { border-color: var(--border-gold); color: var(--gold-bright); }
.hud-pill.pe { border-color: rgba(176, 156, 196, 0.45); color: #e2d8ee; }
.hud-pill.vit { border-color: rgba(180, 56, 56, 0.55); color: #f0c8c8; }
.hud-pill.sup {
  background: linear-gradient(180deg, rgba(20, 68, 40, 0.62), rgba(8, 22, 14, 0.96));
  border-color: rgba(74, 222, 128, 0.6);
  color: #bbf7d0;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.2), inset 0 1px 0 rgba(187, 247, 208, 0.26);
}

/* ==================== CONTAINER FULL-WIDTH (100% DA RESOLUÇÃO) ==================== */
.main-container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 16px 20px 28px;
}

.main-container.landing-mode,
.main-container.adventure-fullbleed {
  padding: 0;
  margin: 0;
}

/* ==================== CARDS & PAINÉIS GÓTICOS ==================== */
.card {
  background: linear-gradient(180deg, rgba(20, 17, 16, 0.90), rgba(11, 10, 10, 0.95));
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 8%;
  right: 8%;
  height: 1px;
  background: var(--hairline-dim);
  pointer-events: none;
}

.card-gold {
  border-color: var(--border-gold);
}

.card-gold::before {
  background: var(--hairline-gold);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid transparent;
  background-image: var(--hairline-gold);
  background-position: bottom;
  background-size: 100% 1px;
  background-repeat: no-repeat;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.grid-sheet { display: grid; grid-template-columns: minmax(340px, 410px) 1fr; gap: 18px; }
.grid-combat { display: grid; grid-template-columns: 1fr minmax(330px, 410px); gap: 16px; }

@media (max-width: 1100px) {
  .grid-sheet, .grid-combat, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* ==================== TODOS OS BOTÕES DO JOGO (ESTILO REFERÊNCIA) ==================== */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 2px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--text-main);
  background: linear-gradient(90deg, rgba(14, 12, 12, 0.88) 0%, rgba(28, 24, 21, 0.94) 50%, rgba(14, 12, 12, 0.88) 100%);
  border: 1px solid var(--border-dim);
  border-top-color: rgba(203, 184, 144, 0.34);
  border-bottom-color: rgba(203, 184, 144, 0.34);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
  transition: all 0.2s ease;
}

.btn::before,
.btn::after {
  content: '◇';
  font-size: 11.5px;
  color: var(--gold-dim);
  opacity: 0.55;
  transition: all 0.2s ease;
}

.btn:hover:not(:disabled) {
  color: var(--gold-bright);
  border-color: var(--border-gold-bright);
  background: linear-gradient(90deg, rgba(20, 16, 14, 0.94) 0%, rgba(45, 36, 26, 0.98) 50%, rgba(20, 16, 14, 0.94) 100%);
  box-shadow: 0 0 18px rgba(208, 189, 148, 0.22), inset 0 0 12px rgba(208, 189, 148, 0.08);
  text-shadow: 0 0 10px rgba(242, 232, 207, 0.45);
  transform: translateY(-1px);
}

.btn:hover:not(:disabled)::before,
.btn:hover:not(:disabled)::after {
  content: '✦';
  color: var(--gold-bright);
  opacity: 1;
}

.btn:disabled {
  opacity: 0.34;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(90deg, rgba(26, 14, 14, 0.92) 0%, rgba(64, 24, 22, 0.96) 50%, rgba(26, 14, 14, 0.92) 100%);
  border-color: rgba(212, 188, 142, 0.58);
  color: var(--gold-bright);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.7), inset 0 0 14px rgba(143, 35, 35, 0.35);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(90deg, rgba(36, 16, 16, 0.95) 0%, rgba(88, 30, 26, 0.98) 50%, rgba(36, 16, 16, 0.95) 100%);
  border-color: var(--gold-bright);
}

.btn-gold {
  background: linear-gradient(90deg, rgba(22, 18, 13, 0.92) 0%, rgba(56, 44, 28, 0.96) 50%, rgba(22, 18, 13, 0.92) 100%);
  border-color: rgba(218, 198, 152, 0.65);
  color: var(--gold-bright);
}

.btn-arcane {
  background: linear-gradient(90deg, rgba(18, 15, 22, 0.92) 0%, rgba(42, 34, 52, 0.96) 50%, rgba(18, 15, 22, 0.92) 100%);
  border-color: rgba(184, 166, 206, 0.48);
  color: #ebe3f5;
}

.btn-emerald {
  background: linear-gradient(90deg, rgba(14, 20, 15, 0.92) 0%, rgba(30, 48, 34, 0.96) 50%, rgba(14, 20, 15, 0.92) 100%);
  border-color: rgba(154, 192, 158, 0.48);
  color: #e2f0e4;
}

.btn-sm { padding: 7px 14px; font-size: 13.5px; letter-spacing: 0.1em; }
.btn-xs { padding: 5px 10px; font-size: 13px; letter-spacing: 0.08em; }
.btn-xs::before, .btn-xs::after { display: none; }

input[type="text"], input[type="number"], select, textarea {
  background: var(--bg-inset);
  border: 1px solid var(--border-dim);
  color: var(--text-main);
  padding: 8px 11px;
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 17px;
  width: 100%;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--border-gold-bright);
  box-shadow: 0 0 10px rgba(203, 184, 144, 0.18);
}

input[type="range"] {
  accent-color: var(--gold);
}

/* ==================== SUBTABS (ESTILO REFERÊNCIA) ==================== */
.subtabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.subtab {
  position: relative;
  background: rgba(12, 10, 10, 0.72);
  border: 1px solid var(--border-dim);
  color: var(--stone-text);
  padding: 6px 14px;
  border-radius: 2px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.18s ease;
}

.subtab:hover {
  color: var(--gold-bright);
  border-color: var(--border-gold);
}

.subtab.active {
  color: var(--gold-bright);
  border-color: var(--border-gold-bright);
  background: linear-gradient(90deg, rgba(20, 16, 13, 0.92), rgba(44, 34, 24, 0.95), rgba(20, 16, 13, 0.92));
  text-shadow: 0 0 10px rgba(242, 232, 207, 0.4);
}

/* ==================== BARRAS (VITALIDADE NV & VIGOR) ==================== */
.meter-wrap { margin-bottom: 10px; }

.meter-label {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  margin-bottom: 4px;
}

.meter-track {
  height: 12px;
  background: #070607;
  border: 1px solid var(--border-dim);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.meter-fill { height: 100%; transition: width 0.35s ease; }
.meter-fill.vit { background: linear-gradient(90deg, #571212, #8f2323, #b83232); }
.meter-fill.vigor { background: linear-gradient(90deg, #5e481e, #a88848, #d4b878); }
.meter-fill.enemy { background: linear-gradient(90deg, #3c1824, #70263b, #99354d); }

/* ==================== TAGS, BADGES & STATUS PILLS ==================== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 2px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.08em;
  border: 1px solid var(--border-dim);
  background: rgba(12, 10, 10, 0.78);
  color: var(--text-main);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 2px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.06em;
  border: 1px solid currentColor;
  background: rgba(8, 7, 8, 0.85);
  cursor: help;
}

.elem-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 2px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.06em;
  background: rgba(8, 7, 8, 0.8);
  border: 1px solid currentColor;
}

/* ==================== STAT BOXES ==================== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.stat-box {
  background: var(--bg-inset);
  border: 1px solid var(--border-dim);
  border-radius: 2px;
  padding: 9px 8px;
  text-align: center;
}

.stat-box .lbl {
  font-family: var(--font-display);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--stone-text);
}

.stat-box .val {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--gold-bright);
  margin-top: 2px;
}

.stat-box .sub {
  font-size: 13.5px;
  color: var(--text-dim);
}

/* ==================== CRIADOR DE PERSONAGEM & PRESETS ==================== */
.hero-banner {
  text-align: center;
  padding: 26px 20px;
  border: 1px solid var(--border-gold);
  border-radius: 2px;
  background:
    radial-gradient(circle at 50% 0%, rgba(72, 54, 34, 0.28), transparent 65%),
    linear-gradient(180deg, rgba(20, 17, 16, 0.92), rgba(10, 9, 9, 0.96));
  margin-bottom: 18px;
}

.hero-banner h1 { font-size: 32px; margin-bottom: 6px; }

.preset-card {
  background: linear-gradient(180deg, rgba(20, 17, 16, 0.92), rgba(11, 10, 10, 0.96));
  border: 1px solid var(--border-dim);
  border-radius: 2px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.preset-card:hover {
  border-color: var(--border-gold-bright);
  background: var(--bg-card-hover);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75);
  transform: translateY(-2px);
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}

.option-card {
  background: var(--bg-inset);
  border: 1px solid var(--border-dim);
  border-radius: 2px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.16s;
}

.option-card:hover { border-color: var(--border-gold); }
.option-card.selected {
  border-color: var(--border-gold-bright);
  background: linear-gradient(180deg, rgba(48, 36, 24, 0.45), rgba(16, 14, 14, 0.95));
  box-shadow: inset 0 0 16px rgba(203, 184, 144, 0.12);
}

/* ==================== SKILL TREES ==================== */
.tree-canvas {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px;
  background: radial-gradient(circle at 50% 15%, rgba(196, 178, 138, 0.06), transparent 65%), var(--bg-inset);
  border: 1px solid var(--border-dim);
  border-radius: 2px;
}

.tree-tier-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid transparent;
  background-image: var(--hairline-dim);
  background-position: bottom;
  background-size: 100% 1px;
  background-repeat: no-repeat;
}

.tree-tier-row:last-child { background-image: none; padding-bottom: 0; }

.tree-tier-label {
  font-family: var(--font-display);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--gold);
}

.tree-nodes-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.tree-node {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: 2px;
  padding: 13px;
  transition: all 0.18s;
  position: relative;
}

.tree-node.unlocked {
  border-color: var(--border-gold-bright);
  background: linear-gradient(180deg, rgba(58, 46, 30, 0.34), rgba(15, 13, 13, 0.96));
  box-shadow: 0 0 14px rgba(203, 184, 144, 0.14);
}

.tree-node.available { border-color: rgba(203, 184, 144, 0.45); }
.tree-node.locked { opacity: 0.52; }

/* ==================== ARENA DE COMBATE ==================== */
.arena-stage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 14px;
}

@media (max-width: 760px) {
  .arena-stage { grid-template-columns: 1fr; }
}

.combatant-card {
  background: linear-gradient(180deg, rgba(22, 19, 18, 0.94), rgba(11, 10, 10, 0.97));
  border: 1px solid var(--border-dim);
  border-radius: 2px;
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.combatant-card.hero { border-color: var(--border-gold); }
.combatant-card.enemy { border-color: rgba(143, 35, 35, 0.65); }
.combatant-card.hit-shake { animation: hitShake 0.42s ease; }
.combatant-card.heal-glow { animation: healGlow 0.55s ease; }

@keyframes hitShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); box-shadow: 0 0 22px rgba(196, 60, 60, 0.7); }
  45% { transform: translateX(7px); }
  70% { transform: translateX(-4px); }
}

@keyframes healGlow {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 22px rgba(154, 192, 158, 0.65); }
}

.combatant-avatar {
  width: 58px;
  height: 58px;
  border-radius: 2px;
  background: var(--bg-inset);
  border: 1px solid var(--border-gold);
  display: grid;
  place-items: center;
  font-size: 32px;
  flex-shrink: 0;
}

.dice-tray {
  background: linear-gradient(90deg, rgba(12, 10, 10, 0.9), rgba(26, 22, 18, 0.95), rgba(12, 10, 10, 0.9));
  border-top: 1px solid var(--border-gold);
  border-bottom: 1px solid var(--border-gold);
  border-left: 1px solid var(--border-dim);
  border-right: 1px solid var(--border-dim);
  padding: 12px 16px;
  margin-bottom: 14px;
}

.dice-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border-radius: 2px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13.5px;
  margin-right: 4px;
}

.dice-chip.d10 { background: #4a1414; border: 1px solid #c45454; color: #f6e7d8; }
.dice-chip.d10.crit { background: #8f6f2d; border-color: #f2e8cf; box-shadow: 0 0 12px rgba(242, 232, 207, 0.65); color: #120e08; }
.dice-chip.d6 { background: #1e1c21; border: 1px solid var(--border-gold); color: var(--gold-bright); }

.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
}

.action-btn {
  text-align: left;
  background: linear-gradient(180deg, rgba(20, 17, 16, 0.92), rgba(11, 10, 10, 0.96));
  border: 1px solid var(--border-dim);
  border-radius: 2px;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--text-main);
  font-family: var(--font-body);
  transition: all 0.16s;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.action-btn strong {
  font-family: var(--font-display);
  font-size: 13.5px;
  letter-spacing: 0.08em;
  color: var(--gold-bright);
}

.action-btn:hover:not(:disabled) {
  border-color: var(--border-gold-bright);
  background: linear-gradient(90deg, rgba(24, 20, 17, 0.95), rgba(40, 32, 24, 0.96), rgba(24, 20, 17, 0.95));
}

.action-btn:disabled { opacity: 0.36; cursor: not-allowed; }

.combat-log {
  max-height: 520px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
}

.log-entry {
  font-size: 16px;
  padding: 8px 11px;
  border-radius: 2px;
  background: var(--bg-inset);
  border-left: 2px solid var(--border-dim);
}
.log-entry.hero { border-left-color: var(--gold); }
.log-entry.crit { border-left-color: var(--gold-bright); background: rgba(168, 136, 72, 0.14); font-weight: 600; }
.log-entry.enemy { border-left-color: var(--crimson-bright); background: rgba(143, 35, 35, 0.14); }
.log-entry.status { border-left-color: var(--arcane); background: rgba(110, 86, 138, 0.14); }
.log-entry.heal { border-left-color: var(--emerald); background: rgba(78, 128, 86, 0.14); }
.log-entry.buff { border-left-color: var(--ice); }
.log-entry.victory { border-left-color: var(--gold-bright); background: rgba(198, 178, 137, 0.18); font-weight: 700; }
.log-entry.defeat { border-left-color: var(--crimson-bright); background: rgba(143, 35, 35, 0.25); font-weight: 700; }

/* ==================== MODAIS & TOAST ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 3, 4, 0.85);
  backdrop-filter: blur(5px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-box {
  background: linear-gradient(180deg, rgba(22, 19, 17, 0.97), rgba(10, 9, 9, 0.99));
  border: 1px solid var(--border-gold);
  border-radius: 2px;
  max-width: 600px;
  width: 100%;
  padding: 22px 24px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.9);
}

.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 600;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: linear-gradient(90deg, rgba(16, 14, 13, 0.96), rgba(32, 26, 20, 0.96), rgba(16, 14, 13, 0.96));
  border-top: 1px solid var(--border-gold);
  border-bottom: 1px solid var(--border-gold);
  border-left: 1px solid var(--border-dim);
  border-right: 1px solid var(--border-dim);
  color: var(--gold-bright);
  padding: 10px 18px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.85);
  font-family: var(--font-display);
  font-size: 13.5px;
  letter-spacing: 0.06em;
  max-width: 460px;
  animation: fadeInUp 0.22s ease;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==================== CLIMA GLOBAL (TEMPESTADE / CHUVA / RAIOS) ==================== */
#weather-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 420;
}

#lightning-flash {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 15%, rgba(235, 240, 250, 0.65), rgba(168, 192, 224, 0.2) 60%, transparent);
  opacity: 0;
  pointer-events: none;
  z-index: 419;
}

#lightning-flash.flash-active { animation: lightningStrike 0.65s ease-out; }

@keyframes lightningStrike {
  0% { opacity: 0; }
  8% { opacity: 0.9; }
  18% { opacity: 0.1; }
  28% { opacity: 0.72; }
  100% { opacity: 0; }
}

/* ==================== LANDING PAGE (IDÊNTICA À REFERÊNCIA ENVIADA) ==================== */
.landing-shell {
  position: relative;
  min-height: 100vh;
  width: 100%;
  background-color: rgba(4, 3, 4, 0.58);
  background-blend-mode: multiply;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  overflow: hidden;
}

.landing-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.landing-topbar {
  position: absolute;
  top: 16px;
  left: 22px;
  right: 22px;
  z-index: 6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.landing-content {
  position: relative;
  z-index: 4;
  text-align: center;
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 18px;
}

.landing-crest {
  width: 78px;
  height: 78px;
  object-fit: contain;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 18px rgba(212, 192, 148, 0.4));
}

.landing-eyebrow {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}

.landing-title {
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 500;
  letter-spacing: 0.18em;
  line-height: 1.12;
  color: var(--gold-bright);
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.95), 0 0 24px rgba(226, 206, 162, 0.28);
}

.landing-subtitle {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 21px;
  color: var(--stone-text);
  margin-top: 6px;
  margin-bottom: 22px;
}

.landing-save-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 480px;
  padding: 10px 16px;
  background: linear-gradient(90deg, transparent, rgba(16, 13, 12, 0.85) 14%, rgba(16, 13, 12, 0.85) 86%, transparent);
  border-top: 1px solid rgba(203, 184, 144, 0.28);
  border-bottom: 1px solid rgba(203, 184, 144, 0.28);
  margin-bottom: 22px;
}

/* Menu vertical flutuante exatamente como a imagem de referência */
.landing-menu {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 500px;
  background: radial-gradient(ellipse at center, rgba(12, 10, 10, 0.62) 0%, rgba(12, 10, 10, 0.12) 72%, transparent 100%);
  padding: 6px 0;
}

.landing-menu-item {
  position: relative;
  width: 100%;
  padding: 14px 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #a9a196;
  transition: all 0.24s ease;
}

/* Divisor fino desvanecendo nas bordas entre cada botão */
.landing-menu-item + .landing-menu-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 6%;
  right: 6%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(203, 184, 144, 0.28) 50%, transparent 100%);
  pointer-events: none;
}

.menu-ornament {
  width: 58px;
  height: 18px;
  color: var(--gold-bright);
  opacity: 0;
  transform: scaleX(0.75);
  transition: all 0.24s ease;
  flex-shrink: 0;
}

.landing-menu-text {
  min-width: 170px;
  text-align: center;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.95);
}

/* Estado selecionado / hover = exatamente o destaque "NEW GAME" da imagem */
.landing-menu-item.is-featured,
.landing-menu-item:hover:not(:disabled),
.landing-menu-item:focus-visible:not(:disabled) {
  color: #f6edd5;
  background: linear-gradient(90deg, transparent 0%, rgba(20, 16, 13, 0.88) 18%, rgba(30, 23, 17, 0.94) 50%, rgba(20, 16, 13, 0.88) 82%, transparent 100%);
  text-shadow: 0 0 18px rgba(242, 232, 207, 0.55), 0 2px 8px rgba(0, 0, 0, 0.95);
  outline: none;
}

.landing-menu-item.is-featured::after,
.landing-menu-item:hover:not(:disabled)::after {
  content: '';
  position: absolute;
  left: 4%;
  right: 4%;
  top: 0;
  bottom: 0;
  border-top: 1px solid rgba(214, 194, 148, 0.52);
  border-bottom: 1px solid rgba(214, 194, 148, 0.52);
  mask-image: linear-gradient(90deg, transparent 0%, black 20%, black 80%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 20%, black 80%, transparent 100%);
  pointer-events: none;
}

.landing-menu-item.is-featured .menu-ornament,
.landing-menu-item:hover:not(:disabled) .menu-ornament,
.landing-menu-item:focus-visible:not(:disabled) .menu-ornament {
  opacity: 0.95;
  transform: scaleX(1);
  filter: drop-shadow(0 0 6px rgba(242, 232, 207, 0.45));
}

.landing-menu:hover .landing-menu-item.is-featured:not(:hover) {
  background: transparent;
  color: #b7afa4;
}
.landing-menu:hover .landing-menu-item.is-featured:not(:hover) .menu-ornament {
  opacity: 0;
  transform: scaleX(0.75);
}
.landing-menu:hover .landing-menu-item.is-featured:not(:hover)::after {
  display: none;
}

.landing-menu-item:disabled {
  opacity: 0.30;
  cursor: not-allowed;
}

.landing-footer {
  margin-top: 26px;
  padding-top: 14px;
  width: 100%;
  font-family: var(--font-display);
  font-size: 13.5px;
  letter-spacing: 0.13em;
  background-image: var(--hairline-dim);
  background-position: top;
  background-size: 100% 1px;
  background-repeat: no-repeat;
}

/* ==================== MAPA (CONTINENTE DE SANVALIEN) FULL-WIDTH ==================== */
.grid-worldmap {
  display: grid;
  grid-template-columns: 1fr minmax(340px, 410px);
  gap: 16px;
}

@media (max-width: 1024px) {
  .grid-worldmap { grid-template-columns: 1fr; }
}

.worldmap-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 460px;
  border-radius: 2px;
  border: 1px solid var(--border-gold);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.88), inset 0 0 60px rgba(0, 0, 0, 0.72);
}

.worldmap-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 42%, rgba(6, 5, 6, 0.68) 100%);
  pointer-events: none;
  z-index: 2;
}

.worldmap-fog-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

.worldmap-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
}

.map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 6;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 0;
  transition: transform 0.18s ease;
}

.map-pin:hover,
.map-pin.is-selected {
  z-index: 8;
}

.map-pin:hover {
  transform: translate(-50%, -54%) scale(1.1);
}

.map-pin-icon {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  padding: 3px;
  background: rgba(10, 9, 9, 0.94);
  border: 2.5px solid var(--pin-color, var(--gold));
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.92);
  display: grid;
  place-items: center;
}

.map-pin-icon img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.map-pin-weather {
  position: absolute;
  top: -6px;
  right: -7px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(8, 10, 14, 0.96);
  border: 1.5px solid rgba(203, 184, 144, 0.7);
  display: grid;
  place-items: center;
  font-size: 13.5px;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
  pointer-events: none;
  overflow: hidden;
}

.map-pin-weather .weather-custom-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
}

.map-pin.is-here .map-pin-icon {
  border-color: #9ac49e;
  box-shadow: 0 0 18px rgba(154, 196, 158, 0.86), 0 0 0 4px rgba(154, 196, 158, 0.24);
}

.map-pin.is-selected .map-pin-icon {
  border-color: var(--gold-bright);
  box-shadow: 0 0 22px rgba(242, 232, 207, 0.95);
  transform: scale(1.14);
}

.map-pin-label {
  background: rgba(10, 9, 9, 0.92);
  border: 1px solid rgba(196, 178, 138, 0.48);
  color: var(--gold-bright);
  padding: 2px 7px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  text-shadow: 0 1px 3px #000;
  max-width: 148px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-pin:hover .map-pin-label,
.map-pin.is-selected .map-pin-label,
.map-pin.is-here .map-pin-label {
  max-width: none;
  border-color: var(--border-gold);
}

.map-traveler {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 9;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--gold-bright);
  background: #100e0f;
  box-shadow: 0 0 22px rgba(242, 232, 207, 0.85);
  display: grid;
  place-items: center;
  pointer-events: none;
  transition: left 0.85s linear, top 0.85s linear, transform 0.25s ease;
}

.map-traveler.is-docked {
  transform: translate(10px, -36px);
  width: 36px;
  height: 36px;
  border-color: #86efac;
  box-shadow: 0 0 16px rgba(74, 222, 128, 0.72), 0 4px 12px rgba(0, 0, 0, 0.85);
}

.map-traveler.is-docked img {
  width: 30px;
  height: 30px;
}

.map-traveler img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.map-compass {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  background: rgba(10, 9, 9, 0.88);
  border: 1px solid var(--border-gold);
  color: var(--gold-bright);
  padding: 4px 12px;
  font-family: var(--font-display);
  font-size: 13.5px;
  letter-spacing: 0.12em;
}

.travel-active-banner {
  border-color: var(--border-gold-bright);
  background: linear-gradient(90deg, rgba(46, 36, 22, 0.55), rgba(16, 14, 13, 0.95));
}

.travel-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(196, 178, 138, 0.12);
}

.travel-metric:last-of-type { border-bottom: none; }

/* ==================== ÍCONES PNG RPG ==================== */
.rpg-icon, .rpg-icon-xs, .rpg-icon-md, .rpg-icon-lg {
  object-fit: cover;
  border-radius: 2px;
  vertical-align: middle;
}
.rpg-icon-xs { width: 17px; height: 17px; }
.rpg-icon-md { width: 34px; height: 34px; border: 1px solid var(--border-gold); }
.rpg-icon-lg { width: 46px; height: 46px; border: 1px solid var(--border-gold); }

/* ==================== UTILITÁRIOS ==================== */
.muted { color: var(--text-muted); }
.small { font-size: 15.5px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }

/* ============================================================================
   PAPERDOLL ATMOSFÉRICO (ESTILO REFERÊNCIA: SIDEBARS TRANSLÚCIDAS + PALCO NEBULOSO)
   & PADRÃO DE ÍCONES COM BRILHO INFERIOR DE RARIDADE (.rarity-box)
   ============================================================================ */

.grid-paperdoll-inv {
  display: grid;
  grid-template-columns: minmax(660px, 1.25fr) minmax(440px, 1fr);
  gap: 18px;
}

@media (max-width: 1180px) {
  .grid-paperdoll-inv { grid-template-columns: 1fr; }
}

/* Palco Atmosférico do Personagem (Floresta Sombria, Feixes de Luz e Brasas) */
.paperdoll-stage {
  position: relative;
  display: grid;
  grid-template-columns: 136px 1fr 136px;
  gap: 14px;
  padding: 16px;
  border-radius: 6px;
  border: 1px solid rgba(176, 198, 220, 0.28);
  background:
    radial-gradient(ellipse 68% 58% at 50% 34%, rgba(56, 86, 112, 0.34), transparent 70%),
    radial-gradient(ellipse 60% 35% at 50% 96%, rgba(196, 132, 62, 0.16), transparent 72%),
    linear-gradient(180deg, rgba(11, 16, 24, 0.86) 0%, rgba(12, 18, 26, 0.78) 45%, rgba(8, 10, 14, 0.94) 100%),
    url('../assets/images/Landpage.jpg') center / cover no-repeat;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.85), inset 0 0 60px rgba(4, 7, 12, 0.78);
  overflow: hidden;
  min-height: 620px;
}

@media (max-width: 780px) {
  .paperdoll-stage {
    grid-template-columns: 1fr;
  }
}

/* Feixes diagonais de luar como na referência */
.paperdoll-godrays {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    linear-gradient(128deg, transparent 22%, rgba(168, 212, 245, 0.08) 36%, rgba(168, 212, 245, 0.14) 41%, transparent 52%),
    linear-gradient(128deg, transparent 48%, rgba(154, 198, 232, 0.06) 58%, transparent 68%);
}

/* Brasas / fagulhas sutis flutuando */
.paperdoll-embers {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    radial-gradient(2px 2px at 26% 74%, rgba(255, 168, 76, 0.85), transparent),
    radial-gradient(2.5px 2.5px at 34% 62%, rgba(255, 142, 54, 0.7), transparent),
    radial-gradient(1.8px 1.8px at 66% 68%, rgba(255, 174, 86, 0.8), transparent),
    radial-gradient(2px 2px at 72% 48%, rgba(255, 154, 62, 0.65), transparent),
    radial-gradient(1.5px 1.5px at 42% 82%, rgba(255, 188, 108, 0.75), transparent),
    radial-gradient(2px 2px at 58% 22%, rgba(196, 226, 255, 0.6), transparent);
}

/* Sidebars Translúcidas Esquerda & Direita (com cantos chanfrados estilo referência) */
.paperdoll-sidebar {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 12px 10px;
  background: linear-gradient(180deg, rgba(13, 18, 26, 0.76) 0%, rgba(9, 13, 19, 0.84) 100%);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(168, 196, 222, 0.26);
  border-radius: 4px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65), inset 0 0 24px rgba(0, 0, 0, 0.45);
}

.paperdoll-sidebar::before,
.paperdoll-sidebar::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196, 220, 240, 0.45), transparent);
  pointer-events: none;
}
.paperdoll-sidebar::before { top: 4px; }
.paperdoll-sidebar::after { bottom: 4px; }

/* Slot individual da Sidebar (Rótulo acima + Caixa quadrada com brilho de raridade no fundo) */
.paperdoll-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  background: transparent;
  border: none;
  padding: 2px 0;
  color: var(--text-main);
  text-align: center;
  transition: transform 0.18s ease;
}

.paperdoll-slot.occupied {
  cursor: pointer;
}

.paperdoll-slot.occupied:hover {
  transform: translateY(-2px);
}

.paperdoll-slot.occupied:hover .paperdoll-slot-box {
  border-color: var(--slot-rar, var(--gold-bright));
  box-shadow:
    0 0 20px rgba(var(--rar-rgb, 255, 157, 59), 0.45),
    inset 0 -8px 20px rgba(var(--rar-rgb, 255, 157, 59), 0.55);
}

.paperdoll-slot-label {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: #dce6f0;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.95);
  line-height: 1.1;
}

.paperdoll-slot-box {
  width: 74px;
  height: 74px;
  padding: 5px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}

.paperdoll-slot-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.85));
}

.paperdoll-slot-box.empty-slot-box {
  background: radial-gradient(ellipse at 50% 95%, rgba(120, 145, 170, 0.14), rgba(11, 14, 20, 0.86) 72%);
  border: 1px dashed rgba(168, 194, 218, 0.26);
  box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.72);
}

.paperdoll-slot-itemname {
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.1;
  max-width: 114px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px #000;
}

/* Centro do Palco do Personagem */
.paperdoll-hero-stage {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 6px;
}

.paperdoll-top-badges {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.paperdoll-figure-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 4px 0;
}

.paperdoll-figure-aura {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 58%, rgba(120, 175, 220, 0.22), rgba(255, 157, 59, 0.12) 48%, transparent 72%);
  pointer-events: none;
}

.paperdoll-figure-frame {
  position: relative;
  width: 280px;
  max-width: 100%;
  height: 345px;
  border-radius: 0;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.paperdoll-figure-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  border-radius: 0;
  border: none;
  display: block;
  background: transparent;
  filter: drop-shadow(0 20px 32px rgba(0, 0, 0, 0.92));
}

.paperdoll-portrait-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  padding: 4px 9px;
  border-radius: 4px;
  background: rgba(8, 11, 16, 0.86);
  border: 1px solid rgba(203, 184, 144, 0.55);
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  cursor: pointer;
  opacity: 0.78;
  transition: opacity 0.18s ease, background 0.18s ease;
}

.paperdoll-figure-frame:hover .paperdoll-portrait-btn {
  opacity: 1;
  background: rgba(24, 20, 16, 0.96);
}

.paperdoll-pedestal {
  width: 250px;
  height: 18px;
  margin-top: -8px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(132, 162, 140, 0.36) 0%, rgba(28, 36, 44, 0.75) 55%, transparent 78%);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.85);
}

.is-tt-stat {
  cursor: help;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.stat-box.is-tt-stat:hover {
  border-color: var(--border-gold-bright);
  box-shadow: 0 0 14px rgba(218, 196, 146, 0.22);
}

.paperdoll-identity {
  text-align: center;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.95);
}

.paperdoll-identity h2 {
  font-size: 22px;
  margin-bottom: 2px;
}

.paperdoll-vitals-glass {
  width: 100%;
  padding: 12px 14px;
  border-radius: 6px;
  background: rgba(9, 13, 19, 0.82);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(168, 196, 222, 0.22);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
}

/* ============================================================================
   PADRÃO UNIFICADO DE RARIDADE NO FUNDO DOS ÍCONES (.rarity-box)
   (Brilho luminoso subindo da base do ícone — igual à imagem de referência!)
   ============================================================================ */
.rarity-box {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(16, 14, 15, 0.94) 55%, rgba(var(--rar-rgb, 169, 161, 150), 0.28) 100%) !important;
  border: 1px solid rgba(196, 178, 138, 0.25) !important;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.65), 0 2px 6px rgba(0, 0, 0, 0.55) !important;
}

.rarity-box::after {
  display: none;
}

/* Frame de Ícone (usado em Mercador, Forja, Alquimia e Admin) */
.item-frame {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  padding: 5px;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(16, 14, 15, 0.94) 55%, rgba(var(--rar-rgb, 196, 178, 138), 0.28) 100%);
  border: 1px solid rgba(196, 178, 138, 0.25);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.65), 0 2px 6px rgba(0, 0, 0, 0.55);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.item-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 2px;
  display: block;
  position: relative;
  z-index: 1;
}

.item-frame.empty-frame {
  border: 1px dashed rgba(196, 178, 138, 0.28);
  background: rgba(8, 7, 8, 0.75);
}

.empty-glyph {
  font-size: 22px;
  opacity: 0.38;
  filter: grayscale(1);
}

/* Grade de Inventário com Padrão de Brilho Inferior de Raridade */
.inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
  gap: 9px;
  padding: 12px;
  background: rgba(8, 11, 16, 0.86);
  border: 1px solid rgba(168, 194, 218, 0.18);
  border-radius: 6px;
}

/* Botões de Filtro por Raridade no Topo do Inventário */
.inv-rar-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 4px;
  cursor: pointer;
  color: var(--rar-color, var(--gold-bright));
  border: 1px solid rgba(var(--rar-rgb, 198, 178, 137), 0.45);
  background: linear-gradient(to top, rgba(var(--rar-rgb, 198, 178, 137), 0.22), rgba(10, 12, 16, 0.92));
  transition: all 0.16s ease;
  opacity: 0.82;
}

.inv-rar-filter-btn:hover {
  opacity: 1;
  transform: translateY(-1px);
  border-color: rgba(var(--rar-rgb, 198, 178, 137), 0.85);
  box-shadow: 0 0 12px rgba(var(--rar-rgb, 198, 178, 137), 0.28);
}

.inv-rar-filter-btn.active {
  opacity: 1;
  border-color: var(--rar-color, var(--gold-bright));
  background: linear-gradient(to top, rgba(var(--rar-rgb, 198, 178, 137), 0.46), rgba(16, 18, 24, 0.95));
  box-shadow:
    0 0 16px rgba(var(--rar-rgb, 198, 178, 137), 0.42),
    inset 0 -2px 8px rgba(var(--rar-rgb, 198, 178, 137), 0.45);
  text-shadow: 0 0 8px rgba(var(--rar-rgb, 198, 178, 137), 0.55);
}

.inv-rar-filter-count {
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 700;
  opacity: 0.9;
}

/* Inventário da Ficha: 10 colunas na horizontal com ícones compactos e rolagem vertical */
.sheet-inv-grid {
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 7px;
  max-height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 10px;
  align-content: start;
}

.sheet-inv-grid .inv-cell {
  padding: 3px;
  border-radius: 6px;
}

.sheet-inv-grid .inv-qty-badge,
.sheet-inv-grid .inv-slot-badge {
  font-size: 11.5px;
  padding: 0 3px;
  bottom: 2px;
  right: 2px;
}

@media (max-width: 640px) {
  .sheet-inv-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Cartões de Perícias com Destaque para Perícias que possuem Grau */
.pericia-card {
  background: linear-gradient(180deg, rgba(18, 16, 16, 0.9), rgba(10, 9, 10, 0.95));
  border: 1px solid var(--border-dim);
  border-radius: 4px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  transition: all 0.18s ease;
}

.pericia-card:hover {
  border-color: var(--border-gold);
}

.pericia-card.has-rank {
  border-color: var(--border-gold-bright);
  background: linear-gradient(180deg, rgba(66, 50, 26, 0.42) 0%, rgba(22, 18, 14, 0.96) 100%);
  box-shadow: 0 0 14px rgba(218, 192, 128, 0.18), inset 0 -2px 10px rgba(218, 192, 128, 0.14);
}

.pericia-roll-trigger {
  background: transparent;
  border: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
  padding: 0;
  width: 100%;
  font-family: var(--font-body);
}

.pericia-rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: 3px;
  font-family: var(--font-display);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: #fde68a;
  background: rgba(168, 124, 38, 0.28);
  border: 1px solid rgba(235, 204, 130, 0.65);
}

/* Histórico de Pontos de Evolução (PE) Gastos */
.pe-history-wrap {
  max-height: 360px;
  overflow-y: auto;
  border: 1px solid var(--border-dim);
  background: var(--bg-inset);
  border-radius: 4px;
}

.pe-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.pe-history-table th {
  position: sticky;
  top: 0;
  background: rgba(18, 15, 13, 0.98);
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-gold);
}

.pe-history-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(196, 178, 138, 0.12);
  vertical-align: middle;
}

.pe-history-table tr:last-child td {
  border-bottom: none;
}

.pe-history-table tbody tr:hover {
  background: rgba(198, 178, 137, 0.06);
}

.inv-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  padding: 5px;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(16, 14, 15, 0.94) 55%, rgba(var(--rar-rgb, 169, 161, 150), 0.28) 100%);
  border: 1px solid rgba(196, 178, 138, 0.25);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.65);
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: all 0.16s ease;
}

.inv-cell.filled {
  cursor: pointer;
}

.inv-cell.filled:hover {
  transform: translateY(-2px) scale(1.05);
  z-index: 5;
  border-color: rgba(242, 232, 207, 0.65) !important;
  box-shadow: 0 0 14px rgba(var(--rar-rgb, 242, 232, 207), 0.38) !important;
}

.inv-cell img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 2px;
  display: block;
  position: relative;
  z-index: 1;
}

.inv-cell.empty {
  border: 1px solid rgba(168, 194, 218, 0.1);
  background: rgba(9, 12, 17, 0.68);
}

.inv-qty-badge, .inv-slot-badge {
  position: absolute;
  bottom: 3px;
  right: 3px;
  z-index: 4;
  background: rgba(7, 9, 14, 0.92);
  border: 1px solid rgba(var(--rar-rgb, 203, 184, 144), 0.65);
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 12.5px;
  padding: 0 4px;
  border-radius: 3px;
  line-height: 1.3;
  text-transform: uppercase;
}

/* Loja de Forja & Alquimia Full-Width */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 12px;
}

.shop-item-card {
  background: linear-gradient(180deg, rgba(20, 17, 16, 0.92), rgba(11, 10, 10, 0.96));
  border: 1px solid var(--border-dim);
  padding: 12px;
  transition: all 0.18s ease;
}

.shop-item-card:hover {
  border-color: var(--slot-rar, var(--border-gold-bright));
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.78);
}

/* ==================== FLOATING HOVER TOOLTIP & COMPARATIVO (AMPLIADO PARA MELHOR LEITURA) ==================== */
#item-tooltip-layer {
  position: fixed;
  z-index: 10050 !important;
  pointer-events: none;
  max-width: 920px;
}

.tt-pair {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.tt-card {
  width: 400px;
  max-width: calc(100vw - 28px);
  background-color: #0e0c0c;
  background-image:
    linear-gradient(180deg, rgba(16, 13, 12, var(--tt-bg-darkness, 0.97)), rgba(8, 7, 8, var(--tt-bg-darkness-end, 0.99))),
    var(--tt-bg-image, none);
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  border: 1.5px solid var(--rar-color, var(--border-gold));
  border-radius: 8px;
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.96), inset 0 0 28px rgba(0, 0, 0, 0.72);
  padding: 18px 20px;
  color: var(--text-main);
}

.tt-top-tag {
  font-family: var(--font-display);
  font-size: 13.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone-text);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(203, 184, 144, 0.26);
}

.tt-header {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 13px;
}

.tt-icon-frame {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  padding: 5px;
  border-radius: 8px;
  border: 1px solid var(--border-gold);
  background: #0a0c12;
  position: relative;
  overflow: hidden;
}

.tt-icon-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
  position: relative;
  z-index: 1;
}

.tt-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.26;
}

.tt-meta {
  font-size: 15.5px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.38;
}

.tt-elem {
  font-family: var(--font-display);
  font-size: 15px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tt-elem-ico {
  width: 22px;
  height: 22px;
  object-fit: contain;
  vertical-align: middle;
  border-radius: 4px;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.85));
}

.tt-elem-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  vertical-align: middle;
}

.tt-stats {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 11px 0;
  border-top: 1px solid rgba(203, 184, 144, 0.2);
  border-bottom: 1px solid rgba(203, 184, 144, 0.2);
  margin-bottom: 12px;
}

.tt-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 16.5px;
  line-height: 1.4;
}

.tt-stat-lbl { color: var(--text-muted); }
.tt-stat-val { font-weight: 700; color: var(--gold-bright); display: inline-flex; gap: 7px; align-items: center; }

.tt-diff {
  font-family: var(--font-display);
  font-size: 13.5px;
  padding: 2px 7px;
  border-radius: 3px;
}
.tt-diff.diff-up { color: #9ad19e; background: rgba(74, 140, 82, 0.24); }
.tt-diff.diff-down { color: #e88a8a; background: rgba(168, 48, 48, 0.28); }
.tt-diff.diff-eq { color: var(--text-dim); }

.tt-elem-res {
  font-size: 15px;
  color: var(--gold);
  margin-bottom: 10px;
  line-height: 1.45;
}

.tt-desc {
  font-size: 16.5px;
  line-height: 1.56;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 13px;
}

.tt-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--gold);
  padding-top: 11px;
  border-top: 1px solid rgba(203, 184, 144, 0.26);
}

.tt-footer.tt-footer-rich {
  justify-content: center;
  text-align: center;
  margin-top: 4px;
  padding: 9px 12px 6px;
  border-top: 1px solid rgba(218, 188, 122, 0.28);
  background: linear-gradient(90deg, transparent, rgba(212, 176, 100, 0.09), transparent);
  border-radius: 4px;
}

.tt-hint {
  color: #f6e4bc;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
}


/* ============================================================================
   ARENA DE COMBATE CINEMATOGRÁFICA (ESTILO REFERÊNCIA OVER-THE-SHOULDER)
   + DADOS 3D REAIS + VFX DE CORTE / PERFURAÇÃO / ESMAGAMENTO / ELEMENTAIS
   + TREMER TELA (SCREEN SHAKE) + HUD INFERIOR DE COMBATE
   ============================================================================ */

.combat-viewport {
  position: relative;
  width: 100%;
  height: calc(100vh - 86px);
  min-height: 760px;
  border-radius: 6px;
  border: 1px solid rgba(176, 198, 220, 0.34);
  overflow: hidden;
  background-color: #06090e;
  box-shadow: none;
  user-select: none;
  margin-bottom: 16px;
}

/* Cenário de fundo do combate ocupando 100% da área (sem faixa escura atrás das barras inferiores) */
.cv-bg-stage {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0 !important;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background-color: #06090e;
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
}

@media (max-width: 1200px) {
  .cv-bg-stage {
    bottom: 112px;
  }
}

@media (max-width: 820px) {
  .cv-bg-stage {
    bottom: 170px;
  }
}

/* Lua cheia enevoada removida da tela de combate */
.cv-moon {
  display: none;
}

.cv-fog {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background:
    radial-gradient(ellipse 65% 28% at 35% 78%, rgba(132, 166, 196, 0.16), transparent 72%),
    radial-gradient(ellipse 55% 26% at 72% 72%, rgba(118, 154, 184, 0.14), transparent 70%);
  animation: cvFogDrift 14s ease-in-out infinite alternate;
}

@keyframes cvFogDrift {
  0% { transform: translateX(-14px) scale(1); opacity: 0.72; }
  100% { transform: translateX(18px) scale(1.04); opacity: 0.95; }
}

/* Vinheta de Dano Vermelho ao receber ataque */
.cv-pain-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 28;
  opacity: 0;
  box-shadow: inset 0 0 110px rgba(210, 24, 24, 0.85), inset 0 0 36px rgba(255, 64, 64, 0.65);
}

.cv-pain-vignette.active {
  animation: cvPainFlash 0.62s ease-out forwards;
}

@keyframes cvPainFlash {
  0% { opacity: 0.95; }
  100% { opacity: 0; }
}

/* ==================== TREMER TELA (SCREEN SHAKE) ==================== */
.cv-shake-light { animation: cvShakeLight 0.34s cubic-bezier(.36,.07,.19,.97); }
.cv-shake-medium { animation: cvShakeMed 0.44s cubic-bezier(.36,.07,.19,.97); }
.cv-shake-heavy { animation: cvShakeHeavy 0.56s cubic-bezier(.36,.07,.19,.97); }
.cv-shake-crit { animation: cvShakeCrit 0.68s cubic-bezier(.36,.07,.19,.97); }

@keyframes cvShakeLight {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-4px, 2px); }
  45% { transform: translate(4px, -2px); }
  70% { transform: translate(-2px, 1px); }
}

@keyframes cvShakeMed {
  0%, 100% { transform: translate(0, 0); }
  15% { transform: translate(-8px, 4px) rotate(-0.35deg); }
  35% { transform: translate(8px, -5px) rotate(0.35deg); }
  55% { transform: translate(-6px, 3px); }
  75% { transform: translate(4px, -2px); }
}

@keyframes cvShakeHeavy {
  0%, 100% { transform: translate(0, 0); }
  12% { transform: translate(-13px, 7px) rotate(-0.7deg); }
  28% { transform: translate(12px, -8px) rotate(0.7deg); }
  46% { transform: translate(-10px, 6px) rotate(-0.4deg); }
  64% { transform: translate(8px, -4px); }
  82% { transform: translate(-4px, 2px); }
}

@keyframes cvShakeCrit {
  0%, 100% { transform: translate(0, 0) scale(1); }
  10% { transform: translate(-15px, 9px) scale(1.015) rotate(-0.9deg); }
  24% { transform: translate(15px, -10px) scale(1.012) rotate(0.9deg); }
  40% { transform: translate(-12px, 7px) rotate(-0.5deg); }
  58% { transform: translate(9px, -6px) rotate(0.4deg); }
  76% { transform: translate(-5px, 3px); }
}

/* ==================== TOP-LEFT MINIMAPA + ALIADOS ==================== */
.cv-top-left-hud {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 12;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  pointer-events: none;
}

.cv-minimap {
  position: relative;
  top: auto;
  left: auto;
  z-index: 1;
  width: 148px;
  flex-shrink: 0;
  pointer-events: auto;
}

.cv-top-allies-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: auto;
}

.cv-minimap-box {
  position: relative;
  width: 148px;
  height: 108px;
  border: 1px solid rgba(198, 178, 137, 0.55);
  border-radius: 3px;
  overflow: hidden;
  background-color: #0b0d10;
  background-size: 260%;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.85), inset 0 0 18px rgba(0, 0, 0, 0.72);
}

.cv-minimap-box::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 40%, rgba(6, 8, 12, 0.65) 100%);
  pointer-events: none;
}

.cv-minimap-pin {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: #fde047;
  border: 1.5px solid #120d08;
  box-shadow: 0 0 12px rgba(253, 224, 71, 0.95);
  z-index: 2;
}

.cv-minimap-meta {
  margin-top: 5px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: #e6ddc8;
  text-shadow: 0 2px 6px #000;
  line-height: 1.25;
}

.cv-minimap-sub {
  font-family: var(--font-body);
  font-size: 13.5px;
  color: #a8b6c4;
}

/* ==================== TOP-RIGHT: CONTADOR DE RODADAS ==================== */
.cv-round-badge {
  position: absolute;
  top: 12px;
  right: 14px;
  left: auto;
  transform: none;
  z-index: 16;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 98px;
  padding: 5px 22px 6px;
  border-radius: 5px;
  background: linear-gradient(180deg, rgba(16, 14, 14, 0.92) 0%, rgba(8, 7, 9, 0.96) 100%);
  border: 1px solid rgba(203, 184, 144, 0.58);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(242, 232, 207, 0.25);
  backdrop-filter: blur(6px);
  pointer-events: none;
}

.cv-round-label {
  font-family: var(--font-display);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  color: rgba(198, 178, 137, 0.88);
  line-height: 1.1;
}

.cv-round-num {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.05;
  color: var(--gold-bright);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95), 0 0 14px rgba(203, 184, 144, 0.35);
}

/* ==================== COMPANHEIRO (MÁX. 1) & INVOCAÇÃO (MÁX. 1) AO LADO DO AVATAR DO JOGADOR ==================== */
.cv-allies-stage {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}

.cv-ally-unit {
  position: absolute;
  width: auto;
  min-width: 220px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  pointer-events: auto;
  cursor: help;
  transition: left 0.45s cubic-bezier(.22,.85,.36,1), bottom 0.45s cubic-bezier(.22,.85,.36,1), transform 0.45s cubic-bezier(.22,.85,.36,1);
}

.cv-ally-unit.pos-vanguarda {
  left: 22%;
  bottom: 114px;
  transform: scale(1.03);
  z-index: 9;
}

.cv-ally-unit.pos-aberta {
  left: 11%;
  bottom: 126px;
  transform: scale(1);
  z-index: 8;
}

.cv-ally-unit.pos-defensivo {
  left: 4%;
  bottom: 138px;
  transform: scale(0.97);
  z-index: 6;
}

.cv-ally-unit.pos-retaguarda {
  left: -2%;
  bottom: 150px;
  transform: scale(1);
  z-index: 5;
}

.cv-ally-unit.pos-retaguarda:nth-child(2) {
  left: 3%;
  bottom: 142px;
  transform: scale(1);
  z-index: 5;
}

.cv-ally-unit.is-hit {
  animation: cvActorHit 0.44s ease-out !important;
  filter: drop-shadow(0 0 20px rgba(248, 113, 113, 0.9)) brightness(1.25);
}

.cv-ally-figure {
  position: relative;
  width: auto;
  height: auto;
  overflow: visible;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: cvHeroIdle 4.6s ease-in-out infinite;
}

.cv-ally-avatar-img {
  height: 642px;
  width: auto;
  max-height: 642px;
  max-width: 560px;
  object-fit: contain;
  object-position: bottom center;
  background: transparent;
  border: none;
  border-radius: 0;
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.88));
}

.cv-ally-unit.is-companion .cv-ally-avatar-img {
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.88)) drop-shadow(0 0 10px rgba(74, 222, 128, 0.28));
}

.cv-ally-unit.is-summon .cv-ally-avatar-img {
  height: 642px;
  max-height: 642px;
  max-width: 560px;
  width: auto;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.88)) drop-shadow(0 0 12px rgba(168, 85, 247, 0.36));
}

.cv-ally-plate {
  width: 230px;
  max-width: 100%;
  margin: 0;
  padding: 7px 10px;
  background: linear-gradient(180deg, rgba(11, 13, 18, 0.86), rgba(7, 8, 12, 0.92));
  border: 1px solid rgba(203, 184, 144, 0.36);
  border-radius: 5px;
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.78);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
  z-index: 3;
}

.cv-ally-name {
  width: 100%;
  text-align: left;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 6px #000, 0 0 10px rgba(0, 0, 0, 0.96);
}

.cv-ally-hp-track {
  width: 100%;
  height: 8px;
  background: rgba(14, 10, 10, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.cv-ally-hp-fill {
  height: 100%;
  background: linear-gradient(90deg, #166534, #22c55e 70%, #86efac);
  transition: width 0.35s ease;
}

.cv-ally-hp-fill.is-summon {
  background: linear-gradient(90deg, #581c87, #9333ea 70%, #d8b4fe);
}

.cv-ally-hp-txt {
  font-size: 13px;
  color: #e6d5d5;
  margin-top: 3px;
  display: flex;
  justify-content: space-between;
}

.cv-flee-side-btn {
  flex-shrink: 0;
  pointer-events: auto;
  height: 44px;
  padding: 0 12px;
  align-self: flex-end;
  margin-bottom: 6px;
}

.cv-enemies-stage.has-allies {
  left: 70%;
}

/* ==================== FOREGROUND ESQUERDO: AVATAR DO HERÓI EM COMBATE ==================== */
.cv-hero-actor {
  position: relative;
  z-index: 7;
  width: 560px;
  height: 642px;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
  animation: cvHeroIdle 4.2s ease-in-out infinite;
}

.cv-hero-avatar-frame {
  position: relative;
  width: 560px;
  height: 642px;
  border-radius: 0;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.cv-hero-avatar-frame::after {
  display: none;
}

.cv-hero-avatar-img {
  height: 642px;
  width: auto;
  max-height: 642px;
  max-width: 760px;
  object-fit: contain;
  object-position: bottom center;
  border-radius: 0;
  border: none;
  display: block;
  flex-shrink: 0;
  background: transparent;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.88));
}

.cv-hero-gear-pills {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.cv-hero-gear-mini {
  width: 34px;
  height: 34px;
  padding: 3px;
  border-radius: 5px;
  background: rgba(8, 10, 14, 0.92);
  border: 1px solid rgba(203, 184, 144, 0.65);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.85);
}

.cv-hero-gear-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 3px;
  display: block;
}

.cv-hero-actor.is-lunging {
  animation: cvHeroLunge 0.42s cubic-bezier(.22,.85,.36,1) !important;
}

.cv-hero-actor.is-hit {
  animation: cvActorHit 0.44s ease-out !important;
  filter: drop-shadow(0 0 24px rgba(220, 38, 38, 0.85)) brightness(1.25);
}

.cv-hero-actor.is-healing {
  filter: drop-shadow(0 0 28px rgba(74, 222, 128, 0.8)) brightness(1.15);
}

@keyframes cvHeroIdle {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
}

@keyframes cvHeroLunge {
  0% { transform: translate(0, 0) scale(1); }
  35% { transform: translate(58px, -18px) scale(1.06) rotate(4deg); }
  100% { transform: translate(0, 0) scale(1); }
}

/* ==================== MIDGROUND CENTRO-DIREITA: FORMAÇÃO DIAGONAL DE 2–3 INIMIGOS / CHEFE + 2 LACAIOS ==================== */
.cv-enemies-stage {
  position: absolute;
  left: 68%;
  top: auto;
  bottom: 120px;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 18px;
  max-width: 1040px;
}

.cv-enemy-unit {
  --enemy-unit-w: 300px;
  --enemy-fig-h: 344px;
  --enemy-plate-w: 80%;
  --enemy-hp-h: 7px;
  --enemy-name-fs: 11.5px;
  --enemy-hp-fs: 9.5px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.25s ease, width 0.25s ease;
  width: var(--enemy-unit-w);
}

.cv-enemies-stage.enemy-count-1 {
  top: 6%;
  gap: 0;
}

.cv-enemies-stage.enemy-count-1 .cv-enemy-unit {
  --enemy-unit-w: 400px;
  --enemy-fig-h: 460px;
  --enemy-plate-w: 76%;
  --enemy-hp-h: 9px;
  --enemy-name-fs: 13.5px;
  --enemy-hp-fs: 11px;
}

.cv-enemies-stage.enemy-count-1 .cv-enemy-unit.is-boss-unit {
  --enemy-unit-w: 450px;
  --enemy-fig-h: 510px;
  --enemy-plate-w: 78%;
  --enemy-hp-h: 10px;
  --enemy-name-fs: 14.5px;
  --enemy-hp-fs: 11.5px;
}

.cv-enemies-stage.enemy-count-1 .cv-enemy-unit.is-minion-unit {
  --enemy-unit-w: 350px;
  --enemy-fig-h: 400px;
  --enemy-plate-w: 74%;
  --enemy-hp-h: 8px;
  --enemy-name-fs: 12.5px;
  --enemy-hp-fs: 10.5px;
}

.cv-enemies-stage.enemy-count-1 .cv-enemy-unit:nth-child(1) {
  transform: translateY(0);
}

.cv-enemies-stage.enemy-count-2 .cv-enemy-unit {
  --enemy-unit-w: 320px;
  --enemy-fig-h: 368px;
  --enemy-plate-w: 78%;
  --enemy-hp-h: 7.5px;
  --enemy-name-fs: 12px;
  --enemy-hp-fs: 10px;
}

.cv-enemies-stage.enemy-count-2 .cv-enemy-unit.is-boss-unit {
  --enemy-unit-w: 372px;
  --enemy-fig-h: 422px;
  --enemy-plate-w: 80%;
  --enemy-hp-h: 8.5px;
  --enemy-name-fs: 13px;
  --enemy-hp-fs: 10.5px;
}

.cv-enemies-stage.enemy-count-2 .cv-enemy-unit.is-minion-unit {
  --enemy-unit-w: 280px;
  --enemy-fig-h: 322px;
  --enemy-plate-w: 76%;
  --enemy-hp-h: 6.5px;
  --enemy-name-fs: 11px;
  --enemy-hp-fs: 9.5px;
}

.cv-enemies-stage.enemy-count-3 {
  gap: 12px;
}

.cv-enemies-stage.enemy-count-3 .cv-enemy-unit {
  --enemy-unit-w: 256px;
  --enemy-fig-h: 296px;
  --enemy-plate-w: 82%;
  --enemy-hp-h: 6px;
  --enemy-name-fs: 11px;
  --enemy-hp-fs: 9.5px;
}

.cv-enemies-stage.enemy-count-3 .cv-enemy-unit.is-boss-unit {
  --enemy-unit-w: 300px;
  --enemy-fig-h: 344px;
  --enemy-plate-w: 82%;
  --enemy-hp-h: 7px;
  --enemy-name-fs: 12px;
  --enemy-hp-fs: 10px;
}

.cv-enemies-stage.enemy-count-3 .cv-enemy-unit.is-minion-unit {
  --enemy-unit-w: 224px;
  --enemy-fig-h: 260px;
  --enemy-plate-w: 82%;
  --enemy-hp-h: 5.5px;
  --enemy-name-fs: 10.5px;
  --enemy-hp-fs: 9px;
}

.cv-enemies-stage.enemy-count-4 {
  gap: 8px;
}

.cv-enemies-stage.enemy-count-4 .cv-enemy-unit {
  --enemy-unit-w: 210px;
  --enemy-fig-h: 244px;
  --enemy-plate-w: 86%;
  --enemy-hp-h: 5px;
  --enemy-name-fs: 10px;
  --enemy-hp-fs: 8.5px;
}

.cv-enemies-stage.enemy-count-4 .cv-enemy-unit.is-boss-unit {
  --enemy-unit-w: 248px;
  --enemy-fig-h: 286px;
  --enemy-plate-w: 86%;
  --enemy-hp-h: 6px;
  --enemy-name-fs: 11px;
  --enemy-hp-fs: 9px;
}

.cv-enemies-stage.enemy-count-4 .cv-enemy-unit.is-minion-unit {
  --enemy-unit-w: 186px;
  --enemy-fig-h: 216px;
  --enemy-plate-w: 88%;
  --enemy-hp-h: 4.5px;
  --enemy-name-fs: 9.5px;
  --enemy-hp-fs: 8px;
}

.cv-enemy-unit:nth-child(1) {
  transform: translateY(-28px);
}

.cv-enemy-unit:nth-child(2) {
  transform: translateY(42px);
}

.cv-enemy-unit:nth-child(3) {
  transform: translateY(-8px);
}

.cv-enemy-unit:hover:not(.is-dead-unit) {
  filter: brightness(1.08);
}

.cv-enemy-unit.is-boss-unit {
  z-index: 3;
}

.cv-enemy-unit.is-dead-unit {
  cursor: default;
  pointer-events: none;
}

.cv-enemy-plate {
  width: var(--enemy-plate-w, 80%);
  margin: 0 auto -2px;
  padding: 0 2px;
  background: transparent;
  border: none;
  border-radius: 0;
  backdrop-filter: none;
  box-shadow: none;
  transition: transform 0.2s ease, width 0.25s ease;
  position: relative;
  z-index: 3;
}

.cv-enemy-unit.is-targeted .cv-enemy-plate {
  border: none;
  box-shadow: none;
}

.cv-enemy-unit.is-targeted .cv-enemy-name {
  color: #ff6b6b;
  text-shadow: 0 0 14px rgba(239, 68, 68, 0.88), 0 0 24px rgba(185, 28, 28, 0.65), 0 2px 6px #000, 0 0 10px rgba(0, 0, 0, 0.95);
}

.cv-enemy-unit.is-targeted .cv-enemy-hp-track {
  border-color: rgba(248, 113, 113, 0.9);
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.55);
}

.cv-enemy-unit.is-boss-unit .cv-enemy-plate {
  border: none;
}

.cv-enemy-name {
  font-family: var(--font-display);
  font-size: var(--enemy-name-fs, 11.5px);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #f8d4d4;
  text-shadow: 0 2px 6px #000, 0 0 10px rgba(0, 0, 0, 0.96);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cv-enemy-unit.is-boss-unit .cv-enemy-name {
  color: #fde68a;
  font-size: calc(var(--enemy-name-fs, 11.5px) + 1px);
}

.cv-enemy-hp-track {
  width: 100%;
  height: var(--enemy-hp-h, 7px);
  background: rgba(14, 10, 10, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.cv-enemy-hp-fill {
  height: 100%;
  background: linear-gradient(90deg, #7f1d1d, #dc2626 70%, #f87171);
  transition: width 0.35s ease;
}

.cv-enemy-hp-txt {
  font-size: var(--enemy-hp-fs, 9.5px);
  color: #e6d5d5;
  margin-top: 1px;
  display: flex;
  justify-content: space-between;
}

.cv-reticle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 38px;
  height: 38px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 10;
  opacity: 0.9;
}

.cv-reticle::before,
.cv-reticle::after {
  content: '';
  position: absolute;
  background: rgba(248, 113, 113, 0.92);
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.9), 0 0 4px #000;
}
.cv-reticle::before { top: 50%; left: 0; right: 0; height: 1.5px; transform: translateY(-50%); }
.cv-reticle::after { left: 50%; top: 0; bottom: 0; width: 1.5px; transform: translateX(-50%); }

.cv-enemy-figure {
  position: relative;
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  animation: cvEnemyFloat 3.6s ease-in-out infinite;
}

.cv-enemy-aura {
  display: none;
}

.cv-enemy-unit.is-boss-unit .cv-enemy-aura {
  display: none;
}

.cv-enemy-avatar-card {
  position: relative;
  z-index: 2;
  width: 100%;
  height: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.cv-enemy-unit.is-targeted .cv-enemy-avatar-card {
  border: none;
  box-shadow: none;
  filter: drop-shadow(0 0 18px rgba(239, 68, 68, 0.88)) drop-shadow(0 0 32px rgba(185, 28, 28, 0.55));
}

.cv-enemy-unit.is-boss-unit .cv-enemy-avatar-card {
  background: transparent;
  border: none;
  box-shadow: none;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.92)) drop-shadow(0 0 14px rgba(255, 142, 42, 0.35));
}

.cv-enemy-unit.is-boss-unit.is-targeted .cv-enemy-avatar-card {
  filter: drop-shadow(0 0 22px rgba(239, 68, 68, 0.94)) drop-shadow(0 0 38px rgba(185, 28, 28, 0.65));
}

.cv-enemy-avatar-img {
  width: 100%;
  height: auto;
  max-height: var(--enemy-fig-h, 344px);
  max-width: 100%;
  object-fit: contain;
  object-position: bottom center;
  border-radius: 0;
  border: none;
  display: block;
  flex-shrink: 0;
  background: transparent;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.88));
}

.cv-enemy-role-badge {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  padding: 1px 7px;
  border-radius: 3px;
  font-family: var(--font-display);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  background: rgba(8, 9, 12, 0.88);
  border: 1px solid rgba(255, 157, 59, 0.75);
  color: #fde68a;
  white-space: nowrap;
}

.cv-enemy-shadow {
  width: 78%;
  height: 12px;
  margin-top: -6px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.78) 0%, transparent 74%);
}

.cv-enemy-figure.is-hit {
  animation: cvActorHit 0.46s ease-out !important;
}

.cv-enemy-figure.is-hit .cv-enemy-avatar-card {
  border: none !important;
  box-shadow: none !important;
  filter: drop-shadow(0 0 26px rgba(248, 113, 113, 0.95)) brightness(1.3);
}

.cv-enemy-figure.is-attacking {
  animation: cvEnemyLunge 0.46s cubic-bezier(.22,.85,.36,1) !important;
}

.cv-enemy-figure.is-dead {
  filter: grayscale(0.85);
  animation: none !important;
}

.cv-enemy-unit.is-dying-vanish,
.cv-ally-unit.is-dying-vanish {
  pointer-events: none !important;
  animation: cvUnitDeathVanish 2s cubic-bezier(.22, .61, .36, 1) forwards !important;
}

@keyframes cvUnitDeathVanish {
  0% {
    opacity: 1;
    filter: brightness(1.25) saturate(0.8);
    transform: translateY(0) scale(1);
  }
  28% {
    opacity: 0.86;
    filter: grayscale(0.65) brightness(0.95);
    transform: translateY(6px) scale(0.98);
  }
  72% {
    opacity: 0.42;
    filter: grayscale(1) blur(1.5px);
    transform: translateY(16px) scale(0.91);
  }
  100% {
    opacity: 0;
    filter: grayscale(1) blur(4px);
    transform: translateY(28px) scale(0.82);
  }
}

@keyframes cvEnemyFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-7px); }
}

@keyframes cvEnemyLunge {
  0% { transform: translate(0, 0); }
  40% { transform: translate(-34px, 10px); }
  100% { transform: translate(0, 0); }
}

@keyframes cvActorHit {
  0% { transform: translate(0, 0); }
  20% { transform: translate(16px, -8px) rotate(5deg); }
  45% { transform: translate(-12px, 4px) rotate(-4deg); }
  72% { transform: translate(7px, -2px); }
  100% { transform: translate(0, 0); }
}

/* ==================== CAMADA DE VFX (CORTE, PERFURAÇÃO, ESMAGAMENTO, ELEMENTAL — 2 SEGUNDOS) ==================== */
.cv-vfx-anchor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  display: grid;
  place-items: center;
}

.cv-vfx-burst {
  position: absolute;
  width: 220px;
  height: 220px;
  display: grid;
  place-items: center;
  pointer-events: none;
  animation: cvVfxFade 2s ease-out forwards;
}

.cv-vfx-burst svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.cv-vfx-elem-img {
  width: 112px;
  height: 112px;
  object-fit: contain;
  filter:
    drop-shadow(0 0 2px #ffffff)
    drop-shadow(0 0 8px var(--vfx-elem-color, #f2e8cf))
    drop-shadow(0 0 22px var(--vfx-elem-color, #f2e8cf));
  animation: cvElemBurst 2s cubic-bezier(.16,1,.3,1) forwards;
}

.cv-aoe-elem-img {
  width: 146px;
  height: 146px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  filter:
    drop-shadow(0 0 3px #ffffff)
    drop-shadow(0 0 12px var(--vfx-elem-color, #f2e8cf))
    drop-shadow(0 0 28px var(--vfx-elem-color, #f2e8cf));
  animation: cvElemBurst 2s cubic-bezier(.16,1,.3,1) forwards;
}

@keyframes cvElemBurst {
  0% { opacity: 0; transform: scale(0.42); }
  16% { opacity: 0.76; transform: scale(1.16); }
  32% { opacity: 0.74; transform: scale(1); }
  82% { opacity: 0.68; transform: scale(1.06); }
  100% { opacity: 0; transform: scale(1.18); }
}

@keyframes cvVfxFade {
  0% { opacity: 0; transform: scale(0.55); }
  12% { opacity: 1; transform: scale(1.08); }
  82% { opacity: 0.94; transform: scale(1.15); }
  100% { opacity: 0; transform: scale(1.26); }
}

/* Animação específica de risco de Corte (Slash) */
.vfx-slash-path {
  stroke-dasharray: 280;
  stroke-dashoffset: 280;
  animation: cvSlashDraw 2s cubic-bezier(.16,1,.3,1) forwards;
}
@keyframes cvSlashDraw {
  0% { stroke-dashoffset: 280; opacity: 1; }
  18% { stroke-dashoffset: 0; opacity: 1; }
  82% { stroke-dashoffset: 0; opacity: 0.95; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}

/* Animação específica de Perfuração (Lance Thrust) */
.vfx-pierce-beam {
  transform-origin: left center;
  animation: cvPierceThrust 2s cubic-bezier(.16,1,.3,1) forwards;
}
@keyframes cvPierceThrust {
  0% { transform: scaleX(0.1) translateX(-40px); opacity: 0.2; }
  18% { transform: scaleX(1.15) translateX(8px); opacity: 1; }
  82% { transform: scaleX(1.04) translateX(12px); opacity: 0.92; }
  100% { transform: scaleX(1) translateX(18px); opacity: 0; }
}

/* Animação específica de Esmagamento (Crush Shockwave) */
.vfx-crush-ring {
  transform-origin: center;
  animation: cvCrushWave 2s ease-out forwards;
}
@keyframes cvCrushWave {
  0% { transform: scale(0.25); opacity: 1; stroke-width: 10; }
  25% { transform: scale(1.08); opacity: 0.95; stroke-width: 6; }
  82% { transform: scale(1.26); opacity: 0.85; stroke-width: 4; }
  100% { transform: scale(1.38); opacity: 0; stroke-width: 1; }
}

/* Animação de Raio (Eletricidade) */
.vfx-lightning-bolt {
  animation: cvBoltFlicker 2s ease-out forwards;
}
@keyframes cvBoltFlicker {
  0%, 18%, 36%, 58%, 82% { opacity: 1; filter: drop-shadow(0 0 18px #38bdf8); }
  10%, 28%, 48% { opacity: 0.45; }
  100% { opacity: 0; }
}

/* Números Flutuantes de Dano / Crítico / Cura / Bloqueio (2 Segundos) */
.cv-float-num {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
  text-shadow: 0 3px 10px #000, 0 0 18px currentColor;
  pointer-events: none;
  animation: cvFloatPop 2s cubic-bezier(.16,1,.3,1) forwards;
}

.cv-float-num.is-crit {
  font-size: 31px;
  color: #fde047 !important;
  text-shadow: 0 4px 14px #000, 0 0 24px rgba(253, 224, 71, 0.95);
}

@keyframes cvFloatPop {
  0% { opacity: 0; transform: translate(-50%, 24px) scale(0.5); }
  12% { opacity: 1; transform: translate(-50%, -10px) scale(1.18); }
  26% { opacity: 1; transform: translate(-50%, -22px) scale(1); }
  84% { opacity: 1; transform: translate(-50%, -36px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -58px) scale(0.94); }
}

/* ==================== ROLAGEM DE DADOS 3D REAIS (d10 + Nd6) ==================== */
.cv-dice3d-stage {
  position: relative;
  top: auto;
  right: auto;
  z-index: 15;
  width: 256px;
  flex-shrink: 0;
  max-width: 100%;
  margin: 0;
  padding: 6px 9px;
  background: linear-gradient(180deg, rgba(11, 13, 18, 0.88), rgba(7, 8, 12, 0.92));
  border: 1px solid rgba(203, 184, 144, 0.42);
  border-radius: 5px;
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.82);
  pointer-events: auto;
}

.cv-dice3d-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.09em;
  color: var(--gold-bright);
  margin-bottom: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(203, 184, 144, 0.22);
}

.cv-dice3d-tray {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 11px;
  padding: 8px 4px 10px;
  perspective: 720px;
}

/* d10 3D Cristal Facetado */
.die3d-d10-wrap {
  width: 44px;
  height: 44px;
  perspective: 500px;
  display: grid;
  place-items: center;
}

.die3d-d10 {
  width: 42px;
  height: 42px;
  position: relative;
  transform-style: preserve-3d;
  display: grid;
  place-items: center;
  clip-path: polygon(50% 0%, 96% 32%, 82% 90%, 50% 100%, 18% 90%, 4% 32%);
  background: linear-gradient(145deg, #4b2d18 0%, #24150c 46%, #7d5b2d 100%);
  border: 1px solid rgba(242, 232, 207, 0.75);
  box-shadow: inset 0 0 14px rgba(255, 208, 112, 0.45), 0 6px 14px rgba(0, 0, 0, 0.85);
  color: #fef3c7;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  text-shadow: 0 2px 6px #000;
}

.die3d-d10.rolling {
  animation: die3dD10Tumble 0.78s cubic-bezier(.16,.84,.3,1);
}

.die3d-d10.is-crit {
  background: linear-gradient(145deg, #a16207 0%, #f59e0b 52%, #fef08a 100%);
  color: #1c1004;
  box-shadow: 0 0 22px rgba(253, 224, 71, 0.92);
}

.die3d-d10.is-fumble {
  background: linear-gradient(145deg, #450a0a 0%, #991b1b 55%, #dc2626 100%);
  color: #fee2e2;
  box-shadow: 0 0 16px rgba(220, 38, 38, 0.8);
}

@keyframes die3dD10Tumble {
  0%   { transform: translateY(-28px) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(0.7); }
  45%  { transform: translateY(6px) rotateX(340deg) rotateY(220deg) rotateZ(120deg) scale(1.12); }
  75%  { transform: translateY(-6px) rotateX(580deg) rotateY(460deg) rotateZ(280deg) scale(1.03); }
  100% { transform: translateY(0px) rotateX(720deg) rotateY(720deg) rotateZ(360deg) scale(1); }
}

/* d6 3D Cubo Real com 6 Faces (transform-style: preserve-3d) */
.die3d-scene {
  width: 34px;
  height: 34px;
  perspective: 420px;
}

.die3d-cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}

.die3d-cube.rolling {
  animation: die3dCubeTumble 0.82s cubic-bezier(.18,.84,.32,1) forwards;
}

@keyframes die3dCubeTumble {
  0% {
    transform: translateY(-26px) rotateX(calc(var(--rx, 0deg) + 540deg)) rotateY(calc(var(--ry, 0deg) + 720deg)) rotateZ(180deg);
  }
  58% {
    transform: translateY(5px) rotateX(calc(var(--rx, 0deg) + 140deg)) rotateY(calc(var(--ry, 0deg) + 190deg)) rotateZ(28deg);
  }
  82% {
    transform: translateY(-4px) rotateX(calc(var(--rx, 0deg) + 18deg)) rotateY(calc(var(--ry, 0deg) - 14deg)) rotateZ(-6deg);
  }
  100% {
    transform: translateY(0px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) rotateZ(0deg);
  }
}

.die3d-face {
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 5px;
  border: 1px solid rgba(203, 184, 144, 0.65);
  background: linear-gradient(145deg, #252028 0%, #110f15 68%, #2e2634 100%);
  box-shadow: inset 0 0 8px rgba(143, 123, 168, 0.35);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--gold-bright);
  text-shadow: 0 1px 4px #000;
  backface-visibility: hidden;
}

.die3d-face.f1 { transform: rotateY(0deg) translateZ(17px); }
.die3d-face.f2 { transform: rotateY(90deg) translateZ(17px); }
.die3d-face.f3 { transform: rotateY(180deg) translateZ(17px); }
.die3d-face.f4 { transform: rotateY(-90deg) translateZ(17px); }
.die3d-face.f5 { transform: rotateX(90deg) translateZ(17px); }
.die3d-face.f6 { transform: rotateX(-90deg) translateZ(17px); color: #fde047; }

.cv-dice3d-result {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(203, 184, 144, 0.18);
  font-size: 16px;
}

/* ==================== BANNER CENTRAL INFERIOR DE EVENTO ==================== */
.cv-event-banner {
  position: absolute;
  left: 50%;
  bottom: 112px;
  transform: translateX(-50%);
  z-index: 14;
  min-width: 340px;
  max-width: 580px;
  padding: 6px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(90deg, transparent 0%, rgba(10, 12, 16, 0.88) 14%, rgba(10, 12, 16, 0.88) 86%, transparent 100%);
  border-top: 1px solid rgba(198, 178, 137, 0.28);
  border-bottom: 1px solid rgba(198, 178, 137, 0.28);
  color: #efe5cf;
  font-size: 14px;
  text-align: center;
  text-shadow: 0 1px 6px #000;
}

/* ==================== PAINEL FLUTUANTE DIREITO (RECURSOS DO TURNO) ==================== */
.cv-side-stack {
  position: absolute;
  right: 14px;
  top: 76px;
  bottom: auto;
  z-index: 12;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 176px;
}

.cv-side-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 10px;
  background: rgba(9, 11, 15, 0.82);
  border: 1px solid rgba(198, 178, 137, 0.28);
  border-radius: 3px;
  font-size: 13.5px;
  color: var(--text-main);
  backdrop-filter: blur(4px);
}

.cv-side-chip strong {
  font-family: var(--font-display);
  color: var(--gold-bright);
}

/* ==================== HUD INFERIOR (RETRATO + HP/VIGOR/Q-E + POÇÕES) ==================== */
.cv-bottom-hud {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 16;
  padding: 10px 18px 12px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  background: transparent;
}

.cv-corner-portrait {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.cv-portrait-frame {
  width: 60px;
  height: 60px;
  border-radius: 4px;
  border: 1.5px solid var(--border-gold);
  overflow: hidden;
  background: #0a0c10;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.9);
  position: relative;
}

.cv-portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cv-hud-center {
  flex: 1;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.cv-hero-titlebar {
  font-family: var(--font-display);
  font-size: 13.5px;
  letter-spacing: 0.12em;
  color: var(--gold-bright);
  text-shadow: 0 2px 6px #000;
}

.cv-bars-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cv-hotkey-btn {
  position: relative;
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  border-radius: 4px;
  border: 1.5px solid var(--border-gold);
  background: linear-gradient(180deg, rgba(28, 22, 18, 0.95), rgba(10, 9, 10, 0.98));
  color: var(--gold-bright);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.16s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.85);
}

.cv-hotkey-btn:hover:not(:disabled) {
  border-color: var(--gold-bright);
  transform: translateY(-2px);
  box-shadow: 0 0 16px rgba(218, 192, 128, 0.45);
}

.cv-hotkey-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.cv-hotkey-btn img {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 3px;
}

.cv-hotkey-cap {
  position: absolute;
  bottom: -2px;
  left: -2px;
  background: rgba(8, 8, 10, 0.96);
  border: 1px solid var(--border-gold);
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 12.5px;
  padding: 0 4px;
  line-height: 1.3;
  border-radius: 2px;
}

.cv-bars-stack {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cv-hp-bar {
  position: relative;
  width: 100%;
  height: 22px;
  background: rgba(12, 8, 8, 0.94);
  border: 1px solid rgba(196, 178, 138, 0.45);
  border-radius: 2px;
  overflow: hidden;
}

.cv-hp-fill {
  height: 100%;
  background: linear-gradient(90deg, #6b1111 0%, #b91c1c 65%, #dc2626 100%);
  transition: width 0.35s ease;
}

.cv-hp-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  font-family: var(--font-display);
  font-size: 13px;
  color: #fff;
  text-shadow: 0 1px 4px #000;
}

/* ==================== CANTO INFERIOR ESQUERDO: BARRAS DE VITALIDADE & VIGOR ==================== */
.cv-hud-vitals-left {
  width: 284px;
  max-width: 284px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  padding: 8px 10px 10px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(11, 13, 18, 0.92) 0%, rgba(6, 8, 12, 0.97) 100%);
  border: 1px solid rgba(203, 184, 144, 0.48);
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.9);
}

.cv-hud-vitals-left .cv-hero-titlebar {
  text-align: center;
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cv-hud-vitals-left .cv-hero-effects-bar {
  justify-content: center;
  gap: 4px;
}

.cv-hud-vitals-left .cv-special-pips {
  justify-content: center;
}

.cv-vig-bar {
  position: relative;
  width: 100%;
  height: 16px;
  background: rgba(10, 9, 8, 0.94);
  border: 1px solid rgba(196, 178, 138, 0.36);
  border-radius: 2px;
  overflow: hidden;
}

.cv-vig-fill {
  height: 100%;
  background: linear-gradient(90deg, #92400e 0%, #d97706 70%, #f59e0b 100%);
  transition: width 0.35s ease;
}

.cv-vig-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  font-family: var(--font-display);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: #fef3c7;
  text-shadow: 0 1px 3px #000;
}

.cv-special-pips {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
}

.cv-sp-pip {
  width: 12px;
  height: 7px;
  border-radius: 2px;
  background: rgba(143, 123, 168, 0.22);
  border: 1px solid rgba(143, 123, 168, 0.45);
}

.cv-sp-pip.active {
  background: linear-gradient(180deg, #e9d5ff, #9333ea);
  border-color: #f3e8ff;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.75);
}

/* Barra Editável de Poções & Consumíveis (1-4) no mesmo padrão da Barra de Ações */
.cv-potion-dock {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 6px 10px 7px;
  background: linear-gradient(180deg, rgba(11, 14, 20, 0.92) 0%, rgba(7, 9, 13, 0.97) 100%);
  border: 1px solid rgba(203, 184, 144, 0.54);
  border-radius: 8px;
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.92), inset 0 0 18px rgba(0, 0, 0, 0.58);
  pointer-events: auto;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cv-potion-dock.is-editing {
  border-color: #4ade80;
  box-shadow: 0 0 22px rgba(74, 222, 128, 0.28), 0 12px 30px rgba(0, 0, 0, 0.92);
}

.cv-potion-bar {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cv-potion-slot {
  position: relative;
  width: 48px;
  height: 44px;
  padding: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(16, 14, 15, 0.94) 55%, rgba(var(--rar-rgb, 196, 178, 138), 0.28) 100%);
  border: 1px solid rgba(196, 178, 138, 0.25);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.65), 0 4px 12px rgba(0, 0, 0, 0.75);
}

.cv-potion-slot:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.05);
  z-index: 4;
}

.cv-potion-slot:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.cv-potion-slot.is-depleted {
  opacity: 0.58;
  filter: grayscale(0.45);
}

.cv-potion-slot.is-edit-target {
  box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.65), 0 4px 12px rgba(0, 0, 0, 0.85);
}

.cv-potion-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  position: relative;
  z-index: 1;
}

.cv-potion-slot.empty-pot {
  background: rgba(9, 11, 16, 0.74);
  border: 1px dashed rgba(196, 178, 138, 0.36);
  color: rgba(196, 178, 138, 0.52);
  font-size: 16px;
  cursor: pointer;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.72);
}

.cv-potion-slot.empty-pot:hover {
  border-color: #4ade80;
  color: #86efac;
  background: rgba(16, 34, 24, 0.65);
}

@media (max-width: 1180px) {
  .cv-dice3d-stage { width: 260px; }
  .cv-side-stack { display: none; }
}

@media (max-width: 720px) {
  .cv-minimap { display: none; }
  .cv-dice3d-stage { width: 240px; }
}


/* ============================================================================
   BARRA VERTICAL DE COMBATE AO LADO DO AVATAR + AURAS DE BUFF/DEBUFF + EFEITOS DE ÁREA (AoE)
   ============================================================================ */

/* Container do Avatar do Herói — posicionamento dinâmico em combate (Vanguarda → Retaguarda) */
.cv-hero-cluster {
  position: absolute;
  left: 10%;
  width: 560px;
  bottom: 120px;
  z-index: 12;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  pointer-events: none;
  transition: left 0.45s cubic-bezier(.22,.85,.36,1), bottom 0.45s cubic-bezier(.22,.85,.36,1), transform 0.45s cubic-bezier(.22,.85,.36,1);
}

.cv-hero-cluster.pos-vanguarda {
  left: 17%;
  bottom: 112px;
  transform: scale(1.03);
}

.cv-hero-cluster.pos-aberta {
  left: 10%;
  bottom: 122px;
  transform: scale(1);
}

.cv-hero-cluster.pos-defensivo {
  left: 4%;
  bottom: 136px;
  transform: scale(0.95);
}

.cv-hero-cluster.pos-retaguarda {
  left: -2%;
  bottom: 150px;
  transform: scale(0.9);
}

.cv-hero-cluster .cv-hero-actor {
  position: relative;
  left: auto;
  bottom: auto;
  z-index: 2;
  width: 330px;
  height: 380px;
  overflow: visible;
  pointer-events: auto;
}

.cv-hero-cluster .cv-hero-avatar-frame {
  width: 330px;
  height: 380px;
  overflow: visible;
}

/* Auras de Efeitos Positivos (Buff / Escudo) e Negativos (Status) aplicadas direto na silhueta do Avatar (sem contorno/caixa) */
.cv-hero-avatar-frame.has-buff {
  border: none;
  box-shadow: none;
  filter: drop-shadow(0 0 22px rgba(74, 222, 128, 0.58));
}

.cv-hero-avatar-frame.has-shield {
  border: none;
  box-shadow: none;
  filter: drop-shadow(0 0 24px rgba(56, 189, 248, 0.7));
}

.cv-hero-avatar-frame.has-debuff {
  border: none;
  box-shadow: none;
  animation: cvDebuffPulse 1.8s ease-in-out infinite;
}

@keyframes cvDebuffPulse {
  0%, 100% { filter: drop-shadow(0 0 16px rgba(239, 68, 68, 0.5)); }
  50% { filter: drop-shadow(0 0 30px rgba(248, 113, 113, 0.92)); }
}

.cv-hero-aura-tags {
  position: absolute;
  top: -16px;
  left: 0;
  right: 0;
  z-index: 8;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  pointer-events: auto;
}

.cv-center-hud-col {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  pointer-events: none;
}

.cv-center-actions-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  pointer-events: none;
}

.cv-actionbar-aura-tags {
  position: static;
  align-self: center;
  justify-content: center;
  padding-left: 0;
}

.cv-enemy-status-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin-bottom: 5px;
}

.cv-aura-icon-chip {
  position: relative;
  width: 34px;
  height: 34px;
  padding: 2px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 14px;
  line-height: 1;
  background: rgba(8, 10, 15, 0.94);
  border: 1.5px solid rgba(203, 184, 144, 0.65);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.88);
  cursor: help;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.cv-aura-chip-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.cv-fx-pill-ico {
  width: 18px;
  height: 18px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.cv-aura-icon-chip:hover {
  transform: scale(1.12);
  box-shadow: 0 0 12px currentColor;
}

.cv-aura-icon-chip.shield { color: #7dd3fc; border-color: #38bdf8; }
.cv-aura-icon-chip.debuff { color: #fca5a5; border-color: #ef4444; }
.cv-aura-icon-chip.buff   { color: #86efac; border-color: #4ade80; }

.cv-aura-icon-cnt {
  position: absolute;
  right: -4px;
  bottom: -4px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 3px;
  background: #07080c;
  border: 1px solid currentColor;
  font-family: var(--font-display);
  font-size: 11.5px;
  line-height: 12px;
  text-align: center;
  color: var(--gold-bright);
}

/* ==================== CENTRO INFERIOR: BARRA DE AÇÕES EM FILEIRA ÚNICA ==================== */
.cv-action-bar-center {
  flex: 0 1 auto;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 6px 10px 7px;
  background: linear-gradient(180deg, rgba(11, 14, 20, 0.92) 0%, rgba(7, 9, 13, 0.97) 100%);
  border: 1px solid rgba(203, 184, 144, 0.54);
  border-radius: 8px;
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.92), inset 0 0 18px rgba(0, 0, 0, 0.58);
  pointer-events: auto;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cv-action-bar-center.is-editing {
  border-color: #fde047;
  box-shadow: 0 0 22px rgba(253, 224, 71, 0.28), 0 12px 30px rgba(0, 0, 0, 0.92);
}

.cv-action-bar-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px;
}

.cv-action-bar-title {
  font-family: var(--font-display);
  font-size: 13.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(226, 212, 182, 0.9);
}

.cv-action-bar-tools {
  display: flex;
  align-items: center;
  gap: 5px;
}

.cv-bar-tool-btn {
  background: rgba(18, 22, 30, 0.9);
  border: 1px solid rgba(196, 178, 138, 0.45);
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.06em;
  padding: 2px 9px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cv-bar-tool-btn:hover,
.cv-bar-tool-btn.active {
  border-color: #fde047;
  background: rgba(92, 72, 24, 0.65);
  color: #fef08a;
}

.cv-action-row-single {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(15, 44px);
  justify-content: center;
  align-items: center;
  gap: 4px;
}

.cv-dock-slot {
  position: relative;
  width: 100%;
  max-width: 48px;
  aspect-ratio: 1 / 1;
  height: 44px;
  min-height: 44px;
  padding: 4px;
  border-radius: 2px;
  border: 1px solid rgba(196, 178, 138, 0.25);
  background: linear-gradient(180deg, rgba(16, 14, 15, 0.94) 55%, rgba(var(--rar-rgb, 196, 178, 138), 0.28) 100%);
  color: var(--gold-bright);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.85);
}

.cv-dock-slot.is-empty {
  border: 1px dashed rgba(196, 178, 138, 0.34);
  background: rgba(9, 11, 16, 0.72);
  color: rgba(196, 178, 138, 0.42);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.72);
}

.cv-dock-slot.is-empty:hover {
  border-color: var(--gold-bright);
  color: var(--gold-bright);
  background: rgba(34, 28, 18, 0.62);
}

.cv-empty-plus {
  font-size: 16px;
  line-height: 1;
  font-weight: 600;
}

.cv-slot-num {
  position: absolute;
  bottom: 1px;
  right: 3px;
  font-family: var(--font-display);
  font-size: 11.5px;
  opacity: 0.55;
  pointer-events: none;
}

.cv-dock-slot.is-maneuver {
  border-color: rgba(125, 211, 252, 0.68);
  background: radial-gradient(ellipse 95% 65% at 50% 105%, rgba(56, 189, 248, 0.32), #0a1018 82%);
}
.cv-dock-slot.is-maneuver:hover:not(:disabled) {
  border-color: #bae6fd;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.5);
}

.cv-dock-slot.is-item {
  border-color: rgba(74, 222, 128, 0.68);
  background: radial-gradient(ellipse 95% 65% at 50% 105%, rgba(34, 197, 94, 0.32), #0a1410 82%);
}
.cv-dock-slot.is-item:hover:not(:disabled) {
  border-color: #bbf7d0;
  box-shadow: 0 0 16px rgba(74, 222, 128, 0.5);
}

.cv-dock-slot.is-edit-target {
  box-shadow: 0 0 0 1px rgba(253, 224, 71, 0.55), 0 4px 12px rgba(0, 0, 0, 0.85);
}

/* Modal de Seleção de Ação para Slot da Barra 8x2 */
.cv-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 640px) {
  .cv-picker-grid { grid-template-columns: 1fr; }
}

.cv-picker-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border-radius: 5px;
  border: 1px solid rgba(196, 178, 138, 0.34);
  background: rgba(14, 16, 22, 0.9);
  color: var(--text-main);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.cv-picker-option:hover,
.cv-picker-option.is-active {
  border-color: var(--gold-bright);
  background: rgba(42, 34, 22, 0.85);
}

.cv-picker-ico {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 4px;
  border: 1px solid rgba(203, 184, 144, 0.5);
  background: #0a0c10;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 17px;
}

.cv-picker-ico img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cv-dock-slot:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.06);
  z-index: 4;
}

.cv-dock-slot:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.cv-dock-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.cv-dock-slot.is-attack {
  border-color: rgba(239, 68, 68, 0.85);
  background: radial-gradient(ellipse 95% 65% at 50% 105%, rgba(220, 38, 38, 0.48), #14090a 80%);
}
.cv-dock-slot.is-attack:hover:not(:disabled) {
  border-color: #fca5a5;
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.58);
}

.cv-dock-slot.is-special {
  border-color: rgba(168, 85, 247, 0.72);
  background: radial-gradient(ellipse 95% 65% at 50% 105%, rgba(168, 85, 247, 0.42), #100b18 80%);
}
.cv-dock-slot.is-special:hover:not(:disabled) {
  border-color: #e9d5ff;
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.58);
}

.cv-dock-slot.is-endturn {
  border-color: rgba(235, 204, 130, 0.8);
  background: radial-gradient(ellipse 95% 65% at 50% 105%, rgba(217, 165, 56, 0.42), #15110a 80%);
}
.cv-dock-slot.is-endturn:hover:not(:disabled) {
  border-color: #fde68a;
  box-shadow: 0 0 18px rgba(245, 198, 92, 0.55);
}

.cv-dock-tag {
  position: absolute;
  top: -3px;
  right: -3px;
  z-index: 3;
  padding: 0 4px;
  border-radius: 3px;
  font-family: var(--font-display);
  font-size: 11.5px;
  line-height: 1.35;
  background: rgba(7, 9, 14, 0.95);
  border: 1px solid rgba(203, 184, 144, 0.65);
  color: var(--gold-bright);
}

.cv-dock-tag.aoe {
  background: rgba(154, 52, 18, 0.94);
  border-color: #fb923c;
  color: #ffedd5;
}

/* ==================== EFEITOS POSITIVOS & NEGATIVOS ATIVOS NO JOGADOR ==================== */
.cv-hero-effects-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.cv-fx-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.2;
  backdrop-filter: blur(4px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.65);
}

.cv-fx-pill.is-buff {
  background: linear-gradient(180deg, rgba(16, 62, 44, 0.86), rgba(8, 28, 22, 0.94));
  border: 1px solid rgba(74, 222, 128, 0.72);
  color: #dcfce7;
}

.cv-fx-pill.is-shield {
  background: linear-gradient(180deg, rgba(14, 58, 92, 0.88), rgba(8, 24, 42, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.8);
  color: #e0f2fe;
}

.cv-fx-pill.is-debuff {
  background: linear-gradient(180deg, rgba(96, 20, 28, 0.88), rgba(34, 8, 14, 0.96));
  border: 1px solid rgba(248, 113, 113, 0.82);
  color: #fee2e2;
  animation: cvDebuffBadgeBlink 2.2s ease-in-out infinite;
}

@keyframes cvDebuffBadgeBlink {
  0%, 100% { border-color: rgba(248, 113, 113, 0.65); }
  50% { border-color: rgba(254, 202, 202, 1); box-shadow: 0 0 12px rgba(239, 68, 68, 0.55); }
}

.cv-fx-pill-dur {
  font-family: var(--font-display);
  font-size: 12.5px;
  padding: 0 4px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.55);
  color: var(--gold-bright);
}

.cv-fx-pill-sub {
  font-size: 12.5px;
  opacity: 0.86;
}

/* ==================== CAMADA CINEMATOGRÁFICA DE EFEITOS DE ÁREA (AoE) ==================== */
.cv-aoe-layer {
  position: absolute;
  inset: 0;
  z-index: 22;
  pointer-events: none;
  overflow: hidden;
}

.cv-aoe-wave {
  position: absolute;
  left: 56%;
  top: 42%;
  width: 680px;
  height: 360px;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: cvAoeFade 2s cubic-bezier(.16,1,.3,1) forwards;
}

.cv-aoe-wave.target-hero {
  left: 24%;
  top: 56%;
  width: 520px;
  height: 320px;
}

.cv-aoe-wave svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.cv-aoe-ring {
  transform-origin: center;
  animation: cvAoeExpand 2s cubic-bezier(.12,.82,.26,1) forwards;
}

.cv-aoe-banner-tag {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 16px;
  border-radius: 4px;
  background: rgba(8, 10, 14, 0.88);
  border: 1px solid currentColor;
  font-family: var(--font-display);
  font-size: 13.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.9), 0 0 18px currentColor;
}

@keyframes cvAoeExpand {
  0% { transform: scale(0.18); opacity: 1; }
  25% { transform: scale(1.04); opacity: 0.94; }
  82% { transform: scale(1.16); opacity: 0.88; }
  100% { transform: scale(1.28); opacity: 0; }
}

@keyframes cvAoeFade {
  0% { opacity: 0; }
  12% { opacity: 1; }
  84% { opacity: 0.94; }
  100% { opacity: 0; }
}

@media (max-width: 1180px) {
  .combat-viewport { min-height: 620px; }
  .cv-hero-cluster { left: 14px; width: 290px; bottom: 132px; gap: 6px; }
  .cv-hero-cluster .cv-hero-actor,
  .cv-hero-cluster .cv-hero-avatar-frame { width: 290px; height: 340px; }
  .cv-hero-cluster .cv-hero-avatar-img { height: 340px; max-height: 340px; max-width: 390px; }
  .cv-allies-stage { left: 296px; bottom: 132px; gap: 6px; }
  .cv-ally-unit { width: auto; min-width: 160px; }
  .cv-ally-figure { width: auto; height: auto; }
  .cv-ally-plate { width: 148px; }
  .cv-ally-avatar-img { height: 273px; max-height: 273px; max-width: 325px; }
  .cv-hud-vitals-left { width: 224px; padding: 6px 8px; }
  .cv-action-grid-8x2 { grid-template-columns: repeat(8, 40px); grid-template-rows: repeat(2, 40px); gap: 4px; }
  .cv-dock-slot { width: 40px; height: 40px; }
  .cv-enemies-stage { left: 61%; top: 12%; gap: 10px; }
  .cv-enemies-stage.has-allies { left: 69%; }
  .cv-enemies-stage.enemy-count-1 .cv-enemy-unit { --enemy-unit-w: 310px; --enemy-fig-h: 356px; }
  .cv-enemies-stage.enemy-count-1 .cv-enemy-unit.is-boss-unit { --enemy-unit-w: 352px; --enemy-fig-h: 400px; }
  .cv-enemies-stage.enemy-count-1 .cv-enemy-unit.is-minion-unit { --enemy-unit-w: 272px; --enemy-fig-h: 312px; }
  .cv-enemies-stage.enemy-count-2 .cv-enemy-unit { --enemy-unit-w: 252px; --enemy-fig-h: 288px; }
  .cv-enemies-stage.enemy-count-2 .cv-enemy-unit.is-boss-unit { --enemy-unit-w: 294px; --enemy-fig-h: 334px; }
  .cv-enemies-stage.enemy-count-2 .cv-enemy-unit.is-minion-unit { --enemy-unit-w: 220px; --enemy-fig-h: 252px; }
  .cv-enemies-stage.enemy-count-3 .cv-enemy-unit { --enemy-unit-w: 204px; --enemy-fig-h: 234px; }
  .cv-enemies-stage.enemy-count-3 .cv-enemy-unit.is-boss-unit { --enemy-unit-w: 238px; --enemy-fig-h: 272px; }
  .cv-enemies-stage.enemy-count-3 .cv-enemy-unit.is-minion-unit { --enemy-unit-w: 178px; --enemy-fig-h: 204px; }
  .cv-enemies-stage.enemy-count-4 .cv-enemy-unit { --enemy-unit-w: 168px; --enemy-fig-h: 194px; }
  .cv-enemies-stage.enemy-count-4 .cv-enemy-unit.is-boss-unit { --enemy-unit-w: 196px; --enemy-fig-h: 224px; }
  .cv-enemies-stage.enemy-count-4 .cv-enemy-unit.is-minion-unit { --enemy-unit-w: 148px; --enemy-fig-h: 170px; }
}

@media (max-width: 720px) {
  .cv-bottom-hud { flex-wrap: wrap; justify-content: center; gap: 8px; padding: 8px; }
  .cv-hud-vitals-left { width: 100%; max-width: 340px; }
  .cv-hero-cluster { left: 12px; transform: none; width: 200px; bottom: 198px; gap: 5px; }
  .cv-hero-cluster .cv-hero-actor,
  .cv-hero-cluster .cv-hero-avatar-frame { width: 200px; height: 232px; }
  .cv-hero-cluster .cv-hero-avatar-img { height: 232px; max-height: 232px; max-width: 270px; }
  .cv-allies-stage { left: 208px; bottom: 198px; gap: 4px; }
  .cv-ally-unit { width: auto; min-width: 120px; }
  .cv-ally-figure { width: auto; height: auto; }
  .cv-ally-plate { width: 118px; }
  .cv-ally-avatar-img { height: 185px; max-height: 185px; max-width: 228px; }
  .cv-action-grid-8x2 { grid-template-columns: repeat(8, 34px); grid-template-rows: repeat(2, 34px); gap: 3px; }
  .cv-dock-slot { width: 34px; height: 34px; padding: 2px; }
  .cv-enemies-stage.enemy-count-1 .cv-enemy-unit { --enemy-unit-w: 206px; --enemy-fig-h: 236px; }
  .cv-enemies-stage.enemy-count-1 .cv-enemy-unit.is-boss-unit { --enemy-unit-w: 234px; --enemy-fig-h: 268px; }
  .cv-enemies-stage.enemy-count-1 .cv-enemy-unit.is-minion-unit { --enemy-unit-w: 180px; --enemy-fig-h: 208px; }
  .cv-enemies-stage.enemy-count-2 .cv-enemy-unit { --enemy-unit-w: 170px; --enemy-fig-h: 196px; }
  .cv-enemies-stage.enemy-count-2 .cv-enemy-unit.is-boss-unit { --enemy-unit-w: 196px; --enemy-fig-h: 224px; }
  .cv-enemies-stage.enemy-count-2 .cv-enemy-unit.is-minion-unit { --enemy-unit-w: 148px; --enemy-fig-h: 170px; }
  .cv-enemies-stage.enemy-count-3 .cv-enemy-unit { --enemy-unit-w: 140px; --enemy-fig-h: 162px; }
  .cv-enemies-stage.enemy-count-3 .cv-enemy-unit.is-boss-unit { --enemy-unit-w: 162px; --enemy-fig-h: 186px; }
  .cv-enemies-stage.enemy-count-3 .cv-enemy-unit.is-minion-unit { --enemy-unit-w: 122px; --enemy-fig-h: 142px; }
  .cv-enemies-stage.enemy-count-4 .cv-enemy-unit { --enemy-unit-w: 116px; --enemy-fig-h: 134px; }
  .cv-enemies-stage.enemy-count-4 .cv-enemy-unit.is-boss-unit { --enemy-unit-w: 134px; --enemy-fig-h: 154px; }
  .cv-enemies-stage.enemy-count-4 .cv-enemy-unit.is-minion-unit { --enemy-unit-w: 102px; --enemy-fig-h: 118px; }
}

/* ============================================================================
   TRIPLE-AAA VISUAL POLISH LAYER
   Molduras Duplas Metálicas, Cantos Filigranados, Destaque Luminoso de Bônus,
   Texturas Atmosféricas de Fundo & Acabamento Forjado em Todo o Sistema
   ============================================================================ */

/* Barra Superior Forjada com Textura Atmosférica e Filete Dourado */
.topbar {
  background:
    linear-gradient(180deg, rgba(14, 11, 10, 0.94) 0%, rgba(8, 7, 8, 0.97) 100%),
    url('../assets/images/Background2K.jpg') center / cover no-repeat;
  border-bottom: 1px solid rgba(212, 188, 138, 0.56);
  box-shadow:
    0 10px 32px rgba(0, 0, 0, 0.92),
    inset 0 1px 0 rgba(255, 240, 200, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.9);
}

.nav-btn.active {
  background: linear-gradient(180deg, rgba(64, 48, 26, 0.44), rgba(22, 16, 11, 0.85));
  border-color: rgba(235, 212, 158, 0.65);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 210, 0.35),
    0 0 16px rgba(212, 184, 122, 0.22);
  text-shadow: 0 0 10px rgba(242, 232, 207, 0.55);
}

/* Painéis e Cartões com Duplo Bisel Metálico AAA + Textura Sutil de Fundo */
.card {
  background:
    linear-gradient(180deg, rgba(22, 19, 17, 0.92) 0%, rgba(11, 10, 11, 0.96) 100%),
    url('../assets/images/Background2K.jpg') center / cover no-repeat;
  border: 1px solid rgba(203, 184, 144, 0.3);
  border-radius: 4px;
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.86),
    inset 0 1px 0 rgba(255, 240, 200, 0.15),
    inset 0 0 0 1px rgba(0, 0, 0, 0.72),
    inset 0 -14px 28px rgba(0, 0, 0, 0.58);
}

.card-gold {
  background:
    radial-gradient(ellipse 85% 40% at 50% 0%, rgba(212, 178, 110, 0.12), transparent 70%),
    linear-gradient(180deg, rgba(22, 18, 15, 0.9) 0%, rgba(10, 9, 10, 0.96) 100%),
    url('../assets/images/Landpage.jpg') center / cover no-repeat;
  border: 1px solid rgba(224, 198, 142, 0.56);
  box-shadow:
    0 20px 52px rgba(0, 0, 0, 0.92),
    0 0 0 1px rgba(10, 8, 7, 0.95),
    inset 0 1px 0 rgba(255, 244, 212, 0.34),
    inset 0 0 0 2px rgba(196, 172, 122, 0.1),
    inset 0 -18px 34px rgba(0, 0, 0, 0.68);
}

.card-gold::after {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(218, 194, 140, 0.14);
  border-radius: 2px;
  pointer-events: none;
}

/* Modais com Moldura Triple-AAA e Fundo Atmosférico */
.modal-box {
  background:
    radial-gradient(ellipse 80% 35% at 50% 0%, rgba(212, 178, 110, 0.16), transparent 70%),
    linear-gradient(180deg, rgba(22, 18, 16, 0.94) 0%, rgba(9, 8, 10, 0.98) 100%),
    url('../assets/images/Background2K.jpg') center / cover no-repeat !important;
  border: 1.5px solid rgba(235, 210, 154, 0.72) !important;
  border-radius: 6px !important;
  box-shadow:
    0 28px 72px rgba(0, 0, 0, 0.96),
    0 0 36px rgba(196, 162, 92, 0.18),
    inset 0 1px 0 rgba(255, 246, 218, 0.38),
    inset 0 0 0 2px rgba(196, 172, 122, 0.12) !important;
}

/* Caixas de Atributos, Ataques, Defesas e Stats com Brilho Metálico e Destaque de Bônus */
.stat-box {
  position: relative;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(24, 20, 18, 0.94) 0%, rgba(10, 9, 11, 0.98) 100%);
  border: 1px solid rgba(203, 184, 144, 0.32);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.74),
    inset 0 1px 0 rgba(255, 240, 200, 0.18),
    inset 0 -8px 16px rgba(0, 0, 0, 0.52);
  overflow: hidden;
}

.stat-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(242, 224, 176, 0.55), transparent);
  pointer-events: none;
}

.stat-box .val {
  color: #fff2ce;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95), 0 0 14px rgba(218, 186, 112, 0.32);
}

.stat-box:hover {
  border-color: rgba(238, 212, 152, 0.78);
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.85),
    0 0 18px rgba(218, 188, 120, 0.24),
    inset 0 1px 0 rgba(255, 246, 218, 0.34);
  transform: translateY(-1px);
}

/* Destaque AAA em Tags, Pílulas de Bônus, Resistências e Efeitos Elementais */
.tag,
.hud-pill,
.elem-pill {
  box-shadow:
    0 3px 10px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 244, 214, 0.2);
  border-radius: 3px;
}

.hud-pill {
  background: linear-gradient(180deg, rgba(24, 20, 18, 0.94), rgba(10, 9, 10, 0.98));
  border-width: 1px;
}

.hud-pill.gold {
  background: linear-gradient(180deg, rgba(64, 48, 22, 0.58), rgba(18, 14, 9, 0.96));
  border-color: rgba(235, 204, 130, 0.65);
  box-shadow: 0 0 12px rgba(218, 182, 98, 0.2), inset 0 1px 0 rgba(255, 244, 206, 0.32);
}

.hud-pill.pe {
  background: linear-gradient(180deg, rgba(58, 34, 86, 0.6), rgba(16, 11, 24, 0.96));
  border-color: rgba(192, 132, 252, 0.62);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.24), inset 0 1px 0 rgba(233, 213, 255, 0.28);
}

.hud-pill.vit {
  background: linear-gradient(180deg, rgba(84, 22, 26, 0.62), rgba(22, 8, 10, 0.96));
  border-color: rgba(248, 113, 113, 0.62);
  box-shadow: 0 0 12px rgba(220, 38, 38, 0.24), inset 0 1px 0 rgba(254, 202, 202, 0.28);
}

.elem-pill {
  background: linear-gradient(180deg, rgba(24, 22, 26, 0.92), rgba(10, 10, 13, 0.96));
  border: 1px solid currentColor;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.95);
}

/* Destaque AAA em Árvores de Poderes, Habilidades, Talentos e Perícias */
.tree-node {
  border-radius: 5px;
  border: 1px solid rgba(196, 178, 138, 0.26);
  background: linear-gradient(180deg, rgba(20, 18, 20, 0.92), rgba(10, 9, 11, 0.97));
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.78), inset 0 1px 0 rgba(255, 240, 200, 0.1);
}

.tree-node.unlocked {
  border-color: rgba(235, 204, 130, 0.72);
  background:
    radial-gradient(ellipse 90% 45% at 50% 0%, rgba(212, 172, 92, 0.16), transparent 72%),
    linear-gradient(180deg, rgba(28, 22, 16, 0.94), rgba(11, 10, 10, 0.98));
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.85),
    0 0 16px rgba(212, 178, 104, 0.18),
    inset 0 1px 0 rgba(255, 244, 210, 0.34);
}

.tree-node.available {
  border-color: rgba(168, 132, 232, 0.65);
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.84),
    0 0 18px rgba(147, 51, 234, 0.22),
    inset 0 1px 0 rgba(233, 213, 255, 0.24);
}

.pericia-card.has-rank {
  border: 1.5px solid rgba(238, 208, 134, 0.82);
  background:
    radial-gradient(ellipse 95% 50% at 50% 0%, rgba(235, 194, 96, 0.22), transparent 74%),
    linear-gradient(180deg, rgba(38, 29, 16, 0.92) 0%, rgba(14, 12, 11, 0.98) 100%);
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.8),
    0 0 16px rgba(235, 198, 108, 0.22),
    inset 0 1px 0 rgba(255, 246, 212, 0.4);
}

/* Cartões de Loja (Mercador, Forja, Alquimia) com Moldura de Raridade AAA */
.shop-item-card {
  position: relative;
  border-radius: 5px;
  background:
    radial-gradient(ellipse 90% 40% at 50% 0%, rgba(var(--rar-rgb, 198, 178, 137), 0.12), transparent 72%),
    linear-gradient(180deg, rgba(22, 19, 18, 0.94), rgba(10, 9, 10, 0.98));
  border: 1px solid rgba(203, 184, 144, 0.28);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 242, 208, 0.14);
}

.shop-item-card:hover {
  border-color: var(--slot-rar, rgba(238, 212, 152, 0.82));
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.88),
    0 0 20px rgba(var(--rar-rgb, 218, 188, 120), 0.24),
    inset 0 1px 0 rgba(255, 246, 216, 0.28);
  transform: translateY(-2px);
}

/* Sockets de Itens (.rarity-box) Estilo AAA Forjado */
.rarity-box {
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.86),
    inset 0 1px 0 rgba(255, 248, 224, 0.26),
    inset 0 -10px 20px rgba(var(--rar-rgb, 198, 178, 137), 0.34) !important;
}

/* Tooltip AAA com Duplo Contorno Dourado/Raridade e Destaque de Bônus */
.tt-card {
  position: relative;
  border-radius: 5px;
  border: 1.5px solid var(--rar-color, rgba(232, 206, 148, 0.78));
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.96),
    0 0 26px rgba(var(--rar-rgb, 203, 184, 144), 0.24),
    inset 0 1px 0 rgba(255, 246, 218, 0.34),
    inset 0 0 0 2px rgba(8, 7, 8, 0.88),
    inset 0 0 26px rgba(0, 0, 0, 0.72);
}

.tt-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--rar-color, #f2e8cf), transparent);
  pointer-events: none;
}

.tt-stat-val {
  color: #fff2cc;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.92), 0 0 10px rgba(242, 214, 138, 0.28);
}

.tt-diff.diff-up {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.24);
  border: 1px solid rgba(74, 222, 128, 0.48);
  text-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
}

.tt-diff.diff-down {
  color: #fecaca;
  background: rgba(220, 38, 38, 0.26);
  border: 1px solid rgba(248, 113, 113, 0.5);
}

/* Botões Forjados AAA */
.btn {
  border-radius: 3px;
  box-shadow:
    0 5px 16px rgba(0, 0, 0, 0.72),
    inset 0 1px 0 rgba(255, 244, 214, 0.16),
    inset 0 -2px 6px rgba(0, 0, 0, 0.58);
}

.btn-gold {
  border-color: rgba(238, 208, 138, 0.78);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.78),
    0 0 14px rgba(218, 184, 108, 0.2),
    inset 0 1px 0 rgba(255, 248, 220, 0.38);
}

.btn-primary {
  border-color: rgba(235, 184, 126, 0.72);
  box-shadow:
    0 6px 22px rgba(0, 0, 0, 0.84),
    0 0 16px rgba(185, 38, 38, 0.34),
    inset 0 1px 0 rgba(255, 224, 196, 0.28);
}

/* HUD de Combate e Crônica com Acabamento AAA Forjado */
.combat-viewport {
  border: 1.5px solid rgba(216, 192, 140, 0.52);
  box-shadow: none;
}

.cv-hud-vitals-left,
.cv-action-bar-center,
.cv-round-badge,
.cv-dice3d-stage {
  border-color: rgba(224, 198, 142, 0.56);
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.92),
    inset 0 1px 0 rgba(255, 244, 214, 0.26),
    inset 0 0 0 1px rgba(8, 7, 8, 0.85);
}

.cv-hp-fill {
  background: linear-gradient(180deg, #ef4444 0%, #b91c1c 48%, #7f1d1d 100%);
  box-shadow: inset 0 1px 0 rgba(255, 220, 220, 0.45), 0 0 12px rgba(220, 38, 38, 0.45);
}

.cv-vig-fill {
  background: linear-gradient(180deg, #fbbf24 0%, #d97706 52%, #92400e 100%);
  box-shadow: inset 0 1px 0 rgba(255, 248, 210, 0.48), 0 0 10px rgba(245, 158, 11, 0.35);
}

.combat-log {
  background:
    linear-gradient(180deg, rgba(12, 10, 12, 0.92), rgba(7, 6, 8, 0.97)),
    url('../assets/images/Background2K.jpg') center / cover no-repeat;
  border: 1px solid rgba(203, 184, 144, 0.28);
  border-radius: 4px;
  box-shadow: inset 0 4px 18px rgba(0, 0, 0, 0.82);
}

.worldmap-viewport {
  border: 1.5px solid rgba(224, 198, 142, 0.62);
  border-radius: 5px;
  box-shadow:
    0 20px 54px rgba(0, 0, 0, 0.94),
    0 0 0 1px rgba(8, 7, 8, 0.96),
    inset 0 0 70px rgba(0, 0, 0, 0.78);
}

/* ==================== GRIMÓRIO DE MAGIAS (GLOSSÁRIO) ==================== */
.spell-codex-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(20, 17, 24, 0.94) 0%, rgba(11, 10, 14, 0.97) 100%);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 242, 212, 0.14);
}

.spell-codex-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
  padding: 9px 11px;
  border-radius: 5px;
  background: rgba(8, 10, 15, 0.78);
  border: 1px solid rgba(198, 178, 137, 0.2);
  font-size: 13.5px;
  line-height: 1.4;
}

@media (max-width: 720px) {
  .spell-codex-meta {
    grid-template-columns: 1fr;
  }
}


/* ============================================================================
   MOTOR GLOBAL DE DADOS 3D REALISTAS (d10 FACETADO + d6 COM PINTAS 3D REAIS)
   ============================================================================ */
.r3d-global-overlay {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 9800;
  pointer-events: none;
  opacity: 0;
  transform: translateY(22px) scale(0.94);
  transition: opacity 0.24s ease, transform 0.28s cubic-bezier(.16,.84,.3,1);
}

.r3d-global-overlay.is-visible {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.r3d-global-overlay.is-leaving {
  pointer-events: none;
  opacity: 0;
  transform: translateY(14px) scale(0.96);
}

.r3d-global-card {
  width: min(440px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: 9px;
  background:
    radial-gradient(circle at 50% 0%, rgba(212, 175, 92, 0.14), transparent 60%),
    linear-gradient(180deg, rgba(16, 14, 21, 0.96) 0%, rgba(9, 8, 13, 0.98) 100%);
  border: 1.5px solid rgba(216, 184, 112, 0.62);
  box-shadow:
    0 22px 54px rgba(0, 0, 0, 0.92),
    0 0 0 1px rgba(0, 0, 0, 0.85),
    inset 0 1px 0 rgba(255, 240, 200, 0.24);
  backdrop-filter: blur(10px);
}

.r3d-global-card.is-pass {
  border-color: rgba(74, 222, 128, 0.72);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.92), 0 0 22px rgba(34, 197, 94, 0.24);
}

.r3d-global-card.is-fail {
  border-color: rgba(248, 113, 113, 0.72);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.92), 0 0 22px rgba(220, 38, 38, 0.24);
}

.r3d-global-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(203, 184, 144, 0.22);
}

.r3d-global-title {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--gold-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 225px;
}

.r3d-verdict {
  font-family: var(--font-display);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(30, 26, 38, 0.85);
  border: 1px solid rgba(203, 184, 144, 0.35);
  color: #e5dcc8;
  white-space: nowrap;
}

.r3d-verdict.is-pass {
  background: rgba(20, 83, 45, 0.65);
  border-color: rgba(74, 222, 128, 0.7);
  color: #bbf7d0;
}

.r3d-verdict.is-fail {
  background: rgba(127, 29, 29, 0.65);
  border-color: rgba(248, 113, 113, 0.7);
  color: #fecaca;
}

.r3d-verdict.is-crit {
  background: linear-gradient(135deg, rgba(161, 98, 7, 0.82), rgba(245, 158, 11, 0.72));
  border-color: #fef08a;
  color: #fef9c3;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.45);
}

.r3d-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(203, 184, 144, 0.25);
  color: #cbd5e1;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  display: grid;
  place-items: center;
}

.r3d-close-btn:hover {
  background: rgba(203, 184, 144, 0.2);
  color: #fff;
}

/* Bandeja Tátil de Feltro & Latão Antigo */
.r3d-felt-tray {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 18px 14px 20px;
  border-radius: 8px;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(42, 62, 54, 0.68) 0%, rgba(16, 28, 25, 0.88) 58%, rgba(8, 14, 14, 0.96) 100%);
  border: 2px solid rgba(176, 142, 76, 0.55);
  box-shadow:
    inset 0 10px 26px rgba(0, 0, 0, 0.86),
    inset 0 0 0 2px rgba(28, 20, 12, 0.9),
    0 4px 14px rgba(0, 0, 0, 0.65);
  perspective: 900px;
  overflow: visible;
}

.r3d-felt-tray.is-compact {
  gap: 11px;
  padding: 12px 8px 14px;
}

.r3d-felt-rim {
  position: absolute;
  inset: 3px;
  border-radius: 5px;
  border: 1px dashed rgba(226, 198, 134, 0.22);
  pointer-events: none;
}

/* Slot individual de dado + sombra física projetada no feltro */
.r3d-die-slot {
  position: relative;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  perspective: 540px;
}

.r3d-die-slot.is-compact {
  width: 44px;
  height: 44px;
  perspective: 460px;
}

.r3d-shadow {
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 42px;
  height: 12px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.34) 55%, transparent 75%);
  filter: blur(2px);
  pointer-events: none;
}

.r3d-die-slot.is-compact .r3d-shadow {
  width: 34px;
  height: 10px;
  bottom: -3px;
}

.r3d-shadow.rolling {
  animation: r3dShadowBounce 0.92s cubic-bezier(.22,.82,.34,1) forwards;
}

@keyframes r3dShadowBounce {
  0%   { transform: translateX(-50%) scale(0.45); opacity: 0.2; }
  40%  { transform: translateX(-50%) scale(1.18); opacity: 0.9; }
  58%  { transform: translateX(-50%) scale(0.74); opacity: 0.52; }
  76%  { transform: translateX(-50%) scale(1.06); opacity: 0.85; }
  88%  { transform: translateX(-50%) scale(0.92); opacity: 0.7; }
  100% { transform: translateX(-50%) scale(1); opacity: 0.82; }
}

/* ==================== d10 3D FACETADO REALISTA ==================== */
.r3d-d10-body {
  position: relative;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
  transform: rotateZ(var(--rz, 0deg));
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.75));
}

.r3d-die-slot.is-compact .r3d-d10-body {
  width: 46px;
  height: 46px;
}

.r3d-d10-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.r3d-d10-base {
  fill: #341d10;
}

.r3d-d10-body.is-crit .r3d-d10-base {
  fill: #b45309;
}

.r3d-d10-body.is-crit {
  filter: drop-shadow(0 0 14px rgba(253, 224, 71, 0.95)) drop-shadow(0 6px 10px rgba(0, 0, 0, 0.8));
}

.r3d-d10-body.is-fumble .r3d-d10-base {
  fill: #7f1d1d;
}

.r3d-d10-body.is-fumble {
  filter: drop-shadow(0 0 12px rgba(239, 68, 68, 0.85)) drop-shadow(0 6px 10px rgba(0, 0, 0, 0.8));
}

.r3d-d10-num {
  position: relative;
  z-index: 2;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: #fef3c7;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.95), 0 0 8px rgba(251, 191, 36, 0.45);
  transform: translateY(-2px);
}

.r3d-die-slot.is-compact .r3d-d10-num {
  font-size: 17px;
}

.r3d-d10-body.is-crit .r3d-d10-num {
  color: #fffbeb;
  text-shadow: 0 1px 4px #78350f, 0 0 12px #fef08a;
}

.r3d-d10-tag {
  position: absolute;
  bottom: 7px;
  z-index: 2;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(253, 230, 138, 0.72);
  font-weight: 700;
  text-shadow: 0 1px 3px #000;
}

.r3d-d10-body.rolling {
  animation: r3dD10Roll 0.92s cubic-bezier(.18,.84,.3,1) forwards;
}

@keyframes r3dD10Roll {
  0%   { transform: translateY(-48px) rotateX(0deg) rotateY(0deg) rotateZ(-220deg) scale(0.68); opacity: 0.55; }
  40%  { transform: translateY(5px) rotateX(380deg) rotateY(260deg) rotateZ(-45deg) scale(1.1); opacity: 1; }
  58%  { transform: translateY(-14px) rotateX(550deg) rotateY(480deg) rotateZ(24deg) scale(1.03); }
  76%  { transform: translateY(2px) rotateX(690deg) rotateY(680deg) rotateZ(-10deg) scale(1.01); }
  88%  { transform: translateY(-4px) rotateX(726deg) rotateY(726deg) rotateZ(4deg) scale(1); }
  100% { transform: translateY(0px) rotateX(720deg) rotateY(720deg) rotateZ(var(--rz, 0deg)) scale(1); }
}

/* ==================== d6 3D CUBO REAL COM PINTAS GRAVADAS ==================== */
.r3d-cube-scene {
  width: 44px;
  height: 44px;
  perspective: 520px;
}

.r3d-die-slot.is-compact .r3d-cube-scene {
  width: 36px;
  height: 36px;
}

.r3d-cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, -8deg)) rotateY(var(--ry, 10deg));
}

.r3d-cube.rolling {
  animation: r3dCubeRoll 0.92s cubic-bezier(.18,.84,.3,1) forwards;
}

@keyframes r3dCubeRoll {
  0% {
    transform: translateY(-46px) rotateX(calc(var(--rx, -8deg) + 560deg)) rotateY(calc(var(--ry, 10deg) + 740deg)) rotateZ(210deg) scale(0.72);
  }
  42% {
    transform: translateY(5px) rotateX(calc(var(--rx, -8deg) + 175deg)) rotateY(calc(var(--ry, 10deg) + 210deg)) rotateZ(40deg) scale(1.06);
  }
  60% {
    transform: translateY(-13px) rotateX(calc(var(--rx, -8deg) + 54deg)) rotateY(calc(var(--ry, 10deg) + 64deg)) rotateZ(-18deg) scale(1.02);
  }
  78% {
    transform: translateY(2px) rotateX(calc(var(--rx, -8deg) - 10deg)) rotateY(calc(var(--ry, 10deg) - 12deg)) rotateZ(6deg) scale(1);
  }
  90% {
    transform: translateY(-3px) rotateX(calc(var(--rx, -8deg) + 4deg)) rotateY(calc(var(--ry, 10deg) + 4deg)) rotateZ(-2deg) scale(1);
  }
  100% {
    transform: translateY(0px) rotateX(var(--rx, -8deg)) rotateY(var(--ry, 10deg)) rotateZ(0deg) scale(1);
  }
}

.r3d-face {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 7px;
  border: 1.5px solid rgba(226, 198, 138, 0.72);
  background:
    radial-gradient(circle at 26% 22%, rgba(255, 246, 224, 0.24) 0%, transparent 48%),
    linear-gradient(145deg, #2d2633 0%, #15121a 58%, #282130 100%);
  box-shadow:
    inset 0 2px 4px rgba(255, 244, 214, 0.22),
    inset 0 -3px 6px rgba(0, 0, 0, 0.85),
    inset 0 0 10px rgba(154, 128, 76, 0.22);
  display: grid;
  place-items: center;
  backface-visibility: hidden;
  padding: 6px;
}

.r3d-cube.is-max .r3d-face.f6 {
  border-color: #fde047;
  box-shadow:
    inset 0 0 12px rgba(250, 204, 21, 0.45),
    0 0 14px rgba(250, 204, 21, 0.55);
}

.r3d-face.f1 { transform: rotateY(0deg) translateZ(22px); }
.r3d-face.f2 { transform: rotateY(90deg) translateZ(22px); }
.r3d-face.f3 { transform: rotateY(180deg) translateZ(22px); }
.r3d-face.f4 { transform: rotateY(-90deg) translateZ(22px); }
.r3d-face.f5 { transform: rotateX(90deg) translateZ(22px); }
.r3d-face.f6 { transform: rotateX(-90deg) translateZ(22px); }

/* Cubos compactos (Arena de Combate) */
.r3d-die-slot.is-compact .r3d-face {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  padding: 5px;
}

.r3d-die-slot.is-compact .r3d-face.f1 { transform: rotateY(0deg) translateZ(18px); }
.r3d-die-slot.is-compact .r3d-face.f2 { transform: rotateY(90deg) translateZ(18px); }
.r3d-die-slot.is-compact .r3d-face.f3 { transform: rotateY(180deg) translateZ(18px); }
.r3d-die-slot.is-compact .r3d-face.f4 { transform: rotateY(-90deg) translateZ(18px); }
.r3d-die-slot.is-compact .r3d-face.f5 { transform: rotateX(90deg) translateZ(18px); }
.r3d-die-slot.is-compact .r3d-face.f6 { transform: rotateX(-90deg) translateZ(18px); }

/* Grade 3x3 de pintas físicas gravadas em relevo */
.r3d-pips {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  place-items: center;
  gap: 2px;
}

.r3d-pip {
  width: 7.5px;
  height: 7.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, #fffbeb 0%, #f3d27a 48%, #9a6b21 100%);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.7),
    0 1px 3px rgba(0, 0, 0, 0.95);
}

.r3d-die-slot.is-compact .r3d-pip {
  width: 6px;
  height: 6px;
}

.r3d-pips.is-one .r3d-pip {
  width: 12px;
  height: 12px;
  background: radial-gradient(circle at 35% 30%, #fecaca 0%, #ef4444 48%, #7f1d1d 100%);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.55), 0 0 6px rgba(239, 68, 68, 0.65);
}

.r3d-die-slot.is-compact .r3d-pips.is-one .r3d-pip {
  width: 10px;
  height: 10px;
}

.r3d-pips.is-six .r3d-pip {
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #fde047 52%, #ca8a04 100%);
  box-shadow: 0 0 6px rgba(253, 224, 71, 0.8), 0 1px 2px #000;
}

.r3d-pip-empty {
  width: 1px;
  height: 1px;
}

.r3d-global-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(203, 184, 144, 0.2);
}

.r3d-formula {
  font-size: 13px;
  color: #d6cbb4;
}

.r3d-total-pill {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 5px;
  background: rgba(212, 175, 92, 0.14);
  border: 1px solid rgba(212, 175, 92, 0.48);
}

.r3d-total-pill strong {
  font-family: var(--font-display);
  font-size: 20px;
  color: #fde68a;
  line-height: 1;
}

@media (max-width: 640px) {
  .r3d-global-overlay {
    right: 10px;
    left: 10px;
    bottom: 12px;
  }
  .r3d-global-card {
    width: 100%;
  }
}

/* ==================== FUNDO PERSONALIZADO POR PÁGINA (IMAGEM OU VÍDEO) ==================== */
.page-bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.page-bg-layer.is-active {
  opacity: 1;
}

.page-bg-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: filter 0.6s ease, transform 0.6s ease;
}

.page-bg-media.is-stopped {
  filter: none;
  transform: none;
}

.page-bg-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.main-container {
  position: relative;
  z-index: 2;
}

/* ==================== BANNER PERSONALIZADO DO MENU DO TOPO ==================== */
.topbar {
  isolation: isolate;
  overflow: visible;
}

.topbar.has-custom-banner {
  background: transparent;
}

.topbar-bg-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.topbar-banner-el {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.topbar-banner-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* ==================== NÉVOA ATMOSFÉRICA EM MOVIMENTO SOMENTE NO MAPA ==================== */
.worldmap-viewport {
  overflow: hidden;
}

.cv-fog {
  display: none !important;
}

.worldmap-moving-mist {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
}

.wm-mist-layer {
  position: absolute;
  top: -15%;
  bottom: -15%;
  left: -45%;
  width: 190%;
  pointer-events: none;
  mix-blend-mode: screen;
  will-change: transform, opacity;
}

.wm-mist-1 {
  background:
    radial-gradient(ellipse 34% 26% at 18% 28%, rgba(214, 224, 238, 0.24) 0%, rgba(164, 184, 206, 0.08) 46%, transparent 74%),
    radial-gradient(ellipse 42% 30% at 54% 62%, rgba(226, 214, 188, 0.20) 0%, rgba(176, 168, 148, 0.07) 50%, transparent 76%),
    radial-gradient(ellipse 36% 24% at 84% 34%, rgba(202, 218, 236, 0.22) 0%, rgba(145, 166, 190, 0.06) 48%, transparent 74%);
  filter: blur(18px);
  animation: wmMistDriftA 38s ease-in-out infinite alternate;
}

.wm-mist-2 {
  background:
    radial-gradient(ellipse 28% 20% at 28% 72%, rgba(235, 226, 204, 0.18) 0%, rgba(180, 172, 152, 0.06) 48%, transparent 72%),
    radial-gradient(ellipse 38% 22% at 70% 22%, rgba(194, 212, 232, 0.20) 0%, rgba(132, 156, 182, 0.06) 52%, transparent 76%),
    radial-gradient(ellipse 24% 18% at 46% 42%, rgba(218, 226, 238, 0.16) 0%, transparent 70%);
  filter: blur(24px);
  animation: wmMistDriftB 52s ease-in-out infinite alternate;
}

.wm-mist-3 {
  background:
    radial-gradient(ellipse 22% 14% at 14% 52%, rgba(242, 232, 205, 0.14) 0%, transparent 68%),
    radial-gradient(ellipse 30% 16% at 62% 82%, rgba(190, 208, 228, 0.16) 0%, transparent 72%),
    radial-gradient(ellipse 26% 15% at 88% 58%, rgba(220, 212, 192, 0.14) 0%, transparent 70%);
  filter: blur(14px);
  animation: wmMistDriftC 29s ease-in-out infinite alternate;
}

@keyframes wmMistDriftA {
  0%   { transform: translate3d(-8%, -2%, 0) scale(1); opacity: 0.72; }
  50%  { transform: translate3d(4%, 3%, 0) scale(1.04); opacity: 0.92; }
  100% { transform: translate3d(12%, -3%, 0) scale(1.01); opacity: 0.78; }
}

@keyframes wmMistDriftB {
  0%   { transform: translate3d(10%, 3%, 0) scale(1.03); opacity: 0.65; }
  50%  { transform: translate3d(-4%, -2%, 0) scale(0.98); opacity: 0.88; }
  100% { transform: translate3d(-12%, 4%, 0) scale(1.05); opacity: 0.70; }
}

@keyframes wmMistDriftC {
  0%   { transform: translate3d(-5%, 4%, 0) scale(0.98); opacity: 0.58; }
  50%  { transform: translate3d(7%, -3%, 0) scale(1.03); opacity: 0.82; }
  100% { transform: translate3d(2%, 2%, 0) scale(1); opacity: 0.64; }
}

/* ==================== ANIMAÇÕES IDLE ORGÂNICAS DE COMBATE (JOGADOR, ALIADOS E INIMIGOS) ==================== */
.cv-hero-avatar-img {
  transform-origin: bottom center;
  animation: cvHeroIdleBreath 3.8s ease-in-out infinite;
  will-change: transform;
}

.cv-ally-avatar-img {
  transform-origin: bottom center;
  animation: cvAllyIdleBreath 3.5s ease-in-out infinite;
  will-change: transform;
}

.cv-ally-unit.is-summon .cv-ally-avatar-img {
  animation: cvSummonIdleHover 3.2s ease-in-out infinite;
}

.cv-ally-unit:nth-child(2) .cv-ally-avatar-img {
  animation-delay: -1.4s;
}

.cv-enemy-avatar-img {
  transform-origin: bottom center;
  animation: cvEnemyIdleBreath 3.6s ease-in-out infinite;
  will-change: transform;
}

.cv-enemy-unit:nth-child(1) .cv-enemy-avatar-img { animation-delay: 0s; animation-duration: 3.5s; }
.cv-enemy-unit:nth-child(2) .cv-enemy-avatar-img { animation-delay: -1.3s; animation-duration: 3.9s; }
.cv-enemy-unit:nth-child(3) .cv-enemy-avatar-img { animation-delay: -2.4s; animation-duration: 3.3s; }

.cv-enemy-unit.is-boss-unit .cv-enemy-avatar-img {
  animation-duration: 4.3s;
}

.cv-enemy-shadow {
  animation: cvEnemyShadowPulse 3.6s ease-in-out infinite;
}

.cv-enemy-unit:nth-child(2) .cv-enemy-shadow { animation-delay: -1.3s; animation-duration: 3.9s; }
.cv-enemy-unit:nth-child(3) .cv-enemy-shadow { animation-delay: -2.4s; animation-duration: 3.3s; }

.cv-enemy-figure.is-dead .cv-enemy-avatar-img,
.cv-enemy-figure.is-dead .cv-enemy-shadow,
.cv-enemy-unit.is-dead-unit .cv-enemy-avatar-img,
.cv-enemy-unit.is-dead-unit .cv-enemy-shadow {
  animation: none !important;
}

@keyframes cvHeroIdleBreath {
  0%, 100% {
    transform: translate3d(0, 0, 0) scaleX(1) scaleY(1) rotate(0deg);
  }
  30% {
    transform: translate3d(1.5px, -3.5px, 0) scaleX(0.992) scaleY(1.022) rotate(0.55deg);
  }
  65% {
    transform: translate3d(-1px, -1.5px, 0) scaleX(1.006) scaleY(0.994) rotate(-0.45deg);
  }
}

@keyframes cvAllyIdleBreath {
  0%, 100% {
    transform: translate3d(0, 0, 0) scaleX(1) scaleY(1) rotate(0deg);
  }
  45% {
    transform: translate3d(1.5px, -4px, 0) scaleX(0.99) scaleY(1.025) rotate(0.7deg);
  }
  75% {
    transform: translate3d(-1.5px, -1px, 0) scaleX(1.008) scaleY(0.992) rotate(-0.55deg);
  }
}

@keyframes cvSummonIdleHover {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1) rotate(-0.6deg);
  }
  50% {
    transform: translate3d(2px, -8px, 0) scale(1.022) rotate(0.8deg);
  }
}

@keyframes cvEnemyIdleBreath {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  35% {
    transform: translate3d(-2px, -4px, 0) rotate(-0.55deg);
  }
  70% {
    transform: translate3d(1.5px, -1.5px, 0) rotate(0.45deg);
  }
}

@keyframes cvEnemyShadowPulse {
  0%, 100% {
    transform: scaleX(1) scaleY(1);
    opacity: 0.85;
  }
  35% {
    transform: scaleX(0.93) scaleY(0.92);
    opacity: 0.65;
  }
}

/* ==================== BOTÃO DE FECHAR DA GALERIA NO TOPO DIREITO ==================== */
.gallery-close-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 10;
  min-width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  border-color: rgba(212, 176, 100, 0.55);
  background: rgba(18, 14, 14, 0.94);
  color: var(--gold-bright);
  border-radius: 6px;
}

.gallery-close-btn:hover {
  border-color: #f87171;
  color: #fca5a5;
  background: rgba(127, 29, 29, 0.45);
}

/* ==================== PADRONIZAÇÃO DOS CARDS DE MERCADOR, FORJA E ALQUIMIA ==================== */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  align-items: stretch;
}

.grid-3 {
  align-items: stretch;
}

.shop-item-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 14px 16px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(19, 17, 18, 0.96) 0%, rgba(11, 10, 12, 0.98) 100%);
  border: 1px solid rgba(var(--rar-rgb, 198, 178, 137), 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 245, 220, 0.06), 0 6px 18px rgba(0, 0, 0, 0.55);
  transition: transform 0.16s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.shop-item-card:hover {
  transform: translateY(-2px);
  border-color: var(--slot-rar, var(--border-gold-bright));
  box-shadow: inset 0 1px 0 rgba(255, 245, 220, 0.1), 0 10px 24px rgba(0, 0, 0, 0.72), 0 0 14px rgba(var(--rar-rgb, 212, 176, 100), 0.2);
}

.sic-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
}

.sic-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.sic-head-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

.sic-title {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 36px;
}

.sic-sub {
  font-size: 13.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sic-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  margin-top: 10px;
}

.sic-badges .tag {
  font-size: 13px;
  padding: 2px 7px;
  line-height: 1.3;
}

.sic-desc {
  flex: 1;
  margin: 10px 0 14px 0;
  min-height: 58px;
  font-size: 13.5px;
  line-height: 1.48;
  color: var(--text-muted);
}

.sic-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(196, 178, 138, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sic-price {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sic-price-main {
  font-size: 15px;
  line-height: 1.2;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px;
}

.sic-price-old {
  font-size: 13.5px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.sic-price-mod {
  font-size: 13.5px;
  font-weight: 700;
}

.sic-price-sub {
  font-size: 13.5px;
  color: var(--text-muted);
  white-space: nowrap;
}

.sic-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
  flex-shrink: 0;
}

.sic-actions .btn {
  padding: 6px 11px;
  white-space: nowrap;
}

/* ==================== FICHA DE PERSONAGEM (PADRÃO REFERÊNCIA) ==================== */
.sh-showcase {
  position: relative;
  display: grid;
  grid-template-columns: minmax(310px, 355px) minmax(560px, 1fr) minmax(300px, 345px);
  align-items: stretch;
  gap: 18px;
  padding: 20px 22px;
  border-radius: 10px;
  background:
    radial-gradient(ellipse 44% 58% at 39% 46%, rgba(138, 102, 48, 0.24) 0%, rgba(44, 32, 20, 0.16) 44%, transparent 74%),
    linear-gradient(180deg, rgba(16, 13, 12, 0.96) 0%, rgba(9, 8, 9, 0.98) 100%);
  border: 1px solid rgba(204, 174, 114, 0.42);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.78), 0 14px 38px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  min-height: 640px;
}

/* ==================== ÍCONES PERSONALIZÁVEIS UNIVERSAIS (ADMIN) ==================== */
.custom-ui-icon {
  display: inline-block;
  vertical-align: -0.18em;
  object-fit: contain;
  border-radius: 3px;
  flex-shrink: 0;
}

.custom-ui-icon.cui-xs {
  width: 14px;
  height: 14px;
}

.custom-ui-icon.cui-sm {
  width: 16px;
  height: 16px;
}

.custom-ui-icon.cui-nav {
  width: 15px;
  height: 15px;
  vertical-align: -0.22em;
  margin-right: 2px;
}

.custom-ui-icon.cui-md {
  width: 20px;
  height: 20px;
  vertical-align: -0.24em;
}

.custom-ui-icon.cui-lg {
  width: 24px;
  height: 24px;
  vertical-align: -0.26em;
}

.custom-ui-icon.cui-slot {
  width: 54px;
  height: 54px;
  vertical-align: middle;
  border-radius: 50%;
}

.custom-ui-icon.cui-inv-filter {
  width: 44px;
  height: 44px;
  vertical-align: middle;
}

/* Ícone Global de Ouro (substitui texto "PO" usando ícone personalizável pelo Admin — tamanho dobrado) */
.gold-coin-icon {
  display: inline-block;
  width: 32px;
  height: 32px;
  vertical-align: middle;
  object-fit: contain;
  margin-left: 3px;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.82));
}

.gold-coin-icon.gold-sm {
  width: 28px;
  height: 28px;
}

.gold-coin-icon.gold-lg {
  width: 38px;
  height: 38px;
  vertical-align: middle;
}

/* ==================== NARRAÇÃO DO MESTRE DE JOGO (GAME MASTER) ==================== */
.gm-narration-box {
  position: relative;
  padding: 14px 16px 14px 18px;
  margin: 10px 0 14px;
  border-radius: 7px;
  border: 1px solid rgba(204, 174, 114, 0.36);
  border-left: 4px solid var(--gold-bright);
  background: linear-gradient(135deg, rgba(24, 19, 15, 0.92) 0%, rgba(12, 11, 15, 0.94) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.08), 0 6px 20px rgba(0, 0, 0, 0.45);
}

.gm-narration-box.is-boss {
  border-color: rgba(239, 68, 68, 0.55);
  border-left-color: #ef4444;
  background: linear-gradient(135deg, rgba(42, 14, 16, 0.92) 0%, rgba(15, 9, 12, 0.95) 100%);
}

.gm-narration-box.is-victory {
  border-color: rgba(34, 197, 94, 0.5);
  border-left-color: #22c55e;
  background: linear-gradient(135deg, rgba(16, 36, 24, 0.9) 0%, rgba(10, 15, 14, 0.94) 100%);
}

.gm-narration-label {
  font-family: var(--font-display);
  font-size: 13.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}

.gm-narration-box.is-boss .gm-narration-label {
  color: #fca5a5;
}

.gm-narration-box.is-victory .gm-narration-label {
  color: #86efac;
}

.gm-narration-text {
  margin: 0;
  font-style: italic;
  font-size: 18px;
  line-height: 1.72;
  color: #efe5cf;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

/* ==================== TELA DE EXPLORAÇÃO / AVENTURA EM PÁGINA INTEIRA ==================== */
.adventure-fullpage {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 64px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 20px 44px;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  box-shadow: inset 0 0 110px rgba(0, 0, 0, 0.72);
}

.adventure-center-stage {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: opacity 0.45s ease;
}

.adv-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  transition: filter 0.7s ease, transform 0.7s ease;
}

.adv-bg-video.is-paused-blur {
  filter: none;
  transform: none;
}

.main-container {
  transition: opacity 0.45s ease;
}

#main-app.is-video-intro,
.adventure-center-stage.is-video-intro {
  opacity: 0 !important;
  pointer-events: none !important;
}

.adventure-center-stage.is-idle {
  max-width: 780px;
}

.adventure-center-stage > .card {
  margin: 0;
  background: linear-gradient(180deg, rgba(14, 13, 17, 0.84) 0%, rgba(8, 9, 13, 0.89) 100%);
  backdrop-filter: blur(8px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.78), inset 0 1px 0 rgba(255, 240, 200, 0.11);
}

.adventure-stepper {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 760px) {
  .adventure-fullpage {
    padding: 18px 12px 32px;
    background-attachment: scroll;
  }
  .adventure-stepper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --- COLUNA ESQUERDA --- */
.sh-left-col {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
  gap: 8px;
  padding: 14px 12px;
  border-radius: 2px;
  border: 1px solid rgba(196, 178, 138, 0.38);
  background: linear-gradient(90deg, rgba(44, 52, 55, 0.9) 0%, rgba(28, 33, 36, 0.94) 62%, rgba(16, 18, 22, 0.97) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 245, 220, 0.07), 0 6px 18px rgba(0, 0, 0, 0.45);
  z-index: 7;
}

.sh-sbar-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.sh-sbar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 3px 4px;
  border-radius: 2px;
  transition: background 0.14s ease;
}

.sh-sbar-row:hover {
  background: rgba(212, 175, 106, 0.08);
}

.sh-sbar-ico {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  color: #b8a57a;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.7));
}

.sh-sbar-main {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 0;
}

.sh-sbar-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.sh-sbar-val-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sh-center-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.sh-pericias-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: #f6dfa0;
  margin: 2px 0 0;
}

.sh-pericia-roll-link {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color 0.14s ease;
}

.sh-pericia-roll-link:hover {
  color: #fde68a;
  text-decoration: underline;
}

.sh-sbar-val {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: #f0e6cc;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.sh-sbar-lbl {
  font-family: var(--font-body);
  font-size: 16.5px;
  color: #e4d8be;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sh-sbar-lbl-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  max-width: 72%;
}

.sh-grade-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  padding: 1px 6px;
  border-radius: 3px;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.3;
  white-space: nowrap;
}

.sh-grade-badge.is-g1 {
  color: #fde68a;
  background: rgba(212, 175, 92, 0.22);
  border: 1px solid rgba(230, 198, 120, 0.65);
  box-shadow: 0 0 8px rgba(212, 175, 92, 0.28);
}

.sh-grade-badge.is-g2 {
  color: #e9d5ff;
  background: rgba(147, 51, 234, 0.26);
  border: 1px solid rgba(192, 132, 252, 0.72);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.36);
}

.sh-grade-badge.is-g3 {
  color: #fef08a;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.34), rgba(234, 179, 8, 0.22));
  border: 1px solid rgba(253, 224, 71, 0.85);
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.45);
}

.sh-sbar-row.has-grade {
  padding: 4px 6px 5px 8px;
  border-radius: 3px;
  border-left: 3px solid #e6c687;
  background: linear-gradient(90deg, rgba(212, 175, 106, 0.16) 0%, rgba(212, 175, 106, 0.04) 78%, transparent 100%);
}

.sh-sbar-row.has-grade .sh-sbar-val {
  color: #fde68a;
  text-shadow: 0 0 10px rgba(245, 198, 92, 0.42);
}

.sh-sbar-row.has-grade .sh-sbar-lbl {
  color: #fff3d1;
  font-weight: 600;
}

.sh-sbar-row.has-grade .sh-sbar-fill {
  background: linear-gradient(90deg, #d4a64a 0%, #fde68a 100%);
  box-shadow: 0 0 8px rgba(238, 198, 104, 0.55);
}

.sh-sbar-row.has-grade.is-g2 {
  border-left-color: #c084fc;
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.18) 0%, rgba(168, 85, 247, 0.04) 78%, transparent 100%);
}

.sh-sbar-row.has-grade.is-g2 .sh-sbar-val {
  color: #e9d5ff;
  text-shadow: 0 0 10px rgba(192, 132, 252, 0.48);
}

.sh-sbar-row.has-grade.is-g2 .sh-sbar-fill {
  background: linear-gradient(90deg, #9333ea 0%, #d8b4fe 100%);
  box-shadow: 0 0 8px rgba(192, 132, 252, 0.58);
}

.sh-sbar-row.has-grade.is-g3 {
  border-left-color: #fde047;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.24) 0%, rgba(234, 179, 8, 0.06) 78%, transparent 100%);
}

.sh-sbar-row.has-grade.is-g3 .sh-sbar-val {
  color: #fef08a;
  text-shadow: 0 0 12px rgba(250, 204, 21, 0.58);
}

.sh-sbar-row.has-grade.is-g3 .sh-sbar-fill {
  background: linear-gradient(90deg, #f59e0b 0%, #fef08a 100%);
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.65);
}

.sh-sbar-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 1px;
  overflow: hidden;
}

.sh-sbar-fill {
  height: 100%;
  background: linear-gradient(90deg, #d7c399 0%, #f1e4c4 100%);
  border-radius: 1px;
  transition: width 0.25s ease;
}

.sh-unified-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sh-sec-label {
  font-family: var(--font-display);
  font-size: 13.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #d7c399;
  margin-top: 6px;
  padding-left: 2px;
}

.sh-mini-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.sh-mini-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.sh-mini-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2px;
  padding: 6px 8px;
  border-radius: 2px;
  border: 1px solid rgba(196, 178, 138, 0.28);
  background: linear-gradient(90deg, rgba(44, 52, 55, 0.78) 0%, rgba(24, 29, 33, 0.88) 65%, rgba(15, 17, 21, 0.95) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 245, 220, 0.04);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.sh-mini-card:hover {
  border-color: rgba(230, 198, 135, 0.72);
  background:
    radial-gradient(ellipse at 30% 45%, rgba(176, 146, 82, 0.22) 0%, rgba(18, 20, 24, 0.92) 100%),
    linear-gradient(90deg, rgba(64, 62, 48, 0.86) 0%, rgba(28, 30, 34, 0.94) 70%, rgba(16, 18, 22, 0.97) 100%);
}

.sh-mini-card.has-grade {
  border-color: rgba(212, 175, 106, 0.44);
}

.sh-mini-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.sh-mini-lbl {
  font-family: var(--font-display);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  color: #b7c0c4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sh-mini-bottom {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
}

.sh-mini-val {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  color: #f2e8cf;
  line-height: 1.15;
}

.sh-mini-sub {
  font-size: 12.5px;
  color: #8f9ba0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sh-mini-plus {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  border-radius: 2px !important;
  font-family: var(--font-display) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  padding: 0 !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid rgba(196, 178, 138, 0.35) !important;
  background: linear-gradient(180deg, rgba(44, 52, 55, 0.85), rgba(18, 20, 24, 0.95)) !important;
  color: #9ba4a8 !important;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.12s ease !important;
}

.sh-mini-plus.ready {
  border-color: #e6c687 !important;
  color: #f6dfa0 !important;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(176, 146, 82, 0.38) 0%, rgba(44, 38, 24, 0.88) 70%, rgba(18, 20, 24, 0.96) 100%) !important;
  box-shadow: 0 0 10px rgba(212, 175, 106, 0.28), inset 0 0 8px rgba(212, 175, 106, 0.16) !important;
  cursor: pointer !important;
}

.sh-mini-plus.ready:hover {
  border-color: #fde68a !important;
  color: #fff6d6 !important;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.48), inset 0 0 10px rgba(251, 191, 36, 0.25) !important;
  transform: translateY(-1px);
}

.sh-mini-plus:disabled {
  opacity: 0.42 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

.sh-mini-max {
  font-size: 13px;
  color: #86efac;
  font-weight: 700;
}

.sh-rf-rm-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.sh-rf-rm-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 2px;
  padding: 9px 10px;
  border-radius: 2px;
  border: 1.5px solid rgba(230, 198, 135, 0.65);
  background:
    radial-gradient(ellipse at 50% 30%, rgba(176, 146, 82, 0.28) 0%, rgba(32, 36, 39, 0.92) 72%, rgba(16, 18, 22, 0.97) 100%);
  box-shadow: 0 0 14px rgba(212, 175, 106, 0.16), inset 0 1px 0 rgba(255, 245, 220, 0.08);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.sh-rf-rm-card:hover {
  border-color: #fde68a;
  box-shadow: 0 0 18px rgba(212, 175, 106, 0.3);
}

.sh-rf-rm-card.is-rm {
  border-color: rgba(147, 197, 253, 0.62);
  background:
    radial-gradient(ellipse at 50% 30%, rgba(96, 165, 250, 0.24) 0%, rgba(28, 34, 42, 0.92) 72%, rgba(15, 18, 24, 0.97) 100%);
  box-shadow: 0 0 14px rgba(96, 165, 250, 0.16), inset 0 1px 0 rgba(219, 234, 254, 0.08);
}

.sh-rf-rm-card.is-rm:hover {
  border-color: #93c5fd;
  box-shadow: 0 0 18px rgba(96, 165, 250, 0.32);
}

.sh-rf-rm-lbl {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: #e4d8be;
}

.sh-rf-rm-val {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 700;
  color: #f6dfa0;
  line-height: 1.1;
}

.sh-rf-rm-card.is-rm .sh-rf-rm-val {
  color: #bfdbfe;
}

.sh-res-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin-top: 4px;
}

.sh-res-chip {
  font-size: 13px;
  padding: 2px 7px;
  border-radius: 2px;
  color: #d8ccb2;
  border: 1px solid rgba(196, 178, 138, 0.3);
  background: linear-gradient(90deg, rgba(44, 52, 55, 0.72), rgba(18, 20, 24, 0.9));
}

.sh-crest-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.sh-crest-diamond {
  width: 72px;
  height: 72px;
  transform: rotate(45deg);
  margin: 10px 0 18px;
  border: 1.5px solid rgba(220, 186, 116, 0.82);
  background: radial-gradient(circle, rgba(64, 48, 26, 0.9) 0%, rgba(16, 12, 10, 0.98) 76%);
  box-shadow: 0 0 22px rgba(218, 176, 94, 0.34), inset 0 0 12px rgba(242, 214, 146, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.sh-crest-diamond::after {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(220, 186, 116, 0.36);
  pointer-events: none;
}

.sh-crest-diamond img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  transform: rotate(-45deg);
  filter: drop-shadow(0 0 8px rgba(242, 206, 126, 0.65));
}

.sh-class-sub {
  font-family: var(--font-display);
  font-size: 13.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(212, 196, 166, 0.78);
}

.sh-hero-name {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.08em;
  color: #f3dfb3;
  margin: 4px 0 2px;
  text-transform: none;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9), 0 0 18px rgba(220, 182, 104, 0.25);
}

.sh-culture-sub {
  font-size: 13px;
  color: var(--text-muted);
}

.sh-level-block {
  margin-top: 14px;
}

.sh-pe-highlight-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 6px;
}

.sh-pe-highlight-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 2px;
  padding: 9px 8px;
  border-radius: 3px;
  border: 1.5px solid rgba(230, 198, 135, 0.65);
  background:
    radial-gradient(ellipse at 50% 25%, rgba(196, 158, 82, 0.30) 0%, rgba(30, 32, 36, 0.94) 72%, rgba(15, 16, 20, 0.98) 100%);
  box-shadow: 0 0 14px rgba(212, 175, 106, 0.18), inset 0 1px 0 rgba(255, 245, 220, 0.12);
  cursor: help;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.sh-pe-highlight-card:hover {
  border-color: #fde68a;
  box-shadow: 0 0 20px rgba(212, 175, 106, 0.34);
  transform: translateY(-1px);
}

.sh-pe-highlight-card.is-pe-free {
  border-color: rgba(192, 132, 252, 0.65);
  background:
    radial-gradient(ellipse at 50% 25%, rgba(168, 85, 247, 0.28) 0%, rgba(30, 24, 42, 0.94) 72%, rgba(15, 14, 22, 0.98) 100%);
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.2), inset 0 1px 0 rgba(233, 213, 255, 0.12);
}

.sh-pe-highlight-card.is-pe-free.has-free {
  border-color: #d8b4fe;
  box-shadow: 0 0 18px rgba(192, 132, 252, 0.42), inset 0 0 12px rgba(192, 132, 252, 0.18);
}

.sh-pe-highlight-card.is-pe-free:hover {
  border-color: #e9d5ff;
  box-shadow: 0 0 22px rgba(192, 132, 252, 0.48);
}

.sh-pe-hl-lbl {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e6dcc6;
}

.sh-pe-highlight-card.is-pe-free .sh-pe-hl-lbl {
  color: #e9d5ff;
}

.sh-pe-hl-val {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 700;
  line-height: 1.08;
  color: #f6dfa0;
  text-shadow: 0 0 12px rgba(246, 223, 160, 0.35);
}

.sh-pe-highlight-card.is-pe-free .sh-pe-hl-val {
  color: #f3e8ff;
  text-shadow: 0 0 14px rgba(192, 132, 252, 0.55);
}

.sh-pe-hl-sub {
  font-family: var(--font-body);
  font-size: 13px;
  color: #b8afa0;
  line-height: 1.15;
}

.sh-pe-highlight-card.is-pe-free.has-free .sh-pe-hl-sub {
  color: #d8b4fe;
  font-weight: 600;
}

.sh-level-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}

.sh-lv-label {
  font-family: var(--font-display);
  font-size: 14px;
  color: #d7c39a;
  letter-spacing: 0.06em;
}

.sh-lv-label strong {
  font-size: 21px;
  color: #f7e4b5;
}

.sh-lv-xp {
  font-size: 13.5px;
  color: #b7a483;
  font-variant-numeric: tabular-nums;
}

.sh-xp-track {
  position: relative;
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: visible;
}

.sh-xp-fill {
  position: relative;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #68845a 0%, #c8ad68 62%, #fff1c2 100%);
  box-shadow: 0 0 10px rgba(235, 204, 126, 0.55);
  transition: width 0.35s ease;
}

.sh-xp-flare {
  position: absolute;
  right: -4px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: #fff7db;
  box-shadow: 0 0 12px 3px rgba(255, 232, 156, 0.92);
}

.sh-pe-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
  font-size: 13.5px;
}

.sh-divider {
  height: 1px;
  margin: 14px 0 10px;
  background: linear-gradient(90deg, transparent, rgba(208, 178, 118, 0.42), transparent);
}

.sh-stat-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sh-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(44, 52, 55, 0.72) 0%, rgba(24, 28, 32, 0.84) 70%, rgba(16, 18, 22, 0.92) 100%);
  border: 1px solid rgba(196, 178, 138, 0.24);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.sh-stat-row:hover {
  border-color: rgba(230, 198, 135, 0.65);
  background: linear-gradient(90deg, rgba(84, 70, 44, 0.55) 0%, rgba(34, 36, 38, 0.9) 68%, rgba(18, 20, 24, 0.95) 100%);
}

.sh-stat-row:hover {
  background: rgba(212, 176, 100, 0.08);
  border-color: rgba(212, 176, 100, 0.25);
}

.sh-stat-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 13.5px;
  letter-spacing: 0.08em;
  color: #d6c5a3;
}

.sh-stat-ico {
  font-size: 14px;
  width: 18px;
  text-align: center;
}

.sh-stat-arch {
  font-family: var(--font-body);
  font-style: normal;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0;
}

.sh-stat-right {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.sh-stat-val {
  font-family: var(--font-display);
  font-size: 14.5px;
  color: #f4e2b8;
  font-variant-numeric: tabular-nums;
}

.sh-plus-btn {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1px solid rgba(204, 174, 114, 0.3);
  background: rgba(18, 15, 14, 0.9);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.sh-plus-btn.ready {
  border-color: #eab308;
  color: #fde68a;
  background: rgba(120, 82, 20, 0.45);
}

.sh-plus-btn.ready:hover {
  background: rgba(202, 138, 4, 0.65);
  color: #fff;
}

.sh-plus-btn:disabled {
  opacity: 0.42;
  cursor: default;
}

.sh-left-foot {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(204, 174, 114, 0.16);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sh-ench-strip {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.sh-ench-strip strong {
  color: var(--gold);
}

/* --- COLUNA CENTRAL: RETRATO COMPLETO SEM CORTES + ANEL DOURADO AMPLO + 10 SLOTS SOBREPOSTOS --- */
.sh-center-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 940px;
  padding: 10px 8px;
  overflow: visible;
  z-index: 1;
}

.sh-center-aura {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 168, 86, 0.22) 0%, rgba(132, 92, 38, 0.08) 52%, transparent 74%);
  pointer-events: none;
  z-index: 1;
}

.sh-arcane-ring {
  position: absolute;
  width: 556px;
  height: 556px;
  max-width: calc(100% - 48px);
  border-radius: 50%;
  border: 1.5px solid rgba(226, 190, 116, 0.64);
  box-shadow:
    0 0 24px rgba(222, 180, 96, 0.24),
    inset 0 0 28px rgba(222, 180, 96, 0.14);
  pointer-events: none;
  z-index: 1;
}

.sh-arcane-ring-inner {
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  border: 1px dashed rgba(212, 178, 114, 0.24);
}

.sh-hero-figure {
  position: relative;
  z-index: 2;
  width: 100%;
  height: clamp(360px, 60vh, 620px);
  margin: 0 auto;
  transform: translateY(-6px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.sh-hero-figure-img,
.sh-hero-figure.is-custom .sh-hero-figure-img {
  height: 100%;
  width: auto;
  max-height: 100%;
  max-width: 92%;
  object-fit: contain;
  object-position: center center;
  border-radius: 0 !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
  clip-path: none !important;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.92));
  display: block;
  flex-shrink: 0;
  pointer-events: none;
}

.sh-crest-heroes-btn {
  margin: 0 auto 10px;
  min-width: 158px;
  justify-content: center;
}

.sh-portrait-actions {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 8;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.sh-portrait-upload-btn,
.sh-portrait-reset-btn {
  padding: 6px 14px;
  border-radius: 99px;
  background: rgba(12, 10, 10, 0.92);
  border: 1px solid rgba(218, 184, 114, 0.58);
  color: #f3dfb3;
  font-size: 13.5px;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  cursor: pointer;
  white-space: nowrap;
  opacity: 0.9;
  transition: opacity 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.sh-portrait-upload-btn:hover,
.sh-portrait-reset-btn:hover {
  opacity: 1;
  border-color: #fde68a;
  background: rgba(46, 34, 18, 0.96);
}

.sh-ring-slots-layer {
  position: absolute;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  width: min(760px, 100%);
  height: clamp(410px, 64vh, 580px);
  z-index: 6;
  pointer-events: none;
}

.sh-ring-slot {
  position: absolute;
  transform: translateY(-50%);
  pointer-events: auto;
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  transition: transform 0.16s ease;
}

.sh-ring-slot.empty {
  cursor: default;
}

.sh-ring-slot:hover {
  transform: translateY(-50%) scale(1.08);
  z-index: 8;
}

.sh-ring-medallion {
  width: clamp(64px, 9.2vh, 92px);
  height: clamp(64px, 9.2vh, 92px);
  border-radius: 50%;
  padding: 0;
  background: radial-gradient(circle at 35% 30%, rgba(34, 30, 28, 0.96) 0%, rgba(11, 10, 12, 0.98) 76%);
  border: 2px solid rgba(196, 168, 114, 0.62);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.88), inset 0 0 14px rgba(0, 0, 0, 0.86);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.sh-ring-slot.occupied .sh-ring-medallion {
  border-color: var(--slot-rar, #d8b56c);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.9),
    0 0 16px rgba(var(--rar-rgb, 216, 181, 108), 0.5),
    inset 0 0 14px rgba(var(--rar-rgb, 216, 181, 108), 0.24);
}

.sh-ring-medallion img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.sh-ring-medallion .custom-ui-icon.cui-slot {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.sh-ring-glyph {
  width: 100%;
  height: 100%;
  font-size: 46px;
  opacity: 0.48;
  filter: grayscale(0.32);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sh-ring-glyph.is-img {
  width: 100%;
  height: 100%;
  opacity: 0.66;
  filter: saturate(0.8) drop-shadow(0 0 6px rgba(0, 0, 0, 0.82));
}

.sh-ring-slot-tag {
  font-family: var(--font-display);
  font-size: clamp(10.5px, 1.35vh, 13px);
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-transform: uppercase;
  color: #dfd0b0;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 1px 4px;
  border-radius: 0;
  white-space: nowrap;
  text-shadow: 0 2px 6px #000, 0 0 10px rgba(0, 0, 0, 0.96);
}

.sh-ring-slot.occupied .sh-ring-slot-tag {
  color: var(--slot-rar, #f4e2b8);
  background: transparent;
  border: none;
}

/* --- COLUNA DIREITA: INVENTÁRIO --- */
.sh-inv-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(16, 14, 15, 0.96) 0%, rgba(9, 8, 10, 0.98) 100%);
  border: 1px solid rgba(204, 174, 114, 0.36);
  border-radius: 8px;
  padding: 14px 14px 12px;
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.08), 0 10px 28px rgba(0, 0, 0, 0.72);
  z-index: 7;
}

.sh-inv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(204, 174, 114, 0.22);
}

.sh-inv-header h3 {
  font-size: 15.5px;
  letter-spacing: 0.2em;
  margin: 0;
  color: #e9d7b0;
}

.sh-inv-po {
  font-family: var(--font-display);
  font-size: 13.5px;
  color: var(--gold-bright);
  padding: 3px 9px;
  border-radius: 4px;
  background: rgba(212, 175, 92, 0.1);
  border: 1px solid rgba(212, 175, 92, 0.36);
}

.sh-inv-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(204, 174, 114, 0.16);
  padding-bottom: 8px;
}

.sh-inv-tab {
  height: 58px;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: 2px solid transparent;
  border-radius: 4px 4px 0 0;
  color: var(--text-muted);
  font-size: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sh-inv-tab .custom-ui-icon {
  width: 44px;
  height: 44px;
}

.sh-inv-tab:hover {
  color: var(--gold-bright);
  background: rgba(212, 176, 100, 0.08);
}

.sh-inv-tab.active {
  color: #fde68a;
  background: rgba(212, 176, 100, 0.14);
  border-bottom-color: #e6c274;
}

.sh-inv-rar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}

.sh-inv-rar-row .inv-rar-filter-btn {
  padding: 3px 9px;
  font-size: 13px;
}

/* Grade 10 boxes horizontais × 5 fileiras visíveis com ícones completos e sem cortes */
.sh-inv-grid {
  --inv-cell-h: 68px;
  --inv-gap: 7px;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  grid-auto-rows: var(--inv-cell-h);
  gap: var(--inv-gap);
  max-height: calc(5 * var(--inv-cell-h) + 4 * var(--inv-gap) + 6px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 5px 2px 2px;
  margin-bottom: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(208, 178, 118, 0.55) rgba(12, 10, 12, 0.65);
}

.sh-inv-grid::-webkit-scrollbar {
  width: 7px;
}

.sh-inv-grid::-webkit-scrollbar-track {
  background: rgba(12, 10, 12, 0.72);
  border-radius: 99px;
}

.sh-inv-grid::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(214, 182, 114, 0.65), rgba(154, 122, 68, 0.65));
  border-radius: 99px;
  border: 1px solid rgba(10, 8, 10, 0.6);
}

.sh-inv-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: auto;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  padding: 4px;
  border-radius: 6px;
  background: radial-gradient(circle at 50% 42%, rgba(28, 24, 24, 0.92) 0%, rgba(12, 10, 12, 0.96) 100%);
  border: 1px solid rgba(196, 178, 138, 0.18);
  box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.78);
  transition: transform 0.14s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.sh-inv-cell.filled {
  border-color: rgba(var(--rar-rgb, 198, 178, 137), 0.55);
}

.sh-inv-cell.filled:hover {
  transform: translateY(-2px) scale(1.03);
  border-color: var(--slot-rar, #e7c980);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.8), 0 0 12px rgba(var(--rar-rgb, 218, 184, 114), 0.42);
  z-index: 3;
}

.sh-inv-cell img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.85));
}

.sh-inv-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(204, 174, 114, 0.22);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sh-cap-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  color: #c7b595;
}

.sh-cap-track {
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.sh-cap-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #9d824b, #e7c980);
  box-shadow: 0 0 8px rgba(231, 201, 128, 0.45);
}

/* Barra de Botões Aprimorada abaixo do Inventário */
.sh-inv-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 2px;
}

.sh-act-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 11px;
  border-radius: 7px;
  border: 1px solid rgba(204, 174, 114, 0.34);
  background: linear-gradient(180deg, rgba(32, 27, 25, 0.94) 0%, rgba(16, 13, 14, 0.98) 100%);
  color: #efe3c8;
  text-align: center;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 240, 205, 0.09), 0 4px 12px rgba(0, 0, 0, 0.52);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
  min-width: 0;
}

.sh-act-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(238, 204, 128, 0.85);
  background: linear-gradient(180deg, rgba(48, 39, 31, 0.96) 0%, rgba(22, 18, 16, 0.98) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 244, 210, 0.16), 0 6px 18px rgba(0, 0, 0, 0.72), 0 0 14px rgba(218, 180, 96, 0.22);
}

.sh-act-btn:active:not(:disabled) {
  transform: translateY(0);
}

.sh-act-btn:disabled {
  opacity: 0.44;
  cursor: not-allowed;
  filter: grayscale(0.45);
}

.sh-act-btn.is-gold {
  border-color: rgba(232, 192, 102, 0.56);
  background: linear-gradient(180deg, rgba(58, 43, 21, 0.92) 0%, rgba(24, 18, 12, 0.98) 100%);
}

.sh-act-btn.is-amber {
  border-color: rgba(217, 138, 66, 0.48);
  background: linear-gradient(180deg, rgba(48, 30, 20, 0.92) 0%, rgba(20, 14, 12, 0.98) 100%);
}

.sh-act-btn.is-emerald {
  border-color: rgba(74, 198, 128, 0.45);
  background: linear-gradient(180deg, rgba(20, 44, 34, 0.92) 0%, rgba(11, 20, 16, 0.98) 100%);
}

.sh-act-btn.is-arcane {
  border-color: rgba(168, 118, 245, 0.5);
  background: linear-gradient(180deg, rgba(40, 24, 58, 0.92) 0%, rgba(17, 12, 24, 0.98) 100%);
}

.sh-act-btn.is-crimson {
  border-color: rgba(214, 88, 88, 0.45);
  background: linear-gradient(180deg, rgba(48, 20, 22, 0.92) 0%, rgba(20, 11, 13, 0.98) 100%);
}

.sh-act-ico {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: rgba(8, 7, 9, 0.74);
  border: 1px solid rgba(212, 182, 118, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.72);
}

.sh-act-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.sh-act-text strong {
  font-family: var(--font-display);
  font-size: 13.5px;
  letter-spacing: 0.05em;
  color: #f6e4bc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sh-act-text small {
  font-size: 13px;
  color: #b4a388;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* Responsivo para telas médias e pequenas */
@media (max-width: 1220px) {
  .sh-showcase {
    grid-template-columns: minmax(320px, 380px) 1fr;
  }
  .sh-right-pericias-col {
    grid-column: 1 / -1;
  }
  .sh-ring-slots-layer {
    width: min(720px, 98%);
    height: 590px;
  }
  .sh-arcane-ring {
    width: 536px;
    height: 536px;
  }
  .sh-ring-medallion {
    width: 94px;
    height: 94px;
  }
  .sh-ring-medallion .custom-ui-icon.cui-slot {
    width: 100%;
    height: 100%;
  }
  .sh-inv-panel {
    grid-column: 1 / -1;
  }
  .sh-inv-grid {
    --inv-cell-h: 68px;
    --inv-gap: 6px;
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }
  .sh-inv-actions {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 1040px) {
  .sh-inv-grid {
    --inv-cell-h: 66px;
    --inv-gap: 6px;
  }
  .sh-inv-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .sh-showcase {
    grid-template-columns: 1fr;
    padding: 16px;
  }
  .sh-center-stage {
    min-height: 490px;
  }
  .sh-arcane-ring {
    width: 350px;
    height: 350px;
  }
  .sh-ring-slots-layer {
    width: 390px;
    height: 410px;
  }
  .sh-ring-medallion {
    width: 60px;
    height: 60px;
  }
  .sh-inv-grid {
    --inv-cell-h: 58px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .sh-inv-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ==================== REFORÇO GLOBAL DE LEGIBILIDADE (TEXTOS E NÚMEROS MENORES) ==================== */
.small {
  font-size: 17px;
  line-height: 1.52;
}

.tag,
.status-pill,
.elem-pill {
  font-size: 14px;
  padding: 4px 11px;
  line-height: 1.3;
}

.btn-sm {
  font-size: 14.5px;
}

.btn-xs {
  font-size: 13.8px;
  padding: 6px 12px;
}

.subtab {
  font-size: 14.5px;
}

.hud-pill {
  font-size: 14.5px;
}

.stat-box .lbl {
  font-size: 13.8px;
}

.stat-box .val {
  font-size: 26px;
}

.stat-box .sub {
  font-size: 15.5px;
}

.inv-qty-badge,
.inv-slot-badge {
  font-size: 13.5px;
  font-weight: 700;
  padding: 2px 5px;
  line-height: 1.15;
}

.inv-rar-filter-btn,
.sh-inv-rar-row .inv-rar-filter-btn {
  font-size: 13.5px;
  padding: 3px 9px;
}

.sh-class-sub {
  font-size: 13.5px;
}

.sh-culture-sub {
  font-size: 14.5px;
}

.sh-lv-label {
  font-size: 15.5px;
}

.sh-lv-label strong {
  font-size: 23px;
}

.sh-lv-xp {
  font-size: 14px;
  font-weight: 600;
}

.sh-pe-meta {
  font-size: 14px;
}

.sh-stat-name {
  font-size: 13.8px;
}

.sh-stat-arch {
  font-size: 13px;
}

.sh-stat-val {
  font-size: 16.5px;
}

.sh-ench-strip {
  font-size: 13.5px;
}

.sh-inv-po {
  font-size: 15px;
}

.sh-cap-row {
  font-size: 14px;
}

.sh-act-text strong {
  font-size: 13.8px;
}

.sh-act-text small {
  font-size: 13.5px;
}

.sic-title {
  font-size: 15.5px;
}

.sic-sub {
  font-size: 13.8px;
}

.sic-badges .tag {
  font-size: 13.5px;
}

.sic-desc {
  font-size: 14.8px;
}

.sic-price-main {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.04em;
  color: var(--gold-bright);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
}

.sic-price-old,
.sic-price-mod,
.sic-price-sub {
  font-size: 13.2px;
}

.wc-top-row,
.wc-date {
  font-size: 14px;
}

.wc-time {
  font-size: 14.8px;
}

.wc-era {
  font-size: 13.5px;
}

.tt-meta {
  font-size: 15.5px;
}

.tt-stat-lbl,
.tt-stat-val {
  font-size: 16.5px;
}

.tt-footer,
.tt-hint {
  font-size: 15px;
}

.tt-top-tag {
  font-size: 13.5px;
}

.cv-enemy-hp-txt,
.cv-side-chip,
.cv-hp-label,
.cv-vig-label,
.cv-hotkey-cap {
  font-size: 13px;
}

.travel-metric,
.pe-history-table td,
.pe-history-table th {
  font-size: 15px;
}

/* ==================== CARDS DE FORJA & ALQUIMIA: BOTÕES CENTRALIZADOS ABAIXO ==================== */
.sic-craft-card .sic-foot {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 11px;
  padding-top: 13px;
}

.sic-craft-card .sic-price {
  align-items: center;
  text-align: center;
  width: 100%;
}

.sic-craft-card .sic-price-main {
  justify-content: center;
}

.sic-craft-card .sic-actions {
  width: 100%;
  justify-content: center;
  gap: 10px;
}

.sic-craft-card .sic-actions .btn {
  min-width: 122px;
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 5px;
  letter-spacing: 0.06em;
  box-shadow: inset 0 1px 0 rgba(255, 245, 215, 0.14), 0 4px 12px rgba(0, 0, 0, 0.55);
}

.sic-craft-card .sic-actions .btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 248, 224, 0.22), 0 6px 16px rgba(0, 0, 0, 0.72), 0 0 14px rgba(218, 184, 108, 0.25);
}

/* ==================== SLOTS VAZIOS DA FICHA EM CINZA ENQUANTO SEM EQUIPAMENTO ==================== */
.sh-ring-slot.empty .sh-ring-medallion {
  background: radial-gradient(circle at 35% 30%, rgba(56, 59, 66, 0.92) 0%, rgba(24, 26, 30, 0.97) 78%);
  border-color: rgba(142, 148, 160, 0.42);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.8), inset 0 0 14px rgba(0, 0, 0, 0.72);
}

.sh-ring-slot.empty .sh-ring-glyph,
.sh-ring-slot.empty .sh-ring-glyph img {
  filter: grayscale(1) brightness(0.76) contrast(0.95);
  opacity: 0.54;
}

.sh-ring-slot.empty .sh-ring-slot-tag {
  color: #9ca3af;
  background: transparent;
  border: none;
  box-shadow: none;
}

.sh-ring-slot.empty:hover .sh-ring-medallion {
  border-color: rgba(176, 182, 194, 0.62);
}

/* ==================== MELHORIA DE TEXTO FLUTUANTE SEM CONTORNO EM COMBATE ==================== */
.cv-enemy-hp-txt {
  text-shadow: 0 2px 5px #000, 0 0 8px rgba(0, 0, 0, 0.96);
}

.cv-dock-tag {
  font-size: 12.5px;
  padding: 1px 5px;
}

/* ==================== FORJAR ENCANTAMENTOS: AVATAR + 10 SLOTS NO ANEL + BARRA LATERAL ==================== */
.forja-enchant-showcase {
  position: relative;
  display: grid;
  grid-template-columns: minmax(580px, 1.15fr) minmax(520px, 680px);
  gap: 20px;
  padding: 22px 24px;
  border-radius: 10px;
  background:
    radial-gradient(ellipse 46% 58% at 32% 48%, rgba(138, 102, 48, 0.24) 0%, rgba(44, 32, 20, 0.16) 44%, transparent 74%),
    linear-gradient(180deg, rgba(16, 13, 12, 0.96) 0%, rgba(9, 8, 9, 0.98) 100%);
  border: 1px solid rgba(204, 174, 114, 0.42);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.78), 0 14px 38px rgba(0, 0, 0, 0.85);
  overflow: visible;
  min-height: 960px;
}

.forja-enchant-showcase .sh-ring-slot {
  cursor: pointer;
}

.forja-enchant-showcase .sh-ring-slot.is-selected-slot .sh-ring-medallion {
  border-color: #fde047 !important;
  box-shadow:
    0 0 0 3px rgba(253, 224, 71, 0.42),
    0 0 24px rgba(250, 204, 21, 0.75),
    inset 0 0 16px rgba(250, 204, 21, 0.32) !important;
  transform: scale(1.06);
}

.forja-enchant-showcase .sh-ring-slot.is-selected-slot .sh-ring-slot-tag {
  color: #fde047 !important;
  font-weight: 700;
}

.sh-ring-ench-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 6;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle, #a855f7 0%, #581c87 100%);
  border: 1.5px solid #f3e8ff;
  color: #fff;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.85), 0 0 10px rgba(168, 85, 247, 0.75);
}

.forja-enchant-sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(16, 14, 15, 0.96) 0%, rgba(9, 8, 10, 0.98) 100%);
  border: 1px solid rgba(204, 174, 114, 0.38);
  border-radius: 8px;
  padding: 16px 16px 14px;
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.08), 0 10px 28px rgba(0, 0, 0, 0.75);
  z-index: 7;
  height: 940px;
  max-height: 940px;
}

.forja-enchant-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
  margin-top: 10px;
}

.forja-enchant-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 7px;
  background:
    radial-gradient(ellipse 95% 55% at 50% 0%, rgba(var(--rar-rgb, 196, 178, 138), 0.18), transparent 75%),
    linear-gradient(180deg, rgba(22, 19, 20, 0.94) 0%, rgba(11, 10, 13, 0.97) 100%);
  border: 1px solid rgba(var(--rar-rgb, 196, 178, 138), 0.38);
  box-shadow:
    inset 0 1px 0 rgba(var(--rar-rgb, 196, 178, 138), 0.14),
    0 6px 16px rgba(0, 0, 0, 0.65);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.forja-enchant-item:hover {
  border-color: var(--slot-rar, rgba(218, 188, 120, 0.72));
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.78),
    0 0 16px rgba(var(--rar-rgb, 218, 188, 120), 0.24);
}

.forja-enchant-item.is-active-ench {
  border-color: #22c55e;
  box-shadow:
    0 0 14px rgba(34, 197, 94, 0.28),
    inset 0 0 12px rgba(34, 197, 94, 0.14);
}

@media (max-width: 1180px) {
  .forja-enchant-showcase {
    grid-template-columns: 1fr;
  }
  .forja-enchant-sidebar {
    max-height: none;
  }
}

/* ==================== CRIAÇÃO DE PERSONAGEM ESTILO RPG CLÁSSICO & 4 SLOTS DE SAVE ==================== */
.cr-slots-panel {
  padding: 14px 18px;
}

.cr-slots-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.cr-slot-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(16, 14, 15, 0.94) 0%, rgba(10, 9, 11, 0.98) 100%);
  border: 1px solid rgba(196, 178, 138, 0.28);
  transition: transform 0.16s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.cr-slot-card.is-empty {
  cursor: pointer;
  border-style: dashed;
}

.cr-slot-card:hover {
  transform: translateY(-2px);
  border-color: rgba(235, 212, 158, 0.65);
}

.cr-slot-card.is-target {
  border-color: #fde047 !important;
  box-shadow: 0 0 18px rgba(250, 204, 21, 0.25), inset 0 0 14px rgba(250, 204, 21, 0.12);
}

.cr-slot-card.is-active-hero {
  border-color: rgba(34, 197, 94, 0.65);
}

.cr-slot-empty-body {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
}

.cr-slot-plus {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px dashed rgba(212, 182, 118, 0.5);
  background: rgba(212, 176, 100, 0.08);
  color: var(--gold-bright);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cr-slot-hero-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cr-slot-avatar {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 7px;
  background: radial-gradient(circle, rgba(44, 34, 22, 0.72) 0%, rgba(10, 9, 11, 0.96) 100%);
  border: 1px solid rgba(212, 182, 118, 0.52);
  flex-shrink: 0;
}

.cr-slot-meta {
  min-width: 0;
  flex: 1;
}

.cr-slot-name {
  display: block;
  font-family: var(--font-display);
  font-size: 14.5px;
  color: var(--gold-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cr-slot-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(196, 178, 138, 0.16);
}

/* Início Rápido Minimizável com Ícones Personalizados do Admin */
.cr-quickstart-card {
  padding: 12px 18px;
  border-color: rgba(212, 182, 118, 0.38);
}

.cr-quickstart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.cr-qs-chevron {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(212, 176, 100, 0.14);
  border: 1px solid rgba(212, 176, 100, 0.42);
  color: var(--gold-bright);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cr-preset-icon-frame {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  padding: 4px;
  background: radial-gradient(circle, rgba(52, 40, 24, 0.85) 0%, rgba(12, 10, 12, 0.96) 100%);
  border: 1.5px solid rgba(218, 186, 118, 0.65);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cr-preset-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Layout Três Colunas Estilo RPG Clássico (Resumo Esquerda | Etapas Centro | Preview Direita) */
.cr-classic-rpg-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.cr-rpg-sidebar {
  position: sticky;
  top: 76px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 10px;
  background:
    radial-gradient(ellipse 70% 45% at 50% 24%, rgba(164, 124, 58, 0.24) 0%, transparent 72%),
    linear-gradient(180deg, rgba(18, 15, 14, 0.96) 0%, rgba(9, 8, 10, 0.99) 100%);
  border: 1px solid rgba(214, 184, 118, 0.46);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.82), 0 14px 36px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}

.cr-sidebar-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.cr-sidebar-bg-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 8, 10, 0.14) 0%, rgba(10, 8, 10, 0.58) 46%, rgba(8, 7, 9, 0.9) 100%);
  pointer-events: none;
  z-index: 1;
}

.cr-rpg-sidebar > .cr-portrait-stage,
.cr-rpg-sidebar > .cr-preview-section {
  position: relative;
  z-index: 2;
}

.cr-portrait-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: 280px;
  padding: 12px 10px 10px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid rgba(212, 178, 114, 0.24);
  overflow: visible;
}

.cr-portrait-caption {
  position: relative;
  z-index: 2;
  width: 100%;
  text-align: center;
  padding: 16px 8px 6px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(10, 8, 10, 0) 0%, rgba(10, 8, 10, 0.72) 45%, rgba(8, 7, 9, 0.88) 100%);
}

.cr-preview-name {
  font-family: var(--font-display);
  font-size: 20px;
  color: #f6e4bc;
  margin: 6px 0 2px;
  text-transform: none;
}

.cr-preview-section {
  padding-top: 10px;
  border-top: 1px solid rgba(204, 174, 114, 0.2);
}

.cr-preview-sec-title {
  font-family: var(--font-display);
  font-size: 13.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.cr-preview-attr-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.cr-preview-attr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 6px;
  border-radius: 6px;
  background: rgba(12, 10, 12, 0.88);
  border: 1px solid rgba(204, 174, 114, 0.28);
}

.cr-pa-lbl {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.cr-pa-val {
  font-family: var(--font-display);
  font-size: 22px;
  color: #fef3c7;
  line-height: 1.15;
}

.cr-pa-sub {
  font-size: 13px;
  color: var(--text-muted);
}

.cr-preview-stats-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.cr-pstat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(196, 178, 138, 0.14);
  font-size: 13px;
}

.cr-preview-gear-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cr-pgear-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(12, 10, 12, 0.85);
  border: 1px solid rgba(204, 174, 114, 0.25);
  font-size: 13px;
  color: var(--gold-bright);
}

.cr-pgear-chip img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}

/* Painel Principal de Etapas Estilo RPG Clássico */
.cr-rpg-main {
  padding: 18px 20px;
}

.cr-stepper-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(204, 174, 114, 0.26);
}

.cr-step-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(22, 19, 18, 0.9) 0%, rgba(12, 10, 12, 0.96) 100%);
  border: 1px solid rgba(196, 178, 138, 0.26);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: all 0.16s ease;
}

.cr-step-tab:hover {
  border-color: rgba(235, 212, 158, 0.65);
  transform: translateY(-1px);
}

.cr-step-tab.active {
  border-color: #fde047;
  background: linear-gradient(180deg, rgba(64, 48, 22, 0.92) 0%, rgba(24, 18, 11, 0.98) 100%);
  box-shadow: 0 0 18px rgba(250, 204, 21, 0.22), inset 0 1px 0 rgba(255, 246, 210, 0.25);
}

.cr-step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(12, 10, 12, 0.9);
  border: 1.5px solid rgba(212, 182, 118, 0.55);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-bright);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cr-step-tab.active .cr-step-num {
  border-color: #fde047;
  background: #fde047;
  color: #161108;
}

.cr-step-txt {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cr-step-txt strong {
  font-family: var(--font-display);
  font-size: 13.5px;
  color: var(--gold-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cr-step-txt small {
  font-size: 13.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cr-sec-heading {
  font-size: 16px;
  color: var(--gold-bright);
  margin: 0;
}

.cr-field-label {
  display: block;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--gold-bright);
  margin-bottom: 6px;
}

.cr-choice-card {
  position: relative;
  padding: 14px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(20, 17, 17, 0.94) 0%, rgba(11, 10, 12, 0.98) 100%);
  border: 1px solid rgba(196, 178, 138, 0.25);
  transition: transform 0.15s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.cr-choice-card:hover {
  transform: translateY(-2px);
  border-color: rgba(235, 212, 158, 0.62);
}

.cr-choice-card.selected {
  border-color: #fde047 !important;
  background: linear-gradient(180deg, rgba(54, 40, 20, 0.9) 0%, rgba(18, 14, 10, 0.97) 100%);
  box-shadow: 0 0 18px rgba(250, 204, 21, 0.24), inset 0 0 14px rgba(250, 204, 21, 0.12);
}

.cr-class-card-ico {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 7px;
  background: radial-gradient(circle, rgba(48, 36, 22, 0.82) 0%, rgba(10, 9, 11, 0.96) 100%);
  border: 1px solid rgba(212, 182, 118, 0.55);
  padding: 3px;
  flex-shrink: 0;
}

/* Atributos Mín. 3 • +10 Pontos • Máx. 10 */
.cr-attr-card {
  padding: 14px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(16, 14, 16, 0.95) 0%, rgba(9, 8, 11, 0.98) 100%);
  border: 1px solid rgba(204, 174, 114, 0.34);
}

.cr-attr-stepper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cr-attr-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid rgba(218, 186, 118, 0.55);
  background: rgba(24, 20, 16, 0.95);
  color: #fde68a;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.14s ease;
}

.cr-attr-btn:hover:not(:disabled) {
  background: rgba(120, 82, 20, 0.72);
  border-color: #fde047;
  color: #fff;
}

.cr-attr-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.cr-attr-num-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 44px;
}

.cr-attr-num {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: #fef3c7;
  line-height: 1.05;
}

.cr-attr-subbonus {
  font-size: 13px;
  color: #86efac;
  font-weight: 600;
}

.cr-attr-bar-track {
  height: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.cr-attr-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.2s ease;
}

.cr-arch-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(196, 178, 138, 0.22);
  background: rgba(12, 10, 12, 0.72);
  margin-bottom: 6px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.cr-arch-option.selected {
  border-color: var(--gold);
  background: rgba(58, 44, 22, 0.45);
}

.cr-arch-option input {
  margin-top: 4px;
}

/* Strip e Cards de Equipamento Inicial (Estilo Mercador) */
.cr-selected-loadout-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.cr-loadout-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 7px;
  background: rgba(12, 10, 12, 0.9);
  border: 1px solid rgba(204, 174, 114, 0.34);
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.cr-loadout-pill.active,
.cr-loadout-pill:hover {
  border-color: #fde047;
  background: rgba(48, 36, 18, 0.65);
}

.cr-loadout-pill img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid rgba(212, 182, 118, 0.5);
  background: rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.cr-loadout-pill small {
  display: block;
  font-family: var(--font-display);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.cr-loadout-pill strong {
  display: block;
  font-size: 13.5px;
  color: var(--gold-bright);
}

.cr-equip-card.is-equipped-starter {
  border-color: #fde047 !important;
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.25), inset 0 0 16px rgba(250, 204, 21, 0.1);
}

.cr-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(204, 174, 114, 0.24);
}

@media (max-width: 1280px) {
  .cr-slots-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cr-classic-rpg-layout {
    grid-template-columns: 1fr;
  }
  .cr-rpg-sidebar {
    position: static;
  }
  .cr-stepper-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .cr-slots-grid,
  .cr-stepper-bar,
  .cr-selected-loadout-strip {
    grid-template-columns: 1fr;
  }
}

/* ==================== GALERIA FECHADA DE AVATARES NA FICHA ==================== */
.sh-avatar-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 950;
  background: rgba(4, 3, 6, 0.84);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.sh-avatar-modal {
  width: min(920px, 100%);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.sh-avatar-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 12px;
  overflow-y: auto;
  padding: 4px;
}

.sh-avatar-gallery-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 8px;
  border-radius: 8px;
  background: rgba(14, 12, 16, 0.92);
  border: 1px solid rgba(196, 178, 138, 0.28);
  color: var(--text-main);
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.sh-avatar-gallery-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold-bright);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.65);
}

.sh-avatar-gallery-card.is-selected {
  border-color: #fde047;
  background: rgba(54, 42, 16, 0.55);
  box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.35);
}

.sh-avatar-gallery-card img {
  width: 96px;
  height: 112px;
  object-fit: contain;
}

.sh-avatar-gallery-card span {
  font-size: 13.5px;
  color: var(--gold-bright);
  text-align: center;
}


/* ============================================================================
   TELA DE SLOTS DE PERSONAGENS (QUADTYCH — 4 PILARES)
   ============================================================================ */
.slots-shell {
  position: relative;
  min-height: 100vh;
  width: 100%;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 28px 44px;
  overflow-x: hidden;
  box-sizing: border-box;
}

.slots-bg-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 35%, rgba(10, 9, 12, 0.78), rgba(4, 3, 5, 0.96));
  pointer-events: none;
  z-index: 0;
}

.slots-topbar {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1660px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.slots-header {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 920px;
  margin: 0 auto 18px;
}

.slots-eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 14px;
  letter-spacing: 0.28em;
  color: rgba(203, 184, 144, 0.7);
  margin-bottom: 6px;
}

.slots-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #e6d7b9;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.85);
  margin: 0 0 6px;
}

.slots-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  color: rgba(214, 206, 194, 0.78);
  margin: 0;
}

/* Grade de 4 pilares verticais (+30% de escala visual) */
.slots-quadtych {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1640px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px;
  padding-top: 60px; /* espaço para os medalhões salientes no topo */
  margin: auto 0;
}

.slot-pillar {
  position: relative;
  min-height: 650px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 70px 24px 24px;
  background: #0d0c0e;
  border: 1px solid rgba(168, 134, 76, 0.42);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.78), inset 0 0 28px rgba(0, 0, 0, 0.85);
  transition: transform 0.26s ease, border-color 0.26s ease, box-shadow 0.26s ease;
  overflow: visible;
}

.slot-pillar::before {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(203, 184, 144, 0.16);
  pointer-events: none;
  z-index: 2;
}

.slot-pillar:hover {
  transform: translateY(-5px);
  border-color: rgba(218, 179, 102, 0.78);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.9), 0 0 24px rgba(196, 152, 74, 0.16);
}

.slot-pillar.is-active {
  border-color: rgba(232, 193, 112, 0.75);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.85), 0 0 26px rgba(212, 168, 84, 0.18);
}

.slot-pillar.is-empty {
  cursor: pointer;
}

.slot-pillar.is-empty.is-recommended {
  border-color: rgba(203, 184, 144, 0.55);
}

.slot-pillar-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0.42;
  filter: saturate(0.75) contrast(1.06);
  transition: opacity 0.28s ease, transform 0.45s ease;
  z-index: 0;
}

.slot-pillar-bg.is-avatar-bg {
  background-size: cover;
  background-position: center 22%;
  opacity: 0.52;
  filter: saturate(0.88) contrast(1.08);
}

.slot-pillar.is-empty .slot-pillar-bg {
  opacity: 0.28;
  filter: saturate(0.45) brightness(0.78);
}

.slot-pillar:hover .slot-pillar-bg {
  opacity: 0.56;
  transform: scale(1.02);
}

.slot-pillar-vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(9, 8, 10, 0.95) 0%,
    rgba(11, 10, 12, 0.86) 36%,
    rgba(12, 10, 12, 0.58) 72%,
    rgba(8, 7, 9, 0.94) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.slot-pillar-frame {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background:
    linear-gradient(135deg, rgba(212, 175, 106, 0.28) 0, transparent 18px) top left,
    linear-gradient(225deg, rgba(212, 175, 106, 0.28) 0, transparent 18px) top right,
    linear-gradient(45deg, rgba(212, 175, 106, 0.22) 0, transparent 18px) bottom left,
    linear-gradient(315deg, rgba(212, 175, 106, 0.22) 0, transparent 18px) bottom right;
  background-size: 24px 24px;
  background-repeat: no-repeat;
}

/* Orbe brilhante no canto superior direito (igual ao card ativo da referência) */
.slot-active-orb {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(circle, #a5f3fc 0%, #22d3ee 55%, #0891b2 100%);
  box-shadow: 0 0 10px 3px rgba(34, 211, 238, 0.65);
  z-index: 4;
}

/* Medalhão circular saliente no topo */
.slot-medallion {
  position: absolute;
  top: -47px;
  left: 50%;
  transform: translateX(-50%);
  width: 156px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  pointer-events: none;
  color: #a98e5d;
}

.slot-medallion-laurel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.slot-medallion-ring {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #27221d, #0d0b0c);
  border: 2px solid #8a7043;
  box-shadow: 0 0 0 3px #141112, 0 6px 18px rgba(0, 0, 0, 0.85), inset 0 0 12px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slot-pillar.is-active .slot-medallion-ring {
  border-color: #d4af6a;
  box-shadow: 0 0 0 3px #141112, 0 0 18px rgba(212, 175, 106, 0.45);
}

.slot-medallion-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slot-medallion-img.is-crest {
  width: 78%;
  height: 78%;
  object-fit: contain;
}

.slot-medallion-img.is-dimmed {
  width: 68%;
  height: 68%;
  object-fit: contain;
  opacity: 0.45;
  filter: grayscale(0.65);
}

/* Cabeçalho interno do card */
.slot-pillar-head {
  position: relative;
  z-index: 3;
  text-align: center;
}

.slot-pillar-kicker {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: rgba(203, 184, 144, 0.72);
  margin-bottom: 6px;
}

.slot-pillar-title {
  font-family: 'Cinzel', serif;
  font-size: 23.5px;
  font-weight: 600;
  color: #efe5d0;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot-pillar.is-empty .slot-pillar-title {
  color: #b7ab94;
}

.slot-pillar-divider {
  height: 1px;
  width: 82%;
  margin: 12px auto 14px;
  background: linear-gradient(90deg, transparent, rgba(203, 184, 144, 0.48), transparent);
}

.slot-pillar-desc {
  font-family: 'Cormorant Garamond', serif;
  font-size: 19.5px;
  line-height: 1.4;
  color: rgba(216, 208, 196, 0.82);
  margin: 0;
  min-height: 54px;
}

/* Metadados de personagem salvo (Localização, Vitalidade, Riqueza) */
.slot-pillar-meta {
  position: relative;
  z-index: 3;
  margin: 18px 0;
  padding: 14px 16px;
  background: rgba(8, 7, 9, 0.68);
  border: 1px solid rgba(203, 184, 144, 0.16);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.slot-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 20px;
}

.slot-meta-label {
  color: rgba(206, 196, 178, 0.82);
  font-size: 19px;
}

.slot-meta-value {
  color: #efe5d0;
  font-size: 20px;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot-meta-value.is-stat {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.slot-status-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

/* Correntes e cadeado em slots vazios */
.slot-chains-overlay {
  position: relative;
  z-index: 3;
  margin: 8px -24px 0;
  height: 228px;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.25s ease, transform 0.25s ease;
}

.slot-chains-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.slot-pillar.is-empty:hover .slot-chains-overlay {
  filter: drop-shadow(0 0 10px rgba(212, 175, 106, 0.35));
  transform: scale(1.02);
}

/* Rodapé de ações */
.slot-pillar-footer {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid rgba(203, 184, 144, 0.16);
}

.slot-action-btn {
  width: 100%;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-size: 15.5px;
  padding: 10px 16px;
  letter-spacing: 0.05em;
}

.slot-secondary-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.slot-delete-btn {
  border-color: rgba(220, 38, 38, 0.45);
  color: #fca5a5;
  font-size: 13.5px;
  padding: 6px 12px;
}

.slot-delete-btn:hover {
  border-color: #ef4444;
  background: rgba(127, 29, 29, 0.45);
}

@media (max-width: 1100px) {
  .slots-quadtych {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 54px 20px;
  }
}

@media (max-width: 620px) {
  .slots-shell {
    padding: 14px 14px 32px;
  }
  .slots-quadtych {
    grid-template-columns: 1fr;
    gap: 52px;
  }
  .slot-pillar {
    min-height: 440px;
  }
}


/* ============================================================================
   CARDS DE CULTURA, CLASSE E CAMINHO + BARRA LATERAL DIREITA DE PREVIEW
   ============================================================================ */
.cr-showcase-grid {
  gap: 16px !important;
}

.cr-showcase-card {
  position: relative;
  overflow: hidden;
  padding: 0 !important;
  min-height: 215px;
  display: flex;
  flex-direction: column;
  background: #0d0b0e;
  border: 1px solid rgba(178, 146, 86, 0.36);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.cr-showcase-card.is-compact {
  min-height: 175px;
}

.cr-showcase-card:hover {
  transform: translateY(-3px);
  border-color: rgba(218, 179, 102, 0.72);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.72);
}

.cr-showcase-card.selected {
  border-color: #eab308;
  box-shadow: 0 0 0 1px rgba(234, 179, 8, 0.45), 0 14px 30px rgba(0, 0, 0, 0.8);
}

.cr-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 22%;
  opacity: 0.34;
  filter: saturate(0.8) contrast(1.05);
  transition: opacity 0.25s ease, transform 0.35s ease;
  z-index: 0;
}

.cr-card-bg.is-class-bg {
  background-position: center 15%;
  opacity: 0.44;
}

.cr-showcase-card:hover .cr-card-bg,
.cr-showcase-card.selected .cr-card-bg {
  opacity: 0.5;
  transform: scale(1.03);
}

.cr-card-bg-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 9, 12, 0.84) 0%,
    rgba(10, 9, 12, 0.62) 45%,
    rgba(8, 7, 10, 0.94) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.cr-card-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 16px;
  flex: 1;
}

.cr-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cr-card-title {
  font-family: 'Cinzel', serif;
  font-size: 16px;
  color: var(--gold-bright);
  letter-spacing: 0.03em;
}

.cr-showcase-card.selected .cr-card-title {
  color: #fde68a;
}

.cr-card-benefits-center {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
  padding: 10px 10px;
  background: rgba(8, 7, 10, 0.72);
  border-top: 1px solid rgba(203, 184, 144, 0.22);
  border-bottom: 1px solid rgba(203, 184, 144, 0.22);
  border-radius: 6px;
}

.cr-card-desc-bottom {
  margin: 0;
  font-size: 13px;
  line-height: 1.48;
  color: rgba(226, 218, 206, 0.85);
}

/* Barra Lateral Direita de Preview (Estilo Imagem de Referência) */
.cr-right-preview-sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 16px;
  border-radius: 10px;
  background:
    radial-gradient(ellipse 80% 35% at 50% 8%, rgba(180, 140, 68, 0.22) 0%, transparent 72%),
    linear-gradient(180deg, rgba(16, 14, 15, 0.97) 0%, rgba(8, 7, 9, 0.99) 100%);
  border: 1px solid rgba(214, 184, 118, 0.44);
  box-shadow: inset 0 0 36px rgba(0, 0, 0, 0.82), 0 14px 36px rgba(0, 0, 0, 0.85);
}

.cr-right-emblem-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(203, 184, 144, 0.22);
}

.cr-right-emblem-glow {
  position: absolute;
  top: -8px;
  width: 124px;
  height: 124px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 92, 0.34) 0%, transparent 70%);
  pointer-events: none;
}

.cr-right-emblem-ring {
  position: relative;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #2b2318, #0c0a0b);
  border: 2px solid #c9a45c;
  box-shadow: 0 0 0 4px rgba(18, 15, 13, 0.95), 0 0 20px rgba(201, 164, 92, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 10px;
}

.cr-right-emblem-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cr-right-emblem-emoji {
  font-size: 36px;
}

.cr-right-title {
  font-family: 'Cinzel', serif;
  font-size: 20px;
  color: #f4e6c8;
  margin: 0 0 4px;
  letter-spacing: 0.05em;
}

.cr-right-subtitle {
  font-size: 13.5px;
  color: #d4af6a;
  font-weight: 600;
  margin-bottom: 8px;
}

.cr-right-lore {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(216, 208, 196, 0.82);
  margin: 0;
}

/* Barras segmentadas douradas */
.cr-right-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(10, 9, 11, 0.65);
  border: 1px solid rgba(203, 184, 144, 0.16);
  border-radius: 8px;
}

.cr-right-bar-row {
  display: grid;
  grid-template-columns: 78px 1fr;
  align-items: center;
  gap: 10px;
}

.cr-right-bar-lbl {
  font-size: 13.5px;
  color: rgba(216, 208, 196, 0.78);
}

.cr-right-bar-segs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.cr-right-bar-seg {
  height: 5px;
  border-radius: 2px;
  background: rgba(203, 184, 144, 0.18);
}

.cr-right-bar-seg.is-on {
  background: linear-gradient(90deg, #b88b44, #f0cf85);
  box-shadow: 0 0 6px rgba(240, 207, 133, 0.35);
}

.cr-right-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cr-right-sec-title {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--gold-bright);
  border-bottom: 1px solid rgba(203, 184, 144, 0.22);
  padding-bottom: 5px;
}

.cr-right-benefit-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cr-right-trait-list {
  margin: 2px 0 0;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13.5px;
  color: rgba(216, 208, 196, 0.8);
}

.cr-right-highlight-box {
  font-size: 13.5px;
  line-height: 1.42;
  padding: 8px 10px;
  background: rgba(14, 12, 14, 0.72);
  border: 1px solid rgba(203, 184, 144, 0.18);
  border-radius: 6px;
  color: rgba(226, 218, 206, 0.88);
}

.cr-right-highlight-box strong {
  color: #fde68a;
}

.cr-right-group-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #d4af6a;
  margin-top: 4px;
}

.cr-right-ability-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cr-right-ability-item {
  padding: 8px 10px;
  background: rgba(12, 11, 13, 0.78);
  border: 1px solid rgba(203, 184, 144, 0.16);
  border-radius: 6px;
}

.cr-right-ability-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}

.cr-right-ability-head strong {
  font-size: 13.5px;
  color: #f4e6c8;
}

.cr-right-ability-item p {
  margin: 0;
  font-size: 13px;
  line-height: 1.38;
  color: rgba(206, 198, 186, 0.78);
}

@media (max-width: 1440px) {
  .cr-classic-rpg-layout {
    grid-template-columns: 280px minmax(0, 1fr) 305px;
  }
}

@media (max-width: 1280px) {
  .cr-right-preview-sidebar {
    position: static;
    max-height: none;
  }
}


/* ============================================================================
   TILES DE ÍCONES (CULTURAS, CLASSES E CAMINHOS) + CHIPS COMPACTOS NA SIDEBAR
   ============================================================================ */
.cr-icon-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 14px;
  padding: 4px 2px;
}

.cr-icon-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 8px;
  background: rgba(12, 10, 14, 0.72);
  border: 1px solid rgba(180, 150, 96, 0.24);
  border-radius: 10px;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.cr-icon-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(218, 179, 102, 0.65);
  background: rgba(24, 20, 18, 0.88);
}

.cr-icon-tile.selected {
  border: 2px solid #eab308;
  background: radial-gradient(circle at 50% 35%, rgba(212, 175, 92, 0.2), rgba(14, 12, 10, 0.94));
  box-shadow: 0 0 0 2px rgba(234, 179, 8, 0.28), 0 0 18px rgba(212, 175, 92, 0.42);
}

.cr-icon-tile-ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #262018, #0c0a0b);
  border: 1.5px solid rgba(180, 150, 96, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.cr-icon-tile.selected .cr-icon-tile-ring {
  border-color: #fde047;
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.45);
}

.cr-icon-tile-img,
.cr-icon-tile-ring .custom-ui-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cr-icon-tile-emoji {
  font-size: 30px;
  line-height: 1;
}

.cr-icon-tile-label {
  font-family: 'Cinzel', serif;
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(230, 218, 196, 0.88);
  text-align: center;
  line-height: 1.25;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cr-icon-tile.selected .cr-icon-tile-label {
  color: #fde68a;
}

/* Ícone do Caminho com tamanho ajustado na barra lateral */
.cr-right-path-box {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.cr-right-path-box.is-featured-path {
  background: linear-gradient(135deg, rgba(56, 42, 20, 0.62), rgba(16, 13, 14, 0.92));
  border: 1.5px solid rgba(234, 179, 8, 0.65);
  box-shadow: 0 0 16px rgba(212, 175, 92, 0.18);
  padding: 10px 12px;
}

.cr-right-path-ico {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.cr-right-path-ico img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

/* Chips compactos de Poderes & Habilidades (ícone + nome + tooltip) */
.cr-right-ability-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cr-right-ability-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  background: rgba(14, 12, 15, 0.85);
  border: 1px solid rgba(203, 184, 144, 0.24);
  border-radius: 6px;
  cursor: help;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.cr-right-ability-chip:hover {
  border-color: #eab308;
  background: rgba(34, 28, 18, 0.9);
}

.cr-right-ability-ico {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cr-right-ability-ico img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.cr-right-ability-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #f0e4c8;
  white-space: nowrap;
}


/* Destaque de Nome & Conceito na Etapa 1 + Box Dourada do Caminho na Barra Lateral */
.cr-identity-highlight {
  padding: 16px 18px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(42, 32, 18, 0.55), rgba(14, 12, 14, 0.9));
  border: 1.5px solid rgba(218, 179, 102, 0.58);
  box-shadow: 0 0 22px rgba(212, 175, 92, 0.14), inset 0 0 24px rgba(0, 0, 0, 0.55);
}

.cr-field-label-gold {
  color: #fde68a !important;
  font-family: 'Cinzel', serif;
  font-size: 13px;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  display: block;
}

.cr-highlight-input {
  border-color: rgba(218, 179, 102, 0.55) !important;
  background: rgba(10, 9, 11, 0.9) !important;
}

.cr-highlight-input:focus {
  border-color: #fde047 !important;
  box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.25) !important;
}

.cr-right-dual-emblems {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 10px;
}

.cr-right-dual-emblems .cr-right-emblem-ring {
  margin-bottom: 0;
}

.cr-right-emblem-box.is-path-box {
  position: relative;
  width: 86px;
  height: 86px;
  border-radius: 14px;
  background: radial-gradient(circle at 35% 30%, #2b2318, #0c0a0b);
  border: 2px solid #c9a45c;
  box-shadow: 0 0 0 4px rgba(18, 15, 13, 0.95), 0 0 20px rgba(201, 164, 92, 0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6px;
}

.cr-right-emblem-box.is-path-box .cr-right-emblem-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}


/* ============================================================================
   REFINO GLOBAL DE ALINHAMENTO DE CARDS/BOXES & BARRA 3D DE FORJA/ALQUIMIA
   ============================================================================ */
.grid-2,
.grid-3,
.grid-4,
.option-grid,
.shop-grid {
  align-items: stretch;
}

.card,
.option-card,
.tree-node,
.shop-item-card,
.cr-section-block {
  box-sizing: border-box;
}

.tree-node,
.option-card,
.shop-item-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  line-height: 1.5;
}

.cr-right-bar-lbl,
.cr-right-ability-name,
.cr-right-highlight-box,
.cr-right-trait-list,
.cr-right-lore,
.slot-meta-row,
.tt-desc,
.tt-meta,
.tt-stat-row {
  font-size: 14px !important;
  line-height: 1.48;
}

.cr-right-group-label,
.cr-icon-tile-label,
.slot-pillar-kicker {
  font-size: 13px !important;
}

/* Modal & Barra de Progresso 3D para Forja e Alquimia */
.craft-3d-backdrop {
  position: fixed;
  inset: 0;
  z-index: 950;
  background: rgba(4, 3, 6, 0.82);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: craftFadeIn 0.18s ease-out;
}

@keyframes craftFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.craft-3d-modal {
  width: 100%;
  max-width: 480px;
  padding: 26px 24px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(24, 20, 18, 0.98) 0%, rgba(10, 9, 11, 0.99) 100%);
  border: 1.5px solid rgba(218, 179, 102, 0.65);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.92), 0 0 34px rgba(212, 175, 92, 0.2);
  text-align: center;
}

.craft-3d-modal.is-alchemy {
  border-color: rgba(52, 211, 153, 0.65);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.92), 0 0 34px rgba(16, 185, 129, 0.22);
}

.craft-3d-icon {
  font-size: 38px;
  margin-bottom: 8px;
  animation: craftPulse 0.7s ease-in-out infinite alternate;
}

@keyframes craftPulse {
  from { transform: scale(0.95); filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.35)); }
  to { transform: scale(1.08); filter: drop-shadow(0 0 16px rgba(250, 204, 21, 0.75)); }
}

.craft-3d-title {
  font-family: 'Cinzel', serif;
  font-size: 20px;
  color: #fde68a;
  margin: 0 0 6px;
}

.craft-3d-modal.is-alchemy .craft-3d-title {
  color: #a7f3d0;
}

.craft-3d-sub {
  font-size: 15px;
  color: rgba(220, 212, 198, 0.85);
  margin-bottom: 18px;
}

.craft-3d-stage {
  perspective: 600px;
  margin-bottom: 12px;
}

.craft-3d-track {
  position: relative;
  height: 28px;
  border-radius: 14px;
  background: linear-gradient(180deg, #09080a 0%, #19161b 52%, #0c0a0d 100%);
  border: 1.5px solid rgba(203, 184, 144, 0.45);
  box-shadow:
    inset 0 4px 10px rgba(0, 0, 0, 0.95),
    inset 0 -2px 4px rgba(255, 255, 255, 0.08),
    0 8px 20px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  transform: rotateX(10deg);
}

.craft-3d-fill {
  position: relative;
  height: 100%;
  width: 0%;
  border-radius: 12px;
  background: linear-gradient(180deg, #fef08a 0%, #eab308 38%, #b45309 82%, #78350f 100%);
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.6),
    0 0 18px rgba(234, 179, 8, 0.75);
  transition: width 0.06s linear;
  overflow: hidden;
}

.craft-3d-modal.is-alchemy .craft-3d-fill {
  background: linear-gradient(180deg, #a7f3d0 0%, #10b981 40%, #047857 85%, #064e3b 100%);
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.55),
    0 0 18px rgba(16, 185, 129, 0.75);
}

.craft-3d-shimmer {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -55deg,
    rgba(255, 255, 255, 0.22) 0px,
    rgba(255, 255, 255, 0.22) 12px,
    transparent 12px,
    transparent 24px
  );
  animation: craftStripeMove 0.65s linear infinite;
}

@keyframes craftStripeMove {
  from { background-position: 0 0; }
  to { background-position: 34px 0; }
}

.craft-3d-glow-tip {
  position: absolute;
  top: 0;
  right: 0;
  width: 14px;
  height: 100%;
  background: radial-gradient(circle, #ffffff 0%, rgba(255, 255, 255, 0) 80%);
  filter: blur(2px);
}

.craft-3d-pct {
  font-family: 'Cinzel', serif;
  font-size: 16px;
  font-weight: 700;
  color: #fde68a;
  letter-spacing: 0.08em;
}

.craft-3d-modal.is-alchemy .craft-3d-pct {
  color: #6ee7b7;
}


/* Seta verde para cima nos equipamentos do inventário melhores que o equipado */
.inv-upgrade-arrow {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(6, 78, 59, 0.92);
  border: 1px solid #34d399;
  color: #4ade80;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.65);
  z-index: 4;
  pointer-events: none;
  animation: invUpgradePulse 1.6s ease-in-out infinite alternate;
}

@keyframes invUpgradePulse {
  from { transform: translateY(0); box-shadow: 0 0 6px rgba(74, 222, 128, 0.45); }
  to { transform: translateY(-2px); box-shadow: 0 0 12px rgba(74, 222, 128, 0.85); }
}


/* ============================================================================
   NOTIFICAÇÃO PADRÃO DE RECOMPENSAS & QUALIDADE (ESTILO GÓTICO RECUADO)
   ============================================================================ */
.rw-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 980;
  background: rgba(3, 3, 5, 0.78);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: craftFadeIn 0.2s ease-out;
}

.rw-modal-box {
  position: relative;
  width: 100%;
  max-width: 660px;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(56, 46, 36, 0.35), transparent 65%),
    linear-gradient(180deg, #161518 0%, #0b0a0d 100%);
  border: 2px solid #756245;
  box-shadow:
    inset 0 0 0 1px rgba(212, 175, 106, 0.22),
    inset 0 0 42px rgba(0, 0, 0, 0.9),
    0 24px 64px rgba(0, 0, 0, 0.95);
  border-radius: 4px;
  overflow: visible;
}

.rw-modal-box.is-alchemy {
  border-color: #3f7662;
  box-shadow:
    inset 0 0 0 1px rgba(52, 211, 153, 0.22),
    inset 0 0 42px rgba(0, 0, 0, 0.9),
    0 24px 64px rgba(0, 0, 0, 0.95);
}

.rw-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: #b79964;
  border-style: solid;
  pointer-events: none;
  z-index: 3;
}
.rw-corner.tl { top: -3px; left: -3px; border-width: 3px 0 0 3px; border-top-left-radius: 6px; }
.rw-corner.tr { top: -3px; right: -3px; border-width: 3px 3px 0 0; border-top-right-radius: 6px; }
.rw-corner.bl { bottom: -3px; left: -3px; border-width: 0 0 3px 3px; border-bottom-left-radius: 6px; }
.rw-corner.br { bottom: -3px; right: -3px; border-width: 0 3px 3px 0; border-bottom-right-radius: 6px; }

.rw-modal-header {
  padding: 13px 24px;
  background: linear-gradient(180deg, rgba(46, 39, 32, 0.92) 0%, rgba(22, 19, 18, 0.96) 100%);
  border-bottom: 1.5px solid rgba(183, 153, 100, 0.45);
  text-align: center;
}

.rw-modal-title {
  font-family: 'Cinzel', serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #efe3c8;
  margin: 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.rw-modal-body {
  padding: 20px 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.rw-section-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.rw-section-ico {
  font-size: 18px;
}

.rw-section-lbl {
  font-family: 'Cinzel', serif;
  font-size: 14px;
  letter-spacing: 0.1em;
  color: #d8ccb4;
}

.rw-gold-divider {
  width: 72%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(203, 184, 144, 0.55), transparent);
  margin-bottom: 14px;
}

.rw-currency-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 16px;
  font-weight: 600;
  color: #ece2cf;
  margin-bottom: 8px;
}

.rw-pe-gem {
  color: #ef4444;
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.65);
}

.rw-curr-dot {
  color: rgba(203, 184, 144, 0.5);
}

.rw-subtitle {
  font-size: 15.5px;
  color: rgba(226, 218, 204, 0.86);
  margin-bottom: 14px;
}

.rw-showcase-well {
  width: 100%;
  padding: 22px 18px;
  margin-bottom: 20px;
  background: linear-gradient(180deg, rgba(6, 5, 8, 0.94) 0%, rgba(12, 10, 14, 0.96) 100%);
  border: 1px solid rgba(183, 153, 100, 0.35);
  box-shadow: inset 0 10px 26px rgba(0, 0, 0, 0.95), inset 0 0 0 1px rgba(0, 0, 0, 0.8);
  border-radius: 3px;
}

.rw-items-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
}

.rw-item-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  max-width: 138px;
  cursor: help;
}

.rw-item-frame {
  position: relative;
  width: 78px;
  height: 78px;
  background: linear-gradient(180deg, rgba(16, 14, 15, 0.94) 55%, rgba(var(--rar-rgb, 196, 178, 138), 0.28) 100%);
  border: 1px solid rgba(196, 178, 138, 0.32);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.65), 0 4px 12px rgba(0, 0, 0, 0.65);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}

.rw-item-slot.is-masterwork .rw-item-frame {
  box-shadow: 0 0 24px rgba(250, 204, 21, 0.55), inset 0 0 14px rgba(250, 204, 21, 0.18);
}

.rw-item-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.rw-item-qty {
  position: absolute;
  bottom: 2px;
  right: 4px;
  font-size: 13px;
  font-weight: 800;
  color: #fde68a;
  text-shadow: 0 1px 4px #000;
}

.rw-item-name {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
}

.rw-item-quality {
  font-size: 13.5px;
  color: rgba(214, 204, 188, 0.78);
}

.rw-footer {
  display: flex;
  justify-content: center;
}

.rw-ok-btn {
  min-width: 148px;
  padding: 9px 32px;
  font-family: 'Cinzel', serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #f3e8d2;
  background: linear-gradient(180deg, #332c28 0%, #1c1817 100%);
  border: 1.5px solid #8a7352;
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255, 240, 210, 0.2), 0 4px 14px rgba(0, 0, 0, 0.8);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

.rw-ok-btn:hover {
  border-color: #eab308;
  color: #fde68a;
  box-shadow: 0 0 14px rgba(234, 179, 8, 0.35);
}

.rw-ok-btn:active {
  transform: scale(0.98);
}


/* ============================================================================
   BOTÃO DESTACADO DO JORNAL NA FICHA + JORNAL DO HERÓI (COURO & PERGAMINHO)
   ============================================================================ */
.sh-act-btn.is-journal-featured {
  margin-top: 6px;
  width: 100%;
  background: linear-gradient(135deg, rgba(120, 82, 32, 0.85), rgba(44, 30, 16, 0.95));
  border: 1.5px solid #eab308;
  box-shadow: 0 0 16px rgba(234, 179, 8, 0.28), inset 0 1px 0 rgba(255, 240, 200, 0.25);
}

.sh-act-btn.is-journal-featured:hover {
  border-color: #fde047;
  box-shadow: 0 0 22px rgba(250, 204, 21, 0.48);
  transform: translateY(-1px);
}

.jrn-shell {
  max-width: 1360px;
  margin: 0 auto;
  background: linear-gradient(180deg, #130f0d 0%, #090706 100%);
  border: 3px solid #4a3a27;
  border-radius: 10px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.94), inset 0 0 34px rgba(0, 0, 0, 0.9);
  overflow: hidden;
}

.jrn-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 18px 0;
  background: linear-gradient(180deg, #211b17 0%, #14100d 100%);
  border-bottom: 2px solid #5c4830;
  flex-wrap: wrap;
}

.jrn-brand {
  font-family: 'Cinzel', serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #e6d2aa;
  padding: 6px 14px 12px 4px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.jrn-tabs {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.jrn-tab {
  font-family: 'Cinzel', serif;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 9px 18px;
  border: 1px solid #8a7352;
  border-bottom: none;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(180deg, #b8a37e 0%, #9b8562 100%);
  color: #24190e;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 245, 220, 0.4);
  transition: transform 0.14s ease, background 0.14s ease;
}

.jrn-tab:hover {
  background: linear-gradient(180deg, #d4c09c 0%, #b59f79 100%);
}

.jrn-tab.is-active {
  background: linear-gradient(180deg, #ece0c6 0%, #d8c6a3 100%);
  color: #1c1208;
  padding-top: 11px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 240, 0.75);
}

.jrn-top-actions {
  padding-bottom: 10px;
}

.jrn-book-body {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  min-height: 620px;
}

/* Sidebar de Couro Escuro (Esquerda) */
.jrn-sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 16px;
  background: linear-gradient(180deg, #171413 0%, #0d0b0c 100%);
  border-right: 2px solid #4a3a27;
  box-shadow: inset -8px 0 20px rgba(0, 0, 0, 0.65);
}

.jrn-progress-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(203, 184, 144, 0.2);
}

.jrn-progress-kicker {
  font-family: 'Cinzel', serif;
  font-size: 13.5px;
  letter-spacing: 0.12em;
  color: #cbb890;
  margin-bottom: 10px;
}

.jrn-ring-wrap {
  position: relative;
  width: 108px;
  height: 108px;
  margin-bottom: 10px;
}

.jrn-ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.jrn-ring-bg {
  fill: none;
  stroke: rgba(203, 184, 144, 0.18);
  stroke-width: 7;
}

.jrn-ring-fg {
  fill: none;
  stroke: #d4af6a;
  stroke-width: 7;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(212, 175, 106, 0.55));
}

.jrn-ring-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-size: 24px;
  font-weight: 700;
  color: #efe3c8;
}

.jrn-hero-caption {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.jrn-hero-caption strong {
  font-family: 'Cinzel', serif;
  font-size: 15px;
  color: #fde68a;
}

.jrn-hero-caption span {
  font-size: 13px;
  color: rgba(216, 206, 190, 0.78);
}

.jrn-loc-list-head {
  font-family: 'Cinzel', serif;
  font-size: 13.5px;
  letter-spacing: 0.1em;
  color: #cbb890;
  margin-bottom: 6px;
}

.jrn-loc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.jrn-loc-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 5px;
  background: rgba(26, 22, 20, 0.7);
  border: 1px solid rgba(203, 184, 144, 0.14);
  font-size: 13px;
  color: rgba(200, 190, 174, 0.62);
}

.jrn-loc-row.is-discovered {
  color: #efe3c8;
  border-color: rgba(203, 184, 144, 0.34);
}

.jrn-loc-ico {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.jrn-loc-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.jrn-loc-count {
  font-weight: 700;
  color: #d4af6a;
}

.jrn-map-btn {
  width: 100%;
  padding: 10px 14px;
  font-family: 'Cinzel', serif;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #efe3c8;
  background: linear-gradient(180deg, #2a241f 0%, #161311 100%);
  border: 1px solid #756245;
  border-radius: 4px;
  cursor: pointer;
}

.jrn-map-btn:hover {
  border-color: #eab308;
  color: #fde68a;
}

/* Páginas de Pergaminho Aberto */
.jrn-parchment-spread {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background:
    radial-gradient(ellipse at 50% 50%, rgba(255, 248, 232, 0.34), rgba(186, 158, 114, 0.18) 88%),
    linear-gradient(90deg, #d8c7a3 0%, #efe2c6 6%, #eadbb9 48%, #c7b084 50%, #ede0c2 52%, #e9dab8 94%, #d2c09a 100%);
  color: #21150b;
  position: relative;
}

.jrn-parchment-spread:has(.jrn-map-strip) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 210px;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(255, 248, 232, 0.34), rgba(186, 158, 114, 0.18) 88%),
    linear-gradient(90deg, #d8c7a3 0%, #efe2c6 6%, #eadbb9 calc((100% - 210px) * 0.48), #c7b084 calc((100% - 210px) * 0.50), #ede0c2 calc((100% - 210px) * 0.52), #e9dab8 94%, #d2c09a 100%);
}

.jrn-page {
  padding: 26px 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 76vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(110, 78, 42, 0.65) rgba(92, 68, 38, 0.12);
}

.jrn-page::-webkit-scrollbar {
  width: 7px;
}

.jrn-page::-webkit-scrollbar-track {
  background: rgba(92, 68, 38, 0.12);
  border-radius: 6px;
}

.jrn-page::-webkit-scrollbar-thumb {
  background: rgba(110, 78, 42, 0.62);
  border-radius: 6px;
}

.jrn-page::-webkit-scrollbar-thumb:hover {
  background: rgba(110, 78, 42, 0.85);
}

.jrn-page-left {
  padding-right: 12px;
  border-right: 1px solid rgba(92, 68, 38, 0.32);
  box-shadow: inset -14px 0 24px rgba(82, 58, 28, 0.14);
}

.jrn-page-right {
  padding-left: 34px;
  box-shadow: inset 14px 0 24px rgba(82, 58, 28, 0.14);
}

.jrn-parchment-spread:has(.jrn-map-strip) .jrn-page-right {
  padding-left: 42px;
}

.jrn-page-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1.5px solid rgba(72, 52, 28, 0.38);
  padding-bottom: 8px;
  margin-bottom: 6px;
}

.jrn-page-header h2 {
  font-family: 'Cinzel', serif;
  font-size: 20px;
  font-weight: 700;
  color: #2b1b0e;
  text-shadow: none;
  margin: 0;
  letter-spacing: 0.06em;
}

.jrn-date-stamp {
  font-size: 13.5px;
  font-style: italic;
  color: #5c4328;
}

.jrn-ink-intro {
  font-size: 16px;
  line-height: 1.5;
  color: #362516;
  margin: 0 0 6px;
}

.jrn-sec-title {
  font-family: 'Cinzel', serif;
  font-size: 15px;
  font-weight: 700;
  color: #3c2714;
  text-shadow: none;
  border-bottom: 1px solid rgba(72, 52, 28, 0.25);
  padding-bottom: 4px;
  margin: 4px 0 6px;
}

.jrn-stats-lines,
.jrn-ruled-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.jrn-stat-line,
.jrn-ruled-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 4px;
  border-bottom: 1px dashed rgba(82, 58, 30, 0.28);
  font-size: 15px;
  color: #2b1d10;
}

.jrn-ruled-ico {
  font-size: 18px;
  flex-shrink: 0;
}

.jrn-ruled-txt {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.jrn-ruled-txt small {
  font-size: 13.5px;
  color: #63492d;
}

.jrn-ruled-val {
  color: #583114;
  font-weight: 700;
  white-space: nowrap;
}

.jrn-notes-slips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.jrn-note-slip {
  padding: 10px 12px;
  background: linear-gradient(180deg, #ede0c4 0%, #decba5 100%);
  border: 1px solid rgba(92, 68, 38, 0.35);
  box-shadow: 2px 3px 8px rgba(48, 32, 16, 0.2);
  border-radius: 2px;
  font-size: 13.5px;
  color: #2e1f11;
}

.jrn-note-slip strong {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 13.5px;
  color: #4a2d12;
  margin-bottom: 3px;
}

.jrn-note-slip p {
  margin: 0;
  line-height: 1.38;
}

.jrn-entry-card {
  padding: 10px 12px;
  background: rgba(255, 248, 232, 0.38);
  border: 1px solid rgba(92, 68, 38, 0.3);
  border-radius: 4px;
}

.jrn-entry-card.is-done {
  background: rgba(212, 234, 198, 0.42);
  border-color: rgba(45, 106, 56, 0.45);
}

.jrn-entry-card.is-ready {
  background: rgba(254, 240, 188, 0.55);
  border-color: rgba(180, 120, 20, 0.55);
}

.jrn-entry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 14.5px;
  color: #24170c;
}

.jrn-ink-badge {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 700;
  padding: 2px 7px;
  border: 1px solid rgba(72, 52, 28, 0.42);
  border-radius: 3px;
  color: #4a2d12;
  white-space: nowrap;
}

.jrn-entry-card p {
  margin: 0;
  font-size: 13.8px;
  line-height: 1.4;
  color: #3d2b1a;
}

.jrn-empty-ink {
  padding: 16px 8px;
  font-style: italic;
  font-size: 15px;
  color: #664c30;
}

/* Faixa Lateral de Mapa no Pergaminho (estilo mapa da direita na referência) */
.jrn-map-strip {
  padding: 20px 14px;
  background: linear-gradient(180deg, #cbb58d 0%, #bca377 100%);
  border-left: 1.5px solid rgba(82, 58, 30, 0.35);
  box-shadow: inset 12px 0 22px rgba(72, 52, 28, 0.16);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.jrn-compass-mark {
  font-size: 32px;
  opacity: 0.78;
}

.jrn-map-strip-title {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #3d2814;
  border-bottom: 1px solid rgba(72, 52, 28, 0.32);
  padding-bottom: 4px;
  width: 100%;
  text-align: center;
}

.jrn-map-pins {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.jrn-map-pin {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 9px;
  background: rgba(240, 227, 198, 0.72);
  border: 1px solid rgba(82, 58, 30, 0.36);
  border-radius: 3px;
  font-size: 13.5px;
  font-weight: 700;
  color: #3d2916;
  box-shadow: 1px 2px 5px rgba(48, 32, 16, 0.18);
}

.jrn-map-pin.is-done .jrn-pin-mark {
  color: #166534;
}

@media (max-width: 1100px) {
  .jrn-book-body {
    grid-template-columns: 1fr;
  }
  .jrn-sidebar {
    border-right: none;
    border-bottom: 2px solid #4a3a27;
  }
  .jrn-parchment-spread,
  .jrn-parchment-spread:has(.jrn-map-strip) {
    grid-template-columns: 1fr;
  }
  .jrn-page-left {
    border-right: none;
    border-bottom: 1px solid rgba(92, 68, 38, 0.28);
  }
}


/* ============================================================================
   REFINO FINAL: BOTÕES TOPO FICHA, FONTES DO JORNAL, MODAL CENTRAL & BARRA LUMINOSA
   ============================================================================ */
.sh-crest-top-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  margin-bottom: 10px;
}

.sh-crest-top-actions .sh-act-btn {
  margin: 0 !important;
  width: 100%;
  min-height: 50px;
  justify-content: center;
  padding: 8px 10px;
}

.sh-crest-top-actions .sh-crest-heroes-btn {
  margin: 0 !important;
}

/* Fontes do sistema principal ampliadas no Jornal */
.jrn-shell {
  font-family: var(--font-body);
}

.jrn-brand,
.jrn-tab,
.jrn-page-header h2,
.jrn-sec-title,
.jrn-progress-kicker,
.jrn-loc-list-head,
.jrn-map-btn,
.jrn-map-strip-title,
.jrn-ink-badge,
.jrn-note-slip strong,
.jrn-hero-caption strong {
  font-family: var(--font-display);
}

.jrn-tab { font-size: 15.5px; padding: 10px 18px; }
.jrn-page-header h2 { font-size: 23px; }
.jrn-sec-title { font-size: 17.5px; }
.jrn-ink-intro { font-size: 19px; line-height: 1.55; }
.jrn-stat-line, .jrn-ruled-item { font-size: 18px; padding: 7px 4px; }
.jrn-ruled-txt small { font-size: 16px; }
.jrn-entry-head { font-size: 17.5px; }
.jrn-entry-card p { font-size: 17px; line-height: 1.5; }
.jrn-note-slip { font-size: 16.8px; }
.jrn-note-slip strong { font-size: 15.5px; }
.jrn-loc-row { font-size: 16.5px; }
.jrn-hero-caption strong { font-size: 17.5px; }
.jrn-hero-caption span { font-size: 16px; }
.jrn-map-pin { font-size: 15.5px; }
.jrn-shell .small { font-size: 15.5px; line-height: 1.45; }

/* Centralização absoluta na tela atual para Modais de Recompensa e Progresso */
.rw-modal-backdrop,
.craft-3d-backdrop {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Barra de Progresso estilo luminoso da imagem (Dourada p/ Forja, Verde p/ Alquimia) */
.craft-3d-track {
  height: 22px;
  border-radius: 6px;
  background: rgba(6, 9, 14, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.95), 0 0 18px rgba(0, 0, 0, 0.8);
  transform: none;
}

.craft-3d-fill {
  border-radius: 5px;
  background: linear-gradient(90deg, #b45309 0%, #eab308 55%, #fef08a 88%, #ffffff 100%);
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.85), inset 0 0 8px rgba(255, 255, 255, 0.6);
}

.craft-3d-modal.is-alchemy .craft-3d-fill {
  background: linear-gradient(90deg, #047857 0%, #10b981 55%, #6ee7b7 88%, #ffffff 100%);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.85), inset 0 0 8px rgba(255, 255, 255, 0.6);
}

.craft-3d-shimmer {
  background-image:
    radial-gradient(circle at 20% 45%, rgba(255, 255, 255, 0.65) 0 2px, transparent 3px),
    radial-gradient(circle at 48% 30%, rgba(255, 255, 255, 0.55) 0 3px, transparent 4px),
    radial-gradient(circle at 72% 65%, rgba(255, 255, 255, 0.5) 0 2px, transparent 3px),
    radial-gradient(circle at 86% 40%, rgba(255, 255, 255, 0.7) 0 2.5px, transparent 3.5px);
  background-size: 160px 100%;
  animation: craftStripeMove 1.4s linear infinite;
}

.craft-3d-glow-tip {
  width: 22px;
  right: -4px;
  background: radial-gradient(circle, #ffffff 15%, rgba(255, 255, 255, 0.45) 55%, transparent 85%);
  filter: blur(3px);
}


/* Alinhamento próximo entre valor numérico e ícone de PO em todo o sistema */
.gold-amount-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  vertical-align: middle;
}

.gold-coin-icon {
  margin: 0 !important;
  vertical-align: middle;
  flex-shrink: 0;
}


/* Padronização exata de tipografia do Jornal com a fonte principal do sistema */
.jrn-shell,
.jrn-page,
.jrn-ink-intro,
.jrn-stat-line,
.jrn-ruled-item,
.jrn-entry-card p,
.jrn-note-slip,
.jrn-loc-row {
  font-family: var(--font-body) !important;
  font-weight: 500;
}

.jrn-brand,
.jrn-tab,
.jrn-page-header h2,
.jrn-sec-title {
  font-family: var(--font-display) !important;
  font-weight: 500;
  letter-spacing: 0.1em;
}


/* ============================================================================
   EXPANSÃO FULL-PAGE DO JORNAL (LATERAIS, TOPO E BASE + ESPAÇAMENTO)
   ============================================================================ */
.main-container.journal-fullbleed {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

.main-container.journal-fullbleed .jrn-shell {
  max-width: 100%;
  width: 100%;
  min-height: calc(100vh - 56px);
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-bottom: none;
  display: flex;
  flex-direction: column;
}

.main-container.journal-fullbleed .jrn-topbar {
  padding: 14px 28px 0;
}

.main-container.journal-fullbleed .jrn-book-body {
  flex: 1;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: calc(100vh - 118px);
}

.main-container.journal-fullbleed .jrn-sidebar {
  padding: 28px 22px;
  gap: 20px;
}

.main-container.journal-fullbleed .jrn-parchment-spread {
  min-height: 100%;
}

.main-container.journal-fullbleed .jrn-parchment-spread:has(.jrn-map-strip) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 250px;
}

.main-container.journal-fullbleed .jrn-page {
  padding: 34px 36px 38px;
  gap: 16px;
  max-height: none;
}

.main-container.journal-fullbleed .jrn-stats-lines,
.main-container.journal-fullbleed .jrn-ruled-list {
  gap: 10px;
}

.main-container.journal-fullbleed .jrn-stat-line,
.main-container.journal-fullbleed .jrn-ruled-item {
  padding: 10px 6px;
}

.main-container.journal-fullbleed .jrn-notes-slips {
  gap: 14px;
}

.main-container.journal-fullbleed .jrn-note-slip {
  padding: 14px 16px;
}

.main-container.journal-fullbleed .jrn-entry-card {
  padding: 14px 16px;
}

.main-container.journal-fullbleed .jrn-map-strip {
  padding: 28px 18px;
  gap: 16px;
}


/* Expande o Jornal mais pelas laterais mantendo margens confortáveis no topo, base e bordas */
.main-container:has(.jrn-shell) {
  max-width: 1760px !important;
  width: 100% !important;
  padding: 18px 28px 28px !important;
  margin: 0 auto !important;
}

.jrn-shell {
  max-width: 1700px;
  width: 100%;
  margin: 0 auto;
}


/* ============================================================================
   POPUP FLUTUANTE DO MESTRE DE JOGO (CANTO DA TELA APÓS CRIAR PERSONAGEM)
   ============================================================================ */
.gm-guide-host {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 940;
  max-width: calc(100vw - 28px);
}

.gm-guide-popup {
  width: 400px;
  max-width: 100%;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(22, 18, 17, 0.98) 0%, rgba(10, 9, 11, 0.99) 100%);
  border: 1.5px solid rgba(218, 179, 102, 0.72);
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.92), 0 0 28px rgba(212, 175, 92, 0.22);
  overflow: hidden;
  animation: craftFadeIn 0.24s ease-out;
}

.gm-guide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(46, 36, 22, 0.9) 0%, rgba(20, 16, 14, 0.95) 100%);
  border-bottom: 1px solid rgba(203, 184, 144, 0.3);
}

.gm-guide-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.gm-guide-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #3b2d1c, #120e0a);
  border: 1.5px solid #d4af6a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.gm-guide-kicker {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: #d4af6a;
}

.gm-guide-title {
  font-family: var(--font-display);
  font-size: 15px;
  color: #fef3c7;
  display: block;
}

.gm-guide-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gm-guide-step-tag {
  align-self: flex-start;
  color: #fde68a;
  border-color: rgba(234, 179, 8, 0.55);
}

.gm-guide-text {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.48;
  color: #e6dcc8;
}

.gm-guide-glossary-box {
  padding: 10px 12px;
  border-radius: 7px;
  background: rgba(34, 26, 14, 0.65);
  border: 1px solid rgba(234, 179, 8, 0.45);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gm-guide-glossary-box p {
  margin: 0;
  font-size: 14px;
  line-height: 1.42;
  color: #fde68a;
}

.gm-guide-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(8, 7, 9, 0.72);
  border-top: 1px solid rgba(203, 184, 144, 0.2);
}

.gm-guide-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2b2116, #14100d);
  border: 1.5px solid #eab308;
  color: #fde68a;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.85), 0 0 16px rgba(234, 179, 8, 0.28);
  cursor: pointer;
}

.gm-pill-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(234, 179, 8, 0.18);
  border: 1px solid rgba(234, 179, 8, 0.45);
  font-size: 13px;
}


/* ============================================================================
   CONTROLE GLOBAL DE TRANSLUCIDEZ (PAINÉIS, BANNERS & ENQUADROS DE ITENS)
   ============================================================================ */
:root {
  --ui-panel-alpha: 0.90;
  --ui-panel-alpha-deep: 0.95;
  --ui-banner-alpha: 0.92;
  --ui-frame-alpha: 0.88;
}

.card,
.option-card,
.tree-node,
.shop-item-card,
.cr-section-block,
.cr-rpg-sidebar,
.cr-right-preview-sidebar,
.sh-inv-panel,
.modal-box {
  background: linear-gradient(
    180deg,
    rgba(20, 17, 16, var(--ui-panel-alpha)) 0%,
    rgba(10, 9, 10, var(--ui-panel-alpha-deep)) 100%
  ) !important;
  backdrop-filter: blur(6px);
}

.topbar {
  background: linear-gradient(
    180deg,
    rgba(12, 10, 10, var(--ui-banner-alpha)),
    rgba(9, 8, 8, var(--ui-banner-alpha))
  ) !important;
}

.item-frame,
.inv-cell,
.sh-inv-cell,
.rw-item-frame,
.cr-pgear-chip {
  background-color: rgba(10, 9, 12, var(--ui-frame-alpha)) !important;
}


/* Fundo circular atrás dos ícones dos slots de equipamentos (Ficha & Forja Encantamentos) e painel de atributos sem fundo */
.sh-ring-medallion {
  background: radial-gradient(circle at 35% 30%, rgba(36, 30, 26, 0.94) 0%, rgba(12, 10, 12, 0.96) 78%) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.85), inset 0 0 12px rgba(0, 0, 0, 0.82) !important;
  border-radius: 50%;
}

.sh-left-col,
.sh-left-col .sh-stat-row,
.sh-left-col .sh-level-block,
.sh-left-col .sh-ench-strip {
  background: transparent !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
}

/* Notificação centralizada de fim de combate (Vitória / Derrota) */
.cv-end-modal-backdrop > .card {
  width: min(92vw, 620px);
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.92), 0 0 32px rgba(212, 175, 106, 0.28);
  animation: rwPopIn 0.22s ease-out;
}

.cv-end-modal-backdrop > .card.cv-death-modal-card {
  width: min(94vw, 860px);
  max-width: 860px;
  padding: 28px 30px;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.95), 0 0 38px rgba(196, 60, 60, 0.34);
}

.cv-death-penalty-box {
  width: 100%;
  box-sizing: border-box;
  background: linear-gradient(180deg, rgba(95, 18, 18, 0.34) 0%, rgba(52, 12, 14, 0.42) 100%);
  border: 1.5px solid rgba(239, 68, 68, 0.65);
  border-radius: 6px;
  text-align: left;
  padding: 18px 22px;
  box-shadow: inset 0 0 26px rgba(0, 0, 0, 0.45);
}

.cv-death-penalty-title {
  font-family: var(--font-display);
  color: #fca5a5;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(239, 68, 68, 0.32);
}

.cv-death-penalty-row {
  font-size: 14.5px;
  line-height: 1.5;
  color: #fecaca;
  margin-bottom: 10px;
}

.cv-death-penalty-row:last-child {
  margin-bottom: 0;
}

.cv-death-lost-items-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 4px;
  background: rgba(12, 8, 10, 0.55);
  border: 1px solid rgba(239, 68, 68, 0.28);
}

/* Alinhamento uniforme dos botões e pills no topo da tela do Mapa */
.map-top-actions .hud-pill,
.map-top-actions .btn {
  height: 32px;
  min-height: 32px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  line-height: 1;
  white-space: nowrap;
  box-sizing: border-box;
}

.map-top-actions .gold-amount-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1;
}

.map-top-actions .gold-coin-icon,
.map-top-actions .custom-ui-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}

/* Padronização visual dos tooltips informativos (botões, textos, pills e status não-itens) */
.tt-card.tt-card-info {
  width: 340px;
  padding: 14px 16px;
}

.tt-card.tt-card-info .tt-top-tag {
  font-size: 13px;
  margin-bottom: 8px;
  padding-bottom: 6px;
}

.tt-desc.tt-desc-info {
  font-style: normal;
  font-size: 14.5px;
  line-height: 1.5;
  color: #e8dfd0;
  margin-bottom: 0;
}

/* Jornal exibido na frente da Ficha do Personagem como overlay modal */
.jrn-overlay-backdrop {
  z-index: 9990;
  padding: 8px;
  overflow-y: auto;
  align-items: center;
  justify-content: center;
  background: rgba(5, 4, 6, 0.68);
}

.jrn-overlay-host {
  width: min(98.5vw, 1760px);
  max-height: 97vh;
  overflow-y: auto;
}

.jrn-overlay-host .jrn-shell {
  max-width: 100%;
  width: 100%;
  min-height: 90vh;
  display: flex;
  flex-direction: column;
}

.jrn-overlay-host .jrn-book-body {
  flex: 1;
}

.jrn-overlay-host .jrn-page {
  max-height: 82vh;
}

/* ==================== ALQUIMIA (ESTILO PERGAMINHO & CÍRCULO ALQUÍMICO) ==================== */
.alq-topbar-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(10, 9, 11, 0.86);
  border: 1px solid rgba(196, 178, 138, 0.28);
  border-radius: 3px;
}

.alq-studio {
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(320px, 1.15fr);
  gap: 20px;
  align-items: start;
}

.alq-catalog-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alq-cat-group {
  background: rgba(11, 10, 12, 0.88);
  border: 1px solid rgba(196, 178, 138, 0.34);
  border-radius: 2px;
  overflow: hidden;
}

.alq-cat-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(24, 21, 18, 0.96), rgba(13, 11, 10, 0.98));
  border: none;
  border-bottom: 1px solid rgba(196, 178, 138, 0.22);
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.08em;
  cursor: pointer;
  text-align: left;
}

.alq-cat-header:hover {
  background: linear-gradient(180deg, rgba(36, 30, 24, 0.98), rgba(18, 15, 13, 0.98));
}

.alq-cat-arrow {
  color: var(--gold);
  font-size: 13px;
}

.alq-cat-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
}

.alq-recipe-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 7px 10px;
  background: rgba(16, 14, 15, 0.92);
  border: 1px solid rgba(196, 178, 138, 0.22);
  border-radius: 2px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.alq-recipe-row:hover {
  border-color: rgba(235, 219, 182, 0.55);
  background: rgba(26, 22, 19, 0.95);
}

.alq-recipe-row.is-selected {
  border: 2px solid #f2e8cf;
  background: linear-gradient(90deg, rgba(44, 34, 22, 0.96), rgba(22, 18, 14, 0.96));
  box-shadow: 0 0 14px rgba(242, 232, 207, 0.22), inset 0 0 10px rgba(212, 175, 106, 0.14);
}

.alq-recipe-thumb {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  background: rgba(8, 7, 8, 0.95);
  border: 1px solid rgba(196, 178, 138, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.alq-recipe-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.alq-recipe-meta {
  min-width: 0;
  flex: 1;
}

.alq-recipe-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alq-recipe-sub {
  font-size: 13px;
  color: var(--text-muted);
}

/* Painel Direito: Pergaminho Envelhecido */
.alq-parchment-card {
  position: relative;
  padding: 20px 24px 22px;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(230, 211, 168, 0.96) 0%, rgba(196, 170, 120, 0.96) 58%, rgba(146, 118, 72, 0.98) 100%);
  border: 2px solid #785f37;
  outline: 1px solid rgba(242, 232, 207, 0.35);
  outline-offset: -7px;
  border-radius: 3px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.88), inset 0 0 38px rgba(72, 48, 22, 0.36);
  color: #23180c;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.alq-parchment-head {
  width: 100%;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(58, 40, 20, 0.25);
  margin-bottom: 10px;
}

.alq-parchment-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: #1e140a !important;
  text-shadow: none !important;
  letter-spacing: 0.06em;
  margin: 0;
}

.alq-parchment-tier {
  font-size: 13.5px;
  font-weight: 600;
  color: #4b361e;
  margin-top: 2px;
}

.alq-circle-stage {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 4px auto 10px;
}

.alq-circle-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.alq-node-center {
  position: absolute;
  top: 46%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 78px;
  height: 78px;
  background: radial-gradient(circle, rgba(24, 18, 14, 0.95), rgba(10, 8, 7, 0.98));
  border: 2px solid #4e391e;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.alq-node-center img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.alq-node-sat {
  position: absolute;
  width: 56px;
  height: 56px;
  background: radial-gradient(circle, rgba(26, 20, 15, 0.95), rgba(11, 9, 8, 0.98));
  border: 2px solid #5a4224;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}

.alq-node-sat img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.alq-node-sat.is-missing {
  background: rgba(214, 195, 156, 0.85);
  border-color: rgba(90, 66, 36, 0.6);
}

.alq-node-sat.is-missing img {
  filter: brightness(0.18) contrast(1.2);
  opacity: 0.65;
}

.alq-node-sat.pos-left {
  left: 16px;
  bottom: 46px;
}

.alq-node-sat.pos-bottom {
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
}

.alq-node-sat.pos-right {
  right: 16px;
  bottom: 46px;
}

.alq-node-qty {
  position: absolute;
  right: 3px;
  bottom: 1px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: #f8ecd0;
  text-shadow: 0 1px 3px #000, 0 0 4px #000;
}

.alq-parchment-desc {
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.45;
  color: #24190c;
  max-width: 94%;
  margin: 4px 0 12px;
}

.alq-stats-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}

.alq-stat-chip {
  padding: 4px 10px;
  background: rgba(66, 48, 26, 0.14);
  border: 1px solid rgba(66, 48, 26, 0.35);
  border-radius: 3px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  color: #24180b;
}

.alq-parchment-actions {
  width: 100%;
  display: flex;
  justify-content: center;
}

.alq-craft-btn {
  min-width: 210px;
  padding: 10px 24px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  border-radius: 3px;
  border: 1.5px solid #4a351b;
  background: linear-gradient(180deg, #5d4526, #3b2a15);
  color: #f3e4be;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.32);
  transition: transform 0.14s ease, filter 0.14s ease;
}

.alq-craft-btn.is-ready:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.alq-craft-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 860px) {
  .alq-studio {
    grid-template-columns: 1fr;
  }
}

/* ==================== FORJA (VITRINE DARK FANTASY 3 COLUNAS) ==================== */
.forja-studio {
  display: grid;
  grid-template-columns: minmax(410px, 1.35fr) minmax(260px, 0.85fr) minmax(300px, 1fr);
  gap: 24px;
  align-items: stretch;
  padding: 20px 24px;
  background:
    radial-gradient(ellipse at 50% 78%, rgba(194, 78, 22, 0.24) 0%, rgba(28, 15, 10, 0.88) 46%, rgba(8, 7, 9, 0.96) 100%);
  border: 1px solid rgba(196, 178, 138, 0.26);
  border-radius: 3px;
  min-height: calc(100vh - 185px);
}

.forja-grid-col {
  max-height: calc(100vh - 225px);
  overflow-y: auto;
  padding-right: 16px;
  border-right: 1px solid rgba(196, 178, 138, 0.2);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.forja-group-title {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--text-main);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}

.forja-tiles-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(56px, 1fr));
  gap: 7px;
}

.forja-item-tile {
  aspect-ratio: 1 / 1;
  position: relative;
  background:
    radial-gradient(circle at 50% 60%, rgba(var(--rar-rgb, 169, 161, 150), 0.38) 0%, rgba(var(--rar-rgb, 169, 161, 150), 0.18) 65%, rgba(14, 12, 14, 0.92) 100%),
    linear-gradient(180deg, rgba(var(--rar-rgb, 169, 161, 150), 0.14) 0%, rgba(var(--rar-rgb, 169, 161, 150), 0.44) 100%);
  border: 1px solid rgba(var(--rar-rgb, 169, 161, 150), 0.55);
  border-radius: 2px;
  padding: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.16s ease, transform 0.14s ease, box-shadow 0.16s ease;
}

.forja-item-tile:hover {
  border-color: rgba(242, 232, 207, 0.65);
  transform: translateY(-1px);
}

.forja-item-tile.is-selected {
  border: 2px solid #f7efe0;
  box-shadow: 0 0 14px rgba(247, 239, 224, 0.35), inset 0 0 10px rgba(var(--rar-rgb, 212, 175, 106), 0.25);
}

.forja-item-tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Coluna Central: Brasa & Equipamento Flutuante */
.forja-center-stage {
  position: relative;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.forja-anvil-glow {
  position: absolute;
  bottom: 24px;
  width: 240px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(251, 146, 60, 0.55) 0%, rgba(234, 88, 12, 0.22) 45%, transparent 74%);
  filter: blur(12px);
  pointer-events: none;
}

.forja-hero-preview {
  position: relative;
  z-index: 2;
  width: 336px;
  height: 336px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: cvEnemyFloat 3.4s ease-in-out infinite;
  cursor: pointer;
}

.forja-hero-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.92)) drop-shadow(0 0 18px rgba(251, 146, 60, 0.35));
}

.forja-fire-base {
  width: 160px;
  height: 18px;
  margin-top: 14px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(253, 186, 116, 0.85) 0%, rgba(234, 88, 12, 0.45) 48%, transparent 75%);
  box-shadow: 0 0 28px rgba(249, 115, 22, 0.65);
}

/* Coluna Direita: Título, Descrição, Materiais & Ação */
.forja-detail-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding: 10px 8px;
}

.forja-detail-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: #f8f2e4;
  letter-spacing: 0.06em;
  margin: 0;
  text-transform: none;
}

.forja-detail-sub {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 4px;
}

.forja-detail-desc {
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.5;
  color: #d6cbb8;
  max-width: 92%;
}

.forja-req-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  padding: 10px 14px;
}

.forja-req-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: #e5decb;
}

.forja-req-item.is-missing {
  color: #fca5a5;
}

.forja-req-item img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.65));
}

.forja-studio.alq-studio-forge {
  background:
    radial-gradient(ellipse at 50% 78%, rgba(34, 197, 94, 0.16) 0%, rgba(12, 24, 18, 0.88) 46%, rgba(8, 7, 10, 0.96) 100%);
}

.forja-anvil-glow.alq-alchemy-glow {
  background: radial-gradient(ellipse at center, rgba(74, 222, 128, 0.45) 0%, rgba(16, 185, 129, 0.2) 45%, transparent 74%);
}

.forja-fire-base.alq-alchemy-base {
  background: radial-gradient(ellipse at center, rgba(134, 239, 172, 0.8) 0%, rgba(16, 185, 129, 0.4) 48%, transparent 75%);
  box-shadow: 0 0 28px rgba(52, 211, 153, 0.55);
}

.forja-craft-btn.alq-btn-theme {
  border-color: rgba(74, 222, 128, 0.52);
  background: linear-gradient(180deg, rgba(20, 68, 42, 0.9), rgba(10, 28, 18, 0.95));
  color: #dcfce7;
}

.forja-studio.merch-studio-forge {
  background:
    radial-gradient(ellipse at 50% 78%, rgba(212, 175, 55, 0.16) 0%, rgba(26, 20, 12, 0.88) 46%, rgba(8, 7, 10, 0.96) 100%);
}

.forja-anvil-glow.merch-gold-glow {
  background: radial-gradient(ellipse at center, rgba(251, 191, 36, 0.42) 0%, rgba(217, 119, 6, 0.2) 45%, transparent 74%);
}

.forja-fire-base.merch-gold-base {
  background: radial-gradient(ellipse at center, rgba(253, 224, 71, 0.78) 0%, rgba(217, 119, 6, 0.4) 48%, transparent 75%);
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.52);
}

.forja-craft-btn.merch-btn-theme {
  border-color: rgba(212, 175, 55, 0.58);
  background: linear-gradient(180deg, rgba(78, 56, 22, 0.92), rgba(32, 22, 10, 0.96));
  color: #fef3c7;
}

.forja-craft-btn.merch-btn-sell-all {
  border-color: rgba(52, 211, 153, 0.58);
  background: linear-gradient(180deg, rgba(16, 78, 54, 0.92), rgba(8, 34, 24, 0.96));
  color: #d1fae5;
}

.merch-price-display {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}

.merch-price-display.is-missing {
  color: #fca5a5 !important;
}

.merch-price-display img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.merch-tile-qty {
  position: absolute;
  right: 3px;
  bottom: 3px;
  padding: 1px 4px;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  color: #fef3c7;
  background: rgba(8, 7, 10, 0.86);
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 3px;
  line-height: 1.1;
  pointer-events: none;
}

.sh-inv-tabs.merch-inv-tabs {
  width: 100%;
  max-width: 520px;
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.sh-inv-tabs.forja-inv-tabs {
  grid-template-columns: repeat(4, minmax(56px, 78px));
  width: auto;
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.forja-enchant-tab-btn {
  padding: 11px 20px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 4px;
  border: 1.5px solid rgba(192, 132, 252, 0.72);
  background: linear-gradient(135deg, rgba(76, 29, 149, 0.78), rgba(146, 64, 14, 0.72));
  color: #fef3c7;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.35), inset 0 0 10px rgba(251, 191, 36, 0.16);
  cursor: pointer;
  transition: transform 0.14s ease, filter 0.14s ease, box-shadow 0.16s ease;
}

.forja-enchant-tab-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: 0 0 22px rgba(192, 132, 252, 0.55);
}

.forja-enchant-tab-btn.is-active {
  border-color: #fde68a;
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.92), rgba(180, 83, 9, 0.88));
  color: #ffffff;
  box-shadow: 0 0 24px rgba(250, 204, 21, 0.45), 0 0 14px rgba(168, 85, 247, 0.55);
}

/* Missões & Conquistas no Códice */
.codex-claim-all-btn {
  margin-right: auto;
  padding: 6px 14px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  border: 1px solid #d4af37;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #92400e, #451a03);
  color: #fef3c7;
  cursor: pointer;
}

.codex-quest-step {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 7px 11px;
  background: rgba(246, 236, 212, 0.72);
  border: 1px solid rgba(92, 64, 32, 0.3);
  border-radius: 4px;
  color: #211509;
}

.codex-quest-step.is-done {
  border-left: 4px solid #15803d;
  background: rgba(220, 242, 224, 0.72);
}

.codex-progress-track {
  height: 9px;
  background: rgba(58, 38, 18, 0.22);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(92, 64, 32, 0.35);
}

.codex-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #92400e, #d97706);
  transition: width 0.25s ease;
}

.codex-progress-fill.is-done {
  background: linear-gradient(90deg, #15803d, #22c55e);
}

/* ==================== SKILL TREE CONSTELAÇÃO (ESTILO NIOH) ==================== */
.main-container:has(.nioh-shell) {
  min-height: calc(100vh - 58px);
  padding-bottom: 14px !important;
  display: flex;
  flex-direction: column;
}

.nioh-shell {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-height: 0;
}

.nioh-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: linear-gradient(180deg, rgba(16, 15, 19, 0.96), rgba(9, 9, 12, 0.98));
  border: 1px solid rgba(196, 178, 138, 0.28);
  border-radius: 4px;
}

.nioh-topbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.nioh-style-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: #f3e6c8;
  letter-spacing: 0.04em;
}

.nioh-tabs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.nioh-tab-btn {
  padding: 7px 13px;
  font-family: var(--font-display);
  font-size: 13.5px;
  letter-spacing: 0.05em;
  background: rgba(20, 19, 24, 0.9);
  border: 1px solid rgba(196, 178, 138, 0.22);
  border-radius: 3px;
  color: #b7ad99;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.nioh-tab-btn:hover {
  color: #fff3d6;
  border-color: rgba(212, 175, 106, 0.55);
}

.nioh-tab-btn.is-active {
  background: linear-gradient(180deg, rgba(84, 58, 26, 0.85), rgba(36, 24, 12, 0.95));
  border-color: #e6c687;
  color: #fef3c7;
  box-shadow: 0 0 12px rgba(212, 175, 106, 0.25);
}

.nioh-points-bar {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 16px;
  background: linear-gradient(90deg, rgba(44, 42, 48, 0.72), rgba(22, 21, 25, 0.94));
  border: 1px solid rgba(212, 175, 106, 0.42);
  border-radius: 3px;
  font-family: var(--font-display);
  color: #f4ead2;
}

.nioh-points-val {
  font-size: 20px;
  font-weight: 700;
  color: #fde68a;
}

.nioh-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 410px);
  gap: 14px;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}

.nioh-constellation-stage {
  position: relative;
  min-height: 660px;
  height: 100%;
  background:
    radial-gradient(circle at 50% 52%, rgba(92, 68, 28, 0.22) 0%, rgba(16, 15, 20, 0.95) 56%, rgba(6, 6, 9, 0.99) 100%);
  border: 1px solid rgba(196, 178, 138, 0.25);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 12px;
}

.nioh-stage-filters {
  position: relative;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 10px;
}

.nioh-filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.nioh-mandala-wrap {
  position: relative;
  width: 100%;
  max-width: 720px;
  aspect-ratio: 1 / 1;
  margin: auto;
}

/* Lista vertical estilizada (Skill Tree e Poderes) */
.nioh-list-stage {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  padding: 6px 4px 4px;
}

.nioh-list-card {
  position: relative;
  width: 100%;
  min-height: 80px;
  padding: 13px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  text-align: left;
  cursor: pointer;
  border-radius: 2px;
  border: 1px solid rgba(196, 178, 138, 0.36);
  background: linear-gradient(90deg, rgba(44, 52, 55, 0.88) 0%, rgba(28, 33, 36, 0.92) 62%, rgba(16, 18, 22, 0.96) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 245, 220, 0.06), 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: border-color 0.16s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

.nioh-list-card:hover {
  border-color: rgba(230, 198, 135, 0.72);
  background: linear-gradient(90deg, rgba(64, 70, 66, 0.9) 0%, rgba(36, 40, 42, 0.94) 64%, rgba(18, 20, 24, 0.97) 100%);
}

.nioh-list-card.is-unlocked {
  border-color: rgba(56, 189, 248, 0.52);
}

.nioh-list-card.is-maxed {
  border-color: rgba(251, 191, 36, 0.62);
}

.nioh-list-stage .nioh-list-card.is-unlocked {
  border-color: rgba(56, 189, 248, 0.72);
  border-left: 4px solid #38bdf8;
  background:
    radial-gradient(ellipse at 18% 50%, rgba(56, 189, 248, 0.22) 0%, rgba(16, 36, 52, 0.14) 50%, transparent 100%),
    linear-gradient(90deg, rgba(22, 48, 66, 0.92) 0%, rgba(22, 32, 40, 0.94) 64%, rgba(14, 18, 24, 0.97) 100%);
  box-shadow: inset 0 1px 0 rgba(186, 230, 253, 0.14), 0 0 16px rgba(56, 189, 248, 0.18), 0 4px 12px rgba(0, 0, 0, 0.42);
}

.nioh-list-stage .nioh-list-card.is-unlocked .nioh-list-icon {
  border-color: #38bdf8;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.55);
}

.nioh-list-stage .nioh-list-card.is-unlocked .nioh-list-name {
  color: #e0f2fe;
  text-shadow: 0 1px 10px rgba(56, 189, 248, 0.35);
}

.nioh-list-stage .nioh-list-card.is-maxed {
  border-color: rgba(251, 191, 36, 0.78);
  border-left: 4px solid #fbbf24;
  background:
    radial-gradient(ellipse at 18% 50%, rgba(234, 179, 8, 0.26) 0%, rgba(120, 86, 28, 0.14) 50%, transparent 100%),
    linear-gradient(90deg, rgba(66, 52, 26, 0.92) 0%, rgba(36, 32, 24, 0.94) 64%, rgba(16, 16, 20, 0.97) 100%);
  box-shadow: inset 0 1px 0 rgba(254, 243, 199, 0.16), 0 0 18px rgba(251, 191, 36, 0.22), 0 4px 12px rgba(0, 0, 0, 0.45);
}

.nioh-list-stage .nioh-list-card.is-maxed .nioh-list-icon {
  border-color: #fbbf24;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.58);
}

.nioh-list-stage .nioh-list-card.is-maxed .nioh-list-name {
  color: #fde68a;
  text-shadow: 0 1px 10px rgba(251, 191, 36, 0.4);
}

.nioh-list-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.nioh-learned-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.25;
  white-space: nowrap;
}

.nioh-learned-pill.is-unlocked {
  color: #e0f2fe;
  background: rgba(14, 116, 144, 0.38);
  border: 1px solid rgba(56, 189, 248, 0.78);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}

.nioh-learned-pill.is-maxed {
  color: #fef3c7;
  background: rgba(180, 120, 20, 0.38);
  border: 1px solid rgba(251, 191, 36, 0.85);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.35);
}

.nioh-list-card.is-locked {
  opacity: 0.68;
}

.nioh-list-card.is-selected {
  opacity: 1;
  border: 1.5px solid #e6c687;
  background:
    radial-gradient(ellipse at 32% 45%, rgba(176, 146, 82, 0.34) 0%, rgba(92, 74, 38, 0.18) 46%, rgba(18, 20, 24, 0.94) 100%),
    linear-gradient(90deg, rgba(72, 62, 42, 0.92) 0%, rgba(34, 34, 36, 0.94) 68%, rgba(18, 20, 24, 0.97) 100%);
  box-shadow: 0 0 18px rgba(212, 175, 106, 0.26), inset 0 0 22px rgba(212, 175, 106, 0.15);
}

.nioh-list-icon {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  padding: 0;
  flex-shrink: 0;
  border: 2px solid rgba(212, 175, 106, 0.58);
  background: radial-gradient(circle, rgba(24, 25, 32, 0.96) 0%, rgba(10, 10, 14, 0.99) 100%);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.nioh-list-card.is-selected .nioh-list-icon {
  border-color: #fde68a;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.45);
}

.nioh-list-card.is-unlocked .nioh-list-icon {
  border-color: #38bdf8;
}

.nioh-list-card.is-maxed .nioh-list-icon {
  border-color: #fbbf24;
}

.nioh-list-icon img,
.nioh-list-icon .custom-ui-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  vertical-align: middle;
}

.nioh-list-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.nioh-list-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #e8dfd0;
  line-height: 1.25;
}

.nioh-list-card.is-selected .nioh-list-name {
  color: #f6dfa0;
  text-shadow: 0 1px 10px rgba(212, 175, 106, 0.32);
}

.nioh-list-sub {
  font-family: var(--font-body);
  font-size: 13.5px;
  color: #a8b0b3;
  letter-spacing: 0.02em;
}

.nioh-list-card.is-selected .nioh-list-sub {
  color: #d8ccb2;
}

.nioh-list-glyph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  margin-left: auto;
  color: #e8dfd0;
  opacity: 0.9;
}

.nioh-list-card.is-selected .nioh-list-glyph {
  color: #fde68a;
  opacity: 1;
}

.nioh-list-glyph-char {
  font-size: 22px;
  line-height: 1;
}

.nioh-list-glyph .nioh-list-elem-ico {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.65));
}

/* ==================== FICHA DO PERSONAGEM: CONSOLE VERTICAL ESTILO ENOTRIA ==================== */
.sh-top-hero-bar {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
  margin-bottom: 12px;
}

.sh-top-hero-switch-btn {
  width: 100%;
  height: 68px;
  min-height: 68px;
  max-height: 68px;
  min-width: 0;
  max-width: none;
  padding: 8px 14px;
  gap: 10px;
  box-sizing: border-box;
}

.sh-top-hero-switch-btn .nioh-list-body {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.sh-top-hero-switch-btn .nioh-list-name {
  font-size: 14.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sh-top-hero-switch-btn .nioh-list-sub {
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sh-top-hero-switch-btn .nioh-list-glyph {
  width: 26px;
  flex: 0 0 26px;
}

@media (max-width: 1360px) {
  .sh-top-hero-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .sh-top-hero-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .sh-top-hero-bar {
    grid-template-columns: 1fr;
  }
}

.sh-enotria-shell {
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 14px;
}

.sh-enotria-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sh-enotria-card {
  min-height: 68px;
  padding: 11px 16px;
  gap: 14px;
}

.sh-enotria-card .nioh-list-icon {
  width: 44px;
  height: 44px;
  font-size: 20px;
}

.sh-enotria-card .nioh-list-name {
  font-size: 16.5px;
}

.sh-enotria-card .nioh-list-sub {
  font-size: 13.5px;
}

.sh-enotria-card.is-action-card {
  border-color: rgba(212, 175, 106, 0.42);
}

.sh-enotria-detail {
  min-width: 0;
}

.sh-enotria-detail > .card {
  margin-top: 0 !important;
}

.sh-powers-nioh-stage {
  background: radial-gradient(circle at 50% 35%, rgba(92, 68, 28, 0.16) 0%, rgba(14, 15, 19, 0.96) 58%, rgba(7, 8, 11, 0.99) 100%);
  border: 1px solid rgba(196, 178, 138, 0.28);
  border-radius: 4px;
  padding: 14px;
}

.sh-powers-nioh-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

@media (max-width: 960px) {
  .sh-powers-nioh-cols {
    grid-template-columns: 1fr;
  }
}

.sh-powers-nioh-seq {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sh-powers-nioh-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sh-powers-nioh-group-hdr {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e6c687;
  padding: 0 4px 6px;
  border-bottom: 1px solid rgba(204, 174, 114, 0.24);
}

.sh-powers-nioh-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sh-power-nioh-card {
  cursor: default;
  align-items: center;
}

.sh-power-nioh-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.sh-power-nioh-head .spell-ico-row {
  margin-top: 0;
  justify-content: flex-end;
}

.sh-power-nioh-desc {
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.4;
  color: #d6cdbc;
  margin-top: 2px;
}

.spell-ico-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
}

.spell-ico-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  padding: 0;
  overflow: hidden;
  border: 1.5px solid var(--sp-col, rgba(167, 139, 250, 0.72));
  background: radial-gradient(circle, rgba(28, 24, 40, 0.96) 0%, rgba(10, 10, 14, 0.99) 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.72), 0 0 8px color-mix(in srgb, var(--sp-col, #a78bfa) 30%, transparent);
  cursor: help;
  flex-shrink: 0;
  transition: transform 0.14s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.spell-ico-chip:hover {
  transform: scale(1.14);
  z-index: 4;
  border-color: #fde68a;
  box-shadow: 0 0 14px color-mix(in srgb, var(--sp-col, #fde68a) 65%, transparent), 0 4px 12px rgba(0, 0, 0, 0.85);
}

.spell-ico-chip img,
.spell-ico-chip .custom-ui-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

@media (max-width: 960px) {
  .sh-powers-nioh-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1080px) {
  .sh-enotria-shell {
    grid-template-columns: 1fr;
  }
}

.nioh-mandala-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.nioh-center-orb {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 102px;
  height: 102px;
  border-radius: 50%;
  padding: 0;
  overflow: hidden;
  background: radial-gradient(circle, rgba(254, 240, 199, 0.92) 0%, rgba(212, 168, 83, 0.72) 52%, rgba(96, 64, 20, 0.35) 100%);
  border: 2px solid #fde68a;
  box-shadow: 0 0 38px rgba(251, 191, 36, 0.55), inset 0 0 18px rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  z-index: 2;
  pointer-events: none;
}

.nioh-center-orb img,
.nioh-center-orb .custom-ui-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  vertical-align: middle;
}

.nioh-node {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(24, 25, 32, 0.96) 0%, rgba(10, 10, 14, 0.99) 100%);
  border: 2px solid rgba(150, 140, 120, 0.45);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  z-index: 3;
  padding: 0;
  transition: transform 0.14s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.nioh-node:hover {
  transform: translate(-50%, -50%) scale(1.1);
  border-color: #fde68a;
}

.nioh-node img,
.nioh-node .custom-ui-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  vertical-align: middle;
}

.nioh-node.is-unlocked {
  border-color: #38bdf8;
  background: radial-gradient(circle, rgba(14, 48, 72, 0.95) 0%, rgba(9, 17, 26, 0.98) 100%);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.5), inset 0 0 8px rgba(56, 189, 248, 0.35);
}

.nioh-node.is-line-color {
  border: 2.5px solid #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.28), 0 0 16px rgba(56, 189, 248, 0.62), inset 0 0 10px rgba(56, 189, 248, 0.38);
}

.nioh-node.is-line-color .nioh-node-rank {
  border-color: rgba(56, 189, 248, 0.85);
  color: #e0f2fe;
}

.nioh-node.is-maxed {
  border-color: #fbbf24;
  background: radial-gradient(circle, rgba(78, 52, 16, 0.95) 0%, rgba(22, 15, 8, 0.98) 100%);
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.55), inset 0 0 10px rgba(251, 191, 36, 0.35);
}

.nioh-node.is-available {
  border-color: rgba(234, 179, 8, 0.72);
}

.nioh-node.is-locked {
  opacity: 0.56;
  filter: grayscale(0.45);
}

.nioh-node.is-selected {
  border-color: #fff7ed;
  box-shadow: 0 0 0 3px rgba(253, 230, 138, 0.85), 0 0 22px rgba(251, 191, 36, 0.75);
  transform: translate(-50%, -50%) scale(1.12);
}

.nioh-node-rank {
  position: absolute;
  bottom: -5px;
  right: -4px;
  padding: 1px 5px;
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  color: #fef3c7;
  background: #0d0c10;
  border: 1px solid rgba(212, 175, 106, 0.65);
  border-radius: 999px;
  line-height: 1.15;
}

/* Painel Direito (Inspetor estilo Nioh) */
.nioh-inspector {
  background: linear-gradient(180deg, rgba(16, 15, 19, 0.97), rgba(9, 8, 11, 0.99));
  border: 1px solid rgba(196, 178, 138, 0.34);
  border-radius: 4px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nioh-insp-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(196, 178, 138, 0.22);
}

.nioh-insp-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  padding: 0;
  overflow: hidden;
  background: radial-gradient(circle, rgba(36, 30, 20, 0.95), rgba(10, 10, 14, 0.98));
  border: 1.5px solid rgba(212, 175, 106, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.nioh-insp-icon img,
.nioh-insp-icon .custom-ui-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  vertical-align: middle;
}

.nioh-insp-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: #f7ebd0;
  margin: 0;
}

.nioh-insp-cost-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #c9bfa9;
  padding: 6px 0;
  border-bottom: 1px solid rgba(196, 178, 138, 0.16);
}

.nioh-insp-type-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: 13.5px;
  letter-spacing: 0.06em;
  color: #a89f8d;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(196, 178, 138, 0.16);
}

.nioh-insp-effect {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: #fbbf24;
}

.nioh-insp-desc {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: #ddd4c2;
  margin: 0;
}

.nioh-insp-benefits {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 0 0 auto;
  overflow: visible;
}

.nioh-insp-benefit-item {
  padding: 8px 10px;
  border-left: 2px solid rgba(196, 178, 138, 0.25);
  background: rgba(255, 255, 255, 0.03);
  color: #94a3b8;
  line-height: 1.45;
}

.nioh-insp-benefit-item.is-active {
  border-left-color: #fbbf24;
  color: #fef3c7;
}

.nioh-inspector .forja-craft-btn {
  margin-top: 16px;
  position: sticky;
  bottom: 8px;
  z-index: 6;
  align-self: stretch;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.82), 0 0 16px rgba(212, 168, 83, 0.16);
  backdrop-filter: blur(4px);
}

.nioh-inspector .forja-craft-btn.is-ready {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.86), 0 0 22px rgba(251, 191, 36, 0.34);
}

.nioh-insp-preview-box {
  margin-top: auto;
  height: 132px;
  border: 1px solid rgba(196, 178, 138, 0.28);
  border-radius: 3px;
  background: radial-gradient(ellipse at center, rgba(212, 168, 83, 0.18) 0%, rgba(12, 11, 16, 0.96) 72%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
}

.nioh-insp-preview-box img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.85));
}

.nioh-insp-command {
  font-family: var(--font-display);
  font-size: 13.5px;
  letter-spacing: 0.05em;
  color: #cbd5e1;
  text-align: center;
}

@media (max-width: 1024px) {
  .nioh-main-grid {
    grid-template-columns: 1fr;
  }
  .nioh-constellation-stage {
    min-height: 500px;
  }
}

.forja-detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.forja-craft-btn {
  min-width: 190px;
  padding: 11px 22px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  border-radius: 2px;
  border: 1px solid rgba(212, 184, 122, 0.55);
  background: linear-gradient(180deg, rgba(64, 46, 22, 0.9), rgba(28, 20, 11, 0.95));
  color: #f2e4c2;
  cursor: pointer;
  transition: transform 0.14s ease, filter 0.14s ease;
}

.forja-craft-btn.is-mw {
  border-color: rgba(168, 85, 247, 0.6);
  background: linear-gradient(180deg, rgba(68, 34, 96, 0.9), rgba(26, 14, 40, 0.95));
}

.forja-craft-btn.is-ready:hover {
  filter: brightness(1.16);
  transform: translateY(-1px);
}

.forja-craft-btn:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

@media (max-width: 1024px) {
  .forja-studio {
    grid-template-columns: 1fr;
  }
  .forja-grid-col {
    max-height: 320px;
    border-right: none;
    border-bottom: 1px solid rgba(196, 178, 138, 0.2);
    padding-right: 0;
    padding-bottom: 14px;
  }
}

/* ==================== BESTIÁRIO (TOMO ILUSTRADO EM PERGAMINHO) ==================== */
.best-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(12, 10, 11, 0.88);
  border: 1px solid rgba(196, 178, 138, 0.28);
  border-radius: 3px;
}

.best-tome-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.best-index-col {
  background: rgba(11, 10, 12, 0.9);
  border: 1px solid rgba(196, 178, 138, 0.28);
  border-radius: 3px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 640px;
  overflow-y: auto;
}

.best-index-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 9px;
  background: rgba(18, 15, 14, 0.92);
  border: 1px solid rgba(196, 178, 138, 0.18);
  border-radius: 2px;
  cursor: pointer;
  text-align: left;
  color: var(--text-main);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.best-index-row:hover {
  border-color: rgba(242, 232, 207, 0.55);
}

.best-index-row.is-selected {
  border: 1.5px solid #f2e8cf;
  background: linear-gradient(90deg, rgba(64, 46, 24, 0.9), rgba(22, 18, 14, 0.95));
}

.best-index-row.is-locked {
  opacity: 0.72;
}

.best-index-thumb {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: rgba(8, 7, 8, 0.95);
  border: 1px solid rgba(196, 178, 138, 0.25);
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.best-index-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.best-index-row.is-locked .best-index-thumb img {
  filter: brightness(0.16) contrast(1.2);
}

.best-index-meta {
  min-width: 0;
  flex: 1;
}

.best-index-name {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.best-index-sub {
  font-size: 13.5px;
  color: var(--text-muted);
}

/* Livro Aberto em Pergaminho Envelhecido */
.best-parchment-book {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 14px 1.12fr;
  background:
    radial-gradient(ellipse at 30% 45%, rgba(232, 216, 186, 0.97) 0%, rgba(206, 184, 144, 0.97) 58%, rgba(164, 138, 96, 0.98) 100%);
  border: 2px solid #4e3921;
  outline: 1px solid rgba(38, 26, 14, 0.55);
  outline-offset: -8px;
  border-radius: 3px;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.88), inset 0 0 46px rgba(66, 44, 20, 0.34);
  color: #21160b;
  min-height: 600px;
}

.best-page {
  padding: 26px 28px 22px;
  display: flex;
  flex-direction: column;
}

.best-spine-crease {
  background: linear-gradient(90deg, rgba(64, 42, 18, 0.06) 0%, rgba(42, 26, 10, 0.34) 50%, rgba(64, 42, 18, 0.06) 100%);
}

.best-eyebrow {
  text-align: center;
  font-family: var(--font-body);
  font-size: 19px;
  color: #362514;
  position: relative;
  padding-bottom: 6px;
}

.best-eyebrow::after {
  content: '';
  display: block;
  width: 140px;
  height: 1px;
  margin: 4px auto 0;
  background: linear-gradient(90deg, transparent, rgba(58, 38, 18, 0.65), transparent);
}

.best-monster-title {
  text-align: center;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: #191007 !important;
  text-shadow: none !important;
  text-transform: none;
  letter-spacing: 0.04em;
  margin: 4px 0 14px;
}

.best-portrait-frame {
  position: relative;
  flex: 1;
  min-height: 360px;
  background: radial-gradient(ellipse at center, rgba(24, 20, 18, 0.92) 0%, rgba(12, 10, 9, 0.98) 100%);
  border: 2px solid rgba(58, 40, 20, 0.65);
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.78), 0 6px 18px rgba(0, 0, 0, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
}

.best-portrait-frame img {
  width: 100%;
  height: 100%;
  max-height: 410px;
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.85));
}

.best-portrait-frame.is-locked img {
  filter: brightness(0.12) contrast(1.25) blur(1px);
  opacity: 0.75;
}

.best-portrait-lock {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #e2d4b7;
  text-shadow: 0 2px 10px #000;
}

.best-page-footer-mark {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 600;
  color: #3d2a16;
  display: flex;
  gap: 8px;
  align-items: center;
}

.best-right-top {
  display: block;
  margin-bottom: 16px;
}

.best-lore-text {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.5;
  color: #211509;
  margin: 0;
}

.best-mini-sketch {
  width: 124px;
  height: 124px;
  background: radial-gradient(circle, rgba(28, 22, 16, 0.88), rgba(14, 11, 9, 0.96));
  border: 1.5px solid rgba(58, 40, 20, 0.65);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.best-mini-sketch img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.best-mini-sketch.is-locked img {
  filter: brightness(0.15);
}

.best-tactical-notes {
  padding: 12px 0;
  border-top: 1px solid rgba(58, 38, 18, 0.26);
  border-bottom: 1px solid rgba(58, 38, 18, 0.26);
  margin-bottom: 14px;
}

.best-notes-title {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  color: #291a0b;
  margin-bottom: 6px;
}

.best-notes-list {
  margin: 0;
  padding-left: 18px;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.5;
  color: #26180a;
}

.best-ledger-grid {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.best-ledger-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.best-ledger-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 17px;
  color: #2b1c0d;
  border-bottom: 1px solid rgba(58, 38, 18, 0.22);
  padding-bottom: 4px;
}

.best-ledger-row strong {
  color: #191007;
  text-align: right;
}

@media (max-width: 1024px) {
  .best-tome-layout {
    grid-template-columns: 1fr;
  }
  .best-index-col {
    max-height: 220px;
  }
  .best-parchment-book {
    grid-template-columns: 1fr;
  }
  .best-spine-crease {
    height: 8px;
  }
  .best-ledger-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================== GLOSSÁRIO (CÓDICE EM COURO E PERGAMINHO) ==================== */
.main-container:has(.codex-book-wrapper) {
  max-width: 1760px !important;
  width: 100% !important;
  margin: 0 auto !important;
  min-height: calc(100vh - 58px);
  padding-bottom: 14px !important;
  display: flex;
  flex-direction: column;
  overflow-x: hidden !important;
}

.codex-book-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: calc(100vh - 88px);
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden !important;
}

.codex-book-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  padding: 0 18px;
  margin-bottom: -2px;
  position: relative;
  z-index: 10;
  max-width: 100%;
}

.codex-book-tab {
  position: relative;
  z-index: 11;
  pointer-events: auto;
  padding: 8px 15px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid #4a351e;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #5d452a, #3e2c19);
  color: #cbb58e;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.codex-book-tab:hover {
  color: #fff2d4;
}

.codex-book-tab.is-active {
  background: linear-gradient(180deg, #e5d2ab, #cfb787);
  color: #24160a;
  font-weight: 700;
  border-color: #7c5c34;
}

.codex-leather-book {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #2d1b0f 0%, #1a0f08 55%, #2b190d 100%);
  border: 2px solid #5b3e22;
  border-radius: 6px;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.9), inset 0 0 24px rgba(0, 0, 0, 0.78);
}

.codex-parchment-spread {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) 18px minmax(0, 1.25fr);
  flex: 1;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden !important;
  background:
    radial-gradient(ellipse at 32% 45%, rgba(235, 219, 184, 0.98) 0%, rgba(209, 185, 140, 0.98) 62%, rgba(168, 140, 94, 0.99) 100%);
  border: 1px solid #6b4e2b;
  border-radius: 3px;
  box-shadow: inset 0 0 42px rgba(68, 44, 18, 0.34);
  min-height: calc(100vh - 150px);
  color: #23160a;
}

.codex-page {
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 152px);
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden !important;
  overflow-y: hidden;
  position: relative;
  z-index: 2;
}

.codex-search-wrap input {
  width: 100%;
  background: rgba(244, 232, 206, 0.82) !important;
  border: 1px solid rgba(92, 64, 32, 0.48) !important;
  color: #23160a !important;
  font-family: var(--font-body);
  font-size: 16.5px;
}

.codex-search-wrap input::placeholder {
  color: rgba(58, 38, 18, 0.6);
}

.codex-spell-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.codex-mini-select {
  padding: 6px 9px;
  background: rgba(244, 232, 206, 0.85);
  border: 1px solid rgba(92, 64, 32, 0.45);
  border-radius: 3px;
  color: #23160a;
  font-family: var(--font-display);
  font-size: 13.5px;
}

.codex-toc-scroll {
  flex: 1;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  overflow-y: auto;
  overflow-x: hidden !important;
  padding-right: 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.codex-chapter-btn {
  position: relative;
  z-index: 5;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  background: transparent;
  border: none;
  padding: 3px 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: #7a2018;
  letter-spacing: 0.05em;
  cursor: pointer;
  text-align: left;
}

.codex-chap-arrow {
  font-size: 13px;
}

.codex-chapter-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 14px;
  margin-top: 4px;
}

.codex-toc-item {
  position: relative;
  z-index: 5;
  pointer-events: auto;
  width: 100%;
  max-width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 5px 10px;
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 17.5px;
  font-weight: 600;
  color: #2c1c0d;
  cursor: pointer;
  white-space: normal;
  overflow-wrap: anywhere;
  transition: background 0.14s ease, color 0.14s ease;
}

.codex-toc-item:hover {
  background: rgba(96, 112, 48, 0.22);
}

.codex-toc-item.is-selected {
  background: linear-gradient(90deg, rgba(98, 114, 48, 0.86) 0%, rgba(124, 138, 72, 0.42) 78%, transparent 100%);
  color: #f8f2de;
}

.codex-toc-icon {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  border: 1px solid rgba(92, 64, 32, 0.65);
  object-fit: cover;
  flex-shrink: 0;
  background: #140e09;
  display: block;
}

.codex-toc-icon.is-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: rgba(28, 20, 12, 0.82);
}

.codex-toc-text {
  min-width: 0;
  flex: 1;
}

.codex-spine-col {
  pointer-events: none;
  background: linear-gradient(90deg, rgba(58, 36, 14, 0.08) 0%, rgba(36, 20, 8, 0.42) 50%, rgba(58, 36, 14, 0.08) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  padding: 40px 0;
}

.codex-ring {
  width: 18px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #9c9282, #3c362e 55%, #786e60);
  border: 1px solid #1e1812;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.65);
}

.codex-entry-title {
  text-align: center;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: #7a2018 !important;
  text-shadow: none !important;
  text-transform: none;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(92, 64, 32, 0.25);
}

.codex-entry-body {
  font-family: var(--font-body);
  font-size: 18.5px;
  line-height: 1.55;
  color: #211509;
  flex: 1;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  overflow-y: auto;
  overflow-x: hidden !important;
  overflow-wrap: anywhere;
  word-break: break-word;
  padding-right: 6px;
}

.codex-entity-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(92, 64, 32, 0.08);
  border: 1px solid rgba(92, 64, 32, 0.28);
  margin-bottom: 14px;
  cursor: help;
}

.codex-subhead {
  font-family: var(--font-display);
  font-size: 17px;
  color: #6e1d15 !important;
  text-shadow: none !important;
  margin: 14px 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px dashed rgba(92, 64, 32, 0.3);
}

.codex-bullet-list {
  margin: 0 0 12px 18px;
  padding: 0;
  color: #211509;
  font-size: 15.5px;
  line-height: 1.5;
}

.codex-bullet-list li {
  margin-bottom: 4px;
}

.codex-entity-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.codex-entity-card {
  padding: 11px 13px;
  border-radius: 9px;
  background: rgba(255, 248, 232, 0.55);
  border: 1px solid rgba(92, 64, 32, 0.3);
  border-left: 4px solid #7a2018;
  cursor: help;
  transition: background 0.15s ease, transform 0.15s ease;
}

.codex-entity-card:hover {
  background: rgba(255, 248, 232, 0.85);
}

.codex-entity-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.codex-entry-body .small,
.codex-entry-body p,
.codex-entry-body li {
  font-size: 17px !important;
  line-height: 1.55;
}

.codex-entry-body .tag,
.codex-entry-body .elem-pill {
  font-size: 13px;
}

.codex-entry-body .muted {
  color: #4a341c !important;
}

.codex-entry-body h3,
.codex-entry-body h4 {
  color: #6e1d15;
  font-family: var(--font-display);
}

.codex-entry-body strong {
  color: #180e05;
}

.codex-entry-body code {
  background: rgba(92, 64, 32, 0.15);
  color: #5b1812;
  padding: 1px 5px;
  border-radius: 3px;
}

.codex-entry-body .tag {
  background: rgba(92, 64, 32, 0.14);
  border-color: rgba(92, 64, 32, 0.42);
  color: #2b1a0b;
}

.codex-entry-body .tag.codex-dark-pill,
.codex-entry-body .elem-pill {
  background: rgba(24, 16, 10, 0.9) !important;
  border: 1px solid rgba(92, 64, 32, 0.55);
}

.codex-entry-body .tree-node {
  background: rgba(246, 236, 212, 0.78) !important;
  border: 1px solid rgba(108, 76, 38, 0.38) !important;
  color: #211509 !important;
  box-shadow: 0 1px 4px rgba(58, 36, 14, 0.12);
}

.codex-entry-body .spell-codex-meta {
  background: rgba(112, 78, 38, 0.09);
  border: 1px solid rgba(92, 64, 32, 0.25);
  border-radius: 4px;
  padding: 10px 12px;
  color: #211509;
  font-size: 16.5px;
  line-height: 1.5;
}

.codex-entry-body .spell-codex-card .small,
.codex-entry-body .codex-status-box,
.codex-entry-body .codex-tip-box {
  font-size: 17.5px !important;
  line-height: 1.58;
}

.codex-entry-body .spell-codex-card .tag,
.codex-entry-body .spell-codex-card .elem-pill {
  font-size: 13.5px;
}

.codex-formula-box {
  padding: 10px 12px;
  background: rgba(112, 78, 38, 0.14);
  border: 1px solid rgba(112, 78, 38, 0.44);
  border-radius: 4px;
  margin-bottom: 10px;
  color: #5c1911;
}

.codex-status-box {
  padding: 8px 10px;
  background: rgba(92, 64, 32, 0.12);
  border-left: 3px solid var(--st-color, #7a2018);
  border-radius: 4px;
  color: #211509;
}

.codex-tip-box {
  padding: 8px 10px;
  background: rgba(146, 104, 38, 0.15);
  border: 1px solid rgba(126, 86, 28, 0.36);
  border-radius: 4px;
  color: #2d1b0a;
}

.codex-empty {
  font-family: var(--font-body);
  font-size: 17px;
  color: #4a341c;
  font-style: italic;
}

/* Botões Desfazer PE no Jornal (pergaminho com texto vermelho-escuro nítido) */
.jrn-undo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 4px;
  border: 1.5px solid #8b1e1e;
  background: linear-gradient(180deg, #f5ddd0 0%, #e4b9a6 100%);
  color: #5c0d0d;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-shadow: none;
  box-shadow: inset 0 1px 0 rgba(255, 246, 240, 0.7), 0 2px 6px rgba(68, 18, 12, 0.18);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.13s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.jrn-undo-btn:hover {
  background: linear-gradient(180deg, #f2cfc0 0%, #d89b86 100%);
  border-color: #6b0f0f;
  color: #450707;
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 246, 240, 0.65), 0 4px 10px rgba(92, 13, 13, 0.28);
}

.jrn-undo-btn.jrn-undo-btn-lg {
  padding: 7px 14px;
  font-size: 13.5px;
  white-space: normal;
  text-align: left;
}

.jrn-undo-btn.jrn-top-undo-btn {
  padding: 5px 12px;
  font-size: 13.5px;
  border-color: #a62c2c;
  box-shadow: inset 0 1px 0 rgba(255, 245, 238, 0.65), 0 2px 8px rgba(0, 0, 0, 0.45);
}

.jrn-undo-btn.is-low-po {
  opacity: 0.72;
  filter: saturate(0.75);
}

@media (max-width: 960px) {
  .codex-parchment-spread {
    grid-template-columns: 1fr;
  }
  .codex-spine-col {
    flex-direction: row;
    padding: 8px 0;
  }
}


/* ============================================================================
   CRIAÇÃO DE PERSONAGEM — DESIGN UNIFICADO COM A FICHA DO PERSONAGEM
   ============================================================================ */
.cr-top-bar {
  margin-bottom: 14px;
  width: 100%;
}

.cr-top-bar #btn-finish-create-top {
  margin-left: auto;
  margin-right: 26px;
  width: 325px;
  min-width: 280px;
  max-width: 325px;
}

.cr-quickstart-drawer {
  padding: 18px 20px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(16, 13, 12, 0.94) 0%, rgba(9, 8, 9, 0.97) 100%);
  border: 1px solid rgba(204, 174, 114, 0.36);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.72), 0 12px 30px rgba(0, 0, 0, 0.75);
}

.cr-showcase {
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr) minmax(280px, 325px);
  gap: 24px;
  padding: 24px 26px;
  align-items: start;
}

/* Colunas laterais transparentes e limpas, idênticas à Ficha do Personagem */
.cr-left-col,
.cr-right-col {
  padding: 6px 10px;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  gap: 10px;
}

.cr-left-col {
  padding-right: 18px;
  border-right: 1px solid rgba(204, 174, 114, 0.18) !important;
}

.cr-right-col {
  padding-left: 18px;
  border-left: 1px solid rgba(204, 174, 114, 0.18) !important;
}

.cr-left-col .sh-divider,
.cr-right-col .sh-divider {
  margin: 10px 0;
}

/* Retrato limpo na coluna esquerda */
.cr-portrait-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 12px 8px 4px;
}

.cr-portrait-aura {
  position: absolute;
  top: 6px;
  width: 174px;
  height: 174px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 92, 0.26) 0%, transparent 72%);
  pointer-events: none;
}

.cr-portrait-img {
  position: relative;
  z-index: 1;
  display: block;
  width: 164px;
  height: 164px;
  object-fit: cover;
  object-position: center 15%;
  border-radius: 50%;
  padding: 0;
  overflow: hidden;
  background: radial-gradient(circle at 35% 30%, rgba(44, 34, 22, 0.88), rgba(10, 9, 11, 0.96));
  border: 1.5px solid rgba(218, 186, 118, 0.7);
  box-shadow: 0 0 0 4px rgba(12, 10, 12, 0.92), 0 8px 24px rgba(0, 0, 0, 0.78);
}

.cr-portrait-btns {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cr-sec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cr-mini-tag {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  color: #86efac;
  padding: 1px 5px;
  border-radius: 2px;
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(74, 222, 128, 0.35);
}

.cr-pts-pill {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 2px;
  color: #f3dfb3;
  background: rgba(212, 175, 92, 0.14);
  border: 1px solid rgba(212, 175, 92, 0.45);
}

.cr-pts-pill.is-done {
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(74, 222, 128, 0.42);
}

.cr-pts-pill.is-pe {
  color: #ddd6fe;
  background: rgba(147, 51, 234, 0.16);
  border-color: rgba(192, 132, 252, 0.48);
  padding: 4px 10px;
  font-size: 13.5px;
}

/* Arsenal compacto na coluna esquerda */
.cr-gear-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cr-gear-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 8px;
  border-radius: 3px;
  background: rgba(12, 11, 13, 0.55);
  border: 1px solid rgba(196, 178, 138, 0.2);
  font-size: 13.5px;
  color: #e4d8be;
  transition: border-color 0.16s ease;
}

.cr-gear-row:hover {
  border-color: rgba(230, 198, 135, 0.55);
}

.cr-gear-row img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 3px;
  flex-shrink: 0;
}

.cr-concept-note {
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text-muted);
}

.cr-concept-note strong {
  color: #e6c687;
}

/* Coluna Central — Fluxo de Criação */
.cr-center-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 20px;
  padding: 4px 4px 0;
}

/* Stepper limpo estilo Ficha */
.cr-stepper-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 0;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(204, 174, 114, 0.24);
}

.cr-step-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 8px;
  border-radius: 3px;
  background: rgba(14, 12, 13, 0.62);
  border: 1px solid rgba(196, 178, 138, 0.22);
  color: var(--stone-text);
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.cr-step-tab:hover {
  border-color: rgba(218, 186, 118, 0.55);
  color: var(--gold-bright);
  transform: none;
}

.cr-step-tab.active {
  border-color: #e6c687;
  background: linear-gradient(180deg, rgba(64, 50, 26, 0.58) 0%, rgba(20, 16, 12, 0.92) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 244, 210, 0.18), 0 0 14px rgba(212, 175, 106, 0.16);
  color: #f3dfb3;
}

.cr-step-tab.done {
  border-color: rgba(196, 178, 138, 0.36);
  color: #d7c399;
}

.cr-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(10, 9, 11, 0.85);
  border: 1px solid rgba(204, 174, 114, 0.45);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cr-step-tab.active .cr-step-num {
  border-color: #f3dfb3;
  background: #d4b26a;
  color: #141008;
}

.cr-step-tab.done .cr-step-num {
  border-color: rgba(134, 239, 172, 0.55);
  color: #86efac;
}

.cr-step-title {
  font-family: var(--font-display);
  font-size: 13.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Corpo das Etapas com espaçamento respirável */
.cr-step-body {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cr-step-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cr-step-divider {
  margin: 18px 0 !important;
}

.cr-identity-grid {
  gap: 18px;
}

.cr-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cr-input {
  padding: 10px 14px !important;
  font-size: 16.5px !important;
  border-radius: 3px !important;
  border: 1px solid rgba(196, 178, 138, 0.34) !important;
  background: rgba(10, 9, 11, 0.86) !important;
  color: #f2e8cf !important;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.cr-input:focus {
  border-color: #e6c687 !important;
  box-shadow: 0 0 0 2px rgba(212, 175, 106, 0.2) !important;
}

/* Grade de Ícones (Culturas, Classes, Caminhos) refinada */
.cr-showcase .cr-icon-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(106px, 1fr));
  gap: 12px;
  padding: 2px 0;
}

.cr-showcase .cr-icon-tile {
  padding: 12px 8px;
  gap: 8px;
  border-radius: 4px;
  background: rgba(12, 11, 13, 0.62);
  border: 1px solid rgba(196, 178, 138, 0.2);
}

.cr-showcase .cr-icon-tile:hover {
  border-color: rgba(230, 198, 135, 0.6);
  background: rgba(26, 22, 18, 0.82);
}

.cr-showcase .cr-icon-tile.selected {
  border: 1.5px solid #e6c687;
  background: radial-gradient(circle at 50% 35%, rgba(196, 162, 86, 0.22), rgba(14, 12, 10, 0.92));
  box-shadow: 0 0 16px rgba(212, 175, 106, 0.24), inset 0 0 10px rgba(212, 175, 106, 0.1);
}

.cr-showcase .cr-icon-tile-ring {
  width: 58px;
  height: 58px;
  border-color: rgba(196, 178, 138, 0.38);
}

.cr-showcase .cr-icon-tile.selected .cr-icon-tile-ring {
  border-color: #f3dfb3;
  box-shadow: 0 0 12px rgba(230, 198, 135, 0.36);
}

/* Cards limpos (Subcultura, Tipo, Função) */
.cr-subculture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  width: 100%;
  align-items: stretch;
  gap: 14px;
}

.cr-choice-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cr-clean-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  width: 100%;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 4px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-main);
  background: rgba(12, 11, 13, 0.64);
  border: 1px solid rgba(196, 178, 138, 0.22);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.cr-clean-card:hover:not(.is-disabled) {
  border-color: rgba(230, 198, 135, 0.58);
  background: rgba(24, 20, 16, 0.8);
}

.cr-clean-card.selected {
  border-color: #e6c687;
  background: linear-gradient(180deg, rgba(54, 42, 22, 0.55) 0%, rgba(16, 14, 12, 0.92) 100%);
  box-shadow: 0 0 14px rgba(212, 175, 106, 0.18), inset 0 1px 0 rgba(255, 245, 215, 0.14);
}

.cr-clean-card.is-disabled {
  opacity: 0.42;
}

.cr-clean-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cr-clean-card-head strong {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: #f2e8cf;
}

.cr-clean-card.selected .cr-clean-card-head strong {
  color: #f6dfa0;
}

.cr-bonus-tag {
  font-family: var(--font-display);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 2px;
  color: #e6c687;
  background: rgba(212, 175, 92, 0.12);
  border: 1px solid rgba(212, 175, 92, 0.35);
  white-space: nowrap;
}

.cr-bonus-tag.is-ok {
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(74, 222, 128, 0.36);
}

.cr-clean-card-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-muted);
}

/* Etapa 2: Atributos & Arquétipos */
.cr-preset-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.cr-attr-grid,
.cr-role-grid,
.cr-grade-grid {
  gap: 14px;
}

.cr-showcase .cr-attr-card {
  display: flex;
  flex-direction: column;
  padding: 15px 16px;
  border-radius: 4px;
  background: rgba(12, 11, 13, 0.64);
  border: 1px solid rgba(196, 178, 138, 0.26);
}

.cr-attr-title {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cr-step-ctrl {
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  font-size: 15px !important;
}

.cr-showcase .cr-attr-num {
  min-width: 26px;
  text-align: center;
  font-size: 21px;
}

.cr-attr-desc {
  margin: 0 0 10px;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--text-muted);
}

.cr-attr-tt-trigger {
  cursor: help;
}

.cr-arch-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
}

.cr-showcase .cr-arch-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 6px;
  margin-bottom: 0;
  border-radius: 3px;
  background: rgba(10, 9, 11, 0.65);
  border: 1px solid rgba(196, 178, 138, 0.18);
  text-align: center;
  cursor: pointer;
}

.cr-showcase .cr-arch-option input {
  margin: 0;
  accent-color: #d4b26a;
  flex-shrink: 0;
}

.cr-showcase .cr-arch-option span {
  font-family: var(--font-display);
  font-size: 13.5px;
  letter-spacing: 0.04em;
  color: #e4d8be;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cr-showcase .cr-arch-option.selected span {
  color: #f6dfa0;
}

.cr-showcase .cr-arch-option.selected {
  border-color: rgba(230, 198, 135, 0.72);
  background: rgba(54, 42, 22, 0.42);
}

.cr-showcase .cr-arch-option strong {
  font-family: var(--font-display);
  font-size: 13.5px;
  color: #f2e8cf;
}

/* Etapa 4: Combatividade & Resistências */
.cr-grade-card {
  padding: 12px 14px;
  border-radius: 4px;
  background: rgba(12, 11, 13, 0.64);
  border: 1px solid rgba(196, 178, 138, 0.22);
  transition: border-color 0.16s ease, background 0.16s ease;
}

.cr-grade-card.has-grade {
  border-color: #e6c687;
  background: linear-gradient(90deg, rgba(212, 175, 106, 0.16) 0%, rgba(16, 14, 12, 0.88) 100%);
}

.cr-grade-name {
  display: block;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cr-grade-num {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: #f3dfb3;
  min-width: 18px;
  text-align: center;
}

/* Etapa 5: Arsenal Inicial limpo */
.cr-showcase .cr-selected-loadout-strip {
  gap: 10px;
  margin-top: 6px;
}

.cr-showcase .cr-loadout-pill {
  border-radius: 4px;
  padding: 9px 12px;
  background: rgba(12, 11, 13, 0.72);
  border: 1px solid rgba(196, 178, 138, 0.24);
}

.cr-showcase .cr-loadout-pill.active,
.cr-showcase .cr-loadout-pill:hover {
  border-color: #e6c687;
  background: rgba(46, 36, 20, 0.58);
}

.cr-equip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 12px;
}

.cr-equip-tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 13px 14px;
  border-radius: 4px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-main);
  background: rgba(12, 11, 13, 0.66);
  border: 1px solid rgba(196, 178, 138, 0.22);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.cr-equip-tile:hover:not(:disabled) {
  border-color: rgba(230, 198, 135, 0.62);
  background: rgba(24, 20, 16, 0.84);
}

.cr-equip-tile.selected {
  border-color: #e6c687;
  background: linear-gradient(180deg, rgba(54, 42, 22, 0.56) 0%, rgba(16, 14, 12, 0.94) 100%);
  box-shadow: 0 0 16px rgba(212, 175, 106, 0.2);
}

.cr-equip-tile.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.cr-equip-tile-head {
  display: flex;
  align-items: center;
  gap: 11px;
}

.cr-equip-tile-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 4px;
  padding: 3px;
  background: rgba(8, 7, 10, 0.9);
  border: 1px solid rgba(196, 178, 138, 0.4);
  flex-shrink: 0;
}

.cr-equip-tile-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.cr-equip-tile-name {
  font-family: var(--font-display);
  font-size: 13.5px;
  color: #f2e8cf;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cr-equip-tile.selected .cr-equip-tile-name {
  color: #f6dfa0;
}

.cr-equip-tile-stats {
  font-size: 13.5px;
  color: #d7c399;
}

.cr-equip-tile-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-muted);
}

.cr-starter-kit-note {
  padding: 12px 14px;
  border-radius: 4px;
  background: rgba(12, 11, 13, 0.58);
  border: 1px solid rgba(196, 178, 138, 0.2);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-muted);
}

.cr-starter-kit-note strong {
  color: #f2e8cf;
}

/* Rodapé de Navegação */
.cr-showcase .cr-footer-bar {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(204, 174, 114, 0.22);
}

.cr-footer-step-info {
  font-family: var(--font-display);
  font-size: 13.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone-text);
}

.cr-footer-step-info strong {
  color: #f3dfb3;
}

/* Coluna Direita — Detalhes da Escolha (estilo Ficha) */
.cr-right-header {
  gap: 4px;
}

.cr-right-header .cr-right-emblem-ring,
.cr-right-header .cr-right-emblem-box.is-path-box {
  width: 72px;
  height: 72px;
  margin-bottom: 6px;
}

.cr-right-header .cr-right-dual-emblems {
  gap: 10px;
  margin-bottom: 6px;
}

.cr-right-header .cr-right-dual-emblems .cr-right-emblem-ring,
.cr-right-header .cr-right-dual-emblems .cr-right-emblem-box.is-path-box {
  width: 68px;
  height: 68px;
  margin-bottom: 0;
  flex-shrink: 0;
}

.cr-right-col .cr-right-lore {
  margin-top: 6px;
  font-size: 13.5px !important;
  line-height: 1.45;
  color: var(--text-muted);
  text-align: center;
}

.cr-right-note {
  font-size: 13px;
  line-height: 1.45;
  padding: 9px 11px;
  border-radius: 3px;
  background: rgba(12, 11, 13, 0.55);
  border: 1px solid rgba(196, 178, 138, 0.18);
  color: var(--text-main);
}

.cr-right-note strong {
  color: #f2e8cf;
}

.cr-right-note.is-path {
  border-color: rgba(212, 175, 106, 0.36);
  background: rgba(34, 28, 18, 0.42);
}

.cr-right-col .cr-right-ability-chip {
  padding: 4px 8px;
  border-radius: 3px;
  background: rgba(12, 11, 13, 0.62);
  border: 1px solid rgba(196, 178, 138, 0.22);
}

.cr-right-col .cr-right-ability-chip:hover {
  border-color: #e6c687;
  background: rgba(36, 28, 18, 0.78);
}

@media (max-width: 1320px) {
  .cr-top-bar #btn-finish-create-top {
    margin-left: 0;
    margin-right: 0;
    width: auto;
    max-width: 420px;
  }
  .cr-showcase {
    grid-template-columns: minmax(250px, 280px) minmax(0, 1fr);
  }
  .cr-right-col {
    grid-column: 1 / -1;
    border-left: none !important;
    border-top: 1px solid rgba(204, 174, 114, 0.2) !important;
    padding-left: 10px;
    padding-top: 18px;
  }
}

@media (max-width: 960px) {
  .cr-showcase {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px;
    gap: 12px;
    align-items: start;
  }
  .cr-center-col {
    grid-column: 1 / -1;
    order: 1;
    padding: 0 0 12px;
    border-bottom: 1px solid rgba(204, 174, 114, 0.22);
  }
  .cr-left-col {
    order: 2;
    min-width: 0;
    border-right: 1px solid rgba(204, 174, 114, 0.2) !important;
    border-bottom: none !important;
    padding-right: 10px;
    padding-bottom: 10px;
  }
  .cr-right-col {
    order: 3;
    grid-column: auto !important;
    min-width: 0;
    border-left: none !important;
    border-top: none !important;
    padding-left: 10px;
    padding-top: 4px;
  }
  .cr-stepper-bar {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
    padding-bottom: 12px;
  }
  .cr-step-tab {
    flex-direction: column;
    gap: 4px;
    padding: 8px 4px;
  }
  .cr-step-title {
    font-size: 12px;
    letter-spacing: 0.03em;
  }
}

/* Barra de Progresso Dinâmica e Textos Ampliados na Criação */
.cr-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 4px;
  background: rgba(12, 11, 14, 0.72);
  border: 1px solid rgba(204, 174, 114, 0.28);
}
.cr-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  color: #e6d7b8;
}
.cr-progress-head strong {
  color: #f6dfa0;
}
.cr-progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  border: 1px solid rgba(204, 174, 114, 0.22);
}
.cr-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #b88b3a 0%, #f3d285 100%);
  transition: width 0.28s ease;
}
.cr-step-alert {
  font-size: 14.5px !important;
  line-height: 1.5;
}
.cr-clean-card-head strong {
  font-size: 15.5px !important;
}
.cr-clean-card-desc,
.cr-attr-desc,
.cr-equip-tile-desc,
.cr-starter-kit-note,
.cr-right-lore,
.cr-right-note {
  font-size: 14.5px !important;
  line-height: 1.5 !important;
}
.cr-equip-tile-name {
  font-size: 15px !important;
}
.cr-equip-tile-stats,
.cr-concept-note,
.cr-footer-step-info {
  font-size: 13.5px !important;
}


/* ============================================================================
   TOOLTIPS GLOBAIS PADRONIZADOS (FONTE ÚNICA DE 22px PARA TEXTOS E NÚMEROS)
   ============================================================================ */
#item-tooltip-layer {
  max-width: min(1120px, calc(100vw - 20px));
}

.tt-pair {
  gap: 16px;
}

.tt-card {
  width: 520px;
  max-width: calc(100vw - 24px);
  padding: 20px 24px;
}

.tt-card.tt-card-info {
  width: 460px;
  max-width: calc(100vw - 24px);
  padding: 18px 22px;
}

.tt-top-tag,
.tt-card.tt-card-info .tt-top-tag,
.tt-name,
.tt-card.tt-card-info .tt-name,
.tt-meta,
.tt-elem,
.tt-elem-res,
.tt-stat-row,
.tt-stat-lbl,
.tt-stat-val,
.tt-diff,
.tt-desc,
.tt-desc.tt-desc-info,
.tt-footer,
.tt-hint,
.tt-card .tt-num {
  font-size: 22px !important;
  line-height: 1.4 !important;
}

.tt-top-tag {
  margin-bottom: 10px;
  padding-bottom: 8px;
}

.tt-card.tt-card-info .tt-top-tag {
  margin-bottom: 10px;
  padding-bottom: 6px;
}

.tt-header {
  gap: 14px;
  margin-bottom: 12px;
}

.tt-icon-frame {
  width: 68px;
  height: 68px;
  padding: 5px;
}

.tt-card.tt-card-info .tt-name {
  margin-bottom: 8px !important;
}

.tt-meta {
  margin-top: 4px;
}

.tt-elem,
.tt-elem-res {
  margin-bottom: 10px;
}

.tt-elem-ico {
  width: 22px;
  height: 22px;
}

.tt-stats {
  gap: 8px;
  padding: 11px 0;
  margin-bottom: 12px;
}

.tt-diff {
  padding: 2px 7px;
}

.tt-desc {
  margin-bottom: 12px;
}

.tt-desc.tt-desc-info {
  margin-bottom: 0;
}

.tt-footer {
  padding-top: 10px;
}

.tt-card .tt-num {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}


/* ============================================================================
   FORJA, ALQUIMIA & MERCADO — PAINEL DIREITO (+50% FONTES DE TEXTOS E NÚMEROS)
   ============================================================================ */
.forja-studio .forja-detail-col .forja-detail-title {
  font-size: 22px;
  line-height: 1.22;
  white-space: normal;
  overflow-wrap: anywhere;
}

.forja-studio .forja-detail-col .forja-detail-sub {
  font-size: 20px;
  line-height: 1.4;
}

.forja-studio .forja-detail-col .forja-detail-desc {
  font-size: 25px;
  line-height: 1.45;
}

.forja-studio .forja-detail-col .forja-req-item {
  font-size: 24px;
}

.forja-studio .forja-detail-col .merch-price-display {
  font-size: 30px;
  gap: 8px;
}

.forja-studio .forja-detail-col .merch-price-display img {
  width: 32px;
  height: 32px;
}

.forja-studio .forja-detail-col .alq-stats-row .tag {
  font-size: 17.5px;
  padding: 5px 12px;
}

.forja-studio .forja-detail-col .forja-craft-btn {
  font-size: 20px;
  padding: 13px 26px;
}


/* ============================================================================
   MISSÕES, BESTIÁRIO & GLOSSÁRIO — DESCRIÇÕES (+30% FONTES DE TEXTOS E NÚMEROS)
   ============================================================================ */
.codex-entry-title {
  font-size: 31px;
}

.codex-entry-body {
  font-size: 24px;
  line-height: 1.5;
}

.codex-entry-body .small,
.codex-entry-body p,
.codex-entry-body li,
.codex-entry-body .codex-quest-step {
  font-size: 22px !important;
  line-height: 1.5 !important;
}

.codex-entry-body h3 {
  font-size: 24px;
}

.codex-entry-body h4 {
  font-size: 21px;
}

.codex-entry-body .tag,
.codex-entry-body .elem-pill {
  font-size: 17px !important;
  padding: 4px 10px;
}

.codex-entry-body .spell-codex-meta {
  font-size: 21.5px;
  line-height: 1.48;
}

.codex-entry-body .spell-codex-card .small,
.codex-entry-body .codex-status-box,
.codex-entry-body .codex-tip-box {
  font-size: 23px !important;
  line-height: 1.52 !important;
}

.codex-entry-body .spell-codex-card .tag,
.codex-entry-body .spell-codex-card .elem-pill {
  font-size: 17.5px !important;
}

.codex-entry-body .codex-formula-box {
  font-size: 24px;
}

.codex-entry-body .inv-qty-badge {
  font-size: 15px;
}

/* Bestiário — página direita alinhada à esquerda com espaçamento aprimorado */
.best-page-right {
  text-align: left;
  gap: 16px;
}

.best-right-top {
  margin-bottom: 2px;
}

.best-lore-text {
  font-size: 22px;
  line-height: 1.58;
  text-align: left;
}

.best-tactical-notes {
  padding: 16px 0;
  margin-bottom: 2px;
  text-align: left;
}

.best-notes-title {
  font-size: 19px;
  margin-bottom: 10px;
  text-align: left;
  letter-spacing: 0.04em;
}

.best-notes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 20px;
  font-size: 21px;
  line-height: 1.55;
  text-align: left;
}

.best-ledger-grid {
  gap: 16px 24px;
  padding-top: 4px;
}

.best-ledger-col {
  gap: 10px;
}

.best-ledger-row {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 2px;
  padding-bottom: 8px;
  text-align: left;
  font-size: 20px;
  line-height: 1.38;
}

.best-ledger-row span {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5c3d1e;
}

.best-ledger-row strong {
  display: block;
  width: 100%;
  text-align: left;
  font-size: 20px;
  font-weight: 600;
  color: #191007;
}


/* ============================================================================
   TOOLTIP DE MONSTROS — TEXTOS ALINHADOS À ESQUERDA PARA MELHOR LEITURA
   ============================================================================ */
.tt-card.tt-card-monster {
  text-align: left;
}

.tt-card.tt-card-monster .tt-top-tag,
.tt-card.tt-card-monster .tt-name,
.tt-card.tt-card-monster .tt-meta,
.tt-card.tt-card-monster .tt-desc {
  text-align: left;
}

.tt-card.tt-card-monster .tt-stats {
  gap: 10px;
}

.tt-card.tt-card-monster .tt-stat-row {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 2px;
  text-align: left;
}

.tt-card.tt-card-monster .tt-stat-lbl {
  color: var(--gold);
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  text-align: left;
}

.tt-card.tt-card-monster .tt-stat-val {
  display: block;
  width: 100%;
  text-align: left;
  font-weight: 500;
  color: #f4ecd8;
}

.tt-card.tt-card-monster .tt-footer.tt-footer-rich {
  justify-content: flex-start;
  text-align: left;
}

/* ==================== TOOLTIP DO RELÓGIO & CALENDÁRIO (ALINHAMENTO LIMPO) ==================== */
.tt-card.tt-card-clock {
  min-width: 340px;
  max-width: 420px;
}

.tt-card.tt-card-clock .tt-header {
  display: block;
  text-align: center;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(218, 188, 122, 0.25);
}

.tt-card.tt-card-clock .tt-name {
  text-align: center;
  line-height: 1.25;
}

.tt-card.tt-card-clock .tt-meta {
  text-align: center;
  margin-top: 4px;
  color: var(--text-main);
  opacity: 0.9;
}

.tt-card.tt-card-clock .tt-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.tt-card.tt-card-clock .tt-stat-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 5px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(218, 188, 122, 0.12);
}

.tt-card.tt-card-clock .tt-stat-lbl {
  text-align: left;
  white-space: nowrap;
  color: var(--text-muted);
}

.tt-card.tt-card-clock .tt-stat-val {
  text-align: right;
  justify-content: flex-end;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.tt-card.tt-card-clock .tt-footer.tt-footer-rich {
  justify-content: center;
  text-align: center;
  margin-top: 6px;
  padding-top: 8px;
}


/* ============================================================================
   MAPA — BARRAS DE VITALIDADE E VIGOR ESTILO COMBATE NO TOPO DIREITO
   ============================================================================ */
.map-top-right-hud {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Destaque premium para PE e PO no topo do Mapa */
.map-currency-hud {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.map-currency-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(203, 184, 144, 0.45);
  background: linear-gradient(145deg, rgba(22, 18, 24, 0.94), rgba(11, 9, 13, 0.96));
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  min-width: 104px;
  text-align: center;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.map-currency-badge:hover {
  transform: translateY(-1px);
}

.map-currency-badge .mcb-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 16px;
  flex-shrink: 0;
}

.map-currency-badge .mcb-icon img {
  width: 24px !important;
  height: 24px !important;
  object-fit: contain;
}

.map-currency-badge .mcb-text {
  display: flex;
  flex-direction: column;
  line-height: 1.08;
}

.map-currency-badge .mcb-label {
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.85;
}

.map-currency-badge .mcb-value {
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.map-currency-badge .mcb-value small {
  font-size: 13px;
  font-weight: 700;
  opacity: 0.9;
}

.map-currency-pe {
  border-color: rgba(168, 85, 247, 0.68);
  background: linear-gradient(145deg, rgba(44, 22, 66, 0.92), rgba(16, 10, 26, 0.96));
  box-shadow: 0 4px 16px rgba(88, 28, 135, 0.42), inset 0 1px 0 rgba(216, 180, 254, 0.22);
}

.map-currency-pe .mcb-icon {
  background: rgba(168, 85, 247, 0.22);
  border: 1px solid rgba(192, 132, 252, 0.45);
  color: #e9d5ff;
}

.map-currency-pe .mcb-label {
  color: #d8b4fe;
}

.map-currency-pe .mcb-value {
  color: #f3e8ff;
  text-shadow: 0 0 10px rgba(192, 132, 252, 0.55);
}

.map-currency-pe.has-available {
  border-color: rgba(192, 132, 252, 0.92);
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.52), inset 0 1px 0 rgba(233, 213, 255, 0.35);
}

.map-currency-po {
  border-color: rgba(234, 179, 8, 0.78);
  background: linear-gradient(145deg, rgba(58, 41, 14, 0.92), rgba(20, 14, 7, 0.96));
  box-shadow: 0 4px 16px rgba(161, 98, 7, 0.42), inset 0 1px 0 rgba(254, 240, 138, 0.25);
}

.map-currency-po .mcb-icon {
  background: rgba(234, 179, 8, 0.2);
  border: 1px solid rgba(250, 204, 21, 0.5);
  color: #fde047;
}

.map-currency-po .mcb-label {
  color: #fde68a;
}

.map-currency-po .mcb-value {
  color: #fef08a;
  text-shadow: 0 0 10px rgba(250, 204, 21, 0.55);
}

.map-vital-bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 210px;
  min-width: 180px;
}

/* ============================================================================
   CRIAÇÃO DE PERSONAGEM — DESTAQUES DE CAMPOS OBRIGATÓRIOS & PENDÊNCIAS
   ============================================================================ */
.cr-step-tab.is-pending:not(.active) {
  border-color: rgba(245, 158, 11, 0.45);
}

.cr-step-tab.is-locked {
  opacity: 0.42;
  cursor: not-allowed;
  border-color: rgba(148, 163, 184, 0.18) !important;
}

.cr-step-tab.is-locked:hover {
  border-color: rgba(148, 163, 184, 0.24) !important;
  color: var(--stone-text);
}

.cr-step-pending-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid rgba(251, 191, 36, 0.65);
  color: #fde68a;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
  margin-left: 2px;
}

.cr-step-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 14px;
  margin-bottom: 14px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(180, 83, 9, 0.22) 0%, rgba(28, 20, 12, 0.78) 100%);
  border: 1px solid rgba(245, 158, 11, 0.55);
  color: #fde68a;
  font-size: 13.5px;
}

.cr-step-alert.is-complete {
  background: linear-gradient(90deg, rgba(22, 101, 52, 0.22) 0%, rgba(16, 26, 20, 0.78) 100%);
  border-color: rgba(74, 222, 128, 0.48);
  color: #bbf7d0;
}

.cr-step-alert.is-optional {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.16) 0%, rgba(16, 20, 30, 0.78) 100%);
  border-color: rgba(96, 165, 250, 0.4);
  color: #bfdbfe;
}

.cr-req-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.cr-req-badge.is-pending {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.65);
  color: #fde68a;
}

.cr-req-badge.is-done {
  background: rgba(34, 197, 94, 0.16);
  border: 1px solid rgba(74, 222, 128, 0.52);
  color: #86efac;
}

.cr-step-group.is-pending-group {
  padding: 12px 14px;
  border-radius: 5px;
  border: 1px dashed rgba(245, 158, 11, 0.48);
  background: rgba(245, 158, 11, 0.04);
}

.cr-input.is-pending {
  border-color: rgba(251, 191, 36, 0.7) !important;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.25);
}

.cr-loadout-pill.is-pending {
  border-style: dashed;
  border-color: rgba(251, 191, 36, 0.65);
  background: rgba(245, 158, 11, 0.07);
}

.cr-empty-placeholder {
  padding: 18px 16px;
  border-radius: 5px;
  border: 1px dashed rgba(212, 175, 106, 0.35);
  background: rgba(14, 12, 14, 0.55);
  text-align: center;
  color: var(--stone-text);
  font-size: 14px;
}

.cr-gear-row.is-empty {
  opacity: 0.7;
  border-style: dashed;
}

.cr-gear-row.is-empty .cr-gear-empty-ico {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  border: 1px dashed rgba(251, 191, 36, 0.5);
  color: #fde68a;
  font-size: 13.5px;
  flex-shrink: 0;
}

/* ============================================================================
   COMBATE — PAINEL TÁTICO INFERIOR & AÇÕES NO ESTILO DA FICHA DO PERSONAGEM
   ============================================================================ */
.cv-sheet-bottom {
  gap: 16px;
  align-items: start;
}

.cv-sheet-left-stack {
  min-width: 0;
}

.cv-nioh-combat-shell {
  height: auto !important;
  min-height: 0 !important;
}

.cv-nioh-log-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 280px;
}

.cv-nioh-log-shell .sh-powers-nioh-stage {
  position: relative;
  flex: 1;
  min-height: 220px;
}

.cv-nioh-log-shell .cv-sheet-log {
  position: absolute;
  inset: 12px;
  height: auto !important;
  max-height: none !important;
  overflow-y: auto;
}

@media (max-width: 1024px) {
  .cv-nioh-log-shell .cv-sheet-log {
    position: static;
    max-height: 360px !important;
  }
}

.cv-sheet-panel {
  background: linear-gradient(180deg, rgba(16, 14, 15, 0.96) 0%, rgba(9, 8, 10, 0.98) 100%);
  border: 1px solid rgba(204, 174, 114, 0.36);
  border-radius: 8px;
  padding: 14px 16px 14px;
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.08), 0 10px 28px rgba(0, 0, 0, 0.72);
}

.cv-sheet-panel-head {
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(204, 174, 114, 0.22);
}

.cv-sheet-panel-head h3 {
  font-family: var(--font-display);
  font-size: 14.5px;
  letter-spacing: 0.16em;
  color: #e9d7b0;
  margin: 0;
}

.cv-tactics-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  align-items: flex-start;
  justify-content: space-between;
}

.cv-tactics-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cv-sheet-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cv-metamagic-strip {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(204, 174, 114, 0.18);
}

.cv-meta-chip {
  opacity: 0.7;
  border-radius: 4px;
}

.cv-meta-chip.is-on {
  opacity: 1;
  border-color: #c084fc !important;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.32);
}

.cv-sheet-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(204, 174, 114, 0.18);
}

.cv-sheet-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 4px;
  background: rgba(14, 12, 13, 0.72) !important;
  border: 1px solid rgba(196, 178, 138, 0.24) !important;
  color: #cfc5b2 !important;
  font-family: var(--font-display);
  font-size: 13.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.cv-sheet-tab:hover {
  border-color: rgba(218, 186, 118, 0.58) !important;
  color: #f3dfb3 !important;
  background: rgba(34, 27, 18, 0.75) !important;
}

.cv-sheet-tab.active {
  border-color: #e6c687 !important;
  background: linear-gradient(180deg, rgba(64, 50, 26, 0.62) 0%, rgba(20, 16, 12, 0.94) 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 244, 210, 0.2), 0 0 14px rgba(212, 175, 106, 0.18) !important;
  color: #f3dfb3 !important;
}

.cv-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(212, 175, 92, 0.14);
  border: 1px solid rgba(212, 175, 92, 0.36);
  color: #e6c687;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.cv-actions-panel .action-grid {
  gap: 10px;
}

.cv-actions-panel .action-btn {
  background: linear-gradient(180deg, rgba(20, 17, 16, 0.92) 0%, rgba(11, 10, 12, 0.96) 100%);
  border: 1px solid rgba(196, 178, 138, 0.26);
  border-radius: 5px;
  padding: 11px 13px;
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.05);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.14s ease;
}

.cv-actions-panel .action-btn:hover:not(:disabled) {
  border-color: rgba(230, 198, 135, 0.72);
  background: linear-gradient(180deg, rgba(46, 36, 22, 0.78) 0%, rgba(16, 13, 12, 0.96) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 244, 210, 0.14), 0 4px 14px rgba(0, 0, 0, 0.55);
  transform: translateY(-1px);
}

.cv-actions-panel .action-btn strong {
  font-family: var(--font-display);
  color: #f2e8cf;
  letter-spacing: 0.03em;
}

.cv-actions-panel .action-btn .tag {
  font-family: var(--font-display);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  background: rgba(212, 175, 92, 0.1);
  border-color: rgba(212, 175, 92, 0.34);
  color: #e6c687;
}

.cv-actions-panel .action-btn:disabled {
  opacity: 0.44;
  border-color: rgba(148, 163, 184, 0.16);
}

.cv-sheet-log {
  background: rgba(8, 7, 9, 0.72);
  border: 1px solid rgba(204, 174, 114, 0.18);
  border-radius: 5px;
  padding: 8px 10px;
}

.cv-nioh-tactics-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  padding: 10px 18px;
  background: rgba(8, 10, 14, 0.72);
  border-bottom: 1px solid rgba(196, 178, 138, 0.18);
}

.cv-nioh-tactics-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.cv-nioh-tactics-lbl {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #d6c39b;
  white-space: nowrap;
}

.cv-meta-nioh-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.cv-meta-nioh-btn.is-meta-on {
  border-color: #c084fc !important;
  color: #e9d5ff !important;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.28);
}

button.cv-nioh-act-btn {
  width: 100%;
  text-align: left;
  cursor: pointer;
  appearance: none;
  font-family: inherit;
}

button.cv-nioh-act-btn:hover:not(:disabled) {
  border-color: rgba(230, 198, 135, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 244, 210, 0.12), 0 0 14px rgba(212, 175, 106, 0.16);
}

button.cv-nioh-act-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  filter: grayscale(0.35);
}

.cv-enemy-shadow {
  display: none !important;
}

.cv-top-right-controls {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 16;
  display: inline-flex;
  align-items: stretch;
  gap: 10px;
}

.cv-top-right-controls .cv-round-badge {
  position: static;
  top: auto;
  right: auto;
  left: auto;
}

.cv-top-end-turn-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 5px 16px 6px;
  border-radius: 5px;
  background: linear-gradient(180deg, rgba(64, 48, 22, 0.92) 0%, rgba(22, 16, 10, 0.96) 100%);
  border: 1px solid rgba(230, 198, 135, 0.78);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 244, 210, 0.28);
  backdrop-filter: blur(6px);
  color: #f3dfb3;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.14s ease, box-shadow 0.16s ease;
}

.cv-top-end-turn-btn:hover:not(:disabled) {
  border-color: #fde68a;
  background: linear-gradient(180deg, rgba(92, 68, 28, 0.96) 0%, rgba(32, 22, 12, 0.98) 100%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.9), 0 0 14px rgba(230, 198, 135, 0.28);
  transform: translateY(-1px);
}

.cv-top-end-turn-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.cv-top-end-lbl {
  font-family: var(--font-display);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  color: rgba(230, 198, 135, 0.88);
  line-height: 1.1;
}

.cv-top-end-act {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fde68a;
  line-height: 1.15;
  white-space: nowrap;
}

.cv-nioh-filters-bar {
  justify-content: flex-start;
  padding: 10px 18px;
}

.cv-nioh-filters-row {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.cv-nioh-aligned-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.cv-nioh-aligned-tabs .nioh-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 13px;
  line-height: 1;
}

.cv-picker-close-btn {
  padding: 3px 9px !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
  min-height: 24px !important;
  height: auto !important;
  align-self: flex-start;
  flex-shrink: 0;
  white-space: nowrap;
}

/* ============================================================================
   COMBATE — POSICIONAMENTO 2.5D ESCALONADO DOS INIMIGOS (REFERÊNCIA TRIANGULAR)
   ============================================================================ */
.cv-enemy-unit {
  --enemy-unit-w: 638px;
  --enemy-fig-h: 731px;
  --enemy-plate-w: 40%;
}

.cv-enemies-stage.enemy-count-1 {
  top: auto;
  bottom: 122px;
}

.cv-enemies-stage.enemy-count-1 .cv-enemy-unit {
  --enemy-unit-w: 850px;
  --enemy-fig-h: 978px;
  --enemy-plate-w: 35%;
}

.cv-enemies-stage.enemy-count-1 .cv-enemy-unit.is-boss-unit {
  --enemy-unit-w: 956px;
  --enemy-fig-h: 1084px;
  --enemy-plate-w: 36%;
}

.cv-enemies-stage.enemy-count-1 .cv-enemy-unit.is-minion-unit {
  --enemy-unit-w: 744px;
  --enemy-fig-h: 850px;
  --enemy-plate-w: 35%;
}

.cv-enemies-stage.enemy-count-2 .cv-enemy-unit {
  --enemy-unit-w: 680px;
  --enemy-fig-h: 782px;
  --enemy-plate-w: 36%;
}

.cv-enemies-stage.enemy-count-2 .cv-enemy-unit.is-boss-unit {
  --enemy-unit-w: 790px;
  --enemy-fig-h: 897px;
  --enemy-plate-w: 38%;
}

.cv-enemies-stage.enemy-count-2 .cv-enemy-unit.is-minion-unit {
  --enemy-unit-w: 595px;
  --enemy-fig-h: 684px;
  --enemy-plate-w: 35%;
}

.cv-enemies-stage.enemy-count-3 .cv-enemy-unit {
  --enemy-unit-w: 544px;
  --enemy-fig-h: 629px;
  --enemy-plate-w: 39%;
}

.cv-enemies-stage.enemy-count-3 .cv-enemy-unit.is-boss-unit {
  --enemy-unit-w: 638px;
  --enemy-fig-h: 731px;
  --enemy-plate-w: 39%;
}

.cv-enemies-stage.enemy-count-3 .cv-enemy-unit.is-minion-unit {
  --enemy-unit-w: 476px;
  --enemy-fig-h: 553px;
  --enemy-plate-w: 39%;
}

.cv-enemies-stage.enemy-count-4 .cv-enemy-unit {
  --enemy-unit-w: 446px;
  --enemy-fig-h: 519px;
  --enemy-plate-w: 40%;
}

.cv-enemies-stage.enemy-count-4 .cv-enemy-unit.is-boss-unit {
  --enemy-unit-w: 527px;
  --enemy-fig-h: 608px;
  --enemy-plate-w: 40%;
}

.cv-enemies-stage.enemy-count-4 .cv-enemy-unit.is-minion-unit {
  --enemy-unit-w: 395px;
  --enemy-fig-h: 459px;
  --enemy-plate-w: 41%;
}

.cv-enemies-stage.enemy-count-2,
.cv-enemies-stage.enemy-count-3,
.cv-enemies-stage.enemy-count-4 {
  display: block;
  width: 720px;
  height: 540px;
  top: auto;
  bottom: 108px;
  left: 65%;
  gap: 0;
}

.cv-enemies-stage.has-allies.enemy-count-2,
.cv-enemies-stage.has-allies.enemy-count-3,
.cv-enemies-stage.has-allies.enemy-count-4 {
  left: 70%;
}

.cv-enemies-stage.enemy-count-2 .cv-enemy-unit,
.cv-enemies-stage.enemy-count-3 .cv-enemy-unit,
.cv-enemies-stage.enemy-count-4 .cv-enemy-unit {
  position: absolute;
  transform: none;
  transition: left 0.6s cubic-bezier(.22,.85,.36,1), top 0.6s cubic-bezier(.22,.85,.36,1), opacity 0.25s ease;
}

/* 2 Inimigos: vanguarda centro-esquerda + retaguarda topo-direita mais acima e recuada */
.cv-enemies-stage.enemy-count-2 .cv-enemy-unit[data-enemy-slot="1"] {
  left: -14%;
  top: 12%;
  z-index: 3;
}

.cv-enemies-stage.enemy-count-2 .cv-enemy-unit[data-enemy-slot="2"] {
  left: 16%;
  top: -16%;
  z-index: 2;
}

/* 3 Inimigos: formação triangular 2.5D (1º mais à frente, 2º mais acima e 2º/3º mais recuados) */
.cv-enemies-stage.enemy-count-3 .cv-enemy-unit[data-enemy-slot="1"] {
  left: -16%;
  top: 12%;
  z-index: 3;
}

.cv-enemies-stage.enemy-count-3 .cv-enemy-unit[data-enemy-slot="2"] {
  left: 30%;
  top: -18%;
  z-index: 1;
}

.cv-enemies-stage.enemy-count-3 .cv-enemy-unit[data-enemy-slot="3"] {
  left: 38%;
  top: 26%;
  z-index: 4;
}

/* 4 Inimigos: formação escalonada em dois planos de profundidade */
.cv-enemies-stage.enemy-count-4 {
  width: 740px;
  height: 550px;
}

.cv-enemies-stage.enemy-count-4 .cv-enemy-unit[data-enemy-slot="1"] {
  left: -16%;
  top: 8%;
  z-index: 3;
}

.cv-enemies-stage.enemy-count-4 .cv-enemy-unit[data-enemy-slot="2"] {
  left: 44%;
  top: -18%;
  z-index: 1;
}

.cv-enemies-stage.enemy-count-4 .cv-enemy-unit[data-enemy-slot="3"] {
  left: 20%;
  top: 32%;
  z-index: 4;
}

.cv-enemies-stage.enemy-count-4 .cv-enemy-unit[data-enemy-slot="4"] {
  left: 54%;
  top: 36%;
  z-index: 5;
}

@media (max-width: 1200px) {
  .cv-enemies-stage.enemy-count-1 {
    top: auto;
    bottom: 130px;
  }

  .cv-enemies-stage.enemy-count-1 .cv-enemy-unit { --enemy-unit-w: 659px; --enemy-fig-h: 757px; }
  .cv-enemies-stage.enemy-count-2 .cv-enemy-unit { --enemy-unit-w: 510px; --enemy-fig-h: 587px; }
  .cv-enemies-stage.enemy-count-3 .cv-enemy-unit { --enemy-unit-w: 434px; --enemy-fig-h: 497px; }
  .cv-enemies-stage.enemy-count-4 .cv-enemy-unit { --enemy-unit-w: 357px; --enemy-fig-h: 412px; }

  .cv-enemies-stage.enemy-count-2,
  .cv-enemies-stage.enemy-count-3,
  .cv-enemies-stage.enemy-count-4 {
    width: 560px;
    height: 420px;
    top: auto;
    bottom: 122px;
  }
}

@media (max-width: 820px) {
  .cv-enemies-stage.enemy-count-1 {
    top: auto;
    bottom: 194px;
  }

  .cv-enemies-stage.enemy-count-1 .cv-enemy-unit { --enemy-unit-w: 438px; --enemy-fig-h: 502px; }
  .cv-enemies-stage.enemy-count-2 .cv-enemy-unit { --enemy-unit-w: 361px; --enemy-fig-h: 417px; }
  .cv-enemies-stage.enemy-count-3 .cv-enemy-unit { --enemy-unit-w: 298px; --enemy-fig-h: 344px; }
  .cv-enemies-stage.enemy-count-4 .cv-enemy-unit { --enemy-unit-w: 247px; --enemy-fig-h: 285px; }

  .cv-enemies-stage.enemy-count-2,
  .cv-enemies-stage.enemy-count-3,
  .cv-enemies-stage.enemy-count-4 {
    width: 390px;
    height: 330px;
    top: auto;
    bottom: 184px;
  }
}

/* ============================================================================
   COMBATE — DETECÇÃO POR SILHUETA NOS AVATARES & TOOLTIP MAIS TRANSLÚCIDO
   ============================================================================ */
.cv-enemies-stage,
.cv-enemy-unit,
.cv-allies-stage,
.cv-ally-unit,
.cv-hero-actor {
  pointer-events: none !important;
}

/* Reabilita leitura de tooltip nos ícones de efeitos/status acima dos avatares */
.cv-enemy-status-icons,
.cv-enemy-status-icons .cv-aura-icon-chip,
.cv-hero-actor .cv-aura-icon-chip,
.cv-ally-unit .cv-aura-icon-chip {
  pointer-events: auto !important;
  cursor: help;
}

.cv-enemy-status-icons {
  position: relative;
  z-index: 25;
}

.cv-enemy-status-icons .cv-aura-icon-chip:hover {
  transform: scale(1.14);
  filter: brightness(1.18);
  z-index: 26;
}

.cv-enemy-unit.is-shape-hover .cv-enemy-avatar-img {
  filter: drop-shadow(0 0 16px rgba(248, 113, 113, 0.85)) drop-shadow(0 16px 24px rgba(0, 0, 0, 0.85)) brightness(1.08);
}

.cv-enemy-unit.is-shape-hover .cv-enemy-plate {
  transform: translateY(-2px);
}

.cv-ally-unit.is-shape-hover .cv-ally-avatar-img {
  filter: drop-shadow(0 0 16px rgba(74, 222, 128, 0.82)) brightness(1.08);
}

.cv-hero-actor.is-shape-hover .cv-hero-avatar-img {
  filter: drop-shadow(0 0 18px rgba(230, 198, 135, 0.85)) brightness(1.07);
}

#item-tooltip-layer.tt-in-combat .tt-card {
  background: linear-gradient(180deg, rgba(16, 15, 19, 0.72) 0%, rgba(10, 9, 13, 0.78) 100%) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Dano e efeitos nos aliados centralizados no meio-alto do avatar */
.cv-ally-figure .cv-vfx-anchor {
  inset: 0;
  display: grid;
  place-items: center;
  padding-bottom: 16%;
}

.cv-ally-figure .cv-vfx-anchor .cv-float-num {
  top: 34%;
  left: 50%;
}

/* ============================================================================
   HUD DIAMANTE DO HERÓI (MAPA, COMBATE & AVENTURAS)
   Retrato em losango com moldura dupla dourada + barras inclinadas de Vitalidade & Vigor
   ============================================================================ */
.avalom-diamond-hud {
  display: inline-flex;
  align-items: center;
  position: relative;
  user-select: none;
  pointer-events: auto;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.78));
}

.avalom-diamond-hud.is-fixed-bl {
  position: fixed;
  left: 22px;
  bottom: 20px;
  z-index: 48;
}

.avalom-diamond-hud.is-combat-hud {
  position: relative;
  margin-left: 6px;
}

.cv-hud-vitals-left.is-diamond-mode {
  width: auto !important;
  max-width: none !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  overflow: visible;
}

.adh-diamond-wrap {
  position: relative;
  z-index: 3;
  width: 118px;
  height: 118px;
  flex: 0 0 118px;
  display: grid;
  place-items: center;
}

.avalom-diamond-hud.is-combat-hud .adh-diamond-wrap {
  width: 106px;
  height: 106px;
  flex: 0 0 106px;
}

.adh-diamond-frame {
  position: relative;
  width: 82px;
  height: 82px;
  transform: rotate(45deg);
  overflow: hidden;
  background: #141210;
  border: 2.5px solid #e9d59c;
  box-shadow:
    0 0 0 1.5px rgba(10, 9, 8, 0.92),
    0 0 18px rgba(233, 213, 156, 0.25),
    inset 0 0 0 3px #161412;
}

.avalom-diamond-hud.is-combat-hud .adh-diamond-frame {
  width: 74px;
  height: 74px;
}

.adh-diamond-frame::after {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1.5px solid rgba(233, 213, 156, 0.78);
  pointer-events: none;
  z-index: 2;
}

.adh-diamond-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transform: rotate(-45deg) scale(1.42);
  display: block;
}

.adh-panel {
  position: relative;
  z-index: 1;
  margin-left: -48px;
  padding: 10px 26px 10px 64px;
  min-width: 300px;
  background: linear-gradient(
    90deg,
    rgba(28, 25, 22, 0.94) 0%,
    rgba(24, 21, 18, 0.88) 72%,
    rgba(20, 18, 16, 0.0) 100%
  );
  border-top: 1px solid rgba(233, 213, 156, 0.22);
  border-bottom: 1px solid rgba(233, 213, 156, 0.16);
}

.avalom-diamond-hud.is-combat-hud .adh-panel {
  margin-left: -44px;
  padding: 8px 22px 8px 56px;
  min-width: 278px;
}

.adh-name {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 600;
  font-size: 27px;
  line-height: 1.02;
  color: #f8f4ec;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 235px;
  margin-bottom: 3px;
}

.avalom-diamond-hud.is-combat-hud .adh-name {
  font-size: 24px;
  max-width: 215px;
}

.adh-top-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  color: #f0ebe0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
}

.adh-lvl {
  color: #efe5cf;
}

.adh-hp-text {
  color: #f7f4ec;
  letter-spacing: 0.02em;
}

.adh-bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 5px;
}

.adh-bar-track {
  position: relative;
  height: 12px;
  width: 100%;
  background: rgba(12, 11, 10, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transform: skewX(-28deg);
  overflow: hidden;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.85);
}

.adh-bar-track.is-vig {
  width: calc(100% - 10px);
  margin-left: -4px;
}

.adh-bar-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.adh-bar-fill.is-hp {
  background: linear-gradient(90deg, #2d7a2f 0%, #5ec234 52%, #9be35d 100%);
  box-shadow: 0 0 10px rgba(114, 214, 68, 0.45);
}

.adh-bar-fill.is-vig {
  background: linear-gradient(90deg, #4338ca 0%, #5083f6 48%, #7ec7fc 100%);
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.45);
}

.adh-bot-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  color: #ede7da;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
}

.adh-sp-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.adh-sp-gems {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.adh-sp-gem {
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  background: rgba(148, 130, 175, 0.25);
  border: 1px solid rgba(192, 132, 252, 0.45);
  display: inline-block;
}

.adh-sp-gem.is-active {
  background: #c084fc;
  border-color: #f3e8ff;
  box-shadow: 0 0 6px rgba(192, 132, 252, 0.85);
}

.adh-sp-text {
  color: #e9d5ff;
  font-size: 13px;
}

.adh-vig-text {
  color: #f3f0e6;
  letter-spacing: 0.02em;
}

@media (max-width: 900px) {
  .avalom-diamond-hud.is-fixed-bl {
    left: 10px;
    bottom: 10px;
    transform: scale(0.86);
    transform-origin: bottom left;
  }
}

/* ============================================================================
   BALÃO DE DIÁLOGO NARRATIVO DE CHEFES ACIMA DO AVATAR NO COMBATE
   ============================================================================ */
.cv-enemy-unit.is-boss-dialogue-open {
  position: relative;
  z-index: 42;
  overflow: visible !important;
}

.cv-boss-dialogue-bubble {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  width: min(390px, 86vw);
  padding: 14px 16px 13px;
  border-radius: 8px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(180, 48, 48, 0.24) 0%, rgba(16, 13, 16, 0.96) 62%, rgba(9, 8, 11, 0.98) 100%);
  border: 1.5px solid rgba(233, 200, 128, 0.78);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.92),
    0 0 24px rgba(212, 165, 86, 0.26),
    inset 0 1px 0 rgba(255, 244, 214, 0.22);
  text-align: left;
  z-index: 65;
  pointer-events: auto;
  cursor: default;
  animation: bossBubbleIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.cv-boss-bubble-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(233, 200, 128, 0.28);
}

.cv-boss-bubble-crown {
  font-size: 16px;
  line-height: 1;
}

.cv-boss-bubble-name {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #f6dfa0;
  text-transform: uppercase;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}

.cv-boss-bubble-text {
  margin: 0 0 12px;
  font-family: var(--font-body);
  font-size: 16px;
  font-style: italic;
  line-height: 1.42;
  color: #f0e8d8;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.cv-boss-bubble-actions {
  display: flex;
  justify-content: flex-end;
}

.cv-boss-attack-btn {
  padding: 7px 20px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 4px 16px rgba(212, 175, 106, 0.38);
}

.cv-boss-bubble-tail {
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 16px;
  height: 16px;
  background: #0d0b0f;
  border-right: 1.5px solid rgba(233, 200, 128, 0.78);
  border-bottom: 1.5px solid rgba(233, 200, 128, 0.78);
  transform: translateX(-50%) rotate(45deg);
}

@keyframes bossBubbleIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

/* ============================================================================
   ADAPTAÇÃO SMARTPHONE — MODO PAISAGEM ESTILO PC + AVISO DE ROTAÇÃO
   ============================================================================ */
.mobile-rotate-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: radial-gradient(circle at 50% 35%, rgba(20, 14, 24, 0.94), rgba(6, 5, 8, 0.98));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}

.mobile-rotate-overlay.is-visible {
  display: flex;
}

.mobile-rotate-card {
  max-width: 360px;
  width: 100%;
  padding: 26px 22px;
  border-radius: 12px;
  border: 1px solid rgba(203, 184, 144, 0.55);
  background: linear-gradient(160deg, rgba(24, 19, 26, 0.96), rgba(10, 8, 12, 0.98));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.78), inset 0 1px 0 rgba(255, 240, 200, 0.14);
}

.mobile-rotate-icon {
  font-size: 46px;
  margin-bottom: 10px;
  display: inline-block;
  animation: avalomPhoneRotate 2.2s ease-in-out infinite;
}

@keyframes avalomPhoneRotate {
  0%, 15% { transform: rotate(0deg); }
  45%, 70% { transform: rotate(-90deg); }
  90%, 100% { transform: rotate(0deg); }
}

.mobile-rotate-eyebrow {
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--gold, #cbb890);
  margin-bottom: 6px;
}

.mobile-rotate-card h3 {
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 20px;
  color: var(--gold-bright, #f4e3b8);
  margin: 0 0 10px;
}

.mobile-rotate-card p {
  font-size: 15px;
  line-height: 1.45;
  color: var(--stone-text, #d6cfc2);
  margin: 0 0 18px;
}

.mobile-rotate-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-rotate-actions .btn {
  width: 100%;
  justify-content: center;
}

/* Bloqueio de rolagem quando o celular está na vertical (forçando rotação horizontal) */
body.mobile-portrait-locked {
  overflow: hidden !important;
  height: 100dvh !important;
}

/* Fallback de zoom proporcional quando o navegador mobile não honra viewport=1280 */
html.mobile-landscape-zoom {
  zoom: var(--mobile-pc-zoom, 0.65);
}

/* Modo Paisagem no Smartphone — com ou sem Tela Cheia (adapta toda a tela, botões e grids à resolução do celular) */
body.mobile-landscape-pc {
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
  overscroll-behavior: contain;
  overflow-x: hidden;
  width: 100%;
}

body.mobile-landscape-pc .topbar {
  padding: 4px max(10px, env(safe-area-inset-right)) 4px max(10px, env(safe-area-inset-left));
  min-height: 38px;
  max-height: 44px;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

body.mobile-landscape-pc .nav-tabs {
  flex: 1 1 auto;
  min-width: 0;
  gap: 4px;
  flex-wrap: nowrap !important;
  align-items: center !important;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

body.mobile-landscape-pc .nav-tabs::-webkit-scrollbar {
  display: none;
}

body.mobile-landscape-pc .nav-btn {
  padding: 3px 7px;
  font-size: 11px !important;
  letter-spacing: 0.04em;
  min-height: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

body.mobile-landscape-pc .nav-btn.nav-icon-btn {
  padding: 3px 6px;
  min-width: 28px;
  height: 28px;
  font-size: 16px;
  justify-content: center;
}

body.mobile-landscape-pc .nav-btn.nav-icon-btn img,
body.mobile-landscape-pc .nav-btn.nav-icon-btn .cui-xs {
  width: 16px;
  height: 16px;
}

body.mobile-landscape-pc .topbar .world-clock {
  flex-shrink: 0;
  margin-left: 0;
  padding: 3px 8px !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 4px !important;
  min-height: 28px;
  height: 28px;
}

body.mobile-landscape-pc .topbar .world-clock .wc-era {
  display: none !important;
}

body.mobile-landscape-pc .topbar .world-clock .wc-top-row {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.mobile-landscape-pc .topbar .world-clock .wc-top-row,
body.mobile-landscape-pc .topbar .world-clock .wc-date,
body.mobile-landscape-pc .topbar .world-clock .wc-time,
body.mobile-landscape-pc .topbar .world-clock .wc-sep {
  font-size: 11.5px !important;
  line-height: 1.1 !important;
  letter-spacing: 0.02em !important;
  white-space: nowrap !important;
}

body.mobile-landscape-pc .main-container {
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 auto;
  padding: 4px max(6px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left)) !important;
  box-sizing: border-box;
}

body.mobile-landscape-pc .landing-shell,
body.mobile-landscape-pc .slots-shell {
  min-height: var(--mobile-real-vh, 100dvh);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Mantém os layouts horizontais estilo PC no celular em paisagem */
body.mobile-landscape-pc .grid-worldmap {
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr) !important;
}

body.mobile-landscape-pc .slots-quadtych {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

body.mobile-landscape-pc .btn {
  min-height: 32px;
}

body.mobile-landscape-pc .modal-content,
body.mobile-landscape-pc .modal-box {
  max-height: 90dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ============================================================================
   SETA / PONTEIRO TOUCH PARA SMARTPHONE + CONTROLE DE SENSIBILIDADE
   ============================================================================ */
.mobile-touch-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99998;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s ease;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 8px rgba(246, 223, 164, 0.5));
  will-change: transform;
}

.mobile-touch-cursor.is-visible {
  opacity: 0.96;
}

.mobile-touch-cursor.is-visible.is-idle {
  opacity: 0.48;
}

.mobile-touch-cursor .mtc-ripple {
  position: absolute;
  top: -6px;
  left: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(250, 204, 21, 0.9);
  opacity: 0;
  transform: scale(0.4);
  pointer-events: none;
}

.mobile-touch-cursor.is-clicking .mtc-ripple {
  animation: mtcClickPulse 0.34s ease-out forwards;
}

@keyframes mtcClickPulse {
  0% { opacity: 0.95; transform: scale(0.45); }
  100% { opacity: 0; transform: scale(1.9); }
}

.mobile-cursor-dock {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 99997;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.mtc-dock-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(203, 184, 144, 0.6);
  background: rgba(16, 12, 20, 0.88);
  color: #f4e3b8;
  font-size: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.65);
  cursor: pointer;
}

.mtc-panel {
  display: none;
  width: 248px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(203, 184, 144, 0.55);
  background: linear-gradient(160deg, rgba(22, 17, 26, 0.97), rgba(10, 8, 12, 0.98));
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.78);
  color: var(--stone-text, #e2dcd0);
  font-size: 13px;
}

.mtc-panel.is-open {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mtc-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--gold-bright, #f4e3b8);
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 13.5px;
  border-bottom: 1px solid rgba(203, 184, 144, 0.22);
  padding-bottom: 6px;
}

.mtc-close {
  background: transparent;
  border: none;
  color: #cbb890;
  font-size: 15px;
  cursor: pointer;
  padding: 0 4px;
}

.mtc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mtc-row-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mtc-row-col input[type="range"] {
  width: 100%;
  accent-color: #eab308;
}

.mtc-mode-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.mtc-hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: #b7ae9c;
}

/* Garante que efeitos climáticos e raios cubram 100% da tela no smartphone (com ou sem zoom/tela cheia) */
body.mobile-landscape-pc #weather-canvas,
body.mobile-landscape-pc #lightning-flash,
html.mobile-landscape-zoom #weather-canvas,
html.mobile-landscape-zoom #lightning-flash {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 100vw !important;
  min-height: 100dvh !important;
}

/* Dica visual destacada de rolagem com 2 dedos no modo smartphone */
.mobile-scroll-tip {
  position: fixed;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 99996;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px 9px 18px;
  border-radius: 999px;
  border: 1.5px solid rgba(235, 212, 158, 0.78);
  background: linear-gradient(180deg, rgba(28, 22, 34, 0.96), rgba(12, 10, 16, 0.98));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #f6ecd4;
  font-size: 16px !important;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.82), 0 0 18px rgba(212, 175, 55, 0.25);
}

.mobile-scroll-tip strong {
  color: #fde68a;
  font-weight: 700;
}

.mobile-scroll-tip .mst-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(203, 184, 144, 0.4);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f6ecd4;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.mobile-scroll-tip.is-hidden,
body.mobile-portrait .mobile-scroll-tip {
  display: none !important;
}

/* ============================================================================
   SMARTPHONE — GLOSSÁRIO, MISSÕES & CONQUISTAS EXPANSÍVEIS (LEITURA & ROLAGEM)
   ============================================================================ */
body.compact-screen .main-container:has(.codex-book-wrapper) {
  min-height: auto !important;
  height: auto !important;
  padding-bottom: 64px !important;
}

body.compact-screen .codex-book-wrapper {
  min-height: auto !important;
  height: auto !important;
}

body.compact-screen .codex-book-tabs {
  padding: 0 10px;
  gap: 5px;
  justify-content: flex-start;
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
}

body.compact-screen .codex-book-tab {
  padding: 8px 13px;
  font-size: 13.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

body.compact-screen .codex-leather-book {
  padding: 10px;
  height: auto !important;
}

body.compact-screen .codex-parchment-spread {
  grid-template-columns: minmax(0, 0.78fr) 14px minmax(0, 1.42fr) !important;
  min-height: auto !important;
  height: auto !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  align-items: start;
}

body.compact-screen .codex-page {
  padding: 16px 18px;
  max-height: 520px !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

body.compact-screen .codex-entry-body {
  max-height: none !important;
  height: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
  padding-right: 2px;
  font-size: 19px;
  line-height: 1.6;
}

body.compact-screen .codex-entry-body p,
body.compact-screen .codex-entry-body li,
body.compact-screen .codex-entry-body .small,
body.compact-screen .codex-entry-body .codex-quest-step {
  font-size: 18px !important;
  line-height: 1.58 !important;
}

body.compact-screen .codex-entry-title {
  font-size: 25px;
  margin-bottom: 12px;
  padding-bottom: 8px;
}

body.compact-screen .codex-toc-scroll {
  max-height: none !important;
  overflow: visible !important;
  padding-right: 2px;
}

body.compact-screen .codex-toc-item {
  padding: 8px 10px;
  font-size: 15.5px;
}

body.compact-screen .codex-chapter-btn {
  padding: 6px 4px;
  font-size: 14px;
}

/* Destaque de seleção ao clicar no retângulo do Slot de Personagem */
.slot-pillar.is-selected-slot {
  transform: translateY(-4px);
  box-shadow: 0 0 0 2px #f5d07a, 0 18px 42px rgba(212, 175, 55, 0.36) !important;
}

.slot-pillar.is-selected-slot .slot-pillar-frame {
  border-color: rgba(250, 214, 128, 0.92) !important;
}

/* ============================================================================
   SMARTPHONE — ÍCONES COMPACTOS NO MERCADOR, FORJA, ALQUIMIA & RECOMPENSAS
   ============================================================================ */
body.compact-screen .forja-studio {
  gap: 12px !important;
  align-items: start;
}

body.compact-screen .forja-tiles-grid {
  grid-template-columns: repeat(6, minmax(38px, 46px)) !important;
  gap: 5px !important;
}

body.compact-screen .forja-item-tile {
  padding: 3px !important;
  max-width: 48px;
  max-height: 48px;
}

body.compact-screen .forja-center-stage {
  min-height: 190px !important;
}

body.compact-screen .forja-anvil-glow {
  width: 150px !important;
  height: 110px !important;
  bottom: 10px !important;
}

body.compact-screen .forja-hero-preview {
  width: 164px !important;
  height: 164px !important;
}

body.compact-screen .forja-studio .forja-detail-col .merch-price-display img,
body.compact-screen .forja-studio .forja-req-item img {
  width: 22px !important;
  height: 22px !important;
}

/* Notificação / Modal de Recompensas centralizado, compacto e proporcional no smartphone */
body.compact-screen .rw-modal-backdrop {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 12px !important;
  z-index: 9990 !important;
}

body.compact-screen .rw-modal-box {
  margin: auto !important;
  max-width: 460px !important;
  max-height: 92% !important;
  overflow-y: auto !important;
  padding: 14px 18px !important;
}

body.compact-screen .rw-modal-title {
  font-size: 20px !important;
}

body.compact-screen .rw-showcase-well {
  padding: 10px 12px !important;
}

body.compact-screen .rw-modal-box .rw-items-row {
  gap: 8px !important;
  flex-wrap: wrap !important;
}

body.compact-screen .rw-modal-box .rw-items-row .inv-cell {
  width: 68px !important;
  height: 68px !important;
  min-width: 68px !important;
  flex: 0 0 68px !important;
}

body.compact-screen .rw-modal-box .rw-items-row .inv-cell img {
  width: 82% !important;
  height: 82% !important;
  object-fit: contain;
}

body.compact-screen .rw-modal-box .rw-items-row .inv-qty-badge,
body.compact-screen .rw-modal-box .rw-items-row .inv-slot-badge {
  font-size: 12.5px !important;
  padding: 1px 4px !important;
}

/* ============================================================================
   SMARTPHONE & PC EM RESOLUÇÃO REDUZIDA — COMBATE: AVATARES (+75%), BARRA ACIMA
   DA CABEÇA DOS INIMIGOS & BARRAS INFERIORES LADO A LADO
   ============================================================================ */
/* Herói no Smartphone (+25% sobre 438px = 548px) */
body.compact-screen .cv-hero-actor,
body.mobile-landscape-pc .cv-hero-actor {
  width: auto !important;
  min-width: 280px !important;
  max-width: 525px !important;
  height: 548px !important;
}

body.compact-screen .cv-hero-avatar-frame,
body.mobile-landscape-pc .cv-hero-avatar-frame {
  width: auto !important;
  max-width: 525px !important;
  height: 548px !important;
}

body.compact-screen .cv-hero-avatar-img,
body.mobile-landscape-pc .cv-hero-avatar-img {
  height: 548px !important;
  max-height: 548px !important;
  width: auto !important;
  max-width: 525px !important;
}

/* Aliados e Invocações no Smartphone (+30% sobre 481px = 625px) */
body.compact-screen .cv-ally-avatar-img,
body.compact-screen .cv-ally-unit.is-summon .cv-ally-avatar-img,
body.compact-screen .cv-ally-unit.is-companion .cv-ally-avatar-img,
body.mobile-landscape-pc .cv-ally-avatar-img,
body.mobile-landscape-pc .cv-ally-unit.is-summon .cv-ally-avatar-img,
body.mobile-landscape-pc .cv-ally-unit.is-companion .cv-ally-avatar-img {
  height: 625px !important;
  max-height: 625px !important;
  width: auto !important;
  max-width: 570px !important;
}

/* Posicionamento padrão de combate dos aliados e herói no Smartphone (sem deslocamento duplo de @media 1180px) */
body.compact-screen .cv-allies-stage,
body.mobile-landscape-pc .cv-allies-stage {
  inset: 0 !important;
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
}

body.compact-screen .cv-ally-unit.pos-vanguarda,
body.mobile-landscape-pc .cv-ally-unit.pos-vanguarda {
  left: 22% !important;
  bottom: 84px !important;
  transform: scale(1.02) !important;
  z-index: 9 !important;
}

body.compact-screen .cv-ally-unit.pos-aberta,
body.mobile-landscape-pc .cv-ally-unit.pos-aberta {
  left: 11% !important;
  bottom: 92px !important;
  transform: scale(1) !important;
  z-index: 8 !important;
}

body.compact-screen .cv-ally-unit.pos-defensivo,
body.mobile-landscape-pc .cv-ally-unit.pos-defensivo {
  left: 5% !important;
  bottom: 100px !important;
  transform: scale(0.97) !important;
  z-index: 6 !important;
}

body.compact-screen .cv-ally-unit.pos-retaguarda,
body.mobile-landscape-pc .cv-ally-unit.pos-retaguarda {
  left: 0% !important;
  bottom: 110px !important;
  transform: scale(0.96) !important;
  z-index: 5 !important;
}

body.compact-screen .cv-ally-unit.pos-retaguarda:nth-child(2),
body.mobile-landscape-pc .cv-ally-unit.pos-retaguarda:nth-child(2) {
  left: 5% !important;
  bottom: 102px !important;
  transform: scale(0.96) !important;
  z-index: 5 !important;
}

body.compact-screen .cv-ally-plate {
  width: 156px !important;
  padding: 4px 7px !important;
}

body.compact-screen .cv-ally-name {
  font-size: 13px !important;
}

/* Inimigos e Herói alinhados pelos pés na zona de combate (+75%: até 411px comuns, 341px lacaios, 472px chefes) */
body.compact-screen .cv-hero-cluster,
body.mobile-landscape-pc .cv-hero-cluster {
  bottom: 84px !important;
}

body.compact-screen .cv-hero-cluster.pos-vanguarda,
body.mobile-landscape-pc .cv-hero-cluster.pos-vanguarda {
  left: 17% !important;
  bottom: 84px !important;
}

body.compact-screen .cv-hero-cluster.pos-aberta,
body.mobile-landscape-pc .cv-hero-cluster.pos-aberta {
  left: 10% !important;
  bottom: 90px !important;
}

body.compact-screen .cv-hero-cluster.pos-defensivo,
body.mobile-landscape-pc .cv-hero-cluster.pos-defensivo {
  left: 4% !important;
  bottom: 98px !important;
}

body.compact-screen .cv-hero-cluster.pos-retaguarda,
body.mobile-landscape-pc .cv-hero-cluster.pos-retaguarda {
  left: 0% !important;
  bottom: 108px !important;
}

body.compact-screen .cv-enemies-stage {
  top: auto !important;
  bottom: 84px !important;
  left: 66% !important;
  transform: translateX(-50%) !important;
  align-items: flex-end !important;
  justify-content: center !important;
  gap: 12px !important;
}

body.compact-screen .cv-enemies-stage.has-allies {
  left: 70% !important;
}

body.compact-screen .cv-enemies-stage.enemy-count-1 {
  top: auto !important;
  bottom: 84px !important;
}

body.compact-screen .cv-enemy-unit,
body.compact-screen .cv-enemy-unit:nth-child(1),
body.compact-screen .cv-enemy-unit:nth-child(2),
body.compact-screen .cv-enemy-unit:nth-child(3) {
  transform: translateY(0) !important;
  justify-content: flex-end !important;
  align-items: center !important;
}

body.compact-screen .cv-enemy-avatar-img {
  height: auto !important;
  max-height: 411px !important;
  width: auto !important;
  max-width: 100% !important;
}

body.compact-screen .cv-enemy-unit.is-minion-unit .cv-enemy-avatar-img {
  height: auto !important;
  max-height: 341px !important;
  max-width: 100% !important;
}

body.compact-screen .cv-enemy-unit.is-boss-unit .cv-enemy-avatar-img {
  height: auto !important;
  max-height: 472px !important;
  max-width: 100% !important;
}

/* Barra de vitalidade colada logo acima da cabeça/corpo dos inimigos sem distância excessiva */
body.compact-screen .cv-enemy-plate {
  padding: 2px 6px !important;
  margin: 0 auto -12px !important;
  position: relative !important;
  z-index: 10 !important;
  transform: none !important;
}

body.compact-screen .cv-enemy-name {
  font-size: 13px !important;
}

/* Barras abaixo da zona de combate (Ações, Consumíveis/Poções e HUD inferior) */
body.compact-screen .cv-bottom-hud {
  padding: 5px 10px 6px !important;
  gap: 8px !important;
  align-items: flex-end !important;
}

body.compact-screen .cv-portrait-frame {
  width: 46px !important;
  height: 46px !important;
}

body.compact-screen .cv-action-bar-center {
  padding: 4px 7px 5px !important;
  gap: 3px !important;
}

body.compact-screen .cv-action-bar-header {
  gap: 6px !important;
}

body.compact-screen .cv-action-bar-title {
  font-size: 12.5px !important;
  letter-spacing: 0.06em !important;
}

body.compact-screen .cv-bar-tool-btn {
  font-size: 11.5px !important;
  padding: 1px 6px !important;
}

body.compact-screen .cv-action-row-single {
  grid-template-columns: repeat(15, 34px) !important;
  gap: 3px !important;
}

body.compact-screen .cv-dock-slot {
  width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  max-width: 34px !important;
  padding: 2px !important;
}

body.compact-screen .cv-potion-dock {
  padding: 4px 7px 5px !important;
  gap: 3px !important;
}

body.compact-screen .cv-potion-bar {
  gap: 3px !important;
}

body.compact-screen .cv-potion-slot {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  padding: 2px !important;
}

/* Modal de configuração de slots da Barra de Ações e Consumíveis no Smartphone */
body.compact-screen #bar-picker-backdrop,
body.compact-screen #potion-picker-backdrop {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 10px !important;
  z-index: 9985 !important;
}

body.compact-screen #bar-picker-backdrop .modal-box,
body.compact-screen #potion-picker-backdrop .modal-box {
  width: 92% !important;
  max-width: 760px !important;
  max-height: 86% !important;
  margin: auto !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  padding: 12px 16px 18px !important;
  overscroll-behavior: contain;
}

body.compact-screen #bar-picker-backdrop .cv-picker-grid,
body.compact-screen #potion-picker-backdrop .cv-picker-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

body.compact-screen #bar-picker-backdrop .cv-picker-option,
body.compact-screen #potion-picker-backdrop .cv-picker-option {
  padding: 6px 8px !important;
  gap: 8px !important;
}

body.compact-screen #bar-picker-backdrop .cv-picker-ico,
body.compact-screen #potion-picker-backdrop .cv-picker-ico {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  flex: 0 0 34px !important;
}

/* ============================================================================
   SMARTPHONE & PC EM RESOLUÇÃO REDUZIDA — PAINEL DE VITALIDADE & VIGOR COMPACTO
   ============================================================================ */
body.compact-screen .avalom-diamond-hud.is-fixed-bl {
  left: max(8px, env(safe-area-inset-left)) !important;
  top: 56px !important;
  bottom: auto !important;
}

body.compact-screen .avalom-diamond-hud .adh-diamond-wrap,
body.compact-screen .avalom-diamond-hud.is-combat-hud .adh-diamond-wrap {
  width: 68px !important;
  height: 68px !important;
  flex: 0 0 68px !important;
}

body.compact-screen .avalom-diamond-hud .adh-diamond-frame,
body.compact-screen .avalom-diamond-hud.is-combat-hud .adh-diamond-frame {
  width: 48px !important;
  height: 48px !important;
  border-width: 2px !important;
}

body.compact-screen .avalom-diamond-hud .adh-diamond-frame::after {
  inset: 2.5px !important;
  border-width: 1px !important;
}

body.compact-screen .avalom-diamond-hud .adh-panel,
body.compact-screen .avalom-diamond-hud.is-combat-hud .adh-panel {
  margin-left: -28px !important;
  padding: 5px 14px 5px 38px !important;
  min-width: 192px !important;
}

body.compact-screen .avalom-diamond-hud .adh-name,
body.compact-screen .avalom-diamond-hud.is-combat-hud .adh-name {
  font-size: 16.5px !important;
  max-width: 155px !important;
  margin-bottom: 1px !important;
}

body.compact-screen .avalom-diamond-hud .adh-top-meta,
body.compact-screen .avalom-diamond-hud .adh-bot-meta {
  font-size: 13px !important;
  gap: 6px !important;
  margin-bottom: 2px !important;
}

body.compact-screen .avalom-diamond-hud .adh-bars {
  gap: 3px !important;
  margin-bottom: 2px !important;
}

body.compact-screen .avalom-diamond-hud .adh-bar-track {
  height: 7px !important;
}

body.compact-screen .avalom-diamond-hud .adh-bar-track.is-vig {
  height: 5px !important;
}

body.compact-screen .avalom-diamond-hud .adh-sp-gem {
  width: 6px !important;
  height: 6px !important;
}

/* ============================================================================
   COMBATE — BOTÃO RECUAR AO LADO DE ENCERRAR TURNO, HUD VITALIDADE ABAIXO DO
   AVATAR DO HERÓI & BARRA DE AÇÕES + CONSUMÍVEIS LADO A LADO
   ============================================================================ */
.cv-top-flee-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid rgba(239, 68, 68, 0.58);
  background: linear-gradient(180deg, rgba(64, 18, 22, 0.92), rgba(28, 9, 12, 0.96));
  color: #fecaca;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(254, 202, 202, 0.16);
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.cv-top-flee-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: #f87171;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.42), 0 8px 20px rgba(0, 0, 0, 0.8);
}

.cv-top-flee-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(20, 18, 24, 0.85);
  color: #cbd5e1;
}

/* Painel de Vitalidade e Vigor flutuando logo abaixo do avatar do jogador em combate */
.cv-hero-floating-vitals {
  position: relative;
  z-index: 12;
  margin-top: -18px;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.cv-hero-floating-vitals .avalom-diamond-hud.is-combat-hud {
  position: relative !important;
  left: auto !important;
  bottom: auto !important;
  pointer-events: none;
}

.cv-hero-floating-vitals .adh-diamond-wrap {
  pointer-events: none !important;
}

/* Barra de Ações e Consumíveis lado a lado com visual unificado */
.cv-bottom-hud.is-twin-dock {
  justify-content: center !important;
}

.cv-center-hud-col.is-side-by-side {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: flex-end !important;
  justify-content: center !important;
  gap: 10px !important;
  margin: 0 auto;
  max-width: 100%;
}

.cv-center-hud-col.is-side-by-side .cv-defense-dock,
.cv-center-hud-col.is-side-by-side .cv-action-bar-center,
.cv-center-hud-col.is-side-by-side .cv-potion-dock {
  background: linear-gradient(180deg, rgba(16, 15, 22, 0.94) 0%, rgba(8, 8, 12, 0.98) 100%) !important;
  border: 1px solid rgba(212, 175, 106, 0.58) !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.88), inset 0 1px 0 rgba(254, 240, 198, 0.16) !important;
}

/* Dock de Defesas Ativas (Bloqueio, Aparar, Esquiva) à esquerda da Barra de Ações */
.cv-defense-dock {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 6px 9px 7px;
  pointer-events: auto;
  flex-shrink: 0;
}

.cv-defense-bar {
  display: flex;
  align-items: center;
  gap: 5px;
}

.cv-defense-slot {
  position: relative;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 4px;
  border-radius: 3px;
  border: 1px solid rgba(196, 178, 138, 0.35);
  background: linear-gradient(180deg, rgba(16, 14, 18, 0.94) 55%, rgba(var(--rar-rgb, 196, 178, 138), 0.22) 100%);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0.72;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, opacity 0.14s ease;
}

.cv-defense-slot:hover {
  opacity: 1;
  transform: translateY(-1px);
  border-color: var(--slot-rar, #f5d07a);
}

.cv-defense-slot.is-active {
  opacity: 1;
  border: 2px solid var(--slot-rar, #fde047);
  background: linear-gradient(180deg, rgba(24, 20, 30, 0.96) 45%, rgba(var(--rar-rgb, 250, 204, 21), 0.42) 100%);
  box-shadow: 0 0 14px rgba(var(--rar-rgb, 250, 204, 21), 0.55), inset 0 0 10px rgba(var(--rar-rgb, 250, 204, 21), 0.25);
}

.cv-defense-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.cv-def-val {
  position: absolute;
  right: 2px;
  bottom: 1px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
  padding: 1px 3px;
  border-radius: 2px;
  background: rgba(8, 7, 10, 0.88);
  color: #fef3c7;
  border: 1px solid rgba(212, 175, 106, 0.4);
  pointer-events: none;
}

body.compact-screen .cv-defense-dock {
  padding: 4px 6px 5px !important;
  gap: 3px !important;
}

body.compact-screen .cv-defense-bar {
  gap: 3px !important;
}

body.compact-screen .cv-defense-slot {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  padding: 2px !important;
}

body.compact-screen .cv-def-val {
  font-size: 11.5px !important;
  padding: 0 2px !important;
}

body.compact-screen .cv-center-hud-col.is-side-by-side {
  gap: 7px !important;
}

body.compact-screen .cv-top-flee-btn {
  min-width: 80px;
  padding: 4px 9px;
}

body.compact-screen .cv-hero-floating-vitals {
  margin-top: -14px;
}

/* Painel compacto só de barras (Vitalidade, Vigor e Especiais) + Recuar abaixo no topo esquerdo do Combate */
.cv-top-hero-vitals {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  flex-shrink: 0;
}

.cv-top-flee-btn.is-under-vitals {
  width: 100%;
  min-width: 0;
  padding: 5px 10px;
  pointer-events: auto;
}

body.compact-screen .cv-top-flee-btn.is-under-vitals {
  padding: 4px 8px;
  font-size: 13px;
}

.avalom-diamond-hud.is-combat-hud.is-bars-only {
  position: relative !important;
  left: auto !important;
  bottom: auto !important;
  pointer-events: none;
}

.avalom-diamond-hud.is-fixed-bl.is-bars-only {
  top: 66px !important;
  left: 16px !important;
  bottom: auto !important;
  pointer-events: none;
}

.avalom-diamond-hud.is-bars-only .adh-panel {
  margin-left: 0 !important;
  padding: 7px 12px !important;
  min-width: 224px !important;
  border: 1px solid rgba(203, 184, 144, 0.42) !important;
  border-radius: 6px !important;
  background: linear-gradient(180deg, rgba(14, 13, 18, 0.9), rgba(8, 8, 12, 0.94)) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.78) !important;
}

.avalom-diamond-hud.is-bars-only .adh-hp-lbl {
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: #e2cfa2;
}

body.compact-screen .avalom-diamond-hud.is-bars-only .adh-panel,
.avalom-diamond-hud.is-combat-hud.is-bars-only .adh-panel {
  margin-left: 0 !important;
  padding: 5px 10px !important;
  min-width: 186px !important;
}

body.mobile-landscape-pc .avalom-diamond-hud.is-combat-hud {
  margin-left: max(10px, env(safe-area-inset-left)) !important;
}

body.mobile-landscape-pc .wm-top-left-vitals,
body.mobile-landscape-pc .adv-top-left-vitals {
  top: 8px !important;
  left: max(12px, env(safe-area-inset-left)) !important;
}

/* Painel de Vitalidade e Vigor no topo esquerdo dentro da tela do Mapa e da Exploração */
.wm-top-left-vitals,
.adv-top-left-vitals {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 24;
  pointer-events: none;
}

body.compact-screen .wm-top-left-vitals,
body.compact-screen .adv-top-left-vitals {
  top: 8px;
  left: 8px;
}

/* ============================================================================
   MODAL DE CONFIGURAÇÕES DO MENU TOPO (VOLUME & TAMANHO DE FONTE)
   ============================================================================ */
.avalom-settings-backdrop {
  z-index: 1200;
}

.avalom-settings-modal {
  max-width: 480px;
  width: min(480px, calc(100vw - 24px));
  padding: 20px 22px;
  border: 1px solid var(--border-gold-bright);
  background: linear-gradient(180deg, rgba(18, 15, 20, 0.97) 0%, rgba(10, 9, 13, 0.98) 100%);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.92), 0 0 28px rgba(198, 178, 137, 0.16);
}

.avalom-settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(203, 184, 144, 0.25);
}

.avalom-settings-head h3 {
  margin: 0 0 2px 0;
  color: var(--gold-bright);
}

.avalom-settings-section {
  background: rgba(8, 7, 11, 0.62);
  border: 1px solid rgba(196, 178, 138, 0.22);
  border-radius: 6px;
  padding: 13px 14px;
  margin-bottom: 13px;
}

.avalom-settings-sec-title {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 10px;
}

.avalom-settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0 10px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(196, 178, 138, 0.14);
  cursor: pointer;
}

.avalom-settings-toggle-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #d4af37;
  cursor: pointer;
}

.avalom-settings-slider-row {
  margin-bottom: 9px;
}

.avalom-settings-slider-row:last-child {
  margin-bottom: 0;
}

.avalom-settings-slider-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--text-main);
}

.avalom-settings-slider-top strong {
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
}

.avalom-settings-slider-row input[type="range"] {
  width: 100%;
  accent-color: #d4af37;
  cursor: pointer;
}

.avalom-font-size-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.avalom-font-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 10px 8px;
  border-radius: 6px;
  border: 1px solid rgba(196, 178, 138, 0.28);
  background: rgba(16, 14, 20, 0.85);
  color: var(--text-main);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
}

.avalom-font-opt:hover {
  border-color: var(--gold);
  background: rgba(30, 25, 22, 0.92);
  transform: translateY(-1px);
}

.avalom-font-opt.is-active {
  border-color: var(--gold-bright);
  background: linear-gradient(180deg, rgba(64, 50, 26, 0.72), rgba(28, 22, 14, 0.92));
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.28), inset 0 1px 0 rgba(255, 240, 195, 0.35);
}

.avalom-font-opt .af-sample {
  font-family: var(--font-display);
  color: var(--gold-bright);
  line-height: 1.1;
}

.avalom-font-opt strong {
  font-size: 13px;
  color: #f6ecd4;
  text-align: center;
}

.avalom-font-opt .af-sub {
  font-size: 13px;
  color: var(--text-muted);
}

.avalom-font-size-group.avalom-font-size-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.avalom-settings-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}

/* Ícones ampliados no topo (Volume, Opções, Tela Cheia) */
.nav-btn.nav-icon-btn {
  padding: 5px 11px;
  font-size: 21px;
  line-height: 1;
  min-width: 40px;
}
.nav-btn.nav-icon-btn img,
.nav-btn.nav-icon-btn .cui-xs {
  width: 22px;
  height: 22px;
}

/* ============================================================================
   ESCALA GLOBAL DE FONTES (NORMAL / MÉDIA / GRANDE)
   Mantém botões compactos e aplica reticências (...) em textos longos
   ============================================================================ */
:root {
  --font-scale: 1.12;
  --tt-font-size: 18px;
  --tt-width: 400px;
  --tt-info-width: 345px;
  --tt-pad: 13px 16px;
  --tt-icon-size: 50px;
  --tt-elem-ico-size: 18px;
}

html.font-size-normal body,
html.font-size-media body,
html.font-size-grande body,
html.font-size-extra body {
  font-size: calc(15.5px * var(--font-scale));
}

html.font-size-normal h2,
html.font-size-media h2,
html.font-size-grande h2,
html.font-size-extra h2 {
  font-size: calc(18px * var(--font-scale));
}

html.font-size-normal h3,
html.font-size-media h3,
html.font-size-grande h3,
html.font-size-extra h3 {
  font-size: calc(15.5px * var(--font-scale));
}

html.font-size-normal h4,
html.font-size-media h4,
html.font-size-grande h4,
html.font-size-extra h4 {
  font-size: calc(14px * var(--font-scale));
}

.topbar .nav-btn:not(.nav-icon-btn) {
  font-size: 12px !important;
  padding: 5px 9px !important;
  letter-spacing: 0.06em !important;
}

.nioh-style-title,
.sh-hero-name {
  font-size: calc(17px * var(--font-scale)) !important;
}

html.font-size-normal .small,
html.font-size-media .small,
html.font-size-grande .small,
html.font-size-extra .small {
  font-size: calc(13px * var(--font-scale));
}

html.font-size-normal .nioh-list-name,
html.font-size-media .nioh-list-name,
html.font-size-grande .nioh-list-name,
html.font-size-extra .nioh-list-name {
  font-size: calc(14px * var(--font-scale));
}

html.font-size-normal .nioh-list-sub,
html.font-size-media .nioh-list-sub,
html.font-size-grande .nioh-list-sub,
html.font-size-extra .nioh-list-sub,
html.font-size-normal .sh-power-nioh-desc,
html.font-size-media .sh-power-nioh-desc,
html.font-size-grande .sh-power-nioh-desc,
html.font-size-extra .sh-power-nioh-desc {
  font-size: calc(12.5px * var(--font-scale));
}

html.font-size-normal .log-entry,
html.font-size-media .log-entry,
html.font-size-grande .log-entry,
html.font-size-extra .log-entry {
  font-size: calc(13.5px * var(--font-scale));
}

html.font-size-normal .codex-entry-body,
html.font-size-media .codex-entry-body,
html.font-size-grande .codex-entry-body,
html.font-size-extra .codex-entry-body,
html.font-size-normal .jrn-book-body,
html.font-size-media .jrn-book-body,
html.font-size-grande .jrn-book-body,
html.font-size-extra .jrn-book-body {
  font-size: calc(15px * var(--font-scale));
}

/* Garante que todas as descrições, textos pequenos, lore e legendas escalem com a opção de fonte (PC & Smartphone) */
html[class*="font-size-"] p,
html[class*="font-size-"] li,
html[class*="font-size-"] td,
html[class*="font-size-"] th,
html[class*="font-size-"] .muted,
html[class*="font-size-"] .small,
html[class*="font-size-"] .stat-box .sub,
html[class*="font-size-"] .travel-metric,
html[class*="font-size-"] .gm-narration-text,
html[class*="font-size-"] .cr-clean-card-desc,
html[class*="font-size-"] .cr-attr-desc,
html[class*="font-size-"] .cr-equip-tile-desc,
html[class*="font-size-"] .cr-starter-kit-note,
html[class*="font-size-"] .cr-right-lore,
html[class*="font-size-"] .cr-right-note,
html[class*="font-size-"] .cr-step-alert,
html[class*="font-size-"] .forja-detail-desc,
html[class*="font-size-"] .forja-detail-stats,
html[class*="font-size-"] .nioh-insp-benefit-item,
html[class*="font-size-"] .quest-desc,
html[class*="font-size-"] .adv-text {
  font-size: calc(13px * var(--font-scale)) !important;
  line-height: 1.4;
}

html[class*="font-size-"] .sh-sbar-lbl,
html[class*="font-size-"] .sh-sbar-val,
html[class*="font-size-"] .sh-res-chip,
html[class*="font-size-"] .nioh-list-sub,
html[class*="font-size-"] .sh-power-nioh-desc {
  font-size: calc(12.5px * var(--font-scale)) !important;
}

/* Não expandir botões ou containers com textos/frases grandes: truncar com reticências (...) */
.btn,
.nav-btn,
.nioh-tab-btn,
.cr-step-title,
.cr-clean-card-head strong,
.forja-detail-title,
.sh-gear-name,
.tag {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn,
.nav-btn,
.nioh-tab-btn {
  flex-shrink: 0;
}

/* ============================================================================
   TOOLTIPS COMPACTOS & ADAPTADOS AO TAMANHO DE FONTE SELECIONADO
   ============================================================================ */
#item-tooltip-layer {
  max-width: min(800px, calc(100vw - 20px));
}

.tt-pair {
  gap: 10px;
}

.tt-card {
  width: var(--tt-width, 370px);
  max-width: calc(100vw - 20px);
  padding: var(--tt-pad, 12px 15px);
}

.tt-card.tt-card-info {
  width: var(--tt-info-width, 320px);
  max-width: calc(100vw - 20px);
  padding: var(--tt-pad, 10px 13px);
}

.tt-top-tag,
.tt-card.tt-card-info .tt-top-tag,
.tt-name,
.tt-card.tt-card-info .tt-name,
.tt-meta,
.tt-elem,
.tt-elem-res,
.tt-stat-row,
.tt-stat-lbl,
.tt-stat-val,
.tt-diff,
.tt-desc,
.tt-desc.tt-desc-info,
.tt-footer,
.tt-hint,
.tt-card .tt-num {
  font-size: var(--tt-font-size, 16px) !important;
  line-height: 1.32 !important;
}

.tt-top-tag,
.tt-card.tt-card-info .tt-top-tag {
  font-size: calc(var(--tt-font-size, 16px) * 0.78) !important;
  margin-bottom: 6px;
  padding-bottom: 5px;
}

.tt-name,
.tt-card.tt-card-info .tt-name {
  font-size: calc(var(--tt-font-size, 16px) * 1.06) !important;
}

.tt-meta,
.tt-footer,
.tt-hint {
  font-size: calc(var(--tt-font-size, 16px) * 0.88) !important;
}

.tt-header {
  gap: 10px;
  margin-bottom: 8px;
}

.tt-icon-frame {
  width: var(--tt-icon-size, 48px);
  height: var(--tt-icon-size, 48px);
  padding: 3px;
}

.tt-elem,
.tt-elem-res {
  margin-bottom: 6px;
}

.tt-elem-ico {
  width: var(--tt-elem-ico-size, 17px);
  height: var(--tt-elem-ico-size, 17px);
}

.tt-stats {
  gap: 5px;
  padding: 7px 0;
  margin-bottom: 8px;
}

.tt-diff {
  padding: 1px 5px;
}

.tt-desc {
  margin-bottom: 8px;
}

.tt-footer {
  padding-top: 7px;
}

/* Mantém rótulo e efeito/bônus/benefício na mesma linha para economizar espaço vertical */
.tt-card.tt-card-monster .tt-stats {
  gap: 4px;
}

.tt-card.tt-card-monster .tt-stat-row {
  display: block;
  text-align: left;
}

.tt-card.tt-card-monster .tt-stat-lbl {
  display: inline;
  margin-right: 5px;
  letter-spacing: 0.03em;
}

.tt-card.tt-card-monster .tt-stat-lbl::after {
  content: ':';
}

.tt-card.tt-card-monster .tt-stat-val {
  display: inline;
  width: auto;
  text-align: left;
}

.tt-card.tt-card-clock {
  min-width: 0;
  width: var(--tt-info-width, 320px);
  max-width: calc(100vw - 20px);
}

/* ============================================================================
   COMBATE — LOSANGO DE 4 BOTÕES CIRCULARES ATRÁS DO AVATAR (LADO ESQUERDO)
   Topo: Ataque Básico | Direita: Poder Livre | Esquerda: Guarda | Baixo: Passar Turno
   ============================================================================ */
.cv-hero-diamond-pad {
  position: absolute;
  left: 18px;
  bottom: 184px;
  width: 164px;
  height: 164px;
  z-index: 18;
  pointer-events: none;
}

.cv-hero-diamond-pad::before {
  content: '';
  position: absolute;
  inset: 30px;
  transform: rotate(45deg);
  border: 1.5px solid rgba(203, 184, 144, 0.34);
  background: radial-gradient(circle, rgba(16, 13, 20, 0.62) 0%, rgba(8, 7, 11, 0.25) 100%);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.65), inset 0 0 14px rgba(198, 178, 137, 0.1);
  pointer-events: none;
}

.cv-diamond-btn {
  position: absolute;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid var(--d-accent, rgba(212, 175, 55, 0.78));
  background: radial-gradient(circle at 35% 30%, rgba(36, 30, 38, 0.96) 0%, rgba(12, 10, 15, 0.98) 100%);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.85),
    0 0 14px rgba(var(--d-rgb, 212, 175, 55), 0.28),
    inset 0 1px 1px rgba(255, 245, 215, 0.32);
  padding: 4px;
  display: grid;
  place-items: center;
  cursor: pointer;
  pointer-events: auto;
  overflow: visible;
  transition: transform 0.16s ease, box-shadow 0.18s ease, border-color 0.18s ease, filter 0.16s ease;
}

.cv-diamond-btn.pos-top {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.cv-diamond-btn.pos-left {
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

.cv-diamond-btn.pos-right {
  top: 50%;
  right: 0;
  transform: translateY(-50%);
}

.cv-diamond-btn.pos-right-extra {
  top: 50%;
  left: calc(100% + 10px);
  transform: translateY(-50%);
}

.cv-diamond-btn.pos-bottom {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.cv-diamond-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  pointer-events: none;
}

.cv-diamond-btn .cv-diamond-emoji {
  font-size: 23px;
  line-height: 1;
  pointer-events: none;
}

.cv-diamond-btn .cv-diamond-cap {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  padding: 1px 6px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #fdf6e3;
  background: rgba(10, 9, 13, 0.95);
  border: 1px solid var(--d-accent, rgba(212, 175, 55, 0.72));
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
  pointer-events: none;
}

.cv-diamond-btn:hover:not(:disabled) {
  border-color: #fff2cc;
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.92),
    0 0 22px rgba(var(--d-rgb, 212, 175, 55), 0.65),
    inset 0 0 10px rgba(255, 245, 215, 0.25);
  filter: brightness(1.12);
  z-index: 4;
}

.cv-diamond-btn.pos-top:hover:not(:disabled) {
  transform: translateX(-50%) scale(1.1);
}

.cv-diamond-btn.pos-bottom:hover:not(:disabled) {
  transform: translateX(-50%) scale(1.1);
}

.cv-diamond-btn.pos-left:hover:not(:disabled) {
  transform: translateY(-50%) scale(1.1);
}

.cv-diamond-btn.pos-right:hover:not(:disabled),
.cv-diamond-btn.pos-right-extra:hover:not(:disabled) {
  transform: translateY(-50%) scale(1.1);
}

.cv-diamond-btn:disabled {
  opacity: 0.42;
  filter: grayscale(0.7);
  cursor: not-allowed;
}

body.compact-screen .cv-hero-diamond-pad {
  left: 12px;
  bottom: 156px;
  width: 140px;
  height: 140px;
}

body.compact-screen .cv-hero-diamond-pad::before {
  inset: 26px;
}

body.compact-screen .cv-diamond-btn {
  width: 50px;
  height: 50px;
}

body.compact-screen .cv-diamond-btn.pos-right-extra {
  left: calc(100% + 8px);
}

body.compact-screen .cv-diamond-btn .cv-diamond-cap {
  font-size: 11.5px;
  padding: 1px 5px;
}

/* ============================================================================
   MODO SMARTPHONE — POSICIONAMENTO DE TEXTOS FLUTUANTES (CABEÇA) & ÍCONES DE ELEMENTOS (MEIO DO AVATAR)
   ============================================================================ */
@keyframes cvFloatPopMobile {
  0%   { opacity: 0; transform: translate(-50%, 14px) scale(0.58); }
  14%  { opacity: 1; transform: translate(-50%, 0px) scale(1.12); }
  28%  { opacity: 1; transform: translate(-50%, -6px) scale(1); }
  84%  { opacity: 1; transform: translate(-50%, -14px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -24px) scale(0.94); }
}

body.mobile-landscape-pc #cv-vfx-hero {
  padding-top: 0;
  padding-bottom: 0;
}

body.mobile-landscape-pc #cv-vfx-hero .cv-vfx-burst {
  top: calc(58% - 110px);
}

body.mobile-landscape-pc #cv-vfx-hero .cv-float-num {
  top: 34%;
  animation-name: cvFloatPopMobile;
}

body.mobile-landscape-pc .cv-ally-figure .cv-vfx-anchor {
  padding-top: 0;
  padding-bottom: 0 !important;
}

body.mobile-landscape-pc .cv-ally-figure .cv-vfx-anchor .cv-vfx-burst {
  top: calc(58% - 110px);
}

body.mobile-landscape-pc .cv-ally-figure .cv-vfx-anchor .cv-float-num {
  top: 38%;
  animation-name: cvFloatPopMobile;
}

body.mobile-landscape-pc .cv-enemy-figure .cv-vfx-anchor {
  padding-top: 0;
  padding-bottom: 0;
}

body.mobile-landscape-pc .cv-enemy-figure .cv-vfx-anchor .cv-vfx-burst {
  top: calc(56% - 110px);
}

body.mobile-landscape-pc .cv-enemy-figure .cv-vfx-anchor .cv-float-num {
  top: 32%;
  animation-name: cvFloatPopMobile;
}

/* ============================================================================
   CRIAÇÃO DE PERSONAGEM — GRADE 8×2 DE ÍCONES DE CONCEITO & SCROLL DO MODAL DE AVATARES NO SMARTPHONE
   ============================================================================ */
.cr-showcase .cr-icon-tile-grid.cr-concept-grid,
.cr-icon-tile-grid.cr-concept-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
  gap: 8px;
}

.cr-showcase .cr-concept-tile,
.cr-concept-tile {
  padding: 7px 4px;
  gap: 5px;
  min-width: 0;
}

.cr-showcase .cr-concept-tile .cr-icon-tile-ring,
.cr-concept-tile .cr-icon-tile-ring {
  width: 48px;
  height: 48px;
  border-color: color-mix(in srgb, var(--concept-accent, var(--gold)) 55%, rgba(203, 184, 144, 0.35));
}

.cr-concept-tile.selected .cr-icon-tile-ring {
  border-color: var(--concept-accent, var(--gold-bright));
  box-shadow: 0 0 14px color-mix(in srgb, var(--concept-accent, var(--gold-bright)) 55%, transparent);
}

.cr-concept-tile .cr-icon-tile-label {
  font-size: 13px;
  line-height: 1.15;
  text-align: center;
  word-break: break-word;
}

.sh-avatar-modal {
  overflow: hidden;
}

.sh-avatar-gallery-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

body.mobile-landscape-pc .sh-avatar-modal-backdrop {
  padding: 12px;
}

body.mobile-landscape-pc .sh-avatar-modal {
  max-height: 82vh;
  padding: 14px;
}

body.mobile-landscape-pc .sh-avatar-gallery-grid {
  max-height: 64vh;
  overflow-y: auto !important;
}

/* ============================================================================
   MODO SMARTPHONE — CRIAÇÃO DE PERSONAGEM FOCADA NOS PASSOS NO TOPO DA PÁGINA
   ============================================================================ */
.cr-page-shell {
  display: flex;
  flex-direction: column;
}

body.mobile-landscape-pc .cr-page-shell {
  gap: 12px;
}

body.mobile-landscape-pc .cr-page-shell .cr-showcase {
  order: 1;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
  align-items: start;
  margin-bottom: 0 !important;
}

/* Criação de Personagem em Tela Única (PC: 3 colunas com scroll interno; Smartphone/Compacto: abas sem rolar página) */
@media (min-width: 1181px) {
  .sp-creator-tabs {
    display: none !important;
  }
  .cr-page-shell .cr-showcase {
    height: calc(100dvh - 178px);
    min-height: 430px;
    margin-bottom: 0 !important;
    overflow: hidden;
    align-items: stretch;
  }
  .cr-page-shell .cr-left-col,
  .cr-page-shell .cr-center-col,
  .cr-page-shell .cr-right-col {
    height: 100%;
    min-height: 0;
    overflow-y: auto;
  }
}

@media (max-width: 1180px) {
  .cr-page-shell .cr-left-col,
  .cr-page-shell .cr-center-col,
  .cr-page-shell .cr-right-col {
    display: none !important;
    width: 100% !important;
    max-width: 100% !important;
    height: calc(100dvh - 200px) !important;
    min-height: 260px !important;
    overflow-y: auto !important;
  }
  .cr-page-shell[data-sp-creator-active="steps"] .cr-center-col {
    display: flex !important;
    flex-direction: column !important;
  }
  .cr-page-shell[data-sp-creator-active="summary"] .cr-showcase {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
  .cr-page-shell[data-sp-creator-active="summary"] .cr-left-col,
  .cr-page-shell[data-sp-creator-active="summary"] .cr-right-col {
    display: flex !important;
  }
}

body.mobile-landscape-pc .cr-page-shell {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px;
}

body.mobile-landscape-pc .cr-page-shell .cr-top-actions-wrap {
  order: 0;
}

body.mobile-landscape-pc .cr-page-shell .sp-creator-tabs {
  display: flex !important;
  margin-bottom: 0 !important;
}

body.mobile-landscape-pc .cr-page-shell .cr-showcase {
  display: block !important;
  margin-bottom: 0 !important;
}

body.mobile-landscape-pc .cr-page-shell .cr-left-col,
body.mobile-landscape-pc .cr-page-shell .cr-center-col,
body.mobile-landscape-pc .cr-page-shell .cr-right-col {
  display: none !important;
  width: 100% !important;
  max-width: 100% !important;
  height: calc(var(--mobile-real-vh, 100dvh) - 160px) !important;
  min-height: 260px !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  border: none !important;
  padding: 8px 10px !important;
}

body.mobile-landscape-pc .cr-page-shell[data-sp-creator-active="steps"] .cr-center-col {
  display: flex !important;
  flex-direction: column !important;
}

body.mobile-landscape-pc .cr-page-shell[data-sp-creator-active="summary"] .cr-showcase {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

body.mobile-landscape-pc .cr-page-shell[data-sp-creator-active="summary"] .cr-left-col,
body.mobile-landscape-pc .cr-page-shell[data-sp-creator-active="summary"] .cr-right-col {
  display: flex !important;
}

body.mobile-landscape-pc .cr-showcase .cr-stepper-bar {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
  margin-bottom: 10px !important;
  padding-bottom: 8px !important;
}

/* ============================================================================
   TELA DE NOTIFICAÇÃO OFFLINE CENTRALIZADA (PC & SMARTPHONE — RESPONSIVA)
   ============================================================================ */
.avalom-offline-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vw, 28px);
  background: radial-gradient(circle at center, rgba(18, 14, 22, 0.94) 0%, rgba(6, 5, 8, 0.98) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.avalom-offline-overlay.is-visible {
  display: flex;
}

.avalom-offline-card {
  width: min(460px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  text-align: center;
  padding: clamp(18px, 3.2vw, 30px) clamp(16px, 3vw, 26px);
  border-radius: 10px;
  border: 1.5px solid var(--border-gold-bright, rgba(235, 219, 182, 0.78));
  background: linear-gradient(180deg, rgba(20, 16, 22, 0.97) 0%, rgba(10, 9, 13, 0.99) 100%);
  box-shadow: 0 24px 68px rgba(0, 0, 0, 0.95), 0 0 32px rgba(198, 178, 137, 0.18);
  color: var(--text-main, #ded6c6);
}

.avalom-offline-icon {
  font-size: clamp(34px, 5vw, 48px);
  line-height: 1;
  margin-bottom: 10px;
  filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.45));
}

.avalom-offline-eyebrow {
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: clamp(10px, 1.4vw, 12px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold, #c6b289);
  margin-bottom: 6px;
}

.avalom-offline-card h3 {
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: clamp(18px, 2.4vw, 24px);
  color: var(--gold-bright, #f2e8cf);
  margin: 0 0 10px 0;
}

.avalom-offline-card p {
  font-size: clamp(14px, 1.7vw, 16.5px);
  line-height: 1.48;
  color: var(--text-main, #ded6c6);
  margin: 0 0 14px 0;
}

.avalom-offline-status {
  min-height: 20px;
  font-size: clamp(12.5px, 1.4vw, 14px);
  color: #fca5a5;
  margin-bottom: 14px;
}

.avalom-offline-status.is-ok {
  color: #86efac;
}

.avalom-offline-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.avalom-offline-actions .btn {
  min-width: 145px;
  justify-content: center;
}

body.mobile-landscape-pc .avalom-offline-card,
body.compact-screen .avalom-offline-card {
  width: min(440px, 88vw);
  padding: 16px 18px;
}

@media (max-width: 520px), (max-height: 460px) {
  .avalom-offline-card {
    padding: 14px 16px;
  }
  .avalom-offline-icon {
    font-size: 32px;
    margin-bottom: 6px;
  }
  .avalom-offline-actions {
    gap: 8px;
  }
  .avalom-offline-actions .btn {
    flex: 1 1 130px;
    min-width: 120px;
    padding: 8px 12px;
  }
}

/* ============================================================================
   TELA INICIAL & SELEÇÃO DE SLOTS — BARRAS SUPERIORES & CARDS ADAPTADOS NO SMARTPHONE
   ============================================================================ */
.landing-topbar-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.landing-lang-select {
  width: auto !important;
  padding: 5px 10px !important;
  background: rgba(14, 12, 14, 0.88) !important;
  border: 1px solid rgba(203, 184, 144, 0.45) !important;
  color: var(--gold-bright) !important;
}

.slots-topbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.slots-topbar-right {
  justify-content: flex-end;
}

/* Modo Smartphone — Botões do topo da Tela Inicial adaptados */
body.mobile-landscape-pc .landing-topbar {
  top: 10px;
  left: 14px;
  right: 14px;
  gap: 8px;
}

body.mobile-landscape-pc .landing-topbar-controls {
  gap: 6px;
}

body.mobile-landscape-pc .landing-topbar .btn,
body.mobile-landscape-pc .landing-topbar .landing-lang-select {
  min-height: 30px !important;
  height: 30px;
  padding: 4px 10px !important;
  font-size: 13.5px !important;
  line-height: 1.15;
  white-space: nowrap;
}

/* Modo Smartphone — Topo e Cards da Tela de Seleção de Personagem (4 Slots) */
body.mobile-landscape-pc .slots-shell {
  padding: 10px 14px 18px !important;
  min-height: 100vh;
}

body.mobile-landscape-pc .slots-topbar {
  margin-bottom: 8px !important;
  gap: 8px !important;
  flex-wrap: wrap;
  justify-content: space-between;
}

body.mobile-landscape-pc .slots-topbar-group {
  gap: 6px;
}

body.mobile-landscape-pc .slots-topbar .btn {
  min-height: 30px !important;
  height: 30px;
  padding: 4px 10px !important;
  font-size: 13px !important;
  line-height: 1.15;
  white-space: nowrap;
}

body.mobile-landscape-pc .slots-header {
  margin-bottom: 4px !important;
}

body.mobile-landscape-pc .slots-eyebrow {
  font-size: 12.5px !important;
  margin-bottom: 2px !important;
}

body.mobile-landscape-pc .slots-title {
  font-size: 24px !important;
  margin-bottom: 2px !important;
}

body.mobile-landscape-pc .slots-subtitle {
  font-size: 13px !important;
  line-height: 1.3 !important;
}

body.mobile-landscape-pc .slots-quadtych {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
  padding-top: 34px !important;
  margin-top: 4px !important;
}

body.mobile-landscape-pc .slot-pillar {
  min-height: 375px !important;
  padding: 44px 12px 14px !important;
}

body.mobile-landscape-pc .slot-medallion {
  transform: translateX(-50%) scale(0.76);
  transform-origin: top center;
}

body.mobile-landscape-pc .slot-pillar-head {
  gap: 4px;
}

body.mobile-landscape-pc .slot-pillar-kicker {
  font-size: 12.5px !important;
}

body.mobile-landscape-pc .slot-pillar-title {
  font-size: 17px !important;
  line-height: 1.18 !important;
}

body.mobile-landscape-pc .slot-pillar-divider {
  margin: 4px auto !important;
}

body.mobile-landscape-pc .slot-pillar-desc {
  font-size: 13.5px !important;
  line-height: 1.3 !important;
}

body.mobile-landscape-pc .slot-pillar-meta {
  gap: 4px !important;
  padding: 6px 8px !important;
  margin: 6px 0 !important;
}

body.mobile-landscape-pc .slot-meta-row {
  font-size: 13px !important;
}

body.mobile-landscape-pc .slot-pillar-footer {
  gap: 6px !important;
}

body.mobile-landscape-pc .slot-action-btn {
  padding: 7px 10px !important;
  font-size: 13.5px !important;
  min-height: 32px !important;
}

body.mobile-landscape-pc .slot-secondary-actions .btn {
  padding: 4px 8px !important;
  font-size: 13px !important;
  min-height: 26px !important;
}

/* Botão de disparo + Modal centralizado para digitar o Nome do Herói (PC & Smartphone) */
.cr-name-trigger-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.cr-name-trigger-btn:hover {
  border-color: var(--gold-bright);
  background: rgba(24, 20, 26, 0.92);
}

.cr-name-trigger-val {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: var(--gold-bright);
}

.cr-name-trigger-val.is-placeholder {
  font-weight: 400;
  color: var(--text-muted);
}

.cr-name-trigger-action {
  font-family: var(--font-display);
  font-size: 13.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-bright);
  padding: 3px 9px;
  border-radius: 4px;
  border: 1px solid rgba(203, 184, 144, 0.45);
  background: rgba(58, 45, 24, 0.45);
  flex-shrink: 0;
}

.cr-name-modal-backdrop {
  z-index: 1300;
}

.cr-name-modal-box {
  width: min(440px, 92vw);
  text-align: center;
  padding: 20px 22px;
  border: 1.5px solid var(--border-gold-bright);
  background: linear-gradient(180deg, rgba(20, 16, 22, 0.98) 0%, rgba(10, 9, 13, 0.99) 100%);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.95), 0 0 28px rgba(198, 178, 137, 0.18);
}

.cr-name-modal-eyebrow {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-bottom: 6px;
}

.cr-name-modal-box h3 {
  margin: 0 0 8px 0;
  color: var(--gold-bright);
}

.cr-name-modal-input {
  width: 100%;
  font-size: 16px !important;
  text-align: center;
  margin-bottom: 14px;
}

.cr-name-modal-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.cr-name-modal-actions .btn {
  min-width: 120px;
  justify-content: center;
}

.mobile-touch-cursor.is-text-editing {
  opacity: 0.25 !important;
}

/* Botões compactos de viagem/perícias/teletransporte na tela do Mapa */
.wm-travel-btn {
  font-size: 11px !important;
  padding: 6px 8px !important;
  line-height: 1.15 !important;
  letter-spacing: 0.02em !important;
  gap: 4px !important;
}

body.mobile-landscape-pc .wm-travel-btn {
  font-size: 10px !important;
  padding: 5px 6px !important;
}

/* Modo Smartphone — Barra de rolagem vertical sempre visível (linha vertical + polegar dourado) em todas as telas e painéis roláveis */
body.mobile-landscape-pc,
body.mobile-landscape-pc * {
  scrollbar-width: auto !important;
  scrollbar-color: auto !important;
}

body.mobile-landscape-pc *::-webkit-scrollbar {
  width: 10px !important;
  height: 10px !important;
  display: block !important;
}

body.mobile-landscape-pc *::-webkit-scrollbar-track {
  background: linear-gradient(
    90deg,
    rgba(9, 8, 11, 0.92) 0%,
    rgba(9, 8, 11, 0.92) 38%,
    rgba(218, 186, 118, 0.42) 48%,
    rgba(218, 186, 118, 0.42) 52%,
    rgba(9, 8, 11, 0.92) 62%,
    rgba(9, 8, 11, 0.92) 100%
  ) !important;
  border-left: 1px solid rgba(212, 175, 55, 0.28) !important;
  border-right: 1px solid rgba(212, 175, 55, 0.16) !important;
  border-radius: 6px !important;
}

body.mobile-landscape-pc *::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #9a7b3c 0%, #e6cc8a 50%, #8f6e30 100%) !important;
  border: 1.5px solid #0d0b0e !important;
  border-radius: 6px !important;
  min-height: 30px !important;
  box-shadow: inset 0 0 3px rgba(255, 245, 210, 0.45) !important;
}

body.mobile-landscape-pc *::-webkit-scrollbar-button:single-button {
  width: 10px !important;
  height: 14px !important;
  background-size: 8px 8px !important;
}

body.mobile-landscape-pc .nav-tabs::-webkit-scrollbar,
body.mobile-landscape-pc .sp-screen-tabs::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

body.mobile-landscape-pc .forja-studio {
  grid-template-columns: minmax(0, 1.05fr) minmax(135px, 0.52fr) minmax(0, 1.05fr) !important;
  gap: 12px !important;
  padding: 12px 14px !important;
  min-height: 0 !important;
  align-items: start !important;
}

body.mobile-landscape-pc .forja-grid-col,
body.mobile-landscape-pc .forja-center-stage,
body.mobile-landscape-pc .forja-art-col,
body.mobile-landscape-pc .forja-preview-col,
body.mobile-landscape-pc .forja-detail-col,
body.mobile-landscape-pc .forja-info-col,
body.mobile-landscape-pc .merc-detail-col {
  grid-row: 1;
  min-width: 0 !important;
  max-height: 410px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-right: 8px !important;
}

body.mobile-landscape-pc .forja-studio .forja-center-stage {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 220px !important;
  padding-right: 0 !important;
  overflow: hidden !important;
}

body.mobile-landscape-pc .forja-studio .forja-hero-preview,
body.mobile-landscape-pc .forja-studio .forja-hero-preview img,
body.mobile-landscape-pc .forja-studio .forja-preview-frame,
body.mobile-landscape-pc .forja-studio .forja-art-frame,
body.mobile-landscape-pc .forja-studio .forja-art-col img,
body.mobile-landscape-pc .forja-studio .forja-preview-col img {
  width: 112px !important;
  height: 112px !important;
  max-width: 112px !important;
  max-height: 112px !important;
  object-fit: contain !important;
}

body.mobile-landscape-pc .forja-studio .forja-anvil-glow {
  width: 120px !important;
  height: 120px !important;
}

body.mobile-landscape-pc .forja-studio .forja-fire-base {
  width: 100px !important;
}

body.mobile-landscape-pc .forja-studio .forja-detail-col .forja-detail-title {
  font-size: 16px !important;
  line-height: 1.2 !important;
  white-space: normal;
  overflow-wrap: anywhere;
}

body.mobile-landscape-pc .forja-group-title {
  font-size: 11px !important;
  margin-bottom: 5px !important;
}

body.mobile-landscape-pc .forja-tiles-grid {
  grid-template-columns: repeat(auto-fill, minmax(56px, 60px)) !important;
  gap: 6px !important;
}

body.mobile-landscape-pc .forja-item-tile {
  padding: 4px !important;
  width: 60px;
  height: 60px;
  max-width: 60px !important;
  max-height: 60px !important;
}

/* ============================================================================
   CASA DE LEILÕES (AUCTION HOUSE) — PC & SMARTPHONE
   ============================================================================ */
.ah-tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ah-vault-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 5px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #09140c;
  background: #4ade80;
}

.ah-status-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ah-status-dot.is-online {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.75);
}

.ah-status-dot.is-local {
  background: #f97316;
  box-shadow: 0 0 8px rgba(249, 115, 22, 0.75);
}

.ah-filter-panel {
  padding: 12px 14px;
}

.ah-filter-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.8fr) minmax(140px, 0.8fr) minmax(140px, 0.8fr);
  gap: 8px;
}

.ah-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  min-height: 38px;
  padding: 6px 12px;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.ah-select-trigger:hover {
  border-color: var(--gold-bright);
  background: rgba(28, 22, 34, 0.92);
}

.ah-select-trigger-val {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.ah-select-trigger-arrow {
  color: var(--gold);
  font-size: 14px;
  flex-shrink: 0;
}

.ah-select-modal-box {
  max-width: 380px;
}

.ah-select-opt-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 10px;
  max-height: 55vh;
  overflow-y: auto;
  padding-right: 2px;
}

.ah-select-opt-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid rgba(196, 178, 138, 0.28);
  background: rgba(16, 14, 22, 0.92);
  color: var(--opt-color, #f1e6cc);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.ah-select-opt-btn:hover,
.ah-select-opt-btn.is-active {
  border-color: var(--gold-bright);
  background: linear-gradient(90deg, rgba(212, 175, 92, 0.22), rgba(20, 16, 26, 0.95));
}

.ah-select-opt-check {
  color: #fde047;
  font-weight: 700;
}

.ah-listings-scroll {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: calc(100vh - 340px);
  min-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}

.ah-listing-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 156px 156px 218px;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid rgba(196, 178, 138, 0.24);
  background: linear-gradient(180deg, rgba(16, 14, 20, 0.92), rgba(10, 9, 13, 0.95));
  transition: border-color 0.16s ease, background 0.16s ease;
}

.ah-listing-row:hover {
  border-color: rgba(235, 219, 182, 0.55);
  background: linear-gradient(180deg, rgba(24, 20, 26, 0.95), rgba(13, 11, 16, 0.97));
}

.ah-listing-row.is-mine {
  border-color: rgba(250, 204, 21, 0.45);
  background: linear-gradient(180deg, rgba(34, 28, 16, 0.65), rgba(14, 12, 14, 0.94));
}

.ah-item-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  cursor: help;
}

.ah-item-ico {
  position: relative;
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  border-radius: 6px;
  padding: 3px;
  background: rgba(8, 8, 12, 0.92);
}

.ah-item-ico img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.ah-item-info {
  min-width: 0;
  flex: 1;
}

.ah-item-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ah-price-col {
  width: 100%;
  text-align: right;
  padding-right: 6px;
  border-right: 1px solid rgba(196, 178, 138, 0.14);
}

.ah-price-val {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-weight: 700;
  color: var(--gold-bright);
  font-size: 19px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ah-price-val.is-buyout {
  color: #fde047;
}

.ah-actions-col {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: nowrap;
}

.ah-num-trigger-btn {
  padding: 7px 10px;
}

.ah-sell-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.95fr);
  gap: 14px;
  align-items: start;
}

.ah-sell-bag-col {
  padding: 14px;
  max-height: calc(100vh - 280px);
  overflow-y: auto;
}

.ah-sell-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(58px, 64px));
  gap: 8px;
}

.ah-sell-form-col {
  padding: 16px;
}

.ah-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ah-form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ah-fee-summary {
  padding: 10px 12px;
  border-radius: 6px;
  background: rgba(8, 7, 11, 0.72);
  border: 1px solid rgba(196, 178, 138, 0.22);
}

.ah-vault-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ah-vault-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 6px;
  background: rgba(8, 7, 11, 0.65);
  border: 1px solid rgba(196, 178, 138, 0.22);
}

body.mobile-landscape-pc .ah-listings-scroll {
  max-height: 58vh;
}

body.mobile-landscape-pc .ah-listing-row {
  grid-template-columns: minmax(0, 1fr) 136px 136px 196px;
  gap: 10px;
  padding: 8px 10px;
}

body.mobile-landscape-pc .ah-price-val {
  font-size: 17.5px;
}

body.mobile-landscape-pc .ah-sell-grid {
  grid-template-columns: repeat(auto-fill, minmax(56px, 60px));
  gap: 6px;
}

body.mobile-landscape-pc .ah-select-trigger {
  min-height: 44px;
  padding: 8px 14px;
  font-size: 15px;
}

body.mobile-landscape-pc .ah-select-opt-btn {
  min-height: 46px;
  padding: 11px 16px;
  font-size: 16px;
}

@media (max-width: 820px) {
  .ah-filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ah-filter-row .ah-search-inp {
    grid-column: 1 / -1;
    min-height: 44px;
    font-size: 16px;
  }
  .ah-filter-row .ah-select-trigger {
    min-height: 44px;
    font-size: 15px;
  }
  .ah-sell-layout {
    grid-template-columns: 1fr;
  }
  .ah-listing-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .ah-price-col {
    text-align: left;
  }
  .ah-actions-col {
    justify-content: flex-start;
  }
}

/* ============================================================================
   MODO SMARTPHONE — AMPLIAÇÃO DE TODAS AS FONTES & CATEGORIAS PARA MELHOR LEITURA
   (Sem expandir botões; textos longos em botões/tags truncados com reticências)
   ============================================================================ */
html.font-size-normal body.mobile-landscape-pc {
  --font-scale: 0.94;
  --tt-font-size: 16px;
  --tt-width: 380px;
  --tt-info-width: 330px;
}

html.font-size-media body.mobile-landscape-pc {
  --font-scale: 1.04;
  --tt-font-size: 17.5px;
  --tt-width: 400px;
  --tt-info-width: 350px;
}

html.font-size-grande body.mobile-landscape-pc {
  --font-scale: 1.16;
  --tt-font-size: 19px;
  --tt-width: 430px;
  --tt-info-width: 375px;
}

html.font-size-extra body.mobile-landscape-pc {
  --font-scale: 1.28;
  --tt-font-size: 21px;
  --tt-width: 455px;
  --tt-info-width: 400px;
}

body.mobile-landscape-pc {
  font-size: calc(15px * var(--font-scale));
  line-height: 1.4;
}

body.mobile-landscape-pc p,
body.mobile-landscape-pc li,
body.mobile-landscape-pc td,
body.mobile-landscape-pc th,
body.mobile-landscape-pc label {
  font-size: calc(13px * var(--font-scale));
}

body.mobile-landscape-pc .small,
body.mobile-landscape-pc .muted {
  font-size: calc(12.5px * var(--font-scale));
}

body.mobile-landscape-pc .cr-clean-card-desc,
body.mobile-landscape-pc .cr-attr-desc,
body.mobile-landscape-pc .cr-equip-tile-desc,
body.mobile-landscape-pc .cr-starter-kit-note,
body.mobile-landscape-pc .cr-right-lore,
body.mobile-landscape-pc .cr-right-note,
body.mobile-landscape-pc .cr-step-alert,
body.mobile-landscape-pc .forja-detail-desc,
body.mobile-landscape-pc .forja-detail-stats,
body.mobile-landscape-pc .codex-entry-body,
body.mobile-landscape-pc .jrn-book-body,
body.mobile-landscape-pc .nioh-list-sub,
body.mobile-landscape-pc .sh-power-nioh-desc {
  font-size: calc(12.5px * var(--font-scale)) !important;
  line-height: 1.38 !important;
}

body.mobile-landscape-pc .nioh-list-name,
body.mobile-landscape-pc .cr-clean-card-head strong,
body.mobile-landscape-pc .cr-equip-tile-name {
  font-size: calc(13.5px * var(--font-scale)) !important;
}

body.mobile-landscape-pc .sh-top-hero-bar .nioh-list-sub {
  display: none !important;
}

body.mobile-landscape-pc .sh-top-hero-bar .sh-top-hero-switch-btn {
  min-height: 36px !important;
  padding: 5px 8px !important;
}

body.mobile-landscape-pc .btn,
body.mobile-landscape-pc .nav-btn:not(.nav-icon-btn),
body.mobile-landscape-pc .nioh-tab-btn,
body.mobile-landscape-pc .tag {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================================
   MODELO DE TELA ÚNICA & TROCA POR ABAS (PC & SMARTPHONE)
   Mantém o jogador centralizado na mesma posição sem rolar a página para baixo
   ============================================================================ */
.cv-enemy-book-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1;
  pointer-events: auto;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.cv-enemy-book-ico.is-known {
  background: rgba(16, 42, 26, 0.92);
  border: 1.5px solid #4ade80;
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.35);
  cursor: help;
}

.cv-enemy-book-ico.is-unknown {
  background: linear-gradient(180deg, rgba(68, 34, 108, 0.94), rgba(34, 16, 58, 0.96));
  border: 1.5px solid #c084fc;
  box-shadow: 0 0 12px rgba(192, 132, 252, 0.45);
  cursor: pointer;
}

.cv-enemy-book-ico.is-unknown:hover:not(.is-disabled) {
  transform: scale(1.14);
  filter: brightness(1.18);
  box-shadow: 0 0 16px rgba(216, 180, 254, 0.72);
}

.cv-enemy-book-ico.is-unknown.is-disabled {
  opacity: 0.48;
  cursor: not-allowed;
  filter: grayscale(0.45);
}

.sp-screen-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 10px;
  margin: 0 auto 10px;
  max-width: 980px;
  background: rgba(12, 10, 14, 0.92);
  border: 1px solid rgba(203, 184, 144, 0.35);
  border-radius: 8px;
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.sp-screen-tabs::-webkit-scrollbar {
  display: none;
}

.sp-screen-tab {
  flex: 1 0 auto;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid rgba(203, 184, 144, 0.22);
  background: rgba(24, 20, 22, 0.85);
  color: var(--stone-text);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.18s ease;
}

.sp-screen-tab:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

.sp-screen-tab.is-active {
  background: linear-gradient(180deg, rgba(84, 62, 30, 0.85), rgba(34, 24, 12, 0.95));
  border-color: var(--gold-bright);
  color: var(--gold-bright);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.25);
}

/* Ficha do Personagem em Tela Única (PC & Smartphone):
   Menu Principal no Topo + Menu Secundário Vertical à Esquerda + Painel Único Centralizado */
.sp-sheet-root .sh-top-hero-bar {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)) !important;
  gap: 8px !important;
  margin-bottom: 10px !important;
}

.cr-page-shell .cr-top-bar {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  gap: 6px !important;
  margin-bottom: 6px !important;
}

.cr-page-shell .cr-top-bar .sh-top-hero-switch-btn {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  min-height: 36px !important;
  padding: 5px 10px !important;
}

.cr-page-shell .cr-top-bar .nioh-list-sub {
  display: none !important;
}

.sh-cons-confirm-box {
  max-width: 420px;
  width: min(420px, 92vw);
}

.sh-cons-confirm-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 8px;
  background: rgba(14, 12, 18, 0.85);
  border: 1px solid rgba(203, 184, 144, 0.35);
}

.sh-cons-confirm-item img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid rgba(203, 184, 144, 0.45);
  background: rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.sh-workspace-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  height: calc(100dvh - 178px);
  min-height: 360px;
}

.sh-left-nav-rail {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  align-self: stretch;
}

.sh-left-nav-rail .sh-top-hero-switch-btn {
  width: 100%;
  min-height: 58px;
}

.sh-workspace-main {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.sp-sheet-root .sh-showcase,
.sp-sheet-root .sh-equip-attrs-col,
.sp-sheet-root .sh-equip-combat-col,
.sp-sheet-root .sh-center-col,
.sp-sheet-root .sh-center-stage,
.sp-sheet-root .sh-inv-panel,
.sp-sheet-root .sh-right-pericias-col,
.sp-sheet-root .sh-workspace-main > .nioh-shell {
  display: none !important;
}

.sp-sheet-root[data-sp-sheet-active="equip"] .sh-showcase {
  display: grid !important;
  grid-template-columns: minmax(195px, 0.62fr) minmax(380px, 1.65fr) minmax(195px, 0.62fr) !important;
  gap: 10px !important;
  height: 100% !important;
  margin-bottom: 0 !important;
  align-items: stretch !important;
}

.sp-sheet-root[data-sp-sheet-active="equip"] .sh-equip-attrs-col,
.sp-sheet-root[data-sp-sheet-active="equip"] .sh-equip-combat-col,
.sp-sheet-root[data-sp-sheet-active="equip"] .sh-center-col,
.sp-sheet-root[data-sp-sheet-active="equip"] .sh-center-stage {
  display: flex !important;
  height: 100% !important;
  min-height: 0 !important;
}

.sp-sheet-root[data-sp-sheet-active="equip"] .sh-equip-attrs-col,
.sp-sheet-root[data-sp-sheet-active="equip"] .sh-equip-combat-col {
  flex-direction: column !important;
  justify-content: flex-start !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-bottom: 42px !important;
  box-sizing: border-box !important;
  -webkit-overflow-scrolling: touch;
}

.sp-sheet-root[data-sp-sheet-active="equip"] .sh-equip-attrs-col > *,
.sp-sheet-root[data-sp-sheet-active="equip"] .sh-equip-combat-col > * {
  flex-shrink: 0;
}

.sp-sheet-root[data-sp-sheet-active="equip"] .sh-center-col {
  min-width: 0 !important;
  overflow: visible !important;
  align-items: center !important;
  justify-content: center !important;
}

.sp-sheet-root[data-sp-sheet-active="equip"] .sh-center-stage {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  padding: 10px 0 18px !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

.sp-sheet-root[data-sp-sheet-active="equip"] .sh-ring-slots-layer {
  top: 48% !important;
  width: min(760px, 100%) !important;
  height: clamp(410px, 64vh, 580px) !important;
  max-height: 96% !important;
}

.sp-sheet-root[data-sp-sheet-active="equip"] .sh-ring-medallion {
  width: clamp(64px, 9.2vh, 92px) !important;
  height: clamp(64px, 9.2vh, 92px) !important;
  padding: 0 !important;
}

.sp-sheet-root[data-sp-sheet-active="equip"] .sh-ring-medallion img,
.sp-sheet-root[data-sp-sheet-active="equip"] .sh-ring-medallion .custom-ui-icon.cui-slot {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.sp-sheet-root[data-sp-sheet-active="equip"] .sh-hero-figure {
  height: clamp(360px, 60vh, 620px) !important;
  max-height: 92% !important;
}

.sp-sheet-root[data-sp-sheet-active="equip"] .sh-hero-figure-img {
  height: 100% !important;
  max-height: 100% !important;
  max-width: 92% !important;
  width: auto !important;
  object-fit: contain !important;
}

.sp-sheet-root[data-sp-sheet-active="bag"] .sh-showcase,
.sp-sheet-root[data-sp-sheet-active="bag"] .sh-center-col,
.sp-sheet-root[data-sp-sheet-active="bag"] .sh-inv-panel {
  display: flex !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  margin-bottom: 0 !important;
}

.sp-sheet-root[data-sp-sheet-active="bag"] .sh-inv-panel {
  flex-direction: column !important;
  overflow-y: auto !important;
}

.sp-sheet-root[data-sp-sheet-active="pericias"] .sh-showcase,
.sp-sheet-root[data-sp-sheet-active="pericias"] .sh-right-pericias-col {
  display: flex !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  margin-bottom: 0 !important;
  overflow-y: auto !important;
}

.sh-pericias-grid-3 {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px 12px !important;
  align-content: start;
}

.sp-sheet-root[data-sp-sheet-active="powers"] .sh-workspace-main > .nioh-shell {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  margin-top: 0 !important;
}

.sh-powers-2col-stage {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.sh-powers-cols-wrap {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;
}

.sh-powers-cols-wrap .sh-powers-nioh-cols {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

body.mobile-landscape-pc .sh-workspace-grid {
  grid-template-columns: 146px minmax(0, 1fr);
  gap: 6px;
  height: calc(var(--mobile-real-vh, 100dvh) - 116px);
  min-height: 300px;
  max-width: 100%;
  margin: 0 auto;
}

body.mobile-landscape-pc .sh-left-nav-rail {
  justify-content: center;
  gap: 5px;
  min-width: 0;
}

body.mobile-landscape-pc .sh-left-nav-rail .sh-top-hero-switch-btn {
  min-height: 42px;
  padding: 5px 7px !important;
}

body.mobile-landscape-pc .sp-sheet-root .sh-top-hero-bar {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 4px !important;
  margin-bottom: 4px !important;
}

body.mobile-landscape-pc .sp-sheet-root .sh-top-hero-bar .sh-top-hero-switch-btn {
  min-height: 36px !important;
  padding: 3px 6px !important;
}

/* Cards Flutuantes no Topo do Avatar (PE Livre/PE Total à esquerda, RF/RM à direita — PC e Smartphone) */
.sh-stage-float-left,
.sh-stage-float-right {
  position: absolute;
  top: 4px;
  z-index: 9;
  pointer-events: auto;
}

.sh-stage-float-left {
  left: clamp(96px, 20%, 184px);
}

.sh-stage-float-right {
  right: clamp(96px, 20%, 184px);
}

.sh-stage-float-left .sh-rf-rm-row,
.sh-stage-float-left .sh-pe-highlight-row,
.sh-stage-float-right .sh-rf-rm-row,
.sh-stage-float-right .sh-pe-highlight-row {
  display: flex;
  align-items: stretch;
  gap: 6px;
  margin: 0 !important;
}

.sh-stage-float-left .sh-rf-rm-card,
.sh-stage-float-left .sh-pe-highlight-card,
.sh-stage-float-right .sh-rf-rm-card,
.sh-stage-float-right .sh-pe-highlight-card {
  min-width: 62px;
  padding: 5px 10px !important;
  gap: 2px !important;
  border-radius: 7px !important;
  background: rgba(14, 12, 16, 0.9) !important;
  backdrop-filter: blur(5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(255, 240, 200, 0.08);
}

.sh-stage-float-left .sh-rf-rm-lbl,
.sh-stage-float-left .sh-pe-hl-lbl,
.sh-stage-float-right .sh-rf-rm-lbl,
.sh-stage-float-right .sh-pe-hl-lbl {
  font-size: 11px !important;
  letter-spacing: 0.05em !important;
  line-height: 1.15 !important;
  white-space: nowrap;
}

.sh-stage-float-left .sh-rf-rm-val,
.sh-stage-float-left .sh-pe-hl-val,
.sh-stage-float-right .sh-rf-rm-val,
.sh-stage-float-right .sh-pe-hl-val {
  font-size: 18px !important;
  line-height: 1.15 !important;
  white-space: nowrap;
}

.sh-stage-float-left .sh-pe-hl-val small,
.sh-stage-float-right .sh-pe-hl-val small {
  font-size: 12px;
  opacity: 0.76;
  font-weight: 500;
}

body.mobile-landscape-pc .sh-stage-float-left {
  top: 2px;
  left: clamp(82px, 23%, 126px);
}

body.mobile-landscape-pc .sh-stage-float-right {
  top: 2px;
  right: clamp(82px, 23%, 126px);
}

body.mobile-landscape-pc .sh-stage-float-left .sh-rf-rm-row,
body.mobile-landscape-pc .sh-stage-float-left .sh-pe-highlight-row,
body.mobile-landscape-pc .sh-stage-float-right .sh-rf-rm-row,
body.mobile-landscape-pc .sh-stage-float-right .sh-pe-highlight-row {
  gap: 4px;
}

body.mobile-landscape-pc .sh-stage-float-left .sh-rf-rm-card,
body.mobile-landscape-pc .sh-stage-float-left .sh-pe-highlight-card,
body.mobile-landscape-pc .sh-stage-float-right .sh-rf-rm-card,
body.mobile-landscape-pc .sh-stage-float-right .sh-pe-highlight-card {
  min-width: 50px;
  padding: 4px 8px !important;
  border-radius: 6px !important;
}

body.mobile-landscape-pc .sh-stage-float-left .sh-rf-rm-lbl,
body.mobile-landscape-pc .sh-stage-float-left .sh-pe-hl-lbl,
body.mobile-landscape-pc .sh-stage-float-right .sh-rf-rm-lbl,
body.mobile-landscape-pc .sh-stage-float-right .sh-pe-hl-lbl {
  font-size: 9.5px !important;
}

body.mobile-landscape-pc .sh-stage-float-left .sh-rf-rm-val,
body.mobile-landscape-pc .sh-stage-float-left .sh-pe-hl-val,
body.mobile-landscape-pc .sh-stage-float-right .sh-rf-rm-val,
body.mobile-landscape-pc .sh-stage-float-right .sh-pe-hl-val {
  font-size: 15px !important;
}

body.mobile-landscape-pc .sh-stage-float-left .sh-pe-hl-val small,
body.mobile-landscape-pc .sh-stage-float-right .sh-pe-hl-val small {
  font-size: 10.5px;
}

/* PE Livre / PE Total ao lado do Nível (painel esquerdo) & RF / RM acima de Combatividade (painel direito) */
.sh-level-pe-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
}

.sh-pe-inline-row {
  display: inline-flex !important;
  align-items: stretch !important;
  gap: 5px !important;
  margin-left: auto !important;
}

.sh-pe-inline-row .sh-pe-highlight-card {
  min-width: 0 !important;
  padding: 3px 7px !important;
  border-radius: 6px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

.sh-pe-inline-row .sh-pe-hl-lbl {
  font-size: 9px !important;
  line-height: 1.05 !important;
  white-space: nowrap;
}

.sh-pe-inline-row .sh-pe-hl-val {
  font-size: 13.5px !important;
  line-height: 1.1 !important;
  white-space: nowrap;
}

.sh-pe-inline-row .sh-pe-hl-val small {
  font-size: 10px !important;
  opacity: 0.78;
}

.sh-rf-rm-panel-row {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 6px !important;
  margin-bottom: 6px !important;
}

.sh-rf-rm-panel-row .sh-rf-rm-card {
  min-width: 0 !important;
  padding: 5px 8px !important;
  border-radius: 7px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

.sh-rf-rm-panel-row .sh-rf-rm-lbl {
  font-size: 10px !important;
  line-height: 1.1 !important;
}

.sh-rf-rm-panel-row .sh-rf-rm-val {
  font-size: 16px !important;
  line-height: 1.15 !important;
}

body.mobile-landscape-pc .sh-pe-inline-row {
  gap: 4px !important;
}

body.mobile-landscape-pc .sh-pe-inline-row .sh-pe-highlight-card {
  padding: 2px 5px !important;
}

body.mobile-landscape-pc .sh-pe-inline-row .sh-pe-hl-lbl {
  font-size: 8px !important;
}

body.mobile-landscape-pc .sh-pe-inline-row .sh-pe-hl-val {
  font-size: 11.5px !important;
}

body.mobile-landscape-pc .sh-rf-rm-panel-row {
  gap: 4px !important;
  margin-bottom: 4px !important;
}

body.mobile-landscape-pc .sh-rf-rm-panel-row .sh-rf-rm-card {
  padding: 3px 6px !important;
}

body.mobile-landscape-pc .sh-rf-rm-panel-row .sh-rf-rm-lbl {
  font-size: 9px !important;
}

body.mobile-landscape-pc .sh-rf-rm-panel-row .sh-rf-rm-val {
  font-size: 13.5px !important;
}

body.mobile-landscape-pc .sp-sheet-root[data-sp-sheet-active="equip"] .sh-showcase {
  grid-template-columns: minmax(0, 0.74fr) minmax(0, 1.52fr) minmax(0, 0.74fr) !important;
  gap: 6px !important;
  padding: 6px !important;
}

body.mobile-landscape-pc .sp-sheet-root[data-sp-sheet-active="equip"] .sh-equip-attrs-col,
body.mobile-landscape-pc .sp-sheet-root[data-sp-sheet-active="equip"] .sh-equip-combat-col {
  padding: 6px 7px 8px !important;
}

body.mobile-landscape-pc .sp-sheet-root[data-sp-sheet-active="equip"] .sh-hero-name {
  font-size: 13.5px !important;
  line-height: 1.1 !important;
}

body.mobile-landscape-pc .sp-sheet-root[data-sp-sheet-active="equip"] .sh-hero-sub,
body.mobile-landscape-pc .sp-sheet-root[data-sp-sheet-active="equip"] .sh-lv-row,
body.mobile-landscape-pc .sp-sheet-root[data-sp-sheet-active="equip"] .sh-pe-meta {
  font-size: 10px !important;
  margin: 1px 0 !important;
}

body.mobile-landscape-pc .sp-sheet-root[data-sp-sheet-active="equip"] .sh-divider {
  margin: 4px 0 !important;
}

body.mobile-landscape-pc .sp-sheet-root[data-sp-sheet-active="equip"] .sh-sec-label {
  font-size: 9.5px !important;
  margin: 4px 0 2px !important;
  padding-bottom: 1px !important;
}

body.mobile-landscape-pc .sp-sheet-root[data-sp-sheet-active="equip"] .sh-sbar-list {
  gap: 2px !important;
}

body.mobile-landscape-pc .sp-sheet-root[data-sp-sheet-active="equip"] .sh-sbar-row {
  gap: 5px !important;
  padding: 1px 3px !important;
}

body.mobile-landscape-pc .sp-sheet-root[data-sp-sheet-active="equip"] .sh-sbar-ico {
  width: 17px !important;
  height: 17px !important;
  font-size: 11px !important;
}

body.mobile-landscape-pc .sp-sheet-root[data-sp-sheet-active="equip"] .sh-sbar-main {
  gap: 2px !important;
}

body.mobile-landscape-pc .sp-sheet-root[data-sp-sheet-active="equip"] .sh-sbar-val {
  font-size: 12.5px !important;
  line-height: 1.1 !important;
}

body.mobile-landscape-pc .sp-sheet-root[data-sp-sheet-active="equip"] .sh-sbar-lbl {
  font-size: 10px !important;
  line-height: 1.1 !important;
}

body.mobile-landscape-pc .sp-sheet-root[data-sp-sheet-active="equip"] .sh-sbar-track {
  height: 3px !important;
}

body.mobile-landscape-pc .sp-sheet-root[data-sp-sheet-active="equip"] .sh-left-foot {
  margin-top: 4px !important;
  padding-top: 4px !important;
}

body.mobile-landscape-pc .sp-sheet-root[data-sp-sheet-active="equip"] .sh-res-pills {
  gap: 3px !important;
  margin-top: 3px !important;
}

body.mobile-landscape-pc .sp-sheet-root[data-sp-sheet-active="equip"] .sh-res-chip {
  font-size: 9.5px !important;
  padding: 1px 4px !important;
}

body.mobile-landscape-pc .sp-sheet-root[data-sp-sheet-active="equip"] .sh-center-stage {
  padding: 6px 4px 10px !important;
}

body.mobile-landscape-pc .sp-sheet-root[data-sp-sheet-active="equip"] .sh-hero-figure {
  height: 100% !important;
  transform: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body.mobile-landscape-pc .sp-sheet-root[data-sp-sheet-active="equip"] .sh-arcane-ring {
  width: min(64%, 260px) !important;
  height: min(68%, 260px) !important;
}

body.mobile-landscape-pc .sp-sheet-root[data-sp-sheet-active="equip"] .sh-hero-figure-img {
  height: 82% !important;
  max-height: 84% !important;
  max-width: 72% !important;
  width: auto !important;
  object-fit: contain !important;
}

body.mobile-landscape-pc .sp-sheet-root[data-sp-sheet-active="equip"] .sh-ring-slots-layer {
  top: 47% !important;
  width: min(98%, 450px) !important;
  height: calc(100% - 34px) !important;
  max-height: 410px !important;
}

body.mobile-landscape-pc .sh-ring-slot {
  gap: 2px !important;
}

body.mobile-landscape-pc .sh-ring-medallion,
body.mobile-landscape-pc .sp-sheet-root[data-sp-sheet-active="equip"] .sh-ring-medallion {
  width: clamp(40px, calc((var(--mobile-real-vh, 100dvh) - 255px) / 5), 58px) !important;
  height: clamp(40px, calc((var(--mobile-real-vh, 100dvh) - 255px) / 5), 58px) !important;
  padding: 0 !important;
}

body.mobile-landscape-pc .sh-ring-medallion img,
body.mobile-landscape-pc .sp-sheet-root[data-sp-sheet-active="equip"] .sh-ring-medallion img,
body.mobile-landscape-pc .sh-ring-medallion .custom-ui-icon.cui-slot,
body.mobile-landscape-pc .sp-sheet-root[data-sp-sheet-active="equip"] .sh-ring-medallion .custom-ui-icon.cui-slot {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

body.mobile-landscape-pc .sh-ring-slot .sh-ring-slot-tag,
body.mobile-landscape-pc .sh-ring-slot .sh-ring-lbl {
  font-size: 9.5px !important;
  line-height: 1.08 !important;
  padding: 0 3px !important;
  margin-top: 1px !important;
  display: block !important;
}

/* Telas Principais no PC: encaixam na altura única da tela sem rolagem externa */
@media (min-width: 1025px) {
  .main-container:not(.landing-mode) > .grid-worldmap {
    height: calc(100dvh - 185px);
    min-height: 440px;
    margin-bottom: 0 !important;
    overflow: hidden;
    align-items: stretch;
  }
  .main-container:not(.landing-mode) > .grid-worldmap > .worldmap-viewport {
    height: 100%;
    min-height: 0;
  }
  .main-container:not(.landing-mode) > .grid-worldmap > div:last-child {
    height: 100%;
    min-height: 0;
    overflow-y: auto;
  }
  .main-container:not(.landing-mode) > .nioh-shell {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - 88px);
    min-height: 440px;
    overflow: hidden;
  }
  .main-container:not(.landing-mode) > .nioh-shell .nioh-main-grid {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }
  .main-container:not(.landing-mode) > .nioh-shell .nioh-constellation-stage,
  .main-container:not(.landing-mode) > .nioh-shell .nioh-inspector {
    height: 100%;
    min-height: 0;
    overflow-y: auto;
  }
  .main-container:not(.landing-mode) .forja-studio {
    height: calc(100dvh - 160px);
    min-height: 380px;
    overflow: hidden;
  }
  .main-container:not(.landing-mode) .forja-studio .forja-grid-col,
  .main-container:not(.landing-mode) .forja-studio .forja-detail-col,
  .main-container:not(.landing-mode) .forja-studio .forja-info-col,
  .main-container:not(.landing-mode) .forja-studio .merc-detail-col {
    height: 100%;
    max-height: 100%;
    overflow-y: auto;
  }
}

body.mobile-landscape-pc .sp-screen-tabs {
  gap: 6px;
  padding: 4px 6px;
  margin-bottom: 8px;
}

body.mobile-landscape-pc .sp-screen-tab {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 12.5px;
}

/* Mapa do Mundo no Smartphone: trava na altura da tela com rolagem interna no painel lateral */
body.mobile-landscape-pc .grid-worldmap {
  height: calc(var(--mobile-real-vh, 100dvh) - 66px) !important;
  min-height: 280px !important;
  margin-bottom: 0 !important;
  overflow: hidden !important;
  align-items: stretch !important;
}

body.mobile-landscape-pc .grid-worldmap > .worldmap-viewport {
  height: 100% !important;
  min-height: 0 !important;
}

body.mobile-landscape-pc .grid-worldmap > div:last-child {
  height: 100% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;
}

/* Árvores, Missões, Bestiário & Glossário (.nioh-shell) travados na altura útil sem scroll da página */
body.mobile-landscape-pc .main-container > .nioh-shell {
  display: flex !important;
  flex-direction: column !important;
  height: calc(var(--mobile-real-vh, 100dvh) - 66px) !important;
  min-height: 280px !important;
  overflow: hidden !important;
}

body.mobile-landscape-pc .nioh-shell .nioh-main-grid {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr) !important;
  overflow: hidden !important;
}

body.mobile-landscape-pc .nioh-shell .nioh-constellation-stage,
body.mobile-landscape-pc .nioh-shell .nioh-inspector {
  height: 100% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

/* Mercador, Forja & Alquimia (.forja-studio): encaixa 100% na tela útil */
body.mobile-landscape-pc .forja-studio {
  height: calc(var(--mobile-real-vh, 100dvh) - 122px) !important;
  min-height: 240px !important;
  overflow: hidden !important;
  align-items: stretch !important;
}

body.mobile-landscape-pc .forja-studio .forja-grid-col,
body.mobile-landscape-pc .forja-studio .forja-detail-col,
body.mobile-landscape-pc .forja-studio .forja-info-col,
body.mobile-landscape-pc .forja-studio .merc-detail-col {
  height: 100% !important;
  max-height: 100% !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

/* Forja -> Encantar Item no Smartphone: 2 colunas (Avatar + Slots Maiores à esquerda, Lista de Encantamentos à direita) */
body.mobile-landscape-pc .forja-enchant-showcase {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr) !important;
  gap: 10px !important;
  padding: 8px 10px !important;
  height: calc(var(--mobile-real-vh, 100dvh) - 122px) !important;
  min-height: 300px !important;
  max-height: calc(var(--mobile-real-vh, 100dvh) - 122px) !important;
  overflow: hidden !important;
  align-items: stretch !important;
}

body.mobile-landscape-pc .forja-enchant-showcase .sh-center-stage {
  height: 100% !important;
  min-height: 0 !important;
  padding: 8px 6px 10px !important;
  overflow: visible !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body.mobile-landscape-pc .forja-enchant-showcase .sh-arcane-ring {
  width: min(64%, 260px) !important;
  height: min(68%, 260px) !important;
}

body.mobile-landscape-pc .forja-enchant-showcase .sh-hero-figure {
  height: 100% !important;
  transform: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body.mobile-landscape-pc .forja-enchant-showcase .sh-hero-figure-img {
  height: 82% !important;
  max-height: 84% !important;
  max-width: 72% !important;
  width: auto !important;
  object-fit: contain !important;
}

body.mobile-landscape-pc .forja-enchant-showcase .sh-ring-slots-layer {
  top: 47% !important;
  width: min(98%, 450px) !important;
  height: calc(100% - 34px) !important;
  max-height: 410px !important;
  min-height: 240px !important;
}

body.mobile-landscape-pc .forja-enchant-showcase .sh-ring-medallion {
  width: clamp(40px, calc((var(--mobile-real-vh, 100dvh) - 255px) / 5), 58px) !important;
  height: clamp(40px, calc((var(--mobile-real-vh, 100dvh) - 255px) / 5), 58px) !important;
  padding: 0 !important;
}

body.mobile-landscape-pc .forja-enchant-showcase .sh-ring-medallion img,
body.mobile-landscape-pc .forja-enchant-showcase .sh-ring-medallion .custom-ui-icon.cui-slot {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

body.mobile-landscape-pc .forja-enchant-showcase .sh-ring-slot-tag {
  font-size: 9.5px !important;
  line-height: 1.05 !important;
  padding: 0 4px !important;
  margin-top: 1px !important;
}

body.mobile-landscape-pc .forja-enchant-sidebar {
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  padding: 10px 10px 8px !important;
  overflow: hidden !important;
}

body.mobile-landscape-pc .forja-enchant-sidebar .forja-enchant-list {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  gap: 8px !important;
  margin-top: 6px !important;
}

body.mobile-landscape-pc .forja-enchant-sidebar .forja-enchant-item {
  padding: 9px 10px !important;
  gap: 6px !important;
}

/* Botão Flutuante "Topo" no Smartphone (aparece apenas se alguma tela rolar) */
.sp-scroll-top-fab {
  display: none;
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 980;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(235, 212, 158, 0.65);
  background: linear-gradient(180deg, rgba(44, 34, 20, 0.94), rgba(16, 12, 10, 0.96));
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.06em;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.78);
  cursor: pointer;
}

.cr-step-tip {
  margin-top: 4px;
  font-size: calc(12.5px * var(--font-scale));
  color: #cbb890;
  opacity: 0.92;
}

.cr-step-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.cr-gear-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cr-gear-slot-ico {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  background: rgba(20, 16, 24, 0.9);
  border: 1px solid rgba(203, 184, 144, 0.32);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cr-gear-row-txt {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cr-gear-row-txt small {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #b7a27a;
  line-height: 1.1;
}

.cr-gear-row-txt span {
  font-size: calc(13px * var(--font-scale));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cr-equip-icon-frame {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 7px;
  border: 1.5px solid rgba(203, 184, 144, 0.45);
  background: rgba(12, 10, 15, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.cr-equip-icon-frame .cr-equip-tile-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: none !important;
}

.cr-equip-slot-badge {
  position: absolute;
  bottom: 1px;
  right: 2px;
  padding: 0 3px;
  border-radius: 3px;
  background: rgba(8, 7, 10, 0.88);
  border: 1px solid rgba(203, 184, 144, 0.35);
  color: #f4e3b8;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.cr-rec-pill {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.16);
  border: 1px solid rgba(235, 212, 158, 0.55);
  color: #fde68a;
  font-size: 10.5px;
  font-weight: 600;
  vertical-align: middle;
}

.cr-loadout-slot-ico {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  background: rgba(14, 12, 16, 0.9);
  border: 1px solid rgba(203, 184, 144, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sp-scroll-top-fab.is-visible {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ============================================================================
   NOTIFICAÇÃO DE NOVA VERSÃO DISPONÍVEL (CONTROLE DE VERSÃO)
   ============================================================================ */
.avalom-update-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(5, 4, 7, 0.72);
  backdrop-filter: blur(5px);
}

.avalom-update-card {
  width: min(420px, 92vw);
  padding: 20px 22px;
  border-radius: 10px;
  border: 1.5px solid rgba(235, 212, 158, 0.78);
  background: linear-gradient(180deg, rgba(24, 19, 24, 0.98) 0%, rgba(11, 9, 13, 0.99) 100%);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.92), 0 0 28px rgba(212, 175, 55, 0.22);
  text-align: center;
}

.avalom-update-badge {
  font-family: var(--font-display);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--gold-bright);
  margin-bottom: 6px;
}

.avalom-update-card h3 {
  margin: 0 0 8px;
  color: #f6ecd4;
}

.avalom-update-card p {
  margin: 0 0 12px;
  color: var(--stone-text);
  line-height: 1.45;
}

.avalom-update-notes {
  margin-bottom: 14px;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(203, 184, 144, 0.22);
  font-size: 13px;
  color: #d6cbb3;
}

.avalom-update-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ============================================================================
   MULTIPLAYER CROSSPLAY — LOBBY, CONVITE WHATSAPP & BANNER DE TURNO EM COMBATE
   ============================================================================ */
.mp-lobby-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 8px 28px;
}

.mp-lobby-header {
  padding: 16px 20px;
}

.mp-lobby-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 860px) {
  .mp-lobby-grid {
    grid-template-columns: 1fr;
  }
}

.mp-hero-pick-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(14, 12, 16, 0.85);
  border: 1px solid rgba(203, 184, 144, 0.28);
  color: inherit;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.mp-hero-pick-card:hover {
  border-color: rgba(235, 212, 158, 0.65);
  background: rgba(28, 22, 18, 0.92);
}

.mp-hero-pick-card.is-selected {
  border-color: #22c55e;
  background: rgba(20, 44, 28, 0.55);
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.22);
}

.mp-hero-pick-img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(203, 184, 144, 0.45);
  flex-shrink: 0;
}

.mp-player-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mp-player-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 15px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(22, 18, 26, 0.94) 0%, rgba(12, 10, 15, 0.96) 100%);
  border: 1px solid rgba(203, 184, 144, 0.34);
  border-left: 3px solid rgba(203, 184, 144, 0.55);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 240, 200, 0.06);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.mp-player-row:hover:not(.is-empty) {
  transform: translateY(-1px);
  border-color: rgba(235, 212, 158, 0.62);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 240, 200, 0.12);
}

.mp-player-row.is-me {
  border-color: rgba(96, 165, 250, 0.55);
  border-left-color: #60a5fa;
  background: linear-gradient(135deg, rgba(20, 30, 52, 0.88) 0%, rgba(12, 15, 24, 0.95) 100%);
  box-shadow: 0 6px 20px rgba(30, 64, 175, 0.22), inset 0 1px 0 rgba(147, 197, 253, 0.12);
}

.mp-player-row.is-leader {
  border-left-color: #f59e0b;
}

.mp-player-row.is-ready-card:not(.is-me):not(.is-leader) {
  border-left-color: #22c55e;
}

.mp-player-row.is-disconnected {
  opacity: 0.72;
  border-left-color: #ef4444;
}

.mp-player-row.is-empty {
  border-style: dashed;
  border-left-style: dashed;
  border-left-width: 1px;
  border-color: rgba(203, 184, 144, 0.24);
  background: linear-gradient(135deg, rgba(12, 10, 15, 0.55) 0%, rgba(8, 7, 10, 0.42) 100%);
  box-shadow: none;
  padding: 13px 16px;
}

.mp-player-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 54px;
  height: 54px;
}

.mp-player-avatar {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
  border: 1.5px solid rgba(212, 175, 106, 0.72);
  background: radial-gradient(circle at 50% 35%, rgba(44, 34, 24, 0.9), #0b090d);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.65);
  display: block;
}

.mp-player-row.is-me .mp-player-avatar {
  border-color: rgba(96, 165, 250, 0.85);
}

.mp-player-row.is-leader .mp-player-avatar {
  border-color: #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
}

.mp-player-online-dot {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #100d14;
}

.mp-player-online-dot.is-online {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
}

.mp-player-online-dot.is-offline {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.7);
}

.mp-player-crown-badge {
  position: absolute;
  top: -8px;
  left: -7px;
  font-size: 14px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.9));
}

.mp-player-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mp-player-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.mp-player-name {
  font-family: var(--font-display);
  font-size: 15.5px;
  color: #f6dfa4;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 190px;
}

.mp-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.mp-pill-me {
  background: rgba(59, 130, 246, 0.22);
  border-color: rgba(96, 165, 250, 0.6);
  color: #bfdbfe;
}

.mp-pill-leader {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(251, 191, 36, 0.65);
  color: #fde68a;
}

.mp-pill-lvl {
  background: rgba(212, 175, 106, 0.14);
  border-color: rgba(212, 175, 106, 0.42);
  color: #f2e8cf;
}

.mp-player-sub {
  font-size: 12.5px;
  color: #bfb39c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-player-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.mp-pos-badge,
.mp-vit-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(8, 7, 11, 0.72);
  border: 1px solid rgba(203, 184, 144, 0.28);
  color: #f3e6cc;
}

.mp-pos-badge.is-pos-vanguarda {
  border-color: rgba(248, 113, 113, 0.5);
  color: #fecaca;
}

.mp-pos-badge.is-pos-aberta {
  border-color: rgba(251, 191, 36, 0.5);
  color: #fde68a;
}

.mp-pos-badge.is-pos-defensivo {
  border-color: rgba(96, 165, 250, 0.5);
  color: #bfdbfe;
}

.mp-pos-badge.is-pos-retaguarda {
  border-color: rgba(167, 139, 250, 0.5);
  color: #ddd6fe;
}

.mp-vit-badge {
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.mp-player-status-col {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.mp-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.mp-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.mp-status-pill.is-ready {
  background: rgba(20, 83, 45, 0.52);
  border-color: rgba(34, 197, 94, 0.65);
  color: #86efac;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.18);
}

.mp-status-pill.is-waiting {
  background: rgba(120, 53, 15, 0.42);
  border-color: rgba(245, 158, 11, 0.55);
  color: #fde68a;
}

.mp-status-pill.is-offline {
  background: rgba(127, 29, 29, 0.45);
  border-color: rgba(239, 68, 68, 0.55);
  color: #fca5a5;
}

.mp-empty-emblem {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px dashed rgba(203, 184, 144, 0.3);
  background: rgba(20, 16, 22, 0.45);
  color: rgba(212, 175, 106, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.mp-empty-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mp-empty-title {
  font-family: var(--font-display);
  font-size: 13px;
  color: rgba(235, 220, 188, 0.72);
}

.mp-empty-sub {
  font-size: 12px;
  color: rgba(185, 173, 150, 0.58);
}

.mp-invite-code-box {
  display: inline-block;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(8, 7, 10, 0.85);
  border: 1px solid rgba(203, 184, 144, 0.28);
  font-size: 12px;
  color: #e2d4b5;
}

.mp-chat-box {
  height: 210px;
  overflow-y: auto;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(8, 7, 10, 0.84);
  border: 1px solid rgba(203, 184, 144, 0.24);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
}

.mp-chat-line.is-sys {
  color: #fde68a;
  font-style: italic;
}

.cv-mp-turn-banner {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 24;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(10, 12, 18, 0.9);
  border: 1.5px solid rgba(96, 165, 250, 0.65);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.82);
  pointer-events: auto;
}

.cv-mp-turn-banner.is-my-turn {
  border-color: #facc15;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.82), 0 0 18px rgba(250, 204, 21, 0.35);
}

.cv-mp-turn-badge {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #93c5fd;
  font-weight: 700;
}

.cv-mp-turn-who {
  font-size: 13px;
  color: #fde047;
}

.cv-mp-party-pills {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.cv-mp-pill {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(203, 184, 144, 0.25);
  color: #e5dcc5;
}

.cv-mp-pill.is-active {
  background: rgba(250, 204, 21, 0.22);
  border-color: #facc15;
  color: #fef08a;
  font-weight: 700;
}

.cv-ally-unit.is-mp-player.is-mp-active .cv-ally-avatar-img {
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.88)) drop-shadow(0 0 16px rgba(250, 204, 21, 0.65));
}

/* ============================================================================
   TELA MULTIPLAYER — FUNDO MAPA, BOTÕES ESTILO FICHA, CARDS VERTICAIS & SAVE PESSOAL
   ============================================================================ */
.mp-screen-backdrop {
  position: relative;
  min-height: 100dvh;
  width: 100%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  overflow-x: hidden;
}

.mp-screen-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(8, 7, 10, 0.56) 0%, rgba(5, 4, 7, 0.88) 82%),
    linear-gradient(180deg, rgba(6, 5, 8, 0.72) 0%, rgba(6, 5, 8, 0.84) 100%);
}

.mp-screen-backdrop .mp-lobby-shell {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 20px 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mp-topbar-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.mp-eyebrow {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: rgba(226, 198, 138, 0.78);
  text-transform: uppercase;
}

.mp-page-title {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.08em;
  color: var(--gold-bright);
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.92);
}

.mp-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* Botões no padrão visual da Ficha do Personagem */
.mp-sheet-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 16px;
  border-radius: 5px;
  border: 1px solid rgba(204, 174, 114, 0.48);
  background: linear-gradient(180deg, rgba(30, 24, 18, 0.92) 0%, rgba(13, 11, 12, 0.96) 100%);
  color: #e6d5b2;
  font-family: var(--font-display);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 238, 196, 0.14), 0 4px 14px rgba(0, 0, 0, 0.65);
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.mp-sheet-btn:hover:not(:disabled) {
  border-color: #f3d796;
  color: #fff3d1;
  background: linear-gradient(180deg, rgba(52, 40, 24, 0.96) 0%, rgba(22, 17, 13, 0.98) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 244, 210, 0.25), 0 0 14px rgba(212, 175, 55, 0.28);
}

.mp-sheet-btn.is-gold {
  border-color: rgba(235, 200, 118, 0.78);
  background: linear-gradient(180deg, rgba(78, 56, 22, 0.94) 0%, rgba(36, 25, 11, 0.98) 100%);
  color: #fde8b2;
}

.mp-sheet-btn.is-active {
  border-color: #22c55e;
  background: linear-gradient(180deg, rgba(22, 68, 38, 0.94) 0%, rgba(11, 34, 20, 0.98) 100%);
  color: #bbf7d0;
}

.mp-sheet-btn.is-danger {
  border-color: rgba(239, 68, 68, 0.68);
  color: #fca5a5;
}

.mp-sheet-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Destaque Permanente do Código Pessoal de Save */
.mp-account-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(44, 31, 14, 0.92) 0%, rgba(16, 12, 10, 0.95) 100%);
  border: 1.5px solid rgba(245, 202, 106, 0.78);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.78), 0 0 20px rgba(212, 175, 55, 0.16);
}

.mp-account-title {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: #fde047;
  font-weight: 700;
}

.mp-account-warn {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: #f3e5c6;
  line-height: 1.4;
}

.mp-account-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mp-code-input {
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 5px;
  background: rgba(8, 7, 10, 0.92);
  border: 1px solid rgba(212, 175, 106, 0.52);
  color: #fde68a;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Cards Verticais de Escolha de Herói (semelhante à tela de Slots / Continue) */
.mp-section-head h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.08em;
  color: var(--gold-bright);
  text-transform: uppercase;
}

.mp-hero-pillars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.mp-pillar-card {
  min-height: 295px !important;
  cursor: pointer;
}

.mp-pillar-card .slot-pillar-head {
  padding-top: 18px !important;
}

.mp-pillar-card .slot-pillar-footer {
  padding: 10px 12px 14px !important;
}

.mp-pillar-card .slot-pillar-footer .mp-sheet-btn {
  width: 100%;
}

@media (max-width: 960px) {
  .mp-hero-pillars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.mp-room-actions-card,
.mp-panel-box {
  padding: 14px 18px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(16, 14, 16, 0.92) 0%, rgba(9, 8, 11, 0.95) 100%);
  border: 1px solid rgba(204, 174, 114, 0.42);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.72);
}

.mp-room-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.mp-btn-create {
  min-width: 210px;
}

.mp-join-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 250px;
}

.mp-join-group .mp-code-input {
  flex: 1;
}

.mp-invite-detected {
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.55);
  color: #bbf7d0;
  font-size: 13.5px;
}

.mp-invite-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.mp-invite-code-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mp-room-code-pill {
  padding: 4px 12px;
  border-radius: 5px;
  background: rgba(250, 204, 21, 0.14);
  border: 1px solid rgba(250, 204, 21, 0.65);
  color: #fde047;
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.14em;
}

.mp-rules-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #e2d7be;
}

.mp-rules-list li + li {
  margin-top: 5px;
}

body.mobile-landscape-pc .mp-hero-pillars {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body.mobile-landscape-pc .mp-pillar-card {
  min-height: 220px !important;
}

body.mobile-landscape-pc .mp-screen-backdrop .mp-lobby-shell {
  padding: 10px 14px 24px !important;
  gap: 10px !important;
}

.mp-account-banner.is-collapsed {
  padding: 10px 16px;
}

.cv-mp-turn-timer {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.16);
  border: 1px solid rgba(250, 204, 21, 0.55);
  color: #fde047;
}

.cv-mp-turn-timer.is-urgent {
  background: rgba(239, 68, 68, 0.28);
  border-color: #ef4444;
  color: #fecaca;
}

/* ==================== MAGIC LINK AUTH GATE (TELA INICIAL ANTES DO PLAY) ==================== */
.landing-account-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 12px;
  border-radius: 999px;
  background: rgba(12, 10, 15, 0.84);
  border: 1px solid rgba(212, 175, 106, 0.45);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
}

.landing-account-email {
  font-size: 12px;
  color: #f2e8cf;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-gate-card {
  width: min(440px, 92vw);
  padding: 22px 24px;
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(18, 15, 22, 0.94) 0%, rgba(10, 8, 13, 0.96) 100%);
  border: 1px solid rgba(212, 175, 106, 0.5);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.82), inset 0 1px 0 rgba(255, 240, 200, 0.1);
  text-align: center;
}

.auth-gate-eyebrow {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 2px;
  color: #d4af6a;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.auth-gate-title {
  font-family: var(--font-display);
  font-size: 20px;
  color: #f6dfa4;
  margin: 0 0 10px;
}

.auth-gate-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: 8px;
  background: rgba(6, 5, 9, 0.8);
  border: 1px solid rgba(203, 184, 144, 0.22);
  margin-bottom: 14px;
}

.auth-gate-tab {
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: #b7aa91;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.auth-gate-tab.is-active {
  background: linear-gradient(180deg, rgba(212, 175, 106, 0.24), rgba(155, 114, 50, 0.18));
  border-color: rgba(212, 175, 106, 0.65);
  color: #f6dfa4;
}

.auth-gate-desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: #d7cab2;
  margin: 0 0 14px;
}

.auth-gate-error {
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(127, 29, 29, 0.45);
  border: 1px solid rgba(239, 68, 68, 0.65);
  color: #fecaca;
  font-size: 13px;
  margin-bottom: 12px;
  text-align: left;
}

.auth-gate-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.auth-gate-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
  color: #cbb890;
}

.auth-gate-field input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 7px;
  background: rgba(6, 5, 8, 0.9);
  border: 1px solid rgba(203, 184, 144, 0.35);
  color: #f7efe0;
  font-size: 14.5px;
}

.auth-gate-field input:focus {
  outline: none;
  border-color: #d4af6a;
  box-shadow: 0 0 0 2px rgba(212, 175, 106, 0.22);
}

.auth-gate-submit {
  width: 100%;
  padding: 11px 16px;
  font-size: 14.5px;
  margin-top: 2px;
}

.auth-gate-dev-box {
  margin: 12px 0;
}

.auth-gate-actions-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.auth-gate-spinner {
  font-size: 28px;
  color: #f6dfa4;
  margin: 8px 0 4px;
  animation: pulse 1.2s ease-in-out infinite;
}
