:root {
  color-scheme: light;
  --forest: #11231b;
  --forest-2: #193428;
  --forest-3: #244735;
  --paper: #f3eddd;
  --paper-deep: #e8dfca;
  --card: #fffaf0;
  --card-2: #f8f1e2;
  --ink: #1f2b24;
  --muted: #6d786f;
  --line: #ded3bd;
  --line-strong: #c9b998;
  --ember: #d96632;
  --ember-dark: #ad4b22;
  --gold: #dbad55;
  --gold-soft: #f3dfb1;
  --green: #4d7d56;
  --green-soft: #dce9d9;
  --danger: #a83d31;
  --danger-soft: #f5ded7;
  --wood: #a66b3e;
  --clay: #b85e43;
  --iron: #667575;
  --shadow: 0 10px 30px rgba(19, 34, 27, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
  --nav-height: 72px;
  --app-width: 480px;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-x: hidden;
  background: #0b1712;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 0;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  word-break: keep-all;
  overflow-wrap: break-word;
  background:
    radial-gradient(circle at 12% 5%, rgba(219, 173, 85, 0.13), transparent 28rem),
    radial-gradient(circle at 88% 100%, rgba(77, 125, 86, 0.22), transparent 30rem),
    #0b1712;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(217, 102, 50, 0.42);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

body.modal-open {
  overflow: hidden;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

svg {
  display: block;
  width: 1.35rem;
  height: 1.35rem;
}

svg use {
  pointer-events: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-family: "Batang", "Noto Serif KR", Georgia, serif;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

h2 {
  font-size: 1.25rem;
  letter-spacing: -0.025em;
  line-height: 1.3;
}

h3 {
  font-size: 1rem;
  letter-spacing: -0.015em;
}

small {
  font-size: 0.76em;
}

.eyebrow {
  color: var(--ember-dark);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

/* ---------- 로그인 ---------- */
.auth-shell {
  display: grid;
  width: min(100%, 980px);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--paper);
}

.auth-art {
  position: relative;
  display: flex;
  min-height: 280px;
  padding: calc(24px + env(safe-area-inset-top)) 24px 28px;
  overflow: hidden;
  color: #f9f0dd;
  background:
    linear-gradient(180deg, rgba(8, 20, 15, 0.08) 0%, rgba(8, 20, 15, 0.3) 42%, rgba(9, 22, 16, 0.9) 84%, rgba(9, 22, 16, 0.98) 100%),
    linear-gradient(90deg, rgba(9, 22, 16, 0.28) 0%, rgba(9, 22, 16, 0) 62%),
    url("/assets/auth-camp.webp") 62% 42% / cover no-repeat,
    var(--forest);
}

.auth-art::before {
  position: absolute;
  inset: auto -70px -130px auto;
  width: 310px;
  height: 310px;
  content: "";
  border: 1px solid rgba(219, 173, 85, 0.22);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(219, 173, 85, 0.04), 0 0 0 74px rgba(219, 173, 85, 0.035);
}

.auth-emblem {
  position: absolute;
  top: 22px;
  right: 22px;
  display: grid;
  width: 52px;
  height: 52px;
  color: var(--gold);
  border: 1px solid rgba(219, 173, 85, 0.48);
  border-radius: 17px;
  place-items: center;
  background: rgba(10, 21, 16, 0.35);
}

.auth-emblem svg {
  width: 30px;
  height: 30px;
}

.auth-art-copy {
  position: relative;
  z-index: 2;
  align-self: flex-end;
  max-width: 420px;
}

.auth-art-copy h1 {
  margin: 6px 0 10px;
  color: #fff8e9;
  font-size: clamp(2.65rem, 11vw, 4.2rem);
  text-shadow: 0 3px 24px rgba(0, 0, 0, 0.42);
}

.auth-art-copy p:last-child {
  max-width: 34ch;
  color: rgba(249, 240, 221, 0.8);
  font-size: 0.9rem;
  line-height: 1.65;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.38);
}

.auth-art .eyebrow {
  color: var(--gold);
}

.auth-terrain {
  position: absolute;
  bottom: -1px;
  width: 45%;
  height: 110px;
  opacity: 0.36;
  clip-path: polygon(0 100%, 18% 63%, 35% 84%, 55% 34%, 75% 72%, 92% 45%, 100% 100%);
  background: #0b1712;
}

.terrain-a { left: -4%; }
.terrain-b { left: 31%; height: 74px; opacity: 0.25; }
.terrain-c { right: -3%; height: 128px; opacity: 0.42; }

.auth-panel {
  align-self: center;
  padding: 26px 20px calc(30px + env(safe-area-inset-bottom));
}

.auth-status {
  margin-bottom: 18px;
  padding: 9px 12px;
  color: var(--forest-2);
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.7);
}

.auth-error {
  margin-bottom: 14px;
  padding: 11px 13px;
  color: var(--danger);
  font-size: 0.84rem;
  line-height: 1.5;
  border: 1px solid #eab7aa;
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
}

.form-stack {
  display: grid;
  gap: 14px;
  max-width: 410px;
  margin: 0 auto;
}

.form-stack h2 {
  margin-top: 3px;
  color: var(--forest);
  font-family: "Batang", "Noto Serif KR", Georgia, serif;
  font-size: 1.7rem;
}

.field {
  display: grid;
  gap: 6px;
}

.field > span {
  color: var(--forest-2);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.field > span small {
  color: var(--muted);
  font-weight: 500;
}

.field input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  color: var(--ink);
  font-size: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--card);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input::placeholder {
  color: #9a9f96;
}

.field input:focus {
  border-color: var(--ember);
  outline: none;
  box-shadow: 0 0 0 3px rgba(217, 102, 50, 0.12);
}

.text-button {
  width: 100%;
  min-height: 44px;
  padding: 8px;
  color: var(--ember-dark);
  font-size: 0.85rem;
  font-weight: 800;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.text-button:hover {
  background: rgba(217, 102, 50, 0.07);
}

.auth-note {
  max-width: 410px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.6;
  text-align: center;
}

/* ---------- 공통 버튼 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 46px;
  padding: 10px 16px;
  color: var(--forest);
  font-size: 0.87rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--card);
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  color: #91988e;
  border-color: var(--line);
  background: #eee8da;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  color: #fff8ec;
  border-color: var(--ember-dark);
  background: linear-gradient(180deg, #df713c, #c55728);
  box-shadow: 0 5px 13px rgba(173, 75, 34, 0.23);
}

.btn-primary:disabled {
  color: #d7cabb;
  border-color: #8a634d;
  background: #8e7460;
  box-shadow: none;
}

.btn-dark {
  color: #f8f0df;
  border-color: var(--forest-3);
  background: var(--forest-2);
}

.btn-ghost {
  color: var(--forest-2);
  border-color: var(--line);
  background: transparent;
}

.btn-danger {
  color: var(--danger);
  border-color: #e0b4a9;
  background: #fff7f3;
}

.btn-wide {
  width: 100%;
}

.btn-small {
  min-height: 44px;
  padding: 8px 11px;
  font-size: 0.77rem;
  border-radius: 9px;
}

.btn svg {
  width: 1.05rem;
  height: 1.05rem;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #f1e5cc;
  border: 1px solid rgba(241, 229, 204, 0.24);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.06);
  place-items: center;
  cursor: pointer;
}

/* ---------- 앱 셸 ---------- */
.app-shell {
  width: min(100%, var(--app-width));
  min-height: 100dvh;
  margin: 0 auto;
  overflow-x: clip;
  background: var(--paper);
  box-shadow: 0 0 70px rgba(0, 0, 0, 0.3);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  padding: calc(9px + env(safe-area-inset-top)) 16px 9px;
  color: #faf1df;
  background:
    radial-gradient(circle at 88% 0%, rgba(219, 173, 85, 0.17), transparent 50%),
    var(--forest);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  color: var(--gold);
  border: 1px solid rgba(219, 173, 85, 0.4);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  place-items: center;
}

.brand-mark svg {
  width: 24px;
  height: 24px;
}

.brand-name {
  display: block;
  color: #fff8e9;
  font-family: "Batang", "Noto Serif KR", Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.village-link {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  max-width: 220px;
  min-height: 24px;
  padding: 0;
  overflow: hidden;
  color: rgba(249, 240, 221, 0.66);
  font-size: 0.71rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.village-link span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.chevron {
  color: var(--gold);
  font-size: 0.95rem;
}

.resource-strip {
  position: sticky;
  top: calc(66px + env(safe-area-inset-top));
  z-index: 19;
  padding: 0 8px;
  border-bottom: 1px solid rgba(222, 211, 189, 0.75);
  background: var(--forest-2);
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.resource-cell {
  display: grid;
  min-width: 0;
  min-height: 73px;
  padding: 7px 8px 6px;
  align-content: center;
  gap: 2px;
}

.resource-cell + .resource-cell {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.resource-label {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  color: rgba(249, 240, 221, 0.86);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
}

.res-icon {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
}

.res-icon.wood { color: #e0b47c; }
.res-icon.clay { color: #ef9c7b; }
.res-icon.iron { color: #c2d2ce; }

.resource-amount {
  display: grid;
  gap: 1px;
  min-width: 0;
  line-height: 1.1;
}

.resource-amount strong {
  color: #fffaf0;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
}

.resource-cap {
  color: rgba(249, 240, 221, 0.82);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.resource-cell > small {
  color: rgba(249, 240, 221, 0.8);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.resource-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 4px 2px 5px;
  color: rgba(249, 240, 221, 0.78);
  font-size: 0.68rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.resource-pop {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  white-space: nowrap;
}

.meta-label {
  color: rgba(249, 240, 221, 0.7);
  font-weight: 700;
}

.resource-pop strong {
  color: #fffaf0;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.resource-pop > span:last-child {
  font-variant-numeric: tabular-nums;
}

.meta-note {
  overflow: hidden;
  color: rgba(249, 240, 221, 0.64);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.screen {
  min-height: calc(100dvh - 190px);
  padding: 16px 16px calc(var(--nav-height) + 30px + env(safe-area-inset-bottom));
}

.loading-card,
.empty-state {
  display: grid;
  min-height: 220px;
  padding: 26px 20px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.48);
  place-items: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 6px;
  color: var(--forest);
  font-size: 1rem;
}

/* ---------- 하단 탐색 ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  z-index: 30;
  display: grid;
  width: min(100%, var(--app-width));
  min-height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  padding: 4px 6px env(safe-area-inset-bottom);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(17, 35, 27, 0.97);
  box-shadow: 0 -12px 28px rgba(17, 35, 27, 0.14);
  backdrop-filter: blur(12px);
  grid-template-columns: repeat(5, minmax(0, 1fr));
  transform: translateX(-50%);
}

.nav-item {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 62px;
  padding: 7px 2px 5px;
  color: rgba(249, 240, 221, 0.53);
  font-size: 0.65rem;
  font-weight: 700;
  border: 0;
  border-radius: 12px;
  background: transparent;
  place-items: center;
  align-content: center;
  gap: 3px;
  cursor: pointer;
}

.nav-item svg {
  width: 22px;
  height: 22px;
}

.nav-item.active {
  color: var(--gold);
  background: rgba(219, 173, 85, 0.09);
}

.nav-item.active::before {
  position: absolute;
  top: 3px;
  width: 18px;
  height: 3px;
  content: "";
  border-radius: 999px;
  background: var(--gold);
}

.nav-badge {
  position: absolute;
  top: 5px;
  left: calc(50% + 5px);
  display: grid;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  color: #fff;
  font-size: 0.58rem;
  font-weight: 800;
  border-radius: 999px;
  background: var(--ember);
  place-items: center;
}

/* ---------- 화면 요소 ---------- */
.screen-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 2px 15px;
}

.screen-head h1 {
  margin-top: 3px;
  color: var(--forest);
  font-size: 1.75rem;
}

.screen-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.head-badge {
  flex: 0 0 auto;
  min-width: 44px;
  padding: 7px 10px;
  color: var(--forest-2);
  font-size: 0.7rem;
  font-weight: 800;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
}

.hero-card {
  position: relative;
  min-height: 208px;
  padding: 20px;
  overflow: hidden;
  color: #fff8e9;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(8, 21, 15, 0.96) 0%, rgba(9, 24, 17, 0.86) 34%, rgba(10, 26, 18, 0.54) 67%, rgba(10, 26, 18, 0.33) 100%),
    linear-gradient(0deg, rgba(8, 21, 15, 0.78) 0%, rgba(8, 21, 15, 0) 58%),
    url("/assets/village-hero.webp") 72% 56% / cover no-repeat,
    var(--forest);
  box-shadow: var(--shadow);
}

.hero-card::after {
  position: absolute;
  right: -42px;
  bottom: -62px;
  width: 170px;
  height: 170px;
  content: "";
  border: 1px solid rgba(219, 173, 85, 0.2);
  border-radius: 50%;
  box-shadow: 0 0 0 22px rgba(219, 173, 85, 0.04), 0 0 0 48px rgba(219, 173, 85, 0.03);
}

.hero-card .eyebrow {
  color: var(--gold);
}

.hero-card h2 {
  position: relative;
  z-index: 1;
  margin: 4px 0 3px;
  font-family: "Batang", "Noto Serif KR", Georgia, serif;
  font-size: 1.68rem;
}

.hero-meta {
  position: relative;
  z-index: 1;
  color: rgba(249, 240, 221, 0.62);
  font-size: 0.72rem;
}

.hero-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.hero-stat {
  min-width: 0;
  padding: 9px 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.06);
}

.hero-stat span {
  display: block;
  overflow: hidden;
  color: rgba(249, 240, 221, 0.55);
  font-size: 0.62rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-stat strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #fffaf0;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.village-tabs {
  display: flex;
  gap: 7px;
  margin: 0 0 12px;
  padding: 3px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card-2);
  scrollbar-width: none;
}

.village-tabs::-webkit-scrollbar {
  display: none;
}

.village-tab {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 7px 12px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
}

.village-tab.active {
  color: var(--forest);
  background: var(--card);
  box-shadow: 0 2px 8px rgba(19, 34, 27, 0.09);
}

.notice-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 13px;
  color: #77291f;
  border: 1px solid #e5b6a8;
  border-radius: 13px;
  background: var(--danger-soft);
}

.notice-card svg {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  margin-top: 1px;
}

.notice-card strong {
  display: block;
  font-size: 0.82rem;
}

.notice-card p {
  margin-top: 2px;
  font-size: 0.74rem;
  line-height: 1.5;
}

.panel {
  margin-top: 13px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 3px 12px rgba(19, 34, 27, 0.035);
}

.panel.tight {
  padding: 12px 13px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 11px;
}

.panel-head h3 {
  color: var(--forest);
}

.panel-head .subtle,
.subtle {
  color: var(--muted);
  font-size: 0.7rem;
}

.mini-link {
  min-height: 32px;
  padding: 4px 7px;
  color: var(--ember-dark);
  font-size: 0.72rem;
  font-weight: 800;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.queue-item,
.march-item,
.report-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.queue-item:first-child,
.march-item:first-child,
.report-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.queue-item:last-child,
.march-item:last-child,
.report-row:last-child {
  padding-bottom: 0;
}

.queue-icon,
.march-icon {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  color: var(--ember-dark);
  border-radius: 10px;
  background: #f7e9db;
  place-items: center;
}

.queue-icon svg,
.march-icon svg {
  width: 19px;
  height: 19px;
}

.queue-main,
.march-main {
  min-width: 0;
  flex: 1;
}

.queue-main strong,
.march-main strong {
  display: block;
  overflow: hidden;
  color: var(--forest);
  font-size: 0.83rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-main small,
.march-main small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.4;
}

.countdown {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--ember-dark);
  font-size: 0.72rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.countdown svg {
  width: 13px;
  height: 13px;
}

.march-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.march-status {
  display: inline-block;
  padding: 3px 6px;
  color: var(--green);
  font-size: 0.58rem;
  font-weight: 800;
  border-radius: 6px;
  background: var(--green-soft);
}

.march-status.returning {
  color: #83571b;
  background: var(--gold-soft);
}

.troop-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.troop-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 4px 9px 4px 5px;
  color: var(--forest);
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card-2);
}

.glyph {
  display: grid;
  width: 22px;
  height: 22px;
  color: #f9f0df;
  font-family: "Batang", serif;
  font-size: 0.68rem;
  font-weight: 800;
  border-radius: 50%;
  background: var(--forest-3);
  place-items: center;
}

.glyph.axe { background: var(--ember-dark); }
.glyph.settler { color: var(--forest); background: var(--gold); }
.glyph.sword { background: #56645b; }

/* ---------- 건설 ---------- */
.queue-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-2);
}

.queue-summary strong {
  color: var(--forest);
  font-size: 0.8rem;
}

.queue-summary span {
  color: var(--muted);
  font-size: 0.68rem;
}

.building-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.building-card + .building-card {
  margin-top: 9px;
}

.building-top {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.building-badge {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  color: var(--forest-2);
  font-family: "Batang", serif;
  font-size: 0.88rem;
  font-weight: 800;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--card-2);
  place-items: center;
}

.building-info {
  min-width: 0;
  flex: 1;
}

.building-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.building-title-row h3 {
  overflow: hidden;
  color: var(--forest);
  font-size: 0.94rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.level-badge {
  flex: 0 0 auto;
  color: var(--ember-dark);
  font-size: 0.7rem;
  font-weight: 900;
}

.building-desc {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.69rem;
  line-height: 1.45;
}

.level-pips {
  display: flex;
  gap: 2px;
  margin-top: 8px;
}

.level-pip {
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: #e8dfcc;
}

.level-pip.on {
  background: var(--green);
}

.building-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 9px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.cost-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 9px;
  min-width: 0;
}

.cost-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.cost-pill svg {
  width: 13px;
  height: 13px;
}

.cost-pill.lack {
  color: var(--danger);
}

.cost-time {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.63rem;
}

.building-action {
  flex: 0 0 auto;
}

.building-card.is-queued {
  border-color: #d8bd83;
  background: #fdf6e8;
}

.queue-cancel {
  min-width: 42px;
  min-height: 40px;
  padding: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

/* ---------- 병영 ---------- */
.unit-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.unit-card + .unit-card {
  margin-top: 9px;
}

.unit-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.unit-glyph {
  display: grid;
  flex: 0 0 auto;
  width: 45px;
  height: 45px;
  color: #fff8e9;
  font-family: "Batang", serif;
  font-size: 1.1rem;
  font-weight: 800;
  border-radius: 13px;
  background: linear-gradient(145deg, var(--forest-3), var(--forest));
  place-items: center;
}

.unit-glyph.axe { background: linear-gradient(145deg, #c56332, #8c3c1d); }
.unit-glyph.settler { color: var(--forest); background: linear-gradient(145deg, #e4bd6c, #b98835); }

.unit-name {
  min-width: 0;
  flex: 1;
}

.unit-name h3 {
  color: var(--forest);
}

.unit-name p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.4;
}

.unit-owned {
  flex: 0 0 auto;
  color: var(--forest);
  font-size: 0.7rem;
  font-weight: 800;
  text-align: right;
}

.unit-owned small {
  display: block;
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 600;
}

.stat-line {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.stat-chip {
  padding: 3px 6px;
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: 6px;
  background: var(--card-2);
}

.unit-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.unit-cost {
  min-width: 0;
  flex: 1;
}

.recruit-controls {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
}

.stepper {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--card);
}

.stepper button {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--forest);
  font-size: 1.05rem;
  font-weight: 700;
  border: 0;
  background: var(--card-2);
  place-items: center;
  cursor: pointer;
}

.stepper button:disabled {
  color: #b2b2a8;
  cursor: not-allowed;
}

.stepper input {
  width: 48px;
  height: 44px;
  padding: 0 2px;
  color: var(--forest);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
  border: 0;
  outline: 0;
  background: transparent;
  -moz-appearance: textfield;
}

.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.recruit-button {
  min-height: 44px;
}

.train-cost-preview {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.63rem;
}

.unit-locked {
  margin-top: 8px;
  padding: 7px 9px;
  color: #7c5b2a;
  font-size: 0.67rem;
  border-radius: 7px;
  background: #f8ebce;
}

/* ---------- 지도 ---------- */
.map-board {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #e7deca;
  box-shadow: inset 0 1px 4px rgba(19, 34, 27, 0.08);
}

.map-grid {
  display: grid;
  width: 100%;
  overflow: hidden;
  border: 1px solid #c9bfa9;
  border-radius: 10px;
  background: #d7cdb8;
  gap: 2px;
  grid-template-columns: repeat(var(--map-size, 15), minmax(0, 1fr));
}

.map-cell {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: #d0c4ac;
  cursor: pointer;
}

.map-cell.empty {
  cursor: default;
  background: #dcd3c1;
}

.map-cell.neutral {
  background: #b99a6b;
}

.map-cell.other {
  background: #b85e43;
}

.map-cell.mine {
  background: #3f7450;
  box-shadow: inset 0 0 0 1px #f8efd9;
}

.map-cell.neutral::after,
.map-cell.other::after,
.map-cell.mine::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  content: "";
  border-radius: 50%;
  background: #fff5df;
  transform: translate(-50%, -50%);
}

.map-cell.mine::after {
  width: 7px;
  height: 7px;
  background: var(--gold);
}

.map-cell:focus-visible {
  z-index: 2;
  outline: 2px solid var(--ember);
  outline-offset: -1px;
}

.map-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  color: #6d6557;
  font-size: 0.62rem;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.64rem;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b99a6b;
}

.legend-dot.mine { background: #3f7450; }
.legend-dot.other { background: #b85e43; }

.filter-tabs {
  display: flex;
  gap: 5px;
  margin: 13px 0 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar {
  display: none;
}

.filter-tab {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 7px 12px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  cursor: pointer;
}

.filter-tab.active {
  color: #fff8e9;
  border-color: var(--forest-2);
  background: var(--forest-2);
}

.village-list {
  margin-top: 7px;
  border-top: 1px solid var(--line);
}

.village-row {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 58px;
  padding: 8px 2px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
}

.village-row:last-child {
  border-bottom: 0;
}

.village-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #b99a6b;
}

.village-dot.mine { background: #3f7450; }
.village-dot.other { background: #b85e43; }

.village-row-main {
  min-width: 0;
  flex: 1;
}

.village-row-main strong {
  display: block;
  overflow: hidden;
  color: var(--forest);
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.village-row-main small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.64rem;
}

.distance {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.65rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.target-go {
  flex: 0 0 auto;
  padding: 5px 8px;
  color: var(--ember-dark);
  font-size: 0.66rem;
  font-weight: 800;
  border: 1px solid #e3bda4;
  border-radius: 7px;
  background: #fff8ef;
}

/* ---------- 보고서 ---------- */
.report-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 64px;
  padding: 12px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card);
  cursor: pointer;
}

.report-card + .report-card {
  margin-top: 7px;
}

.report-card.unread {
  border-color: #dfba86;
  background: #fff7e9;
}

.report-result {
  display: grid;
  flex: 0 0 auto;
  width: 37px;
  height: 37px;
  color: var(--green);
  border-radius: 10px;
  background: var(--green-soft);
  place-items: center;
}

.report-result.loss {
  color: var(--danger);
  background: var(--danger-soft);
}

.report-result svg {
  width: 18px;
  height: 18px;
}

.report-main {
  min-width: 0;
  flex: 1;
}

.report-main strong {
  display: block;
  overflow: hidden;
  color: var(--forest);
  font-size: 0.79rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-main small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.65rem;
}

.unread-mark {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--ember);
}

/* ---------- 모달 ---------- */
.sheet {
  width: min(100%, var(--app-width));
  max-width: var(--app-width);
  max-height: min(90dvh, 780px);
  margin: auto auto 0;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  border: 0;
  border-radius: 22px 22px 0 0;
  background: var(--paper);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.28);
}

.sheet[open] {
  animation: sheet-up 0.2s ease-out;
}

@keyframes sheet-up {
  from { transform: translateY(28px); opacity: 0.5; }
  to { transform: translateY(0); opacity: 1; }
}

.sheet::backdrop {
  background: rgba(8, 20, 14, 0.62);
  backdrop-filter: blur(2px);
}

#modal-content {
  max-height: min(88dvh, 760px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 16px calc(20px + env(safe-area-inset-bottom));
}

.sheet-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 -16px 14px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 237, 221, 0.97);
  backdrop-filter: blur(8px);
}

.sheet-head h2 {
  margin-top: 3px;
  color: var(--forest);
  font-family: "Batang", "Noto Serif KR", Georgia, serif;
  font-size: 1.35rem;
}

.sheet-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.7rem;
}

.sheet-close {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  padding: 0;
  color: var(--forest);
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--card);
  place-items: center;
  cursor: pointer;
}

.sheet-error {
  margin: -3px 0 12px;
  padding: 10px 12px;
  color: var(--danger);
  font-size: 0.78rem;
  line-height: 1.5;
  border: 1px solid #eab7aa;
  border-radius: 10px;
  background: var(--danger-soft);
}

.target-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}

.target-emblem {
  display: grid;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  color: #fff8e9;
  border-radius: 12px;
  background: var(--forest-2);
  place-items: center;
}

.target-emblem svg {
  width: 24px;
  height: 24px;
}

.target-summary h3 {
  color: var(--forest);
}

.target-summary p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.7rem;
}

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

.mode-option {
  position: relative;
  display: block;
  min-width: 0;
  cursor: pointer;
}

.mode-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mode-card {
  display: block;
  min-height: 78px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}

.mode-option input:checked + .mode-card {
  border-color: var(--ember);
  background: #fff4e7;
  box-shadow: inset 0 0 0 1px var(--ember);
}

.mode-option input:disabled + .mode-card {
  opacity: 0.5;
  cursor: not-allowed;
}

.mode-card strong {
  display: block;
  color: var(--forest);
  font-size: 0.79rem;
}

.mode-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.63rem;
  line-height: 1.4;
}

.unit-picker {
  border-top: 1px solid var(--line);
}

.picker-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.picker-label {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 7px;
}

.picker-label strong {
  display: block;
  color: var(--forest);
  font-size: 0.78rem;
}

.picker-label small {
  display: block;
  color: var(--muted);
  font-size: 0.61rem;
}

.picker-available {
  flex: 0 0 auto;
  min-width: 45px;
  color: var(--muted);
  font-size: 0.64rem;
  text-align: right;
}

.attack-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 12px 0;
}

