:root {
  --red: #b3202e;
  --green: #14532d;
  --cream: #fdf8ee;
  --ink: #1f2421;
  --muted: #5f6b63;
  --line: #e4dccb;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 64px 16px 32px;
  background: radial-gradient(circle at 50% 0, #1f6b3d, var(--green) 60%, #0c331c);
  color: var(--ink);
  font: 17px/1.5 system-ui, sans-serif;
}

h1 { margin: 0 0 12px; font-size: 1.7rem; line-height: 1.2; }
h2 { margin: 0 0 12px; font-size: 1.2rem; }

.card {
  background: var(--cream);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 12px 32px rgb(0 0 0 / 25%);
}

#language { position: absolute; top: 14px; right: 16px; }

input, select, button { font: inherit; }

input, select {
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

button {
  min-height: 44px;
  padding: 8px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
button:disabled { opacity: 0.45; cursor: default; }
button.small { min-height: 32px; padding: 2px 12px; font-size: 0.85rem; }
button.danger { background: #fff; color: var(--red); border: 1px solid var(--red); }

.hint { color: var(--muted); font-size: 0.9rem; }

/* Participant page */
.personal main { max-width: 440px; margin: 6vh auto 0; text-align: center; }
.gift { font-size: 4rem; line-height: 1.2; }
.greeting { margin: 0; font-size: 1.25rem; font-weight: 600; }
.personal #action { margin-top: 8px; width: 100%; min-height: 52px; }
.result {
  margin: 16px 0;
  padding: 8px 16px;
  border: 2px dashed var(--red);
  border-radius: 12px;
}
.receiver { margin: 4px 0; color: var(--red); font-size: 2.2rem; font-weight: 700; overflow-wrap: anywhere; }

/* Organiser page */
.admin main { max-width: 860px; margin: 0 auto; }
.admin h1, .admin .status { color: #fff; }
.admin section { margin-top: 16px; }
.status { font-weight: 600; }
.admin .status.bad { color: #ffd7a8; }
.error, .notice { padding: 10px 14px; border-radius: 8px; background: #fff3cd; }
.error { background: #fde2e1; color: #7f1d1d; }

.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
th, td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; }
td code { margin-right: 8px; font-size: 0.85rem; white-space: nowrap; user-select: all; }
td small { display: block; color: var(--muted); white-space: nowrap; }

.badge { display: inline-block; padding: 0 10px; border-radius: 999px; background: var(--line); font-size: 0.85rem; }
.badge.ok { background: #cdeed6; color: var(--green); }
.badge.bad { background: var(--red); color: #fff; }

.row { display: flex; flex-wrap: wrap; gap: 8px; }
.row > input, .row > label { flex: 1 1 200px; }
.row label span { display: block; font-size: 0.9rem; }
.row label select { width: 100%; }
.toggle { display: flex; gap: 8px; align-items: center; margin: 10px 0; }
.toggle input { min-height: 0; width: 18px; height: 18px; }

ul { margin: 0 0 16px; padding: 0; list-style: none; }
li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
