/*
 * The one stylesheet of /lugares/. Brand tokens mirrored from press/index.html
 * (and lib/core/theme/app_colors.dart): black background, lime accent, square
 * corners, red for shops (AppColors.danger, the shop pin on the app's map).
 * Dark only by design, like the app. Mobile first: a place page is opened
 * from an Instagram bio far more often than from a desk. The scripts are the
 * in-app browser banner's (.iab), hidden everywhere else, and the one that
 * hides an event once it is over, and on a shop's page the short link's\n * share button.
 */
:root {
  --bg: #0B0B0D;
  --surface: #16161A;
  --surface-alt: #1C1C22;
  --border: rgba(255, 255, 255, 0.12);
  --text: #F2F2F0;
  --text-2: #8A8A93;
  --accent: #C6F135;
  --danger: #FF4B39;
  --display: "Archivo Black", "Arial Black", system-ui, sans-serif;
  --body: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 16px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1rem/1.6 var(--body); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
p { margin: 0 0 16px; }
.muted { color: var(--text-2); }

.wrap { max-width: 880px; margin: 0 auto; padding: 0 var(--gutter); }
header.bar { border-bottom: 1px solid var(--border); }
header.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.wordmark { font: 400 1.25rem/1 var(--display); letter-spacing: 0.02em; text-transform: uppercase; color: var(--text); text-decoration: none; }
.wordmark span { color: var(--accent); }
header.bar nav { display: flex; gap: 14px; white-space: nowrap; }
header.bar nav a { color: var(--text-2); text-decoration: none; font-weight: 700; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; }
header.bar nav a:hover { color: var(--text); }
/* On a narrow phone the directory link goes and "abrir la app" stays; a
   shop's bar never had the first one. */
@media (max-width: 400px) { header.bar nav .nav-directory { display: none; } }

main.wrap { padding-top: 24px; padding-bottom: 48px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.1; margin: 0 0 12px; overflow-wrap: anywhere; }
h1 { font-size: clamp(2rem, 8vw, 3.25rem); text-transform: uppercase; letter-spacing: 0.01em; }
h2 { font-size: clamp(1.375rem, 5vw, 1.875rem); margin-top: 40px; }
h3 { font-size: 1.0625rem; margin-top: 24px; color: var(--text); }
.lead { font-size: 1.125rem; max-width: 40em; }
.where { color: var(--text-2); font-weight: 600; margin-bottom: 20px; }

.crumbs { font-size: 0.8125rem; color: var(--text-2); margin-bottom: 20px; }
.crumbs a { color: var(--text-2); }
.crumbs a:hover { color: var(--text); }

.note { font-size: 1.0625rem; max-width: 42em; white-space: pre-line; }
.attribution { font-size: 0.8125rem; color: var(--text-2); margin-top: 16px; }
.attribution a { color: var(--text-2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 20px; border: 2px solid var(--accent);
  background: var(--accent); color: var(--bg); font: 700 0.875rem/1 var(--body);
  letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }
.btn.big { min-height: 60px; padding: 16px 28px; font-size: 1rem; width: 100%; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); flex: 1 1 140px; }
.btn.ghost:hover { border-color: var(--text-2); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
@media (min-width: 640px) { .btn.big { width: auto; } .btn.ghost { flex: 0 0 auto; } }

.tag { display: inline-block; border: 1px solid var(--accent); color: var(--accent); font-weight: 700; font-size: 0.625rem; letter-spacing: 0.12em; padding: 1px 6px; text-transform: uppercase; vertical-align: 2px; }
ul.places { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); }
ul.places li { border-bottom: 1px solid var(--border); background: var(--surface); }
ul.places li:last-child { border-bottom: 0; }
ul.places a { display: block; padding: 12px 16px; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
ul.places a:hover { background: var(--surface-alt); }
ul.places .muted { display: block; font-size: 0.875rem; }

.toc ul { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.toc a { display: inline-block; padding: 6px 10px; border: 1px solid var(--border); color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.875rem; }
.toc a:hover { border-color: var(--accent); }
.toc .muted { font-size: 0.8125rem; margin-left: 2px; }

/* ---- A place page -------------------------------------------------------
 *
 * One reading order in the markup — the story (.story: name, figures, about,
 * photos, events), then the practical (.practical: open it, get there, the
 * map, the stamp) — laid out two ways. On a phone both wrappers dissolve
 * (display: contents) and `order` interleaves their sections into the one
 * column the mockup shows, with "open in the app" right under the figures;
 * from 960px they are two columns side by side.
 */
.wrap.wide { max-width: 1120px; }
.hero { position: relative; background: var(--surface); }
.hero img { width: 100%; aspect-ratio: 3 / 2; max-height: 62vh; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 11, 13, 0) 45%, var(--bg) 100%); pointer-events: none; }
main.over-hero { position: relative; margin-top: -40px; padding-top: 0; }

.place { display: flex; flex-direction: column; }
.story, .practical { display: contents; }
.place-head, .short-link { order: 1; }
.proof { order: 2; }
.act { order: 3; }
.about { order: 4; }
.hours { order: 5; }
.gallery { order: 6; }
.events { order: 7; }
.map, .near { order: 8; }
.stamp { order: 9; }
.attribution { order: 10; }

.kicker { color: var(--accent); font-weight: 700; font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 6px; }
.kicker-shop { color: var(--danger); }
.place h1 { font-size: clamp(1.875rem, 8vw, 2.75rem); text-transform: none; letter-spacing: 0; margin-bottom: 6px; }
.place .where { margin-bottom: 0; }
.label { font: 700 0.6875rem/1.2 var(--body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2); margin: 28px 0 10px; }

.proof { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--border); }
.proof-1 { grid-template-columns: minmax(0, 1fr); }
.proof-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.proof li { padding: 12px 6px; text-align: center; border-left: 1px solid var(--border); }
.proof li:first-child { border-left: 0; }
.proof strong { display: block; font: 400 1.375rem/1.1 var(--display); }
.proof span { display: block; margin-top: 4px; color: var(--text-2); font-weight: 700; font-size: 0.625rem; line-height: 1.3; letter-spacing: 0.1em; text-transform: uppercase; }

