:root {
  --ink: #090d1b;
  --midnight: #101735;
  --velvet: #28112a;
  --parchment: #fff0c8;
  --bone: #f8dfaa;
  --gold: #f2c45c;
  --ember: #d76a32;
  --arcane: #54d7cb;
  --ruby: #a9323b;
  --line: rgba(242, 196, 92, 0.34);
  --shadow: rgba(0, 0, 0, 0.44);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Palatino Linotype", Palatino, Georgia, serif;
  color: var(--bone);
  background: var(--ink);
}

a {
  color: inherit;
}

.splash {
  --home-edge-fade: clamp(5rem, 8vw, 12rem);
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 4rem 1.25rem;
  isolation: isolate;
  overflow: hidden;
  background: #000;
}

.splash::before,
.splash::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
}

.splash::before {
  left: 50%;
  z-index: -2;
  width: min(100vw, 177.7778vh);
  background: url("/assets/home-page-background/bg.png") top center / auto 100% no-repeat;
  transform: translateX(-50%);
  mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 var(--home-edge-fade),
    #000 calc(100% - var(--home-edge-fade)),
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 var(--home-edge-fade),
    #000 calc(100% - var(--home-edge-fade)),
    transparent 100%
  );
}

@supports (height: 100dvh) {
  .splash::before {
    width: min(100dvw, 177.7778dvh);
  }
}

.splash::after {
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.26)),
    radial-gradient(circle at 50% 56%, transparent 0 24%, rgba(0, 0, 0, 0.28) 70%);
}

.tableau {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.card,
.thread {
  position: absolute;
  display: block;
}

.card {
  width: 7.5rem;
  aspect-ratio: 0.68;
  border: 1px solid rgba(242, 196, 92, 0.58);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 38%, rgba(84, 215, 203, 0.24), transparent 23%),
    linear-gradient(135deg, rgba(255, 240, 200, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(44, 31, 80, 0.94), rgba(19, 18, 46, 0.96));
  box-shadow:
    0 18px 42px var(--shadow),
    inset 0 0 0 4px rgba(255, 240, 200, 0.05),
    inset 0 0 32px rgba(242, 196, 92, 0.08);
  opacity: 0.76;
}

.card::before {
  position: absolute;
  inset: 0.55rem;
  content: "";
  border: 1px solid rgba(242, 196, 92, 0.42);
  border-radius: 11px;
  box-shadow: inset 0 0 18px rgba(84, 215, 203, 0.08);
}

.card::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.7rem;
  height: 1.7rem;
  content: "";
  border: 1px solid rgba(255, 240, 200, 0.58);
  background: radial-gradient(circle, rgba(84, 215, 203, 0.75), rgba(167, 50, 59, 0.2) 62%, transparent 63%);
  box-shadow: 0 0 24px rgba(84, 215, 203, 0.34);
  transform: translate(-50%, -50%) rotate(45deg);
}

.card-one {
  top: 14%;
  left: 12%;
  rotate: -12deg;
  animation: drift-one 10s ease-in-out infinite;
}

.card-two {
  right: 13%;
  top: 18%;
  rotate: 9deg;
  background:
    radial-gradient(circle at 50% 38%, rgba(242, 196, 92, 0.28), transparent 23%),
    linear-gradient(135deg, rgba(255, 240, 200, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(95, 42, 45, 0.9), rgba(19, 18, 46, 0.96));
  animation: drift-two 12s ease-in-out infinite;
}

.card-three {
  bottom: 14%;
  left: 20%;
  rotate: 7deg;
  background:
    radial-gradient(circle at 50% 38%, rgba(216, 106, 50, 0.28), transparent 23%),
    linear-gradient(135deg, rgba(255, 240, 200, 0.1), transparent 32%),
    linear-gradient(180deg, rgba(70, 29, 52, 0.92), rgba(15, 17, 39, 0.96));
  animation: drift-two 11s ease-in-out infinite;
}

.card-four {
  right: 20%;
  bottom: 11%;
  rotate: -8deg;
  background:
    radial-gradient(circle at 50% 38%, rgba(84, 215, 203, 0.24), transparent 23%),
    linear-gradient(135deg, rgba(255, 240, 200, 0.1), transparent 32%),
    linear-gradient(180deg, rgba(113, 68, 31, 0.92), rgba(19, 18, 46, 0.96));
  animation: drift-one 13s ease-in-out infinite;
}

.thread {
  width: 28rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(242, 196, 92, 0.34), rgba(84, 215, 203, 0.18), transparent);
  transform-origin: center;
}

.thread-one {
  top: 37%;
  left: 23%;
  rotate: -18deg;
}

.thread-two {
  right: 23%;
  bottom: 33%;
  rotate: 17deg;
}

.hero {
  position: relative;
  display: grid;
  justify-items: center;
  width: min(31rem, 100%);
  margin-top: clamp(4rem, 14vh, 9rem);
  text-align: center;
  animation: rise 700ms ease-out both;
}

.hero::before {
  content: none;
}

.kicker {
  margin: 0 0 1.25rem;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 0 22px rgba(242, 196, 92, 0.3);
}

h1,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.6rem;
  color: var(--parchment);
  font-size: 8.75rem;
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0;
  text-shadow:
    0 2px 0 rgba(99, 50, 23, 0.7),
    0 18px 56px rgba(0, 0, 0, 0.58),
    0 0 34px rgba(242, 196, 92, 0.18);
}

.lede {
  max-width: 34rem;
  margin: 0 auto;
  color: var(--gold);
  font-size: clamp(1.45rem, 4vw, 2.35rem);
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-shadow: 0 0 26px rgba(216, 106, 50, 0.34);
}

.mail-link {
  color: inherit;
  text-decoration: none;
}

.mail-link:hover,
.mail-link:focus-visible {
  color: var(--gold);
  border-color: currentColor;
}

.auth-actions {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 0;
}

