/* Interface do jogo multiplayer: hotbar, vida, mochila, chat, avisos. Estende style.css. */
[hidden] {
  display: none !important;
}
.eyebrow {
  text-transform: uppercase;
}

#floaters {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 4;
}
.floater {
  position: absolute;
  left: 0;
  top: 0;
  font:
    bold 15px 'Segoe UI',
    sans-serif;
  color: #fff3c9;
  text-shadow:
    0 1px 0 #000,
    0 0 6px #000;
  white-space: nowrap;
  will-change: transform, opacity;
}
.floater.damage {
  color: #ff8b73;
  font-size: 17px;
}
.floater.hurt {
  color: #ff5d4a;
  font-size: 20px;
}

#toasts {
  position: fixed;
  top: 112px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  z-index: 6;
}
.toast {
  font:
    12px 'Segoe UI',
    sans-serif;
  background: var(--panel);
  border: 1px solid #c6b78744;
  padding: 8px 16px;
  border-radius: 4px;
  animation: toast-in 0.2s ease-out;
  transition: opacity 0.6s;
}
.toast.warn {
  border-color: #c1614f;
  color: #ffd9cf;
}
.toast.meteor {
  border-color: #ff9a4a;
  color: #ffe6c2;
  background: linear-gradient(90deg, #4a2411f0, #2c1a0ff0);
  font-size: 14px;
  padding: 10px 20px;
  box-shadow: 0 0 22px #ff8a2a55;
}
.toast.loot {
  border-color: #9cab76;
  color: #e4efc9;
}
.toast.gone {
  opacity: 0;
}
@keyframes toast-in {
  from {
    transform: translateY(-8px);
    opacity: 0;
  }
}

/* --- conversa --- */
#chat {
  position: fixed;
  left: 32px;
  bottom: 122px;
  width: 360px;
  z-index: 5;
  font:
    12px 'Segoe UI',
    sans-serif;
}
#chat-log {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 170px;
  overflow: hidden;
  justify-content: flex-end;
  margin-bottom: 6px;
}
.chat-line {
  padding: 3px 8px;
  background: linear-gradient(90deg, #131a15b0, #131a1500);
  text-shadow: 0 1px 2px #000;
  word-break: break-word;
  transition: opacity 0.8s;
}
.chat-line b {
  color: var(--gold);
  font-weight: 600;
}
.chat-line.sys {
  color: var(--muted);
  font-style: italic;
}
.chat-line.old {
  opacity: 0;
}
#chat.active .chat-line.old {
  opacity: 1;
}
#chat-input {
  width: 100%;
  background: #141c17d9;
  color: var(--cream);
  border: 1px solid #c6b78755;
  border-radius: 4px;
  padding: 7px 10px;
  font: inherit;
  opacity: 0;
  pointer-events: none;
  outline: none;
}
#chat.active #chat-input {
  opacity: 1;
  pointer-events: auto;
}

/* --- mochila --- */
.panel {
  position: fixed;
  right: 32px;
  top: 200px;
  width: 302px;
  background: var(--panel);
  border: 1px solid #c6b78744;
  border-radius: 5px;
  padding: 14px 16px 12px;
  z-index: 5;
  box-shadow: 0 12px 40px #0008;
}
.panel header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.panel .close {
  background: transparent;
  border: 0;
  font-size: 20px;
  line-height: 1;
}
#inventory-grid {
  display: grid;
  grid-template-columns: repeat(5, 48px);
  gap: 6px;
}
.slot-cell {
  position: relative;
  width: 48px;
  height: 48px;
  background: #0e1410a0;
  border: 1px solid #c6b78722;
  border-radius: 4px;
}
.slot-cell.filled {
  cursor: default;
}
.slot-cell.edible {
  cursor: pointer;
  border-color: #b5574b99;
}
.slot-cell .swatch {
  position: absolute;
  inset: 8px 8px 14px;
  border-radius: 3px;
  border: 1px solid #0006;
}
.slot-cell .count {
  position: absolute;
  right: 4px;
  bottom: 1px;
  font:
    bold 11px 'Segoe UI',
    sans-serif;
  text-shadow: 0 1px 2px #000;
}
.slot-cell .name {
  position: absolute;
  left: 3px;
  top: 2px;
  font:
    8px 'Segoe UI',
    sans-serif;
  color: var(--muted);
}
.panel-note {
  font:
    10px 'Segoe UI',
    sans-serif;
  color: var(--muted);
  margin: 10px 0 0;
}

