/* 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: #1c0612; --surface: #2a0c1b; --surface2: #3a1226; --line: #5a2340; --field-line: #9a5575;
  --text: #fff1ea; --soft: #ffb8cc; --dim: #c79aab; --ice-text: #9fd8ff; --err: #ff9fb0; --placeholder: #a67b90;
  --rouge: #ff2b57; --glod: #ff8a3d;
  --shadow: rgba(0, 0, 0, .45);
  --bar: rgba(28, 6, 18, .88); --scrim: rgba(10, 2, 7, .74); --badge-bg: #ff2b57; --badge-ink: #1c0612;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --bg: #fff3f0; --surface: #ffffff; --surface2: #ffe4ea; --line: #efc4d1; --field-line: #a8637f;
    --text: #2a0a18; --soft: #8a2a4c; --dim: #6e4a5a; --ice-text: #0b5f94; --err: #b3123b; --placeholder: #76506a;
    --rouge: #d10f37; --glod: #bb3a0e; --heat-text: linear-gradient(135deg, #c40f3a, #d4491a);
    --shadow: rgba(70, 12, 40, .22);
  --bar: rgba(255, 243, 240, .9); --scrim: rgba(42, 10, 24, .55); --badge-bg: #d10f37; --badge-ink: #fff1ea;
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #fff3f0; --surface: #ffffff; --surface2: #ffe4ea; --line: #efc4d1; --field-line: #a8637f;
  --text: #2a0a18; --soft: #8a2a4c; --dim: #6e4a5a; --ice-text: #0b5f94; --err: #b3123b; --placeholder: #76506a;
  --rouge: #d10f37; --glod: #bb3a0e; --heat-text: linear-gradient(135deg, #c40f3a, #d4491a);
  --shadow: rgba(70, 12, 40, .22);
  --bar: rgba(255, 243, 240, .9); --scrim: rgba(42, 10, 24, .55); --badge-bg: #d10f37; --badge-ink: #fff1ea;
}
:root {
  /* fixed colours: ink on heat/yellow/paper surfaces, things drawn over photos, brand fills */
  --ink: #1c0612; --paper: #fff1ea; --blush: #ffb8cc; --ice: #9fd8ff; --hazard: #ffd23f; --on-photo: #fff1ea;
  --heat: linear-gradient(135deg, #ff2b57 0%, #ff6a47 55%, #ff8a3d 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(255, 43, 87, .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: 0 0 46px 10px rgba(255, 106, 71, .85); opacity: var(--like); }
.swipecard::after { box-shadow: 0 0 46px 10px rgba(159, 216, 255, .7); 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(28, 6, 18, .97), rgba(28, 6, 18, .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(28, 6, 18, .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(28, 6, 18, .68); color: var(--on-photo); }
.kjemi { position: absolute; top: 22px; left: 12px; z-index: 4; width: 58px; height: 58px; border-radius: 50%; background: rgba(28, 6, 18, .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(255, 138, 61, .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 8px 26px rgba(255, 43, 87, .5); }
.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: #1c0612; }
.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% 38%, #ff8a3d 0%, #ff2b57 52%, #6e0b26 100%); animation: fade .25s ease-out; }
.modal.matchwrap { background: transparent; border-radius: 0; max-width: 420px; padding: 24px; color: var(--ink); animation: none; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.modal.matchwrap::before { display: none; }
.matchwrap .cat { width: 96px; height: auto; --cat: #1c0612; --cat-ear: #ff8a3d; --ink: #ff8a3d; 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(--ink); 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(--ink); color: #ff2b57; animation: thump 1.1s 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(--ink); animation: rise .6s var(--spring) .6s backwards; }
.matchwrap p { color: var(--ink); 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, #ff2b57, #ff8a3d, #ffb8cc, #ff2b57); }
.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(255, 138, 61, .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 - 200px - 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 7px rgba(255, 138, 61, .75)); }
.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: #ff2b57; }
.fx-lips { color: var(--blush); }
.fx-flame { color: #ff8a3d; }
.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; }
}

@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(28, 6, 18, .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"); }
}
