/* meet@stabi: one phone column on graph paper; activities are coloured stickers
   with ink borders and offset shadows. Tokens and components from design/prototype.html. */

/* ---------- fonts (self-hosted, latin + latin-ext) ---------- */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/fonts/bricolage-grotesque-latin-ext-opsz-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/fonts/bricolage-grotesque-latin-opsz-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/dm-sans-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/dm-sans-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/dm-sans-latin-ext-500-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/dm-sans-latin-500-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/dm-sans-latin-ext-700-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/dm-sans-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- tokens ---------- */
:root {
  --bg: #FFF2C7; --grid: rgba(27, 21, 48, .07); --surface: #FFFFFF; --ink: #1B1530; --muted: #5A5270;
  --mensa: #FF8A3D; --coffee: #FF5FA2; --chat: #2ECC8F; --study: #5B78FF; --like: #FF3D6E; --on-color: #1B1530;
  --like-text: #C8184A; /* --like for text on the page: 5.1:1 on --bg (--like itself is 3.1:1) */
  --focus: #3654F0;
  --display: "Bricolage Grotesque", "Arial Black", Arial, sans-serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #18122E; --grid: rgba(255, 242, 199, .06); --surface: #251D42; --ink: #FFF2C7; --muted: #B9B0D6;
    --mensa: #FF9A55; --coffee: #FF74B0; --chat: #47DDA2; --study: #7D93FF; --like: #FF5C85; --on-color: #18122E;
    --like-text: var(--like);
    --focus: #9DB0FF;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #18122E; --grid: rgba(255, 242, 199, .06); --surface: #251D42; --ink: #FFF2C7; --muted: #B9B0D6;
  --mensa: #FF9A55; --coffee: #FF74B0; --chat: #47DDA2; --study: #7D93FF; --like: #FF5C85; --on-color: #18122E;
  --like-text: var(--like);
  --focus: #9DB0FF;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-anchor: none; }
html:has(dialog[open]) { overflow: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: break-word;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; cursor: pointer; color: inherit; }
button:disabled { cursor: not-allowed; }
button[aria-busy="true"] { cursor: progress; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.pagetitle:focus, #view:focus, [tabindex="-1"]:focus { outline: none; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

.app {
  max-width: 440px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  padding-bottom: calc(36px + env(safe-area-inset-bottom));
}

/* ---------- header ---------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(12px + env(safe-area-inset-top)) 0 12px;
  border-bottom: 2px solid var(--ink);
  /* Also cover the side gutters, so offset card shadows don't peek out beside it on scroll. */
  box-shadow: 0 0 0 16px var(--bg);
  clip-path: inset(0 -16px);
}
.brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -.02em;
  display: flex;
  align-items: center;
  background: none;
  border: 0;
  color: var(--ink);
  padding: 0;
  white-space: nowrap;
}
.brand .at {
  display: inline-grid;
  place-items: center;
  width: 1.25em;
  height: 1.25em;
  margin: 0 2px;
  border-radius: 50%;
  background: var(--coffee);
  color: var(--on-color);
  border: 2px solid var(--ink);
  font-size: .8em;
  line-height: 1;
  transform: rotate(-12deg);
}
a.brand { text-decoration: none; }
.bar-end { display: flex; align-items: center; gap: 10px; min-width: 0; }
.date { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.seg { display: inline-flex; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; flex: none; }
.seg button { border: 0; background: transparent; padding: 3px 9px; font-size: 13px; font-weight: 700; min-height: 30px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.seg button:focus-visible { outline-offset: -4px; }
.seg a { padding: 3px 9px; font-size: 13px; font-weight: 700; text-decoration: none; min-height: 30px; display: inline-grid; place-items: center; }
.seg a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.seg a:focus-visible { outline-offset: -4px; }

/* ---------- headings & text ---------- */
.hero { padding-top: 26px; }
h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 44px;
  line-height: .98;
  letter-spacing: -.035em;
  margin: 16px 0 12px;
  text-wrap: balance;
}
h1 .hl {
  background: var(--coffee);
  color: var(--on-color);
  padding: 0 .12em;
  border-radius: 6px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.sub { font-size: 17px; color: var(--muted); margin: 0 0 4px; max-width: 34ch; }
h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -.02em;
  line-height: 1.05;
  margin: 24px 0 6px;
  text-wrap: balance;
}
h3 { font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: -.02em; line-height: 1.05; margin: 0 0 6px; }

/* ---------- home ---------- */
.steps { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.step {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 12px;
  align-items: start;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 4px 4px 0 var(--ink);
}
.step:nth-child(2) { transform: rotate(.6deg); }
.step:nth-child(3) { transform: rotate(-.6deg); }
.num {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  color: var(--on-color);
}
.step:nth-child(1) .num { background: var(--mensa); }
.step:nth-child(2) .num { background: var(--chat); }
.step:nth-child(3) .num { background: var(--coffee); }
.step b { font-family: var(--display); font-size: 18px; display: block; line-height: 1.15; margin-bottom: 2px; }
.banner {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--coffee);
  color: var(--on-color);
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 700;
  box-shadow: 3px 3px 0 var(--ink);
}
.banner .chip { background: #FFFFFF; color: #1B1530; border-color: #1B1530; }
.tip { margin-top: 18px; font-size: 13px; color: var(--muted); border-left: 3px solid var(--coffee); padding-left: 10px; }
.tip b { color: var(--ink); }
.pushtip { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pushtip .chip { color: var(--ink); }

/* ---------- buttons ---------- */
.ctas { display: grid; }
.cta {
  display: block;
  width: 100%;
  margin-top: 24px;
  background: var(--ink);
  color: var(--bg);
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 16px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 19px;
  line-height: 1.2;
  box-shadow: 4px 4px 0 var(--coffee);
  transition: transform .1s, box-shadow .1s;
}
.cta:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--coffee); }
.cta:disabled { opacity: .35; }
.cta[aria-busy="true"] { opacity: .6; }
.ghost {
  display: block;
  width: 100%;
  margin-top: 10px;
  background: transparent;
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 13px;
  font-weight: 700;
  color: var(--ink);
}
.textbtn {
  background: none;
  border: 0;
  padding: 6px 0;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: inherit;
}
.textbtn.small { font-size: 12px; font-weight: 500; color: var(--muted); justify-self: start; padding: 4px 0; min-height: 24px; }
.textbtn.remove { display: block; margin: 22px auto 0; color: var(--muted); }
.mini {
  border: 2px solid currentColor;
  background: transparent;
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 700;
  font-size: 14px;
}
.mini.solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.mini:disabled { opacity: .5; }

/* ---------- chips & tags ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 2px solid var(--ink);
  background: var(--surface);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  min-height: 38px;
  text-align: left;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.chip.inv { background: transparent; color: var(--bg); border-color: var(--bg); padding: 5px 12px; min-height: 0; font-weight: 700; flex: none; }
.chip:disabled { opacity: .5; }
.actchips .chip[aria-pressed="true"] { color: var(--on-color); font-weight: 700; }
.act-mensa { --act: var(--mensa); }
.act-coffee { --act: var(--coffee); }
.act-chat { --act: var(--chat); }
.act-study { --act: var(--study); }
.actchips .chip[aria-pressed="true"] { background: var(--act, var(--ink)); }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 700;
  font-size: 12px;
  color: var(--on-color);
  background: var(--act, var(--surface));
  white-space: nowrap;
}
.tag.mutual { background: var(--like); }
.swatch { display: inline-flex; align-items: center; gap: 6px; }
.swatch i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--ink); display: inline-block; flex: none; background: var(--sw); }
.chip.swatch[aria-pressed="true"] i { border-color: var(--bg); }
.sw-black { --sw: #1d1d1f; }
.sw-white { --sw: #ffffff; }
.sw-grey { --sw: #9a9aa0; }
.sw-navy { --sw: #1f2f5c; }
.sw-blue { --sw: #3a7bd5; }
.sw-green { --sw: #3c8d4f; }
.sw-red { --sw: #d23b3b; }
.sw-pink { --sw: #f29cc2; }
.sw-beige { --sw: #d9c3a0; }
.sw-yellow { --sw: #f2cf3a; }
.sw-brown { --sw: #7a4e2d; }

/* ---------- describe form ---------- */
.field { margin-top: 20px; }
.lab { display: block; font-weight: 700; margin-bottom: 8px; }
.hint { font-weight: 400; color: var(--muted); font-size: 13px; }
.lookbox {
  margin-top: 22px;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 4px 4px 0 var(--chat);
}
.lookbox .field:first-child { margin-top: 0; }
.lookbox .chip { background: var(--bg); }
.lookbox .chip[aria-pressed="true"] { background: var(--ink); }
.preview { margin: 16px 0 0; padding: 10px 12px; border: 2px dashed var(--ink); border-radius: 12px; }
.timerow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
input[type="time"] {
  font: inherit;
  font-weight: 700;
  font-size: 17px;
  min-height: 42px;
  min-width: 120px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 6px 10px;
  background: var(--surface);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
input[type="time"]:disabled { opacity: .5; }
.missing { margin: 10px 0 0; text-align: center; font-size: 13px; color: var(--muted); }

/* ---------- confirmations (in-page, never confirm()) ---------- */
.confirm { border: 2px dashed currentColor; border-radius: 12px; padding: 10px 12px; margin-top: 10px; font-weight: 500; }
.confirm p { margin-bottom: 8px; }
.confirm .row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- board ---------- */
.cards { display: grid; gap: 14px; margin-top: 14px; }
.card {
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 4px 4px 0 var(--ink);
  display: grid;
  gap: 8px;
  margin: 0;
}
.cards .card:nth-child(even) { transform: rotate(.4deg); }
.card .top { display: flex; align-items: flex-start; gap: 4px 8px; }
.card .top .zone { flex: 1 1 auto; min-width: 0; }
.card .top .tag, .card .top .until { flex: none; }
.card .look { font-weight: 700; font-size: 16px; margin: 0; }
.card .zone { font-size: 13px; color: var(--muted); }
.card .bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ups { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.until { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mine { background: var(--ink); color: var(--bg); box-shadow: 4px 4px 0 var(--coffee); margin-top: 18px; }
.mine .zone { color: var(--bg); opacity: .8; }
.mine .tag { border-color: var(--bg); }
.likebtn {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--surface);
  display: grid;
  place-items: center;
  padding: 0;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform .12s;
}
.likebtn svg { width: 24px; height: 24px; }
.likebtn path { fill: none; stroke: var(--ink); stroke-width: 2.2; }
.likebtn[aria-pressed="true"] { background: var(--like); }
.likebtn[aria-pressed="true"] path { fill: var(--on-color); stroke: var(--on-color); }
.likebtn:active:not(:disabled) { transform: scale(.9); }
.likebtn[aria-busy="true"] { opacity: .6; }
.hearts { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.hearts .left { white-space: nowrap; font-weight: 500; }
.hearts b { color: var(--like-text); font-variant-numeric: tabular-nums; }
.teaser { margin-top: 14px; border: 2px dashed var(--ink); border-radius: 14px; padding: 12px 14px; font-weight: 500; }
.teaser b { color: var(--like-text); }
.teaser.looking { margin-top: 18px; }
.teaser .chip { margin: 0 2px; padding: 3px 10px; min-height: 0; font-weight: 700; }
.empty { border: 2px dashed var(--ink); border-radius: 16px; padding: 22px; text-align: center; color: var(--muted); }
.empty.spaced { margin-top: 26px; }
.empty .chip { color: var(--ink); }
.loading { padding: 40px 0; text-align: center; color: var(--muted); }

/* ---------- closed ---------- */
.closedbox {
  margin-top: 24px;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 18px;
  padding: 20px 18px;
  box-shadow: 4px 4px 0 var(--study);
}
.closedbox h2 { margin-top: 6px; }
.closedbox p { margin: 0; }
.moon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--study);
  color: var(--on-color);
  font-size: 26px;
  line-height: 1;
  transform: rotate(-12deg);
}

/* ---------- matches ---------- */
.matches h2 { margin-top: 22px; }
.matchcard {
  background: var(--coffee);
  color: var(--on-color);
  border: 3px solid var(--ink);
  border-radius: 22px;
  box-shadow: 6px 6px 0 var(--ink);
  padding: 22px 18px;
  width: 100%;
}
.matchcard.inline { margin-top: 12px; padding: 18px 16px; transform: rotate(-.5deg); }
.matchcard h2 { font-size: clamp(34px, 10vw, 40px); margin: 0 0 8px; }
.matchcard .mintro { font-weight: 500; }
.matchcard .mintro .until { margin: 0; }
.matchcard .lab { margin-top: 14px; }
.matchcard .chip { background: #FFFFFF; color: #1B1530; border-color: #1B1530; }
.matchcard .chip[aria-pressed="true"],
.matchcard .actchips .chip[aria-pressed="true"] { background: #1B1530; color: #FFF2C7; }
.matchcard .cta { background: #1B1530; color: #FFF2C7; border-color: #1B1530; box-shadow: 4px 4px 0 #FFFFFF; }
.matchcard .ghost { border-color: #1B1530; color: #1B1530; }
.matchcard .textbtn { display: block; margin: 10px auto 0; color: #1B1530; }
.matchcard .mini { color: #1B1530; }
.matchcard .mini.solid { background: #1B1530; color: #FFF2C7; border-color: #1B1530; }
.matchcard input[type="time"] { background: #FFFFFF; color: #1B1530; border-color: #1B1530; color-scheme: light; }
.matchcard :focus-visible { outline-color: #1B1530; }
.matchcard .plannote { margin: 14px 0 0; font-size: 14px; }
.matchcard .plan { font-size: 17px; margin: 12px 0 0; }
.matchcard .plan.big { font-family: var(--display); font-size: 22px; font-weight: 700; line-height: 1.2; }
.matchcard.closedmatch {
  background: var(--surface);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 4px 4px 0 var(--ink);
  border-width: 2px;
  transform: none;
}
.matchcard.closedmatch p { margin: 0; font-weight: 700; }
.matchcard.closedmatch .mini { color: var(--ink); }

/* ---------- dialog (match pop-up, feedback) ---------- */
dialog {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  width: calc(100% - 32px);
  max-width: 400px;
  max-height: none;
  overflow: visible;
}
dialog::backdrop { background: rgba(20, 14, 40, .6); }
dialog .matchcard,
dialog .fbcard {
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
}
dialog .matchcard { transform: rotate(-1deg); }
.fbcard {
  background: var(--surface);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 22px;
  box-shadow: 6px 6px 0 var(--chat);
  padding: 20px 18px;
}
.fbcard h2 { margin-top: 0; }
.fbcard .chips { margin-bottom: 14px; }
textarea {
  display: block;
  width: 100%;
  font: inherit;
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 10px;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px; /* 16px+ keeps iOS from zooming in on focus */
  resize: vertical;
  min-height: 96px;
}
textarea::placeholder { color: var(--muted); opacity: 1; }
.count { margin: 4px 0 0; text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fbcard .cta { margin-top: 14px; }

/* ---------- footer ---------- */
.footer { margin-top: 28px; }
.fb-link {
  background: none;
  border: 0;
  padding: 0;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--ink);
  text-align: left;
}
.legal { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.legal a, .linkbtn { color: var(--muted); display: inline-block; padding: 3px 0; }
.linkbtn { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; font-size: 13px; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 50;
  width: max-content;
  max-width: min(400px, calc(100% - 32px));
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 3px 3px 0 var(--coffee);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 12px) rotate(-1deg);
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0) rotate(-1deg); }

/* ---------- legal pages (HTML rendered by the Worker) ---------- */
.prose { padding-top: 22px; }
.prose h1 { font-size: 34px; line-height: 1.05; margin: 8px 0 14px; }
.prose h2 { font-size: 21px; margin: 26px 0 6px; }
.prose h3 { font-size: 17px; margin: 18px 0 4px; }
.prose ul, .prose ol { padding-left: 20px; margin: 0 0 10px; }
.prose li { margin-bottom: 4px; }
.prose address { font-style: normal; margin-bottom: 10px; }
.prose .stand, .prose small { color: var(--muted); font-size: 13px; }
.warn {
  margin: 18px 0;
  border: 2px dashed var(--like);
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 700;
  color: var(--ink);
  background: var(--surface);
}

/* ---------- admin ---------- */
.app.wide { max-width: 980px; }
.adminform { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-top: 18px; }
.adminform label { display: grid; gap: 6px; font-weight: 700; flex: 1 1 220px; }
.adminform input {
  font: inherit;
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 9px 10px;
  font-size: 16px;
  background: var(--surface);
  color: var(--ink);
}
.adminform .mini, .adminbar .mini { min-height: 44px; }
.adminbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.adminbar h2 { margin: 0; }
.tablewrap { overflow-x: auto; margin-top: 10px; border: 2px solid var(--ink); border-radius: 14px; background: var(--surface); }
.stats { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: 14px; }
.stats th, .stats td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--grid); white-space: nowrap; }
.stats th:first-child, .stats td:first-child { text-align: left; }
.stats thead th { font-family: var(--display); border-bottom: 2px solid var(--ink); }
.fblist { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 10px; }
.fblist li { background: var(--surface); border: 2px solid var(--ink); border-radius: 14px; padding: 12px 14px; }
.fblist .meta { font-size: 12px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.fblist .text { white-space: pre-wrap; margin: 0; }
.notice { margin-top: 14px; font-weight: 700; color: var(--like-text); }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  dialog .matchcard.pop { animation: pop .35s cubic-bezier(.2, 1.6, .4, 1); }
  @keyframes pop { from { transform: scale(.6) rotate(-6deg); opacity: 0; } }
  .likebtn.beat svg { animation: beat .35s ease-out; }
  @keyframes beat { 40% { transform: scale(1.3); } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
