
/* ------------------------------------------------------------------- fonts */
/* Self-hosted, and the reason matters. These five typefaces are not decoration: choosing one
   is a feature of a quote card, so a card rendered without them is a card rendered wrong. On
   Google Fonts that made the app's own content depend on a third party being reachable, which
   broke the project's no-third-party-runtime rule and would have made server-side export
   impossible, since a rasteriser cannot use a font it has to fetch from somewhere else.
   Twelve latin woff2 files, 267KB in total, and only the faces the app actually draws.
   font-display: swap so text is readable while they load. */

@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/eb-garamond-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/eb-garamond-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "EB Garamond";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/eb-garamond-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Libre Baskerville";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/libre-baskerville-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Libre Baskerville";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/libre-baskerville-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Crimson Pro";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/crimson-pro-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Crimson Pro";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/crimson-pro-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Zilla Slab";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/zilla-slab-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Zilla Slab";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/zilla-slab-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Spectral";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/fonts/spectral-300-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Spectral";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/spectral-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Spectral";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/spectral-400-italic.woff2") format("woff2");
}

:root {
  color-scheme: light dark;

  --paper:   #faf7f2;
  --surface: #ffffff;
  --sunk:    #f2ede4;
  --ink:     #1c1a17;
  --muted:   #6f6a62;
  --faint:   #989186;
  --line:    #e5ded2;
  --accent:  #8a4b2a;
  --accent-soft: #f4e6dc;
  --good:    #3f6b47;
  --warn:    #96601a;
  --shadow:  0 1px 2px rgba(28,26,23,.05), 0 8px 24px -12px rgba(28,26,23,.18);
  --radius:  14px;

  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:   #141210;
    --surface: #1d1a16;
    --sunk:    #232019;
    --ink:     #f1ece4;
    --muted:   #a69d90;
    --faint:   #7b7367;
    --line:    #302b24;
    --accent:  #d9945f;
    --accent-soft: #33251b;
    --good:    #7fb389;
    --warn:    #d8a860;
    --shadow:  0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- chrome */

header.top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink);
  margin-right: auto;
}
.brand:hover { text-decoration: none; }
.brand .mark { color: var(--accent); }

main { max-width: 780px; margin: 0 auto; padding: 20px 16px 96px; }

/* ---------------------------------------------------------------- type */

h1 { font-family: var(--serif); font-size: 28px; line-height: 1.2; letter-spacing: -.02em; margin: 0 0 6px; font-weight: 600; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 32px 0 12px; font-weight: 600; }
h3 { font-family: var(--serif); font-size: 19px; margin: 0 0 4px; font-weight: 600; letter-spacing: -.01em; }
p  { margin: 0 0 12px; }
.lede { color: var(--muted); margin: 0 0 20px; }
.small { font-size: 13px; color: var(--muted); }
.tiny  { font-size: 12px; color: var(--faint); }

/* ---------------------------------------------------------------- controls */

button, .btn {
  font: inherit; font-size: 15px; font-weight: 500;
  border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink);
  padding: 9px 14px; cursor: pointer;
  transition: background .12s, border-color .12s, transform .06s;
}
button:hover, .btn:hover { border-color: var(--accent); text-decoration: none; }
button:active { transform: translateY(1px); }
button:disabled { opacity: .45; cursor: not-allowed; }

