:root {
  --ink: #14110c;
  --paper: #fff6e4;
  --yellow: #ffe500;
  --yellow-deep: #d4a50a;
  --muted: #6e6454;
  --card: #1c1914;
  --line: #3a342a;
  --ok: #2ea86a;
  --bad: #e04545;
  --blue: #3d7ea6;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  --radius: 18px;
  --max: 1120px;
  --head: 7.5rem;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--head);
}
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--ink);
  color: var(--paper);
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--yellow); text-decoration: none; }
a:hover { text-decoration: underline; }

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  background: #0c0c0c;
  color: #fff;
}
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px 0 0;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  padding: 10px 20px 10px 18px;
  font-family: "Segoe UI Black", "Arial Black", Impact, "Segoe UI", sans-serif;
  font-weight: 900;
  font-style: italic;
  font-size: 1.85rem;
  letter-spacing: -0.06em;
  line-height: 1;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  transform: skewX(-6deg);
}
.brand span { color: var(--yellow); }
.brand:hover { text-decoration: none; }
.top-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 4px;
}
.ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--yellow);
  border: 1px solid #3a3a3a;
  border-radius: 4px;
}
.ico:hover { text-decoration: none; background: #1a1a1a; }
.acct {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  min-width: 0;
}
.who {
  color: #eee;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0;
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.15;
  text-align: right;
}
.btn.btn-enter.btn-out,
#nav-out {
  padding: 2px 10px;
  font-size: 0.62rem;
  line-height: 1;
  min-height: 0;
  height: auto;
}
.btn-reg, .btn-enter {
  border-radius: 4px;
  padding: 7px 12px;
  text-transform: uppercase;
  font-style: italic;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  line-height: 1.1;
}
.btn-reg {
  background: transparent;
  color: var(--yellow);
  border: 1px solid var(--yellow);
}
.btn-reg:hover { background: rgba(245, 197, 24, 0.12); text-decoration: none; }
.btn-enter {
  background: var(--yellow);
  color: #111;
  border: 1px solid var(--yellow);
}
.btn-enter:hover { filter: brightness(1.08); text-decoration: none; }
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  align-items: center;
  justify-content: flex-start;
  background: var(--yellow);
  padding: 4px 16px;
}
.nav a, .nav button.linkish {
  color: var(--ink);
  font-weight: 750;
  background: none;
  border: 0;
  padding: 10px 8px;
  font: inherit;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}
