/* barebone compact — soft surfaces, orange accent, tight spacing */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --background: #fafafa;
  --card: #fff;
  --foreground: #18181b;
  --muted: #71717a;
  --dim: #71717a;
  --muted-bg: #f4f4f5;
  --primary-subtle: #fff7ed;
  --primary-hover-bg: #ffedd5;
  --primary-border: #fed7aa;
  --highlight: #fef08a;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --link: #2563eb;
  --primary: #ea580c;
  --primary-hover: #c2410c;
  --primary-fg: #fff;
  --chip-warm: #ff4800;
  --chip-gold: #ffc800;
  --chip-gradient: linear-gradient(135deg, #fff0e8 0%, #fff6eb 52%, #fffbeb 100%);
  --chip-border: #fde4cc;
  --chip-gradient-hover: linear-gradient(135deg, #ffe8dc 0%, #fff0e0 52%, #fff8e0 100%);
  --chip-border-hover: #fdd4a8;
  --chip-gradient-have: linear-gradient(135deg, #ffedd5 0%, #fff7ed 52%, #fef9c3 100%);
  --ring: rgba(234, 88, 12, 0.35);
  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 10px;
  --radius-field: 10px;
  --radius-full: 999px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
}

html {
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--foreground);
  background:
    radial-gradient(ellipse 90% 60% at 50% -25%, rgba(234, 88, 12, 0.07), transparent 55%),
    var(--background);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body { margin: 0; }

::selection {
  background: rgba(234, 88, 12, 0.18);
  color: var(--foreground);
}

a { color: var(--link); text-decoration: none; }
a:visited { color: var(--link); }
a:hover { color: var(--foreground); text-decoration: underline; }

.shell {
  max-width: 48rem;
  margin: 0 auto;
  padding: 0.5rem 0.75rem 1.5rem;
}

/* ——— header ——— */

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 0.45rem 0 0.4rem;
  margin: -0.45rem 0 0.75rem;
  border-bottom: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--background) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--foreground);
  text-decoration: none;
  line-height: 0;
}
.brand-logo img {
  display: block;
  width: 1.5rem;
  height: auto;
  flex-shrink: 0;
}
.brand-logo:visited,
.brand-logo:hover { color: var(--foreground); }
.brand-name {
  color: var(--foreground);
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand-name:visited,
.brand-name:hover { color: var(--foreground); }
.nav-profile { min-width: 0; }
.nav-profile .avatar,
.nav-profile .avatar img {
  width: 1.75rem;
  height: 1.75rem;
}
.nav-profile .avatar-empty svg {
  width: 0.95rem;
  height: 0.95rem;
}
.nav-profile .profile-identity .strong { font-weight: 400; }

.nav-fields {
  flex: 1 1 12rem;
  display: flex;
  align-items: stretch;
  gap: 0.45rem;
  min-width: 0;
}
.nav-add,
.nav-search {
  flex: 1 1 0;
  position: relative;
  margin: 0;
  min-width: 0;
}
.nav-add-field {
  min-width: 0;
  position: relative;
}
.nav-add-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0.2rem 0.35rem;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
}
.nav-add-field input:focus + .nav-add-hint,
.nav-add-field input:not(:placeholder-shown) + .nav-add-hint {
  visibility: hidden;
}
.field-bar-submit-love {
  gap: 0.3rem;
  padding-inline: 0.6rem;
}
.field-bar-submit-icon {
  color: #dc2626;
  font-size: 0.95em;
  line-height: 1;
}
.nav-search input[type="search"] {
  appearance: none;
}
.nav-search input[type="search"]::-webkit-search-cancel-button {
  display: none;
}

.nav-tools {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.9rem;
  margin-left: auto;
}
.nav-tools form { margin: 0; display: inline; }

/* Three flex items sharing one row wrap wherever they land at 375px. Order them
   into two deliberate rows instead: identity and account, then the add box on a
   line of its own — it is the one control that wants the full width. */
@media (max-width: 40rem) {
  .top { gap: 0.4rem 0.5rem; }
  .brand-logo { order: 0; }
  .nav-tools { order: 1; }
  .nav-fields {
    order: 2;
    flex: 1 0 100%;
    flex-direction: column;
  }
}

/* ——— type ——— */

h1 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 0.4rem; }
h2 { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 0.4rem; }
h3 { font-size: 0.95rem; font-weight: 700; margin: 0.9rem 0 0.35rem; }
h3:first-child { margin-top: 0; }
p { margin: 0 0 0.4rem; }

.muted { color: var(--muted); }
.auth-context {
  margin-bottom: 0.35rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: -0.01em;
}
.dim { color: var(--dim); }
.strong { font-weight: 600; }
.hint { color: var(--muted); font-weight: 400; }
.ph { color: var(--muted); font-style: italic; }

main > h2:first-child,
.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  padding-bottom: 0.35rem;
  margin-bottom: 0.55rem;
  border-bottom: 1px solid var(--border);
}
main > h2:first-child + p,
main > h2:first-child + p + p {
  max-width: 42ch;
}
.section-label,
.layout > .main > h3,
.aside h3,
.top-matches-heading h3,
.circle > h3 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
  text-transform: lowercase;
  margin: 0.85rem 0 0.35rem;
}
.section-label:first-child,
.layout > .main > h3:first-child,
.aside h3:first-child,
.top-matches-heading h3:first-child,
.circle > h3:first-child {
  margin-top: 0;
}
.aside h3 {
  margin: 0 0 0.35rem;
}

/* ——— layout ——— */

.layout {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}
.layout > .main > h2.section-title {
  font-size: 1.05rem;
  padding-bottom: 0.35rem;
  margin-bottom: 0.55rem;
  border-bottom: 1px solid var(--border);
}
.profile-layout {
  margin-top: 0.85rem;
}
.loves-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}
.loves-heading.loves-after-shared { margin-top: 1rem; }
.love-view-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  font-size: 0.78rem;
}
.love-view-controls .link { color: var(--muted); }
.love-view-controls .link.is-active { color: var(--foreground); font-weight: 600; }
.sort-arrow { display: inline-block; min-width: 0.7em; color: var(--dim); }
.love-view-divider { color: var(--border-strong); }
[data-love-category-view][hidden],
[data-love-flat-view][hidden] { display: none !important; }
@media (max-width: 40rem) {
  .loves-heading { align-items: flex-start; flex-direction: column; gap: 0.2rem; }
}
.profile-head {
  position: relative;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.layout > .main { flex: 1; min-width: 0; }
.aside {
  flex: 0 0 14rem;
  width: 14rem;
  padding: 0.65rem 0.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  font-size: 0.9rem;
}
.aside input { width: 100%; margin-bottom: 0.25rem; }
.stack > * + * { margin-top: 0.65rem; }

.top-matches { margin-bottom: 0.2rem; }
.top-matches-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}
.top-matches-heading h3 { margin-bottom: 0.3rem; margin-top: 0; }
.match-list { margin: 0; padding: 0; list-style: none; }
.match-list li {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr) auto;
  gap: 0.25rem;
  align-items: baseline;
  padding: 0.16rem 0.25rem;
  border-top: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: background 0.12s;
}
@media (hover: hover) {
  .match-list li:hover,
  .matches-full-list li:hover {
    background: var(--muted-bg);
  }
}
.match-rank { color: var(--dim); font-variant-numeric: tabular-nums; }
.match-user { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-score { font-variant-numeric: tabular-nums; }
.match-note { margin: 0.35rem 0 0; font-size: 0.78rem; }
.match-more { display: inline-block; margin-top: 0.2rem; font-size: 0.85rem; }
.matches-profile-head { margin-bottom: 1.1rem; }
.matches-page-head { margin-bottom: 0.5rem; }
.matches-page-head h2 { margin-bottom: 0.05rem; }
.matches-page-head p { font-size: 0.85rem; }
.matches-full-list { max-width: 32rem; margin: 0; padding: 0; list-style: none; }
.matches-full-list li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  gap: 0.4rem;
  align-items: baseline;
  padding: 0.3rem 0.35rem;
  border-top: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: background 0.12s;
}
.matches-pagination { display: flex; gap: 0.75rem; margin-top: 0.75rem; align-items: baseline; }

