/* 계기판. 애니메이션 없음 — 아톰에서 계속 그리지 않는다. */
:root {
  --bg: #070809;
  --fg: #f4f6f8;
  --dim: #8e979f;
  --line: #2a3036;
  --chip: #14181c;
  --warn: #ffb020;
  --pad: 36px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  background: radial-gradient(1200px 720px at 18% 0%, #161b20 0%, var(--bg) 58%);
  color: var(--fg);
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
input { user-select: text; }

.banner {
  margin: 0;
  padding: 14px 28px;
  background: #2a2112;
  color: var(--warn);
  font-size: 28px;
  font-weight: 650;
  text-align: center;
  letter-spacing: -0.02em;
}
.banner.bad { background: #2c1614; color: #ffb4a8; }

#stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 22px var(--pad) 8px;
}

.maneuver {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 28px;
}

.arrow {
  width: 268px;
  height: 268px;
  flex: none;
  color: #f7f8f6;
  filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.16));
}
.arrow path, .next-arrow path {
  fill: none;
  stroke: currentColor;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.primary { min-width: 0; }
.dist {
  margin: 0;
  font-size: 168px;
  line-height: 0.86;
  font-weight: 640;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}
.dist .unit, .next-dist .unit {
  font-size: 0.38em;
  margin-left: 0.12em;
  color: var(--dim);
  font-weight: 560;
  letter-spacing: -0.03em;
  vertical-align: 0.42em;
}

#instr {
  margin: 10px 0 0;
  font-size: 44px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.road {
  margin: 8px 0 0;
  color: var(--dim);
  font-size: 26px;
}

.next {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0 0;
  padding: 12px 18px;
  background: var(--chip);
  border: 1px solid var(--line);
  border-radius: 16px;
  font-size: 30px;
  font-weight: 560;
  letter-spacing: -0.02em;
}
.next .k {
  color: var(--dim);
  font-size: 18px;
  letter-spacing: 0.08em;
}
.next-arrow { width: 46px; height: 46px; flex: none; color: #d5dbe1; }
.next-dist { font-variant-numeric: tabular-nums; font-weight: 640; }
#next-text {
  color: #d5dbe1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 18px 28px;
  align-items: end;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.k {
  display: block;
  color: var(--dim);
  font-size: 15px;
  letter-spacing: 0.12em;
  margin-bottom: 4px;
}
.stats strong {
  font-size: 48px;
  font-weight: 620;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.speed {
  padding-left: 28px;
  border-left: 1px solid var(--line);
  min-width: 200px;
}
.speed strong { font-size: 84px; line-height: 0.9; }
.speed .unit {
  display: inline-block;
  margin-left: 8px;
  color: var(--dim);
  font-size: 20px;
  letter-spacing: 0.04em;
  vertical-align: 0.6em;
}

.ribbon, .map {
  height: 220px;
  margin-top: 14px;
  border-radius: 18px;
  overflow: hidden;
  background: #0c1014;
  border: 1px solid #1c2228;
}
.ribbon canvas, .map img { width: 100%; height: 100%; display: block; object-fit: cover; }

.panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 48px var(--pad);
}
.panel h1 {
  margin: 0 0 12px;
  font-size: 72px;
  font-weight: 620;
  letter-spacing: -0.045em;
}
.hint { margin: 0 0 8px; color: var(--dim); font-size: 24px; line-height: 1.4; }
.find-msg { margin: 14px 0 0; color: #ffb4a8; font-size: 22px; }

#find { display: flex; gap: 12px; margin-top: 18px; }
#q {
  flex: 1;
  height: 76px;
  padding: 0 20px;
  font-size: 28px;
  background: var(--chip);
  border: 1px solid var(--line);
  border-radius: 16px;
}
#q:focus { outline: 2px solid #f4f6f8; outline-offset: 2px; }
#find button, #start, #geo-retry {
  height: 76px;
  padding: 0 28px;
  border: 0;
  border-radius: 16px;
  background: #f4f6f8;
  color: #121416;
  font-size: 28px;
  font-weight: 680;
}
#start, #geo-retry { margin-top: 22px; align-self: flex-start; min-width: 220px; }

.result, .preset {
  min-height: 72px;
  margin-top: 10px;
  padding: 12px 16px;
  background: var(--chip);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-align: left;
}
.result { display: flex; flex-direction: column; align-items: flex-start; width: 100%; }
.result small, .preset small { color: var(--dim); font-size: 18px; margin-top: 2px; }
#presets { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.preset { margin-top: 0; font-size: 26px; font-weight: 600; padding: 0 22px; }

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px var(--pad) 18px;
}
#dest {
  margin: 0;
  min-width: 0;
  color: var(--dim);
  font-size: 22px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tools { display: flex; gap: 10px; flex: none; }
.tools button {
  height: 56px;
  padding: 0 18px;
  border-radius: 14px;
  background: transparent;
  border: 1px solid var(--line);
  color: #c5ccd2;
  font-size: 20px;
}
.tools button[aria-pressed="true"] {
  background: #f4f6f8;
  color: #121416;
  border-color: #f4f6f8;
}

@media (max-width: 1100px) {
  :root { --pad: 20px; }
  .maneuver { flex: 0 0 auto; align-items: center; gap: 8px; padding-top: 12px; }
  .arrow { width: 168px; height: 168px; }
  .dist { font-size: 104px; }
  #instr { font-size: 32px; }
  .road { font-size: 20px; }
  .next { font-size: 22px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats strong { font-size: 36px; }
  .speed {
    grid-column: 1 / -1;
    border-left: 0;
    padding-left: 0;
    padding-top: 8px;
    border-top: 1px solid var(--line);
    min-width: 0;
  }
  .speed strong { font-size: 64px; }
  .panel h1 { font-size: 52px; }
  .ribbon, .map { flex: 1 1 180px; height: auto; min-height: 180px; }
}

@media (max-height: 760px) and (min-width: 1101px) {
  .arrow { width: 180px; height: 180px; }
  .dist { font-size: 112px; }
  #instr { font-size: 34px; }
  .stats strong { font-size: 36px; }
  .speed strong { font-size: 60px; }
  .ribbon, .map { height: 140px; }
}
