/* An app, not a page: double-tap must never zoom. touch-action stops at every scroll container, so it
   is set on every element; rules that need something else (e.g. .lightbox__img) override it. */
*, *::before, *::after { touch-action: manipulation; }

@font-face { font-family: "Anton"; src: url(fonts/anton-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Fraunces"; font-weight: 400; src: url(fonts/fraunces-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Fraunces"; font-weight: 600; src: url(fonts/fraunces-latin-600-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Fraunces"; font-weight: 700; src: url(fonts/fraunces-latin-700-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Space Mono"; font-weight: 400; src: url(fonts/space-mono-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Space Mono"; font-weight: 700; src: url(fonts/space-mono-latin-700-normal.woff2) format("woff2"); font-display: swap; }

:root {
  --paper: #f1e6d2;
  --paper-2: #e8d9bf;
  --card: #fbf5e9;
  --ink: #1d1a16;
  --ink-2: #4a433a;
  --red: #c8381f;
  --mustard: #e9a23b;
  --teal: #1d5c5a;
  --sea: #2c6e9b;
  --asphalt: #2b2824;
  --display: "Anton", Impact, "Arial Narrow", sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;
  --sans: "Fraunces", Georgia, "Times New Roman", serif;
  --shadow: 4px 4px 0 var(--ink);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* The page itself never scrolls: header and tab bar stay put, only <main> (and the login card) scroll. */
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
body {
  margin: 0;
  font: 16px/1.4 var(--sans);
  background: var(--paper);
  color: var(--ink);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.22;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .25 0 0 0 0 .18 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
a { color: inherit; text-decoration: none; }
input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.mono { font-family: var(--mono); }
.muted { color: var(--ink-2); }
.eyebrow { font: 700 11px/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.12em; }
.small { font-size: 13px; margin: 14px 4px 0; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  font: 700 15px var(--sans);
  text-align: center;
  transition: transform 0.08s, box-shadow 0.08s;
}
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn--red { background: var(--red); color: #fff; }
.btn--mustard { background: var(--mustard); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--wide { display: flex; width: 100%; margin-top: 12px; }
.btn--sm { padding: 8px 13px; font-size: 13px; box-shadow: 2px 2px 0 var(--ink); }

/* ---------- Login ---------- */

.login {
  position: fixed;
  inset: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: calc(28px + var(--safe-t)) 22px calc(28px + var(--safe-b));
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.login__sun {
  position: absolute;
  top: -120px;
  left: 50%;
  width: 520px;
  height: 520px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: repeating-linear-gradient(180deg, var(--red) 0 34px, transparent 34px 46px);
  -webkit-mask: radial-gradient(circle, #000 60%, transparent 61%);
  mask: radial-gradient(circle, #000 60%, transparent 61%);
  opacity: 0.9;
}
.login__boar { position: relative; width: 210px; margin-top: 30px; filter: drop-shadow(5px 5px 0 var(--ink)); animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-2deg); } }
.login__title { position: relative; font: 92px/0.82 var(--display); text-transform: uppercase; letter-spacing: -0.01em; margin-top: 8px; -webkit-text-stroke: 0; text-shadow: 4px 4px 0 var(--mustard); }
.login__tour { font: 700 12px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; margin-top: 14px; }
.login__card { width: 100%; max-width: 420px; margin-top: 26px; padding: 20px; background: var(--card); border: 2.5px solid var(--ink); border-radius: 22px; box-shadow: 6px 6px 0 var(--ink); text-align: left; }
.login__card h2 { font: 30px/1 var(--display); text-transform: uppercase; }
.login__hint { font-size: 15px; color: var(--ink-2); margin-top: 8px; }
.login__hint b { color: var(--ink); overflow-wrap: anywhere; }
.login__form { margin-top: 18px; }
.login__card .login__form { margin-top: 0; }
.login__form label { display: block; font: 700 11px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; margin: 16px 0 6px; }
.login__card input { display: block; width: 100%; padding: 13px 14px; border: 2.5px solid var(--ink); border-radius: 12px; background: #fff; font-size: 17px; outline: none; }
.login__card input:focus { box-shadow: 3px 3px 0 var(--red); }
.login__card .login__code { font: 700 32px var(--mono); letter-spacing: 0.4em; text-align: center; padding: 10px 0 10px 0.4em; }
.login__card .btn[disabled] { opacity: 0.6; }
.entry__choice { display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 14px; padding: 14px; text-align: left; background: var(--paper); border: 2.5px solid var(--ink); border-radius: 16px; box-shadow: 3px 3px 0 var(--ink); }
.entry__choice:active { transform: translate(3px, 3px); box-shadow: none; }
.entry__choice--main { background: var(--mustard); }
.entry__choice strong { display: block; font: 22px/1 var(--display); text-transform: uppercase; }
.entry__choice small { display: block; margin-top: 4px; font-size: 13px; color: var(--ink-2); }
.entry__icon { font-size: 32px; flex: none; }
.entry__steps { margin: 14px 0 6px; padding-left: 22px; font-size: 15px; }
.entry__steps li { margin: 8px 0; }
.login__links { display: flex; justify-content: space-between; margin-top: 14px; }
.login__links button { font: 700 12px var(--mono); text-transform: uppercase; letter-spacing: 0.08em; text-decoration: underline; text-underline-offset: 3px; }
.login__row { display: flex; gap: 8px; }
.login__row input { flex: 1; min-width: 0; padding: 12px 14px; border: 2.5px solid var(--ink); border-radius: 12px; background: #fff; font-size: 17px; outline: none; }
.login__row input:focus { box-shadow: 3px 3px 0 var(--red); }

/* ---------- Header ---------- */

.app { position: fixed; inset: 0; display: flex; flex-direction: column; }
.top {
  position: relative;
  flex: none;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(8px + var(--safe-t)) 14px 8px;
  background: var(--paper);
  border-bottom: 2.5px solid var(--ink);
}
.top__stamp { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; border: 2.5px solid var(--ink); flex: none; transform: rotate(-8deg); }
.top__stamp img { width: 100%; height: 100%; display: block; }
.top__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top__text strong { font: 24px/1 var(--display); text-transform: uppercase; letter-spacing: 0.01em; }
.top__text span { font: 10px var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top__clock { font: 700 15px var(--mono); padding: 5px 8px; background: var(--ink); color: var(--mustard); border-radius: 6px; font-variant-numeric: tabular-nums; }
.top__me { width: 40px; height: 40px; flex: none; }
.top__me .av { width: 100%; height: 100%; font-size: 18px; }

.av { display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; border: 2.5px solid var(--ink); object-fit: cover; background: var(--paper-2); color: #fff; font: 16px/1 var(--display); }
.av--xs { width: 20px; height: 20px; border-width: 1.5px; font-size: 11px; }
.av--sm { width: 28px; height: 28px; border-width: 2px; font-size: 14px; }
.av--xl { width: 96px; height: 96px; border-width: 3px; font-size: 44px; box-shadow: 4px 4px 0 var(--ink); }

.me { display: flex; align-items: center; gap: 16px; }
.me .sheet__head { flex: 1; min-width: 0; }
.me__pic { position: relative; flex: none; }
.me__name { display: flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.me__edit { flex: none; width: 34px; height: 34px; font-size: 16px; text-align: center; background: var(--paper-2); border: 2px solid var(--ink); border-radius: 50%; }
.me__rename { display: flex; gap: 8px; margin-top: 8px; }
.me__rename input { flex: 1; min-width: 0; padding: 9px 12px; border: 2.5px solid var(--ink); border-radius: 12px; background: #fff; font: 17px var(--sans); outline: none; }
.me__cam { position: absolute; right: -4px; bottom: -4px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--mustard); border: 2.5px solid var(--ink); font-size: 16px; }

main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  /* Rotated cards and corner badges stick out a few px; the page must still only scroll vertically. */
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 16px 16px 28px;
  scroll-padding-top: 16px;
}
.view { display: none; max-width: 620px; margin: 0 auto; }
.view.is-active { display: block; animation: rise 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Install banner ---------- */

.install {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px;
  background: var(--mustard);
  border: 2.5px solid var(--ink);
  border-radius: 16px;
  box-shadow: var(--shadow);
  transform: rotate(-0.6deg);
}
.install__icon { width: 58px; height: 58px; border-radius: 14px; border: 2.5px solid var(--ink); flex: none; }
.install__body { flex: 1; min-width: 0; }
.install__title { font: 24px/1 var(--display); text-transform: uppercase; margin-top: 4px; }
.install__text { font-size: 14px; margin-top: 6px; }
.install__steps { margin: 8px 0 0; padding-left: 20px; font-size: 14px; }
.install__steps li { margin: 3px 0; }
.install__actions { display: flex; gap: 8px; margin-top: 10px; }
.share-ic { width: 18px; height: 18px; vertical-align: -3px; fill: none; stroke: var(--sea); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Hero ticket ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  width: 100%;
  background: var(--red);
  color: #fff;
  border: 2.5px solid var(--ink);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero__main { padding: 14px 16px 16px; min-width: 0; }
.hero__main .eyebrow { color: #ffd9c8; }
.hero__title { font: 30px/0.98 var(--display); text-transform: uppercase; margin-top: 6px; }
.hero__place { font-size: 14px; margin-top: 6px; opacity: 0.92; }
.hero__stub {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-width: 104px;
  padding: 12px 14px;
  background: var(--mustard);
  color: var(--ink);
  border-left: 2.5px dashed var(--ink);
  text-align: center;
}
.hero__peek { display: grid; place-items: center; width: 64px; height: 30px; margin: -2px auto 0; background: var(--paper); border: 2.5px solid var(--ink); border-top: 0; border-radius: 0 0 14px 14px; color: var(--ink); }
.hero__peek svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s; }
.hero__peek.is-open svg { transform: rotate(180deg); }
.hero__img { display: grid; place-items: center; margin-top: 8px; padding: 10px; background: #fff; border: 2.5px solid var(--ink); border-radius: 16px; box-shadow: var(--shadow); }
.hero__img[hidden] { display: none; }
.hero__img img { display: block; width: 100%; max-width: 260px; height: auto; }
.hero__stub span { font: 700 10px var(--mono); text-transform: uppercase; letter-spacing: 0.14em; }
.hero__stub strong { font: 34px/1 var(--display); margin-top: 4px; white-space: nowrap; }
.hero__stub em { font: 700 11px var(--mono); font-style: normal; text-transform: uppercase; }
.hero--urgent { animation: shake 2.4s ease-in-out infinite; }
.hero--urgent .hero__stub { background: #fff; }
@keyframes shake { 0%, 88%, 100% { transform: rotate(0); } 91% { transform: rotate(-1.2deg); } 94% { transform: rotate(1.2deg); } 97% { transform: rotate(-0.6deg); } }
.hero--secret { background: var(--ink); }
.hero--flight { background: var(--sea); }
.hero--food { background: var(--teal); }
.hero--done { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--teal); }
.hero--done img { width: 70px; }

/* ---------- Road timeline ---------- */

.road { position: relative; padding: 4px 0 24px 46px; }
#hero:not(:empty) + .road { margin-top: 18px; }
.road::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 6px;
  width: 26px;
  background: var(--asphalt);
  border-radius: 4px;
}
.road::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 18px;
  width: 3px;
  background: repeating-linear-gradient(var(--mustard) 0 16px, transparent 16px 30px);
}
.day { position: relative; padding-top: 22px; }
.day__head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.day__head h3 { font: 34px/0.95 var(--display); text-transform: uppercase; }
.day__head .mono { font-size: 13px; font-weight: 700; text-transform: uppercase; }
.day.is-past .day__head { opacity: 0.45; }
.day__head::before {
  content: "";
  position: absolute;
  left: -46px;
  top: 30px;
  width: 38px;
  height: 14px;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: 3px;
  z-index: 1;
}
.stamp { font: 700 11px var(--mono); text-transform: uppercase; letter-spacing: 0.1em; padding: 3px 8px; border: 2.5px solid var(--red); color: var(--red); border-radius: 6px; transform: rotate(-6deg); align-self: center; }

.ev {
  position: relative;
  display: block;
  width: 100%;
  margin-bottom: 14px;
  padding: 12px 14px 12px;
  background: var(--card);
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  box-shadow: var(--shadow);
  transition: transform 0.1s;
}
.ev:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.ev::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 20px;
  width: 30px;
  height: 2.5px;
  background: var(--ink);
}
.ev__top { display: flex; align-items: center; gap: 8px; }
.ev__time { font: 700 14px var(--mono); background: var(--ink); color: var(--paper); padding: 2px 7px; border-radius: 5px; }
.ev__icon { font-size: 20px; }
.ev__chat { margin-left: auto; font: 700 12px var(--mono); padding: 2px 8px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); }
.ev__chat.is-new { background: var(--mustard); }
.ev__title, .ev__place, .ev__note { display: block; }
.ev__title { font: 24px/1 var(--display); text-transform: uppercase; margin-top: 8px; }
.ev__place { font-size: 14px; color: var(--ink-2); margin-top: 4px; }
.ev__note { font-size: 14px; margin-top: 8px; padding-top: 8px; border-top: 2px dotted currentColor; }
.ev__img { display: block; width: 100%; max-width: 220px; margin-top: 10px; border: 2px solid var(--ink); border-radius: 8px; background: #fff; }
.event-img { display: block; width: 100%; max-width: 420px; margin: 0 auto 14px; border: 2.5px solid var(--ink); border-radius: 12px; background: #fff; }
.ev.is-past { opacity: 0.5; box-shadow: none; border-style: dashed; }
.ev.is-past .ev__note { display: none; }

.ev.kind-deadline:not(.is-past) { background: var(--red); color: #fff; }
.ev.kind-deadline:not(.is-past) .ev__place { color: #ffe1d6; }
.ev.kind-deadline:not(.is-past) .ev__time { background: #fff; color: var(--red); }
.ev.kind-food:not(.is-past) { background: var(--mustard); }
.ev.kind-flight { background: #dbe8f0; }
.ev.kind-flight .ev__title::after { content: " ✈"; }
.ev.kind-secret:not(.is-past) { background: var(--ink); color: var(--paper); overflow: hidden; }
.ev.kind-secret:not(.is-past) .ev__place { color: var(--mustard); }
.ev.kind-secret:not(.is-past) .ev__time { background: var(--mustard); color: var(--ink); }
.ev.kind-secret:not(.is-past)::after {
  content: "TOP SECRET";
  position: absolute;
  right: -6px;
  bottom: 18px;
  font: 22px var(--display);
  letter-spacing: 0.08em;
  color: var(--red);
  border: 3px solid var(--red);
  padding: 2px 10px;
  transform: rotate(-14deg);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}
.ev.kind-secret:not(.is-past) > * { position: relative; z-index: 1; }
.ev.kind-secret .ev__chat { color: var(--ink); }
.ev.kind-deadline .ev__chat { color: var(--ink); }

.free { position: relative; padding: 14px; border: 2.5px dashed var(--ink-2); border-radius: 14px; color: var(--ink-2); font-size: 15px; margin-bottom: 14px; }
.free strong { font: 20px var(--display); text-transform: uppercase; color: var(--ink); display: block; }

.now { position: relative; display: flex; align-items: center; gap: 8px; margin: 0 0 16px; height: 34px; }
.now__bike {
  position: absolute;
  left: -48px;
  top: 0;
  width: 42px;
  height: 34px;
  display: grid;
  place-items: center;
  font-size: 24px;
  background: var(--mustard);
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  z-index: 2;
  transform: scaleX(-1);
}
.now span { font: 700 12px var(--mono); text-transform: uppercase; letter-spacing: 0.12em; background: var(--mustard); border: 2.5px solid var(--ink); padding: 4px 10px; border-radius: 999px; }

/* ---------- Generic cards ---------- */

.card { background: var(--card); border: 2.5px solid var(--ink); border-radius: 16px; box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.section-title { display: flex; align-items: center; gap: 10px; font: 28px/1 var(--display); text-transform: uppercase; margin: 28px 2px 14px; }
.section-title::after { content: ""; flex: 1; height: 2.5px; background: var(--ink); }
.callout { padding: 12px 14px; border: 2.5px solid var(--ink); border-radius: 12px; background: #b9d6cf; font-size: 14px; margin: 12px 0; }

/* ---------- Villa ---------- */

.villa-poster {
  position: relative;
  overflow: hidden;
  padding: 20px 18px 18px;
  background: var(--teal);
  color: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.villa-poster::before {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: repeating-linear-gradient(180deg, var(--mustard) 0 14px, transparent 14px 22px);
}
.villa-poster h2 { position: relative; font: 46px/0.9 var(--display); text-transform: uppercase; margin-top: 6px; }
.villa-poster p { position: relative; margin-top: 8px; font-size: 14px; }
.villa-poster__address { position: relative; display: inline-flex; gap: 6px; align-items: center; margin-top: 8px; padding: 2px 0; background: none; border: 0; color: inherit; font: 14px var(--sans); text-align: left; text-decoration: underline dotted; text-underline-offset: 3px; }
.villa-poster__address span { font-size: 13px; text-decoration: none; }
.villa-poster .eyebrow { position: relative; color: var(--mustard); }
.villa-poster__actions { position: relative; display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.code { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px; background: var(--card); border: 2.5px solid var(--ink); border-radius: 14px; box-shadow: var(--shadow); min-width: 0; }
.code:nth-child(1) { transform: rotate(-1.5deg); background: var(--mustard); }
.code:nth-child(2) { transform: rotate(1.2deg); }
.code:active { transform: translate(3px, 3px); box-shadow: none; }
.code__value { font: 46px/1 var(--display); letter-spacing: 0.08em; }
.code__value--sm { font: 700 17px/1.2 var(--mono); letter-spacing: 0; overflow-wrap: anywhere; padding: 8px 0 6px; }
.code__hint { font: 10px var(--mono); text-transform: uppercase; letter-spacing: 0.1em; }

.info { display: flex; gap: 14px; }
.info__icon { font-size: 30px; line-height: 1; }
.info strong { font: 22px/1 var(--display); text-transform: uppercase; }
.info p { font-size: 14px; color: var(--ink-2); margin-top: 4px; }
.info .btn { margin-top: 10px; }

.host { display: flex; align-items: center; gap: 10px; }
.host > div { flex: 1; min-width: 0; }
.host strong { font: 22px var(--display); text-transform: uppercase; }

.rules { list-style: none; padding: 4px 16px; }
.rules li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 2px dotted var(--ink-2); font-size: 14px; }
.rules li:last-child { border-bottom: 0; }
.rules p { flex: 1; }
.rules b { font: 700 12px var(--mono); background: var(--red); color: #fff; padding: 2px 7px; border-radius: 5px; white-space: nowrap; }

/* ---------- Nearby ---------- */

.filters { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 16px; padding: 2px 16px 6px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 8px 14px; border: 2.5px solid var(--ink); border-radius: 999px; background: var(--card); font-weight: 700; font-size: 14px; }
.chip.is-active { background: var(--ink); color: var(--paper); }

.place { display: flex; align-items: center; gap: 12px; width: 100%; }
.place:active { transform: translate(3px, 3px); box-shadow: none; }
.place__icon { width: 46px; height: 46px; display: grid; place-items: center; font-size: 22px; border: 2.5px solid var(--ink); border-radius: 12px; background: var(--paper); flex: none; }
.place__body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.place__body strong { font: 20px/1.05 var(--display); text-transform: uppercase; }
.place__body small { font-size: 13px; color: var(--ink-2); }
.place__hours { color: var(--teal) !important; font-weight: 700; }
.place__dist { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font: 700 15px var(--mono); white-space: nowrap; }

/* ---------- Photos ---------- */

.photos-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.photos-head h2 { font: 44px/0.9 var(--display); text-transform: uppercase; }
.photos-head h2 small { display: block; font: 700 12px var(--mono); letter-spacing: 0.1em; color: var(--ink-2); margin-bottom: 6px; }

.albums { display: grid; grid-template-columns: 1fr 1fr; gap: 34px 20px; padding: 14px 6px 0; }
.album { display: flex; flex-direction: column; gap: 26px; }
.album__info { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 0 4px; }
/* Creator's avatar pinned to the bottom-right corner of the photo stack like a sticker. */
.album__owner { position: absolute; right: -8px; bottom: -10px; z-index: 2; transform: rotate(15deg); }
.album__owner .av { width: 36px; height: 36px; font-size: 17px; box-shadow: 2px 2px 0 var(--ink); }
.album__stack { position: relative; aspect-ratio: 1; }
.album__stack .pol { position: absolute; inset: 0; }
.album__stack .pol:nth-child(1) { transform: rotate(-7deg); }
.album__stack .pol:nth-child(2) { transform: rotate(5deg); }
.album__stack .pol:nth-child(3) { transform: rotate(-1deg); }
.album__name { font: 20px/1 var(--display); text-transform: uppercase; }
.album__meta { font: 11px var(--mono); color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.06em; }
.album--new .album__name { padding: 0 4px; }
.album--new .album__stack { display: grid; place-items: center; border: 3px dashed var(--ink); border-radius: 12px; font: 54px var(--display); background: var(--paper-2); }

.pol { position: relative; background: #fff; padding: 7px 7px 26px; border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.pol > img { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--paper-2); }
.album__stack .pol > img { height: 100%; }
.pol--empty { display: grid; place-items: center; font-size: 40px; }

.back { display: inline-flex; align-items: center; gap: 6px; font: 700 13px var(--mono); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 10px; }
/* Two independent stacks instead of CSS columns: Safari splits card borders/shadows across columns. */
/* Every photo gets the same square frame in the album (cropped to fill); the lightbox shows it uncropped. */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 14px; padding: 0 8px; }
.grid .pol { padding-bottom: 22px; display: block; width: 100%; min-width: 0; }
.grid .pol:nth-child(4n + 1) { transform: rotate(-1.5deg); }
.grid .pol:nth-child(4n + 2) { transform: rotate(1.2deg); }
.grid .pol:nth-child(4n + 3) { transform: rotate(0.8deg); }
.grid .pol:nth-child(4n) { transform: rotate(-0.8deg); }
.grid .pol > img { aspect-ratio: 1; height: auto; object-fit: cover; }
.grid .pol.is-saved::before { content: "✓ Gemt"; position: absolute; top: -8px; left: -8px; z-index: 2; padding: 3px 8px; font: 700 10px var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: #fff; background: var(--teal); border: 2px solid var(--ink); border-radius: 999px; transform: rotate(-8deg); }


.empty { text-align: center; padding: 34px 16px; border: 2.5px dashed var(--ink-2); border-radius: 16px; color: var(--ink-2); }
.empty strong { display: block; font: 26px var(--display); text-transform: uppercase; color: var(--ink); margin-bottom: 4px; }

/* Lives in the fixed app shell just above the tab bar, outside the scrolling content. */
.fab-slot { position: relative; flex: none; height: 0; z-index: 25; }
.fab {
  position: absolute;
  right: 18px;
  bottom: 16px;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  display: grid;
  place-items: center;
  font: 15px/1 var(--display);
  text-transform: uppercase;
  text-align: center;
  transform: rotate(-10deg);
}
.fab:active { transform: rotate(-10deg) translate(3px, 3px); box-shadow: none; }
.fab b { display: block; font-size: 30px; line-height: 0.8; }


/* ---------- Lightbox ---------- */

.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(20, 17, 14, 0.96); color: var(--paper); display: flex; flex-direction: column; }
.lightbox__top { display: flex; align-items: center; gap: 10px; padding: calc(12px + var(--safe-t)) 14px 10px; }
.lightbox__top .mono { flex: 1; font-size: 13px; }
.lightbox__img { flex: 1; min-height: 0; display: grid; place-items: center; padding: 8px; touch-action: pan-y; }
.lightbox__img img { max-width: 100%; max-height: 100%; object-fit: contain; border: 6px solid #fff; }
.lightbox__bar { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px calc(16px + var(--safe-b)); }
.lightbox .btn { box-shadow: none; }
.lightbox__bar { align-items: center; }
.lb-arrow { flex: none; display: grid; place-items: center; width: 60px; height: 56px; color: #fff; background: none; border: 0; }
.lb-arrow svg { width: 46px; height: 46px; fill: none; stroke: currentColor; stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5)); }
.lb-arrow--prev svg { transform: scaleX(-1); }
.lb-arrow:disabled { opacity: 0.2; }

/* ---------- Sheet + chat ---------- */

.sheet { position: fixed; inset: 0; z-index: 50; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(29, 26, 22, 0.5); opacity: 0; transition: opacity 0.25s; }
.sheet__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 92dvh;
  max-width: 620px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sheet.is-open .sheet__backdrop { opacity: 1; }
.sheet.is-open .sheet__panel { transform: none; }
.sheet__grip { flex: none; width: 54px; height: 6px; border-radius: 9px; background: var(--ink); margin: 10px auto 6px; }
.sheet__body { overflow-y: auto; padding: 8px 18px calc(18px + var(--safe-b)); display: flex; flex-direction: column; min-height: 0; }
.sheet__head h2 { font: 36px/0.95 var(--display); text-transform: uppercase; margin-top: 6px; }
.sheet__head p { color: var(--ink-2); margin-top: 6px; }
.sheet h4 { font: 22px var(--display); text-transform: uppercase; margin: 20px 0 8px; }

.details { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 14px 0 0; padding: 14px; background: var(--card); border: 2.5px solid var(--ink); border-radius: 12px; font-size: 14px; }
.details dt { font: 700 11px/1.8 var(--mono); text-transform: uppercase; color: var(--ink-2); }
.details dd { margin: 0; font-weight: 700; }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist label { display: flex; gap: 12px; align-items: center; padding: 11px 2px; border-bottom: 2px dotted var(--ink-2); font-size: 15px; }
.checklist input { appearance: none; width: 24px; height: 24px; border: 2.5px solid var(--ink); border-radius: 6px; background: var(--card); flex: none; display: grid; place-items: center; margin: 0; }
.checklist input:checked { background: var(--red); }
.checklist input:checked::after { content: "✓"; color: #fff; font-weight: 700; }
.checklist input:checked + span { text-decoration: line-through; color: var(--ink-2); }

.chat { margin-top: 6px; }
.chat__list { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 12px; }
.chat__empty { font-size: 14px; color: var(--ink-2); padding: 10px 0; }
.msg { max-width: 86%; align-self: flex-start; display: flex; align-items: flex-end; gap: 6px; }
.msg__main { min-width: 0; }
.msg__av { margin-bottom: 18px; }
.msg__who { font: 700 10px var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); margin: 0 0 2px 6px; }
.msg__body { padding: 9px 13px; background: var(--card); border: 2px solid var(--ink); border-radius: 16px 16px 16px 4px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
.msg__time { font: 10px var(--mono); color: var(--ink-2); margin: 2px 6px 0; }
.msg.is-me { align-self: flex-end; }
.msg.is-me .msg__who { display: none; }
.msg.is-me .msg__body { background: var(--mustard); border-radius: 16px 16px 4px 16px; }
.msg.is-me .msg__time { text-align: right; }
.composer { position: sticky; bottom: calc(-18px - var(--safe-b)); display: flex; gap: 8px; padding: 10px 0 calc(18px + var(--safe-b)); margin-bottom: calc(-18px - var(--safe-b)); background: var(--paper); border-top: 2.5px solid var(--ink); }
.composer textarea { flex: 1; min-width: 0; resize: none; height: 46px; max-height: 120px; padding: 11px 14px; border: 2.5px solid var(--ink); border-radius: 14px; background: #fff; outline: none; font-size: 16px; }
.composer .btn { padding: 0 16px; }

/* ---------- Tabs ---------- */

.tabs {
  position: relative;
  flex: none;
  z-index: 30;
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 6px 8px calc(6px + var(--safe-b));
  background: var(--ink);
  border-top: 3px solid var(--red);
}
.tab { flex: 1; max-width: 130px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 4px 6px; border-radius: 16px; color: var(--paper); font: 700 10px var(--mono); text-transform: uppercase; letter-spacing: 0.08em; }
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tab.is-active { background: var(--mustard); color: var(--ink); }

/* ---------- Pig gate ---------- */

.gate {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: grid;
  place-items: center;
  padding: calc(20px + var(--safe-t)) 18px calc(20px + var(--safe-b));
  overflow-y: auto;
  background: repeating-linear-gradient(180deg, rgba(200, 56, 31, 0.92) 0 30px, rgba(241, 230, 210, 0.96) 30px 42px);
}
.gate__card { position: relative; width: 100%; max-width: 420px; padding: 26px 22px 22px; background: var(--card); border: 3px solid var(--ink); border-radius: 22px; box-shadow: 7px 7px 0 var(--ink); text-align: center; }
.gate__card h2 { font: 40px/0.95 var(--display); text-transform: uppercase; margin: 6px 0 10px; }
.gate__card > p { font-size: 15px; color: var(--ink-2); }
.gate__card .eyebrow { color: var(--red); }
.gate__close { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border: 2.5px solid var(--ink); border-radius: 50%; background: var(--paper); font-weight: 700; text-align: center; }
.gate__duo { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 14px; }
.gate__duo img { width: 96px; filter: drop-shadow(3px 3px 0 var(--ink)); }
.gate__selfie { font-size: 58px; }
.gate__arrow { font: 40px var(--display); color: var(--red); }
.gate__error { margin-top: 14px; padding: 10px 12px; background: #f3c3b1; border: 2px solid var(--red); border-radius: 12px; color: var(--ink) !important; font-weight: 700; }
.gate__card--studio { max-height: calc(100dvh - 40px); overflow-y: auto; }
.gate__card .btn--wide + .btn--wide { margin-top: 10px; }
.gate__card .btn[disabled] { opacity: 0.5; }
.gate__current { display: block; width: 168px; height: 168px; margin: 6px auto 4px; border-radius: 50%; border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); object-fit: cover; }
.gate__label { display: block; margin: 16px 0 6px; text-align: left; font: 700 11px var(--mono) !important; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink) !important; }
.gate__label span { color: var(--ink-2); font-weight: 400; }
.gate__wishes { display: block; width: 100%; resize: none; padding: 10px 12px; border: 2.5px solid var(--ink); border-radius: 12px; background: #fff; font: 15px var(--sans); outline: none; margin-bottom: 14px; }
.gate__wishes:focus { box-shadow: 3px 3px 0 var(--red); }
.gate__versions { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; }
.gate__versions::-webkit-scrollbar { display: none; }
.gate__version { flex: none; width: 64px; height: 64px; border-radius: 50%; border: 2.5px solid var(--ink); overflow: hidden; opacity: 0.75; }
.gate__version img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gate__version.is-active { opacity: 1; box-shadow: 0 0 0 3px var(--mustard), 0 0 0 5.5px var(--ink); }
.gate__fine { margin-top: 10px; font: 11px var(--mono) !important; text-transform: uppercase; letter-spacing: 0.06em; }
.gate__morph { width: 130px; height: 130px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 50%; background: var(--mustard); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); overflow: hidden; }
.gate__morph img { width: 110px; animation: morph 1.6s ease-in-out infinite; }
@keyframes morph { 0%, 100% { transform: rotate(-8deg) scale(0.95); filter: hue-rotate(0deg); } 50% { transform: rotate(8deg) scale(1.08); filter: hue-rotate(40deg) saturate(1.4); } }
.gate__bar { height: 12px; margin-top: 18px; border: 2.5px solid var(--ink); border-radius: 99px; overflow: hidden; background: var(--paper); }
.gate__bar i { display: block; height: 100%; width: 40%; background: repeating-linear-gradient(45deg, var(--red) 0 10px, var(--mustard) 10px 20px); animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }

.pushgate__bell { position: relative; width: 120px; height: 120px; margin: 0 auto 14px; display: grid; place-items: center; font-size: 62px; border-radius: 50%; background: var(--mustard); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); animation: ring 1.8s ease-in-out infinite; }
.pushgate__bell span { position: absolute; top: -6px; right: -26px; padding: 3px 9px; font: 20px var(--display); color: #fff; background: var(--red); border: 2.5px solid var(--ink); border-radius: 10px; transform: rotate(12deg); }
@keyframes ring { 0%, 60%, 100% { transform: rotate(0); } 65% { transform: rotate(-14deg); } 72% { transform: rotate(12deg); } 79% { transform: rotate(-8deg); } 86% { transform: rotate(5deg); } }
.pushgate__list { list-style: none; margin: 14px 0 18px; padding: 0; text-align: left; font-size: 15px; }
.pushgate__list li { padding: 8px 0; border-bottom: 2px dotted var(--ink-2); }
.pushgate__list li:last-child { border-bottom: 0; }
.pushgate__no { display: block; width: 100%; margin-top: 14px; padding: 8px; text-align: center; font: 700 12px var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.entry__miss { list-style: none; margin: 12px 0 16px; padding: 0; font-size: 15px; }
.entry__miss li { padding: 6px 0; }
.entry__note { margin-top: 12px; font-size: 14px; color: var(--ink-2); }
.me__push { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 12px 14px; background: var(--paper-2); border: 2.5px solid var(--ink); border-radius: 14px; font-size: 14px; }
.me__push span { flex: 1; }
.me__push.is-on { background: #b9d6cf; }
.me__push + .btn--wide { margin-top: 12px; }

/* ---------- "Mere" menu ---------- */

.more { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.more__item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; text-align: left; background: var(--card); border: 2.5px solid var(--ink); border-radius: 16px; box-shadow: 3px 3px 0 var(--ink); }
.more__item:active { transform: translate(3px, 3px); box-shadow: none; }
.more__icon { font-size: 28px; flex: none; width: 36px; text-align: center; }
.more__item > span:nth-child(2) { flex: 1; min-width: 0; }
.more__item strong { display: block; font: 22px/1 var(--display); text-transform: uppercase; }
.more__item small { display: block; margin-top: 3px; font-size: 13px; color: var(--ink-2); }
.more__go { font: 30px/1 var(--display); }
.new-tag { display: inline-block; margin-left: 6px; padding: 2px 7px; border-radius: 999px; background: var(--red); color: #fff; font: 700 11px var(--mono); text-transform: uppercase; letter-spacing: 0.06em; vertical-align: middle; }
.more__icon .more__av { width: 40px; height: 40px; font-size: 18px; margin-left: -2px; transform: rotate(-8deg); }

/* ---------- Role badges ---------- */

.av-wrap { position: relative; display: inline-flex; flex: none; }
.role-stamp { position: absolute; right: -6px; bottom: -4px; z-index: 3; width: 20px; height: 20px; display: grid; place-items: center; font-size: 11px; line-height: 1; border-radius: 50%; border: 2px solid var(--ink); transform: rotate(12deg); }
.role-stamp--formand { background: var(--mustard); }
.role-stamp--kasserer { background: #b9d6cf; }
.role-stamp--tiny { width: 18px; height: 18px; font-size: 10px; right: -6px; bottom: -6px; }
.role-stamp--big { width: 38px; height: 38px; font-size: 20px; border-width: 2.5px; box-shadow: 2px 2px 0 var(--ink); }
.pig .role-stamp--big { top: 2px; right: 6px; bottom: auto; width: 46px; height: 46px; font-size: 24px; }
.role-stamp--left { right: auto; left: -4px; bottom: -4px; transform: rotate(-12deg); }
.role-label { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border: 2px solid var(--ink); border-radius: 999px; font: 700 10px var(--mono); text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; }
.role-label--formand { background: var(--mustard); }
.role-label--kasserer { background: #b9d6cf; }
.post__head strong .role-label { margin-left: 8px; vertical-align: middle; }
.pig { position: relative; }

/* ---------- Pig gallery ---------- */

.pig-banner { display: flex; align-items: center; gap: 12px; margin: 0 0 22px; padding: 12px 14px; background: var(--mustard); border: 2.5px solid var(--ink); border-radius: 16px; box-shadow: var(--shadow); transform: rotate(-0.6deg); }
.pig-banner__faces { display: flex; flex: none; }
.pig-banner__faces:empty { display: none; }
.pig-banner__faces .av { width: 40px; height: 40px; font-size: 18px; margin-right: -12px; }
.pig-banner__faces .av:last-child { margin-right: 0; }
.pig-banner > span:nth-child(2) { flex: 1; min-width: 0; }
.pig-banner strong { display: block; font: 24px/1 var(--display); text-transform: uppercase; }
.pig-banner small { font-size: 13px; }
.pig-banner__go { font: 34px/1 var(--display); }
.pigs { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 16px; padding: 6px 4px 10px; }
.pig { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.pig__frame { width: 100%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); background: var(--card); }
.pig:nth-child(odd) .pig__frame { transform: rotate(-3deg); }
.pig:nth-child(even) .pig__frame { transform: rotate(3deg); }
.pig__frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pig strong { font: 22px/1 var(--display); text-transform: uppercase; margin-top: 4px; }
.pig small { font: 11px var(--mono); text-transform: uppercase; color: var(--ink-2); }

/* ---------- Documents & expenses ---------- */

.ledger { padding: 18px 18px 16px; background: var(--ink); color: var(--paper); border-radius: 18px; box-shadow: 4px 4px 0 var(--red); }
.ledger .eyebrow { color: var(--mustard); }
.ledger__total { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 6px 0 10px; }
.ledger__total strong { font: 46px/1 var(--display); letter-spacing: 0.01em; }
.ledger__cats { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.ledger__cats li { display: grid; grid-template-columns: 104px 1fr auto; align-items: center; gap: 10px; font-size: 13px; }
.ledger__cats i { height: 10px; border-radius: 99px; background: linear-gradient(90deg, var(--red) var(--w), rgba(241, 230, 210, 0.15) var(--w)); }
.ledger__cats b { font: 700 13px var(--mono); }
.ledger__empty, .ledger__note { margin-top: 8px; font-size: 13px; color: #c9bfae; }
.callout--hot { background: #f3c3b1; border-color: var(--red); font-weight: 700; }
.ledger + .callout, .ledger + .btn { margin-top: 14px; }
.ledger__list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.entry-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px 10px 10px; background: var(--card); border: 2.5px solid var(--ink); border-radius: 14px; box-shadow: 3px 3px 0 var(--ink); }
.entry-row:active { transform: translate(3px, 3px); box-shadow: none; }
.entry-row__thumb { width: 46px; height: 58px; flex: none; overflow: hidden; border: 2px solid var(--ink); border-radius: 4px; background: #fff; }
.entry-row__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.entry-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.entry-row__body strong { font: 19px/1.05 var(--display); text-transform: uppercase; overflow-wrap: anywhere; }
.entry-row__body small { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-2); }
.entry-row__amount { font: 700 14px var(--mono); white-space: nowrap; text-align: right; }
.entry-row--review { background: #fff1c9; }
.entry-row--review .entry-row__amount { color: var(--red); }
.entry-row--reading .entry-row__amount, .entry-row--info .entry-row__amount { color: var(--ink-2); font-size: 12px; }
.entry-row--failed { background: #f3d9cf; }
.doc-preview { display: block; width: 100%; margin: 12px 0 4px; padding: 8px 8px 6px; background: #fff; border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); text-align: center; }
.doc-preview img { display: block; width: 100%; max-height: 260px; object-fit: contain; }
.doc-preview span { display: block; margin-top: 4px; font: 11px var(--mono); text-transform: uppercase; color: var(--ink-2); }
.expense-form { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; padding: 14px; background: var(--card); border: 2.5px solid var(--ink); border-radius: 16px; }
.expense-form label { display: flex; flex-direction: column; gap: 5px; font: 700 11px var(--mono); text-transform: uppercase; letter-spacing: 0.08em; }
.expense-form input:not([type="checkbox"]), .expense-form select { padding: 11px 12px; border: 2.5px solid var(--ink); border-radius: 12px; background: #fff; font: 16px var(--sans); text-transform: none; letter-spacing: 0; outline: none; }
.expense-form__row { display: grid; grid-template-columns: 1fr 90px; gap: 10px; }
.expense-form__toggle { flex-direction: row !important; align-items: center; gap: 10px !important; text-transform: none !important; font: 15px var(--sans) !important; letter-spacing: 0 !important; }
.expense-form__toggle input { width: 22px; height: 22px; accent-color: var(--red); }
.doc-text { margin-top: 14px; }
.doc-text summary { font: 700 12px var(--mono); text-transform: uppercase; letter-spacing: 0.06em; cursor: pointer; }
.doc-text pre { margin: 8px 0 0; padding: 12px; background: var(--card); border: 2px dashed var(--ink-2); border-radius: 12px; white-space: pre-wrap; font: 12px/1.5 var(--mono); }
.doc-form #doc-preview { margin: 0 0 12px; }
.seg { display: flex; padding: 4px; gap: 4px; background: var(--paper-2); border: 2.5px solid var(--ink); border-radius: 999px; margin-bottom: 14px; }
.seg__btn { flex: 1; padding: 9px 8px; border-radius: 999px; text-align: center; font: 700 13px var(--sans); }
.seg__btn.is-active { background: var(--ink); color: var(--paper); }
.spec { background: var(--card); border: 2.5px solid var(--ink); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.spec__group + .spec__group { border-top: 2.5px solid var(--ink); }
.spec__head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px; }
.spec__head strong { font: 20px/1 var(--display); text-transform: uppercase; }
.spec__head span { font: 11px var(--mono); color: var(--ink-2); }
.spec__head b { margin-left: auto; font: 700 15px var(--mono); }
.spec ul { list-style: none; margin: 0; padding: 0 14px 10px; }
.spec li button { display: flex; align-items: baseline; gap: 10px; width: 100%; padding: 7px 0; border-top: 1.5px dotted var(--ink-2); }
.spec__date { flex: none; width: 42px; font: 12px var(--mono); color: var(--ink-2); }
.spec__title { flex: 1; min-width: 0; font-size: 14px; }
.spec__title small { display: block; font-size: 11px; color: var(--ink-2); }
.spec__amount { font: 700 13px var(--mono); white-space: nowrap; }
.spec__total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; background: var(--ink); color: var(--paper); }
.spec__total span { font: 20px var(--display); text-transform: uppercase; }
.spec__total b { font: 700 18px var(--mono); color: var(--mustard); }

/* ---------- Board + push ---------- */

.board-compose { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.board-compose textarea { display: block; width: 100%; resize: vertical; min-height: 64px; padding: 12px 14px; border: 2.5px solid var(--ink); border-radius: 14px; background: #fff; font-size: 16px; outline: none; }
.board-compose textarea:focus { box-shadow: 3px 3px 0 var(--red); }
.board-compose__row { display: flex; justify-content: space-between; gap: 10px; }
.board-compose__hint { font: 11px var(--mono); color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.05em; }
.post__photo { display: block; width: 100%; margin-top: 10px; padding: 6px 6px 18px; background: #fff; border: 2px solid var(--ink); }
.post__photo img { display: block; width: 100%; height: auto; aspect-ratio: var(--ar, 1); object-fit: cover; }
.board { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.post { padding: 14px 16px 16px; background: #fff6c9; border: 2.5px solid var(--ink); border-radius: 4px 16px 16px 16px; box-shadow: var(--shadow); }
.post:nth-child(odd) { transform: rotate(-0.8deg); }
.post:nth-child(even) { transform: rotate(0.7deg); background: #f3d9cf; }
.post.is-me { background: #d7e8e2; }
.post__head { display: flex; align-items: center; gap: 8px; }
.post__head strong { flex: 1; font: 20px/1 var(--display); text-transform: uppercase; }
.post__head time { font: 11px var(--mono); color: var(--ink-2); }
.link { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.link--map { display: inline-flex; align-items: center; min-height: 44px; margin: 2px 0; padding: 6px 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--mustard); color: var(--ink); text-decoration: none; font: 700 14px var(--sans); }
.post__body { margin-top: 10px; font-size: 17px; white-space: pre-wrap; overflow-wrap: anywhere; }

.tab { position: relative; }
.tab__dot { position: absolute; top: 4px; right: calc(50% - 20px); width: 10px; height: 10px; border-radius: 50%; background: var(--red); border: 2px solid var(--ink); }
.install--push { background: #b9d6cf; transform: rotate(0.5deg); }
.install__bell { font-size: 40px; line-height: 1; }

/* ---------- Feedback ---------- */

.wish-card { display: flex; gap: 12px; align-items: center; width: 100%; margin-top: 26px; padding: 14px 16px; background: var(--mustard); border: 2.5px dashed var(--ink); border-radius: 16px; transform: rotate(0.6deg); }
.wish-card > span:first-child { font-size: 30px; }
.wish-card strong { display: block; font: 22px/1 var(--display); text-transform: uppercase; margin-bottom: 4px; }
.wish-card span { font-size: 14px; }

.feedback-form .filters { margin: 16px 0 10px; padding: 2px 2px 6px; }
.feedback-form .chip input { display: none; }
.feedback-form .chip:has(input:checked) { background: var(--ink); color: var(--paper); }
.feedback-form textarea { display: block; width: 100%; resize: vertical; min-height: 96px; padding: 12px 14px; border: 2.5px solid var(--ink); border-radius: 14px; background: #fff; font-size: 16px; outline: none; }
.feedback-form textarea:focus { box-shadow: 3px 3px 0 var(--red); }

.fb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.fb { padding: 12px 14px; background: var(--card); border: 2px solid var(--ink); border-radius: 14px; }
.fb__top { display: flex; align-items: center; gap: 8px; }
.fb__who { flex: 1; min-width: 0; font: 700 11px var(--mono); text-transform: uppercase; letter-spacing: 0.06em; }
.fb__status { font: 700 11px var(--mono); text-transform: uppercase; padding: 2px 8px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); white-space: nowrap; }
.fb--planned .fb__status { background: var(--mustard); }
.fb--done .fb__status { background: var(--teal); color: var(--paper); }
.fb--declined .fb__status { background: var(--ink-2); color: var(--paper); }
.fb__body { margin-top: 8px; font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.fb__reply { margin-top: 8px; padding: 8px 10px; background: #b9d6cf; border-radius: 10px; font-size: 14px; }

/* ---------- Pull to refresh ---------- */

.ptr {
  --pull: 0px;
  --spin: 0deg;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(60px + var(--safe-t));
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(calc(var(--pull) - 56px));
  transition: opacity 0.15s;
}
.ptr.is-visible { opacity: 1; }
.ptr span { font: 700 11px var(--mono); text-transform: uppercase; letter-spacing: 0.1em; background: var(--ink); color: var(--mustard); padding: 3px 9px; border-radius: 999px; }
.ptr__badge { position: relative; width: 52px; height: 52px; border-radius: 50%; background: var(--card); box-shadow: 0 0 0 2.5px var(--ink); }
.ptr__badge img { position: absolute; inset: 7px; width: 38px; height: 38px; object-fit: contain; transform: rotate(var(--spin)); }
/* The arc fills up while pulling, then spins as a classic spinner while refreshing. */
.ptr__ring { position: absolute; inset: -1px; width: 54px; height: 54px; transform: rotate(-90deg); }
.ptr__track, .ptr__arc { fill: none; stroke-width: 4; }
.ptr__track { stroke: var(--paper-2); }
.ptr__arc { stroke: var(--red); stroke-linecap: round; stroke-dasharray: 0 151; transition: stroke 0.15s; }
.ptr.is-ready .ptr__arc { stroke: var(--teal); }
.ptr.is-loading .ptr__arc { stroke: var(--red); stroke-dasharray: 42 151 !important; }
.ptr.is-loading .ptr__ring { animation: ptr-spin 0.8s linear infinite; }
.ptr.is-loading .ptr__badge img { animation: ptr-wobble 0.8s ease-in-out infinite; }
@keyframes ptr-spin { from { transform: rotate(-90deg); } to { transform: rotate(270deg); } }
@keyframes ptr-wobble { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(10deg); } }

/* ---------- Mood of the hour ---------- */

@keyframes sway { 0%, 100% { transform: rotate(-1.2deg) translateX(-1px); } 50% { transform: rotate(1.2deg) translateX(1px); } }
@keyframes sway-hard { 0%, 100% { transform: rotate(-3deg) translateX(-3px); } 50% { transform: rotate(2.5deg) translateX(3px) skewX(-3deg); } }
@media (prefers-reduced-motion: no-preference) {
  body[data-mood="drunk"] .hero__title,
  body[data-mood="drunk"] .day__head h3 { display: inline-block; animation: sway 3.2s ease-in-out infinite; }
  body[data-mood="wasted"] .hero__title,
  body[data-mood="wasted"] .day__head h3,
  body[data-mood="wasted"] .section-title,
  body[data-mood="wasted"] .photos-head h2 { display: inline-block; animation: sway-hard 2.4s ease-in-out infinite; }
}
body[data-mood="wasted"] .section-title { display: flex; }

/* ---------- Android image picker ---------- */

.picker { position: fixed; inset: 0; z-index: 65; display: flex; align-items: flex-end; background: rgba(29, 26, 22, 0.5); }
.picker__panel { width: 100%; max-width: 620px; margin: 0 auto; padding: 16px 16px calc(16px + var(--safe-b)); display: flex; flex-direction: column; gap: 10px; background: var(--paper); border: 2.5px solid var(--ink); border-bottom: 0; border-radius: 22px 22px 0 0; }
.picker__choice { padding: 16px; text-align: center; font: 22px var(--display); text-transform: uppercase; background: var(--card); border: 2.5px solid var(--ink); border-radius: 16px; box-shadow: 3px 3px 0 var(--ink); }
.picker__choice:first-child { background: var(--mustard); }
.picker__cancel { padding: 10px; text-align: center; font: 700 12px var(--mono); text-transform: uppercase; letter-spacing: 0.08em; text-decoration: underline; }

/* ---------- Upload progress ---------- */

.up-ring { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.up-ring svg { width: 60px; height: 60px; transform: rotate(-90deg); filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5)); }
.up-ring circle { fill: none; stroke-width: 4; }
.up-ring__bg { stroke: rgba(255, 255, 255, 0.35); }
.up-ring__fg { stroke: var(--mustard); stroke-linecap: round; transition: stroke-dasharray 0.25s; }
.up-ring b { position: absolute; color: #fff; font: 700 13px var(--mono); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
.up-done { position: absolute; right: 8px; bottom: 8px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--mustard); border: 2px solid var(--ink); font-weight: 700; font-size: 16px; }
.up-fail { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #fff; font: 700 12px var(--mono); text-transform: uppercase; }
.up-fail button { min-height: 44px; padding: 8px 14px; border-radius: 999px; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); font: 700 12px var(--mono); }
.pol--up > img { filter: brightness(0.55); }
.pol--up.is-done > img { filter: none; }
.pol--up.is-fail > img { filter: brightness(0.4) saturate(0.4); }
.grid .pol--up > img { aspect-ratio: 1; height: auto; }
.up-drop { position: absolute; top: -10px; right: -10px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); font-weight: 700; }
.album-note { margin: -4px 8px 16px; font-size: 14px; color: var(--ink-2); }
.album-note a { font-weight: 700; text-decoration: underline; }
.att { margin: 12px 0 4px; }
.att__img { position: relative; display: inline-block; width: 110px; height: 110px; border: 2.5px solid var(--ink); border-radius: 14px; box-shadow: 3px 3px 0 var(--ink); overflow: visible; }
.att__img > img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 11px; filter: brightness(0.55); }
.att.is-done .att__img > img { filter: none; }
.att .up-fail { border-radius: 11px; border: 0; background: transparent; }
.att__x, .up-drop { display: grid; place-items: center; padding: 0; }
.hand-x { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; }
.att__x { position: absolute; top: -12px; right: -12px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); font-weight: 700; }
.att__note { margin-top: 8px; font: 700 11px var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }
.att.is-fail .att__note { color: var(--red); }

/* ---------- Several photos on one board post ---------- */

.atts { display: flex; gap: 14px; overflow-x: auto; padding: 14px 14px 6px 2px; margin: 0 -2px; scrollbar-width: none; }
.atts .att { flex: none; margin: 0; }
.atts .att__img { width: 88px; height: 88px; }
.atts__add { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 88px; height: 88px; border: 2.5px dashed var(--ink); border-radius: 14px; background: var(--paper); color: var(--ink-2); font: 700 11px var(--mono); text-transform: uppercase; letter-spacing: 0.06em; }
.atts__add b { font-size: 28px; line-height: 1; }
#board-attach > .att__note { margin-top: 4px; }
.post__photos { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 4px; margin-top: 10px; padding: 6px 6px 18px; background: #fff; border: 2px solid var(--ink); }
.post__photos button { position: relative; display: block; padding: 0; overflow: hidden; }
.post__photos img { display: block; width: 100%; height: 100%; object-fit: cover; }
.post__big { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
.post__sm { aspect-ratio: 1; }
.post__more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(20, 17, 14, 0.55); color: #fff; font: 34px var(--display); }
.lb-count { align-self: center; margin-bottom: 4px; padding: 4px 12px; border-radius: 999px; background: rgba(241, 230, 210, 0.95); color: var(--ink); font: 700 12px var(--mono); }
.lb-dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 7px; margin: 8px 14px 2px; }
.lb-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(241, 230, 210, 0.35); }
.lb-dots i.is-on { background: var(--mustard); }

/* ---------- @griseline ---------- */

/* The @-suggestions are placed above the field, inside its form (the chat composer is sticky, so already positioned). */
.cm__form, .board-compose { position: relative; }
.mention-chips { position: absolute; z-index: 30; left: 0; right: 0; bottom: calc(100% + 6px); display: flex; gap: 6px; overflow-x: auto; padding: 2px 4px 4px 2px; scrollbar-width: none; }
.mention-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 12px 4px 4px; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); color: var(--ink); font: 700 14px var(--sans); box-shadow: 2px 2px 0 var(--ink); }
.mention-chip--pig { background: #ffe4ec; }
.mention-chip__icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--mustard); font-size: 17px; }
.mention-chip img { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--ink); }
/* A tag in a message: shows who is meant, not clickable. */
.tag { color: #1f56c4; font-weight: 700; white-space: nowrap; }
.tag--pig { color: #d61f69; }
.pig-typing { display: flex; align-items: center; gap: 8px; }
.pig-typing__bubble { padding: 7px 12px; border: 2px dashed var(--ink); border-radius: 14px; background: #ffe4ec; font-size: 14px; color: var(--ink-2); }
.pig-typing__bubble b { color: var(--ink); }
.pig-typing .pb__dots { vertical-align: middle; padding: 0; margin-left: 2px; }

/* ---------- SOS ---------- */

.sos-slot { position: relative; flex: none; height: 0; z-index: 24; }
.sos-slot[hidden] { display: none; }
body.is-typing .sos-slot, body.is-typing .snout-slot { display: none; }
.sos { position: absolute; left: 16px; bottom: 14px; display: grid; place-items: center; width: 64px; height: 64px; padding: 0 0 0 0.04em; border-radius: 50%; border: 3px solid var(--ink); background: var(--red); color: #fff; font: 22px/1 var(--display); letter-spacing: 0.04em; text-align: center; box-shadow: 3px 3px 0 var(--ink); animation: sos-pulse 2s infinite; }
@keyframes sos-pulse { 0%, 100% { box-shadow: 3px 3px 0 var(--ink), 0 0 0 0 rgba(200, 50, 30, 0.5); } 50% { box-shadow: 3px 3px 0 var(--ink), 0 0 0 10px rgba(200, 50, 30, 0); } }
.sos-slide { position: relative; height: 64px; margin: 8px 0 10px; border: 3px solid var(--ink); border-radius: 999px; background: #ffe1d6; overflow: hidden; touch-action: none; }
.sos-slide__track { position: absolute; inset: 0; display: grid; place-items: center; padding-left: 40px; font: 700 14px var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--red); }
.sos-slide__knob { position: absolute; left: 4px; top: 4px; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--red); border: 2px solid var(--ink); font-size: 24px; touch-action: none; cursor: grab; }
.sos-note { text-align: center; font-size: 13px; }

/* ---------- Spørg grisen ---------- */

.snout-slot { position: relative; flex: none; height: 0; z-index: 24; }
.snout-slot[hidden] { display: none; }
.snout { position: absolute; right: 16px; bottom: 14px; width: 64px; height: 64px; padding: 0; border-radius: 50%; border: 3px solid var(--ink); background: var(--paper); box-shadow: 3px 3px 0 var(--ink); overflow: hidden; }
.snout img { display: block; width: 100%; height: 100%; }
.snout__dot { position: absolute; right: 18px; bottom: 64px; z-index: 1; width: 16px; height: 16px; border-radius: 50%; background: var(--red); border: 2.5px solid var(--paper); box-shadow: 0 0 0 2px var(--ink); pointer-events: none; }
.snout__dot[hidden] { display: none; }
.fab-slot:not(:empty) ~ .snout-slot .snout__dot { bottom: 154px; }
.snout:active { transform: translate(3px, 3px); box-shadow: none; }
.fab-slot:not(:empty) ~ .snout-slot .snout { bottom: 104px; }
.pigchat { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; background: var(--paper); }
.pigchat[hidden] { display: none; }
.pc__top { flex: none; display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--safe-t)) 12px 10px; background: var(--card); border-bottom: 2.5px solid var(--ink); }
.pc__top img { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ink); }
.pc__title { flex: 1; min-width: 0; }
.pc__title b { display: block; font: 22px/1 var(--display); text-transform: uppercase; }
.pc__title small { font: 700 11px var(--mono); color: var(--ink-2); }
.pc__btn { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); }
.pc__btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pc__btn .hand-x { width: 18px; height: 18px; stroke-width: 2.8; }
.pc__btn.is-on { background: var(--mustard); }
.pc__list { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; -webkit-overflow-scrolling: touch; }
.pb { max-width: 84%; padding: 10px 13px; border: 2px solid var(--ink); font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.pb small { display: block; margin-bottom: 3px; font: 700 10px var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }
.pb--me { align-self: flex-end; background: var(--mustard); border-radius: 16px 16px 4px 16px; white-space: pre-wrap; }
.pb--pig { align-self: flex-start; background: #fff; border-radius: 16px 16px 16px 4px; }
.pb__text { white-space: pre-wrap; }
.pb code { padding: 1px 5px; border-radius: 6px; background: var(--paper-2); font: 700 14px var(--mono); }
.wh-emoji { display: inline-block; width: 1.35em; height: 1.35em; margin: 0 0.05em; vertical-align: -0.3em; }
.pb__links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pb__link { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 12px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); color: var(--ink); font: 700 13px var(--sans); text-decoration: none; }
.pb { position: relative; }
.pb__link--locate { background: var(--mustard); }
.pb.has-spk { padding-bottom: 30px; }
.pb__note { margin-top: 8px; padding-right: 30px; font: 700 10px var(--mono); color: var(--ink-2); }
.pb__spk { position: absolute; right: 4px; bottom: 2px; display: grid; place-items: center; width: 36px; height: 32px; padding: 0; color: var(--ink); background: none; border: 0; }
.pb__spk svg { grid-area: 1 / 1; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pb__spk .spk-spin { display: none; width: 24px; height: 24px; stroke-width: 2.8; color: var(--red); animation: pig-spin 0.8s linear infinite; }
.pb__spk.is-loading .spk-ic { opacity: 0.25; }
.pb__spk.is-loading .spk-spin { display: block; }
.pb__spk .spk-play { display: none; fill: currentColor; stroke-width: 2; animation: pig-spk-wave 0.7s infinite ease-in-out alternate; }
.pb__spk.is-playing { color: var(--red); }
.pb__spk.is-playing .spk-ic { display: none; }
.pb__spk.is-playing .spk-play { display: block; }
@keyframes pig-spin { to { transform: rotate(360deg); } }
@keyframes pig-spk-wave { from { opacity: 0.45; transform: scale(0.88); } to { opacity: 1; transform: scale(1); } }
.pb__dots { display: inline-flex; gap: 5px; padding: 4px 0; }
.pb__dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-2); animation: pig-dot 1s infinite ease-in-out; }
.pb__dots i:nth-child(2) { animation-delay: 0.15s; }
.pb__dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes pig-dot { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.pc__voice { flex: none; margin: 0 12px 8px; padding: 10px 14px; border: 2.5px dashed var(--red); border-radius: 16px; background: #fff1ec; }
.pc__voice[hidden] { display: none; }
.pc__state { display: flex; align-items: center; gap: 8px; font: 700 11px var(--mono); text-transform: uppercase; color: var(--red); }
.pc__state i { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-2); }
.pc__state i.is-live { background: var(--red); animation: pig-live 1.2s infinite; }
@keyframes pig-live { 50% { opacity: 0.3; } }
.pc__vbar { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.pc__vx { flex: none; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 2.5px solid var(--ink); border-radius: 50%; background: var(--paper); color: var(--ink); }
.pc__vx svg { width: 22px; height: 22px; }
.pc__vsend { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border: 2.5px solid var(--ink); border-radius: 999px; background: var(--red); color: #fff; font: 22px/1 var(--display); text-transform: uppercase; box-shadow: 3px 3px 0 var(--ink); }
.pc__vsend svg { width: 26px; height: 26px; }
.pc__vsend:disabled { background: var(--paper); color: var(--ink-2); box-shadow: none; border-style: dashed; }
.pc__heard { margin-top: 4px; font-size: 15px; }
.pc__partial { color: var(--ink-2); }
.pc__bar { flex: none; display: flex; gap: 8px; align-items: center; padding: 10px 12px calc(12px + var(--safe-b)); background: var(--card); border-top: 2.5px solid var(--ink); }
/* With the keyboard open the home-bar inset is covered by the keyboard, so it should not add space. */
.pc__bar:focus-within { padding-bottom: 10px; }
.pc__bar input { flex: 1; min-width: 0; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; font: 16px var(--sans); }
.pc__mic, .pc__send { flex: none; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border-radius: 50%; border: 2px solid var(--ink); }
.pc__mic { background: var(--paper); color: var(--ink); }
.pc__mic.is-live { background: var(--red); color: #fff; }
.pc__mic svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.pc__send { background: var(--red); color: #fff; }
.pc__send svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }

.pig-intro { position: fixed; inset: 0; z-index: 65; display: grid; place-items: center; padding: 24px; background: rgba(20, 17, 14, 0.55); }
.pig-intro__card { width: 100%; max-width: 360px; padding: 24px 20px 16px; text-align: center; background: var(--paper); border: 3px solid var(--ink); border-radius: 22px; box-shadow: 5px 5px 0 var(--ink); }
.pig-intro__card img { width: 96px; height: 96px; margin: -64px auto 8px; display: block; border-radius: 50%; border: 3px solid var(--ink); background: var(--paper); }
.pig-intro__card h2 { font: 30px/1 var(--display); text-transform: uppercase; margin: 4px 0 8px; }
.pig-intro__card p:not(.eyebrow) { margin-bottom: 16px; }
.pig-intro__skip { display: block; width: 100%; text-align: center; min-height: 44px; margin-top: 6px; font: 700 12px var(--mono); text-transform: uppercase; letter-spacing: 0.06em; text-decoration: underline; color: var(--ink-2); }

/* ---------- Weather ---------- */

.wx { margin: 0 0 16px; border: 2.5px solid var(--ink); border-radius: 16px; background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.wx__head { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; background: var(--ink); color: var(--paper); font: 700 11px var(--mono); text-transform: uppercase; letter-spacing: 0.08em; }
#weather-sheet { padding-top: 18px; }
.wx__row { display: flex; gap: 12px; align-items: center; padding: 12px 14px; }
.wx__row + .wx__row { border-top: 2px dashed var(--ink); }
.wx__row--home { background: #e5edf2; }
.wx__icon { flex: none; font-size: 34px; line-height: 1; }
.wx__main { flex: 1; min-width: 0; }
.wx__place { font: 22px/1 var(--display); text-transform: uppercase; }
.wx__place small { margin-left: 6px; font: 700 11px var(--mono); text-transform: none; color: var(--ink-2); }
.wx__text { margin-top: 4px; font-size: 14px; }
.wx__temp { flex: none; text-align: right; font: 26px/1 var(--display); }
.wx__temp small { display: block; margin-top: 4px; font: 700 11px var(--mono); color: var(--ink-2); }

/* ---------- Comments on board posts ---------- */

.post__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.post__bar .reacts { display: contents; }
.post__bar .reacts__pick { order: 10; }
.cm-toggle { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 12px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); font: 700 13px var(--mono); }
.cm-toggle.is-new { background: var(--mustard); }
.cm-toggle.is-open { background: var(--ink); color: var(--paper); }
.cm-peek { display: block; width: 100%; margin-top: 10px; padding: 4px 0; text-align: left; font-size: 14px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-peek b { color: var(--ink); }
.cm.is-open { margin-top: 12px; padding-top: 10px; border-top: 2px dotted var(--ink); }
.cm__item { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 10px; }
.cm__item .av { flex: none; }
.cm__main { min-width: 0; }
.cm__bubble { padding: 7px 11px; background: rgba(255, 255, 255, 0.7); border: 2px solid var(--ink); border-radius: 4px 14px 14px 14px; font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cm__bubble b { display: block; margin-bottom: 2px; font: 700 10px var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); white-space: normal; }
.cm__time { margin: 3px 0 0 4px; font: 10px var(--mono); color: var(--ink-2); }
.cm__drop { padding: 6px 4px; font: 700 10px var(--mono); text-decoration: underline; color: var(--ink-2); }
.cm__more { display: block; min-height: 36px; margin: 0 0 6px 38px; font: 700 12px var(--mono); text-decoration: underline; }
.cm__empty { margin: 0 0 10px; font-size: 14px; color: var(--ink-2); }
.cm__form { display: flex; gap: 8px; align-items: center; }
.cm__form input { flex: 1; min-width: 0; padding: 10px 14px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; font: 16px var(--sans); }
.cm__send { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; background: var(--red); color: #fff; border: 2px solid var(--ink); }
.cm__send svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Shopping list ---------- */

.shop-add { display: flex; gap: 8px; margin: 4px 0 14px; }
.shop-add input { flex: 1; min-width: 0; padding: 12px 14px; border: 2.5px solid var(--ink); border-radius: 14px; background: var(--card); font: 16px var(--sans); }
.shop-add .btn { flex: none; }
.shop-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.shop-chip { min-height: 40px; padding: 6px 12px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); font: 700 12px var(--mono); }
.shop__h { margin: 18px 0 8px; font: 700 12px var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); }
.shop__empty { padding: 14px 0; color: var(--ink-2); }
.shop { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.shop__item { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 8px 10px 8px 8px; background: #fff6c9; border: 2.5px solid var(--ink); border-radius: 14px; box-shadow: 3px 3px 0 var(--ink); }
.shop__box { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 7px; }
.shop__box:empty::after, .shop__box svg { width: 30px; height: 30px; }
.shop__box:empty::after { content: ""; display: block; border: 2.5px solid var(--ink); border-radius: 8px; background: #fff; }
.shop__box svg { padding: 3px; border: 2.5px solid var(--ink); border-radius: 8px; background: #fff; fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.shop__box.is-ticking svg path { stroke-dasharray: 26; stroke-dashoffset: 26; animation: shop-tick 0.35s ease-out forwards; }
@keyframes shop-tick { to { stroke-dashoffset: 0; } }
.shop__text { flex: 1; min-width: 0; }
.shop__text b { display: block; font: 600 17px var(--sans); overflow-wrap: anywhere; }
.shop__text small { display: block; margin-top: 2px; font: 12px var(--mono); color: var(--ink-2); }
.shop__qty { flex: none; padding: 2px 8px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); font: 700 13px var(--mono); }
.shop__who { flex: none; }
.shop__drop { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--ink-2); }
.shop__item.is-done { background: var(--paper-2); box-shadow: none; border-style: dashed; opacity: 0.75; }
.shop__item.is-done b { text-decoration: line-through; }

.ledger__rate { margin: 6px 0 0; font: 700 11px var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }
.spec__rate { margin: 10px 4px 0; text-align: right; }
.ledger .ledger__rate { margin: -2px 0 14px; color: rgba(241, 230, 210, 0.7); }

/* ---------- Reactions ---------- */

.reacts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.react { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 44px; min-height: 36px; padding: 4px 10px; font-size: 17px; line-height: 1; background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; }
.react b { font: 700 12px var(--mono); }
.react.is-mine { background: var(--mustard); }
.react--add { font: 700 17px var(--mono); color: var(--ink-2); border-style: dashed; }
.react__smile { display: block; width: 22px; height: 22px; margin-right: 2px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.react__eye { fill: currentColor; stroke: none; }
.react--add { line-height: 1; }
.reacts__pick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; width: 100%; padding: 6px; background: var(--card); border: 2px solid var(--ink); border-radius: 18px; box-shadow: 2px 2px 0 var(--ink); }
.reacts__pick[hidden] { display: none; }
.react--pick { min-width: 0; min-height: 44px; font-size: 22px; border: 0; background: transparent; }
.lightbox__reacts { padding: 0 14px; }
.lightbox__reacts .reacts { justify-content: center; margin-top: 4px; }
.lightbox__reacts .react { background: rgba(241, 230, 210, 0.95); }
.lightbox__reacts .react.is-mine { background: var(--mustard); }
.pol__reacts { position: absolute; left: 6px; bottom: 4px; display: inline-flex; align-items: center; gap: 2px; font-size: 13px; }
.pol__reacts b { font: 700 11px var(--mono); margin-left: 3px; }

/* ---------- Touch targets: everything tappable is at least ~44 px ---------- */

.btn--sm { min-height: 44px; padding: 10px 15px; }
.me__edit, .gate__close { width: 44px; height: 44px; }
.back { min-height: 44px; }
.login__links button, .pushgate__no, .picker__cancel { min-height: 44px; padding: 12px 8px; }
.chip { min-height: 44px; }
.seg__btn { min-height: 42px; }
.lightbox__top .btn--sm { min-height: 44px; }

/* ---------- Toast ---------- */

.toast { position: fixed; left: 50%; bottom: calc(100px + var(--safe-b)); z-index: 70; transform: translate(-50%, 20px) rotate(-2deg); padding: 10px 18px; background: var(--ink); color: var(--mustard); border-radius: 10px; font: 700 14px var(--mono); opacity: 0; pointer-events: none; transition: 0.2s; white-space: nowrap; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0) rotate(-2deg); }
.login:not([hidden]) ~ .toast { bottom: auto; top: calc(16px + var(--safe-t)); }

/* "Find hjem" and Uber as one pill: maps on the left, a black Uber segment on the right. */
.split-btn { display: flex; width: 100%; border: 2.5px solid var(--ink); border-radius: 999px; overflow: hidden; box-shadow: 3px 3px 0 var(--ink); transition: transform 0.08s, box-shadow 0.08s; }
.split-btn:has(a:active) { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.split-btn a { display: flex; align-items: center; justify-content: center; min-height: 48px; color: var(--ink); text-decoration: none; }
.split-btn__main { flex: 1; min-width: 0; padding: 0 12px 0 18px; background: var(--mustard); font: 700 15px var(--sans); }
.split-btn__uber { flex: none; padding: 0 18px 0 16px; background: #000; color: #fff !important; border-left: 2.5px solid var(--ink); }
.uber-logo { font: 500 19px/1 "Helvetica Neue", Helvetica, Arial, sans-serif; letter-spacing: -0.02em; text-transform: none; }
.pb__link--uber, .link--uber { display: inline-flex; align-items: center; gap: 5px; background: #000; color: #fff; border: 2px solid var(--ink); border-radius: 999px; text-decoration: none; }
.link--uber { padding: 6px 12px; margin: 4px 0; font: 700 13px var(--sans); }
.pb__link--uber .uber-logo, .link--uber .uber-logo { font-size: 16px; }
/* Griseline's spoken replies in comments and chats. */
.has-tspk { position: relative; padding-right: 38px; cursor: pointer; }
.pb__spk.tspk { right: 3px; bottom: 1px; width: 32px; height: 30px; }
[data-voice-bubble] { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.voice-bar { position: fixed; z-index: 85; left: 12px; right: 12px; bottom: calc(86px + var(--safe-b)); display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border: 2.5px solid var(--ink); border-radius: 999px; background: #ffe4ec; box-shadow: 3px 3px 0 var(--ink); font: 700 14px var(--sans); animation: rise 0.2s ease-out; }
.voice-bar span { flex: 1; min-width: 0; }
.voice-bar button { flex: none; min-height: 38px; padding: 4px 12px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); color: var(--ink); font: 700 13px var(--sans); }
.voice-bar button[data-voice-off] { background: var(--ink); color: var(--paper); }

/* Taxi card: the address big enough for a driver to read at arm's length. */
.taxi { text-align: center; padding: 6px 0 4px; }
.taxi .eyebrow { font-size: 15px; }
.taxi__street { margin-top: 14px; font: 52px/0.95 var(--display); text-transform: uppercase; overflow-wrap: anywhere; }
.taxi__town { margin-top: 10px; font: 700 26px/1.2 var(--sans); }
.taxi__name { margin-top: 10px; font: 700 18px var(--sans); color: var(--ink-2); }
.taxi__say { margin: 18px auto 0; max-width: 34ch; font-size: 16px; line-height: 1.45; font-style: italic; }
.taxi__actions { display: grid; gap: 10px; margin-top: 20px; }