.love-head {
  margin-bottom: 0.75rem;
  padding: 0.75rem 0.85rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.love-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.6rem;
  margin-bottom: 0.1rem;
}
.love-title-row h1 {
  margin: 0;
}
.love-title-row form {
  margin: 0;
}
.love-head h1 {
  margin-bottom: 0.1rem;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.love-stat {
  margin: 0 0 0.2rem;
  font-size: 0.85rem;
}
.love-count-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.24rem 0.58rem;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1;
  border-radius: var(--radius-full);
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.love-count-pill:not(.on) {
  color: var(--muted);
  background: var(--chip-gradient);
  border: 1px solid var(--chip-border);
}
.love-count-pill.on {
  color: var(--primary);
  background: var(--primary-subtle);
  border: 1px solid var(--primary-border);
}
.love-count-icon {
  font-size: 0.95rem;
  line-height: 1;
}
.love-count-num {
  font-variant-numeric: tabular-nums;
}
@media (hover: hover) {
  .love-count-pill:not(.on):hover {
    background: var(--chip-gradient-hover);
    border-color: var(--chip-border-hover);
    color: var(--foreground);
  }
  .love-count-pill.on:hover {
    background: var(--primary-hover-bg);
    border-color: var(--primary);
    color: var(--primary-hover);
  }
}
.love-count-pill.armed {
  color: var(--primary-fg);
  background: var(--primary);
  border-color: var(--primary);
}
.guest-line { margin-top: 0.55rem; max-width: 46ch; }
.love-head .guest-line {
  padding-top: 0.55rem;
  border-top: 1px solid var(--border);
}
.love-head-main {
  min-width: 0;
}
.love-head-main h1 { margin-bottom: 0.1rem; }

@media (max-width: 40rem) {
  .layout { flex-direction: column; gap: 1rem; }
  .layout.home-layout > .aside,
  .layout.love-layout > .aside {
    order: -1;
  }
  .aside {
    flex: none;
    width: auto;
  }
}

/* ——— forms / buttons ——— */

form { margin: 0.5rem 0; }
form.inline { display: inline; margin: 0; }

input, textarea, select {
  font: inherit;
  color: var(--foreground);
  background: var(--card);
  border: 1px solid var(--border);
  padding: 0.2rem 0.35rem;
  border-radius: var(--radius-field);
  max-width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 0.85;
}
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px var(--ring);
}
textarea { width: 100%; resize: vertical; display: block; }
.hidden { display: none !important; }
input[type="file"].hidden {
  display: block !important;
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
}

button {
  font: inherit;
  font-size: 0.9rem;
  color: var(--foreground);
  background: var(--card);
  border: 1px solid var(--border);
  padding: 0.15rem 0.5rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
button[type="submit"]:not(.link):not(.vote-btn):not(.love-toggle):not(.follow-toggle):not(.love-count-pill),
button.love-toggle:not(.on),
button.follow-toggle.on {
  background: var(--primary);
  color: var(--primary-fg);
  border-color: var(--primary);
}
button.love-toggle.on {
  color: var(--primary);
  background: var(--primary-subtle);
  border-color: var(--primary-border);
}
button.follow-toggle:not(.on) {
  color: var(--primary);
  background: var(--primary-subtle);
  border-color: var(--primary-border);
}
/* Hover stays behind a fine pointer. On touch, :hover sticks after a tap, and
   since .on is also filled the main CTA becomes unreadable — tapped or loved? */
@media (hover: hover) {
  button:not(.link):not(.toast-close):not(.lightbox-close):not(.lightbox-previous):not(.lightbox-next):not(.love-remove):not(.vote-btn):not(.media-x):not(.say-preview-remove):not([type="submit"]):not(.love-toggle):not(.follow-toggle):not(.field-bar-submit):hover {
    background: var(--primary-hover-bg);
    border-color: var(--primary-border);
    color: var(--primary-hover);
  }
  button[type="submit"]:not(.link):not(.vote-btn):not(.love-toggle):not(.follow-toggle):not(.love-count-pill):hover,
  .field-bar-submit:hover,
  button.love-toggle:not(.on):hover,
  button.follow-toggle.on:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: var(--primary-fg);
  }
  button.love-toggle.on:hover {
    background: var(--primary-hover-bg);
    border-color: var(--primary);
    color: var(--primary-hover);
  }
  button.follow-toggle:not(.on):hover {
    background: var(--primary-hover-bg);
    border-color: var(--primary);
    color: var(--primary-hover);
  }
}

button.link,
a.btn-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--link);
  text-decoration: none;
  font: inherit;
  font-size: inherit;
  cursor: pointer;
}
button.link:hover,
a.btn-link:hover { color: var(--foreground); background: none; text-decoration: underline; }

input,
textarea,
select,
button:not(.link):not(.toast-close):not(.lightbox-close):not(.lightbox-previous):not(.lightbox-next):not(.love-remove),
.chip,
.love-entry,
.avatar,
.avatar-btn,
.avatar-crop-box,
.avatar-crop canvas,
.avatar-view,
.confirm-dialog,
.meaning-dialog,
.say-preview img,
.say-preview-item .say-preview-remove,
.landing .google,
.dev-box,
.box,
.note,
.menu,
.load-more {
  border-radius: var(--radius);
}

.not-found,
.error-page {
  max-width: 38ch;
  margin-top: 1.25rem;
}
.not-found h2,
.error-page h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.not-found-path,
.error-path {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  word-break: break-word;
}
.not-found-links,
.error-links {
  margin-top: 0.75rem;
}
.error-add {
  margin-top: 0.85rem;
  max-width: 28rem;
  background: var(--muted-bg);
}
.error-pick {
  margin: 0.35rem 0 0.15rem;
  font-size: 1rem;
}
.guest-signup {
  margin-top: 1rem;
  max-width: 28rem;
}
.guest-signup-lead {
  margin: 0 0 0.45rem;
  font-weight: 600;
}
.error-page .or {
  position: relative;
  margin: 0.75rem 0;
  border-top: 1px solid var(--border);
}
.error-page .or span {
  position: absolute;
  top: -0.55rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 0.45rem;
  background: var(--background);
  color: var(--muted);
  font-size: 0.85rem;
}
.error-page .google {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  text-decoration: none;
}
.error-page .google:hover {
  background: var(--muted-bg);
  color: var(--foreground);
  text-decoration: none;
}
.error-page .google .g-logo {
  flex: none;
}

.row {
  display: flex;
  gap: 0.3rem;
  align-items: center;
  flex-wrap: wrap;
}
.row > input,
.row > textarea { flex: 1; min-width: 0; }

/* ——— field bars (input + submit in one pill) ——— */

