:root {
  --bg: #f5f8fa;
  --surface: #ffffff;
  --border: #e1e8ed;
  --text: #14171a;
  --muted: #657786;
  --accent: #5b9bd5;
  --accent-hover: #4a8bc4;
  --accent-wash: #e8f2fa;
  --accent-rgb: 91, 155, 213;
  --link: #4a7fb8;
  --danger: #e0245e;
  --repost: #17bf63;
  --radius-btn: 4px;
  --nav: 275px;
  --main: 600px;
  --aside: 350px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
html.accent-pink {
  --accent: #e85a9b;
  --accent-hover: #d14a8a;
  --accent-wash: #fde8f2;
  --accent-rgb: 232, 90, 155;
  --link: #c73e7a;
}
html.dark {
  --bg: #15202b;
  --surface: #192734;
  --border: #38444d;
  --text: #ffffff;
  --muted: #8899a6;
  --accent-wash: rgba(var(--accent-rgb), 0.12);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { font-size: 16px; }
body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.375;
}
a { color: var(--link); text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.shell {
  display: grid;
  grid-template-columns: var(--nav) var(--main) var(--aside);
  max-width: 1230px;
  margin: 0 auto;
  min-height: 100vh;
  align-items: start;
}
.left-nav {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 8px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.brand {
  display: flex;
  align-items: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  margin: 2px 0 6px;
  text-decoration: none;
}
.brand:hover { background: var(--accent-wash); text-decoration: none; }
.brand img { width: 34px; height: 34px; margin: auto; border-radius: 8px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px 10px 12px;
  border-radius: 999px;
  color: var(--text);
  font-size: 19px;
  font-weight: 400;
  text-decoration: none;
  position: relative;
}
.nav-item:hover { background: var(--accent-wash); text-decoration: none; color: var(--text); }
.nav-item.active { font-weight: 700; }
.nav-item.active .icon { color: var(--accent); }
.nav-item .icon { width: 26px; height: 26px; flex-shrink: 0; }
.badge {
  position: absolute;
  left: 28px;
  top: 8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  transition: transform 0.25s ease, background-color 0.25s ease;
}
.badge-pulse {
  animation: badge-pop 0.45s ease;
}
@keyframes badge-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.25); background: var(--repost); }
  100% { transform: scale(1); }
}
.notif-enter {
  animation: notif-slide-in 0.35s ease;
}
@keyframes notif-slide-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-btn);
  padding: 8px 16px;
  font-weight: 700;
  font-size: 14px;
}
.btn:hover { background: var(--bg); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; text-decoration: none; }
.btn-primary:disabled { opacity: .45; cursor: default; }
.btn-pill { border-radius: 999px; }
.btn-block { width: 100%; }
.nav-post {
  margin-top: 8px;
  width: 100%;
  padding: 12px;
  font-size: 16px;
}
.nav-spacer { flex: 1; }
.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
}
.nav-user:hover { background: var(--accent-wash); text-decoration: none; }
.nav-user small { color: var(--muted); display: block; font-weight: 400; }
.nav-user .user-badges {
  padding-bottom: 2px;
}
.nav-user .user-badge {
  width: 22px;
  height: 22px;
  border-radius: 4px;
}
.nav-user .user-badge-ace,
.nav-user .user-badge-fallback {
  font-size: 22px;
  line-height: 1;
}
.nav-logout-form { margin: 0; padding: 0 0 12px; width: 100%; box-sizing: border-box; }
.nav-logout-btn {
  width: 100%;
  box-sizing: border-box;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  text-align: left;
  color: var(--danger);
}
.nav-logout-btn:hover { background: rgba(224, 36, 94, .12); color: var(--danger); text-decoration: none; }

.main {
  background: var(--surface);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  min-height: 100vh;
  min-width: 0;
}
.page-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
}
html.dark .page-head { background: rgba(25,39,52,.92); }
.page-head h1 { font-size: 19px; margin: 0; font-weight: 800; }
.page-head .sub { color: var(--muted); font-size: 13px; font-weight: 400; }
.page-head-home {
  margin-bottom: 0;
  border-bottom: 0;
  padding-bottom: 8px;
}
.home-tabs {
  position: sticky;
  top: 52px;
  z-index: 19;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  margin-bottom: 0;
}
html.dark .home-tabs { background: rgba(25,39,52,.92); }
.home-algo-hint {
  margin: 0;
  padding: 8px 16px 4px;
  border-bottom: 1px solid var(--border);
}

