@import url("ui.css");

/* =========================================================
   Menus (portal)
   ========================================================= */
* {
  box-sizing: border-box;
}
html {
  color-scheme: dark;
}
body {
  margin: 0;
  min-height: 100svh;
  background: #0b1f1c;
  color: var(--cream);
  font: 17px/1.5 var(--font-text);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url(art/arena.webp) center/cover;
  filter: blur(3px) saturate(1.1);
  transform: scale(1.04);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 90% at 50% 20%, #0b221e55, #061412e6 75%),
    linear-gradient(180deg, #06141200 60%, #061412 100%);
}
body[data-page="inicio"]::before {
  background: url(art/capa.webp) center/cover;
  filter: none;
  transform: none;
}
body[data-page="inicio"]::after {
  background: linear-gradient(90deg, #04131099, transparent 55%);
}
a {
  color: inherit;
  text-decoration: none;
}
button,
select,
input {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 12px;
  color: var(--gold-1);
}
h2 {
  font-size: 24px;
}
p {
  margin: 0 0 12px;
}
small {
  color: var(--cream-dim);
}
.lead {
  text-align: center;
  color: var(--cream-dim);
  font-size: 18px;
}
#notice {
  min-height: 24px;
  margin-top: 18px;
  text-align: center;
  color: #ffd79a;
  font-weight: 700;
}

/* ---------- Abertura ---------- */
.landing {
  min-height: 100svh;
  width: min(560px, 92vw);
  margin-left: max(4vw, 24px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 18px;
  text-align: center;
}
.titlemark {
  width: min(520px, 90vw);
  filter: drop-shadow(0 10px 22px #000c);
  animation: rise 0.9s ease both;
}
.tagline {
  font: 800 clamp(22px, 2.4vw, 30px) / 1.2 var(--font-display);
  color: var(--cream);
  text-shadow: 0 2px 10px #000;
  margin: 0 0 10px;
}
.home-actions {
  display: grid;
  gap: 16px;
  width: min(380px, 100%);
}
.home-actions .gold.big {
  --h: 70px;
  font-size: 28px;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
}

/* ---------- Barra superior ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px clamp(16px, 4vw, 48px);
  background: linear-gradient(180deg, #2e1f12f2, #1c120af2);
  border-bottom: 2px solid var(--gold-3);
  box-shadow:
    0 1px 0 #000,
    0 6px 20px #0009;
  backdrop-filter: blur(6px);
}
.topbar::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 14px;
  height: 14px;
  transform: translateX(-50%) rotate(45deg);
  background: radial-gradient(circle at 35% 30%, #c9fbff, #39b6c8 45%, #0f5866);
  border: 2px solid var(--gold-2);
}
.brand img {
  display: block;
  height: 58px;
  filter: drop-shadow(0 3px 6px #000);
}
.tabs {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  color: var(--cream-dim);
  font: 700 16px var(--font-display);
  border: 1px solid transparent;
  transition:
    background 0.15s,
    color 0.15s;
}
.tab:hover {
  color: var(--gold-1);
  background: #ffffff0d;
}
.tab.on {
  color: var(--ink);
  background: linear-gradient(180deg, var(--gold-1), var(--gold-2) 45%, var(--gold-3));
  border-color: #6e4a1b;
  box-shadow:
    inset 0 1px 0 #fffbe6,
    0 2px 6px #0008;
}
.me {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 14px 4px 4px;
  border-radius: 999px;
  background: #0d211d;
  border: 1px solid #a88a52;
  font-weight: 700;
}
.me img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold-2);
}

/* ---------- Página ---------- */
.page {
  width: min(1180px, 94vw);
  margin: 0 auto;
  padding: 34px 0 60px;
}
.titlebar {
  text-align: center;
}

/* ---------- Menu principal ---------- */
.menu-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: center;
  min-height: 56vh;
}
.hero-fan {
  position: relative;
  height: 400px;
  align-self: center;
}
.hero-card {
  --rot: calc((var(--i) - 1.5) * 9deg);
  position: absolute;
  bottom: 10px;
  left: calc(50% - 95px + (var(--i) - 1.5) * 150px);
  width: 190px;
  margin: 0;
  aspect-ratio: 0.72;
  border-radius: 16px;
  overflow: hidden;
  --dy: 0px;
  transform: rotate(var(--rot)) translateY(var(--dy));
  transform-origin: 50% 120%;
  box-shadow:
    0 0 0 2px #1d1209,
    0 0 0 5px var(--gold-3),
    0 0 0 7px #1d1209,
    0 20px 40px #000c;
  transition: transform 0.25s ease;
}
.hero-card:first-child,
.hero-card:last-child {
  --dy: 28px;
}
.hero-card:hover {
  transform: rotate(var(--rot)) translateY(-18px) scale(1.04);
  z-index: 2;
}
.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-card figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 26px 8px 12px;
  text-align: center;
  font: 800 22px var(--font-display);
  color: var(--gold-1);
  text-shadow: 0 2px 4px #000;
  background: linear-gradient(transparent, #120a05e6 55%);
}
.menu-actions {
  display: grid;
  gap: 16px;
}
.menu-btn {
  --h: 86px;
  justify-content: flex-start;
  gap: 18px;
  padding: 0 22px 0 14px;
  text-align: left;
}
.mb-icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 12px;
  font-size: 30px;
  color: var(--gold-1);
  background: linear-gradient(160deg, #2a5f74, #123447);
  border: 2px solid #6e4a1b;
  box-shadow:
    inset 0 0 0 1px #8fd6ee55,
    0 2px 4px #0008;
}
.wood .mb-icon {
  background: linear-gradient(160deg, #3a6a3e, #1c3a20);
}
.mb-copy {
  display: grid;
  gap: 4px;
}
.mb-copy b {
  font-size: 26px;
}
.mb-copy small {
  font: 600 15px var(--font-text);
  color: inherit;
  opacity: 0.8;
  text-shadow: none;
}
.menu-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ---------- Baralhos ---------- */
.rivalpick {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  font-weight: 700;
}
.decks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 28px;
  margin-top: 10px;
}
.deckbox {
  --bio: var(--bio-rio);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 14px 18px;
  border: 0;
  border-radius: 16px;
  color: var(--cream);
  text-align: center;
  background:
    radial-gradient(100% 60% at 50% 25%, color-mix(in srgb, var(--bio) 55%, transparent), transparent 70%),
    linear-gradient(170deg, color-mix(in srgb, var(--bio) 40%, #2b1c10), #1a110a 80%);
  box-shadow:
    inset 0 0 0 2px #1d1209,
    inset 0 0 0 5px var(--gold-3),
    inset 0 0 0 7px #3a2412,
    0 16px 30px #000b;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.deckbox:hover {
  transform: translateY(-6px);
  box-shadow:
    inset 0 0 0 2px #1d1209,
    inset 0 0 0 5px var(--gold-2),
    inset 0 0 0 7px #3a2412,
    0 0 26px color-mix(in srgb, var(--bio) 60%, transparent),
    0 22px 36px #000c;
}
.db-art {
  width: 100%;
  aspect-ratio: 1.05;
  overflow: hidden;
  border-radius: 999px 999px 12px 12px;
  box-shadow:
    0 0 0 3px var(--gold-4),
    0 0 0 5px #1d1209;
}
.db-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.deckbox:hover .db-art img {
  transform: scale(1.06);
}
.db-name {
  margin-top: 10px;
  font: 800 24px/1.1 var(--font-display);
  color: var(--gold-1);
  text-shadow: 0 2px 0 #000;
}
.db-meta {
  font-size: 14px;
  color: var(--cream-dim);
}
.deckbox em {
  font-style: normal;
  font-size: 13px;
  color: #ffb39e;
}
.db-cta {
  margin-top: 8px;
  padding: 8px 18px;
  border-radius: 10px;
  color: var(--ink);
  font: 800 16px var(--font-display);
  background: linear-gradient(180deg, var(--gold-1), var(--gold-2) 45%, var(--gold-3));
  border: 1px solid #6e4a1b;
}
.deckbox.invalid {
  --bio: #a0402c;
}
.deckbox.invalid .db-cta {
  background: linear-gradient(180deg, #f6b7a0, #c0583c);
}
.deckbox.new {
  justify-content: center;
  min-height: 330px;
  --bio: #6b5a3a;
  border: 2px dashed #c99a4588;
}
.db-plus {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  font-size: 44px;
  color: var(--gold-1);
  background: #0006;
  border: 2px solid var(--gold-3);
}

/* ---------- Coleção e editor ---------- */
.filters {
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
}
.filters input {
  flex: 1;
  max-width: 360px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 30px 22px;
}
.tile {
  display: grid;
  gap: 12px;
  justify-items: center;
}
.tile-card {
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  transition: transform 0.18s ease;
}
.tile-card:hover {
  transform: translateY(-6px) scale(1.03);
}
.tile-card .cardx {
  width: 100%;
}
.tile.in-deck .cardx {
  box-shadow:
    0 0 0 2px #9fe8ffcc,
    0 0 14px #57e1f088,
    0 7px 13px #0c100fb8;
}
.add {
  --h: 38px;
  width: 100%;
  font-size: 15px;
  padding: 0 10px;
}
.add small {
  margin-left: 4px;
  opacity: 0.75;
  font-family: var(--font-text);
  color: inherit;
}
.editor {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 34px;
  align-items: start;
}
.deck-panel {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 130px);
  overflow: auto;
}
.deck-panel label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}
.count {
  margin: 8px 0 0;
  text-align: center;
}
.count.full {
  color: #9ff0b0;
}
.rule {
  margin: 0;
  font-size: 13px;
  color: var(--cream-dim);
}
.deckrow {
  --bio: var(--bio-rio);
  display: grid;
  grid-template-columns: 30px 1fr 30px 28px 30px;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--bio) 45%, #0b1a17), #0b1a17 70%);
  border: 1px solid #a88a5266;
}
.deckrow b {
  text-align: center;
  font-family: var(--font-display);
}
.mini-cost {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  font: 800 16px var(--font-display);
  font-style: normal;
  color: #fff;
  clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  background: linear-gradient(160deg, #4cc0f0, #1d6fa8 55%, #0d3e66);
}
.step {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--gold-3);
  background: linear-gradient(180deg, #5b4330, #3b2a1d);
  color: var(--gold-1);
  font-weight: 800;
}
.curve {
  margin: 8px 0;
}
.curve figcaption {
  font-weight: 700;
  margin-bottom: 6px;
}
.curve div {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 84px;
  padding: 0 6px;
  border-bottom: 1px solid #a88a5266;
}
.curve span {
  display: grid;
  justify-items: center;
  align-content: end;
  gap: 2px;
  width: 30px;
  font-size: 13px;
  color: var(--cream-dim);
}
.curve em {
  font-style: normal;
  font-size: 12px;
  color: var(--gold-1);
}
.curve i {
  width: 18px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #8fe3ff, #1d6fa8);
}

/* ---------- Perfil ---------- */
.profile-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
  align-items: start;
}
.identity {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}
.profile-portrait img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow:
    0 0 0 3px #1d1209,
    0 0 0 7px var(--gold-3),
    0 0 0 9px #1d1209,
    0 10px 30px #000c;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.stats div {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 14px;
  border-radius: 12px;
  background: #0a1c19;
  border: 1px solid #a88a5266;
  color: var(--cream-dim);
}
.stats .icon {
  font-size: 26px;
  color: var(--gold-2);
}
.stats strong {
  font: 800 32px var(--font-display);
  color: var(--gold-1);
}
.row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 8px;
  border-radius: 10px;
  background: #0a1c19;
  border-left: 4px solid #8a8a8a;
}
.row.won {
  border-left-color: #6fd38a;
}
.row.lost {
  border-left-color: #d66a5a;
}
.row span {
  color: var(--cream-dim);
  font-size: 14px;
}
.textlink {
  display: inline-block;
  margin-top: 6px;
  color: var(--gold-2);
  font-weight: 700;
}