.auth-button,
.account-chip button,
.auth-submit,
.auth-tabs button,
.close-button {
  font: inherit;
  color: inherit;
}

.auth-button,
.auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.72rem 1.05rem;
  cursor: pointer;
  border: 1px solid rgba(242, 196, 92, 0.42);
  border-radius: 10px;
  background: rgba(16, 23, 53, 0.54);
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.12);
  text-decoration: none;
}

.auth-button.primary,
.auth-submit {
  color: #21130c;
  border-color: rgba(255, 240, 200, 0.58);
  background:
    linear-gradient(180deg, #ffe29a, #f2b94f 58%, #c97828);
  box-shadow:
    0 10px 28px rgba(216, 106, 50, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.auth-button.secondary {
  color: rgba(255, 240, 200, 0.92);
  background: rgba(8, 13, 32, 0.62);
}

.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0;
  padding: 0.62rem 0.75rem;
  color: rgba(247, 240, 223, 0.86);
  border: 1px solid rgba(242, 196, 92, 0.36);
  border-radius: 999px;
  background: rgba(8, 13, 32, 0.62);
}

.account-chip button {
  cursor: pointer;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
}

.early-access-card {
  display: grid;
  justify-items: center;
  width: min(31rem, 100%);
  margin: 1.2rem auto 0;
  padding: 1rem;
  text-align: center;
  border: 1px solid rgba(242, 196, 92, 0.32);
  border-radius: 14px;
  background:
    radial-gradient(circle at 10% 0, rgba(242, 196, 92, 0.12), transparent 11rem),
    rgba(8, 13, 32, 0.68);
  box-shadow:
    0 18px 46px rgba(0, 0, 0, 0.24),
    inset 0 0 0 4px rgba(255, 240, 200, 0.03);
}

.early-access-card:has([data-enter-game]:not([hidden])) {
  width: min(22rem, 100%);
}

.early-access-card .kicker {
  margin-bottom: 0.7rem;
}

.access-form {
  display: grid;
  width: 100%;
  gap: 0.8rem;
  text-align: left;
}

.access-form label {
  display: grid;
  gap: 0.42rem;
  color: rgba(248, 223, 170, 0.78);
  font-size: 0.84rem;
}

.access-form span {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
}

.access-form input {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 0.82rem;
  color: var(--parchment);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(242, 196, 92, 0.28);
  border-radius: 9px;
  outline: none;
  background: rgba(5, 8, 20, 0.48);
}

.access-form input:focus {
  border-color: rgba(84, 215, 203, 0.7);
  box-shadow: 0 0 0 3px rgba(84, 215, 203, 0.12);
}

.access-form input:disabled,
.access-form button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.auth-dialog {
  width: min(27rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  color: var(--bone);
  overflow: auto;
  border: 1px solid rgba(242, 196, 92, 0.42);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 0, rgba(242, 196, 92, 0.14), transparent 13rem),
    linear-gradient(180deg, rgba(23, 22, 54, 0.98), rgba(13, 13, 31, 0.98)),
    #101735;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.52),
    inset 0 0 0 4px rgba(255, 240, 200, 0.04);
}

.auth-dialog::backdrop {
  background: rgba(6, 8, 18, 0.76);
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.15rem 0.75rem;
}

.dialog-head p {
  margin: 0 0 0.2rem;
  font-size: 1.18rem;
  color: var(--parchment);
}

.dialog-head span {
  display: block;
  max-width: 18rem;
  color: rgba(248, 223, 170, 0.68);
  font-size: 0.82rem;
  line-height: 1.45;
}

.close-button {
  min-height: 2rem;
  width: 2rem;
  padding: 0;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  border: 1px solid rgba(242, 196, 92, 0.32);
  border-radius: 8px;
  background: rgba(255, 240, 200, 0.07);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.28rem;
  padding: 0.25rem 1.15rem 0;
}

.auth-tabs button {
  min-height: 2.45rem;
  cursor: pointer;
  color: rgba(248, 223, 170, 0.72);
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
}

.auth-tabs button[aria-selected="true"] {
  color: var(--parchment);
  border-color: rgba(242, 196, 92, 0.42);
  background: rgba(242, 196, 92, 0.11);
}

.auth-form {
  display: grid;
  gap: 0.92rem;
  padding: 1rem 1.15rem 1.15rem;
}

.auth-form label {
  display: grid;
  gap: 0.35rem;
  color: rgba(248, 223, 170, 0.78);
  font-size: 0.84rem;
}

.auth-form input {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 0.82rem;
  color: var(--parchment);
  border: 1px solid rgba(242, 196, 92, 0.28);
  border-radius: 9px;
  outline: none;
  background: rgba(5, 8, 20, 0.48);
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.05);
}

.auth-form input:focus {
  border-color: rgba(84, 215, 203, 0.7);
  box-shadow:
    0 0 0 3px rgba(84, 215, 203, 0.12),
    inset 0 1px 0 rgba(255, 240, 200, 0.05);
}

.auth-form input::placeholder {
  color: rgba(248, 223, 170, 0.36);
}

.turnstile-slot:empty {
  display: none;
}

.auth-submit {
  margin-top: 0.3rem;
  min-height: 3rem;
  font-weight: 700;
}

.form-message {
  min-height: 1.4rem;
  margin: 0;
  color: rgba(248, 223, 170, 0.72);
  font-size: 0.88rem;
  line-height: 1.5;
}

.form-message[data-tone="error"] {
  color: #ffafa8;
}

.form-message[data-tone="success"] {
  color: #9ef2e9;
}

.flow-shell {
  padding: 5rem 1.25rem;
}

.flow-card {
  width: min(34rem, 100%);
  padding: 1.5rem;
  text-align: left;
  border: 1px solid rgba(242, 196, 92, 0.42);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0, rgba(242, 196, 92, 0.12), transparent 14rem),
    linear-gradient(180deg, rgba(23, 22, 54, 0.94), rgba(13, 13, 31, 0.96)),
    #101735;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.42),
    inset 0 0 0 4px rgba(255, 240, 200, 0.04);
  animation: rise 700ms ease-out both;
}

