@font-face { font-family: "Inter"; src: url(fonts/inter.woff2) format("woff2"); font-weight: 400 650; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url(fonts/instrument-serif.woff2) format("woff2"); font-display: swap; }
:root { --brass: #d9b773; --glass: rgba(16,15,13,.58); color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0e0d0b; color: #f3efe7;
  font: 14px/1.45 "Inter", system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: inherit; }
canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
.glass { background: var(--glass); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid rgba(255,255,255,.09); }
.bar { position: fixed; top: max(14px, env(safe-area-inset-top)); left: 14px; right: 14px; display: flex; justify-content: space-between; gap: 10px; pointer-events: none; z-index: 3; }
.bar > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border-radius: 999px; text-decoration: none; min-width: 0; }
.brand svg { width: 32px; height: 32px; flex: none; }
.brand > span { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.brand b { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand small { color: rgba(243,239,231,.62); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag { color: var(--brass); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; font-weight: 650; }
.actions { display: flex; gap: 8px; flex: none; }
.icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; cursor: pointer; padding: 0; }
.icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cta { display: inline-flex; align-items: center; height: 44px; padding: 0 20px; border-radius: 999px; background: #f3efe7; color: #16140f;
  font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .2s; }
.cta:hover { background: #fff; }
.icon:focus-visible, .cta:focus-visible, .brand:focus-visible, .switch a:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.switch { position: fixed; left: 14px; bottom: max(14px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; z-index: 3; font-variant-numeric: tabular-nums; }
.switch a { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; text-decoration: none; font-size: 22px; line-height: 1; padding-bottom: 3px; }
.switch a:hover { background: rgba(255,255,255,.1); }
.switch span { font-size: 12.5px; color: rgba(243,239,231,.72); padding: 0 4px; }
.hint { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); margin: 0; padding: 10px 18px; border-radius: 999px;
  font-size: 13px; white-space: nowrap; transition: opacity .8s; pointer-events: none; z-index: 2; }
.hint.faded { opacity: 0; }
.credit { position: fixed; right: 14px; bottom: 6px; margin: 0; max-width: 46vw; text-align: right; font-size: 10.5px; color: rgba(243,239,231,.55); text-shadow: 0 1px 3px #000; z-index: 2; }
.loading { position: fixed; inset: 0; z-index: 4; display: grid; place-items: center; background: #0e0d0b; transition: opacity .7s ease; overflow: hidden; }
.loading.gone { opacity: 0; pointer-events: none; }
.loading-bg { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; filter: blur(24px) brightness(.45) saturate(1.1); transform: scale(1.04); }
.loading-card { position: relative; text-align: center; padding: 24px; }
.eyebrow { margin: 0 0 8px; color: var(--brass); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
h1 { margin: 0; font: 400 clamp(34px, 6vw, 52px)/1.05 "Instrument Serif", Georgia, serif; letter-spacing: -.01em; }
.muted { color: rgba(243,239,231,.68); margin: 6px 0 0; }
.small { font-size: 12.5px; }
.meter { width: 220px; height: 2px; margin: 22px auto 0; background: rgba(255,255,255,.16); border-radius: 2px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--brass); transition: width .2s; }
@media (max-width: 640px) {
  .cta { padding: 0 14px; font-size: 13px; }
  #fs { display: none; }
  .hint { bottom: 106px; font-size: 12px; }
  .credit { left: 14px; right: 14px; max-width: none; text-align: center; bottom: max(4px, env(safe-area-inset-bottom)); }
  .switch { left: 50%; transform: translateX(-50%); bottom: calc(46px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
