/* flørtepus – "Natta" (night out). Tokens -> base -> layout -> components -> motion. Heat (cherry -> ember) is reserved for meaning:
   like, match, own chat bubbles, flame meters. Ink on heat surfaces is always --natt (measured contrast >= 4.5:1). */

@font-face { font-family: 'Unbounded'; src: url('/fonts/unbounded-latin.woff2') format('woff2'); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('/fonts/figtree-latin.woff2') format('woff2'); font-weight: 300 900; font-style: normal; font-display: swap; }

/* Themes: "Natta" (dark, default) and "Dag" (light). The attribute data-theme wins; without it the system preference decides. */
:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #191318; --surface: #231b21; --surface2: #2e242c; --line: #483a44; --field-line: #8f7684;
  --text: #f2e8e5; --soft: #dfbac7; --dim: #b79ca8; --ice-text: #a9d3ee; --err: #f2a3b2; --placeholder: #a28a97;
  --rouge: #ec5a78; --glod: #f08a62;
  --shadow: rgba(0, 0, 0, .35);
  --bar: rgba(25, 19, 24, .88); --scrim: rgba(10, 6, 9, .72); --badge-bg: #ec5a78; --badge-ink: #191318;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --bg: #faf5f2; --surface: #fffdfc; --surface2: #f6e8ea; --line: #e6cdd5; --field-line: #a8637f;
    --text: #2a1d23; --soft: #86304f; --dim: #6a4f5b; --ice-text: #0b5f94; --err: #b3123b; --placeholder: #76506a;
    --rouge: #c2284a; --glod: #b0431a; --heat-text: linear-gradient(135deg, #b8223f, #c4491f);
    --shadow: rgba(70, 12, 40, .22);
  --bar: rgba(250, 245, 242, .92); --scrim: rgba(42, 10, 24, .55); --badge-bg: #c2284a; --badge-ink: #fff8f5;
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #faf5f2; --surface: #fffdfc; --surface2: #f6e8ea; --line: #e6cdd5; --field-line: #a8637f;
  --text: #2a1d23; --soft: #86304f; --dim: #6a4f5b; --ice-text: #0b5f94; --err: #b3123b; --placeholder: #76506a;
  --rouge: #c2284a; --glod: #b0431a; --heat-text: linear-gradient(135deg, #b8223f, #c4491f);
  --shadow: rgba(70, 12, 40, .22);
  --bar: rgba(250, 245, 242, .92); --scrim: rgba(42, 10, 24, .55); --badge-bg: #c2284a; --badge-ink: #fff8f5;
}
:root {
  /* fixed colours: ink on heat/yellow/paper surfaces, things drawn over photos, brand fills */
  --ink: #191318; --paper: #fff1ea; --blush: #e8c4cf; --ice: #a9d3ee; --hazard: #f0d27a; --on-photo: #f6ede9;
  --heat: linear-gradient(135deg, #ec5a78 0%, #f08a62 100%);
  --heat-text: var(--heat);
  --display: 'Unbounded', system-ui, sans-serif;
  --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r-s: 10px; --r-m: 18px; --r-l: 28px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--soft); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.03em; line-height: 1.1; margin: 0; }
:focus-visible { outline: 3px solid var(--soft); outline-offset: 3px; border-radius: 6px; }
.hidden { display: none !important; }
.hidden-input { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.left { text-align: left; }

/* ---------- shell ---------- */
#root { height: 100%; display: flex; justify-content: center; }
.shell { width: 100%; max-width: 480px; height: 100%; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: calc(10px + var(--safe-t)) 16px 8px; }
.brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.brand .cat { width: 38px; height: auto; }
.wordmark { font-family: var(--display); font-weight: 800; font-size: 19px; letter-spacing: -.05em; color: var(--rouge); background: var(--heat-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.qrlink { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line); color: var(--text); text-decoration: none; }
main { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 0 16px 16px; }

nav.tabs { position: relative; display: flex; background: var(--bar); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
@supports (backdrop-filter: blur(1px)) { nav.tabs { background: var(--bar); backdrop-filter: blur(14px); } }
.tabind { position: absolute; top: -1px; left: 0; height: 3px; width: calc(100% / var(--n, 4)); transform: translateX(calc(var(--i, 0) * 100%)); transition: transform .38s var(--spring); }
.tabind::after { content: ''; display: block; margin: 0 22%; height: 100%; background: var(--heat); border-radius: 0 0 4px 4px; }
nav.tabs button { position: relative; flex: 1; min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; background: none; border: 0; color: var(--dim); font-weight: 800; font-size: 12px; line-height: 1; transition: color .2s; }
nav.tabs button.on { color: var(--text); }
nav.tabs button.on .ico { color: var(--glod); transform: translateY(-1px) scale(1.08); }
nav.tabs .ico { transition: transform .3s var(--spring), color .2s; }
nav.tabs .nbadge { position: absolute; top: 6px; left: calc(50% + 6px); }

.nbadge { display: inline-block; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--badge-bg); color: var(--badge-ink); font-size: 11px; font-weight: 900; line-height: 18px; text-align: center; animation: beat 1.8s ease-in-out infinite; }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--heat); color: var(--ink); font-family: var(--body); font-weight: 900; font-size: 16px; text-decoration: none; box-shadow: 0 4px 0 #7a0c27; transition: transform .12s var(--ease), box-shadow .12s var(--ease), filter .15s; }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #7a0c27; }
.btn:disabled { background: var(--surface2); color: var(--dim); cursor: default; filter: none; transform: none; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 2px var(--line); }
.btn.ghost:disabled { background: transparent; opacity: .5; box-shadow: inset 0 0 0 2px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 2px var(--soft); }
.btn.ghost:active { box-shadow: inset 0 0 0 2px var(--soft); transform: translateY(1px); }
.btn.danger { background: transparent; color: var(--err); box-shadow: inset 0 0 0 2px var(--err); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 13px; }
a.btn { text-align: center; }
.link { background: none; border: 0; color: var(--soft); font-weight: 800; padding: 8px; text-decoration: underline; text-underline-offset: 3px; }

form.stack, .stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }
label.f, .f { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; color: var(--soft); }
input[type=text], input[type=email], input[type=password], input[type=number], textarea, select {
  width: 100%; min-height: 48px; padding: 11px 14px; border: 2px solid var(--field-line); border-radius: var(--r-m); background: var(--surface); color: var(--text); font-size: 16px; font-weight: 500;
}
textarea { min-height: 96px; resize: vertical; }
select { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffb8cc' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 20px; }
input::placeholder, textarea::placeholder { color: var(--placeholder); }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; border-color: var(--rouge); box-shadow: 0 0 0 4px rgba(236, 90, 120, .28); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--dim); font-weight: 500; }
.check input { width: 22px; height: 22px; min-height: 0; margin-top: 1px; accent-color: var(--rouge); flex: none; }
.err { color: var(--err); font-size: 14px; font-weight: 700; min-height: 20px; }
.fine { color: var(--dim); font-size: 13px; text-align: center; margin: 4px 0; }
.fine.left { text-align: left; }
.fine .link { float: right; padding: 0; }

/* ---------- auth / hero ---------- */
.auth { margin: auto; width: 100%; max-width: 400px; padding: calc(28px + var(--safe-t)) 24px 28px; text-align: center; display: flex; flex-direction: column; gap: 14px; }
.cat-hero { width: min(58vw, 220px); height: auto; margin: 0 auto 2px; --cat: var(--rouge); }
.auth h1 { font-weight: 900; font-size: clamp(34px, 11vw, 46px); letter-spacing: -.06em; color: var(--rouge); background: var(--heat-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; padding-bottom: 4px; }
.auth .sub { margin: 0; color: var(--soft); font-size: 18px; font-weight: 600; }
.auth .cta { min-height: 54px; font-size: 17px; }

/* ---------- deck ---------- */
.deckbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 2px 12px; color: var(--dim); font-size: 14px; font-weight: 600; }
.filterbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; box-shadow: inset 0 0 0 2px var(--line); color: var(--text); font-weight: 800; font-size: 14px; }
.banner { background: var(--surface); border: 2px dashed var(--glod); border-radius: var(--r-m); padding: 10px 14px; margin-bottom: 12px; font-size: 14px; font-weight: 600; }