.field-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-field);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.nav-add.field-bar,
.nav-search.field-bar,
.search-form.field-bar {
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.landing form .field-bar,
.note .field-bar {
  background: var(--muted-bg);
}
.field-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--ring);
}
.field-bar input {
  width: 100%;
  min-width: 0;
  margin: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0.15rem 0.2rem;
  line-height: 1.3;
  border-radius: var(--radius-field);
}
.field-bar input:focus-visible {
  border: none;
  box-shadow: none;
  outline: none;
}
.field-bar-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  flex-shrink: 0;
  margin: 0;
  padding: 0.32rem 0.75rem;
  line-height: 1.15;
  height: auto;
  min-height: 1.8rem;
  border-radius: var(--radius-field);
  white-space: nowrap;
  font-size: 0.85rem;
  background: var(--primary);
  color: var(--primary-fg);
  border: 1px solid var(--primary);
}

@media (max-width: 40rem) {
  .field-bar {
    padding: 0.28rem;
    gap: 0.4rem;
  }
  .field-bar input {
    padding: 0.18rem 0.15rem;
  }
  .field-bar-submit {
    padding: 0.38rem 0.8rem;
  }
}

/* ——— chips / loves ——— */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
}
.suggestion-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  border: 1px solid var(--chip-border);
  background: var(--chip-gradient);
  padding: 0.1rem 0.3rem 0.1rem 0.35rem;
  font-size: 0.85rem;
  line-height: 1.3;
  border-radius: var(--radius-full);
}
.suggestion-pill > a {
  order: 1;
  min-width: 0;
}
.suggestion-action {
  order: 2;
  flex-shrink: 0;
  width: 1rem;
  min-width: 1rem;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 0.9rem;
  line-height: 1;
  opacity: 0.45;
  transition: opacity 0.15s ease;
}
.suggestion-action:hover { color: var(--foreground); }
.suggestion-add:hover { color: var(--primary); }
.suggestion-dismiss { order: 3; }
@media (hover: hover) {
  .suggestion-pill:hover .suggestion-action,
  .suggestion-pill:focus-within .suggestion-action,
  .suggestion-action:focus-visible {
    opacity: 1;
  }
}
@media (max-width: 40rem), (hover: none) {
  .suggestion-action { opacity: 0.72; }
}
.chips.center { justify-content: center; }
.chip,
.love-entry,
.chips > a {
  display: inline-flex;
  gap: 0.25rem;
  align-items: center;
  border: 1px solid var(--chip-border);
  background: var(--chip-gradient);
  padding: 0.1rem 0.35rem;
  font-size: 0.85rem;
  line-height: 1.3;
  border-radius: var(--radius-full);
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
}
.chips > a {
  color: var(--foreground);
  text-decoration: none;
}
.love-entry a,
.chip a {
  color: inherit;
  text-decoration: none;
  min-width: 0;
  max-width: 16ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chips > a {
  min-width: 0;
  max-width: min(20ch, 100%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.love-entry a:hover,
.chip a:hover {
  color: inherit;
  text-decoration: none;
}
@media (hover: hover) {
  .chip:hover,
  .love-entry:hover,
  .chips > a:hover {
    background: var(--chip-gradient-hover);
    border-color: var(--chip-border-hover);
    color: var(--foreground);
    text-decoration: none;
    transform: translateY(-1px);
  }
}
.love-entry.have {
  background: var(--chip-gradient-have);
  border-color: var(--primary-border);
}
.love-entry .love-remove {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  line-height: 1;
}
.love-entry .love-remove:hover {
  color: inherit;
  opacity: 0.55;
  background: none;
  text-decoration: none;
}

.love-groups {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.love-group {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.45rem 0.55rem 0.5rem;
  background: var(--muted-bg);
}
.love-group-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: lowercase;
}
.love-group-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--love-group-dot, var(--muted));
}
.love-group[data-category="entertainment"] { --love-group-dot: hsl(352 42% 48%); }
.love-group[data-category="food"] { --love-group-dot: hsl(28 55% 48%); }
.love-group[data-category="nature"] { --love-group-dot: hsl(128 42% 42%); }
.love-group[data-category="places"] { --love-group-dot: hsl(160 38% 40%); }
.love-group[data-category="people"] { --love-group-dot: hsl(268 38% 52%); }
.love-group[data-category="activities"] { --love-group-dot: hsl(214 48% 46%); }
.love-group[data-category="tech"] { --love-group-dot: hsl(214 38% 52%); }
.love-group[data-category="things"] { --love-group-dot: hsl(45 50% 46%); }
.love-group[data-category="life"] { --love-group-dot: hsl(186 42% 40%); }
.love-group .chips { gap: 0.3rem 0.45rem; }

/* ——— feed ——— */

.feed { list-style: none; display: flex; flex-direction: column; gap: 0.35rem; }
.feed:not(.feed-cards) .feed-item {
  margin: 0;
  padding: 0.4rem 0.5rem;
  background: var(--muted-bg);
  border: 1px solid transparent;
  border-radius: var(--radius);
  box-shadow: none;
  transition: background 0.12s, border-color 0.12s;
}
@media (hover: hover) {
  .feed:not(.feed-cards) .feed-item:hover {
    background: var(--card);
    border-color: var(--border);
  }
}
.feed-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.45rem;
}
.feed-who {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem;
}
.feed-user {
  font-weight: 600;
  color: var(--foreground);
  text-decoration: none;
}
.feed-user:hover {
  color: var(--foreground);
  text-decoration: underline;
}
.feed-verb {
  color: var(--muted);
}
.feed-love {
  display: inline-flex;
  align-items: center;
  padding: 0.06rem 0.4rem;
  background: var(--chip-gradient);
  border: 1px solid var(--chip-border);
  border-radius: var(--radius-full);
  color: var(--foreground);
  font-size: 0.85rem;
  line-height: 1.3;
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s;
}
@media (hover: hover) {
  .feed-love:hover {
    background: var(--chip-gradient-hover);
    border-color: var(--chip-border-hover);
    color: var(--foreground);
    text-decoration: none;
  }
}
.feed-line .when {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--muted);
}
.feed-cards {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.feed-cards .feed-item {
  margin: 0;
  padding: 0.55rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.feed-cards .feed-item:not(.box) {
  border-bottom: none;
}
.feed-cards .feed-item.box {
  margin: 0;
}

.feed-home .feed-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.feed-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}
.feed-group-count {
  font-size: 0.8rem;
  white-space: nowrap;
}
.feed-group-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.feed-thought {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.feed-thought-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.feed-thought-link:hover .feed-thought-body {
  color: var(--foreground);
}
.feed-thought-body {
  margin: 0;
  color: var(--foreground);
  line-height: 1.4;
}
.feed-thought-media {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.25rem;
}
.feed-thought-media img {
  display: block;
  width: 5rem;
  height: 5rem;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.feed-thought-media-only img {
  width: min(100%, 14rem);
  height: auto;
  max-height: 14rem;
  aspect-ratio: 1;
}
.feed-thought-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.45rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.feed-thought-meta .feed-user {
  font-weight: 600;
  color: var(--foreground);
}
.feed-thought-meta .when {
  margin-left: auto;
}
.feed-tier {
  color: var(--primary);
  font-weight: 600;
}
.feed-group-more {
  font-size: 0.85rem;
}

.feed-item .feed-body {
  font-style: italic;
  margin-top: 0.25rem;
  padding: 0.35rem 0.45rem;
  background: var(--muted-bg);
  border-radius: var(--radius-sm);
  color: var(--foreground);
}

.circle {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.circle > h3 {
  margin: 0 0 0.35rem;
}
.circle-group {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}
.circle-label {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}
.circle-group .chips { gap: 0.3rem 0.45rem; }
.circle-group .people-more { margin: 0; }
.profile-view { font-size: 0.8rem; font-weight: 400; margin-left: 0.25rem; }

.profile-block {
  margin-bottom: 0.35rem;
}
.profile-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}
.profile-identity {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  min-width: 0;
  flex: 1;
}
.profile-identity .strong { margin: 0; }
.profile-bio { margin: 0.15rem 0 0; }
.profile-link {
  margin: 0.1rem 0 0;
  font-size: 0.9rem;
}
.profile-link a { word-break: break-word; }
.profile-head.headline {
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 0.85rem;
}
.profile-head .profile-identity-col {
  flex: 1;
  min-width: 0;
}
.profile-identity-main {
  width: 100%;
}
.profile-name-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 0.5rem;
}
.profile-topline {
  align-items: center;
}
.profile-identity-display h1 { margin: 0; }
.profile-identity-display .profile-bio { margin: 0.1rem 0 0; }
.profile-identity-display .profile-link { margin: 0.08rem 0 0; }
button.link.profile-edit {
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
}
.profile-form {
  display: grid;
  gap: 0.35rem;
  width: 100%;
}
.profile-form input,
.profile-form textarea {
  width: 100%;
}
.profile-form-actions {
  gap: 0.5rem;
}
.profile-identity-col {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
}
.profile-identity-col > .row {
  gap: 0.45rem;
}
.profile-actions {
  position: absolute;
  right: 0.75rem;
  top: 0.8rem;
  margin-top: 0;
  font-size: 0.78rem;
}
.profile-actions button,
.profile-actions a {
  font-size: inherit;
  padding: 0.08rem 0.35rem;
}
.profile-identity-col .row { margin-top: 0.1rem; }
.profile-account-actions {
  margin-left: auto;
  align-self: flex-start;
  flex: 0 0 auto;
  font-size: 0.75rem;
}
.profile-account-actions .link {
  color: var(--muted);
  padding: 0;
}
.profile-account-actions .link:hover {
  color: var(--foreground);
}
.profile-match {
  flex: 0 0 auto;
  margin: 0;
  white-space: nowrap;
}

.say-hi-panel {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.say-hi-panel[hidden] { display: none !important; }
.say-hi-hint {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
}
.say-hi-loves { margin-bottom: 0.5rem; }
.say-hi-love {
  position: relative;
  cursor: pointer;
}
.say-hi-love input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.say-hi-love span {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--chip-border);
  background: var(--chip-gradient);
  padding: 0.1rem 0.35rem;
  font-size: 0.85rem;
  line-height: 1.3;
  border-radius: var(--radius-full);
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
}
@media (hover: hover) {
  .say-hi-love:hover span {
    background: var(--chip-gradient-hover);
    border-color: var(--chip-border-hover);
    transform: translateY(-1px);
  }
}
.say-hi-love input:checked + span,
.say-hi-love input:focus-visible + span {
  border-color: var(--primary);
  background: var(--primary-subtle);
  transform: none;
}
.say-hi-compose { margin: 0; }

@media (max-width: 40rem) {
  .profile-actions {
    position: static;
    margin-top: 0.25rem;
  }
  .profile-match {
    margin-left: 0.35rem;
  }
  .profile-head .profile-account-actions {
    align-self: center;
  }
}
.profile-match {
  display: inline-block;
  padding: 0.06rem 0.45rem;
  background: var(--primary-subtle);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-full);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
}
.avatar-shell {
  display: flex;
  flex: 0 0 auto;
  position: relative;
}
.profile-block .avatar,
.profile-block .avatar-btn img,
.profile-block a.avatar img {
  width: 1.75rem;
  height: 1.75rem;
}
.avatar {
  display: block;
  width: 4rem;
  height: 4rem;
  object-fit: cover;
  border: 2px solid var(--card);
  box-shadow: 0 0 0 1px var(--border);
  background: var(--card);
  overflow: hidden;
}
a.avatar {
  text-decoration: none;
  color: inherit;
  line-height: 0;
  overflow: hidden;
}
a.avatar:hover,
a.avatar:focus-visible {
  background: var(--card);
  color: var(--foreground);
}
.headline .avatar {
  width: 3rem;
  height: 3rem;
}
.headline .avatar-btn img,
.headline .avatar-btn.avatar-empty {
  width: 3rem;
  height: 3rem;
}
.avatar-btn {
  padding: 0;
  cursor: pointer;
  line-height: 0;
  overflow: hidden;
}
.avatar-editable {
  position: relative;
  overflow: hidden;
}
.avatar-edit-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.08rem 0;
  font-size: 0.65rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: underline;
  color: var(--link);
  background: var(--card);
  opacity: 0;
  transition: opacity 0.12s ease;
}
.avatar-editable:hover .avatar-edit-hint,
.avatar-editable:focus-visible .avatar-edit-hint {
  opacity: 1;
}
/* Without hover there is no other cue that the avatar is editable at all. */
@media (hover: none) {
  .avatar-edit-hint { opacity: 1; }
}
@media (hover: hover) {
  a.avatar:hover,
  .avatar-btn:hover {
    box-shadow: 0 0 0 2px var(--ring);
  }
}
.avatar-btn:hover,
.avatar-btn:focus-visible {
  background: var(--card);
  color: inherit;
}
.avatar-btn img {
  display: block;
  width: 4rem;
  height: 4rem;
  object-fit: cover;
}
.profile-block .avatar-empty svg {
  width: 0.95rem;
  height: 0.95rem;
}
.avatar-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: var(--card);
}
.avatar-empty svg {
  display: block;
}
.avatar-empty:hover {
  color: var(--foreground);
  background: var(--card);
}
.avatar-crop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  padding: 1rem;
}
.avatar-crop-box {
  border: 1px solid var(--border);
  padding: 0.75rem;
  background: var(--card);
  max-width: 100%;
  box-shadow: var(--shadow-md);
}
.avatar-crop canvas {
  display: block;
  width: 16rem;
  height: 16rem;
  border: 1px solid var(--border);
  cursor: grab;
  touch-action: none;
}
.avatar-view {
  display: block;
  width: 16rem;
  height: 16rem;
  object-fit: cover;
  border: 1px solid var(--border);
}
.avatar-view-bar {
  justify-content: flex-end;
  margin-top: 0.35rem;
}
.avatar-crop canvas:active { cursor: grabbing; }
.avatar-crop-hint {
  margin: 0.4rem 0 0;
  text-align: center;
  font-size: 0.85rem;
}
.avatar-crop-bar {
  justify-content: space-between;
  align-items: center;
  margin-top: 0.35rem;
  gap: 0.75rem;
}
.avatar-crop-zoom {
  gap: 0.35rem;
}
.avatar-crop-zoom .link {
  font-size: 1.15rem;
  line-height: 1;
  min-width: 1.25rem;
  text-align: center;
}
.avatar-crop-actions {
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  padding: 1rem;
}
.confirm-dialog {
  border: 1px solid var(--border);
  background: var(--card);
  padding: 0.75rem;
  max-width: 20rem;
  box-shadow: var(--shadow-md);
}
.confirm-dialog p {
  margin: 0 0 0.5rem;
}
.confirm-actions {
  gap: 0.75rem;
  justify-content: flex-end;
}