/* --- barra de ferramentas / construção --- */
#hotbar {
  position: fixed;
  left: 50%;
  bottom: 122px;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 5;
}
.hot {
  position: relative;
  width: 68px;
  height: 68px;
  background: var(--panel);
  border: 1px solid #c6b78733;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0;
}
.hot .key {
  position: absolute;
  left: 5px;
  top: 3px;
  font:
    9px 'Segoe UI',
    sans-serif;
  color: var(--muted);
}
.hot .icon {
  font-size: 26px;
  line-height: 1;
}
.hot .label {
  font:
    9px 'Segoe UI',
    sans-serif;
  color: var(--cream);
}
.hot .cost {
  font:
    8px 'Segoe UI',
    sans-serif;
  color: var(--muted);
}
.hot.selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold) inset;
  background: #2d3526e6;
}
.hot.poor {
  opacity: 0.55;
}
#build-hint {
  position: fixed;
  left: 50%;
  bottom: 200px;
  transform: translateX(-50%);
  font:
    11px 'Segoe UI',
    sans-serif;
  background: #182219cc;
  padding: 8px 16px;
  border-radius: 3px;
  z-index: 5;
  pointer-events: none;
}
#build-hint b {
  color: var(--gold);
}

/* --- vida --- */
.player-info {
  min-width: 158px;
}
.hp {
  position: relative;
  height: 15px;
  margin: 6px 0;
  background: #0b100d;
  border: 1px solid #c6b78744;
  border-radius: 3px;
  overflow: hidden;
}
.hp i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  background: linear-gradient(#c66b56, #93392c);
  transition: width 0.25s;
}
.hp span {
  position: absolute;
  inset: 0;
  text-align: center;
  font:
    bold 10px/15px 'Segoe UI',
    sans-serif;
  text-shadow: 0 1px 2px #000;
}
.hp.low i {
  animation: pulse 0.8s infinite;
}
.live-dot.off {
  background: #c1614f;
}

#death {
  position: fixed;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #5a1c1c66;
  backdrop-filter: blur(3px) grayscale(0.6);
  text-shadow: 0 2px 10px #000;
}
#death h2 {
  font-size: 44px;
  font-weight: normal;
  letter-spacing: 6px;
  margin: 0;
}
#death p {
  font:
    14px 'Segoe UI',
    sans-serif;
}

/* --- entrada --- */
#login {
  position: fixed;
  inset: 0;
  z-index: 11;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background: radial-gradient(ellipse at center, #394333, #172019);
}
#login h2 {
  font-weight: normal;
  font-size: 27px;
  margin: 20px 0 22px;
}
#login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  width: 280px;
}
#login-name {
  background: #131b15;
  color: var(--cream);
  border: 1px solid #c6b78766;
  border-radius: 4px;
  padding: 12px 14px;
  font:
    16px Georgia,
    serif;
  text-align: center;
  outline: none;
}
#login-name:focus {
  border-color: var(--gold);
}
button.primary {
  background: #b89658;
  color: #1a1f17;
  border: 0;
  border-radius: 4px;
  padding: 12px 16px;
  font-weight: 600;
}
button.primary:hover {
  background: #cfac70;
}
.error {
  min-height: 20px;
  font:
    12px 'Segoe UI',
    sans-serif;
  color: #ff9c8a;
  margin-top: 14px;
}

@media (max-width: 1100px) {
  .chapter,
  #compass {
    display: none;
  }
  .actions {
    display: none;
  }
}

