/* Press Start 2P, SIL Open Font License 1.1 (same files as the tinyprague.com placeholder) */
@font-face {
  font-family: "Press Start 2P"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/ps2p-latin.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+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Press Start 2P"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/ps2p-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
:root {
  --ink: #fdf6e8;
  --shadow: #1d3440;
  --panel: rgba(29, 52, 64, .78);
  --panel-strong: rgba(29, 52, 64, .92);
  --drop: rgba(29, 52, 64, .55);
  --gap: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #f4f2ed; }
body { font-family: "Press Start 2P", ui-monospace, monospace; color: var(--ink); -webkit-tap-highlight-color: transparent; }
canvas { display: block; touch-action: none; }
button, input { font: inherit; color: inherit; border: 0; border-radius: 0; }
button { cursor: pointer; }
.panel { background: var(--panel); box-shadow: .3em .3em 0 var(--drop); }

#brand { position: fixed; top: var(--gap); left: var(--gap); width: min(360px, calc(100vw - 2 * var(--gap) - 15em)); font-size: 11px; }
#logo { margin: 0 0 .9em; font-size: 22px; font-weight: 400; line-height: 1.15; letter-spacing: .02em; text-shadow: .12em .12em 0 var(--shadow); }
#search { display: block; width: 100%; padding: 1em 1.1em; background: var(--panel); box-shadow: .3em .3em 0 var(--drop); outline: none; }
#search::placeholder { color: rgba(253, 246, 232, .6); }
#search:focus { background: var(--panel-strong); }
#results { margin: .6em 0 0; padding: 0; list-style: none; max-height: 50vh; overflow-y: auto; }
#results:empty { display: none; }
#results li { display: flex; justify-content: space-between; gap: 1em; padding: .9em 1.1em; cursor: pointer; line-height: 1.5; }
#results li .kind { flex: none; opacity: .6; font-size: 8px; padding-top: .3em; }
#results li[aria-selected="true"], #results li:hover { background: var(--panel-strong); }

#actions { position: fixed; top: var(--gap); right: var(--gap); display: flex; gap: .8em; font-size: 11px; }
#actions button { padding: 1em 1.1em; }
#actions button:hover, #actions button:focus-visible { background: var(--panel-strong); outline: none; }
#about { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: var(--gap); background: rgba(20, 40, 52, .35); }
#about[hidden] { display: none; }
#about .panel { position: relative; width: min(560px, 100%); max-height: calc(100vh - 2 * var(--gap)); overflow-y: auto; padding: 2em; background: var(--panel-strong); font-size: 10px; line-height: 1.9; }
#about h2 { margin: 0 0 1.2em; font-size: 14px; font-weight: 400; text-shadow: .12em .12em 0 var(--shadow); }
#about h3 { margin: 1.8em 0 .6em; font-size: 10px; font-weight: 400; opacity: .7; }
#about p, #about ul { margin: 0 0 .8em; }
#about ul { padding-left: 1.4em; }
#about a { color: var(--ink); }
#about-close { position: absolute; top: 1em; right: 1em; padding: .6em .8em; background: transparent; font-size: 12px; }

#modes { position: fixed; right: var(--gap); bottom: calc(var(--gap) + 18px); display: flex; font-size: 11px; }
#modes button { padding: 1em 1.1em; background: transparent; opacity: .6; }
#modes button[aria-pressed="true"] { background: var(--panel-strong); opacity: 1; }
#attribution { position: fixed; right: var(--gap); bottom: 6px; color: #3d4a50; font: 10px/1.2 system-ui, sans-serif; text-align: right; }
#hud { position: fixed; left: var(--gap); bottom: var(--gap); padding: 6px 8px; background: rgba(255, 255, 255, .8); color: #333; font: 11px/1.4 system-ui, sans-serif; white-space: pre; pointer-events: none; }

@media (max-width: 600px) {
  :root { --gap: 10px; }
  #brand { font-size: 10px; }
  #logo { font-size: 16px; }
  #actions, #modes { font-size: 9px; }
  #attribution { font-size: 9px; left: var(--gap); }
}
