@font-face { font-family: 'Press Start 2P'; src: url('/fonts/PressStart2P-Regular.ttf') format('truetype'); font-display: fallback; } /* preloaded by each page; fallback avoids a late jump in the lettering */
:root {
  --bg: #0a0618; --panel: #120c2b; --panel2: #0d0822; --line: #2c2160;
  --cyan: #00f0ff; --pink: #ff2bd6; --lime: #b6ff00; --yellow: #ffe600; --red: #ff3b5c;
  --text: #ece9ff; --dim: #8f88c2;
  --pixel: 'Press Start 2P', ui-monospace, monospace;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  --pixel-adjust: none;
  --pixel-case: uppercase; /* arcade shouts; the text itself is written in sentence case */
}
* { box-sizing: border-box; }
html, body { margin: 0; }
/* Sticky footer: main grows to fill the window, so the footer always sits at the bottom */
body { background: radial-gradient(ellipse at top, #1f1255 0%, var(--bg) 65%) fixed; color: var(--text); font-family: var(--mono); min-height: 100vh; display: flex; flex-direction: column; }
.crt { position: fixed; inset: 0; pointer-events: none; z-index: 50;
  background: radial-gradient(ellipse at center, transparent 70%, rgba(0,0,0,.3) 100%), repeating-linear-gradient(to bottom, rgba(0,0,0,.2) 0 1px, transparent 1px 3px); }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

/* HUD */
.hud { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 24px;
  border-bottom: 3px solid var(--pink); box-shadow: 0 3px 18px rgba(255,43,214,.35); font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); }
.logo { font-size: 18px; color: var(--yellow); text-shadow: 0 0 8px var(--yellow); padding: 10px 12px; border: 3px solid var(--yellow); }
.logo span { color: var(--pink); text-shadow: 0 0 8px var(--pink); margin-left: 8px; }
/* The landing page's coffee cup before the name, on every page with the logo (Corporate swaps in an outlined cup below) */
.logo { display: flex; align-items: center; }
.logo::before { content: ''; flex: none; width: 1.5em; height: 1.5em; margin: -.35em .5em -.35em 0; background: center / contain no-repeat
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M14 4c-2 3 2 4 0 7M20 3c-2 3 2 4 0 7' fill='none' stroke='%23d6a062' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M7 15h22l-2 14a5 5 0 0 1-5 4h-8a5 5 0 0 1-5-4z' fill='%23f4e6d2'/%3E%3Cpath d='M29 18c5 0 5 8-1 8' fill='none' stroke='%23f4e6d2' stroke-width='3' stroke-linecap='round'/%3E%3Cpath d='M19 17l-2 5 3 3-2 5' fill='none' stroke='%23ff5d3d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.box { border: 3px solid var(--cyan); padding: 8px 14px; color: var(--cyan); font-size: 16px; text-align: center; min-width: 96px; }
.box b { font-weight: normal; font-size: 20px; display: block; }
.box small, .score small { display: block; font-size: 9px; color: var(--dim); margin-top: 6px; }
.score { margin: 0 auto; text-align: center; }
.score b { display: block; font-size: 34px; font-weight: normal; color: var(--lime); text-shadow: 0 0 14px var(--lime); }
.lives { border-color: var(--lime); }
.lives b { color: var(--red); text-shadow: 0 0 8px var(--red); letter-spacing: 4px; }
.streak { border-color: var(--pink); color: var(--pink); }

main { flex: 1 0 auto; width: 100%; box-sizing: border-box; padding: 16px 24px 32px; max-width: 1400px; margin: 0 auto; }

/* Menus */
.menu { text-align: center; max-width: 720px; margin: 0 auto; }
.title { font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-weight: normal; font-size: clamp(30px, min(8vw, 9vh), 76px); line-height: 1.25; margin: 28px 0 18px;
  color: var(--pink); text-shadow: 5px 5px 0 var(--cyan), 0 0 28px var(--pink); }
.tag { color: var(--dim); line-height: 1.7; }
/* Live stats strip (sign-in screen and lobby): real totals, "playing now" once it's 10+, and a feed of recent fixes. */
.live-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 16px auto 18px; }
.live-stats[hidden], .stat-pill[hidden] { display: none; }
.stat-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border: 1px solid var(--line); background: var(--panel2); color: var(--dim); font-size: 12px; line-height: 1; }
.stat-pill b { color: var(--text); font-weight: 700; }
.stat-pill.online b { color: var(--lime); }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); animation: live-pulse 1.6s ease-in-out infinite; }
@keyframes live-pulse { 50% { opacity: .35; } }
#start > .live-stats { margin: 0 auto 2px; }
:root:not([data-theme="corporate"]) .stat-pill { font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-size: 9px; letter-spacing: .04em; border-color: color-mix(in srgb, var(--cyan) 35%, transparent); }
:root:not([data-theme="corporate"]) .stat-pill.online { border-color: color-mix(in srgb, var(--lime) 45%, transparent); box-shadow: 0 0 12px color-mix(in srgb, var(--lime) 18%, transparent); }
:root:not([data-theme="corporate"]) .live-dot { box-shadow: 0 0 8px var(--lime); }
[data-theme="corporate"] .stat-pill { border-radius: 999px; background: #fff; font-weight: 500; box-shadow: 0 1px 2px rgba(43,42,39,.06); }
[data-theme="corporate"] .stat-pill.online b { color: var(--lime); }
.how { list-style: none; padding: 0; margin: 22px auto; display: table; text-align: left; line-height: 2.2; }
.how b { font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-weight: normal; font-size: 11px; color: var(--bg); background: var(--lime); padding: 3px 6px; margin-right: 10px; }
h2 { font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-weight: normal; font-size: 14px; color: var(--cyan); margin: 34px 0 12px; text-shadow: 0 0 6px color-mix(in srgb, currentColor 40%, transparent); } /* a soft glow in the text's own colour keeps small pixel text sharp */
.big { font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-size: 15px; background: var(--pink); color: #fff; border: 0; padding: 16px 26px;
  box-shadow: 5px 5px 0 var(--cyan); margin: 8px; }
.big:hover, .big:focus-visible { background: var(--yellow); color: var(--bg); outline: none; }
.big:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--cyan); }
#startBtn { animation: blink 1.1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .55; } }

.board { list-style: none; counter-reset: r; padding: 0; margin: 0 auto; max-width: 520px; font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-size: 12px; }
.board li { counter-increment: r; display: flex; gap: 14px; padding: 9px 12px; border-bottom: 1px dashed var(--line); }
.board li::before { content: counter(r) '.'; width: 3ch; color: var(--dim); }
.board li:nth-child(1)::before { color: var(--yellow); }
.board .n { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .s { color: var(--lime); }
.board li.me { background: rgba(255,43,214,.18); outline: 2px solid var(--pink); }
.board li.empty::before { content: none; }
.board li.empty { color: var(--dim); justify-content: center; }

.final { font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-size: 14px; color: var(--dim); }
.final b { display: block; font-weight: normal; font-size: 40px; color: var(--lime); text-shadow: 0 0 14px var(--lime); margin-top: 14px; }
form label[for], legend { display: block; font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-size: 12px; color: var(--yellow); margin: 18px auto 12px; }
fieldset { border: 0; padding: 0; margin: 10px 0 16px; }
.cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.cats label { font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-size: 10px; border: 2px solid var(--line); padding: 10px 12px; cursor: pointer; color: var(--text); }
.cats label small { color: var(--dim); margin-left: 6px; }
.cats input { position: absolute; opacity: 0; pointer-events: none; }
.cats label:hover, .cats label:has(input:focus-visible) { border-color: var(--cyan); }
.cats label:has(input:checked) { border-color: var(--pink); background: rgba(255,43,214,.2); box-shadow: 0 0 12px rgba(255,43,214,.4); }
.board .c { font-size: 8px; color: var(--cyan); border: 1px solid var(--line); padding: 3px 5px; align-self: center; }
/* Same size on every screen: no media query touches the footer */
.site-footer { flex-shrink: 0; text-align: center; font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--dim); padding: 14px 16px; border-top: 1px solid var(--line); background: rgba(10,6,24,.9); }
.site-footer p { margin: 4px 0 0; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; }
.site-footer a { color: var(--cyan); text-decoration: none; }
.site-footer a:hover, .site-footer a:focus-visible { text-decoration: underline; }
#email, #loginCode, #username, #firstName, #lastName, #eventName, #rejoinCode, #joinCode, #teamName, #teamRename, #teamDeleteName, #goalCount, #goalTopic, .search { font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-size: 16px; background: var(--panel2); color: var(--lime); border: 3px solid var(--cyan);
  padding: 14px; width: 330px; max-width: 100%; text-transform: uppercase; }
#email:focus, #loginCode:focus, #username:focus, #firstName:focus, #lastName:focus, #eventName:focus, #rejoinCode:focus, #joinCode:focus, #teamName:focus, #teamRename:focus, #teamDeleteName:focus, #goalCount:focus, #goalTopic:focus, .search:focus { outline: none; box-shadow: 0 0 14px var(--cyan); }
.msg { color: var(--red); min-height: 1.2em; }
.rank { font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-size: 16px; color: var(--yellow); min-height: 1em; }

/* Game */
.steps { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-size: clamp(12px, 1.7vw, 20px);
  color: var(--lime); padding: 6px 0 16px; border-bottom: 2px solid var(--yellow); margin-bottom: 14px; }
.steps i { font-style: normal; background: var(--lime); color: var(--bg); padding: 2px 7px; margin-right: 6px; }
.steps i.pink { background: var(--yellow); }
.steps > span:nth-child(3) { color: var(--text); }
.steps .dash { color: var(--dim); }
.progress { margin-left: auto; color: var(--cyan); }
.quit { font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-size: 11px; background: none; color: var(--red); border: 2px solid var(--red); padding: 8px 12px; }
.quit:hover, .quit:focus-visible, .quit.armed { background: var(--red); color: #fff; outline: none; }

.play { display: grid; grid-template-columns: 1fr 250px; gap: 18px; align-items: start; }
.left { min-width: 0; }
.filebar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--panel); border: 2px solid var(--line);
  border-bottom: 0; padding: 10px 14px; font-size: 14px; color: var(--cyan); }
.dots { color: var(--pink); letter-spacing: 2px; font-size: 10px; }
.chip { font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-size: 9px; border: 2px solid var(--cyan); padding: 4px 6px; }
.chip.hot { border-color: var(--yellow); background: var(--yellow); color: var(--bg); }

.code { list-style: none; counter-reset: ln; margin: 0; padding: 14px 0; background: var(--panel2); border: 2px solid var(--line);
  font-size: clamp(13px, 1.25vw, 18px); overflow-x: auto; }
.code li { counter-increment: ln; display: flex; }
.code li::before { content: counter(ln); flex: none; width: 3.2em; padding-right: 1em; text-align: right; color: var(--dim); line-height: 2; }
.code button { flex: 1; min-width: max-content; text-align: left; background: none; border: 0; border-left: 4px solid transparent;
  padding: 0 14px; white-space: pre; font-family: var(--mono); line-height: 2; }
.code button:hover:not(:disabled), .code button:focus-visible { background: rgba(0,240,255,.09); border-left-color: var(--cyan); outline: none; }
.code button:disabled { cursor: default; }
.code button.tried { border-left-color: var(--red); color: var(--dim); }
.code button.shake { animation: shake .35s; background: rgba(255,59,92,.2); }
.code button.found { background: rgba(182,255,0,.15); border-left-color: var(--lime); color: #fff; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

.ask { font-size: 20px; line-height: 1.4; color: var(--yellow); margin: 0 0 12px; font-weight: normal; }
[data-theme="corporate"] .ask { font-family: var(--serif); font-size-adjust: none; font-size: 22px; font-weight: 600; color: var(--text); }
.hint { font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-size: 10px; color: var(--dim); margin: 14px 0; animation: blink 1.4s steps(2) 3; } /* three blinks catch the eye, then it stays readable */
.fix { margin-top: 14px; background: var(--panel); border: 2px solid var(--line); border-top: 3px solid var(--pink); padding: 14px 16px 16px; }
.kicker { font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-size: 10px; color: var(--yellow); margin: 0 0 10px; }
.fix h3 { font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-weight: normal; font-size: 16px; margin: 0 0 10px; }
.desc { color: var(--text); opacity: .85; margin: 0 0 6px; font-size: 14px; line-height: 1.5; }
.owasp { color: var(--dim); margin: 0 0 6px; font-size: 12px; }
.option { display: flex; gap: 14px; width: 100%; text-align: left; background: var(--panel2); border: 2px solid var(--line);
  padding: 11px 14px; margin-top: 9px; }
.option:hover:not(:disabled), .option:focus-visible { border-color: var(--yellow); box-shadow: 0 0 14px rgba(255,230,0,.35); outline: none; }
.option:disabled { cursor: default; }
.option .k { flex: none; font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-size: 10px; color: var(--cyan); padding-top: 4px; }
.option code { font-family: var(--mono); font-size: 14px; color: var(--lime); white-space: pre-wrap; word-break: break-word; }
.option.right { border-color: var(--lime); background: rgba(182,255,0,.13); box-shadow: 0 0 16px rgba(182,255,0,.35); }
.option.wrong { border-color: var(--red); background: rgba(255,59,92,.16); }
.option.wrong code { color: var(--red); text-decoration: line-through; }

.timer { position: sticky; top: 12px; background: var(--panel); border: 2px solid var(--line); padding: 12px; text-align: center; }
.timerLabel { font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-size: 10px; color: var(--pink); margin-bottom: 10px; }
#blocks { display: block; margin: 0 auto; width: min(calc(100% - 4px), calc(min(58vh, 520px) / 2)); height: auto; aspect-ratio: 1 / 2; /* exactly the 10 x 20 grid */
  background: var(--panel2); border: 2px solid var(--line); }