.compose {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 8px solid var(--bg);
  border-bottom-color: var(--bg);
}
.compose-body { flex: 1; min-width: 0; }
.compose textarea {
  width: 100%;
  border: 0;
  resize: none;
  min-height: 56px;
  outline: none;
  font-size: 16px;
  background: transparent;
  color: var(--text);
}
.compose-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.compose-left { display: flex; gap: 4px; align-items: center; }
.icon-btn {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  border-radius: 999px;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-btn:hover { background: var(--accent-wash); }
.icon { width: 18px; height: 18px; display: block; }
.count { font-size: 13px; color: var(--muted); }
.count.warn { color: var(--accent); }
.count.over { color: var(--danger); font-weight: 700; }
.thumbs { display: grid; gap: 4px; margin-top: 8px; border-radius: 16px; overflow: hidden; }
.thumbs.n1 { grid-template-columns: 1fr; }
.thumbs.n2, .thumbs.n4 { grid-template-columns: 1fr 1fr; }
.thumbs.n3 { grid-template-columns: 1fr 1fr; }
.thumbs img,
.thumbs video { width: 100%; height: 160px; object-fit: cover; background: #000; cursor: pointer; }
.thumbs.n1 img,
.thumbs.n1 video { height: 280px; }
.thumbs.nsfw-blur { position: relative; }
.thumbs.nsfw-blur img,
.thumbs.nsfw-blur video {
  filter: blur(28px);
  transform: scale(1.08);
  pointer-events: none;
}
.thumbs.nsfw-blur .nsfw-reveal {
  position: absolute;
  inset: 0;
  z-index: 2;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
}
.thumbs.nsfw-blur .nsfw-reveal:hover { background: rgba(0, 0, 0, 0.55); }
.profile-nsfw-banner { border-radius: 0; }

.post {
  display: flex;
  gap: 10px;
  padding: 10px 16px 8px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  background: var(--surface);
  position: relative;
}
.post:has(.dropdown.open) {
  z-index: 30;
}
.post:has(.dropdown.open) .thumbs,
.post:has(.dropdown.open) .thumbs img,
.post:has(.dropdown.open) .thumbs video,
.cards-slide:has(.dropdown.open) .cards-video {
  pointer-events: none;
}
.post:hover { background: #f5f8fa; }
html.dark .post:hover { background: #1e2732; }
.post.unavailable { color: var(--muted); font-style: italic; cursor: default; }
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  object-fit: cover;
  background: var(--accent);
  flex-shrink: 0;
}
.avatar.sm { width: 32px; height: 32px; }
.avatar.lg { width: 140px; height: 140px; border: 4px solid var(--surface); margin-top: -70px; }
.post-main { flex: 1; min-width: 0; }
.context { color: var(--muted); font-size: 13px; margin-bottom: 2px; display: flex; align-items: center; gap: 6px; }
.context a { color: var(--link); }
.post-meta { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.post-meta .name {
  font-weight: 700;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
}
.post-meta .user-badges {
  padding-bottom: 1px;
}
.post-meta .user-badge {
  width: 22px;
  height: 22px;
  border-radius: 4px;
}
.post-meta .user-badge-ace,
.post-meta .user-badge-fallback {
  font-size: 22px;
  line-height: 1;
}
.post-meta .handle, .post-meta .dot, .post-meta time { color: var(--muted); font-size: 14px; }
.post-text { font-size: 15px; white-space: pre-wrap; word-wrap: break-word; margin: 2px 0 6px; }
.post-text a { color: var(--link); }
.quote {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 12px;
  margin: 6px 0;
}
.quote .post-text { font-size: 14px; }
.actions {
  display: flex;
  justify-content: space-between;
  max-width: 420px;
  margin-left: -8px;
}
.act {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  background: none;
  border: 0;
  padding: 6px;
  border-radius: 999px;
  min-width: 44px;
  min-height: 36px;
  font-size: 13px;
}
.act:hover { color: var(--accent); }
.act:hover .act-wrap { background: var(--accent-wash); }
.act.repost:hover, .act.repost.on { color: var(--repost); }
.act.like.on { color: var(--accent); }
.act.bm.on { color: var(--accent); }
.act-wrap { width: 32px; height: 32px; border-radius: 999px; display: flex; align-items: center; justify-content: center; }
.act-ico { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex-shrink: 0; }
.act-ico .icon { width: 18px; height: 18px; }
.ace-glyph {
  display: inline-block;
  width: 22px;
  height: 22px;
  background: url(/assets/icons/ace-outline-blue.png?v=2) center / contain no-repeat;
}
html.accent-pink .ace-glyph {
  background-image: url(/assets/icons/ace-outline-pink.png?v=2);
}
.act.like.on .ace-glyph,
.ace-glyph.is-solid {
  background-image: url(/assets/icons/ace-filled-blue.png?v=2);
}
html.accent-pink .act.like.on .ace-glyph,
html.accent-pink .ace-glyph.is-solid {
  background-image: url(/assets/icons/ace-filled-pink.png?v=2);
}
.act.like.is-acing .ace-glyph {
  animation: ace-pop 0.48s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes ace-pop {
  0% { transform: scale(1) rotate(0deg); }
  32% { transform: scale(1.38) rotate(-10deg); }
  58% { transform: scale(0.9) rotate(5deg); }
  100% { transform: scale(1) rotate(0deg); }
}
.act.bm.is-booking .act-ico {
  animation: bookmark-pop 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes bookmark-pop {
  0% { transform: scale(1) translateY(0); }
  38% { transform: scale(1.32) translateY(-5px); }
  68% { transform: scale(0.9) translateY(1px); }
  100% { transform: scale(1) translateY(0); }
}
.sheet-divider { border: 0; border-top: 1px solid var(--border); margin: 12px 0; }

.right {
  position: sticky;
  top: 0;
  padding: 12px 16px;
  height: 100vh;
  overflow: auto;
}
.search-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 16px;
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.search-box:focus-within {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.search-box input {
  border: 0;
  background: transparent;
  flex: 1;
  outline: none;
  color: var(--text);
  font-size: 15px;
}
.search-box input::placeholder { color: var(--muted); opacity: 1; }
.search-box .icon { color: var(--muted); flex-shrink: 0; }
.card {
  background: var(--bg);
  border-radius: 16px;
  margin-bottom: 16px;
  overflow: hidden;
}
.card h2 { font-size: 19px; margin: 0; padding: 12px 16px; }
.card .trend,
.card .trend-empty {
  margin: 0 12px 8px;
  border-radius: 12px;
}
.card .trend:last-child { margin-bottom: 12px; }
.trend {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  color: var(--text);
  text-decoration: none;
  border: 1px solid transparent;
  background: transparent;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.trend-group {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-color: rgba(var(--accent-rgb), 0.18);
  background: linear-gradient(145deg, var(--surface) 0%, rgba(var(--accent-rgb), 0.08) 100%);
}
.trend-group-media {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 2px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--accent), var(--accent-hover));
  box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.22);
}
.trend-group-media img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  background: var(--surface);
}
.trend-group-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.trend-chevron {
  flex-shrink: 0;
  font-size: 18px;
  line-height: 1;
  color: var(--accent);
  opacity: 0.35;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.who {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 16px;
  color: var(--text);
  text-decoration: none;
}
.trend:hover, .who:hover {
  text-decoration: none;
  color: var(--text);
}
.trend:not(.trend-group):hover {
  background: rgba(var(--accent-rgb), 0.08);
  border-color: rgba(var(--accent-rgb), 0.15);
}
.trend-group:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--accent-rgb), 0.38);
  box-shadow: 0 6px 14px rgba(var(--accent-rgb), 0.12);
  background: linear-gradient(145deg, var(--surface) 0%, rgba(var(--accent-rgb), 0.14) 100%);
}
.trend-group:hover .trend-chevron {
  opacity: 1;
  transform: translateX(2px);
}
.trend .k { color: var(--muted); font-size: 12px; line-height: 1.3; font-weight: 600; }
.trend .t { font-weight: 800; font-size: 14px; line-height: 1.3; }
.trend:not(.trend-group) .k:first-child {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
}
.trend-empty .k:last-child { font-weight: 400; }
.who .who-txt { flex: 1; min-width: 0; }
.who .name { font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; }
.who .handle { color: var(--muted); font-size: 13px; }

.follow-btn {
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  border-radius: 999px;
  padding: 6px 16px;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}
.follow-btn:hover { background: var(--accent-wash); }
.follow-btn.on { background: var(--accent); color: #fff; }

.profile-banner, .banner {
  height: 200px;
  background: var(--accent);
  background-size: cover;
  background-position: center;
}
.profile-head { padding: 0 16px 12px; }
.profile-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  min-height: 56px;
  position: relative;
  z-index: 3;
}
.profile-head h2 { margin: 0; font-size: 20px; }
.profile-head h2 .user-badges {
  padding-bottom: 2px;
}
.profile-head h2 .user-badge {
  width: 26px;
  height: 26px;
  border-radius: 5px;
}
.profile-head h2 .user-badge-ace,
.profile-head h2 .user-badge-fallback {
  font-size: 26px;
  line-height: 1;
}
.profile-head .handle { color: var(--muted); margin: 0 0 8px; }
.bio { margin: 0 0 8px; }
.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.profile-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-wash);
  color: var(--accent-hover);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.profile-tag:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}
.profile-details {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px 16px;
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}
.profile-detail { min-width: 0; }
.profile-detail dt {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .02em;
}
.profile-detail dd {
  margin: 2px 0 0;
  font-size: 15px;
  font-weight: 600;
}
.meta-row { color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 12px; }
.counts { display: flex; gap: 16px; margin-top: 10px; }
.counts a { color: var(--text); }
.counts strong { font-weight: 700; }
.profile-stats {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  margin-top: 12px;
}
.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  padding: 10px 8px;
  border-radius: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  background: linear-gradient(160deg, var(--surface) 0%, rgba(var(--accent-rgb), 0.1) 100%);
  color: var(--text);
  text-decoration: none;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.profile-stat:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--accent-rgb), 0.42);
  box-shadow: 0 6px 14px rgba(var(--accent-rgb), 0.12);
  text-decoration: none;
  color: var(--text);
}
.profile-stat strong {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--accent);
}
.profile-stat span {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Steam / connections */
.platform-games-tabs {
  margin-bottom: 12px;
}
.profile-games-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 12px;
  background: var(--surface);
}
.steam-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: var(--bg);
  border: 1px solid var(--border);
  max-width: 100%;
}
.steam-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  flex: 0 0 auto;
}
.steam-status-online .steam-status-dot,
.steam-status-dot.steam-status-online { background: #3dd68c; }
.steam-status-ingame .steam-status-dot,
.steam-status-dot.steam-status-ingame { background: #66c0f4; }
.steam-status-away .steam-status-dot,
.steam-status-dot.steam-status-away { background: #f0ad4e; }
.steam-status-offline .steam-status-dot,
.steam-status-dot.steam-status-offline { background: var(--muted); }
.steam-status-pill.steam-status-online { color: #1a7f4b; }
.steam-status-pill.steam-status-ingame { color: #1b6b9a; }
.steam-status-pill.steam-status-away { color: #9a6b1b; }
.steam-strip-icons {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.steam-strip-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--bg);
}
.profile-games-btn { margin-left: auto; }
.profile-games-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.profile-games-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.profile-games-stats { margin: 0 0 16px; }
.profile-games-showcase,
.profile-games-library {
  margin-bottom: 16px;
  padding: 14px;
}
.profile-games-showcase h2,
.profile-games-library h2 {
  margin: 0 0 12px;
  font-size: 16px;
}
.steam-showcase-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.steam-showcase-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
}
.steam-showcase-card img {
  width: 100%;
  aspect-ratio: 460 / 215;
  object-fit: cover;
  background: var(--surface);
}
.steam-showcase-card div { padding: 0 10px 10px; }
.steam-showcase-card strong { display: block; font-size: 14px; }
.steam-showcase-card small { color: var(--muted); font-size: 12px; }
.profile-games-library-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.steam-sort-form {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.steam-sort-form label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.steam-sort-form select {
  width: auto;
  min-width: 9.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  padding: 8px 36px 8px 12px;
  background-color: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23657786' d='M1.4.7 6 5.3 10.6.7 12 2.1l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
html.dark .steam-sort-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238899a6' d='M1.4.7 6 5.3 10.6.7 12 2.1l-6 6-6-6z'/%3E%3C/svg%3E");
}
.steam-sort-form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
  background-color: var(--surface);
}
.steam-sort-form select option {
  background: var(--surface);
  color: var(--text);
}
.steam-library-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.steam-library-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid transparent;
}
.steam-library-item:hover {
  border-color: var(--border);
  background: var(--bg);
}
.steam-library-item img {
  border-radius: 6px;
  flex: 0 0 auto;
}
.steam-library-meta { min-width: 0; }
.steam-library-meta strong {
  display: block;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.steam-library-meta small { color: var(--muted); font-size: 12px; }
.connection-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin: 0 0 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}
.connection-card.is-disabled { opacity: 0.65; }
.connection-card-main { min-width: 0; }
.connection-provider { display: block; font-size: 15px; }
.connection-linked,
.connection-hint {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}
.connection-card-actions { flex: 0 0 auto; }
.steam-pick-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow: auto;
  margin: 0 0 12px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.steam-pick-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}
.steam-pick-item:hover { background: var(--accent-wash); }
.steam-pick-item img { border-radius: 6px; }
.steam-pick-item span { min-width: 0; }
.steam-pick-item strong { display: block; font-size: 14px; }
.steam-pick-item small { color: var(--muted); font-size: 12px; }
.badge-showcase-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 12px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  max-height: 320px;
  overflow: auto;
}
.badge-showcase-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}
.badge-showcase-item:hover { background: var(--accent-wash); }
.badge-showcase-item .user-badge-lg {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
}
.badge-showcase-item span { min-width: 0; }
.badge-showcase-item strong { display: block; font-size: 14px; }
.badge-showcase-item small { color: var(--muted); font-size: 12px; }
.empty-block { padding: 24px 16px; text-align: center; }
.muted { color: var(--muted); }

