/* ============================================================
   Kinklist — "Velvet Ledger"
   Dark candlelit editorial: plum-ink ground, paper-cream type,
   Fraunces display serif + Schibsted Grotesk body, gem chips.
   ============================================================ */

:root {
  --ink-0: #120e18;          /* page ground */
  --ink-1: #17131d;          /* raised surface */
  --ink-2: #201a29;          /* card */
  --ink-3: #2a2336;          /* hover / border-ish */
  --line: #322a40;           /* hairlines */
  --paper: #efe6d8;          /* primary text */
  --paper-dim: #b3a795;      /* secondary text */
  --paper-faint: #7d7362;    /* tertiary */
  --gold: #d9a441;           /* brand accent */
  --gold-soft: #eab652;

  --c-favorite: #eab652;
  --c-like: #7fc383;
  --c-indifferent: #8a93b2;
  --c-maybe: #b48ede;
  --c-limit: #e0596e;
  --c-na: #6b6357;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Schibsted Grotesk", "Segoe UI", sans-serif;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 50px -18px rgba(0, 0, 0, .75);
  --maxw: 60rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(120% 55% at 50% -12%, #2c2138 0%, transparent 60%),
    radial-gradient(90% 40% at 85% 110%, #241b2e 0%, transparent 55%),
    var(--ink-0);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100svh;
  -webkit-font-smoothing: antialiased;
}

/* film grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

::selection { background: rgba(217, 164, 65, .35); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 560; margin: 0; }
a { color: var(--gold-soft); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; padding: 0; }
input, dialog { font: inherit; color: inherit; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .62em 1.15em;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--ink-2);
  color: var(--paper);
  font-weight: 500;
  font-size: .92rem;
  transition: border-color .15s, background .15s, transform .1s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--gold); background: var(--ink-3); text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn-gold {
  background: linear-gradient(160deg, #e7b658, #c99334);
  border-color: transparent;
  color: #241a08;
  font-weight: 600;
}
.btn-gold:hover { background: linear-gradient(160deg, #f0c268, #d69f3c); border-color: transparent; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--paper-dim); }
.btn-ghost:hover { color: var(--paper); border-color: var(--line); background: var(--ink-2); }
.btn-danger:hover { border-color: var(--c-limit); color: var(--c-limit); }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ---------- language toggle ---------- */
.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 99px;
  overflow: hidden;
  background: var(--ink-1);
}
.lang-toggle button {
  padding: .35em .8em;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--paper-faint);
}
.lang-toggle button[aria-pressed="true"] { background: var(--ink-3); color: var(--gold-soft); }

/* ============================================================
   HOME
   ============================================================ */
