:root {
  --ink: #151a1a;
  --muted: #66706f;
  --line: #cbd0ce;
  --surface: #f8faf9;
  --surface-strong: #ffffff;
  --table: #e8eceb;
  --accent: #176b63;
  --accent-strong: #0f514b;
  --danger: #a73d34;
  --gold: #b78418;
  --brown: #8b5b3c;
  --gray: #7b8587;
  --blue: #3479a7;
  --green: #43845a;
  --yellow: #d29a25;
  --red: #b74b43;
  --purple: #765c91;
  --card-width: clamp(56px, 7vw, 78px);
  --card-height: calc(var(--card-width) * 1.36);
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--table);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background-color: var(--table);
  letter-spacing: 0;
}

button,
select,
input {
  font: inherit;
  letter-spacing: 0;
}

button,
select {
  min-height: 36px;
}

button {
  cursor: pointer;
}

button:disabled,
select:disabled {
  cursor: wait;
  opacity: 0.58;
}

.app-header {
  position: sticky;
  z-index: 50;
  top: 0;
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  padding: 8px max(14px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line);
  background: rgba(248, 250, 249, 0.96);
  backdrop-filter: blur(10px);
}

.brand-block,
.header-actions,
.board-status,
.drawer-heading,
.modal-heading,
.city-heading,
.city-stat-row,
.zone-heading {
  display: flex;
  align-items: center;
}

.brand-block {
  min-width: 0;
  gap: 10px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #263230;
  background: #1c2826;
  color: #f3d48a;
  font-family: Georgia, serif;
  font-size: 14px;
  font-weight: 700;
}

.brand-block h1 {
  overflow: hidden;
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 17px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-block p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.header-actions {
  gap: 8px;
}

.profile-control {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

select {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-strong);
  color: var(--ink);
  padding: 0 28px 0 9px;
}

.command-button,
.primary-button,
.action-button {
  border: 1px solid transparent;
  border-radius: 4px;
  font-weight: 650;
}

.command-button {
  background: #263230;
  color: white;
  padding: 0 13px;
}

.primary-button {
  background: var(--accent);
  color: white;
  padding: 0 18px;
}

.primary-button:hover,
.primary-button:focus-visible {
  background: var(--accent-strong);
}

.game-shell {
  display: grid;
  width: min(100%, 1440px);
  min-height: calc(100vh - 58px);
  margin: 0 auto;
  grid-template-columns: minmax(218px, 0.72fr) minmax(520px, 2fr) minmax(218px, 0.72fr);
  align-items: stretch;
}

.central-board {
  min-width: 0;
  padding: 14px 18px 32px;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.board-status {
  justify-content: space-between;
  min-height: 34px;
}

.board-status > div:first-child {
  display: flex;
  align-items: center;
  gap: 9px;
}

.age-badge,
.model-badge,
.zone-value {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 7px;
}

.model-badge[data-status="development"] {
  border-color: #c89b49;
  color: #795616;
}

#turnLabel {
  font-size: 13px;
}

.progress-zone {
  margin-top: 10px;
}

.zone-heading {
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.token-row {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  padding: 3px 1px;
  scrollbar-width: thin;
}

.progress-token {
  position: relative;
  display: grid;
  width: 47px;
  height: 47px;
  flex: 0 0 47px;
  place-items: center;
  border: 2px solid #4d7770;
  border-radius: 50%;
  background: #eef6f2;
  color: #244f48;
  font-family: "Songti SC", serif;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.05;
  text-align: center;
}

.progress-token.actionable {
  outline: 3px solid rgba(23, 107, 99, 0.22);
}

.military-zone {
  display: grid;
  min-height: 54px;
  margin: 8px 0 6px;
  grid-template-columns: 32px 1fr 32px;
  align-items: center;
  gap: 7px;
}

.military-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.military-label-right {
  text-align: right;
}

.military-track {
  position: relative;
  display: grid;
  height: 29px;
  grid-template-columns: repeat(19, 1fr);
  align-items: center;
  border: 1px solid #aeb6b3;
  background: #f9faf9;
}

.military-cell {
  position: relative;
  height: 100%;
  border-right: 1px solid #e0e3e2;
}

.military-cell:last-child {
  border-right: 0;
}

.military-cell[data-zone="left"] {
  background: rgba(183, 75, 67, 0.08);
}

.military-cell[data-zone="right"] {
  background: rgba(23, 107, 99, 0.08);
}

.military-cell.token::after {
  position: absolute;
  top: -8px;
  left: 50%;
  color: var(--gold);
  content: attr(data-token);
  font-size: 8px;
  font-weight: 800;
  transform: translateX(-50%);
}

.conflict-pawn {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 13px;
  height: 21px;
  border: 2px solid white;
  border-radius: 7px 7px 3px 3px;
  background: #212a29;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
  transform: translate(-50%, -50%);
  transition: left 240ms ease;
}

.choice-tray {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0 11px;
}

.choice-card {
  display: flex;
  min-width: 126px;
  max-width: 178px;
  min-height: 58px;
  flex: 1 0 126px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-strong);
  color: var(--ink);
  padding: 7px 9px;
  text-align: left;
}

.choice-card:hover,
.choice-card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(23, 107, 99, 0.12);
}

