/* Stick Around Town — prototype styles
   Look: soft pastel wash, frosted white pill buttons, mono labels, thin serif display. */

:root {
  --ink: #111;
  --ink-2: #4a4a4a;
  --glass: rgba(255, 255, 255, .55);
  --glass-line: rgba(255, 255, 255, .9);
  --heart: #E5486A;
  --heart-bg: rgba(229, 72, 106, .16);
  --wash: linear-gradient(172deg, #d6e7f5 0%, #e7def4 32%, #f6dbe3 62%, #fbf0d4 100%);
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Inter Tight', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--wash);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; margin: 0; cursor: pointer; text-align: left; }
input { font: inherit; }
a { color: var(--ink); }

/* App frame: full screen on phones, a phone-sized column on desktop */
#app {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--wash);
}
@media (min-width: 600px) {
  body { display: flex; align-items: center; justify-content: center; background: #ece8f3; }
  #app { height: min(900px, calc(100dvh - 40px)); border-radius: 44px; box-shadow: 0 30px 80px rgba(60, 50, 90, .18); }
}

#scroll {
  position: absolute; inset: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(120px + env(safe-area-inset-bottom));
  outline: none;
}
.noscroll-bar { scrollbar-width: none; }
.noscroll-bar::-webkit-scrollbar { display: none; }

.screen {
  padding: calc(46px + env(safe-area-inset-top)) 20px 0 20px;
  display: flex; flex-direction: column; gap: 20px;
}

/* Type */
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; color: var(--ink); }
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
.h1 { font-size: 44px; line-height: .95; margin: 0; }
.h2 { font-size: 32px; line-height: 1; margin: 0; }
.headline { font-size: 34px; line-height: 1; white-space: nowrap; margin: 0; }
.muted { font-size: 13px; color: var(--ink-2); }
.body { font-size: 15px; line-height: 1.45; color: #333; margin: 0; }
.clamp2 {
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; text-overflow: ellipsis; overflow-wrap: anywhere;
}

/* Pills (Future Days-style: fully rounded, frosted, mono caps) */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--glass-line);
  background: var(--glass);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink); white-space: nowrap; text-align: center;
  transition: background .15s, color .15s, transform .1s;
}
.pill:active { transform: scale(.97); }
.pill.on, .pill.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.pill.big { min-height: 50px; }
.pill.wide { width: 100%; }
.row { display: flex; gap: 8px; }
.wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.hscroll { display: flex; gap: 8px; overflow-x: auto; margin: 0 -20px; padding: 0 20px 2px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* Cards */
.card {
  background: rgba(255, 255, 255, .6);
  border: 1px solid var(--glass-line);
  border-radius: 24px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.ecard { padding: 10px; display: flex; gap: 12px; align-items: center; }
.ecard .open { display: flex; gap: 12px; align-items: center; flex: 1; min-width: 0; }
.ecard .txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ecard .title { font-size: 22px; line-height: 1.02; }
.poster {
  width: 70px; height: 88px; border-radius: 14px; flex: none;
  display: flex; align-items: flex-end; padding: 8px;
  font-family: var(--serif); font-size: 21px; line-height: .9; overflow: hidden;
}
.poster.lg { width: 96px; height: 120px; flex-direction: column; justify-content: space-between; align-items: flex-start; padding: 10px; font-size: 28px; }
.poster small { font-family: var(--mono); font-size: 10.5px; letter-spacing: .05em; }
.lcard { padding: 12px 8px 12px 16px; display: flex; align-items: center; gap: 10px; }
.lcard .open { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.lcard .title { font-size: 21px; line-height: 1.05; }

/* Hearts */
.heart {
  width: 44px; height: 44px; flex: none; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.heart svg { fill: none; stroke: var(--ink); transition: fill .2s, stroke .2s; }
.heart.saved { background: var(--heart-bg); }
.heart.saved svg { fill: var(--heart); stroke: var(--heart); }
.heart.pop svg { animation: heart-pop .4s ease-out; }
@keyframes heart-pop { 0% { transform: scale(1); } 35% { transform: scale(1.45); } 65% { transform: scale(.9); } 100% { transform: scale(1); } }

/* Nav */
#nav {
  position: absolute; left: 14px; right: 14px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  height: 68px; border-radius: 999px;
  background: rgba(255, 255, 255, .62); border: 1px solid rgba(255, 255, 255, .95);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  display: flex; align-items: center; padding: 0 8px; z-index: 5;
}
#nav button {
  flex: 1; height: 52px; border-radius: 999px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase;
}
#nav button svg { stroke: currentColor; }
#nav button.on { background: var(--ink); color: #fff; }

/* Toast */
#toast {
  position: absolute; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom));
  transform: translate(-50%, 10px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 18px;
  border-radius: 999px; background: var(--ink); color: #fff;
  font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
  transition: opacity .2s, transform .2s; z-index: 20;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast svg { fill: var(--heart); stroke: var(--heart); }

/* Search */
.searchbox { justify-content: flex-start; min-height: 50px; width: 100%; text-transform: none; letter-spacing: 0; }
.searchbox input { flex: 1; border: 0; background: transparent; outline: none; font-family: var(--sans); font-size: 16px; color: var(--ink); min-width: 0; }
.suggest { padding: 6px; display: flex; flex-direction: column; margin-top: -10px; }
.suggest button { min-height: 44px; padding: 0 12px; border-radius: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 16px; }
.suggest button:active { background: rgba(0, 0, 0, .05); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Map */
.map { position: relative; height: 290px; border-radius: 28px; overflow: hidden; background: #eef1ea; border: 1px solid var(--glass-line); }
.map .sea { position: absolute; right: -60px; bottom: -80px; width: 330px; height: 250px; border-radius: 50%; background: #cfe1f1; }
.map .road { position: absolute; background: #fff; }
.map .pin { position: absolute; transform: translate(-50%, -50%); min-height: 30px; padding: 0 10px; font-size: 10.5px; }
.map .pin.active { background: var(--ink); color: #fff; border-color: var(--ink); z-index: 2; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 100px; }
.bars div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bars i { display: block; width: 100%; border-radius: 8px; background: rgba(255, 255, 255, .75); border: 1px solid var(--glass-line); }
.bars i.now { background: var(--ink); border-color: var(--ink); }
.bars span { font-family: var(--mono); font-size: 10px; color: var(--ink-2); }
input[type=range] { width: 100%; accent-color: var(--ink); }

/* Event page */
.bigposter { height: 330px; border-radius: 28px; display: flex; flex-direction: column; justify-content: space-between; padding: 22px; }
.bigposter .word { font-family: var(--serif); font-size: 84px; line-height: .85; overflow-wrap: anywhere; }
.bigposter .mono { color: inherit; font-size: 12px; }
.lineup div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; border-top: 1px solid rgba(17, 17, 17, .12); padding-top: 10px; }
.linkish { text-decoration: underline; text-underline-offset: 3px; }

/* Profile */
.avatar { width: 60px; height: 60px; border-radius: 999px; background: rgba(255, 255, 255, .7); border: 1px solid #fff; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 28px; }
.tabs { display: flex; gap: 6px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .45); border: 1px solid var(--glass-line); }
.tabs .pill { flex: 1; border-color: transparent; }
.drop { height: 220px; width: 100%; border-radius: 28px; border: 1.5px dashed rgba(17, 17, 17, .4); background: rgba(255, 255, 255, .4); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; }
.field { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid rgba(17, 17, 17, .12); padding-top: 8px; font-size: 15px; }

/* Location sheet */
#overlay { position: absolute; inset: 0; z-index: 10; display: none; }
#overlay.open { display: block; }
.scrim { position: absolute; inset: 0; width: 100%; height: 100%; background: rgba(30, 30, 50, .28); animation: fade .2s ease-out; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  border-radius: 36px 36px 0 0; background: rgba(255, 255, 255, .95);
  padding: 22px 20px calc(30px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 14px;
  animation: slide-up .25s ease-out;
}
.locmap { position: relative; height: 190px; border-radius: 24px; overflow: hidden; background: #eef1ea; }
.locmap .ring { position: absolute; transform: translate(-50%, -50%); border-radius: 999px; background: rgba(17, 17, 17, .08); border: 1.5px solid var(--ink); transition: width .15s, height .15s, left .25s, top .25s; }
.locmap .dot { position: absolute; width: 12px; height: 12px; transform: translate(-50%, -50%); border-radius: 999px; background: var(--ink); transition: left .25s, top .25s; }
.locmap .tname { position: absolute; transform: translate(-50%, 10px); font-family: var(--mono); font-size: 9.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
@keyframes slide-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.screen-in { animation: fade .18s ease-out; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.heart.pill { padding: 0; min-height: 44px; }

/* Poster thumbnails (cropped to fill, top of poster shown) */
.poster.img { padding: 0; }
.poster.img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }

/* Event page hero: cropped poster + View poster */
.hero { position: relative; height: 360px; border-radius: 28px; overflow: hidden; }
.hero-tap { display: block; width: 100%; height: 100%; }
.hero img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.viewbtn { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); background: rgba(255,255,255,.82); }
.viewbtn:active { transform: translateX(-50%) scale(.97); }

/* Full-screen viewer (covers the whole window, phone or laptop) */
#viewer { position: fixed; inset: 0; z-index: 50; display: none; flex-direction: column; background: rgba(14, 14, 20, .94); animation: fade .2s ease-out; }
#viewer.open { display: flex; }
.vbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: calc(14px + env(safe-area-inset-top)) 16px 10px 20px; }
.vbar .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vclose { width: 44px; min-height: 44px; padding: 0; background: rgba(255,255,255,.9); }
.vtrack { flex: 1; min-height: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior: contain; }
.vslide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; padding: 8px 16px; box-sizing: border-box; }
/* Each frame keeps the uploaded image's own ratio and fits inside the screen */
.vframe { margin: 0; width: min(100%, calc((100dvh - 170px) * var(--r)), 900px); max-height: 100%; border-radius: 10px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.4); transition: width .25s ease; }
.vframe img { width: 100%; height: 100%; display: block; object-fit: contain; background: #fff; }
.vnav { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 10px 16px calc(18px + env(safe-area-inset-bottom)); min-height: 64px; }
.vnav .pill { width: 44px; min-height: 44px; padding: 0; background: rgba(255,255,255,.9); }
.vdots { display: flex; gap: 6px; }
.vdots i { width: 7px; height: 7px; border-radius: 999px; background: rgba(255,255,255,.4); }
.vdots i.on { background: #fff; }

/* Share sheet fallback (laptops without the system share sheet) */
.sharegrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sharegrid a { text-decoration: none; }

/* No-poster tile: event type on the chosen colour theme */
.poster.type { align-items: flex-end; padding: 9px; }
.poster.type span { font-family: var(--mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; line-height: 1.2; }
.poster.type.lg span { font-size: 11px; }
.swatch { width: 40px; height: 40px; border-radius: 999px; display: flex; align-items: flex-end; justify-content: flex-end; padding: 6px; border: 2px solid rgba(255,255,255,.9); box-shadow: 0 0 0 1px rgba(17,17,17,.08); }
.swatch i { width: 10px; height: 10px; border-radius: 999px; display: block; }
.swatch.on { box-shadow: 0 0 0 2px var(--ink); }

/* Filter row */
.filters .badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 10.5px; font-weight: 500; }
.filters .pill.on .badge { background: #fff; color: var(--ink); }