.home-top {
  display: flex;
  justify-content: flex-end;
  padding-top: 1.1rem;
}
.hero { text-align: center; padding: clamp(2.5rem, 8vw, 5.5rem) 0 clamp(2rem, 5vw, 3.5rem); }
.hero .brand {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 5.2rem);
  font-weight: 620;
  letter-spacing: -.02em;
  line-height: 1;
  background: linear-gradient(175deg, #f6ecdc 30%, #d9a441 130%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .brand .tail { font-style: italic; font-weight: 480; }
.hero .tagline {
  margin: 1.1rem auto 0;
  max-width: 34em;
  color: var(--paper-dim);
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  text-wrap: balance;
}

.steps {
  display: flex;
  justify-content: center;
  gap: clamp(.8rem, 3vw, 2.2rem);
  flex-wrap: wrap;
  margin-top: 2rem;
  color: var(--paper-faint);
  font-size: .9rem;
}
.steps span { display: inline-flex; align-items: center; gap: .5em; }
.steps .n {
  display: inline-grid;
  place-items: center;
  width: 1.6em; height: 1.6em;
  border-radius: 50%;
  border: 1px solid var(--gold);
  color: var(--gold-soft);
  font-family: var(--font-display);
  font-size: .85em;
}

.list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: 1rem;
  padding-bottom: 1rem;
}
.list-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  text-align: left;
  padding: 1.35rem 1.35rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(170deg, var(--ink-2), var(--ink-1));
  box-shadow: var(--shadow);
  transition: transform .18s, border-color .18s;
  overflow: hidden;
}
.list-card::after {              /* corner glow */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 50% at 100% 0%, rgba(217, 164, 65, .12), transparent 70%);
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}
.list-card:hover { transform: translateY(-3px); border-color: #4a3d2a; text-decoration: none; }
.list-card:hover::after { opacity: 1; }
.list-card h2 { font-size: 1.45rem; color: var(--paper); }
.list-card .meta {
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
.list-card p { margin: 0; color: var(--paper-dim); font-size: .92rem; flex: 1; }
.list-card .resume {
  display: flex;
  align-items: center;
  gap: .6em;
  margin-top: .35rem;
  padding-top: .8rem;
  border-top: 1px dashed var(--line);
  color: var(--gold-soft);
  font-size: .88rem;
  font-weight: 500;
}
.mini-ring { width: 22px; height: 22px; transform: rotate(-90deg); }
.mini-ring circle { fill: none; stroke-width: 3; }
.mini-ring .bg { stroke: var(--ink-3); }
.mini-ring .fg { stroke: var(--gold); stroke-linecap: round; }

.home-foot {
  padding: 2.5rem 0 3rem;
  text-align: center;
  color: var(--paper-faint);
  font-size: .84rem;
  max-width: 42em;
  margin: 0 auto;
}
.home-foot p { margin: .4em 0; }

/* staggered entrance */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .6s cubic-bezier(.2, .7, .3, 1) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
}

/* ============================================================
   LIST VIEW
   ============================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18, 14, 24, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding-top: .6rem;
  padding-bottom: .6rem;
}
.topbar .back {
  display: grid;
  place-items: center;
  width: 2.2rem; height: 2.2rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--paper-dim);
  flex: none;
}
.topbar .back:hover { color: var(--gold-soft); border-color: var(--gold); }
.topbar .title { min-width: 0; }
.topbar .title h1 {
  font-size: 1.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar .title .sub { font-size: .74rem; color: var(--paper-faint); letter-spacing: .04em; white-space: nowrap; }
.topbar .spacer { flex: 1; }
.progress-track { height: 2px; background: var(--ink-3); }
.progress-track i { display: block; height: 100%; background: linear-gradient(90deg, #c99334, #eab652); transition: width .35s; }

.searchbox {
  position: relative;
  flex: 0 1 15rem;
}
@media (max-width: 640px) {
  .topbar-inner { flex-wrap: wrap; }
  .topbar .title { flex: 1; }
  .searchbox { order: 10; flex: 1 1 100%; margin-bottom: .1rem; }
}
.searchbox input {
  width: 100%;
  padding: .5em 1em .5em 2.3em;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--ink-1);
  color: var(--paper);
  font-size: .9rem;
  outline: none;
}
.searchbox input:focus { border-color: var(--gold); }
.searchbox svg { position: absolute; left: .8em; top: 50%; translate: 0 -50%; opacity: .5; }

/* category nav */
.catnav {
  display: flex;
  gap: .45rem;
  overflow-x: auto;
  padding: .55rem clamp(1rem, 4vw, 2.5rem);
  scrollbar-width: none;
  max-width: calc(var(--maxw) + 0px);
  margin: 0 auto;
}
.catnav::-webkit-scrollbar { display: none; }
.catnav a {
  flex: none;
  font-size: .8rem;
  padding: .3em .85em;
  border-radius: 99px;
  border: 1px solid var(--line);
  color: var(--paper-dim);
  background: var(--ink-1);
}
.catnav a:hover { text-decoration: none; border-color: var(--gold); color: var(--paper); }
.catnav a.done { color: var(--gold); border-color: #4a3d2a; }

/* legend strip */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .95rem;
  align-items: center;
  padding: .9rem 0 .2rem;
  font-size: .82rem;
  color: var(--paper-dim);
}
.legend .item { display: inline-flex; align-items: center; gap: .45em; cursor: help; }

/* the rating gem */
.gem {
  --c: var(--paper-faint);
  display: inline-grid;
  place-items: center;
  width: 1.9rem; height: 1.9rem;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--c) 55%, transparent);
  color: color-mix(in srgb, var(--c) 80%, var(--paper));
  background: transparent;
  font-size: .8rem;
  line-height: 1;
  font-weight: 700;
  transition: transform .12s, background .15s, box-shadow .15s, border-color .15s;
  flex: none;
}
.gem.sm { width: 1.35rem; height: 1.35rem; font-size: .62rem; border-width: 1px; }
button.gem:hover { transform: scale(1.12); border-color: var(--c); }
.gem.on {
  background: var(--c);
  border-color: var(--c);
  color: #17121c;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent), 0 0 14px color-mix(in srgb, var(--c) 45%, transparent);
}
@media (prefers-reduced-motion: no-preference) {
  button.gem.on { animation: pop .22s cubic-bezier(.3, 1.6, .5, 1); }
  @keyframes pop { 50% { transform: scale(1.22); } }
}
.gem[data-level="favorite"] { --c: var(--c-favorite); }
.gem[data-level="like"] { --c: var(--c-like); }
.gem[data-level="indifferent"] { --c: var(--c-indifferent); }
.gem[data-level="maybe"] { --c: var(--c-maybe); }
.gem[data-level="limit"] { --c: var(--c-limit); }
/* "not applicable" reads as set-aside, not as a rating on the scale */
.gem[data-level="na"] { --c: var(--c-na); opacity: .72; }
.gem[data-level="na"].on { opacity: 1; color: var(--paper); }

