:root { --ink: #11181e; --paper: #f0f1e9; --lime: #dfff9d; --glass: rgba(17,24,30,.62); --line: rgba(240,241,233,.14); --muted: rgba(240,241,233,.66); --f: "Avenir Next", Avenir, "Nunito Sans", system-ui, sans-serif; --sig: "Caveat", cursive; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--ink); color: var(--paper); font-family: var(--f); -webkit-font-smoothing: antialiased; touch-action: none; overscroll-behavior: none; }
canvas#c { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; outline: none; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.loading { position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; justify-items: center; gap: 10px; background: radial-gradient(120% 90% at 50% 100%, #3a2a1c 0%, #1b1a1a 45%, var(--ink) 80%); transition: opacity .8s ease; }
.loading.gone { opacity: 0; pointer-events: none; }
.lmark { width: 64px; height: 64px; color: var(--lime); animation: breathe 2.4s ease-in-out infinite; }
.lmark svg, .brand svg { width: 100%; height: 100%; }
.lword { font-weight: 800; font-size: 44px; letter-spacing: -.02em; }
.ltext { color: var(--muted); font-size: 15px; min-height: 1.4em; }
@keyframes breathe { 50% { transform: scale(1.08); filter: drop-shadow(0 0 14px rgba(223,255,157,.55)); } }
.tl, .tr, .bl { position: fixed; z-index: 10; pointer-events: none; }
.tl > *, .tr > *, .bl > * { pointer-events: auto; }
.tl { top: max(14px, env(safe-area-inset-top)); left: max(16px, env(safe-area-inset-left)); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--paper); font-weight: 800; font-size: 22px; letter-spacing: -.02em; text-shadow: 0 1px 12px rgba(0,0,0,.5); }
.brand svg { width: 26px; height: 26px; color: var(--lime); }
.years { display: flex; gap: 4px; flex-wrap: wrap; max-width: 92vw; }
.years a { padding: 4px 9px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); min-height: 28px; display: grid; place-items: center; }
.years a[aria-current] { color: var(--ink); background: var(--lime); border-color: var(--lime); }
.theme { font-size: 13px; color: var(--muted); text-shadow: 0 1px 10px rgba(0,0,0,.6); }
.tr { top: max(14px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); display: flex; gap: 6px; align-items: flex-start; }
.chip { background: var(--glass); border: 1px solid var(--line); border-radius: 99px; padding: 0 14px; height: 44px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-size: 14px; color: var(--muted); white-space: nowrap; }
.chip b { color: var(--paper); font-weight: 700; margin-left: 4px; }
.chip.round { width: 44px; padding: 0; display: grid; place-items: center; font-weight: 800; font-size: 17px; }
.chip svg { width: 20px; height: 20px; fill: none; stroke: var(--paper); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chip.off svg { stroke: var(--muted); opacity: .6; }
.pop { position: absolute; top: 52px; right: 150px; width: 300px; background: rgba(17,24,30,.9); border: 1px solid var(--line); border-radius: 18px; padding: 12px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); display: grid; gap: 10px; }
.days, .presets { display: flex; flex-wrap: wrap; gap: 5px; }
.days button, .presets button { border: 1px solid var(--line); background: transparent; border-radius: 99px; padding: 6px 10px; font-size: 13px; min-height: 34px; }
.days button[aria-pressed="true"] { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.presets button:hover, .days button:hover { border-color: var(--lime); }
.lapse { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.bl { left: max(16px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom)); max-width: min(560px, 70vw); }
.addr .line { font-weight: 800; font-size: clamp(22px, 3.2vw, 34px); letter-spacing: -.02em; text-shadow: 0 2px 18px rgba(0,0,0,.55); }
.addr .sub { color: var(--muted); font-size: 14px; text-shadow: 0 1px 10px rgba(0,0,0,.7); }
.hint { margin-top: 8px; font-size: 13px; color: var(--paper); display: flex; gap: 6px; flex-wrap: wrap; }
.hint span { background: var(--glass); border: 1px solid var(--line); border-radius: 99px; padding: 5px 10px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.hint kbd, .keygrid kbd { font-family: var(--f); font-weight: 800; color: var(--lime); }
.card { position: fixed; z-index: 11; right: max(16px, env(safe-area-inset-right)); bottom: 76px; width: min(360px, calc(100vw - 32px)); background: rgba(17,24,30,.82); border: 1px solid var(--line); border-radius: 20px; padding: 16px 18px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 18px 60px rgba(0,0,0,.35); }
.card .kind { font-size: 12px; color: var(--lime); font-weight: 700; }
.card h2 { margin: 2px 0 4px; font-size: 22px; line-height: 1.15; letter-spacing: -.01em; }
.card .where { font-size: 13px; color: var(--muted); }
.card p { margin: 10px 0 12px; font-size: 14px; line-height: 1.45; color: rgba(240,241,233,.88); max-height: 30vh; overflow: auto; }
.acts { display: flex; gap: 8px; }
.btn { border: 0; background: var(--lime); color: var(--ink); font-weight: 800; padding: 0 16px; height: 40px; border-radius: 99px; }
.btn.ghost { background: transparent; color: var(--paper); border: 1px solid var(--line); }
.x { position: absolute; top: 8px; right: 10px; width: 36px; height: 36px; border: 0; background: transparent; color: var(--muted); font-size: 24px; line-height: 1; }
.bubble { position: fixed; z-index: 12; left: 50%; top: 18%; transform: translateX(-50%); max-width: min(520px, 86vw); background: var(--paper); color: var(--ink); border-radius: 22px; padding: 12px 16px; font-size: 16px; line-height: 1.4; box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.bubble b { display: block; font-size: 12px; color: #4a5a3a; margin-bottom: 2px; }
.bubble:after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 16px; height: 16px; background: var(--paper); transform: translateX(-50%) rotate(45deg); border-radius: 3px; }
.toast { position: fixed; z-index: 13; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--lime); color: var(--ink); font-weight: 700; border-radius: 99px; padding: 10px 16px; font-size: 14px; }
.sheet { position: fixed; z-index: 20; inset: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); background: rgba(17,24,30,.92); border: 1px solid var(--line); border-radius: 24px; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); display: flex; flex-direction: column; overflow: hidden; }
.sheet-head { display: flex; gap: 12px; align-items: center; padding: 14px 56px 10px 18px; flex-wrap: wrap; }
.sheet-head h2 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
#find { flex: 1; min-width: 220px; height: 44px; border-radius: 99px; border: 1px solid var(--line); background: rgba(240,241,233,.06); color: var(--paper); padding: 0 16px; font: inherit; font-size: 15px; outline: none; }
#find:focus { border-color: var(--lime); }
.map-body { position: relative; flex: 1; min-height: 0; }
#mapc { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.results { position: absolute; top: 0; right: 0; width: min(340px, 100%); max-height: 100%; overflow: auto; padding: 6px 10px; }
.results:empty { display: none; }
.results button { display: block; width: 100%; text-align: left; border: 0; border-radius: 14px; background: rgba(17,24,30,.85); margin: 4px 0; padding: 9px 12px; }
.results button:hover, .results button:focus { outline: 1px solid var(--lime); }
.results small { display: block; color: var(--muted); font-size: 12px; }
.map-foot { padding: 8px 18px 14px; font-size: 13px; color: var(--muted); }
.k { color: var(--lime); font-weight: 700; }
.keys .keygrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px 22px; padding: 6px 18px; overflow: auto; }
.keygrid div { display: flex; gap: 10px; align-items: baseline; font-size: 15px; }
.keygrid span { color: var(--muted); }
.made { padding: 6px 18px 18px; font-size: 13px; line-height: 1.5; color: var(--muted); max-width: 760px; }
.sig { position: fixed; z-index: 9; right: max(16px, env(safe-area-inset-right)); bottom: max(10px, env(safe-area-inset-bottom)); font-family: var(--sig); font-weight: 500; font-size: 22px; color: var(--paper); text-decoration: none; text-shadow: 0 1px 12px rgba(0,0,0,.6); }
.sig span { color: var(--lime); }
.build-stamp { position: fixed !important; z-index: 9; right: max(16px, env(safe-area-inset-right)) !important; bottom: max(40px, calc(env(safe-area-inset-bottom) + 34px)) !important; left: auto !important; top: auto !important; opacity: .5; font-size: 11px !important; color: var(--paper) !important; background: transparent !important; }
.touch { display: none; }
@media (pointer: coarse) {
  .touch { display: block; }
  .stick { position: fixed; z-index: 10; left: max(18px, env(safe-area-inset-left)); bottom: max(26px, env(safe-area-inset-bottom)); width: 132px; height: 132px; border-radius: 50%; background: rgba(17,24,30,.35); border: 1px solid var(--line); touch-action: none; }
  .nub { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px; border-radius: 50%; background: rgba(240,241,233,.3); border: 1px solid rgba(240,241,233,.5); }
  .tbtns { position: fixed; z-index: 10; right: max(14px, env(safe-area-inset-right)); bottom: max(46px, calc(env(safe-area-inset-bottom) + 40px)); display: grid; grid-template-columns: repeat(3, 56px); gap: 8px; }
  .tbtns button { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 13px; font-weight: 700; }
  .tbtns button.on { background: var(--lime); color: var(--ink); }
  .bl { left: 164px; bottom: max(30px, env(safe-area-inset-bottom)); max-width: calc(100vw - 180px - 200px); }
  .addr .line { font-size: 19px; }
  .hint { display: none; }
  .card { bottom: 200px; }
  .pop { right: 0; }
}
@media (max-width: 640px) {
  .theme { display: none; }
  .bl { left: 16px; bottom: 178px; max-width: calc(100vw - 32px); }
  .card { left: 16px; right: 16px; width: auto; bottom: 230px; }
  .pop { right: -100px; width: min(300px, calc(100vw - 32px)); }
}