.game-body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  color: #d8c49a;
  overflow: hidden;
  background:
    radial-gradient(circle at 64% 28%, rgba(91, 33, 26, 0.3), transparent 26rem),
    radial-gradient(circle at 84% 76%, rgba(136, 83, 28, 0.18), transparent 24rem),
    linear-gradient(135deg, #050506, #12100f 44%, #090807);
}

.game-body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.64), transparent 28%, transparent 78%, rgba(0, 0, 0, 0.42)),
    repeating-linear-gradient(
      0deg,
      rgba(255, 232, 177, 0.02) 0 1px,
      transparent 1px 5px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255, 232, 177, 0.015) 0 1px,
      transparent 1px 9px
    );
  mix-blend-mode: screen;
}

.game-interface {
  --game-window-width: min(100vw, 177.7778vh);
  --game-window-height: min(100vh, 56.25vw);
  position: relative;
  display: grid;
  grid-template-columns: clamp(17rem, 23vw, 23rem) minmax(0, 1fr);
  width: var(--game-window-width);
  height: var(--game-window-height);
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
}

@supports (height: 100dvh) {
  .game-interface {
    --game-window-width: min(100dvw, 177.7778dvh);
    --game-window-height: min(100dvh, 56.25dvw);
  }
}

.game-sidebar {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  height: 100%;
  border-right: 1px solid rgba(139, 102, 52, 0.55);
  background:
    radial-gradient(circle at 50% 0, rgba(139, 102, 52, 0.16), transparent 14rem),
    linear-gradient(180deg, rgba(21, 18, 16, 0.98), rgba(8, 7, 7, 0.98));
  box-shadow:
    18px 0 56px rgba(0, 0, 0, 0.5),
    inset -1px 0 0 rgba(255, 232, 177, 0.06);
}

.game-sidebar::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(120deg, transparent 0 45%, rgba(255, 232, 177, 0.035) 46% 47%, transparent 48%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 8px);
}

.game-tabs {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  padding: 0.7rem;
  border-bottom: 1px solid rgba(139, 102, 52, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 232, 177, 0.035), transparent),
    rgba(5, 5, 5, 0.34);
  box-shadow: inset 0 -1px 0 rgba(255, 232, 177, 0.035);
}

.game-tabs button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.55rem 0.62rem;
  cursor: pointer;
  color: rgba(216, 196, 154, 0.66);
  font: inherit;
  font-size: 0.94rem;
  letter-spacing: 0.03em;
  text-align: left;
  border: 1px solid rgba(139, 102, 52, 0.24);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 232, 177, 0.035), rgba(0, 0, 0, 0.12)),
    rgba(8, 7, 6, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 232, 177, 0.04),
    0 10px 22px rgba(0, 0, 0, 0.18);
}

.game-tabs button[aria-selected="true"] {
  color: #ffe4a6;
  border-color: rgba(218, 157, 58, 0.82);
  background:
    radial-gradient(circle at 50% 0, rgba(218, 157, 58, 0.3), transparent 4.6rem),
    linear-gradient(180deg, rgba(83, 47, 24, 0.92), rgba(25, 16, 13, 0.96));
  box-shadow:
    0 0 22px rgba(218, 157, 58, 0.1),
    inset 0 1px 0 rgba(255, 232, 177, 0.18);
}

.game-tabs span {
  display: inline-grid;
  min-width: 1.7rem;
  height: 1.45rem;
  place-items: center;
  color: rgba(216, 196, 154, 0.72);
  font-size: 0.76rem;
  border: 1px solid rgba(139, 102, 52, 0.3);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.26);
}

.game-tabs button[aria-selected="true"] span {
  color: #1c0e07;
  border-color: rgba(255, 232, 177, 0.54);
  background: linear-gradient(180deg, #ffe4a6, #d99d3a);
}

.game-side-list {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  gap: 0.6rem;
  padding: 0.85rem;
  overflow-y: auto;
}

.side-card {
  display: grid;
  grid-template-columns: 4.4rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  width: 100%;
  min-height: 6.2rem;
  padding: 0.55rem;
  cursor: pointer;
  color: inherit;
  font: inherit;
  text-align: left;
  border: 1px solid rgba(139, 102, 52, 0.24);
  border-radius: 9px;
  background:
    linear-gradient(90deg, rgba(255, 232, 177, 0.04), transparent),
    rgba(5, 5, 5, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 232, 177, 0.04);
}

.side-card[aria-pressed="true"] {
  border-color: rgba(218, 157, 58, 0.82);
  background:
    radial-gradient(circle at 12% 50%, rgba(218, 157, 58, 0.22), transparent 7rem),
    linear-gradient(90deg, rgba(83, 47, 24, 0.78), rgba(9, 8, 8, 0.66));
  box-shadow:
    0 0 24px rgba(218, 157, 58, 0.12),
    inset 0 1px 0 rgba(255, 232, 177, 0.12);
}

.side-card-art,
.side-pack-art {
  position: relative;
  display: grid;
  height: 5.1rem;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(139, 102, 52, 0.52);
  border-radius: 7px;
  background:
    radial-gradient(circle at 50% 38%, rgba(218, 157, 58, 0.2), transparent 26%),
    linear-gradient(180deg, #251610, #0a0909);
}

.side-card-art img,
.character-detail-art img,
.pack-detail-art img,
.side-pack-art img {
  display: block;
  width: 100%;
  height: 100%;
}

.side-card-art img,
.character-detail-art img {
  object-fit: cover;
}

.side-pack-art img {
  width: auto;
  max-width: 100%;
  object-fit: contain;
  padding: 0.12rem;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.44));
}

