:root {
  color-scheme: dark;
  --bg: #020617;
  --surface: #0f172a;
  --line: #ffffff1a;
  --text: #ffffff;
  --muted: #94a3b8;
  --accent: #fb7185;
  --cta: #e11d48;
  --cta-hover: #f43f5e;
  --positive: #cbd5e1;
  --font:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
}
button,
input {
  font: inherit;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  color: inherit;
  cursor: pointer;
  transition:
    background 0.18s,
    transform 0.18s,
    border-color 0.18s;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
button:not(:disabled):active {
  transform: translateY(1px);
}
a {
  color: inherit;
  text-decoration: none;
}
p {
  color: var(--muted);
  margin: 0 0 16px;
}
h1,
h2 {
  line-height: 1.15;
  font-weight: 500;
  margin: 0 0 16px;
  letter-spacing: -0.045em;
}
h1 {
  font-size: 42px;
}
h2 {
  font-size: 24px;
}
small {
  display: block;
}
input {
  background: #0f172a;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  padding: 12px 14px;
  min-width: 0;
}
input::placeholder {
  color: #64748b;
}
.topbar {
  height: 88px;
  max-width: 1600px;
  margin: auto;
  padding: 0 4.5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  letter-spacing: 2px;
  white-space: nowrap;
}
.brand b {
  font-weight: 400;
  color: var(--accent);
}
.brand-symbol {
  font-size: 42px;
  color: var(--accent);
}
.brand small {
  font-size: 7px;
  letter-spacing: 2.3px;
  color: var(--muted);
}
nav {
  display: flex;
  align-self: stretch;
  gap: 24px;
}
.nav-link {
  border: 0;
  background: transparent;
  font-size: 13px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  padding: 0 3px;
}
.nav-link.active {
  color: var(--accent);
  border-color: var(--accent);
}
.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.profile small {
  font-size: 10px;
  color: var(--muted);
}
.avatar {
  height: 38px;
  width: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f43f5e14;
  color: var(--accent);
  border: 1px solid #f43f5e40;
  font-size: 17px;
  flex-shrink: 0;
}
.prototype {
  max-width: 1600px;
  margin: auto;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 11px 4.5%;
  font-size: 9px;
  letter-spacing: 1px;
  border-bottom: 1px solid #ffffff14;
  color: #cbd5e1;
}
.prototype > span:not(.dot) {
  letter-spacing: 0;
  color: #94a3b8;
  margin-left: 8px;
}
.prototype button {
  margin-left: auto;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 11px;
}
.dot {
  height: 5px;
  width: 5px;
  background: var(--positive);
  border-radius: 50%;
}
main {
  max-width: 1460px;
  padding: 0 40px;
  margin: auto;
  min-height: calc(100vh - 208px);
}
footer {
  max-width: 1460px;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 20px 40px;
  margin: 36px auto 0;
  font-size: 9px;
  letter-spacing: 1.4px;
  color: #64748b;
}
.connection {
  letter-spacing: 0.1px;
}
.eyebrow {
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 2.2px;
  margin-bottom: 20px;
}
.hero {
  min-height: 530px;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  position: relative;
  align-items: center;
}
.hero-copy {
  position: relative;
  z-index: 2;
  padding: 48px 0;
}
.hero h1 {
  font-size: clamp(42px, 4.7vw, 72px);
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -2px;
  font-weight: 400;
  line-height: 1.04;
  margin-bottom: 26px;
}
.hero h1 em {
  font-weight: 400;
  color: var(--accent);
}
.intro {
  font-size: 15px;
  line-height: 1.8;
  color: #cbd5e1;
}
.hero-actions {
  display: flex;
  gap: 12px;
  margin: 26px 0 14px;
}
.primary,
.secondary {
  padding: 13px 20px;
  border-radius: 6px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--accent);
}
.primary {
  background: var(--cta);
  border-color: var(--cta);
  box-shadow: 0 5px 22px #f43f5e26;
  color: #ffffff;
}
.primary:not(:disabled):hover {
  background: var(--cta-hover);
}
.primary > span {
  margin-left: 30px;
}
.secondary {
  border-color: #ffffff26;
  background: #ffffff0a;
}
.secondary:not(:disabled):hover {
  background: #f43f5e1a;
  border-color: var(--accent);
}
.caption {
  font-size: 10px;
  color: #94a3b8;
}
.hero-art {
  position: relative;
  min-height: 530px;
  isolation: isolate;
}
.globe {
  pointer-events: none;
  position: absolute;
  width: 100%;
  height: 100%;
  max-height: 570px;
  z-index: -1;
  opacity: 0.9;
  transform: rotate(-15deg);
}
.hero-card {
  position: absolute;
  width: 180px;
  top: 152px;
  transition: transform 0.3s;
}
.hero-card-a {
  left: 5%;
  transform: rotate(-15deg);
  top: 196px;
  z-index: 1;
}
.hero-card-b {
  left: 35%;
  transform: rotate(1deg);
  z-index: 3;
}
.hero-card-c {
  left: 65%;
  transform: rotate(14deg);
  top: 196px;
  z-index: 2;
}
.hero-card:hover {
  transform: rotate(0) translateY(-12px);
  z-index: 4;
}
.coordinate {
  position: absolute;
  font-size: 8px;
  letter-spacing: 2px;
  color: #94a3b8;
}
.coord-a {
  left: 18%;
  top: 112px;
}
.coord-b {
  bottom: 43px;
  right: 18%;
}
.dashboard {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 18px;
}
.panel {
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(120deg, #111a2d, #0b1224);
}
.duel-panel {
  padding: 24px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px 20px;
  align-items: center;
}
.duel-panel .eyebrow {
  margin-bottom: 8px;
  font-size: 9px;
}
.duel-panel h2 {
  font-size: 22px;
  margin-bottom: 8px;
}
.duel-panel p:not(.eyebrow) {
  font-size: 11px;
  max-width: 340px;
  margin: 0;
}
.panel-icon {
  color: var(--accent);
  font-size: 30px;
}
.duel-panel form {
  grid-column: 2/4;
  display: flex;
  max-width: 300px;
}
.duel-panel input {
  width: 100%;
  font-size: 12px;
}
.icon-button {
  background: var(--cta);
  border: 0;
  border-radius: 0 5px 5px 0;
  color: var(--text);
  padding: 0 18px;
}
.progress-panel {
  padding: 24px 28px;
}
.progress-panel .eyebrow {
  margin-bottom: 12px;
}
.numbers {
  display: flex;
  justify-content: space-between;
  max-width: 340px;
  margin-bottom: 15px;
}
.numbers b {
  font-size: 29px;
  font-weight: 400;
  color: var(--text);
}
.numbers span {
  display: block;
  color: #94a3b8;
  font-size: 11px;
}
.progress-panel > p:last-child {
  font-size: 11px;
  margin: 0;
}
.discover {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 42px 0 26px;
}
.discover .eyebrow {
  margin-bottom: 10px;
}
.discover h2 {
  font-family: Georgia, serif;
  font-size: 28px;
}
.text-button {
  border: 0;
  background: none;
  color: var(--accent);
  padding: 8px;
  font-size: 12px;
}
.text-button:hover {
  color: #fda4af;
}
.card {
  --art: #739cad;
  --light: #d5ddc5;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 8px;
  background: linear-gradient(150deg, #243047, #0f172a);
  color: #f8fafc;
  border: 2px solid #64748b;
  border-radius: 10px;
  box-shadow: 0 6px 18px #0005;
  aspect-ratio: 0.68;
  overflow: hidden;
  text-align: center;
  transform-origin: center;
  transition:
    transform 0.18s,
    box-shadow 0.18s;
  container-type: inline-size;
}
.card:not(:disabled):hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px #0007;
}
.card.capital {
  border-color: #fb7185;
  background: linear-gradient(135deg, #342437, #141b30);
  box-shadow:
    0 4px 18px #0006,
    inset 0 0 0 2px #f43f5e33;
}
.card.africa {
  --art: #a6653d;
  --light: #e2c68d;
}
.card.asia {
  --art: #836f85;
  --light: #d4bece;
}
.card.america {
  --art: #638e77;
  --light: #b9d1a1;
}
.card.oceania {
  --art: #588b99;
  --light: #b5d5c9;
}
.card.neutral {
  --art: #7f82a6;
  --light: #c1c7d5;
}
.card-top {
  display: flex;
  align-items: center;
  position: relative;
  z-index: 2;
  gap: 6px;
  white-space: nowrap;
  font-size: 6.5px;
  letter-spacing: 1px;
  min-height: 23px;
}
.cost {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  flex-shrink: 0;
  background: #881337;
  border: 1px solid #fda4af;
  outline: 1px solid #f43f5e66;
  border-radius: 50%;
  color: #ffffff;
  font-size: 15px;
  letter-spacing: 0;
}
.quantity {
  margin-left: auto;
  background: #ffffff14;
  padding: 1px 3px;
  border-radius: 3px;
  font-size: 9px;
  letter-spacing: 0;
}
.city-art {
  display: block;
  width: 100%;
  height: auto;
  color: var(--art);
  background: linear-gradient(
    var(--light),
    color-mix(in srgb, var(--light), white 20%)
  );
  border-radius: 4px;
}
.card > .city-art {
  margin-top: 5px;
  width: 100%;
  height: 43%;
  object-fit: cover;
}
.sun {
  fill: #f7e1a5;
  opacity: 0.85;
}
.hills {
  fill: var(--art);
  opacity: 0.25;
}
.buildings {
  fill: var(--art);
  opacity: 0.7;
}
.windows {
  fill: none;
  stroke: var(--light);
  stroke-width: 1;
  opacity: 0.5;
}
.monument {
  fill: color-mix(in srgb, var(--art), #112c30 35%);
}
.landmark {
  fill: none;
  stroke: color-mix(in srgb, var(--art), #112c30 35%);
  stroke-width: 7;
  stroke-linecap: round;
}
.water {
  fill: none;
  stroke: var(--art);
  stroke-width: 2;
  opacity: 0.5;
}
.card-name {
  font-family: Georgia, serif;
  line-height: 1.1;
  font-size: clamp(11px, 9.4cqw, 20px);
  margin: 8px -2px 3px;
  font-weight: bold;
  letter-spacing: -0.4px;
}
.card-country {
  font-size: clamp(7px, 6cqw, 10px);
  color: #cbd5e1;
  line-height: 1.1;
  min-height: 10px;
}
.card-text {
  font-size: clamp(7px, 5.9cqw, 10px);
  line-height: 1.25;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 7px 0 3px;
}
.card-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  border-top: 1px solid #ffffff26;
  padding-top: 5px;
  font-size: 15px;
  line-height: 1;
}
.card-stats i {
  font-size: 13px;
  font-style: normal;
  color: #94a3b8;
}
.attack {
  color: #e2e8f0;
}
.hp {
  color: #fda4af;
}
.spell-bottom {
  color: #cbd5e1;
  line-height: 1.2;
}
.card.chosen {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  transform: translateY(-8px);
}
.card.ready {
  box-shadow:
    0 0 0 2px #fb7185,
    0 4px 18px #0005;
}
.card.target,
.hero-token.target {
  outline: 3px solid #fda4af;
  outline-offset: 3px;
  cursor: crosshair;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 42px 0 24px;
  gap: 16px;
}
.section-heading .eyebrow {
  margin-bottom: 12px;
}
.section-heading h1 {
  font-family: Georgia, serif;
  font-size: 38px;
}
.section-heading p:last-child {
  font-size: 13px;
  line-height: 1.8;
}
.collection-total {
  font-size: 40px;
  color: var(--accent);
  text-align: right;
}
.collection-total small {
  font-size: 10px;
  white-space: nowrap;
  color: var(--muted);
}
.filters {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 24px;
}
.filters > div {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.chip {
  background: none;
  border: 1px solid transparent;
  color: #94a3b8;
  padding: 7px 11px;
  border-radius: 25px;
  font-size: 11px;
}
.chip.active {
  background: #f43f5e1a;
  border-color: #f43f5e55;
  color: #fda4af;
}
.filters input {
  font-size: 11px;
  padding: 9px 14px;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 24px 18px;
}
.collection-card > span {
  display: block;
  font-size: 10px;
  text-align: center;
  margin-top: 8px;
  color: var(--muted);
}
.collection-layout:has(.deck-list) {
  display: grid;
  grid-template-columns: 1fr 290px;
  gap: 24px;
}
.deck-list {
  padding: 18px;
  height: fit-content;
  position: sticky;
  top: 20px;
}
.deck-actions {
  display: flex;
  gap: 18px;
  align-items: center;
}
.deck-total {
  font-size: 24px;
  color: #fb7185;
  white-space: nowrap;
}
.deck-total.complete {
  color: var(--positive);
}
.deck-list-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.deck-list h2 {
  font-size: 19px;
  margin: 0;
}
.deck-list .text-button {
  font-size: 10px;
  padding: 4px;
}
.deck-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid #ffffff1a;
  background: none;
  font-size: 11px;
  text-align: left;
}
.deck-row > b {
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f43f5e1a;
  color: var(--accent);
  width: 22px;
  height: 22px;
}
.deck-row span {
  flex: 1;
}
.deck-row i {
  font-style: normal;
  color: var(--muted);
}
.deck-list .caption {
  margin: 15px 0 0;
}
.curve {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 90px;
  margin: 15px 0 18px;
  gap: 12px;
}
.curve > div {
  display: flex;
  align-items: center;
  flex-direction: column;
  flex: 1;
  font-size: 9px;
  color: var(--muted);
}
.curve i {
  background: #f43f5e;
  width: 100%;
  max-height: 60px;
  border-radius: 2px;
}
.curve b {
  font-weight: 400;
  font-size: 8px;
}
.forge-seal {
  font-size: 110px;
  color: var(--accent);
  margin-right: 8%;
}
.notice {
  background: #f43f5e0d;
  border: 1px solid #f43f5e40;
  border-radius: 6px;
  font-size: 12px;
  color: #cbd5e1;
  padding: 14px 18px;
  margin-bottom: 24px;
}
.forge-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.forge-recipe {
  display: flex;
  gap: 20px;
  padding: 22px;
  align-items: center;
}
.recipe-city {
  width: 105px;
  flex-shrink: 0;
  --art: #7b9283;
  --light: #c9d4b2;
}
.forge-recipe h2 {
  font-size: 20px;
  margin-bottom: 10px;
}
.forge-recipe h2 span {
  color: var(--accent);
  margin: 0 6px;
}
.forge-recipe .eyebrow {
  font-size: 8px;
}
.forge-recipe p {
  font-size: 11px;
  margin: 8px 0;
}
.forge-recipe .secondary {
  padding: 8px 12px;
  font-size: 10px;
  margin-top: 10px;
  display: block;
}
progress {
  width: 100%;
  height: 5px;
  display: block;
  accent-color: var(--accent);
}
.waiting {
  max-width: 720px;
  margin: 70px auto;
  text-align: center;
  padding: 50px;
}
.waiting .orb {
  font-size: 64px;
  color: var(--accent);
}
.waiting h1 {
  font-size: 36px;
  font-family: Georgia, serif;
}
.waiting .room-code {
  font-size: 40px;
  display: block;
  color: var(--accent);
  letter-spacing: 8px;
  margin: 20px 0;
}
.waiting > .text-button {
  display: block;
  margin: 20px auto 0;
}
.searching {
  display: block;
  font-size: 30px;
  color: var(--accent);
  letter-spacing: 12px;
}
.arena {
  max-width: 1180px;
  margin: auto;
}
.arena-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0 14px;
}
.arena-header .eyebrow {
  margin-bottom: 8px;
  font-size: 8px;
}
.arena-header h2 {
  font-size: 23px;
  margin: 0;
}
.arena-header h2 span {
  font-weight: 400;
  color: #cbd5e1;
  font-size: 18px;
}
.arena-tools {
  display: flex;
  gap: 10px;
}
.danger {
  color: #fda4af;
}
.battlefield {
  border: 1px solid #ffffff26;
  border-radius: 12px;
  padding: 14px 20px;
  background: radial-gradient(
    ellipse at center,
    #20233e 0,
    #0f172a 65%,
    #0b1022
  );
  position: relative;
  overflow: hidden;
}
.battlefield::before {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  border: 1px solid #f43f5e14;
  box-shadow:
    0 0 0 55px #f43f5e08,
    0 0 0 115px #f43f5e05;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.opponent-bar,
.player-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  position: relative;
  z-index: 1;
}
.hero-token > button {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: 0;
  text-align: left;
}
.hero-token button:disabled {
  opacity: 1;
  cursor: default;
}
.hero-token strong,
.player-identity strong {
  color: #fda4af;
  font-size: 21px;
  margin-left: 12px;
}
.hero-token small,
.player-identity small {
  font-size: 9px;
  color: #94a3b8;
}
.enemy-avatar {
  background: #881337;
}
.enemy-resources {
  display: flex;
  gap: 16px;
  font-size: 10px;
  color: #cbd5e1;
}
.board-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  min-height: 193px;
  position: relative;
  z-index: 1;
  padding: 10px 5px;
  overflow-x: auto;
}
.on-board {
  max-width: 115px;
  min-width: 96px;
  flex: 1;
  aspect-ratio: 0.66;
  padding: 5px;
  border-radius: 7px;
}
.on-board .card-top {
  min-height: 16px;
  font-size: 5px;
  gap: 4px;
}
.on-board .cost {
  width: 19px;
  height: 19px;
  font-size: 11px;
}
.on-board .card-name {
  margin-top: 5px;
  font-size: 12px;
}
.on-board .card-text {
  font-size: 8px;
  padding: 4px 0;
  min-height: 17px;
}
.on-board .card-stats {
  font-size: 13px;
  padding-top: 3px;
}
.on-board .card-country {
  font-size: 7px;
}
.unit-status {
  font-size: 6px;
  color: #cbd5e1;
  line-height: 1;
  margin-top: 4px;
}
.empty-board {
  font-family: Georgia, serif;
  color: #94a3b8;
  font-style: italic;
  font-size: 17px;
  text-align: center;
  padding: 15px;
  max-width: 500px;
}
.battle-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  margin: 0 0 9px;
  color: #fb7185;
}
.battle-divider > span {
  height: 1px;
  background: #ffffff1a;
  flex: 1;
}
.battle-divider > b {
  font-weight: 400;
  font-size: 18px;
}
.battle-divider label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 21px;
  font-size: 6px;
  letter-spacing: 2px;
  white-space: nowrap;
}
.player-identity {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}
.player-bar {
  padding: 9px 0 2px;
}
.energy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
}
.energy i {
  font-style: normal;
  color: #475569;
  font-size: 17px;
}
.energy i.filled {
  color: var(--accent);
}
.energy b {
  font-weight: 400;
  color: #cbd5e1;
  font-size: 10px;
}
.turn-actions {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.power,
.boost {
  background: #f43f5e14;
  border: 1px solid #f43f5e40;
  border-radius: 5px;
  padding: 7px 11px;
  font-size: 11px;
  color: #fda4af;
}
.power.selected {
  outline: 2px solid var(--accent);
}
.turn-actions small {
  font-size: 8px;
  opacity: 0.8;
  margin-top: 3px;
}
.end-turn {
  padding: 9px 16px;
  font-size: 11px;
}
.hand-label {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 0 10px;
  font-size: 9px;
  letter-spacing: 0.6px;
  color: #94a3b8;
}
.hand-label > span:last-child {
  text-align: right;
  letter-spacing: 0;
  max-width: 65%;
}
.hand {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 10px 5px;
  overflow-x: auto;
  min-height: 177px;
}
.hand .card {
  width: 110px;
  min-width: 92px;
  max-width: 128px;
  flex: 1;
}
.hand .card-name {
  font-size: 13px;
}
.hand .cost {
  width: 20px;
  height: 20px;
  font-size: 12px;
}
.hand .card-top {
  font-size: 5px;
  gap: 4px;
  min-height: 20px;
}
.hand .card-text {
  font-size: 8px;
}
.hand .card-country {
  font-size: 7px;
}
.hand .card-stats {
  font-size: 13px;
}
.selection-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 62px;
  padding: 8px 0;
  font-size: 12px;
}
.selection-bar p {
  margin: 0;
  font-size: 11px;
  text-align: center;
}
.selection-bar .primary {
  padding: 9px 16px;
}
.journal {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 15px;
}
.journal summary {
  cursor: pointer;
}
.journal p {
  margin: 6px 0;
  font-size: 10px;
}
.result-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: #020617cc;
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: auto;
}
.result {
  padding: 24px 40px;
  text-align: center;
  max-width: 480px;
  width: 100%;
  max-height: calc(100dvh - 32px);
  overflow: auto;
}
.result h1 {
  font-family: Georgia, serif;
  font-size: 42px;
  color: var(--accent);
}
.result .eyebrow {
  margin-bottom: 12px;
}
.result-icon {
  font-size: 44px;
  color: var(--accent);
}
.reward-card {
  width: 130px;
  margin: 15px auto;
}
.result p {
  font-size: 12px;
}
.result p > strong {
  color: var(--accent);
}
dialog {
  background: #0f172a;
  color: var(--text);
  border: 1px solid #ffffff26;
  border-radius: 12px;
  max-width: 620px;
  width: calc(100% - 32px);
  max-height: 86dvh;
  padding: 30px;
  box-shadow: 0 20px 90px #0008;
}
dialog::backdrop {
  background: #020617cc;
  backdrop-filter: blur(5px);
}
dialog h1 {
  font:
    30px Georgia,
    serif;
}
dialog h2 {
  font-size: 23px;
  margin-top: 18px;
}
dialog p,
dialog li {
  font-size: 13px;
  line-height: 1.7;
  color: #cbd5e1;
}
dialog li {
  margin-bottom: 12px;
}
dialog ol {
  padding-left: 20px;
}
dialog b {
  color: var(--text);
}
.modal-close {
  display: block;
  margin: 24px auto 0;
}
.detail-card {
  width: 180px;
  margin: 0 auto 25px;
}
.loading {
  max-width: 700px;
  padding: 70px 25px;
  margin: auto;
  text-align: center;
}
#toast {
  position: fixed;
  z-index: 50;
  bottom: 25px;
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #f43f5e80;
  box-shadow: 0 10px 30px #0008;
  padding: 14px 22px;
  border-radius: 8px;
  pointer-events: none;
  max-width: calc(100% - 32px);
  width: max-content;
  font-size: 13px;
  transition: 0.2s;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