.choice-symbol {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  place-items: center;
  border: 1px solid #9ba5a2;
  border-radius: 50%;
  background: #edf3f1;
  color: var(--accent-strong);
  font-family: Georgia, serif;
  font-weight: 700;
}

.choice-copy {
  min-width: 0;
}

.choice-copy strong,
.choice-copy span {
  display: block;
}

.choice-copy strong {
  font-size: 12px;
}

.choice-copy span {
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.age-layout {
  position: relative;
  width: 100%;
  min-height: 390px;
  aspect-ratio: 1.62;
  margin-top: 4px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.age-layout[data-age="3"] {
  aspect-ratio: 1.3;
}

.empty-board {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 14px;
  color: #53605e;
  text-align: center;
}

.empty-board strong {
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(23px, 4vw, 40px);
  font-weight: 500;
}

.terminal-summary {
  display: grid;
  width: min(520px, calc(100% - 24px));
  margin: 42px auto 0;
  justify-items: center;
}

.terminal-summary > span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}

.terminal-summary h2 {
  margin: 5px 0 18px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 25px;
  font-weight: 600;
}

.terminal-scores {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.terminal-score-column {
  padding: 14px 18px;
}

.terminal-score-column + .terminal-score-column {
  border-left: 1px solid var(--line);
}

.terminal-score-column > span,
.terminal-score-column > strong {
  display: block;
  text-align: center;
}

.terminal-score-column > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.terminal-score-column > strong {
  margin: 2px 0 10px;
  font-size: 31px;
}

.terminal-score-column.winner > strong {
  color: var(--accent);
}

.terminal-score-column dl {
  margin: 0;
}

.terminal-score-column dl div {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #e1e4e3;
  padding: 4px 0;
  font-size: 10px;
}

.terminal-score-column dt {
  color: var(--muted);
}

.terminal-score-column dd {
  margin: 0;
  font-weight: 700;
}

.terminal-summary > .primary-button {
  margin-top: 18px;
}

.structure-card {
  position: absolute;
  z-index: 2;
  top: calc(var(--row) * var(--row-step) + 8px);
  left: calc(50% + var(--column) * 7.25%);
  width: var(--card-width);
  height: var(--card-height);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(20, 26, 25, 0.32);
  border-radius: 4px;
  background: var(--surface-strong);
  box-shadow: 0 2px 5px rgba(24, 31, 30, 0.16);
  color: var(--ink);
  transform: translateX(-50%);
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.age-layout[data-age="1"],
.age-layout[data-age="2"] {
  --row-step: 19%;
}

.age-layout[data-age="3"] {
  --row-step: 14.1%;
}

.structure-card.accessible {
  z-index: 6;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 3px rgba(23, 107, 99, 0.15), 0 3px 7px rgba(24, 31, 30, 0.2);
}

.structure-card.accessible:hover,
.structure-card.accessible:focus-visible,
.structure-card.selected {
  border-color: #0c5149;
  box-shadow: 0 0 0 4px rgba(23, 107, 99, 0.22), 0 5px 10px rgba(24, 31, 30, 0.24);
  transform: translateX(-50%) translateY(-3px);
}

.structure-card.removed {
  visibility: hidden;
}

.structure-card.face-down {
  border-color: #4b5553;
  background-color: #263331;
  color: #d4b65e;
}

.structure-card.face-down::before,
.structure-card.face-down::after {
  position: absolute;
  content: "";
  inset: 7px;
  border: 1px solid rgba(217, 190, 111, 0.58);
}

.structure-card.face-down::after {
  inset: 13px;
  border-radius: 50%;
}

.card-color {
  display: block;
  height: 8px;
  background: var(--card-color, var(--gray));
}

.card-name {
  display: block;
  height: 34px;
  overflow: hidden;
  padding: 5px 4px 2px;
  font-size: clamp(8px, 0.9vw, 11px);
  font-weight: 750;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.card-stats {
  display: flex;
  min-height: 20px;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
  padding: 2px 3px;
}

.stat-glyph {
  display: inline-grid;
  min-width: 16px;
  min-height: 16px;
  place-items: center;
  border: 1px solid #c6ccca;
  border-radius: 2px;
  background: #f3f5f4;
  color: #303938;
  font-size: 8px;
  font-weight: 800;
  padding: 0 2px;
  white-space: nowrap;
}

.card-cost {
  position: absolute;
  right: 3px;
  bottom: 3px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.card-info-button {
  position: absolute;
  bottom: 2px;
  left: 3px;
  display: grid;
  width: 16px;
  min-height: 16px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(27, 36, 34, 0.1);
  color: #35413f;
  font-family: Georgia, serif;
  font-size: 10px;
  font-weight: 700;
  padding: 0;
}

.city-board {
  min-width: 0;
  padding: 14px 12px 24px;
  background: rgba(248, 250, 249, 0.62);
}

.city-heading {
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.city-identity {
  min-width: 0;
}

.city-identity span,
.city-identity strong {
  display: block;
}

.city-identity span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.city-identity strong {
  margin-top: 2px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 16px;
}

.turn-indicator {
  width: 9px;
  height: 9px;
  border: 1px solid white;
  border-radius: 50%;
  background: #aeb5b3;
  box-shadow: 0 0 0 2px #aeb5b3;
}

.turn-indicator.active {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(23, 107, 99, 0.2);
}

.city-stat-row {
  display: grid;
  margin: 10px 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.city-stat {
  min-width: 0;
  border-left: 2px solid #aeb7b4;
  padding-left: 6px;
}

.city-stat span,
.city-stat strong {
  display: block;
}

.city-stat span {
  color: var(--muted);
  font-size: 9px;
}

.city-stat strong {
  margin-top: 2px;
  font-size: 15px;
}

.city-section {
  margin-top: 13px;
}

.city-section h3 {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.building-stack,
.wonder-stack,
.owned-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.building-chip {
  display: flex;
  min-height: 24px;
  align-items: center;
  border: 1px solid #c8cecc;
  border-left: 5px solid var(--card-color, var(--gray));
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  padding: 3px 5px;
  font-size: 9px;
}

.wonder-tile {
  min-width: 80px;
  flex: 1 1 80px;
  border: 1px solid #b7aaa0;
  border-left: 4px solid #8a684e;
  border-radius: 3px;
  background: #f4f1ef;
  padding: 6px;
  text-align: left;
}

.wonder-tile strong,
.wonder-tile span {
  display: block;
}

.wonder-tile strong {
  font-size: 10px;
}

.wonder-tile span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.wonder-tile.built {
  border-left-color: var(--gold);
  background: #f7f2e5;
}

.owned-progress .progress-token {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  font-size: 8px;
}

.empty-stack {
  color: #8b9391;
  font-size: 10px;
}

.action-drawer {
  position: fixed;
  z-index: 70;
  right: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  width: min(680px, calc(100vw - 28px));
  border: 1px solid #aeb7b4;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 40px rgba(25, 34, 32, 0.22);
  padding: 12px;
  transform: translateX(50%);
}

.drawer-heading,
.modal-heading {
  justify-content: space-between;
  gap: 10px;
}

.drawer-heading span,
.modal-heading span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.drawer-heading strong {
  display: block;
  margin-top: 2px;
  font-size: 14px;
}

.icon-button {
  display: grid;
  width: 34px;
  min-height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  padding: 0;
}

.drawer-actions {
  display: grid;
  margin-top: 10px;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 7px;
}

.drawer-effects {
  margin: 8px 0 0;
  padding: 7px 9px 7px 24px;
  border-left: 3px solid var(--accent);
  background: #f3f5f4;
  color: #46514f;
  font-size: 10px;
  line-height: 1.45;
}

.drawer-effects li + li {
  margin-top: 2px;
}

.action-button {
  min-height: 50px;
  border-color: #b9c2bf;
  background: var(--surface);
  color: var(--ink);
  padding: 8px 10px;
  text-align: left;
}

.action-button:hover,
.action-button:focus-visible {
  border-color: var(--accent);
  background: #edf5f2;
}

.action-button strong,
.action-button span {
  display: block;
}

.action-button strong {
  font-size: 12px;
}

.action-button span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.modal {
  width: min(430px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  border: 1px solid #aeb7b4;
  border-radius: 6px;
  background: var(--surface-strong);
  color: var(--ink);
  box-shadow: 0 18px 60px rgba(20, 27, 26, 0.3);
  padding: 18px;
}

.modal::backdrop {
  background: rgba(22, 28, 27, 0.54);
  backdrop-filter: blur(3px);
}

.modal h2 {
  margin: 3px 0 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 22px;
}

.segmented-control {
  display: grid;
  margin: 22px 0 14px;
  border: 0;
  padding: 0;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.segmented-control legend {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.segmented-control label {
  position: relative;
}

.segmented-control input {
  position: absolute;
  opacity: 0;
}

.segmented-control span {
  display: grid;
  min-height: 39px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 650;
}

.segmented-control input:checked + span {
  border-color: var(--accent);
  background: #e5f0ed;
  color: var(--accent-strong);
}

.form-row {
  display: grid;
  align-items: center;
  grid-template-columns: 90px 1fr;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.modal-submit {
  width: 100%;
  margin-top: 20px;
}

.detail-modal {
  width: min(500px, calc(100vw - 28px));
  overflow-y: auto;
}

.detail-content {
  display: grid;
  margin-top: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.detail-row {
  border-top: 1px solid var(--line);
  padding-top: 7px;
}

.detail-row span,
.detail-row strong {
  display: block;
}

.detail-row span {
  color: var(--muted);
  font-size: 9px;
}

.detail-row strong {
  margin-top: 3px;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.detail-action-button {
  width: 100%;
  margin-top: 16px;
}

.busy-overlay {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(238, 241, 240, 0.35);
  pointer-events: all;
}

.thinking-indicator {
  display: flex;
  width: 64px;
  height: 38px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid #bcc4c2;
  border-radius: 6px;
  background: white;
  box-shadow: 0 8px 25px rgba(24, 31, 30, 0.16);
}

.thinking-indicator span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: think 900ms infinite ease-in-out;
}

.thinking-indicator span:nth-child(2) {
  animation-delay: 130ms;
}

.thinking-indicator span:nth-child(3) {
  animation-delay: 260ms;
}

@keyframes think {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  30% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

.toast {
  position: fixed;
  z-index: 120;
  right: 18px;
  bottom: 18px;
  max-width: min(360px, calc(100vw - 36px));
  border: 1px solid #8f9a97;
  border-radius: 4px;
  background: #202a28;
  color: white;
  box-shadow: 0 8px 24px rgba(25, 31, 30, 0.24);
  padding: 10px 13px;
  font-size: 12px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 980px) {
  :root {
    --card-width: clamp(48px, 8.2vw, 68px);
  }

  .game-shell {
    display: flex;
    min-height: auto;
    flex-direction: column;
  }

  .central-board {
    order: 2;
    border: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .city-opponent {
    order: 1;
  }

  .city-human {
    order: 3;
  }

  .city-board {
    padding: 10px 14px 13px;
  }

  .city-stat-row {
    margin: 7px 0;
  }

  .city-section {
    margin-top: 8px;
  }

  .building-stack,
  .wonder-stack,
  .owned-progress {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .building-chip,
  .wonder-tile {
    flex: 0 0 auto;
  }
}

@media (max-width: 620px) {
  :root {
    --card-width: clamp(50px, 13.9vw, 56px);
    --card-height: calc(var(--card-width) * 1.45);
  }

  .app-header {
    min-height: 54px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 12px;
  }

  .brand-block h1 {
    font-size: 14px;
  }

  .brand-block p,
  .profile-control span {
    display: none;
  }

  .header-actions {
    gap: 5px;
  }

  .header-actions select,
  .command-button {
    min-height: 34px;
    padding-right: 8px;
    padding-left: 8px;
    font-size: 11px;
  }

  .central-board {
    padding: 10px 8px 24px;
  }

  .model-badge {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .progress-token {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    font-size: 9px;
  }

  .military-zone {
    grid-template-columns: 26px 1fr 20px;
  }

  .military-label {
    font-size: 9px;
  }

  .age-layout {
    min-height: 375px;
    aspect-ratio: 1;
  }

  .age-layout[data-age="3"] {
    min-height: 480px;
    aspect-ratio: 0.78;
  }

  .terminal-summary {
    margin-top: 26px;
  }

  .terminal-score-column {
    padding: 11px 12px;
  }

  .structure-card {
    left: calc(50% + var(--column) * 8.1%);
  }

  .structure-card:not(.face-down) {
    display: grid;
    align-content: start;
    grid-template-rows: 8px 20px 26px 18px 1fr;
  }

  .age-layout[data-age="1"],
  .age-layout[data-age="2"] {
    --row-step: 19.8%;
  }

  .age-layout[data-age="3"] {
    --row-step: 13.9%;
  }

  .card-name {
    height: 20px;
    grid-row: 2;
    padding: 2px 2px 0;
    font-size: 8px;
    line-height: 1.05;
  }

  .card-stats {
    height: 26px;
    min-height: 26px;
    align-content: center;
    align-items: center;
    grid-row: 3;
    overflow: hidden;
    gap: 1px;
    padding: 1px 2px;
  }

  .stat-glyph {
    min-width: 12px;
    min-height: 11px;
    font-size: 6.5px;
    line-height: 1.05;
    padding: 0 1px;
  }

  .card-cost {
    position: static;
    width: 100%;
    overflow: hidden;
    height: 18px;
    grid-row: 4;
    padding: 1px 2px;
    background: transparent;
    font-size: 7px;
    line-height: 8px;
    text-align: center;
    white-space: normal;
  }

  .card-info-button {
    display: none;
  }

  .city-heading {
    padding-bottom: 6px;
  }

  .city-identity strong {
    font-size: 14px;
  }

  .city-section h3 {
    margin-bottom: 4px;
  }

  .action-drawer {
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 8px;
    width: auto;
    padding: 10px;
    transform: none;
  }

  .drawer-actions {
    max-height: 36vh;
    overflow-y: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .action-button {
    min-height: 46px;
    padding: 7px 8px;
  }

  .drawer-effects {
    max-height: 25vh;
    overflow-y: auto;
    font-size: 9px;
  }

  .modal {
    padding: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
