@font-face { font-family: Barlow; src: url('assets/fonts/barlow-regular.ttf') format('truetype'); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: Barlow; src: url('assets/fonts/barlow-semibold.ttf') format('truetype'); font-style: normal; font-weight: 600 900; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url('assets/fonts/barlow-condensed-bold.ttf') format('truetype'); font-style: normal; font-weight: 700; font-display: swap; }
:root {
  --ink: #1f1b18; --red: #e13a32; --orange: #f26c21; --green: #34ad6f; --yellow: #ffcf00; --blue: #00b8ff; --pencil: #24788e;
  --outline: url('assets/potlood-rand.svg'); --thin-outline: url('assets/potlood-rand-dun.svg');
  --underline: url('assets/potlood-onderlijn.svg'); --stroke: url('assets/potlood-streep.svg');
  --display-font: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  color: var(--ink); background: #f7fbfc; font-family: Barlow, Arial, sans-serif; font-synthesis: none;
}
* { box-sizing: border-box; letter-spacing: 0; }
body { margin: 0; font-size: 17px; line-height: 1.45; }
button, input, select { font: inherit; }
button { cursor: pointer; border: 0; color: inherit; }
button:disabled { opacity: .45; cursor: default; }
button, a, input, select { touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, canvas:focus-visible { outline: 3px solid #4e176f; outline-offset: 5px; }
[hidden] { display: none !important; }
svg { width: 20px; height: 20px; flex-shrink: 0; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { overflow-wrap: anywhere; }
h1 { font: 700 48px/1.05 var(--display-font); }
h2 { font: 700 28px/1.15 var(--display-font); }
h3 { font-size: 25px; line-height: 1.2; }
header, main, footer { max-width: 1200px; margin: auto; }
.scarf { width: 100%; height: 36px; overflow: hidden; }
.scarf svg { display: block; width: 100%; height: 43px; }
.header { display: flex; align-items: center; justify-content: space-between; padding: 23px 32px 20px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; color: inherit; font: 700 30px/1 var(--display-font); text-transform: uppercase; }
.brand img { width: 76px; height: 57px; object-fit: contain; }
.brand span { min-width: 0; }
.brand small { display: block; font: 600 11px/1.5 Barlow, sans-serif; margin-top: 7px; }
.account { position: relative; display: flex; align-items: center; gap: 9px; padding: 13px 18px; background: white; font-size: 15px; font-weight: 800; max-width: 46%; overflow-wrap: anywhere; }
.account span { min-width: 0; }
main { padding: 0 32px 58px; min-height: 74vh; }
.tabs { display: flex; gap: 16px; padding: 8px 0; margin-bottom: 37px; }
.tabs button { --pencil: #24788e; position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; min-width: 160px; padding: 13px 20px; background: white; font-weight: 900; font-size: 16px; }
.tabs button:nth-child(1) { transform: rotate(-.5deg); }
.tabs button:nth-child(2) { transform: rotate(.6deg); }
.tabs button:nth-child(3) { transform: rotate(-.35deg); }
.tabs button[aria-current] { background: var(--yellow); --pencil: #9b7416; }
.account::after, .tabs button::after, .primary::after, .game-card::after, .game-stage::after, dialog::after, .podium-step::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2; background: var(--pencil);
  -webkit-mask: var(--outline) center / 100% 100% no-repeat;
  mask: var(--outline) center / 100% 100% no-repeat;
}
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 31px; }
.section-title h1 { position: relative; display: inline-block; padding-bottom: 15px; }
.section-title h1::after { content: ''; position: absolute; bottom: 0; left: 0; width: min(240px,85%); height: 10px; background: var(--red); -webkit-mask: var(--underline) center / 100% 100% no-repeat; mask: var(--underline) center / 100% 100% no-repeat; }
.eyebrow { font-size: 12px; font-weight: 900; margin-bottom: 9px; color: #a74313; }
.mode { font-weight: 800; font-size: 13px; white-space: nowrap; padding-left: 13px; border-left: 4px solid var(--green); }
.games { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; margin-bottom: 32px; }
.game-card { --pencil: #736d68; position: relative; display: flex; align-items: center; gap: 15px; text-align: left; padding: 18px; min-height: 116px; background: white; }
.game-card[aria-pressed=true] { --pencil: #c9531d; background: #ffcf00; }
.game-card img { width: 66px; height: 66px; object-fit: contain; }
.game-card strong { display: block; font-weight: 900; font-size: 19px; line-height: 1.15; }
.game-card small { display: block; font-size: 13px; margin-top: 7px; }
.game-card > svg { margin-left: auto; width: 17px; }
.game-card > span { min-width: 0; overflow-wrap: anywhere; }
.game-card:hover { background: #ffcf00; }
.game-layout { display: grid; grid-template-columns: minmax(0,800px) minmax(185px,1fr); gap: 32px; align-items: start; }
.game-stage { --pencil: #258653; position: relative; padding: 7px; background: white; }
.stage-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px 16px; gap: 12px; }
.stage-top h2 { font-size: 23px; }
.tools { display: flex; gap: 8px; }
.tools button, .icon-button { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; background: #00e070; border: 1px solid #258653; border-radius: 0; }
.screen { position: relative; aspect-ratio: 800/450; background: #243c39; isolation: isolate; }
.screen canvas { display: block; width: 100%; height: 100%; touch-action: none; image-rendering: pixelated; }
.game-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 22px; background: #13252b44; }
.game-overlay > strong { font: 700 53px/1.08 var(--display-font); color: #fffaf0; text-align: center; text-shadow: 3px 4px 0 #152c35; }
.primary { --pencil: #a74313; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--yellow); color: var(--ink); font-weight: 900; padding: 14px 25px; min-height: 48px; }
.primary:hover { background: #ffad00; }
.scorebar { display: flex; justify-content: space-between; padding: 12px 18px; font-size: 12px; font-weight: 900; }
.scorebar strong { font-size: 25px; margin-left: 9px; }
.meter { height: 5px; background: #00e070; }
.meter i { display: block; height: 100%; width: 100%; background: var(--green); transform-origin: left; }
.feedback { padding: 10px 18px; font-size: 15px; }
.feedback:empty { display: none; }
.sidebar { padding: 14px 0; overflow-wrap: anywhere; }
.sidebar h2 { font-size: 28px; margin-bottom: 13px; }
.sidebar p:not(.eyebrow) { font-size: 15px; line-height: 1.6; }
.save-feedback { margin-top: 17px; }
.text-button { display: inline-flex; align-items: center; gap: 8px; background: transparent; color: #4e176f; padding: 11px 0; text-align: left; font-weight: 900; font-size: 15px; text-decoration: underline; text-underline-offset: 4px; }
.rule { height: 5px; background: #c9531d; margin: 27px 0; -webkit-mask: var(--stroke) center / 100% 100% no-repeat; mask: var(--stroke) center / 100% 100% no-repeat; }
.big-score { font: 700 65px/1.1 var(--display-font); color: #197445; }
.quiet { color: #60564f; }
.paused { position: absolute; inset: 77px 7px 7px; background: #f7fbfcf5; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 20px; z-index: 3; }
.subtle { display: block; background: none; text-decoration: underline; text-underline-offset: 4px; padding: 12px; }
select, input { padding: 11px; border: 2px solid #736d68; border-radius: 0; background: white; color: var(--ink); max-width: 100%; }
.rank-filter { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; padding-bottom: 20px; }
.rank-filter label { font-weight: 900; }
.rank-filter select { min-width: 225px; font-weight: 800; }
.rank-filter > span { margin-left: auto; font-size: 14px; color: #60564f; }
#rank-status { font-size: 16px; }
.rank-empty { display: flex; align-items: center; justify-content: center; gap: 32px; min-height: 300px; border-bottom: 2px solid #dbe3e5; }
.rank-empty img { width: 132px; height: 132px; object-fit: contain; }
.rank-empty h2 { max-width: 330px; }
.example-note { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px 16px; padding: 10px 0; font-size: 14px; color: #60564f; }
.example-note .text-button { font-size: 13px; }
.rank-podium { position: relative; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: end; gap: 20px; width: min(780px,100%); min-height: 330px; margin: 25px auto 45px; padding: 0 25px 7px; }
.rank-podium::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: #736d68; -webkit-mask: var(--stroke) center / 100% 100% no-repeat; mask: var(--stroke) center / 100% 100% no-repeat; }
.rank-podium[data-count="1"] { grid-template-columns: minmax(0,240px); justify-content: center; }
.rank-podium[data-count="2"] { grid-template-columns: repeat(2,minmax(0,240px)); justify-content: center; }
.rank-podium[data-count="3"] .podium-entry:nth-child(1) { order: 2; }
.rank-podium[data-count="3"] .podium-entry:nth-child(2) { order: 1; }
.rank-podium[data-count="3"] .podium-entry:nth-child(3) { order: 3; }
.podium-entry { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.podium-entry canvas { display: block; width: 108px; height: 126px; image-rendering: pixelated; }
.podium-entry strong { font-size: 19px; line-height: 1.15; font-weight: 900; padding: 8px 3px 4px; overflow-wrap: anywhere; width: 100%; }
.podium-points { font-size: 14px; margin-bottom: 15px; }
.podium-step { --pencil: #24788e; position: relative; width: 100%; height: 75px; background: #00b8ff; display: grid; place-items: center; }
.podium-step span { font: 700 48px/1 var(--display-font); }
.podium-entry[data-place="1"] .podium-step { --pencil: #9b7416; height: 140px; background: #ffcf00; }
.podium-entry[data-place="2"] .podium-step { --pencil: #258653; height: 108px; background: #00b8ff; }
.rank-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 15px; }
.rank-list-head h2 { font-size: 28px; }
.rank-list-head p { color: #60564f; font-size: 14px; text-align: right; }
table { border-collapse: collapse; width: 100%; text-align: left; table-layout: fixed; }
th { font-size: 12px; text-transform: uppercase; color: #60564f; font-weight: 900; border-bottom: 2px solid #736d68; }
th, td { padding: 12px 18px; }
td { border-bottom: 1px solid #dbe3e5; }
th:first-child { width: 100px; }
th:last-child { width: 130px; }
td:first-child { font: 700 30px/1 var(--display-font); text-align: center; color: #60564f; }
td:last-child, th:last-child { text-align: right; }
td:last-child { font: 700 37px/1 var(--display-font); }
tr.mine { background: #ffcf00; }
tr.mine td { border-bottom-color: #c8a749; }
.rank-you { display: block; font-size: 12px; font-weight: 900; color: #a74313; margin-top: 4px; }
.rank-person { display: flex; align-items: center; gap: 21px; min-width: 0; }
.rank-person > span { min-width: 0; overflow-wrap: anywhere; font-size: 19px; font-weight: 900; }
.rank-avatar { width: 72px; height: 84px; flex-shrink: 0; image-rendering: pixelated; }
footer { display: flex; justify-content: space-between; gap: 15px; padding: 25px 32px; border-top: 4px solid var(--red); font-weight: 900; font-size: 12px; }
footer span { font-weight: 600; }
dialog { --pencil: #c9531d; width: min(430px,calc(100% - 32px)); padding: 28px; border: 0; border-radius: 0; background: #fff; color: var(--ink); }
dialog::backdrop { background: #1f1b1877; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 12px; }
form label { display: block; margin: 16px 0 6px; font-weight: 800; font-size: 14px; }
form input { width: 100%; }
form .primary { width: 100%; margin-top: 15px; }
#auth-status { font-size: 14px; margin-top: 12px; color: #a52d23; }
.quiz { padding: 25px; min-height: 440px; text-align: center; background: #ffcf00; }
.quiz-cover { width: 150px; height: 150px; object-fit: contain; margin: 20px auto; }
.quiz h3 { margin: 15px 0 22px; }
.quiz-photo { display: block; width: 210px; aspect-ratio: 4/3; object-fit: cover; object-position: center 40%; margin: 15px auto; border: 3px solid #c9531d; }
.answers { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 17px; }
.answers button { padding: 13px 5px; background: white; border: 2px solid #736d68; font-weight: 900; overflow-wrap: anywhere; }
.answers .correct { background: #00b8ff; border-color: #197445; }
.answers .wrong { background: #ff4938; border-color: #a52d23; }
#quiz-feedback { min-height: 25px; margin-top: 16px; font-weight: 800; }
#quiz-next { margin-top: 15px; }
.quiz-progress { font-size: 14px; font-weight: 800; }
@media (max-width:850px) {
  .game-layout { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 25px; }
  .sidebar .rule { display: none; }
  .sidebar > div { min-width: 0; }
  .sidebar .save-feedback { grid-column: 1/-1; }
  .game-card { padding: 15px; gap: 9px; }
  .game-card img { width: 45px; height: 45px; }
  .game-card strong { font-size: 16px; }
  .game-card > svg { display: none; }
  h1 { font-size: 41px; }
}
@media (max-width:650px) {
  .tabs button { min-width: 0; flex: 1; font-size: 14px; padding: 13px 12px; gap: 8px; }
}
@media (max-width:560px) {
  body { font-size: 16px; }
  .header { padding: 18px 18px 13px; gap: 12px; }
  .brand { font-size: 22px; gap: 9px; }
  .brand img { width: 49px; height: 39px; }
  .brand small { font-size: 9px; margin-top: 4px; }
  .account { font-size: 12px; padding: 11px; }
  .account svg { width: 17px; }
  main { padding: 0 18px 35px; }
  .tabs { gap: 10px; margin-bottom: 28px; }
  .tabs button { min-width: 0; flex: 1; font-size: 12px; padding: 12px 6px; gap: 5px; min-height: 48px; }
  .tabs button svg { width: 16px; height: 16px; }
  h1 { font-size: 32px; }
  .section-title { align-items: flex-start; gap: 13px; margin-bottom: 25px; }
  .section-title h1 { padding-bottom: 12px; }
  .mode { font-size: 11px; padding-left: 8px; white-space: normal; max-width: 95px; margin-top: 5px; }
  .games { gap: 12px; margin-bottom: 25px; }
  .game-card { flex-direction: column; align-items: flex-start; padding: 12px 9px; min-height: 145px; }
  .game-card strong { font-size: 14px; line-height: 1.1; }
  .game-card small { font-size: 11px; margin-top: 5px; }
  .game-card img { width: 40px; height: 40px; }
  .game-overlay > strong { font-size: 33px; }
  .game-overlay { gap: 12px; }
  .primary { padding: 11px 18px; font-size: 15px; }
  .game-stage { padding: 5px; }
  .stage-top { padding: 8px 8px 12px; }
  .stage-top h2 { font-size: 18px; }
  .tools button, .icon-button { width: 38px; height: 38px; }
  .scorebar { padding: 10px 12px; font-size: 11px; }
  .scorebar strong { font-size: 22px; }
  .sidebar h2 { font-size: 24px; }
  .paused { inset: 64px 5px 5px; gap: 12px; }
  .paused h2 { font-size: 23px; }
  .paused > svg { display: none; }
  .rank-filter { gap: 10px; }
  .rank-filter select { min-width: 0; flex: 1; font-size: 15px; }
  .rank-filter > span { width: 100%; margin: 0; font-size: 13px; }
  .rank-empty { min-height: 250px; gap: 18px; }
  .rank-empty img { width: 84px; height: 100px; }
  .rank-empty h2 { font-size: 23px; }
  .rank-podium { gap: 8px; padding: 0 2px 6px; min-height: 275px; margin: 20px auto 30px; }
  .podium-entry canvas { width: 72px; height: 84px; }
  .podium-entry strong { font-size: 14px; }
  .podium-points { font-size: 12px; margin-bottom: 11px; }
  .podium-step { height: 56px; }
  .podium-step span { font-size: 33px; }
  .podium-entry[data-place="1"] .podium-step { height: 108px; }
  .podium-entry[data-place="2"] .podium-step { height: 82px; }
  .rank-list-head { gap: 12px; align-items: center; }
  .rank-list-head h2 { font-size: 23px; }
  .rank-list-head p { font-size: 12px; }
  th, td { padding: 8px 4px; }
  th:first-child { width: 45px; }
  th:last-child { width: 64px; }
  th { font-size: 10px; }
  td:first-child { font-size: 22px; }
  td:last-child { font-size: 29px; }
  .rank-person { gap: 8px; }
  .rank-person > span { font-size: 15px; }
  .rank-avatar { width: 48px; height: 56px; }
  .quiz { padding: 20px 12px; min-height: 390px; }
  .quiz-photo { width: 180px; }
  footer { padding: 20px 18px; flex-wrap: wrap; }
}
@media (max-width:380px) {
  .brand { font-size: 18px; }
  .brand img { width: 38px; height: 34px; }
  .brand small { font-size: 8px; }
  .tabs button { flex-direction: column; gap: 5px; min-height: 62px; }
}
