:root {
  --bg: #eee7d8;
  --panel: #fff9ed;
  --ink: #171614;
  --muted: #655f55;
  --line: rgba(28, 25, 20, 0.18);
  --red: #8d2e32;
  --gold: #b9822e;
  --green: #2e614d;
  --blue: #274967;
  --violet: #4a3b62;
  --shadow: 0 18px 45px rgba(30, 26, 20, 0.16);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 10%, rgba(185, 130, 46, 0.18), transparent 30%),
    linear-gradient(135deg, #eee7d8, #d9e0cf 55%, #d7d2c4);
  font-family: Arial, sans-serif;
}

body:not(.game-started) {
  overflow-x: hidden;
  overflow-y: auto;
}

body:not(.game-started) .game-shell {
  display: none;
}

body.game-started .start-screen {
  display: none;
}

button,
input {
  font: inherit;
}

button {
  min-height: 38px;
  border: 1px solid rgba(23, 22, 20, 0.18);
  border-radius: 7px;
  background: var(--ink);
  color: #fff9ed;
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  background: var(--red);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffdf7;
  color: var(--ink);
}

.account-panel {
  width: min(1400px, calc(100% - 32px));
  margin: 18px auto 0;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
  gap: 16px;
  align-items: end;
  background: rgba(255, 250, 238, 0.9);
  border: 1px solid rgba(73, 46, 27, 0.15);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.account-panel h2,
.account-panel p {
  margin: 0;
}

.account-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.account-form input {
  width: 100%;
}

.account-form #accountName {
  grid-column: span 2;
}

.remember-login {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 253, 247, 0.72);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.remember-login input {
  width: auto;
}

.account-form button {
  min-height: 40px;
}

.start-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  align-items: stretch;
  background:
    linear-gradient(90deg, rgba(16, 14, 11, 0.82), rgba(16, 14, 11, 0.22)),
    radial-gradient(circle at 75% 30%, rgba(185, 130, 46, 0.25), transparent 28%),
    #151615;
  color: #fff9ed;
}

.start-art {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(141, 46, 50, 0.35), rgba(39, 73, 103, 0.36)),
    radial-gradient(circle at 40% 30%, rgba(255, 249, 237, 0.16), transparent 32%);
}

.start-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.04) contrast(1.04);
}

.start-art::before,
.start-art::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.start-art::before {
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(17, 13, 11, 0.08), rgba(17, 13, 11, 0.02), rgba(17, 13, 11, 0.34)),
    linear-gradient(180deg, rgba(17, 13, 11, 0.12), transparent 45%, rgba(17, 13, 11, 0.34));
}

.start-art::after {
  z-index: 2;
  inset: auto 0 0;
  height: 34%;
  background: linear-gradient(0deg, rgba(17, 13, 11, 0.58), transparent);
}

.medallion-mark {
  position: absolute;
  z-index: 3;
  width: 96px;
  aspect-ratio: 1;
  right: 28px;
  bottom: 24px;
  border-radius: 50%;
  border: 9px solid rgba(185, 130, 46, 0.92);
  background:
    radial-gradient(circle, rgba(255, 249, 237, 0.95) 0 14%, transparent 15%),
    conic-gradient(from 45deg, rgba(185, 130, 46, 0.94), rgba(141, 46, 50, 0.85), rgba(39, 73, 103, 0.88), rgba(185, 130, 46, 0.94));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
}

.medallion-mark::before {
  content: "";
  position: absolute;
  inset: 20%;
  clip-path: polygon(50% 0, 65% 38%, 100% 50%, 65% 62%, 50% 100%, 35% 62%, 0 50%, 35% 38%);
  background: #fff9ed;
}

.start-content {
  align-self: center;
  padding: clamp(28px, 7vw, 88px);
}

.start-content h1 {
  max-width: 820px;
  color: #fff9ed;
  font-size: clamp(3rem, 8vw, 7rem);
}

.start-lead {
  max-width: 720px;
  margin: 22px 0 26px;
  color: rgba(255, 249, 237, 0.86);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.hero-select {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.hero-choice {
  height: auto;
  min-height: 132px;
  display: grid;
  justify-items: start;
  gap: 7px;
  padding: 14px;
  text-align: left;
  background: rgba(255, 249, 237, 0.1);
  border-color: rgba(255, 249, 237, 0.22);
  color: #fff9ed;
}

.hero-choice.selected {
  background: rgba(185, 130, 46, 0.28);
  border-color: rgba(255, 249, 237, 0.82);
}

.hero-choice small,
.active-hero small {
  color: rgba(255, 249, 237, 0.76);
  line-height: 1.3;
}

.portrait {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2px solid rgba(255, 249, 237, 0.62);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--blue));
  color: #fff9ed;
  font-weight: 900;
  overflow: hidden;
}

.portrait-art {
  width: 132%;
  height: 132%;
  object-fit: contain;
  object-position: center 32%;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.26));
}

.portrait.small {
  width: 42px;
  height: 42px;
  border-color: rgba(141, 46, 50, 0.36);
}