/* ——— love meaning dialog ——— */

.meaning-dialog {
  border: 1px solid var(--border);
  background: var(--card);
  padding: 0.75rem;
  width: min(100%, 24rem);
  max-height: min(85vh, 32rem);
  overflow: auto;
  box-shadow: var(--shadow-md);
}
.meaning-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}
.meaning-dialog-head h2 {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 1rem;
  line-height: 1.3;
}
button.link.meaning-cancel {
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 400;
}
.meaning-dialog-intro {
  margin: 0 0 0.5rem;
}
.meaning-choices {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}
.meaning-choice {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 0.45rem 0.55rem;
  cursor: pointer;
  font: inherit;
  color: inherit;
  border-radius: var(--radius);
  transition: background 0.12s, border-color 0.12s, box-shadow 0.12s;
}
.meaning-choice:hover {
  background: var(--primary-subtle);
  border-color: var(--primary-border);
}
.meaning-choice-label {
  display: block;
  font-weight: 600;
  line-height: 1.3;
}
.meaning-choice-desc {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.85rem;
  line-height: 1.35;
}
.meaning-custom {
  border-top: 1px solid var(--border);
  padding-top: 0.55rem;
}
.meaning-custom-label {
  margin: 0 0 0.35rem;
}
.meaning-custom-row input {
  flex: 1;
  min-width: 0;
}
.meaning-custom-row button {
  flex-shrink: 0;
}