.user-list-hint { margin-top: -8px; }
.tabs { display: flex; border-bottom: 1px solid var(--border); }
.tabs a {
  flex: 1;
  text-align: center;
  padding: 14px 8px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }
.tabs a:hover { background: var(--accent-wash); text-decoration: none; }
.history-filters a {
  font-size: 14px;
  padding: 10px 8px;
  font-weight: 600;
}
.history-sections + .history-filters {
  border-top: 0;
}

.user-row {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.notification-feed {
  padding: 8px 0 16px;
}
.notif {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  margin: 0 16px 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.notif:hover {
  text-decoration: none;
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}
.notif.unread {
  border-color: rgba(var(--accent-rgb), 0.28);
  background: linear-gradient(145deg, var(--surface) 0%, rgba(var(--accent-rgb), 0.1) 100%);
}
.notif-social.unread {
  box-shadow: inset 3px 0 0 var(--accent);
}
.notif-avatar {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}
.notif-body {
  flex: 1;
  min-width: 0;
}
.notif-line {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
}
.notif-line strong {
  font-weight: 800;
  margin-right: 4px;
}
.notif-line span {
  color: var(--text);
}
.notif-time {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.notif-achievement {
  border-color: rgba(23, 191, 99, 0.35);
  background: linear-gradient(135deg, rgba(23, 191, 99, 0.14) 0%, rgba(var(--accent-rgb), 0.1) 55%, var(--surface) 100%);
  box-shadow: 0 4px 18px rgba(23, 191, 99, 0.12);
}
.notif-achievement.unread {
  box-shadow: 0 4px 18px rgba(23, 191, 99, 0.16), inset 0 0 0 1px rgba(23, 191, 99, 0.2);
}
.notif-achievement-icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(145deg, var(--accent), var(--accent-hover));
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.35);
}
.notif-type-rank_up .notif-achievement-icon {
  background: linear-gradient(145deg, #f5b942, #e09b12);
  box-shadow: 0 4px 12px rgba(224, 155, 18, 0.35);
}
.notif-type-ace_win .notif-achievement-icon,
.notif-type-badge_earned .notif-achievement-icon {
  background: linear-gradient(145deg, var(--accent), #3d7ab8);
}
.notif-type-passport_complete .notif-achievement-icon,
.notif-type-stamp_earned .notif-achievement-icon {
  background: linear-gradient(145deg, #17bf63, #0d9f52);
}
.notif-achievement-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--repost);
  margin-bottom: 2px;
}
.notif-type-rank_up .notif-achievement-label {
  color: #c98a08;
}
.notif-achievement-msg {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}
.notif-enter {
  animation: notif-slide-in 0.35s ease;
}
.group-card {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
}
.group-card:hover { background: var(--accent-wash); text-decoration: none; color: var(--text); }

.form { padding: 16px; }
.form h3 { margin: 20px 0 0; font-size: 17px; }
.form h3.signal-heading { margin-top: 24px; }
.form .form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.settings-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px 24px;
  margin: 0;
  border-top: 1px solid var(--border);
}
.settings-links a {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.settings-links a:hover {
  border-color: var(--accent);
  background: var(--accent-wash);
  color: var(--accent-hover);
  text-decoration: none;
  box-shadow: 0 0 0 1px var(--accent-wash);
}
.settings-links a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-wash);
}

.main:has(.settings-page) {
  padding-left: 20px;
  padding-right: 20px;
}
.settings-page {
  overflow: hidden;
  margin-bottom: 24px;
}
.settings-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 20px 0;
  overflow-x: auto;
  scrollbar-width: thin;
  border-bottom: 1px solid var(--border);
  -webkit-overflow-scrolling: touch;
}
.settings-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 999px 999px 0 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
button.settings-tab {
  font: inherit;
}
.settings-tab:hover {
  color: var(--text);
  background: var(--accent-wash);
}
.settings-tab.active {
  color: var(--accent);
  background: var(--surface);
  border-color: var(--border);
  box-shadow: 0 -1px 0 var(--surface);
}
.settings-panels {
  padding: 0 16px 8px;
}
.settings-panel {
  padding: 16px 0 24px;
}
.settings-panel.form h2 {
  margin: 0 0 4px;
  font-size: 20px;
}
.settings-panel.form h3 {
  margin: 20px 0 8px;
  font-size: 16px;
}
.settings-subform {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.settings-links-inline {
  border-top: none;
  padding: 0 0 16px;
  justify-content: flex-start;
}
[x-cloak] { display: none !important; }
.legacy-form { border-top: 1px solid var(--border); margin-top: 8px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }

/* Form controls — same surface/border language as .btn, pink focus ring */
.field input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]):not([type=submit]):not([type=button]):not([type=image]),
.field textarea,
.field select,
.form input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]):not([type=submit]):not([type=button]):not([type=image]),
.form textarea,
.form select,
.form input[type=date],
.form input[type=number],
.staff-filters input:not([type=checkbox]):not([type=radio]),
.staff-filters select,
.auth-card input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]):not([type=submit]):not([type=button]),
.auth-card textarea,
.auth-card select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  padding: 10px 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  line-height: 1.375;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.field textarea,
.form textarea,
.auth-card textarea {
  min-height: 88px;
  resize: vertical;
}

.field select,
.form select,
.staff-filters select,
.auth-card select {
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23657786' d='M1.4.7 6 5.3 10.6.7 12 2.1l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
  cursor: pointer;
}

html.dark .field select,
html.dark .form select,
html.dark .staff-filters select,
html.dark .auth-card select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238899a6' d='M1.4.7 6 5.3 10.6.7 12 2.1l-6 6-6-6z'/%3E%3C/svg%3E");
}

.field input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]):focus,
.field textarea:focus,
.field select:focus,
.form input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]):focus,
.form textarea:focus,
.form select:focus,
.staff-filters input:not([type=checkbox]):not([type=radio]):focus,
.staff-filters select:focus,
.auth-card input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]):focus,
.auth-card textarea:focus,
.auth-card select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
  background: var(--surface);
}

.field input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden])::placeholder,
.field textarea::placeholder,
.form input::placeholder,
.form textarea::placeholder,
.auth-card input::placeholder,
.auth-card textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

.field input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]):disabled,
.field textarea:disabled,
.field select:disabled {
  opacity: .55;
  cursor: not-allowed;
  background: var(--bg);
}

.field input:-webkit-autofill,
.field textarea:-webkit-autofill,
.auth-card input:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  box-shadow: 0 0 0 1000px var(--accent-wash) inset;
  border-color: var(--accent);
  transition: background-color 9999s ease-out 0s;
}

.field input[type=file],
.form input[type=file],
.auth-card input[type=file] {
  padding: 8px;
  background: var(--bg);
  cursor: pointer;
}

