/* Created by Tiffany Collins, copyright — Self-hosted badge font. */
@font-face{font-family:"Space Grotesk";src:url("assets/space-grotesk-latin-variable.woff2") format("woff2");font-style:normal;font-weight:300 700;font-display:swap}
/* Created by Tiffany Collins, copyright — Portable badge UI: Space Grotesk typography with Tenor's neutral/focus colors. */
:root{color-scheme:light;--page:#f7f7f7;--panel:#fff;--text:#0a0a0a;--muted:#737373;--border:#ebebeb;--hover:#f7f7f7;--focus:#3392ff;--shadow:0 8px 28px #0000000d,0 2px 6px #00000008}
:root.dark{color-scheme:dark;--page:#121212;--panel:#262626;--text:#fafafa;--muted:#a3a3a3;--border:#404040;--hover:#333;--shadow:0 8px 28px #0005,0 2px 6px #0003}
/* Created by Tiffany Collins, copyright — Badge base styles and accessibility. */
*{box-sizing:border-box}body{margin:0;background:var(--page);color:var(--text);font-family:"Space Grotesk","Helvetica Neue",Arial,sans-serif;font-size:14px;line-height:1.5}button,a,summary{-webkit-tap-highlight-color:transparent}button,summary{font:inherit}button{border:1px solid var(--border);border-radius:10px;background:var(--panel);color:var(--text);cursor:pointer}button:hover{background:var(--hover)}button:disabled{cursor:default;opacity:.4}button:focus-visible,a:focus-visible,summary:focus-visible{outline:2px solid var(--focus);outline-offset:3px}svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}/* Created by Tiffany Collins, copyright — Badge heading. */
header{position:fixed;top:24px;left:28px;z-index:4;pointer-events:none}h1{margin:0;font-size:14px;line-height:20px;font-weight:500;color:var(--muted)}/* Created by Tiffany Collins, copyright — Badge layout and canvas. */
main{min-height:100dvh;display:grid;place-items:center;padding:68px 16px 90px}.game{width:min(780px,calc((100dvh - 158px)*1.35),calc(100vw - 32px));position:relative}.badge{position:relative;aspect-ratio:1.35;isolation:isolate}.shell{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}#screen{position:absolute;left:18.2%;top:15.8%;width:61.1%;height:62.8%;image-rendering:pixelated;outline:none}#badge-3d{position:absolute;inset:0;z-index:2}#badge-3d canvas{display:block;width:100%;height:100%;filter:drop-shadow(0 14px 22px #0000001c);outline:none;touch-action:none}.dark #badge-3d canvas{filter:drop-shadow(0 14px 22px #0004)}.is-3d .shell{visibility:hidden}.is-3d #screen{opacity:0;width:1px;height:1px;pointer-events:none}/* Created by Tiffany Collins, copyright — Invisible hardware targets. */
.hardware{position:absolute;z-index:3;width:38px;height:38px;transform:translate(-50%,-50%);padding:0;border:0;border-radius:50%;background:transparent!important;box-shadow:none!important;outline:none!important;touch-action:none}.hardware[hidden],#badge-3d[hidden],[hidden]{display:none!important}#error{position:absolute;top:100%;width:100%;text-align:center;color:var(--muted);font-size:12px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}/* Created by Tiffany Collins, copyright — Optional controls panel. */
#controls-menu{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);z-index:5}summary{list-style:none;display:flex;align-items:center;gap:8px;height:40px;padding:0 15px;border:1px solid var(--border);border-radius:100px;background:var(--panel);color:var(--muted);cursor:pointer;user-select:none}summary::-webkit-details-marker{display:none}summary svg{width:14px;height:14px}details[open] summary svg{transform:rotate(180deg)}.controls-panel{position:absolute;bottom:52px;left:50%;transform:translateX(-50%);width:398px;max-width:calc(100vw - 32px);padding:20px;border:1px solid var(--border);border-radius:14px;background:var(--panel);box-shadow:var(--shadow)}.keyboard{margin:0 0 16px;font-size:14px;line-height:1.65}.controls{display:flex;align-items:center;justify-content:space-between;gap:12px}.move-controls{display:flex;gap:6px}.move-controls button{width:40px;height:40px;font-size:22px;line-height:1;touch-action:none}.move-controls button[aria-pressed="true"]{background:var(--hover)}#action{height:40px;min-width:98px;padding:0 14px;background:var(--text);color:var(--panel);border-color:var(--text);font-weight:500}.hint{margin:14px 0 18px;font-size:12px;line-height:1.65;color:var(--muted)}.view-controls{display:flex;gap:6px}.view-controls button{flex:1;min-height:34px;padding:6px 8px;font-size:12px}.rotate-hint{margin:10px 0 16px}.controls-panel footer{display:flex;justify-content:space-between;gap:12px;border-top:1px solid var(--border);padding-top:14px;font-size:12px}a{color:var(--muted);text-underline-offset:3px}a:hover{color:var(--text)}/* Created by Tiffany Collins, copyright — Light and dark mode toggle. */
#theme-toggle{position:fixed;right:24px;bottom:24px;z-index:5;width:40px;height:40px;padding:0;display:grid;place-items:center;border-radius:50%;color:var(--muted)}#theme-toggle .sun{display:none}.dark #theme-toggle .moon{display:none}.dark #theme-toggle .sun{display:block}
/* Created by Tiffany Collins, copyright — Responsive styles: max-width:540px. */
@media(max-width:540px){header{top:20px;left:20px}main{padding:60px 12px 80px}.game{width:min(calc(100vw - 24px),calc((100dvh - 146px)*1.25))}.badge{aspect-ratio:1.25}.hardware{width:32px;height:32px}#controls-menu{bottom:20px}#theme-toggle{right:20px;bottom:20px}.controls-panel{padding:18px;max-height:calc(100dvh - 108px);overflow-y:auto}}
/* Created by Tiffany Collins, copyright — Keep optional touch controls compact during play so the orchestra stays visible. */
.badge-playing .controls-panel .keyboard,.badge-playing .controls-panel .hint,.badge-playing .controls-panel .view-controls,.badge-playing .controls-panel footer{display:none}

/* Created by Tiffany Collins, copyright — Creator and conference footer. */
.page-credit{position:fixed;bottom:35px;left:28px;z-index:4;display:flex;align-items:center;flex-wrap:wrap;gap:4px;margin:0;color:var(--muted);font-size:12px;line-height:1.5}.conference-credit{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}.conference-credit img{display:block;width:14px;height:15px;object-fit:contain}
/* Created by Tiffany Collins, copyright — Responsive styles: max-width:760px. */
@media(max-width:760px){main{padding-bottom:126px}.game{width:min(780px,calc((100dvh - 194px)*1.35),calc(100vw - 32px))}#controls-menu{bottom:64px}#theme-toggle{right:20px;bottom:64px}.page-credit{left:20px;right:20px;bottom:20px}.controls-panel{max-height:calc(100dvh - 150px)}}
/* Created by Tiffany Collins, copyright — Responsive styles: max-width:540px. */
@media(max-width:540px){.game{width:min(calc(100vw - 24px),calc((100dvh - 194px)*1.25))}}
/* Created by Tiffany Collins, copyright — Responsive styles: max-width:380px. */
@media(max-width:380px){.controls{gap:8px}.move-controls{gap:4px}.move-controls button{width:34px}#action{min-width:80px;padding:0 10px}}
/* Created by Tiffany Collins, copyright — Repository request link. */
.text-button{border:0;border-radius:0;background:transparent;padding:0;color:var(--muted);text-decoration:underline;text-underline-offset:3px}.text-button:hover{background:transparent;color:var(--text)}
/* Created by Tiffany Collins, copyright — Repository request dialog. */
#repo-request{width:420px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);margin:auto;padding:24px;border:1px solid var(--border);border-radius:16px;background:var(--panel);color:var(--text);box-shadow:var(--shadow);overflow-y:auto}
#repo-request::backdrop{background:#0006;backdrop-filter:blur(4px)}.request-heading{display:flex;justify-content:space-between;align-items:center;gap:16px}.request-heading h2{margin:0;font-size:22px;font-weight:500;line-height:1.3;letter-spacing:-.02em}#close-request{display:grid;place-items:center;flex-shrink:0;width:32px;height:32px;padding:0;border:0;background:transparent;color:var(--muted)}#request-description{margin:14px 0 24px;font-size:16px;color:var(--muted);line-height:1.5}#access-form label{display:block;margin:16px 0 6px;font-size:14px;font-weight:500}#access-form input:not([type=hidden]){display:block;width:100%;min-height:44px;padding:10px 12px;border:1px solid var(--border);border-radius:8px;background:var(--page);color:var(--text);font:inherit;font-size:16px;line-height:1.5}#access-form input:focus{outline:2px solid var(--focus);outline-offset:2px}.form-honey{display:none!important}.request-privacy{margin:16px 0 22px;font-size:12px;line-height:1.6;color:var(--muted)}#send-request{display:block;width:100%;min-height:44px;padding:10px 16px;background:var(--text);border-color:var(--text);color:var(--panel);font-weight:500}.email-request{display:block;width:fit-content;margin:16px auto 0;font-size:12px}#request-status{margin:18px 0 0;font-size:14px;line-height:1.6;color:var(--muted)}#request-status[data-state=success]{font-size:16px;color:var(--text)}#request-status[data-state=error]{color:var(--text)}
/* Created by Tiffany Collins, copyright — Responsive styles: max-width:380px. */
@media(max-width:380px){#repo-request{padding:20px}.controls-panel footer{flex-wrap:wrap}}
/* Created by Tiffany Collins, copyright — Reveal one complete badge frame, never the obsolete flat placeholder. */
.badge-loading{position:absolute;inset:0;margin:0;display:flex;align-items:center;justify-content:center;gap:10px;font-size:14px;color:var(--muted)}.badge-loading::before{content:"";width:16px;height:16px;border:2px solid var(--border);border-top-color:var(--muted);border-radius:50%;animation:badge-load 1s linear infinite}.badge[data-load-state=ready] .badge-loading{display:none}.badge:not([data-load-state=ready]) #screen,.badge:not([data-load-state=ready]) #badge-3d,.badge:not([data-load-state=ready]) .hardware{visibility:hidden}.badge[data-load-state=error] .badge-loading::before{display:none}.badge.is-flat{display:grid;place-items:center}.badge.is-flat #screen{position:relative;inset:auto;width:min(100%,640px);height:auto;opacity:1;pointer-events:auto;border:12px solid var(--panel);border-radius:10px;box-shadow:var(--shadow)}.badge.is-flat .hardware{visibility:hidden}@keyframes badge-load{to{transform:rotate(360deg)}}
/* Created by Tiffany Collins, copyright — Reduced motion loading state. */
@media(prefers-reduced-motion:reduce){.badge-loading::before{animation:none}}

/* Created by Tiffany Collins, copyright — Flat fallback visibility. */
.badge.is-flat #badge-3d{display:none}