/* ——— comments ——— */

.comments {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.comment {
  list-style: none;
  margin: 0;
  padding: 0.4rem 0.5rem;
  background: var(--muted-bg);
  border: 1px solid transparent;
  border-radius: var(--radius);
  box-shadow: none;
}
@media (hover: hover) {
  .comments > .comment:hover {
    background: var(--card);
    border-color: var(--border);
  }
}
.comment.collapsed { opacity: 0.55; }
.comment .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.45rem;
  align-items: center;
  font-size: 0.8rem;
  margin-bottom: 0.15rem;
}
.comment .meta .user {
  font-weight: 700;
  color: var(--foreground);
  text-decoration: none;
}
.comment .meta .user:hover { text-decoration: underline; }
.comment .meta .meta-reply {
  color: var(--link);
  text-decoration: none;
  font-weight: 500;
}
.comment .meta .meta-reply:hover { text-decoration: underline; }
.comment .meta .vote-readonly {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-weight: 600;
}
.comment .body { margin-bottom: 0.1rem; word-break: break-word; }
.comment .edited-mark { font-size: 0.8rem; }
.comment .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.8rem;
  margin-top: 0.1rem;
}
.comment .vote {
  display: inline-flex;
  gap: 0.15rem;
  align-items: center;
  margin: 0 0 0 auto;
  padding: 0.05rem 0.35rem;
  background: var(--muted-bg);
  border-radius: var(--radius-full);
}
.comment .vote button {
  background: none;
  border: none;
  padding: 0;
  color: var(--link);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  line-height: 1;
}
.comment .vote button:hover { color: var(--foreground); background: none; }
.comment .vote button.on { font-weight: 700; background: none; border: none; }
.comment .vote button.up.on { color: var(--primary); }
.comment .vote button.down.on { color: #dc2626; }
.replies {
  list-style: none;
  margin: 0.35rem 0 0;
  padding-left: 0.65rem;
  border-left: 2px solid var(--primary-border);
}
.replies .comment {
  box-shadow: none;
  background: var(--card);
  border-color: var(--border);
}
.replies .comment:last-child { margin-bottom: 0; }
.say { margin: 0.4rem 0; }
.say-row {
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem 0.2rem 0.15rem 0.15rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.say-row:focus-within {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm), 0 0 0 2px var(--ring);
}
.say-row .say-media {
  flex: 0 0 auto;
  padding: 0.2rem;
  line-height: 0;
  color: var(--muted);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
}
@media (hover: hover) {
  .say-row .say-media:hover {
    color: var(--primary);
    background: var(--primary-subtle);
  }
}
.say-row textarea {
  min-height: 1.6rem;
  padding: 0.15rem 0.35rem;
  line-height: 1.3;
  border: none;
  background: transparent;
  box-shadow: none;
}
.say-row textarea:focus-visible {
  border: none;
  box-shadow: none;
  outline: none;
}
.say-row button[type="submit"] {
  border-radius: var(--radius);
  flex-shrink: 0;
}
.row + .comment-head { margin-top: 0.75rem; }
.love-layout > .main {
  padding-top: 0.15rem;
}
.love-discussion {
  padding: 0.65rem 0.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.love-discussion > .say:first-child {
  margin-top: 0;
}
.love-discussion > .comment-head:first-child {
  margin-top: 0;
}
.love-suggestions .chips {
  gap: 0.3rem 0.4rem;
}
.loved-by-more {
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
  line-height: 1.2;
}
.love-website { margin: 0.1rem 0 0; font-size: 0.85rem; }
.love-website details.website-report {
  display: inline;
  margin-left: 0.35rem;
}
.love-aside-util {
  margin-top: 0.15rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border);
}
.love-aside-util .website-report summary.section-label {
  cursor: pointer;
  display: inline-block;
  margin: 0 0 0.35rem;
}
.love-aside-util .website-report summary.section-label:hover {
  color: var(--foreground);
}
.love-website summary,
.website-report summary {
  list-style: none;
  cursor: pointer;
  display: inline;
  color: var(--dim);
  font-size: inherit;
  font-weight: 400;
  text-decoration: none;
}
.love-website summary {
  font-size: 0.75rem;
  opacity: 0.45;
  transition: opacity 0.12s ease, color 0.12s ease;
}
.love-website:hover summary,
.love-website:focus-within summary,
.love-website details[open] summary {
  opacity: 1;
}
.love-website summary:hover,
.website-report summary:hover {
  color: var(--muted);
  text-decoration: underline;
}
@media (max-width: 40rem), (hover: none) {
  .love-website summary { opacity: 0.65; }
}
.love-website summary::-webkit-details-marker,
.website-report summary::-webkit-details-marker { display: none; }
.love-website .website-report-form,
.love-aside-util .website-report-form { margin-top: 0.35rem; max-width: 100%; }
.comment-head + .say { margin-top: 0; }
.love-layout > .main > .say:first-child { margin-top: 0; }
.love-discussion > .muted {
  margin-top: 0.35rem;
  font-size: 0.85rem;
}
.say-preview {
  display: inline-flex;
  gap: 0.15rem;
  align-items: center;
  flex: 0 0 auto;
}
.say-preview[hidden] { display: none !important; }
.say-preview img {
  width: 1.5rem;
  height: 1.5rem;
  object-fit: cover;
  border: 1px solid var(--border);
}
.say-preview-item {
  position: relative;
  display: inline-flex;
}
.say-preview-item .say-preview-remove {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  width: 0.85rem;
  height: 0.85rem;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  font-size: 0.65rem;
  line-height: 1;
  text-decoration: none;
  padding: 0;
}
.say-preview-item .say-preview-remove:hover {
  background: var(--foreground);
  color: var(--card);
}
.say-row .say-inline {
  flex: 1;
  min-width: 0;
  min-height: 1.6rem;
  padding: 0.15rem 0.35rem;
  line-height: 1.3;
  resize: none;
}
.say-preview-remove {
  border: 0;
  background: none;
  color: var(--link);
  cursor: pointer;
  font-size: 0.85rem;
  text-decoration: underline;
  padding: 0;
  line-height: 1;
}
.say-status { margin: 0.15rem 0 0; font-size: 0.85rem; }

/* ——— sort tabs ——— */

.comment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0.9rem 0 0.35rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border);
}
.comment-head:first-child { margin-top: 0; }
.comment-head h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--foreground);
  letter-spacing: -0.01em;
  text-transform: none;
  border: 0;
  padding: 0;
}
.comment-head .sort {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.1rem;
  margin: 0 0 0 auto;
  padding: 0.12rem;
  background: var(--muted-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
}
.comment-head .sort a {
  padding: 0.08rem 0.4rem;
  border: none;
  background: none;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  border-radius: var(--radius-full);
  transition: background 0.12s, color 0.12s;
}
.comment-head .sort a:hover {
  color: var(--foreground);
  background: var(--card);
  text-decoration: none;
}
.comment-head .sort a.on {
  color: var(--foreground);
  font-weight: 600;
  text-decoration: none;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.sort-top-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.1rem;
}
.sort-ranges a {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.06rem 0.3rem;
  border-radius: var(--radius-full);
}
.sort-ranges a:hover {
  text-decoration: none;
  background: var(--card);
  color: var(--foreground);
}
.sort-ranges a.on {
  color: var(--foreground);
  font-weight: 600;
  text-decoration: none;
  background: var(--card);
}
.sort-sep {
  display: none;
}

/* ——— thumbs / gallery ——— */

.thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.thumbs.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
}
.thumbs.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.35rem;
}
.thumbs.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.25rem;
}
.thumbs.grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.2rem;
}
.thumbs img,
.thumb img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}
/* Grid cells reserve a square before the image loads. Without this the row
   height is unknown until each photo arrives and everything below it jumps. */