.side-card-text {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.side-card-text strong {
  color: #f1d8a2;
  overflow: hidden;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-card-text small,
.game-empty,
.game-empty-state span {
  color: rgba(216, 196, 154, 0.58);
  font-size: 0.82rem;
  line-height: 1.4;
}

.game-empty-state {
  position: relative;
  display: grid;
  gap: 0.45rem;
  min-height: 8.5rem;
  padding: 1rem;
  overflow: hidden;
  border: 1px solid rgba(139, 102, 52, 0.28);
  border-radius: 10px;
  background:
    radial-gradient(circle at 18% 0, rgba(218, 157, 58, 0.14), transparent 8rem),
    linear-gradient(135deg, rgba(255, 232, 177, 0.04), transparent 46%),
    rgba(5, 5, 5, 0.46);
  box-shadow:
    inset 0 1px 0 rgba(255, 232, 177, 0.05),
    0 18px 34px rgba(0, 0, 0, 0.22);
}

.game-empty-state::after {
  position: absolute;
  right: -1.2rem;
  bottom: -1.7rem;
  width: 6.5rem;
  aspect-ratio: 1;
  content: "";
  border: 1px solid rgba(218, 157, 58, 0.22);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(218, 157, 58, 0.12), transparent 54%),
    conic-gradient(from 40deg, transparent, rgba(218, 157, 58, 0.16), transparent);
}

.game-empty-state strong {
  position: relative;
  z-index: 1;
  color: #f1d8a2;
  font-weight: 400;
}

.game-empty-state span {
  position: relative;
  z-index: 1;
  max-width: 13rem;
}

.game-detail-panel {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: clamp(1rem, 2vw, 1.65rem);
  background:
    radial-gradient(circle at 48% 42%, rgba(95, 36, 24, 0.28), transparent 25rem),
    radial-gradient(circle at 78% 18%, rgba(218, 157, 58, 0.12), transparent 21rem),
    linear-gradient(135deg, rgba(18, 15, 13, 0.88), rgba(4, 4, 4, 0.96));
}

.game-detail-panel::before {
  position: absolute;
  inset: 1rem;
  pointer-events: none;
  content: "";
  border: 1px solid rgba(139, 102, 52, 0.24);
  box-shadow:
    inset 0 0 0 1px rgba(255, 232, 177, 0.035),
    inset 0 0 80px rgba(0, 0, 0, 0.5);
}

.pack-detail,
.character-detail,
.game-empty-detail {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(139, 102, 52, 0.32);
  background:
    linear-gradient(135deg, rgba(255, 232, 177, 0.035), transparent 26%),
    rgba(9, 8, 8, 0.42);
}

.character-detail {
  grid-template-columns: minmax(20rem, 0.92fr) minmax(18rem, 0.7fr);
}

.pack-detail {
  grid-template-columns: minmax(18rem, 0.78fr) minmax(20rem, 0.88fr);
  align-items: center;
}

.game-empty-detail {
  align-content: center;
  justify-items: center;
  gap: 1rem;
  padding: 1.5rem;
  text-align: center;
}

.game-empty-detail p {
  max-width: 18rem;
  margin: 0;
  color: rgba(216, 196, 154, 0.72);
  line-height: 1.5;
}

.pack-detail.is-flying-in,
.pack-detail.is-flying-in .pack-detail-art {
  overflow: visible;
}

.pack-detail.is-flying-in .pack-detail-art::before {
  animation: pack-soft-bloom 960ms ease-out 180ms both;
}

.pack-detail.is-flying-in .pack-detail-art img {
  animation: pack-focus-in 1050ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.is-opening-pack .pack-detail-art::before {
  animation: pack-open-glow 900ms ease-in-out infinite;
}

.is-opening-pack .pack-detail-art img {
  animation: pack-open-pulse 900ms ease-in-out infinite;
}

.pack-detail.is-detail-entering .pack-detail-copy,
.character-detail.is-detail-entering .character-detail-stats {
  animation: detail-panel-in 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.character-detail-art,
.pack-detail-art {
  position: relative;
  display: grid;
  min-height: 100%;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(218, 157, 58, 0.16), transparent 22rem),
    linear-gradient(180deg, #1b130f, #060505);
}

.pack-detail-art img {
  position: relative;
  z-index: 1;
  width: auto;
  max-width: min(78%, 34rem);
  height: auto;
  max-height: min(88vh, 56rem);
  object-fit: contain;
  filter:
    drop-shadow(0 28px 38px rgba(0, 0, 0, 0.58))
    drop-shadow(0 0 28px rgba(121, 42, 34, 0.22));
  transform-origin: 50% 58%;
  will-change: filter, transform;
}

.pack-detail-art::before {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  width: min(62vw, 44rem);
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  content: "";
  opacity: 0;
  background: radial-gradient(
    circle,
    rgba(255, 224, 150, 0.34) 0%,
    rgba(197, 108, 53, 0.16) 34%,
    rgba(111, 47, 25, 0.07) 55%,
    rgba(111, 47, 25, 0) 74%
  );
  filter: blur(42px);
  transform: translate(-50%, -50%) scale(0.86);
  will-change: opacity, transform;
}

.character-detail-art::after,
.pack-detail-art::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.28), transparent 30%, transparent 70%, rgba(0, 0, 0, 0.38)),
    repeating-linear-gradient(0deg, rgba(255, 232, 177, 0.018) 0 1px, transparent 1px 6px);
}

.detail-sigil {
  position: relative;
  display: block;
  width: min(15rem, 42vw);
  aspect-ratio: 1;
  border: 1px solid rgba(218, 157, 58, 0.58);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 232, 177, 0.22) 0 7%, transparent 8%),
    conic-gradient(from 40deg, rgba(218, 157, 58, 0.1), rgba(97, 44, 24, 0.35), rgba(218, 157, 58, 0.1)),
    radial-gradient(circle, rgba(8, 8, 8, 0.98), rgba(38, 20, 14, 0.92));
  box-shadow:
    0 0 80px rgba(218, 157, 58, 0.12),
    inset 0 0 0 12px rgba(255, 232, 177, 0.025);
}

