:root {
  color-scheme: dark;
  --bg: #0c1114;
  --card: #151c22;
  --line: #2c3944;
  --text: #f3efe4;
  --muted: #93a1ab;
  --yellow: #f5c400;
  --ink: #1a1503;
  --warn: #ff8a4c;
  --font: "Source Sans 3", "Segoe UI", sans-serif;
  --sign: "Oswald", "Arial Narrow", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(880px 380px at 8% -8%, rgba(245, 196, 0, 0.18), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
}

button, input, select { font: inherit; color: inherit; }

a { color: var(--yellow); }

.shell {
  width: min(32rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.4rem 0 2.5rem;
}

.top { display: flex; align-items: center; gap: 0.75rem; }
.grow { min-width: 0; flex: 1; }
h1 { margin: 0; font-family: var(--sign); font-size: 2.1rem; font-weight: 500; letter-spacing: 0.03em; line-height: 1; }
h2 { margin: 1.4rem 0 0.5rem; color: var(--muted); font-size: 0.92rem; font-weight: 600; }
.top p, .lead, .meta, .foot { color: var(--muted); }
.top p { margin: 0.2rem 0 0; }
.lead { margin: 1.3rem 0 0.8rem; }

.mark, .code {
  display: grid;
  place-items: center;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 0.9rem;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--sign);
  font-size: 1.35rem;
  flex: none;
}

.lang { display: grid; gap: 0.15rem; color: var(--muted); font-size: 0.75rem; }
.lang select, .form select, .field {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: #10161b;
  padding: 0.75rem 0.8rem;
}

.field { margin-top: 0.55rem; }
.button, .text-button, .filters button, .zoom button, .here button {
  border: 0;
  border-radius: 0.85rem;
  background: var(--yellow);
  color: var(--ink);
  padding: 0.8rem 1rem;
  cursor: pointer;
}
.button { display: block; width: 100%; margin-top: 0.55rem; font-weight: 700; }
.button.secondary, .filters button, .here button, .zoom button { background: #24303a; color: var(--text); }
.button:disabled { opacity: 0.6; }
.text-button { background: transparent; color: var(--yellow); padding-left: 0; }

.list { display: grid; gap: 0.5rem; }
.row, .near, .ad, .flights button, .places li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--card);
  color: inherit;
  text-decoration: none;
}
.row, .ad, .flights button, .places li { padding: 0.75rem; }
.row .code { width: 3.4rem; height: auto; background: transparent; color: var(--yellow); font-size: 1.45rem; }
.name, .ad strong, .flights strong, .places strong, .here strong { display: block; }
.meta, .row .meta, .ad em, .ad small, .flights em, .places em, .here span { display: block; color: var(--muted); font-style: normal; font-size: 0.86rem; }

.near { margin-top: 0.8rem; padding: 0.9rem 1rem; background: var(--yellow); color: var(--ink); flex-direction: column; align-items: flex-start; }
.near span { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; }
.near strong { font-family: var(--sign); font-size: 2rem; font-weight: 500; }
.near em { color: var(--ink); font-style: normal; }
.warn { color: var(--warn); }
.foot { margin-top: 1.6rem; }

.back { color: var(--text); font-size: 1.4rem; text-decoration: none; }
.tabs, .filters { display: flex; gap: 0.4rem; margin: 0.9rem 0; }
.tabs button, .filters button { flex: 1; background: #1b242c; color: var(--muted); }
.tabs button.on, .filters button.on { background: #31404c; color: var(--text); }

.map-wrap { position: relative; height: 320px; overflow: hidden; border-radius: 1rem; border: 1px solid var(--line); background: #0a1014; }
#gate-map { width: 100%; height: 100%; background: #0a1014; touch-action: manipulation; }
#gate-map.placing { cursor: crosshair; }
.hint, .walk { position: absolute; top: 0.7rem; left: 0.7rem; max-width: 14rem; margin: 0; border-radius: 0.75rem; padding: 0.45rem 0.65rem; }
.hint { background: rgba(0, 0, 0, 0.7); }
.walk { background: var(--yellow); color: var(--ink); font-weight: 700; }
.zoom { position: absolute; top: 0.7rem; right: 0.7rem; display: grid; gap: 0.4rem; }
.zoom button { width: 2.6rem; height: 2.6rem; padding: 0; }
.here { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; }
.ads { display: flex; gap: 0.6rem; overflow-x: auto; padding-bottom: 0.3rem; margin-top: 1rem; }
.ads.column { display: grid; overflow: visible; }
.ad { min-width: 15rem; align-items: flex-start; }
.logo, .badge { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 0.7rem; background: #24303a; flex: none; overflow: hidden; }
.logo img, .file img { width: 100%; height: 100%; object-fit: cover; }
.note-block { color: var(--muted); }
.warnings { color: var(--warn); }
.board .field { margin-top: 0; }
.check { display: flex; gap: 0.45rem; align-items: center; margin: 0.6rem 0; }
.flights, .places { list-style: none; padding: 0; margin: 0.6rem 0 0; display: grid; gap: 0.45rem; }
.flights button { width: 100%; text-align: left; cursor: pointer; }
.flights button.on { border-color: var(--yellow); }
.flights button span { min-width: 0; flex: 1; }
.badge.restaurant { background: #ff8a4c; color: #102018; }
.badge.shop { background: #7eb6ff; color: #102018; }
.badge.toilet { background: #5dcaa5; color: #102018; }
.badge.smoking { background: #e7e2d6; color: #102018; }
.form { display: grid; gap: 0.7rem; margin-top: 0.8rem; }
.form label { display: grid; gap: 0.3rem; color: var(--muted); }
.file { display: flex; align-items: center; gap: 0.6rem; }
.file img { width: 3rem; height: 3rem; border-radius: 0.6rem; }