.thumbs.grid-2 img,
.thumbs.grid-3 img,
.thumbs.grid-4 img,
.thumbs.grid-5 img {
  aspect-ratio: 1;
  height: auto;
}
#photos .thumbs img {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.15s ease;
}
@media (hover: hover) {
  #photos .thumbs a:hover img,
  .thumb-wrap:hover .thumb img {
    transform: scale(1.02);
  }
}
.thumb {
  display: block;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.thumb img { width: 100%; height: 100%; transition: transform 0.15s ease; }
.thumb.lg { width: 6rem; height: 6rem; }
.thumb-wrap { position: relative; display: inline-block; }
.thumb-wrap .media-x {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  width: 1.1rem;
  height: 1.1rem;
  padding: 0;
  line-height: 1;
  font-size: 0.75rem;
  border-radius: 50%;
  background: var(--foreground);
  color: var(--card);
  border: none;
}
.thumb-wrap .media-x:hover { background: var(--muted); color: var(--card); }

@media (max-width: 40rem) {
  .comment-gallery {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 0.5rem;
    padding-bottom: 0.15rem;
    scrollbar-width: none;
  }
  .comment-gallery::-webkit-scrollbar { display: none; }
  .comment-gallery .thumb-wrap {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }
  .comment-gallery .thumb.lg {
    width: min(72vw, 16rem);
    height: min(72vw, 16rem);
  }
  #photos .thumbs.grid-4 {
    grid-template-columns: repeat(5, 1fr);
  }
}
figure { margin: 0; }

/* ——— landing ——— */