.info-box {
  min-width: 0;
  padding: 9px 10px;
  border-radius: 10px;
  background: var(--card-2);
}

.info-box span {
  display: block;
  color: var(--muted);
  font-size: 0.61rem;
}

.info-box strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--forest);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warning-box {
  margin-top: 10px;
  padding: 9px 10px;
  color: #7c4d19;
  font-size: 0.67rem;
  line-height: 1.5;
  border: 1px solid #e0c28c;
  border-radius: 9px;
  background: #fbf0d7;
}

.sheet-actions {
  display: flex;
  gap: 8px;
  margin-top: 15px;
}

.sheet-actions .btn {
  flex: 1;
}

.battle-hero {
  padding: 16px;
  text-align: center;
  border-radius: 15px;
  background:
    radial-gradient(circle at 50% 0, rgba(219, 173, 85, 0.25), transparent 60%),
    var(--forest-2);
  color: #f8f0df;
}

.battle-hero .eyebrow {
  color: var(--gold);
}

.battle-hero h2 {
  margin: 5px 0;
  font-family: "Batang", "Noto Serif KR", Georgia, serif;
  font-size: 1.55rem;
}

.battle-hero p {
  color: rgba(249, 240, 221, 0.68);
  font-size: 0.72rem;
}

.battle-score {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 12px 0;
}