.nav a:hover, .nav button.linkish:hover { text-decoration: none; opacity: 0.75; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 20px 18px 72px; }
.btn-call {
  margin: 0 0 18px;
  padding: 14px 22px;
  font-size: 1.02rem;
}
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: center;
  margin-bottom: 40px;
}
.hero h1 {
  font-family: Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.05;
  margin: 0 0 12px;
  letter-spacing: -0.04em;
}
.lead { font-size: 1.15rem; color: #f3e6c4; margin: 0 0 18px; }
.hero-card {
  background: var(--yellow);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.hero-card h2 { margin: 0 0 8px; font-size: 1.2rem; }
.hero-card p { margin: 0 0 14px; }

.btn, button.btn, input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 4px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
}
.btn-main { background: var(--yellow); color: #111; }
.btn-main:hover { filter: brightness(1.08); text-decoration: none; }
.btn-ghost {
  background: transparent;
  color: var(--yellow);
  border: 2px solid var(--yellow);
}
.btn-ghost:hover { background: rgba(245, 197, 24, 0.12); text-decoration: none; }
.btn-wide { width: 100%; }
.btn-bad { background: #e04545; color: #fff; }
.btn-bad:hover { filter: brightness(1.08); text-decoration: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-stack {
  flex-direction: column;
  gap: 4px;
  min-width: 240px;
}
.app-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.play-badge {
  display: inline-block;
  line-height: 0;
  width: 220px;
  max-width: 100%;
}
.play-badge img {
  display: block;
  width: 100%;
  height: auto;
}
.play-badge:hover { text-decoration: none; opacity: 0.92; }
.btn-apk {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 10px 18px;
  background: #111;
  color: #fff;
  border: 2px solid #9c9c9b;
  border-radius: 8px;
  text-transform: none;
  letter-spacing: 0.02em;
}
.btn-apk:hover { text-decoration: none; filter: brightness(1.08); }
.btn-ok { background: var(--ok); color: #fff; text-transform: none; letter-spacing: 0; }
.btn-bad { background: var(--bad); color: #fff; }
.btn-blue { background: var(--blue); color: #fff; text-transform: none; letter-spacing: 0; }
.btn-sm { padding: 8px 10px; font-size: 0.92rem; }
.hero-card .btn-main { background: #111; color: var(--yellow); width: 100%; }
.btn.btn-reg, .btn.btn-enter {
  border-radius: 4px;
  padding: 7px 12px;
  text-transform: uppercase;
  font-style: italic;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.grid-3, .grid-2 {
  display: grid;
  gap: 16px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: 1fr 1fr; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.card h3 { margin: 0 0 8px; }
.muted { color: var(--muted); }
h2.sec, h1.sec, :target {
  scroll-margin-top: var(--head);
}
h2.sec {
  font-family: Georgia, serif;
  font-size: 1.7rem;
  margin: 42px 0 14px;
  color: var(--yellow);
}

.table-like { width: 100%; border-collapse: collapse; }
.table-like td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.table-like td:first-child { font-weight: 700; width: 42%; }

footer.site {
  border-top: 1px solid var(--line);
  margin-top: 48px;
  padding-top: 18px;
  color: #b8ad90;
  font-size: 0.95rem;
}

label { display: block; font-size: 0.86rem; color: #d7c9a6; margin: 10px 0 4px; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #111;
  color: var(--paper);
  border-radius: 10px;
  padding: 11px 12px;
  font: inherit;
}
textarea { min-height: 70px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.order-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 12px 0 4px;
}
.order-actions .btn { width: 100%; }
.prefs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.err { color: #ff8a80; min-height: 1.2em; margin: 8px 0; }
.err:empty { display: none; min-height: 0; margin: 0; }
#form-route > label:first-of-type { margin-top: 0; }
.ok { color: #8ee0b0; }
.tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.tabs button {
  flex: 1;
  background: #111;
  color: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  font-weight: 700;
  cursor: pointer;
}
.tabs button.on { background: var(--yellow); color: var(--ink); }
.hide { display: none !important; }
#map {
  height: min(52vh, 460px);
  min-height: 240px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  margin: 14px 0 10px;
}
.order-head {
  display: block;
  margin: -16px 0 6px;
}
.order-head h1.sec {
  margin: 0;
}
#free-cars {
  margin: 10px 0 -6px;
  color: #e6d7b4;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  text-align: right;
  line-height: 1.15;
}
.status-pill {
  display: inline-block;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 800;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.85rem;
}
.chat-line { margin: 6px 0; font-size: 0.95rem; }
.chat-me { color: #8ec8ff; }
.chat-them { color: #8ee0b0; }
.suggest {
  background: #111;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-top: 4px;
  max-height: 160px;
  overflow: auto;
}
.suggest button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: var(--paper);
  padding: 8px 10px;
  font: inherit;
  cursor: pointer;
}
.suggest button:hover { background: #2a241c; }
.notice {
  background: #3a1f1f;
  color: #ffd0d0;
  border-radius: 10px;
  padding: 8px 10px;
  margin: 8px 0;
  font-size: 0.92rem;
}
#map, .leaflet-container { z-index: 1; }
.leaflet-control-attribution,
.leaflet-bottom.leaflet-right,
.leaflet-attribution-flag {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
}
.map-hint { font-size: 0.88rem; }
.legal { max-width: 46rem; }
.legal ul, .legal ol { padding-left: 1.2em; }
.legal li { margin: 0.35em 0; }
.legal h2 {
  font-family: Georgia, serif;
  color: var(--yellow);
  font-size: 1.35rem;
  margin: 1.8em 0 0.5em;
}
.legal h3 {
  font-size: 1.05rem;
  margin: 1.1em 0 0.35em;
  color: var(--paper);
}
.legal code {
  font-size: 0.92em;
  word-break: break-all;
}
.lang-switch {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.policy-split {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.4rem 0;
}
.hist {
  margin: 8px 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.hist-item {
  display: block;
  width: 100%;
  text-align: left;
  background: #111;
  color: var(--paper);
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  font: inherit;
  cursor: pointer;
}
.hist-item:last-child { border-bottom: 0; }
.hist-item:hover { background: #2a241c; }
.hist-item small { color: var(--muted); display: block; }

/* Chat messenger styles live in css/chat.css + inline in chat.html */
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.admin-table th, .admin-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.admin-table th { color: var(--muted); font-weight: 600; }
.admin-table .btn-sm { padding: 5px 9px; font-size: 0.72rem; }
.admin-addr { max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-live { color: var(--yellow); font-weight: 800; }
.admin-live-row { background: rgba(245, 197, 24, 0.06); }
.nick-cell { font-weight: 800; }
main.wrap.admin-wide {
  max-width: none;
  width: 100%;
  padding: 12px 10px 48px;
}
#user-table { width: max-content; min-width: 100%; }
.admin-tight { font-size: 13px; }
.admin-tight th, .admin-tight td { padding: 0.35em 0.5em; white-space: nowrap; }
.admin-tight .on { color: var(--yellow); font-weight: 700; }
.user-size-row { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.user-size-row .btn { min-width: 36px; padding: 4px 8px; }
.user-mini { height: 2.2em; width: 2.2em; object-fit: cover; border-radius: 4px; vertical-align: middle; }
.price-now { font-size: 1.35rem; font-weight: 800; }
.price-old { text-decoration: line-through; color: var(--muted); margin-left: 8px; }
.plan-term { font-weight: 700; font-size: 0.9rem; white-space: nowrap; color: #e6d7b4; }
.plan-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 4px;
}
.plan-top h3 { margin: 0; font-size: 1.12rem; }
#plan-list {
  gap: 16px;
  margin-top: 16px;
  align-items: stretch;
}
#plan-list .card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 14px;
}
#plan-list .card p {
  margin: 4px 0;
  line-height: 1.35;
}
#plan-list .plan-prices { margin: 6px 0 8px; }
#plan-list .card .btn {
  margin-top: auto;
  width: 100%;
  white-space: nowrap;
  font-size: 0.85rem;
  padding: 10px 12px;
}
#sub-intro p { margin: 0 0 8px; line-height: 1.4; }
#sub-intro p:last-child { margin-bottom: 0; }
#sub-warn:empty { display: none; }
.admin-plan { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.admin-plan:last-child { border-bottom: 0; }
.admin-plan label { display: block; color: var(--muted); font-size: 0.82rem; margin: 8px 0 4px; }
.admin-plan input, .admin-plan textarea {
  width: 100%;
  background: #111;
  color: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
}
.admin-plan .row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 860px) {
  :root { --head: 10.5rem; }
  .hero, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .top-bar { flex-wrap: wrap; }
  .nav { width: 100%; padding: 4px 12px; }
  .field-row { grid-template-columns: 1fr; }
  #map { height: 42vh; }
  .tabs button { font-size: 0.82rem; padding: 8px 6px; }
  .btn-row { flex-direction: column; }
  .btn-row .btn { width: 100%; }
}