/* Custom file picker — settings, groups, etc. */
.file-field { margin-bottom: 14px; }
.file-field .file-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}
.file-control {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  background: var(--surface);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.file-control:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.file-control input[type=file] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  background: transparent;
}
.file-btn {
  flex-shrink: 0;
  margin: 0;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  font-size: 13px;
  padding: 7px 14px;
  cursor: pointer;
}
.file-btn:hover {
  background: var(--accent-wash);
  text-decoration: none;
}
.file-name {
  flex: 1;
  min-width: 0;
  color: var(--muted);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-name.has-file {
  color: var(--text);
  font-weight: 600;
}

.field input[type=file]:not(.file-control input[type=file])::file-selector-button,
.form input[type=file]:not(.file-control input[type=file])::file-selector-button {
  margin-right: 10px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 7px 14px;
  background: transparent;
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.field input[type=file]:not(.file-control input[type=file])::file-selector-button:hover,
.form input[type=file]:not(.file-control input[type=file])::file-selector-button:hover {
  background: var(--accent-wash);
}

.field input[type=checkbox],
.form input[type=checkbox],
.staff-filters input[type=checkbox],
.form input[type=radio]:not(.choice-pill input) {
  width: auto;
  accent-color: var(--accent);
  cursor: pointer;
}

.help { color: var(--danger); font-size: 13px; }
.flash { padding: 10px 16px; background: var(--accent-wash); color: var(--accent-hover); }

.empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
}
.empty img { width: 72px; height: 72px; margin: 0 auto 12px; }
.empty h2 { color: var(--text); margin: 0 0 8px; }

.thread-focus { border-bottom: 1px solid var(--border); }
.thread-focus .post-text { font-size: 23px; line-height: 1.3; }
.thread-replies { border-bottom: 1px solid var(--border); }
.thread-children {
  border-left: 2px solid var(--border);
  margin-left: 24px;
}
.thread-branch.depth-1 .thread-children,
.thread-branch.depth-2 .thread-children,
.thread-branch.depth-3 .thread-children,
.thread-branch.depth-4 .thread-children,
.thread-branch.depth-5 .thread-children,
.thread-branch.depth-6 .thread-children {
  margin-left: 16px;
}
.thread-branch.depth-6 > .thread-children {
  margin-left: 0;
  border-left-color: transparent;
}

.mobile-top, .mobile-bottom, .fab { display: none; }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img { max-height: 90vh; max-width: 100%; }

.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-art {
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-art img { width: 160px; height: 160px; }
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--surface);
}
.auth-card { width: 100%; max-width: 380px; }
.auth-card h1 { font-size: 28px; margin: 12px 0 20px; }
.auth-logo { width: 48px; height: 48px; }
.auth-card .field { margin-bottom: 16px; }
.auth-card .btn { margin-top: 4px; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 60;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
}
.modal.open { display: flex; }
.modal-card {
  background: var(--surface);
  border-radius: 16px;
  width: min(600px, 100%);
  max-height: calc(100vh - 80px);
  overflow: auto;
}

@media (max-width: 1099px) {
  .shell { grid-template-columns: 72px minmax(0, 600px); max-width: 700px; }
  .right { display: none; }
  .nav-label, .nav-post span, .nav-user span { display: none; }
  .nav-item { justify-content: center; padding: 10px; }
  .nav-post { width: 46px; height: 46px; border-radius: 999px; padding: 0; margin-left: 4px; }
  .left-nav { padding: 8px 4px; }
}
@media (max-width: 767px) {
  .shell { display: block; padding-bottom: calc(56px + var(--safe-b) + 8px); }
  .left-nav, .right { display: none; }
  .main { border: 0; min-height: calc(100vh - 56px); }
  .mobile-top {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: calc(6px + var(--safe-t)) 12px 6px;
    align-items: center;
    gap: 10px;
    min-height: 48px;
  }
  .mobile-bottom {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 40;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding-bottom: var(--safe-b);
    justify-content: space-around;
  }
  .mobile-bottom a {
    flex: 1;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    position: relative;
  }
  .mobile-bottom a.active { color: var(--accent); }
  .fab {
    display: flex;
    position: fixed;
    right: 16px;
    bottom: calc(68px + var(--safe-b));
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    align-items: center;
    justify-content: center;
    z-index: 45;
    box-shadow: 0 1px 4px rgba(0,0,0,.3);
    text-decoration: none;
  }
  .fab:hover { background: var(--accent-hover); text-decoration: none; }
  .fab .ace-glyph {
    width: 28px;
    height: 28px;
    background-image: url(/assets/brand/spade-white-48.png);
  }
  .avatar.lg { width: 86px; height: 86px; margin-top: -48px; }
  .profile-banner { height: 140px; }
  .profile-stats { flex-wrap: wrap; }
  .profile-stat { flex: 1 1 calc(50% - 5px); width: auto; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { min-height: 180px; }
  .thumbs.n1 img,
  .thumbs.n1 video { height: 200px; }
  .thumbs img,
  .thumbs video { height: 120px; }
  .page-head { display: none; }
  body.is-ios-install .page-head { display: flex; }
  .home-tabs { top: 0; }
}
.more-menu { position: relative; z-index: 2; }
.more-menu:has(.dropdown.open) { z-index: 40; }
.dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  min-width: 160px;
  box-shadow: 0 1px 8px rgba(0,0,0,.12);
  display: none;
  z-index: 50;
}
.dropdown.open { display: block; }
.dropdown form { margin: 0; }
.dropdown button, .dropdown a {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border: 0;
  background: none;
  color: var(--text);
}
.dropdown button:hover, .dropdown a:hover { background: var(--bg); text-decoration: none; }
.dropdown button.is-copied { color: var(--repost); font-weight: 700; }
.dropdown-divider {
  height: 1px;
  margin: 4px 0;
  background: var(--border);
}
.page-head .more-menu {
  margin-left: auto;
}
.page-head .more-menu {
  flex-shrink: 0;
}
.danger { color: var(--danger) !important; }

/* Toggle switches */
.switch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
}
.switch-block {
  padding: 4px 0 8px;
}
.switch-block .switch-help {
  margin: 8px 0 0 56px;
}
.switch-help {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  max-width: 36rem;
}
.switch-inline {
  margin: 8px 0 14px;
}
.switch-compact {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.switch-compact:has(input:checked) {
  color: var(--text);
}
.switch-text {
  line-height: 1.3;
}
.switch input[type=checkbox] {
  position: relative;
  width: 44px;
  height: 24px;
  margin: 0;
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
  background: var(--border);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s ease, box-shadow .15s ease;
}
.switch input[type=checkbox]::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
  transition: transform .2s ease;
}
.switch input[type=checkbox]:checked {
  background: var(--accent);
}
.switch input[type=checkbox]:checked::before {
  transform: translateX(20px);
}
.switch input[type=checkbox]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.switch input[type=checkbox]:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* Pill radio choices — appearance theme picker */
.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 12px;
}
.choice-pill {
  cursor: pointer;
  user-select: none;
}
.choice-pill input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.choice-pill span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.choice-pill:hover span {
  border-color: var(--accent);
  background: var(--accent-wash);
}
.choice-pill input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.choice-pill input:focus-visible + span {
  box-shadow: 0 0 0 3px var(--accent-wash);
}