.portrait-galinor { background: linear-gradient(145deg, #1f5a43, #d7a743); }
.portrait-jim { background: linear-gradient(145deg, #5a3b22, #8b8f94); }
.portrait-tot { background: linear-gradient(145deg, #2e614d, #b6c77c); }
.portrait-boranor { background: linear-gradient(145deg, #7e3a31, #c68c42); }
.portrait-stanidar { background: linear-gradient(145deg, #2b1717, #a83223 48%, #f1a544); }
.portrait-mitodar { background: linear-gradient(145deg, #3d3327, #a87d42 54%, #d8c58c); color: #171614; }
.portrait-mihodar { background: linear-gradient(145deg, #f4e8a7, #355f7a); color: #171614; }
.portrait-vera { background: linear-gradient(145deg, #4a3b62, #d2b16a); }
.portrait-drakar { background: linear-gradient(145deg, #74261f, #ff7c37); }
.portrait-marie { background: linear-gradient(145deg, #3a6c47, #f0ead0); color: #171614; }

#startGame {
  min-width: 190px;
  background: var(--gold);
  color: #19140c;
}

.game-shell {
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 249, 237, 0.82);
  box-shadow: var(--shadow);
}

.active-hero {
  min-width: 230px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(141, 46, 50, 0.18);
  border-radius: 8px;
  background: rgba(141, 46, 50, 0.08);
}

.active-hero strong,
.active-hero small {
  display: block;
}

.active-hero small {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  color: var(--red);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 0.95;
}

h2 {
  margin: 0 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
}

h3 {
  margin: 0 0 8px;
  color: var(--red);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
}

.player-card {
  width: min(260px, 100%);
}

.player-profile {
  min-width: 270px;
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(46, 97, 77, 0.22);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.78);
  color: var(--ink);
}

.player-profile strong,
.player-profile span {
  display: block;
}

.player-profile strong {
  color: var(--green);
  font-size: 0.95rem;
}

.player-profile span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.25;
}

.language-select {
  min-width: 104px;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.language-select select {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffdf7;
  color: var(--ink);
  font-weight: 800;
}

.start-language {
  max-width: 130px;
  margin: 0 0 16px;
  color: rgba(255, 249, 237, 0.76);
}

.start-language select {
  border-color: rgba(255, 249, 237, 0.26);
  background: rgba(255, 249, 237, 0.12);
  color: #fff9ed;
}

.start-language option {
  color: var(--ink);
}

.player-card label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 280px;
  gap: 16px;
  margin-top: 16px;
}

.panel,
.main-board {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 249, 237, 0.9);
  box-shadow: var(--shadow);
}

.panel {
  padding: 16px;
  margin-bottom: 16px;
}

.home-city {
  min-height: 84px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(46, 97, 77, 0.1);
}

.home-city strong {
  display: block;
  margin-bottom: 4px;
  color: var(--green);
  font-size: 1.1rem;
}

.meters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.meters div,
.resource {
  padding: 9px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(28, 25, 20, 0.1);
}

.meters span,
.resource span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}

.meters strong,
.resource strong {
  display: block;
  margin-top: 2px;
  font-size: 1.1rem;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.clan-row {
  display: grid;
  grid-template-columns: 1fr 84px;
  gap: 8px;
}

.small-text {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.main-board {
  overflow: hidden;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(23, 22, 20, 0.06);
}

.tab {
  flex: 1 1 82px;
  padding-left: 10px;
  padding-right: 10px;
  background: transparent;
  color: var(--ink);
}

.tab.active {
  background: var(--red);
  color: #fff9ed;
}

.tab-panel {
  display: none;
  padding: 18px;
}

.tab-panel.active {
  display: block;
}

.map-wrap {
  position: relative;
  min-height: 430px;
  border: 1px solid rgba(28, 25, 20, 0.12);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(46, 97, 77, 0.18), rgba(185, 130, 46, 0.12)),
    #e6dfce;
}

.realm-map {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 430px;
}

.map-traveler {
  position: absolute;
  left: var(--map-x, 50%);
  top: var(--map-y, 50%);
  z-index: 3;
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 96px;
  transform: translate(-50%, -92%);
  transition: left 700ms cubic-bezier(0.22, 0.9, 0.25, 1), top 700ms cubic-bezier(0.22, 0.9, 0.25, 1);
  pointer-events: none;
}

.map-traveler img {
  width: 62px;
  height: 86px;
  object-fit: contain;
  filter: drop-shadow(0 12px 12px rgba(0, 0, 0, 0.35));
}

.map-traveler.map-hero-drakar {
  width: 138px;
  transform: translate(-50%, -84%);
}

.map-traveler.map-hero-drakar img {
  width: 118px;
  height: 94px;
  filter: drop-shadow(0 15px 13px rgba(0, 0, 0, 0.44));
}

.map-traveler img[hidden] {
  display: none;
}

.map-traveler::before {
  content: "";
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(255, 249, 237, 0.9);
  background: radial-gradient(circle, var(--gold), var(--red));
  box-shadow: 0 0 0 5px rgba(46, 97, 77, 0.22), 0 12px 18px rgba(22, 22, 21, 0.22);
}

.map-traveler:has(img:not([hidden]))::before {
  display: none;
}

.map-traveler.lost {
  filter: drop-shadow(0 0 16px rgba(141, 46, 50, 0.58));
}

.map-traveler.lost span {
  background: rgba(96, 25, 33, 0.9);
}

.map-traveler.lost::after {
  content: "?";
  position: absolute;
  right: 10px;
  top: 6px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff9ed;
  color: var(--red);
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(22, 22, 21, 0.24);
}

.map-traveler span {
  max-width: 120px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(23, 22, 20, 0.86);
  color: #fff9ed;
  font-size: 0.68rem;
  font-weight: 900;
  text-align: center;
  line-height: 1.15;
  box-shadow: 0 7px 16px rgba(22, 22, 21, 0.18);
}

.map-journey-status {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 4;
  padding: 8px 10px;
  border: 1px solid rgba(255, 249, 237, 0.62);
  border-radius: 8px;
  background: rgba(23, 22, 20, 0.74);
  color: #fff9ed;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 12px 24px rgba(22, 22, 21, 0.18);
}

.map-road {
  fill: none;
  stroke: rgba(97, 70, 35, 0.5);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 1 22;
}

.map-river {
  fill: none;
  stroke: url(#river);
  stroke-width: 24;
  stroke-linecap: round;
  opacity: 0.55;
}

.city-node {
  cursor: pointer;
}

.city-node circle {
  fill: #fff9ed;
  stroke: var(--red);
  stroke-width: 4;
}

.city-node.active circle {
  fill: var(--gold);
  stroke: var(--ink);
}

.city-node.current circle {
  stroke: var(--green);
  stroke-width: 7;
}

.city-node.home circle {
  filter: drop-shadow(0 0 8px rgba(185, 130, 46, 0.72));
}

.city-node text {
  fill: var(--ink);
  font-weight: 800;
  text-anchor: middle;
  pointer-events: none;
}

.map-enemy {
  opacity: 0.74;
  pointer-events: none;
}

.map-enemy circle {
  fill: rgba(23, 22, 20, 0.82);
  stroke: rgba(141, 46, 50, 0.92);
  stroke-width: 3;
  filter: drop-shadow(0 6px 8px rgba(23, 22, 20, 0.28));
}

.map-enemy text {
  fill: #fff9ed;
  font-size: 13px;
  font-weight: 900;
  text-anchor: middle;
}

.map-enemy.active {
  opacity: 1;
}

.map-enemy.active circle {
  fill: #8d2e32;
  stroke: #fff1ba;
  stroke-width: 4;
}

.city-icon {
  font-size: 28px;
}

.city-info {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(220px, 0.7fr);
  gap: 14px;
  margin-top: 14px;
}

.info-card,
.action-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.72);
}

.action-card.completed {
  background: rgba(46, 97, 77, 0.1);
  border-color: rgba(46, 97, 77, 0.28);
}

.info-card p,
.action-card p,
.market-head p,
.battle-banner p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(39, 73, 103, 0.11);
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 800;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dragon-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dragon-card {
  min-height: 238px;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(23, 22, 20, 0.04), rgba(185, 130, 46, 0.1)),
    rgba(255, 253, 247, 0.76);
}

.dragon-card.selected {
  border-color: rgba(185, 130, 46, 0.68);
  background:
    linear-gradient(135deg, rgba(185, 130, 46, 0.22), rgba(46, 97, 77, 0.1)),
    rgba(255, 253, 247, 0.86);
}

.dragon-card img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.28));
}

.dragon-card h3 {
  margin-bottom: 5px;
}

.dragon-card p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.45;
}

.dragon-card .cost {
  display: block;
  margin-top: 5px;
}

.dragon-card .tag-row {
  grid-column: 1 / -1;
  margin-top: 0;
}

.dragon-card .tag-row button {
  flex: 1 1 120px;
}

.action-card {
  display: grid;
  gap: 12px;
}

.cost {
  color: var(--muted);
  font-size: 0.86rem;
}

.market-head,
.battle-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(46, 97, 77, 0.12), rgba(39, 73, 103, 0.12));
  border: 1px solid var(--line);
}

.battle-banner {
  background: linear-gradient(135deg, rgba(141, 46, 50, 0.15), rgba(74, 59, 98, 0.13));
}

.battle-result {
  min-height: 100px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.75);
  line-height: 1.6;
}

.player-control-panel {
  display: grid;
  grid-template-columns: minmax(190px, 0.34fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.74);
}

.player-control-panel h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.player-control-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.hero-select.compact {
  grid-template-columns: repeat(10, minmax(58px, 1fr));
  gap: 8px;
}

.hero-select.compact .hero-choice {
  min-height: 104px;
  padding: 8px 6px;
}

.hero-select.compact .portrait {
  width: 42px;
  height: 42px;
}

.hero-select.compact small {
  display: none;
}

.play-scene {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  cursor: crosshair;
  border: 1px solid rgba(28, 25, 20, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(0deg, rgba(22, 24, 17, 0.12), rgba(22, 24, 17, 0.04)),
    url("assets/homestead-scene.png") center / cover no-repeat;
  box-shadow: inset 0 -18px 42px rgba(24, 22, 18, 0.12);
}

.play-scene.expanded {
  position: fixed;
  inset: 10px;
  z-index: 200;
  min-height: calc(100vh - 20px);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

.play-scene.tactical-battle {
  box-shadow:
    inset 0 -18px 42px rgba(24, 22, 18, 0.12),
    inset 0 0 0 2px rgba(185, 130, 46, 0.2);
}

.play-scene.tactical-battle .scene-sky {
  background:
    radial-gradient(ellipse at 72% 68%, rgba(185, 130, 46, 0.14), transparent 26%),
    linear-gradient(180deg, rgba(255, 249, 237, 0.06), rgba(23, 22, 20, 0.18));
}

.play-scene::before,
.play-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  transition: opacity 360ms ease, background 360ms ease, transform 360ms ease;
}

.play-scene::before {
  opacity: 0.42;
}

.play-scene::after {
  opacity: 0.34;
}

.play-scene.scene-land-ivanor::before {
  background:
    radial-gradient(circle at 22% 76%, rgba(85, 128, 50, 0.42), transparent 18%),
    radial-gradient(circle at 82% 70%, rgba(185, 65, 37, 0.2), transparent 16%),
    linear-gradient(90deg, rgba(255, 249, 237, 0.03), transparent);
}

.play-scene.scene-land-ivanor::after {
  background:
    linear-gradient(108deg, transparent 0 50%, rgba(139, 95, 47, 0.18) 51% 56%, transparent 57%),
    radial-gradient(ellipse at 68% 28%, rgba(72, 68, 61, 0.22), transparent 20%);
}

.play-scene.scene-land-vetromir::before {
  background:
    repeating-linear-gradient(0deg, rgba(198, 166, 75, 0.24) 0 18px, rgba(88, 128, 55, 0.18) 18px 34px),
    radial-gradient(circle at 72% 25%, rgba(255, 249, 237, 0.22), transparent 10%);
}

.play-scene.scene-land-vetromir::after {
  background:
    conic-gradient(from 45deg at 70% 28%, rgba(255, 249, 237, 0.38) 0 7%, transparent 7% 25%, rgba(255, 249, 237, 0.3) 25% 32%, transparent 32% 100%),
    radial-gradient(circle at 70% 28%, rgba(108, 78, 41, 0.28), transparent 7%);
}

.play-scene.scene-land-tarkon::before {
  background:
    linear-gradient(32deg, transparent 0 44%, rgba(101, 70, 40, 0.24) 45% 49%, transparent 50%),
    linear-gradient(148deg, transparent 0 58%, rgba(101, 70, 40, 0.22) 59% 63%, transparent 64%);
}

.play-scene.scene-land-tarkon::after {
  background:
    radial-gradient(ellipse at 22% 68%, rgba(86, 58, 34, 0.28), transparent 13%),
    radial-gradient(ellipse at 76% 54%, rgba(97, 54, 32, 0.24), transparent 12%);
}

.play-scene.scene-land-navaris::before {
  background:
    repeating-linear-gradient(90deg, rgba(39, 73, 103, 0.16) 0 22px, transparent 22px 46px),
    radial-gradient(circle at 78% 66%, rgba(230, 228, 210, 0.28), transparent 16%);
}

.play-scene.scene-land-navaris::after {
  background:
    linear-gradient(0deg, transparent 0 68%, rgba(255, 249, 237, 0.18) 69% 73%, transparent 74%),
    radial-gradient(ellipse at 64% 48%, rgba(185, 130, 46, 0.2), transparent 16%);
}

.play-scene.scene-land-glinor::before {
  background:
    radial-gradient(circle at 20% 32%, rgba(46, 97, 77, 0.32), transparent 22%),
    radial-gradient(circle at 84% 68%, rgba(82, 135, 79, 0.32), transparent 24%),
    linear-gradient(180deg, rgba(22, 62, 48, 0.14), transparent 44%);
}

.play-scene.scene-land-glinor::after {
  background:
    radial-gradient(circle at 58% 58%, rgba(181, 225, 156, 0.18), transparent 10%),
    radial-gradient(circle at 38% 72%, rgba(181, 225, 156, 0.16), transparent 9%);
}

.play-scene.scene-land-teramor::before {
  background:
    radial-gradient(ellipse at 68% 28%, rgba(72, 72, 72, 0.4), transparent 22%),
    radial-gradient(ellipse at 22% 78%, rgba(88, 75, 66, 0.34), transparent 24%);
}

.play-scene.scene-land-teramor::after {
  background:
    linear-gradient(122deg, transparent 0 44%, rgba(255, 130, 45, 0.2) 45% 47%, transparent 48%),
    radial-gradient(circle at 75% 55%, rgba(255, 116, 42, 0.18), transparent 10%);
}

.play-scene.scene-land-drakaris::before {
  background:
    radial-gradient(ellipse at 70% 20%, rgba(85, 75, 85, 0.45), transparent 28%),
    radial-gradient(ellipse at 28% 72%, rgba(92, 43, 34, 0.36), transparent 24%),
    linear-gradient(180deg, rgba(46, 26, 26, 0.14), transparent 45%);
}

.play-scene.scene-land-drakaris::after {
  background:
    radial-gradient(circle at 72% 42%, rgba(255, 108, 45, 0.26), transparent 8%),
    radial-gradient(circle at 60% 36%, rgba(185, 50, 36, 0.18), transparent 11%);
}

.play-scene.scene-route {
  background:
    linear-gradient(0deg, rgba(22, 24, 17, 0.16), rgba(22, 24, 17, 0.04)),
    url("assets/homestead-scene.png") center / 148% auto no-repeat;
}

.play-scene.scene-route .scene-hotspot,
.play-scene.scene-route .scene-field,
.play-scene.scene-route .scene-orchard,
.play-scene.scene-route .scene-spot {
  opacity: 0;
  pointer-events: none;
}

.play-scene.route-north {
  background-position: center top;
  background-color: #526a49;
}

.play-scene.route-east {
  background-position: right center;
  background-color: #6c624c;
}

.play-scene.route-south {
  background-position: center bottom;
  background-color: #7d6a4a;
}

.play-scene.route-west {
  background-position: left center;
  background-color: #496b63;
}

.play-scene.scene-route::before {
  opacity: 0.92;
}

.play-scene.route-north::before {
  background:
    linear-gradient(0deg, transparent 0 18%, rgba(116, 84, 46, 0.55) 35% 58%, transparent 76%),
    radial-gradient(circle at 18% 34%, rgba(45, 92, 54, 0.42), transparent 21%),
    radial-gradient(circle at 82% 60%, rgba(48, 100, 66, 0.38), transparent 24%);
}

.play-scene.route-east::before {
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(124, 87, 48, 0.54) 34% 58%, transparent 78%),
    radial-gradient(ellipse at 20% 70%, rgba(80, 87, 71, 0.36), transparent 20%),
    radial-gradient(ellipse at 78% 28%, rgba(114, 101, 77, 0.4), transparent 22%);
}

.play-scene.route-south::before {
  background:
    linear-gradient(180deg, transparent 0 16%, rgba(129, 92, 49, 0.52) 34% 58%, transparent 78%),
    radial-gradient(circle at 28% 68%, rgba(107, 82, 50, 0.38), transparent 22%),
    radial-gradient(circle at 74% 26%, rgba(86, 112, 61, 0.28), transparent 20%);
}

.play-scene.route-west::before {
  background:
    linear-gradient(270deg, transparent 0 18%, rgba(116, 84, 46, 0.52) 34% 58%, transparent 78%),
    radial-gradient(circle at 22% 28%, rgba(45, 94, 87, 0.34), transparent 23%),
    radial-gradient(circle at 76% 72%, rgba(58, 95, 59, 0.36), transparent 24%);
}

.play-scene.scene-route::after {
  opacity: 0.72;
  background:
    radial-gradient(ellipse at 50% 82%, rgba(46, 34, 24, 0.22), transparent 22%),
    linear-gradient(90deg, rgba(24, 23, 19, 0.16), transparent 24%, transparent 74%, rgba(24, 23, 19, 0.16));
}

.play-scene.scene-route.route-stage-2::after {
  opacity: 0.84;
  background:
    radial-gradient(ellipse at 50% 28%, rgba(255, 249, 237, 0.14), transparent 18%),
    radial-gradient(ellipse at 50% 82%, rgba(37, 31, 25, 0.24), transparent 24%),
    linear-gradient(90deg, rgba(20, 32, 28, 0.18), transparent 27%, transparent 73%, rgba(20, 32, 28, 0.18));
}

.play-scene.travel-left::before,
.play-scene.travel-right::before,
.play-scene.travel-north::before,
.play-scene.travel-east::before,
.play-scene.travel-south::before,
.play-scene.travel-west::before {
  opacity: 0.58;
  background:
    linear-gradient(90deg, transparent 0 30%, rgba(120, 86, 44, 0.28) 42% 52%, transparent 64%),
    radial-gradient(ellipse at 50% 78%, rgba(86, 70, 48, 0.28), transparent 26%);
  animation: roadSlide 1250ms ease-in-out both;
}

.play-scene.travel-right::before,
.play-scene.travel-west::before,
.play-scene.travel-south::before {
  animation-direction: reverse;
}

.play-scene.travel-north::before,
.play-scene.travel-south::before {
  background:
    linear-gradient(0deg, transparent 0 28%, rgba(120, 86, 44, 0.28) 42% 52%, transparent 66%),
    radial-gradient(ellipse at 50% 58%, rgba(86, 70, 48, 0.28), transparent 26%);
  animation-name: roadSlideY;
}

.play-scene.scene-lost-road::after {
  opacity: 1;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(20, 17, 22, 0.28), transparent 36%),
    linear-gradient(90deg, rgba(24, 23, 19, 0.16), transparent 26%, transparent 72%, rgba(24, 23, 19, 0.16));
}

.scene-sky {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(255, 249, 237, 0.06), rgba(23, 22, 20, 0.1));
  pointer-events: none;
}

.scene-place {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 7;
  padding: 7px 11px;
  border: 1px solid rgba(255, 249, 237, 0.58);
  border-radius: 999px;
  background: rgba(23, 22, 20, 0.72);
  color: #fff9ed;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 10px 22px rgba(22, 22, 21, 0.18);
}

.scene-collapse {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 9;
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 249, 237, 0.68);
  border-radius: 8px;
  background: rgba(23, 22, 20, 0.76);
  color: #fff9ed;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 10px 22px rgba(22, 22, 21, 0.2);
  cursor: pointer;
}

.scene-road-control {
  position: absolute;
  top: 50%;
  z-index: 12;
  display: grid;
  place-items: center;
  width: 38px;
  height: 54px;
  min-height: 0;
  padding: 0;
  border: 1px solid rgba(255, 249, 237, 0.62);
  border-radius: 8px;
  background: rgba(23, 22, 20, 0.5);
  color: #fff9ed;
  font-size: 2rem;
  line-height: 1;
  transform: translateY(-50%);
  box-shadow: 0 12px 24px rgba(22, 22, 21, 0.18);
}

.scene-road-control:hover,
.scene-road-control:focus-visible {
  outline: 0;
  background: rgba(23, 22, 20, 0.72);
}

.road-prev,
.road-west {
  left: 10px;
}

.road-next,
.road-east {
  right: 10px;
}

.road-north,
.road-south {
  left: 50%;
  width: 54px;
  height: 38px;
  transform: translateX(-50%);
}

.road-north {
  top: 10px;
}

.road-south {
  top: auto;
  bottom: 10px;
}

.play-scene.expanded .scene-collapse {
  display: inline-flex;
}

.scene-mission-dock {
  position: absolute;
  right: 14px;
  top: 62px;
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  width: 46px;
  pointer-events: auto;
}

.scene-mission-card {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  min-height: 44px;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255, 249, 237, 0.38);
  border-radius: 50%;
  background: rgba(23, 22, 20, 0.34);
  color: #fff9ed;
  box-shadow: 0 6px 14px rgba(22, 22, 21, 0.12);
  cursor: pointer;
  isolation: isolate;
  backdrop-filter: blur(2px);
}

.scene-mission-card::after {
  display: none;
}

.scene-mission-card:hover {
  transform: none;
  box-shadow: 0 6px 14px rgba(22, 22, 21, 0.12);
}

.scene-mission-card strong {
  display: block;
  width: 100%;
  overflow: hidden;
  color: #fff9ed;
  font-size: 0;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.74);
}

.scene-mission-card strong::first-letter {
  font-size: 0.82rem;
}

.mission-picture {
  position: relative;
  display: block;
  width: 27px;
  height: 27px;
  border-radius: 7px;
  background: rgba(255, 249, 237, 0.72);
  box-shadow: inset 0 0 0 1px rgba(23, 22, 20, 0.18);
}

.mission-picture::before,
.mission-picture::after {
  content: "";
  position: absolute;
  display: block;
}

.mission-home .mission-picture::before {
  left: 6px;
  top: 10px;
  width: 15px;
  height: 11px;
  background: #704a2a;
}

.mission-home .mission-picture::after {
  left: 5px;
  top: 5px;
  width: 17px;
  height: 17px;
  background: #9c3b31;
  transform: rotate(45deg);
  clip-path: polygon(0 0, 100% 0, 100% 48%, 0 48%);
}

.mission-field .mission-picture {
  background:
    repeating-linear-gradient(90deg, rgba(79, 99, 48, 0.9) 0 4px, rgba(232, 210, 134, 0.95) 4px 7px);
}

.mission-orchard .mission-picture {
  background:
    radial-gradient(circle at 32% 38%, #b93732 0 13%, transparent 14%),
    radial-gradient(circle at 66% 35%, #b93732 0 12%, transparent 13%),
    radial-gradient(circle at 50% 66%, #b93732 0 11%, transparent 12%),
    #4d773d;
}

.mission-mine .mission-picture {
  background:
    radial-gradient(ellipse at 50% 72%, #161614 0 42%, transparent 43%),
    linear-gradient(145deg, #8b8f94, #4f4d48);
}

.mission-workshop .mission-picture {
  background:
    linear-gradient(90deg, transparent 0 43%, #f2e2a8 44% 56%, transparent 57%),
    linear-gradient(145deg, #7a4b2b, #28383d);
}

.mission-darkness .mission-picture {
  background:
    radial-gradient(circle at 50% 50%, rgba(141, 46, 50, 0.95) 0 17%, transparent 18%),
    radial-gradient(circle at 50% 50%, #171614 0 55%, #4a3b62 56%);
}

.mission-home { background: rgba(46, 97, 77, 0.42); }
.mission-field { background: rgba(83, 115, 54, 0.42); }
.mission-orchard { background: rgba(69, 103, 58, 0.42); }
.mission-mine { background: rgba(88, 86, 78, 0.46); }
.mission-workshop { background: rgba(80, 92, 96, 0.44); }

.mission-darkness {
  background: rgba(23, 22, 20, 0.52);
}

.mission-darkness::after {
  display: none;
}

.play-scene.expanded .scene-mission-dock {
  width: 48px;
  gap: 8px;
}

.play-scene.expanded .scene-mission-card {
  width: 46px;
  min-height: 46px;
}

.scene-action-bubbles {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}

.scene-action-bubble {
  position: absolute;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 249, 237, 0.68);
  border-radius: 50%;
  background: rgba(255, 249, 237, 0.82);
  color: #274967;
  box-shadow: 0 8px 18px rgba(22, 22, 21, 0.16);
  cursor: pointer;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.scene-action-bubble span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(46, 97, 77, 0.16);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
}

.scene-action-bubble:hover,
.scene-action-bubble:focus-visible {
  outline: 0;
  background: rgba(255, 249, 237, 0.94);
  box-shadow: 0 10px 20px rgba(22, 22, 21, 0.2);
  transform: translate(-50%, -50%) scale(1.06);
}

.bubble-home { left: 20%; top: 45%; }
.bubble-field { left: 29%; top: 72%; }
.bubble-orchard { left: 88%; top: 72%; }
.bubble-mine { left: 58%; top: 26%; }
.bubble-workshop { left: 83%; top: 47%; }

.scene-action-progress {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 11;
  display: grid;
  grid-template-columns: auto minmax(110px, 1fr);
  align-items: center;
  gap: 8px 10px;
  width: min(320px, calc(100% - 28px));
  padding: 9px 12px;
  border: 1px solid rgba(255, 249, 237, 0.74);
  border-radius: 8px;
  background: rgba(255, 249, 237, 0.9);
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(22, 22, 21, 0.2);
  transform: translateX(-50%);
}

.scene-action-progress[hidden] {
  display: none;
}

.scene-action-progress-icon {
  display: grid;
  place-items: center;
  grid-row: span 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(46, 97, 77, 0.16);
  color: var(--green);
  font-weight: 900;
}

.scene-action-progress span:last-of-type {
  font-size: 0.86rem;
  font-weight: 900;
}

.scene-action-progress i {
  display: block;
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(46, 97, 77, 0.14);
}

.scene-action-progress b {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2e614d, #b9822e);
}

.scene-action-progress.active b {
  animation: sceneActionFill var(--scene-action-duration, 1600ms) linear forwards;
}

.scene-spot,
.scene-field,
.scene-orchard,
.scene-hotspot,
.scene-enemy {
  position: absolute;
  display: grid;
  place-items: center;
  width: 108px;
  min-height: 72px;
  padding: 8px;
  border: 2px solid rgba(255, 249, 237, 0.74);
  border-radius: 8px;
  background: rgba(255, 249, 237, 0.72);
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(22, 22, 21, 0.16);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.scene-spot:hover,
.scene-field:hover,
.scene-orchard:hover,
.scene-hotspot:hover,
.scene-enemy:hover {
  transform: none;
  box-shadow: none;
}

.play-scene .scene-spot,
.play-scene .scene-field,
.play-scene .scene-orchard,
.play-scene .scene-hotspot {
  z-index: 4;
  outline: 0 !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent;
}

.play-scene .scene-spot:hover,
.play-scene .scene-field:hover,
.play-scene .scene-orchard:hover,
.play-scene .scene-hotspot:hover,
.play-scene .scene-spot:focus,
.play-scene .scene-field:focus,
.play-scene .scene-orchard:focus,
.play-scene .scene-hotspot:focus,
.play-scene .scene-spot:focus-visible,
.play-scene .scene-field:focus-visible,
.play-scene .scene-orchard:focus-visible,
.play-scene .scene-hotspot:focus-visible {
  transform: none !important;
  outline: 0 !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  filter: none !important;
}

.scene-spot em,
.scene-field em,
.scene-orchard em {
  align-self: end;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.82);
  color: var(--green);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
  box-shadow: 0 3px 8px rgba(22, 22, 21, 0.12);
}

.scene-spot::before {
  display: block;
  font-size: 1.9rem;
}

.scene-spot span {
  font-size: 0.82rem;
  font-weight: 900;
}

.scene-spot em,
.scene-field em,
.scene-orchard em {
  display: none;
}

.garden-spot { left: 7%; top: 58%; }
.mine-spot { left: 18%; top: 30%; }
.market-spot { left: 44%; top: 56%; }
.forge-spot { left: 56%; top: 32%; }
.healer-spot { left: 73%; top: 58%; }
.dragon-spot { left: 78%; top: 22%; }

.home-spot {
  left: 7%;
  top: 13%;
  width: 28%;
  min-height: 32%;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.garden-spot,
.mine-spot,
.market-spot,
.forge-spot,
.healer-spot,
.dragon-spot {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.garden-spot { left: 19%; top: 61%; width: 26%; min-height: 27%; }
.mine-spot { left: 57%; top: 12%; width: 20%; min-height: 28%; }
.market-spot { left: 43%; top: 42%; width: 12%; min-height: 22%; }
.forge-spot { left: 77%; top: 29%; width: 20%; min-height: 28%; }
.healer-spot { left: 10%; top: 17%; width: 22%; min-height: 26%; }
.dragon-spot { left: 53%; top: 18%; width: 22%; min-height: 24%; }

.scene-field {
  left: 17%;
  top: 63%;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  width: 28%;
  min-height: 28%;
  padding: 9px;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.field-plot {
  display: none;
  width: 100%;
  min-height: 18px;
  border-radius: 4px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 249, 237, 0.16) 0 3px, transparent 3px 8px),
    linear-gradient(180deg, #7c5a31, #4f6f35);
  box-shadow: inset 0 -2px 0 rgba(26, 38, 23, 0.22);
}

.scene-field.ready .field-plot {
  background:
    repeating-linear-gradient(90deg, rgba(255, 249, 237, 0.18) 0 3px, transparent 3px 8px),
    linear-gradient(180deg, #b9a14d, #3f7d3a);
}

.scene-field em {
  grid-column: 1 / -1;
  justify-self: center;
}

.scene-orchard {
  left: 62%;
  top: 63%;
  display: block;
  align-items: flex-end;
  justify-content: center;
  gap: 7px;
  width: 34%;
  min-height: 31%;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.scene-orchard span {
  display: none;
  width: 28px;
  height: 50px;
  border-radius: 45% 45% 12px 12px;
  background: linear-gradient(180deg, #315f3d 0 58%, #6a3f21 59% 100%);
  box-shadow: inset 0 8px 0 rgba(255, 249, 237, 0.08);
}

.scene-orchard span::before,
.scene-orchard span::after {
  content: "";
  position: absolute;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b44125;
  opacity: 0.38;
}

.scene-orchard span::before { left: 7px; }
.scene-orchard span::after { right: 6px; top: 18px; }

.scene-orchard.ready span::before,
.scene-orchard.ready span::after {
  opacity: 1;
  box-shadow: 0 0 0 2px rgba(255, 249, 237, 0.18);
}

.scene-orchard em {
  position: absolute;
  left: 50%;
  bottom: 7px;
  transform: translateX(-50%);
}

.garden-bed {
  display: none;
  width: 82px;
  height: 14px;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, #385f36 0 8px, #6a4a2b 8px 14px);
  box-shadow: 0 7px 9px rgba(22, 22, 21, 0.16);
}

.mine-mouth {
  display: none;
  width: 82px;
  height: 58px;
  border-radius: 44px 44px 10px 10px;
  background:
    radial-gradient(ellipse at 50% 84%, #0b0908 0 38%, transparent 39%),
    linear-gradient(145deg, #69615b, #252424 72%);
  border: 4px solid rgba(64, 48, 38, 0.72);
}

.mine-lantern {
  display: none;
  position: absolute;
  left: 54%;
  top: 42%;
  width: 10px;
  height: 16px;
  border-radius: 4px;
  background: #ffc84f;
  box-shadow: 0 0 16px rgba(255, 190, 61, 0.86);
}

.market-stall,
.workshop-roof,
.workshop-door,
.healer-house,
.dragon-nest {
  display: none;
  position: relative;
  width: 82px;
  height: 58px;
}

.market-stall {
  background:
    linear-gradient(90deg, #8d2e32 0 25%, #fff9ed 25% 50%, #8d2e32 50% 75%, #fff9ed 75%),
    linear-gradient(#5e3b22, #5e3b22);
  background-size: 100% 20px, 70% 34px;
  background-position: 0 0, center bottom;
  background-repeat: no-repeat;
}

.workshop-roof {
  height: 24px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(145deg, #4d3425, #1d1a18);
  transform: skewX(-10deg);
}

.workshop-door {
  width: 66px;
  height: 43px;
  margin-top: -4px;
  border-radius: 7px;
  background:
    radial-gradient(circle at 70% 58%, #ff9c3a 0 6px, transparent 7px),
    linear-gradient(145deg, #7b5540, #25201d);
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, 0.16);
}

.healer-house {
  border-radius: 50% 50% 12px 12px;
  background:
    linear-gradient(45deg, transparent 0 38%, #2e614d 39% 61%, transparent 62%),
    linear-gradient(145deg, #f2e9c9, #9ab68d);
  border: 2px solid rgba(46, 97, 77, 0.45);
}

.dragon-nest {
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 112, 48, 0.88) 0 15%, transparent 16%),
    repeating-radial-gradient(circle at 50% 60%, #5a3523 0 8px, #2a1d17 9px 15px);
  box-shadow: 0 0 18px rgba(255, 106, 42, 0.28);
}

.garden-spot::before,
.mine-spot::before,
.market-spot::before,
.forge-spot::before,
.healer-spot::before,
.dragon-spot::before {
  content: "";
  display: none;
}

.garden-spot::before { content: "🌿"; }
.mine-spot::before { content: "⛏"; }
.market-spot::before { content: "⚖"; }
.forge-spot::before { content: "⚒"; }
.healer-spot::before { content: "✚"; color: var(--green); }
.dragon-spot::before { content: "◆"; color: #b44125; }

.scene-enemy {
  left: var(--enemy-x, 72%);
  top: var(--enemy-y, 72%);
  width: 120px;
  min-height: 160px;
  transform: translate(-50%, -50%);
  border: 0;
  background: transparent;
  color: #fff9ed;
  z-index: 7;
  transition: left 520ms ease, top 520ms ease, transform 180ms ease, filter 180ms ease;
  animation: enemyRoam 4.8s ease-in-out infinite;
}

.shadow-creature-art {
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 142px;
  height: 172px;
  object-fit: contain;
  transform: translateX(-50%);
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.45));
}

.scene-enemy:hover {
  transform: translate(-50%, -54%);
}

.scene-enemy:focus,
.scene-enemy:focus-visible {
  outline: 0;
  box-shadow: none;
}

.scene-enemy .shadow-body {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 48% 48% 38% 38%;
  background:
    radial-gradient(circle at 35% 30%, #ff3e2a 0 5px, transparent 6px),
    radial-gradient(circle at 65% 30%, #ff3e2a 0 5px, transparent 6px),
    radial-gradient(circle, rgba(62, 13, 24, 0.98), rgba(0, 0, 0, 0.1));
  animation: enemyPulse 1.3s infinite alternate;
}

.shadow-horn,
.shadow-claw {
  display: none;
  position: absolute;
  display: block;
  background: #171111;
}

.shadow-horn {
  top: 10px;
  width: 16px;
  height: 24px;
  border-radius: 80% 20% 80% 20%;
}

.shadow-horn.left {
  left: 18px;
  transform: rotate(-32deg);
}

.shadow-horn.right {
  right: 18px;
  transform: rotate(32deg) scaleX(-1);
}

.shadow-claw {
  bottom: 15px;
  width: 22px;
  height: 7px;
  border-radius: 999px;
  background: #f0d0a4;
}

.shadow-claw.left {
  left: 6px;
  transform: rotate(24deg);
}

.shadow-claw.right {
  right: 6px;
  transform: rotate(-24deg);
}

.scene-enemy strong {
  font-size: 0.72rem;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.58);
}

.scene-enemy i {
  display: block;
  width: 54px;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 249, 237, 0.24);
  box-shadow: inset 0 0 0 1px rgba(255, 249, 237, 0.18);
}

.scene-enemy i b {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffcf58, #ff4e32);
  transition: width 220ms ease;
}

.scene-enemy.approaching {
  animation: enemyApproach 520ms ease both;
}

.scene-enemy.closing {
  z-index: 7;
  animation: enemyClose 760ms ease-in-out infinite alternate;
  filter: brightness(1.12) contrast(1.04);
}

.scene-enemy.struck {
  z-index: 7;
  animation: enemyHit 340ms ease both;
}

.scene-enemy.weakened {
  filter: saturate(0.85) brightness(1.16);
}

.scene-enemy.hunting {
  animation: enemyHunt 620ms ease both;
}

.scene-enemy.attacking {
  z-index: 7;
  animation: enemyAttack 620ms ease both;
}

.dragon-companion {
  position: absolute;
  left: 69%;
  top: 27%;
  z-index: 4;
  width: 270px;
  height: 175px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 240ms ease, transform 240ms ease;
  filter: drop-shadow(0 18px 20px rgba(0, 0, 0, 0.35));
}

.dragon-companion.visible {
  opacity: 1;
  animation: dragonHover 2.6s ease-in-out infinite;
}

.dragon-companion.assisting {
  z-index: 9;
  animation: dragonAssist 1.2s ease-in-out;
}

.play-scene.dragon-strike .dragon-companion.visible {
  opacity: 1;
  z-index: 9;
  filter: drop-shadow(0 22px 24px rgba(0, 0, 0, 0.42)) drop-shadow(0 0 18px rgba(185, 130, 46, 0.24));
}

.dragon-body,
.dragon-head,
.dragon-tail,
.dragon-wing,
.dragon-flame {
  position: absolute;
  display: block;
}

.dragon-real-art {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 190px;
  height: 135px;
  object-fit: contain;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.42));
}

.dragon-red {
  width: 185px;
  height: 132px;
  z-index: 4;
  filter: hue-rotate(82deg) saturate(0.48) brightness(0.9) drop-shadow(0 18px 18px rgba(0, 0, 0, 0.42));
}

.dragon-storm {
  left: 20%;
  top: 34%;
  width: 116px;
  height: 84px;
  z-index: 3;
  animation: dragonWingFloat 3.2s ease-in-out infinite alternate;
}

.dragon-forest {
  left: 76%;
  top: 72%;
  width: 112px;
  height: 80px;
  z-index: 2;
  animation: dragonWingFloat 3.6s ease-in-out 0.4s infinite alternate;
}

.dragon-sun {
  left: 78%;
  top: 20%;
  width: 104px;
  height: 76px;
  z-index: 1;
  animation: dragonWingFloat 3s ease-in-out 0.8s infinite alternate;
}

.dragon-drakar-art {
  left: 50%;
  top: 50%;
  width: 195px;
  height: 140px;
  z-index: 4;
}

.dragon-companion.dragon-fire .dragon-storm,
.dragon-companion.dragon-fire .dragon-forest,
.dragon-companion.dragon-fire .dragon-sun,
.dragon-companion.dragon-fire .dragon-drakar-art,
.dragon-companion.dragon-storm-active .dragon-red,
.dragon-companion.dragon-storm-active .dragon-forest,
.dragon-companion.dragon-storm-active .dragon-sun,
.dragon-companion.dragon-storm-active .dragon-drakar-art,
.dragon-companion.dragon-forest-active .dragon-red,
.dragon-companion.dragon-forest-active .dragon-storm,
.dragon-companion.dragon-forest-active .dragon-sun,
.dragon-companion.dragon-forest-active .dragon-drakar-art,
.dragon-companion.dragon-sun-active .dragon-red,
.dragon-companion.dragon-sun-active .dragon-storm,
.dragon-companion.dragon-sun-active .dragon-forest,
.dragon-companion.dragon-sun-active .dragon-drakar-art,
.dragon-companion.dragon-drakar-active .dragon-red,
.dragon-companion.dragon-drakar-active .dragon-storm,
.dragon-companion.dragon-drakar-active .dragon-forest,
.dragon-companion.dragon-drakar-active .dragon-sun {
  display: none;
}

.dragon-companion.dragon-storm-active .dragon-storm,
.dragon-companion.dragon-forest-active .dragon-forest,
.dragon-companion.dragon-sun-active .dragon-sun,
.dragon-companion.dragon-drakar-active .dragon-drakar-art {
  left: 50%;
  top: 50%;
  width: 185px;
  height: 132px;
  z-index: 4;
}

.dragon-real-art ~ .dragon-wing,
.dragon-real-art ~ .dragon-body,
.dragon-real-art ~ .dragon-head,
.dragon-real-art ~ .dragon-tail {
  display: none;
}

.dragon-body {
  left: 43px;
  top: 38px;
  width: 54px;
  height: 27px;
  border-radius: 60% 45% 55% 45%;
  background: linear-gradient(145deg, #304f45, #162720 68%, #6ca3a1);
  border: 2px solid rgba(10, 16, 15, 0.84);
}

.dragon-head {
  right: 18px;
  top: 26px;
  width: 32px;
  height: 24px;
  border-radius: 55% 45% 45% 55%;
  background: linear-gradient(145deg, #426a5b, #13221d);
  border: 2px solid rgba(10, 16, 15, 0.84);
}

.dragon-head::before {
  content: "";
  position: absolute;
  right: -7px;
  top: 9px;
  width: 11px;
  height: 5px;
  border-radius: 999px;
  background: #f7cf63;
  box-shadow: 0 0 10px rgba(255, 199, 74, 0.8);
}

.dragon-tail {
  left: 14px;
  top: 48px;
  width: 42px;
  height: 12px;
  border-radius: 999px 0 0 999px;
  background: linear-gradient(90deg, #10201c, #345b4c);
  transform: rotate(18deg);
  transform-origin: right center;
}

.dragon-wing {
  width: 52px;
  height: 58px;
  top: 11px;
  border-radius: 80% 20% 70% 24%;
  background:
    linear-gradient(135deg, rgba(255, 249, 237, 0.22), transparent 40%),
    linear-gradient(145deg, rgba(64, 105, 92, 0.92), rgba(17, 34, 30, 0.92));
  border: 2px solid rgba(8, 15, 13, 0.72);
  transform-origin: bottom center;
}

.dragon-wing.left {
  left: 32px;
  transform: rotate(-32deg) skewY(-8deg);
}

.dragon-wing.right {
  right: 24px;
  transform: rotate(36deg) skewY(8deg);
}

.dragon-flame {
  right: -8px;
  top: 35px;
  width: 20px;
  height: 14px;
  border-radius: 55% 45% 45% 55%;
  background: radial-gradient(circle at 30% 50%, #fff0a5 0 18%, #ff8a2e 34% 62%, rgba(255, 63, 35, 0) 70%);
  opacity: 0;
}

.dragon-companion.fire-dragon .dragon-body,
.dragon-companion.fire-dragon .dragon-head {
  background: linear-gradient(145deg, #7b281e, #161211 68%, #ff7c37);
}

.dragon-companion.fire-dragon .dragon-wing {
  background:
    linear-gradient(135deg, rgba(255, 204, 103, 0.28), transparent 40%),
    linear-gradient(145deg, rgba(124, 39, 29, 0.94), rgba(28, 16, 14, 0.94));
}

.dragon-companion.fire-dragon .dragon-flame,
.dragon-companion.assisting .dragon-flame {
  opacity: 1;
  animation: flamePulse 0.28s infinite alternate;
}

.scene-hero {
  position: absolute;
  left: var(--hero-x, 46%);
  top: var(--hero-y, 70%);
  z-index: 8;
  width: 170px;
  display: grid;
  justify-items: center;
  gap: 0;
  pointer-events: none;
  transform: translate(-50%, -100%) scale(var(--hero-scale, 1));
  transform-origin: center bottom;
  transform-style: preserve-3d;
  perspective: 900px;
  transition: left 1250ms linear, top 1250ms linear;
}

.scene-hero.instant-move {
  transition: none !important;
}

.scene-hero::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  z-index: -1;
  width: 74px;
  height: 14px;
  border-radius: 50%;
  background: rgba(22, 22, 21, 0.28);
  filter: blur(4px);
  transform: translateX(-50%);
  transform-origin: center;
}

.scene-hero-art {
  display: block;
  width: 155px;
  max-height: 235px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.38));
  transform-origin: center bottom;
  backface-visibility: hidden;
  will-change: transform, filter;
}

.scene-hero.hero-drakar {
  width: 300px;
  top: var(--hero-y, 70%);
  z-index: 9;
}

.scene-hero.hero-drakar::after {
  bottom: 12px;
  width: 172px;
  height: 28px;
  background: rgba(22, 22, 21, 0.34);
  filter: blur(7px);
}

.scene-hero.hero-drakar .scene-hero-art {
  width: 292px;
  max-height: 255px;
  filter: drop-shadow(0 24px 22px rgba(0, 0, 0, 0.46));
}

.scene-hero.hero-drakar .hero-body {
  display: none;
}

.scene-hero-art[hidden] {
  display: none;
}

.scene-hero-sprite {
  display: block;
  width: 215px;
  height: 245px;
  background-repeat: no-repeat;
  background-size: 400% 100%;
  background-position: 0% 50%;
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.38));
  transform-origin: center bottom;
  animation: spriteIdle 2.4s ease-in-out infinite;
}

.scene-hero.hero-galinor .scene-hero-sprite {
  width: 164px;
  height: 245px;
}

.scene-hero-sprite[hidden] {
  display: none;
}

.scene-hero-sprite:not([hidden]) ~ .scene-hero-art,
.scene-hero-sprite:not([hidden]) ~ .hero-body {
  display: none;
}

.scene-hero-art:not([hidden]) + .hero-body {
  display: none;
}

.hero-body {
  position: relative;
  width: 74px;
  height: 118px;
  display: block;
  filter: drop-shadow(0 15px 18px rgba(0, 0, 0, 0.34));
}

.hero-body i {
  position: absolute;
  display: block;
}

.hero-head {
  left: 25px;
  top: 2px;
  width: 28px;
  height: 32px;
  border-radius: 48% 48% 44% 44%;
  background: linear-gradient(145deg, #ead0a7, #9f6f4d);
  border: 2px solid rgba(42, 33, 29, 0.78);
  z-index: 5;
}

.hero-hair {
  left: 18px;
  top: -2px;
  width: 42px;
  height: 22px;
  border-radius: 50% 50% 35% 35%;
  background: #15110f;
  z-index: 6;
  transform: rotate(-5deg);
}

.hero-cape {
  left: 6px;
  top: 32px;
  width: 62px;
  height: 76px;
  border-radius: 18px 18px 28px 28px;
  background: linear-gradient(150deg, rgba(35, 63, 51, 0.95), rgba(34, 30, 28, 0.96));
  border-left: 3px solid rgba(185, 130, 46, 0.64);
  z-index: 1;
  transform: skewX(-6deg);
}

.hero-tunic {
  left: 22px;
  top: 33px;
  width: 34px;
  height: 58px;
  border-radius: 12px 12px 8px 8px;
  background:
    linear-gradient(90deg, transparent 0 35%, rgba(255, 249, 237, 0.92) 35% 41%, transparent 41% 59%, rgba(255, 249, 237, 0.92) 59% 65%, transparent 65%),
    linear-gradient(145deg, #8d2e32, #23211e 66%, #b9822e);
  border: 2px solid rgba(255, 249, 237, 0.62);
  z-index: 4;
}

.hero-arm {
  top: 40px;
  width: 12px;
  height: 44px;
  border-radius: 999px;
  background: linear-gradient(#3a2e24, #171614);
  border: 1px solid rgba(255, 249, 237, 0.42);
  transform-origin: top center;
  z-index: 3;
}

.hero-arm.left {
  left: 13px;
  transform: rotate(20deg);
}

.hero-arm.right {
  right: 10px;
  transform: rotate(-28deg);
}

.hero-sword {
  right: 0;
  top: 28px;
  width: 7px;
  height: 74px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e9edf0, #7c8790 55%, #f8fbff);
  transform: rotate(19deg);
  z-index: 2;
}

.hero-sword::after {
  content: "";
  position: absolute;
  left: -7px;
  top: 44px;
  width: 22px;
  height: 6px;
  border-radius: 999px;
  background: var(--gold);
}

.hero-leg {
  top: 86px;
  width: 13px;
  height: 31px;
  border-radius: 999px;
  background: #171614;
  z-index: 2;
  transform-origin: top center;
}

.hero-leg.left {
  left: 25px;
  transform: rotate(9deg);
}

.hero-leg.right {
  right: 23px;
  transform: rotate(-10deg);
}

.hero-medallion {
  left: 50%;
  top: 48px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff6b5 0 20%, #d9a73e 35% 58%, #5a3317 62%);
  box-shadow: 0 0 16px rgba(255, 218, 100, 0.75);
  transform: translateX(-50%);
  z-index: 7;
}

.hero-galinor .hero-cape {
  background: linear-gradient(150deg, rgba(32, 73, 53, 0.98), rgba(17, 22, 19, 0.98));
  border-left-color: rgba(255, 218, 100, 0.85);
}

.hero-galinor .hero-tunic {
  background:
    linear-gradient(90deg, transparent 0 28%, rgba(255, 249, 237, 0.96) 28% 34%, transparent 34% 66%, rgba(255, 249, 237, 0.96) 66% 72%, transparent 72%),
    linear-gradient(145deg, #1f5a43, #1f1c1a 64%, #d7a743);
}

.hero-galinor .hero-medallion {
  width: 18px;
  height: 18px;
  box-shadow: 0 0 20px rgba(255, 224, 103, 0.95), 0 0 42px rgba(255, 224, 103, 0.46);
}

.hero-jim .hero-cape {
  background: linear-gradient(150deg, #5a3b22, #24201d);
  border-left-color: #a66b32;
}

.hero-jim .hero-tunic {
  background:
    linear-gradient(90deg, transparent 0 42%, rgba(185, 130, 46, 0.82) 42% 58%, transparent 58%),
    linear-gradient(145deg, #6a4727, #211f1d 70%, #8b8f94);
}

.hero-jim .hero-sword {
  width: 10px;
  background: linear-gradient(90deg, #7f8589, #d7dde0 50%, #6a7075);
  transform: rotate(25deg);
}

.hero-tot .hero-cape {
  background: linear-gradient(150deg, #2e614d, #1d2d27);
  border-left-color: #c8d58a;
}

.hero-tot .hero-tunic {
  background:
    linear-gradient(90deg, transparent 0 32%, rgba(245, 239, 204, 0.92) 32% 39%, transparent 39% 61%, rgba(245, 239, 204, 0.92) 61% 68%, transparent 68%),
    linear-gradient(145deg, #4d775a, #20231f 68%, #b6c77c);
}

.hero-tot .hero-medallion {
  background: radial-gradient(circle, #efffbd 0 28%, #7eb35f 42% 65%, #30482c 68%);
  box-shadow: 0 0 18px rgba(166, 226, 120, 0.86);
}

.hero-boranor .hero-cape {
  background: linear-gradient(150deg, #5d2c28, #211c1a);
  border-left-color: #c68c42;
}

.hero-boranor .hero-medallion {
  background: radial-gradient(circle, #fff4ba 0 24%, #c68c42 40% 63%, #5d2c28 70%);
  box-shadow: 0 0 16px rgba(198, 140, 66, 0.82);
}

.hero-boranor .hero-tunic {
  background:
    linear-gradient(90deg, transparent 0 30%, rgba(255, 249, 237, 0.88) 30% 36%, transparent 36% 64%, rgba(255, 249, 237, 0.88) 64% 70%, transparent 70%),
    linear-gradient(145deg, #7e3a31, #2b201d 66%, #b9822e);
}

.hero-boranor .hero-leg {
  height: 36px;
}

.hero-stanidar .hero-cape {
  background: linear-gradient(150deg, #30333a, #181614 72%);
  border-left-color: #d5a24a;
}

.hero-stanidar .hero-tunic {
  background:
    linear-gradient(90deg, transparent 0 34%, rgba(255, 249, 237, 0.9) 34% 42%, transparent 42% 58%, rgba(255, 249, 237, 0.9) 58% 66%, transparent 66%),
    linear-gradient(145deg, #5c4630, #1f1b18 62%, #9b9fa4);
}

.hero-stanidar .hero-sword {
  width: 11px;
  height: 78px;
  background: linear-gradient(90deg, #80868a, #f2f2ef 50%, #555d63);
  transform: rotate(23deg);
}

.hero-stanidar .hero-medallion {
  background: radial-gradient(circle, #fff6c5 0 22%, #d5a24a 42% 64%, #4d3425 70%);
  box-shadow: 0 0 18px rgba(213, 162, 74, 0.86);
}

.hero-mitodar .hero-cape {
  background: linear-gradient(150deg, #f1e6a7, #365f78 72%);
  border-left-color: #fff7c4;
  box-shadow: inset 0 0 0 2px rgba(255, 249, 237, 0.18), 0 0 26px rgba(255, 240, 163, 0.34);
}

.hero-mitodar .hero-tunic {
  background:
    linear-gradient(90deg, transparent 0 28%, rgba(255, 249, 237, 0.96) 28% 38%, transparent 38% 62%, rgba(255, 249, 237, 0.96) 62% 72%, transparent 72%),
    linear-gradient(145deg, #e7d987, #fff8cf 44%, #2f5e7c);
}

.hero-mitodar .hero-sword {
  width: 12px;
  background: linear-gradient(90deg, #fff9cf, #f6e37c 48%, #4d708a);
  box-shadow: 0 0 16px rgba(255, 240, 143, 0.72);
}

.hero-mitodar .hero-medallion {
  width: 18px;
  height: 18px;
  background: radial-gradient(circle, #fffef1 0 20%, #f6dd74 42% 64%, #315f7c 70%);
  box-shadow: 0 0 26px rgba(255, 238, 128, 0.96), 0 0 48px rgba(118, 171, 207, 0.38);
}

.hero-mihodar .hero-cape {
  background: linear-gradient(150deg, #263f6f, #151a24 72%);
  border-left-color: #9fb7ff;
}

.hero-mihodar .hero-tunic {
  background:
    linear-gradient(90deg, transparent 0 34%, rgba(226, 235, 255, 0.95) 34% 42%, transparent 42% 58%, rgba(226, 235, 255, 0.95) 58% 66%, transparent 66%),
    linear-gradient(145deg, #385f96, #1b2030 64%, #d8dce6);
}

.hero-mihodar .hero-sword {
  width: 8px;
  height: 92px;
  background: linear-gradient(90deg, #cbd6ff, #ffffff 44%, #536cab);
  box-shadow: 0 0 14px rgba(126, 147, 255, 0.7);
  transform: rotate(30deg);
}

.hero-mihodar .hero-sword::after {
  top: 54px;
  background: #8ea6ff;
}

.hero-mihodar .hero-medallion {
  background: radial-gradient(circle, #eff4ff 0 24%, #6e88e8 42% 65%, #22355f 70%);
  box-shadow: 0 0 21px rgba(126, 147, 255, 0.86);
}

.hero-vera .hero-cape {
  background: linear-gradient(150deg, #4a3b62, #1e1b28);
  border-left-color: #d2b16a;
}

.hero-vera .hero-tunic {
  background:
    linear-gradient(90deg, transparent 0 35%, rgba(224, 205, 151, 0.95) 35% 42%, transparent 42% 58%, rgba(224, 205, 151, 0.95) 58% 65%, transparent 65%),
    linear-gradient(145deg, #5b4a73, #24202c 68%, #c79f51);
}

.hero-vera .hero-medallion {
  background: radial-gradient(circle, #fff7c4 0 25%, #9e73d1 42% 65%, #3a264e 70%);
  box-shadow: 0 0 19px rgba(158, 115, 209, 0.85);
}

.hero-drakar .hero-cape {
  background: linear-gradient(150deg, #74261f, #151515 70%);
  border-left-color: #ff7c37;
}

.hero-drakar .hero-tunic {
  background:
    linear-gradient(90deg, transparent 0 44%, rgba(255, 127, 55, 0.9) 44% 56%, transparent 56%),
    linear-gradient(145deg, #8d2e32, #1a1716 68%, #ff7c37);
}

.hero-drakar .hero-medallion {
  background: radial-gradient(circle, #ffe0a4 0 22%, #ff7c37 38% 62%, #621b15 68%);
  box-shadow: 0 0 22px rgba(255, 101, 45, 0.9);
}

.hero-drakar .hero-cape::after {
  content: "";
  position: absolute;
  right: -16px;
  top: 10px;
  width: 26px;
  height: 46px;
  border-radius: 70% 20% 70% 20%;
  background: linear-gradient(145deg, rgba(255, 124, 55, 0.65), rgba(50, 20, 18, 0.1));
  transform: rotate(-18deg);
}

.hero-marie .hero-cape {
  background: linear-gradient(150deg, #3a6c47, #1d2a21);
  border-left-color: #e6d889;
}

.hero-marie .hero-tunic {
  background:
    linear-gradient(90deg, transparent 0 30%, rgba(255, 249, 237, 0.96) 30% 38%, transparent 38% 62%, rgba(255, 249, 237, 0.96) 62% 70%, transparent 70%),
    linear-gradient(145deg, #496f42, #f0ead0 49%, #2e614d);
}

.hero-marie .hero-medallion {
  background: radial-gradient(circle, #fffbd3 0 28%, #8fbc5e 43% 64%, #2f5a39 70%);
  box-shadow: 0 0 18px rgba(180, 225, 116, 0.8);
}

.scene-hero strong {
  position: absolute;
  left: 50%;
  top: calc(100% + 4px);
  z-index: 4;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255, 249, 237, 0.9);
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.1;
  white-space: nowrap;
  transform: translateX(-50%);
}

.scene-hero:not(.walking):not(.working):not(.fighting):not(.stopping):not(.hit) .scene-hero-art {
  animation: naturalHumanIdle 4.2s ease-in-out infinite;
}

.scene-hero.walking .hero-body {
  animation: naturalRigWalk 0.82s ease-in-out infinite;
}

.scene-hero.walking .scene-hero-art {
  animation: naturalHumanWalk 0.82s ease-in-out infinite;
}

.scene-hero.walking .scene-hero-sprite {
  animation: spriteWalk 0.82s steps(1) infinite, naturalHumanWalk 0.82s ease-in-out infinite;
}

.scene-hero.walking::after {
  animation: naturalFootShadow 0.82s ease-in-out infinite;
}

.scene-hero.walking .hero-leg.left,
.scene-hero.walking .hero-arm.right {
  animation: strideA 0.82s ease-in-out infinite;
}

.scene-hero.walking .hero-leg.right,
.scene-hero.walking .hero-arm.left {
  animation: strideB 0.82s ease-in-out infinite;
}

.scene-hero.working .hero-body {
  animation: workSwing 0.72s ease-in-out infinite alternate;
}

.scene-hero.working .scene-hero-art {
  animation: naturalWorkShift 0.72s ease-in-out infinite alternate;
}

.scene-hero.working .scene-hero-sprite {
  background-position: 66.666% 50%;
  animation: naturalWorkShift 0.72s ease-in-out infinite alternate;
}

.scene-hero.working .hero-arm.right {
  animation: workArm 0.72s ease-in-out infinite alternate;
}

.scene-hero.working.motion-crouch .scene-hero-art,
.scene-hero.working.motion-crouch .scene-hero-sprite {
  animation: humanCrouchWork 1.05s ease-in-out infinite;
}

.scene-hero.working.motion-reach .scene-hero-art,
.scene-hero.working.motion-reach .scene-hero-sprite {
  animation: humanReachPick 1s ease-in-out infinite;
}

.scene-hero.working.motion-mine .scene-hero-art,
.scene-hero.working.motion-mine .scene-hero-sprite {
  animation: humanMineWork 0.92s cubic-bezier(0.42, 0, 0.28, 1) infinite;
}

.scene-hero.working.motion-craft .scene-hero-art,
.scene-hero.working.motion-craft .scene-hero-sprite {
  animation: humanCraftWork 0.9s ease-in-out infinite;
}

.scene-hero.working.motion-rest .scene-hero-art,
.scene-hero.working.motion-rest .scene-hero-sprite {
  animation: humanRestBody 1.35s ease-in-out infinite alternate;
}

.scene-hero.working.motion-heal .scene-hero-art,
.scene-hero.working.motion-summon .scene-hero-art,
.scene-hero.working.motion-heal .scene-hero-sprite,
.scene-hero.working.motion-summon .scene-hero-sprite {
  animation: humanRaiseHands 1.1s ease-in-out infinite;
}

.scene-hero.working.motion-greet .scene-hero-art,
.scene-hero.working.motion-greet .scene-hero-sprite {
  animation: humanGreetBody 1.15s ease-in-out infinite;
}

.scene-hero.hero-drakar:not(.walking):not(.working):not(.fighting):not(.stopping):not(.hit) .scene-hero-art {
  animation: dragonGroundIdle 3.8s ease-in-out infinite;
}

.scene-hero.hero-drakar.walking .scene-hero-art {
  animation: dragonGroundStride 1.05s ease-in-out infinite;
}

.scene-hero.hero-drakar.working .scene-hero-art {
  animation: dragonGroundWork 1s ease-in-out infinite;
}

.scene-hero.stopping .scene-hero-art,
.scene-hero.stopping .scene-hero-sprite,
.scene-hero.stopping .hero-body {
  animation: heroStop 260ms ease-out both;
}

.scene-hero.fighting .hero-body {
  animation: battleStrike 0.34s 5 alternate;
}

.scene-hero.fighting .scene-hero-art {
  animation: realHeroStrike 0.34s 5 alternate;
}

.scene-hero.fighting .scene-hero-sprite {
  background-position: 100% 50%;
  animation: realHeroStrike 0.34s 5 alternate;
}

.scene-hero.fighting .hero-sword,
.scene-hero.fighting .hero-arm.right {
  animation: swordSlash 0.34s 5 alternate;
}

.scene-hero.fighting.battle-ready .scene-hero-art,
.scene-hero.fighting.battle-ready .scene-hero-sprite,
.scene-hero.fighting.battle-ready .hero-body {
  animation: combatReady 0.52s ease-in-out infinite alternate;
}

.scene-hero.fighting.battle-lunge .scene-hero-art,
.scene-hero.fighting.battle-lunge .scene-hero-sprite,
.scene-hero.fighting.battle-lunge .hero-body {
  animation: tacticalHeroLunge 0.62s cubic-bezier(0.2, 0.86, 0.25, 1) both;
}

.scene-hero.fighting.guarding .scene-hero-art,
.scene-hero.fighting.guarding .scene-hero-sprite,
.scene-hero.fighting.guarding .hero-body {
  animation: heroGuard 0.48s ease-in-out infinite alternate;
}

.scene-hero.hit {
  animation: heroHit 420ms ease both;
}

.scene-effect {
  position: absolute;
  left: var(--effect-x, 50%);
  top: var(--effect-y, 50%);
  z-index: 4;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.scene-effect.active {
  opacity: 0;
  animation: none;
  filter: none;
}

.scene-effect.fire {
  background: rgba(185, 130, 46, 0.42);
  box-shadow: 0 0 18px rgba(185, 130, 46, 0.12);
}

.scene-effect.gold {
  background: var(--gold);
  box-shadow: 0 0 0 12px rgba(185, 130, 46, 0.18), 0 0 34px var(--gold);
}

.scene-effect.green {
  background: var(--green);
  box-shadow: 0 0 0 12px rgba(46, 97, 77, 0.18), 0 0 34px var(--green);
}

.scene-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
}

.scene-actions button {
  flex: 1 1 170px;
}

@keyframes naturalHumanIdle {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotateZ(-0.4deg) rotateY(-1deg) scaleY(1);
    filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.38));
  }
  35% {
    transform: translate3d(-1px, -0.6px, 0) rotateZ(0.25deg) rotateY(1deg) scaleY(1.002);
  }
  65% {
    transform: translate3d(1px, 0, 0) rotateZ(0.2deg) rotateY(-1.2deg) scaleY(0.998);
  }
}

@keyframes naturalHumanWalk {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotateZ(-0.45deg) rotateY(-2.4deg) skewX(-0.3deg) scale(1, 1);
    filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.38));
  }
  18% {
    transform: translate3d(-1px, -0.6px, 0) rotateZ(0.35deg) rotateY(2deg) skewX(0.3deg) scale(1.003, 0.999);
  }
  34% {
    transform: translate3d(-2px, -1.2px, 0) rotateZ(0.65deg) rotateY(3.2deg) skewX(0.55deg) scale(0.998, 1.003);
    filter: drop-shadow(0 22px 17px rgba(0, 0, 0, 0.32));
  }
  50% {
    transform: translate3d(0, 0, 0) rotateZ(0.1deg) rotateY(0) skewX(0) scale(1.002, 0.999);
  }
  68% {
    transform: translate3d(2px, -1.2px, 0) rotateZ(-0.65deg) rotateY(-3.2deg) skewX(-0.55deg) scale(0.998, 1.003);
    filter: drop-shadow(0 22px 17px rgba(0, 0, 0, 0.32));
  }
  84% {
    transform: translate3d(1px, -0.6px, 0) rotateZ(-0.35deg) rotateY(-2deg) skewX(-0.3deg) scale(1.003, 0.999);
  }
}

@keyframes naturalRigWalk {
  0%, 100% { transform: translateY(0) rotate(-1deg) scaleY(1); }
  35% { transform: translateY(-1px) rotate(1.2deg) scaleY(1.006); }
  50% { transform: translateY(0) rotate(0) scaleY(0.985); }
  68% { transform: translateY(-1px) rotate(-1.2deg) scaleY(1.006); }
}

@keyframes naturalFootShadow {
  0%, 100% { transform: translateX(-50%) scaleX(1); opacity: 0.28; }
  34%, 68% { transform: translateX(-50%) scaleX(0.84); opacity: 0.2; }
  50% { transform: translateX(-50%) scaleX(1.12); opacity: 0.32; }
}

@keyframes naturalWorkShift {
  from { transform: translate3d(-2px, 0, 0) rotateZ(-1.2deg) rotateY(-2deg); }
  to { transform: translate3d(3px, -2px, 0) rotateZ(1.8deg) rotateY(2deg); }
}

@keyframes humanCrouchWork {
  0%, 100% { transform: translate3d(0, 0, 0) rotateZ(-0.5deg) scale(1, 1); }
  38% { transform: translate3d(2px, 11px, 0) rotateZ(4deg) rotateX(5deg) scale(1.035, 0.88); }
  68% { transform: translate3d(-1px, 6px, 0) rotateZ(-2deg) scale(1.018, 0.94); }
}

@keyframes humanReachPick {
  0%, 100% { transform: translate3d(0, 0, 0) rotateZ(-0.5deg) rotateY(-2deg) scale(1); }
  42% { transform: translate3d(4px, -9px, 0) rotateZ(5deg) rotateY(7deg) scale(1.018); }
  70% { transform: translate3d(1px, -3px, 0) rotateZ(2deg) rotateY(3deg) scale(1.006); }
}

@keyframes humanMineWork {
  0%, 100% { transform: translate3d(0, 0, 0) rotateZ(-2deg) rotateX(0) scale(1); }
  36% { transform: translate3d(5px, 7px, 0) rotateZ(8deg) rotateX(8deg) scale(1.02, 0.95); }
  58% { transform: translate3d(-3px, -4px, 0) rotateZ(-5deg) rotateX(-2deg) scale(0.99, 1.02); }
}

@keyframes humanCraftWork {
  0%, 100% { transform: translate3d(-2px, 0, 0) rotateZ(-2deg) rotateY(-4deg); }
  50% { transform: translate3d(5px, -3px, 0) rotateZ(3deg) rotateY(5deg) scale(1.012); }
}

@keyframes humanRestBody {
  from { transform: translate3d(0, 4px, 0) rotateZ(-1deg) scale(1.02, 0.95); }
  to { transform: translate3d(0, -1px, 0) rotateZ(0.4deg) scale(1, 1); }
}

@keyframes humanRaiseHands {
  0%, 100% { transform: translate3d(0, 0, 0) rotateZ(-1deg) rotateY(-2deg) scale(1); }
  45% { transform: translate3d(0, -11px, 0) rotateZ(2deg) rotateY(5deg) scale(1.025); }
  72% { transform: translate3d(1px, -5px, 0) rotateZ(-0.5deg) rotateY(-1deg) scale(1.01); }
}

@keyframes humanGreetBody {
  0%, 100% { transform: translate3d(0, 0, 0) rotateZ(-0.5deg) rotateY(-3deg); }
  45% { transform: translate3d(4px, -3px, 0) rotateZ(2.5deg) rotateY(8deg) scale(1.01); }
}

@keyframes dragonGroundIdle {
  0%, 100% { transform: translate3d(0, 0, 0) rotateZ(-0.4deg) scale(1); }
  50% { transform: translate3d(0, -6px, 0) rotateZ(0.5deg) scale(1.012); }
}

@keyframes dragonGroundStride {
  0%, 100% { transform: translate3d(0, 0, 0) rotateZ(-1deg) scale(1); }
  28% { transform: translate3d(-4px, -5px, 0) rotateZ(1.2deg) scale(1.018); }
  55% { transform: translate3d(2px, 1px, 0) rotateZ(0) scale(0.996); }
  78% { transform: translate3d(5px, -5px, 0) rotateZ(-1.3deg) scale(1.018); }
}

@keyframes dragonGroundWork {
  0%, 100% { transform: translate3d(0, 0, 0) rotateZ(-1deg) scale(1); }
  50% { transform: translate3d(6px, -7px, 0) rotateZ(2deg) scale(1.025); }
}

@keyframes walkBob {
  from { transform: translateY(0) rotate(-2deg); }
  to { transform: translateY(-8px) rotate(2deg); }
}

@keyframes workSwing {
  from { transform: rotate(-8deg) translateX(-3px); }
  to { transform: rotate(9deg) translateX(4px); }
}

@keyframes battleStrike {
  from { transform: translateX(-8px) rotate(-8deg) scale(1); }
  to { transform: translateX(14px) rotate(10deg) scale(1.05); }
}

@keyframes realHeroWalk {
  0%, 100% { transform: translateY(0) translateX(0) rotate(-1deg) scale(1); }
  25% { transform: translateY(-6px) translateX(-3px) rotate(-2.5deg) scale(1.012); }
  50% { transform: translateY(0) translateX(0) rotate(1deg) scale(0.995); }
  75% { transform: translateY(-6px) translateX(3px) rotate(2.5deg) scale(1.012); }
}

@keyframes footShadow {
  0%, 100% { transform: translateX(-50%) scaleX(1); opacity: 0.28; }
  25%, 75% { transform: translateX(-50%) scaleX(0.78); opacity: 0.18; }
  50% { transform: translateX(-50%) scaleX(1.08); opacity: 0.32; }
}

@keyframes heroStop {
  0% { transform: translateY(-5px) scale(1.012); }
  72% { transform: translateY(2px) scale(0.992); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes sceneActionFill {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes combatReady {
  from { transform: translateX(-4px) translateY(0) rotate(-1.5deg) scale(1); }
  to { transform: translateX(3px) translateY(-3px) rotate(1.5deg) scale(1.018); }
}

@keyframes tacticalHeroLunge {
  0% { transform: translateX(-8px) translateY(0) rotate(-3deg) scale(1); }
  46% { transform: translateX(34px) translateY(-8px) rotate(4deg) scale(1.06); }
  100% { transform: translateX(8px) translateY(0) rotate(0) scale(1.015); }
}

@keyframes heroGuard {
  from { transform: translateX(4px) translateY(0) rotate(1deg) scale(1); }
  to { transform: translateX(-7px) translateY(2px) rotate(-2deg) scale(0.985); }
}

@keyframes realHeroWork {
  from { transform: translateX(-4px) rotate(-2deg); }
  to { transform: translateX(5px) rotate(3deg); }
}

@keyframes realHeroStrike {
  from { transform: translateX(-10px) rotate(-4deg) scale(1); }
  to { transform: translateX(18px) rotate(5deg) scale(1.04); }
}

@keyframes spriteIdle {
  0%, 100% { transform: translateY(0) scale(1); filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.38)); }
  50% { transform: translateY(-4px) scale(1.015); filter: drop-shadow(0 22px 20px rgba(0, 0, 0, 0.34)); }
}

@keyframes spriteWalk {
  0%, 49% { background-position: 0% 50%; }
  50%, 100% { background-position: 33.333% 50%; }
}

@keyframes spriteWork {
  0%, 34% { background-position: 0% 50%; }
  35%, 100% { background-position: 66.666% 50%; }
}

@keyframes spriteFight {
  0%, 36% { background-position: 0% 50%; }
  37%, 100% { background-position: 100% 50%; }
}

@keyframes strideA {
  from { transform: rotate(22deg); }
  to { transform: rotate(-18deg); }
}

@keyframes strideB {
  from { transform: rotate(-20deg); }
  to { transform: rotate(18deg); }
}

@keyframes workArm {
  from { transform: rotate(-18deg); }
  to { transform: rotate(-66deg); }
}

@keyframes swordSlash {
  from { transform: rotate(18deg) translateY(0); }
  to { transform: rotate(-38deg) translate(-8px, 4px); }
}

@keyframes burst {
  from { opacity: 0.95; transform: translate(-50%, -50%) scale(0.4); }
  to { opacity: 0; transform: translate(-50%, -50%) scale(5); }
}

@keyframes enemyPulse {
  from { transform: scale(0.8); opacity: 0.55; }
  to { transform: scale(1.1); opacity: 1; }
}

@keyframes enemyRoam {
  0%, 100% { transform: translate(-50%, -50%) translate(0, 0); }
  32% { transform: translate(-50%, -50%) translate(-10px, 8px); }
  66% { transform: translate(-50%, -50%) translate(12px, -7px); }
}

@keyframes enemyApproach {
  0% { transform: translate(-50%, -50%) scale(0.92); }
  55% { transform: translate(-58%, -54%) scale(1.08); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

@keyframes enemyClose {
  from { transform: translate(-50%, -50%) translate(8px, -4px) scale(0.96); }
  to { transform: translate(-50%, -50%) translate(-16px, 8px) scale(1.08); }
}

@keyframes enemyHunt {
  0% { transform: translate(-50%, -50%) scale(0.95); filter: brightness(1); }
  65% { transform: translate(-56%, -48%) scale(1.08); filter: brightness(1.22); }
  100% { transform: translate(-50%, -50%) scale(1); filter: brightness(1); }
}

@keyframes enemyAttack {
  0% { transform: translate(-50%, -50%) scale(1); }
  45% { transform: translate(-70%, -54%) scale(1.18); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

@keyframes enemyHit {
  0% { transform: translate(-50%, -50%) scale(1); filter: brightness(1); }
  45% { transform: translate(-44%, -50%) scale(0.92); filter: brightness(1.6); }
  100% { transform: translate(-50%, -50%) scale(1); filter: brightness(1); }
}

@keyframes heroHit {
  0% { transform: translate(-50%, -50%) scale(1); filter: brightness(1); }
  45% { transform: translate(-48%, -50%) scale(0.96); filter: brightness(1.35) saturate(0.82); }
  100% { transform: translate(-50%, -50%) scale(1); filter: brightness(1); }
}

@keyframes dragonHover {
  0%, 100% { transform: translate(-50%, -50%) translateY(0) scale(0.88); }
  50% { transform: translate(-50%, -50%) translateY(-10px) scale(0.92); }
}

@keyframes dragonWingFloat {
  from { transform: translate(-50%, -50%) translateY(0) rotate(-2deg); }
  to { transform: translate(-50%, -50%) translateY(-8px) rotate(2deg); }
}

@keyframes dragonAssist {
  0% { transform: translate(-50%, -50%) scale(0.9); }
  45% { transform: translate(24%, 72%) scale(1.05) rotate(5deg); }
  100% { transform: translate(-50%, -50%) scale(0.9); }
}

@keyframes flamePulse {
  from { transform: scaleX(0.8); filter: blur(0); }
  to { transform: scaleX(1.35); filter: blur(1px); }
}

.lore-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.hero-lineup-panel {
  margin: 0 0 16px;
  overflow: hidden;
  border: 1px solid rgba(28, 25, 20, 0.16);
  border-radius: 8px;
  background: #171614;
  box-shadow: var(--shadow);
}

.hero-lineup-panel img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center 28%;
}

.admin-tab {
  border-color: rgba(141, 46, 50, 0.36);
}

.admin-login {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(141, 46, 50, 0.12), rgba(39, 73, 103, 0.1));
}

.admin-login p,
.admin-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.admin-code-row {
  display: grid;
  grid-template-columns: 1fr 90px;
  gap: 8px;
}

.admin-tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.admin-tools .info-card {
  display: grid;
  gap: 10px;
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.admin-summary div {
  padding: 10px;
  border: 1px solid rgba(185, 130, 46, 0.24);
  border-radius: 8px;
  background: rgba(255, 249, 237, 0.72);
}

.admin-summary span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.admin-summary strong {
  display: block;
  color: var(--red);
  font-size: 1.45rem;
}

.admin-summary p {
  grid-column: 1 / -1;
}

.admin-players {
  display: grid;
  gap: 10px;
}

.admin-player {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.9fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.78);
}

.admin-player.removed {
  opacity: 0.58;
}

.admin-player.blocked {
  border-color: rgba(141, 46, 50, 0.45);
  background: rgba(141, 46, 50, 0.08);
}

.admin-player h3 {
  margin: 0 0 6px;
}

.admin-player-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.admin-player-actions button {
  min-width: 90px;
}

.danger-button {
  background: var(--red);
}

.soft-button {
  background: var(--blue);
}

.lore-card {
  min-height: 520px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.78);
}

.lore-card h2 {
  margin: 0;
  color: var(--red);
}

.lore-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.lore-art {
  min-height: 270px;
  display: grid;
  place-items: end start;
  padding: 16px;
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid rgba(255, 249, 237, 0.2);
}

.lore-art span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 249, 237, 0.88);
  color: var(--ink);
  font-weight: 900;
}

.heroes-lore .lore-art {
  background:
    linear-gradient(0deg, rgba(23, 22, 20, 0.56), transparent 48%),
    radial-gradient(circle at 18% 30%, rgba(185, 130, 46, 0.55), transparent 18%),
    radial-gradient(circle at 78% 35%, rgba(46, 97, 77, 0.42), transparent 20%),
    linear-gradient(135deg, #4f3228, #b99862 46%, #263d39);
}

.dragons-lore .lore-art {
  background:
    linear-gradient(0deg, rgba(23, 22, 20, 0.58), transparent 45%),
    radial-gradient(circle at 25% 34%, rgba(196, 54, 37, 0.72), transparent 20%),
    radial-gradient(circle at 78% 28%, rgba(42, 91, 132, 0.66), transparent 22%),
    linear-gradient(135deg, #232b31, #6b3524 45%, #172739);
}

.enemies-lore .lore-art {
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.55), transparent 48%),
    radial-gradient(circle at 30% 32%, rgba(110, 24, 31, 0.7), transparent 18%),
    radial-gradient(circle at 75% 35%, rgba(33, 53, 76, 0.7), transparent 22%),
    linear-gradient(135deg, #111214, #27212a 50%, #070809);
}

.log {
  display: grid;
  gap: 10px;
  max-height: 660px;
  overflow: auto;
}

.log-entry {
  padding: 10px;
  border-left: 4px solid var(--gold);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.58);
  line-height: 1.35;
}

.game-shell {
  width: min(1800px, 100%);
  padding: 8px;
}

.topbar {
  gap: 10px;
  padding: 8px 10px;
  box-shadow: 0 8px 24px rgba(30, 26, 20, 0.1);
}

.topbar .eyebrow {
  display: none;
}

.topbar h1 {
  font-size: 1.35rem;
  line-height: 1;
}

.active-hero {
  min-width: 170px;
  padding: 6px 8px;
}

.active-hero small,
.player-card label,
.language-select span,
.small-text,
.market-head p,
.battle-banner p {
  display: none;
}

.language-select select,
.player-card input,
button {
  min-height: 32px;
}

.layout {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.sidebar,
.log-panel {
  display: none;
}

.panel {
  padding: 10px;
  margin-bottom: 8px;
}

.panel h2 {
  margin-bottom: 6px;
  font-size: 0.98rem;
}

.home-city {
  min-height: auto;
  padding: 8px;
}

.meters {
  gap: 4px;
  margin-top: 8px;
}

.meters div,
.resource {
  padding: 6px;
}

.meters span,
.resource span {
  font-size: 0.68rem;
}

.meters strong,
.resource strong {
  font-size: 0.98rem;
}

.resource-grid {
  gap: 4px;
}

.clan-row {
  grid-template-columns: 1fr 64px;
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  gap: 4px;
  padding: 6px;
  background: rgba(255, 249, 237, 0.95);
}

.tab {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.82rem;
}

.tab-panel {
  padding: 10px;
}

#play.tab-panel {
  padding: 8px;
}

.player-control-panel {
  grid-template-columns: minmax(130px, 0.25fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  padding: 8px;
}

.player-control-panel h2 {
  display: none;
}

.player-control-panel p {
  font-size: 0.78rem;
  line-height: 1.2;
}

.hero-select.compact {
  grid-template-columns: repeat(10, minmax(42px, 1fr));
  gap: 4px;
  margin-bottom: 0;
}

.hero-select.compact .hero-choice {
  min-height: 54px;
  padding: 4px;
  justify-items: center;
  text-align: center;
}

.hero-select.compact .portrait {
  width: 30px;
  height: 30px;
}

.hero-select.compact strong {
  font-size: 0.66rem;
  line-height: 1;
}

.play-scene {
  min-height: clamp(680px, 78vh, 900px);
  cursor: default;
}

.scene-action-bubbles {
  display: none !important;
}

.scene-action-progress {
  bottom: 10px;
  width: min(280px, calc(100% - 24px));
  padding: 7px 10px;
}

.scene-hero {
  width: 112px;
}

.scene-hero::after {
  width: 48px;
  height: 9px;
}

.scene-hero-art {
  width: 102px;
  max-height: 154px;
}

.scene-hero-sprite {
  width: 128px;
  height: 146px;
}

.scene-hero strong {
  padding: 3px 6px;
  font-size: 0.66rem;
}

.dragon-companion {
  width: 178px;
  height: 116px;
}

.dragon-real-art,
.dragon-red,
.dragon-companion.dragon-storm-active .dragon-storm,
.dragon-companion.dragon-forest-active .dragon-forest,
.dragon-companion.dragon-sun-active .dragon-sun,
.dragon-companion.dragon-drakar-active .dragon-drakar-art {
  width: 145px;
  height: 96px;
}

.dragon-storm,
.dragon-forest,
.dragon-sun {
  width: 78px;
  height: 56px;
}

.scene-enemy {
  width: 88px;
  min-height: 118px;
}

.shadow-creature-art {
  width: 104px;
  height: 126px;
}

.scene-enemy.enemy-golem .shadow-creature-art {
  filter: sepia(0.4) saturate(0.7) brightness(0.78) contrast(1.24) drop-shadow(0 18px 18px rgba(0, 0, 0, 0.48));
}

.scene-enemy.enemy-wraith .shadow-creature-art {
  filter: hue-rotate(165deg) saturate(0.62) brightness(1.18) contrast(0.92) drop-shadow(0 18px 18px rgba(30, 52, 78, 0.46));
  opacity: 0.88;
}

.scene-enemy.enemy-warlock .shadow-creature-art {
  filter: hue-rotate(250deg) saturate(1.08) brightness(0.86) contrast(1.16) drop-shadow(0 18px 18px rgba(64, 20, 82, 0.48));
}

.scene-enemy.enemy-shadow .shadow-creature-art {
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.45));
}

.scene-enemy.enemy-veil .shadow-creature-art,
.scene-enemy.enemy-dream .shadow-creature-art {
  filter: grayscale(0.35) hue-rotate(185deg) saturate(0.62) brightness(1.12) opacity(0.78) drop-shadow(0 18px 18px rgba(30, 39, 54, 0.5));
}

.scene-enemy.enemy-morgar .shadow-creature-art {
  filter: hue-rotate(320deg) saturate(1.35) brightness(0.82) contrast(1.28) drop-shadow(0 18px 20px rgba(80, 18, 32, 0.58));
}

.scene-enemy.enemy-morgarot .shadow-creature-art {
  filter: sepia(0.75) hue-rotate(325deg) saturate(1.65) brightness(0.92) contrast(1.22) drop-shadow(0 20px 24px rgba(141, 46, 22, 0.62));
}

.scene-enemy.enemy-ledra .shadow-creature-art,
.scene-enemy.enemy-siveron .shadow-creature-art {
  filter: hue-rotate(165deg) saturate(0.78) brightness(1.04) contrast(1.08) drop-shadow(0 18px 18px rgba(24, 63, 92, 0.52));
}

.scene-enemy.enemy-chernorok .shadow-creature-art,
.scene-enemy.enemy-ilmarek .shadow-creature-art {
  filter: grayscale(0.3) sepia(0.35) saturate(0.8) brightness(0.72) contrast(1.32) drop-shadow(0 20px 20px rgba(22, 18, 16, 0.56));
}

.scene-enemy.enemy-blackwing .shadow-creature-art,
.scene-enemy.enemy-rider .shadow-creature-art,
.scene-enemy.enemy-whisper .shadow-creature-art {
  filter: hue-rotate(230deg) saturate(0.95) brightness(0.72) contrast(1.2) drop-shadow(0 18px 20px rgba(18, 20, 38, 0.56));
}

.scene-magic-layer {
  position: absolute;
  inset: 0;
  z-index: 10;
  overflow: hidden;
  pointer-events: none;
}

.scene-clan-party {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
}

.scene-enemy-pack {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}

.pack-enemy {
  position: absolute;
  left: var(--pack-x);
  top: var(--pack-y);
  display: block;
  width: 76px;
  height: 104px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.74);
  transition: opacity 220ms ease, transform 220ms ease;
  animation: enemyRoam 5.2s ease-in-out infinite;
}

.scene-enemy-pack.visible .pack-enemy {
  opacity: 0.9;
  transform: translate(-50%, -50%) scale(1);
}

.pack-enemy img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 12px rgba(0, 0, 0, 0.44));
}

.clan-ally {
  position: absolute;
  left: var(--ally-x);
  top: var(--ally-y);
  display: grid;
  justify-items: center;
  gap: 2px;
  width: 62px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.82);
  transition: opacity 220ms ease, transform 220ms ease;
}

.scene-clan-party.visible .clan-ally {
  opacity: 0.92;
  transform: translate(-50%, -50%) scale(1);
}

.clan-ally img {
  width: 54px;
  height: 76px;
  object-fit: contain;
  filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.32));
}

.clan-ally .portrait {
  width: 42px;
  height: 42px;
  font-size: 0.72rem;
  box-shadow: 0 10px 10px rgba(0, 0, 0, 0.26);
}

.clan-ally b {
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(23, 22, 20, 0.72);
  color: #fff9ed;
  font-size: 0.56rem;
}

.magic-shot,
.weapon-flash,
.impact-burst {
  position: absolute;
  left: var(--fx-x, var(--from-x, 50%));
  top: var(--fx-y, var(--from-y, 50%));
  display: block;
  pointer-events: none;
}

.magic-shot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
  animation: magicTravel 920ms cubic-bezier(0.22, 0.9, 0.22, 1) forwards;
}

.magic-shot::after {
  content: "";
  position: absolute;
  inset: -14px -28px -14px -8px;
  border-radius: 999px;
  background: linear-gradient(90deg, currentColor, transparent);
  opacity: 0.44;
  filter: blur(6px);
  transform: rotate(18deg);
}

.magic-shot::before {
  content: attr(data-rune);
  position: absolute;
  left: 50%;
  top: -22px;
  min-width: 42px;
  color: currentColor;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-align: center;
  text-shadow: 0 0 8px currentColor;
  transform: translateX(-50%);
  animation: runeSpin 920ms linear forwards;
}

.magic-shot.light {
  color: #fff7b8;
  background: radial-gradient(circle, #fffdf0 0 18%, #f7d66a 45%, rgba(255, 215, 92, 0) 72%);
  box-shadow: 0 0 22px rgba(255, 236, 139, 0.9);
}

.magic-shot.water {
  color: #7ed7ff;
  border-radius: 50% 45% 54% 42%;
  background: radial-gradient(circle, #e9fbff 0 14%, #42a9dd 45%, rgba(57, 143, 202, 0) 74%);
  box-shadow: 0 0 22px rgba(82, 188, 235, 0.85);
}

.magic-shot.fire,
.magic-shot.dragon,
.magic-shot.dragon-fire {
  color: #ff9a3d;
  background: radial-gradient(circle, #fff0a4 0 12%, #ff802e 42%, rgba(210, 39, 25, 0) 76%);
  box-shadow: 0 0 24px rgba(255, 113, 45, 0.95);
}

.magic-shot.storm {
  color: #b7c9ff;
  clip-path: polygon(50% 0, 62% 34%, 100% 42%, 68% 58%, 78% 100%, 49% 70%, 20% 100%, 32% 58%, 0 42%, 38% 34%);
  background: radial-gradient(circle, #f1f6ff 0 12%, #745cff 40%, rgba(65, 77, 192, 0) 76%);
  box-shadow: 0 0 24px rgba(126, 116, 255, 0.9);
}

.magic-shot.nature {
  color: #98e768;
  border-radius: 68% 34% 58% 42%;
  background: radial-gradient(circle, #f4ffd6 0 15%, #65bd50 45%, rgba(63, 151, 68, 0) 76%);
  box-shadow: 0 0 22px rgba(124, 221, 92, 0.86);
}

.magic-shot.earth {
  color: #d5aa63;
  clip-path: polygon(50% 0, 100% 36%, 82% 100%, 18% 100%, 0 36%);
  background: radial-gradient(circle, #ffe6ac 0 12%, #9b6d36 45%, rgba(102, 71, 38, 0) 76%);
  box-shadow: 0 0 20px rgba(181, 125, 53, 0.82);
}

.magic-shot.shadow {
  color: #8c2848;
  background: radial-gradient(circle, #ff6378 0 12%, #3c1230 45%, rgba(15, 8, 20, 0) 78%);
  box-shadow: 0 0 24px rgba(94, 22, 53, 0.9);
}

.magic-shot.dragon-breath {
  width: 34px;
  height: 20px;
  border-radius: 55% 45% 45% 55%;
  animation-duration: 720ms;
}

.magic-shot.healing-cast {
  width: 28px;
  height: 28px;
  border-radius: 62% 38% 58% 42%;
  animation-duration: 860ms;
}

.magic-shot.healing-cast::after {
  inset: -18px -18px -18px -18px;
  background: radial-gradient(circle, currentColor, transparent 62%);
  opacity: 0.32;
}

.weapon-flash {
  z-index: 2;
  width: 118px;
  height: 36px;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-16deg);
  animation: weaponFlash 680ms ease-out forwards;
}

.weapon-flash::before {
  content: "";
  position: absolute;
  inset: 13px 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 249, 237, 0.95), #d1a043, transparent);
  box-shadow: 0 0 18px rgba(255, 239, 166, 0.72);
}

.weapon-flash.spear::before {
  inset: 15px -10px;
  background: linear-gradient(90deg, transparent, #e8dfc8 18%, #ffffff 48%, #b9822e 52%, transparent);
}

.weapon-flash.orb::before {
  inset: 2px 35px;
  border-radius: 50%;
  background: radial-gradient(circle, #fffdf7, rgba(116, 160, 255, 0.86) 42%, transparent 72%);
}

.impact-burst {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.3);
  animation: impactBurst 780ms ease-out forwards;
}

.impact-burst.light { box-shadow: inset 0 0 0 3px rgba(255, 240, 150, 0.7), 0 0 34px rgba(255, 237, 128, 0.75); }
.impact-burst.water { box-shadow: inset 0 0 0 3px rgba(87, 188, 235, 0.74), 0 0 34px rgba(95, 197, 235, 0.68); }
.impact-burst.fire,
.impact-burst.dragon,
.impact-burst.dragon-fire { box-shadow: inset 0 0 0 3px rgba(255, 127, 48, 0.74), 0 0 38px rgba(255, 90, 45, 0.75); }
.impact-burst.storm { box-shadow: inset 0 0 0 3px rgba(137, 126, 255, 0.78), 0 0 36px rgba(116, 95, 255, 0.72); }
.impact-burst.nature { box-shadow: inset 0 0 0 3px rgba(113, 218, 88, 0.72), 0 0 34px rgba(124, 221, 92, 0.68); }
.impact-burst.earth { box-shadow: inset 0 0 0 3px rgba(196, 139, 65, 0.72), 0 0 32px rgba(173, 109, 43, 0.66); }
.impact-burst.shadow { box-shadow: inset 0 0 0 3px rgba(119, 29, 67, 0.8), 0 0 36px rgba(92, 18, 55, 0.75); }

.log {
  max-height: 560px;
  gap: 6px;
}

.log-entry {
  padding: 8px;
  font-size: 0.82rem;
}

@keyframes magicTravel {
  0% {
    left: var(--from-x);
    top: var(--from-y);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.52) rotate(0deg);
  }
  18% {
    opacity: 1;
  }
  100% {
    left: var(--to-x);
    top: var(--to-y);
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.42) rotate(18deg);
  }
}

@keyframes runeSpin {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(10px) scale(0.72) rotate(-10deg);
  }
  26% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-16px) scale(1.08) rotate(10deg);
  }
}

@keyframes weaponFlash {
  0% { opacity: 0; transform: translate(-70%, -52%) rotate(-28deg) scaleX(0.32); }
  32% { opacity: 1; transform: translate(-50%, -50%) rotate(-12deg) scaleX(1.08); }
  100% { opacity: 0; transform: translate(-28%, -45%) rotate(10deg) scaleX(0.86); }
}

@keyframes impactBurst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.28); }
  28% { opacity: 0.92; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.65); }
}

@keyframes roadSlide {
  0% { transform: translateX(0); }
  48% { transform: translateX(-5%); }
  100% { transform: translateX(0); }
}

@keyframes roadSlideY {
  0% { transform: translateY(0); }
  48% { transform: translateY(-5%); }
  100% { transform: translateY(0); }
}

@media (max-width: 1180px) {
  .start-screen {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .start-art {
    order: 2;
    min-height: 220px;
  }

  .start-content {
    order: 1;
    padding: 28px;
  }

  .layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .log-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .account-panel {
    width: min(100% - 20px, 520px);
    grid-template-columns: 1fr;
  }

  .account-form {
    grid-template-columns: 1fr;
  }

  .account-form #accountName {
    grid-column: auto;
  }

  .topbar,
  .market-head,
  .battle-banner {
    align-items: stretch;
    flex-direction: column;
  }

  body.game-started .account-panel,
  body.game-started .account-form,
  body.game-started .topbar {
    grid-template-columns: 1fr;
  }

  .player-profile {
    min-width: 0;
  }

  .hero-select {
    grid-template-columns: 1fr;
  }

  .hero-select.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .start-content {
    padding: 18px;
  }

  .start-content h1 {
    font-size: 2.6rem;
  }

  .start-lead {
    font-size: 1rem;
  }

  .start-art {
    min-height: 150px;
  }

  .layout,
  .player-control-panel,
  .city-info,
  .card-grid,
  .dragon-grid,
  .lore-grid,
  .admin-login,
  .admin-tools,
  .admin-player {
    grid-template-columns: 1fr;
  }

  .dragon-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .dragon-card .tag-row {
    width: 100%;
  }

  .game-shell {
    padding: 10px;
  }

  .map-wrap,
  .realm-map {
    min-height: 360px;
  }

  .play-scene {
    min-height: 480px;
  }

  .scene-spot {
    width: 88px;
    min-height: 62px;
  }

  .scene-field {
    left: 9%;
    top: 75%;
    width: 104px;
  }

  .scene-orchard {
    left: 3%;
    top: 41%;
    width: 102px;
  }

  .scene-enemy {
    width: 76px;
    min-height: 76px;
  }
}

body.game-started .account-panel {
  position: sticky;
  top: 0;
  z-index: 40;
  width: min(1500px, calc(100% - 24px));
  margin: 8px auto 0;
  padding: 10px 12px;
  grid-template-columns: minmax(220px, 0.65fr) minmax(0, 1.55fr);
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 24px rgba(30, 26, 20, 0.12);
}

body.game-started .account-panel h2 {
  font-size: 1rem;
}

body.game-started .account-panel .eyebrow {
  display: none;
}

body.game-started .account-panel #accountStatus {
  font-size: 0.82rem;
  line-height: 1.3;
}

body.game-started .account-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

body.game-started .account-form #accountName {
  grid-column: auto;
}

body.game-started .account-form > input {
  min-width: 0;
  flex: 1 1 135px;
}

body.game-started .account-form > button {
  flex: 0 0 auto;
}

body.game-started .remember-login {
  min-height: 38px;
  white-space: nowrap;
}

body.game-started .topbar {
  display: grid;
  grid-template-columns: minmax(170px, 0.75fr) minmax(220px, 0.95fr) minmax(104px, 0.38fr) minmax(170px, 0.72fr) minmax(270px, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 12px;
}

body.game-started .topbar h1 {
  font-size: 1.35rem;
}

body.game-started .topbar .eyebrow {
  display: none;
}

body.game-started .layout {
  grid-template-columns: minmax(0, 1fr);
}

body.game-started .main-board {
  grid-column: 1 / -1;
}

body.game-started .play-scene {
  height: clamp(560px, calc(100vh - 150px), 900px);
  min-height: 560px;
}

@media (max-width: 820px) {
  body.game-started .account-panel,
  body.game-started .account-form,
  body.game-started .topbar {
    grid-template-columns: 1fr;
  }

  body.game-started .account-form {
    display: grid;
    gap: 8px;
  }

  body.game-started .account-panel {
    position: relative;
    top: auto;
    z-index: auto;
    width: min(100% - 20px, 520px);
  }

  .player-profile {
    min-width: 0;
  }
}

@media (max-width: 820px) {
  .scene-hero.hero-galinor .scene-hero-sprite {
    width: 98px;
    height: 146px;
  }
}