.battle-score div {
  padding: 11px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--card);
}

.battle-score span {
  display: block;
  color: var(--muted);
  font-size: 0.62rem;
}

.battle-score strong {
  display: block;
  margin-top: 3px;
  color: var(--forest);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.loot-panel {
  margin-top: 10px;
}

.loot-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--card);
}

.loot-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) repeat(3, minmax(0, 0.72fr));
  align-items: center;
  gap: 5px;
  padding: 8px 9px;
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
  border-top: 1px solid var(--line);
}

.loot-row:first-child {
  border-top: 0;
}

.loot-table.defender .loot-row {
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
}

.loot-head {
  color: var(--muted);
  font-size: 0.61rem;
  font-weight: 800;
  background: var(--card-2);
}

.loot-head span:first-child,
.loot-name {
  text-align: left;
}

.loot-name {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--forest);
  font-weight: 700;
}

.loot-name svg {
  width: 15px;
  height: 15px;
}

.loot-received {
  color: var(--green);
  font-weight: 800;
}

.loot-spilled {
  color: var(--danger);
  font-weight: 800;
}

.loot-pending {
  color: var(--muted);
}

.loot-total {
  color: var(--forest);
  font-weight: 800;
  background: #f7f0e1;
}

.loot-total span:first-child {
  text-align: left;
}