/* ===== fabricação, equipamento e ícones (sobrepõe as regras anteriores) ===== */
.panel {
  width: 396px;
}
#craft {
  right: auto;
  left: 32px;
  top: 150px;
  width: 420px;
  max-height: calc(100vh - 330px);
  overflow-y: auto;
}
#inventory-grid {
  grid-template-columns: repeat(8, 44px);
  gap: 5px;
}
.slot-cell {
  position: relative;
  width: 44px;
  height: 44px;
  background: #0e1410b0;
  border: 1px solid #c6b78722;
  border-radius: 4px;
}
.slot-cell.hotbar {
  background: #18221bd0;
  border-color: #c6b78744;
}
.slot-cell.filled {
  cursor: pointer;
}
.slot-cell img {
  position: absolute;
  inset: 4px;
  width: 34px;
  height: 34px;
  image-rendering: pixelated;
  pointer-events: none;
}
.slot-cell .count {
  position: absolute;
  right: 3px;
  bottom: 0;
  font:
    bold 11px 'Segoe UI',
    sans-serif;
  text-shadow:
    0 1px 2px #000,
    0 0 3px #000;
}
.slot-cell .key {
  position: absolute;
  left: 3px;
  top: 1px;
  font:
    8px 'Segoe UI',
    sans-serif;
  color: var(--muted);
}
.slot-cell.usable {
  border-color: #cfac7077;
}
.slot-cell.held {
  box-shadow: 0 0 0 1px var(--gold) inset;
}
.slot-cell.picked {
  border-color: #ffe58e;
  background: #3a3a1fc0;
}
#equip-row {
  display: flex;
  gap: 18px;
  margin-bottom: 10px;
}
.equip {
  display: flex;
  align-items: center;
  gap: 8px;
  font:
    10px 'Segoe UI',
    sans-serif;
  color: var(--muted);
}

/* barra de ferramentas com ícones */
.hot {
  width: 58px;
  height: 58px;
}
.hot.wide {
  width: 78px;
  height: 84px;
}
.hot img {
  width: 34px;
  height: 34px;
  image-rendering: pixelated;
  pointer-events: none;
}
.hot.wide img {
  width: 36px;
  height: 36px;
}
.hot .count {
  position: absolute;
  right: 5px;
  bottom: 2px;
  font:
    bold 11px 'Segoe UI',
    sans-serif;
  text-shadow:
    0 1px 2px #000,
    0 0 3px #000;
}
.hot .label {
  font-size: 9px;
  text-align: center;
  line-height: 1.1;
}
.hot .cost {
  font-size: 8px;
  text-align: center;
  line-height: 1.1;
  padding: 0 2px;
}
#hotbar {
  gap: 5px;
}

/* painel de fabricação */
#craft-progress {
  margin: 4px 0 10px;
  font:
    11px 'Segoe UI',
    sans-serif;
  color: var(--cream);
}
#craft-progress .bar {
  height: 8px;
  margin-top: 4px;
  background: #0b100d;
  border: 1px solid #c6b78744;
  border-radius: 3px;
  overflow: hidden;
}
#craft-progress .bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(#e0b54e, #a97a24);
}
.recipe {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 7px 8px;
  border-bottom: 1px solid #c6b78718;
}
.recipe .out {
  width: 40px;
  height: 40px;
  flex: none;
  image-rendering: pixelated;
  background: #0e1410b0;
  border: 1px solid #c6b78733;
  border-radius: 4px;
  padding: 3px;
}
.recipe .info {
  flex: 1;
  min-width: 0;
  font:
    12px 'Segoe UI',
    sans-serif;
}
.recipe .costs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 3px 0;
}
.recipe .chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 10.5px;
  color: #d9e6c4;
}
.recipe .chip img {
  width: 18px;
  height: 18px;
  image-rendering: pixelated;
}
.recipe .chip.missing {
  color: #ff9c8a;
}
.recipe small {
  color: var(--muted);
  font-size: 9.5px;
}
.recipe button {
  padding: 6px 12px;
  background: #b89658;
  color: #1a1f17;
  border: 0;
  border-radius: 4px;
  font:
    600 11px 'Segoe UI',
    sans-serif;
}
.recipe button:disabled {
  background: #3a4238;
  color: #7d857a;
  cursor: not-allowed;
}
.recipe.poor .out {
  opacity: 0.6;
}
@media (max-width: 1100px) {
  #craft {
    top: 110px;
  }
}

#inventory {
  width: 430px;
}

