/* Fablewood — neutral ink UI, elemental pigment, and a physical forest arena. */
:root {
  --bg: #18171e;
  --panel: #24232c;
  --panel2: #302c35;
  --line: #b89b7440;
  --ink: #eee3d1;
  --muted: #b6a99f;
  --gold: #dbb77d;
  --green: #b8b2a4;
}
button {
  background: #332e36;
  border-color: #ba9c764d;
}
button:hover:not(:disabled) {
  background: #49404a;
  border-color: #d6b580;
}
button.primary {
  color: #2c2022;
}
.topbar,
footer {
  background: #1d1b23;
  color: #bcad9b;
}
.topbar .brandmark,
.topbar .eyebrow {
  color: #deb986;
}
.sidebar,
.sidebar.left,
.sidebar.right {
  background: #24212a;
}
.main,
.world-controls,
.region-heading {
  background: #292630;
}
.world-wrap {
  background: #252a36;
}
.slot,
.location-card,
.equipment-card,
.journal-item,
.deck-list,
.deck-row,
.element-choice {
  background: #302b34;
}
.dialog {
  background: #26222c;
  border-color: #b99a7066;
}
.overlay {
  background: #14121cda;
}
.onboarding {
  background: radial-gradient(ellipse at top, #473b3e, #231f2a 70%);
}
.element-choice.selected {
  background: #534333;
}
.card {
  border: 5px solid var(--element);
  background: #f0e3cc;
  color: #29212a;
  border-radius: 9px 3px;
  box-shadow:
    0 4px 0 var(--element-dark),
    0 8px 18px #08070aaa;
}
.card .card-top {
  background: var(--element-dark);
  color: #fff1de;
  border-color: #ffffff22;
}
.card h3 {
  color: inherit;
}
.card .card-type {
  background: var(--element);
  color: #211a21;
  font-weight: 800;
  letter-spacing: 0.8px;
}
.card .card-text {
  background: #f0e3cc;
  color: #29212a;
  font-style: normal;
}
.card .card-bottom {
  background: var(--element-light);
  color: #30232d;
  border-color: var(--element);
}
.card .card-flavour {
  padding: 6px 8px;
  min-height: 38px;
  margin: 0;
  border-top: 1px solid #8b6b4e42;
  background: #e6d6b9;
  color: #625042;
  font:
    italic 10px/1.25 Georgia,
    serif;
}
.hand .card-wrap.dim .card {
  filter: brightness(0.89);
}
.card img {
  background: #292436;
  object-fit: cover;
}
.battle {
  background:
    linear-gradient(#18141a25, #18141a30),
    url('./assets/fablewood-clearing.png') center/cover fixed;
  isolation: isolate;
}
.battle .board {
  background: #1f1b231a;
  border: 0;
  border-bottom: 1px solid #ecd5b126;
  box-shadow: inset 0 -15px 25px #251e1f12;
}
.battle .empty {
  color: #f0dfc3;
  text-shadow: 0 1px 3px #160f16;
  padding: 12px 20px;
  align-self: center;
  background: #201c2466;
  border-radius: 4px;
}
.enemy-hero {
  background: linear-gradient(110deg, #2d2531f5, #211d27ed);
  border: 2px solid #bca080;
  box-shadow: 0 5px 16px #130c1499;
}
.hero-sigil {
  color: #d9b780;
}
.enemy-hero.attack-target:hover {
  background: #573034;
}
.battle .phase-banner {
  background: #211d28ec;
  border: 1px solid #bda27c99;
  border-radius: 4px;
  box-shadow: 0 3px 12px #1c121a55;
}
.battle .attack-banner {
  background: #4b292dee;
  border-color: #f6a48a;
}
.battle .unit {
  background: var(--element-dark);
  border: 3px solid var(--element);
  border-radius: 6px 2px;
  box-shadow:
    0 3px 0 #201924,
    0 6px 12px #170c1966;
}
.battle .unit-name {
  background: var(--element-dark);
  color: #fff0dc;
  font-weight: bold;
}
.battle .unit-stats {
  background: var(--element-light);
  color: #281f27;
  font-size: 15px;
}
.battle .unit-label {
  background: var(--element-dark);
  color: #f2e8d8;
}
.battle .unit.can-attack {
  box-shadow:
    0 0 0 1px #f2d59c77,
    0 5px 14px #130d18aa;
}
.battle .unit.can-attack .unit-label {
  color: #ffe5a4;
}
.battle .unit.attack-selected {
  border-color: #ff8c7b;
}
.battle .unit .block-label {
  background: #a9bbcf;
  color: #192438;
}
.battle .unit.attacking:before {
  top: -16px;
  border-radius: 3px;
}
.battle .battle-bottom {
  background: #211d28e8;
  padding: 8px 12px;
  border: 1px solid #bc987357;
  border-radius: 6px;
}
.battle .duelist .life {
  background: #643b40;
  color: #ffe4d2;
  border-color: #c38a78;
}
.battle .duelist h2 {
  color: #eee2cd;
}
.battle .mana-panel {
  background: #1c2d43;
  border-color: #7692b56b;
}
.battle .own-board.summon-target {
  background: #c4ac8025;
  border: 2px dashed #efd8a1;
}
.battle > p.muted {
  color: #f5e6ce;
  text-shadow: 0 1px 4px #100d14;
  margin: 0;
}
.battle .combat-log {
  color: #c5b8ae;
}
.battle .hand {
  padding: 9px 12px 3px;
  background: linear-gradient(transparent, #19151e99);
  border-radius: 12px;
}
.unit.in-flight,
.hand .card.in-flight {
  opacity: 0.18 !important;
}
.card-flight {
  z-index: 65;
  pointer-events: none !important;
  margin: 0 !important;
  animation: none !important;
  box-shadow:
    0 0 0 2px #ffe3a9,
    0 0 25px var(--flight-color),
    0 15px 22px #09060eaa !important;
  transform-origin: center;
  will-change: transform;
}
.card-flight.unit img {
  width: 100%;
  height: 45%;
  object-fit: cover;
  image-rendering: pixelated;
}
.card-flight .card-flavour {
  font-size: 9px;
}
.combat-busy button {
  pointer-events: none;
}
.resolving-label {
  color: #f3d4a7;
  font: 12px system-ui;
  white-space: nowrap;
}
.strike-spark {
  position: fixed;
  z-index: 66;
  width: 90px;
  height: 90px;
  background: var(--flight-color);
  clip-path: polygon(
    50% 0,
    58% 35%,
    85% 15%,
    66% 44%,
    100% 50%,
    64% 58%,
    84% 85%,
    56% 66%,
    50% 100%,
    42% 65%,
    15% 85%,
    35% 57%,
    0 50%,
    35% 42%,
    15% 15%,
    43% 35%
  );
  pointer-events: none;
  animation: hit-burst 0.48s ease-out both;
}
@keyframes hit-burst {
  from {
    transform: translate(-50%, -50%) scale(0.2) rotate(0deg);
    opacity: 1;
  }
  to {
    transform: translate(-50%, -50%) scale(1.25) rotate(20deg);
    opacity: 0;
  }
}
.fallen-card {
  z-index: 64;
  pointer-events: none;
  animation: none !important;
}
.fallen-label {
  position: absolute;
  inset: 30% 0 auto;
  background: #34222be8;
  color: #f9beaa;
  font: 700 11px system-ui;
  padding: 8px;
  text-align: center;
}
@media (min-width: 761px) and (max-height: 820px) {
  .battle {
    padding: 7px 20px;
    gap: 5px;
  }
  .battle .board {
    min-height: 91px;
    padding: 4px;
  }
  .battle .unit {
    width: 139px;
  }
  .battle .unit img {
    height: 33px;
  }
  .battle .unit-name {
    padding: 2px 4px;
    line-height: 1.2;
  }
  .battle .unit-stats {
    padding: 2px 8px;
    font-size: 13px;
    line-height: 1.1;
  }
  .battle .unit-label {
    padding: 2px;
    line-height: 1.2;
  }
  .battle .hand {
    padding-top: 4px;
  }
  .battle .hand .card-wrap {
    width: 142px;
  }
  .battle .hand .card img {
    height: 50px;
  }
  .battle .hand .card-text {
    min-height: 34px;
    line-height: 1.2;
    padding: 5px;
  }
  .battle .hand .card-flavour {
    min-height: 29px;
    padding: 4px 5px;
    font-size: 9px;
    line-height: 1.15;
  }
  .battle .hand .card-bottom {
    padding: 2px 5px;
    font-size: 11px;
  }
  .battle .hand .card-type {
    padding: 3px 5px;
    font-size: 7px;
  }
  .battle .battle-bottom {
    padding: 4px 9px;
  }
  .battle .enemy-hero {
    padding: 4px 12px;
  }
  .battle .enemy-hero .life {
    height: 40px;
    width: 40px;
    font-size: 23px;
  }
}
@media (max-width: 760px) {
  .battle {
    background-attachment: scroll;
    background-position: center top;
  }
  .battle .unit {
    width: 100px;
    flex: 0 0 100px;
  }
  .battle .battle-bottom {
    padding: 10px;
  }
  .battle .hand .card-wrap {
    width: 140px;
  }
  .battle .hand .card-flavour {
    min-height: 34px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .strike-spark {
    display: none;
  }
}

.card-flight.unit {
  background: var(--element-dark);
  border: 3px solid var(--element);
  border-radius: 6px 2px;
}
.card-flight .unit-name,
.card-flight .unit-label {
  background: var(--element-dark);
  color: #fff0dc;
}
.card-flight .unit-stats {
  background: var(--element-light);
  color: #281f27;
}