/* Staff panel */
.staff-bar { margin: 0 0 12px; padding: 12px 16px; background: var(--accent-wash); border-bottom: 1px solid var(--border); }
.staff-bar-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-bottom: 8px; }
.staff-badge { font-weight: 700; color: var(--accent-hover); display: flex; align-items: center; gap: 6px; }
.staff-role { color: var(--muted); font-size: 14px; }
.staff-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.staff-tab { padding: 6px 12px; border-radius: 999px; font-size: 14px; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--border); }
.staff-tab.active, .staff-tab:hover { background: var(--accent); color: #fff; border-color: var(--accent); text-decoration: none; }
.staff-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; padding: 0 16px 16px; }
.staff-stat { padding: 0 16px 16px; }
.main > .card.staff-stat { margin-left: 16px; margin-right: 16px; }
.main > h2 {
  margin: 16px 0 8px;
  padding: 0 16px;
  font-size: 17px;
}
.main > .form-hint {
  margin-left: 16px;
  margin-right: 16px;
  padding-left: 4px;
  max-width: 72ch;
}
.staff-stat h2 { font-size: 15px; margin: 0 0 8px; padding: 12px 0 0; }
.stat-num { font-size: 28px; font-weight: 800; margin: 0 0 8px; padding-left: 2px; color: var(--accent); line-height: 1.1; }
.stat-warn { color: var(--danger); font-size: 13px; margin: 0 0 8px; padding-left: 2px; }
.staff-stat .lockdown-list { margin: 0 0 12px; padding-left: 18px; }
.lockdown-status { font-weight: 700; }
.lockdown-status.is-off { color: var(--danger); }
.lockdown-status.is-on { color: var(--repost); }
.staff-stat .btn { display: flex; width: fit-content; margin: 2px auto 0; }
.staff-quick { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.staff-panel { margin: 12px 16px 16px; padding: 20px 16px 16px; }
.staff-panel h2 { font-size: 17px; margin: 0 0 12px; }
.staff-subtabs { margin-bottom: 12px; }
.staff-link-list { list-style: none; margin: 0; padding: 0; }
.staff-link-list li { padding: 6px 0; border-bottom: 1px solid var(--border); }

/* API documentation */
.api-docs { margin: 0 16px 24px; padding: 20px 16px; }
.api-docs h2 { font-size: 17px; margin: 28px 0 10px; padding: 0; }
.api-docs h2:first-child { margin-top: 0; }
.api-docs h3 { font-size: 15px; margin: 18px 0 8px; color: var(--text); }
.api-docs p, .api-docs li { font-size: 14px; line-height: 1.55; }
.api-docs ul, .api-docs ol { margin: 8px 0 12px; padding-left: 22px; }
.api-docs pre {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  overflow-x: auto;
  margin: 10px 0 16px;
  font-size: 12px;
  line-height: 1.5;
}
.api-docs pre code { white-space: pre; }
.api-docs table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 12px 0 16px; }
.api-docs th, .api-docs td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.api-docs th { font-weight: 700; background: var(--bg); }
.developers-docs-cta {
  margin: 0 16px 16px;
  text-align: center;
}
.developers-endpoint-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px 24px;
  margin: 12px 0 8px;
}
.developers-endpoint-grid ul {
  margin: 6px 0 0;
}
.page-head .sub { margin: 4px 0 0; font-size: 14px; }
.staff-note { padding: 10px 0; border-bottom: 1px solid var(--border); }
.staff-note:last-child { border-bottom: 0; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 12px; margin-bottom: 16px; }
.perm-check { font-size: 13px; display: flex; gap: 6px; align-items: flex-start; }
.perm-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.staff-table-wrap { overflow-x: auto; margin: 0 16px 16px; }
.staff-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.staff-table th, .staff-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.staff-table tr.priority-urgent { background: rgba(224,36,94,.08); }
.staff-table tr.priority-high { background: rgba(var(--accent-rgb), .08); }
.staff-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 16px 12px; padding: 12px; }
.staff-invite-form { padding: 16px; }
.staff-invite-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
}
.staff-invite-uses { margin: 0; min-width: 120px; max-width: 140px; }
.staff-invite-uses input[type=number] { width: 100%; }
.room-create-form { margin: 16px; padding: 16px; }
.room-create-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
}
.room-create-title { flex: 1 1 200px; margin: 0; min-width: 0; }
.room-create-hours { margin: 0; min-width: 100px; max-width: 120px; }
#bulk-form { margin: 0 16px 12px; padding: 12px 16px; }
#bulk-form .btn { margin-left: 8px; }
.staff-appeal-form { display: flex; flex-direction: column; gap: 6px; min-width: 180px; }
.staff-appeal-form input[type=text] { width: 100%; padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--radius-btn); background: var(--surface); }
.staff-appeal-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.appeal-body { max-width: 280px; font-size: 14px; }
.staff-stack { display: flex; flex-direction: column; gap: 12px; }
.staff-panel .staff-table-wrap { margin: 0; overflow-x: auto; }
.staff-table .cell-user strong { display: block; }
.staff-table .cell-user .handle { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.staff-table .cell-email { word-break: break-word; min-width: 160px; }
.staff-table .cell-actions { white-space: nowrap; width: 1%; }
.staff-detail-grid { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 0 16px 16px; }
@media (min-width: 900px) { .staff-detail-grid { grid-template-columns: 1fr 1fr; } }
.staff-dl dt { font-weight: 700; margin-top: 8px; }
.staff-dl dd { margin: 2px 0 0; color: var(--muted); }
.staff-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.btn-sm { font-size: 13px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; }
.inline-form { display: inline; }
.empty-cell { text-align: center; color: var(--muted); padding: 24px; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 4px; background: var(--bg); }

/* Site settings */
.site-form h2 { margin: 20px 0 8px; font-size: 17px; }
.site-form h2:first-child { margin-top: 0; }
.form-hint { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.site-preview { margin: 16px 0; padding: 12px; background: var(--bg); }
.site-preview h3 { margin: 0 0 8px; font-size: 15px; }
.flash-error { background: rgba(224,36,94,.12); color: var(--danger); }
.site-banner { padding: 10px 16px; text-align: center; font-size: 14px; background: var(--accent-wash); color: var(--accent-hover); border-bottom: 1px solid var(--border); }
.site-banner.tone-warn { background: rgba(255,193,7,.15); color: #856404; }
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 55; }
.sheet-backdrop[hidden], .sheet[hidden] { display: none !important; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  background: var(--surface); border-radius: 16px 16px 0 0;
  padding: 16px; max-height: 85vh; overflow: auto;
  box-shadow: 0 -4px 24px rgba(0,0,0,.15);
}
@media (min-width: 768px) {
  .sheet { left: 50%; transform: translateX(-50%); bottom: auto; top: 10vh; width: min(480px, 92vw); border-radius: 16px; }
}
.sheet-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sheet-form h3 { margin: 0 0 2px; font-size: 18px; }
.sheet-form textarea {
  width: 100%;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}
.sheet-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}
.sheet-form select {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}
.rank-pill { font-size: 12px; color: var(--accent); background: var(--accent-wash); padding: 2px 8px; border-radius: 999px; }
.rank-pill-lg {
  display: inline-block;
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-wash);
  padding: 4px 12px;
  border-radius: 999px;
}
.ace-mark { color: var(--accent); margin-left: 4px; }
.user-badges {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
  margin-left: 4px;
  vertical-align: middle;
  max-width: 100%;
}
.user-badge {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  object-fit: contain;
  vertical-align: middle;
  flex-shrink: 0;
  background: transparent;
}
img.user-badge {
  display: inline-block;
  max-width: none;
}
.user-badge-preview { width: 24px; height: 24px; }
.user-badge-lg { width: 48px; height: 48px; border-radius: 6px; }
.user-badge-ace,
.user-badge-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  color: var(--accent);
}
.badge-catalog-table-wrap { overflow-x: auto; }
.badge-catalog-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.badge-catalog-table th, .badge-catalog-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.badge-catalog-icon { width: 40px; }
.badge-catalog-empty { color: var(--muted); }
.badge-crop-wrap { max-width: 320px; }
.badge-crop-viewport {
  position: relative;
  width: 280px;
  height: 280px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  touch-action: none;
  cursor: grab;
}
.badge-crop-viewport:active { cursor: grabbing; }
.badge-crop-image { position: absolute; top: 0; left: 0; user-select: none; pointer-events: none; }
.badge-crop-frame {
  position: absolute;
  inset: 0;
  border: 2px solid var(--accent);
  border-radius: 12px;
  box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.badge-crop-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.badge-crop-controls input[type="range"] { flex: 1; min-width: 120px; }
.badge-conditions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
.badge-conditions-col h3 { font-size: 15px; margin: 0 0 8px; }
.badge-conditions-col h4 { font-size: 13px; margin: 12px 0 6px; color: var(--muted); }
.badge-condition-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.badge-condition-row input[type="number"], .badge-condition-row select { width: 90px; }
.badge-current-icon { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.field-hint { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
@media (max-width: 720px) {
  .badge-conditions-grid { grid-template-columns: 1fr; }
}
.resonance-glow { box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .35); }
.resonance-pill, .chain-pill, .lineage-pill { font-size: 11px; color: var(--accent); margin-left: 4px; }
.cascade-banner { background: var(--accent-wash); padding: 8px 12px; border-radius: 8px; margin-bottom: 8px; font-size: 14px; }
.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.chip-grid .choice-pill span { min-width: auto; }
.onboarding-panel { padding: 16px; }
.onboarding-form .form-hint { margin: 0 0 16px; }
.onboarding-form .btn { width: 100%; max-width: 280px; }
.echo-ambient { pointer-events: none; position: fixed; top: 72px; left: 50%; transform: translateX(-50%); width: 120px; height: 120px; border-radius: 50%; opacity: 0; z-index: 50; }
.echo-ambient.pulse { animation: echoPulse 1.2s ease-out; background: radial-gradient(circle, rgba(var(--accent-rgb), .35), transparent 70%); }
@keyframes echoPulse { from { opacity: .8; transform: translateX(-50%) scale(.6); } to { opacity: 0; transform: translateX(-50%) scale(1.4); } }
.post.echo-hit { animation: echoHit .8s ease-out; }
@keyframes echoHit { 0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .5); } 100% { box-shadow: 0 0 0 12px rgba(var(--accent-rgb), 0); } }
html.accent-pink .brand img,
html.accent-pink .auth-logo,
html.accent-pink .auth-art img,
html.accent-pink .empty img[src*="spade"],
html.accent-pink .notif img[src*="spade"],
html.accent-pink .group-card img[src*="spade"],
html.accent-pink .entity-card-avatar[src*="spade"],
html.accent-pink .error-page img[src*="spade"],
html.accent-pink img.avatar[src*="spade"],
.avatar-brand-pink {
  filter: hue-rotate(122deg) saturate(0.88) brightness(1.03);
}
@media (prefers-reduced-motion: reduce) { .echo-ambient.pulse, .post.echo-hit, .resonance-glow, .act.like.is-acing .ace-glyph, .act.bm.is-booking .act-ico { animation: none !important; } }
.legacy-profile { opacity: .92; }
.legacy-badge, .legacy-note { display: block; margin: 8px 0; padding: 10px; background: var(--bg); border-left: 3px solid var(--accent); }
.passport-album { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; padding: 16px; }
.stamp { border: 2px dashed var(--border); border-radius: 12px; padding: 16px 8px; text-align: center; min-height: 80px; }
.stamp.earned { border-color: var(--accent); background: var(--accent-wash); }
.archive-magazine .archive-entry { margin-bottom: 24px; border-bottom: 1px solid var(--border); padding-bottom: 16px; }
.chat-page {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 0px);
}
body.is-chat .main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
}
body.is-chat .chat-page {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.inbox-list { padding-bottom: 8px; }
.inbox-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
}
.inbox-row:hover {
  background: var(--accent-wash);
  text-decoration: none;
  color: var(--text);
}
.inbox-row .avatar { width: 52px; height: 52px; }
.inbox-body { flex: 1; min-width: 0; }
.inbox-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.inbox-top strong {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  font-size: 15px;
  font-weight: 700;
  min-width: 0;
}
.inbox-top time {
  color: var(--muted);
  font-size: 13px;
  flex-shrink: 0;
}
.inbox-row.unread .inbox-top strong { font-weight: 800; }
.inbox-row.unread time { color: var(--accent); font-weight: 700; }
.inbox-preview {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inbox-row.unread .inbox-preview { color: var(--text); font-weight: 600; }
.inbox-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  flex-shrink: 0;
  box-shadow: 0 0 0 4px var(--accent-wash);
}
.inbox-empty { padding: 64px 28px; }
.inbox-empty p { max-width: 32ch; margin: 0 auto; }