.act { margin-top: 18px; }
.ig-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; max-width: 100%; margin-bottom: 12px; padding: 8px 12px; border: 1px solid var(--border); color: var(--text); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.ig-pill::before { content: ""; flex: none; width: 18px; height: 18px; border-radius: 5px; background: linear-gradient(45deg, #F09433, #DC2743, #BC1888); }
.ig-pill:hover { border-color: var(--text-2); }
.act .btn.big { display: flex; width: 100%; }
.btn-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.btn-pair .btn { min-height: 48px; padding: 10px 8px; font-size: 0.75rem; text-align: center; }

.tiles { display: grid; gap: 4px; aspect-ratio: 3 / 2; grid-template-columns: 2fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); }
.tiles-2 { aspect-ratio: 2 / 1; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr); }
.tiles-3 a:first-child { grid-row: 1 / 3; }
.tiles a { position: relative; display: block; overflow: hidden; background: var(--surface); }
.tiles img { width: 100%; height: 100%; object-fit: cover; }
.tiles .more { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.55); color: var(--text); font: 400 1.375rem/1 var(--display); }

.events ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.events a { display: flex; align-items: center; gap: 12px; padding: 10px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.events a:hover { border-color: var(--text-2); }
.badge { flex: none; width: 52px; padding: 4px 0; border: 1px solid var(--accent); text-align: center; }
.badge .month { display: block; color: var(--accent); font-weight: 700; font-size: 0.625rem; letter-spacing: 0.1em; }
.badge .date { display: block; font: 400 1.25rem/1.1 var(--display); }
.what { min-width: 0; }
.what strong { display: block; overflow-wrap: anywhere; line-height: 1.3; }
.what .muted { display: block; font-size: 0.8125rem; }

.minimap { display: block; border: 1px solid var(--border); text-decoration: none; }
.minimap svg { display: block; width: 100%; height: auto; }
.minimap .land { fill: #E9E6DF; }
.minimap .grid { stroke: #D3CEC4; stroke-width: 1; }
.pin { stroke: #0B0B0D; stroke-width: 3; }
.pin-near { fill: var(--accent); stroke-width: 2; }
.pin-near-shop { fill: var(--danger); }
.pin-shop { fill: var(--danger); }
.pin-skatepark, .pin-spot { fill: #0B0B0D; stroke: var(--accent); stroke-width: 4; }
.minimap-cta { display: block; padding: 8px 10px; border-top: 1px solid var(--border); background: var(--surface); text-align: right; color: var(--text); font-weight: 700; font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; }
.nearby-list { list-style: none; margin: 0; padding: 0; }
.nearby-list a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: 0.9375rem; }
.nearby-list a:hover strong { text-decoration: underline; }
.nearby-list strong { min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.nearby-list .muted { flex: none; font-size: 0.8125rem; }
.map h3.label { margin-top: 18px; }

.stamp-box { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px dashed var(--accent); color: var(--text); text-decoration: none; }
.stamp-box:hover { background: var(--surface); }
.seal { flex: none; display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; border: 3px solid var(--accent); border-radius: 50%; color: var(--accent); font: 800 0.5625rem/1.15 var(--body); letter-spacing: 0.06em; text-align: center; transform: rotate(-10deg); }
.stamp-box strong { display: block; }
.stamp-box .muted { display: block; margin-top: 2px; font-size: 0.8125rem; line-height: 1.4; }
footer .correction { margin-top: -6px; }

/* A shop's short link, under its name, lime-edged like the app's own
   "tú propusiste" box: it is the thing the owner came here to copy. */
.short-link { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 6px 6px 6px 12px; background: var(--surface); border: 1px solid var(--accent); font-weight: 700; font-size: 0.9375rem; }
.short-link-icon { flex: none; }
/* One line: "skateplaces-" broken from "app.com" reads as two things. A
   longer short gives way at the end, and the link still copies whole. */
.short-link-url { min-width: 0; color: var(--text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.875rem; }
.short-link-url:hover { text-decoration: underline; }
.short-link-share { flex: none; margin-left: auto; min-height: 40px; padding: 0 8px; background: none; border: 0; color: var(--accent); font: 700 0.6875rem/1 var(--body); letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; }
.short-link-share:hover { text-decoration: underline; }
footer strong { color: var(--text); font-weight: 700; }

/* A shop's logo, "abierto ahora", its week and what it sells. The badge and
   today's row are the script's (live_script.js): hidden, and plain, until it
   has read the clock. */
.place-head.with-logo .logo { margin-bottom: 12px; }
.place-head .titles { min-width: 0; }
.logo { flex: none; width: 72px; height: 72px; border-radius: 50%; border: 3px solid var(--bg); background: #FFF; object-fit: cover; }
.open-now { display: inline-flex; align-items: center; gap: 8px; margin: 10px 0 0; padding: 5px 10px; border: 1px solid var(--border); font-size: 0.8125rem; color: var(--text-2); }
.open-now[hidden] { display: none; }
.open-now::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.open-now strong { font-size: 0.6875rem; letter-spacing: 0.12em; }
.open-now.is-open { border-color: var(--accent); }
.open-now.is-open::before, .open-now.is-open strong { color: var(--accent); }
.open-now.is-closed::before, .open-now.is-closed strong { color: var(--danger); }
.hours .card { padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); }
.hours ul { list-style: none; margin: 0; padding: 0; }
.hours li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; color: var(--text-2); font-size: 0.875rem; }
.hours li .time { text-align: right; }
.hours li.today { color: var(--text); font-weight: 700; }
.hours li.today .time { color: var(--accent); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; padding: 0; }
.chips li { padding: 5px 10px; border: 1px solid var(--border); font-size: 0.8125rem; }
@media (min-width: 960px) {
  .place-head.with-logo { display: flex; align-items: flex-end; gap: 18px; }
  .place-head.with-logo .logo { margin-bottom: 0; }
  .logo { width: 96px; height: 96px; border-width: 4px; }
  .act + .hours .label { margin-top: 24px; }
}

@media (min-width: 960px) {
  .hero img { aspect-ratio: auto; height: 380px; max-height: none; }
  .hero::after { background: linear-gradient(180deg, rgba(11, 11, 13, 0) 20%, rgba(11, 11, 13, 0.7) 60%, var(--bg) 100%); }
  main.over-hero { margin-top: -120px; }
  .place { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 0 40px; align-items: start; }
  .story, .practical { display: block; }
  .practical { padding-top: 44px; }
  .act { margin-top: 0; padding: 16px; background: var(--surface); border: 1px solid var(--border); }
  .practical .label { margin-top: 24px; }
  .events ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

footer { border-top: 1px solid var(--border); padding: 24px 0 40px; font-size: 0.875rem; color: var(--text-2); }
footer a { color: var(--text-2); }

/* The in-app browser banner (src/in_app_banner.js): lime, thin, over the
   header, shown by its script only inside Instagram's, Facebook's or
   TikTok's browser. */
.iab { background: var(--accent); color: var(--bg); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 8px 4px 8px var(--gutter); font-size: 0.8125rem; line-height: 1.3; }
.iab[hidden], .iab-hint[hidden] { display: none; }
.iab p { margin: 0; flex: 1 1 12em; }
.iab strong { font-weight: 700; }
.iab-go { background: var(--bg); color: var(--accent); text-decoration: none; font-weight: 700; font-size: 0.6875rem; letter-spacing: 0.1em; padding: 9px 11px; white-space: nowrap; }
.iab-x { background: none; border: 0; color: var(--bg); font-size: 1.25rem; line-height: 1; min-width: 44px; min-height: 44px; cursor: pointer; }
.iab .iab-hint { flex-basis: 100%; padding-right: var(--gutter); }
