:root {
  color-scheme: light;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #172924;
  background: #f5f8f6;
  font-synthesis: none;
  --accent: #155f49;
  --line: #d7e2db;
  --muted: #4c6258;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { max-width: 38rem; margin: 0 auto; padding: clamp(2rem, 9vw, 5rem) 1.25rem 3rem; }
.brand { display: inline-flex; gap: .45rem; align-items: baseline; color: #173f33; font-size: 1.05rem; font-weight: 750; text-decoration: none; }
.brand span { color: var(--accent); font-weight: 550; }
h1 { margin: 1.5rem 0 .55rem; font-size: clamp(2rem, 6vw, 2.9rem); line-height: 1.1; letter-spacing: -.045em; }
h2 { margin: 0 0 .4rem; font-size: 1.45rem; }
.intro, .hint { color: var(--muted); line-height: 1.5; }
.intro { margin: 0 0 1.65rem; }
.card { padding: clamp(1.15rem, 4vw, 1.7rem); border: 1px solid var(--line); border-radius: 1rem; background: #fff; box-shadow: 0 .5rem 2rem #16332c0a; }
label { display: block; margin-bottom: .4rem; font-weight: 700; }
.hint { margin: 0 0 .8rem; font-size: .9rem; }
.code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .55rem; }
input, button { font: inherit; border-radius: .55rem; min-height: 2.85rem; }
input { width: 100%; padding: .64rem .74rem; border: 1px solid #aebfb5; background: #fff; color: inherit; }
input[type=file] { padding: .45rem; }
input::file-selector-button { margin-right: .6rem; padding: .4rem .55rem; border: 0; border-radius: .3rem; background: #eaf3ee; color: #173f33; font: inherit; font-weight: 650; cursor: pointer; }
#code { text-transform: uppercase; letter-spacing: .08em; }
button { border: 0; background: var(--accent); color: #fff; padding: .65rem 1rem; cursor: pointer; font-weight: 700; }
button:disabled { background: #e6ece8; color: #596a61; cursor: default; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid #268876; outline-offset: 3px; }
.connected { display: flex; align-items: center; gap: .5rem; margin: 0 0 1rem; color: var(--accent); font-weight: 650; }
.connected span { width: .55rem; height: .55rem; border-radius: 50%; background: #218057; }
.send { width: 100%; margin-top: 1rem; }
.preview { margin-top: .9rem; }
#route-map, #route { display: block; width: 100%; border-radius: .65rem; margin-bottom: .88rem; background: #edf5f2; }
#route-map { height: clamp(13rem, 43vw, 18rem); overflow: hidden; }
#route { height: auto; }
#distance { margin: .6rem 0 0; }
#status { color: #8d3027; margin: .8rem 0 0; line-height: 1.5; }
#status:empty { display: none; }
#success p { color: var(--muted); line-height: 1.5; margin: 0; }
.help { margin: 1rem .1rem 0; font-size: .9rem; }
.help a { color: var(--accent); text-underline-offset: .15em; }
