:root {
  --bg: #0f172a;
  --panel: #ffffff;
  --text: #111827;
  --muted: #4b5563;
  --line: #cbd5e1;
  --primary: #0f766e;
  --primary-hover: #115e59;
  --accent: #14b8a6;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  font-family: "Segoe UI", Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

.app {
  position: relative;
  height: 100dvh;
  width: 100%;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.55)),
    url("https://images.unsplash.com/photo-1560448204-e02f11c3d0e2?auto=format&fit=crop&w=1600&q=80");
  background-size: cover;
  background-position: center;
}

.screen {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 14px;
}

.hidden {
  display: none;
}

.panel {
  width: min(520px, 100%);
  max-height: calc(100dvh - 28px);
  overflow: auto;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.35);
}

h1,
h2 {
  margin: 0 0 10px;
  line-height: 1.25;
}

p {
  margin: 0 0 12px;
  color: var(--muted);
}

label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.93rem;
}

label span {
  display: block;
  margin-bottom: 5px;
}

input,
select,
button {
  width: 100%;
  font: inherit;
}

input,
select,
textarea {
  font-size: 16px;
}

input,
select {
  border: 1px solid #d4ddeb;
  border-radius: 12px;
  background: #fff;
  padding: 11px 12px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05);
}

button {
  border: 0;
  border-radius: 12px;
  padding: 12px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.14s ease, filter 0.14s ease;
}

button:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  filter: saturate(1.08);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  background: #94a3b8;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.step-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--muted);
}

.ghost {
  width: auto;
  background: transparent;
  color: #0f172a;
  border: 1px solid var(--line);
  padding: 7px 10px;
  font-weight: 600;
}

.setup-block {
  margin-bottom: 12px;
}

.trust-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.award-card,
.apt-preview {
  background: #ffffff;
  border: 1px solid #d9e2f0;
  border-radius: 12px;
  padding: 8px;
}

.trust-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.76rem;
  color: #334155;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.award-card img,
.apt-preview img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border-radius: 8px;
  display: block;
  image-rendering: auto;
}

.award-card img {
  background: #0f459a;
}

.apt-preview img {
  background: #e2e8f0;
}

.award-fallback {
  display: none;
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 6px;
}

.award-card.award-missing .award-fallback {
  display: block;
}

.block-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.93rem;
  color: #1f2937;
}

.flag-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.flag-btn {
  background: #f8fafc;
  color: #0f172a;
  border: 1px solid #d9e2f0;
  border-radius: 12px;
  padding: 8px 6px;
  min-height: 62px;
  display: grid;
  place-items: center;
  gap: 3px;
  font-size: 1.3rem;
  font-weight: 600;
}

.flag-btn small {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.flag-btn.active {
  background: linear-gradient(180deg, #ffffff, #ecfeff);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.2);
}

.flag-btn:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
}

.guests-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.guest-btn {
  background: #f8fafc;
  color: #0f172a;
  border: 1px solid #d9e2f0;
  border-radius: 14px;
  min-height: 84px;
  display: grid;
  place-items: center;
  gap: 2px;
}

.guest-btn strong {
  font-size: 1.5rem;
  line-height: 1;
}

.guest-btn small {
  font-size: 0.8rem;
  color: #475569;
}

.guest-btn.active {
  background: linear-gradient(180deg, #ffffff, #ecfeff);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.2);
}

.guest-btn:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.phone-row {
  grid-template-columns: minmax(130px, 160px) 1fr;
}

.country-code-wrap select,
.country-code-wrap input {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.row3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.info-note {
  margin: 2px 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #ecfeff;
  border: 1px solid #99f6e4;
  color: #155e75;
  font-size: 0.82rem;
}

.field-help {
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
  color: #0f766e;
  font-weight: 600;
}

.msg {
  min-height: 18px;
  margin: 2px 0 10px;
  color: #b91c1c;
  font-weight: 600;
}

@media (max-width: 420px) {
  .row2 {
    grid-template-columns: 1fr;
  }

  .row3 {
    grid-template-columns: 1fr;
  }

  .flag-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
  }

  .trust-block {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .flag-btn {
    min-height: 56px;
    font-size: 1.15rem;
  }

  .panel {
    padding: 14px;
  }
}

@media (max-width: 760px) {
  .trust-block {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}