.swipecard { --like: 0; --nope: 0; position: relative; isolation: isolate; touch-action: pan-y; user-select: none; transform-origin: 50% 95%; transition: transform .28s var(--ease); }
.swipecard.dragging { transition: none; will-change: transform; }
.swipecard::before, .swipecard::after { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: var(--r-l); pointer-events: none; }
.swipecard::before { box-shadow: inset 0 0 0 3px rgba(240, 138, 98, .9), 0 0 18px 2px rgba(240, 138, 98, .35); opacity: var(--like); }
.swipecard::after { box-shadow: inset 0 0 0 3px rgba(169, 211, 238, .85), 0 0 18px 2px rgba(169, 211, 238, .3); opacity: var(--nope); }
.cardclip { background: var(--surface); border-radius: var(--r-l); overflow: hidden; box-shadow: 0 18px 40px var(--shadow); }
.gal { position: relative; aspect-ratio: 3 / 4; max-height: min(58dvh, calc(100dvh - 410px)); min-height: 220px; width: 100%; background: var(--surface2); }
.gal img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.gal::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 58%; background: linear-gradient(to top, rgba(25, 19, 24, .97), rgba(25, 19, 24, .62) 48%, transparent); pointer-events: none; }
.dots { position: absolute; top: 10px; left: 14px; right: 14px; display: flex; gap: 4px; z-index: 3; pointer-events: none; }
.dots span { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 241, 234, .38); }
.dots span.on { background: var(--on-photo); }
.nameplate { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 2; color: var(--on-photo); }
.nm { font-family: var(--display); font-weight: 800; font-size: clamp(24px, 7.4vw, 32px); line-height: 1.05; letter-spacing: -.04em; text-shadow: 0 2px 14px rgba(0, 0, 0, .55); overflow-wrap: anywhere; }
.stamp { position: absolute; top: 64px; z-index: 4; padding: 4px 14px; border: 4px solid; border-radius: 10px; background: rgba(25, 19, 24, .6); font-family: var(--display); font-weight: 900; font-size: 28px; letter-spacing: .01em; pointer-events: none; }
.stamp-like { left: 16px; color: var(--glod); border-color: var(--glod); transform: rotate(-12deg) scale(calc(.8 + var(--like) * .25)); opacity: var(--like); }
.stamp-nope { right: 16px; color: var(--ice); border-color: var(--ice); transform: rotate(12deg) scale(calc(.8 + var(--nope) * .25)); opacity: var(--nope); }
.flag { position: absolute; top: 22px; right: 12px; z-index: 4; width: 42px; height: 42px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(25, 19, 24, .68); color: var(--on-photo); }
.kjemi { position: absolute; top: 22px; left: 12px; z-index: 4; width: 58px; height: 58px; border-radius: 50%; background: rgba(25, 19, 24, .72); color: var(--on-photo); display: grid; place-items: center; }
.kjemi svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.kjemi .kj-bg { stroke: rgba(255, 241, 234, .22); }
.kjemi .kj-arc { stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--pct, 0)); transition: stroke-dashoffset 1.1s var(--ease) .15s; }
.kjemi .kj-num { position: relative; font-family: var(--display); font-weight: 800; font-size: 14px; line-height: 1; text-align: center; }
.kjemi .kj-num small { display: block; font-family: var(--body); font-weight: 800; font-size: 9px; color: var(--blush); margin-top: 1px; }
.kjemi.start .kj-arc { stroke-dashoffset: 100; }

.info { padding: 16px 18px 22px; display: flex; flex-direction: column; gap: 14px; }
.bio { margin: 0; color: var(--soft); white-space: pre-wrap; overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-block; padding: 5px 12px; border-radius: 999px; border: 2px solid var(--text); background: var(--bg); color: var(--text); font-size: 14px; font-weight: 700; }
.chip:nth-child(odd) { transform: rotate(-1.6deg); }
.chip:nth-child(even) { transform: rotate(1.2deg); }
.chip.tag { border-color: var(--soft); color: var(--soft); }
.chip.hot { border-color: var(--glod); color: var(--glod); }
.chip.warn { background: var(--hazard); border-color: var(--ink); color: var(--ink); font-weight: 900; transform: rotate(-2deg); display: inline-flex; align-items: center; gap: 6px; }
.prompt { position: relative; background: var(--paper); color: var(--ink); border-radius: 6px; padding: 16px 16px 13px; box-shadow: 0 6px 14px rgba(0, 0, 0, .35); }
.prompt:nth-of-type(odd) { transform: rotate(-.7deg); }
.prompt:nth-of-type(even) { transform: rotate(.6deg); }
.prompt::before { content: ''; position: absolute; top: -9px; left: 50%; width: 68px; height: 18px; transform: translateX(-50%) rotate(2deg); background: rgba(240, 138, 98, .8); }
.prompt .q { font-size: 13px; font-weight: 800; color: #7a2a45; }
.prompt .a { font-family: var(--display); font-weight: 600; font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }

.actions { position: sticky; bottom: 0; display: flex; justify-content: center; align-items: center; gap: 26px; padding: 10px 0 8px; pointer-events: none; }
.actions .round { pointer-events: auto; box-shadow: 0 10px 26px var(--shadow); }
.round { width: 64px; height: 64px; border: 0; border-radius: 50%; display: grid; place-items: center; transition: transform .16s var(--spring), filter .15s; }
.round:active { transform: scale(.88); }
.round:disabled { opacity: .5; }
.round.pass { background: var(--surface); color: var(--ice-text); outline: 2px solid #46587a; outline-offset: -2px; }
.round.like { width: 78px; height: 78px; background: var(--heat); color: var(--ink); box-shadow: 0 6px 16px rgba(236, 90, 120, .28); }
.empty { text-align: center; color: var(--dim); padding: 36px 20px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.empty .cat { width: 150px; height: auto; --cat: #5a2340; --cat-ear: #7a3a58; --ink: #191318; }
.empty p { margin: 0; font-weight: 600; max-width: 28ch; }

/* ---------- sheets, modals, match ---------- */
.overlay { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; background: var(--scrim); animation: fade .2s ease-out; }
.modal { position: relative; width: 100%; max-width: 480px; max-height: 92dvh; overflow-y: auto; background: var(--surface); border-radius: var(--r-l) var(--r-l) 0 0; padding: 26px 20px calc(22px + var(--safe-b)); text-align: center; animation: sheet .42s var(--spring); }
.modal::before { content: ''; position: absolute; top: 8px; left: 50%; width: 44px; height: 4px; margin-left: -22px; border-radius: 2px; background: var(--line); }
.modal.left { text-align: left; display: flex; flex-direction: column; gap: 12px; }
.modal h2 { font-weight: 800; font-size: 22px; }
.modal p { margin: 0; }
.modal .row { margin-top: 6px; }

.overlay.matchov { align-items: center; background: radial-gradient(circle at 50% 36%, color-mix(in srgb, var(--rouge) 26%, var(--bg)) 0%, var(--bg) 68%); animation: fade .4s ease-out; }
.modal.matchwrap { background: transparent; border-radius: 0; max-width: 420px; padding: 24px; color: var(--text); animation: none; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.modal.matchwrap::before { display: none; }
.matchwrap .cat { width: 96px; height: auto; --cat: var(--surface2); --cat-ear: var(--rouge); --ink: var(--rouge); animation: rise .7s var(--spring) .05s backwards; }
.mphotos { position: relative; display: flex; justify-content: center; align-items: center; margin: 6px 0 4px; }
.mph { width: 132px; height: 132px; border-radius: 50%; object-fit: cover; border: 5px solid var(--bg); background: var(--surface2); }
.mph.me { margin-right: -22px; animation: slide-l .8s var(--spring) .3s backwards; }
.mph.them { animation: slide-r .8s var(--spring) .3s backwards; }
.mheart { position: absolute; z-index: 2; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); color: var(--rouge); animation: thump 2.4s ease-in-out 1s infinite, pop .5s var(--spring) .9s backwards; }
.mtitle { font-family: var(--display); font-weight: 900; font-size: clamp(28px, 9vw, 40px); line-height: 1.05; letter-spacing: -.05em; color: var(--text); animation: rise .6s var(--spring) .6s backwards; }
.matchwrap p { color: var(--soft); font-weight: 700; font-size: 17px; animation: rise .6s var(--spring) .75s backwards; }
.matchwrap .row { width: 100%; animation: rise .6s var(--spring) .9s backwards; }
.matchwrap .btn { background: var(--ink); color: var(--paper); box-shadow: 0 4px 0 #3a0a1d; }
.matchwrap .btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }

.range { position: relative; height: 36px; --lo: 0; --hi: 100; }
.range-track, .range-fill { position: absolute; top: 50%; height: 6px; margin-top: -3px; border-radius: 3px; }
.range-track { left: 0; right: 0; background: var(--surface2); }
.range-fill { left: calc(var(--lo) * 1%); right: calc((100 - var(--hi)) * 1%); background: var(--heat); }
.range input[type=range] { position: absolute; left: 0; top: 0; width: 100%; height: 36px; min-height: 0; margin: 0; padding: 0; border: 0; background: none; pointer-events: none; appearance: none; -webkit-appearance: none; }
.range input[type=range]::-webkit-slider-runnable-track { background: transparent; height: 36px; }
.range input[type=range]::-moz-range-track { background: transparent; height: 36px; }
.range input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 28px; height: 28px; margin-top: 4px; border-radius: 50%; background: var(--paper); border: 5px solid var(--rouge); box-shadow: 0 2px 8px rgba(0, 0, 0, .5); cursor: grab; }
.range input[type=range]::-moz-range-thumb { pointer-events: auto; width: 20px; height: 20px; border-radius: 50%; background: var(--paper); border: 5px solid var(--rouge); box-shadow: 0 2px 8px rgba(0, 0, 0, .5); cursor: grab; }
.range input[type=range]:focus-visible { outline: none; }
.range input[type=range]:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--soft); outline-offset: 2px; }
.rangehead { display: flex; justify-content: space-between; align-items: baseline; font-weight: 800; }
.rangeval { font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--text); }

