/* The start page and the QR page of the deployed 2D prototypes. The fonts are the games' own
   files (SIL OFL 1.1, licence texts in fonts/), copied next to this file by build.py: nothing is
   loaded from a third party. Both files are variable fonts, so one rule covers every weight. */
@font-face{font-family:'Bricolage Grotesque';font-style:normal;font-weight:200 800;font-display:swap;src:url(fonts/bricolage-grotesque-latin-ext-opsz-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Bricolage Grotesque';font-style:normal;font-weight:200 800;font-display:swap;src:url(fonts/bricolage-grotesque-latin-opsz-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Hanken Grotesk';font-style:normal;font-weight:100 900;font-display:swap;src:url(fonts/hanken-grotesk-latin-ext-wght-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Hanken Grotesk';font-style:normal;font-weight:100 900;font-display:swap;src:url(fonts/hanken-grotesk-latin-wght-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}

/* The games' palette (prototypes/2d-schulfest/index.html), so the start page looks like them. */
:root{--ink:#16130f;--paper:#f7efe1;--paper2:#efe4d1;--coral:#ff5d3b;--amber:#ffc043;--teal:#1fb98a;--violet:#a06bff;--text:#211b13;--muted:#8a7c66;--line:#e2d4bd;}
*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{font-family:'Hanken Grotesk',system-ui,sans-serif;background:radial-gradient(1200px 700px at 80% -10%,#2c2318 0%,transparent 60%),radial-gradient(900px 600px at -10% 110%,#261b2b 0%,transparent 55%),var(--ink);color:var(--paper);min-height:100vh;display:flex;justify-content:center;padding:0 16px 40px;}
.wrap{width:100%;max-width:560px;padding-top:28px;}
.wrap.wide{max-width:1040px;}
h1{font-family:'Bricolage Grotesque',system-ui,sans-serif;font-weight:800;font-size:clamp(28px,7vw,40px);line-height:1.05;margin:0 0 10px;}
h2{font-family:'Bricolage Grotesque',system-ui,sans-serif;font-weight:700;font-size:20px;margin:0 0 4px;}
p{line-height:1.5;}
.lead{color:#e9ddc9;font-size:17px;margin:0 0 24px;}
a{color:inherit;}
:focus-visible{outline:3px solid var(--amber);outline-offset:3px;}

/* Start page: one card per story. */
.stories{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:16px;}
.story{display:block;text-decoration:none;color:var(--text);background:var(--paper);border-radius:18px;padding:18px 18px 16px;border-left:8px solid var(--accent,var(--coral));box-shadow:0 18px 40px -18px rgba(0,0,0,.7);transition:transform .12s;}
.story:hover,.story:focus-visible{transform:translateY(-2px) rotate(-.4deg);}
.story p{margin:4px 0 10px;color:#4a3f30;}
.story .go{font-weight:800;color:#b3401f;}
.foot{margin-top:32px;font-size:13px;color:#a89a83;}
.foot a{color:#e9ddc9;}

/* QR page. */
.panel{background:var(--paper);color:var(--text);border-radius:18px;padding:18px;margin-bottom:20px;}
.panel label{font-weight:700;display:block;margin-bottom:6px;}
.panel input[type=url]{width:100%;font:inherit;font-size:16px;padding:10px 12px;border:1.5px solid var(--line);border-radius:10px;background:#fffdf7;color:var(--text);}
.panel .hint{font-size:14px;color:#5c503f;margin:8px 0 0;}
.warn{background:#ffe2d9;border:1.5px solid var(--coral);border-radius:10px;padding:10px 12px;margin-top:10px;font-size:14px;}
.warn[hidden]{display:none;}
.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(248px,1fr));gap:16px;}
.qcard{background:#fff;color:var(--text);border-radius:16px;padding:16px;display:flex;flex-direction:column;align-items:center;text-align:center;border-top:8px solid var(--accent,var(--coral));}
.qcard h2{font-size:18px;}
/* The padding is the quiet zone a scanner needs, four modules (qrcodejs draws none): a module here
   is at most 160 / 21 = 7.6 px, so 28 px. Width plus padding fit the narrowest card's 216 px. */
.qcard .qr{width:160px;height:160px;padding:28px;box-sizing:content-box;background:#fff;}
.qcard .qr img,.qcard .qr canvas{width:100%;height:100%;image-rendering:pixelated;}
.qcard .url{font-size:12px;word-break:break-all;color:#5c503f;margin:0 0 12px;user-select:all;}
.qfail{font-size:13px;color:#8a2a12;}
.actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;}
button,.btn{font:inherit;font-size:14px;font-weight:700;cursor:pointer;border-radius:999px;padding:8px 14px;border:1.5px solid var(--ink);background:var(--amber);color:var(--ink);text-decoration:none;}
.quiet{background:transparent;}
.toolbar{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 16px;}

/* Projector view: one code, as large as the screen allows. */
.big{position:fixed;inset:0;background:#fff;color:var(--text);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2vh;padding:3vh;z-index:10;}
.big[hidden]{display:none;}
.big h2{font-size:clamp(24px,5vh,56px);}
/* Padding: the quiet zone, about four modules of a typical 29-module code. */
.big .qr{width:min(56vh,80vw);height:min(56vh,80vw);padding:min(8vh,8vw);box-sizing:content-box;}
.big .qr img,.big .qr canvas{width:100%;height:100%;image-rendering:pixelated;}
.big .url{font-size:clamp(14px,2.6vh,28px);word-break:break-all;text-align:center;}
.big button{position:absolute;top:16px;right:16px;}

@media print{
  body{background:#fff;color:#000;display:block;padding:0;}
  .wrap.wide{max-width:none;padding:0;}
  .noprint,.big{display:none !important;}
  .cards{grid-template-columns:1fr 1fr;gap:12mm;}
  .qcard{border:1px solid #999;border-top:6px solid #000;break-inside:avoid;}
  .qcard .qr{width:60mm;height:60mm;}
}
