:root {
  --accent: #1d5c86;
  --ink: #17202a;
  --muted: #5d6b78;
  --line: #dfe5ea;
  --bg: #f3f5f7;
  --card: #ffffff;
  --radius: 14px;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  display: flex;
  justify-content: center;
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom));
}
.card {
  width: 100%;
  max-width: 460px;
  background: var(--card);
  border-radius: 20px;
  padding: 22px 20px 18px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 28px rgba(16, 24, 40, .08);
  align-self: flex-start;
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 20px;
}
.brand-name { font-weight: 700; font-size: 17px; }
.brand-city { color: var(--muted); font-size: 13px; }

.steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 18px; }
.steps li { flex: 1; height: 4px; border-radius: 4px; background: var(--line); transition: background .3s; }
.steps li.on { background: var(--accent); }

h1 { font-size: 22px; line-height: 1.25; margin: 0 0 8px; letter-spacing: -.01em; }
h2 { font-size: 18px; margin: 18px 0 8px; }
.step > h2:first-child { margin-top: 0; }
.lead { color: var(--muted); margin: 0 0 6px; }
.hint { color: var(--muted); font-size: 14px; margin: 4px 0 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 18px; }
.chip {
  appearance: none; border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 999px; padding: 9px 14px; font: inherit; font-size: 15px; cursor: pointer;
  min-height: 42px; transition: border-color .15s, background .15s, color .15s;
}
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: #fff; }
.chip:focus-visible, .btn:focus-visible, textarea:focus-visible, .link:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 2px;
}

.field { display: block; margin: 6px 0 0; }
.field span { display: block; font-weight: 600; margin-bottom: 6px; }
.field em { font-weight: 400; color: var(--muted); font-style: normal; }
textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px;
  font: inherit; color: var(--ink); resize: vertical; background: #fff;
}
textarea:focus { border-color: var(--accent); }
#draft { min-height: 170px; margin: 4px 0 14px; }

.btn {
  display: block; width: 100%; text-align: center; text-decoration: none;
  border: 0; border-radius: 12px; padding: 14px 16px; font: inherit; font-weight: 650; font-size: 16px;
  cursor: pointer; margin-top: 8px; min-height: 50px;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:disabled { opacity: .4; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--line); }
.link { display: block; text-align: center; color: var(--muted); font-size: 14px; margin-top: 14px; }

.howto {
  margin-top: 16px; padding: 12px 14px; border-radius: 12px; font-size: 14px;
  background: color-mix(in srgb, var(--accent) 7%, #fff); color: var(--ink);
}

.loading { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; margin: 6px 0 10px; }
.loading span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: b 1s infinite ease-in-out; }
.loading span:nth-child(2) { animation-delay: .15s; }
.loading span:nth-child(3) { animation-delay: .3s; margin-right: 6px; }
@keyframes b { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }

.foot { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); text-align: center; display: grid; gap: 6px; }
.foot a { color: var(--muted); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  background: #17202a; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100% - 32px);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.foot .powered { font-size: 11.5px; opacity: .8; }
.foot .powered strong { color: var(--ink); font-weight: 650; }