/* ---------- lists ---------- */
.list { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 14px 2px; background: none; border: 0; border-bottom: 1px solid var(--line); color: inherit; }
.ava { flex: none; width: 62px; height: 62px; padding: 3px; border-radius: 50%; background: var(--line); }
.ava.fresh { background: conic-gradient(from 20deg, #ec5a78, #f08a62, #ffb8cc, #ec5a78); }
.ava img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid var(--bg); display: block; background: var(--surface2); }
.item .mid { flex: 1; min-width: 0; }
.item .t { font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: -.03em; }
.item .s { color: var(--dim); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .nbadge { margin-left: auto; }
.sticker { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--hazard); color: var(--ink); font-weight: 900; font-size: 12px; transform: rotate(-3deg); }
.listhead { padding: 4px 2px 8px; }
.listhead h2 { font-weight: 800; font-size: 26px; }
.listhead .count { font-family: var(--display); font-weight: 900; font-size: 44px; letter-spacing: -.06em; color: var(--rouge); line-height: 1; }

/* ---------- chat ---------- */
.chat { display: flex; flex-direction: column; height: 100%; }
.chathead { display: flex; align-items: center; flex-wrap: nowrap; gap: 2px; padding: 4px 0 10px; }
.chathead .nm { flex: 1; font-size: 20px; text-shadow: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chathead .link { padding: 8px 4px; font-size: 12.5px; white-space: nowrap; }
.chathead .back { display: inline-flex; padding: 8px 4px; color: var(--text); }
.msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 8px 0; }
.msg { align-self: flex-start; max-width: 82%; padding: 10px 15px; border-radius: 20px 20px 20px 6px; background: var(--surface2); border: 1.5px solid var(--line); color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; transform-origin: 0 100%; animation: pop .3s var(--spring) backwards; }
.msg.mine { align-self: flex-end; border-radius: 20px 20px 6px 20px; border: 0; background: var(--heat); color: var(--ink); font-weight: 600; transform-origin: 100% 100%; }
.msg .who { font-size: 12px; font-weight: 800; color: var(--soft); }
.seen { align-self: flex-end; display: flex; align-items: center; gap: 4px; margin-top: -3px; font-size: 12px; font-weight: 700; color: var(--dim); }
.bottom { padding-top: 6px; }
.compose { display: flex; gap: 8px; align-items: center; padding-top: 8px; }
.compose input { flex: 1; min-height: 50px; border-radius: 999px; padding: 0 18px; }
.compose .btn { width: 50px; min-height: 50px; padding: 0; flex: none; }
.compose .btn.sparking { animation: sparkpress .4s var(--spring); }
.compose .tools { flex: none; }
.warnbar { display: flex; align-items: center; gap: 8px; margin: 2px 0 4px; padding: 8px 12px; border-radius: 12px; background: var(--hazard); color: var(--ink); font-weight: 900; font-size: 14px; text-align: left; }
.openers { display: flex; flex-direction: column; gap: 8px; max-height: 38dvh; overflow-y: auto; padding: 2px; }
.openers.small { max-height: 18dvh; }
.opener { text-align: left; padding: 10px 14px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); color: var(--text); font-size: 14px; font-weight: 600; transition: border-color .15s, background .15s, transform .15s var(--spring); }
.opener:active { transform: scale(.98); }
.opener.sel { border-color: var(--glod); background: var(--surface2); box-shadow: 0 0 0 3px rgba(240, 138, 98, .25); }
.picker { display: flex; flex-direction: column; gap: 8px; }
.preview { padding: 10px 14px; border-radius: 16px; border: 2px dashed var(--glod); background: var(--surface); font-size: 14px; font-weight: 600; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Gutta ---------- */
.subtabs { display: flex; gap: 8px; margin-bottom: 10px; }
.subtabs .sub { flex: 1; min-height: 44px; border-radius: 999px; border: 2px solid var(--line); background: transparent; color: var(--dim); font-weight: 800; }
.subtabs .sub.on { background: var(--ice); border-color: var(--ice); color: var(--ink); }
.gchat { height: calc(100dvh - 264px - var(--safe-t) - var(--safe-b)); min-height: 240px; }
.guyhead { display: flex; align-items: center; gap: 8px; color: var(--ice-text); font-weight: 800; font-size: 13px; padding-bottom: 6px; }
.guycard { background: var(--surface); border-radius: var(--r-m); box-shadow: inset 5px 0 0 var(--ice); padding: 14px 16px 14px 20px; margin-bottom: 12px; text-align: left; }
.gc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gc-name { font-family: var(--display); font-weight: 800; font-size: 18px; letter-spacing: -.04em; }
.gc-meta { color: var(--dim); font-size: 13px; font-weight: 600; }
.rev { padding: 10px 0; border-top: 1px solid var(--line); text-align: left; }
.guycard .rev:first-of-type { margin-top: 10px; }
.revhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.revhead .t { font-weight: 800; }
.revnote { margin-top: 2px; overflow-wrap: anywhere; }
.sechead { font-family: var(--display); font-weight: 800; font-size: 16px; letter-spacing: -.03em; margin: 18px 0 8px; text-align: left; }
.lines { display: flex; flex-direction: column; gap: 8px; max-height: 40dvh; overflow-y: auto; }
.themes { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin: 0 -2px; }
.theme { flex: none; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--line); background: transparent; color: var(--text); font-weight: 800; font-size: 14px; white-space: nowrap; }
.theme.on { background: var(--ice); border-color: var(--ice); color: var(--ink); }
.hotbtn { background: var(--heat); }