.detail-sigil::before,
.detail-sigil::after {
  position: absolute;
  inset: 18%;
  content: "";
  border: 1px solid rgba(218, 157, 58, 0.4);
  transform: rotate(45deg);
}

.detail-sigil::after {
  inset: 32%;
  border-color: rgba(196, 68, 45, 0.42);
}

.character-detail-stats,
.pack-detail-copy {
  display: grid;
  align-content: center;
  gap: 1rem;
  padding: clamp(1.5rem, 4vw, 4rem);
}

.character-detail-stats h2,
.pack-detail-copy h2 {
  margin: 0;
  color: #ffe4a6;
  font-size: clamp(2.75rem, 6vw, 6rem);
  font-weight: 400;
  line-height: 0.9;
  text-shadow:
    0 2px 0 rgba(56, 21, 13, 0.9),
    0 18px 48px rgba(0, 0, 0, 0.55);
}

.card-rarity {
  color: #d99d3a;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pack-detail-copy p,
.card-title,
.card-lore {
  max-width: 36rem;
  color: rgba(216, 196, 154, 0.78);
  font-size: 1.02rem;
  line-height: 1.65;
}

.pack-detail-copy .pack-tagline {
  color: #f3cf82;
  font-size: 1.24rem;
}

.pack-detail-copy .pack-description {
  margin-bottom: 0.1rem;
}

.pack-contents {
  display: grid;
  gap: 0.55rem;
  max-width: 28rem;
  padding: 0.9rem;
  color: rgba(216, 196, 154, 0.82);
  border: 1px solid rgba(139, 102, 52, 0.32);
  background:
    linear-gradient(90deg, rgba(255, 232, 177, 0.06), transparent),
    rgba(5, 5, 5, 0.3);
}

.pack-contents p {
  margin: 0;
  color: #ffe4a6;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pack-contents ul {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding-left: 1.1rem;
}

.pack-contents li::marker {
  color: #d99d3a;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 0;
}

.stat-grid div {
  display: contents;
}

.stat-grid dt,
.stat-grid dd {
  margin: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(139, 102, 52, 0.28);
  background: rgba(5, 5, 5, 0.42);
}

.stat-grid dt {
  color: rgba(216, 196, 154, 0.58);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
}

.stat-grid dd {
  color: #ffe4a6;
  text-align: right;
}

.game-primary-action {
  width: min(22rem, 100%);
  min-height: 3.4rem;
  margin-top: 0.4rem;
  cursor: pointer;
  color: #180c06;
  font: inherit;
  font-weight: 700;
  border: 1px solid rgba(255, 232, 177, 0.68);
  border-radius: 4px;
  background:
    linear-gradient(180deg, #ffd983, #c47a2c 62%, #6f2f19);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.game-primary-action:disabled {
  cursor: not-allowed;
  filter: grayscale(0.65);
  opacity: 0.62;
}

.game-toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 5;
  max-width: min(28rem, calc(100vw - 2rem));
  margin: 0;
  padding: 0.7rem 0.9rem;
  color: rgba(216, 196, 154, 0.8);
  border: 1px solid rgba(139, 102, 52, 0.4);
  border-radius: 8px;
  background: rgba(6, 5, 5, 0.86);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.34);
}

.game-toast:empty {
  display: none;
}

.game-toast[data-tone="error"] {
  color: #ffaaa0;
}

.game-toast[data-tone="success"] {
  color: #ffe4a6;
}

@keyframes pack-focus-in {
  0% {
    opacity: 1;
    filter:
      brightness(0.92)
      drop-shadow(0 22px 30px rgba(0, 0, 0, 0.5))
      drop-shadow(0 0 16px rgba(121, 42, 34, 0.12));
    transform: translate3d(calc(-100vw - 18rem), 1.1rem, 0) rotate(-3.5deg) scale(0.985);
  }

  72% {
    filter:
      brightness(1.02)
      drop-shadow(0 30px 40px rgba(0, 0, 0, 0.58))
      drop-shadow(0 0 24px rgba(121, 42, 34, 0.18));
    transform: translate3d(1.25rem, -0.08rem, 0) rotate(0.55deg) scale(1.003);
  }

  88% {
    filter:
      brightness(1.06)
      drop-shadow(0 30px 40px rgba(0, 0, 0, 0.58))
      drop-shadow(0 0 30px rgba(121, 42, 34, 0.22));
    transform: translate3d(-0.18rem, 0.02rem, 0) rotate(-0.08deg) scale(1.001);
  }

  100% {
    opacity: 1;
    filter:
      drop-shadow(0 28px 38px rgba(0, 0, 0, 0.58))
      drop-shadow(0 0 28px rgba(121, 42, 34, 0.22));
    transform: translate3d(0, 0, 0) rotate(0) scale(1);
  }
}