button.primary, .btn.primary {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
@media (prefers-color-scheme: dark) { button.primary, .btn.primary { color: #1a1310; } }
button.ghost { background: transparent; border-color: transparent; color: var(--muted); padding: 6px 8px; }
button.ghost:hover { color: var(--accent); }
button.tiny-btn { font-size: 13px; padding: 5px 10px; border-radius: 8px; }
button.danger { color: #a33; border-color: var(--line); }

input, textarea, select {
  font: inherit; width: 100%;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 5px; }
.field { margin-bottom: 14px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.card.flat { box-shadow: none; }
a.card { color: inherit; }
a.card:hover { text-decoration: none; border-color: var(--accent); }

.club-card { display: flex; gap: 14px; align-items: flex-start; }
.club-card .body { flex: 1; min-width: 0; }
.club-card h3 { margin-bottom: 2px; }

/* ---------------------------------------------------------------- banners */

/* A club's own picture, across the top of its page. Fixed height so the page below it does not
   jump around while the image loads, and object-fit: cover so any shape the admin uploads
   crops to the same band rather than stretching. */
.club-banner {
  height: 150px;
  margin: -2px 0 16px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--sunk);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.club-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }

.banner-preview {
  height: 96px;
  margin-bottom: 9px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--sunk);
  border: 1px solid var(--line);
  display: grid; place-items: center;
}
.banner-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Somebody invited but not yet answered. Not a .reader: there is no person behind it yet,
   only an address, and an address must never be truncated to fit a button beside it. */
.invited { padding: 10px 0; border-bottom: 1px solid var(--line); }
.invited:last-child { border-bottom: 0; padding-bottom: 0; }
.invited .addr { overflow-wrap: anywhere; margin-bottom: 6px; }

/* ---------------------------------------------------------------- covers */

.cover {
  width: 56px; height: 84px; flex: none;
  border-radius: 4px;
  background: var(--sunk) center/cover no-repeat;
  border: 1px solid var(--line);
  box-shadow: 2px 2px 0 color-mix(in srgb, var(--ink) 6%, transparent);
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 20px; color: var(--faint);
  overflow: hidden;
}
.cover.lg { width: 92px; height: 138px; font-size: 28px; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

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

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px;
  background: var(--sunk); color: var(--muted);
  border: 1px solid transparent;
}
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge.live   { background: color-mix(in srgb, var(--good) 15%, transparent); color: var(--good); }
.badge.count  { background: var(--accent); color: #fff; }
.badge.pick {
  background: transparent;
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--accent);
  font-weight: 500;
}
.badge.pick::before { content: "★"; font-size: 10px; opacity: .8; }
@media (prefers-color-scheme: dark) { .badge.count { color: #1a1310; } }

/* ---------------------------------------------------------------- chapters */

.chapters { display: flex; flex-direction: column; gap: 8px; }

.chapter {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  cursor: pointer;
  text-align: left; width: 100%;
  font-size: 15px;
}
.chapter:hover { border-color: var(--accent); }
.chapter .num {
  font-family: var(--serif); font-size: 15px; font-weight: 600;
  width: 30px; flex: none; color: var(--muted); text-align: center;
}
.chapter .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chapter.locked {
  background: repeating-linear-gradient(
    -45deg, transparent, transparent 7px,
    color-mix(in srgb, var(--line) 45%, transparent) 7px,
    color-mix(in srgb, var(--line) 45%, transparent) 8px);
  border-style: dashed;
  color: var(--faint);
  cursor: default;
}
.chapter.locked:hover { border-color: var(--line); }
.chapter.locked .label { font-style: italic; }
.chapter.read .num { color: var(--good); }
.chapter.current { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

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

.track { height: 6px; border-radius: 999px; background: var(--sunk); overflow: hidden; }
.track > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s; }

.reader { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.reader:last-child { border-bottom: 0; }
.reader .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader .track { width: 96px; flex: none; }
.reader .pos { font-size: 13px; color: var(--muted); width: 62px; text-align: right; flex: none; font-variant-numeric: tabular-nums; }

.avatar {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 24px; height: 24px; font-size: 11px; }

/* ---------------------------------------------------------------- range */

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  background: transparent; border: 0; padding: 0;
  width: 100%; height: 22px; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 5px; border-radius: 999px; background: var(--sunk); border: 1px solid var(--line);
}
input[type="range"]::-moz-range-track {
  height: 5px; border-radius: 999px; background: var(--sunk); border: 1px solid var(--line);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; margin-top: -8px;
  border-radius: 50%; background: var(--accent);
  border: 2px solid var(--surface);
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--surface);
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
input[type="range"]:focus { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- quotes */

.cover.sm { width: 34px; height: 51px; font-size: 14px; border-radius: 3px; }

.quote-body {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.45;
  margin: 0;
  padding: 0 0 0 16px;
  border-left: 3px solid var(--accent-soft);
  white-space: pre-wrap;
  word-wrap: break-word;
  transition: filter .18s, opacity .18s;
}
/* The blur was scoped to .quote-body.spoiler, which stopped working the moment a quote became
   a drawn page wrapped in a plain div. A spoiler that silently renders in the clear is the
   worst failure this app has, so the rule is on .spoiler itself now and applies to whatever it
   wraps. */
.spoiler {
  filter: blur(7px);
  opacity: .75;
  cursor: pointer;
  user-select: none;
  transition: filter .18s, opacity .18s;
}
.spoiler:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.spoiler-note { margin-top: 10px; font-style: italic; }

.quote-card { padding: 18px 16px; }

/* ---------------------------------------------------------------- quote cards */

.qcard {
  position: relative; overflow: hidden;
  border-radius: 3px; padding: 30px 26px;
  min-height: 190px;
  display: flex; flex-direction: column; justify-content: center;
  box-shadow: 0 1px 2px rgba(0,0,0,.10), 0 14px 30px -18px rgba(0,0,0,.45);
}
.paper-clean  { background: #fdfcf9; color: #1c1917; }
.paper-cream  { background: #f7f0e1; color: #241f18; }
.paper-aged   { background: #eee0c4; color: #2b2318; }
.paper-yellow { background: #efe3bd; color: #33291a; }
.paper-coffee { background: #eadfc8; color: #2a2117; }
.paper-dark   { background: #241f1b; color: #efe6d6; }

.q-grain  { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply;
            filter: url(#q-grain); opacity: .5; }
.q-fox    { position: absolute; inset: 0; pointer-events: none; filter: url(#q-fox); opacity: .55; }
.q-burn   { position: absolute; inset: 0; pointer-events: none;
            box-shadow: inset 0 0 44px rgba(120,92,48,.30), inset 0 0 10px rgba(90,66,30,.20); }
.q-coffee {
  position: absolute; width: 46%; aspect-ratio: 1; right: -8%; top: 4%;
  pointer-events: none; border-radius: 50%; transform: rotate(-12deg);
  background: radial-gradient(circle, transparent 0 58%, rgba(140,96,44,.20) 59% 68%,
              rgba(140,96,44,.09) 69% 78%, transparent 79%);
}
.q-marks { position: absolute; inset: 0; pointer-events: none; }
.q-marks.under { z-index: 1; }
.q-marks.over  { z-index: 3; }

.q-passage {
  position: relative; z-index: 2; margin: 0;
  font-size: 18px; line-height: 1.6;
}
.q-attrib {
  position: relative; z-index: 2; margin-top: 22px;
  font-size: 10px; letter-spacing: .07em; text-transform: uppercase; opacity: .6;
}
.q-w.pick { cursor: pointer; border-radius: 3px; }
.q-w.pick:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.q-w.picking { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 3px; }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch {
  min-width: 44px; height: 40px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 9px;
  font-size: 13px; cursor: pointer;
}
.swatch.wide { min-width: 62px; }
.swatch.dot { width: 32px; min-width: 32px; height: 32px; border-radius: 50%; padding: 0; }
.swatch.on { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

/* ---------------------------------------------------------------- comments */

.comment { padding: 12px 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: 0; }
.comment .head { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.comment .name { font-weight: 600; font-size: 14px; }
.comment .body { white-space: pre-wrap; word-wrap: break-word; }

.note-box { background: var(--sunk); border-radius: 11px; padding: 14px; }

/* ---------------------------------------------------------------- misc */

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .mark { font-family: var(--serif); font-size: 40px; display: block; margin-bottom: 8px; color: var(--faint); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tab {
  border: 0; background: none; padding: 9px 12px; border-radius: 0;
  color: var(--muted); font-weight: 600; font-size: 14px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tab:hover { border-color: transparent; border-bottom-color: var(--line); }

.sheet-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(20,18,16,.45);
  display: grid; place-items: end center;
  padding: 0;
}
.sheet {
  background: var(--surface); width: 100%; max-width: 560px;
  border-radius: 18px 18px 0 0; padding: 20px 18px 28px;
  max-height: 88vh; overflow-y: auto;
  border: 1px solid var(--line); border-bottom: 0;
}
@media (min-width: 640px) {
  .sheet-backdrop { place-items: center; padding: 24px; }
  .sheet { border-radius: 18px; border-bottom: 1px solid var(--line); }
}

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  z-index: 90; background: var(--ink); color: var(--paper);
  padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow); max-width: 90vw;
}

.result {
  display: flex; gap: 12px; align-items: center; width: 100%;
  padding: 10px; border-radius: 10px; border: 1px solid transparent;
  background: none; text-align: left; cursor: pointer;
}
.result:hover { background: var(--sunk); border-color: var(--line); }

hr.rule { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--accent);
  animation: spin .7s linear infinite; display: inline-block; vertical-align: -3px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.avatar.xl { width: 76px; height: 76px; font-size: 28px; flex: none; }

.badge.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }

/* ---------------------------------------------------------------- tab bar */
/* A floating pill, not a bar welded to the bottom of the screen. Content runs underneath it
   and shows through, which is the whole point: the blur has to have something to blur.

   The glass is four things stacked, and it falls apart if you drop any of them:
     1. a translucent fill, so the page is visible through it
     2. backdrop-filter blur plus saturation, so what shows through is soft and colour stays alive
     3. a hairline border that is lighter at the top than the bottom, which is what reads as a
        curved edge catching light
     4. an inset highlight along the top inner edge, the specular line down the middle of the
        curve, and a real shadow underneath so it sits above the page rather than in it */

#tabbar {
  position: fixed; z-index: 50;
  left: 50%; transform: translateX(-50%);
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  width: min(420px, calc(100% - 24px));
  display: flex; align-items: center; justify-content: space-around;
  gap: 2px;
  padding: 6px;
  border-radius: 999px;

  background: color-mix(in srgb, var(--surface) 72%, transparent);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);

  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  border-top-color: color-mix(in srgb, #fff 55%, transparent);

  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #fff 45%, transparent),
    0 1px 2px rgba(28, 26, 23, .06),
    0 12px 32px -8px rgba(28, 26, 23, .28);
}

@media (prefers-color-scheme: dark) {
  #tabbar {
    background: color-mix(in srgb, var(--surface) 62%, transparent);
    border-top-color: color-mix(in srgb, #fff 16%, transparent);
    box-shadow:
      inset 0 1px 0 color-mix(in srgb, #fff 12%, transparent),
      0 12px 32px -8px rgba(0, 0, 0, .7);
  }
}

#tabbar:empty { display: none; }

/* The page has to clear the pill and the gap under it, or the last card sits behind glass. */
body { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }

.tab {
  position: relative;
  flex: 0 1 auto;
  display: flex; align-items: center; justify-content: center;
  gap: 0;
  height: 42px; min-width: 46px;
  padding: 0 13px;
  border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 600; letter-spacing: .01em;
  color: var(--faint);
  text-decoration: none;
  border-radius: 999px;
  -webkit-tap-highlight-color: transparent;
  transition: color .22s, background .22s, padding .22s cubic-bezier(.2,.8,.2,1);
}

.tab svg {
  width: 22px; height: 22px;
  fill: none;
  stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
  flex: 0 0 auto;
}

/* Labels are hidden until a tab is the one you are on. Five words in a pill is clutter; one
   word tells you where you are, and the width animating open is the liquid part. */
.tab span {
  max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0;
  transition: max-width .26s cubic-bezier(.2,.8,.2,1), opacity .18s, margin .26s;
}

.tab.on {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 40%, transparent);
}
.tab.on svg { stroke-width: 2; }
.tab.on span { max-width: 90px; opacity: 1; margin-left: 7px; }

.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* The only badge in the app. It means somebody wants you, never that you are behind. */
.tab .dot {
  position: absolute; top: 5px; right: 8px;
  min-width: 8px; height: 8px; padding: 0;
  border-radius: 999px;
  background: var(--accent);
  font-size: 0; line-height: 0;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--surface) 80%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  .tab, .tab span { transition: none; }
}

/* --------------------------------------------------------------- icon buttons */
/* A destructive action should be reachable and quiet. Delete used to be the loudest word on
   the feed, repeated once per quote you had written. */

.icon-btn {
  display: grid; place-items: center;
  width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: 8px;
  background: none; color: var(--faint);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover, .icon-btn:focus-visible { background: var(--sunk); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }

.icon-btn svg, svg.mini {
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
svg.mini { width: 14px; height: 14px; flex: 0 0 auto; }

/* --------------------------------------------------------------- page header */
/* Title and its one action on the same line. A heading with a button stacked under it burns
   the most valuable strip of a phone screen restating what the heading already said. */

.page-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.page-head h1 { margin: 0; }
.page-head > .primary, .page-head > .btn { flex: 0 0 auto; }

/* Required by ODbL wherever OpenStreetMap data is shown. */
.osm-credit { margin: 8px 0 0; color: var(--faint); }
