* { box-sizing: border-box; }

:root {
  --fg: #fff;
  --bg: #000;
  --dim: #a6a6a6;
  --line: 1px solid var(--fg);
  font-family: Courier, serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.4;
  color-scheme: dark;
}

html, body { height: 100%; }
body { margin: 0; overflow: hidden; overscroll-behavior: none; user-select: none; -webkit-user-select: none; }
button, a { font: inherit; color: inherit; border-radius: 0; }
button, .map-link, .card-link { cursor: pointer; background: var(--bg); border: var(--line); min-height: 44px; padding: 8px 12px; letter-spacing: .06em; text-decoration: none; }
button[aria-pressed="true"] { color: var(--bg); background: var(--fg); }
button:focus-visible, a:focus-visible, .scene:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
p, h1, h2, h3, ul { margin: 0; }
[hidden] { display: none !important; }

.scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; outline-offset: -4px; }
.scene[data-dragging="true"] { cursor: grabbing; }
.scene[data-hover="work"] { cursor: pointer; }

.hud-top { position: fixed; z-index: 5; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: linear-gradient(to bottom, rgba(0, 0, 0, .85), transparent); pointer-events: none; }
.hud-top > * { pointer-events: auto; }
.brand { line-height: 0; margin-right: auto; }
.brand img { display: block; height: 36px; width: auto; }
.floors { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .08em; }
.floor-buttons { display: flex; }
.floor-buttons button { min-width: 44px; }
.floor-buttons button + button { border-left: 0; }
.map-link { display: inline-flex; align-items: center; font-size: 11px; }

.minimap { position: fixed; z-index: 4; right: 12px; top: 68px; height: min(260px, 38vh); width: auto; border: var(--line); background: rgba(0, 0, 0, .8); cursor: crosshair; touch-action: none; }
.aim { position: fixed; z-index: 4; left: 50%; bottom: 96px; transform: translateX(-50%); max-width: min(90vw, 520px); padding: 6px 10px; border: var(--line); background: var(--bg); font-size: 12px; text-align: center; pointer-events: none; }
.status { position: fixed; z-index: 4; left: 16px; right: 16px; top: 46%; text-align: center; font-size: 14px; color: var(--dim); pointer-events: none; }
.stairs { position: fixed; z-index: 6; left: 50%; bottom: 150px; transform: translateX(-50%); font-size: 13px; background: var(--fg); color: var(--bg); }

.stick { display: none; position: fixed; z-index: 6; left: 20px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); width: 112px; height: 112px; border: var(--line); border-radius: 50%; background: rgba(0, 0, 0, .45); touch-action: none; }
.stick i { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: var(--fg); }
@media (pointer: coarse) { .stick { display: block; } .desktop-only { display: none; } }
@media (pointer: fine) { .touch-only { display: none; } }
body[data-card="open"] .stick { bottom: calc(190px + env(safe-area-inset-bottom, 0px)); }

/* Lata à vista: mira no centro e dica */
.crosshair { display: none; position: fixed; z-index: 4; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; pointer-events: none;
  background: linear-gradient(var(--fg), var(--fg)) center / 100% 1px no-repeat, linear-gradient(var(--fg), var(--fg)) center / 1px 100% no-repeat; opacity: .8; }
body[data-spray="on"] .crosshair { display: block; }
.spray-hint { position: fixed; z-index: 4; left: 50%; top: 84px; transform: translateX(-50%); max-width: 92vw; padding: 6px 12px; border: var(--line); background: var(--bg); font-size: 11px; letter-spacing: .08em; text-align: center; pointer-events: none; }

.spray-hint > span { display: none; }
.spray-hint[data-state="how"] .hint-how, .spray-hint[data-state="far"] .hint-far, .spray-hint[data-state="blocked"] .hint-blocked { display: inline; }

.intro { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .78); }
.intro-box { width: min(100%, 440px); padding: 24px; border: var(--line); background: var(--bg); }
.intro h2 { font-size: 22px; letter-spacing: .1em; }
.intro ul { margin: 16px 0 24px; padding: 0; list-style: none; font-size: 13px; line-height: 2; letter-spacing: .04em; color: var(--dim); }
.intro b { color: var(--fg); }
.intro button { width: 100%; background: var(--fg); color: var(--bg); font-weight: 700; }

.card { position: fixed; z-index: 10; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; max-height: 70vh; max-height: 70dvh; background: var(--bg); border-top: var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); user-select: text; -webkit-user-select: text; }
.card-nav { display: flex; align-items: center; border-bottom: var(--line); }
.card-nav button { border: 0; min-width: 52px; font-size: 18px; }
.card-nav #prev { border-right: var(--line); }
.card-nav #next { border-left: var(--line); border-right: var(--line); }
.card-position { flex: 0 0 auto; min-width: 92px; padding: 0 8px; text-align: center; font-size: 13px; letter-spacing: .08em; }
.card-close { margin-left: auto; font-size: 24px !important; line-height: 1; }
.card-body { flex: 1; min-height: 0; padding: 12px 16px; overflow-y: auto; overscroll-behavior: contain; overflow-wrap: anywhere; }
.card-meta { font-size: 11px; letter-spacing: .1em; color: var(--dim); }
.card h2 { margin-top: 4px; font-size: 19px; line-height: 1.2; }
.card-artist { margin-top: 2px; font-size: 14px; }
.card-sale { margin-top: 8px; font-size: 12px; letter-spacing: .06em; }
.card-sale:empty, .card-description:empty { display: none; }
.card-more { display: none; margin-top: 16px; padding-top: 16px; border-top: 1px solid #333; }
.card[data-expanded="true"] .card-more { display: block; }
.card-description { font-size: 14px; line-height: 1.55; white-space: pre-line; }
.card-audio { margin-top: 16px; }
.card-audio h3 { margin-bottom: 8px; font-size: 11px; font-weight: 400; letter-spacing: .1em; color: var(--dim); }
.card-audio audio { display: block; width: 100%; }
.card-link { display: flex; align-items: center; justify-content: center; margin-top: 16px; font-size: 12px; }
.card-expand { border: 0; border-top: var(--line); font-size: 12px; }

@media (min-width: 900px) {
  .brand img { height: 48px; }
  .hud-top { padding: 14px 16px; }
  .minimap { top: 88px; right: 16px; height: min(360px, 50vh); }
  .card { left: 16px; right: auto; top: 88px; bottom: auto; width: 380px; max-height: calc(100dvh - 104px); border: var(--line); }
  .card .card-more { display: block; }
  .card-expand { display: none; }
  .aim { bottom: 32px; }
}
