/* Capítulo I shares the Atlas palette and interaction primitives. */
.chapter-ui {
  --chapter-edge: #866747;
  --chapter-teal: #94d9c3;
  --chapter-red: #df958a;
  --chapter-ink: #fff2dc;
  --chapter-tile: linear-gradient(135deg, #213731, #101d26 65%);
  min-width: 0;
}
.chapter-ui h1,
.chapter-ui h2,
.chapter-ui h3,
.chapter-ui .chapter-name {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -.024em;
}
.chapter-ui h2,
.chapter-ui h3 {
  color: var(--chapter-ink);
}
.chapter-ui h2 { font-size: clamp(1.46rem, 2.45vw, 2.1rem); }
.chapter-ui h3 { font-size: 1.35rem; }
.chapter-ui p:not(.eyebrow) { color: var(--muted); }
.chapter-ui .eyebrow { margin-bottom: .36rem; }
.chapter-ui button { min-width: 0; }
.chapter-ui img { object-fit: cover; }
.chapter-ui .icon { flex: 0 0 auto; }

.chapter-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin: 0 0 1.2rem;
}
.chapter-head h1 {
  color: var(--chapter-ink);
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  line-height: .92;
  font-style: italic;
  text-transform: uppercase;
}
.chapter-head > div > p:last-child:not(.eyebrow) {
  max-width: 53ch;
  margin-top: .42rem;
}
.chapter-head .btn { flex: 0 0 auto; }
.chapter-layout, .chapter-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(19.5rem, 1fr);
  align-items: start;
  gap: 1.12rem;
}
.chapter-two-col.is-even { grid-template-columns: repeat(2,minmax(0,1fr)); }
.chapter-column {
  display: grid;
  gap: .88rem;
  min-width: 0;
}
.chapter-panel {
  min-width: 0;
  padding: clamp(.72rem, 1.7vw, 1.2rem);
  border: 1px solid #48635a;
  border-radius: .1rem .78rem .1rem .42rem;
  background: var(--chapter-tile);
  box-shadow: 0 .5rem 1.2rem #03070b60;
}
.chapter-panel > h2 { margin: 0 0 .65rem; }
.chapter-panel > p + .btn, .chapter-panel > p + .chapter-actions { margin-top: .7rem; }
.chapter-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .52rem;
  margin-bottom: .75rem;
}
.chapter-panel-head > div { min-width: 0; }
.chapter-panel-head h2 { display: inline-flex; align-items: center; gap: .38rem; }
.chapter-panel-head .icon { color: var(--gold); }
.chapter-mono {
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
  font-size: .875rem;
  font-weight: 700;
}
.chapter-divider {
  height: 1px;
  margin-block: .88rem;
  border: 0;
  background: linear-gradient(90deg, #b18760a6, #38605365 67%, transparent);
}
.chapter-empty {
  display: grid;
  justify-items: start;
  align-content: center;
  gap: .55rem;
  min-height: 7rem;
  padding: .85rem;
  border: 1px dashed #537068;
  border-radius: .22rem;
  background: #101a22d9;
}
.chapter-empty > .icon { color: var(--gold); }

.chapter-scene {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: clamp(18.3rem, 32.5vw, 29.8rem);
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border: 1px solid #b58f66;
  border-radius: .12rem 1.06rem .18rem .52rem;
  background: radial-gradient(ellipse at 49% 47%, #2b4c47, #142630 57%, #0a141d 86%);
  box-shadow: 0 .8rem 2.2rem #03080ccb;
}
.chapter-scene > img {
  position: absolute;
  z-index: -3;
  inset: 0;
  width: 100%;
  height: 100%;
  object-position: 50% 46%;
}
.chapter-scene::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(0deg, #080d15f2, #080d1540 45%, transparent 72%),
    linear-gradient(112deg, #080e17e8, #0a172866 43%, transparent 65%);
  content: "";
}
.chapter-scene::after {
  position: absolute;
  z-index: 2;
  inset: .3rem;
  border: 1px solid #f0ce9138;
  border-radius: .08rem .72rem .15rem .32rem;
  pointer-events: none;
  content: "";
}
.chapter-scene-intro {
  position: relative;
  display: grid;
  max-width: min(38rem,100%);
  gap: .44rem;
  align-content: start;
  padding: clamp(.9rem, 2.5vw, 1.85rem);
  text-shadow: 0 2px 4px #060b11, 0 0 1rem #050a10;
}
.chapter-scene-intro h1 {
  color: #fff2dc;
  font-size: clamp(2.65rem, 6vw, 5.65rem);
  font-style: italic;
  line-height: .91;
  text-transform: uppercase;
}
.chapter-scene-intro .eyebrow { margin-bottom: 0; color: var(--gold-bright); }
.chapter-scene .chapter-scene-intro p:not(.eyebrow) { color: #f4e6d3; }
.chapter-scene-intro > .btn { justify-self: start; margin-top: .2rem; }
.chapter-battlefield {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,9.8rem),1fr));
  gap: .55rem;
  align-items: end;
  padding: 2.3rem clamp(.7rem,1.7vw,1.18rem) clamp(.7rem,1.7vw,1.18rem);
}
.chapter-enemy {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 8.55rem;
  min-width: 0;
  flex-direction: column;
  justify-content: end;
  gap: .28rem;
  padding: .65rem;
  overflow: visible;
  border: 1px solid #b47766;
  border-radius: .08rem .68rem .08rem .36rem;
  color: #fff2dc;
  background: linear-gradient(135deg, #3a2525, #171e2a);
}
.chapter-ui .chapter-enemy > img {
  position: absolute;
  z-index: -2;
  inset: auto .48rem 2.75rem auto;
  width: min(63%,10.8rem);
  height: clamp(7.3rem,12.8vw,11rem);
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 .32rem .33rem #060b15bb);
  pointer-events: none;
}
.chapter-enemy::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(0deg,#091019 0%,#0f141ce8 44%,#0b151a80 77%,transparent);
  content: "";
}
.chapter-enemy.is-fallen { opacity: .55; }
.chapter-enemy.is-elite { border-color: #df946d; }
.chapter-enemy.is-targeted {
  border-color: #ffbd83;
  box-shadow: inset 0 0 0 1px #e59a5d;
}
.chapter-enemy h2, .chapter-enemy h3 { line-height: 1.04; }
.chapter-enemy-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .25rem .5rem;
  min-width: 0;
}
.chapter-enemy .chapter-mono { color: #ffccbc; }
.chapter-enemy .btn {
  min-height: 2.75rem;
  margin-top: .26rem;
  padding: .4rem .45rem;
  font-size: .875rem;
}
.chapter-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: .22rem .35rem;
}
.chapter-statuses span, .chapter-chip {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  width: fit-content;
  padding: .11rem .34rem;
  border: 1px solid #577268;
  border-radius: .1rem .28rem;
  color: #d7e9e1;
  background: #142825db;
  font-size: .875rem;
  line-height: 1.24;
}
.chapter-statuses .icon { width: .9rem; height: .9rem; color: var(--gold-bright); }
.chapter-chip.is-danger { border-color: #a0655a; color: #ffcebe; background: #442b27; }
.chapter-chip.is-ready { border-color: #aa8655; color: #f8ddad; background: #3e3022; }
.chapter-meter {
  display: block;
  width: 100%;
  height: .38rem;
  overflow: hidden;
  border: none;
  border-radius: .11rem;
  color: #8ed9ab;
  background: #28393c;
  accent-color: currentColor;
  appearance: none;
}
.chapter-meter::-webkit-progress-bar { background: #2b393d; }
.chapter-meter::-webkit-progress-value { background: currentColor; }
.chapter-meter::-moz-progress-bar { background: currentColor; }
.chapter-meter.is-enemy { color: #e58a80; }
.chapter-meter.is-mana { color: #8db8ee; }

.chapter-journey {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: .5rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.chapter-room {
  display: grid;
  position: relative;
  min-height: 4.78rem;
  min-width: 0;
  place-content: center;
  justify-items: center;
  gap: .22rem;
  padding: .38rem .28rem;
  border: 1px solid #46635c;
  border-radius: .09rem .48rem .08rem .35rem;
  color: #dce8e1;
  background: #12282a;
  text-align: center;
  line-height: 1.17;
  font-size: .875rem;
  overflow-wrap: anywhere;
}
.chapter-room .icon { color: var(--chapter-teal); }
.chapter-room small { font-size: .875rem; color: var(--muted); }
button.chapter-room:is(:hover,:focus-visible),
.chapter-room.is-current {
  border-color: #b58a5f;
  color: #fff0d7;
  background: linear-gradient(145deg,#483023,#243230);
}
.chapter-room.is-current .icon { color: var(--gold-bright); }
.chapter-room.is-locked {
  border-color: #394b4c;
  color: #aebcb7;
  background: #101e25;
}
.chapter-room.is-locked .icon { color: #9aa9a3; }
.chapter-journey li { display: grid; min-width: 0; }

.chapter-actions {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: .53rem;
}
.chapter-actions.is-one { grid-template-columns: minmax(0,1fr); }
.chapter-actions > .btn { width: 100%; }
.chapter-action {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: .62rem;
  width: 100%;
  min-height: 3.36rem;
  padding: .56rem;
  border: 1px solid #57776c;
  border-left: 2px solid #87a68b;
  border-radius: .06rem .45rem .06rem .28rem;
  color: #fff1d9;
  background: linear-gradient(120deg,#243e35,#13232c 75%);
  text-align: left;
  transition: transform .14s ease, filter .14s ease;
}
.chapter-action .icon { color: var(--gold-bright); }
.chapter-action strong, .chapter-action small { display: block; line-height: 1.22; }
.chapter-action small { margin-top: .18rem; color: var(--muted); font-size: .875rem; }
.chapter-action:is(:hover,:focus-visible):not(:disabled) { border-color: #d1a474; filter: brightness(1.08); }
.chapter-action:active:not(:disabled) { transform: translateY(2px); }
.chapter-action:disabled { opacity: .59; }
.chapter-action.is-strong { border-left-color: #edb27c; background: linear-gradient(116deg,#533729,#24312c); }
.chapter-turn-resources {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .25rem .53rem;
  color: #cee7d4;
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
}
.chapter-turn-resources > span { display: inline-flex; align-items: center; gap: .22rem; white-space: nowrap; }
.chapter-list { display: grid; gap: .53rem; margin: 0; padding: 0; list-style: none; }
.chapter-log {
  display: grid;
  gap: .32rem;
  max-height: 13rem;
  overflow: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chapter-log li {
  padding: .4rem .52rem;
  border-left: 1px solid #608b77;
  color: #e7eae1;
  background: #121e26;
  font-size: .875rem;
}

.chapter-formation-hud {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,9.45rem),1fr));
  gap: .54rem;
}
.chapter-unit {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: center;
  gap: .47rem;
  min-width: 0;
  padding: .49rem;
  border: 1px solid #4b675c;
  border-radius: .07rem .43rem .07rem .24rem;
  background: #102129;
}
.chapter-unit.is-turn {
  border-color: #e4ac72;
  box-shadow: inset 2px 0 #e4ac72;
}
.chapter-unit.is-fallen { opacity: .6; }
.chapter-unit > img {
  width: 2.72rem;
  height: 3.5rem;
  border: 1px solid #8f775c;
  border-radius: .11rem .29rem;
  object-position: center 24%;
}
.chapter-unit > div { min-width: 0; }
.chapter-unit .chapter-name { color: #fff2dc; font-size: 1.2rem; }
.chapter-unit .chapter-meter { margin: .21rem 0 .28rem; height: .27rem; }
.chapter-unit .chapter-mono { color: #c8decb; }
.chapter-unit .chapter-hp-label {
  display: flex;
  justify-content: space-between;
  gap: .23rem;
  align-items: baseline;
  min-width: 0;
}
.chapter-art-placeholder {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--gold);
  background: radial-gradient(ellipse at 50% 42%, #4f452d, #142630 72%);
}
.chapter-art-placeholder .icon { width: 43%; height: 43%; }
.chapter-unit > .chapter-art-placeholder { width: 2.72rem; height: 3.5rem; }
.chapter-targets {
  padding: .5rem;
  border: 1px solid #9f7552;
  border-radius: .08rem .5rem .08rem .26rem;
  background: #233230;
}
.chapter-targets > summary {
  display: flex;
  min-height: 2.75rem;
  align-items: center;
  gap: .55rem;
  padding: .3rem;
  cursor: pointer;
  list-style: none;
}
.chapter-targets > summary::-webkit-details-marker { display: none; }
.chapter-targets > summary::after {
  flex: 0 0 auto;
  width: .4rem;
  height: .4rem;
  margin-left: auto;
  transform: rotate(45deg);
  border-right: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  content: "";
}
.chapter-targets[open] > summary::after { transform: rotate(225deg); }
.chapter-targets > summary .icon { color: var(--gold-bright); }
.chapter-targets > summary small { display: block; color: var(--muted); font-size: .875rem; }
.chapter-targets > .chapter-actions { padding-top: .36rem; }

.chapter-hero-deck {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(min(100%,9.8rem),1fr));
  gap: .54rem;
}
.chapter-hero-card {
  --hero-edge: #aa8665;
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: end;
  min-width: 0;
  min-height: 8rem;
  padding: .6rem;
  overflow: hidden;
  border: 1px solid var(--hero-edge);
  border-radius: .1rem .72rem .1rem .38rem;
  color: #fff1dd;
  background: linear-gradient(153deg,#4b3b2e,#12242a);
  box-shadow: inset 0 -2px var(--hero-edge);
  text-align: left;
  transition: transform .15s ease, box-shadow .15s ease;
}
.chapter-hero-card[data-tone="lia"] { --hero-edge: #ecab80; }
.chapter-hero-card[data-tone="ivo"] { --hero-edge: #88b7df; }
.chapter-hero-card[data-tone="nara"] { --hero-edge: #9aca96; }
.chapter-hero-card[data-tone="kael"] { --hero-edge: #ef9c72; }
.chapter-hero-card[data-tone="iris"] { --hero-edge: #d5aff1; }
.chapter-hero-card[data-tone="tess"] { --hero-edge: #91d5db; }
.chapter-hero-card > img,
.chapter-hero-card > .chapter-art-placeholder {
  position: absolute;
  z-index: -3;
  inset: 0;
  width: 100%;
  height: 100%;
  object-position: 50% 24%;
}
.chapter-hero-card[data-tone="ivo"] img { object-position: 50% 17%; }
.chapter-hero-card::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  background: linear-gradient(0deg, #0a121af7, #0a121a9c 37%, transparent 73%);
  content: "";
}
.chapter-hero-card:is(:hover,[aria-pressed="true"]) {
  border-color: #f5c18b;
  box-shadow: inset 0 0 0 1px #f5c18b, 0 0 .75rem #f6a85936;
}
.chapter-hero-card:active { transform: translateY(2px); }
.chapter-hero-copy { display: grid; gap: .17rem; min-width: 0; }
.chapter-hero-copy strong {
  color: #fff1d7;
  font: 700 italic clamp(1.48rem, 4.3vw, 2.28rem)/.96 var(--display);
  text-transform: uppercase;
  text-shadow: 0 1px 2px #0b131b;
}
.chapter-hero-copy small { color: #e9d9c4; font-size: .875rem; line-height: 1.18; }
.chapter-hero-active {
  position: absolute;
  display: grid;
  inset: .37rem .43rem auto auto;
  width: 1.35rem;
  height: 1.35rem;
  place-items: center;
  border: 1px solid #9bd5ae;
  border-radius: .08rem .36rem;
  color: #ceead6;
  background: #14322cde;
  font-size: .76rem;
}
.chapter-hero-select {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(min(100%,8.2rem),1fr));
  gap: .48rem;
}
.chapter-hero-select .chapter-hero-card { min-height: 5rem; }
.chapter-hero-select .chapter-hero-copy strong { font-size: 1.35rem; }
.chapter-detail .chapter-panel-head h2 { font-size: clamp(2.35rem,4.1vw,3.48rem); font-style: italic; text-transform: uppercase; }
.chapter-detail .chapter-unit { padding: .55rem; }
.chapter-detail > h3 { margin-bottom: .48rem; }
.chapter-detail-actions { margin-top: .72rem; }
.chapter-hint { margin-block: .64rem; font-size: .875rem; }
.chapter-attributes {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  margin-block: .8rem;
  padding: .42rem 0;
  border-block: 1px solid #536e5d;
}
.chapter-attributes > div {
  min-width: 0;
  padding-inline: .5rem;
}
.chapter-attributes > div + div { border-left: 1px solid #536e5d; }
.chapter-attributes dt { color: var(--muted); font-size: .875rem; }
.chapter-attributes dd {
  margin: .08rem 0 0;
  color: var(--gold-bright);
  font: 700 1.6rem/1.05 var(--display);
}
.chapter-skills > li, .chapter-pets > li {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: .6rem;
  min-width: 0;
  padding: .49rem;
  border: 1px solid #4d665d;
  border-radius: .08rem .4rem .08rem .28rem;
  background: #14272a;
}
.chapter-skills > li p, .chapter-pets > li p { font-size: .875rem; }
.chapter-skill-icon {
  display: grid;
  width: 2.2rem;
  height: 2.2rem;
  place-items: center;
  border: 1px solid #9d7959;
  border-radius: .1rem .36rem;
  color: var(--gold-bright);
  background: #2c2f28;
}
.chapter-pet-art {
  width: 3.35rem;
  height: 3.35rem;
  border: 1px solid #a38567;
  border-radius: .07rem .42rem;
  object-position: 50% 38%;
}
.chapter-draw-result {
  display: flex;
  align-items: center;
  gap: .69rem;
  margin-bottom: .67rem;
  padding: .62rem;
  border: 1px solid #d4a674;
  border-radius: .08rem .58rem;
  color: var(--gold-bright);
  background: linear-gradient(120deg,#533521,#27382b);
}
.chapter-draw-result:is([data-tier="epico"],[data-tier="mitico"],[data-tier="ancestral"]) {
  border-color: #bc9fdc;
  background: linear-gradient(120deg,#47324e,#26352f);
}
.chapter-draw-result:is([data-tier="lendario"],[data-tier="lendario-supremo"],[data-tier="super-lendario"]) {
  border-color: #f7be77;
  background: linear-gradient(120deg,#65421f,#313128);
}
.chapter-draw-result strong, .chapter-draw-result span { display: block; }
.chapter-draw-result strong { font: 700 1.7rem/1.1 var(--display); }
.chapter-odds { margin-top: .6rem; color: #ddd5c4; font-size: .875rem; }
.chapter-odds summary {
  min-height: 2.45rem;
  padding: .5rem .12rem;
  color: var(--gold-bright);
  font-weight: 650;
  cursor: pointer;
}
.chapter-odds dl {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,11.1rem),1fr));
  gap: .4rem;
  margin: .2rem 0 0;
}
.chapter-odds dl > div { display: flex; justify-content: space-between; gap: .35rem; padding: .32rem .35rem; background: #102229; }
.chapter-odds dt small { display: block; color: var(--muted); font-size: .875rem; }
.chapter-odds dd { margin: 0; white-space: nowrap; color: var(--gold-bright); }

.chapter-slot-grid, .chapter-inventory-grid, .chapter-rewards {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(min(100%,10rem),1fr));
  gap: .55rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.chapter-slot-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.chapter-slot, .chapter-item, .chapter-rewards > li {
  min-width: 0;
  padding: .56rem;
  border: 1px solid #536559;
  border-radius: .1rem .53rem .1rem .36rem;
  background: #14282b;
  overflow-wrap: anywhere;
}
.chapter-slot {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-content: start;
  align-items: start;
  gap: .42rem;
  background: #172a2d;
}
.chapter-slot:has(.btn) .btn { grid-column: 1 / -1; min-height: 2.48rem; padding: .32rem; font-size: .875rem; }
.chapter-slot.is-equipped, .chapter-item.is-equipped { border-color: #b28a5e; background: linear-gradient(145deg,#443426,#17292c); }
.chapter-item-art {
  width: 2.7rem;
  height: 2.7rem;
  flex: 0 0 auto;
  border: 1px solid #977451;
  border-radius: .08rem .32rem;
  object-fit: contain;
}
.chapter-slot-text strong, .chapter-slot-text small, .chapter-item-top strong, .chapter-item-top small,
.chapter-rewards strong, .chapter-rewards small { display: block; line-height: 1.21; }
.chapter-slot-text small, .chapter-item-top small, .chapter-rewards small {
  margin-bottom: .15rem;
  color: var(--gold-bright);
  font-size: .875rem;
}
.chapter-item, .chapter-recipe { display: grid; align-content: start; gap: .5rem; }
.chapter-item-top, .chapter-rewards > li { display: flex; align-items: center; gap: .5rem; }
.chapter-item p, .chapter-recipe p { font-size: .875rem; }
.chapter-item .btn, .chapter-recipe .btn { min-height: 2.55rem; padding: .36rem .53rem; }
.chapter-item-bonus { display: flex; flex-wrap: wrap; gap: .27rem; }
.chapter-item-bonus > span {
  padding: .13rem .28rem;
  border: 1px solid #53796a;
  color: #bfe4cd;
  font-size: .875rem;
}
.chapter-recipe {
  padding: .65rem;
  border: 1px solid #886648;
  border-radius: .08rem .55rem .08rem .34rem;
  background: linear-gradient(140deg,#3e3226,#183035 84%);
}
.chapter-requirements {
  display: grid;
  gap: .33rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chapter-requirements > li {
  display: flex;
  justify-content: space-between;
  gap: .3rem;
  padding: .24rem .35rem;
  color: #c5e5d3;
  background: #11242b;
  font-size: .875rem;
}
.chapter-requirements .is-missing { color: #f1c4b7; }
.chapter-quest {
  padding: .72rem;
  border: 1px solid #638174;
  border-left: 2px solid #ab8860;
  border-radius: .08rem .53rem .08rem .34rem;
  background: #132a2d;
}
.chapter-quest .chapter-panel-head { margin-bottom: .36rem; }
.chapter-quest .btn { margin-top: .54rem; }
.chapter-quest-progress { display: flex; align-items: center; gap: .65rem; margin-top: .58rem; }
.chapter-level { margin: 0 0 .75rem; }
.chapter-level .chapter-mono { white-space: nowrap; }
.chapter-quest-reward { display: flex; flex-wrap: wrap; gap: .25rem .69rem; margin-top: .52rem; color: var(--gold-bright); font-size: .875rem; }
.chapter-quest-reward > span { display: inline-flex; align-items: center; gap: .32rem; }
.chapter-origin {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: center;
  gap: .58rem;
  padding: .55rem;
  border: 1px solid #977859;
  border-radius: .08rem .52rem .08rem .32rem;
  background: linear-gradient(133deg,#4b372a,#243633);
}
.chapter-seed-art {
  display: grid;
  place-items: center;
  width: 3.55rem;
  height: 3.55rem;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid #a98260;
  border-radius: .1rem .49rem;
  color: var(--gold-bright);
  background: #18262c;
}
.chapter-seed-art > img { width: 100%; height: 100%; object-fit: contain; }
.chapter-seed-art > .icon { width: 57%; height: 57%; }
.chapter-tree {
  display: grid;
  gap: .48rem;
  padding: .66rem 0 0 .46rem;
  margin: .25rem 0 0;
  border-left: 1px solid #ac8b68;
  list-style: none;
}
.chapter-tree .chapter-action:disabled:is(:has(.chapter-mono)) { opacity: .77; }
.chapter-seed-grid .seed-card {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: center;
  align-content: center;
  gap: .57rem;
  min-height: 4.48rem;
  padding: .45rem;
}
.chapter-seed-grid .seed-card[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--seed-copper); }
.chapter-seed-grid .seed-card.brasa { --seed-copper: #e6aa7c; }
.chapter-seed-grid .seed-card.espinho { --seed-copper: #93cba2; }
.chapter-seed-grid .seed-card.geada { --seed-copper: #97d6e7; }
.chapter-seed-grid .chapter-seed-art { width: 3rem; height: 3rem; border-color: var(--seed-copper); }
.chapter-seed-grid .chapter-seed-art > .icon { color: var(--seed-copper); }
.chapter-seed-copy { min-width: 0; }
.chapter-seed-copy small, .chapter-seed-copy strong { display: block; }
.chapter-seed-copy small { margin-top: .19rem; line-height: 1.19; }
.chapter-seed-picker > .eyebrow { padding-right: 2.85rem; }
.chapter-seed-picker > h2 { padding-right: 1.8rem; }

@media (max-width: 1100px) {
  .chapter-layout, .chapter-two-col { grid-template-columns: minmax(0,1fr) minmax(18.2rem,.65fr); gap: .76rem; }
  .chapter-slot-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,8.8rem),1fr)); }
}
@media (max-width: 780px) {
  .chapter-layout, .chapter-two-col, .chapter-two-col.is-even { grid-template-columns: minmax(0,1fr); gap: .77rem; }
  .chapter-head { align-items: flex-start; flex-wrap: wrap; margin-bottom: .85rem; }
  .chapter-dungeon { reading-flow: grid-rows; }
  .chapter-dungeon > .chapter-column { display: contents; }
  .chapter-dungeon .chapter-scene { order: 0; }
  .chapter-dungeon .chapter-panel, .chapter-dungeon > .btn { order: 2; }
  .chapter-dungeon .chapter-battle-orders, .chapter-dungeon .chapter-room-actions { order: 1; }
  .chapter-hero-deck { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 510px) {
  .chapter-layout, .chapter-column { gap: .63rem; }
  .chapter-scene { min-height: 15.5rem; }
  .chapter-battlefield { grid-template-columns: repeat(auto-fit,minmax(min(100%,8.2rem),1fr)); }
  .chapter-enemy { min-height: 7.25rem; padding: .39rem; }
  .chapter-enemy h2 { font-size: 1.22rem; }
  .chapter-enemy .btn { gap: .27rem; min-height: 2.75rem; }
  .chapter-actions .btn { padding-inline: .46rem; }
  .chapter-action { grid-template-columns: auto minmax(0,1fr); gap: .37rem; }
  .chapter-action > .chapter-mono { grid-column: 2; justify-self: start; }
  .chapter-seed-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .4rem; }
  .chapter-seed-grid .seed-card { grid-template-columns: minmax(0,1fr); justify-items: start; min-height: 6.25rem; align-content: start; }
  .chapter-seed-grid .seed-card > :not(.seed-icon) { grid-column: 1; }
  .chapter-seed-grid .chapter-seed-art { width: 2.36rem; height: 2.36rem; }
  .chapter-pets > li { grid-template-columns: auto minmax(0,1fr); }
  .chapter-pets > li > .btn, .chapter-pets > li > .chapter-chip { grid-column: 2; justify-self: start; }
  .chapter-hero-deck, .chapter-hero-select { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 340px) {
  .chapter-formation-hud { grid-template-columns: minmax(0,1fr); }
  .chapter-enemy .btn > .icon { display: none; }
  .chapter-enemy-title { display: block; }
  .chapter-journey { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .chapter-detail-actions { grid-template-columns: minmax(0,1fr); }
}
