:root {
  --bg: #faf7f4;
  --paper: #fffefb;
  --ink: #2a2520;
  --muted: #6b645c;
  --accent: #c45c6a;
  --accent-dim: #e8b4bc;
  --line: #e5ddd4;
  --radius: 12px;
  --font: "Source Serif 4", "Georgia", serif;
  --sans: "DM Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  background-image: radial-gradient(
    ellipse 120% 80% at 50% -20%,
    #fdeef0 0%,
    transparent 55%
  );
}

h1,
h2 {
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

h1 {
  font-size: 1.85rem;
}

h2 {
  font-size: 1.15rem;
  margin-top: 1.75rem;
}

p {
  margin: 0 0 1rem;
  color: var(--muted);
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: 0 12px 40px rgba(42, 37, 32, 0.06);
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="url"],
input[type="date"],
input[type="password"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}

.guest-form .phone-row {
  display: grid;
  grid-template-columns: minmax(0, 160px) 1fr;
  gap: 0.75rem;
  align-items: end;
}

@media (max-width: 520px) {
  .guest-form .phone-row {
    grid-template-columns: 1fr;
  }
}

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

textarea.code {
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
}

.row {
  margin-bottom: 1rem;
}

.row.inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.row.inline label {
  margin: 0;
}

button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  border: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  background: var(--ink);
  color: #fff;
  transition: transform 0.12s ease, opacity 0.12s;
}

button:hover,
.btn:hover {
  opacity: 0.92;
}

button:active,
.btn:active {
  transform: scale(0.98);
}

button.secondary {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
}

button.danger {
  background: #a33;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: #f0ebe4;
  color: var(--muted);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

th,
td {
  text-align: left;
  padding: 0.5rem 0.35rem;
  border-bottom: 1px solid var(--line);
}

th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.err {
  color: #a33;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.ok {
  color: #2a6;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.guest-names {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.counter-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.counter-row button.round {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
}

#lock-screen {
  max-width: 420px;
}

@media (min-width: 540px) {
  .wrap.wide {
    max-width: 900px;
  }
}