@keyframes detail-panel-in {
  0% {
    opacity: 0;
    transform: translate3d(1.1rem, 0, 0);
  }

  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes pack-soft-bloom {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.72);
  }

  55% {
    opacity: 0.38;
    transform: translate(-50%, -50%) scale(0.96);
  }

  100% {
    opacity: 0.18;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes pack-open-glow {
  0%,
  100% {
    opacity: 0.16;
    transform: translate(-50%, -50%) scale(0.94);
  }

  50% {
    opacity: 0.34;
    transform: translate(-50%, -50%) scale(1.02);
  }
}

@keyframes pack-open-pulse {
  0%,
  100% {
    filter:
      brightness(1)
      drop-shadow(0 28px 38px rgba(0, 0, 0, 0.58))
      drop-shadow(0 0 28px rgba(121, 42, 34, 0.22));
    transform: scale(1);
  }

  50% {
    filter:
      brightness(1.38)
      drop-shadow(0 32px 42px rgba(0, 0, 0, 0.58))
      drop-shadow(0 0 58px rgba(255, 216, 130, 0.38));
    transform: scale(1.012);
  }
}

.flow-card h1 {
  max-width: 28rem;
  margin-bottom: 1rem;
  font-size: clamp(2.7rem, 9vw, 4.9rem);
  line-height: 0.95;
}

.flow-copy {
  max-width: 28rem;
  margin-bottom: 1rem;
  color: rgba(248, 223, 170, 0.78);
  font-size: 1.08rem;
  line-height: 1.62;
}

.flow-form {
  padding: 0;
}

.flow-actions {
  justify-content: flex-start;
  margin-top: 1.2rem;
}

.footer {
  position: fixed;
  right: 1.5rem;
  bottom: 1.25rem;
  left: 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: rgba(248, 223, 170, 0.62);
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift-one {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes drift-two {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(9px);
  }
}

@media (max-width: 720px) {
  .game-body {
    overflow: hidden;
  }

  .game-interface {
    grid-template-columns: 1fr;
  }

  .game-sidebar {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid rgba(139, 102, 52, 0.55);
  }

  .game-side-list {
    grid-auto-flow: column;
    grid-auto-columns: minmax(13rem, 1fr);
    overflow-x: auto;
    overflow-y: hidden;
  }

  .game-detail-panel {
    min-height: 0;
  }

  .game-detail-panel::before {
    inset: 0.55rem;
  }

  .character-detail,
  .pack-detail {
    grid-template-columns: 1fr;
  }

  .character-detail-art,
  .pack-detail-art {
    min-height: 20rem;
  }

  .character-detail-stats,
  .pack-detail-copy {
    padding: 1.2rem;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  .splash {
    align-items: end;
    padding-bottom: 7rem;
  }

  .flow-shell {
    align-items: center;
    padding-bottom: 5rem;
  }

  h1 {
    font-size: 4.35rem;
  }

  .lede {
    font-size: 1.08rem;
  }

  .card {
    width: 5.75rem;
    opacity: 0.52;
  }

  .card-one {
    top: 10%;
    left: 6%;
  }

  .card-two {
    right: 5%;
    top: 13%;
  }

  .card-three,
  .card-four,
  .thread {
    display: none;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }

  .auth-actions {
    flex-direction: column;
    align-items: stretch;
    width: min(20rem, 100%);
    margin-right: auto;
    margin-left: auto;
  }

  .auth-dialog {
    width: min(100% - 1rem, 27rem);
  }

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

  .flow-card {
    padding: 1.1rem;
  }

  .flow-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .dialog-head,
  .auth-form {
    padding-right: 0.9rem;
    padding-left: 0.9rem;
  }

  .flow-form {
    padding-right: 0;
    padding-left: 0;
  }

  .auth-tabs {
    padding-right: 0.9rem;
    padding-left: 0.9rem;
  }
}

.origin-interface,
.character-selection-interface {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 32%, rgba(87, 43, 24, 0.2), transparent 32rem),
    linear-gradient(180deg, #050403, #000);
}

.origin-loading,
.origin-stage,
.character-selection-shell,
.game-error-panel {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 0;
  height: 100%;
}

.origin-loading {
  place-items: center;
  padding: 2rem;
  color: rgba(248, 223, 170, 0.78);
  background:
    radial-gradient(circle at 50% 44%, rgba(87, 43, 24, 0.24), transparent 22rem),
    #000;
}

.origin-loading-card {
  display: grid;
  justify-items: center;
  gap: 0.85rem;
  width: min(24rem, 100%);
  padding: 1.7rem;
  border: 1px solid rgba(139, 102, 52, 0.42);
  background:
    linear-gradient(180deg, rgba(20, 13, 9, 0.72), rgba(3, 3, 3, 0.92)),
    repeating-linear-gradient(0deg, rgba(255, 232, 177, 0.025) 0 1px, transparent 1px 5px);
  box-shadow:
    0 24px 90px rgba(0, 0, 0, 0.64),
    inset 0 1px 0 rgba(255, 232, 177, 0.08);
}

.origin-loading-mark {
  color: #ffe4a6;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 0.92;
  text-shadow:
    0 2px 0 rgba(56, 21, 13, 0.9),
    0 14px 44px rgba(218, 157, 58, 0.16);
}

.origin-loading-label,
.origin-loading-progress {
  margin: 0;
  color: rgba(248, 223, 170, 0.68);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.origin-loading-bar {
  position: relative;
  display: block;
  width: 100%;
  height: 0.55rem;
  overflow: hidden;
  border: 1px solid rgba(139, 102, 52, 0.5);
  background: rgba(0, 0, 0, 0.72);
}

.origin-loading-fill {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  width: 0%;
  background:
    linear-gradient(90deg, #9b4e20, #d99d3a 58%, #ffe4a6);
  box-shadow: 0 0 22px rgba(218, 157, 58, 0.34);
  transition: width 180ms ease;
}

.origin-stage {
  overflow: hidden;
  background: #000;
}

.origin-stage::before,
.origin-stage::after {
  display: none;
  content: none;
  animation: none;
}

.origin-story {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: min(82rem, calc(100% - 2rem));
  min-height: 0;
  height: 100%;
  margin: 0 auto;
  text-align: center;
}

.origin-story-frame {
  display: grid;
  place-items: center;
  width: min(82rem, 94vw);
  height: 72%;
  margin: 0;
}

.origin-story-zoom {
  display: grid;
  place-items: center;
  width: 100%;
  transform: translate3d(0, 0, 0) scale(0.996);
  transform-origin: center;
  backface-visibility: hidden;
  will-change: transform;
}

.origin-story-image {
  display: block;
  width: min(100%, 82rem);
  max-height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  will-change: opacity;
}

.origin-story-image.is-visible {
  animation: origin-image-fade-in 1200ms ease both;
}

.origin-story-image.is-exiting {
  animation: origin-image-fade-out 1200ms ease both;
}

@keyframes origin-image-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes origin-image-fade-out {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

.origin-skip {
  position: absolute;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 2;
  min-height: 2.65rem;
  padding: 0.65rem 0.9rem;
  cursor: pointer;
  color: rgba(248, 223, 170, 0.82);
  font: inherit;
  border: 1px solid rgba(139, 102, 52, 0.42);
  border-radius: 999px;
  background: rgba(8, 7, 6, 0.62);
}

.origin-map-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.55fr);
  gap: clamp(0.9rem, 2vw, 1.4rem);
  min-height: 0;
  height: 100%;
  padding: clamp(0.8rem, 1.5vw, 1.25rem);
  opacity: 0;
  transform: scale(1.018);
  filter: blur(18px);
  animation: map-smoke-in 1100ms ease-out both;
}

.world-map-panel {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: clamp(0.45rem, 0.9vw, 0.8rem);
  border: 1px solid rgba(139, 102, 52, 0.36);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 232, 177, 0.05), transparent 36%),
    #050403;
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.48),
    inset 0 0 0 1px rgba(255, 232, 177, 0.035);
}

.world-map-stage {
  position: relative;
  z-index: 1;
  width: min(100%, calc(150vh - 4.5rem), calc(84.375vw - 4.5rem));
  max-height: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

@supports (height: 100dvh) {
  .world-map-stage {
    width: min(100%, calc(150dvh - 4.5rem), calc(84.375dvw - 4.5rem));
  }
}

.world-map-panel::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 50% 50%, transparent 42%, rgba(0, 0, 0, 0.42)),
    repeating-linear-gradient(0deg, rgba(255, 232, 177, 0.018) 0 1px, transparent 1px 6px);
}

