:root {
  --brand: #e11d48;
  --text: #1b1b1b;
  --muted: #5f646b;
  --line: #e7e5e4;
  --bg: #ffffff;
  --soft: #fafaf9;
  --error: #b42318;
  --ok: #1f6b3d;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: transparent;
}

.card {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 16px 24px;
  background: var(--bg);
  border-radius: 16px;
}

.progress {
  height: 6px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 20px;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: var(--brand);
  transition: width 0.25s ease;
}

h1 {
  font-size: 22px;
  line-height: 1.25;
  margin: 0 0 4px;
}

.hint {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 16px;
}

.label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 16px 0 6px;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.tiles.compact {
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
}

.tiles.compact .tile {
  justify-content: center;
}

.tile {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
}

.tile[aria-pressed="true"] {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 8%, white);
  font-weight: 600;
}

.tile .emoji {
  font-size: 20px;
}

.tile small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="search"],
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
}

textarea {
  min-height: 84px;
  resize: vertical;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 45%, white);
  outline-offset: 2px;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.counter {
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.suggestions {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.suggestions:empty {
  display: none;
}

.suggestions button {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.suggestions li:last-child button {
  border-bottom: 0;
}

.suggestions button:hover,
.suggestions button:focus-visible {
  background: var(--soft);
}

.suggestions small {
  color: var(--muted);
}

.note {
  font-size: 13px;
  color: var(--muted);
  margin: 6px 0 0;
}

.note.ok {
  color: var(--ok);
}

.link {
  border: 0;
  background: none;
  padding: 0;
  margin-top: 10px;
  color: var(--brand);
  font: inherit;
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
}

.consent {
  font-size: 12px;
  color: var(--muted);
  margin-top: 16px;
}

.error {
  min-height: 1.2em;
  color: var(--error);
  font-size: 14px;
  margin: 12px 0 0;
}

.nav {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
}

.btn {
  min-height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary {
  margin-left: auto;
  border: 0;
  background: var(--brand);
  color: #fff;
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: wait;
}

.btn-ghost {
  border: 1.5px solid var(--line);
  background: var(--bg);
  color: var(--text);
}

.success {
  text-align: center;
  padding: 24px 0 8px;
}

.success .check {
  font-size: 44px;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

[hidden] {
  display: none !important;
}
