:root {
  color-scheme: light;
  --ink: rgb(20 20 20);
  --muted: rgb(83 92 106);
  --paper: white;
  --field: rgb(241 242 244);
  --line: rgb(210 216 224);
  --error: rgb(165 32 28);
  --space-xs: .5rem;
  --space-sm: .75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  line-height: 1.5;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; }
main {
  width: min(100%, 28rem);
  min-height: 100vh;
  min-height: 100svh;
  margin-inline: auto;
  padding: var(--space-lg) var(--space-lg) max(var(--space-xl), env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}
.content {
  flex: 1;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: var(--space-md);
}
.hero { width: 8rem; height: auto; margin-bottom: var(--space-sm); }
.copy { display: grid; gap: var(--space-sm); }
h1, p { margin: 0; word-break: keep-all; overflow-wrap: break-word; }
h1 { font-size: 1.625rem; font-weight: 700; line-height: 1.32; letter-spacing: -.03em; text-wrap: balance; }
.copy p, .muted { color: var(--muted); text-wrap: pretty; }
.muted { font-size: .875rem; }
.roster {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-xs);
  list-style: none;
  margin: var(--space-sm) 0 0;
  padding: 0;
}
.slot { display: grid; place-items: center; width: 3.125rem; height: 3.125rem; border-radius: 50%; background: var(--field); }
.slot img { width: 88%; height: 88%; object-fit: contain; }
.slot.empty { border: 1px dashed var(--line); }
.slot.cloud, .slot.chick { background: rgb(255 246 219); }
.slot.rabbit, .slot.peach { background: rgb(255 238 243); }
.slot.cherry { background: rgb(255 239 232); }
.slot.penguin { background: rgb(234 246 235); }
.slot.cat { background: rgb(247 241 228); }
.count { font-size: .875rem; font-weight: 600; }
.actions, form, #store-fallback { display: grid; gap: var(--space-sm); text-align: center; }
form[hidden], #store-fallback[hidden] { display: none; }
input, button { font: inherit; }
input {
  width: 100%;
  min-height: 3.25rem;
  padding: var(--space-sm) var(--space-md);
  background: var(--field);
  color: var(--ink);
  border: 1px solid transparent;
  border-radius: 999px;
}
input[aria-invalid="true"] { border-color: var(--error); }
.error { color: var(--error); text-align: start; font-size: .875rem; }
.primary {
  display: grid;
  place-items: center;
  min-height: 3.25rem;
  padding: var(--space-sm) var(--space-md);
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.primary:disabled { opacity: .65; cursor: progress; }
.text-action, .stores a {
  display: grid;
  place-items: center;
  min-height: 2.75rem;
  color: var(--muted);
  font-size: .875rem;
  text-underline-offset: .18em;
}
.stores { display: flex; justify-content: center; gap: var(--space-lg); flex-wrap: wrap; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