/* categories */
main.listing { padding-bottom: 7rem; }
.cat { padding-top: 1.6rem; }
.cat-head {
  display: flex;
  align-items: baseline;
  gap: .8rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: .55rem;
  margin-bottom: .25rem;
}
.cat-head .num {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--gold);
  font-size: .95rem;
}
.cat-head h2 { font-size: clamp(1.3rem, 3.5vw, 1.65rem); }
.cat-head .count { margin-left: auto; font-size: .78rem; color: var(--paper-faint); white-space: nowrap; }

.kink {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem .9rem;
  padding: .55rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 45%, transparent);
}
.kink:last-child { border-bottom: none; }
.kink-name {
  flex: 1 1 12rem;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: .5em;
  text-align: left;
  font-size: .98rem;
  font-weight: 500;
  color: var(--paper);
  padding: .15em 0;
}
.kink-name .qm {
  display: inline-grid;
  place-items: center;
  width: 1.15em; height: 1.15em;
  border-radius: 50%;
  border: 1px solid var(--paper-faint);
  color: var(--paper-faint);
  font-size: .68em;
  font-style: italic;
  font-family: var(--font-display);
  transition: color .15s, border-color .15s;
  flex: none;
}
.kink-name:hover .qm { color: var(--gold-soft); border-color: var(--gold); }
.kink-desc {
  flex-basis: 100%;
  order: 5;
  margin: .1rem 0 .35rem;
  padding: .6rem .9rem;
  border-left: 2px solid var(--gold);
  background: color-mix(in srgb, var(--ink-2) 70%, transparent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--paper-dim);
  font-size: .88rem;
}
.kink-desc[hidden] { display: none; }

.fieldgroup { display: flex; gap: .9rem; flex-wrap: wrap; }
.fieldrow { display: flex; align-items: center; gap: .55rem; }
.fieldrow .flabel {
  font-size: .68rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--paper-faint);
  min-width: 4.6em;
  text-align: right;
}
.fieldrow[data-single="1"] .flabel { display: none; }
.chips { display: flex; gap: .3rem; }

/* action bar */
.actionbar {
  position: fixed;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  translate: -50% 0;
  z-index: 60;
  display: flex;
  gap: .45rem;
  padding: .5rem;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: rgba(26, 20, 33, .92);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  max-width: calc(100vw - 1.5rem);
  overflow-x: auto;
  scrollbar-width: none;
}
.actionbar::-webkit-scrollbar { display: none; }
.actionbar .btn { font-size: .86rem; padding: .5em .95em; }
.actionbar .btn span.lbl { display: inline; }
@media (max-width: 560px) {
  .actionbar .btn span.lbl { display: none; }
  .actionbar .btn { padding: .55em .75em; }
}

.empty-note { text-align: center; color: var(--paper-faint); padding: 3rem 1rem; }

/* ============================================================
   GUIDED MODE
   ============================================================ */
dialog {
  border: none;
  background: none;
  padding: 0;
  max-width: none;
  max-height: none;
}
dialog::backdrop { background: rgba(10, 7, 14, .8); backdrop-filter: blur(6px); }

