:root {
  color-scheme: light;
  --ink: #203040;
  --muted: #5d7180;
  --sea: #197c93;
  --sea-dark: #12576c;
  --sun: #f6b940;
  --coral: #e96f5f;
  --foam: rgba(255, 255, 255, 0.78);
  --line: rgba(32, 48, 64, 0.14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 15%, rgba(246, 185, 64, 0.45), transparent 26rem),
    linear-gradient(165deg, #dcf8f4 0%, #fff7dd 48%, #ffd8c5 100%);
}

body::before {
  position: fixed;
  inset: auto 0 0;
  height: 38svh;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(170deg, transparent 0 43%, rgba(25, 124, 147, 0.18) 43% 55%, transparent 55%),
    linear-gradient(176deg, transparent 0 50%, rgba(233, 111, 95, 0.18) 50% 61%, transparent 61%);
}

button {
  font: inherit;
}

.shell {
  position: relative;
  display: grid;
  min-height: 100svh;
  padding: max(22px, env(safe-area-inset-top)) 16px max(22px, env(safe-area-inset-bottom));
  place-items: center;
}

.panel {
  width: min(100%, 440px);
  padding: 28px 20px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--foam);
  box-shadow: 0 22px 60px rgba(25, 87, 108, 0.18);
  backdrop-filter: blur(18px);
}

.kicker {
  margin: 0 0 8px;
  color: var(--sea-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 12vw, 3.45rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.intro {
  margin: 16px 0 22px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
}

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

.primary,
.name-button,
.ghost {
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 0;
}

.primary,
.name-button {
  padding: 10px 8px;
  color: white;
  background: linear-gradient(160deg, var(--sea), var(--sea-dark));
  box-shadow: 0 8px 18px rgba(18, 87, 108, 0.2);
}

.welcome {
  text-align: center;
}

.welcome h1 {
  margin-bottom: 28px;
  color: var(--sea-dark);
  font-size: clamp(2.1rem, 11vw, 3.35rem);
}

.primary {
  width: 100%;
  font-size: 1.02rem;
}

.name-button[data-drawn="true"] {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px var(--line);
}

.name-button:active,
.primary:active,
.ghost:active {
  transform: translateY(1px);
}

.name-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.fineprint {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.result {
  text-align: center;
}

.result h1 {
  margin-top: 12px;
  color: var(--coral);
  overflow-wrap: anywhere;
}

.result p:not(.kicker) {
  margin: 18px auto 26px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.45;
}

.ghost {
  width: 100%;
  color: var(--sea-dark);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 0 1px var(--line);
}

.hidden {
  display: none;
}

.error {
  grid-column: 1 / -1;
  color: #a7362a;
}

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