:root {
  --wine: #2a0716;
  --flesh: #9e2c50;
  --mucosa: #f08aa6;
  --ovum: #ffd9a0;
  --cream: #fff0f3;
  --muted: #d9a3b4;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--wine); color: var(--cream);
  font: 400 17px/1.5 Nunito, system-ui, sans-serif; }
canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

.panel { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto;
  padding: 28px 28px 24px; background: rgba(42, 7, 22, .82); backdrop-filter: blur(8px);
  border: 2px solid var(--flesh); border-radius: 36px 36px 36px 8px; }
.hidden { display: none !important; }

h1, h2 { font-family: "Bagel Fat One", Nunito, sans-serif; font-weight: 400; margin: 0 0 .4em; color: var(--ovum); }
h1 { font-size: clamp(48px, 13vw, 72px); line-height: .9; letter-spacing: -.01em; }
h2 { font-size: 34px; line-height: 1.1; }
.lead { margin: 0 0 1.2em; color: var(--cream); max-width: 34em; }
.muted { color: var(--muted); font-size: 15px; margin: .8em 0 0; }
.err { color: #ffb0b0; min-height: 1.5em; margin: .6em 0 0; font-weight: 700; }

label { display: block; font-weight: 700; margin-bottom: 4px; }
input { font: inherit; color: var(--cream); background: rgba(255,255,255,.07); border: 2px solid var(--flesh);
  border-radius: 14px; padding: 10px 14px; width: 100%; min-width: 0; }
input:focus { outline: none; border-color: var(--mucosa); }
#code { text-transform: uppercase; }
.row { display: flex; gap: 10px; margin-top: 12px; }
button { font: 900 17px Nunito, sans-serif; color: var(--cream); background: transparent; cursor: pointer;
  border: 2px solid var(--mucosa); border-radius: 14px; padding: 10px 18px; white-space: nowrap; }
button.primary { background: var(--ovum); color: var(--wine); border-color: var(--ovum); flex: 1; }
button:hover { filter: brightness(1.12); }
button:focus-visible, summary:focus-visible { outline: 3px solid var(--ovum); outline-offset: 3px; }
#start { width: 100%; margin-top: 16px; }

details { margin-top: 18px; color: var(--muted); }
summary { cursor: pointer; font-weight: 700; color: var(--cream); }
details ul { padding-left: 1.2em; margin: .6em 0 0; }
details li { margin-bottom: .3em; }

#plist { list-style: none; padding: 0; margin: 18px 0 0; }
#plist li { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-weight: 700; }
#plist i { width: 22px; height: 14px; border-radius: 50% 40% 40% 50%; display: inline-block; }
#plist small { color: var(--muted); font-weight: 400; }

#touch { position: fixed; right: 16px; bottom: 16px; display: flex; gap: 12px; }
#touch button { width: 76px; height: 76px; border-radius: 50%; background: rgba(42,7,22,.6); font-size: 15px; padding: 0; }

.diff { border: 0; padding: 0; margin: 16px 0 0; display: flex; gap: 8px; flex-wrap: wrap; }
.diff legend { font-weight: 700; margin-bottom: 6px; padding: 0; }
.diff label { flex: 1; margin: 0; }
.diff input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.diff span { display: block; text-align: center; padding: 8px 6px; border: 2px solid var(--flesh); border-radius: 14px; cursor: pointer; font-weight: 800; }
.diff input:checked + span { background: var(--mucosa); border-color: var(--mucosa); color: var(--wine); }
.diff input:focus-visible + span { outline: 3px solid var(--ovum); outline-offset: 2px; }
.diff input:disabled + span { cursor: default; }
.diff.small span { padding: 4px 6px; font-size: 14px; }
.fame { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 10px; color: var(--cream); }
.fame h3 { font: 900 15px Nunito, sans-serif; color: var(--ovum); margin: 0 0 6px; }
.fame ol { margin: 0; padding-left: 1.4em; font-size: 15px; }
.fame li { margin-bottom: 2px; }
.fame li span { color: var(--muted); }
.fame .me { color: var(--ovum); font-weight: 900; }
#resFame { margin-top: 18px; }
@media (max-width: 420px) { .fame { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; } }
