:root {
  color-scheme: dark;
  font-family: "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --chalk: #f5efdf;
  --bronze: #dea35f;
  background: #000;
  color: var(--chalk);
  -webkit-tap-highlight-color: transparent;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { display: grid; place-items: center; background: #000; }
button { font: inherit; }
#game-shell {
  position: relative;
  width: min(100vw, 460px, calc(100vh * .52));
  height: 100vh;
  width: min(100vw, 460px, calc(100dvh * .52));
  height: 100dvh;
  max-height: 940px;
  overflow: hidden;
  overflow: clip;
  isolation: isolate;
  background: #000;
}
#regional-map {
  position: absolute;
  z-index: 0;
  max-width: none;
  max-height: none;
  filter: saturate(.72) brightness(.82);
  pointer-events: none;
  user-select: none;
}
.is-overview #regional-map { filter: saturate(.86) brightness(1.12) contrast(1.06); }
.is-overview::after {
  position: absolute;
  z-index: 2;
  inset: 0;
  background: radial-gradient(ellipse 72% 54% at 49% 46%, transparent 36%, #0007 100%), linear-gradient(180deg, #000b, transparent 16%, transparent 60%, #000b 88%);
  content: "";
  pointer-events: none;
}
#world, #region-labels, #site-pins, #territory-labels, #map-markers { position: absolute; inset: 0; width: 100%; height: 100%; }
#world { z-index: 1; display: block; touch-action: none; cursor: grab; }
#world:active { cursor: grabbing; }
.is-targeting #world, .is-targeting #world:active { cursor: crosshair; }
#region-labels { z-index: 2; pointer-events: none; }
#region-labels[hidden] { display: none; }
#site-pins { z-index: 3; pointer-events: none; }
#site-pins[hidden] { display: none; }
.site-pin {
  position: absolute;
  width: 22px;
  height: 22px;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 0;
  background: transparent;
  color: #161b17;
  pointer-events: auto;
  cursor: pointer;
}
.site-pin::before { position: absolute; top: 10px; height: 1px; background: #bc9e69; content: ""; pointer-events: none; }
.site-pin--west::before { left: -29px; width: 29px; }
.site-pin--east::before { left: 22px; width: 8px; }
.site-pin__marker {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 1px solid #f4d9a7;
  border-radius: 50%;
  background: #d1a66a;
  box-shadow: 0 0 0 3px #111612, 0 0 0 5px #cfac7559, 0 3px 10px #000d;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}
.site-pin__callout {
  position: absolute;
  top: -12px;
  width: 128px;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 6px 8px;
  border-top: 1px solid #bca16f9e;
  border-bottom: 1px solid #6d6f584d;
  background: linear-gradient(105deg, #111714f5, #0b100ee9);
  box-shadow: 0 5px 16px #000c;
  color: #f5ead7;
  text-align: left;
  white-space: nowrap;
}
.site-pin--west .site-pin__callout { right: 29px; border-left: 2px solid #d5aa6d; }
.site-pin--east .site-pin__callout { left: 29px; border-right: 2px solid #d5aa6d; }
.site-pin__callout small { color: #baa886; font-size: 9px; font-weight: 700; }
.site-pin__callout strong { font-size: 11px; font-weight: 850; letter-spacing: -.04em; }
.site-pin[data-status="available"] .site-pin__marker::after {
  position: absolute;
  inset: -7px;
  border: 1px solid #e7b773;
  border-radius: 50%;
  content: "";
  animation: campaign-pulse 2.5s ease-out infinite;
}
@keyframes campaign-pulse { 0% { opacity: .85; transform: scale(.72); } 72%, 100% { opacity: 0; transform: scale(1.25); } }
.site-pin[data-status="cleared"] .site-pin__marker { border-color: #bac9a9; background: #6f856a; color: #fff9e9; box-shadow: 0 0 0 3px #111612, 0 0 0 5px #91b28a4c; }
.site-pin[data-status="locked"] { cursor: default; }
.site-pin[data-status="locked"]::before { background: #5c665f; }
.site-pin[data-status="locked"] .site-pin__marker { border-color: #7b8376; background: #343c36; color: #b1b9a9; box-shadow: 0 0 0 3px #111612; }
.site-pin[data-status="locked"] .site-pin__callout { border-color: #59625990; background: #0c1210e8; color: #9ba499; }
.site-pin[data-status="locked"] .site-pin__callout small { color: #7f8a7c; }
.site-pin:focus-visible { outline: 2px solid #fff2c4; outline-offset: 7px; }
.region-label {
  position: absolute;
  transform: translate(-50%, -50%);
  color: #a4b3a7;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
  white-space: nowrap;
  text-shadow: 0 1px 5px #000, 0 0 12px #000;
}
.region-label--active {
  padding: 5px 7px 6px;
  border: 1px solid #c9a46d99;
  border-bottom: 2px solid #d4a15b;
  background: #111813ed;
  box-shadow: 0 3px 8px #000b;
  color: #f0dcba;
  font-size: 11px;
  letter-spacing: -.02em;
}
#map-context-note {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  transform: translateX(-50%);
  color: #b8c5ba;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  text-shadow: 0 1px 4px #000;
  pointer-events: none;
}
#map-context-note[hidden] { display: none; }
#territory-labels, #map-markers { z-index: 3; pointer-events: none; }

.territory-label {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px 4px 5px;
  transform: translate(-50%, -50%);
  border-bottom: 2px solid var(--territory-accent);
  background: linear-gradient(100deg, #0a0c0bd9, #0a0c0ba8);
  box-shadow: 0 2px 7px #0009;
  color: var(--chalk);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 1px 2px #000;
}
.territory-label::before {
  width: 9px;
  height: 12px;
  background: var(--territory-accent);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%);
  content: "";
}
.territory-label small { display: none; }
.territory-label[hidden] { display: none; }

#hud {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  right: 0;
  height: calc(env(safe-area-inset-top, 0px) + 49px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(env(safe-area-inset-top, 0px) + 1px) 16px 3px;
  background: linear-gradient(180deg, #000 0%, #000f 65%, #0000 100%);
  white-space: nowrap;
  user-select: none;
}
.hud-place {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: var(--chalk);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -.035em;
  text-shadow: 0 1px 3px #000;
}
.hud-place::before {
  flex: none;
  width: 2px;
  height: 16px;
  margin-right: 4px;
  background: var(--bronze);
  box-shadow: 1px 0 #51391d;
  content: "";
}
.hud-era { color: #ead4af; }
.hud-separator { color: #987f63; }
.hud-goal {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  margin-left: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  letter-spacing: -.035em;
  text-shadow: 0 1px 3px #000;
}
.hud-goal__verb { flex: none; color: var(--bronze); font-size: 10px; font-weight: 900; }
.hud-goal strong { overflow: hidden; text-overflow: ellipsis; font-weight: 750; }
.turn-counter {
  flex: none;
  display: flex;
  align-items: baseline;
  gap: 2px;
  padding-left: 8px;
  border-left: 1px solid #af8e5d8a;
  color: #e8d8b9;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 1px 3px #000;
}
.turn-counter[hidden] { display: none; }
.turn-counter span:first-child { margin-right: 2px; color: #c9a877; font-size: 9px; }
.turn-counter strong { color: #fff0d1; font-size: 15px; }
.turn-counter--urgent, .turn-counter--urgent strong { color: #e7a980; }

#fit-button {
  position: absolute;
  z-index: 5;
  top: calc(env(safe-area-inset-top, 0px) + 60px);
  right: 14px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 7px;
  border: 1px solid #c4ae85b8;
  border-radius: 7px 3px 7px 3px;
  background: linear-gradient(150deg, #22251fe8, #0d1211ea);
  box-shadow: 0 3px 8px #000a, inset 0 1px #f6e7bb29;
  color: var(--chalk);
  cursor: pointer;
}
#fit-button svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#fit-button:active { transform: translateY(1px); }
#fit-button[hidden] { display: none; }
.game-menu-trigger {
  position: absolute;
  z-index: 5;
  top: calc(env(safe-area-inset-top, 0px) + 104px);
  right: 14px;
  width: 36px;
  height: 36px;
  border: 1px solid #a48f6b;
  border-radius: 4px;
  background: #111714e8;
  color: #e9d9b8;
  box-shadow: 0 3px 9px #000b;
  font-size: 16px;
  cursor: pointer;
}
.game-menu-trigger[hidden] { display: none; }

.site-picker {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 28px);
  padding: 16px 20px 11px;
  border-top: 1px solid #bd9c69;
  background: linear-gradient(180deg, #101814f2, #060a09fa 68%);
  box-shadow: 0 -15px 36px #000c, inset 0 1px #e6cfa42b;
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}
.site-picker[hidden] { display: none; }
.site-picker__heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.site-picker__eyebrow {
  margin: 0 0 5px;
  color: #bda372;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
}
.site-picker h1 {
  margin: 0;
  color: #f2e5d0;
  font-family: "AppleMyungjo", "Noto Serif KR", "Nanum Myeongjo", serif;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -.075em;
  line-height: 1.12;
}
.site-picker__progress { color: #d8b77d; font-family: Georgia, serif; font-size: 17px; font-weight: 700; white-space: nowrap; }
.site-picker__list { border-top: 1px solid #bb9e7059; }
.site-choice {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 5px;
  border: 0;
  border-bottom: 1px solid #aa966c3e;
  background: transparent;
  color: #e9dfcd;
  text-align: left;
  cursor: pointer;
}
.site-choice[data-status="available"] { background: linear-gradient(90deg, #b4843c22, transparent 76%); }
.site-choice:hover:not(:disabled), .site-choice:focus-visible { background: linear-gradient(90deg, #b4843c3d, #26312822 76%); }
.site-choice:focus-visible { outline: 1px solid #e8bc76; outline-offset: -2px; }
.site-choice:disabled { cursor: default; }
.site-choice[data-status="locked"] { opacity: .54; }
.site-choice__number { flex: none; width: 27px; color: #d5b47e; font-family: Georgia, serif; font-size: 17px; font-weight: 700; }
.site-choice__copy { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 3px; }
.site-choice__copy strong { color: #f2e9d7; font-size: 12px; font-weight: 850; letter-spacing: -.035em; }
.site-choice__copy small { overflow: hidden; color: #a9b5a9; font-size: 9px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.site-choice__state { flex: none; min-width: 48px; color: #d6b37b; font-size: 10px; font-weight: 850; text-align: right; white-space: nowrap; }
.site-choice[data-status="cleared"] .site-choice__state { color: #a8c99c; }
.site-choice[data-status="locked"] .site-choice__state { color: #b0b8a9; }
.site-picker__note { margin: 8px 0 0; color: #879689; font-size: 9px; line-height: 1.35; word-break: keep-all; }
.marker {
  position: absolute;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 5px 1px;
  transform: translate(-50%, -50%);
  border: 0;
  background: transparent;
  color: var(--chalk);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: -.04em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
}
.marker__beacon {
  position: relative;
  z-index: 1;
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid #d2bb89;
  border-radius: 5px 3px 5px 3px;
  background: linear-gradient(145deg, #343229, #0d1515);
  box-shadow: 0 0 0 2px #090a09d9, 0 3px 5px #000b, inset 0 1px #fff4d330;
}
.marker__beacon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #f4ebd5;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 1px #000);
}
.marker__label {
  position: relative;
  min-height: 25px;
  display: flex;
  align-items: center;
  margin-left: -2px;
  padding: 2px 8px 3px 9px;
  border: 1px solid #c6b18b80;
  border-left: 0;
  border-radius: 0 5px 3px 0;
  background: linear-gradient(100deg, #171a17f2, #111713d9);
  box-shadow: 0 2px 5px #0009, inset 0 1px #fff2d010;
  text-shadow: 0 1px 1px #000;
}
.marker--current .marker__beacon {
  border-color: #ffe3a8;
  background: linear-gradient(145deg, #b98340, #6b3c21);
  box-shadow: 0 0 0 2px #0c0c08df, 0 0 0 5px #e9ab5e66, 0 3px 7px #000b;
  animation: objective-pulse 2.6s ease-in-out infinite;
}
.marker--current .marker__label { border-color: #dfaf70b8; background: linear-gradient(100deg, #3b2a1fe8, #171914e8); }
.marker--selected .marker__label { border-color: #f1d29b; box-shadow: 0 0 0 1px #f1d29b66, 0 3px 8px #000a; }
.marker--selected .marker__beacon { box-shadow: 0 0 0 2px #0c0c08df, 0 0 0 5px #f1d29b8c, 0 0 12px #d9ad63ad; }
.marker--complete .marker__beacon { border-color: #a9ad94; background: linear-gradient(145deg, #2a3128, #0b1512); }
.marker--complete .marker__beacon::after {
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 11px;
  height: 11px;
  display: grid;
  place-items: center;
  border: 1px solid #d1c394;
  border-radius: 50%;
  background: #253025;
  color: #f3dfac;
  content: "✓";
  font-size: 8px;
  font-weight: 900;
}
.is-knapping .marker--current .marker__beacon {
  animation: knapping-flash .55s ease-out both;
}
@keyframes knapping-flash {
  0% { filter: brightness(1); transform: scale(1); }
  30% { filter: brightness(2); transform: scale(1.22) rotate(-8deg); }
  100% { filter: brightness(1); transform: scale(1); }
}
.marker--moving .marker__beacon { box-shadow: 0 0 0 2px #0c0c08df, 0 0 0 5px #e0b77d72, 0 0 13px #dab46b8c; }
.is-targeting .marker:not(.marker--hidden):hover .marker__beacon { border-color: #f8d69e; box-shadow: 0 0 0 2px #0c0c08df, 0 0 0 5px #e9ab5e66; }
.marker--hidden { visibility: hidden; }
@keyframes objective-pulse {
  0%, 100% { box-shadow: 0 0 0 2px #0c0c08df, 0 0 0 4px #e9ab5e55, 0 3px 7px #000b; }
  50% { box-shadow: 0 0 0 2px #0c0c08df, 0 0 0 8px #e9ab5e18, 0 3px 7px #000b; }
}
.marker:focus-visible, #fit-button:focus-visible, #object-close:focus-visible, .object-card__action:focus-visible, #object-back:focus-visible { outline: 2px solid #f3bb72; outline-offset: 3px; }

.object-card {
  position: absolute;
  z-index: 6;
  width: min(240px, calc(100% - 24px));
  color: var(--chalk);
  filter: drop-shadow(0 5px 9px #000c);
  animation: command-appear .16s ease-out both;
}
@keyframes command-appear { from { opacity: 0; transform: translateY(5px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.object-card[hidden], .object-card__commands[hidden], .object-card__report[hidden], .object-card__action[hidden], .object-card__transition[hidden] { display: none; }
.object-card__heading {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 6px 6px 10px;
  border-left: 3px solid var(--owner-accent, #d8b47a);
  background: linear-gradient(100deg, #111917f7, #0b1211ed);
  box-shadow: inset 0 1px #dbd6bf24, inset 0 -1px #c6bd9d33;
}
.object-card__identity { min-width: 0; flex: 1; }
.object-card h2 {
  margin: 0 0 3px;
  overflow: hidden;
  color: #fff9e9;
  font-size: 15px;
  font-weight: 850;
  letter-spacing: -.045em;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.object-card__owner {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #c9cfbb;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}
.object-card__owner::before { flex: none; width: 7px; height: 9px; background: var(--owner-accent); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%); content: ""; }
.object-card__commands { display: flex; gap: 4px; margin-top: 4px; }
.object-card__action {
  flex: 1 1 0;
  min-width: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border: 1px solid #8f967e91;
  border-bottom: 2px solid #c39b5c;
  border-radius: 2px;
  background: linear-gradient(165deg, #22291fdc, #0b1412f2);
  box-shadow: inset 0 1px #eee4c71c, 0 2px 5px #000a;
  color: #f2ead6;
  font-size: 11px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
.object-card__action svg { flex: none; width: 18px; height: 18px; fill: none; stroke: #efddba; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.object-card__action--demo { border-bottom-color: #bf7851; }
.object-card__action--primary { border-bottom-color: #f1c178; background: linear-gradient(165deg, #493b27, #1b241e); }
.object-card__action:disabled { opacity: .55; cursor: default; }
.object-card__action-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; white-space: nowrap; }
.object-card__action-copy small { color: #d9ae83; font-size: 8px; font-weight: 700; }
.object-card__action:hover { background: linear-gradient(165deg, #343a2b, #18201a); }
.object-card__action:active { transform: translateY(1px); }
.object-card__report {
  margin-top: 4px;
  padding: 8px 9px 9px;
  border-left: 3px solid var(--owner-accent, #d8b47a);
  background: #101715f7;
  box-shadow: inset 0 1px #dbd6bf24;
}
.object-card__report-main { display: flex; align-items: center; gap: 7px; }
.object-card__art {
  flex: none;
  width: 74px;
  height: 74px;
  background-image: url("https://he-assets.vaninks.com/assets/map/landmarks-atlas-v2.69b3314ceb66.webp");
  background-size: 200% 200%;
  background-repeat: no-repeat;
}
.object-card__report p { margin: 0; color: #eee9dc; font-size: 11px; font-weight: 650; line-height: 1.45; word-break: keep-all; }
#object-back {
  min-height: 32px;
  margin-top: 6px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: #e6c38d;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.object-card__note { padding-top: 7px; border-top: 1px solid #d3c2a333; color: #a9ae9d; font-size: 9px; font-weight: 600; line-height: 1.35; }
.object-card__transition {
  margin-top: 4px;
  padding: 6px 8px;
  border-left: 2px solid #c9905b;
  background: #101715f0;
  color: #ecd7b7;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
}
#object-close {
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #cfc8b2;
  font-size: 21px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}

.mission-result {
  position: absolute;
  z-index: 8;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: #000b;
}
.mission-assessment {
  position: absolute;
  z-index: 8;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: radial-gradient(ellipse at 50% 45%, #14201cc9, #000e 75%);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}
.mission-assessment[hidden] { display: none; }
.craft-moment {
  position: absolute;
  z-index: 9;
  inset: 0;
  display: grid;
  place-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 18px) 18px calc(env(safe-area-inset-bottom, 0px) + 18px);
  background: radial-gradient(ellipse 85% 45% at 50% 45%, #162018dd, #020503f5 80%);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: craft-moment-enter .24s ease-out both;
}
.craft-moment[hidden] { display: none; }
.craft-moment__panel {
  display: grid;
  justify-items: center;
  width: min(100%, 368px);
  max-height: 100%;
  padding: 0 8px 12px;
  border: 0;
  border-top: 1px solid #9b7b4b99;
  border-bottom: 1px solid #9b7b4b99;
  background: linear-gradient(180deg, #0e160d99, #0b110d55 45%, #0b110dcc);
  color: #f2e6d0;
  box-shadow: 0 22px 50px #0009;
  cursor: pointer;
}
.craft-moment__panel:focus-visible { outline: 2px solid #e9c68d; outline-offset: 4px; }
.craft-moment__step {
  padding-top: 16px;
  color: #bf9b67;
  font-family: Georgia, serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
}
.craft-moment__art {
  display: block;
  width: min(100%, 330px, 48vh);
  width: min(100%, 330px, 48dvh);
  aspect-ratio: 1;
  margin: 0 auto 8px;
  background-repeat: no-repeat;
  background-size: 200% 200%;
  filter: drop-shadow(0 14px 18px #000b);
}
.craft-moment__title {
  padding: 0 8px;
  font-family: "AppleMyungjo", "Noto Serif KR", serif;
  font-size: clamp(19px, 5vw, 24px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -.05em;
  text-shadow: 0 2px 10px #000;
}
.craft-moment__continue {
  margin-top: 24px;
  color: #cdbd9f;
  font-size: 11px;
  font-weight: 800;
}
@keyframes craft-moment-enter { from { opacity: 0; } to { opacity: 1; } }
.mission-assessment__panel {
  width: min(100%, 344px);
  padding: 23px 19px 19px;
  border: 1px solid #997f59;
  border-top: 3px solid #d7ac6d;
  background: linear-gradient(145deg, #18231d, #090e0c 82%);
  box-shadow: 0 18px 45px #000e, inset 0 1px #fbe6b222;
}
.mission-assessment__eyebrow {
  margin: 0 0 11px;
  color: #d4ad72;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
}
.mission-assessment h2 {
  margin: 0;
  color: #f7eddb;
  font-family: "AppleMyungjo", "Noto Serif KR", serif;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.42;
  letter-spacing: -.06em;
  word-break: keep-all;
}
.mission-assessment__prompt { margin: 11px 0 19px; color: #b9c5b6; font-size: 12px; font-weight: 700; }
.mission-assessment__choices { display: grid; gap: 7px; }
.mission-assessment__choice {
  min-height: 49px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 12px;
  border: 1px solid #727f6b8c;
  border-bottom-color: #b19765;
  background: linear-gradient(110deg, #28332a, #151c17);
  color: #f1ead8;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
.mission-assessment__choice span { color: #be9b65; font-family: Georgia, serif; font-size: 13px; }
.mission-assessment__choice:hover, .mission-assessment__choice:focus-visible { border-color: #e1bb7e; background: #3b3829; outline: none; }
.mission-assessment__choice:active { transform: translateY(1px); }
.mission-result[hidden] { display: none; }
.mission-result__panel {
  width: min(100%, 320px);
  padding: 18px 18px 16px;
  border: 1px solid #b19465;
  border-top: 3px solid #e2af67;
  background: linear-gradient(155deg, #1c2520, #0b110f 78%);
  box-shadow: 0 16px 40px #000e, inset 0 1px #fff2d51c;
}
.mission-result[data-outcome="failed"] .mission-result__panel { border-top-color: #b97965; }
.mission-result__status {
  margin: 0 0 8px;
  color: #d3ad75;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
}
.mission-result[data-outcome="failed"] .mission-result__status { color: #cf9382; }
.mission-result h2 { margin: 0; color: #f8efdd; font-size: 21px; line-height: 1.25; letter-spacing: -.045em; }
.mission-result__footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 12px; border-top: 1px solid #c4ae7950; }
.mission-result__footer span { color: #d4be98; font-size: 12px; font-weight: 800; white-space: nowrap; }
.mission-result__actions { display: flex; align-items: center; gap: 6px; }
.mission-result__footer button {
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid #c9a66c;
  background: linear-gradient(150deg, #62502f, #2f3326);
  color: #fff3dc;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}
.mission-result__footer button[hidden] { display: none; }
#result-map-action { border-color: #7e8a79; background: #19231e; color: #dfdfcd; }
.mission-result__footer button:focus-visible { outline: 2px solid #f6d392; outline-offset: 3px; }

.gesture-hint {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  transform: translateX(-50%);
  color: #e1d5bc;
  font-size: 10px;
  font-weight: 700;
  text-shadow: 0 1px 3px #000, 0 0 6px #000;
  white-space: nowrap;
  pointer-events: none;
  animation: hint-dismiss 5.4s both;
}
.gesture-hint[hidden] { display: none; }
@keyframes hint-dismiss { 0%, 65% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
.action-toast {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
  width: max-content;
  max-width: calc(100% - 28px);
  padding: 8px 12px 9px;
  transform: translateX(-50%);
  border: 1px solid #aa94698c;
  border-bottom: 2px solid #d4a35e;
  background: #0b100eec;
  box-shadow: 0 4px 12px #000d;
  color: #eee5d2;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
  text-align: center;
  word-break: keep-all;
  pointer-events: none;
}
.action-toast[hidden] { display: none; }
.action-toast--appear { animation: toast-appear .18s ease-out both; }
@keyframes toast-appear { from { opacity: 0; transform: translate(-50%, 5px); } to { opacity: 1; transform: translate(-50%, 0); } }

.actor-speech {
  position: absolute;
  z-index: 7;
  max-width: min(196px, calc(100% - 28px));
  padding: 8px 12px;
  transform: translate(-50%, -100%);
  border: 1px solid #c8ae79;
  border-radius: 8px 8px 7px 7px;
  background: #111913f2;
  box-shadow: 0 4px 12px #000b;
  color: #f6e9d1;
  font-size: 11px;
  font-weight: 780;
  line-height: 1.4;
  text-align: center;
  word-break: keep-all;
  pointer-events: none;
}
.actor-speech::after {
  position: absolute;
  left: calc(50% - 5px);
  bottom: -6px;
  width: 9px;
  height: 9px;
  transform: rotate(45deg);
  border-right: 1px solid #c8ae79;
  border-bottom: 1px solid #c8ae79;
  background: #111913;
  content: "";
}
.actor-speech[hidden], .danger-sign[hidden], .beast-encounter[hidden] { display: none; }
.actor-speech--appear { animation: actor-speech-appear .16s ease-out both; }
@keyframes actor-speech-appear { from { opacity: 0; transform: translate(-50%, calc(-100% + 5px)); } to { opacity: 1; transform: translate(-50%, -100%); } }

.danger-sign {
  position: absolute;
  z-index: 4;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%) rotate(-16deg);
  color: #b98a53;
  filter: drop-shadow(0 2px 2px #000d);
  pointer-events: none;
}
.danger-sign svg { width: 100%; height: 100%; fill: currentColor; stroke: #241912; stroke-width: 1.5; paint-order: stroke fill; }

.beast-encounter {
  position: absolute;
  z-index: 8;
  inset: 0;
  background: linear-gradient(#0002, #0005 40%, #000a 100%);
  pointer-events: auto;
}
.beast-encounter__figure {
  position: absolute;
  width: 180px;
  height: 180px;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px #000d);
  animation: beast-appear .28s ease-out both;
  pointer-events: none;
}
@keyframes beast-appear { from { opacity: 0; transform: translateY(11px) scale(.9); } to { opacity: 1; transform: translateY(0) scale(1); } }
.beast-encounter__choices {
  position: absolute;
  right: 12px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
  left: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 11px;
  border: 1px solid #ae956c;
  background: linear-gradient(155deg, #1d251cfa, #0c110efa);
  box-shadow: 0 9px 24px #000d;
}
.beast-encounter__choices h2 { grid-column: 1 / -1; margin: 0 0 3px; color: #f3e3c9; font-size: 14px; font-weight: 850; text-align: center; }
.beast-encounter__choices button {
  min-height: 44px;
  padding: 5px;
  border: 1px solid #927b58;
  background: #253027;
  color: #f4e8d3;
  font-size: 11px;
  font-weight: 800;
}
.beast-encounter__choices button:first-of-type { border-color: #d4ae73; background: #39422e; }
.beast-encounter__choices button:focus-visible { outline: 2px solid #f6d392; outline-offset: 2px; }

.era-intro {
  position: absolute;
  z-index: 9;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
  pointer-events: auto;
}
.era-intro[hidden] { display: none; }
.era-intro__veil { position: absolute; inset: 0; background: #000; -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); }
.era-intro__chapter {
  position: absolute;
  top: calc(44% - 83px);
  left: 50%;
  transform: translateX(-50%);
  color: #b99969;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .38em;
  white-space: nowrap;
}
.era-intro__title {
  position: absolute;
  top: 44%;
  left: 50%;
  display: block;
  margin: 0;
  transform: translate(-50%, -50%);
  transform-origin: center;
  color: #f1e5cf;
  font-family: "AppleMyungjo", "Noto Serif KR", "Nanum Myeongjo", serif;
  font-size: clamp(58px, 18vw, 78px);
  font-weight: 700;
  letter-spacing: -.1em;
  line-height: 1.2;
  text-shadow: 0 1px #fff5dc50, 0 9px 30px #b88d5440;
  white-space: nowrap;
  will-change: transform, opacity;
}
.era-intro__rule {
  position: absolute;
  top: calc(44% + 64px);
  left: 50%;
  width: 76px;
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, #c6a46b, transparent);
}
.era-intro__skip {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 17px);
  right: 16px;
  min-height: 30px;
  padding: 0 3px;
  border: 0;
  background: transparent;
  color: #b9aa92;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}
.era-intro__skip:focus-visible { outline: 1px solid #d7b27a; outline-offset: 3px; }
.era-intro.is-playing .era-intro__veil { animation: era-intro-veil 3600ms ease-in-out both; }
.era-intro.is-playing .era-intro__title { animation: era-intro-title 3600ms cubic-bezier(.32, .04, .16, 1) both; }
.era-intro.is-playing .era-intro__chapter, .era-intro.is-playing .era-intro__rule { animation: era-intro-detail 3600ms ease both; }
.era-intro-running:not(.era-intro-reduced) .hud-era { animation: era-intro-hud 3600ms linear both; }
.era-intro-running.era-intro-reduced .hud-era { opacity: 0; }
@keyframes era-intro-veil {
  0%, 34% { background: #000; -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); }
  54%, 72% { background: #0009; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
  100% { background: #0000; -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); }
}
@keyframes era-intro-title {
  0% { opacity: 0; transform: translate(-50%, -50%) translateY(17px) scale(.96); }
  16%, 55% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  83% { opacity: 1; transform: translate(calc(-50% + var(--intro-dx)), calc(-50% + var(--intro-dy))) scale(var(--intro-scale)); }
  94%, 100% { opacity: 0; transform: translate(calc(-50% + var(--intro-dx)), calc(-50% + var(--intro-dy))) scale(var(--intro-scale)); }
}
@keyframes era-intro-detail { 0% { opacity: 0; } 15%, 43% { opacity: 1; } 60%, 100% { opacity: 0; } }
@keyframes era-intro-hud { 0%, 83% { opacity: 0; } 96%, 100% { opacity: 1; } }
.era-intro.is-reduced .era-intro__veil { background: #000; }
.era-intro.is-reduced .era-intro__title, .era-intro.is-reduced .era-intro__chapter, .era-intro.is-reduced .era-intro__rule { opacity: 1; }

.story-screen, .game-menu, .entry-menu { position: absolute; inset: 0; }
.story-screen[hidden], .game-menu[hidden], .entry-menu[hidden], .entry-menu__confirm[hidden] { display: none; }
.story-screen {
  z-index: 8;
  overflow: hidden;
  background: radial-gradient(ellipse 90% 55% at 50% 39%, #17201bdc, #050807ef 76%), #020303;
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}
.story-screen__scene {
  position: absolute;
  inset: 14% -25% 20%;
  opacity: .36;
  background: radial-gradient(ellipse at 50% 54%, #a18b5f3d, transparent 56%), repeating-linear-gradient(148deg, transparent 0 54px, #af9b7230 55px 56px, transparent 57px 122px);
  transform: rotate(-8deg);
  pointer-events: none;
}
.story-screen__heading {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 25px);
  left: 25px;
  right: 112px;
  display: grid;
  gap: 4px;
  text-shadow: 0 2px 8px #000;
}
.story-screen__heading span { color: #c5a779; font-size: 10px; font-weight: 900; letter-spacing: .11em; }
.story-screen__heading strong { color: #f6e9d1; font-family: "AppleMyungjo", "Noto Serif KR", serif; font-size: 25px; letter-spacing: -.08em; }
.story-screen__skip {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 26px);
  right: 16px;
  min-height: 31px;
  padding: 0 9px;
  border: 1px solid #bba27969;
  background: #0b0e0cbd;
  color: #c8b99d;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
.story-screen__portrait {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 193px);
  width: min(91%, 360px);
  height: min(57%, 480px);
  background-repeat: no-repeat;
  background-size: 200% auto;
  background-position: right bottom;
  filter: drop-shadow(0 12px 17px #000b);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.story-screen[data-side="right"] .story-screen__portrait { right: -10px; background-position: right bottom; }
.story-screen[data-side="left"] .story-screen__portrait { left: -10px; background-position: left bottom; }
.story-screen[data-mission="n01"] .story-screen__portrait,
.story-screen[data-mission="n02"] .story-screen__portrait,
.story-screen[data-mission="n03"] .story-screen__portrait,
.story-screen[data-mission="n04"] .story-screen__portrait,
.story-screen[data-mission="n05"] .story-screen__portrait { background-size: 175% auto; }
.story-screen[data-kind="narration"] .story-screen__portrait { display: none; }
.story-screen__dialogue {
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 46px);
  min-height: 147px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 15px 17px 10px;
  border: 1px solid #b89c6b;
  border-top: 2px solid #dfba79;
  border-radius: 2px;
  background: linear-gradient(150deg, #1b2420f5, #080d0bf7 90%);
  box-shadow: 0 16px 36px #000d, inset 0 1px #fbe2a125;
  color: #f7ecda;
  text-align: left;
  cursor: pointer;
}
.story-screen__dialogue::before, .story-screen__dialogue::after { position: absolute; width: 8px; height: 8px; content: ""; }
.story-screen__dialogue::before { left: 4px; top: 4px; border-left: 1px solid #e2c18b; border-top: 1px solid #e2c18b; }
.story-screen__dialogue::after { right: 4px; bottom: 4px; border-right: 1px solid #e2c18b; border-bottom: 1px solid #e2c18b; }
.story-screen__speaker { min-height: 19px; color: #e6be7e; font-size: 12px; font-weight: 900; }
.story-screen__text { min-height: 54px; margin-top: 5px; font-family: "AppleMyungjo", "Noto Serif KR", serif; font-size: clamp(17px, 4.9vw, 20px); font-weight: 700; line-height: 1.46; letter-spacing: -.045em; word-break: keep-all; }
.story-screen__footer { display: flex; justify-content: space-between; margin-top: auto; padding-top: 11px; color: #bba985; font-size: 10px; font-weight: 800; }
.story-screen[data-kind="thought"] .story-screen__dialogue { border-color: #8a9e96; border-top-color: #b4c9b6; background: linear-gradient(150deg, #17251fe9, #0b1515f2); }
.story-screen[data-kind="thought"] .story-screen__speaker { color: #b9d1bf; }
.story-screen[data-kind="narration"] .story-screen__speaker { display: none; }
.story-screen[data-kind="narration"] .story-screen__text { margin-top: 8px; }
.story-screen__skip:focus-visible, .story-screen__dialogue:focus-visible { outline: 2px solid #efcf96; outline-offset: 3px; }

.game-menu {
  z-index: 9;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #000d;
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}
.game-menu__panel { width: min(100%, 290px); display: grid; gap: 8px; padding: 21px; border: 1px solid #a08b65; border-top: 2px solid #d0aa70; background: #111914; box-shadow: 0 15px 40px #000e; }
.game-menu__panel p { margin: 0 0 9px; color: #ead8b7; font-family: "AppleMyungjo", "Noto Serif KR", serif; font-size: 22px; font-weight: 800; }
.game-menu__panel button { min-height: 46px; border: 1px solid #8f825f; background: #283127; color: #f3ead7; font-size: 13px; font-weight: 850; cursor: pointer; }
.game-menu__panel button:first-of-type { border-color: #d4aa6c; background: #4b422d; }
.game-menu__panel span { min-height: 16px; color: #d2b681; font-size: 11px; text-align: center; }

.entry-menu {
  z-index: 9;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: calc(env(safe-area-inset-top, 0px) + 28px) 28px calc(env(safe-area-inset-bottom, 0px) + 49px);
  background: radial-gradient(ellipse 88% 52% at 50% 37%, #28342b 0%, #0a100d 54%, #000 92%);
}
.entry-menu::before { position: absolute; inset: 13% -20% 22%; opacity: .20; background: url("https://he-assets.vaninks.com/assets/map/korea-region-basemap.320a1f75394f.svg") center/auto 95% no-repeat; filter: grayscale(1) contrast(1.4); content: ""; pointer-events: none; }
.entry-menu::after { position: absolute; left: 0; right: 0; top: 27%; height: 1px; background: linear-gradient(90deg, transparent, #c0a06b80, transparent); content: ""; pointer-events: none; }
.entry-menu__mark { position: relative; width: 47px; height: 47px; display: grid; place-items: center; border: 1px solid #9f865f; color: #e5c38a; font-family: serif; font-size: 25px; box-shadow: inset 0 0 0 4px #0c130e; }
.entry-menu__sound { position: absolute; z-index: 1; top: calc(env(safe-area-inset-top, 0px) + 28px); right: 28px; min-height: 47px; padding: 0 12px; border: 1px solid #806e50; background: #101b14d9; color: #dbc59d; font-size: 11px; font-weight: 800; cursor: pointer; }
.entry-menu__copy { position: relative; margin-top: auto; margin-bottom: auto; }
.entry-menu__copy p { margin: 0 0 10px; color: #c7a977; font-size: 10px; font-weight: 900; letter-spacing: .19em; }
.entry-menu__copy h1 { margin: 0; color: #f5ead7; font-family: "AppleMyungjo", "Noto Serif KR", serif; font-size: clamp(40px, 11vw, 54px); line-height: 1.16; letter-spacing: -.1em; text-shadow: 0 4px 22px #000; }
.entry-menu__copy span { display: block; margin-top: 14px; color: #c4c7b7; font-size: 12px; font-weight: 750; letter-spacing: .1em; }
.entry-menu__actions { position: relative; display: grid; gap: 10px; }
.entry-menu__actions > button { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 17px; border: 1px solid #ba9666; border-bottom: 2px solid #dfb87a; background: linear-gradient(110deg, #4b422d, #1b261d); box-shadow: 0 6px 14px #0008; color: #fff1d8; font-size: 18px; font-weight: 900; letter-spacing: -.05em; text-align: left; cursor: pointer; }
.entry-menu__actions > button + button { border-color: #74806c; border-bottom-color: #a7b39a; background: linear-gradient(110deg, #243128, #111b16); }
.entry-menu__actions > button span { color: #c8b996; font-size: 10px; font-weight: 700; letter-spacing: 0; }
.entry-menu__actions > button:disabled { opacity: .5; cursor: default; }
.entry-menu__confirm { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 11px; border: 1px solid #a68c60; background: #121914; }
.entry-menu__confirm p { grid-column: 1 / -1; margin: 0 0 3px; color: #e4d9c5; font-size: 12px; }
.entry-menu__confirm button { min-height: 39px; border: 1px solid #987b57; background: #3e3928; color: #f1e4ce; font-size: 12px; font-weight: 800; }
.entry-menu__confirm button:last-child { background: #1c2820; }
.entry-menu button:focus-visible, .game-menu button:focus-visible { outline: 2px solid #edd097; outline-offset: 2px; }

.loading, .rotate-prompt { position: absolute; z-index: 10; inset: 0; display: grid; place-items: center; background: #000; color: var(--chalk); font-size: 14px; }
.loading[hidden] { display: none; }
.rotate-prompt { display: none; align-content: center; text-align: center; gap: 12px; }
.rotate-prompt p { margin: 0; }
.rotate-icon { font-size: 45px; color: var(--bronze); transform: rotate(90deg); }
@media (max-width: 600px) { #game-shell { width: 100vw; max-height: none; } }
@media (max-width: 420px) {
  .site-pin--west .site-pin__callout { right: 23px; width: 118px; }
  .site-pin--west::before { left: -23px; width: 23px; }
}
@media (max-width: 360px) {
  .site-pin--west .site-pin__callout { right: 15px; width: 96px; }
  .site-pin--west::before { left: -15px; width: 15px; }
  .site-pin__callout strong { font-size: 10px; }
}
@media (max-width: 360px) { #hud { padding-right: 8px; gap: 4px; } .hud-goal__verb { display: none; } }
@media (orientation: landscape) and (pointer: coarse) { .rotate-prompt { display: grid; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; } }