.loot-note {
  margin: 9px 2px 0;
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.6;
}

.loot-total-only {
  padding: 10px;
  color: var(--forest);
  font-size: 1.05rem;
  font-weight: 800;
  text-align: right;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
}

.detail-list {
  display: grid;
  gap: 0;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.73rem;
  border-bottom: 1px solid var(--line);
}

.detail-row:last-child {
  border-bottom: 0;
}

.detail-row span:first-child {
  color: var(--muted);
}

.detail-row span:last-child {
  color: var(--forest);
  font-weight: 700;
  text-align: right;
}

.detail-row .cost-pill {
  margin-left: 5px;
}

.loss-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.7rem;
}

.loss-table th {
  padding: 5px 3px;
  color: var(--muted);
  font-size: 0.61rem;
  font-weight: 700;
  text-align: right;
}

.loss-table th:first-child {
  text-align: left;
}

.loss-table td {
  padding: 6px 3px;
  color: var(--forest);
  font-variant-numeric: tabular-nums;
  text-align: right;
  border-top: 1px solid var(--line);
}

.loss-table td:first-child {
  text-align: left;
}

/* ---------- 토스트 ---------- */
.toast {
  position: fixed;
  bottom: calc(var(--nav-height) + 16px + env(safe-area-inset-bottom));
  left: 50%;
  z-index: 80;
  width: min(calc(100% - 28px), 430px);
  padding: 11px 14px;
  color: #fff9ed;
  font-size: 0.79rem;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 11px;
  background: rgba(17, 35, 27, 0.96);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.24);
  transform: translateX(-50%);
}