body.busy [data-action] {
  pointer-events: none;
}
body.busy .primary {
  opacity: 0.6;
}
@media (min-width: 1500px) {
  .hero-card {
    width: 200px;
  }
  .hero-art {
    min-height: 580px;
  }
}
@media (max-width: 1100px) {
  .topbar {
    padding: 0 25px;
    gap: 18px;
  }
  nav {
    gap: 16px;
  }
  .profile small {
    display: none;
  }
  main {
    padding: 0 25px;
  }
  .hero-card {
    width: 145px;
  }
  .hero-card-a {
    left: 0;
  }
  .hero-card-b {
    left: 30%;
  }
  .hero-card-c {
    left: 60%;
  }
  .hero-art {
    min-height: 470px;
  }
  .hero {
    min-height: 470px;
  }
  .hero-actions {
    flex-wrap: wrap;
  }
  .hero .intro {
    font-size: 13px;
  }
  .dashboard {
    grid-template-columns: 1.4fr 1fr;
  }
  .duel-panel {
    grid-template-columns: 1fr auto;
    padding: 20px;
  }
  .panel-icon {
    display: none;
  }
  .duel-panel form {
    grid-column: 1/3;
  }
  .duel-panel p:not(.eyebrow) {
    max-width: 240px;
  }
  .progress-panel {
    padding: 20px;
  }
  .board-row {
    gap: 8px;
  }
  .on-board {
    min-width: 83px;
    max-width: 108px;
  }
  .hand .card {
    min-width: 83px;
  }
  .player-bar {
    gap: 10px;
  }
  .power,
  .boost {
    padding: 6px 8px;
  }
  .player-identity strong {
    margin-left: 0;
  }
  .forge-grid {
    grid-template-columns: 1fr;
  }
  .collection-layout:has(.deck-list) {
    grid-template-columns: 1fr 260px;
  }
}
@media (max-width: 760px) {
  h1 {
    font-size: 30px;
  }
  .topbar {
    height: auto;
    min-height: 76px;
    padding: 14px 18px 0;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
  }
  .brand {
    font-size: 18px;
  }
  .brand-symbol {
    font-size: 32px;
  }
  .brand small {
    font-size: 6px;
  }
  .profile {
    font-size: 10px;
  }
  .profile .avatar {
    width: 29px;
    height: 29px;
    font-size: 13px;
  }
  nav {
    grid-column: 1/3;
    grid-row: 2;
    gap: 0;
    justify-content: space-between;
    height: 41px;
  }
  .nav-link {
    font-size: 12px;
    padding: 0 10px;
  }
  .prototype {
    padding: 9px 18px;
    font-size: 7px;
    gap: 5px;
    flex-wrap: wrap;
  }
  .prototype > span:not(.dot) {
    font-size: 8px;
    margin-left: auto;
  }
  .prototype button {
    display: none;
  }
  main {
    padding: 0 16px;
    min-height: 70vh;
  }
  footer {
    padding: 15px 18px;
    font-size: 7px;
    gap: 15px;
    letter-spacing: 0.5px;
  }
  .hero {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }
  .hero-copy {
    padding: 32px 4px 0;
    width: 100%;
  }
  .hero .eyebrow {
    font-size: 8px;
    letter-spacing: 1.6px;
    margin-bottom: 20px;
  }
  .hero h1 {
    font-size: 48px;
    letter-spacing: -2px;
    margin-bottom: 22px;
  }
  .hero .intro {
    font-size: 13px;
    max-width: 85%;
    line-height: 1.7;
  }
  .hero-actions {
    gap: 8px;
    flex-wrap: nowrap;
    margin-top: 20px;
  }
  .hero-actions .primary,
  .hero-actions .secondary {
    padding: 12px 14px;
    font-size: 10px;
  }
  .primary > span {
    margin-left: 12px;
  }
  .hero .caption {
    font-size: 8px;
  }
  .hero-art {
    min-height: 330px;
    width: 100%;
    max-width: 520px;
    margin-top: -12px;
  }
  .hero-card {
    width: 125px;
    top: 62px;
  }
  .hero-card-a {
    top: 90px;
    left: 5%;
  }
  .hero-card-b {
    left: 33%;
    top: 44px;
  }
  .hero-card-c {
    top: 90px;
    left: 62%;
  }
  .coord-a {
    top: 23px;
    font-size: 6px;
  }
  .coord-b {
    bottom: 14px;
    right: 15%;
    font-size: 6px;
  }
  .globe {
  pointer-events: none;
    height: 330px;
    top: 0;
  }
  .dashboard {
    grid-template-columns: 1fr;
  }
  .duel-panel {
    padding: 20px;
  }
  .duel-panel .secondary {
    font-size: 10px;
    padding: 10px;
  }
  .duel-panel h2 {
    font-size: 21px;
  }
  .duel-panel p:not(.eyebrow) {
    max-width: none;
    font-size: 11px;
  }
  .progress-panel {
    padding: 20px;
  }
  .numbers {
    max-width: 100%;
  }
  .discover {
    gap: 16px;
    margin: 30px 0 10px;
  }
  .discover h2 {
    font-size: 23px;
  }
  .discover .eyebrow {
    font-size: 8px;
  }
  .discover .text-button {
    font-size: 10px;
    text-align: right;
    padding: 0;
    max-width: 120px;
  }
  .section-heading {
    padding: 28px 0 12px;
    flex-wrap: wrap;
  }
  .section-heading .eyebrow {
    font-size: 8px;
    letter-spacing: 1.3px;
  }
  .section-heading h1 {
    font-size: 29px;
  }
  .section-heading p:last-child {
    font-size: 12px;
  }
  .collection-total {
    display: none;
  }
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 14px;
  }
  .filters {
    gap: 12px;
  }
  .filters input {
    width: 100%;
  }
  .filters .chip {
    font-size: 10px;
    padding: 6px 8px;
  }
  .collection-layout:has(.deck-list) {
    display: flex;
    flex-direction: column;
  }
  .deck-list {
    position: static;
    order: -1;
  }
  .deck-list .deck-row {
    padding: 5px 0;
  }
  .deck-list {
    max-height: 300px;
    overflow: auto;
  }
  .curve {
    height: 70px;
    margin: 8px 0;
  }
  .deck-actions {
    width: 100%;
    justify-content: space-between;
    margin-bottom: 12px;
  }
  .forge-seal {
    display: none;
  }
  .forge-recipe {
    padding: 16px;
    gap: 12px;
  }
  .recipe-city {
    width: 72px;
  }
  .forge-recipe h2 {
    font-size: 17px;
  }
  .notice {
    font-size: 11px;
  }
  .waiting {
    padding: 30px 20px;
    margin: 30px 0;
  }
  .waiting h1 {
    font-size: 27px;
  }
  .waiting p {
    font-size: 12px;
  }
  .waiting .room-code {
    font-size: 28px;
    letter-spacing: 5px;
  }
  .arena-header {
    padding: 16px 0 12px;
    align-items: flex-start;
  }
  .arena-header h2 {
    font-size: 18px;
  }
  .arena-header h2 span {
    font-size: 12px;
    display: block;
    margin-top: 4px;
  }
  .arena-tools {
    gap: 0;
    flex-direction: column;
  }
  .arena-tools .text-button {
    font-size: 9px;
    padding: 3px 0;
  }
  .battlefield {
    padding: 10px 8px;
    border-radius: 9px;
  }
  .opponent-bar {
    gap: 7px;
  }
  .hero-token > button {
    gap: 6px;
    padding: 0;
    font-size: 10px;
  }
  .hero-token .avatar {
    width: 26px;
    height: 26px;
    font-size: 13px;
  }
  .hero-token strong {
    font-size: 16px;
    margin-left: 2px;
  }
  .hero-token small {
    font-size: 7px;
  }
  .enemy-resources {
    flex-direction: column;
    gap: 1px;
    text-align: right;
    font-size: 8px;
  }
  .board-row {
    justify-content: flex-start;
    gap: 8px;
    min-height: 155px;
    padding: 10px 4px;
  }
  .board-row:has(.empty-board) {
    justify-content: center;
  }
  .on-board {
    width: 88px;
    max-width: 88px;
    min-width: 88px;
    flex: none;
    padding: 4px;
    aspect-ratio: 0.66;
  }
  .on-board .card-top {
    font-size: 4px;
    gap: 3px;
    min-height: 16px;
  }
  .on-board .card-name {
    font-size: 10px;
  }
  .on-board .card-country {
    font-size: 6px;
    min-height: 7px;
  }
  .on-board .card-text {
    font-size: 6px;
    min-height: 12px;
    padding: 3px 0;
  }
  .on-board .card-stats {
    font-size: 11px;
  }
  .on-board .cost {
    width: 16px;
    height: 16px;
    font-size: 10px;
  }
  .unit-status {
    font-size: 5px;
  }
  .empty-board {
    font-size: 13px;
  }
  .battle-divider {
    margin: 0 0 7px;
    gap: 6px;
  }
  .battle-divider label {
    font-size: 5px;
    top: 20px;
  }
  .player-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    padding: 8px 0 0;
    gap: 10px;
  }
  .player-identity {
    font-size: 10px;
    gap: 6px;
  }
  .player-identity .avatar {
    width: 27px;
    height: 27px;
    font-size: 12px;
  }
  .player-identity strong {
    font-size: 17px;
  }
  .player-identity small {
    font-size: 7px;
  }
  .energy {
    text-align: right;
  }
  .energy i {
    font-size: 13px;
  }
  .energy b {
    font-size: 8px;
  }
  .turn-actions {
    grid-column: 1/3;
    display: grid;
    grid-template-columns: 1fr 65px 1fr;
    gap: 8px;
  }
  .turn-actions button {
    min-height: 42px;
    font-size: 10px;
    padding: 6px;
  }
  .hand-label {
    font-size: 7px;
    gap: 8px;
    padding: 12px 1px 6px;
    align-items: center;
  }
  .hand-label > span:last-child {
    font-size: 9px;
    max-width: 58%;
  }
  .hand {
    justify-content: flex-start;
    gap: 10px;
    padding: 12px 5px;
    min-height: 145px;
  }
  .hand .card {
    min-width: 91px;
    width: 91px;
    max-width: 91px;
    flex: none;
    padding: 5px;
  }
  .hand .card-name {
    font-size: 11px;
  }
  .hand .card-top {
    font-size: 4px;
    min-height: 16px;
    gap: 3px;
  }
  .hand .cost {
    font-size: 10px;
    width: 17px;
    height: 17px;
  }
  .hand .card-text {
    font-size: 6px;
    padding: 3px 0;
  }
  .hand .card-stats {
    font-size: 11px;
  }
  .hand .card-country {
    font-size: 6px;
    min-height: 8px;
  }
  .selection-bar {
    gap: 10px;
    font-size: 10px;
    flex-wrap: wrap;
    padding: 6px 0;
  }
  .selection-bar .primary {
    font-size: 10px;
  }
  .selection-bar p {
    font-size: 10px;
  }
  .result {
    padding: 20px;
  }
  .result h1 {
    font-size: 32px;
  }
  .result-icon {
    font-size: 33px;
  }
  .reward-card {
    width: 125px;
  }
  .result .primary {
    font-size: 11px;
  }
  .result-backdrop {
    padding: 12px;
  }
  dialog {
    padding: 23px;
  }
  dialog h1 {
    font-size: 26px;
  }
  #toast {
    font-size: 12px;
    padding: 12px 16px;
  }
  .card:not(:disabled):hover {
    transform: none;
  }
  .card.chosen {
    transform: translateY(-5px);
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

button.profile {
  border: 0;
  background: none;
  text-align: left;
  padding: 0;
}
#name-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
#name-form input {
  flex: 1;
}

/* Ava brand tokens follow ava-web: slate-950 and rose CTAs. */
::selection {
  background: #f43f5e4d;
  color: #fff;
}
:root {
  scrollbar-color: #f43f5e66 #020617;
}

.account-tools {
  display: flex;
  align-items: center;
  gap: 18px;
}
.language-control select {
  font: inherit;
  font-size: 12px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  cursor: pointer;
}
.language-control select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 1100px) {
  .account-tools {
    gap: 10px;
  }
  .profile > span:last-child {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
@media (max-width: 760px) {
  .account-tools {
    gap: 8px;
  }
  .account-tools .profile > span:last-child {
    display: none;
  }
  .language-control select {
    font-size: 11px;
    padding: 7px 6px;
    max-width: 90px;
  }
}
