@font-face { font-family: Bebas; src: url(fonts/bebas.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: Oswald; src: url(fonts/oswald.woff2) format("woff2"); font-display: swap; }

:root {
  --ink: #0d0d10; --asphalt: #17171c; --line: #2c2c35; --lime: #c6ff3d; --lime-dk: #8fbf14;
  --pink: #ff3d7f; --paper: #f6f4ee; --muted: #a9a9b8;
  --av0: #ff3d7f; --av1: #c6ff3d; --av2: #3dd6ff; --av3: #ffb23d; --av4: #b07cff; --av5: #ff6b3d;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Oswald, "Arial Narrow", sans-serif; color: var(--paper); background: var(--ink);
  background-image: radial-gradient(circle at 20% -10%, rgba(255,61,127,.22), transparent 45%),
                    radial-gradient(circle at 110% 30%, rgba(198,255,61,.12), transparent 40%);
  background-attachment: fixed;
}
main { max-width: 520px; margin: 0 auto; padding: 12px 16px 40px; }
.hidden { display: none !important; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.err { color: #ff9cb9; min-height: 1.2em; margin: 10px 0 0; text-align: center; }
.notice { background: rgba(255,178,61,.14); border: 1px solid rgba(255,178,61,.5); color: #ffd28a; border-radius: 10px; padding: 8px 10px; }
.fine { font-size: 13px; color: var(--muted); text-align: center; margin: 12px 0 0; }

.logo { text-align: center; padding: 8px 0 14px; }
.logo h1 { font: 400 58px/1 Bebas, Impact, sans-serif; letter-spacing: 3px; margin: 0; color: var(--paper);
  transform: rotate(-2deg); text-shadow: 3px 3px 0 var(--pink); }
.logo h1 span { color: var(--lime); text-shadow: 3px 3px 0 #3a0a1c; }
.logo .tag { margin: 6px 0 0; font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }

.panel { background: var(--asphalt); border: 1px solid var(--line); border-radius: 16px; padding: 18px 16px; margin-bottom: 14px; }
h2 { font: 400 34px/1.05 Bebas, Impact, sans-serif; letter-spacing: 1px; margin: 6px 0 10px; color: var(--lime); }
h3 { font: 400 24px Bebas, Impact, sans-serif; letter-spacing: 1px; margin: 0 0 10px; color: var(--pink); }
h3 small, .hand-title small { font: 13px Oswald, sans-serif; color: var(--muted); letter-spacing: 0; margin-left: 6px; }

label { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-bottom: 12px; }
input, select, textarea { display: block; width: 100%; margin-top: 5px; padding: 12px 14px; font: 500 20px Oswald, sans-serif;
  border: 2px solid var(--line); border-radius: 10px; background: #0f0f13; color: var(--paper); outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--lime); }
#in-code { text-transform: uppercase; letter-spacing: 12px; text-align: center; font: 400 38px Bebas, Impact, sans-serif; }
label.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
label.row select { width: 110px; margin: 0; }

.btn { display: block; width: 100%; border: 0; border-radius: 12px; padding: 14px; cursor: pointer;
  font: 400 26px Bebas, Impact, sans-serif; letter-spacing: 2px; }
.btn.lime { background: var(--lime); color: #1a2400; box-shadow: 0 4px 0 var(--lime-dk); }
.btn.lime:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--lime-dk); }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.btn.small { font-size: 19px; padding: 9px; }
.btn:disabled { opacity: .4; }
.link { background: none; border: 0; color: var(--lime); font: 15px Oswald, sans-serif; text-decoration: underline; cursor: pointer; }

.badge { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%;
  font: 400 20px Bebas, Impact, sans-serif; color: #111; flex: none; }
.badge.big { width: 64px; height: 64px; font-size: 40px; }
.av0 { background: var(--av0) } .av1 { background: var(--av1) } .av2 { background: var(--av2) }
.av3 { background: var(--av3) } .av4 { background: var(--av4) } .av5 { background: var(--av5) }

.players { list-style: none; padding: 0; margin: 12px 0 0; text-align: left; }
.players li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: #111116; margin-bottom: 6px; font-size: 18px; }
.players li .tagline { margin-left: auto; font-size: 13px; color: var(--muted); }

.packs-head { display: flex; justify-content: space-between; align-items: baseline; margin: 8px 0 6px;
  font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.search { margin: 0 0 8px; font-size: 16px; padding: 9px 12px; }
.packs { list-style: none; padding: 0; margin: 0 0 14px; max-height: 340px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.packs.collapsed { max-height: none; }
.packs li label { display: flex; gap: 10px; align-items: center; margin: 0; padding: 10px 12px; border-bottom: 1px solid var(--line);
  text-transform: none; letter-spacing: 0; color: var(--paper); font-size: 16px; }
.packs li:last-child label { border-bottom: 0; }
.packs input { width: 22px; height: 22px; margin: 0; accent-color: var(--lime); flex: none; }
.packs small { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }

.bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.pill { display: inline-block; padding: 4px 12px; border-radius: 99px; background: rgba(198,255,61,.12); border: 1px solid rgba(198,255,61,.45);
  color: var(--lime); font-size: 15px; letter-spacing: 1px; }
.timer { font: 400 34px Bebas, Impact, sans-serif; color: var(--lime); min-width: 48px; text-align: right; }
.timer.low { color: var(--pink); }

.prompt { background: #050506; border: 2px solid #333; border-radius: 14px; padding: 18px 16px; font-size: 22px; line-height: 1.3;
  box-shadow: 0 8px 24px rgba(0,0,0,.5); position: relative; }
.prompt.small { font-size: 18px; text-align: left; margin: 10px 0; }
.prompt .pickn { display: block; margin-top: 10px; font: 400 18px Bebas, Impact, sans-serif; color: var(--pink); letter-spacing: 1.5px; text-align: right; }
.blank { display: inline-block; min-width: 70px; border-bottom: 3px solid #777; }
.fill { color: var(--lime); font-weight: 500; }

.tray { margin: 14px 0; }
.tray-label { margin: 0 0 8px; color: var(--muted); font-size: 15px; }
.tray-slots { display: grid; gap: 8px; margin-bottom: 10px; }
.slot { display: flex; align-items: center; gap: 10px; background: var(--paper); color: #111; border-radius: 10px; padding: 10px 12px; font-size: 17px; }
.slot.empty { background: transparent; border: 2px dashed var(--line); color: var(--muted); }
.slot .n { font: 400 22px Bebas, Impact, sans-serif; color: var(--pink); }
.slot .x { margin-left: auto; background: none; border: 0; font-size: 22px; color: #888; cursor: pointer; }

.hand-title { font: 400 22px Bebas, Impact, sans-serif; letter-spacing: 1px; color: var(--paper); margin: 18px 0 8px; }
.hand { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.card { position: relative; background: var(--paper); color: #111; border: 0; border-radius: 12px; padding: 12px 12px 26px; min-height: 108px;
  font: 500 16px/1.25 Oswald, sans-serif; text-align: left; cursor: pointer; box-shadow: 0 4px 0 #b9b6ac; }
.card::after { content: "GUTTERWIT"; position: absolute; left: 12px; bottom: 7px; font: 400 11px Bebas, Impact, sans-serif; letter-spacing: 2px; color: #b5b2a8; }
.card.sel { outline: 4px solid var(--lime); transform: translateY(-2px); }
.card .order { position: absolute; top: -10px; right: -8px; width: 28px; height: 28px; border-radius: 50%; background: var(--pink); color: #fff;
  font: 400 20px/28px Bebas, Impact, sans-serif; text-align: center; }
.card.write { display: block; width: 100%; margin-top: 12px; min-height: 0; padding: 14px; text-align: center; background: transparent; color: var(--lime);
  border: 2px dashed var(--lime); box-shadow: none; font-size: 18px; }
.card.write::after { content: none; }
.hand.locked .card { opacity: .35; pointer-events: none; }

.sentence { font-size: 20px; line-height: 1.35; background: #050506; border-radius: 12px; padding: 14px; text-align: left; }
.sentence.big { font-size: 24px; }
.subs { display: grid; gap: 10px; margin: 12px 0; }
.sub { background: var(--paper); color: #111; border-radius: 12px; padding: 14px; font-size: 18px; line-height: 1.35; cursor: pointer; border: 0; text-align: left; }
.sub .num { font: 400 20px Bebas, Impact, sans-serif; color: var(--pink); margin-right: 6px; }
.sub.sel { outline: 4px solid var(--lime); }
.subs.readonly .sub { cursor: default; }
.gavel { font-size: 54px; }
.big-count { font: 400 120px/1 Bebas, Impact, sans-serif; color: var(--lime); }

.final { text-align: left; padding-left: 0; list-style: none; counter-reset: f; }
.final li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; background: #111116; margin-bottom: 6px; font-size: 18px; }
.final li b { margin-left: auto; color: var(--lime); }
.final li.me { outline: 2px solid var(--pink); }

.dlg { position: fixed; inset: 0; background: rgba(0,0,0,.75); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 10; }
.dlg-box { width: 100%; max-width: 440px; background: var(--asphalt); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.dlg-box textarea { resize: none; }
.dlg-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.legal { text-align: center; color: #6e6e7c; font-size: 12px; margin-top: 26px; line-height: 1.5; }
.legal a { color: #8d8d9c; }
.net { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); background: var(--pink); color: #fff; padding: 6px 14px; border-radius: 99px; font-size: 14px; }
.sub .fill { color: #c4135a; font-weight: 600; }
.sub .blank { border-color: #999; }