.secs { font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-size: 12px; color: var(--dim); margin-top: 10px; }
.secs b { font-weight: normal; font-size: 22px; color: var(--cyan); }
.timer.danger { border-color: var(--red); animation: alarm .5s steps(2) infinite; }
.timer.danger .secs b { color: var(--red); }
@keyframes alarm { 50% { box-shadow: 0 0 22px var(--red); } }

.toast { position: fixed; left: 50%; top: 38%; transform: translate(-50%, -50%); z-index: 40; pointer-events: none;
  font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-size: clamp(22px, 4vw, 44px); padding: 18px 26px; background: rgba(10,6,24,.88);
  border: 3px solid currentColor; animation: pop .25s ease-out; text-align: center; }
.toast.good { color: var(--lime); text-shadow: 0 0 14px var(--lime); }
.toast.bad { color: var(--red); text-shadow: 0 0 14px var(--red); }
.toast.warn { color: var(--yellow); text-shadow: 0 0 14px var(--yellow); }
@keyframes pop { from { transform: translate(-50%, -50%) scale(.6); opacity: 0; } }

@media (max-width: 820px) {
  .hud { padding: 10px 12px; gap: 8px; }
  .logo { font-size: 12px; }
  .box { min-width: 0; padding: 6px 8px; }
  .score b { font-size: 24px; }
  main { padding: 12px; }
  .play { grid-template-columns: 1fr 132px; gap: 10px; }
  .timer { padding: 6px; }
  #blocks { width: calc(100% - 4px); }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }

/* ---------- Accounts, lobby, sharing ---------- */
.sound { position: relative; }
/* Header: logo, game stats (game screen only) and one settings icon */
.stats { display: flex; flex: 1; align-items: center; gap: 14px; }
body:not([data-screen="game"]) .hud .stats { display: none; }
.sound { margin-left: auto; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 46px; height: 46px; padding: 0; background: none;
  border: 3px solid var(--cyan); color: var(--cyan); cursor: pointer; }
.icon-btn:hover, .icon-btn:focus-visible, .icon-btn[aria-expanded="true"] { background: var(--cyan); color: var(--bg); outline: none; }
.icon-btn.off::after { content: ''; position: absolute; top: -5px; right: -5px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); border: 2px solid var(--bg); }

.title.small { font-size: clamp(24px, 5vw, 44px); }
.link { background: none; border: 0; color: var(--cyan); text-decoration: underline; font-size: 13px; padding: 6px; }
.note { color: var(--dim); font-size: 13px; line-height: 1.6; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 14px 0; }
.big.alt { background: var(--panel); border: 2px solid var(--cyan); color: var(--cyan); box-shadow: 4px 4px 0 var(--pink); }
.big.alt:hover:not(:disabled), .big.alt:focus-visible { background: var(--cyan); color: var(--bg); }
.big:disabled { opacity: .45; cursor: default; }
a.big { display: inline-block; text-decoration: none; }
.big.linkedin { background: #0a66c2; box-shadow: 5px 5px 0 var(--cyan); }
.profile { border: 2px solid var(--line); background: var(--panel); padding: 16px; margin: 20px auto 6px; text-align: left; }
.profile { display: grid; grid-template-columns: auto 1fr; column-gap: 18px; align-items: center; }
.profile > :not(.avatar-col) { grid-column: 2; }
.avatar-col { grid-row: 1 / span 6; align-self: start; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.avatar-link { padding: 2px 4px; font-size: 12px; }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 12px 0 0; }
/* Profile photo (or initials): click to change. Square photo, shown as a circle. */
.avatar { position: relative; display: grid; place-items: center; width: 64px; height: 64px; padding: 0;
  border-radius: 50%; overflow: hidden; cursor: pointer; border: 2px solid var(--cyan); background: #1c1146; color: var(--cyan);
  font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); font-size: 16px; box-shadow: 0 0 12px rgba(0,240,255,.4); }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar-cam { position: absolute; inset: 0; opacity: 0; transition: opacity .15s; background: rgba(0,0,0,.5) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h3l2-3h6l2 3h3v11H4z'/%3E%3Ccircle cx='12' cy='13' r='3.5'/%3E%3C/svg%3E") center / 22px no-repeat; }
.avatar:hover .avatar-cam, .avatar:focus-visible .avatar-cam { opacity: 1; }
.avatar:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
.photo-msg { font-size: 12px; color: var(--dim); }
.photo-msg.bad, .uname-status.bad { color: var(--red); }
.uname-status { min-height: 1.3em; margin: 6px 0 0; font-size: 12px; color: var(--dim); }
.uname-status.ok { color: var(--lime); }
.who { display: inline-flex; align-items: center; gap: 10px; }
.mini-av { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
  background: var(--panel2); color: var(--cyan); border: 1px solid var(--line); font-size: 11px; }
.big-table .mini-av { width: 40px; height: 40px; font-size: 14px; }
[data-theme="corporate"] .mini-av { color: var(--dim); font-weight: 600; }
[data-theme="corporate"] .uname-status { font-size: 13px; }
[data-theme="corporate"] .avatar:focus-visible { outline-color: rgba(194,97,63,.5); }
.profile b { font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-size: 18px; color: var(--cyan); margin-right: 10px; }
.xpbar { height: 12px; background: var(--panel2); border: 2px solid var(--line); margin: 12px 0 6px; }
.xpbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--pink), var(--yellow)); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; justify-content: center; }
/* Medals: a ring in the tier colour around a line icon. Tiers: common, rare, epic, master (gold). */
.medal { --t: var(--cyan); position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 50%;
  color: var(--t); background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--t) 22%, var(--panel2)), var(--panel2) 70%);
  border: 2px solid var(--t); }