.world-map-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 180ms ease, filter 220ms ease;
  filter: saturate(0.92) contrast(1.06);
}

.region-hotspot {
  position: absolute;
  z-index: 2;
  cursor: pointer;
  color: transparent;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  transform: translateZ(0);
}

.region-hotspot:hover,
.region-hotspot:focus-visible,
.region-hotspot[aria-pressed="true"] {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  outline: none;
}

.is-hotspot-calibration .region-hotspot {
  display: grid;
  place-items: center;
  padding: 0.25rem;
  color: #ffe4a6;
  font-size: clamp(0.55rem, 0.9vw, 0.78rem);
  line-height: 1.05;
  text-align: center;
  text-shadow: 0 1px 5px #000;
  border-color: rgba(255, 216, 130, 0.62);
  background:
    radial-gradient(circle, rgba(218, 157, 58, 0.18), rgba(23, 8, 5, 0.24) 58%, transparent 68%);
  box-shadow: 0 0 24px rgba(218, 157, 58, 0.18);
}

.is-hotspot-calibration .region-hotspot.is-active-calibration {
  border-color: #ffe4a6;
  background:
    radial-gradient(circle, rgba(255, 232, 177, 0.28), rgba(91, 33, 26, 0.26) 58%, transparent 70%);
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.48),
    0 0 32px rgba(218, 157, 58, 0.36);
}

.region-panel {
  position: relative;
  display: block;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(139, 102, 52, 0.4);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 0, rgba(139, 102, 52, 0.22), transparent 12rem),
    linear-gradient(180deg, rgba(21, 18, 16, 0.96), rgba(6, 5, 5, 0.98));
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 232, 177, 0.06);
}

.region-panel.is-entering .region-panel-copy,
.region-panel.is-entering .region-banner {
  animation: detail-panel-in 480ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.region-banner {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0.74;
}

.region-banner:empty {
  display: none;
}

.region-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.68) saturate(1.02) contrast(1.08) blur(1px);
  transform: scale(1.025);
}

.region-panel-copy {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  gap: 0.85rem;
  height: 100%;
  padding: clamp(1rem, 2vw, 1.45rem);
  overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(5, 4, 4, 0.5), rgba(5, 4, 4, 0.68) 48%, rgba(5, 4, 4, 0.72)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0.12));
}

.hotspot-calibration-copy {
  gap: 0.75rem;
}

.hotspot-calibration-regions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.38rem;
}

.hotspot-calibration-region-button {
  min-height: 2.15rem;
  padding: 0.35rem 0.45rem;
  cursor: pointer;
  color: rgba(248, 223, 170, 0.74);
  font: inherit;
  font-size: 0.74rem;
  border: 1px solid rgba(139, 102, 52, 0.34);
  border-radius: 8px;
  background: rgba(5, 4, 4, 0.54);
}

.hotspot-calibration-region-button:hover,
.hotspot-calibration-region-button:focus-visible,
.hotspot-calibration-region-button.is-selected {
  color: #ffe4a6;
  border-color: rgba(218, 157, 58, 0.78);
  outline: none;
}

.hotspot-calibration-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}

.hotspot-calibration-controls label {
  display: grid;
  gap: 0.25rem;
  color: rgba(248, 223, 170, 0.64);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}

.hotspot-calibration-controls input {
  min-width: 0;
  min-height: 2.15rem;
  padding: 0.35rem;
  color: #f8dfaa;
  border: 1px solid rgba(139, 102, 52, 0.42);
  border-radius: 8px;
  background: rgba(3, 3, 3, 0.68);
}

.hotspot-calibration-controls input:focus {
  border-color: rgba(218, 157, 58, 0.82);
  outline: none;
}

.hotspot-calibration-output {
  width: 100%;
  min-height: 11rem;
  padding: 0.75rem;
  resize: none;
  color: #f8dfaa;
  font: 0.78rem/1.45 Consolas, "Courier New", monospace;
  border: 1px solid rgba(139, 102, 52, 0.4);
  background: rgba(3, 3, 3, 0.68);
}

