/* Upload the supplied logo as public/scamjam-logo.svg and wire it into the masthead. */
:root { color-scheme: light; --purple:#7413dc; --ink:#22152e; --muted:#62576c; --line:#e6deed; --paper:#f7f3fa; --white:#fff; font-family:"Nunito Sans",system-ui,sans-serif; color:var(--ink); background:var(--paper); }
* { box-sizing:border-box; }
body { margin:0; }
[hidden] { display:none !important; }
a { color:#6012b5; }
button,input,textarea,select { font:inherit; }
button,.button { cursor:pointer; }
button:disabled { cursor:wait; opacity:.65; }
:focus-visible { outline:3px solid #08786d; outline-offset:3px; }
.masthead { background:var(--purple); color:white; }
.mast-inner { max-width:1120px; margin:auto; min-height:70px; padding:12px clamp(16px,4vw,42px); display:flex; align-items:center; justify-content:space-between; gap:12px; }
.brand { color:white; text-decoration:none; font-weight:900; font-size:clamp(18px,4vw,24px); display:inline-flex; align-items:center; gap:10px; }
.mark { display:grid; grid-template-columns:repeat(2,8px); gap:3px; padding:6px; border:1px solid #ffffff75; border-radius:7px; transform:rotate(-8deg); }
.mark i { width:8px; height:8px; background:#fff; border-radius:2px; }
.mark i:last-child { background:#ffd84d; }
#identity { font-size:.9rem; text-align:right; overflow-wrap:anywhere; }
main { max-width:1120px; margin:auto; padding:clamp(20px,4vw,44px) clamp(16px,4vw,42px) 38px; }
h1,h2,h3,p { margin-top:0; overflow-wrap:anywhere; }
h1 { font-size:clamp(30px,6vw,55px); letter-spacing:-.045em; line-height:1.03; margin-bottom:12px; font-weight:900; }
h2 { font-size:1.28rem; margin-bottom:12px; }
p { line-height:1.5; }
.muted,small { color:var(--muted); }
.card { background:white; border:1px solid var(--line); border-radius:18px; padding:clamp(16px,3vw,28px); margin:16px 0; }
.narrow { max-width:560px; }
.hero { background:white; border:1px solid var(--line); border-radius:22px; padding:clamp(20px,5vw,48px); max-width:660px; }
.controls,.tabs,.split { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.split { justify-content:space-between; }
.tabs { margin:18px 0; }
.button,button { display:inline-flex; align-items:center; justify-content:center; min-height:44px; border:1px solid transparent; border-radius:10px; padding:8px 14px; background:var(--purple); color:white; text-decoration:none; font-weight:800; }
.secondary { background:white; color:#571398; border-color:#d7c5ea; }
.danger { background:white; color:#a32140; border-color:#edcbd3; }
label { display:grid; gap:6px; font-weight:750; min-width:0; }
input,textarea,select { color:var(--ink); background:white; border:1px solid #bdadca; border-radius:9px; padding:10px; width:100%; min-height:44px; }
input[type=color] { padding:4px; }
textarea { resize:vertical; min-height:80px; }
.form-grid { display:grid; gap:15px; }
.two { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.team-fields { display:grid; grid-template-columns:minmax(0,1fr) 70px auto; gap:10px; align-items:end; padding:10px 0; }
.team-fields .copy { grid-column:1 / -1; justify-self:start; }
.edit-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr)); gap:12px; }
.edit-cell { border:1px solid var(--line); border-radius:12px; padding:12px; display:grid; gap:8px; }
.board-scroll { overflow-x:auto; padding:4px 4px 10px; margin:0 -4px; }
.board { display:grid; grid-template-columns:repeat(var(--columns),minmax(78px,1fr)); gap:clamp(6px,1vw,12px); }
.square { position:relative; display:flex; align-items:stretch; justify-content:flex-start; flex-direction:column; text-align:left; gap:8px; min-height:120px; background:color-mix(in srgb, var(--winner,#fff) 12%, white); color:var(--ink); border:1px solid var(--line); border-top:7px solid var(--winner,#e1c8f8); padding:8px; border-radius:12px; overflow-wrap:anywhere; font-size:clamp(.77rem,2vw,1rem); }
.square:hover { border-inline-color:var(--purple); border-bottom-color:var(--purple); }
.square:disabled { opacity:.6; cursor:default; }
.points { color:#6012a5; font-weight:900; }
.chips { display:flex; flex-wrap:wrap; gap:4px; }
.chip { display:inline-flex; align-items:center; gap:4px; font-size:.74rem; font-weight:800; overflow-wrap:anywhere; max-width:100%; }
.dot { display:inline-block; flex:none; width:10px; height:10px; border-radius:50%; border:1px solid #22152e60; background:var(--team); }
.chip:first-child .dot { width:13px; height:13px; }
.square-status { font-size:.72rem; color:#51435e; margin-top:auto; }
#scores { max-width:1120px; margin:0 auto; padding:0 clamp(16px,4vw,42px) 38px; }
#scores h2 { margin:0 0 10px; }
.score-list { list-style:none; display:grid; gap:6px; margin:0; padding:0; }
.score { display:grid; grid-template-columns:3ch minmax(0,1fr) auto; align-items:center; gap:10px; background:white; border:1px solid var(--line); padding:10px 12px; border-radius:9px; }
.rank { color:var(--muted); font-size:.85rem; font-weight:800; }
.score-team { display:flex; align-items:center; gap:7px; overflow-wrap:anywhere; }
.score b { color:#6012a5; }

dialog { width:min(94vw,620px); max-height:88dvh; border:1px solid var(--line); border-radius:18px; padding:20px; color:var(--ink); }
dialog::backdrop { background:#21102aaa; }
dialog h2 { margin:0; }
dialog .split { margin-bottom:12px; }
#notices { position:fixed; z-index:4; right:12px; bottom:calc(12px + env(safe-area-inset-bottom)); display:grid; gap:8px; width:min(420px,calc(100vw - 24px)); pointer-events:none; }
.notice { background:#241033; color:#fff; border-radius:10px; padding:12px; box-shadow:0 5px 20px #24103340; display:flex; align-items:center; justify-content:space-between; gap:12px; pointer-events:auto; }
.notice button { min-height:34px; padding:3px 8px; }
.error { color:#a32140; font-weight:800; }
.review-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,285px),1fr)); gap:14px; }
.review-list .card { margin:0; }
.photo { display:block; width:100%; max-height:340px; object-fit:contain; border-radius:10px; background:#f2ebf7; }
.photo-button { margin:8px 0; }
.time { display:block; margin:5px 0 10px; font-size:.86rem; color:var(--muted); }
.game-row { border-bottom:1px solid var(--line); padding:12px 0; }
.game-row:last-child { border:0; }
.game-row strong { overflow-wrap:anywhere; max-width:100%; }
@media (min-width:800px) { .square { min-height:148px; padding:12px; } }



.completion-list { list-style:none; margin:0 0 16px; padding:0; }
.completion-list li { font-weight:800; }
.completion-list time { font-weight:400; }

.brand-logo { display:block; width:min(560px,64vw); height:auto; background:white; border-radius:8px; }
.mast-inner { gap:12px; }
.game-controls { margin:0 0 20px; }
[data-submissions]::before { content:"●"; margin-right:8px; }
[data-submissions][aria-checked=false]::before { content:"○"; }
#team-submissions:empty { display:none; }