.landing {
  max-width: 40rem;
  margin: 1.75rem auto 1rem;
}
.landing .tagline {
  font-size: clamp(1.55rem, 3.6vw, 2.15rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 1.5rem;
  letter-spacing: -0.03em;
  max-width: 18ch;
  background: linear-gradient(135deg, var(--foreground) 20%, var(--primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.landing-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(11rem, 1fr);
  gap: 1.25rem 2.25rem;
  align-items: center;
  margin-bottom: 1.75rem;
}
.landing-copy {
  min-width: 0;
  max-width: 22rem;
  padding: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.landing-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 9rem;
  position: relative;
}
.landing-visual::before {
  content: "";
  position: absolute;
  inset: -2rem;
  background: radial-gradient(circle, rgba(234, 88, 12, 0.14), transparent 68%);
  pointer-events: none;
  z-index: -1;
}
/* Wider than the block heart on purpose: at -1rem the container cleared it by
   only 23px, so the small hearts landed on top of it instead of around it. */
.floating-hearts {
  position: absolute;
  inset: -2.25rem;
  pointer-events: none;
  user-select: none;
  z-index: 2;
}
/* Six hearts orbiting the big one — the same "other people love this too" idea
   the avatar photos carried, as text. The sprite they replaced was a 2.26 MB PNG
   painted into 45px circles; this is glyphs already in the font, so it weighs
   nothing and stays sharp at any zoom. */
.floating-heart {
  position: absolute;
  font-size: var(--heart-size, 1.15rem);
  line-height: 1;
  color: var(--heart-color, #ff7400);
  opacity: 0;
  animation:
    heart-pop 0.5s cubic-bezier(.2, .9, .25, 1.25) forwards,
    heart-drift 5.8s ease-in-out infinite;
  animation-delay: var(--pop-delay), calc(var(--pop-delay) + 0.5s);
  will-change: transform;
}
@keyframes heart-reveal {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes heart-pop {
  from { opacity: 0; transform: translateY(0.5rem) scale(0.35) rotate(var(--heart-rotation)); }
  to { opacity: 0.9; transform: translateY(0) scale(1) rotate(var(--heart-rotation)); }
}
/* Drift and breathe together, so the group reads as one motion rather than six.
   Kept on transform/opacity only — both composite without a repaint. */
@keyframes heart-drift {
  0%, 100% { transform: translateY(0) scale(1) rotate(var(--heart-rotation)); opacity: 0.9; }
  50% { transform: translateY(-0.5rem) scale(1.08) rotate(var(--heart-rotation)); opacity: 1; }
}
/* Placed in the gutters the block heart leaves free — left and right columns,
   top and bottom strips — so nothing sits on the artwork. */
.h-a { --heart-rotation: -8deg;  --pop-delay: 0.78s; --heart-color: #ff4800; --heart-size: 1.3rem;  top: 24%; left: 3%; }
.h-m { --heart-rotation: 9deg;   --pop-delay: 0.96s; --heart-color: #ff5e00; --heart-size: 1rem;    top: 1%;  right: 27%; }
.h-s { --heart-rotation: -13deg; --pop-delay: 1.14s; --heart-color: #ff8a00; --heart-size: 1.15rem; top: 61%; left: 6%; }
.h-j { --heart-rotation: 12deg;  --pop-delay: 1.32s; --heart-color: #ffa000; --heart-size: 0.9rem;  top: 29%; right: 3%; }
.h-p { --heart-rotation: 8deg;   --pop-delay: 1.50s; --heart-color: #ffb000; --heart-size: 1.2rem;  bottom: 2%;  left: 33%; }
.h-t { --heart-rotation: -10deg; --pop-delay: 1.68s; --heart-color: #ffc800; --heart-size: 1.05rem; bottom: 19%; right: 4%; }
.logo-ascii { position: relative; z-index: 1; animation: heart-reveal 0.65s ease-out both; }
@media (prefers-reduced-motion: reduce) {
  .floating-heart, .logo-ascii { animation: none; opacity: 0.9; transform: none; }
  .logo-ascii .r { animation: none; opacity: 1; transform: none; }
}
.landing form { text-align: left; margin: 0; }
.landing .or {
  position: relative;
  margin: 0.85rem 0;
  border-top: 1px solid var(--border);
}
.landing .or span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--background);
  padding: 0 0.4rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.landing .google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--foreground);
  margin: 0;
  background: var(--card);
}
.landing .google .g-logo {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}
.landing .google:hover { background: var(--muted-bg); color: var(--foreground); }

.landing-loves {
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
}
.landing-loves h3 {
  margin: 0.85rem 0 0.45rem;
}
.landing-loves .chips { gap: 0.35rem 0.65rem; }

.logo-ascii {
  margin: 0;
  user-select: none;
  font: 700 1.35rem/1.12 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.06em;
}
.logo-ascii .r {
  display: block;
  white-space: pre;
  text-align: center;
  opacity: 0;
  transform: translateY(0.4rem) scale(0.96);
  transform-origin: center;
  animation:
    ascii-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards,
    /* ease-out per segment, so the contraction snaps and the rest stays flat —
       ease-in-out would round the beat back into a breathe. */
    ascii-pulse 2.4s ease-out 0.95s infinite;
}
.logo-ascii .r1 { color: #ff4800; animation-delay: 0.02s, 1s; }
.logo-ascii .r2 { color: #ff5e00; animation-delay: 0.08s, 1s; }
.logo-ascii .r3 { color: #ff7400; animation-delay: 0.14s, 1s; }
.logo-ascii .r4 { color: #ff8a00; animation-delay: 0.20s, 1s; }
.logo-ascii .r5 { color: #ffa000; animation-delay: 0.26s, 1s; }
.logo-ascii .r6 { color: #ffb000; animation-delay: 0.32s, 1s; }
.logo-ascii .r7 { color: #ffbc00; animation-delay: 0.38s, 1s; }
.logo-ascii .r8 { color: #ffc800; animation-delay: 0.44s, 1s; }

@keyframes ascii-in {
  to {
    opacity: 1;
    transform: none;
  }
}
/* A real heartbeat, not a sine wave: lub, a short recoil, dub, then a long rest.
   The rest is most of the cycle — that pause is what makes it read as a pulse
   rather than as breathing. */
@keyframes ascii-pulse {
  0%   { transform: scale(1);     filter: brightness(1); }
  7%   { transform: scale(1.075); filter: brightness(1.22); }
  14%  { transform: scale(1.005); filter: brightness(1.03); }
  21%  { transform: scale(1.045); filter: brightness(1.13); }
  32%  { transform: scale(1);     filter: brightness(1); }
  100% { transform: scale(1);     filter: brightness(1); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .logo-ascii .r {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .chip:hover,
  .love-entry:hover,
  .chips > a:hover,
  #photos .thumbs a:hover img,
  .thumb-wrap:hover .thumb img {
    transform: none;
  }
}

@media (max-width: 40rem) {
  .landing { margin-top: 1rem; }
  .landing .tagline {
    font-size: 1.4rem;
    max-width: none;
    margin-bottom: 1.1rem;
  }
  .landing-split {
    grid-template-columns: 1fr;
    gap: 1.1rem;
    margin-bottom: 1.25rem;
  }
  .landing-visual {
    order: -1;
    min-height: 0;
    justify-content: flex-start;
  }
  .logo-ascii { font-size: 1.15rem; }
  /* The heart spans the viewport here, so there is no gutter left to orbit in —
     the small hearts were being clipped by both screen edges, which reads as a
     bug rather than as decoration. */
  .floating-hearts { display: none; }
  .landing-copy { max-width: none; }
}

.dev-box {
  margin-top: 1.25rem;
  padding: 0.65rem;
  border: 1px dashed var(--border);
  text-align: left;
}
.dev-box input { width: 100%; margin-bottom: 0.3rem; }

/* ——— boxes ——— */

.box {
  margin: 0.75rem 0;
  padding: 0.55rem;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius);
}
.box.warn {
  background: #fffbeb;
  border-color: var(--primary-border);
}
.note {
  margin: 0.75rem 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* ——— typeahead menu ——— */

.menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 40;
  margin-top: 1px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  max-height: 16rem;
  overflow: auto;
}
.menu[hidden] { display: none !important; }
.menu .row {
  display: block;
  padding: 0.3rem 0.45rem;
  cursor: pointer;
  text-decoration: none;
  color: var(--foreground);
  border: 0;
  background: none;
  width: 100%;
  text-align: left;
  font: inherit;
}
.menu .row-love,
.menu .row-add-love {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.15rem 0.4rem;
}
.menu .row-love .row-name,
.menu .row-add-love .row-name {
  min-width: 0;
}
.menu .row-meta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}
.menu .row-count {
  font-variant-numeric: tabular-nums;
}
.menu .row-yours {
  color: #dc2626;
  font-size: 0.85rem;
  line-height: 1;
}
.menu .row-add-love {
  margin-top: 0.15rem;
  padding: 0.4rem 0.45rem;
  background: var(--primary-subtle);
  border-top: 1px solid var(--primary-border);
  font-weight: 600;
}
.menu .row-add-love .row-add-label {
  color: var(--primary);
  white-space: nowrap;
}
.menu .row-add-love .row-name {
  color: var(--foreground);
  font-weight: 700;
}
.menu .row-add-love .row-add-note {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
}
.menu .row-add-love:hover,
.menu .row-add-love.on {
  background: var(--primary-hover-bg);
}
.menu .row:hover,
.menu .row.on { background: var(--muted-bg); }
.menu mark {
  background: var(--highlight);
  color: inherit;
  padding: 0;
  border-radius: 2px;
}
.menu .ctx {
  font-size: 0.8rem;
  color: var(--muted);
}
.menu .ctx.row-related-lead {
  flex: 0 0 100%;
}
.menu .n { margin-left: 0.15rem; color: var(--muted); }

/* ——— lightbox ——— */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 3rem;
}
.lightbox[hidden] { display: none !important; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.18s ease, transform 0.22s ease;
  will-change: opacity, transform;
}
.lightbox img.is-changing { animation: lightbox-image-in 0.24s ease both; }
@keyframes lightbox-image-in {
  from { opacity: 0.35; transform: scale(0.985); }
  to { opacity: 1; transform: scale(1); }
}
.lightbox-close,
.lightbox-previous,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.4rem 0.55rem;
  cursor: pointer;
}
.lightbox-close:hover,
.lightbox-previous:hover,
.lightbox-next:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.lightbox-close:focus-visible,
.lightbox-previous:focus-visible,
.lightbox-next:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}
.lightbox-close { top: 0.5rem; right: 0.5rem; }
.lightbox-previous { left: 0.4rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 0.4rem; top: 50%; transform: translateY(-50%); }
.lightbox-caption {
  position: absolute;
  left: 50%;
  right: auto;
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  width: min(42rem, calc(100% - 2rem));
  transform: translateX(-50%);
  padding: 0.7rem 1rem;
  color: #fff;
  font-size: 0.9rem;
  text-align: center;
  background: rgba(20, 20, 24, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 1rem;
  box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.28);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  backdrop-filter: blur(18px) saturate(125%);
  overflow-wrap: anywhere;
}
.lightbox-caption:empty { display: none; }
.lightbox-caption a { color: #fff; font-weight: 700; text-decoration: none; }
.lightbox-caption a:hover { text-decoration: underline; }
body[data-lightbox-open] { overflow: hidden; }

@media (max-width: 40rem) {
  .lightbox {
    padding: 2rem 0.25rem;
    padding-top: max(2rem, env(safe-area-inset-top));
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
  }
  .lightbox-caption {
    bottom: max(0.75rem, env(safe-area-inset-bottom));
    width: calc(100% - 1.25rem);
    padding: 0.65rem 0.8rem;
    font-size: 0.82rem;
    line-height: 1.35;
    border-radius: 0.85rem;
  }
  .lightbox img { touch-action: none; max-width: 100vw; max-height: 78vh; }
  .lightbox-close {
    top: max(0.5rem, env(safe-area-inset-top));
    right: max(0.5rem, env(safe-area-inset-right));
  }
}

/* ——— toast ——— */

#toast-container {
  position: fixed;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 300;
  display: grid;
  gap: 0.35rem;
}
.toast {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 10rem;
  max-width: 20rem;
  padding: 0.45rem 0.6rem;
  background: var(--card);
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
  opacity: 0;
  transform: translateY(0.4rem);
  transition: opacity 0.18s, transform 0.18s;
}
.toast-icon {
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 50%;
  background: var(--muted-bg);
  color: var(--muted);
}
.toast-success { border-left: 3px solid #22c55e; }
.toast-success .toast-icon { background: #dcfce7; color: #15803d; }
.toast-error { border-left: 3px solid #ef4444; }
.toast-error .toast-icon { background: #fee2e2; color: #b91c1c; }
.toast-warning { border-left: 3px solid #f59e0b; }
.toast-warning .toast-icon { background: #fef3c7; color: #b45309; }
.toast-info { border-left: 3px solid var(--primary); }
.toast-info .toast-icon { background: var(--primary-subtle); color: var(--primary); }
.toast.is-visible { opacity: 1; transform: none; }
.toast-close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--muted);
  padding: 0 0.15rem;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}
.toast-close:hover { background: var(--muted-bg); color: var(--foreground); }

/* ——— footer ——— */

.site-footer {
  margin-top: 1.25rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-links a,
.footer-links a:visited {
  color: var(--muted);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--foreground);
  text-decoration: underline;
}

.search-form {
  margin: 0.35rem 0 0.75rem;
  max-width: 24rem;
}

.search-section + .search-section {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}
.search-section .section-label {
  margin-top: 0;
}

.contact-form {
  display: grid;
  gap: 0.45rem;
  max-width: 24rem;
  margin: 0.5rem 0 0.65rem;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
}
.contact-form button {
  justify-self: start;
}

/* ——— misc ——— */

.headline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}
.headline h1 { margin: 0; }
.people-more summary {
  cursor: pointer;
  color: var(--link);
  text-decoration: underline;
  font-size: 0.85rem;
  list-style: none;
}
.people-more summary::-webkit-details-marker { display: none; }
.more-replies summary {
  cursor: pointer;
  color: var(--link);
  text-decoration: underline;
  font-size: 0.85rem;
}
ul { list-style: none; }
.load-more {
  display: inline-block;
  border: 1px solid var(--border);
  padding: 0.15rem 0.5rem;
  margin-top: 0.5rem;
  text-decoration: none;
  color: var(--foreground);
  background: var(--card);
}
@media (hover: hover) {
  .load-more:hover { background: var(--muted-bg); border-color: var(--border-strong); color: var(--foreground); }
}

/* ——— touch ———
   Barebone sizes everything for a mouse: 1rem is 14px here, so a default button
   lands at ~24px and a .link action at ~16px. These rules grow the hit area on
   touch pointers only, mostly with padding cancelled by a negative margin, so
   nothing moves visually — the layout stays as tight as it is on desktop. */

/* Under 16px, Safari iOS zooms the page on every focus. */
@media (max-width: 40rem) {
  input, textarea, select { font-size: 16px; }
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
}

@media (pointer: coarse) {
  button:not(.link):not(.avatar-btn):not(.love-remove):not(.media-x):not(.say-preview-remove):not(.toast-close):not(.lightbox-close):not(.lightbox-previous):not(.lightbox-next):not(.vote-btn):not(.meaning-choice):not(.field-bar-submit),
  .load-more,
  .landing .google {
    min-height: 44px;
    padding-block: 0.5rem;
  }

  /* Text actions: hit area grows, ink stays put. */
  .comment .actions { gap: 1rem; }
  .comment .actions .link,
  .comment .actions form .link {
    padding: 0.6rem 0.2rem;
    margin: -0.6rem -0.2rem;
  }

  /* Two opposite actions 2px apart at 11px is a mis-tap generator. */
  .comment .vote { gap: 0.6rem; }
  .comment .vote button {
    padding: 0.55rem 0.35rem;
    margin: -0.55rem -0.1rem;
    font-size: 0.95rem;
  }

  .chips a { padding-block: 0.35rem; }
  .love-entry .love-remove {
    min-width: 1.9rem;
    min-height: 1.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: -0.5rem -0.3rem -0.5rem 0;
  }

  .menu .row { padding: 0.6rem 0.45rem; }

  .thumb-wrap .media-x,
  .say-preview-item .say-preview-remove {
    width: 1.6rem;
    height: 1.6rem;
    font-size: 0.9rem;
  }

  .people-more summary,
  .more-replies summary,
  .website-report summary { padding-block: 0.5rem; }

  .footer-links { gap: 0.75rem 1rem; }
  .footer-links a { padding-block: 0.4rem; }
}

/* ——— admin ——— */

.admin-shell {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 0.75rem;
}
.admin-side { align-self: start; }
.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin: 0.25rem 0 0.5rem;
}
.admin-nav a {
  color: var(--foreground);
  text-decoration: none;
  padding: 0.1rem 0.25rem;
  border-radius: var(--radius);
}
.admin-nav a.on,
.admin-nav a:hover { background: var(--foreground); color: var(--card); }
.admin-nav .n { margin-left: 0.2rem; color: var(--muted); }
.admin-nav a.on .n,
.admin-nav a:hover .n { color: #d4d4d8; }
.admin-nav-sep { border: 0; border-top: 1px solid var(--border); margin: 0.35rem 0; }
.admin-back { font-size: 0.85rem; color: var(--muted); }
.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.admin-head h1 { font-size: 1rem; margin: 0; }
.admin-lead { color: var(--muted); font-size: 0.9rem; }
.admin-find { position: relative; margin: 0.35rem 0 0.75rem; }
.admin-find input { width: 100%; }
.admin-find .hint {
  position: absolute;
  right: 0.4rem;
  top: 0.35rem;
  font-size: 0.8rem;
  color: var(--border-strong);
}
.admin-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.admin-stats strong { display: block; }
.admin-stats span { color: var(--muted); font-size: 0.85rem; }
.admin-chart { height: 11rem; display: flex; align-items: end; gap: 3px; border-bottom: 1px solid var(--border-strong); padding: 0.75rem 0.15rem 0; background: repeating-linear-gradient(to top, transparent 0, transparent calc(25% - 1px), var(--border) 25%); }
.admin-chart-day { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: end; align-items: center; }
.admin-chart-bars { width: 100%; height: calc(100% - 1rem); display: flex; align-items: end; justify-content: center; gap: 2px; }
.admin-chart-bars i { display: block; width: 24%; min-height: 3px; background: var(--foreground); }
.admin-chart-bars .bar-loves { background: #777; }
.admin-chart-bars .bar-comments { background: #aaa; }
.admin-chart-bars .bar-media { background: var(--border-strong); }
.admin-chart-day small { height: 1rem; color: var(--muted); font-size: 0.65rem; }
.admin-legend { color: var(--muted); font-size: 0.8rem; margin-top: 0.35rem; }
.legend-users { color: var(--foreground); }.legend-loves { color: #777; }.legend-comments { color: #999; }.legend-media { color: #aaa; }
.admin-section { margin: 0.75rem 0; }
.admin-section-title,
.admin-section h2 {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 0.35rem;
}
.admin-row,
.admin-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.35rem;
  align-items: baseline;
  padding: 0.2rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.admin-meta,
.admin-kind,
.admin-body,
.admin-link { color: var(--muted); font-size: 0.85rem; }
.admin-item-main { display: flex; flex-wrap: wrap; gap: 0.15rem 0.4rem; align-items: baseline; }
.admin-item-actions { display: flex; gap: 0.35rem; align-items: center; }
.admin-comment-media { display: flex; gap: 0.25rem; flex-basis: 100%; margin-top: 0.25rem; }
.admin-comment-media img { width: 3rem; height: 3rem; object-fit: cover; display: block; }
.admin-inline { display: inline-flex; gap: 0.25rem; align-items: center; }
.admin-inline input { width: 4.5rem; }
.admin-photos {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.25rem;
}
.admin-photo img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}
.admin-suggest { display: inline-flex; gap: 0.3rem; }
.eyebrow { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.25rem; }

@media (max-width: 40rem) {
  .admin-shell { grid-template-columns: 1fr; }
}
