/*
 * VELMOOR — interface V2
 * Camada de apresentação carregada depois dos estilos legados.
 * Mantém a marcação e o comportamento existentes, mas unifica menu, combate,
 * narrativa, gestão e exploração em um sistema visual responsivo.
 */

:root {
  color-scheme: dark;
  --bg: #050609;
  --panel: rgba(9, 12, 17, .92);
  --line: rgba(219, 194, 137, .2);
  --text: #f4efe5;
  --muted: #a9b0b1;
  --blue: #68b8d8;
  --red: #b94843;
  --gold: #d9b970;
  --green: #75bd91;
  --purple: #a773c8;
  --display: 'Cinzel', Georgia, serif;
  --body: 'Inter', system-ui, sans-serif;

  --v2-ink: #050609;
  --v2-ink-soft: #090c11;
  --v2-surface: rgba(11, 15, 21, .9);
  --v2-surface-strong: rgba(7, 10, 15, .97);
  --v2-surface-raised: rgba(20, 26, 34, .94);
  --v2-line: rgba(222, 199, 147, .24);
  --v2-line-strong: rgba(225, 193, 121, .58);
  --v2-gold: #ddb96d;
  --v2-gold-bright: #f0d490;
  --v2-copper: #a76e42;
  --v2-ivory: #f3eddf;
  --v2-muted: #a8b0b2;
  --v2-danger: #d15a52;
  --v2-focus: #f6d98e;
  --v2-radius: 3px;
  --v2-shadow-sm: 0 8px 24px rgba(0, 0, 0, .32);
  --v2-shadow: 0 22px 70px rgba(0, 0, 0, .58);
  --v2-shadow-deep: 0 35px 110px rgba(0, 0, 0, .76);
  --v2-glow: 0 0 30px rgba(221, 185, 109, .12);
  --v2-safe-x: clamp(12px, 1.5vw, 24px);
  --v2-safe-y: clamp(10px, 1.5vh, 18px);

  /* Sobrescreva por andar no elemento .dungeon-viewport, se necessário. */
  --wall-texture: url('assets/dungeon/floor1/wall.png');
  --floor-texture: url('assets/dungeon/floor1/floor.png');
  --ceiling-texture: url('assets/dungeon/floor1/ceiling.png');
}

* {
  scrollbar-color: rgba(221, 185, 109, .55) rgba(255, 255, 255, .04);
  scrollbar-width: thin;
}

*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-track { background: rgba(255, 255, 255, .035); }
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(221, 185, 109, .72), rgba(126, 92, 47, .72));
  border: 2px solid #090c11;
}

::selection { color: #090b0e; background: var(--v2-gold-bright); }

html,
body,
#app {
  min-width: 320px;
  background:
    radial-gradient(circle at 50% -10%, rgba(79, 104, 120, .14), transparent 38%),
    var(--v2-ink);
}

body {
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

button,
[role='button'],
.card,
.hero-card,
.party-member,
.archive-card:not(.locked),
.item-card:not(.locked),
.deck-chip {
  -webkit-tap-highlight-color: transparent;
}

button {
  min-height: 42px;
  border-radius: 2px;
  transition: color .18s ease, border-color .18s ease, background-color .18s ease,
    box-shadow .18s ease, transform .18s ease, filter .18s ease;
}

button:focus-visible,
[tabindex]:focus-visible,
.card:focus-visible,
.hero-card:focus-visible,
.party-member:focus-visible,
.archive-card:focus-visible,
.item-card:focus-visible,
.deck-chip:focus-visible {
  outline: 2px solid var(--v2-focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(246, 217, 142, .13);
}

button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { cursor: not-allowed; }

.glass {
  background:
    linear-gradient(145deg, rgba(22, 28, 36, .91), rgba(6, 9, 13, .95)),
    radial-gradient(circle at 15% 0, rgba(221, 185, 109, .055), transparent 45%);
  border-color: var(--v2-line);
  box-shadow: var(--v2-shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .035);
  backdrop-filter: blur(18px) saturate(1.12);
}

.glass::selection { background: var(--v2-gold); }

.eyebrow {
  color: var(--v2-gold);
  font-size: 10px;
  letter-spacing: .24em;
}

.primary-btn,
.ghost-btn,
.tool-btn,
.end-turn,
.event-options button,
.build-actions button,
.leave-shop,
.drpg-shop-grid button {
  border-color: rgba(221, 185, 109, .34);
  background-image:
    url('assets/ui/button-corners.svg'),
    linear-gradient(145deg, rgba(31, 36, 43, .96), rgba(8, 11, 16, .98));
  background-size: 100% 100%;
  box-shadow: inset 0 0 25px rgba(221, 185, 109, .035), 0 10px 25px rgba(0, 0, 0, .24);
}

.primary-btn {
  color: #11100d;
  border-color: #e1bd70;
  background-image:
    url('assets/ui/button-corners.svg'),
    linear-gradient(135deg, #efd18b, #b78543 62%, #7b552c);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 12px 34px rgba(185, 132, 62, .25);
}

.primary-btn:hover:not(:disabled) {
  filter: brightness(1.09) saturate(1.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 15px 42px rgba(220, 170, 83, .32);
}

.ghost-btn:hover:not(:disabled),
.tool-btn:hover:not(:disabled),
.end-turn:hover:not(:disabled),
.event-options button:hover:not(:disabled),
.build-actions button:hover:not(:disabled),
.leave-shop:hover:not(:disabled),
.drpg-shop-grid button:hover:not(:disabled) {
  color: var(--v2-gold-bright);
  border-color: var(--v2-line-strong);
  background-image:
    url('assets/ui/button-corners.svg'),
    linear-gradient(145deg, rgba(83, 59, 31, .9), rgba(14, 16, 20, .98));
  box-shadow: 0 0 25px rgba(221, 185, 109, .13), inset 0 0 24px rgba(221, 185, 109, .05);
}

/* -------------------------------------------------------------------------- */
/* Menu principal                                                              */
/* -------------------------------------------------------------------------- */

.menu-screen {
  isolation: isolate;
  background-position: 61% 43%;
  background-color: #05070a;
}

.menu-screen::before {
  z-index: 3;
  inset: 16px;
  opacity: .85;
  border-color: rgba(225, 193, 121, .22);
  background:
    url('assets/ui/panel-rune.svg') right 5vw center / min(31vw, 420px) no-repeat,
    linear-gradient(90deg, rgba(221, 185, 109, .16), transparent 18%) top left / 37% 1px no-repeat,
    linear-gradient(270deg, rgba(221, 185, 109, .13), transparent 18%) bottom right / 37% 1px no-repeat;
  box-shadow: inset 0 0 75px rgba(0, 0, 0, .25);
}

.menu-screen::after {
  content: '';
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(3, 5, 8, .98) 0, rgba(3, 5, 8, .92) 31%, rgba(4, 6, 9, .48) 56%, transparent 76%),
    linear-gradient(0deg, rgba(3, 4, 7, .98), transparent 42%),
    radial-gradient(circle at 72% 35%, rgba(116, 169, 182, .12), transparent 25%);
}

.menu-shade {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(2, 4, 7, .86), rgba(2, 4, 7, .22) 66%, rgba(2, 4, 7, .05)),
    linear-gradient(180deg, rgba(2, 4, 7, .18), transparent 65%, rgba(2, 4, 7, .98));
}

.menu-content {
  z-index: 5;
  left: clamp(34px, 6.2vw, 96px);
  top: 50%;
  width: min(610px, 48vw);
  max-height: calc(100dvh - 50px);
  padding: clamp(24px, 4vh, 40px) clamp(24px, 3.4vw, 48px);
  transform: translateY(-50%);
  border: 1px solid rgba(221, 185, 109, .16);
  border-left-color: rgba(221, 185, 109, .62);
  background:
    linear-gradient(90deg, rgba(6, 9, 14, .92), rgba(6, 9, 14, .58) 78%, transparent),
    radial-gradient(circle at 15% 0, rgba(102, 142, 158, .08), transparent 46%);
  box-shadow: -28px 0 85px rgba(0, 0, 0, .27), inset 0 0 45px rgba(221, 185, 109, .025);
  overflow: auto;
}

.menu-content::before,
.menu-content::after {
  content: '';
  position: absolute;
  left: 12px;
  width: 38px;
  height: 38px;
  pointer-events: none;
}

.menu-content::before {
  top: 12px;
  border-top: 1px solid var(--v2-gold);
  border-left: 1px solid var(--v2-gold);
}

.menu-content::after {
  bottom: 12px;
  border-bottom: 1px solid var(--v2-gold);
  border-left: 1px solid var(--v2-gold);
}

.sigil {
  width: 54px;
  height: 54px;
  margin: 0 0 clamp(15px, 2.6vh, 26px) 4px;
  color: var(--v2-gold-bright);
  border-color: rgba(221, 185, 109, .68);
  background: radial-gradient(circle, rgba(221, 185, 109, .12), rgba(4, 7, 11, .6));
  box-shadow: 0 0 35px rgba(221, 185, 109, .16), inset 0 0 15px rgba(221, 185, 109, .08);
}

.menu-content .eyebrow { margin: 0 0 10px; }

.menu-content h1 {
  font-size: clamp(64px, 7.3vw, 112px);
  line-height: .83;
  letter-spacing: .065em;
  color: #f4eee2;
  text-shadow: 0 4px 35px #000, 0 0 50px rgba(180, 216, 222, .1);
}

.subtitle {
  margin: 16px 0 clamp(19px, 3vh, 30px);
  color: #d0d2ce;
  font-size: clamp(11px, 1.05vw, 14px);
  letter-spacing: .38em;
}

.menu-content blockquote {
  margin: 0 0 clamp(20px, 3.4vh, 34px);
  padding: 7px 0 7px 18px;
  color: #c2c5c2;
  border-left-color: rgba(221, 185, 109, .75);
  font-size: clamp(14px, 1.3vw, 17px);
  line-height: 1.45;
}

.menu-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-width: 560px;
}

.menu-actions button {
  min-height: 45px;
  padding: 11px 16px;
  text-align: left;
  font-size: 9px;
  line-height: 1.25;
  letter-spacing: .12em;
}

.menu-actions .primary-btn {
  grid-column: 1 / -1;
  min-height: 54px;
  padding-inline: 21px;
  font-size: 11px;
}

.menu-actions button::after {
  content: '›';
  position: absolute;
  right: 15px;
  top: 50%;
  color: currentColor;
  font: 18px/1 var(--display);
  opacity: .55;
  transform: translateY(-52%);
}

.menu-actions .primary-btn::after { content: '↘'; }
.menu-actions button span { display: none; }

.menu-note {
  margin: 15px 0 0;
  color: #858f92;
  font-size: 8px;
  letter-spacing: .15em;
}

.menu-party {
  z-index: 2;
  right: -2vw;
  bottom: -5%;
  width: 61%;
  height: 96%;
  justify-content: flex-end;
  padding-right: 2vw;
  filter: drop-shadow(0 28px 50px rgba(0, 0, 0, .88));
}

.menu-party::before {
  content: '';
  position: absolute;
  right: 2%;
  bottom: 3%;
  width: 76%;
  height: 25%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(2, 3, 5, .92), transparent 70%);
  filter: blur(12px);
}