/* flames: rating display + input */
.flames { display: inline-flex; gap: 2px; vertical-align: middle; }
.flame-cell { position: relative; display: inline-grid; }
.flame-cell .ico { grid-area: 1 / 1; }
.flame-bg { color: #5a2340; }
.flame-fg { color: var(--glod); clip-path: inset(0 calc((1 - var(--fill, 0)) * 100%) 0 0); }
.flames.ignite .flame-fg { animation: ignite .55s var(--spring) backwards; animation-delay: calc(var(--i, 0) * 80ms); }
.stars { display: flex; justify-content: center; gap: 4px; }
.star { border: 0; background: none; padding: 6px; color: #5a2340; transition: transform .18s var(--spring), color .15s; }
.star.on { color: var(--glod); animation: ignite .5s var(--spring) backwards; animation-delay: calc(var(--i, 0) * 70ms); }
.star.on .ico { filter: drop-shadow(0 0 3px rgba(240, 138, 98, .5)); }
.star:active { transform: scale(.85); }

/* ---------- profile ---------- */
.phead { display: flex; align-items: center; gap: 14px; padding: 6px 0 14px; }
.pav { flex: none; width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 3px solid var(--rouge); background: var(--surface2); }
.phead h2 { font-weight: 800; font-size: 24px; }
.phead .fine { text-align: left; margin: 2px 0 0; }
.varme { background: var(--surface); border-radius: var(--r-m); padding: 14px 16px; margin-bottom: 8px; text-align: left; }
.varme-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; font-weight: 800; }
.varme-deg { font-family: var(--display); font-weight: 900; font-size: 28px; letter-spacing: -.05em; color: var(--glod); }
.vbar { height: 14px; border-radius: 7px; background: var(--surface2); overflow: hidden; }
.vfill { height: 100%; width: calc(var(--p, 0) * 1%); border-radius: 7px; background: var(--heat); transition: width 1s var(--ease) .1s; }
.varme ul { margin: 10px 0 0; padding-left: 18px; color: var(--dim); font-size: 14px; display: flex; flex-direction: column; gap: 2px; }
details.sec { border-top: 1px solid var(--line); }
details.sec > summary { display: flex; align-items: center; justify-content: space-between; min-height: 56px; list-style: none; cursor: pointer; font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: -.03em; }
details.sec > summary::-webkit-details-marker { display: none; }
details.sec > summary .ico { color: var(--soft); transition: transform .25s var(--ease); }
details.sec[open] > summary .ico { transform: rotate(180deg); }
.sec-body { display: flex; flex-direction: column; gap: 12px; padding: 2px 0 18px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 6px 2px; }
.pslot { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 6px 10px; background: var(--paper); border-radius: 5px; box-shadow: 0 6px 14px rgba(0, 0, 0, .35); }
.pslot:nth-child(1) { transform: rotate(-2deg); }
.pslot:nth-child(2) { transform: rotate(1.5deg); }
.pslot:nth-child(3) { transform: rotate(-1deg); }
.pslot img, .pslot .ph { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 3px; background: #ead6dd; }
.pslot .ph { display: flex; align-items: center; justify-content: center; text-align: center; color: #7a2a45; font-size: 12px; font-weight: 800; }
.pslot .btn.ghost { color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.pslot .link { color: #7a0c27; padding: 2px; font-size: 13px; }
.acct { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }

/* ---------- toast ---------- */
#toast { position: fixed; left: 50%; bottom: calc(86px + var(--safe-b)); z-index: 90; max-width: 90%; padding: 11px 18px; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 800; font-size: 14px; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); opacity: 0; transform: translate(-50%, 18px); transition: transform .38s var(--spring), opacity .2s; pointer-events: none; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- join + documents ---------- */
body.joinpage { height: auto; min-height: 100%; }
.joincard { max-width: 380px; margin: 0 auto; padding: calc(22px + var(--safe-t)) 22px 30px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.joincard .cat { width: 110px; height: auto; }
.joincard h1 { font-weight: 900; font-size: clamp(28px, 9vw, 38px); letter-spacing: -.06em; }
.joincard .sub { margin: 0; color: var(--soft); font-weight: 600; }
.qrframe { position: relative; width: 100%; padding: 14px; }
.cn { position: absolute; width: 34px; height: 34px; border: 5px solid var(--rouge); }
.cn.tl { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: 14px 0 0 0; }
.cn.tr { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 14px 0 0; }
.cn.bl { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 14px; }
.cn.br { bottom: 0; right: 0; border-left: 0; border-top: 0; border-radius: 0 0 14px 0; }
.qrbox { background: #fff; border-radius: 12px; padding: 12px; min-height: 120px; display: flex; align-items: center; justify-content: center; color: var(--ink); font-weight: 700; }
.qrbox svg { width: 100%; height: auto; display: block; max-width: 340px; }
.joinaddr { margin: 2px 0 0; font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -.04em; overflow-wrap: anywhere; }
.joinbtns { width: 100%; display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
body.doc { height: auto; min-height: 100%; }
.docbox { max-width: 620px; margin: 0 auto; padding: calc(24px + var(--safe-t)) 22px 40px; }
.docbox h1 { font-weight: 900; font-size: 34px; letter-spacing: -.06em; margin-bottom: 14px; color: var(--rouge); }
.docbox h2 { font-weight: 800; font-size: 18px; margin: 24px 0 6px; }
.docbox p { max-width: 60ch; }

/* ---------- effects layer ---------- */
.fx-layer { position: fixed; inset: 0; z-index: 95; pointer-events: none; overflow: hidden; }
.fx-p { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -12px 0 0 -12px; animation: fx-fly var(--dur, 900ms) var(--ease) var(--delay, 0ms) forwards; will-change: transform, opacity; }
.fx-heart { color: #ec5a78; }
.fx-lips { color: var(--blush); }
.fx-flame { color: #f08a62; }
.fx-puff { color: var(--ice); }
.fx-natt { color: var(--ink); }

/* ---------- the wink ---------- */
.cat { display: block; overflow: visible; }
.cat .cat-sleep-arc { display: none; }
.cat-sleepy .cat-eye, .cat-sleepy .cat-eye-shine { display: none; }
.cat-sleepy .cat-sleep-arc { display: inline; }
.cat-wink .cat-wink-arc { stroke-dasharray: 26; stroke-dashoffset: 26; animation: wink-draw .35s var(--ease) 1.1s forwards; }
.cat-wink .cat-eye-shine { animation: glint 1.2s ease-in-out .9s 1; }

/* ---------- motion ---------- */
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheet { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes rise { from { transform: translateY(22px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes beat { 0%, 100% { transform: scale(1); } 14% { transform: scale(1.22); } 28% { transform: scale(1); } 42% { transform: scale(1.14); } 56% { transform: scale(1); } }
@keyframes thump { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.25); } 30% { transform: scale(1); } 45% { transform: scale(1.18); } 60% { transform: scale(1); } }
@keyframes slide-l { from { transform: translateX(-70vw) rotate(-20deg); } to { transform: none; } }
@keyframes slide-r { from { transform: translateX(70vw) rotate(20deg); } to { transform: none; } }
@keyframes ignite { from { transform: scale(.2) rotate(-25deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes wink-draw { to { stroke-dashoffset: 0; } }
@keyframes glint { 0%, 100% { opacity: 1; } 50% { opacity: .1; } }
@keyframes sparkpress { 0% { transform: scale(1); } 40% { transform: scale(1.25) rotate(-10deg); } 100% { transform: scale(1); } }
@keyframes fx-fly {
  0% { transform: translate(var(--x), var(--y)) scale(.3) rotate(0); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translate(calc(var(--x) + var(--dx)), calc(var(--y) + var(--dy))) scale(var(--s, 1)) rotate(var(--rot, 0deg)); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .fx-layer { display: none; }
  .cat-wink .cat-wink-arc { stroke-dashoffset: 0; }
}

/* Rolig (calm): muted tones, flat colours, nothing moves. Chosen in the menu, or automatically for people whose OS asks for reduced motion / more contrast. */
:root[data-theme="calm"] {
  color-scheme: dark;
  --bg: #1e1d20; --surface: #27252a; --surface2: #302e34; --line: #4a4650; --field-line: #8a8490;
  --text: #e8e4e5; --soft: #c9bec3; --dim: #a79da2; --ice-text: #a7c4d8; --err: #e6a4ad; --placeholder: #9d939a;
  --rouge: #d98a9a; --glod: #cf9b7c;
  --shadow: rgba(0, 0, 0, .25);
  --bar: rgba(30, 29, 32, .94); --scrim: rgba(12, 11, 13, .7); --badge-bg: #d98a9a; --badge-ink: #1e1d20;
  --ink: #1e1d20; --heat: #d98a9a; --heat-text: #d98a9a; --on-photo: #eeeaea; --blush: #d9c9ce; --ice: #a7c4d8; --hazard: #d9c58c;
}
:root[data-theme="calm"] *, :root[data-theme="calm"] *::before, :root[data-theme="calm"] *::after {
  animation: none !important; transition: none !important; scroll-behavior: auto !important; text-shadow: none !important;
}
:root[data-theme="calm"] .fx-layer, :root[data-theme="calm"] .egg-layer { display: none !important; }
:root[data-theme="calm"] .swipecard::before, :root[data-theme="calm"] .swipecard::after { box-shadow: inset 0 0 0 3px currentColor; }
:root[data-theme="calm"] .overlay.matchov { background: var(--bg); }

@media print {
  body, body.joinpage { background: #fff; color: #000; }
  .noprint { display: none !important; }
  .joincard h1, .joinaddr, .joincard .sub { color: #000; background: none; -webkit-text-fill-color: #000; }
}

/* ---------- theme controls ---------- */
.topbtns { display: flex; align-items: center; gap: 6px; flex: none; }
.themebtn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; box-shadow: inset 0 0 0 2px var(--line); color: var(--text); }
.seg { display: flex; gap: 6px; padding: 4px; border-radius: 999px; background: var(--surface2); }
.seg button { flex: 1; min-height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--dim); font-weight: 800; }
.seg button[aria-pressed="true"] { background: var(--heat); color: var(--ink); }

/* privacy page: three languages in one document, the active one is shown */
.doc-lang { display: none; }
html[lang="nb"] .doc-lang[lang="nb"], html[lang="en"] .doc-lang[lang="en"], html[lang="nn"] .doc-lang[lang="nn"] { display: block; }
.langbtn { font-family: var(--body); font-weight: 900; font-size: 12px; letter-spacing: .02em; }
.auth .authtop { position: fixed; top: calc(10px + var(--safe-t)); right: 12px; z-index: 5; }
.topbtns.joinctl { align-self: flex-end; }

/* short phones: keep the compliment picker's preview and Send button on screen */
@media (max-height: 700px) {
  .picker > .fine { display: none; }
  .openers.small { max-height: 15dvh; }
  .picker { gap: 6px; }
  .picker .preview { padding: 8px 12px; }
}

/* review round: polish */
.link.danger { color: var(--err); }
.openers, .lines { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent); padding-bottom: 14px; }
.themes { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 22px), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 22px), transparent 100%); padding: 0 18px 6px; }
.modal .row .hotbtn { flex: 2; }
.rangeval { font-family: var(--body); font-weight: 800; font-size: 15px; letter-spacing: 0; }
.langbtn { width: auto; min-width: 40px; padding: 0 10px; }
.listhead { display: flex; align-items: baseline; gap: 12px; padding: 4px 2px 12px; }
.listhead .count { font-size: 34px; }
.listhead h2 { font-size: 22px; }
.chat-empty { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: var(--dim); font-weight: 600; padding: 18px; }
.chat-empty .cat { width: 110px; height: auto; --cat: var(--line); --cat-ear: var(--surface2); --ink: var(--bg); }
.chat-empty p { margin: 0; max-width: 26ch; }

/* review round: accessibility + robustness */
.check input:focus-visible { outline: 3px solid var(--soft); outline-offset: 2px; box-shadow: none; }
.range.lo-top input[type=range]:first-of-type { z-index: 2; }
.pslot .btn.small { padding: 0 8px; min-width: 0; font-size: 12px; }
.gnav { position: absolute; top: 50%; z-index: 4; width: 38px; height: 38px; margin-top: -19px; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(25, 19, 24, .6); color: var(--on-photo); opacity: 0; }
.gnav:focus-visible { opacity: 1; }
.gnav.prev { left: 8px; }
.gnav.next { right: 8px; transform: scaleX(-1); }
:root[data-theme="light"] select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a2a4c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E"); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a2a4c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E"); }
}

/* static fallback shown before the app loads, and to crawlers / visitors without JavaScript */
.about { margin: auto; max-width: 420px; padding: 32px 24px; text-align: center; }
.about h1 { font-weight: 900; font-size: 40px; letter-spacing: -.06em; color: var(--rouge); margin-bottom: 14px; }
.about p { color: var(--soft); margin: 0 0 12px; }

/* ---------- profile settings + notification bell ---------- */
.brandbtn { display: inline-flex; padding: 0; border: 0; background: none; border-radius: 12px; cursor: pointer; }
.brandbtn .cat { width: 38px; height: auto; --cat: var(--rouge); }
.setblock { padding: 4px 0 8px; }
.setblock > h2 { font-weight: 800; font-size: 22px; padding: 6px 0 2px; }
.setsec { display: flex; flex-direction: column; gap: 10px; padding: 16px 0; border-top: 1px solid var(--line); }
.setsec h3 { font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: -.03em; }
.setsec .btn { width: 100%; }
.moodchips { display: flex; flex-wrap: wrap; gap: 6px; }
.moodchip { min-height: 38px; padding: 0 12px; border-radius: 999px; border: 2px solid var(--line); background: transparent; color: var(--text); font-weight: 700; font-size: 14px; cursor: pointer; }
.moodchip[aria-pressed="true"] { background: var(--heat); border-color: transparent; color: var(--ink); font-weight: 900; }
.setsec .seg button { flex: 1 1 auto; padding: 0 8px; white-space: nowrap; font-size: 14px; }
.notifrow { display: flex; flex-direction: column; gap: 6px; }
.notifrow > span { font-weight: 700; font-size: 15px; }
.pushbox h4 { font-weight: 800; font-size: 15px; margin: 6px 0 0; }
.bellbtn { position: relative; cursor: pointer; }
.bellbtn .nbadge { position: absolute; top: -3px; right: -3px; }
.notifs { display: flex; flex-direction: column; gap: 6px; max-height: 52dvh; overflow-y: auto; }
.notif { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border-radius: var(--r-m); border: 2px solid var(--line); background: var(--surface); color: var(--text); text-align: left; cursor: pointer; }
.notif.unread { border-color: var(--glod); background: var(--surface2); }
.nicon { flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface2); color: var(--glod); }
.ntext { flex: 1; min-width: 0; font-weight: 700; font-size: 14.5px; overflow-wrap: anywhere; }
.ntime { flex: none; font-size: 12.5px; font-weight: 800; color: var(--dim); }

/* ---------- Dagens fangst ---------- */
.deck > .seg { margin: 2px 0 10px; }

/* ---------- Flørtestreak + chat temperature ---------- */
.streak { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 2px 9px 2px 7px; border-radius: 999px; border: 2px solid var(--glod); color: var(--glod); font-family: var(--body); font-weight: 900; font-size: 12.5px; letter-spacing: 0; vertical-align: middle; white-space: nowrap; }
.streak .ico { flex: none; }
.streakslot.bump .streak { animation: ignite .6s var(--spring); }
.tempbar { display: flex; align-items: center; gap: 10px; padding: 0 2px 10px; }
.temptrack { flex: 1; height: 6px; border-radius: 3px; background: var(--surface2); overflow: hidden; }
.tempfill { --p: 0; height: 100%; width: calc(var(--p) * 1%); min-width: 6px; border-radius: 3px; background: var(--ice); transition: width .8s var(--ease), background-color .6s; }
.tempbar.mild .tempfill { background: var(--hazard); }
.tempbar.warm .tempfill { background: var(--glod); }
.tempbar.hot .tempfill { background: var(--heat); }
.templabel { flex: none; min-width: 52px; text-align: right; font-size: 12.5px; font-weight: 800; color: var(--dim); }
.tempbar.hot .templabel { color: var(--rouge); }

.eggline { font-weight: 800; color: var(--ink); text-align: center; }
.catchnote { margin: 0 2px 4px; font-weight: 700; }
.setsec .seg button { flex: 1 1 auto; padding: 0 8px; white-space: nowrap; font-size: 14px; }

/* ---------- stage 2: erte, mood, badge, games, reactions ---------- */
.round.erte { width: 52px; height: 52px; background: var(--surface); color: var(--glod); outline: 2px solid var(--glod); outline-offset: -2px; }
.actions { gap: 18px; }
.chip.mood { border-color: var(--soft); color: var(--soft); }
.chip.flirty { background: var(--heat); border-color: transparent; color: var(--ink); font-weight: 900; }
.teasebubble { position: relative; margin: 4px 0 2px; padding: 12px 14px; border-radius: 18px 18px 18px 4px; border: 2px solid var(--glod); background: var(--surface2); }
.teasebubble p { margin: 4px 0 0; font-weight: 700; color: var(--text); }
.teasetag { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 900; color: var(--glod); }
.teaseline { margin: 0; padding: 0 2px 6px; font-style: italic; }

.moodbox { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.moodbox h3 { font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: -.03em; }
.moodbox .fine { margin: 2px 0 8px; }
.moodchips { display: flex; flex-wrap: wrap; gap: 6px; }
.moodchip { min-height: 38px; padding: 0 12px; border-radius: 999px; border: 2px solid var(--line); background: transparent; color: var(--text); font-weight: 700; font-size: 14px; cursor: pointer; }
.moodchip[aria-pressed="true"] { background: var(--heat); border-color: transparent; color: var(--ink); font-weight: 900; }

.quickrow { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0 8px; }
.quickrow::-webkit-scrollbar { display: none; }
.chipbtn { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); color: var(--text); font-weight: 800; font-size: 14px; cursor: pointer; }
.chipbtn .ico { color: var(--glod); }
.chipbtn.hotchip { background: var(--heat); border-color: transparent; color: var(--ink); }
.chipbtn:disabled { opacity: .5; }
.datelist { display: flex; flex-direction: column; gap: 10px; max-height: 52dvh; overflow-y: auto; }
.datelist h3 { font-family: var(--display); font-weight: 700; font-size: 15px; margin: 4px 0; }

.msg { position: relative; -webkit-touch-callout: none; user-select: none; }
.msg.card { max-width: 88%; padding: 12px 16px; border: 2px dashed var(--glod); background: var(--surface); color: var(--text); font-weight: 700; }
.msg.card.mine { background: var(--surface); color: var(--text); border: 2px dashed var(--glod); font-weight: 700; }
.cardlabel { font-family: var(--display); font-weight: 800; font-size: 13px; letter-spacing: -.02em; color: var(--glod); margin-bottom: 4px; }
.msg:has(.rx) { margin-bottom: 12px; }
.rx { position: absolute; right: 10px; bottom: -13px; display: inline-flex; gap: 2px; padding: 1px 6px; border-radius: 999px; background: var(--surface); border: 2px solid var(--line); font-size: 14px; line-height: 20px; box-shadow: 0 2px 8px var(--shadow); }
.rx .mine { filter: drop-shadow(0 0 3px var(--glod)); }
.rxtray { position: fixed; z-index: 45; left: var(--x, 8px); top: var(--y, 8px); display: flex; gap: 2px; padding: 5px; border-radius: 999px; background: var(--surface); border: 2px solid var(--line); box-shadow: 0 10px 30px var(--shadow); animation: pop .2s var(--spring); }
.rxtray button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; font-size: 22px; line-height: 1; cursor: pointer; display: inline-grid; place-items: center; color: var(--text); }
.rxtray button.on { background: var(--surface2); box-shadow: inset 0 0 0 2px var(--glod); }
.rxtray button.rxoff { font-size: 0; color: var(--dim); }

.chip.persona { border-color: var(--heat); color: var(--text); background: transparent; cursor: pointer; font: inherit; }
.typecard { text-align: center; }
.typecard .typeemoji { font-size: 52px; line-height: 1; margin-bottom: 8px; }
.typecard p { max-width: 36ch; margin: 8px auto 0; }
.wordbtn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 12px 14px; border-radius: 14px; border: 2px dashed var(--line); background: transparent; color: var(--text); font: inherit; font-weight: 800; font-size: 20px; cursor: pointer; text-align: left; }
.wordbtn .wordhint { font-size: 13px; font-weight: 600; color: var(--soft); }
.funblock { display: grid; gap: 14px; margin: 14px 0; }
.coinchip { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 2px solid var(--line); background: transparent; color: var(--text); font: inherit; font-weight: 800; font-size: 15px; cursor: pointer; }
.topbtns { display: flex; align-items: center; gap: 8px; }
.walletbal { font-weight: 900; font-size: 22px; margin: 4px 0; }
.wallet h4 { margin: 16px 0 6px; font-size: 15px; }
.quests { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.quests li { display: flex; justify-content: space-between; padding: 8px 12px; border: 2px solid var(--line); border-radius: 12px; }
.quests li.done { opacity: .6; text-decoration: line-through; }
.shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.shopitem { display: grid; gap: 2px; justify-items: center; padding: 10px 8px; border-radius: 14px; border: 2px solid var(--line); background: transparent; color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.shopitem:disabled { opacity: .5; cursor: not-allowed; }
.shopitem .ie { font-size: 28px; line-height: 1; }
.shopitem .pr { font-size: 13px; color: var(--soft); }
.evbtns { flex-wrap: wrap; }
.msg.card.gift { text-align: center; font-size: 18px; }
.lb { margin: 4px 0 10px; padding: 12px; border: 2px solid var(--line); border-radius: 16px; }
.lb summary { cursor: pointer; font-weight: 900; font-size: 16px; list-style: none; display: flex; justify-content: space-between; min-height: 24px; }
.lb summary::-webkit-details-marker { display: none; }
.lb .lbrank { color: var(--soft); }
.lb[open] { max-height: 55vh; overflow: auto; }
.lb ol { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.lb li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; }
.lb li.me { background: color-mix(in srgb, var(--heat) 18%, transparent); }
.lb .rk { width: 22px; font-weight: 900; }
.lb .lbname { flex: 1; font-weight: 800; }
.lb .ea { font-size: 13px; color: var(--soft); }
.lb .sendbtn { min-height: 32px; padding: 0 10px; border-radius: 999px; border: 2px solid var(--line); background: transparent; color: var(--text); font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }

.rows { display: grid; gap: 8px; margin: 12px 0; }
.rowlink { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 56px; padding: 10px 14px; border-radius: 16px; border: 2px solid var(--line); background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.rowlink .rl { display: grid; gap: 2px; }
.rowlink .rt { font-family: var(--display); font-weight: 800; font-size: 16px; letter-spacing: -.02em; }
.rowlink .rs { font-size: 13px; color: var(--soft); font-weight: 600; }
.rowlink .ico { color: var(--soft); transform: rotate(-90deg); flex: none; }
.rowlink.coincard { border-color: var(--heat); }
.subhead { display: flex; align-items: center; gap: 6px; padding: 2px 0 10px; }
.subhead h2 { font-size: 22px; }
.subbody { display: grid; gap: 12px; }
.dictsearch { width: 100%; min-height: 46px; border-radius: 14px; border: 2px solid var(--line); background: transparent; color: var(--text); padding: 0 14px; font: inherit; }
.dictlist { display: grid; gap: 8px; }
.dictrow { padding: 10px 14px; border: 2px solid var(--line); border-radius: 14px; }
.dictrow .dw { font-family: var(--display); font-weight: 800; font-size: 17px; }
.dictrow .dm { font-size: 14px; color: var(--soft); margin-top: 2px; }
button.banner { width: 100%; font: inherit; color: inherit; cursor: pointer; text-align: left; }

.typecard h4 { margin: 14px 0 6px; font-size: 14px; color: var(--soft); }
.typelines { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; text-align: left; }
.typelines li { padding: 8px 12px; border: 2px solid var(--line); border-radius: 12px; font-size: 14px; }
.typerow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 8px; }
.typerow .chipbtn { text-align: left; white-space: normal; }

/* narrow phones: nothing may push the page wider than the screen */
@media (max-width: 420px) {
  .chathead { flex-wrap: wrap; }
  .chathead .nm { flex: 1 1 calc(100% - 48px); }
  .chathead .nm + .link { margin-left: 34px; }
}
@media (max-width: 360px) {
  .seg.many { flex-wrap: wrap; border-radius: 22px; }
  .seg.many button { flex: 1 1 calc(50% - 6px); }
  .top { padding-left: 12px; padding-right: 12px; gap: 6px; }
  .wordmark { font-size: 17px; }
  .coinchip { padding: 0 9px; font-size: 14px; }
  .topbtns { gap: 4px; }
}
.brand { flex: 1 1 auto; }
.wordmark { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 340px) {
  .brand .cat, .brandbtn .cat { width: 32px; }
  .brand { gap: 6px; }
  .wordmark { font-size: 16px; }
}
nav.tabs { overflow-x: clip; }   /* the spring-animated tab indicator overshoots the right edge for a moment */
.brandbtn { min-height: 40px; align-items: center; }
.subbody .setblock > h2 { display: none; }   /* the subpage header already says Innstillinger */

/* settings dropdown (logged-out pages) */
.prefsmenu-wrap { position: relative; }
.prefsmenu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 8px; border-radius: 18px; background: var(--surface); border: 2px solid var(--line); box-shadow: 0 12px 32px rgba(0,0,0,.35); z-index: 30; display: grid; gap: 2px; }
.prefsmenu.hidden { display: none; }
.pm-head { padding: 8px 10px 4px; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--soft); }
.pm-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent; color: var(--text); font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.pm-item[aria-checked="true"] { background: color-mix(in srgb, var(--heat) 22%, transparent); }
.pm-item:focus-visible { outline: 2px solid var(--heat); outline-offset: -2px; }
.pmove { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: 4px; }
.pmove .btn.small { min-height: 34px; padding: 0 10px; }
.pslot[draggable="true"] { cursor: grab; }
.swipecard.preview { position: relative; touch-action: auto; }

.ick { padding: 12px 14px; border: 2px solid var(--line); border-radius: 16px; margin-bottom: 8px; }
.ick.mine { border-color: var(--heat); }
.ickhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 800; }
.ickcount { font-size: 12px; font-weight: 800; padding: 2px 9px; border-radius: 999px; background: var(--heat); color: var(--ink); }
.ickchips { gap: 6px; }
.ickchips .chipbtn { text-align: left; white-space: normal; }

/* ---------- animated characters (public/characters.js) ---------- */
.ch { display: block; overflow: visible; }
.ch .person, .ch .car, .ch .tractor, .ch .goat, .ch .duo { transform-box: fill-box; transform-origin: 50% 100%; animation: ch-bob 2.6s ease-in-out infinite; }
.ch .arm-r.arm-wave { transform-box: fill-box; transform-origin: 50% 10%; animation: ch-wave 1.8s ease-in-out infinite; }
.ch .arm-r.arm-tap, .ch .arm-r.arm-thumb, .ch .arm-r.arm-heart { transform-box: fill-box; transform-origin: 50% 10%; animation: ch-nudge 2.4s ease-in-out infinite; }
.ch .wheel { transform-box: fill-box; transform-origin: 50% 50%; animation: ch-spin 1.6s linear infinite; }
.ch .puffs circle { animation: ch-puff 2.6s ease-out infinite; }
.ch .puffs circle:nth-child(2) { animation-delay: .5s; } .ch .puffs circle:nth-child(3) { animation-delay: 1s; }
.ch .lamp { animation: ch-siren 2.4s ease-in-out infinite alternate; }
.ch .door { transform-box: fill-box; transform-origin: 0 50%; animation: ch-door 2.4s ease-in-out infinite; }
.ch .kebab { transform-box: fill-box; transform-origin: 0 50%; animation: ch-nudge 2.4s ease-in-out infinite; }
.ch .chute { transform-box: fill-box; transform-origin: 50% 100%; animation: ch-sway 2.2s ease-in-out infinite; }
.ch .keys { transform-box: fill-box; transform-origin: 50% 0; animation: ch-swing 2.6s ease-in-out infinite; }
.ch .ball { transform-box: fill-box; transform-origin: 50% 50%; animation: ch-spin 3s linear infinite; }
.ch .hatbob { transform-box: fill-box; transform-origin: 50% 100%; animation: ch-nudge 2s ease-in-out infinite; }
.ch .conf circle { animation: ch-puff 2.4s ease-out infinite; }
.ch .say, .ch .heart { transform-box: fill-box; transform-origin: 50% 100%; animation: ch-pop 2.8s ease-in-out infinite; }
.ch .glow, .ch .gem path, .ch .rec { animation: ch-blink 2.8s ease-in-out infinite; }
.ch-goat-hop .goat { animation: ch-hop 2s ease-in-out infinite; }
@keyframes ch-bob { 50% { transform: translateY(-3px); } }
@keyframes ch-hop { 40% { transform: translateY(-9px) rotate(-3deg); } 60% { transform: translateY(-9px) rotate(3deg); } }
@keyframes ch-wave { 50% { transform: rotate(-35deg); } }
@keyframes ch-nudge { 50% { transform: translateY(-3px) rotate(6deg); } }
@keyframes ch-spin { to { transform: rotate(360deg); } }
@keyframes ch-puff { 0% { transform: translate(0, 0) scale(.6); opacity: .8; } 100% { transform: translate(-8px, -14px) scale(1.5); opacity: 0; } }
@keyframes ch-siren { 0% { fill: #e8344f; } 100% { fill: #4aa3df; } }
@keyframes ch-door { 0%, 55%, 100% { transform: scaleX(1); } 70%, 85% { transform: scaleX(.35); } }
@keyframes ch-sway { 50% { transform: rotate(5deg); } }
@keyframes ch-swing { 50% { transform: rotate(18deg); } }
@keyframes ch-pop { 0%, 100% { transform: scale(.85); } 50% { transform: scale(1.08); } }
@keyframes ch-blink { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .ch * { animation: none !important; } }

/* chat guests */
.guestbox:empty { display: none; }
.guestbar { margin: 6px 0; padding: 8px 10px; border: 2px solid var(--heat); border-radius: 16px; background: color-mix(in srgb, var(--heat) 10%, transparent); display: grid; gap: 6px; }
.gbhead { display: flex; align-items: center; gap: 8px; }
.gbname { flex: 1; font-weight: 800; font-size: 14px; }
.gbbtns { display: flex; flex-wrap: wrap; gap: 6px; }
.guestmsg { display: flex; align-items: flex-end; gap: 8px; margin: 8px 0; max-width: 92%; }
.guestmsg .gav { flex: none; }
.guestmsg .gbub { padding: 8px 12px; border-radius: 16px 16px 16px 4px; background: var(--surface2); border: 2px dashed var(--heat); }
.gwho { font-size: 12px; font-weight: 900; color: var(--soft); margin-bottom: 2px; }
.gnote { margin-top: 4px; font-size: 12px; font-weight: 800; color: var(--soft); }
.guestsys { text-align: center; font-size: 13px; font-weight: 700; color: var(--soft); margin: 8px 0; }
.guestsys.removed { text-decoration: none; }
.guestchoice { background: transparent !important; border: 2px solid var(--line); font-size: 13px; }
.typechar, .evchar { display: grid; place-items: center; margin: 0 auto 6px; }

/* ---------- easter eggs (public/eggs.js) ---------- */
.egg-layer { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 60; }
.egg-p { position: absolute; top: -40px; left: var(--x); font-size: 28px; animation: egg-fall var(--d) var(--w) linear forwards; transform: rotate(var(--r)); }
@keyframes egg-fall { to { transform: translateY(110vh) rotate(calc(var(--r) * 6)); } }
.egg-car { position: absolute; bottom: 90px; left: -120px; animation: egg-drive 3.6s linear forwards; }
@keyframes egg-drive { to { transform: translateX(calc(100vw + 240px)); } }
.egg-walker { position: absolute; bottom: calc(80px + var(--lane, 0px)); left: -90px; animation: egg-drive 8s var(--delay, 0s) linear forwards; }
.cathat { position: absolute; top: -9px; right: -6px; font-size: 18px; line-height: 1; pointer-events: none; }
.brandbtn { position: relative; }
.catshake { animation: egg-shake .5s ease-in-out 3; }
@keyframes egg-shake { 25% { transform: rotate(-14deg); } 75% { transform: rotate(14deg); } }
.nightbanner { margin: 6px 0 8px; padding: 10px 14px; border-radius: 14px; border: 2px dashed var(--heat); font-weight: 800; font-size: 14px; }
.chip.warn { position: relative; }
.chip.warn::after { content: ''; position: absolute; inset: -4px; border-radius: 999px; border: 2px solid var(--heat); opacity: 0; animation: egg-radar 2.4s ease-out infinite; pointer-events: none; }
@keyframes egg-radar { 0% { transform: scale(.9); opacity: .8; } 100% { transform: scale(1.35); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .egg-layer, .chip.warn::after { display: none; } .catshake { animation: none; } }

/* themed dropdowns, dialogs, top-bar photo (no native popups) */
.selwrap { width: 100%; }
.selbtn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 52px; padding: 0 14px; border: 2px solid var(--line); border-radius: 16px; background: var(--surface2); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.selbtn .selval { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selbtn .selval.ph { color: var(--dim); }
.selbtn .ico { flex: none; color: var(--soft); }
.selbtn:focus-visible { outline: none; border-color: var(--rouge); box-shadow: 0 0 0 4px rgba(236, 90, 120, .28); }
.selsheet .modal { max-height: 80dvh; display: flex; flex-direction: column; }
.sellist { display: grid; gap: 4px; overflow: auto; margin-top: 8px; }
.selopt { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 48px; padding: 8px 14px; border: 2px solid transparent; border-radius: 14px; background: transparent; color: var(--text); font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.selopt[aria-selected="true"] { background: color-mix(in srgb, var(--heat) 22%, transparent); border-color: var(--heat); }
.selopt:focus-visible { outline: 2px solid var(--heat); outline-offset: -2px; }
.mebtn { flex: none; width: 40px; height: 40px; padding: 0; border: 2px solid var(--line); border-radius: 50%; overflow: hidden; background: var(--surface2); cursor: pointer; }
.mebtn img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pavbtn { flex: none; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input:-webkit-autofill, textarea:-webkit-autofill { -webkit-text-fill-color: var(--text); box-shadow: 0 0 0 40px var(--surface2) inset; caret-color: var(--text); }
::placeholder { color: var(--dim); opacity: 1; }
input[type=checkbox], input[type=radio] { accent-color: var(--heat); }
.swipecard.preview .gnav { opacity: .9; }
.swipecard.preview .gal { cursor: pointer; }
.btn.danger { background: #c0152f; color: #fff; }
@media (max-width: 360px) { .mebtn { width: 36px; height: 36px; } }

/* rising aggression of rival guests: the character shakes faster and glows redder (static under reduced motion) */
.rage-2 .ch .person, .rage-2 .ch .car, .rage-2 .ch .duo { animation-duration: 2.2s; }
.rage-3 .ch .person, .rage-3 .ch .car, .rage-3 .ch .duo { animation-duration: 1.8s; }
.rage-4 .ch .person, .rage-4 .ch .car, .rage-4 .ch .duo { animation-duration: 1.4s; filter: drop-shadow(0 0 3px rgba(232, 52, 79, .45)); }
.rage-5 .ch .person, .rage-5 .ch .car, .rage-5 .ch .duo { animation: ch-rage 1.1s ease-in-out infinite; filter: drop-shadow(0 0 4px rgba(232, 52, 79, .55)); }
.rage-5 .ch .puffs circle, .rage-4 .ch .puffs circle { animation-duration: 1.4s; }
@keyframes ch-rage { 25% { transform: translate(-1.5px, 0) rotate(-1.5deg); } 75% { transform: translate(1.5px, 0) rotate(1.5deg); } }
@media (prefers-reduced-motion: reduce) { .rage-4 .ch, .rage-5 .ch { filter: none; } }
.ch .steam circle { animation: ch-puff 2s ease-out infinite; }
.ch .steam circle:nth-child(2) { animation-delay: .4s; } .ch .steam circle:nth-child(3) { animation-delay: .8s; }
.ch .foot { animation: ch-tap 1.2s ease-in-out infinite; transform-box: fill-box; }
@keyframes ch-tap { 50% { transform: translateY(-3px); } }

/* drawn items (public/characters.js: Characters.item) */
.itm { display: inline-block; vertical-align: -.3em; overflow: visible; }
.itm .swayi { transform-box: fill-box; transform-origin: 50% 100%; animation: ch-sway 3s ease-in-out infinite; }
.itm .floaty { transform-box: fill-box; transform-origin: 50% 100%; animation: ch-bob 2.2s ease-in-out infinite; }
.itemlabel { display: inline-flex; align-items: center; gap: 6px; }
.shopitem .ie { display: grid; place-items: center; height: 40px; }
@media (prefers-reduced-motion: reduce) { .itm * { animation: none !important; } }
/* long suggestion chips (type lines, ick reasons) wrap inside the screen instead of running off it */
.typerow .chipbtn, .ickchips .chipbtn { flex: 0 1 auto; min-width: 0; max-width: 100%; white-space: normal; text-align: left; padding: 8px 14px; border-radius: 16px; line-height: 1.25; height: auto; }
.typerow .fine { flex: 0 0 100%; margin: 0; }

/* sender names above a run of messages, and the tappable match header */
.msgs > .who { flex: none; align-self: flex-start; margin: 6px 8px -4px; font-size: 12px; font-weight: 800; color: var(--soft); max-width: 82%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msgs > .who.mine { align-self: flex-end; }
.chathead .nmbtn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 2px 4px; color: var(--text); font: inherit; text-align: left; cursor: pointer; border-radius: 14px; }
.chathead .nmbtn .nm { flex: 1; min-width: 0; }
.chathead .nmava { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid var(--heat); }
@media (max-width: 400px) { .chathead .nmava { display: none; } .chathead .link { padding: 8px 2px; font-size: 11.5px; } .chathead .nmbtn { flex: 1 1 70px; } }
.chathead .nmbtn { min-height: 44px; }

/* chat: one clean compose row, "+" sheet, "..." menu */
.compose .plusbtn { width: 50px; min-height: 50px; padding: 0; flex: none; border-radius: 50%; display: grid; place-items: center; }
.chathead .menubtn { padding: 8px; min-width: 44px; min-height: 44px; display: grid; place-items: center; color: var(--text); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 14px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 10px; min-height: 96px; border-radius: var(--r-m); background: var(--surface2); border: 2px solid var(--line); color: var(--text); font-weight: 800; }
.tile:hover, .tile:focus-visible { border-color: var(--rouge); }
.tile .tico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--heat); color: var(--ink); }
.tile .tl { font-size: 14px; text-align: center; }
.plusbody { display: grid; gap: 10px; margin: 6px 0 14px; max-height: 52dvh; overflow-y: auto; }
.menulist { display: grid; gap: 8px; margin: 8px 0 14px; }
.menuitem { text-align: left; min-height: 48px; padding: 0 16px; border-radius: var(--r-m); background: var(--surface2); border: 2px solid var(--line); color: var(--text); font-weight: 700; }
.menuitem.danger { color: var(--err); }
.tempbar { padding-bottom: 6px; }
@media (max-width: 360px) { .templabel { display: none; } }

/* Pusepar rows: avatar = profile, body = chat */
.avabtn { border: 0; cursor: pointer; }
.avabtn:focus-visible { outline: 3px solid var(--soft); outline-offset: 2px; }
.itembody { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; min-height: 62px; padding: 0; background: none; border: 0; color: inherit; text-align: left; font: inherit; }

/* Typekort: backstory and pairings */
.typestory { font-size: 15px; line-height: 1.55; color: var(--text); margin: 0 0 12px; }
.typepairs .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }

/* date invites */
.msg.card.invite { max-width: 92%; display: grid; gap: 6px; text-align: left; }
.msg.card.invite .invtitle { font-family: var(--display); font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.msg.card.invite .invwhen, .msg.card.invite .invplace { font-size: 14px; color: var(--soft); font-weight: 700; display: flex; align-items: center; gap: 4px; }
.msg.card.invite .invstatus { font-size: 13px; font-weight: 800; color: var(--dim); }
.msg.card.invite.st-accepted .invstatus { color: var(--rouge); }
.msg.card.invite.st-declined, .msg.card.invite.st-cancelled { opacity: .6; }
.invbtns { display: flex; flex-wrap: wrap; gap: 8px; }
.chiprow { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.chiprow:has(button:nth-child(8)) { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.chiprow .chipbtn { flex: none; }
.chipbtn.on { background: var(--heat); color: var(--ink); border-color: transparent; }
.timegrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-height: 180px; overflow-y: auto; padding: 2px; }
.timegrid .chipbtn { padding: 8px 4px; text-align: center; justify-content: center; }
.invpreview { margin: 6px 0 0; font-weight: 800; color: var(--soft); }
.datechip { display: inline-flex; align-items: center; gap: 2px; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--surface2); color: var(--soft); border: 1.5px solid var(--line); font-family: var(--body); font-size: 11.5px; font-weight: 800; letter-spacing: 0; vertical-align: middle; }
.datechip.due { border-color: var(--rouge); color: var(--text); }
.dateslot { flex: none; }
.chathead .dateslot .datechip { margin-left: 4px; }
.reviewnudge { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 6px 0; padding: 10px 12px; border-radius: var(--r-m); border: 2px dashed var(--glod); background: var(--surface); font-size: 14px; }
.reviewnudge strong { flex: 1 0 100%; font-family: var(--display); }
.reviewnudge span { flex: 1; min-width: 0; color: var(--soft); }
/* Pusepar count in the bottom navigation: a quiet number, separate from the red unread badge */
nav.tabs button { position: relative; }
.ncount { position: absolute; top: 6px; right: calc(50% + 14px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--surface2); color: var(--soft); border: 1.5px solid var(--line); font-size: 11px; font-weight: 800; line-height: 15px; text-align: center; pointer-events: none; }
.listhead .count { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 8px; margin-left: 8px; border-radius: 13px; background: var(--surface2); color: var(--soft); font-size: 13px; font-weight: 800; }

/* Dagens type + type chemistry */
.totd { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; padding: 10px 12px; border-radius: var(--r-m); background: var(--surface); border: 2px solid var(--line); }
.totdchar { flex: none; width: 52px; height: 52px; }
.totdtext { flex: 1 1 140px; min-width: 0; display: grid; gap: 2px; font-size: 13.5px; color: var(--soft); }
.totdtext strong { color: var(--text); font-family: var(--display); font-size: 14px; }
.totdbtns { display: flex; align-items: center; gap: 10px; }
.chip.pair { background: var(--surface2); border-color: var(--rouge); color: var(--text); }
