/* ==========================================================================
   RIDERVERSE — dark asphalt theme. No build step: edit this file directly.
   ========================================================================== */
@font-face { font-family: 'Bebas Neue'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/bebas-neue-latin.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(../fonts/inter-latin-var.woff2) format('woff2'); }

:root {
  --bg: #0b0b0c;
  --bg-2: #111113;
  --surface: #151518;
  --surface-2: #1d1d21;
  --line: #2a2a30;
  --line-2: #3a3a42;
  --text: #f3f3f4;
  --muted: #9b9ba5;
  --accent: #ff5a1f;
  --accent-2: #ff8a3d;
  --accent-ink: #120700;
  --like: #ff3040;
  --danger: #ff4d4d;
  --ok: #3ddc84;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 40px rgba(0,0,0,.45);
  --display: 'Bebas Neue', 'Oswald', Impact, 'Arial Narrow', sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --topbar-h: 60px;
  --tabbar-h: 58px;
  /* asphalt grain */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .055 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg) var(--grain); color: var(--text);
  font: 15px/1.5 var(--body); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { color: #ffb07a; }
p { margin: 0 0 .75em; }
h1, h2, h3 { line-height: 1.1; margin: 0 0 .5em; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.tiny { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.strong { font-weight: 700; }
.center { text-align: center; }
.right { display: block; text-align: right; }
.inline { display: inline; margin: 0; }
.u { color: var(--text); font-weight: 700; }
.u:hover { color: var(--text); text-decoration: underline; }
.visually-hidden, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.main { flex: 1; width: 100%; }
.placeholder { background: rgba(255,90,31,.14); color: var(--accent-2); border: 1px dashed var(--accent); border-radius: 6px; padding: 1px 6px; font-size: .85em; font-weight: 600; }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--text); line-height: 1; }
.logo-mark { display: inline-flex; gap: 3px; transform: skewX(-20deg); }
.logo-mark i { display: block; width: 5px; height: 22px; background: var(--accent); border-radius: 1px; }
.logo-mark i:nth-child(2) { opacity: .7; height: 22px; }
.logo-mark i:nth-child(3) { opacity: .4; }
.logo-word { font-family: var(--display); font-size: 30px; letter-spacing: .06em; font-style: normal; transform: skewX(-8deg); padding-top: 3px; }
.logo-word b { font-weight: 400; color: var(--accent); }
.logo-sm .logo-word { font-size: 24px; }
.logo-sm .logo-mark i { height: 17px; width: 4px; }
.brand:hover .logo-mark i { animation: rev .6s ease; }
.brand:hover .logo-mark i:nth-child(2) { animation-delay: .06s; }
.brand:hover .logo-mark i:nth-child(3) { animation-delay: .12s; }
@keyframes rev { 50% { transform: translateX(4px); } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(135deg, var(--accent), #ff3d00); color: #fff; border: 0;
  padding: 10px 18px; border-radius: 10px; font-weight: 700; letter-spacing: .01em; cursor: pointer;
  box-shadow: 0 6px 20px rgba(255,90,31,.25); transition: transform .12s, box-shadow .2s, filter .2s; white-space: nowrap;
}
.btn:hover { color: #fff; filter: brightness(1.08); box-shadow: 0 8px 26px rgba(255,90,31,.38); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-sm { padding: 6px 14px; font-size: .86rem; border-radius: 8px; box-shadow: none; }
.btn-lg { padding: 14px 20px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-ghost { background: var(--surface-2); color: var(--text); box-shadow: none; border: 1px solid var(--line); }
.btn-ghost:hover { background: #26262b; color: var(--text); box-shadow: none; }
.btn-danger { background: var(--danger); box-shadow: none; }
.icon-btn { background: none; border: 0; padding: 6px; margin: 0; color: var(--text); cursor: pointer; display: inline-flex; border-radius: 50%; transition: transform .15s, color .15s; }
.icon-btn:hover { color: var(--muted); }
.icon-btn:active { transform: scale(.9); }
.linkish { background: none; border: 0; padding: 0; color: var(--accent-2); cursor: pointer; font-weight: 600; }
.link-arrow { font-weight: 600; }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(11,11,12,.86); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1100px; margin: 0 auto; height: var(--topbar-h); padding: 0 16px; display: flex; align-items: center; gap: 20px; }
.topbar-guest .topbar-inner { justify-content: space-between; }
.top-search { flex: 1; max-width: 320px; margin-left: auto; display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; color: var(--muted); }
.top-search input { flex: 1; background: none; border: 0; padding: 9px 0; outline: none; color: var(--text); min-width: 0; }
.mainnav { display: flex; gap: 6px; }
.mainnav a { display: flex; align-items: center; gap: 8px; color: var(--text); padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: .92rem; }
.mainnav a:hover { background: var(--surface-2); color: var(--text); }
.mainnav a.is-active { color: var(--accent); }
.mainnav a.is-active .avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.nav-post { background: var(--surface-2); }

/* ---------- Mobile tab bar ---------- */
.tabbar { display: none; }
@media (max-width: 760px) {
  .top-search, .mainnav { display: none; }
  .topbar-inner { justify-content: center; }
  .page-landing .topbar-inner, .topbar-guest .topbar-inner { justify-content: space-between; }
  .tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom); background: rgba(11,11,12,.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  }
  .tabbar a { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--text); }
  .tabbar a.is-active { color: var(--accent); }
  .tabbar a.is-active .avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--accent); }
  .tab-post svg { color: var(--accent); }
  body:has(.tabbar) { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
}

/* ---------- Avatars ---------- */
.avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--surface-2); }
.avatar-xs { width: 26px; height: 26px; font-size: 10px; }
.avatar-sm { width: 34px; height: 34px; font-size: 12px; }
.avatar-md { width: 46px; height: 46px; font-size: 16px; }
.avatar-lg { width: 62px; height: 62px; font-size: 21px; }
.avatar-xl { width: 150px; height: 150px; font-size: 50px; }
.avatar-fallback { display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); letter-spacing: .04em; color: #fff; padding-top: .1em; }
.hue-0 { background: linear-gradient(135deg, #ff5a1f, #b3200e); }
.hue-1 { background: linear-gradient(135deg, #3a3a42, #17171a); border: 1px solid #4a4a52; }
.hue-2 { background: linear-gradient(135deg, #f7b733, #fc4a1a); }
.hue-3 { background: linear-gradient(135deg, #5b6470, #262a30); }
.hue-4 { background: linear-gradient(135deg, #d7263d, #6d0f1c); }
.hue-5 { background: linear-gradient(135deg, #8a8f98, #3d4047); }

/* ---------- Toasts / alerts ---------- */
.toast { position: fixed; z-index: 100; left: 50%; top: calc(var(--topbar-h) + 12px); transform: translateX(-50%); max-width: min(92vw, 520px);
  background: var(--surface-2); border: 1px solid var(--line-2); border-left: 4px solid var(--accent); padding: 12px 40px 12px 16px; border-radius: 12px; box-shadow: var(--shadow); animation: drop .35s ease; }
.toast-success { border-left-color: var(--ok); }
.toast-error { border-left-color: var(--danger); }
.toast-x { position: absolute; right: 8px; top: 6px; background: none; border: 0; font-size: 22px; color: var(--muted); cursor: pointer; }
.toast.is-hiding { opacity: 0; transition: opacity .3s; }
@keyframes drop { from { opacity: 0; transform: translate(-50%, -10px); } }
.alert { background: rgba(255,77,77,.1); border: 1px solid rgba(255,77,77,.45); color: #ffb3b3; padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; font-size: .92rem; }
.badge { display: inline-block; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-2); background: rgba(255,90,31,.12); border: 1px solid rgba(255,90,31,.35); padding: 2px 7px; border-radius: 99px; vertical-align: middle; }

/* ---------- Forms ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,90,31,.18); }
.field input::placeholder, .field textarea::placeholder { color: #5f5f68; }
.row-2 { display: flex; gap: 12px; }
.field-grow { flex: 1; min-width: 0; }
.field-age { width: 92px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; color: var(--muted); margin: 4px 0 16px; cursor: pointer; }
.check input { accent-color: var(--accent); width: 18px; height: 18px; margin: 1px 0 0; flex-shrink: 0; }
.field-error { color: #ff9b9b; font-size: .88rem; }
input[type=number]::-webkit-inner-spin-button { opacity: .3; }

/* ---------- Landing ---------- */
.page-landing .topbar { position: absolute; left: 0; right: 0; background: linear-gradient(rgba(0,0,0,.6), transparent); border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -2; background: url(../img/hero.jpg) center 60% / cover no-repeat; transform: scale(1.03); }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(11,11,12,.97) 0%, rgba(11,11,12,.8) 40%, rgba(11,11,12,.25) 100%), linear-gradient(0deg, var(--bg) 0%, transparent 35%); }
.hero::after { content: ''; position: absolute; left: -10%; right: -10%; bottom: 70px; height: 3px; z-index: -1; background: repeating-linear-gradient(90deg, var(--accent) 0 60px, transparent 60px 110px); opacity: .5; transform: skewX(-30deg); }
.hero-inner { width: 100%; max-width: 1140px; margin: 0 auto; padding: calc(var(--topbar-h) + 40px) 20px 90px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.eyebrow { font-size: .76rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(3.4rem, 8vw, 6.6rem); line-height: .9; letter-spacing: .01em; margin-bottom: 20px; text-transform: uppercase; }
.hero h1 span { color: var(--accent); display: inline-block; transform: skewX(-8deg); }
.lede { font-size: 1.12rem; color: #c9c9d0; max-width: 520px; }
.hero-points { list-style: none; padding: 0; margin: 24px 0; display: flex; flex-wrap: wrap; gap: 10px; }
.hero-points li { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); padding: 8px 14px; border-radius: 99px; font-size: .88rem; font-weight: 600; }
.hero-points svg { color: var(--accent); }
.hero-stats { color: var(--muted); font-size: .92rem; }
.hero-stats strong { color: var(--text); }

.auth-card { background: rgba(21,21,24,.9); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--line); border-radius: 20px; padding: 26px; box-shadow: var(--shadow); position: relative; scroll-margin-top: 80px; }
.auth-card::before { content: ''; position: absolute; top: -1px; left: 26px; right: 26px; height: 3px; background: linear-gradient(90deg, var(--accent), transparent); border-radius: 3px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 20px; }
.tab { background: none; border: 0; padding: 10px; border-radius: 9px; font-weight: 700; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.tab.is-active { background: var(--surface-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.auth-form[hidden] { display: none; }
.underage { text-align: center; padding: 8px 4px; animation: pop .4s ease; }
.underage-icon { width: 84px; height: 84px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; color: var(--accent); background: radial-gradient(circle, rgba(255,90,31,.22), rgba(255,90,31,.04)); border: 1px solid rgba(255,90,31,.4); }
.underage h2 { font-family: var(--display); font-weight: 400; font-size: 2.2rem; letter-spacing: .02em; }
.underage p { color: #c9c9d0; }
.underage .btn { margin: 10px 0 12px; }
@keyframes pop { from { opacity: 0; transform: scale(.96); } }

.teaser { max-width: 1140px; margin: -30px auto 40px; padding: 0 20px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.section-head h2 { font-family: var(--display); font-weight: 400; font-size: 2rem; letter-spacing: .03em; margin: 0; }
.teaser-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.teaser-grid a { aspect-ratio: 1; overflow: hidden; border-radius: 10px; }
.teaser-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.teaser-grid a:hover img { transform: scale(1.06); }

@media (max-width: 900px) {
  .hero { min-height: 0; align-items: flex-start; }
  .hero-inner { grid-template-columns: 1fr; gap: 26px; padding-top: calc(var(--topbar-h) + 28px); padding-bottom: 50px; }
  .hero::before { background: linear-gradient(180deg, rgba(11,11,12,.55) 0%, rgba(11,11,12,.85) 45%, var(--bg) 78%); }
  .hero-bg { background-position: center top; background-size: auto 60%; background-color: var(--bg); background-size: cover; bottom: 40%; }
  .hero::after { display: none; }
  .lede { font-size: 1rem; }
  .hero-points { display: none; }
  .teaser { margin-top: 0; }
  .teaser-grid { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .teaser-grid a { border-radius: 6px; }
}
@media (max-width: 420px) {
  .auth-card { padding: 20px 16px; border-radius: 16px; }
  .hero h1 { font-size: 3.3rem; }
}

/* ---------- Feed layout ---------- */
.layout { max-width: 960px; margin: 0 auto; padding: 22px 16px 40px; display: grid; grid-template-columns: minmax(0, 480px) 300px; gap: 56px; justify-content: center; }
.side-col { position: sticky; top: calc(var(--topbar-h) + 22px); align-self: start; }
@media (max-width: 1000px) { .layout { grid-template-columns: minmax(0, 520px); } .side-col { display: none; } }
@media (max-width: 560px) { .layout { padding: 0 0 20px; } }

.riders-row { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 16px; margin-bottom: 8px; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.riders-row::-webkit-scrollbar { display: none; }
.rider-bubble { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 70px; flex-shrink: 0; color: var(--text); }
.rider-bubble small { font-size: .72rem; max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #cfcfd6; }
.ring { position: relative; padding: 3px; border-radius: 50%; background: conic-gradient(from 200deg, var(--accent), #ffc15e, var(--accent), #d7263d, var(--accent)); }
.ring .avatar { border: 3px solid var(--bg); display: flex; }
.rider-add .ring { background: var(--line); }
.rider-add i { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; border: 2px solid var(--bg); }
@media (max-width: 560px) { .riders-row { padding: 12px 12px 12px; margin: 0; } }

/* ---------- Post card ---------- */
.post-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 22px; }
@media (max-width: 560px) { .post-card { border-radius: 0; border-left: 0; border-right: 0; margin-bottom: 8px; } }
.post-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.post-author > .avatar, .suggest > a, .me-card > a, .person > .avatar { flex-shrink: 0; }
.post-author { display: flex; align-items: center; gap: 10px; color: var(--text); min-width: 0; flex: 1; }
.post-author span { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.post-author strong { font-size: .92rem; }
.post-author small { font-size: .76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-head time { font-size: .8rem; }
.post-media { position: relative; background: #000; overflow: hidden; user-select: none; }
.post-media img { width: 100%; height: 100%; object-fit: cover; }
.burst { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0); color: #fff; pointer-events: none; filter: drop-shadow(0 6px 24px rgba(0,0,0,.5)); opacity: 0; }
.burst svg { fill: #fff; stroke: none; }
.burst.go { animation: burst .9s ease forwards; }
@keyframes burst { 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); } 30% { transform: translate(-50%, -50%) scale(.95); } 45%, 80% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -60%) scale(.9); } }
.post-body { padding: 6px 14px 14px; }
.post-actions { display: flex; align-items: center; gap: 4px; margin-left: -6px; }
.post-actions .js-share { margin-left: auto; }
.like-btn.is-liked { color: var(--like); }
.like-btn.is-liked svg { fill: var(--like); }
.like-btn.pulse svg { animation: likepop .35s ease; }
@keyframes likepop { 40% { transform: scale(1.3); } }
.likes { font-weight: 700; margin: 2px 0 6px; font-size: .92rem; }
.caption { margin-bottom: 6px; font-size: .93rem; word-wrap: break-word; }
.tag, .mention { color: #ffa36e; font-weight: 500; }
.view-comments { display: block; margin-bottom: 4px; color: var(--muted); }
.comment-mini { margin: 0 0 3px; font-size: .9rem; overflow-wrap: anywhere; }
.load-more { margin: 10px 0 30px; }

/* ---------- Sidebar ---------- */
.me-card, .suggest { display: flex; align-items: center; gap: 12px; }
.me-card { margin-bottom: 22px; }
.me-card > div, .suggest > div { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.me-card small, .suggest small { font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 18px; }
.side-block h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 12px; }
.suggest { padding: 7px 0; }
.side-links a { color: var(--muted); }

/* ---------- Empty states ---------- */
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty svg { color: var(--accent); margin-bottom: 10px; }
.empty h2 { color: var(--text); font-family: var(--display); font-weight: 400; font-size: 2rem; letter-spacing: .02em; }

/* ---------- Single post ---------- */
.post-page { max-width: 1000px; margin: 0 auto; padding: 22px 16px 40px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); margin-bottom: 12px; font-weight: 600; }
.post-full { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-height: 520px; }
.post-full-media { position: relative; background: #000; display: flex; align-items: center; justify-content: center; }
.post-full-media img { width: 100%; max-height: 82vh; object-fit: contain; }
.post-full-side { display: flex; flex-direction: column; border-left: 1px solid var(--line); min-width: 0; max-height: 82vh; }
.post-full-side .post-head { border-bottom: 1px solid var(--line); }
.post-thread { flex: 1; overflow-y: auto; padding: 14px; }
.comments { list-style: none; margin: 0; padding: 0; }
.comment { display: flex; gap: 10px; margin-bottom: 16px; animation: fadein .3s ease; }
.comment > a { flex: 0 0 auto; }
.comment-body { min-width: 0; }
.comment-body p { margin: 0 0 2px; font-size: .92rem; overflow-wrap: anywhere; }
.comment-body small { font-size: .74rem; margin-right: 10px; }
.comment-body .linkish { color: var(--muted); font-weight: 500; font-size: .74rem; }
.caption-block { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } }
.post-foot { border-top: 1px solid var(--line); padding: 8px 14px 0; }
.comment-form { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); margin: 6px -14px 0; padding: 10px 14px; }
.comment-form input { flex: 1; background: none; border: 0; outline: none; padding: 8px 0; min-width: 0; }
.comment-form.guest { font-size: .9rem; color: var(--muted); }
.more-from { margin-top: 36px; }
.more-from h3 { font-size: .9rem; font-weight: 600; margin-bottom: 12px; }
@media (max-width: 800px) {
  .post-page { padding: 0 0 30px; }
  .back-link { padding: 12px 14px 0; }
  .post-full { grid-template-columns: 1fr; border-radius: 0; border-left: 0; border-right: 0; min-height: 0; }
  .post-full-side { border-left: 0; max-height: none; }
  .post-full-side .post-head { order: -1; }
  .post-full { display: flex; flex-direction: column; }
  .post-full-side { display: contents; }
  .post-full-side .post-head { order: 0; }
  .post-full-media { order: 1; }
  .post-foot { order: 2; border-top: 0; }
  .post-thread { order: 3; overflow: visible; }
  .post-full-media img { max-height: none; }
  .more-from { padding: 0 2px; }
  .more-from h3 { padding: 0 12px; }
}

/* ---------- Grids ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.grid-item { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--surface-2); }
.grid-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.grid-meta { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 4px; background: rgba(0,0,0,.5); color: #fff; font-weight: 700; opacity: 0; transition: opacity .2s; }
.grid-meta svg { fill: #fff; }
.grid-item:hover .grid-meta { opacity: 1; }
.grid-item:hover img { transform: scale(1.04); }
@media (min-width: 760px) { .grid { gap: 6px; } .grid-item { border-radius: 6px; } }

/* ---------- Profile ---------- */
.profile { max-width: 935px; margin: 0 auto; padding: 30px 16px 40px; }
.profile-head { display: flex; gap: 60px; align-items: center; padding: 0 30px 34px; border-bottom: 1px solid var(--line); }
.profile-avatar { position: relative; padding: 4px; border-radius: 50%; background: conic-gradient(from 200deg, var(--accent), #ffc15e, var(--accent), #d7263d, var(--accent)); }
.profile-avatar .avatar { border: 4px solid var(--bg); display: flex; }
.profile-info { flex: 1; min-width: 0; }
.profile-title { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.profile-title h1 { font-size: 1.5rem; font-weight: 700; margin: 0; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.profile-stats { list-style: none; padding: 0; margin: 0 0 16px; display: flex; gap: 32px; }
.profile-stats strong { font-weight: 800; }
.profile-bio p { margin: 0 0 4px; }
.bio-line { display: flex; align-items: center; gap: 6px; color: #cfcfd6; font-size: .92rem; }
.bio-line svg { color: var(--accent); }
.profile-tabs { display: flex; justify-content: center; margin-bottom: 14px; }
.profile-tabs span { display: flex; align-items: center; gap: 6px; padding: 14px 4px; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; border-top: 2px solid var(--text); margin-top: -1px; }
@media (max-width: 700px) {
  .profile { padding: 18px 0 30px; }
  .profile-head { gap: 20px; padding: 0 16px 20px; flex-wrap: wrap; }
  .avatar-xl { width: 86px; height: 86px; font-size: 30px; }
  .profile-title h1 { font-size: 1.25rem; }
  .profile-stats { gap: 18px; font-size: .92rem; }
  .profile-bio { flex-basis: 100%; }
  .profile-tabs { margin-bottom: 2px; }
}

/* ---------- Explore ---------- */
.explore { max-width: 935px; margin: 0 auto; padding: 22px 16px 40px; }
.explore-search { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; color: var(--muted); margin-bottom: 14px; }
.explore-search input { flex: 1; background: none; border: 0; outline: none; padding: 13px 0; color: var(--text); min-width: 0; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 18px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; padding: 7px 14px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); font-size: .85rem; font-weight: 600; }
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.section-title { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 24px 0 12px; }
.section-title.big { font-family: var(--display); font-weight: 400; font-size: 2.3rem; letter-spacing: .03em; text-transform: uppercase; color: var(--text); margin-top: 6px; }
.section-title.big small { font-family: var(--body); font-size: .9rem; letter-spacing: 0; text-transform: none; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.person { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; color: var(--text); }
.person span { display: flex; flex-direction: column; min-width: 0; }
.person small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 560px) { .explore { padding: 14px 0 30px; } .explore-search, .chips, .section-title, .people, .explore > p { margin-left: 12px; margin-right: 12px; } .chips { margin-right: 0; } }

/* ---------- Cards / forms pages ---------- */
.page-narrow { max-width: 560px; margin: 0 auto; padding: 26px 16px 50px; }
.page-title { font-family: var(--display); font-weight: 400; font-size: 2.6rem; letter-spacing: .03em; text-transform: uppercase; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.dropzone { position: relative; display: flex; align-items: center; justify-content: center; min-height: 280px; border: 2px dashed var(--line-2); border-radius: 12px; margin-bottom: 16px; cursor: pointer; overflow: hidden; background: var(--bg-2); transition: border-color .15s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dz-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.dz-empty svg { color: var(--accent); }
.dz-preview { width: 100%; max-height: 520px; object-fit: contain; pointer-events: none; }
.dropzone.has-image { border-style: solid; }
.dropzone.has-image .dz-empty { display: none; }
.avatar-edit { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.avatar-edit > div { display: flex; flex-direction: column; gap: 2px; }
.avatar-edit .linkish { cursor: pointer; font-size: .9rem; }
.danger-zone summary { cursor: pointer; color: var(--danger); font-weight: 700; }
.danger-zone[open] summary { margin-bottom: 12px; }

/* ---------- Legal ---------- */
.legal h1 { font-family: var(--display); font-weight: 400; font-size: 3rem; letter-spacing: .03em; text-transform: uppercase; margin-bottom: 4px; }
.legal h2 { font-size: 1.1rem; margin-top: 28px; color: #fff; }
.legal p, .legal li { color: #cfcfd6; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 6px; }
.legal code { background: var(--surface-2); padding: 1px 6px; border-radius: 5px; font-size: .88em; }
.callout { display: flex; gap: 12px; align-items: flex-start; background: rgba(255,90,31,.08); border: 1px solid rgba(255,90,31,.4); border-radius: 12px; padding: 14px 16px; margin: 18px 0; }
.callout svg { color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.callout p { margin: 0; color: var(--text); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); margin-top: 20px; }
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 26px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.footer-inner nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-inner nav a { color: #cfcfd6; font-weight: 600; font-size: .9rem; }
.footer-inner nav a:hover { color: var(--accent); }
.footer-inner p { margin: 0 0 0 auto; }
@media (max-width: 700px) { .footer-inner { flex-direction: column; align-items: flex-start; } .footer-inner p { margin: 0; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Small-screen polish ---------- */
@media (max-width: 700px) {
  .profile-head { align-items: flex-start; }
  .profile-stats li { display: flex; flex-direction: column; line-height: 1.25; }
  .section-head h2 { font-size: 1.6rem; }
  .link-arrow { white-space: nowrap; font-size: .9rem; }
}

/* ---------- Admin ---------- */
.admin-page { max-width: 1100px; margin: 0 auto; padding: 26px 16px 50px; }
.admin-head { margin-bottom: 14px; }
.admin-head .page-title { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; }
.admin-head .page-title svg { color: var(--accent); }
.admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -8px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table td small { display: block; }
.admin-table tr.is-banned td { opacity: .6; }
.admin-table tr.is-banned td.admin-actions { opacity: 1; }
.admin-actions { white-space: nowrap; }
.admin-actions form + form { margin-left: 6px; }
.admin-post-cell { display: flex; align-items: center; gap: 10px; min-width: 260px; }
.admin-post-cell img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.badge-danger { color: #fff; background: rgba(255,77,77,.2); border-color: rgba(255,77,77,.6); }
.admin-log { list-style: none; padding: 0; margin: 0; }
.admin-log li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.admin-log li:last-child { border-bottom: 0; }
.admin-log time { margin-left: auto; }
.admin-action { color: var(--accent); font-weight: 700; }
.post-admin-del .icon-btn { color: var(--muted); padding: 4px; }
.post-admin-del .icon-btn:hover { color: var(--danger); }
@media (max-width: 700px) {
  .admin-page { padding: 16px 10px 40px; }
  .admin-page .card { padding: 14px 12px; }
  /* Tables become stacked cards on phones: no sideways scrolling, actions always visible */
  .admin-table-wrap { margin: 0; overflow: visible; }
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: 100%; }
  .admin-table thead { display: none; }
  .admin-table tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .admin-table tr:last-child { border-bottom: 0; }
  .admin-table td { border: 0; padding: 2px 0; }
  .admin-table td[data-label]:not([data-label=""])::before { content: attr(data-label) ": "; color: var(--muted); font-size: .78rem; }
  .admin-riders td:first-child small { display: inline; margin-left: 6px; }
  .admin-riders td[data-label="Age"], .admin-riders td[data-label="Joined"], .admin-riders td[data-label="Posts"] { display: inline-block; width: auto; margin-right: 14px; }
  .admin-email { word-break: break-all; }
  .admin-actions { padding-top: 8px !important; }
  .admin-post-cell { min-width: 0; }
  .admin-log time { margin-left: 0; flex-basis: 100%; }
}