.hotspot-calibration-active {
  margin: 0;
  color: rgba(248, 223, 170, 0.72);
  font-size: 0.86rem;
}

.region-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.region-panel-close {
  flex: 0 0 auto;
  min-height: 2rem;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  color: rgba(248, 223, 170, 0.82);
  font: inherit;
  font-size: 0.78rem;
  border: 1px solid rgba(139, 102, 52, 0.48);
  border-radius: 999px;
  background: rgba(5, 4, 4, 0.68);
}

.region-panel-close:hover,
.region-panel-close:focus-visible {
  color: #ffe4a6;
  border-color: rgba(218, 157, 58, 0.8);
  outline: none;
}

.region-eyebrow,
.race-chooser-label,
.region-perk span {
  color: #d99d3a;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.region-panel h1,
.character-selection-shell h1,
.game-error-panel h1 {
  margin: 0;
  color: #ffe4a6;
  font-size: clamp(2.2rem, 4.8vw, 4.7rem);
  font-weight: 400;
  line-height: 0.92;
  text-shadow:
    0 2px 0 rgba(56, 21, 13, 0.9),
    0 18px 48px rgba(0, 0, 0, 0.55);
}

.region-panel h1 {
  font-size: clamp(1.85rem, 3.2vw, 3.65rem);
}

.region-copy {
  margin: 0;
  color: rgba(216, 196, 154, 0.78);
  font-size: 0.98rem;
  line-height: 1.58;
}

.region-perk {
  display: grid;
  gap: 0.32rem;
  padding: 0.8rem;
  border: 1px solid rgba(139, 102, 52, 0.32);
  background:
    linear-gradient(90deg, rgba(255, 232, 177, 0.06), transparent),
    rgba(5, 5, 5, 0.36);
}

.region-perk strong {
  color: #f1d8a2;
  font-weight: 400;
}

.region-perk p {
  margin: 0;
  color: rgba(216, 196, 154, 0.72);
  line-height: 1.45;
}

.race-chooser {
  display: grid;
  gap: 0.65rem;
}

.race-card-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.race-card-choice {
  position: relative;
  display: block;
  aspect-ratio: 0.714;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  border: 1px solid rgba(139, 102, 52, 0.44);
  border-radius: 10px;
  background: #050403;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.36);
  perspective: 58rem;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.race-card-choice:hover,
.race-card-choice:focus-visible,
.race-card-choice.is-revealed {
  border-color: rgba(218, 157, 58, 0.82);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.44),
    0 0 26px rgba(218, 157, 58, 0.14);
  outline: none;
  transform: translateY(-2px);
}

.race-card-inner {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: 9px;
  transform: translate3d(0, 0, 0) rotateY(0deg);
  transform-style: preserve-3d;
  transition: transform 680ms cubic-bezier(0.2, 0.85, 0.2, 1);
  will-change: transform;
}

.race-card-choice.is-revealed .race-card-inner {
  transform: translate3d(0, 0, 0) rotateY(180deg);
}

.race-card-face {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  border-radius: 9px;
  background: #050403;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: rotateY(0deg) translateZ(0.1px);
  will-change: transform;
}

.race-card-face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.race-card-front {
  transform: rotateY(180deg) translateZ(0.1px);
}

.race-card-back {
  transform: rotateY(0deg) translateZ(0.1px);
}

.race-card-caption {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  left: 0.5rem;
  display: grid;
  gap: 0.2rem;
  padding: 0.55rem;
  text-align: left;
  border: 1px solid rgba(139, 102, 52, 0.36);
  background: rgba(4, 3, 3, 0.78);
}

.race-card-caption strong {
  color: #ffe4a6;
  font-size: 0.95rem;
  font-weight: 400;
}

.race-card-caption small {
  color: rgba(216, 196, 154, 0.72);
  font-size: 0.68rem;
  line-height: 1.25;
}

.origin-confirm {
  width: 100%;
}

.character-selection-shell,
.game-error-panel {
  grid-template-columns: minmax(16rem, 0.55fr) minmax(20rem, 0.8fr);
  align-items: center;
  gap: clamp(1.25rem, 4vw, 4rem);
  width: min(76rem, calc(100% - 2rem));
  min-height: 0;
  height: 100%;
  margin: 0 auto;
  padding: clamp(1rem, 4vw, 4rem) 0;
}

.selected-origin-art {
  display: grid;
  place-items: center;
}

.selected-origin-art img {
  display: block;
  width: min(100%, 22rem);
  filter:
    drop-shadow(0 32px 42px rgba(0, 0, 0, 0.62))
    drop-shadow(0 0 34px rgba(218, 157, 58, 0.14));
}

.selected-origin-copy {
  display: grid;
  gap: 1rem;
}

.game-error-panel {
  grid-template-columns: 1fr;
  align-content: center;
}

@keyframes map-smoke-in {
  from {
    opacity: 0;
    filter: blur(18px);
    transform: scale(1.018);
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
  }
}

@keyframes origin-smoke-drift {
  from {
    transform: translate3d(-2%, 1%, 0) rotate(-1deg);
  }

  to {
    transform: translate3d(2%, -1%, 0) rotate(1deg);
  }
}

@media (max-width: 980px) {
  .origin-map-layout {
    grid-template-columns: minmax(0, 1.25fr) minmax(14rem, 0.75fr);
    overflow: hidden;
  }

  .world-map-panel {
    min-height: 0;
  }

  .region-panel {
    min-height: 0;
  }
}

@media (max-width: 720px) {
  .origin-interface,
  .character-selection-interface {
    overflow: hidden;
  }

  .origin-story {
    padding: 0;
  }

  .origin-skip {
    right: 50%;
    transform: translateX(50%);
  }

  .region-panel {
    min-height: 0;
  }

  .race-card-list,
  .character-selection-shell,
  .game-error-panel {
    grid-template-columns: 1fr;
  }
}