.chat-head {
  position: sticky;
  top: 0;
  z-index: 24;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  min-height: 56px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
html.dark .chat-head { background: rgba(25,39,52,.92); }
.chat-back {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.chat-back .icon { width: 22px; height: 22px; }
.chat-back:hover { background: var(--accent-wash); text-decoration: none; color: var(--text); }
.chat-peer {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
  flex: 1;
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
}
.chat-peer:hover { background: var(--accent-wash); text-decoration: none; color: var(--text); }
.chat-peer .avatar { width: 36px; height: 36px; }
.chat-peer span { min-width: 0; }
.chat-peer strong {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}
.chat-peer .handle {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.chat-thread {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background:
    radial-gradient(900px 280px at 50% -8%, rgba(var(--accent-rgb), 0.16), transparent 62%),
    var(--surface);
}
.chat-start {
  text-align: center;
  padding: 36px 16px 28px;
  color: var(--muted);
}
.chat-start-ava,
.chat-start img.avatar {
  width: 84px;
  height: 84px;
  border-radius: 999px;
  margin: 0 auto 14px;
  object-fit: cover;
  box-shadow: 0 0 0 4px var(--surface), 0 8px 24px rgba(var(--accent-rgb), 0.22);
}
.chat-start h2 { margin: 0; color: var(--text); font-size: 22px; font-weight: 800; }
.chat-start .handle { margin: 4px 0 12px; color: var(--muted); font-size: 14px; }
.chat-start p { margin: 0 auto; max-width: 28ch; font-size: 14px; line-height: 1.45; }

.chat-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  align-self: stretch;
}
.chat-row.theirs { justify-content: flex-start; }
.chat-row.mine { justify-content: flex-start; flex-direction: row-reverse; }
.chat-row.lead { margin-top: 10px; }
.chat-thread > .chat-row:first-child,
.chat-thread > .chat-start + .chat-row { margin-top: 0; }
.chat-ava,
.chat-ava-spacer {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.chat-ava { border-radius: 999px; object-fit: cover; }

.chat-bubble {
  flex: 0 0 50%;
  width: 50%;
  max-width: 50%;
  box-sizing: border-box;
  padding: 9px 14px 8px;
  border-radius: 18px;
  line-height: 1.35;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.chat-bubble p { margin: 0; font-size: 15px; white-space: pre-wrap; word-break: break-word; }
.chat-bubble .chat-caption { font-size: 13px; opacity: .8; }
.chat-bubble time {
  display: block;
  font-size: 11px;
  margin-top: 4px;
  letter-spacing: 0.01em;
}
.chat-bubble.theirs {
  background: var(--bg);
  color: var(--text);
  border-bottom-left-radius: 18px;
}
.chat-bubble.theirs.tail { border-bottom-left-radius: 5px; }
.chat-bubble.theirs time { color: var(--muted); }
html.dark .chat-bubble.theirs { background: #22303c; }
.chat-bubble.mine {
  background: linear-gradient(165deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #fff;
  border-bottom-right-radius: 18px;
  box-shadow: 0 8px 18px rgba(var(--accent-rgb), 0.2);
}
.chat-bubble.mine.tail { border-bottom-right-radius: 5px; }
.chat-bubble.mine time { color: rgba(255,255,255,.78); }
.chat-media {
  display: block;
  max-width: 240px;
  border-radius: 12px;
  margin: 0 0 6px;
}
.chat-typing {
  padding: 4px 16px 0;
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
}
.profile-badges {
  padding: 16px 16px 0;
}
.profile-badge-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.profile-badge-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 18px 20px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.profile-badge-item > .user-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 6px;
  line-height: 1;
}
.profile-badge-item > .user-badge:not(img) {
  font-size: 24px;
}
.profile-badge-item > .user-badge-ace,
.profile-badge-item > .user-badge-fallback {
  font-size: 22px;
}
.profile-badge-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.chat-compose {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px calc(10px + var(--safe-b));
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}
.chat-compose input[type=text] {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 999px;
  padding: 11px 16px;
  outline: none;
}
.chat-compose input[type=text]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.chat-send {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 0;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.28);
}
.chat-send .icon { width: 18px; height: 18px; }
.chat-send:hover { background: var(--accent-hover); }
.chat-send:disabled { opacity: .45; cursor: default; }
.chat-attach {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
}
.chat-attach:hover { color: var(--accent); background: var(--accent-wash); }
.chat-attach .icon { width: 20px; height: 20px; }
.staff-badge-list { list-style: none; margin: 0; padding: 0; }
.staff-badge-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.staff-badge-list li:last-child { border-bottom: 0; }

body.is-messages .fab { display: none !important; }

@media (max-width: 767px) {
  body.is-chat .shell {
    padding-bottom: calc(56px + var(--safe-b));
  }
  body.is-chat .main {
    min-height: calc(100dvh - 56px - var(--safe-b));
    height: calc(100dvh - 56px - var(--safe-b));
  }
  body.is-chat .chat-head { display: flex; }
  .inbox-head { display: flex; margin-bottom: 0; padding-bottom: 12px; }
}
.discovery-rail { padding: 12px 16px 4px; }
.discovery-rail h2 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.discovery-rail .rail-scroll {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  overflow-x: visible;
  padding-bottom: 8px;
}
.entity-card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 16px 16px;
}
.entity-card-list--rail {
  padding: 0;
}
.entity-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  background: linear-gradient(145deg, var(--surface) 55%, rgba(var(--accent-rgb), 0.08) 100%);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.entity-card:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--accent-rgb), 0.42);
  background: linear-gradient(145deg, var(--surface) 40%, rgba(var(--accent-rgb), 0.14) 100%);
  box-shadow: 0 8px 20px rgba(var(--accent-rgb), 0.14);
  text-decoration: none;
  color: var(--text);
}
.entity-card-media {
  position: relative;
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  padding: 2px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--accent), var(--accent-hover));
  box-shadow: 0 4px 10px rgba(var(--accent-rgb), 0.25);
}
.entity-card-media-live {
  background: linear-gradient(145deg, #17bf63, #0d9f52);
  box-shadow: 0 4px 10px rgba(23, 191, 99, 0.28);
}
.entity-live-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #17bf63;
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 2px rgba(23, 191, 99, 0.35);
  animation: live-pulse 1.8s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.85; }
}
.entity-card-avatar {
  width: 100%;
  height: 100%;
  border-radius: 11px;
  object-fit: cover;
  display: block;
  background: var(--surface);
}
.entity-card-body {
  flex: 1;
  min-width: 0;
}
.entity-card-title {
  display: block;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
}
.entity-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.entity-chip {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.14);
  color: var(--accent);
}
.entity-chip-muted {
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--border);
}
.entity-chip-live {
  background: rgba(23, 191, 99, 0.14);
  color: #0d9f52;
}
html.dark .entity-chip-live { color: #3ddc84; }

/* Gaming hub */
.gaming-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 16px 10px;
}
.gaming-section-head h2 {
  font-size: 15px;
  margin: 0;
}
.gaming-live-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 16px 12px;
  scrollbar-width: thin;
}
.gaming-live-card {
  position: relative;
  flex: 0 0 auto;
  width: 92px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  padding: 8px 6px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.gaming-live-card .avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin: 0 auto 6px;
  display: block;
}
.gaming-live-dot {
  position: absolute;
  top: 44px;
  right: 22px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #66c0f4;
  border: 2px solid var(--surface);
}
.gaming-live-card strong {
  display: block;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gaming-live-card small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gaming-empty-inline { margin: 0 16px 12px; }
.gaming-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 16px 14px;
}
.gaming-stat {
  min-width: 72px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.gaming-stat strong { display: block; font-size: 18px; }
.gaming-stat span { font-size: 12px; color: var(--muted); }
.gaming-stat-wide { flex: 1 1 140px; }
.gaming-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 12px;
  align-items: center;
}
.gaming-game-chips {
  display: contents;
}
.gaming-chips a.choice-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.2;
  cursor: pointer;
}
.gaming-chips a.choice-pill span {
  display: inline;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}
