:root { --paper: #f4e9cf; --paper2: #ead9b0; --ink: #2b1a12; --muted: #6b5240; --red: #b23a1f;
  --l1: #e0b94a; --l2: #6a9a5b; --l3: #5f8db3; --l4: #b2584a; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Mukta", system-ui, sans-serif; }
body { display: flex; flex-direction: column; align-items: center; padding: 0 16px 24px; }
a { color: var(--red); }
header { width: 100%; max-width: 560px; text-align: center; }
.hall { width: 100%; height: auto; display: block; margin-top: 10px; }
h1 { font-family: "Rozha One", serif; font-weight: 400; font-size: 64px; line-height: 1; margin: 4px 0 0; color: var(--red); }
.sub { margin: 4px 0; font-weight: 600; font-size: 14px; letter-spacing: .04em; }
.dayline { color: var(--muted); margin: 4px 0; }
.fest { border: 2.5px solid var(--ink); background: var(--l1); border-radius: 8px; padding: 8px; box-shadow: 3px 3px 0 var(--ink); margin: 8px 0; font-weight: 600; }
main { width: 100%; max-width: 560px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.tile { aspect-ratio: 1.25; border: 2.5px solid var(--ink); border-radius: 8px; background: #fffaf0; cursor: pointer; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 4px; user-select: none; transition: transform .12s; font-family: inherit; color: var(--ink); }
.tile b { font-size: clamp(14px, 4vw, 20px); line-height: 1.1; }
.tile small { font-size: clamp(9px, 2.4vw, 12px); color: var(--muted); }
.tile.sel { background: var(--ink); color: var(--paper); }
.tile.sel small { color: var(--paper2); }
.tile:active { transform: scale(.96); }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.group { border: 2.5px solid var(--ink); border-radius: 8px; padding: 8px 10px; margin-top: 8px; text-align: center; box-shadow: 3px 3px 0 var(--ink); animation: pop .35s; }
@keyframes pop { from { transform: scale(.94); opacity: .4; } }
.group b { font-size: 18px; display: block; }
.group .items { font-weight: 600; }
.group .cite { font-size: 12px; opacity: .85; }
.g1 { background: var(--l1); } .g2 { background: var(--l2); color: #fff8ea; } .g3 { background: var(--l3); color: #fff8ea; } .g4 { background: var(--l4); color: #fff8ea; }
.msg { min-height: 1.4em; text-align: center; font-weight: 600; margin: 8px 0; }
.lives { text-align: center; color: var(--muted); }
#lives { letter-spacing: 4px; }
.controls { display: flex; gap: 8px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
button { font-family: inherit; }
.ghost { background: none; border: 2.5px solid var(--ink); border-radius: 999px; padding: 6px 14px; font-weight: 600; cursor: pointer; color: var(--ink); }
.go { background: var(--red); color: #fff7e6; border: 2.5px solid var(--ink); border-radius: 999px; padding: 6px 18px; font-weight: 800; cursor: pointer; box-shadow: 3px 3px 0 var(--ink); }
.go:disabled { opacity: .45; cursor: default; box-shadow: none; }
.go.wide { display: block; width: 100%; padding: 10px; font-size: 18px; margin-top: 8px; border-radius: 10px; }
.share { background: #fffaf0; border: 2px dashed var(--ink); border-radius: 8px; padding: 10px; text-align: center; white-space: pre-wrap; font: 16px "Mukta", sans-serif; }
.note { font-size: 14px; color: var(--muted); }
.draft { font-size: 12px; color: var(--muted); border-top: 1.5px dashed var(--muted); padding-top: 10px; margin-top: 18px; }
.cross { text-align: center; font-weight: 600; }

[hidden] { display: none !important; }

/* language switch */
.topline { display: flex; justify-content: flex-end; padding-top: 10px; }
.langmini { border: 2px solid var(--ink); background: var(--paper); color: var(--ink); border-radius: 999px; padding: 3px 12px; font: 800 14px "Mukta", sans-serif; cursor: pointer; }
.langswitch { display: block; width: 100%; margin: 20px 0 6px; padding: 12px; border: 3px solid var(--ink); border-radius: 10px; background: var(--paper2);
  color: var(--ink); font: 800 22px "Mukta", sans-serif; cursor: pointer; box-shadow: 4px 4px 0 var(--ink); }
.langswitch small { display: block; font-weight: 400; font-size: 14px; color: var(--muted); }
.how { text-align: center; margin: 8px 0; }