.medal svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.medal text { fill: currentColor; stroke: none; font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Arial, sans-serif; font-weight: 800; }
.medal.tier-rare { --t: var(--lime); }
.medal.tier-epic { --t: var(--pink); }
.medal.tier-master { --t: var(--yellow); }
.medal.tier-master::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 1px dashed color-mix(in srgb, var(--t) 60%, transparent); }
.medal.locked { --t: var(--dim); background: var(--panel2); border-style: dashed; opacity: .5; }
.medal.locked::after { display: none; }
/* Player card: a Badges button with the latest three as small overlapping medals */
.badges-btn { display: inline-flex; align-items: center; gap: 10px; padding: 5px 12px 5px 8px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); font-size: 12px; cursor: pointer; }
.badges-btn:hover, .badges-btn:focus-visible { border-color: var(--cyan); outline: none; }
.badges-peek { display: inline-flex; }
.badges-peek:empty { display: none; }
.medal.medal-mini { width: 24px; height: 24px; border-width: 1.5px; margin-left: -7px; box-shadow: 0 0 0 2px var(--panel2) !important; }
.medal.medal-mini:first-child { margin-left: 0; }
.medal.medal-mini svg { width: 15px; height: 15px; }
.medal.medal-mini::after { display: none; }
/* Badges window */
.badges-dialog { width: min(680px, calc(100vw - 24px)); max-height: calc(100vh - 48px); padding: 22px 24px 8px; background: var(--panel); color: var(--text); border: 2px solid var(--cyan); }
.badges-dialog::backdrop { background: rgba(6,3,16,.72); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-title { margin: 0; font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-weight: normal; font-size: 16px; color: var(--pink); text-shadow: none; }
.dialog-close { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); background: none; color: var(--text); cursor: pointer; }
.dialog-close:hover, .dialog-close:focus-visible { border-color: var(--cyan); color: var(--cyan); outline: none; }
.badge-group { margin: 18px 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.badge-group[hidden], .badge-grid[hidden] { display: none; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px 18px; padding-bottom: 14px; }
.badge-tile { display: flex; align-items: center; gap: 12px; }
.badge-tile .medal { flex: none; }
.badge-tile b { display: block; font-size: 13px; color: var(--text); }
.badge-tile small { display: block; margin-top: 2px; font-size: 11px; line-height: 1.4; color: var(--dim); }
.badge-tile.locked b { color: var(--dim); }
:root:not([data-theme="corporate"]) .badges-btn { font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-size: 9px; }
:root:not([data-theme="corporate"]) .badges-dialog { box-shadow: 6px 6px 0 var(--pink), 0 0 40px rgba(0,240,255,.2); }
[data-theme="corporate"] .badges-btn { border-radius: 999px; background: #fff; font-weight: 500; box-shadow: 0 1px 2px rgba(43,42,39,.06); }
[data-theme="corporate"] .badges-btn:hover, [data-theme="corporate"] .badges-btn:focus-visible { border-color: var(--pink); }
[data-theme="corporate"] .medal.medal-mini { box-shadow: 0 0 0 2px #fff !important; }
[data-theme="corporate"] .badges-dialog { border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); }
[data-theme="corporate"] .badges-dialog::backdrop { background: rgba(31,30,27,.42); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
[data-theme="corporate"] .dialog-title { font-family: var(--serif); font-size-adjust: none; font-size: 24px; font-weight: 600; color: var(--text); }
[data-theme="corporate"] .dialog-close { border-radius: 10px; }
.big-badges { gap: 18px; }
.medal.medal-big { width: auto; height: auto; display: inline-flex; flex-direction: column; align-items: center; gap: 8px; border: 0; background: none; cursor: default; animation: medal-in .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.medal.medal-big svg { box-sizing: border-box; width: 64px; height: 64px; padding: 14px; border-radius: 50%; border: 3px solid var(--t); background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--t) 28%, var(--panel2)), var(--panel2) 70%); }
.medal.medal-big.tier-master::after { inset: -5px auto auto 50%; width: 74px; height: 74px; transform: translateX(-50%); }
.medal.medal-big:nth-child(2) { animation-delay: .12s; } .medal.medal-big:nth-child(3) { animation-delay: .24s; } .medal.medal-big:nth-child(n+4) { animation-delay: .36s; }
.medal-name { font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-size: 10px; color: var(--t); max-width: 120px; text-align: center; line-height: 1.4; }
@keyframes medal-in { from { transform: scale(.3) rotate(-25deg); opacity: 0; } }
:root:not([data-theme="corporate"]) .medal:not(.locked):not(.medal-big):not(.medal-mini) { box-shadow: 0 0 10px color-mix(in srgb, var(--t) 45%, transparent), inset 0 0 8px color-mix(in srgb, var(--t) 25%, transparent); }
:root:not([data-theme="corporate"]) .medal.medal-big svg { box-shadow: 0 0 18px color-mix(in srgb, var(--t) 55%, transparent); }
[data-theme="corporate"] .medal:not(.locked):not(.medal-big), [data-theme="corporate"] .medal.medal-big svg { background: color-mix(in srgb, var(--t) 9%, #fff); box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 3px 8px color-mix(in srgb, var(--t) 18%, transparent); }
[data-theme="corporate"] .medal { border-width: 1.5px; }
[data-theme="corporate"] .medal-name { font-size: 12px; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .medal.medal-big { animation: none; } .medal { transition: none; } }
.banner { font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-size: 11px; background: var(--pink); color: #fff; padding: 12px; margin-top: 14px; }
.banner.ended { background: var(--panel); color: var(--dim); border: 2px solid var(--line); }
.banner { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 16px; }
.leave { font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-size: 9px; background: #fff; color: var(--pink); border: 0; padding: 7px 10px; cursor: pointer; }
.leave:hover, .leave:focus-visible { background: var(--yellow); color: var(--bg); outline: none; }
.challenge-banner { background: var(--cyan); color: var(--bg); }
.code-form { max-width: 420px; margin: 18px auto 0; }
.code-form label { display: block; margin-bottom: 8px; }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .2em; text-align: center; font-size: 18px; }

/* Lobby: Press start is the one big button; the other modes are smaller, and the rules and the code box fold away */
#start .modes { gap: 10px; }
#start .modes .big { font-size: 11px; padding: 10px 14px; margin: 0; }
:root:not([data-theme="corporate"]) #start .modes .big:not(:hover):not(:focus-visible) { box-shadow: 3px 3px 0 var(--pink); }
[data-theme="corporate"] #start .modes .big { font-size: 13px; padding: 9px 16px; }
.fold > summary { cursor: pointer; color: var(--cyan); font-size: 13px; padding: 6px; width: fit-content; margin: 0 auto; }
.fold .code-form { margin-top: 8px; }

/* Lobby: tip jar link and the "Suggest an idea" form */
.coffee-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; padding: 9px 14px; font-family: var(--pixel); font-size-adjust: var(--pixel-adjust);
  text-transform: var(--pixel-case); font-size: 10px; color: var(--yellow); border: 2px solid var(--yellow); box-shadow: 3px 3px 0 var(--pink); }
.coffee-link:hover, .coffee-link:focus-visible { background: var(--yellow); color: var(--bg); outline: none; }
[data-theme="corporate"] .coffee-link { font-family: inherit; font-size-adjust: none; font-size: 14px; font-weight: 600; color: var(--text); border: 1px solid var(--line);
  border-radius: 999px; background: var(--panel); box-shadow: var(--shadow-sm); }
[data-theme="corporate"] .coffee-link:hover, [data-theme="corporate"] .coffee-link:focus-visible { background: var(--panel); color: var(--text); border-color: var(--pink); }
.idea-dialog { width: min(540px, calc(100vw - 24px)); padding-bottom: 16px; }
.idea-form label[for] { font-family: var(--mono); font-size-adjust: none; text-transform: none; font-size: 14px; line-height: 1.5; color: var(--text); text-align: left; margin: 16px 0 10px; }
.idea-form textarea { display: block; width: 100%; box-sizing: border-box; min-height: 130px; resize: vertical; padding: 10px 12px; font: 14px/1.5 var(--mono);
  background: var(--panel2); color: var(--text); border: 2px solid var(--cyan); }
.idea-form textarea:focus { outline: none; box-shadow: 0 0 14px var(--cyan); }
.idea-form .note { text-align: left; margin: 10px 0 0; }
.idea-form .row { justify-content: flex-start; margin: 14px 0 6px; }
[data-theme="corporate"] .idea-form label[for] { font-family: inherit; color: var(--text); }
[data-theme="corporate"] .idea-form textarea { font-family: inherit; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
[data-theme="corporate"] .idea-form textarea:focus { border-color: var(--pink); box-shadow: 0 0 0 3px var(--tint); }
.team-code b, #hostCode, #evCode { letter-spacing: .12em; }
.team-code { font-size: 18px; margin: 4px 0; }
.team-code b { color: var(--yellow); font-size: 24px; }
[data-theme="corporate"] .team-code b { color: var(--accent-dark); }
.team-form { display: grid; gap: 8px; max-width: 460px; margin: 10px auto; text-align: left; }
.team-goal-row { display: flex; gap: 8px; }
.team-goal-row select { flex: 1; min-width: 0; }
.team-form > * { min-width: 0; } /* long topic names can't push the form wider than the screen */
.team-form .big { margin: 8px 0; }
.team-form > :is(#teamName, #teamRename, #teamDeleteName) { width: 100%; } /* full width, so the box lines up with the button under it */
.team-goal-row input { width: 90px; }
.team-goal { font-weight: 600; color: var(--yellow); }
.team-owner { margin-top: 22px; text-align: left; }
.team-owner h2 { font-size: 14px; margin: 18px 0 6px; }
.team-link { word-break: break-all; color: var(--cyan); }
.goal-bar { display: inline-block; width: 70px; height: 8px; margin-right: 8px; background: var(--panel2); border: 1px solid var(--line); vertical-align: middle; }
.goal-bar i { display: block; height: 100%; background: var(--lime); }
.danger-link { color: var(--red); }
[data-theme="corporate"] .goal-bar { border-radius: 999px; overflow: hidden; border: 0; background: #efebe2; }
[data-theme="corporate"] .team-goal { color: var(--accent-dark); }
.challenge-banner .leave { color: var(--bg); }
.banner-actions { display: inline-flex; gap: 8px; }
/* Practice: no breach timer, lives or score; a Next button after each answer */
body[data-practice="1"] .hud .stats { visibility: hidden; }
body[data-practice="1"] #timerBox { display: none; }
body[data-practice="1"] .play { grid-template-columns: 1fr; }
.next-btn { margin-top: 14px; }
/* Everyday Security: messages and screens read in a normal font, not as code */
#game[data-kind="everyday"] .code button, #game[data-kind="everyday"] .option code { font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; letter-spacing: 0; text-transform: none; }
#game[data-kind="everyday"] .code button { white-space: pre-wrap; }
.vs-msg { margin: 6px 0 0; font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-size: 12px; color: var(--yellow); }
[data-theme="corporate"] .challenge-banner { background: #eef4f7; color: var(--text); border: 1px solid #cfe0e8; }
[data-theme="corporate"] .challenge-banner .leave { background: #fff; color: var(--text); border: 1px solid var(--line); }
[data-theme="corporate"] .vs-msg { font-size: 15px; font-weight: 600; color: var(--accent-dark); }
.poster { display: block; width: 100%; max-width: 720px; height: auto; margin: 16px auto; border: 2px solid var(--line); }
.menu.wide { max-width: 980px; }
.tabs { display: flex; justify-content: center; gap: 8px; margin: 10px 0 16px; flex-wrap: wrap; }
.tab { font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-size: 11px; background: none; color: var(--dim); border: 2px solid var(--line); padding: 10px 12px; }
.tab.active { color: var(--bg); background: var(--cyan); border-color: var(--cyan); }
.search { width: 420px; }
.table { width: 100%; border-collapse: collapse; font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-size: 11px; margin-top: 10px; }
.table th { color: var(--dim); font-weight: normal; text-align: left; padding: 10px 8px; border-bottom: 2px solid var(--line); }
.table td { padding: 10px 8px; border-bottom: 1px dashed var(--line); text-align: left; }
.table td.s { color: var(--lime); }
.table tr.me td { background: rgba(255,43,214,.18); }
.table tr.empty td { color: var(--dim); text-align: center; }
.qr { background: #fff; padding: 10px; image-rendering: pixelated; }
body.share main { padding-top: 40px; }

/* ---------- Event big screen ---------- */
.event-screen .hud { justify-content: space-between; }
.ev-name { font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-size: clamp(16px, 2.4vw, 30px); color: var(--text); text-align: center; flex: 1; }
.ev-grid { display: grid; grid-template-columns: minmax(280px, 1fr) 2fr; gap: 28px; max-width: 1600px; }
.ev-join { text-align: center; background: var(--panel); border: 2px solid var(--line); padding: 20px; }
.big-qr { width: min(320px, 80%); height: auto; }
.quit-big { background: var(--red); box-shadow: 5px 5px 0 var(--yellow); }
.big-table { font-size: clamp(12px, 1.4vw, 20px); }
.big-table tr.top1 td { color: var(--yellow); }
.big-table tr.top2 td { color: var(--cyan); }
.big-table tr.top3 td { color: var(--pink); }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 16px; margin: 20px 0 30px; }
.podium .step { display: flex; flex-direction: column; align-items: center; gap: 10px; background: var(--panel); border: 3px solid var(--yellow); padding: 18px; font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); min-width: 180px; animation: pop .5s ease-out; }
.podium .place1 { min-height: 220px; border-color: var(--yellow); }
.podium .place2 { min-height: 170px; border-color: var(--cyan); }
.podium .place3 { min-height: 140px; border-color: var(--pink); }
.podium-medal { font-size: 44px; }
.podium b { font-weight: normal; font-size: 16px; color: #fff; }
@media (max-width: 820px) { .ev-grid { grid-template-columns: 1fr; } .search { width: 100%; } }

/* ---------- Legal pages ---------- */
.legal-page .hud a.logo { text-decoration: none; }
.legal { max-width: 820px; margin: 0 auto; line-height: 1.7; font-size: 15px; }
.legal h1 { font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-weight: normal; font-size: clamp(20px, 4vw, 32px); color: var(--pink); margin: 28px 0 8px; }
.legal h2 { font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-weight: normal; font-size: 14px; color: var(--cyan); margin: 34px 0 10px; text-shadow: none; }
.legal h3 { font-size: 15px; color: var(--yellow); margin: 20px 0 6px; }
.legal .meta { color: var(--dim); font-size: 13px; }
.legal a { color: var(--cyan); }
.legal code { color: var(--lime); }
.legal li { margin: 4px 0; }
.callout { border: 2px solid var(--yellow); background: rgba(255,230,0,.08); padding: 14px 16px; margin: 18px 0; }



/* ---------- Profile form ---------- */
.profile-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.profile-form input { width: 100%; box-sizing: border-box; }
.profile-form .two label { text-align: left; }
.welcome { font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-size: 12px; color: var(--yellow); margin: 0 0 10px; }
@media (max-width: 560px) { .profile-form .two { grid-template-columns: 1fr; } }

/* ---------- Settings panel: theme, music, your music, effects ---------- */
.sound-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: 430px; max-width: calc(100vw - 24px); max-height: calc(100vh - 100px); overflow-y: auto;
  background: var(--panel); border: 3px solid var(--yellow); box-shadow: 5px 5px 0 var(--pink); text-align: left; font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-size: 10px; }
.ptabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-bottom: 2px solid var(--line); }
.ptab { font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-size: 8px; white-space: nowrap; background: none; color: var(--dim); border: 0; padding: 12px 4px; cursor: pointer; }
.ptab.active { color: var(--bg); background: var(--yellow); }
.ptab:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }
.pane { padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.pane[hidden] { display: none; }
.pane .check { display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--text); line-height: 1.5; }
.pane .field { display: flex; flex-direction: column; gap: 8px; }
.pane .field label, .pane .flabel { color: var(--dim); }
.pane input[type=range] { width: 100%; accent-color: var(--pink); }
.pane input[type=checkbox], .pane input[type=radio] { accent-color: var(--pink); width: 16px; height: 16px; flex: none; }
.tracks { display: flex; flex-direction: column; gap: 10px; }
.theme-card { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px; border: 2px solid var(--line); cursor: pointer; }
.theme-card:hover { border-color: var(--cyan); }
.theme-card:has(input:checked) { border-color: var(--pink); }
.theme-card:has(input:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 2px; }
.theme-card input { position: absolute; opacity: 0; pointer-events: none; }
.theme-card b { display: block; font-weight: normal; color: var(--text); }
.theme-card small { display: block; margin-top: 6px; font-family: var(--mono); font-size-adjust: none; font-size: 11px; line-height: 1.5; color: var(--dim); }
/* Fixed preview colors, so each card shows its own theme whichever one is active */
.swatch { flex: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; width: 64px; height: 44px; padding: 6px; border: 1px solid #00000022; border-radius: 6px; }
.swatch i { border-radius: 2px; }
.swatch-corporate { background: #faf9f5; }
.swatch-corporate i:nth-child(1) { background: #c2613f; } .swatch-corporate i:nth-child(2) { background: #2b2a27; } .swatch-corporate i:nth-child(3) { background: #e3ded2; }
.swatch-arcade { background: #0a0618; }
.swatch-arcade i:nth-child(1) { background: #ff2bd6; } .swatch-arcade i:nth-child(2) { background: #00f0ff; } .swatch-arcade i:nth-child(3) { background: #b6ff00; }
.fine { font-family: var(--mono); font-size: 10px; line-height: 1.6; color: var(--dim); }
.fine a { color: var(--cyan); }
.searchrow { display: flex; gap: 6px; }
.searchrow input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12px; background: var(--panel2); color: var(--text); border: 2px solid var(--cyan); padding: 9px; }
.searchrow input:disabled { border-color: var(--line); }
.mini { font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-size: 9px; background: var(--pink); color: #fff; border: 0; padding: 10px 12px; cursor: pointer; text-align: center; }
.mini:disabled { opacity: .4; cursor: default; }
.mini.file { display: block; background: var(--panel2); color: var(--cyan); border: 2px solid var(--cyan); }
.mini:hover:not(:disabled), .mini:focus-visible { background: var(--yellow); color: var(--bg); outline: none; }
#extFile:focus-visible + label { outline: 2px solid var(--yellow); }
.ext-msg { color: var(--red); font-family: var(--mono); font-size: 11px; margin: 0; }
.ext-msg:empty { display: none; }

/* ---------- Your music: what's playing, with pause and stop (nothing else shows on screen) ---------- */
.now-playing { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px; border: 2px dashed var(--yellow); }
.now-playing[hidden] { display: none; }
#nowText { flex: 1 1 170px; font-family: var(--mono); font-size-adjust: none; text-transform: none; font-size: 11px; line-height: 1.5; color: var(--text); }
.now-btns { display: flex; gap: 6px; }
.now-btns [hidden] { display: none; }

/* ---------- Rejoin an event with the big-screen code ---------- */
.rejoin { border: 3px solid var(--pink); background: var(--panel); padding: 16px; margin-top: 14px; }
#rejoinCode { text-align: center; letter-spacing: 8px; text-transform: uppercase; width: 260px; max-width: 100%; }

/* ---------- Corporate theme: calm and light for playing at work ----------
   Warm off-white, one terracotta accent, serif headings, no glow, scanlines or pixel font.
   Every rule is scoped to [data-theme="corporate"], so the arcade theme is untouched. */
:root[data-theme="corporate"] {
  color-scheme: light;
  --bg: #faf9f5; --panel: #ffffff; --panel2: #f4f2ec; --line: #e3ded2;
  --pink: #c2613f; --cyan: #44607a; --lime: #3d7a4f; --yellow: #8f6320; --red: #b3412f;
  --text: #2b2a27; --dim: #6f6b62;
  --pixel: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --pixel-adjust: 0.62; /* the pixel font's small sizes would make sans-serif text tiny, so scale it up */
  --pixel-case: none;
  --serif: ui-serif, 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --accent-dark: #a94f30;
  --tint: rgba(194,97,63,.10);
}
[data-theme="corporate"] body { background: var(--bg); font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; }
[data-theme="corporate"] .legal { font-size: 16px; }
[data-theme="corporate"] .crt { display: none; }
[data-theme="corporate"] * { text-shadow: none !important; }
[data-theme="corporate"] #startBtn, [data-theme="corporate"] .hint { animation: none; }

[data-theme="corporate"] .hud { background: var(--panel); border-bottom: 1px solid var(--line); box-shadow: none; }
[data-theme="corporate"] .logo { font-family: var(--serif); font-size-adjust: none; font-size: 22px; font-weight: 600; color: var(--text); border: 0; padding: 6px 4px; }
[data-theme="corporate"] .logo span { color: var(--pink); margin-left: 6px; }
[data-theme="corporate"] .box { border: 1px solid var(--line); border-radius: 10px; color: var(--text); }
[data-theme="corporate"] .title { font-family: var(--serif); font-size-adjust: none; font-weight: 600; color: var(--text); letter-spacing: -0.01em; font-size: clamp(36px, 6.5vw, 64px); }
[data-theme="corporate"] .title.small { font-size: clamp(26px, 4.5vw, 40px); }
[data-theme="corporate"] h2, [data-theme="corporate"] .legal h1, [data-theme="corporate"] .legal h2, [data-theme="corporate"] .fix h3 { font-family: var(--serif); font-size-adjust: none; font-weight: 600; color: var(--text); }
[data-theme="corporate"] h2, [data-theme="corporate"] .legal h2 { font-size: 20px; }
[data-theme="corporate"] .legal h1 { font-size: clamp(28px, 4vw, 38px); }
[data-theme="corporate"] .fix h3 { font-size: 20px; }
[data-theme="corporate"] .how b, [data-theme="corporate"] .steps i { color: #fff; border-radius: 6px; }

[data-theme="corporate"] .big { border-radius: 10px; box-shadow: none; font-weight: 600; letter-spacing: .02em; }
[data-theme="corporate"] .big:hover, [data-theme="corporate"] .big:focus-visible { background: var(--accent-dark); color: #fff; }
[data-theme="corporate"] .big:active { transform: none; box-shadow: none; }
[data-theme="corporate"] .big.alt { background: var(--panel); border: 1px solid var(--line); color: var(--text); box-shadow: none; }
[data-theme="corporate"] .big.alt:hover:not(:disabled), [data-theme="corporate"] .big.alt:focus-visible { background: var(--panel2); color: var(--text); border-color: var(--pink); }
[data-theme="corporate"] .big.linkedin { box-shadow: none; }
[data-theme="corporate"] .big.linkedin:hover { background: #084f96; }
[data-theme="corporate"] .quit-big { box-shadow: none; }

[data-theme="corporate"] :is(#email, #loginCode, #username, #firstName, #lastName, #eventName, #rejoinCode, #joinCode, #teamName, #teamRename, #teamDeleteName, #goalCount, #goalTopic, .search) {
  background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 10px; text-transform: none; }
[data-theme="corporate"] #rejoinCode { text-transform: uppercase; }
[data-theme="corporate"] :is(#email, #loginCode, #username, #firstName, #lastName, #eventName, #rejoinCode, #joinCode, #teamName, #teamRename, #teamDeleteName, #goalCount, #goalTopic, .search):focus { border-color: var(--pink); box-shadow: 0 0 0 3px var(--tint); }
[data-theme="corporate"] form label[for], [data-theme="corporate"] legend, [data-theme="corporate"] .welcome, [data-theme="corporate"] .kicker { color: var(--dim); }

[data-theme="corporate"] .cats label { border: 1px solid var(--line); border-radius: 999px; background: var(--panel); }
[data-theme="corporate"] .cats label:has(input:checked) { border-color: var(--pink); background: var(--tint); box-shadow: none; color: var(--accent-dark); }
[data-theme="corporate"] .board li, [data-theme="corporate"] .table td { border-bottom: 1px solid var(--line); }
[data-theme="corporate"] .board li.me, [data-theme="corporate"] .table tr.me td { background: var(--tint); outline: none; }
[data-theme="corporate"] .tab { border: 1px solid var(--line); border-radius: 999px; }
[data-theme="corporate"] .tab.active { color: #fff; background: var(--text); border-color: var(--text); }
[data-theme="corporate"] .profile, [data-theme="corporate"] .rejoin { border: 1px solid var(--line); border-radius: 12px; }
[data-theme="corporate"] .xpbar { border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
[data-theme="corporate"] .xpbar i { background: var(--pink); }
[data-theme="corporate"] .banner { border-radius: 10px; }
[data-theme="corporate"] .poster { border: 1px solid var(--line); border-radius: 10px; }
[data-theme="corporate"] .callout { border: 1px solid var(--line); border-left: 4px solid var(--yellow); background: rgba(143,99,32,.06); border-radius: 8px; }

/* Game screen */
[data-theme="corporate"] .steps { color: var(--text); border-bottom: 1px solid var(--line); }
[data-theme="corporate"] .steps i { background: var(--pink); }
[data-theme="corporate"] .steps i.pink { background: var(--text); }
[data-theme="corporate"] .quit { border-width: 1px; border-radius: 8px; }
[data-theme="corporate"] .filebar { border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; color: var(--text); }
[data-theme="corporate"] .dots { color: var(--line); }
[data-theme="corporate"] .chip { border: 1px solid var(--line); border-radius: 6px; color: var(--dim); }
[data-theme="corporate"] .chip.hot { color: #fff; }
[data-theme="corporate"] .code { border: 1px solid var(--line); border-radius: 0 0 12px 12px; background: var(--panel); }
[data-theme="corporate"] .code button { color: var(--text); }
[data-theme="corporate"] .code button:hover:not(:disabled), [data-theme="corporate"] .code button:focus-visible { background: rgba(68,96,122,.07); border-left-color: var(--cyan); }
[data-theme="corporate"] .code button.shake { background: rgba(179,65,47,.10); }
[data-theme="corporate"] .code button.found { background: rgba(61,122,79,.10); color: var(--text); }
[data-theme="corporate"] .fix { border: 1px solid var(--line); border-top: 3px solid var(--pink); border-radius: 12px; }
[data-theme="corporate"] .option { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
[data-theme="corporate"] .option:hover:not(:disabled), [data-theme="corporate"] .option:focus-visible { border-color: var(--pink); box-shadow: 0 0 0 3px var(--tint); }
[data-theme="corporate"] .option code { color: var(--text); }
[data-theme="corporate"] .option.right { border-color: var(--lime); background: rgba(61,122,79,.08); box-shadow: none; }
[data-theme="corporate"] .option.wrong { background: rgba(179,65,47,.06); }
[data-theme="corporate"] .timer { border: 1px solid var(--line); border-radius: 12px; }
[data-theme="corporate"] .timerLabel { color: var(--dim); }
[data-theme="corporate"] #blocks { border: 1px solid var(--line); border-radius: 8px; }
[data-theme="corporate"] .timer.danger { border-color: var(--red); animation: none; box-shadow: 0 0 0 3px rgba(179,65,47,.15); }
[data-theme="corporate"] .toast { background: rgba(255,255,255,.97); border-width: 1px; border-radius: 14px; box-shadow: 0 12px 36px rgba(43,42,39,.14); }

/* Panels and footer */
[data-theme="corporate"] .sound-panel { border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 36px rgba(43,42,39,.14); }
[data-theme="corporate"] .ptab.active { color: #fff; background: var(--text); }
[data-theme="corporate"] .mini { border-radius: 8px; }
[data-theme="corporate"] .mini:hover:not(:disabled), [data-theme="corporate"] .mini:focus-visible { background: var(--accent-dark); color: #fff; }
[data-theme="corporate"] .mini.file, [data-theme="corporate"] .searchrow input, [data-theme="corporate"] .result { border: 1px solid var(--line); border-radius: 8px; }
[data-theme="corporate"] .result:hover, [data-theme="corporate"] .result:focus-visible { border-color: var(--pink); }
[data-theme="corporate"] .site-footer { background: var(--panel); }
[data-theme="corporate"] :is(.site-footer, .fine, .ext-msg, .searchrow input, #nowText) { font-family: inherit; }
[data-theme="corporate"] .filebar { font-family: var(--mono); }

/* ---------- Corporate theme: finish ---------- */
[data-theme="corporate"] .hud { padding: 12px 32px; gap: 16px; min-height: 68px; }
[data-theme="corporate"] .stats .box { border: 0; background: var(--panel2); }
[data-theme="corporate"] .stats .score b { font-size: 30px; font-weight: 600; }
[data-theme="corporate"] .icon-btn { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; color: var(--dim); }
[data-theme="corporate"] .icon-btn:hover, [data-theme="corporate"] .icon-btn:focus-visible, [data-theme="corporate"] .icon-btn[aria-expanded="true"] { background: var(--panel2); color: var(--text); border-color: var(--line); }
[data-theme="corporate"] .icon-btn.off::after { border-color: var(--panel); }

/* Settings panel */
[data-theme="corporate"] .sound-panel { width: 360px; font-size-adjust: none; font-size: 14px; }
[data-theme="corporate"] .ptabs { border-bottom: 1px solid var(--line); padding: 0 8px; }
[data-theme="corporate"] .ptab { font-size-adjust: none; font-size: 13px; font-weight: 500; color: var(--dim); padding: 14px 4px 12px; }
[data-theme="corporate"] .ptab.active { color: var(--text); background: none; box-shadow: inset 0 -2px 0 var(--pink); }
[data-theme="corporate"] .ptab:hover { color: var(--text); }
[data-theme="corporate"] .pane { gap: 14px; padding: 18px; }
[data-theme="corporate"] .theme-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
[data-theme="corporate"] .theme-card:hover { border-color: #cfc8b8; }
[data-theme="corporate"] .theme-card:has(input:checked) { border-color: var(--pink); box-shadow: 0 0 0 3px var(--tint); }
[data-theme="corporate"] .theme-card b { font-weight: 600; font-size: 15px; }
[data-theme="corporate"] .theme-card small { font-family: inherit; font-size: 13px; margin-top: 2px; }
[data-theme="corporate"] .mini { font-size-adjust: none; font-size: 13px; font-weight: 500; }
[data-theme="corporate"] .pane input[type=range], [data-theme="corporate"] .pane input[type=checkbox], [data-theme="corporate"] .pane input[type=radio] { accent-color: var(--pink); }

/* Type scale: real sizes instead of the scaled pixel-font ones */
[data-theme="corporate"] :is(.big, .tab, .cats label, .quit, legend, form label[for], .kicker, .hint, .welcome, .chip, .banner, .leave, .timerLabel, .secs, .table, .rank, .final, .steps, .option .k) { font-size-adjust: none; letter-spacing: 0; }
[data-theme="corporate"] .big { font-size: 15px; padding: 13px 24px; margin: 6px; }
[data-theme="corporate"] .team-form .big { margin-inline: 0; } /* lines up with the full-width box above it */
[data-theme="corporate"] :is(.tab, .cats label, .quit, .leave) { font-size: 13px; font-weight: 500; }
[data-theme="corporate"] .cats label { padding: 8px 16px; }
[data-theme="corporate"] :is(legend, form label[for]) { font-size: 14px; font-weight: 500; color: var(--dim); }
[data-theme="corporate"] :is(.kicker, .hint, .welcome, .timerLabel) { font-size: 13px; font-weight: 500; color: var(--dim); }
[data-theme="corporate"] .chip { font-size: 12px; font-weight: 500; }
[data-theme="corporate"] .banner { font-size: 14px; }
[data-theme="corporate"] .table { font-size: 14px; }
[data-theme="corporate"] .table th { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
[data-theme="corporate"] .rank { font-size: 16px; font-weight: 600; color: var(--text); }
[data-theme="corporate"] .final { font-size: 14px; font-weight: 500; }
[data-theme="corporate"] .final b { font-family: var(--serif); font-size: 56px; font-weight: 600; color: var(--text); }
[data-theme="corporate"] .steps { font-size: 17px; font-weight: 600; }
[data-theme="corporate"] .secs { font-size: 13px; }
[data-theme="corporate"] .secs b { font-size: 26px; font-weight: 600; color: var(--text); }
[data-theme="corporate"] .option .k { font-size: 13px; color: var(--dim); padding-top: 1px; }
[data-theme="corporate"] .toast { font-size-adjust: none; font-size: 22px; font-weight: 600; }

/* Lobby */
[data-theme="corporate"] .menu { max-width: 760px; }
[data-theme="corporate"] .profile { padding: 20px 22px; box-shadow: 0 1px 2px rgba(43,42,39,.04); }
[data-theme="corporate"] .profile b { font-family: var(--serif); font-size-adjust: none; font-size: 26px; font-weight: 600; color: var(--text); }
[data-theme="corporate"] .welcome { margin-bottom: 6px; }
[data-theme="corporate"] .xpbar { height: 6px; margin: 14px 0 8px; }
[data-theme="corporate"] #pXp { color: var(--dim); font-size: 13px; }
[data-theme="corporate"] .how { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; line-height: 1.5; margin: 28px auto; font-size: 14px; color: var(--dim); }
[data-theme="corporate"] .how li { display: flex; align-items: baseline; }
[data-theme="corporate"] .how b { font-family: inherit; font-size-adjust: none; font-size: 12px; font-weight: 600; background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 50%; width: 22px; height: 22px; display: inline-grid; place-items: center; padding: 0; flex: none; }
[data-theme="corporate"] .tag { font-size: 16px; }
[data-theme="corporate"] .row { gap: 4px; }
[data-theme="corporate"] .note { font-size: 13px; }
@media (max-width: 560px) { [data-theme="corporate"] .how { grid-template-columns: 1fr; } }

/* Text-font children of pixel-font containers, and names players typed, keep their own case in every theme */
:is(.fine, .ext-msg, .searchrow input, .theme-card small, .profile b, .table td, .board .n) { text-transform: none; }

/* ---------- Arcade finish ----------
   Scoped to "not Corporate", so it also covers the event big screen (which has no theme picker). */
/* Stage: a slow synthwave grid on the horizon, behind everything (not on the long legal pages) */
:root:not([data-theme="corporate"]) body:not(.legal-page)::before {
  content: ''; position: fixed; left: -50%; right: -50%; bottom: 0; height: 62vh; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to top, rgba(255,43,214,.75) 4px, transparent 4px) 0 0 / 100% 46px,
    linear-gradient(to right, rgba(0,240,255,.42) 2px, transparent 2px) 50% 0 / 62px 100%;
  transform: perspective(340px) rotateX(60deg); transform-origin: bottom;
  -webkit-mask-image: linear-gradient(to top, #000 20%, transparent 95%); mask-image: linear-gradient(to top, #000 20%, transparent 95%);
  animation: grid-run 2.6s linear infinite;
}
/* Horizon glow above the grid */
:root:not([data-theme="corporate"]) body:not(.legal-page)::after {
  content: ''; position: fixed; left: 0; right: 0; bottom: 0; height: 42vh; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 70% 60% at 50% 100%, rgba(255,43,214,.22), rgba(122,92,255,.08) 55%, transparent 75%);
}
@keyframes grid-run { to { background-position: 0 46px, 50% 0; } }

/* Header and logo */
:root:not([data-theme="corporate"]) .hud { background: linear-gradient(180deg, rgba(31,18,85,.6), rgba(10,6,24,.2)); }
:root:not([data-theme="corporate"]) .logo { box-shadow: 0 0 14px rgba(255,230,0,.35), inset 0 0 12px rgba(255,230,0,.15); animation: neon-on 1.6s linear 1; }
:root:not([data-theme="corporate"]) .logo::before { filter: drop-shadow(0 0 4px rgba(255,230,0,.45)); }
@keyframes neon-on { 0%, 18%, 22%, 52%, 56% { opacity: .35; } 20%, 54%, 100% { opacity: 1; } }
.icon-btn svg { transition: transform .4s ease; }
.icon-btn:hover svg, .icon-btn[aria-expanded="true"] svg { transform: rotate(60deg); }
:root:not([data-theme="corporate"]) .icon-btn { box-shadow: 0 0 12px rgba(0,240,255,.3); }

/* Titles: chrome-to-neon fill with a hard cyan offset */
:root:not([data-theme="corporate"]) .title {
  background: linear-gradient(180deg, #ffffff 0%, #ffd1f5 28%, var(--pink) 58%, #8a2bff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none;
  filter: drop-shadow(5px 5px 0 var(--cyan)) drop-shadow(0 0 22px rgba(255,43,214,.5));
}

/* HUD panels: glassy fill, hairline border and corner brackets */
:root:not([data-theme="corporate"]) :is(.profile, .fix, .timer, .rejoin, .ev-join) {
  --k: var(--cyan);
  background:
    linear-gradient(var(--k) 0 0) top left / 18px 3px no-repeat, linear-gradient(var(--k) 0 0) top left / 3px 18px no-repeat,
    linear-gradient(var(--k) 0 0) top right / 18px 3px no-repeat, linear-gradient(var(--k) 0 0) top right / 3px 18px no-repeat,
    linear-gradient(var(--k) 0 0) bottom left / 18px 3px no-repeat, linear-gradient(var(--k) 0 0) bottom left / 3px 18px no-repeat,
    linear-gradient(var(--k) 0 0) bottom right / 18px 3px no-repeat, linear-gradient(var(--k) 0 0) bottom right / 3px 18px no-repeat,
    linear-gradient(180deg, rgba(28,17,70,.82), rgba(12,7,32,.88));
  border: 1px solid rgba(0,240,255,.2);
  box-shadow: 0 18px 44px rgba(0,0,0,.45), inset 0 0 44px rgba(0,240,255,.05);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
:root:not([data-theme="corporate"]) :is(.fix, .rejoin) { --k: var(--pink); border-color: rgba(255,43,214,.3); }
:root:not([data-theme="corporate"]) .timer { --k: var(--yellow); border-color: rgba(255,230,0,.22); }
:root:not([data-theme="corporate"]) .timer.danger { --k: var(--red); border-color: var(--red); }
:root:not([data-theme="corporate"]) .xpbar { border-color: rgba(0,240,255,.3); }
:root:not([data-theme="corporate"]) .xpbar i { background: repeating-linear-gradient(-45deg, var(--pink) 0 8px, #ff6fe8 8px 16px); box-shadow: 0 0 12px rgba(255,43,214,.6); }

/* Cabinet buttons: lit face, hard offset shadow, lift on hover, press on click */
:root:not([data-theme="corporate"]) .big {
  background: linear-gradient(180deg, #ff6fe8 0%, var(--pink) 48%, #c4149a 100%);
  box-shadow: 5px 5px 0 var(--cyan), 0 0 22px rgba(255,43,214,.45), inset 0 2px 0 rgba(255,255,255,.4), inset 0 -3px 0 rgba(0,0,0,.25);
  transition: transform .08s ease, box-shadow .08s ease;
}
:root:not([data-theme="corporate"]) .big:hover:not(:disabled), :root:not([data-theme="corporate"]) .big:focus-visible {
  background: linear-gradient(180deg, #fff58a 0%, var(--yellow) 50%, #d1b300 100%); color: var(--bg);
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--cyan), 0 0 30px rgba(255,230,0,.55), inset 0 2px 0 rgba(255,255,255,.55), inset 0 -3px 0 rgba(0,0,0,.2);
}
:root:not([data-theme="corporate"]) .big:active:not(:disabled) { transform: translate(4px, 4px); box-shadow: 1px 1px 0 var(--cyan), inset 0 3px 0 rgba(0,0,0,.3); }
:root:not([data-theme="corporate"]) .big.alt { background: rgba(14,9,38,.85); box-shadow: 4px 4px 0 var(--pink), 0 0 18px rgba(0,240,255,.22), inset 0 0 18px rgba(0,240,255,.08); }
:root:not([data-theme="corporate"]) .big.alt:hover:not(:disabled), :root:not([data-theme="corporate"]) .big.alt:focus-visible {
  background: var(--cyan); color: var(--bg); box-shadow: 6px 6px 0 var(--pink), 0 0 28px rgba(0,240,255,.5); }
:root:not([data-theme="corporate"]) .big.linkedin { background: linear-gradient(180deg, #2f8ae6 0%, #0a66c2 60%, #08539e 100%); }
:root:not([data-theme="corporate"]) .big.linkedin:hover:not(:disabled) { background: linear-gradient(180deg, #4a9cf0, #0b72d8); color: #fff; }
:root:not([data-theme="corporate"]) .quit-big { background: linear-gradient(180deg, #ff6b84, var(--red) 55%, #c71f3d); box-shadow: 5px 5px 0 var(--yellow), 0 0 22px rgba(255,59,92,.45); }

/* Category tiles */
:root:not([data-theme="corporate"]) .cats label { background: rgba(14,9,38,.75); transition: transform .08s ease, box-shadow .15s ease, border-color .15s ease; }
:root:not([data-theme="corporate"]) .cats label:hover { transform: translateY(-2px); box-shadow: 0 0 14px rgba(0,240,255,.35); }
:root:not([data-theme="corporate"]) .cats label:has(input:checked) {
  background: linear-gradient(180deg, rgba(255,43,214,.42), rgba(255,43,214,.16)); color: #fff;
  box-shadow: 0 0 18px rgba(255,43,214,.55), inset 0 0 12px rgba(255,43,214,.3); }
/* Selected marker sits in the corner so picking topics never changes tile widths (no reflow under the cursor) */
:root:not([data-theme="corporate"]) .cats label { position: relative; }
:root:not([data-theme="corporate"]) .cats label:has(input:checked)::after { content: ''; position: absolute; top: -5px; right: -5px; width: 9px; height: 9px; background: var(--yellow); box-shadow: 0 0 8px rgba(255,230,0,.8); }
:root:not([data-theme="corporate"]) .how b { box-shadow: 0 0 10px rgba(182,255,0,.5); }

/* Game screen */
:root:not([data-theme="corporate"]) .filebar { background: linear-gradient(90deg, #1c1146, #120c2b); }
:root:not([data-theme="corporate"]) .code { background: linear-gradient(180deg, rgba(10,6,24,.94), rgba(14,8,36,.94)); box-shadow: inset 0 0 60px rgba(0,240,255,.05); }
:root:not([data-theme="corporate"]) .code li::before { border-right: 1px solid var(--line); margin-right: 8px; }
:root:not([data-theme="corporate"]) .code button { transition: background .12s ease; }
:root:not([data-theme="corporate"]) .code button:hover:not(:disabled), :root:not([data-theme="corporate"]) .code button:focus-visible {
  background: linear-gradient(90deg, rgba(0,240,255,.18), transparent 75%); }
:root:not([data-theme="corporate"]) .code button.found { background: linear-gradient(90deg, rgba(182,255,0,.24), transparent 80%); animation: found-flash .7s ease-out; }
@keyframes found-flash { from { box-shadow: inset 0 0 0 999px rgba(182,255,0,.4); } }
:root:not([data-theme="corporate"]) .option { background: rgba(12,7,32,.92); transition: transform .08s ease, border-color .12s ease, box-shadow .12s ease; }
:root:not([data-theme="corporate"]) .option:hover:not(:disabled), :root:not([data-theme="corporate"]) .option:focus-visible { transform: translateX(5px); }
:root:not([data-theme="corporate"]) .option .k { border: 1px solid var(--line); padding: 4px 6px; height: fit-content; }
:root:not([data-theme="corporate"]) .option.right { animation: right-pulse .9s ease-out; }
@keyframes right-pulse { from { box-shadow: 0 0 0 0 rgba(182,255,0,.8), 0 0 40px rgba(182,255,0,.6); } }
:root:not([data-theme="corporate"]) .toast { background: rgba(10,6,24,.94); box-shadow: 0 0 0 4px rgba(0,0,0,.45), 0 0 46px currentColor; animation: toast-pop .35s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes toast-pop { from { transform: translate(-50%, -50%) scale(.35); opacity: 0; } }

/* Score bump on every change (both themes) */
.score b.bump { animation: bump .35s ease-out; }
@keyframes bump { 40% { transform: scale(1.3); } }

/* Leaderboard medals for the top 3 */
:root:not([data-theme="corporate"]) .table tr.top1 td { color: #ffd23f; }
:root:not([data-theme="corporate"]) .table tr.top2 td { color: #cfe0ff; }
:root:not([data-theme="corporate"]) .table tr.top3 td { color: #ff9f5a; }
:root:not([data-theme="corporate"]) .table tr:is(.top1, .top2, .top3) td { text-shadow: 0 0 6px color-mix(in srgb, currentColor 40%, transparent); }
:root:not([data-theme="corporate"]) .table tbody tr { transition: background .12s ease; }
:root:not([data-theme="corporate"]) .table tbody tr:hover td { background: rgba(0,240,255,.06); }
[data-theme="corporate"] .table tr:is(.top1, .top2, .top3) td:first-child { font-weight: 700; }
[data-theme="corporate"] .table tr.top1 td:first-child { color: #a8801e; }
[data-theme="corporate"] .table tr.top2 td:first-child { color: #7a8794; }
[data-theme="corporate"] .table tr.top3 td:first-child { color: #a5603a; }
:root:not([data-theme="corporate"]) .site-footer { background: rgba(10,6,24,.45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }

/* ---------- Corporate finish: atmosphere, depth and motion ----------
   Calm on purpose: slow, small movements; everything stops for reduced-motion users (rule near the top). */
[data-theme="corporate"] {
  --bg: #f8f6f1; --text: #1f1e1b;
  --shadow-sm: 0 1px 2px rgba(31,30,27,.06), 0 1px 1px rgba(31,30,27,.04);
  --shadow-md: 0 1px 2px rgba(31,30,27,.05), 0 8px 24px rgba(31,30,27,.07);
  --shadow-lg: 0 2px 6px rgba(31,30,27,.06), 0 18px 48px rgba(31,30,27,.12);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
/* Stage: a warm aurora drifting very slowly, with a faint dot grid fading out from the top */
[data-theme="corporate"] body::before {
  content: ''; position: fixed; inset: -25vmax; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38vmax 28vmax at 30% 28%, rgba(214,118,80,.30), transparent 62%),
    radial-gradient(34vmax 26vmax at 76% 30%, rgba(92,128,160,.22), transparent 62%),
    radial-gradient(46vmax 34vmax at 55% 78%, rgba(222,176,108,.28), transparent 62%);
  filter: blur(24px);
  animation: aurora 32s ease-in-out infinite alternate;
}
@keyframes aurora { to { transform: translate3d(3vmax, -2.5vmax, 0) rotate(7deg) scale(1.08); } }
[data-theme="corporate"] body::after {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(31,30,27,.13) 1px, transparent 1.3px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 85% 55% at 50% 0%, #000, transparent 75%); mask-image: radial-gradient(ellipse 85% 55% at 50% 0%, #000, transparent 75%);
}

/* Frosted header that stays put, and a logo mark */
[data-theme="corporate"] .hud { position: sticky; top: 0; z-index: 45; background: rgba(255,255,255,.72); -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px); border-bottom-color: rgba(227,222,210,.8); }
[data-theme="corporate"] .timer { top: 88px; } /* clear the sticky header */
[data-theme="corporate"] .logo { display: inline-flex; align-items: center; }
[data-theme="corporate"] .logo span { margin-left: .28em; }
/* The landing page's cup, outlined so it shows on the white header, in Corporate's caramel and red */
[data-theme="corporate"] .logo::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M14 4c-2 3 2 4 0 7M20 3c-2 3 2 4 0 7' fill='none' stroke='%238f6320' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M29 18c5 0 5 8-1 8' fill='none' stroke='%232b2a27' stroke-width='3' stroke-linecap='round'/%3E%3Cpath d='M7 15h22l-2 14a5 5 0 0 1-5 4h-8a5 5 0 0 1-5-4z' fill='%23f4e6d2' stroke='%232b2a27' stroke-width='1.6' stroke-linejoin='round'/%3E%3Cpath d='M19 17l-2 5 3 3-2 5' fill='none' stroke='%23b3412f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
[data-theme="corporate"] .icon-btn { background: rgba(255,255,255,.7); box-shadow: var(--shadow-sm); transition: background .15s, box-shadow .15s, color .15s; }

/* Motion: each screen's content rises in, a little staggered */
[data-theme="corporate"] .screen:not([hidden]) > :not(.toast) { animation: rise .55s var(--ease) both; }
[data-theme="corporate"] .screen:not([hidden]) > :nth-child(2) { animation-delay: .05s; }
[data-theme="corporate"] .screen:not([hidden]) > :nth-child(3) { animation-delay: .1s; }
[data-theme="corporate"] .screen:not([hidden]) > :nth-child(4) { animation-delay: .15s; }
[data-theme="corporate"] .screen:not([hidden]) > :nth-child(5) { animation-delay: .2s; }
[data-theme="corporate"] .screen:not([hidden]) > :nth-child(n+6) { animation-delay: .25s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
[data-theme="corporate"] .sound-panel:not([hidden]) { animation: panel-in .18s var(--ease); transform-origin: top right; box-shadow: var(--shadow-lg); }
@keyframes panel-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } }

/* Depth: cards, buttons, pills */
[data-theme="corporate"] :is(.profile, .fix, .timer, .rejoin, .theme-card, .result) { box-shadow: var(--shadow-md); }
[data-theme="corporate"] .big {
  background: linear-gradient(180deg, #d0714d, #b8573a); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(31,30,27,.12), 0 6px 16px rgba(184,87,58,.22);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), background .16s;
}
[data-theme="corporate"] .big:hover:not(:disabled), [data-theme="corporate"] .big:focus-visible {
  background: linear-gradient(180deg, #c76643, #a94f30); color: #fff; transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 2px 4px rgba(31,30,27,.1), 0 10px 24px rgba(184,87,58,.3); }
[data-theme="corporate"] .big:focus-visible { outline: 3px solid rgba(194,97,63,.3); outline-offset: 2px; }
[data-theme="corporate"] .big:active:not(:disabled) { transform: translateY(0); box-shadow: inset 0 2px 4px rgba(0,0,0,.15); }
[data-theme="corporate"] .big.alt { background: #fff; color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
[data-theme="corporate"] .big.alt:hover:not(:disabled), [data-theme="corporate"] .big.alt:focus-visible { background: #fff; color: var(--text); border-color: #d3cbb9; box-shadow: var(--shadow-md); }
[data-theme="corporate"] .big.linkedin { background: linear-gradient(180deg, #1874d4, #0a66c2); }
[data-theme="corporate"] .big.linkedin:hover:not(:disabled) { background: linear-gradient(180deg, #0f6bc9, #0858a8); box-shadow: 0 10px 24px rgba(10,102,194,.28); }
[data-theme="corporate"] .cats label { transition: transform .15s var(--ease), box-shadow .15s, border-color .15s, background .15s; box-shadow: var(--shadow-sm); }
[data-theme="corporate"] .cats label:hover { transform: translateY(-1px); border-color: #d3cbb9; box-shadow: var(--shadow-md); }
[data-theme="corporate"] .cats label:has(input:checked) { background: var(--text); color: #fff; border-color: var(--text); box-shadow: 0 6px 16px rgba(31,30,27,.18); }
[data-theme="corporate"] .theme-card { transition: transform .15s var(--ease), box-shadow .15s, border-color .15s; }
[data-theme="corporate"] .theme-card:hover { transform: translateY(-1px); }

/* Profile: initials avatar, shimmering XP bar */
[data-theme="corporate"] .profile { display: grid; grid-template-columns: auto 1fr; column-gap: 18px; align-items: center; }
[data-theme="corporate"] .profile > :not(.avatar-col) { grid-column: 2; }
[data-theme="corporate"] .avatar {
  display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; border: 0;
  font-family: inherit; font-size-adjust: none; text-transform: none;
  background: linear-gradient(135deg, #db7b53, #9c4a2e); color: #fff; font-weight: 600; font-size: 19px; letter-spacing: .02em;
  box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--line), 0 6px 16px rgba(176,80,47,.25);
}
[data-theme="corporate"] .xpbar { background: #efebe2; border: 0; }
[data-theme="corporate"] .xpbar i { position: relative; overflow: hidden; background: linear-gradient(90deg, #d27650, #b0502f); transition: width 1.2s var(--ease); }
[data-theme="corporate"] .xpbar i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); transform: translateX(-100%); animation: shimmer 2.8s ease-in-out infinite; }
@keyframes shimmer { 60%, 100% { transform: translateX(100%); } }

/* Game screen: editor window, clear found/right/wrong states */
[data-theme="corporate"] .filebar { background: linear-gradient(180deg, #fbfaf7, #f3f0e8); }
[data-theme="corporate"] .dots { position: relative; display: inline-block; width: 42px; height: 10px; font-size: 0; }
[data-theme="corporate"] .dots::before { content: ''; position: absolute; left: 0; top: 0; width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; box-shadow: 16px 0 0 #febc2e, 32px 0 0 #28c840; }
[data-theme="corporate"] .code { box-shadow: var(--shadow-md); }
[data-theme="corporate"] .code button { transition: background .12s, border-color .12s; }
[data-theme="corporate"] .code button:hover:not(:disabled), [data-theme="corporate"] .code button:focus-visible { background: rgba(194,97,63,.06); border-left-color: var(--pink); }
[data-theme="corporate"] .code button.tried { background: rgba(179,65,47,.04); text-decoration: line-through; text-decoration-color: rgba(179,65,47,.45); }
[data-theme="corporate"] .code button.found { animation: found-in .6s var(--ease); }
[data-theme="corporate"] .code button.found::after { content: '✓ Found'; margin-left: 18px; padding: 2px 8px; border-radius: 999px; background: rgba(61,122,79,.12); color: var(--lime); font-family: ui-sans-serif, system-ui, sans-serif; font-size: 12px; font-weight: 600; }
@keyframes found-in { from { background: rgba(61,122,79,.28); } }
[data-theme="corporate"] .fix:not([hidden]) { animation: rise .4s var(--ease); }
[data-theme="corporate"] .option { transition: transform .15s var(--ease), box-shadow .15s, border-color .15s; box-shadow: var(--shadow-sm); align-items: center; }
[data-theme="corporate"] .option:hover:not(:disabled), [data-theme="corporate"] .option:focus-visible { transform: translateY(-1px); box-shadow: var(--shadow-md), 0 0 0 3px var(--tint); }
[data-theme="corporate"] .option .k { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 7px; background: var(--panel2); border: 1px solid var(--line); padding: 0; }
[data-theme="corporate"] .option.right { animation: ok-ring .9s var(--ease); }
[data-theme="corporate"] .option.right::after { content: '✓'; margin-left: auto; color: var(--lime); font-weight: 700; font-size: 18px; }
[data-theme="corporate"] .option.right .k { background: var(--lime); border-color: var(--lime); color: #fff; }
[data-theme="corporate"] .option.wrong { animation: shake .35s; }
[data-theme="corporate"] .option.wrong::after { content: '✕'; margin-left: auto; color: var(--red); font-weight: 700; font-size: 16px; }
@keyframes ok-ring { from { box-shadow: 0 0 0 0 rgba(61,122,79,.45); } to { box-shadow: 0 0 0 10px rgba(61,122,79,0); } }
[data-theme="corporate"] .timer.danger .secs b { animation: tick 1s ease-in-out infinite; }
@keyframes tick { 50% { opacity: .55; } }

/* Toasts: a pill that slides down under the header */
[data-theme="corporate"] .toast {
  top: 92px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px;
  font-size: 15px; padding: 11px 20px 11px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255,255,255,.96); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: var(--shadow-lg); animation: toast-in .32s var(--ease);
}
[data-theme="corporate"] .toast::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 18%, transparent); }
@keyframes toast-in { from { transform: translate(-50%, -14px); opacity: 0; } }

/* Leaderboard: a card table with medal dots for the top 3 */
[data-theme="corporate"] .table { border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-md); }
[data-theme="corporate"] .table th { background: #faf8f3; border-bottom: 1px solid var(--line); padding: 12px 14px; }
[data-theme="corporate"] .table td { padding: 12px 14px; }
[data-theme="corporate"] .table tbody tr:last-child td { border-bottom: 0; }
[data-theme="corporate"] .table tbody tr { transition: background .12s; }
[data-theme="corporate"] .table tbody tr:hover td { background: #fbf9f5; }
[data-theme="corporate"] .table tr:is(.top1, .top2, .top3) td:first-child::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 50%; vertical-align: 1px; }
[data-theme="corporate"] .table tr.top1 td:first-child::before { background: #d4a72c; box-shadow: 0 0 0 3px rgba(212,167,44,.2); }
[data-theme="corporate"] .table tr.top2 td:first-child::before { background: #9aa6b2; box-shadow: 0 0 0 3px rgba(154,166,178,.22); }
[data-theme="corporate"] .table tr.top3 td:first-child::before { background: #b8734a; box-shadow: 0 0 0 3px rgba(184,115,74,.2); }
[data-theme="corporate"] .tabs { background: rgba(255,255,255,.7); border: 1px solid var(--line); border-radius: 999px; padding: 4px; width: fit-content; margin: 10px auto 18px; box-shadow: var(--shadow-sm); }
[data-theme="corporate"] .tab { border: 0; transition: background .15s, color .15s; }

/* Game over */
[data-theme="corporate"] .final b { background: linear-gradient(180deg, #2b2a27, #6b5a4c); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="corporate"] .poster { box-shadow: var(--shadow-lg); }
[data-theme="corporate"] .site-footer { background: rgba(255,255,255,.6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
[data-theme="corporate"] main a:not(.medal-big):not(.big):not(.dev-linkedin):not(.dev-play):not(.coffee-link) { color: var(--accent-dark); text-underline-offset: 2px; } /* buttons that are links keep their own colours */

/* ---------- First-time tour ---------- */
.tour { position: fixed; inset: 0; z-index: 80; }
.tour-shade { position: absolute; inset: 0; }
.tour.centered .tour-shade { background: rgba(6,3,16,.7); }
.tour-spot { position: absolute; border-radius: 10px; pointer-events: none; box-shadow: 0 0 0 9999px rgba(6,3,16,.7);
  transition: left .35s cubic-bezier(.2,.7,.2,1), top .35s cubic-bezier(.2,.7,.2,1), width .35s cubic-bezier(.2,.7,.2,1), height .35s cubic-bezier(.2,.7,.2,1); }
.tour.centered .tour-spot { display: none; }
.tour-card { position: absolute; width: min(360px, calc(100vw - 24px)); padding: 18px 18px 14px; outline: none;
  background: var(--panel); color: var(--text); border: 2px solid var(--cyan); text-align: left; }
.tour-card.in { animation: tour-in .28s cubic-bezier(.2,.7,.2,1); }
@keyframes tour-in { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.tour.centered .tour-card { width: min(420px, calc(100vw - 24px)); text-align: center; padding: 28px 26px 18px; }
.tour-step { margin: 0 0 8px; font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-size: 9px; color: var(--yellow); }
.tour-step:empty { display: none; }
.tour-title { margin: 0 0 8px; font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-weight: normal; font-size: 14px; color: var(--pink); line-height: 1.4; }
.tour-text { margin: 0 0 14px; font-size: 14px; line-height: 1.6; color: var(--text); }
.tour-dots { display: flex; gap: 6px; margin-bottom: 14px; }
.tour.centered .tour-dots { justify-content: center; }
.tour-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); transition: width .25s, background .25s; }
.tour-dots i.done { background: var(--dim); }
.tour-dots i.on { width: 20px; border-radius: 4px; background: var(--pink); }
.tour-nav { display: flex; align-items: center; gap: 8px; }
.tour-gap { flex: 1; }
.tour-skip { background: none; border: 0; padding: 8px 2px; color: var(--dim); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.tour-skip:hover, .tour-skip:focus-visible { color: var(--text); outline: none; }
.tour-btn { font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-size: 10px; padding: 10px 14px; border: 0; background: var(--pink); color: #fff; cursor: pointer; }
.tour-btn.ghost { background: none; color: var(--cyan); border: 2px solid var(--line); }
.tour-btn:focus-visible, .tour-btn.ghost:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.tour-btn[hidden] { display: none; }

/* Arcade: neon frame and bracketed spotlight */
:root:not([data-theme="corporate"]) .tour-spot { border: 2px solid var(--cyan); box-shadow: 0 0 0 9999px rgba(6,3,16,.72), 0 0 24px rgba(0,240,255,.55), inset 0 0 18px rgba(0,240,255,.25); }
:root:not([data-theme="corporate"]) .tour-card { box-shadow: 5px 5px 0 var(--pink), 0 0 30px rgba(0,240,255,.25); }
:root:not([data-theme="corporate"]) .tour-btn { box-shadow: 3px 3px 0 var(--cyan); }
:root:not([data-theme="corporate"]) .tour-btn:hover { background: var(--yellow); color: var(--bg); }
:root:not([data-theme="corporate"]) .tour-btn.ghost { box-shadow: none; }
:root:not([data-theme="corporate"]) .tour-btn.ghost:hover { background: var(--cyan); color: var(--bg); border-color: var(--cyan); }

/* Corporate: soft card, gentle dimming with a light blur */
[data-theme="corporate"] .tour-spot { border-radius: 14px; box-shadow: 0 0 0 9999px rgba(31,30,27,.42), 0 0 0 4px rgba(255,255,255,.9); }
[data-theme="corporate"] .tour.centered .tour-shade { background: rgba(31,30,27,.42); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
[data-theme="corporate"] .tour-card { border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); }
[data-theme="corporate"] .tour-step { font-size: 12px; font-weight: 600; color: var(--accent-dark); letter-spacing: .02em; }
[data-theme="corporate"] .tour-title { font-family: var(--serif); font-size-adjust: none; font-size: 21px; font-weight: 600; color: var(--text); line-height: 1.25; }
[data-theme="corporate"] .tour.centered .tour-title { font-size: 26px; }
[data-theme="corporate"] .tour-text { color: var(--dim); font-size: 15px; }
[data-theme="corporate"] .tour-dots i.on { background: var(--pink); }
[data-theme="corporate"] .tour-btn { font-size-adjust: none; font-size: 14px; font-weight: 600; padding: 9px 16px; border-radius: 10px;
  background: linear-gradient(180deg, #d0714d, #b8573a); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 4px 12px rgba(184,87,58,.25); transition: transform .15s, box-shadow .15s; }
[data-theme="corporate"] .tour-btn:hover { transform: translateY(-1px); }
[data-theme="corporate"] .tour-btn.ghost { background: #fff; color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
[data-theme="corporate"] .tour-btn:focus-visible { outline: 3px solid rgba(194,97,63,.3); }
.tour-replay { margin-left: 6px; }
.tour.centered .tour-nav { justify-content: center; gap: 14px; }
.tour.centered .tour-gap { display: none; }
/* Tour text must stay crisp: no inherited heading glow; Arcade gets bright, high-contrast colors */
.tour-title { text-shadow: none; }
:root:not([data-theme="corporate"]) .tour-card { background: #120b2e; }
:root:not([data-theme="corporate"]) .tour-step { color: var(--cyan); font-size: 9px; }
:root:not([data-theme="corporate"]) .tour-title { color: var(--yellow); font-size: 13px; line-height: 1.6; text-shadow: 0 0 1px rgba(255,230,0,.6); }
:root:not([data-theme="corporate"]) .tour-text { color: #f4f1ff; font-size: 14px; }
:root:not([data-theme="corporate"]) .tour-skip { color: #b9b3e6; }
:root:not([data-theme="corporate"]) .tour-btn.ghost { color: var(--cyan); border-color: rgba(0,240,255,.45); }
.legend-hint { font-family: var(--mono); font-size-adjust: none; text-transform: none; font-size: 11px; color: var(--dim); }
[data-theme="corporate"] .legend-hint { font-family: inherit; font-size: 13px; font-weight: 400; }

/* Consent checkbox, Account tab */
.agree { display: flex; gap: 10px; align-items: flex-start; max-width: 460px; margin: 16px auto 4px; text-align: left; font-size: 13px; line-height: 1.5; color: var(--text); cursor: pointer; }
.agree[hidden] { display: none; }
.agree input { width: 18px; height: 18px; flex: none; margin-top: 1px; accent-color: var(--pink); }
.agree a { color: var(--cyan); }
.mini.danger { background: var(--red); color: #fff; }
.mini.danger:hover:not(:disabled), .mini.danger:focus-visible { background: #c71f3d; color: #fff; }
a.mini { display: block; text-decoration: none; }
.del-input { font-family: var(--mono); font-size: 13px; background: var(--panel2); color: var(--text); border: 2px solid var(--red); padding: 9px; }
[data-theme="corporate"] .agree { font-size: 14px; }
[data-theme="corporate"] .agree a { color: var(--accent-dark); }
[data-theme="corporate"] .del-input { border: 1px solid var(--red); border-radius: 8px; background: #fff; font-family: inherit; }
[data-theme="corporate"] .mini.danger { background: var(--red); }
/* Plain text links inside page content: readable in Arcade (Corporate sets its own accent) */
main a:not([class]) { color: var(--cyan); text-underline-offset: 2px; }
.agree.shared-pc { max-width: 330px; margin: 12px auto 4px; font-size: 12px; color: var(--dim); }
.verified-tag { margin-left: 8px; color: var(--lime); }
[data-theme="corporate"] .agree.shared-pc { font-size: 13px; }
.verified-tag b { font-family: var(--mono); font-size-adjust: none; font-size: 13px; font-weight: normal; }

/* ---------- Admin ---------- */
.admin { max-width: 1100px; }
.admin-card { border: 1px solid var(--line); background: var(--panel); padding: 18px 20px; margin: 18px 0; }
.admin-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0; }
.admin-row .tabs { margin: 0; }
.admin-row .search { flex: 1; min-width: 220px; width: auto; text-transform: none; }
.admin-scroll { overflow-x: auto; }
.admin-table { font-size: 12px; }
.admin-table td, .admin-table th { white-space: nowrap; text-transform: none; }
.admin-table tbody tr { cursor: pointer; }
.admin-table tbody tr:focus-visible { outline: 2px solid var(--cyan); }
.admin-table tr.closed td { color: var(--dim); }
.admin-table td small { color: var(--dim); }
.admin-head { display: flex; align-items: center; gap: 16px; }
.admin-head h2 { margin: 0; }
.big-av { width: 64px; height: 64px; }
.admin-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 16px 0; font-size: 14px; }
.admin-facts dt { color: var(--dim); }
.admin-facts dd { margin: 0; }
.admin-erase { margin-top: 26px; padding-top: 16px; border-top: 1px dashed var(--red); }
[data-theme="corporate"] .admin-card { border-radius: 14px; box-shadow: var(--shadow-md); background: #fff; }
[data-theme="corporate"] .admin-table { font-size: 13px; }

/* ---------- Developer page (/developer) ---------- */
.dev { max-width: 980px; margin: 0 auto; padding: 8px 4px 28px; }
.dev-hero { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 36px; align-items: center; margin: 18px 0 30px; }
.dev-photo { position: relative; aspect-ratio: 1; border-radius: 50%; padding: 6px; background: conic-gradient(from 210deg, var(--cyan), var(--pink), var(--yellow), var(--cyan)); animation: dev-in .6s ease-out both; }
.dev-photo img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 4px solid var(--bg); }
.dev-kicker { margin: 0 0 6px; font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-size: 11px; letter-spacing: .08em; color: var(--yellow); }
.dev-intro h1 { margin: 0; font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-weight: normal; font-size: clamp(28px, 5vw, 48px); line-height: 1.1; color: var(--text); }
.dev-role { margin: 10px 0 12px; font-size: 18px; font-weight: 700; color: var(--cyan); }
.dev-tagline { margin: 0 0 22px; font-size: 16px; line-height: 1.7; color: var(--dim); max-width: 560px; }
.dev-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.dev-linkedin, .dev-play { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; font-weight: 700; font-size: 15px; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.dev-linkedin { background: #0a66c2; color: #fff; }
.dev-play { border: 2px solid var(--line); color: var(--text); }
.dev-linkedin:hover, .dev-play:hover, .dev-linkedin:focus-visible, .dev-play:focus-visible { transform: translateY(-2px); outline: none; }
.dev-linkedin:focus-visible, .dev-play:focus-visible { box-shadow: 0 0 0 3px var(--yellow); }
.dev-stats { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 0; margin: 0 0 34px; }
.dev-stats li { padding: 16px; border: 2px solid var(--line); background: var(--panel); text-align: center; }
.dev-stats b { display: block; font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-weight: normal; font-size: 22px; color: var(--lime); margin-bottom: 8px; }
.dev-stats span { font-size: 13px; color: var(--dim); line-height: 1.4; }
.dev-section { margin: 0 0 34px; }
.dev-section h2, .dev-cta h2 { font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-weight: normal; font-size: 15px; color: var(--pink); margin: 0 0 14px; }
.dev-section p { font-size: 16px; line-height: 1.75; color: var(--text); margin: 0 0 12px; max-width: 780px; }
.dev-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.dev-card { padding: 18px; border: 2px solid var(--line); background: var(--panel); transition: transform .15s ease, border-color .15s ease; }
.dev-card:hover { transform: translateY(-3px); border-color: var(--cyan); }
.dev-card svg { width: 30px; height: 30px; fill: none; stroke: var(--cyan); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dev-card h3 { margin: 10px 0 6px; font-size: 16px; color: var(--text); }
.dev-card p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--dim); }
.dev-certs { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 0; margin: 0; }
.dev-certs li { padding: 16px 14px; border: 2px solid var(--line); background: var(--panel); }
.dev-certs b { display: block; font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: none; font-weight: normal; font-size: 16px; color: var(--yellow); margin-bottom: 6px; }
.dev-certs span { font-size: 13px; color: var(--dim); line-height: 1.4; }
.dev-cta { text-align: center; padding: 30px 20px; margin: 0 0 22px; border: 2px solid var(--line); background: var(--panel); }
.dev-cta p { color: var(--dim); margin: 0 0 18px; }
.dev-fine { font-size: 12px; line-height: 1.6; color: var(--dim); text-align: center; max-width: 760px; margin: 0 auto; }
@keyframes dev-in { from { opacity: 0; transform: scale(.94); } }
:root:not([data-theme="corporate"]) .dev-photo { box-shadow: 0 0 40px rgba(0,240,255,.35), 0 0 80px rgba(255,43,214,.2); }
:root:not([data-theme="corporate"]) .dev-intro h1 { text-shadow: 3px 3px 0 var(--pink); }
:root:not([data-theme="corporate"]) .dev-linkedin { box-shadow: 4px 4px 0 var(--cyan); }
:root:not([data-theme="corporate"]) :is(.dev-stats li, .dev-card, .dev-certs li, .dev-cta) { box-shadow: 4px 4px 0 rgba(255,43,214,.25); }
[data-theme="corporate"] .dev-photo { padding: 5px; background: linear-gradient(135deg, #db7b53, #44607a); box-shadow: var(--shadow-lg); }
[data-theme="corporate"] .dev-photo img { border-color: #fff; }
[data-theme="corporate"] .dev-kicker { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-dark); }
[data-theme="corporate"] .dev-intro h1 { font-family: var(--serif); font-size-adjust: none; font-weight: 600; letter-spacing: -.01em; }
[data-theme="corporate"] .dev-role { color: var(--text); font-weight: 600; }
[data-theme="corporate"] :is(.dev-linkedin, .dev-play) { border-radius: 10px; }
[data-theme="corporate"] .dev-play { border-width: 1px; background: #fff; }
[data-theme="corporate"] :is(.dev-stats li, .dev-card, .dev-certs li, .dev-cta) { border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow-md); }
[data-theme="corporate"] .dev-stats b { font-family: var(--serif); font-size-adjust: none; font-size: 26px; font-weight: 600; color: var(--accent-dark); }
[data-theme="corporate"] :is(.dev-section h2, .dev-cta h2) { font-family: var(--serif); font-size-adjust: none; font-size: 24px; font-weight: 600; color: var(--text); }
[data-theme="corporate"] .dev-card svg { stroke: var(--accent-dark); }
[data-theme="corporate"] .dev-card:hover { border-color: #e4c9bb; }
[data-theme="corporate"] .dev-certs b { font-family: inherit; font-size-adjust: none; font-size: 18px; font-weight: 700; color: var(--accent-dark); }
@media (max-width: 820px) {
  .dev-hero { grid-template-columns: 1fr; text-align: center; gap: 22px; }
  .dev-photo { width: min(240px, 70vw); margin: 0 auto; }
  .dev-tagline { margin-left: auto; margin-right: auto; }
  .dev-actions { justify-content: center; }
  .dev-stats, .dev-certs { grid-template-columns: repeat(2, 1fr); }
  .dev-cards { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .dev-photo { animation: none; } :is(.dev-card, .dev-linkedin, .dev-play) { transition: none; } }

/* Phones: the code gets the full width and long lines wrap, so nothing needs sideways scrolling.
   The breach board becomes a slim meter above the code (the falling blocks are hidden to save space). */
@media (max-width: 600px) {
  .play { grid-template-columns: 1fr; gap: 10px; }
  .timer { order: -1; position: relative; display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; }
  .timer::before { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--breach, 0%); background: rgba(255, 59, 92, .22); pointer-events: none; transition: width .4s ease; } /* how full the board is */
  .timer > * { position: relative; }
  .timerLabel { margin: 0; }
  #blocks { display: none; }
  .secs { margin: 0; }
  .secs b { font-size: 18px; }
  .code { font-size: 13px; }
  .code li::before { width: 2.2em; padding-right: .6em; }
  .code button { min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
  .option code { font-size: 13px; }
}

/* Phones: the team table drops the Games column so goal progress and Remove stay on screen */
@media (max-width: 600px) {
  .team-table { font-size: 11px; }
  .team-table th:nth-child(4), .team-table td:nth-child(4) { display: none; }
  .team-table th, .team-table td { padding: 8px 4px; }
  .goal-bar { width: 34px; margin-right: 4px; }
  .team-table .mini-av { display: none; }
  .team-table th { font-size: 9px; }
  .team-table td:last-child .link { padding: 0; font-size: 10px; }
  .team-table td small { font-size: 10px; }
}
.ev-join #evUrl { font-size: 15px; line-height: 1.5; color: var(--text); } /* readable from across the room */

/* Short screens (small laptops, landscape tablets): the game tightens its spacing so the code, the question
   and all three fixes fit without scrolling. Phones have their own layout above. */
@media (min-width: 601px) and (max-height: 900px) {
  body[data-screen="game"] .hud { padding-top: 8px; padding-bottom: 8px; min-height: 0; }
  body[data-screen="game"] .logo { font-size: 14px; padding: 6px 8px; }
  body[data-screen="game"] .box { padding: 4px 10px; }
  body[data-screen="game"] .box b { font-size: 16px; }
  body[data-screen="game"] .box small, body[data-screen="game"] .score small { margin-top: 3px; }
  body[data-screen="game"] .score b { font-size: 26px; }
  body[data-screen="game"] main { padding-top: 10px; padding-bottom: 12px; }
  .steps { padding: 0 0 8px; margin-bottom: 10px; font-size: clamp(11px, 1.3vw, 16px); }
  .filebar { padding: 6px 12px; }
  .code { padding: 6px 0; font-size: clamp(13px, 1.1vw, 16px); }
  .code button, .code li::before { line-height: 1.75; }
  .hint { margin: 8px 0; }
  .fix { margin-top: 8px; padding: 10px 14px 12px; }
  .kicker { margin-bottom: 6px; }
  .fix h3 { font-size: 14px; margin-bottom: 6px; }
  .desc { font-size: 13px; line-height: 1.4; margin-bottom: 4px; }
  .owasp { margin-bottom: 2px; }
  .option { padding: 8px 12px; margin-top: 6px; }
  .option code { font-size: 13px; }
  .timer { padding: 8px; }
  .timerLabel { margin-bottom: 6px; }
  #blocks { width: min(calc(100% - 4px), calc(min(100vh - 230px, 520px) / 2)); }
  .secs { margin-top: 6px; }
}

/* Phones during a game: one slim header row (stats + settings; the logo returns between games), and the
   step labels give way to just "Question N" and Quit, so the code starts near the top of the screen. */
@media (max-width: 600px) {
  body[data-screen="game"] .hud { flex-wrap: nowrap; padding: 6px 10px; gap: 6px; min-height: 0; }
  body[data-screen="game"] .hud .logo { display: none; }
  body[data-screen="game"] .stats { gap: 6px; justify-content: space-between; min-width: 0; }
  body[data-screen="game"] .stats .box { padding: 3px 6px; font-size: 11px; min-width: 0; }
  body[data-screen="game"] .stats .box b { font-size: 13px; }
  body[data-screen="game"] .stats small { font-size: 8px; margin-top: 2px; }
  body[data-screen="game"] .stats .score { margin: 0; }
  body[data-screen="game"] .stats .score b { font-size: 20px; }
  body[data-screen="game"] .hud .icon-btn { width: 34px; height: 34px; padding: 0; }
  body[data-screen="game"] main { padding-top: 8px; }
  .steps { padding: 0 0 6px; margin-bottom: 8px; gap: 8px; flex-wrap: nowrap; }
  .steps > span:not(.progress) { display: none; }
  .steps .quit { padding: 6px 10px; font-size: 10px; }
  .hint { line-height: 1.6; }
  .filebar { padding: 6px 10px; gap: 8px; }
  .code { padding: 6px 0; }
  .code button, .code li::before { line-height: 1.7; }
  .fix { padding: 10px 12px 12px; }
  .kicker { font-size: 9px; line-height: 1.4; }
  .fix h3 { font-size: 13px; line-height: 1.35; }
  .desc { font-size: 13px; }
  .option { padding: 9px 10px; gap: 10px; }
}

/* Phones, lobby: compact "how to play" steps. */
@media (max-width: 600px) {
  #start .how, [data-theme="corporate"] #start .how { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 16px 0; line-height: 1.45; font-size: 13px; }
  #start .how li { display: flex; align-items: baseline; gap: 10px; }
  #start .how b { margin-right: 0; flex: none; }
  #startBtn { width: 100%; }
  #start #formMsg { margin: 6px 0 0; }
  .profile #pTitle { display: inline-block; } /* the level chip moves to the next line whole instead of being cut */
  [data-theme="corporate"] .profile b { font-size: 22px; }
  [data-theme="corporate"] .timer { padding: 6px 12px; }
  [data-theme="corporate"] .secs b { font-size: 20px; }
  #start .modes { gap: 8px; }
  #start .modes .big { font-size: 10px; padding: 9px; } /* Arcade: two rows on a 360 px phone (Corporate keeps its own size) */
}

/* Phones, other screens: pixel lettering that wraps gets room between lines; game-over buttons line up
   full width (Leaderboard and Play again side by side); the leaderboard drops its Games column. */
@media (max-width: 600px) {
  .big, .rank, .vs-msg, .table th, .table td { line-height: 1.45; }
  #over .row { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 12px 0; }
  #over .row:last-child { grid-template-columns: 1fr 1fr; }
  #over .row .big { width: 100%; margin: 0; box-sizing: border-box; text-align: center; padding: 14px 8px; font-size: 13px; }
  #over .row:not(:has(> :not([hidden]))) { display: none; } /* both share buttons hidden: no empty gap */
  #board .table th:nth-child(5), #board .table td:nth-child(5) { display: none; }
  #board .table th, #board .table td { padding: 10px 5px; }
  #board .table td:nth-child(3) { font-size: 9px; }
}

/* "← Home" on every standalone page (legal pages, developer, admin, event big screen, score pages, not found) */
.hud .home-link { margin-left: auto; font-family: var(--pixel); font-size-adjust: var(--pixel-adjust); text-transform: var(--pixel-case); font-size: 11px;
  color: var(--cyan); text-decoration: none; padding: 9px 12px; border: 2px solid var(--cyan); white-space: nowrap; }
.hud .home-link:hover, .hud .home-link:focus-visible { background: var(--cyan); color: var(--bg); outline: none; }
.hud a.logo { text-decoration: none; }
.event-screen .hud .home-link { margin-left: 0; }
[data-theme="corporate"] .hud .home-link { font-family: inherit; font-size: 14px; font-weight: 600; letter-spacing: 0; text-transform: none;
  color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; background: var(--panel); }
[data-theme="corporate"] .hud .home-link:hover, [data-theme="corporate"] .hud .home-link:focus-visible { background: var(--panel2); color: var(--text); box-shadow: 0 0 0 3px var(--tint); }
[data-theme="corporate"] .now-playing { border: 1px solid var(--line); border-radius: 10px; }
[data-theme="corporate"] #nowText { font-size: 13px; }