.guided {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(110% 50% at 50% -10%, #2c2138 0%, transparent 60%),
    var(--ink-0);
  color: var(--paper);
}
.guided-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .9rem clamp(1rem, 4vw, 2rem) .6rem;
}
.guided-top .gprog { flex: 1; height: 3px; border-radius: 2px; background: var(--ink-3); overflow: hidden; }
.guided-top .gprog i { display: block; height: 100%; background: linear-gradient(90deg, #c99334, #eab652); transition: width .3s; }
.guided-top .gcount { font-size: .82rem; color: var(--paper-faint); font-variant-numeric: tabular-nums; }
.guided-close {
  width: 2.3rem; height: 2.3rem;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--paper-dim);
}
.guided-close:hover { color: var(--paper); border-color: var(--gold); }

.guided-card {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem clamp(1.2rem, 5vw, 3rem) 2rem;
  gap: 1.1rem;
}
.guided-card .gcat {
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
.guided-card h2 { font-size: clamp(1.9rem, 6vw, 2.9rem); font-weight: 580; text-wrap: balance; }
.guided-card .gdesc { max-width: 36em; color: var(--paper-dim); font-size: 1.02rem; margin: 0; }
.guided-fields { display: flex; flex-direction: column; gap: 1.1rem; margin-top: .6rem; }
.guided-fields .flabel {
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--paper-faint);
  margin-bottom: .45rem;
  display: block;
  text-align: center;
}
.guided-fields .chips { gap: .55rem; justify-content: center; }
.guided-fields .gem { width: 2.9rem; height: 2.9rem; font-size: 1.15rem; }
.guided-fields .chips-labels { display: flex; gap: .55rem; justify-content: center; }

.guided-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  padding: 0 1rem calc(1.2rem + env(safe-area-inset-bottom));
}
.guided-hint { text-align: center; font-size: .74rem; color: var(--paper-faint); padding-bottom: .8rem; }
@media (max-width: 700px), (pointer: coarse) { .guided-hint { visibility: hidden; } }

.guided-done { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; }
.guided-done .gemrow { display: flex; gap: .5rem; }

/* ============================================================
   DIALOGS (share, confirm)
   ============================================================ */
.modal {
  margin: auto;
  width: min(28rem, calc(100vw - 2rem));
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(170deg, var(--ink-2), var(--ink-1));
  color: var(--paper);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}
.modal h2 { font-size: 1.45rem; margin-bottom: .35rem; }
.modal p { color: var(--paper-dim); font-size: .92rem; margin: .35rem 0 .9rem; }
.modal label { display: block; font-size: .8rem; color: var(--paper-faint); margin: .9rem 0 .3rem; }
.modal input[type="text"] {
  width: 100%;
  padding: .6em .9em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--ink-0);
  color: var(--paper);
  outline: none;
}
.modal input[type="text"]:focus { border-color: var(--gold); }
.modal .row { display: flex; gap: .55rem; margin-top: 1.1rem; flex-wrap: wrap; }
.modal .row .btn { flex: none; }
.modal .linkbox { display: flex; gap: .45rem; }
.modal .linkbox input { flex: 1; font-size: .85rem; color: var(--gold-soft); }
.modal .fine { font-size: .78rem; color: var(--paper-faint); margin-top: .8rem; }
.modal .fine b { color: var(--paper-dim); }

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 5.4rem;
  translate: -50% 0;
  z-index: 200;
  background: var(--paper);
  color: var(--ink-0);
  padding: .55em 1.2em;
  border-radius: 99px;
  font-size: .88rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, translate .25s;
}
.toast.show { opacity: 1; translate: -50% -6px; }

/* ============================================================
   SHARED RESULT VIEW + COMPARE
   ============================================================ */