/* ===== experiência, árvores, ferramentas rústicas e primeira pessoa ===== */
.xp {
  position: relative;
  height: 13px;
  margin: 0 0 6px;
  background: #0b100d;
  border: 1px solid #c6b78744;
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
}
.xp i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(#f0cf6a, #b28a2c);
  transition: width 0.3s;
}
.xp span {
  position: absolute;
  inset: 0;
  text-align: center;
  font:
    bold 9px/13px 'Segoe UI',
    sans-serif;
  text-shadow: 0 1px 2px #000;
}
#points-badge {
  display: block;
  width: 100%;
  margin: 0 0 6px;
  padding: 3px 6px;
  background: #f0cf6a;
  color: #2b2410;
  border: 0;
  border-radius: 3px;
  font:
    bold 10px 'Segoe UI',
    sans-serif;
  animation: pulse 1.3s infinite;
}

#progress {
  position: fixed;
  inset: 40px 50px 60px;
  z-index: 7;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse at 50% 90%, #2c2418f2, #14110dfa);
  border: 1px solid #c6b78755;
  border-radius: 8px;
  box-shadow: 0 30px 90px #000a;
  overflow: hidden;
}
#progress > header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 16px;
  border-bottom: 1px solid #c6b78733;
}
#progress .tabs {
  display: flex;
  gap: 6px;
}
#progress .tabs button {
  padding: 7px 16px;
  background: transparent;
  border: 1px solid #c6b78744;
  border-radius: 4px;
  font:
    12px 'Segoe UI',
    sans-serif;
}
#progress .tabs button.active {
  background: #cfac70;
  color: #1a1f17;
  border-color: #cfac70;
  font-weight: 600;
}
#tree-points {
  flex: 1;
  text-align: right;
  font:
    12px 'Segoe UI',
    sans-serif;
  color: #f0cf6a;
}
#progress .close {
  background: transparent;
  border: 0;
  font-size: 22px;
  line-height: 1;
}
#tree-viewport {
  position: relative;
  flex: 1;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}
#tree-viewport:active {
  cursor: grabbing;
}
.tree-canvas {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  transform-origin: 0 0;
}
.troot {
  position: absolute;
  left: 0;
  top: 0;
  width: 66px;
  height: 66px;
  margin: -33px 0 0 -33px;
  border-radius: 50%;
  background: radial-gradient(#f2d27a, #b48a2d);
  border: 2px solid #ffe9a8;
  box-shadow: 0 0 22px #f0cf6a88;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #2b2410;
}
.troot img {
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
}
.troot b {
  font:
    bold 15px 'Segoe UI',
    sans-serif;
  line-height: 1;
}
.tnode {
  position: absolute;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  padding: 0;
  border-radius: 50%;
  background: #1a1712;
  border: 2px solid var(--branch);
  display: flex;
  align-items: center;
  justify-content: center;
  filter: saturate(0.25) brightness(0.55);
}
.tnode img {
  width: 30px;
  height: 30px;
  image-rendering: pixelated;
  pointer-events: none;
}
.tnode.near {
  filter: saturate(0.7) brightness(0.8);
}
.tnode.available {
  filter: none;
  box-shadow: 0 0 14px var(--branch);
  animation: pulse 1.4s infinite;
}
.tnode.learned {
  filter: none;
  background: radial-gradient(#3b3220, #1a1712);
  box-shadow: 0 0 10px var(--branch) inset;
}
.tnode.selected {
  outline: 3px solid #fff3c9;
  outline-offset: 2px;
}
.tnode.skill {
  cursor: default;
}
.tcost {
  position: absolute;
  right: -5px;
  bottom: -5px;
  min-width: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: #0b0906;
  border: 1px solid var(--branch);
  font:
    bold 10px/15px 'Segoe UI',
    sans-serif;
  color: #f4ecd2;
  text-align: center;
}
.tline {
  position: absolute;
  height: 2px;
  transform-origin: 0 50%;
  background: #ffffff22;
  pointer-events: none;
}
.tline.lit {
  background: var(--branch);
  box-shadow: 0 0 6px var(--branch);
}
.tlabel {
  position: absolute;
  transform: translateX(-50%);
  width: 150px;
  text-align: center;
  font:
    bold 11px 'Segoe UI',
    sans-serif;
  text-shadow: 0 1px 3px #000;
  pointer-events: none;
}
.tlabel small {
  display: block;
  font-weight: 400;
  color: #d6d0b8;
  font-size: 10px;
}
#tree-detail {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 16px;
  min-height: 74px;
  border-top: 1px solid #c6b78733;
  background: #0d0a07cc;
  font:
    12px 'Segoe UI',
    sans-serif;
}
#tree-detail p {
  margin: 0;
  color: var(--muted);
  max-width: none;
}
#tree-detail .dhead {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}
#tree-detail .dhead b {
  display: block;
  font-size: 14px;
}
#tree-detail img.big {
  width: 44px;
  height: 44px;
  image-rendering: pixelated;
  background: #0e1410b0;
  border: 1px solid #c6b78733;
  border-radius: 4px;
  padding: 3px;
}
#tree-detail .dbody {
  flex: 1;
}
#tree-detail .reqs span {
  margin-right: 10px;
}
#tree-detail .reqs .ok {
  color: #a9d68a;
}
#tree-detail .reqs .no {
  color: #ff9c8a;
}
#tree-detail .blocker {
  color: #ff9c8a;
  max-width: 220px;
}
#tree-detail button.primary {
  white-space: nowrap;
}
#tree-detail button.primary:disabled {
  background: #3a4238;
  color: #7d857a;
  cursor: not-allowed;
}