.gaming-chips a.choice-pill:hover {
  border-color: var(--accent);
  background: var(--accent-wash);
}
.gaming-chips a.choice-pill.on,
.gaming-chips a.choice-pill.on:hover {
  background: rgba(var(--accent-rgb), 0.18);
  border-color: rgba(var(--accent-rgb), 0.45);
  color: var(--accent);
}
.gaming-chip-icon {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  object-fit: cover;
  flex: 0 0 18px;
  background: var(--bg);
}
.gaming-tabs { padding: 0 16px; }
.gaming-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 0 0 8px;
}
.gaming-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 4px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
  text-decoration: none;
  font-size: 12px;
  font-weight: 650;
}
.gaming-chip img {
  width: 18px;
  height: 18px;
  border-radius: 4px;
}
.gaming-kind-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
}
.gaming-lfg-badge {
  color: #0d9f52;
  border-color: rgba(23, 191, 99, 0.35);
  background: rgba(23, 191, 99, 0.12);
}
.compose-gaming-tools {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 10px;
}
.compose-gaming-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.compose-game-select,
.compose-game-name {
  flex: 1 1 160px;
  min-width: 140px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: inherit;
  font: inherit;
}

.entity-card-desc {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.entity-card-chevron {
  flex-shrink: 0;
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  color: var(--accent);
  opacity: 0.35;
  transform: translateX(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.entity-card:hover .entity-card-chevron {
  opacity: 1;
  transform: translateX(0);
}
.section-heading {
  padding: 16px 16px 10px;
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.rail-scroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.spotlight-banner, .rank-up-banner { background: var(--accent-wash); padding: 12px 16px; text-align: center; }
.interest-label { padding: 8px 16px; color: var(--accent); font-size: 14px; }
.countdown-pill { font-size: 13px; color: var(--accent); }
.ace-checklist {
  list-style: none;
  margin: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ace-checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid var(--border);
}
.ace-checklist li::before {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}
.ace-checklist li.ok {
  color: var(--repost);
  background: rgba(23, 191, 99, 0.1);
  border-color: rgba(23, 191, 99, 0.35);
}
.ace-checklist li.ok::before {
  content: "✓";
  color: #fff;
  background: var(--repost);
}
.ace-checklist li.pending {
  color: var(--danger);
  background: rgba(224, 36, 94, 0.08);
  border-color: rgba(224, 36, 94, 0.25);
}
.ace-checklist li.pending::before {
  content: "✗";
  color: #fff;
  background: var(--danger);
}
.ace-progress-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 0 16px 8px;
  padding: 4px 0 8px;
}
.ace-stat-pill {
  flex: 1 1 140px;
  max-width: 180px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: center;
}
.ace-stat-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 4px;
}
.ace-stat-value {
  display: block;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}
.ace-stat-pill.ok {
  border-color: rgba(23, 191, 99, 0.35);
  background: rgba(23, 191, 99, 0.1);
}
.ace-stat-pill.ok .ace-stat-label,
.ace-stat-pill.ok .ace-stat-value {
  color: var(--repost);
}
.ace-stat-pill.pending .ace-stat-value {
  color: var(--text);
}
.ace-progress-hint {
  margin: 0 16px 20px;
  padding: 0 8px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.main > .card.invite-panel {
  margin-left: 16px;
  margin-right: 16px;
  padding: 16px;
}
.invite-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 4px;
}
.invite-stat-pill {
  flex: 1 1 140px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  background: var(--accent-wash);
  text-align: center;
}
.invite-stat-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 4px;
}
.invite-stat-value {
  display: block;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--accent);
}
.invite-create-form { margin-top: 12px; }
.invite-code-row { align-items: center; }
.invite-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-wash);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 8px;
  padding: 4px 10px;
  line-height: 1.4;
}
.invite-code:hover {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.18);
}
.invite-code.is-copied {
  color: var(--repost);
  border-color: rgba(23, 191, 99, 0.45);
  background: rgba(23, 191, 99, 0.12);
}
.invite-uses {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}
.invite-code-row .btn { margin-left: auto; }

