@import url("https://fonts.googleapis.com/css2?family=Comfortaa:wght@400;700&display=swap");
:root { --bg:#2f3e45; --ink:#fbf8f1; --sun:#f8d161; --sun-shade:#ea9e45; --chrome:#202d33; }
* { box-sizing: border-box; }
html, body { height:100%; overflow:hidden; overscroll-behavior:none; }
body { margin:0; position:fixed; inset:0; background:var(--bg); color:var(--ink); font-family:Comfortaa,sans-serif; touch-action:none; user-select:none; -webkit-touch-callout:none; } /* fixed + hidden: the page itself can never scroll or rubber-band (iOS) */
canvas { image-rendering:pixelated; display:block; margin:0 auto; }
button,input { font:inherit; border-radius:40px; border:0; padding:14px 28px; font-size:18px; }
input { background:var(--ink); color:var(--chrome); width:100%; text-align:center; }
button { background:var(--sun); color:var(--chrome); font-weight:700; box-shadow:0 4px 0 var(--sun-shade); }
#join { position:fixed; inset:0; display:flex; flex-direction:column; gap:16px; align-items:center; justify-content:center; padding:32px; background:var(--chrome); }
#join { justify-content:flex-start; overflow-y:auto; touch-action:pan-y; gap:10px; }
#prev { width:128px; height:128px; background:#3f5a66; border-radius:24px; flex:none; }
#opts { width:100%; max-width:320px; display:grid; gap:6px; }
.row { display:grid; grid-template-columns:44px 1fr 44px; align-items:center; text-align:center; }
.row button { padding:0; height:36px; font-size:20px; }
.row small { color:#85cbb9; display:block; font-size:11px; }
#c { position:fixed; left:0; top:0; }
/* controls: joystick bottom-left (floats to where you touch), action button bottom-right, emotes in a column above it */
#stick { position:fixed; left:0; bottom:0; width:60vw; height:50vh; z-index:2; touch-action:none; }
#base { position:absolute; left:26px; bottom:30px; width:136px; height:136px; border-radius:50%; background:rgba(32,45,51,.5); box-shadow:inset 0 0 0 3px rgba(251,248,241,.4); }
#knob { position:absolute; left:50%; top:50%; width:62px; height:62px; margin:-31px 0 0 -31px; border-radius:50%; background:var(--sun); box-shadow:0 4px 0 var(--sun-shade), 0 0 0 3px #202d33; }
#stick.on #base { box-shadow:inset 0 0 0 3px var(--sun); background:rgba(32,45,51,.65); }
#stickhint { position:absolute; left:26px; bottom:4px; width:136px; margin:0; text-align:center; font-size:11px; color:#fbf8f1; text-shadow:0 1px 2px #000; pointer-events:none; }
#stick.used #stickhint { display:none; }
#actwrap { position:fixed; right:20px; bottom:30px; z-index:3; display:flex; flex-direction:column; align-items:center; gap:8px; }
#act { width:108px; height:108px; border-radius:50%; padding:0; font-size:48px; line-height:1; background:#ee3253; color:#fff; box-shadow:0 6px 0 #982c47, 0 0 0 4px #202d33; touch-action:none; transition:transform .08s; }
#act.press { transform:translateY(4px) scale(.96); box-shadow:0 2px 0 #982c47, 0 0 0 4px #202d33; }
#act.none { background:#3f5a66; box-shadow:0 6px 0 #2f3e45, 0 0 0 4px #202d33; opacity:.75; font-size:40px; }
#act.ready { animation:actpulse 1.4s ease-in-out infinite; }
@keyframes actpulse { 50% { box-shadow:0 6px 0 #982c47, 0 0 0 4px #202d33, 0 0 0 12px rgba(248,209,97,.45); } }
#actlabel { max-width:min(52vw,220px); background:#fbf8f1; color:#202d33; font-weight:700; font-size:16px; line-height:1.2; padding:7px 14px; border-radius:40px; text-align:center; box-shadow:0 3px 0 rgba(0,0,0,.35); }
#actlabel.none { background:rgba(32,45,51,.8); color:#b9c9cf; font-weight:400; font-size:13px; }
#emotes { position:fixed; right:14px; bottom:210px; z-index:3; display:flex; flex-direction:column; gap:6px; }
#emotes button { width:46px; height:46px; padding:0; border-radius:50%; background:rgba(251,248,241,.92); box-shadow:0 3px 0 rgba(0,0,0,.35); }
#emotes img { width:30px; height:30px; display:block; margin:auto; }
[hidden] { display:none !important; }

#hud { position:fixed; left:0; right:0; bottom:46vh; z-index:3; display:flex; gap:6px; justify-content:center; align-items:center; padding:6px; flex-wrap:wrap; }
#hud button { padding:0; width:44px; height:44px; font-size:22px; }
#wish { position:fixed; inset:0; background:var(--chrome); padding:20px; display:flex; flex-direction:column; gap:10px; touch-action:pan-y; }
#wish textarea { border-radius:20px; border:0; padding:12px; font:inherit; height:80px; }
#wishlist { overflow-y:auto; flex:1; display:grid; gap:6px; align-content:start; font-size:14px; }
#wishlist div { background:#3f5a66; border-radius:16px; padding:8px 12px; }



#banner { position:fixed; top:0; left:0; right:0; background:rgba(32,45,51,.92); padding:8px 12px; font-size:14px; text-align:center; }
#big { position:fixed; left:0; right:0; top:14vh; text-align:center; font-size:72px; font-weight:700; color:var(--sun); text-shadow:0 4px 0 #202d33; pointer-events:none; }
#hud #sync { width:96px; height:96px; font-size:48px; background:var(--sun); }

body > #big { top:30vh; font-size:20vh; }

#bsod { position:fixed; inset:0; z-index:10; background:#1a4fc4; color:#fff; display:flex; flex-direction:column; justify-content:center; padding:8vw; font-family:sans-serif; }
#bsod h1 { font-size:30vmin; margin:0; } #bsod p { font-size:5vmin; margin:0; }

img { image-rendering:pixelated; }
#logo { width:40px; flex:none; image-rendering:auto; }
#hud button img { width:33px; height:33px; display:block; margin:auto; }
#hud #sync img { width:66px; height:66px; }
#hud #sync { font-size:56px; }
#prev { width:160px !important; height:160px !important; }

#hud #up, #hud #down { width:80px; height:80px; font-size:36px; }

#juke { position:fixed; inset:0; background:var(--chrome); padding:20px; display:flex; flex-direction:column; gap:12px; touch-action:pan-y; }
#genres { display:grid; gap:8px; }
#prizes { position:fixed; inset:0; background:var(--chrome); padding:20px; display:flex; flex-direction:column; gap:12px; touch-action:pan-y; overflow-y:auto; }
#tixbal { color:#f8d161; font-weight:700; }
#prizelist { display:grid; gap:10px; }
.prize { display:grid; grid-template-columns:56px 1fr auto; align-items:center; gap:12px; background:rgba(251,248,241,.06); border-radius:20px; padding:6px 10px; }
.prize canvas { width:48px; height:60px; image-rendering:pixelated; }
.prize small { display:block; color:#85cbb9; }
.prize button[disabled] { opacity:.45; }
#start { position:fixed; left:50%; top:50%; transform:translate(-50%,-50%); z-index:20; font-size:28px; padding:20px 36px; }

#paint { position:fixed; inset:0; background:var(--chrome); padding:20px; display:flex; flex-direction:column; gap:12px; align-items:center; touch-action:none; }
#pcanvas { width:min(94vw,520px); aspect-ratio:96/60; height:auto; border:4px solid #8d5a3c; border-radius:8px; background:#f3ede0; image-rendering:pixelated; touch-action:none; }
#ppal, #pbrush { display:flex; gap:6px; flex-wrap:wrap; justify-content:center; max-width:340px; }
#ppal button { width:32px; height:32px; padding:0; border-radius:50%; box-shadow:0 0 0 2px #fbf8f1; color:#202d33; font-size:16px; }
#ppal button.on, #pbrush button.on { box-shadow:0 0 0 2px #202d33, 0 0 0 5px var(--sun, #f8d161); transform:scale(1.12); }
#pbrush button { width:44px; height:44px; padding:0; border-radius:50%; background:#fbf8f1; display:grid; place-items:center; } #pbrush i { background:#202d33; border-radius:2px; display:block; }

#menu { position:fixed; top:6px; right:6px; display:flex; gap:6px; z-index:5; }
#menu button { padding:6px 14px; font-size:13px; }
#flash { position:fixed; top:44px; left:12px; right:12px; background:var(--sun); color:var(--chrome); border-radius:40px; padding:10px 16px; text-align:center; font-weight:700; z-index:6; }
#prof { position:fixed; inset:0; background:var(--chrome); padding:20px; display:flex; flex-direction:column; gap:10px; overflow-y:auto; touch-action:pan-y; z-index:7; }
#achlist { display:grid; gap:6px; font-size:14px; } #achlist div { background:#3f5a66; border-radius:16px; padding:8px 12px; }

#bingo { position:fixed; left:0; right:0; bottom:0; height:40vh; display:grid; grid-template-columns:repeat(3,1fr); gap:6px; padding:8px; background:var(--chrome); z-index:4; }
#bingo button { border-radius:16px; padding:4px; font-size:13px; line-height:1.15; box-shadow:0 3px 0 var(--sun-shade); }
#bingo button.marked { background:#85cbb9; box-shadow:0 3px 0 #579f8c; text-decoration:line-through; }
#hud #sync { font-size:22px; }

#game { position:fixed; inset:0; background:var(--chrome); padding:20px; display:flex; flex-direction:column; gap:10px; align-items:center; text-align:center; touch-action:none; z-index:8; }
#garea { width:min(92vw,420px); display:grid; }
.bgrid { display:grid; grid-template-columns:repeat(4,1fr); gap:6px; }
.bgrid button { aspect-ratio:1; border-radius:16px; background:#3f5a66; box-shadow:0 3px 0 #2f3e45; padding:0; } .bgrid img { width:80%; display:block; margin:auto; }
.rushbtn { height:30vh; font-size:36px; background:#ee3253; color:#fff; box-shadow:0 6px 0 #982c47; touch-action:none; }
.reflexbox { height:30vh; font-size:32px; background:#ee3253; color:#fff; touch-action:none; box-shadow:none; }

#code { position:fixed; left:0; right:0; bottom:0; min-height:40vh; display:flex; flex-direction:column; gap:10px; padding:14px; background:var(--chrome); z-index:4; align-items:stretch; touch-action:manipulation; }
#code h3 { margin:0; font-size:18px; text-align:center; color:var(--sun); } #code input { font-size:26px; letter-spacing:6px; }

#bugarea { position:fixed; left:0; top:0; z-index:3; touch-action:none; }

input, textarea { user-select:text; -webkit-user-select:text; } /* body has user-select:none; iOS needs this to allow typing */

/* magic terminal: an old green-screen CLI */
#prompt { position:fixed; inset:0; background:#050d08; color:#5dff8f; font:16px/1.35 ui-monospace, Consolas, "Courier New", monospace; display:flex; flex-direction:column; touch-action:manipulation; z-index:8; text-shadow:0 0 6px rgba(93,255,143,.55); }
#prompt::after { content:""; position:absolute; inset:0; pointer-events:none; background:repeating-linear-gradient(0deg, rgba(0,0,0,.28) 0 1px, transparent 1px 3px); } /* scanlines */
#prompt .clibar { display:flex; align-items:center; justify-content:space-between; gap:8px; background:#5dff8f; color:#050d08; text-shadow:none; padding:6px 6px 6px 12px; font-weight:700; font-size:13px; }
#prompt .clibar button { background:#050d08; color:#5dff8f; box-shadow:none; border-radius:0; min-width:40px; min-height:32px; padding:0; font:inherit; }
#plog { flex:1; overflow-y:auto; padding:12px; white-space:pre-wrap; word-break:break-word; touch-action:pan-y; }
#plog .dim { color:#2fae5f; } #plog .warn { color:#f8d161; text-shadow:0 0 6px rgba(248,209,97,.5); }
#plog .cmds { display:grid; grid-template-columns:repeat(auto-fill, minmax(140px, 1fr)); gap:6px; margin:6px 0 10px; }
#plog .cmd { background:transparent; color:#5dff8f; border:1px solid #2fae5f; border-radius:0; box-shadow:none; text-align:left; padding:8px 10px; font:inherit; text-shadow:inherit; min-height:44px; }
#plog .cmd b { display:block; } #plog .cmd small { color:#2fae5f; font-size:12px; }
#plog .cmd:active { background:#5dff8f; color:#050d08; text-shadow:none; }
#prompt .cliin { display:flex; align-items:center; gap:6px; padding:10px 12px calc(10px + env(safe-area-inset-bottom)); border-top:1px solid #2fae5f; }
#prompt .cliin label { white-space:nowrap; font-weight:700; }
#prompt .cliin input { flex:1; min-width:0; background:transparent; border:0; border-radius:0; color:#5dff8f; font:inherit; font-size:16px; caret-color:#5dff8f; outline:none; padding:8px 0; text-shadow:inherit; }
#prompt .cliin input::placeholder { color:#2fae5f; opacity:.8; }
#prompt .cliin button { background:#5dff8f; color:#050d08; border-radius:0; box-shadow:none; min-width:48px; min-height:44px; padding:0; font:700 18px ui-monospace, monospace; text-shadow:none; }
/* museum: story cards, one fact per screen, styled after its era (time machine) */
#exhibit { position:fixed; inset:0; background:var(--chrome); display:flex; flex-direction:column; overflow:hidden; touch-action:manipulation; }
.exbars { display:flex; gap:4px; padding:12px 60px 0 12px; } .exbars i { flex:1; height:4px; border-radius:2px; background:rgba(255,255,255,.3); } .exbars i.on { background:#fff; }
#exclose { position:absolute; top:6px; right:8px; width:44px; height:44px; padding:0; border-radius:50%; font-size:20px; background:rgba(0,0,0,.35); color:#fff; box-shadow:none; z-index:2; }
#exstage { flex:1; display:flex; align-items:center; justify-content:center; padding:14px 16px; min-height:0; }
#exstage > * { width:100%; max-width:440px; animation:exin .3s ease-out; }
@keyframes exin { from { opacity:0; transform:translateY(14px) scale(.97); } }
.exhint { text-align:center; font-size:12px; opacity:.7; margin:0 0 6px; }
.exreact { display:flex; gap:10px; justify-content:center; padding:4px 12px calc(16px + env(safe-area-inset-bottom)); }
.exreact button { padding:8px 16px; font-size:20px; background:rgba(255,255,255,.14); color:inherit; box-shadow:none; border:2px solid transparent; min-width:76px; }
.exreact button.mine { border-color:var(--sun); background:rgba(248,209,97,.25); }
.exreact span { font-size:15px; margin-left:4px; }
.exic { font-size:44px; line-height:1; }
/* now (2022+ and the stands): house style */
.ex-now { text-align:center; } .ex-now small { color:#85cbb9; font-weight:700; text-transform:uppercase; letter-spacing:2px; } .ex-now h3 { margin:2px 0 14px; color:var(--sun); font-size:clamp(26px, 8vw, 38px); line-height:1.15; }
.ex-now p { margin:14px 0 0; font-size:21px; line-height:1.4; background:rgba(251,248,241,.07); border-radius:28px; padding:18px 20px; }
/* 2006-2012: Windows 98 */
#exhibit[data-era=win] { background:#008080; color:#fff; }
.ex-win { background:#c0c0c0; color:#000; font:16px/1.4 Tahoma, "MS Sans Serif", Verdana, sans-serif; border:2px solid; border-color:#fff #404040 #404040 #fff; box-shadow:1px 1px 0 #000; }
.ex-win .tb { display:flex; justify-content:space-between; align-items:center; background:linear-gradient(90deg, #000080, #1084d0); color:#fff; font-weight:700; font-size:13px; padding:3px 3px 3px 6px; }
.ex-win .tb em { font-style:normal; display:inline-block; width:18px; height:16px; margin-left:2px; background:#c0c0c0; color:#000; text-align:center; line-height:14px; font-size:11px; border:1px solid; border-color:#fff #404040 #404040 #fff; }
.ex-win .bd { display:flex; gap:14px; padding:18px 16px 10px; align-items:flex-start; font-size:18px; } .ex-win .bd p { margin:0; }
.ex-win .ok { display:block; margin:6px auto 14px; width:96px; padding:4px; text-align:center; font-size:14px; border:2px solid; border-color:#fff #404040 #404040 #fff; outline:1px dotted #000; outline-offset:-5px; }
/* 2013-2015: web 2.0 gloss */
#exhibit[data-era=web2] { background:linear-gradient(#e3f2ff, #8ec5f0); color:#1d3b57; }
.ex-web2 { background:#fff; border-radius:16px; overflow:hidden; box-shadow:0 8px 24px rgba(0,60,120,.3); font:18px/1.45 "Trebuchet MS", Verdana, sans-serif; color:#333; }
.ex-web2 .hd { position:relative; background:linear-gradient(#9be15d 0, #6cc33a 50%, #4fa82a 51%, #7ccf45 100%); color:#fff; font-weight:700; font-size:24px; padding:12px 16px; text-shadow:0 1px 1px rgba(0,0,0,.35); }
.ex-web2 .hd b { position:absolute; right:-6px; top:8px; background:#ff7a00; color:#fff; font-size:11px; padding:3px 12px; transform:rotate(12deg); border-radius:4px; text-shadow:none; }
.ex-web2 .bd { display:flex; gap:14px; padding:18px 16px 22px; align-items:center; } .ex-web2 .bd p { margin:0; }
.ex-web2 .bd::after { content:""; }
/* 2016-2019: Slack */
#exhibit[data-era=slack] { background:#3f0e40; color:#fff; }
.ex-slack { background:#fff; color:#1d1c1d; border-radius:10px; overflow:hidden; font:17px/1.45 -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; }
.ex-slack .ch { padding:10px 14px; font-weight:800; border-bottom:1px solid #ddd; } .ex-slack .ch small { font-weight:400; color:#616061; }
.ex-slack .msg { display:flex; gap:10px; padding:14px; } .ex-slack .av { flex:none; width:40px; height:40px; border-radius:8px; background:#e8597d; color:#fff; font-weight:800; display:grid; place-items:center; font-size:20px; }
.ex-slack .who b { margin-right:6px; } .ex-slack .who small { color:#616061; } .ex-slack .msg p { margin:2px 0 0; }
.ex-slack .emo { display:inline-block; margin-top:8px; border:1px solid #1d9bd1; background:#e8f5fa; border-radius:12px; padding:0 8px; font-size:15px; }
.ex-slack .in { margin:0 14px 14px; border:1px solid #bbb; border-radius:8px; padding:8px 10px; color:#999; font-size:14px; }
/* 2020-2021: Zoom */
#exhibit[data-era=zoom] { background:#1a1a1a; color:#fff; }
.ex-zoom { font:16px/1.4 -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; }
.ex-zoom .top { text-align:center; font-size:13px; color:#aaa; margin-bottom:8px; } .ex-zoom .top b { color:#fff; }
.ex-zoom .grid { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.ex-zoom .tile { position:relative; aspect-ratio:4/3; background:#2e2e2e; border-radius:6px; display:grid; place-items:center; font-size:38px; border:3px solid transparent; }
.ex-zoom .tile.talk { border-color:#2bd45e; } .ex-zoom .tile small { position:absolute; left:6px; bottom:4px; font-size:12px; background:rgba(0,0,0,.55); padding:1px 6px; border-radius:3px; }
.ex-zoom .cc { margin:10px 0 8px; background:rgba(0,0,0,.85); border-radius:6px; padding:12px 14px; font-size:19px; text-align:center; }
.ex-zoom .bar { display:flex; justify-content:space-around; font-size:12px; color:#ccc; } .ex-zoom .bar b { background:#e02828; color:#fff; padding:4px 10px; border-radius:6px; }
.qq { font-size:18px; line-height:1.35; margin:4px 0 8px; } .qa { display:grid; gap:8px; width:100%; }
.qa button { font-size:16px; padding:12px 16px; line-height:1.25; } .qa button.right { background:#85cbb9; box-shadow:0 4px 0 #579f8c; } .qa button.wrong { background:#ee3253; color:#fff; box-shadow:0 4px 0 #982c47; }
.qnote { color:#85cbb9; font-size:15px; min-height:20px; margin:6px 0 0; } .qend { font-size:22px; color:var(--sun); font-weight:700; }
#wish, #juke, #paint, #prompt, #prof, #game, #prizes, #exhibit { z-index:10; } #join { z-index:20; } #bsod { z-index:30; } /* panels cover the controls */
#banner { padding:10px 160px 10px 14px; text-align:left; z-index:4; } /* leave room for the menu buttons top-right */
/* Jeroen talks: a speech card at the top (events, tips, toasts) */
#banner { top:48px; left:8px; right:8px; display:flex; gap:10px; align-items:center; background:#fbf8f1; color:#202d33; border-radius:20px; padding:8px 12px; box-shadow:0 4px 0 rgba(0,0,0,.35); font-size:15px; font-weight:700; line-height:1.3; text-align:left; }
#banner p { margin:0; }
#bjer { width:46px; height:40px; flex:none; background:#85cbb9; border-radius:14px; image-rendering:pixelated; margin:0; }
#banner.next { background:var(--sun); }
/* event announcement: a big card in the middle while the event is being explained */
#evcard { position:fixed; left:16px; right:16px; top:20vh; z-index:9; background:#202d33; border:4px solid var(--sun); border-radius:28px; padding:18px 20px; text-align:center; box-shadow:0 8px 0 rgba(0,0,0,.45); animation:evpop .35s ease-out; }
#evicon { font-size:64px; line-height:1; } #evname { color:var(--sun); font-size:28px; margin:6px 0; } #evhow { font-size:17px; line-height:1.35; margin:0 0 10px; } #evcard small { color:#85cbb9; }
@keyframes evpop { from { transform:scale(.6); opacity:0; } }

/* feedback effects (public/js/juice.js): above everything, never catch taps */
#juice { position:fixed; inset:0; pointer-events:none; z-index:50; overflow:hidden; }
#juice .jp { position:absolute; display:block; border-radius:1px; box-shadow:0 0 0 1px rgba(32,45,51,.35); }
#juice .jt { position:absolute; font-weight:700; white-space:nowrap; -webkit-text-stroke:1px #202d33; text-shadow:0 3px 0 #202d33; }
#juice .jf { position:absolute; inset:0; }
.jc { position:absolute; inset:0; display:grid; place-items:center; font-size:88px; font-weight:700; text-shadow:0 6px 0 #202d33; pointer-events:none; z-index:2; }
#garea { position:relative; min-height:120px; }
#gstatus.hurry { color:#ee3253; animation:hurry .5s ease-in-out infinite alternate; } @keyframes hurry { to { transform:scale(1.1); } }
#exhibit:not([hidden]), #prizes:not([hidden]), #game:not([hidden]), #wish:not([hidden]), #juke:not([hidden]), #prof:not([hidden]) { animation:slidein .22s ease-out; }
@keyframes slidein { from { transform:translateY(24px); opacity:0; } }
#flash:not([hidden]) { animation:evpop .25s ease-out; }
.qbar { width:100%; height:8px; background:#3f5a66; border-radius:8px; overflow:hidden; } .qbar i { display:block; height:100%; width:100%; background:#85cbb9; border-radius:8px; transition:width .1s linear, background .3s; }