.menu-party img {
  height: 75%;
  max-width: 39%;
  margin: 0 -7%;
  opacity: .54;
  object-fit: contain;
  object-position: center bottom;
  filter: saturate(.72) brightness(.72);
}

.menu-party .lead {
  z-index: 2;
  height: 96%;
  opacity: 1;
  filter: saturate(.9) brightness(.93) drop-shadow(0 0 24px rgba(123, 172, 184, .14));
}

/* -------------------------------------------------------------------------- */
/* Seleção de expedição                                                        */
/* -------------------------------------------------------------------------- */

.select-screen {
  padding: clamp(24px, 4vh, 44px) clamp(24px, 5vw, 72px) 24px;
  overflow: auto;
  background:
    radial-gradient(circle at 50% 4%, rgba(85, 116, 136, .27), transparent 35%),
    linear-gradient(180deg, #0d131b, #06080c 60%, #040609);
}

.select-screen::before {
  content: '';
  position: fixed;
  inset: 16px;
  pointer-events: none;
  border: 1px solid rgba(221, 185, 109, .18);
  background: url('assets/ui/panel-rune.svg') center / min(34vw, 440px) no-repeat;
  opacity: .13;
}

.select-header { position: relative; z-index: 1; }
.select-header .eyebrow { margin: 0 0 8px; }

.select-header h2 {
  color: var(--v2-ivory);
  font-size: clamp(30px, 3.5vw, 50px);
  letter-spacing: .075em;
  text-shadow: 0 8px 30px #000;
}

.select-header > p:last-child {
  margin: 8px 0 0;
  color: #aeb5b5;
  font-size: 12px;
}

.roster {
  position: relative;
  z-index: 1;
  width: min(1210px, 100%);
  height: clamp(390px, 60vh, 520px);
  margin: clamp(20px, 3vh, 30px) auto 0;
  gap: clamp(12px, 1.5vw, 22px);
}

.hero-card {
  min-width: 0;
  border-color: rgba(219, 194, 137, .2);
  background:
    radial-gradient(circle at 50% 28%, rgba(82, 123, 145, .18), transparent 45%),
    linear-gradient(155deg, #151c25, #070a0f 76%);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .03);
}

.hero-card::before {
  content: '';
  position: absolute;
  z-index: 2;
  inset: 8px;
  pointer-events: none;
  border: 1px solid rgba(221, 185, 109, .12);
}

.hero-card::after {
  z-index: 4;
  background:
    linear-gradient(90deg, var(--v2-gold), transparent 22%) top left / 36% 1px no-repeat,
    linear-gradient(180deg, var(--v2-gold), transparent 35%) top left / 1px 40% no-repeat,
    linear-gradient(270deg, var(--v2-gold), transparent 22%) bottom right / 36% 1px no-repeat,
    linear-gradient(0deg, var(--v2-gold), transparent 35%) bottom right / 1px 40% no-repeat;
  opacity: 0;
  transition: opacity .22s ease;
}

.hero-card:hover,
.hero-card.selected {
  transform: translateY(-7px);
  border-color: rgba(231, 199, 127, .66);
  box-shadow: 0 27px 70px rgba(0, 0, 0, .58), 0 0 30px rgba(221, 185, 109, .09);
}

.hero-card:hover::after,
.hero-card.selected::after { opacity: 1; }

.hero-card img {
  z-index: 1;
  width: 94%;
  height: 89%;
  bottom: 0;
  object-fit: contain;
  object-position: center bottom;
  filter: saturate(.82) drop-shadow(0 15px 25px #000);
  transition: transform .25s ease, filter .25s ease;
}

.hero-card:hover img,
.hero-card.selected img {
  transform: translateX(-50%) scale(1.025);
  filter: saturate(1) brightness(1.04) drop-shadow(0 18px 30px #000);
}

.hero-card-copy {
  z-index: 3;
  padding: 90px 24px 22px;
  background: linear-gradient(transparent, rgba(5, 8, 12, .92) 38%, rgba(5, 8, 12, .99) 72%);
}

.hero-card-copy small { font-size: 9px; color: var(--v2-gold); }
.hero-card-copy h3 { margin: 6px 0; font-size: clamp(18px, 1.7vw, 24px); }
.hero-card-copy p { color: #abb2b2; font-size: 10px; line-height: 1.55; }

.select-footer {
  position: relative;
  z-index: 1;
  width: min(1210px, 100%);
  min-height: 58px;
  margin: 15px auto 0;
  padding-top: 13px;
  border-top: 1px solid rgba(221, 185, 109, .16);
}

.select-footer > span { max-width: 55%; line-height: 1.5; }
.select-footer-actions { flex-shrink: 0; }
.select-footer-actions button { min-width: 145px; }

/* -------------------------------------------------------------------------- */
/* Combate                                                                     */
/* -------------------------------------------------------------------------- */

.game-screen { isolation: isolate; background: #030507; }

.scene-bg {
  inset: -1.5%;
  filter: saturate(.72) contrast(1.04) brightness(.68);
  transform: scale(1.025);
}

.scene-bg::after {
  background:
    linear-gradient(90deg, rgba(3, 5, 8, .93), transparent 25%, transparent 74%, rgba(3, 5, 8, .94)),
    linear-gradient(0deg, rgba(3, 5, 8, .99), transparent 45%),
    linear-gradient(180deg, rgba(3, 5, 8, .65), transparent 30%);
}

.vignette {
  z-index: 1;
  box-shadow: inset 0 0 150px 28px rgba(1, 2, 4, .92);
}

.game-header {
  left: var(--v2-safe-x);
  right: var(--v2-safe-x);
  top: var(--v2-safe-y);
  height: 72px;
  padding: 9px 14px;
  border-top-color: rgba(255, 255, 255, .035);
}

.game-header::before,
.hand-panel::before,
.left-rail::before,
.right-rail::before {
  content: '';
  position: absolute;
  inset: 5px;
  pointer-events: none;
  border: 1px solid rgba(221, 185, 109, .06);
}

.floor-mark { min-width: 220px; gap: 12px; }
.floor-mark > span { font-size: 34px; color: var(--v2-gold-bright); }
.floor-mark small { font-size: 7px; }
.floor-mark b { font-size: 12px; }

.stage-track { max-width: 360px; margin-inline: auto; }
.stage-node i { width: 10px; height: 10px; background: #0e1319; }
.stage-node span { width: clamp(30px, 4.2vw, 60px); }

.game-tools { gap: 5px; }
.tool-btn { height: 39px; min-height: 39px; padding: 0 10px; font-size: 7px; }
.icon-btn { width: 39px; height: 39px; min-height: 39px; color: var(--v2-gold); }

.left-rail,
.right-rail {
  top: 96px;
  bottom: 218px;
  width: 246px;
  padding: 15px;
}

.left-rail { left: var(--v2-safe-x); }
.right-rail { right: var(--v2-safe-x); }

.rail-title {
  position: relative;
  z-index: 1;
  margin-bottom: 11px;
  padding: 0 2px 10px;
  color: #e7e1d6;
}

.rail-title span { font-family: var(--display); }

.party-list { position: relative; z-index: 1; }

.party-member {
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 9px;
  padding: 8px;
  margin-bottom: 6px;
  border: 1px solid rgba(255, 255, 255, .045);
  background: rgba(4, 7, 11, .35);
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.party-member:hover { border-color: rgba(221, 185, 109, .28); transform: translateX(2px); }
.party-member.active {
  border-color: rgba(104, 184, 216, .42);
  background: linear-gradient(90deg, rgba(104, 184, 216, .12), rgba(6, 10, 14, .34));
  box-shadow: inset 3px 0 0 rgba(104, 184, 216, .7);
}

.party-member .mini-portrait {
  width: 48px;
  height: 48px;
  border-radius: 3px;
  border-color: rgba(221, 185, 109, .35);
  box-shadow: inset 0 0 16px rgba(0, 0, 0, .45);
}

.party-member b { color: #eee8dc; font-size: 12px; }
.party-member small { font-size: 7px; line-height: 1.3; }
.stat-line { height: 3px; margin-top: 3px; background: rgba(255, 255, 255, .08); }

.encounter-meter {
  z-index: 1;
  left: 15px;
  right: 15px;
  bottom: 14px;
  padding-top: 11px;
  border-top: 1px solid rgba(221, 185, 109, .13);
}

.meter-track { height: 6px; border: 1px solid rgba(255, 255, 255, .04); }
.encounter-meter p { margin-bottom: 0; font-size: 9px; }

.battlefield {
  z-index: 2;
  inset: 96px 270px 221px;
  min-width: 0;
}

.location-copy { position: relative; z-index: 4; padding-top: 1px; }
.location-copy > p:first-child { margin: 0 0 4px; font-size: 8px; }
.location-copy h2 { font-size: clamp(19px, 1.9vw, 27px); color: #f1ecdf; }
.location-copy > p:last-child { margin: 5px auto 0; font-size: 10px; line-height: 1.45; }

.enemy-zone {
  inset: 55px -12px 0;
  gap: clamp(10px, 1.8vw, 28px);
  align-items: flex-end;
  padding-bottom: 6px;
}

.enemy {
  width: clamp(190px, 18vw, 250px);
  flex: 0 1 250px;
  padding: 0 8px 8px;
}

.enemy::after {
  content: '';
  position: absolute;
  z-index: -1;
  left: 10%;
  right: 10%;
  bottom: 34px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .7);
  filter: blur(9px);
}

.enemy-figure {
  height: min(39vh, 286px);
  min-height: 190px;
  align-items: flex-end;
}

.creature-art {
  max-width: min(100%, 270px);
  max-height: min(39vh, 292px);
  filter: drop-shadow(0 20px 20px rgba(0, 0, 0, .95)) drop-shadow(0 0 12px var(--enemy-glow));
}

.enemy:hover .creature-art { transform: scale(1.045) translateY(-3px); }
.enemy h3 { margin-top: 2px; color: #f0eadc; font-size: 15px; text-shadow: 0 2px 10px #000; }
.enemy small { font-size: 9px; }
.enemy-intent-label { min-height: 13px; color: var(--v2-gold-bright); font-size: 8px; }

.enemy-hp {
  position: relative;
  height: 8px;
  max-width: 188px;
  margin: 6px auto 4px;
  border-color: rgba(0, 0, 0, .75);
  background: rgba(9, 11, 14, .88);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .55);
}

.enemy-hp i { background: linear-gradient(90deg, #632725, #c7544e 72%, #e1816e); }
.enemy-status { font-size: 8px; }

.enemy-intent-badge {
  z-index: 5;
  top: 7px;
  right: 8px;
  width: 38px;
  height: 38px;
  color: #f0e4cc;
  border-color: rgba(221, 185, 109, .44);
  background: radial-gradient(circle, rgba(30, 38, 47, .96), rgba(5, 8, 12, .96));
  box-shadow: 0 0 18px var(--enemy-glow), inset 0 0 12px rgba(255, 255, 255, .04);
}

.enemy.boss-enemy {
  width: min(38vw, 390px);
  flex-basis: 390px;
  margin-bottom: -2px;
}

.enemy.boss-enemy .enemy-figure {
  height: min(47vh, 350px);
  min-height: 260px;
}

.enemy.boss-enemy .creature-art {
  max-width: min(100%, 385px);
  max-height: min(47vh, 355px);
  filter: drop-shadow(0 28px 28px #000) drop-shadow(0 0 22px var(--enemy-glow));
}

.enemy.boss-enemy h3 { font-size: clamp(18px, 2vw, 24px); }
.enemy.boss-enemy .enemy-hp { max-width: 285px; height: 10px; }
.enemy.boss-enemy .boss-crown { top: -5px; font-size: 31px; }

.right-rail .intent-card {
  padding: 10px 11px;
  border-color: rgba(221, 185, 109, .16);
  background: rgba(3, 6, 10, .35);
}

.intent-card .intent-row { gap: 9px; padding: 7px 0; }
.intent-card .intent-row .intent-icon { width: 24px; font-size: 18px; text-align: center; }
.intent-copy b { color: #eee7d9; font-size: 11px; }
.intent-copy span { font-size: 9px; line-height: 1.35; }

.rule-card {
  margin-top: 10px;
  padding: 12px 12px 12px 14px;
  border-left-color: var(--v2-gold);
  background: linear-gradient(90deg, rgba(221, 185, 109, .07), transparent);
}

.rule-card p { font-size: 9px; line-height: 1.45; }
.combat-log { max-height: 86px; margin-top: 9px; padding: 9px; }
.combat-log li { font-size: 7px; }
.turn-order { gap: 4px; margin: -2px 0 9px; }
.turn-token { padding: 5px 2px; font-size: 6px; }

.right-rail > .end-turn {
  left: 14px;
  right: 14px;
  bottom: 14px;
  min-height: 46px;
}

.hand-panel {
  left: var(--v2-safe-x);
  right: var(--v2-safe-x);
  bottom: var(--v2-safe-y);
  height: 198px;
  padding: 10px 14px;
  overflow: visible;
}

.active-hero {
  position: relative;
  z-index: 1;
  width: 175px;
  flex: 0 0 175px;
}

.portrait {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 4px;
  border-color: var(--v2-gold);
  box-shadow: 0 0 0 3px rgba(221, 185, 109, .08), inset 0 0 16px #000;
}

.active-hero b { font-size: 12px; }
.active-hero span { max-width: 92px; font-size: 8px; line-height: 1.35; }

.breath-orb {
  position: relative;
  z-index: 1;
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  margin-right: 10px;
  filter: drop-shadow(0 0 12px rgba(104, 184, 216, .18));
}

.breath-orb strong { font-size: 23px; }
.hand { position: relative; z-index: 2; gap: clamp(6px, .75vw, 10px); }

.card {
  width: clamp(112px, 10.8vw, 144px);
  height: 176px;
  flex: 0 1 144px;
  border-width: 1px;
  border-color: var(--card-color, var(--v2-danger));
  border-radius: 3px;
  background:
    linear-gradient(155deg, rgba(26, 32, 40, .98), rgba(7, 10, 14, .99));
  box-shadow: 0 10px 25px rgba(0, 0, 0, .5), inset 0 0 0 2px rgba(255, 255, 255, .025);
}

.card::after {
  content: '';
  position: absolute;
  inset: 4px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, .045);
}

.card:hover:not(.disabled) {
  transform: translateY(-18px) scale(1.055);
  border-color: var(--v2-gold-bright);
  box-shadow: 0 24px 45px rgba(0, 0, 0, .75), 0 0 20px color-mix(in srgb, var(--card-color) 34%, transparent);
}

.card.disabled { opacity: .38; filter: grayscale(.85) brightness(.72); }

.card-art {
  height: 86px;
  border-bottom: 1px solid color-mix(in srgb, var(--card-color) 55%, transparent);
  box-shadow: inset 0 -22px 24px rgba(7, 10, 14, .28);
}

.card-cost {
  left: 7px;
  top: 7px;
  width: 28px;
  height: 28px;
  color: #eaf8ff;
  border: 1px solid #88c8df;
  background: radial-gradient(circle at 40% 30%, #31566a, #0a1118 70%);
  box-shadow: 0 3px 12px #000, 0 0 13px rgba(104, 184, 216, .34);
}

.card-copy { padding: 7px 8px; }
.card-copy b { color: #f3ecdf; font-size: 10px; }
.card-copy small { margin: 3px 0; font-size: 7px; }
.card-copy p { color: #bdc3c2; font-size: 8px; line-height: 1.35; }
.deck-counts { position: relative; z-index: 1; width: 65px; flex: 0 0 65px; font-size: 8px; }

.event-panel {
  width: min(720px, 92%);
  max-height: calc(100% - 20px);
  padding: clamp(25px, 4vw, 44px);
  overflow: auto;
  border-color: rgba(221, 185, 109, .5);
  box-shadow: var(--v2-shadow-deep), 0 0 70px rgba(103, 72, 133, .12);
}

.event-panel .event-icon { font-size: 54px; text-shadow: 0 0 24px rgba(221, 185, 109, .25); }
.event-panel h3 { margin: 8px 0; font-size: clamp(24px, 3vw, 36px); }
.event-panel p { max-width: 610px; margin-inline: auto; font-size: 12px; }
.event-options { flex-wrap: wrap; }
.event-options button { min-width: 190px; min-height: 54px; }

.finale-panel {
  width: min(1040px, 94%);
  min-height: min(500px, calc(100% - 18px));
  max-height: calc(100% - 12px);
  grid-template-columns: minmax(260px, 39%) minmax(0, 1fr);
  border-color: rgba(221, 185, 109, .48);
  background:
    linear-gradient(115deg, rgba(4, 7, 11, .985), rgba(19, 13, 28, .95)),
    radial-gradient(circle at 0 50%, rgba(134, 88, 164, .14), transparent 45%);
  box-shadow: var(--v2-shadow-deep), 0 0 80px rgba(128, 79, 159, .17);
}

.finale-figure {
  min-height: 480px;
  background:
    radial-gradient(circle at 50% 40%, rgba(159, 108, 191, .25), transparent 54%),
    linear-gradient(180deg, rgba(27, 22, 39, .45), rgba(5, 7, 11, .85));
}

.finale-figure img {
  width: 125%;
  height: 108%;
  max-width: none;
  object-fit: contain;
  object-position: center bottom;
  filter: saturate(.85) drop-shadow(0 24px 38px #000) drop-shadow(0 0 25px rgba(156, 106, 188, .18));
}

.finale-copy { padding: clamp(28px, 4vw, 50px); }
.finale-copy h3 { color: #f1ebdf; text-wrap: balance; }
.finale-copy .narrative-beat { color: #c9c8c3; font-size: 12px; line-height: 1.72; }
.finale-progress i { height: 3px; background: rgba(255, 255, 255, .12); }
.finale-progress i.active { background: var(--v2-gold-bright); }
.finale-ledger span { border-color: rgba(221, 185, 109, .28); color: var(--v2-gold-bright); }

.toast {
  z-index: 40;
  bottom: 19px;
  padding: 11px 18px;
  color: #e9e3d8;
  border-color: rgba(221, 185, 109, .45);
  background: rgba(7, 11, 16, .96);
  box-shadow: var(--v2-shadow-sm);
}

.infinite-badge {
  top: 91px;
  color: var(--v2-gold-bright);
  border-color: rgba(221, 185, 109, .48);
  background: rgba(5, 8, 12, .92);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .42);
}

/* -------------------------------------------------------------------------- */
/* Visual novel                                                                */
/* -------------------------------------------------------------------------- */

.visual-novel {
  isolation: isolate;
  background: #030508;
}

.vn-background {
  inset: -2%;
  filter: saturate(.75) contrast(1.06) brightness(.55);
  transform: scale(1.025);
}

.vn-vignette {
  background:
    linear-gradient(180deg, rgba(2, 4, 7, .7), transparent 25%, transparent 55%, rgba(3, 5, 8, .94) 86%, #030508),
    linear-gradient(90deg, rgba(2, 4, 7, .55), transparent 25%, transparent 75%, rgba(2, 4, 7, .55)),
    radial-gradient(circle at 50% 40%, transparent 0 28%, rgba(0, 0, 0, .62) 100%);
}

.vn-header {
  left: clamp(20px, 3vw, 44px);
  right: clamp(20px, 3vw, 44px);
  top: 18px;
  min-height: 48px;
  padding: 0 0 12px;
  border-bottom-color: rgba(221, 185, 109, .32);
}

.vn-header::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: min(260px, 30vw);
  height: 1px;
  background: linear-gradient(90deg, var(--v2-gold-bright), transparent);
}

.vn-header small { color: var(--v2-gold); }
.vn-header strong { color: #f1ecdf; font-size: 15px; }
.vn-header-actions { gap: 7px; }

.vn-header button {
  min-height: 36px;
  padding: 8px 13px;
  color: #ddd5c7;
  border-color: rgba(221, 185, 109, .34);
  background: rgba(7, 10, 15, .72);
  backdrop-filter: blur(10px);
}

.vn-header button:hover { color: var(--v2-gold-bright); border-color: var(--v2-gold); }

.vn-stage {
  inset: 66px 0 clamp(190px, 27vh, 224px);
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.vn-stage::after {
  content: '';
  position: absolute;
  z-index: 8;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 30%;
  background: linear-gradient(transparent, rgba(3, 5, 8, .82));
  pointer-events: none;
}

.vn-sprite {
  --vn-transform: translate3d(0, 0, 0);
  --vn-scale: .965;
  bottom: 0;
  width: min(36vw, 480px);
  height: calc(100% - 4px);
  max-width: 40vw;
  max-height: none;
  object-fit: contain;
  object-position: center bottom;
  opacity: .54;
  transform: var(--vn-transform) scale(var(--vn-scale));
  transform-origin: center bottom;
  filter: saturate(.48) brightness(.62) drop-shadow(0 22px 29px rgba(0, 0, 0, .92));
  animation: v2-vn-enter .42s cubic-bezier(.2, .72, .2, 1);
  transition: opacity .24s ease, filter .24s ease, transform .24s ease;
}

.vn-sprite.left {
  left: clamp(-38px, -1.8vw, -4px);
  right: auto;
  --vn-transform: translate3d(0, 0, 0);
  transform: var(--vn-transform) scale(var(--vn-scale));
  transform-origin: left bottom;
}

.vn-sprite.right {
  right: clamp(-38px, -1.8vw, -4px);
  left: auto;
  --vn-transform: translate3d(0, 0, 0) scaleX(-1);
  transform: var(--vn-transform) scale(var(--vn-scale));
  transform-origin: right bottom;
}

.vn-sprite.center,
#vn-center {
  left: 50%;
  right: auto;
  z-index: 2;
  --vn-transform: translate3d(-50%, 0, 0);
  transform: var(--vn-transform) scale(var(--vn-scale));
  transform-origin: center bottom;
}

.vn-sprite.speaking,
.vn-sprite[data-speaking='true'] {
  z-index: 5;
  opacity: 1;
  --vn-scale: 1.025;
  filter: saturate(.96) brightness(1.02) drop-shadow(0 25px 34px #000)
    drop-shadow(0 0 30px rgba(221, 185, 109, .16));
}

.vn-sprite.listening,
.vn-sprite[data-speaking='false'] {
  z-index: 1;
  opacity: .42;
  --vn-scale: .94;
  filter: saturate(.34) brightness(.5) drop-shadow(0 20px 28px #000);
}

.vn-stage.cast-count-2 .vn-sprite.left,
.vn-stage[data-cast-count='2'] .vn-sprite.left { left: 5vw; }
.vn-stage.cast-count-2 .vn-sprite.right,
.vn-stage[data-cast-count='2'] .vn-sprite.right { right: 5vw; }

.vn-stage.cast-count-3 .vn-sprite,
.vn-stage[data-cast-count='3'] .vn-sprite { width: min(31vw, 410px); max-width: 34vw; }
.vn-stage.cast-count-3 .vn-sprite.left,
.vn-stage[data-cast-count='3'] .vn-sprite.left { left: -1vw; }
.vn-stage.cast-count-3 .vn-sprite.right,
.vn-stage[data-cast-count='3'] .vn-sprite.right { right: -1vw; }

@keyframes v2-vn-enter {
  from { opacity: 0; transform: var(--vn-transform) translateY(28px) scale(.94); }
}

.vn-dialogue {
  left: clamp(18px, 5.5vw, 82px);
  right: clamp(18px, 5.5vw, 82px);
  bottom: clamp(16px, 2.7vh, 28px);
  min-height: 162px;
  max-height: min(34vh, 245px);
  padding: 23px clamp(92px, 9vw, 132px) 21px clamp(24px, 2.7vw, 40px);
  overflow: auto;
  border-color: rgba(224, 193, 123, .64);
  background:
    linear-gradient(105deg, rgba(6, 9, 14, .985), rgba(14, 19, 26, .95)),
    radial-gradient(circle at 0 0, rgba(221, 185, 109, .1), transparent 34%);
  box-shadow: var(--v2-shadow-deep), inset 0 1px 0 rgba(255, 255, 255, .035);
  backdrop-filter: blur(17px) saturate(1.1);
}

.vn-dialogue::before,
.vn-dialogue::after { width: 30px; height: 30px; color: var(--v2-gold); }
.vn-dialogue > span { color: var(--v2-gold-bright); font-size: 10px; }

.vn-dialogue > p {
  max-width: 1060px;
  margin: 9px 0 0;
  color: #f3eee4;
  font-size: clamp(14px, 1.34vw, 18px);
  line-height: 1.58;
  text-wrap: pretty;
}

.vn-dialogue > #vn-next {
  right: 26px;
  bottom: 20px;
  min-height: 40px;
  color: var(--v2-gold-bright);
}

.vn-choices {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}

.vn-choices button {
  min-height: 64px;
  padding: 12px 14px;
  border-color: rgba(221, 185, 109, .31);
  background: linear-gradient(145deg, rgba(221, 185, 109, .08), rgba(5, 8, 12, .72));
}

.vn-choices button:hover {
  color: var(--v2-gold-bright);
  border-color: rgba(221, 185, 109, .72);
  background: linear-gradient(145deg, rgba(221, 185, 109, .16), rgba(9, 12, 17, .88));
}

.vn-choices b { font-size: 9px; }
.vn-choices span { color: #aeb5b6; font-size: 9px; }

.vn-log-panel {
  inset: 78px clamp(18px, 7vw, 105px) 30px;
  padding: clamp(20px, 3vw, 36px);
  border-color: rgba(221, 185, 109, .48);
  background: rgba(5, 8, 13, .97);
  box-shadow: var(--v2-shadow-deep);
}

.vn-log-heading h2 { font-size: clamp(21px, 2.6vw, 32px); }
.vn-log-list article { padding: 14px 18px; border-bottom-color: rgba(221, 185, 109, .09); }
.vn-log-list article:hover { background: rgba(221, 185, 109, .035); }
.vn-log-list article p { font-size: 12px; }
.log-mode .vn-stage { opacity: .08; }

/* -------------------------------------------------------------------------- */
/* Modais, recompensas e códice                                                 */
/* -------------------------------------------------------------------------- */

.modal {
  z-index: 1300;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 35%, rgba(58, 76, 89, .16), transparent 38%),
    rgba(1, 3, 6, .88);
  backdrop-filter: blur(11px);
}

.modal-card {
  width: min(980px, 94vw);
  max-height: 90dvh;
  padding: clamp(25px, 3.4vw, 45px);
  border-color: rgba(221, 185, 109, .32);
  box-shadow: var(--v2-shadow-deep), 0 0 70px rgba(86, 116, 131, .08);
}

.modal-card::before {
  content: '';
  position: absolute;
  inset: 8px;
  pointer-events: none;
  border: 1px solid rgba(221, 185, 109, .07);
}

.modal-card h2 { font-size: clamp(28px, 3vw, 42px); color: #f1ebdf; }

.modal-close {
  z-index: 8;
  right: 15px;
  top: 13px;
  width: 42px;
  height: 42px;
  min-height: 42px;
  color: #c5bba9;
  border: 1px solid transparent;
  font-size: 24px;
}

.modal-close:hover { color: var(--v2-gold-bright); border-color: rgba(221, 185, 109, .35); }

.codex-grid { gap: 10px; }
.codex-grid article {
  min-height: 150px;
  padding: 21px;
  border-color: rgba(221, 185, 109, .15);
  background: linear-gradient(145deg, rgba(22, 28, 36, .65), rgba(5, 8, 12, .65));
}
.codex-grid article:hover { border-color: rgba(221, 185, 109, .38); }
.codex-grid h3 { color: #ece6da; }
.codex-grid p { font-size: 11px; line-height: 1.65; }

.reward-card { width: min(1040px, 95vw); }
.reward-card > .eyebrow { margin-top: 0; }
.reward-options { gap: clamp(12px, 2vw, 24px); }

.reward-options .card {
  width: clamp(168px, 18vw, 210px);
  height: clamp(246px, 34vh, 286px);
  flex-basis: 210px;
}

.reward-options .card-art { height: 52%; }
.reward-options .card-copy { padding: 11px; }
.reward-options .card-copy b { font-size: 13px; }
.reward-options .card-copy p { font-size: 10px; }
.reroll-reward { min-height: 52px; }

.art-viewer { padding: 3vh 3vw; }
.art-viewer img { border-color: rgba(221, 185, 109, .28); box-shadow: var(--v2-shadow-deep); }
#expanded-caption { color: var(--v2-gold-bright); }

/* -------------------------------------------------------------------------- */
/* Arquivos do Fosso                                                          */
/* -------------------------------------------------------------------------- */

.archive-shell,
.systems-shell {
  width: min(1240px, 96vw);
  height: min(850px, 94dvh);
  padding: clamp(22px, 2.5vw, 34px);
  border-color: rgba(221, 185, 109, .3);
  background:
    linear-gradient(145deg, rgba(16, 21, 28, .985), rgba(4, 7, 11, .99)),
    radial-gradient(circle at 0 0, rgba(96, 133, 151, .08), transparent 38%);
}

.archive-heading,
.systems-heading { position: relative; z-index: 2; }
.archive-heading h2,
.systems-heading h2 { color: #f1ebdf; }
.archive-progress,
.expedition-wallet { color: var(--v2-gold-bright); }

.archive-tabs,
.systems-tabs {
  position: relative;
  z-index: 2;
  gap: 3px;
  margin: 18px 0 14px;
  border-bottom-color: rgba(221, 185, 109, .19);
  overflow-x: auto;
  scrollbar-width: none;
}

.archive-tabs::-webkit-scrollbar,
.systems-tabs::-webkit-scrollbar { display: none; }

.archive-tabs button,
.systems-tabs button {
  min-height: 42px;
  flex: 0 0 auto;
  padding: 10px 15px;
  border: 1px solid transparent;
  border-bottom: 2px solid transparent;
  font-size: 8px;
}

.archive-tabs button:hover,
.archive-tabs button.active,
.systems-tabs button:hover,
.systems-tabs button.active {
  color: var(--v2-gold-bright);
  border-color: rgba(221, 185, 109, .18);
  border-bottom-color: var(--v2-gold);
  background: linear-gradient(180deg, rgba(221, 185, 109, .07), transparent);
}

.archive-content,
.systems-content {
  position: relative;
  z-index: 1;
  padding: 3px 8px 32px 2px;
}

.archive-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }

.archive-card {
  min-height: 196px;
  padding: 18px;
  border-color: rgba(221, 185, 109, .15);
  background:
    linear-gradient(145deg, rgba(28, 35, 44, .86), rgba(7, 10, 14, .94)),
    radial-gradient(circle at 100% 0, rgba(221, 185, 109, .06), transparent 43%);
  box-shadow: 0 10px 25px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .025);
}

.archive-card::before {
  content: '';
  position: absolute;
  inset: 5px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, .025);
}

.archive-card:hover {
  border-color: rgba(221, 185, 109, .52);
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(0, 0, 0, .38), 0 0 20px rgba(221, 185, 109, .06);
}

.archive-card.locked { opacity: .34; }
.archive-card .archive-index { color: var(--v2-gold); }
.archive-card h3 { color: #eee8db; font-size: 14px; }
.archive-card p { color: #aeb5b5; font-size: 9px; line-height: 1.58; }
.archive-card .tags span { border-color: rgba(221, 185, 109, .16); }

.archive-card .archive-portrait {
  right: -8px;
  bottom: -18px;
  height: 176px;
  opacity: .52;
  object-fit: contain;
  object-position: right bottom;
  filter: saturate(.68) drop-shadow(0 12px 19px #000);
}

.archive-card:hover .archive-portrait { opacity: .72; }

.archive-card.card-entry { height: 278px; }
.card-entry .archive-art { height: 154px; box-shadow: inset 0 -25px 24px rgba(6, 9, 13, .35); }
.card-entry .archive-body { padding: 13px; }
.card-entry .cost-gem { top: 11px; left: 11px; box-shadow: 0 5px 15px #000; }

.bestiary-entry { min-height: 295px; padding-top: 162px; }
.bestiary-art { top: 5px; height: 161px; filter: drop-shadow(0 15px 18px rgba(0, 0, 0, .78)); }
.bestiary-entry:not(.locked):hover .bestiary-art { transform: translateX(-50%) scale(1.07) translateY(-2px); }

.lore-entry {
  min-height: 175px;
  background:
    linear-gradient(115deg, rgba(27, 33, 42, .9), rgba(7, 10, 14, .96)),
    url('assets/ui/panel-rune.svg') right -30px center / 170px no-repeat;
}
.lore-entry blockquote { color: #ddd7ca; font-size: 12px; }

.chronicle { gap: 12px; }
.chronicle-act {
  grid-template-columns: 170px 1fr;
  min-height: 215px;
  border-color: rgba(221, 185, 109, .16);
  background: linear-gradient(115deg, rgba(25, 32, 41, .9), rgba(6, 9, 13, .96));
  box-shadow: 0 12px 28px rgba(0, 0, 0, .24);
}
.chronicle-mark { border-color: rgba(221, 185, 109, .15); }
.chronicle-mark strong { color: var(--v2-gold-bright); }
.chronicle-copy { padding: 24px 28px; }
.chronicle-copy .beat { color: #dbd6ca; font-size: 11px; }
.chronicle-copy p { font-size: 10px; }

.gear-row {
  min-height: 86px;
  border-color: rgba(221, 185, 109, .14);
  background: linear-gradient(90deg, rgba(24, 30, 38, .72), rgba(6, 9, 13, .72));
}
.gear-row:not(.locked):hover { border-color: rgba(221, 185, 109, .48); background-color: rgba(221, 185, 109, .035); }
.gear-icon { border-color: rgba(221, 185, 109, .32); background: rgba(3, 6, 9, .35); }

/* -------------------------------------------------------------------------- */
/* Gestão: inventário, atributos, build e elenco                              */
/* -------------------------------------------------------------------------- */

.game-tools { position: relative; z-index: 2; }

.inventory-layout { grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; }
.inventory-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }

.item-card {
  min-height: 215px;
  padding: 14px;
  border-color: rgba(221, 185, 109, .15);
  background: linear-gradient(145deg, rgba(27, 34, 43, .82), rgba(7, 10, 14, .94));
  box-shadow: 0 10px 24px rgba(0, 0, 0, .22), inset 0 1px rgba(255, 255, 255, .025);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.item-card:hover:not(.locked) {
  transform: translateY(-3px);
  border-color: rgba(221, 185, 109, .55);
  box-shadow: 0 18px 34px rgba(0, 0, 0, .36);
}

.item-card.equipped {
  border-color: var(--v2-gold);
  box-shadow: inset 0 0 0 2px rgba(221, 185, 109, .58), 0 0 24px rgba(221, 185, 109, .09);
}

.item-card .item-icon { height: 112px; }
.item-card .item-icon img { width: 112px; height: 112px; }
.item-card h3 { color: #eee8dc; font-size: 12px; }
.item-card p { font-size: 9px; line-height: 1.55; }

.loadout,
.build-summary {
  border-color: rgba(221, 185, 109, .18);
  background: linear-gradient(145deg, rgba(18, 24, 31, .75), rgba(5, 8, 12, .72));
}

.slot {
  border-style: solid;
  border-color: rgba(221, 185, 109, .18);
  background: rgba(2, 5, 8, .25);
}

.consumable-row { min-height: 60px; border-color: rgba(221, 185, 109, .1); }
.consumable-row button { min-height: 38px; }

.status-layout { grid-template-columns: 235px minmax(0, 1fr); }
.status-hero-button {
  min-height: 59px;
  border-color: rgba(221, 185, 109, .12);
  background: rgba(7, 11, 16, .78);
}
.status-hero-button:hover { border-color: rgba(221, 185, 109, .4); }
.status-hero-button.active { border-color: var(--v2-gold); background: rgba(221, 185, 109, .08); }
.status-hero-button .face { border-radius: 3px; }

.character-sheet { grid-template-columns: minmax(220px, 31%) 1fr; }
.character-visual {
  min-height: 490px;
  border-color: rgba(221, 185, 109, .17);
  background:
    radial-gradient(circle at 50% 30%, rgba(92, 137, 157, .2), transparent 54%),
    linear-gradient(180deg, rgba(15, 21, 28, .7), rgba(5, 8, 12, .9));
}
.character-visual::after {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(221, 185, 109, .08);
}
.character-visual img { width: 100%; height: 94%; object-fit: contain; object-position: center bottom; }
.sheet-copy h3 { color: #f1ebdf; font-size: clamp(27px, 3vw, 39px); }
.sheet-copy .bio { color: #b2b9b8; font-size: 11px; line-height: 1.72; }

.stats-grid { gap: 9px; }
.stat-box { border-color: rgba(221, 185, 109, .13); background: rgba(3, 6, 10, .34); }
.stat-box strong { color: #eee8dc; }

.build-layout { grid-template-columns: 310px minmax(0, 1fr); }
.deck-editor { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.deck-chip {
  min-height: 58px;
  padding: 10px;
  border-color: rgba(221, 185, 109, .12);
  background: linear-gradient(145deg, rgba(21, 28, 36, .84), rgba(6, 9, 13, .9));
}
.deck-chip:hover { border-color: rgba(221, 185, 109, .56); transform: translateY(-2px); }
.deck-chip.upgraded { border-color: var(--v2-gold); box-shadow: inset 0 0 18px rgba(221, 185, 109, .07); }

.roster-layout { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.roster-unit {
  min-height: 250px;
  padding: 145px 15px 58px;
  border-color: rgba(221, 185, 109, .14);
  background: linear-gradient(145deg, rgba(24, 31, 40, .86), rgba(6, 9, 13, .94));
}
.roster-unit.active-unit { border-color: var(--v2-gold); box-shadow: inset 0 0 0 1px var(--v2-gold); }
.roster-art { height: 158px; opacity: .7; }
.roster-unit button { min-height: 38px; }

/* -------------------------------------------------------------------------- */
/* DRPG — corredor com paredes, teto e piso perspectivados                     */
/* -------------------------------------------------------------------------- */

.drpg-screen {
  min-height: 560px;
  isolation: isolate;
  background: #020305;
}

.drpg-backdrop {
  filter: brightness(.2) saturate(.52) contrast(1.08);
}

.drpg-backdrop::after {
  background:
    radial-gradient(circle at 42% 42%, transparent, rgba(0, 0, 0, .82) 80%),
    linear-gradient(180deg, rgba(2, 4, 7, .25), #020305 96%);
}

.drpg-header {
  height: 70px;
  padding: 12px clamp(18px, 2.2vw, 32px);
  border-bottom-color: rgba(221, 185, 109, .32);
  background: linear-gradient(180deg, rgba(3, 6, 10, .99), rgba(4, 7, 11, .82));
  box-shadow: 0 12px 30px rgba(0, 0, 0, .34);
}

.drpg-header::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 35%;
  height: 1px;
  background: linear-gradient(90deg, var(--v2-gold), transparent);
}

.drpg-header h1 { color: #f1ebdf; font-size: 19px; }
.drpg-header small { color: var(--v2-gold); }
.drpg-header-actions button { min-height: 38px; border-color: rgba(221, 185, 109, .23); }
.drpg-header-actions button:hover { color: var(--v2-gold-bright); border-color: var(--v2-gold); }

.drpg-layout {
  inset: 70px 0 62px;
  grid-template-columns: minmax(0, 1fr) clamp(250px, 23vw, 310px);
  gap: clamp(10px, 1.15vw, 16px);
  padding: clamp(10px, 1.15vw, 16px) clamp(12px, 1.5vw, 22px);
}

.drpg-view {
  border: 1px solid rgba(221, 185, 109, .18);
  background: #030507;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .52);
}

.dungeon-viewport {
  --corridor-vanish-x: 50%;
  --corridor-vanish-y: 46%;
  min-height: 0;
  border: 0;
  background:
    radial-gradient(circle at var(--corridor-vanish-x) var(--corridor-vanish-y), rgba(101, 135, 144, .2), transparent 19%),
    linear-gradient(180deg, rgba(5, 8, 11, .14), rgba(1, 2, 4, .88)),
    var(--dungeon-image) center / cover no-repeat;
  perspective: 920px;
  box-shadow: inset 0 0 130px 25px #000;
}

.dungeon-viewport::before {
  z-index: 6;
  background:
    radial-gradient(circle at var(--corridor-vanish-x) var(--corridor-vanish-y), transparent 0 14%, rgba(0, 0, 0, .1) 34%, rgba(0, 0, 0, .72) 100%),
    linear-gradient(180deg, rgba(1, 3, 5, .34), transparent 23%, transparent 67%, rgba(1, 2, 4, .62));
  pointer-events: none;
}

.dungeon-viewport::after {
  content: '';
  position: absolute;
  z-index: 7;
  inset: 0;
  pointer-events: none;
  border: 1px solid rgba(221, 185, 109, .15);
  box-shadow: inset 0 0 135px 24px rgba(0, 0, 0, .88), inset 0 0 0 8px rgba(0, 0, 0, .14);
}

.dungeon-sky {
  z-index: 0;
  inset: 0 0 auto;
  height: 52%;
  clip-path: polygon(0 0, 100% 0, 73% 100%, 27% 100%);
  transform: none;
  transform-origin: top;
  background:
    linear-gradient(180deg, rgba(1, 2, 4, .66), rgba(12, 16, 18, .28) 58%, rgba(61, 76, 78, .13)),
    repeating-linear-gradient(90deg, transparent 0 16%, rgba(221, 185, 109, .06) 16.2% 16.5%),
    var(--ceiling-texture) center / cover no-repeat,
    var(--dungeon-image) center top / cover no-repeat;
  filter: brightness(.68) saturate(.58);
  box-shadow: inset 0 -35px 60px rgba(0, 0, 0, .35);
}

.dungeon-floor-plane {
  z-index: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 56%;
  clip-path: polygon(27% 0, 73% 0, 100% 100%, 0 100%);
  transform: none;
  background:
    linear-gradient(180deg, rgba(35, 43, 44, .2), rgba(1, 2, 4, .82) 87%),
    repeating-linear-gradient(90deg, transparent 0 12.3%, rgba(221, 185, 109, .07) 12.6% 12.9%),
    repeating-linear-gradient(180deg, transparent 0 18%, rgba(0, 0, 0, .3) 18.4% 18.8%),
    var(--floor-texture) center / cover no-repeat,
    var(--dungeon-image) center bottom / cover no-repeat;
  filter: brightness(.72) saturate(.6);
  box-shadow: inset 0 45px 70px rgba(0, 0, 0, .23);
}

.corridor-frame {
  z-index: 2;
  top: var(--corridor-vanish-y);
  border: 0;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 9px rgba(0, 0, 0, .48));
}

.corridor-frame::before,
.corridor-frame::after {
  content: '';
  position: absolute;
  z-index: 4;
  left: 20%;
  right: 20%;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(221, 185, 109, .22), transparent);
}

.corridor-frame::before { top: 13%; }
.corridor-frame::after { bottom: 13%; }

.corridor-frame.depth-1 { width: 104%; height: 106%; opacity: 1; }
.corridor-frame.depth-2 { width: 72%; height: 75%; opacity: .92; }
.corridor-frame.depth-3 { width: 47%; height: 51%; opacity: .82; }
.corridor-frame.depth-4 { width: 26%; height: 30%; opacity: .7; }

.wall-left,
.wall-right,
.wall-front {
  background-color: #11171b;
  background-image:
    linear-gradient(90deg, rgba(2, 4, 7, .96), rgba(28, 35, 37, .35) 72%, rgba(79, 91, 88, .18)),
    repeating-linear-gradient(180deg, transparent 0 17%, rgba(0, 0, 0, .25) 17.4% 17.9%),
    var(--wall-texture),
    var(--dungeon-image);
  background-position: center;
  background-size: cover, auto, cover, cover;
  background-blend-mode: normal, multiply, luminosity, soft-light;
  filter: brightness(.68) saturate(.58);
}

.wall-left {
  right: 76%;
  clip-path: polygon(0 0, 100% 13%, 100% 87%, 0 100%);
  border-right: 1px solid rgba(221, 185, 109, .18);
  box-shadow: inset -20px 0 40px rgba(0, 0, 0, .2);
}

.wall-right {
  left: 76%;
  clip-path: polygon(0 13%, 100% 0, 100% 100%, 0 87%);
  border-left: 1px solid rgba(221, 185, 109, .16);
  background-image:
    linear-gradient(270deg, rgba(2, 4, 7, .96), rgba(28, 35, 37, .35) 72%, rgba(79, 91, 88, .18)),
    repeating-linear-gradient(180deg, transparent 0 17%, rgba(0, 0, 0, .25) 17.4% 17.9%),
    var(--wall-texture),
    var(--dungeon-image);
  box-shadow: inset 20px 0 40px rgba(0, 0, 0, .22);
}

.wall-left.solid,
.wall-right.solid { opacity: .98; }

.wall-left.open,
.wall-right.open {
  opacity: .14;
  filter: brightness(.95) saturate(.5);
}

.wall-front {
  inset: 0;
  border: 1px solid rgba(221, 185, 109, .23);
  background-image:
    radial-gradient(circle at 50% 45%, rgba(78, 101, 105, .18), rgba(2, 4, 6, .75)),
    linear-gradient(180deg, rgba(6, 9, 12, .48), rgba(3, 5, 7, .9)),
    var(--wall-texture),
    var(--dungeon-image);
  background-blend-mode: normal, multiply, luminosity, soft-light;
  box-shadow: inset 0 0 80px rgba(0, 0, 0, .7), 0 0 25px rgba(0, 0, 0, .65);
}

.corridor-frame.depth-3 .wall-left,
.corridor-frame.depth-3 .wall-right,
.corridor-frame.depth-4 .wall-left,
.corridor-frame.depth-4 .wall-right { filter: brightness(.56) saturate(.48); }

.dungeon-encounter {
  z-index: 5;
  color: var(--v2-gold-bright);
  text-shadow: 0 4px 18px #000, 0 0 30px rgba(184, 72, 66, .72);
}
.dungeon-encounter strong { font-size: clamp(46px, 7vw, 82px); }
.dungeon-encounter span {
  margin-top: 4px;
  padding: 5px 9px;
  border: 1px solid rgba(221, 185, 109, .25);
  background: rgba(3, 6, 9, .7);
}

.dungeon-compass {
  z-index: 10;
  left: 14px;
  top: 13px;
  border-color: rgba(221, 185, 109, .33);
  background: rgba(3, 6, 9, .8);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .38);
  backdrop-filter: blur(10px);
}
.dungeon-compass span { color: var(--v2-gold-bright); border-color: var(--v2-gold); }
.dungeon-grain { z-index: 9; opacity: .09; mix-blend-mode: overlay; }

.drpg-objective {
  z-index: 12;
  left: 17px;
  bottom: 16px;
  max-width: min(520px, calc(100% - 34px));
  padding: 12px 15px;
  border: 1px solid rgba(221, 185, 109, .16);
  border-left: 3px solid var(--v2-gold);
  background: rgba(4, 7, 11, .82);
  box-shadow: 0 12px 35px rgba(0, 0, 0, .45);
}
.drpg-objective strong { color: #eee8dc; }

.drpg-sidebar { gap: 9px; }
.drpg-location,
.minimap-frame,
.drpg-party-unit {
  border-color: rgba(221, 185, 109, .17);
  background: linear-gradient(145deg, rgba(14, 19, 25, .94), rgba(4, 7, 11, .94));
  box-shadow: 0 10px 25px rgba(0, 0, 0, .24);
}
.drpg-location { padding: 13px; }
.drpg-location b { color: #eee8dc; }
.drpg-location p { font-size: 9px; line-height: 1.45; }

.minimap-frame { padding: 10px; }
.mini-dungeon-grid { gap: 2px; }
.mini-cell { border-color: rgba(255, 255, 255, .028); background: #11171d; }
.mini-cell.unseen { background: #05080b; }
.mini-cell.wall.revealed { background: #303a3e; }
.mini-cell.visited { background: #172832; }
.mini-cell.current {
  color: #090b0e;
  background: var(--v2-gold-bright);
  box-shadow: 0 0 14px rgba(221, 185, 109, .52);
}

.drpg-party-unit { padding: 6px 8px; }
.drpg-party-unit.active { border-color: rgba(221, 185, 109, .52); box-shadow: inset 2px 0 0 var(--v2-gold); }
.drpg-party-unit > span { border-radius: 3px; border-color: rgba(221, 185, 109, .35); }

.drpg-footer {
  height: 62px;
  padding: 9px clamp(16px, 2vw, 28px);
  border-top-color: rgba(221, 185, 109, .25);
  background: linear-gradient(0deg, rgba(3, 5, 8, .995), rgba(4, 7, 11, .87));
  box-shadow: 0 -12px 30px rgba(0, 0, 0, .28);
}

.drpg-keys button {
  min-height: 42px;
  padding: 4px 9px;
  border-color: rgba(221, 185, 109, .23);
  background: rgba(7, 11, 16, .58);
}
.drpg-keys button:hover { border-color: var(--v2-gold); background: rgba(221, 185, 109, .07); }
.drpg-keys kbd {
  width: 29px;
  height: 29px;
  color: var(--v2-gold-bright);
  border-color: rgba(221, 185, 109, .68);
  background: linear-gradient(180deg, #1a2027, #0a0d11);
}

.first-person-controls button { min-height: 52px; }

/* Eventos e loja em tela cheia */
.drpg-event,
.drpg-shop { background-color: #030507; }

.drpg-event { grid-template-columns: minmax(330px, 43%) minmax(0, 1fr); }
.drpg-event-art {
  filter: saturate(.72) brightness(.56) contrast(1.06);
  box-shadow: inset -90px 0 110px #05070a;
}
.drpg-event-copy { padding: clamp(38px, 6.5vw, 100px); }
.drpg-event-copy::before { color: rgba(221, 185, 109, .1); }
.drpg-event-copy > small { color: var(--v2-gold); }
.drpg-event-copy h2 { color: #f1ebdf; text-wrap: balance; }
.drpg-event-copy > p { color: #ccc8c0; text-wrap: pretty; }
.drpg-event-copy blockquote { color: #97a3a5; border-left-color: var(--v2-gold); }
.drpg-event-choices { gap: 10px; }
.drpg-event-choices button {
  min-height: 92px;
  border-color: rgba(221, 185, 109, .3);
  background: linear-gradient(145deg, rgba(221, 185, 109, .07), rgba(6, 9, 13, .72));
}
.drpg-event-choices button:hover {
  border-color: rgba(221, 185, 109, .72);
  background: linear-gradient(145deg, rgba(221, 185, 109, .15), rgba(10, 13, 18, .9));
  transform: translateY(-2px);
}
.drpg-event-choices b { color: #eee6d7; }

.drpg-shop {
  padding: clamp(24px, 3vw, 42px) clamp(22px, 4vw, 64px) 50px;
  background:
    linear-gradient(rgba(3, 5, 8, .88), rgba(3, 5, 8, .97)),
    url('assets/backgrounds/cidade-cinzenta.png') center / cover fixed;
}
.drpg-shop > header { border-bottom-color: rgba(221, 185, 109, .34); }
.drpg-shop h2 { color: #f1ebdf; font-size: clamp(27px, 3vw, 39px); }
.drpg-shop > p { max-width: 720px; }
.drpg-shop-grid { grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 12px; }
.drpg-shop-grid article {
  padding: 13px;
  border-color: rgba(221, 185, 109, .16);
  background: linear-gradient(155deg, rgba(21, 28, 36, .96), rgba(5, 8, 12, .98));
  box-shadow: 0 14px 34px rgba(0, 0, 0, .36);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.drpg-shop-grid article:hover {
  transform: translateY(-4px);
  border-color: rgba(221, 185, 109, .48);
  box-shadow: 0 22px 42px rgba(0, 0, 0, .5);
}
.drpg-shop-grid img { border: 1px solid rgba(221, 185, 109, .12); }
.drpg-shop-grid h3 { color: #eee8dc; }
.drpg-shop-grid p { font-size: 9px; line-height: 1.55; }
.drpg-shop-grid button { min-height: 42px; }

.drpg-notice,
.explore-toast {
  border-color: rgba(221, 185, 109, .52);
  background: rgba(5, 8, 12, .97);
  box-shadow: var(--v2-shadow);
}

/* -------------------------------------------------------------------------- */
/* Responsividade: notebook e tablet                                           */
/* -------------------------------------------------------------------------- */

@media (max-width: 1180px) {
  .game-header { height: 68px; }
  .floor-mark { min-width: 190px; }
  .stage-track { display: none; }
  .tool-btn { padding-inline: 8px; }

  .left-rail { width: 222px; }
  .right-rail { width: 222px; }
  .battlefield { inset-inline: 240px; }
  .enemy { width: 205px; }
  .enemy.boss-enemy { width: 330px; }

  .active-hero { width: 145px; flex-basis: 145px; }
  .active-hero .portrait { width: 52px; height: 52px; flex-basis: 52px; }
  .card { width: clamp(105px, 10.6vw, 126px); height: 170px; }
  .card-art { height: 80px; }

  .archive-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .roster-layout { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .inventory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .deck-editor { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1000px) {
  .menu-content { width: min(620px, 62vw); }
  .menu-party { right: -14vw; width: 70%; opacity: .72; }

  .game-tools .tool-btn { display: none; }
  .right-rail { display: none; }
  .left-rail { width: 215px; }
  .battlefield { left: 232px; right: var(--v2-safe-x); }
  .hand-panel { padding-inline: 10px; overflow-x: auto; overflow-y: visible; }
  .active-hero { width: 120px; flex-basis: 120px; }
  .active-hero span { display: none; }
  .hand { min-width: max-content; justify-content: flex-start; }
  .card { width: 118px; flex: 0 0 118px; }
  .end-turn-compact { flex: 0 0 auto; }

  .drpg-layout { grid-template-columns: minmax(0, 1fr); }
  .drpg-sidebar {
    position: absolute;
    z-index: 15;
    right: 13px;
    top: 13px;
    width: 215px;
    max-height: calc(100% - 26px);
    padding: 8px;
    border: 1px solid rgba(221, 185, 109, .19);
    background: rgba(4, 7, 11, .86);
    backdrop-filter: blur(12px);
  }
  .drpg-location,
  .drpg-party { display: none; }

  .inventory-layout,
  .status-layout,
  .character-sheet,
  .build-layout { grid-template-columns: 1fr; }
  .status-hero-list { grid-template-columns: repeat(3, 1fr); }
  .character-visual { min-height: 380px; }
  .drpg-shop-grid { grid-template-columns: repeat(3, minmax(170px, 1fr)); }
}

@media (max-width: 780px) {
  html,
  body,
  #app { overflow: hidden; }

  .menu-screen { overflow: auto; }
  .menu-screen::before { inset: 8px; }
  .menu-content {
    position: relative;
    left: auto;
    top: auto;
    width: calc(100% - 28px);
    max-height: none;
    min-height: calc(100dvh - 28px);
    margin: 14px;
    padding: 34px 23px;
    transform: none;
    background: linear-gradient(90deg, rgba(5, 8, 12, .94), rgba(5, 8, 12, .74));
  }
  .menu-content h1 { font-size: clamp(54px, 18vw, 80px); }
  .menu-party { position: fixed; right: -35%; width: 120%; opacity: .3; }
  .menu-actions { grid-template-columns: 1fr; }
  .menu-actions .primary-btn { grid-column: auto; }

  .select-screen { padding: 28px 16px; }
  .roster { height: auto; grid-template-columns: 1fr; }
  .hero-card { min-height: 430px; }
  .select-footer { align-items: stretch; flex-direction: column; gap: 12px; }
  .select-footer > span { max-width: none; }
  .select-footer-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .select-footer-actions button { min-width: 0; }

  .game-header { left: 7px; right: 7px; top: 7px; }
  .floor-mark { min-width: 0; }
  .floor-mark > span { font-size: 28px; }
  .floor-mark b { display: block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .left-rail { display: none; }
  .battlefield { inset: 86px 8px 200px; }
  .location-copy > p:last-child { display: none; }
  .enemy-zone { top: 46px; overflow-x: auto; justify-content: flex-start; padding-inline: 16px; }
  .enemy { min-width: 170px; flex-basis: 170px; }
  .enemy-figure { height: 220px; min-height: 170px; }
  .creature-art { max-height: 225px; max-width: 180px; }
  .enemy.boss-enemy { min-width: 235px; flex-basis: 235px; }
  .enemy.boss-enemy .enemy-figure { height: 270px; min-height: 220px; }
  .enemy.boss-enemy .creature-art { max-height: 275px; max-width: 245px; }

  .finale-panel {
    grid-template-columns: 1fr;
    min-height: 0;
    max-height: calc(100% - 8px);
    overflow: auto;
  }
  .finale-figure { min-height: 220px; }
  .finale-figure img { height: 145%; bottom: -35%; }
  .finale-copy { padding: 24px 19px; }

  .hand-panel { left: 7px; right: 7px; bottom: 7px; height: 184px; }
  .active-hero { display: none; }
  .breath-orb { width: 54px; height: 54px; flex-basis: 54px; }
  .card { height: 160px; }
  .card-art { height: 72px; }
  .deck-counts { display: none; }

  .vn-header { left: 14px; right: 14px; top: 12px; }
  .vn-header strong { max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .vn-stage { inset: 58px 0 224px; }
  .vn-sprite { width: 52vw; max-width: 56vw; }
  .vn-sprite.left { left: -11vw; }
  .vn-sprite.right { right: -11vw; }
  .vn-sprite.center,
  #vn-center { width: 56vw; max-width: 60vw; }
  .vn-stage.cast-count-3 .vn-sprite,
  .vn-stage[data-cast-count='3'] .vn-sprite { width: 44vw; max-width: 48vw; }
  .vn-stage.cast-count-3 .vn-sprite.left,
  .vn-stage[data-cast-count='3'] .vn-sprite.left { left: -13vw; }
  .vn-stage.cast-count-3 .vn-sprite.right,
  .vn-stage[data-cast-count='3'] .vn-sprite.right { right: -13vw; }
  .vn-dialogue {
    left: 10px;
    right: 10px;
    bottom: 10px;
    min-height: 194px;
    max-height: 42vh;
    padding: 18px 18px 52px;
  }
  .vn-dialogue > p { font-size: 14px; }
  .vn-choices { grid-template-columns: 1fr; }
  .vn-dialogue > #vn-next { right: 17px; bottom: 10px; }
  .vn-log-panel { inset: 65px 10px 10px; }

  .archive-shell,
  .systems-shell { width: calc(100vw - 12px); height: calc(100dvh - 12px); padding: 19px 12px; }
  .archive-heading,
  .systems-heading { align-items: flex-start; flex-direction: column; padding-right: 38px; }
  .archive-progress,
  .expedition-wallet { margin-top: 7px; }
  .archive-grid,
  .inventory-grid,
  .roster-layout,
  .deck-editor { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lore-entry { grid-column: span 2; }
  .chronicle-act { grid-template-columns: 1fr; }
  .chronicle-mark { min-height: 92px; border-right: 0; border-bottom: 1px solid rgba(221, 185, 109, .14); }

  .drpg-header { height: 64px; padding: 10px 12px; }
  .drpg-header h1 { font-size: 14px; }
  .drpg-header-actions button { width: 38px; padding: 0; font-size: 0; }
  .drpg-header-actions button kbd { margin: 0; font-size: 8px; }
  .drpg-layout { inset: 64px 0 61px; padding: 7px; }
  .drpg-sidebar { right: 9px; top: 9px; width: 155px; }
  .drpg-objective { left: 10px; right: 10px; bottom: 10px; max-width: none; }
  .drpg-objective span { display: none; }
  .drpg-keys span { display: none; }
  .drpg-footer { padding: 8px 10px; }
  .drpg-event { grid-template-columns: 1fr; overflow: auto; }
  .drpg-event-art { position: fixed; inset: 0; opacity: .24; box-shadow: inset 0 0 100px #030507; }
  .drpg-event-copy { z-index: 1; min-height: 100dvh; padding: 70px 22px 35px; }
  .drpg-event-copy::before { display: none; }
  .drpg-event-choices { grid-template-columns: 1fr; }
  .drpg-shop-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
}

@media (max-width: 520px) {
  .menu-content { padding-inline: 18px; }
  .menu-content h1 { font-size: 51px; }
  .subtitle { letter-spacing: .22em; }

  .floor-mark > div { display: none; }
  .game-header { justify-content: space-between; }
  .game-tools { margin-left: auto; }
  .battlefield { bottom: 191px; }
  .enemy-zone { padding-inline: 3px; }
  .enemy { min-width: 154px; flex-basis: 154px; }
  .enemy-figure { height: 198px; }
  .creature-art { max-width: 158px; max-height: 202px; }
  .hand-panel { height: 175px; }
  .card { width: 106px; flex-basis: 106px; height: 151px; }
  .card-art { height: 67px; }
  .card-copy p { font-size: 7px; }
  .end-turn-compact { padding-inline: 10px; font-size: 0; }
  .end-turn-compact span { font-size: 16px; }

  .vn-header-actions button { padding-inline: 8px; font-size: 7px; }
  .vn-stage { bottom: 236px; }
  .vn-dialogue { min-height: 208px; }

  .modal { padding: 5px; }
  .modal-card { width: calc(100vw - 10px); max-height: calc(100dvh - 10px); padding: 24px 14px; }
  .codex-grid,
  .archive-grid,
  .inventory-grid,
  .roster-layout,
  .deck-editor,
  .status-hero-list { grid-template-columns: 1fr; }
  .lore-entry { grid-column: span 1; }
  .reward-options { justify-content: flex-start; overflow-x: auto; padding: 8px; }
  .reward-options .card { min-width: 180px; }
  .expedition-wallet { flex-wrap: wrap; }

  .drpg-sidebar { width: 132px; }
  .drpg-sidebar .minimap-heading span { display: none; }
  .drpg-objective { max-height: 72px; overflow: hidden; }
  .drpg-keys { gap: 4px; }
  .drpg-keys button { padding: 3px 5px; }
  .drpg-shop-grid { grid-template-columns: 1fr; }
}

@media (max-height: 700px) and (min-width: 781px) {
  .menu-content { padding-block: 22px; }
  .sigil { width: 46px; height: 46px; margin-bottom: 13px; }
  .menu-content h1 { font-size: clamp(60px, 7vw, 92px); }
  .menu-content blockquote { margin-bottom: 17px; }
  .menu-actions button { min-height: 41px; }

  .left-rail,
  .right-rail { bottom: 199px; }
  .battlefield { bottom: 203px; }
  .hand-panel { height: 182px; }
  .card { height: 162px; }
  .card-art { height: 74px; }
  .enemy-figure { height: min(35vh, 245px); }
  .creature-art { max-height: min(35vh, 250px); }
  .enemy.boss-enemy .enemy-figure { height: min(42vh, 300px); }
  .enemy.boss-enemy .creature-art { max-height: min(42vh, 305px); }

  .vn-stage { bottom: 190px; }
  .vn-dialogue { min-height: 148px; max-height: 225px; }
}

/* -------------------------------------------------------------------------- */
/* Acessibilidade e preferências do sistema                                    */
/* -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: rgba(244, 225, 181, .42);
    --v2-line: rgba(244, 225, 181, .46);
    --v2-line-strong: rgba(255, 226, 158, .9);
    --muted: #c5cbca;
    --v2-muted: #c5cbca;
  }
  .glass,
  .modal-card,
  .archive-card,
  .item-card { border-width: 2px; }
}

@media (forced-colors: active) {
  button,
  .glass,
  .card,
  .hero-card,
  .archive-card,
  .item-card,
  .dungeon-viewport { forced-color-adjust: auto; }
  .scene-bg,
  .vn-background,
  .drpg-backdrop { filter: none; }
}