/* receitas de mão e bloqueadas */
#hand-craft {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #c6b78722;
}
.recipe.compact {
  padding: 5px 4px;
}
.recipe.compact .out {
  width: 34px;
  height: 34px;
}
.recipe.locked {
  opacity: 0.55;
}
.lock-note {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  font-size: 10px;
  color: #f0cf6a;
}
.lock-note img {
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
}

/* primeira pessoa */
#fp-badge {
  position: fixed;
  top: 112px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  padding: 6px 14px;
  background: #182219cc;
  border: 1px solid #c6b78744;
  border-radius: 3px;
  font:
    11px 'Segoe UI',
    sans-serif;
  pointer-events: none;
}
body.first-person .topbar .brand {
  opacity: 0.4;
}
body.first-person #game {
  cursor: crosshair;
}
.hot.locked {
  opacity: 0.45;
}

#tree-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  padding: 7px 16px;
  border-bottom: 1px solid #c6b78722;
  font:
    11px 'Segoe UI',
    sans-serif;
}
.lchip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: var(--branch);
  font-weight: 600;
}
.lchip::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--branch);
  align-self: center;
}
.lchip small {
  color: #cfc9b2;
  font-weight: 400;
}
/* Personagens e fauna: painéis integrados ao mundo existente. */
#companion-tools {
  position: fixed;
  right: 24px;
  top: 170px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 6;
}
#companion-tools button {
  padding: 9px 13px;
  background: #18291de8;
  border: 1px solid #a58e5d77;
  border-radius: 4px;
  color: #e7dcc1;
  font:
    12px Georgia,
    serif;
}
.companion-dialog {
  width: min(880px, 94vw);
  max-width: 880px;
  max-height: 90vh;
  overflow: auto;
  background: #1d2923;
  color: #eee2c5;
  padding: 25px;
  border: 1px solid #ad946388;
  border-radius: 10px;
}
.companion-dialog header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  border-bottom: 1px solid #a58e5d44;
  margin-bottom: 20px;
}
.companion-dialog header h2 {
  margin: 8px 0 18px;
  font:
    27px Georgia,
    serif;
}
.companion-dialog header small {
  letter-spacing: 2px;
  color: #c8aa72;
}
.companion-dialog header button {
  background: none;
  border: 0;
  font-size: 26px;
}
.actor-layout {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
}
.actor-layout section {
  min-width: 0;
}
#actor-preview {
  width: 100%;
  height: 360px;
  background: radial-gradient(ellipse, #5a6751, #1b2925);
  border: 1px solid #75896a44;
  border-radius: 6px;
  image-rendering: pixelated;
}
.companion-dialog label {
  display: block;
  font:
    12px 'Segoe UI',
    sans-serif;
  margin-bottom: 12px;
  color: #d4c8ae;
}
.companion-dialog select {
  display: block;
  width: 100%;
  margin-top: 6px;
  background: #101d17;
  color: #eee2c5;
  border: 1px solid #79856b66;
  padding: 9px;
  border-radius: 3px;
  font:
    13px 'Segoe UI',
    sans-serif;
}
.companion-dialog button {
  padding: 8px 12px;
  background: #42573d;
  color: #eee2c5;
  border: 1px solid #98a07d55;
  border-radius: 3px;
  margin: 3px;
  cursor: pointer;
}
.companion-dialog button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.companion-dialog .companion-primary {
  background: #bd9d64;
  color: #172218;
  width: 100%;
  padding: 12px;
}
.companion-dialog p,
.companion-dialog small {
  font:
    12px/1.6 'Segoe UI',
    sans-serif;
  color: #b8c4ac;
}
.companion-dialog h3 {
  font:
    19px Georgia,
    serif;
  margin-top: 25px;
}
.companion-dialog #angle-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 8px 0;
}
.companion-dialog #angle-options button {
  padding: 5px 7px;
  font-size: 10px;
}
#actor-saved {
  display: block;
  padding: 10px;
  font:
    12px 'Segoe UI',
    sans-serif;
  color: #bcd991;
}
#fauna-levels {
  padding: 12px;
  background: #2c3b2b;
  border-radius: 4px;
  font:
    13px 'Segoe UI',
    sans-serif;
}
.trap-builder {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 22px;
  padding: 15px 0;
}
.trap-builder > div {
  grid-column: 1/-1;
}
.animal-card {
  padding: 14px;
  background: #26382c;
  border: 1px solid #64795544;
  border-radius: 5px;
  margin: 8px 0;
}
.animal-card strong {
  font:
    16px Georgia,
    serif;
}
.animal-card p {
  margin: 7px 0;
}
.animal-card small {
  display: block;
  color: #d9b375;
}
.training-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.training-row span {
  font:
    12px 'Segoe UI',
    sans-serif;
  color: #cbb98d;
}
@media (max-width: 700px) {
  .actor-layout {
    grid-template-columns: 1fr;
  }
  #actor-preview {
    height: 260px;
  }
  .companion-dialog {
    padding: 18px;
  }
  .trap-builder {
    grid-template-columns: 1fr;
  }
  .training-row {
    display: block;
  }
}