.result-hero { text-align: center; padding: 2.2rem 0 1rem; }
.result-hero .who {
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
.result-hero h1 { font-size: clamp(1.9rem, 6vw, 2.8rem); margin: .25rem 0; }
.result-hero .meta { color: var(--paper-faint); font-size: .86rem; }
.result-actions { display: flex; justify-content: center; gap: .6rem; flex-wrap: wrap; padding: 1rem 0 .4rem; }

.ro-level { display: inline-flex; align-items: center; gap: .5em; font-size: .85rem; color: var(--paper-dim); }

.unrated-note { color: var(--paper-faint); font-size: .82rem; padding: .5rem 0 0; font-style: italic; }

/* compatibility */
.compat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  padding: 1.6rem 0 .2rem;
}
.compat-ring { width: 92px; height: 92px; flex: none; }
.compat-ring text {
  fill: var(--paper);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 620;
}
.compat-text { display: flex; flex-direction: column; gap: .15rem; }
.compat-text b {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 580;
}
.compat-text span { color: var(--paper-faint); font-size: .84rem; }

/* compare */
.cmp-summary {
  display: flex;
  justify-content: center;
  gap: .5rem;
  flex-wrap: wrap;
  padding: 1rem 0;
}
.cmp-tab {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .45em 1em;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--ink-1);
  color: var(--paper-dim);
  font-size: .88rem;
}
.cmp-tab .n { font-weight: 700; color: var(--paper); }
.cmp-tab[aria-pressed="true"] { border-color: var(--gold); color: var(--paper); background: var(--ink-3); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .2em .7em;
  border-radius: 99px;
  flex: none;
}
.badge.match { background: color-mix(in srgb, var(--c-like) 18%, transparent); color: var(--c-like); }
.badge.perfect { background: color-mix(in srgb, var(--c-favorite) 20%, transparent); color: var(--c-favorite); }
.badge.explore { background: color-mix(in srgb, var(--c-maybe) 18%, transparent); color: var(--c-maybe); }
.badge.conflict { background: color-mix(in srgb, var(--c-limit) 18%, transparent); color: var(--c-limit); }

.cmp-kink { display: flex; flex-direction: column; gap: .3rem; padding: .6rem 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 45%, transparent); }
.cmp-kink .cmp-head { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.cmp-kink .cmp-head .kname { font-weight: 500; }
.cmp-sides { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.cmp-side { display: flex; align-items: center; gap: .5rem; font-size: .78rem; color: var(--paper-faint); }
.cmp-side .who { min-width: 3.2em; font-weight: 600; letter-spacing: .04em; }
.cmp-side .pair { display: inline-flex; align-items: center; gap: .3em; }
.cmp-side .pair .fl { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; }

/* ============================================================
   LIST EDITOR
   ============================================================ */
.section-title {
  font-size: 1.5rem;
  padding: 1.6rem 0 .8rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1rem;
}
.list-card.create-card {
  border-style: dashed;
  border-color: #4a3d2a;
  background: transparent;
  box-shadow: none;
}
.list-card.create-card .meta { font-size: 1.3rem; line-height: .6; }
.custom-card .card-actions { display: flex; gap: .5rem; margin-top: .4rem; }
.custom-card .card-actions .btn { font-size: .84rem; padding: .45em .95em; }

.editor { padding-bottom: 7rem; }
.ed-hint {
  color: var(--paper-faint);
  font-size: .86rem;
  max-width: 46em;
  padding-top: 1rem;
  margin: 0 0 1.2rem;
}
.ed-input {
  width: 100%;
  padding: .55em .8em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--ink-1);
  color: var(--paper);
  outline: none;
  font-size: .95rem;
}
.ed-input:focus { border-color: var(--gold); }
.ed-input::placeholder { color: var(--paper-faint); }
textarea.ed-input { resize: vertical; }
.ed-meta { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1.6rem; }
.ed-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 560;
}
.ed-templates {
  display: flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
  font-size: .86rem;
  color: var(--paper-faint);
}

.ed-cat {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(170deg, var(--ink-2), var(--ink-1));
  padding: 1rem;
  margin-bottom: 1.1rem;
}
.ed-cat-head {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  padding-bottom: .7rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: .7rem;
}
.ed-cat-head .num { font-family: var(--font-display); font-style: italic; color: var(--gold); }
.ed-catname { flex: 1 1 12rem; font-weight: 600; }
.ed-axis {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  font-size: .78rem;
  color: var(--paper-faint);
}
.ed-axis select {
  background: var(--ink-1);
  color: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .35em .5em;
  font-size: .84rem;
}
.ed-tools { display: inline-flex; gap: .3rem; margin-left: auto; }