/* —— Cards (vertical video feed) —— */
body.is-cards {
  overflow: hidden;
}
body.is-cards .shell {
  grid-template-columns: var(--nav) minmax(0, 1fr);
  max-width: none;
  width: 100%;
  align-items: stretch;
}
body.is-cards .right { display: none; }
body.is-cards .main {
  max-width: none;
  width: 100%;
  margin: 0;
  border: 0;
  padding: 0;
  min-height: 100dvh;
  background: var(--bg);
}
body.is-cards .page-head { display: none; }
body.is-cards .fab {
  bottom: calc(68px + var(--safe-b));
}
.cards-feed {
  height: 100dvh;
  max-height: 100dvh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  background: var(--bg);
  position: relative;
}
.cards-slide {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  height: 100%;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  box-sizing: border-box;
}
.cards-stage {
  position: relative;
  width: 100%;
  height: 100%;
  background: #0a0e12;
  overflow: hidden;
}
@media (max-width: 1099px) {
  body.is-cards .shell {
    grid-template-columns: 72px minmax(0, 1fr);
    max-width: none;
  }
}
@media (min-width: 768px) {
  body.is-cards .shell { padding-bottom: 0; }
  .cards-slide {
    height: 100dvh;
    min-height: 100dvh;
    padding: 32px 0;
  }
  .cards-stage {
    width: min(420px, 100%);
    height: 100%;
    border-radius: 16px;
  }
}
@media (max-width: 767px) {
  body.is-cards .shell {
    display: block;
    max-width: none;
    padding-bottom: 0;
  }
  body.is-cards .main {
    min-height: calc(100dvh - 56px - var(--safe-b));
    height: calc(100dvh - 56px - var(--safe-b));
  }
  .cards-feed {
    height: calc(100dvh - 56px - var(--safe-b));
    max-height: calc(100dvh - 56px - var(--safe-b));
  }
  .cards-slide {
    height: 100%;
    min-height: 100%;
    padding: 0;
  }
  .cards-stage {
    width: 100%;
    height: 100%;
    border-radius: 0;
  }
}
.cards-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.cards-overlay {
  position: absolute;
  left: 0;
  right: 72px;
  bottom: 0;
  padding: 48px 16px 20px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  color: #fff;
  pointer-events: none;
  z-index: 2;
}
.cards-overlay a,
.cards-overlay button { pointer-events: auto; }
.cards-author {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  margin-bottom: 8px;
}
.cards-author strong { display: block; font-size: 15px; font-weight: 700; }
.cards-author .handle { color: rgba(255, 255, 255, 0.72); font-size: 13px; }
.cards-caption {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
  color: #fff;
  max-height: 4.2em;
  overflow: hidden;
}
.cards-caption a { color: #fff; text-decoration: underline; }
.cards-actions {
  position: absolute;
  right: 10px;
  bottom: 24px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.cards-actions .act {
  color: #fff;
  flex-direction: column;
  gap: 2px;
  min-width: 48px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}
.cards-actions .act.like.on { color: var(--accent); }
.cards-actions .act.repost.on { color: var(--repost); }
.cards-actions .act.bm.on { color: var(--accent); }
.cards-actions .act-count { color: #fff; font-size: 12px; }
.cards-actions .cards-sound.on { color: var(--accent); }
.cards-actions .more-menu .icon-btn,
.cards-actions .more-menu button.icon-btn {
  color: #fff;
  background: transparent;
}
.cards-actions .dropdown {
  right: 0;
  left: auto;
  bottom: 100%;
  top: auto;
  margin-bottom: 8px;
}
.cards-nsfw-reveal {
  position: absolute;
  inset: 0;
  z-index: 4;
  margin: auto;
  width: max-content;
  height: max-content;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.cards-slide.nsfw-blur .cards-video {
  filter: blur(28px);
  transform: scale(1.08);
}
.cards-empty,
.cards-feed > .empty {
  color: var(--muted);
  padding: 48px 24px;
  text-align: center;
}
.cards-feed > .empty img { filter: none; opacity: 0.9; }
.cards-feed .feed-more { min-height: 40px; }
.compose-card .icon-btn.is-emphasized {
  color: var(--accent);
}
.staff-card-preview {
  width: 108px;
  height: 160px;
  object-fit: cover;
  background: #000;
  border-radius: 8px;
}
.staff-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 280px;
}
.staff-card-actions .inline-form { display: inline; }

/* ===== Dating ===== */
:root {
  --dating-super: #c9a227;
  --dating-super-wash: rgba(201, 162, 39, 0.16);
}
html.dark {
  --dating-super: #e6c85c;
  --dating-super-wash: rgba(230, 200, 92, 0.18);
}
body.is-dating .right { display: none; }
body.is-dating .main {
  max-width: 560px;
  margin: 0 auto;
  border-right: none;
}
body.is-dating .fab { display: none !important; }
.dating-head { padding-bottom: 4px; }
.dating-tabs .dating-tab-count {
  display: inline-block;
  min-width: 1.25em;
  padding: 0 6px;
  margin-left: 2px;
  border-radius: 999px;
  background: var(--accent-wash);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}
.dating-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}
.dating-boost-pill {
  font-size: 13px;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
}
.dating-boost-pill.is-live {
  color: var(--dating-super);
  background: var(--dating-super-wash);
  border-color: rgba(201, 162, 39, 0.35);
  font-weight: 700;
}
.dating-boost-btn {
  border-color: var(--dating-super);
  color: var(--dating-super);
}
.dating-boost-btn:hover { background: var(--dating-super-wash); }
.dating-filters-sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}
.dating-filters-sheet[hidden] { display: none !important; }
.dating-filters-panel {
  width: min(480px, 100%);
  max-height: min(85vh, 720px);
  overflow: auto;
  padding: 16px;
  border-radius: 16px;
}
.dating-filters-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.dating-filters-head h2 { margin: 0; font-size: 18px; }
.dating-age-inputs {
  display: flex;
  gap: 8px;
  align-items: center;
}
.dating-age-inputs input { width: 88px; }
.dating-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dating-chip { display: inline-flex; cursor: pointer; }
.dating-chip input { position: absolute; opacity: 0; pointer-events: none; }
.dating-chip span,
.dating-chip-static {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
}
.dating-chip input:checked + span {
  border-color: var(--accent);
  background: var(--accent-wash);
  color: var(--accent);
  font-weight: 600;
}
.dating-deck {
  position: relative;
  padding: 16px;
  min-height: 520px;
}
.dating-stack {
  position: relative;
  height: 540px;
  max-width: 420px;
  margin: 0 auto;
}
.dating-stack-card {
  position: absolute;
  inset: 0;
  touch-action: none;
  user-select: none;
}
.dating-stack-card.is-top { cursor: grab; }
.dating-stack-card.is-dragging { cursor: grabbing; }
.dating-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}
.dating-card.is-boosted {
  box-shadow: 0 0 0 2px var(--dating-super), 0 10px 28px rgba(0, 0, 0, 0.1);
}
.dating-card-media {
  position: relative;
  flex: 1 1 58%;
  min-height: 240px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg);
}
.dating-card-media-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 45%);
}
.dating-card-identity {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: flex;
  gap: 10px;
  align-items: center;
  color: #fff;
  z-index: 1;
}
.dating-card-identity h2 {
  margin: 0;
  font-size: 22px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.dating-card-meta {
  margin: 2px 0 0;
  font-size: 13px;
  opacity: 0.9;
}
.dating-card-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  background: var(--surface);
}
.dating-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--surface);
  color: var(--accent);
  border: 1px solid var(--border);
}
.dating-card-badge.boost {
  color: var(--dating-super);
  background: var(--dating-super-wash);
  border-color: rgba(201, 162, 39, 0.35);
}
.dating-card-badge.super {
  left: auto;
  right: 12px;
  color: var(--dating-super);
}
.dating-card-badge.like { left: auto; right: 12px; }
.dating-card-body {
  padding: 14px 16px 16px;
  overflow: auto;
  max-height: 42%;
}
.dating-card-bio {
  margin: 0 0 10px;
  color: var(--text);
  line-height: 1.4;
}
.dating-card-details {
  display: grid;
  gap: 6px;
  margin: 0 0 10px;
}
.dating-card-details div {
  display: flex;
  gap: 8px;
  font-size: 13px;
}
.dating-card-details dt {
  color: var(--muted);
  min-width: 88px;
}
.dating-card-details dd { margin: 0; color: var(--text); }
.dating-interest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.dating-card-profile-link {
  font-size: 13px;
  color: var(--link);
}
.dating-stamp {
  position: absolute;
  top: 28px;
  z-index: 5;
  padding: 6px 12px;
  border: 3px solid;
  border-radius: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
  transition: opacity 0.12s ease;
}
.dating-stamp.show { opacity: 1; transform: scale(1); }
.dating-stamp-like {
  left: 18px;
  color: var(--accent);
  border-color: var(--accent);
  transform: rotate(-12deg);
}
.dating-stamp-pass {
  right: 18px;
  color: var(--muted);
  border-color: var(--muted);
  transform: rotate(12deg);
}
.dating-stamp-super {
  left: 50%;
  top: 18px;
  margin-left: -48px;
  color: var(--dating-super);
  border-color: var(--dating-super);
}
.dating-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 18px 12px 8px;
}
.dating-act {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.dating-act:disabled { opacity: 0.45; cursor: not-allowed; }
.dating-act-pass { color: var(--muted); font-size: 20px; }
.dating-act-like {
  width: 64px;
  height: 64px;
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.45);
  background: var(--accent-wash);
  font-size: 26px;
}
.dating-act-super {
  color: var(--dating-super);
  border-color: rgba(201, 162, 39, 0.4);
  background: var(--dating-super-wash);
}
.dating-act-rewind { font-size: 20px; color: var(--muted); }
.dating-empty {
  padding: 48px 24px;
  text-align: center;
}
.dating-empty img {
  width: 72px;
  height: 72px;
  opacity: 0.9;
  margin-bottom: 12px;
}
.dating-match-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.dating-match-card {
  width: min(400px, 100%);
  padding: 24px 20px;
  text-align: center;
  border-radius: 18px;
}
.dating-match-kicker {
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 13px;
  margin: 0 0 8px;
}
.dating-match-avatars {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 12px 0;
}
.dating-match-avatars img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
}
.dating-match-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}
.dating-grid {
  display: grid;
  gap: 16px;
  padding: 16px;
}
.dating-grid-item .dating-card {
  height: auto;
  min-height: 0;
}
.dating-grid-item .dating-card-media {
  min-height: 200px;
  flex: none;
  height: 220px;
}
.dating-grid-item .dating-card-body { max-height: none; }
.dating-grid-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 10px 4px 0;
}
.dating-super-btn {
  color: var(--dating-super);
  border-color: rgba(201, 162, 39, 0.4);
}
.dating-matches-list { padding: 8px 0; }
.dating-match-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.dating-match-peer {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.dating-match-peer img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}
.dating-match-peer strong { display: block; }
.dating-match-peer small { color: var(--muted); }
.dating-match-row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
@media (max-width: 720px) {
  body.is-dating .main { max-width: none; }
  .dating-stack { height: min(68vh, 560px); }
  .dating-match-row {
    flex-direction: column;
    align-items: stretch;
  }
  .dating-match-row-actions { justify-content: flex-end; }
}

.ios-install {
  margin: 16px;
  padding: 20px 16px 24px;
}
.ios-install-hero {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.ios-install-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.28);
}
.ios-install h2 {
  padding: 0;
  margin: 4px 0 8px;
  font-size: 22px;
}
.ios-install-cta {
  margin: 8px 0 20px;
  min-height: 48px;
  font-size: 16px;
}
.ios-install-url {
  margin: 0 0 16px;
}
.ios-install-url code {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--accent-wash);
  color: var(--accent);
  font-weight: 700;
  word-break: break-all;
}
.ios-install-steps {
  margin: 0 0 16px;
  padding-left: 22px;
  color: var(--text);
}
.ios-install-steps li {
  margin: 0 0 12px;
  line-height: 1.45;
}
.ios-install-alt {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}
html.is-standalone .mobile-top {
  padding-top: calc(6px + var(--safe-t));
}
html.is-standalone .shell {
  min-height: 100dvh;
}