/* ===== baú, fogueira e manutenção da casa ===== */
#chest {
  right: auto;
  left: 32px;
  top: 150px;
  width: 420px;
  max-height: calc(100vh - 330px);
  overflow-y: auto;
}
.chest-label {
  margin: 8px 0 6px;
  font:
    bold 11px 'Segoe UI',
    sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream);
}
.chest-label small {
  color: #a9a58f;
  font-weight: normal;
  letter-spacing: 0;
}
.chest-grid {
  display: grid;
  grid-template-columns: repeat(8, 44px);
  gap: 5px;
}
.chest-grid .slot-cell.filled {
  cursor: pointer;
}
#craft-fire {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  padding: 8px 10px;
  background: #1a221c;
  border: 1px solid #c6b78744;
  border-radius: 4px;
  font:
    12px 'Segoe UI',
    sans-serif;
  color: var(--cream);
}
#craft-fire[hidden] {
  display: none;
}
#craft-fire.lit {
  border-color: #ff9a4a88;
  box-shadow: inset 0 0 14px #ff8a2a33;
}
#craft-fire button {
  padding: 5px 12px;
  background: #3a2a1a;
  color: #ffe6c2;
  border: 1px solid #d99a52;
  border-radius: 3px;
  cursor: pointer;
  font: inherit;
}
#craft-fire button:disabled {
  opacity: 0.45;
  cursor: default;
}
.upkeep {
  display: block;
  margin-top: 5px;
  max-width: 230px;
  font:
    11px/1.35 'Segoe UI',
    sans-serif;
  color: #cbd0b8;
}
.upkeep[hidden] {
  display: none;
}
.upkeep.warn {
  color: #ffb4a0;
}