.iconbtn {
  display: inline-grid;
  place-items: center;
  width: 2rem; height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--paper-dim);
  font-size: .85rem;
  flex: none;
  transition: border-color .15s, color .15s;
}
.iconbtn:hover { border-color: var(--gold); color: var(--paper); }
.iconbtn.danger:hover { border-color: var(--c-limit); color: var(--c-limit); }
.iconbtn[disabled] { opacity: .3; pointer-events: none; }

.ed-kink { padding: .3rem 0; }
.ed-kink-row { display: flex; gap: .4rem; align-items: center; }
.ed-kink-row .ed-input { flex: 1; }
.ed-desc { margin-top: .35rem; font-size: .87rem; color: var(--paper-dim); }
.ed-add-kink { display: flex; gap: .4rem; margin-top: .6rem; }
.ed-add-kink .ed-input { flex: 1; border-style: dashed; }
.ed-addcat { width: 100%; justify-content: center; border-style: dashed; margin-bottom: 1rem; }

/* ============================================================
   ADMIN
   ============================================================ */
.admin { padding-bottom: 3rem; }
.admin-gate {
  max-width: 22rem;
  margin: 4rem auto;
  text-align: center;
}
.admin-gate h2 { font-size: 1.6rem; margin-bottom: .5rem; }
.admin-gate p { color: var(--paper-dim); font-size: .9rem; }
.admin-gate form { display: flex; flex-direction: column; gap: .7rem; margin-top: 1.2rem; }

.admin-tools {
  display: flex;
  align-items: center;
  gap: .7rem;
  flex-wrap: wrap;
  padding: 1.2rem 0 1rem;
}
.admin-tools .ed-input { flex: 0 1 20rem; width: auto; }
.admin-tools .spacer { flex: 1; }
.dim { color: var(--paper-faint); font-size: .84rem; }

.admin-tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.admin-table { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 46rem; }
.admin-table th {
  text-align: left;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--paper-faint);
  font-weight: 600;
  padding: .7rem .8rem;
  border-bottom: 1px solid var(--line);
  background: var(--ink-1);
}
.admin-table td {
  padding: .45rem .8rem;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 45%, transparent);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table .nowrap { white-space: nowrap; }
.admin-table .num-cell { text-align: right; font-variant-numeric: tabular-nums; }
.admin-table .adm-label { font-size: .85rem; padding: .35em .6em; min-width: 9rem; }
.adm-pin { filter: grayscale(1); opacity: .5; }
.adm-pin.on { filter: none; opacity: 1; border-color: var(--gold); }

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  body { background: #fff; color: #111; font-size: 10pt; }
  body::before, .topbar, .catnav, .actionbar, .legend .hint, .toast, .searchbox { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .print-head { display: block !important; font-family: var(--font-display); margin-bottom: .5cm; }
  .print-head h1 { font-size: 18pt; }
  .print-head .pmeta { font-size: 9pt; color: #555; }
  .legend { color: #333; }
  main.listing { columns: 2; column-gap: 1cm; padding-bottom: 0; }
  .cat { break-inside: avoid; padding-top: .35cm; }
  .cat-head { border-color: #bbb; }
  .cat-head .num, .cat-head h2 { color: #111; }
  .kink { border: none; padding: .06cm 0; gap: .15cm .4cm; }
  .kink-name { color: #111; font-size: 9.5pt; }
  .kink-name .qm { display: none; }
  .kink-desc { display: none !important; }
  .fieldrow .flabel { color: #666; }
  .gem { width: .42cm; height: .42cm; font-size: 7pt; border-color: #999; color: #999; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .gem.on { color: #fff; box-shadow: none; }
  .gem.on[data-level="favorite"] { background: #c9902d; border-color: #c9902d; }
  .gem.on[data-level="like"] { background: #4e9d55; border-color: #4e9d55; }
  .gem.on[data-level="indifferent"] { background: #6d7794; border-color: #6d7794; }
  .gem.on[data-level="maybe"] { background: #8f5fc9; border-color: #8f5fc9; }
  .gem.on[data-level="limit"] { background: #cc3e55; border-color: #cc3e55; }
  .gem.on[data-level="na"] { background: #6b6357; border-color: #6b6357; }
}
.print-head { display: none; }