.toast.error {
  background: rgba(126, 44, 35, 0.97);
}

/* ---------- 태블릿/데스크톱 ---------- */
@media (min-width: 760px) {
  body {
    padding: 24px 0;
  }

  .app-shell {
    min-height: calc(100dvh - 48px);
    border-radius: 24px;
    overflow: hidden;
  }

  .topbar {
    border-radius: 24px 24px 0 0;
  }

  .bottom-nav {
    bottom: 24px;
    border-radius: 0 0 24px 24px;
    overflow: hidden;
  }

  .sheet {
    margin: auto;
    border-radius: 22px;
    max-height: 90dvh;
  }

  .auth-shell {
    display: grid;
    min-height: min(780px, calc(100dvh - 48px));
    margin-top: 24px;
    overflow: hidden;
    border-radius: 26px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
    grid-template-columns: 1.04fr 0.96fr;
  }

  .auth-art {
    min-height: 100%;
    padding: 42px;
  }

  .auth-emblem {
    top: 34px;
    right: 34px;
    width: 64px;
    height: 64px;
    border-radius: 20px;
  }

  .auth-emblem svg {
    width: 37px;
    height: 37px;
  }

  .auth-art-copy h1 {
    font-size: 4.6rem;
  }

  .auth-panel {
    align-self: center;
    padding: 38px;
  }

  .toast {
    bottom: calc(var(--nav-height) + 40px);
  }
}

@media (max-width: 359px) {
  .screen {
    padding-right: 12px;
    padding-left: 12px;
  }

  .brand-name { font-size: 0.98rem; }
  .resource-strip { padding: 0 4px; }
  .resource-cell { min-height: 72px; padding: 6px 5px 5px; }
  .resource-label { font-size: 0.7rem; }
  .res-icon { width: 14px; height: 14px; }
  .resource-amount strong { font-size: 0.94rem; }
  .resource-cap { font-size: 0.7rem; }
  .resource-cell > small { font-size: 0.67rem; }
  .resource-meta { font-size: 0.66rem; }
  .resource-pop strong { font-size: 0.77rem; }
  .unit-footer { flex-wrap: wrap; }
  .unit-cost { flex-basis: 100%; }
  .recruit-controls { width: 100%; gap: 5px; justify-content: flex-end; }
  .stepper button { width: 44px; }
  .stepper input { width: 48px; }
  .mode-grid { grid-template-columns: 1fr; }
  .picker-row { flex-wrap: wrap; }
  .picker-label { flex: 1 1 100%; }
  .picker-row .mini-link { margin-left: auto; }
  .picker-row .stepper { flex: 0 0 138px; }
}

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