/* ---------- Formulários ---------- */
.form {
  display: grid;
  gap: 14px;
  width: min(560px, 100%);
  margin: 0 auto;
}
.form label {
  font-weight: 700;
}
.form label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: 10px;
}
input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--gold-3);
}
input[type="range"] {
  width: 100%;
  accent-color: var(--gold-3);
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
legend {
  font-weight: 700;
  margin-bottom: 10px;
}
.avatars {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.avatars label input {
  position: absolute;
  opacity: 0;
}
.avatars img {
  width: 76px;
  height: 76px;
  border-radius: 14px;
  object-fit: cover;
  cursor: pointer;
  box-shadow:
    0 0 0 2px #1d1209,
    0 0 0 4px #8a6a3a;
  transition: transform 0.15s;
}
.avatars input:checked + img {
  transform: scale(1.08);
  box-shadow:
    0 0 0 2px #1d1209,
    0 0 0 5px var(--gold-1),
    0 0 18px #ffd36b;
}
.avatars input:focus-visible + img {
  outline: 3px solid #9fe8ff;
  outline-offset: 4px;
}
.reading {
  width: min(820px, 100%);
  margin: 0 auto;
}
.reading h2 {
  margin-top: 18px;
}
.roomcode {
  display: block;
  text-align: center;
  font: 800 52px var(--font-display);
  letter-spacing: 0.2em;
  color: var(--gold-1);
  text-shadow: 0 0 20px #ffd36b66;
}
.kw {
  font-size: 14px;
  color: var(--cream-dim);
  margin: 6px 0;
}

/* ---------- Detalhe da carta ---------- */
dialog {
  width: min(680px, 94vw);
  color: var(--cream);
  padding: 30px;
  border-radius: var(--radius);
  background:
    radial-gradient(120% 80% at 50% 0%, #2a5a50 0%, transparent 60%),
    linear-gradient(180deg, var(--jade-1), var(--jade-3));
  border: 2px solid var(--gold-3);
  box-shadow:
    inset 0 0 0 3px #e8cf8f40,
    0 0 0 5px var(--wood-2),
    var(--shadow-lg);
}
dialog::backdrop {
  background: #030b0acc;
  backdrop-filter: blur(3px);
}
.dismiss {
  float: right;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--gold-3);
  background: #0a1c19;
  color: var(--gold-1);
  font-size: 20px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 30px;
  align-items: center;
}
.detail-grid > .cardx {
  width: 100%;
}
.detail-copy h2 {
  font-size: 32px;
}
.detail-copy > p:first-of-type {
  font-size: 18px;
}

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
  .menu-layout,
  .editor,
  .profile-layout {
    grid-template-columns: 1fr;
  }
  .hero-fan {
    height: 300px;
  }
  .hero-card {
    width: 140px;
    left: calc(50% - 70px + (var(--i) - 1.5) * 90px);
  }
  .deck-panel {
    position: static;
    max-height: none;
  }
}
@media (max-width: 700px) {
  .topbar {
    flex-wrap: wrap;
    gap: 10px;
    padding: 8px 12px;
  }
  .brand img {
    height: 42px;
  }
  .me span {
    display: none;
  }
  .me {
    margin-left: auto;
  }
  .hero-fan {
    height: 240px;
  }
  .hero-card {
    width: 118px;
    left: calc(50% - 59px + (var(--i) - 1.5) * 64px);
  }
  .hero-card figcaption {
    font-size: 16px;
  }
  .tabs {
    order: 3;
    width: 100%;
    justify-content: space-between;
    margin: 0;
  }
  .tab {
    flex-direction: column;
    gap: 2px;
    padding: 6px 8px;
    font-size: 12px;
  }
  .tab .icon {
    font-size: 20px;
  }
  .plaque {
    padding: 8px 32px 10px;
  }
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 22px 14px;
  }
  .detail-grid {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .detail-grid > .cardx {
    width: 220px;
  }
  .stats {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .menu-btn {
    --h: 74px;
  }
  .mb-copy b {
    font-size: 21px;
  }
  .landing {
    margin: 0 auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Treino: dificuldade ---------- */
.rivalpick {
  flex-wrap: wrap;
  gap: 18px;
}
.rivalpick label {
  display: flex;
  align-items: center;
  gap: 10px;
}
.levels {
  display: inline-flex;
  padding: 4px;
  border-radius: 12px;
  background: #0a1c19;
  border: 1px solid #a88a5266;
}
.lvl {
  padding: 8px 16px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--cream-dim);
  font: 700 15px var(--font-display);
}
.lvl.on {
  color: var(--ink);
  background: linear-gradient(180deg, var(--gold-1), var(--gold-2) 45%, var(--gold-3));
}

/* ---------- Jogar online ---------- */
.online .gold.big {
  width: 100%;
}
.or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0;
  color: var(--cream-dim);
  font-size: 14px;
}
.or::before,
.or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #a88a5266;
}
.searching {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 18px 0 4px;
  text-align: center;
}
.searching b {
  font: 800 22px var(--font-display);
  color: var(--gold-1);
}
.spinner {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 4px solid #a88a5244;
  border-top-color: var(--gold-2);
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.settings h2 {
  margin: 10px 0 0;
  font-size: 20px;
  border-bottom: 1px solid #a88a5244;
  padding-bottom: 4px;
}
body:not([data-page="inicio"])::before {
  background-image: var(--menu-bg, url(art/arena.webp));
}

/* =========================================================
   Tema da clareira: madeira, papel, palha trançada e latão.
   Texturas em art/tex-*.webp (geradas para o jogo).
   ========================================================= */
:root {
  --tex-wood: url(art/tex-madeira.webp);
  --tex-paper: url(art/tex-papel.webp);
  --tex-straw: url(art/tex-palha.webp);
  --ink-2: #5e4528;
  --ink-soft: #7a6242;
  --ink-green: #2f6224;
  --ink-red: #94301f;
  --nails:
    radial-gradient(circle at 7px 7px, #f6dc98 0 2.4px, #5f3f16 2.9px 3.8px, transparent 4.3px),
    radial-gradient(circle at calc(100% - 7px) 7px, #f6dc98 0 2.4px, #5f3f16 2.9px 3.8px, transparent 4.3px),
    radial-gradient(circle at 7px calc(100% - 7px), #f6dc98 0 2.4px, #5f3f16 2.9px 3.8px, transparent 4.3px),
    radial-gradient(circle at calc(100% - 7px) calc(100% - 7px), #f6dc98 0 2.4px, #5f3f16 2.9px 3.8px, transparent 4.3px);
}
#fx {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
body::after {
  background:
    radial-gradient(90% 70% at 50% 35%, #1a120a33, #0a0704dd 80%),
    linear-gradient(180deg, #0a070400 55%, #0a0704 100%);
}

/* ---------- Barra do topo: viga de madeira com faixa de palha ---------- */
.topbar {
  padding-bottom: 12px;
  background:
    linear-gradient(180deg, #ffffff0d, transparent 30%, #00000059),
    var(--tex-wood) 0 -6px / 820px auto;
  border-bottom: 0;
  box-shadow: 0 10px 24px #000b;
  backdrop-filter: none;
}
.topbar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -11px;
  height: 11px;
  background:
    linear-gradient(180deg, #00000040, #00000080),
    var(--tex-straw) 0 0 / 44px 44px;
  border-top: 1px solid #120a04;
  border-bottom: 2px solid #8a5d22;
  box-shadow: 0 5px 10px #0009;
}
.topbar::after {
  display: none;
}
.tab {
  color: #e7d3a6;
  text-shadow: 0 -1px 0 #000, 0 1px 0 #ffffff12;
  border-radius: 5px;
}
.tab:hover {
  background: #00000033;
  color: var(--gold-1);
}
.tab.on {
  color: var(--ink);
  text-shadow: 0 1px 0 #fff4cc;
  background:
    radial-gradient(circle at 9px 50%, #fff7d8 0 1.6px, #6b4a1c 2px 2.8px, transparent 3.2px),
    radial-gradient(circle at calc(100% - 9px) 50%, #fff7d8 0 1.6px, #6b4a1c 2px 2.8px, transparent 3.2px),
    linear-gradient(180deg, #fbe7ad, #e2bd6a 45%, #b98a3e);
  padding-inline: 22px;
  border: 1px solid #4a3010;
  box-shadow:
    inset 0 1px 0 #fffbe6,
    inset 0 -2px 0 #8a5d22,
    0 3px 6px #000a;
}
.me {
  background: #00000055;
  border-color: #c99a4566;
  box-shadow: inset 0 1px 3px #000a;
}

/* ---------- Placa de título pendurada por cordas ---------- */
.titlebar {
  padding-top: 18px;
}
.plaque {
  padding: 12px 64px 14px;
  border-radius: 6px;
  border: 2px solid #120a04;
  background:
    radial-gradient(circle at 20px 50%, #f6dc98 0 3px, #5f3f16 3.6px 4.6px, transparent 5.2px),
    radial-gradient(circle at calc(100% - 20px) 50%, #f6dc98 0 3px, #5f3f16 3.6px 4.6px, transparent 5.2px),
    linear-gradient(180deg, #ffffff12, transparent 40%, #0000004d),
    var(--tex-wood) center / 640px auto;
  box-shadow:
    inset 0 0 0 2px #8a5d22,
    inset 0 0 0 3px #120a04,
    inset 0 6px 14px #00000066,
    0 12px 26px #000c;
  text-shadow:
    0 2px 0 #1a0f06,
    0 0 14px #000;
}
.plaque::before,
.plaque::after {
  top: -46px;
  width: 5px;
  height: 48px;
  transform: none;
  border: 0;
  border-radius: 3px;
  background: repeating-linear-gradient(160deg, #d8b47a 0 3px, #8a6434 3px 6px);
  box-shadow: 0 2px 3px #0008;
}
.plaque::before {
  left: 28px;
}
.plaque::after {
  right: 28px;
}
.lead {
  color: #efe2c2;
  text-shadow: 0 2px 6px #000;
}

/* ---------- Painéis: papel pregado numa moldura de madeira ---------- */
.panel,
dialog {
  color: var(--ink);
  border: 12px solid transparent;
  border-radius: 8px;
  background:
    radial-gradient(140% 110% at 50% 40%, transparent 58%, #8a5d2a66 100%) padding-box,
    var(--tex-paper) 0 0 / 380px padding-box,
    var(--nails) border-box,
    linear-gradient(180deg, #ffffff10, #0000004d) border-box,
    var(--tex-wood) center / 760px auto border-box;
  box-shadow:
    inset 0 0 0 1px #5a3a1a80,
    inset 0 0 22px #6b4a2466,
    0 0 0 1px #120a04,
    0 16px 36px #000c;
  color-scheme: light;
}
.panel::before {
  display: none;
}
.panel h2,
dialog h2 {
  color: #4a2c10;
  text-shadow: 0 1px 0 #fff8e080;
}
.panel p,
.panel label,
.panel legend,
dialog p {
  color: var(--ink);
}
.panel small,
.panel .rule,
dialog small,
.kw {
  color: var(--ink-soft);
}
.panel input:not([type="checkbox"]):not([type="range"]):not([type="radio"]),
.panel select,
.rivalpick select {
  color: var(--ink);
  background: #fbf3df;
  border: 1px solid #a8865a;
  border-radius: 6px;
  box-shadow: inset 0 2px 4px #6b4a2433;
}
.panel input::placeholder {
  color: #9c8664;
}
.panel input[type="checkbox"],
.panel input[type="range"] {
  accent-color: #8a5d22;
}
.or {
  color: var(--ink-soft);
}
.or::before,
.or::after {
  background: #a8865a;
}
.dismiss {
  background: #fbf3df;
  color: var(--ink);
  border-color: #8a6a3a;
}
.detail-copy b {
  color: #4a2c10;
}

/* ---------- Perfil: tokens e caderno de partidas ---------- */
.profile-portrait img {
  border-color: var(--gold-3);
  box-shadow: 0 0 0 3px #4a3010, 0 8px 18px #6b4a2466;
}
.stats div {
  color: var(--ink-2);
  background: radial-gradient(circle at 40% 25%, #fffaf0, #eadbb6 70%);
  border: 1px solid #b89566;
  box-shadow: inset 0 -3px 0 #d6c092, 0 3px 8px #6b4a2433;
}
.stats strong {
  color: #4a2c10;
}
.stats .icon {
  color: #8a5d22;
}
.row {
  background: transparent;
  border: 0;
  border-bottom: 1px dashed #b39a70;
  border-left: 4px solid var(--ink-soft);
  border-radius: 0;
}
.row b {
  color: var(--ink);
}
.row span {
  color: var(--ink-soft);
}
.row.won {
  border-left-color: var(--ink-green);
}
.row.won b {
  color: var(--ink-green);
}
.row.lost {
  border-left-color: var(--ink-red);
}
.row.lost b {
  color: var(--ink-red);
}
.textlink {
  color: #7a4a14;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Baralhos: pilhas de cartas de verdade ---------- */
.decks {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 40px 34px;
  margin-top: 26px;
}
.deckbox,
.deckbox:hover {
  padding: 0;
  gap: 12px;
  background: none;
  box-shadow: none;
  border: 0;
  border-radius: 0;
  transform: none;
}
.db-stack {
  position: relative;
  width: min(100%, 190px);
  aspect-ratio: 0.73;
}
.db-stack i {
  position: absolute;
  inset: 0;
  border-radius: 1.6cqw;
  background:
    url(art/frame.webp) center / 100% 100%,
    radial-gradient(circle at 50% 50%, transparent 18%, #0000 19%),
    repeating-linear-gradient(45deg, #ffffff08 0 6px, transparent 6px 12px),
    radial-gradient(circle at 50% 45%, #2f5e4c, #0e2a22 75%);
  box-shadow: 0 6px 14px #000a;
  transition: transform 0.25s ease;
}
.db-stack i:first-child {
  transform: rotate(-6deg) translate(-10px, 6px);
}
.db-stack i:nth-child(2) {
  transform: rotate(4deg) translate(9px, 3px);
}
.db-face {
  position: absolute;
  inset: 0;
  container-type: inline-size;
  border-radius: 1.6cqw;
  background: #2b261a;
  box-shadow: 0 14px 26px #000c;
  transition: transform 0.25s ease;
}
.db-face img {
  position: absolute;
  inset: 3%;
  width: 94%;
  height: 94%;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 3%;
}
.db-frame {
  position: absolute;
  inset: 0;
  background: url(art/frame.webp) center / 100% 100%;
}
.deckbox:hover .db-face {
  transform: translateY(-10px) rotate(-1.5deg);
}
.deckbox:hover .db-stack i:first-child {
  transform: rotate(-12deg) translate(-22px, 8px);
}
.deckbox:hover .db-stack i:nth-child(2) {
  transform: rotate(9deg) translate(20px, 4px);
}
.db-plate {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 9px 14px 10px;
  border-radius: 6px;
  background:
    radial-gradient(circle at 10px 50%, #f6dc98 0 2.4px, #5f3f16 2.9px 3.8px, transparent 4.3px),
    radial-gradient(circle at calc(100% - 10px) 50%, #f6dc98 0 2.4px, #5f3f16 2.9px 3.8px, transparent 4.3px),
    linear-gradient(180deg, #ffffff10, #00000040),
    var(--tex-wood) center / 520px auto;
  box-shadow:
    inset 0 0 0 1px #8a5d22,
    inset 0 0 0 2px #120a04,
    0 8px 16px #000a;
}
.db-name {
  margin: 0;
  font-size: 20px;
}
.db-meta {
  font-size: 13px;
}
.db-cta {
  margin-top: 0;
  padding: 9px 20px;
  border-radius: 7px;
  font-size: 15px;
  box-shadow:
    inset 0 1px 0 #fffbe6,
    inset 0 -2px 0 #9a6a26,
    0 3px 0 #3b260f,
    0 6px 12px #0009;
}
.deckbox:hover .db-cta {
  filter: brightness(1.08);
}
.deckbox.invalid .db-face img {
  filter: grayscale(0.6) brightness(0.7);
}
.deckbox.new,
.deckbox.new:hover {
  min-height: 0;
  border: 0;
  justify-content: flex-start;
}
.deckbox.new .db-face {
  display: grid;
  place-items: center;
  background: #00000059;
  border: 2px dashed #c99a4599;
  box-shadow: none;
}
.deckbox.new .db-frame {
  display: none;
}
.db-plus {
  width: 34cqw;
  height: 34cqw;
  font-size: 18cqw;
}
.deckbox.new .db-cta {
  color: var(--cream);
  background: linear-gradient(180deg, #7a5532, #4a321e);
  border-color: #c99a45;
}

/* ---------- Treino: escolha do rival e dificuldade ---------- */
.rivalpick {
  width: fit-content;
  margin: 0 auto 6px;
  padding: 10px 18px;
  gap: 18px;
  border-radius: 8px;
  color: var(--ink);
  background:
    radial-gradient(140% 120% at 50% 40%, transparent 55%, #8a5d2a55 100%),
    var(--tex-paper) 0 0 / 380px;
  box-shadow: inset 0 0 0 1px #8a6a3a, 0 8px 18px #000a;
}
.rivalpick label {
  color: var(--ink);
  font-weight: 700;
}
.levels {
  background: none;
  border: 0;
  gap: 4px;
}
.lvl,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #a8865a;
  color: var(--ink-2);
  background: #fbf3df;
  font: 700 15px var(--font-display);
  box-shadow: inset 0 -2px 0 #e4d3ad;
}
.lvl:hover,
.chip:hover {
  border-color: #6b4a1c;
}
.lvl.on,
.chip.on {
  color: var(--gold-1);
  border-color: #2a1a0b;
  text-shadow: 0 1px 0 #000;
  background:
    linear-gradient(180deg, #ffffff14, #00000040),
    var(--tex-wood) center / 400px auto;
  box-shadow: inset 0 0 0 1px #8a5d22, 0 2px 4px #6b4a2455;
}

/* ---------- Coleção e editor: cartas sobre a mesa de madeira ---------- */
.filters {
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  padding: 10px 16px;
  border-radius: 8px;
  background:
    radial-gradient(140% 120% at 50% 40%, transparent 55%, #8a5d2a55 100%),
    var(--tex-paper) 0 0 / 380px;
  box-shadow: inset 0 0 0 1px #8a6a3a, 0 8px 18px #000a;
  color-scheme: light;
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  flex: 1 1 200px;
  max-width: 280px;
}
.filters .search input {
  flex: 1;
  min-height: 36px;
  padding: 4px 2px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid #a8865a;
  border-radius: 0;
  box-shadow: none;
}
.filters .search input::placeholder {
  color: #9c8664;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.chip {
  padding: 5px 12px;
  font-size: 14px;
}
.chip-sep {
  width: 1px;
  height: 22px;
  margin: 0 4px;
  background: #a8865a;
}
.cx-seal.mini {
  position: relative;
  top: auto;
  left: auto;
  width: 22px;
  translate: none;
  flex: none;
  box-shadow: 0 1px 2px #000a, inset 0 0 0 1px #3a2810;
}
.cx-seal.mini::before {
  box-shadow: inset 0 1px 2px #000b, 0 0 0 1px #2b1d0c;
}
.cx-seal.mini svg {
  filter: drop-shadow(0 0.5px 0 #0009);
}
.page-colecao .grid,
.editor .grid {
  padding: 30px 26px 34px;
  border-radius: 10px;
  background:
    radial-gradient(120% 90% at 50% 30%, #ffffff0d, transparent 60%),
    linear-gradient(180deg, #00000026, #00000066),
    var(--tex-wood) 0 0 / 900px auto;
  box-shadow:
    inset 0 0 0 2px #120a04,
    inset 0 0 0 4px #8a5d2266,
    inset 0 14px 34px #000000a0,
    0 14px 30px #000b;
}
.page-colecao .filters,
.editor .filters {
  margin-bottom: 16px;
}

/* ---------- Editor: lista do baralho em papel ---------- */
.deck-panel {
  padding: 22px 20px;
}
.count {
  color: #4a2c10;
}
.count.full {
  color: var(--ink-green);
}
.deckrow {
  gap: 8px;
  padding: 6px 2px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #cdb487;
  border-radius: 0;
  color: var(--ink);
}
.deckrow span:not(.cx-seal) {
  color: var(--ink);
  font-weight: 600;
}
.deckrow b {
  color: #4a2c10;
}
.mini-cost {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 0;
  color: #fff;
  font: 800 14px/1 var(--font-display);
  font-style: normal;
  text-shadow: 0 1px 0 #000a;
  background: var(--gem-mana) center / 100% 100% no-repeat;
  box-shadow: none;
}
.step {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: var(--ink);
  border: 1px solid #6b4a1c;
  background: radial-gradient(circle at 40% 30%, #fff1c4, #d9b066 60%, #a77a30);
  box-shadow: 0 1px 2px #6b4a2466;
}
.curve figcaption,
.curve span,
.curve em {
  color: var(--ink-2);
}
.curve i {
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #7cc8f2, #1f64a6 70%, #123f74);
  box-shadow: inset 0 0 0 1px #0d2f5e;
}
.deckrow {
  grid-template-columns: 28px 22px 1fr 26px 22px 26px;
}
.deckrow .step {
  padding: 0;
  display: grid;
  place-items: center;
  font: 800 16px/1 var(--font-display);
}
@media (max-width: 600px) {
  .decks {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 16px;
  }
  .db-name {
    font-size: 16px;
  }
  .db-cta {
    padding: 8px 12px;
    font-size: 13px;
  }
}

/* =========================================================
   Menu principal: guardião em destaque e botões limpos
   ========================================================= */
.menu-layout {
  grid-template-columns: 1.25fr 1fr;
  gap: 56px;
  min-height: 62vh;
}
.hero-show {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 18px;
  min-height: 470px;
}
.hs-stage {
  position: relative;
}
.hs-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0s 0.7s;
}
.hs-slide.on {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.7s ease;
}
.hs-art {
  position: relative;
  height: 100%;
  min-height: 400px;
}
.hs-art::before {
  content: "";
  position: absolute;
  inset: 8% 4%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--seal-hi, #ffd77a) 0%, transparent 65%);
  opacity: 0.35;
  filter: blur(30px);
}
.hs-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  -webkit-mask-image: radial-gradient(ellipse 62% 60% at 50% 46%, #000 52%, transparent 100%);
  mask-image: radial-gradient(ellipse 62% 60% at 50% 46%, #000 52%, transparent 100%);
  transform: scale(1.04);
}
.hs-slide.on .hs-art img {
  animation: hsDrift 7s ease-out both;
}
@keyframes hsDrift {
  from { transform: scale(1.12) translateY(8px); }
  to { transform: scale(1.04); }
}
.hs-copy {
  display: grid;
  gap: 10px;
  padding-left: 6px;
}
.hs-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 700 13px var(--font-text);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #d9c49a;
}
.hs-kicker .cx-seal {
  position: relative;
  top: auto;
  left: auto;
  translate: none;
  width: 30px;
  box-shadow: 0 2px 4px #000a, inset 0 0 0 1px #3a2810;
}
.hs-kicker .cx-seal::before {
  box-shadow: inset 0 1px 3px #000b, 0 0 0 1px #2b1d0c;
}
.hs-kicker .cx-seal svg {
  filter: drop-shadow(0 1px 0 #0009);
}
.hs-name {
  margin: 0;
  font: 800 clamp(48px, 5.4vw, 76px) / 0.95 var(--font-display);
  background: linear-gradient(180deg, #fff6d0, #f6d27a 45%, #b9802a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 #1a0f06) drop-shadow(0 0 18px #0009);
}
.hs-power {
  margin: 0;
  max-width: 300px;
  color: #e9dcbc;
  font-size: 16px;
  line-height: 1.45;
  text-shadow: 0 1px 3px #000;
}
.hs-power b {
  display: block;
  font: 800 19px var(--font-display);
  color: color-mix(in srgb, var(--seal-hi, #fff) 55%, #fff);
}
.hs-pick {
  display: flex;
  justify-content: center;
  gap: 14px;
}
.hs-thumb {
  position: relative;
  width: 58px;
  height: 58px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid #8a6a3a;
  background: #1a120a;
  overflow: hidden;
  opacity: 0.6;
  filter: grayscale(0.5);
  box-shadow: 0 4px 10px #000a;
  transition: opacity 0.2s, filter 0.2s, transform 0.2s, border-color 0.2s;
}
.hs-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}
.hs-thumb:hover {
  opacity: 0.9;
  filter: none;
}
.hs-thumb.on {
  opacity: 1;
  filter: none;
  transform: scale(1.12);
  border-color: var(--gold-2);
  box-shadow: 0 0 0 3px #1a0f06, 0 0 18px #ffd77a66, 0 4px 10px #000a;
}

/* Botões: grandes, limpos, madeira e ouro */
.menu-actions {
  gap: 14px;
}
.menu-btn {
  --h: 84px;
  overflow: hidden;
  gap: 18px;
  padding: 0 26px 0 14px;
  border-radius: 10px;
}
.menu-btn.wood,
.menu-row .wood {
  background:
    linear-gradient(180deg, #ffffff14, transparent 40%, #00000059),
    var(--tex-wood) center / 700px auto;
}
.menu-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, #ffffff40 50%, transparent 65%);
  transform: translateX(-110%);
  pointer-events: none;
}
.menu-btn:hover::after {
  transform: translateX(110%);
  transition: transform 0.6s ease;
}
.mb-icon,
.wood .mb-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 0;
  color: #3a2410;
  font-size: 26px;
  background: radial-gradient(circle at 38% 30%, #fff3c8, #e2bd6a 45%, #9a6a26 90%);
  box-shadow:
    inset 0 0 0 2px #6b4a1c,
    inset 0 -3px 6px #6b4a1c88,
    0 2px 5px #0009;
}
.gold .mb-icon {
  color: var(--gold-1);
  background: radial-gradient(circle at 38% 30%, #6a4a2a, #3a2414 70%);
  box-shadow:
    inset 0 0 0 2px #6e4a1b,
    inset 0 2px 6px #0009,
    0 1px 0 #fff6d6;
}
.mb-copy b {
  font-size: 27px;
}
.menu-btn.wood .mb-copy b {
  color: var(--gold-1);
}
.menu-btn.wood .mb-copy small {
  color: #e2cfa6;
}
.menu-row .wood {
  --h: 50px;
  border-radius: 10px;
}
@media (max-width: 900px) {
  .hero-show {
    min-height: 0;
  }
  .hs-stage {
    height: 360px;
  }
  .hs-slide {
    grid-template-columns: 1fr;
  }
  .hs-art {
    min-height: 0;
  }
  .hs-copy {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    text-align: center;
    justify-items: center;
  }
}
.hs-slide {
  grid-template-columns: 1.15fr 1fr;
}
.hs-art img {
  inset: -4% -12% -2%;
  width: 124%;
  height: 106%;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 46%, #000 42%, transparent 98%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 46%, #000 42%, transparent 98%);
}
.ladder {
  display: grid;
  gap: 6px;
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 6px;
  background: #fff8e566;
  box-shadow: inset 0 0 0 1px #b89566;
}
.ladder b {
  font: 800 16px var(--font-display);
  color: #4a2c10;
}
.ladder small {
  color: var(--ink-soft);
}
.rung {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--ink);
}
.rung i {
  display: grid;
  place-items: center;
  min-width: 28px;
  padding: 2px 6px;
  border-radius: 999px;
  font: 800 12px/1 var(--font-display);
  font-style: normal;
  background: linear-gradient(180deg, #f4f7fa, #a9b4c0);
  box-shadow: 0 0 0 1px #2a2e34;
}
.rung.lv-3 i {
  background: linear-gradient(180deg, #fff3c8, #d6a54a);
  box-shadow: 0 0 0 1px #4a3010;
}
.rung em {
  font-style: normal;
  font-weight: 500;
  color: var(--ink-soft);
}

.rung img {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 0 0 2px #d6a54a, 0 2px 6px #6b4a2466;
}

/* ---------- Abertura (vídeo + carregamento) ---------- */
body.intro-on {
  overflow: hidden;
}
#intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000;
  cursor: pointer;
  transition: opacity 0.7s ease;
}
#intro.out {
  opacity: 0;
  pointer-events: none;
}
#intro video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.intro-ui {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(20px, 4vw, 56px) clamp(18px, 3vh, 34px);
  background: linear-gradient(transparent, #000a);
  padding-top: 80px;
  animation: introUi 0.8s 0.8s both;
}
@keyframes introUi {
  from { opacity: 0; }
}
.intro-load {
  display: grid;
  gap: 8px;
  width: min(320px, 40vw);
  font: 600 14px var(--font-text);
  color: #e9dcbc;
  text-shadow: 0 1px 3px #000;
}
.intro-load b {
  color: var(--gold-1);
}
.intro-load i {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: #ffffff26;
  overflow: hidden;
}
.intro-load em {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #c99a45, #fff0bf);
  box-shadow: 0 0 10px #ffd77a;
  transition: width 0.3s ease;
}
#intro.ready .intro-load span {
  color: #bfe8a8;
}
.intro-skip {
  display: flex;
  align-items: center;
  gap: 16px;
  font: 600 15px var(--font-text);
  color: #e9dcbc;
  text-shadow: 0 1px 3px #000;
}
.intro-skip kbd {
  padding: 3px 10px;
  border-radius: 5px;
  font: 700 13px var(--font-text);
  color: var(--ink);
  background: linear-gradient(180deg, #fbe7ad, #c99a45);
  box-shadow: 0 2px 0 #6b4a1c;
}
.intro-btn,
.intro-sound {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 8px;
  color: var(--gold-1);
  font: 700 15px var(--font-display);
  background: #00000080;
  border: 1px solid #c99a4588;
  cursor: pointer;
}
.intro-btn:hover,
.intro-sound:hover {
  background: #000000b0;
  border-color: var(--gold-2);
}
.intro-sound {
  position: absolute;
  left: 50%;
  bottom: clamp(18px, 3vh, 34px);
  translate: -50% 0;
}
.intro-sound[hidden] {
  display: none;
}

/* ---------- Botão de som da música ---------- */
.mute {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 50%;
  color: var(--gold-1);
  font-size: 20px;
  background: #00000055;
  border: 1px solid #c99a4588;
  box-shadow: inset 0 1px 3px #000a;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.mute:hover {
  background: #0000008a;
  border-color: var(--gold-2);
}
.mute.off {
  color: #9c8f7a;
}
.mute.floating {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 30;
}

/* =========================================================
   Progressão: nível, trilha, domínio e desafios
   ========================================================= */
.me {
  position: relative;
  padding-right: 34px;
}
.me span {
  display: grid;
  line-height: 1.1;
}
.me small {
  font: 600 11px var(--font-text);
  color: #d9c08a;
}
.lvbadge {
  position: absolute;
  right: 4px;
  top: 50%;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  font: 800 13px/1 var(--font-display);
  font-style: normal;
  color: #2a1606;
  background: radial-gradient(circle at 40% 35%, #fff4c4, #f0c55a 45%, #a86f1e);
  clip-path: polygon(50% 0, 100% 38%, 82% 100%, 18% 100%, 0 38%);
}
.lvstrip {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 10px;
  border-radius: 10px;
  text-align: left;
  background:
    linear-gradient(180deg, #ffffff10, #00000066),
    var(--tex-wood) center / 600px auto;
  box-shadow: inset 0 0 0 1px #c99a4599, inset 0 0 0 2px #120a04, 0 8px 18px #000a;
}
.lvgem {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  font: 800 22px/1 var(--font-display);
  color: #2a1606;
  background: radial-gradient(circle at 40% 35%, #fff4c4, #f0c55a 45%, #a86f1e);
  clip-path: polygon(50% 0, 100% 38%, 82% 100%, 18% 100%, 0 38%);
  filter: drop-shadow(0 2px 0 #000);
}
.lvstrip.big .lvgem {
  width: 72px;
  height: 72px;
  font-size: 32px;
}
.lvbody b {
  font: 800 18px var(--font-display);
  color: var(--gold-1);
  text-shadow: 0 2px 0 #000;
}
.lvstrip.big .lvbody b {
  font-size: 26px;
}
.lvbody small {
  font: 600 12px var(--font-text);
  color: #e3d5b2;
}
.lvbar {
  height: 10px;
  margin: 5px 0 4px;
  border-radius: 6px;
  background: #120a04;
  box-shadow: inset 0 0 0 1px #c99a4566, inset 0 2px 4px #000;
  overflow: hidden;
}
.lvbar i {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(180deg, #fff1b8, #f0c55a 45%, #b4781f);
  box-shadow: 0 0 10px #ffd77a88;
}
.page-trilha .lvstrip.big {
  max-width: 620px;
  margin: 0 auto 22px;
}
.menu-prog {
  display: block;
  transition: transform 0.2s;
}
.menu-prog:hover {
  transform: translateY(-2px);
}
.profile-layout .identity .lvstrip {
  width: 100%;
  margin: 6px 0 4px;
}
.ptitle {
  margin: -6px 0 4px;
  font: italic 600 15px var(--font-text);
  color: var(--ink-soft) !important;
}

/* Desafios */
.chpanel header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.chpanel h2 {
  margin: 0;
}
.chpanel ul {
  margin: 10px 0 4px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.ch {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #fbf3df;
  box-shadow: inset 0 0 0 1px #c9a97a;
  font: 600 15px/1.3 var(--font-text);
  color: var(--ink);
}
.ch b {
  font: 800 14px var(--font-display);
  color: #6a4210;
  white-space: nowrap;
}
.ch-check {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #a8865a;
  font: 800 14px var(--font-text);
  color: #fff;
}
.ch.done {
  background: #e6efd5;
  box-shadow: inset 0 0 0 1px #7fa05a;
}
.ch.done .ch-check {
  border-color: #4f7a2a;
  background: #4f7a2a;
}
.ch.done .ch-text {
  color: #4b5a3a;
  text-decoration: line-through;
  text-decoration-color: #4f7a2a88;
}
.ch.done b {
  color: #4f7a2a;
}
.ch-meter {
  display: block;
  height: 6px;
  margin: 5px 0 2px;
  border-radius: 4px;
  background: #e3d2ad;
  overflow: hidden;
}
.ch-meter i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #b4781f, #f0c55a);
}
.ch small {
  font: 600 12px var(--font-text);
}
.page-desafios .chpanel {
  max-width: 760px;
  margin: 0 auto 18px;
}
.page-desafios > .rule {
  max-width: 760px;
  margin: 0 auto;
  color: #e3d5b2;
  text-align: center;
}
.menu-actions .chpanel {
  padding: 4px 6px;
}
.menu-actions .chpanel h2 {
  font-size: 20px;
}
.menu-actions .ch {
  font-size: 14px;
  padding: 6px 8px;
}

/* Trilha */
.page-trilha .panel {
  margin-bottom: 22px;
}
.trail {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.stop {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 12px 8px 10px;
  border-radius: 8px;
  text-align: center;
  background: #efe3c6;
  box-shadow: inset 0 0 0 1px #c9a97a;
  opacity: 0.75;
}
.stop.got {
  opacity: 1;
  background: #fbf3df;
  box-shadow: inset 0 0 0 2px #c99a45, 0 0 14px #ffd77a55;
}
.stop.next {
  opacity: 1;
  box-shadow: inset 0 0 0 2px #6a8a3a;
}
.stop-lv {
  position: absolute;
  top: -10px;
  left: -8px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  font: 800 15px/1 var(--font-display);
  color: #2a1606;
  background: radial-gradient(circle at 40% 35%, #fff4c4, #f0c55a 45%, #a86f1e);
  clip-path: polygon(50% 0, 100% 38%, 82% 100%, 18% 100%, 0 38%);
}
.stop:not(.got) .stop-lv {
  background: radial-gradient(circle at 40% 35%, #e8e2d4, #a9a08c 50%, #5e5646);
}
.stop-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  overflow: hidden;
  background: #3a2a18;
  box-shadow: 0 0 0 3px #8a6a3a;
}
.stop.is-card .stop-art {
  width: 78px;
  height: 104px;
  border-radius: 6px;
}
.stop-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.stop:not(.got) .stop-art img {
  filter: grayscale(1) brightness(0.55);
}
.stop-art.title-only {
  font: 800 44px/1 var(--font-display);
  color: var(--gold-1);
}
.stop-copy {
  font: 600 13px/1.3 var(--font-text);
  color: var(--ink);
}
.lock {
  position: absolute;
  width: 26px;
  height: 30px;
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 28'%3E%3Cpath d='M6 12V8a6 6 0 0 1 12 0v4' fill='none' stroke='%23f3dfa8' stroke-width='2.6'/%3E%3Crect x='3' y='12' width='18' height='14' rx='2.5' fill='%23f0c55a' stroke='%23422a0c' stroke-width='1.4'/%3E%3Ccircle cx='12' cy='18' r='2' fill='%23422a0c'/%3E%3C/svg%3E");
  filter: drop-shadow(0 2px 2px #000);
}
.masteries {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.mast {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  background: #fbf3df;
  box-shadow: inset 0 0 0 1px #c9a97a;
}
.mast img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 3px #8a6a3a;
}
.mast.ring-1 img { box-shadow: 0 0 0 3px #b87333, 0 0 10px #b8733388; }
.mast.ring-2 img { box-shadow: 0 0 0 3px #d9dde3, 0 0 12px #ffffff99; }
.mast.ring-3 img { box-shadow: 0 0 0 3px #f5cf6a, 0 0 16px #ffd77aaa; }
.mast b {
  font: 800 18px var(--font-display);
  color: #4a2c10;
}
.mast small {
  display: block;
  font: 600 12px var(--font-text);
}
.mast .lvbar {
  background: #e3d2ad;
  box-shadow: inset 0 0 0 1px #c9a97a;
}

/* Cartas travadas na coleção e no editor */
.tile.locked .cardx {
  filter: grayscale(0.85) brightness(0.6);
}
.tile-card {
  position: relative;
}
.lockplate {
  position: absolute;
  left: 50%;
  top: 46%;
  translate: -50% -50%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 36px;
  border-radius: 999px;
  white-space: nowrap;
  font: 800 15px var(--font-display);
  color: var(--gold-1);
  background: #120a04e6;
  box-shadow: 0 0 0 1px #c99a45, 0 6px 14px #000;
}
.lockplate .lock {
  left: 8px;
  width: 20px;
  height: 24px;
}
.lockedline {
  font-weight: 700;
  color: #7a3a10 !important;
}

/* =========================================================
   Campanha: mapa da Jornada
   ========================================================= */
.jintro {
  max-width: 900px;
  margin: 0 auto 22px;
  text-align: center;
}
.jintro small {
  font: 700 12px var(--font-text);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.jintro h2 {
  margin: 2px 0 6px;
  font-size: 34px;
}
.jreward {
  display: inline-grid;
  gap: 2px;
  margin-top: 6px;
  padding: 8px 18px;
  border-radius: 8px;
  background: #fbf3df;
  box-shadow: inset 0 0 0 1px #c9a97a;
}
.jreward span {
  font: 700 11px var(--font-text);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.jreward b {
  font: 700 15px var(--font-display);
  color: #4a2c10;
}
.jreward.got {
  background: #e6efd5;
  box-shadow: inset 0 0 0 1px #7fa05a, 0 0 16px #b4e08a66;
}
.journey {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr);
  gap: 24px;
  align-items: start;
}
.jmap {
  position: relative;
  aspect-ratio: 1000 / 560;
  border-radius: 12px;
  overflow: hidden;
  background:
    radial-gradient(60% 50% at 30% 70%, #2f6a4a66, transparent 70%),
    radial-gradient(50% 50% at 80% 30%, #1d4a5a77, transparent 70%),
    linear-gradient(160deg, #1d3a24, #0f2318 50%, #0a1a20);
  box-shadow: inset 0 0 0 2px #c99a45, inset 0 0 0 4px #120a04, inset 0 0 60px #000c, 0 16px 36px #000c;
}
.jmap.has-art {
  background: var(--map) center / cover;
}
.jmap svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.jriver {
  fill: none;
  stroke: #4fb3c8;
  stroke-width: 26;
  stroke-linecap: round;
  opacity: 0.55;
  filter: drop-shadow(0 0 10px #4fb3c8);
}
.jmap.has-art .jriver {
  opacity: 0.18;
}
.jtrail {
  fill: none;
  stroke: #f5cf6a;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 2 14;
  opacity: 0.9;
  animation: trailFlow 1.6s linear infinite;
}
@keyframes trailFlow {
  to { stroke-dashoffset: -32; }
}
.stopnode {
  position: absolute;
  translate: -50% -50%;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transition: transform 0.2s;
}
.stopnode:hover {
  transform: scale(1.06);
}
.sn-art {
  display: block;
  width: clamp(54px, 6.5vw, 86px);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 3px #8a6a3a, 0 0 0 5px #120a04, 0 8px 16px #000c;
}
.stopnode.boss .sn-art {
  width: clamp(72px, 9vw, 116px);
  box-shadow: 0 0 0 3px #c0392b, 0 0 0 5px #120a04, 0 0 30px #c0392b99, 0 8px 16px #000c;
}
.sn-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.stopnode.locked .sn-art img {
  filter: grayscale(1) brightness(0.4);
}
.stopnode.locked {
  cursor: not-allowed;
}
.stopnode.open .sn-art {
  box-shadow: 0 0 0 3px #f5cf6a, 0 0 0 5px #120a04, 0 0 26px #ffd77aaa;
  animation: nodePulse 1.8s ease-in-out infinite;
}
@keyframes nodePulse {
  50% { box-shadow: 0 0 0 4px #fff0bf, 0 0 0 6px #120a04, 0 0 40px #ffd77acc; }
}
.stopnode.on .sn-art {
  outline: 3px solid #fff;
  outline-offset: 4px;
}
.sn-num {
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  font: 800 14px/1 var(--font-display);
  color: #2a1606;
  background: radial-gradient(circle at 40% 35%, #fff4c4, #f0c55a 45%, #a86f1e);
  clip-path: polygon(50% 0, 100% 38%, 82% 100%, 18% 100%, 0 38%);
}
.stopnode.done .sn-num {
  color: #fff;
  background: radial-gradient(circle at 40% 35%, #b4e08a, #4f7a2a);
  clip-path: circle(50%);
}
.sn-name {
  padding: 2px 10px;
  border-radius: 999px;
  font: 800 13px var(--font-display);
  color: var(--gold-1);
  white-space: nowrap;
  background: #120a04d9;
  box-shadow: inset 0 0 0 1px #c99a4588;
}
.stopnode.locked .sn-name {
  color: #a9a08c;
}
.chapter .ch-scene {
  position: relative;
  height: 170px;
  margin: -4px -4px 12px;
  border-radius: 6px;
  background: center 25% / cover;
  box-shadow: inset 0 -60px 50px -20px #0009;
}
.ch-tag {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 3px 12px;
  border-radius: 999px;
  font: 800 13px var(--font-display);
  color: var(--gold-1);
  background: #120a04d9;
}
.chapter.is-boss .ch-tag {
  color: #ffd2c4;
  box-shadow: inset 0 0 0 1px #c0392b;
}
.chapter h2 {
  margin: 0;
  font-size: 28px;
}
.ch-place {
  margin: 2px 0 10px;
  font-style: italic;
}
.chapter h3 {
  margin: 12px 0 6px;
  font: 800 16px var(--font-display);
  color: #4a2c10;
}
.ch-rules {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 5px;
  font: 500 14px/1.4 var(--font-text);
  color: var(--ink);
}
.ch-locked {
  padding: 10px 12px;
  border-radius: 6px;
  background: #efe3c6;
  font-weight: 700;
}
.blessings {
  display: grid;
  gap: 8px;
}
.bless {
  display: grid;
  gap: 2px;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  background: #fbf3df;
  box-shadow: inset 0 0 0 1px #c9a97a;
  transition: 0.15s;
}
.bless b {
  font: 800 16px var(--font-display);
  color: #4a2c10;
}
.bless small {
  font: 500 13px var(--font-text);
}
.bless:hover {
  background: #fff8e6;
}
.bless.on {
  background: #e3f1f4;
  box-shadow: inset 0 0 0 2px #2f8aa0, 0 0 14px #4fb3c866;
}
.ch-opts {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin: 12px 0 4px;
}
.ch-opts label {
  display: grid;
  gap: 4px;
  font-weight: 700;
}
.chapter .gold.big {
  width: 100%;
  margin-top: 10px;
}
@media (max-width: 900px) {
  .journey {
    grid-template-columns: 1fr;
  }
}
.jmap {
  aspect-ratio: 1672 / 941;
}
.jmap.has-art svg {
  display: none;
}
.jmap.has-art .stopnode .sn-art {
  width: clamp(44px, 5vw, 66px);
}
.jmap.has-art .stopnode.boss .sn-art {
  width: clamp(58px, 6.5vw, 88px);
}
.chapter .ch-scene {
  height: auto;
  aspect-ratio: 16 / 9;
  margin: -2px -2px 14px;
  border-radius: 6px;
  background-position: center;
  box-shadow: 0 0 0 2px #c99a45, 0 0 0 4px #120a04, 0 10px 22px #0008;
  animation: sceneIn 0.6s ease both;
}
.chapter .ch-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: linear-gradient(transparent 60%, #000a);
}
.ch-tag {
  z-index: 1;
}
@keyframes sceneIn {
  from { opacity: 0; transform: scale(0.97); }
}

/* Menu do jogador no topo: perfil, ajustes e sair */
.me-wrap {
  position: relative;
}
button.me {
  cursor: pointer;
  color: inherit;
  font: inherit;
  font-weight: 700;
}
.me-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 50;
  display: grid;
  min-width: 230px;
  padding: 8px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, #ffffff0d, #0000004d),
    var(--tex-wood) center / 500px auto;
  box-shadow: inset 0 0 0 1px #c99a4599, inset 0 0 0 2px #120a04, 0 16px 30px #000c;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: 0.15s;
}
.me-wrap.open .me-menu {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
.me-who {
  padding: 4px 10px 8px;
  font: 600 12px var(--font-text);
  color: #d9c9a4;
  border-bottom: 1px solid #c99a4544;
  margin-bottom: 4px;
  word-break: break-all;
}
.me-menu a,
.me-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 0;
  border-radius: 6px;
  text-align: left;
  font: 700 15px var(--font-display);
  color: var(--gold-1);
  background: none;
  box-shadow: none;
  cursor: pointer;
}
.me-menu a:hover,
.me-menu button:hover {
  background: #ffffff14;
}
.me-menu svg {
  width: 18px;
  height: 18px;
}
.me-menu .danger {
  margin-top: 4px;
  border-top: 1px solid #c99a4544;
  border-radius: 0 0 6px 6px;
  color: #ffb3a0;
}
