
:root {
  color-scheme: light dark;
  --bg: #fbf6f1;
  --surface: #ffffff;
  --surface-2: #f6ede6;
  --text: #2b2320;
  --muted: #7a6b66;
  --line: #ecdfd6;
  --accent: #d64f6a;
  --accent-ink: #ffffff;
  --accent-hover: #c33f5b;
  --accent-soft: #fbe7ec;
  --peach: #fdeee3;
  --sky: #e8f1fb;
  --amber: #fff1d6;
  --amber-ink: #7a4b00;
  --danger: #b3261e;
  --danger-soft: #fde8e6;
  --shadow: 0 1px 2px rgba(70, 35, 25, .05), 0 10px 30px rgba(70, 35, 25, .07);
  --radius: 18px;
  --radius-sm: 12px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1d1715;
    --surface: #27201d;
    --surface-2: #322925;
    --text: #f4ece6;
    --muted: #b5a59d;
    --line: #3d322d;
    --accent: #ef6f8a;
    --accent-ink: #1d1715;
    --accent-hover: #f58aa0;
    --accent-soft: rgba(239, 111, 138, .16);
    --peach: rgba(253, 190, 150, .14);
    --sky: rgba(140, 190, 240, .16);
    --amber: rgba(255, 196, 90, .18);
    --amber-ink: #ffd58a;
    --danger: #ff8a80;
    --danger-soft: rgba(255, 138, 128, .14);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .25);
  }
}
:root[data-theme="dark"] {
  --bg: #1d1715; --surface: #27201d; --surface-2: #322925; --text: #f4ece6; --muted: #b5a59d; --line: #3d322d;
  --accent: #ef6f8a; --accent-ink: #1d1715; --accent-hover: #f58aa0; --accent-soft: rgba(239, 111, 138, .16);
  --peach: rgba(253, 190, 150, .14); --sky: rgba(140, 190, 240, .16); --amber: rgba(255, 196, 90, .18); --amber-ink: #ffd58a;
  --danger: #ff8a80; --danger-soft: rgba(255, 138, 128, .14);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .25);
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.9rem; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .6rem; }
h2 { font-size: 1.15rem; margin: 1.8rem 0 .6rem; letter-spacing: -.01em; }
p { margin: .5rem 0; }
code { font-size: .85em; background: var(--surface-2); padding: .1em .4em; border-radius: 6px; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-inner { max-width: 44rem; margin: 0 auto; padding: .7rem 1rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.brand { font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; color: var(--text); display: inline-flex; align-items: center; gap: .4rem; }
.brand:hover { text-decoration: none; }
.brand .heart { color: var(--accent); font-size: 1.1rem; }
.top nav { display: flex; gap: .25rem; flex-wrap: wrap; margin-left: auto; }
.top nav + .who { margin-left: 0; }
.top nav a { padding: .4rem .8rem; border-radius: 999px; color: var(--text); font-weight: 600; font-size: .95rem; }
.top nav a:hover { background: var(--surface-2); text-decoration: none; }
.top nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.top .who { display: flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .9rem; margin-left: auto; }
.top .who form { display: inline; }
@media (max-width: 900px) { .top nav { width: 100%; order: 3; margin-left: 0; } .top nav + .who { margin-left: auto; } }

main { max-width: 44rem; margin: 0 auto; padding: 1.6rem 1rem 4rem; }
footer { max-width: 44rem; margin: 0 auto; padding: 0 1rem 2.5rem; color: var(--muted); font-size: .85rem; }
.hint { font-weight: 400; color: var(--muted); font-size: .9rem; }

/* Surfaces */
.panel, .cand, .post, .matches, .listing { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel { padding: 1.4rem 1.4rem 1.6rem; margin: 1rem 0; }
.notice, .error, .consent { border-radius: var(--radius-sm); padding: .85rem 1.1rem; margin: 1rem 0; }
.notice { background: var(--accent-soft); border-left: 4px solid var(--accent); }
.error { background: var(--danger-soft); border-left: 4px solid var(--danger); }
.consent { background: var(--peach); border: 1px solid var(--line); padding: 1.1rem 1.3rem; }
.consent h2 { margin-top: 0; }

/* Forms */
label { display: block; font-weight: 650; margin-top: 1.1rem; }
label .hint { display: block; margin-top: .1rem; }
input[type=text], input[type=number], input[type=date], input[type=search], textarea, select {
  font: inherit; width: 100%; padding: .7rem .9rem; margin-top: .4rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: inherit; transition: border-color .15s, box-shadow .15s;
}
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
textarea { min-height: 6rem; resize: vertical; }
input[type=file] { margin-top: .5rem; }
button, .button {
  font: inherit; font-weight: 650; padding: .65rem 1.2rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); cursor: pointer; transition: background .15s, transform .05s; display: inline-block;
}
button:hover, .button:hover { background: var(--surface-2); text-decoration: none; }
button:active { transform: translateY(1px); }
button.primary, .button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button.primary:hover, .button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
button.link { background: none; border: none; padding: 0; color: var(--accent); font-weight: 600; }
button.link:hover { text-decoration: underline; background: none; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 450; margin-top: .55rem; }
.check input { margin-top: .35rem; accent-color: var(--accent); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
.actions { display: flex; gap: .8rem; align-items: center; margin-top: 1.5rem; flex-wrap: wrap; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.danger { margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
details.report { margin-top: 1rem; }
details.report summary { cursor: pointer; }
details.report form { margin-top: .6rem; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0; }
.chip { padding: .2rem .7rem; border-radius: 999px; background: var(--surface-2); font-size: .85rem; font-weight: 550; }
.chip.shared { background: var(--accent-soft); color: var(--accent); }
.chip.warn { background: var(--amber); color: var(--amber-ink); }
.chip.follow { background: var(--sky); }

/* Discover cards */
.cand { margin: 1.2rem 0; overflow: hidden; }
.cand img.hero { width: 100%; max-height: 30rem; object-fit: cover; display: block; }
.cand .body { padding: 1.1rem 1.3rem 1.3rem; }
.cand h2 { margin: 0 0 .15rem; font-size: 1.45rem; }
.cand .meta { color: var(--muted); margin: 0 0 .6rem; }
.cand dl { margin: .8rem 0 0; }
.cand dt { font-weight: 650; margin-top: .6rem; color: var(--muted); font-size: .9rem; }
.cand dd { margin: .1rem 0 0; }
.cand .actions { justify-content: flex-end; margin-top: 1.1rem; }

/* Card editor photos */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; margin-top: .6rem; }
.photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-sm); display: block; }
.photo input[type=text] { font-size: .85rem; }
.prompt { display: grid; gap: .3rem; margin-top: .7rem; }

/* Matches and lists */
.matches, .listing { padding: .3rem 1.2rem; margin: 1rem 0; }
.match { display: flex; gap: 1rem; align-items: center; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.match:last-child { border-bottom: none; }
.match img, .match .avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; background: var(--surface-2); }
.match > div { min-width: 0; }
.match a { font-weight: 700; color: var(--text); }
.badge { background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: .1rem .55rem; font-size: .8rem; margin-left: .4rem; font-weight: 700; }

/* Chat */
.msgs { list-style: none; padding: 0; margin: 1rem 0; display: flex; flex-direction: column; gap: .5rem; }
.msg { max-width: 80%; padding: .6rem .95rem; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.msg.mine { align-self: flex-end; background: var(--accent-soft); border-color: transparent; }
.msg time { display: block; font-size: .75rem; color: var(--muted); margin-top: .2rem; }
.compose { display: flex; gap: .6rem; align-items: flex-end; }
.compose textarea, .compose input { flex: 1; min-height: 3.2rem; margin: 0; }

/* Posts (feeds) */
.post { padding: 1rem 1.2rem; margin: 1rem 0; }
.phead { display: flex; gap: .7rem; align-items: center; margin-bottom: .4rem; }
.pavatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex: none; background: var(--surface-2); }
.pimages { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .5rem; margin: .6rem 0; }
.pimages img { width: 100%; max-height: 24rem; object-fit: cover; border-radius: var(--radius-sm); }
.pext { display: flex; gap: .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .7rem; color: inherit; margin: .6rem 0; background: var(--surface-2); }
.pext:hover { text-decoration: none; border-color: var(--accent); }
.pext img { width: 76px; height: 76px; object-fit: cover; border-radius: 8px; flex: none; }
.pquote { border-left: 3px solid var(--line); margin: .6rem 0; padding: .3rem .9rem; color: var(--muted); }

/* Admin */
table.reports { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.reports th, table.reports td { text-align: left; padding: .5rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }

/* Landing */
.splash { padding: 2.5rem 0 1.5rem; text-align: center; }
.splash h1 { font-size: 2.6rem; }
.splash p.lead { font-size: 1.2rem; color: var(--muted); max-width: 32rem; margin: .6rem auto 1.4rem; }
.splash .actions { justify-content: center; }
.props { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 2rem 0; }
.prop { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem 1.3rem; }
.prop h2 { margin: 0 0 .3rem; font-size: 1.05rem; }
.prop p { margin: 0; color: var(--muted); font-size: .95rem; }
.prop .glyph { font-size: 1.6rem; margin-bottom: .4rem; }
@media (max-width: 640px) { h1 { font-size: 1.6rem; } .splash h1 { font-size: 2rem; } .row, .props { grid-template-columns: 1fr; } .msg { max-width: 92%; } }
