/* ============ madridonly — themes ============ */
:root, [data-theme="dia"] {
  --bg: #faf6ef; --surface: #ffffff; --text: #26211d; --muted: #82786d;
  --line: #eae1d3; --accent: #e63946; --accent2: #f4a261; --on-accent: #fff;
  --hero: linear-gradient(120deg, #e63946, #f4652f 55%, #ffb703);
  --shadow: 0 2px 10px rgba(60, 40, 20, .07); --shadow-lift: 0 10px 28px rgba(60, 40, 20, .14);
  --glow: none;
}
[data-theme="noche"] {
  --bg: #17141f; --surface: #211d2c; --text: #efeaf5; --muted: #9a92a8;
  --line: #332d42; --accent: #ff6b6b; --accent2: #ffd166; --on-accent: #1d1121;
  --hero: linear-gradient(120deg, #5f0f40, #9a031e 50%, #fb8b24);
  --shadow: 0 2px 10px rgba(0, 0, 0, .35); --shadow-lift: 0 10px 28px rgba(0, 0, 0, .5);
  --glow: none;
}
[data-theme="vermu"] {
  --bg: #ffefd8; --surface: #fffaf0; --text: #47240f; --muted: #a06a3e;
  --line: #f2dcbb; --accent: #d1495b; --accent2: #ff8a3d; --on-accent: #fff;
  --hero: linear-gradient(120deg, #d1495b, #ff8a3d 60%, #ffd166);
  --shadow: 0 2px 10px rgba(120, 60, 10, .10); --shadow-lift: 0 10px 28px rgba(120, 60, 10, .18);
  --glow: none;
}
[data-theme="neon"] {
  --bg: #0c0420; --surface: #170a30; --text: #f2e9ff; --muted: #a78fc9;
  --line: #2e1b52; --accent: #ff2ea6; --accent2: #00e5ff; --on-accent: #fff;
  --hero: linear-gradient(120deg, #ff2ea6, #7b2ff7 55%, #00e5ff);
  --shadow: 0 2px 12px rgba(123, 47, 247, .25); --shadow-lift: 0 0 24px rgba(255, 46, 166, .45);
  --glow: 0 0 14px rgba(255, 46, 166, .5);
}
[data-theme="retiro"] {
  --bg: #eef4e8; --surface: #ffffff; --text: #22321f; --muted: #6d7f68;
  --line: #d9e4d0; --accent: #2a9d8f; --accent2: #e9c46a; --on-accent: #fff;
  --hero: linear-gradient(120deg, #2a9d8f, #43aa8b 55%, #90be6d);
  --shadow: 0 2px 10px rgba(30, 60, 30, .08); --shadow-lift: 0 10px 28px rgba(30, 60, 30, .16);
  --glow: none;
}

/* ============ base ============ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  transition: background .25s, color .25s;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; }
h1 { font-size: 1.7rem; font-weight: 800; }
h2 { font-size: 1.2rem; font-weight: 800; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.main { min-height: 62vh; padding-bottom: 32px; }
.empty { color: var(--muted); padding: 24px 8px; }
.plain-link { color: inherit; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
code { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }

/* ============ buttons / chips / tags ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--accent); color: var(--on-accent); border: 1px solid transparent;
  padding: 10px 18px; border-radius: 12px; font-weight: 700; font-size: .95rem;
  cursor: pointer; text-decoration: none !important; transition: transform .12s, box-shadow .12s, filter .12s;
  box-shadow: var(--glow);
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: var(--shadow-lift); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 6px 12px; font-size: .85rem; border-radius: 10px; }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); box-shadow: none; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: transparent; color: #d13030; border-color: color-mix(in srgb, #d13030 40%, transparent); box-shadow: none; }
.btn-danger:hover { background: #d13030; color: #fff; }
.icon-btn { background: none; border: 1px solid var(--line); border-radius: 10px; font-size: 1.05rem; padding: 6px 9px; cursor: pointer; }
.icon-btn:hover { border-color: var(--accent); }
.linklike { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 2px 10px; }
.chip {
  --cat: var(--accent);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  border: 1.5px solid color-mix(in srgb, var(--cat) 45%, transparent);
  background: color-mix(in srgb, var(--cat) 9%, var(--surface));
  color: var(--text); border-radius: 999px; padding: 6px 14px; font-size: .88rem; font-weight: 600;
  text-decoration: none !important; transition: transform .12s, background .12s;
}
.chip b { color: var(--cat); margin-left: 2px; }
.chip:hover { transform: translateY(-1px); }
.chip.active { background: var(--cat); color: #fff; border-color: var(--cat); }
.chip.active b { color: #fff; }
.tag {
  display: inline-block; background: var(--bg); border: 1px solid var(--line);
  border-radius: 999px; padding: 2px 10px; font-size: .78rem; color: var(--muted);
}
.tag.ok { color: #1a7f4b; border-color: color-mix(in srgb, #1a7f4b 40%, transparent); }
.tag.warn { color: #c04a12; border-color: color-mix(in srgb, #c04a12 40%, transparent); }
.badge { display: inline-block; border-radius: 8px; padding: 2px 9px; font-size: .8rem; font-weight: 700; }
.badge.price { background: color-mix(in srgb, var(--accent2) 25%, var(--surface)); color: var(--text); }
.badge.price.free { background: #06a77d; color: #fff; }
.badge.feat { background: #ffb703; color: #4a3200; }
.badge.event { background: color-mix(in srgb, #8338ec 18%, var(--surface)); color: var(--text); }
.lang-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }

/* ============ header ============ */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.head-wrap { display: flex; align-items: center; gap: 14px; height: 60px; }
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none !important; color: var(--text); }
.logo-ico { border-radius: 8px; }
.logo-word { font-size: 1.2rem; font-weight: 800; letter-spacing: -.5px; }
.logo-word b { color: var(--accent); }
.head-search { flex: 1; max-width: 380px; }
.head-search input { width: 100%; }
.head-nav { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.head-link { color: var(--text); font-weight: 600; font-size: .93rem; }
.btn-post { box-shadow: var(--shadow); }
.site-notice { background: var(--hero); color: #fff; text-align: center; padding: 7px 16px; font-weight: 600; font-size: .9rem; }

/* dropdown menus */
[data-menu] { position: relative; }
.menu-drop {
  display: none; position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lift); padding: 6px; z-index: 60;
}
[data-menu].open .menu-drop { display: block; }
.menu-drop a, .menu-drop form button {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 9px;
  color: var(--text); text-decoration: none !important; background: none; border: 0;
  font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer;
}
.menu-drop a:hover, .menu-drop form button:hover { background: var(--bg); }
.menu-head { padding: 8px 12px 4px; color: var(--muted); font-size: .8rem; }
.acct-btn { background: none; border: 0; padding: 0; cursor: pointer; }

/* theme picker */
.theme-opt {
  display: grid; grid-template-columns: 22px 1fr; align-items: center; column-gap: 10px;
  width: 100%; padding: 8px 12px; background: none; border: 0; border-radius: 9px;
  font: inherit; font-weight: 600; color: var(--text); cursor: pointer; text-align: left;
}
.theme-opt small { grid-column: 2; color: var(--muted); font-weight: 400; }
.theme-opt:hover { background: var(--bg); }
.theme-opt.on { outline: 2px solid var(--accent); }
.swatch { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); }
.sw-dia { background: linear-gradient(135deg, #faf6ef 50%, #e63946 50%); }
.sw-noche { background: linear-gradient(135deg, #17141f 50%, #ff6b6b 50%); }
.sw-vermu { background: linear-gradient(135deg, #ffefd8 50%, #ff8a3d 50%); }
.sw-neon { background: linear-gradient(135deg, #0c0420 50%, #ff2ea6 50%); }
.sw-retiro { background: linear-gradient(135deg, #eef4e8 50%, #2a9d8f 50%); }
.nav-badge {
  display: inline-block; min-width: 18px; text-align: center; background: var(--accent);
  color: var(--on-accent); border-radius: 999px; font-size: .72rem; font-weight: 800; padding: 1px 5px;
}

/* ============ flash ============ */
.flash {
  position: sticky; top: 64px; z-index: 49; margin: 10px auto; max-width: 640px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--surface); border: 1.5px solid #1a7f4b; color: var(--text);
  border-radius: 12px; padding: 10px 16px; box-shadow: var(--shadow-lift); font-weight: 600;
}
.flash-err { border-color: #d13030; }
.flash-x { background: none; border: 0; cursor: pointer; font-size: 1rem; color: var(--muted); }

/* ============ hero ============ */
.hero { margin: 18px 0 8px; border-radius: 22px; background: var(--hero); color: #fff; box-shadow: var(--shadow-lift); overflow: hidden; }
.hero-inner { padding: 38px 30px 26px; }
.hero h1 { font-size: clamp(1.5rem, 4vw, 2.3rem); margin-bottom: 6px; text-shadow: 0 1px 3px rgba(0,0,0,.2); }
.hero .hi { display: block; opacity: .95; }
.hero-sub { max-width: 640px; margin: 0 0 18px; opacity: .93; }
.hero-search { display: flex; gap: 8px; max-width: 560px; }
.hero-search input { flex: 1; border: 0; box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.hero-search .btn { background: #26211d; color: #fff; }
.hero-chips { margin-top: 16px; padding-bottom: 4px; }
.hero-chips .chip { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.4); color: #fff; backdrop-filter: blur(4px); }
.hero-chips .chip b { color: #ffe66d; }

/* ============ sections / grids ============ */
.section { margin: 26px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.see-all { font-weight: 700; font-size: .9rem; white-space: nowrap; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.page-head { margin: 22px 0 10px; }
.page-head.narrow { max-width: 720px; margin-inline: auto; }
.page-sub { color: var(--muted); margin: 0; }
.crumbs { color: var(--muted); font-size: .88rem; display: inline-block; margin-top: 14px; }
.crumbs a { color: var(--muted); }

/* ============ ad cards ============ */
.card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden; text-decoration: none !important; color: var(--text);
  box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s, border-color .15s;
}
.card:hover { transform: translateY(-3px) rotate(-.3deg); box-shadow: var(--shadow-lift); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.card-media { position: relative; aspect-ratio: 16/10; background: var(--bg); }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-ph { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, var(--cat), color-mix(in srgb, var(--cat) 55%, var(--bg))); }
.card-ph span { font-size: 46px; filter: drop-shadow(0 3px 6px rgba(0,0,0,.25)); }
.card-media .feat { position: absolute; top: 10px; left: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-cat { font-size: .76rem; font-weight: 800; color: var(--cat); text-transform: uppercase; letter-spacing: .4px; }
.card-title { font-size: 1.02rem; font-weight: 750; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-snip { color: var(--muted); font-size: .86rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 6px; }
.meta-item { color: var(--muted); font-size: .8rem; }

/* ============ home layout ============ */
.home-cols { display: grid; grid-template-columns: 1fr 300px; gap: 22px; align-items: start; }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow); }
.side-card h3 { margin-bottom: 10px; }
.member-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.member-row { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; color: var(--text); text-decoration: none !important; }
.member-row:hover { background: var(--bg); }
.member-info { display: flex; flex-direction: column; line-height: 1.25; }
.member-info small { color: var(--muted); }
.post-cta p { color: var(--muted); font-size: .9rem; }

/* ============ avatars ============ */
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-lg { width: 84px; height: 84px; }
.avatar-ph {
  display: inline-grid; place-items: center; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, hsl(var(--h, 20) 65% 55%), hsl(calc(var(--h, 20) + 40) 65% 45%));
}
.avatar.avatar-lg.avatar-ph { font-size: 2rem; }
.big-ph { font-size: 4rem; }

/* ============ browse ============ */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 18px; }
.filter-bar input[type="search"], .filter-bar input:not([type]) { flex: 1; min-width: 160px; max-width: 340px; }
.filter-count { color: var(--muted); font-size: .88rem; margin-left: auto; }
.browse-cols { display: grid; grid-template-columns: 1fr; gap: 22px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 26px 0; }
.page-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 16px; font-weight: 700; text-decoration: none !important; }
.page-info { color: var(--muted); font-size: .9rem; }

/* ============ ad detail ============ */
.ad-page { display: grid; grid-template-columns: 1.65fr 1fr; gap: 24px; margin-top: 12px; align-items: start; }
.gallery-main { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.gallery-main img { width: 100%; max-height: 460px; object-fit: contain; display: block; background: #000; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 8px; }
.gallery-thumbs img { width: 74px; height: 56px; object-fit: cover; border-radius: 10px; cursor: pointer; border: 2px solid transparent; opacity: .75; }
.gallery-thumbs img.on, .gallery-thumbs img:hover { border-color: var(--accent); opacity: 1; }
.gallery-ph { border-radius: 16px; aspect-ratio: 16/8; display: grid; place-items: center; background: linear-gradient(135deg, var(--cat), color-mix(in srgb, var(--cat) 55%, var(--bg))); }
.gallery-ph span { font-size: 72px; filter: drop-shadow(0 4px 8px rgba(0,0,0,.25)); }
.ad-head { margin-top: 16px; }
.ad-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.ad-meta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: .88rem; }
.ad-body { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; margin-top: 14px; box-shadow: var(--shadow); }
.report-box { margin-top: 14px; color: var(--muted); font-size: .88rem; }
.report-box form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.poster-card, .contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow); }
.poster-row { display: flex; gap: 12px; align-items: center; color: var(--text); text-decoration: none !important; }
.poster-row small { display: block; color: var(--muted); }
.poster-anon { color: var(--muted); }
.contact-card h3 { margin-bottom: 10px; }
.form-hint { color: var(--muted); font-size: .85rem; }

/* ============ forms ============ */
input, textarea, select {
  width: 100%; background: var(--surface); color: var(--text);
  border: 1.5px solid var(--line); border-radius: 11px; padding: 10px 13px;
  font: inherit; font-size: .95rem;
}
input:focus, textarea:focus, select:focus { outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent); border-color: var(--accent); }
input[type="checkbox"], input[type="radio"] { width: auto; }
input[type="file"] { padding: 8px; border-style: dashed; cursor: pointer; }
label { display: block; font-weight: 650; font-size: .92rem; margin-bottom: 12px; }
label input, label textarea, label select { margin-top: 5px; font-weight: 400; }
label small { color: var(--muted); font-weight: 400; }
select { width: auto; }
.filter-bar select { width: auto; }
.form-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 22px; max-width: 720px; margin: 0 auto 22px; box-shadow: var(--shadow);
}
.form-card fieldset { border: 0; padding: 0; margin: 0 0 14px; }
.form-card legend { font-weight: 750; padding: 0; margin-bottom: 8px; }
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-error { background: color-mix(in srgb, #d13030 12%, var(--surface)); border: 1.5px solid #d13030; border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; font-weight: 600; }
.check-row { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 14px; }
.check { display: inline-flex; align-items: center; gap: 7px; font-weight: 550; margin: 0; }

/* category picker */
.cat-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.cat-pick {
  position: relative; border: 2px solid var(--line); border-radius: 14px; padding: 12px;
  cursor: pointer; margin: 0; display: flex; flex-direction: column; gap: 2px; transition: border-color .12s, background .12s;
}
.cat-pick input { position: absolute; opacity: 0; }
.cat-pick .cp-emoji { font-size: 1.5rem; }
.cat-pick small { color: var(--muted); font-weight: 400; font-size: .76rem; }
.cat-pick:hover { border-color: color-mix(in srgb, var(--cat) 60%, var(--line)); }
.cat-pick:has(input:checked) { border-color: var(--cat); background: color-mix(in srgb, var(--cat) 10%, var(--surface)); }

/* photos */
.photo-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.photo-existing { position: relative; display: flex; flex-direction: column; gap: 4px; align-items: center; margin: 0; font-weight: 400; }
.photo-existing img { width: 104px; height: 84px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.photo-existing span { font-size: .78rem; color: var(--muted); display: flex; gap: 4px; align-items: center; }
.photo-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.photo-preview img { width: 84px; height: 68px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.dash-photo.is-main img { border: 3px solid #ffb703; }
.main-star { color: #b57e00; font-size: .78rem; font-weight: 800; }
.dash-photo form { margin: 0; }

/* ============ success / manage ============ */
.success-card h2 { margin-top: 12px; }
.code-box {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  background: var(--bg); border: 2px dashed var(--accent); border-radius: 12px; padding: 12px 16px; margin: 10px 0 16px;
}
.code-box code { font-size: 1.25rem; font-weight: 800; letter-spacing: 1px; border: 0; background: none; }
.code-box .code-url { font-size: .85rem; font-weight: 500; letter-spacing: 0; word-break: break-all; }
.manage-status .manage-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.manage-stats { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: .88rem; margin-bottom: 14px; }
.manage-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.manage-actions form { margin: 0; }
.reply-list { display: flex; flex-direction: column; gap: 10px; }
.reply-item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.reply-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 4px; }
.reply-head small { color: var(--muted); margin-left: auto; }
.reply-item p { margin: 0; }

/* ============ people / profile ============ */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.person-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 16px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  color: var(--text); text-decoration: none !important; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
}
.person-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.person-card small { color: var(--muted); }
.person-card .lang-tags { justify-content: center; }
.person-bio { color: var(--muted); font-size: .84rem; margin: 6px 0 0; }
.person-ads { margin-top: 6px; color: var(--accent); font-weight: 700; font-size: .82rem; }
.profile { display: grid; grid-template-columns: 320px 1fr; gap: 24px; margin-top: 18px; align-items: start; }
.profile-main { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 18px; border: 1px solid var(--line); display: block; }
.profile-main.avatar-ph { display: grid; }
.profile-photos { margin-bottom: 14px; }
.profile-name { font-size: 1.4rem; margin-bottom: 2px; }
.profile-handle { color: var(--muted); margin: 0 0 8px; font-size: .9rem; }
.profile-bio { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; margin-bottom: 8px; box-shadow: var(--shadow); }
.profile-bio p { margin: 0; }

/* ============ auth / dashboard ============ */
.auth-wrap { display: grid; place-items: center; min-height: 55vh; padding: 30px 0; }
.auth-card { width: 100%; max-width: 420px; }
.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0 8px; }
.stat-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); }
.stat-tile b { display: block; font-size: 1.45rem; font-weight: 800; }
.stat-tile span { color: var(--muted); font-size: .85rem; }
.stat-tile small { display: block; color: var(--accent); font-size: .78rem; font-weight: 700; }
.myad-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin-bottom: 8px;
}
.myad-title { flex: 1; min-width: 220px; color: var(--text); text-decoration: none !important; }
.myad-title small { display: block; color: var(--muted); }
.myad-actions { display: flex; gap: 6px; }
.myad-actions form { margin: 0; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.theme-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 14px;
  cursor: pointer; font: inherit; color: var(--text); transition: border-color .12s, transform .12s;
}
.theme-card:hover { transform: translateY(-2px); }
.theme-card.on { border-color: var(--accent); }
.theme-card small { color: var(--muted); }

/* ============ messages ============ */
.thread-list { display: flex; flex-direction: column; gap: 8px; max-width: 760px; }
.thread-row {
  display: flex; align-items: center; gap: 12px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px;
  color: var(--text); text-decoration: none !important; transition: border-color .12s;
}
.thread-row:hover { border-color: var(--accent); }
.thread-row.unread { border-left: 4px solid var(--accent); }
.thread-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.thread-info small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-ad { color: var(--accent) !important; font-weight: 600; }
.thread-when { color: var(--muted); font-size: .8rem; text-align: right; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.thread-head h1 { margin-bottom: 0; }
.chat-box {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 18px; max-width: 760px; min-height: 200px; max-height: 55vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px;
}
.bubble-row { display: flex; }
.bubble-row.mine { justify-content: flex-end; }
.bubble { max-width: 78%; background: var(--bg); border-radius: 16px 16px 16px 4px; padding: 9px 14px; }
.bubble-row.mine .bubble { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); border-radius: 16px 16px 4px 16px; }
.bubble small { display: block; color: var(--muted); font-size: .72rem; margin-top: 3px; }
.chat-form { display: flex; gap: 8px; max-width: 760px; align-items: flex-end; }
.chat-form textarea { flex: 1; resize: vertical; }

/* ============ ad slots (banners) ============ */
.ad-slot {
  position: relative; max-width: 1180px; margin: 8px auto 20px; padding: 0 16px; min-height: 68px;
}
.ad-slot-tag {
  position: absolute; top: -9px; left: 26px; background: var(--bg); border: 1px solid var(--line);
  color: var(--muted); font-size: .66rem; text-transform: uppercase; letter-spacing: 1px;
  border-radius: 6px; padding: 1px 7px; z-index: 1;
}
.ad-slot-side { margin: 0 0 16px; padding: 0; }
.ad-slot-side .ad-slot-tag { left: 10px; }
.house-promo {
  display: flex; align-items: center; gap: 14px; background: var(--surface);
  border: 1.5px dashed color-mix(in srgb, var(--cat, var(--accent)) 55%, var(--line));
  border-radius: 14px; padding: 14px 18px; color: var(--text); text-decoration: none !important;
  transition: transform .12s, box-shadow .12s;
}
.house-promo:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.hp-emoji { font-size: 1.6rem; }
.hp-text { flex: 1; font-size: .92rem; }
.hp-text b { color: var(--cat, var(--accent)); margin-right: 6px; }
.hp-cta { font-weight: 800; color: var(--accent); white-space: nowrap; }
.ad-slot-side .house-promo { flex-direction: column; text-align: center; padding: 20px 14px; }

/* ============ admin ============ */
.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 2px solid var(--line); margin-bottom: 18px; padding-bottom: 0; overflow-x: auto; }
.admin-nav a {
  padding: 9px 15px; border-radius: 11px 11px 0 0; color: var(--text); font-weight: 650;
  font-size: .92rem; text-decoration: none !important; white-space: nowrap;
}
.admin-nav a.on { background: var(--surface); border: 2px solid var(--line); border-bottom-color: var(--surface); margin-bottom: -2px; color: var(--accent); }
.admin-tiles { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.chart-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin: 16px 0; }
.chart-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); }
.chart-head { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: .9rem; }
.chart-head span { color: var(--muted); }
.bar-chart { width: 100%; height: auto; }
.bar-chart rect { fill: var(--accent); opacity: .85; }
.bar-chart rect:hover { opacity: 1; }
.bar-chart text { fill: var(--muted); font-size: 9px; }
.feed { display: flex; flex-direction: column; gap: 6px; }
.feed-row { display: flex; gap: 10px; align-items: baseline; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: .9rem; }
.feed-row small { margin-left: auto; color: var(--muted); white-space: nowrap; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th { text-align: left; padding: 11px 14px; border-bottom: 2px solid var(--line); color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .5px; }
.admin-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table .avatar { width: 30px; height: 30px; vertical-align: middle; }
.row-off { opacity: .55; }
.cell-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.cell-actions form { margin: 0; }
.report-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin-bottom: 10px; }
.report-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.report-head small { color: var(--muted); }
.report-details { color: var(--muted); font-style: italic; }
.danger-zone { border-color: color-mix(in srgb, #d13030 45%, var(--line)); }

/* ============ admin todo board ============ */
.todo-add { max-width: 720px; margin: 0 0 22px; }
.todo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.todo-card {
  background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--pr, var(--line));
  border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 8px;
}
.todo-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.todo-top small { color: var(--muted); white-space: nowrap; }
.todo-prio { font-weight: 800; font-size: .8rem; color: var(--pr, var(--text)); }
.todo-text { margin: 0; white-space: pre-wrap; word-break: break-word; flex: 1; }
.todo-done { opacity: .65; }
.todo-done .todo-text { text-decoration: line-through; text-decoration-color: var(--muted); }
.todo-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.todo-actions form { margin: 0; }
.todo-edit summary { list-style: none; cursor: pointer; display: inline-flex; }
.todo-edit summary::-webkit-details-marker { display: none; }
.todo-edit[open] { flex-basis: 100%; }
.todo-edit form { margin-top: 8px; }
.todo-edit-row { display: flex; gap: 10px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.todo-prio-label { display: flex; align-items: center; gap: 8px; margin: 0; }
.todo-share .code-url { font-size: .82rem; }

/* ============ footer / mobile nav / misc ============ */
.site-foot { border-top: 1px solid var(--line); background: var(--surface); margin-top: 30px; padding: 28px 0 90px; }
.foot-wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
.foot-blurb { color: var(--muted); font-size: .88rem; max-width: 300px; }
.foot-links { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; }
.foot-links a { color: var(--muted); }
.foot-links a:hover { color: var(--accent); }
.foot-note { color: var(--muted); font-size: .8rem; margin-top: 22px; }
.logo-sm .logo-word { font-size: 1rem; }

.mobile-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 55;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.mobile-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 7px 0 6px; color: var(--muted); font-size: .68rem; font-weight: 650; text-decoration: none !important;
}
.mobile-nav a span { font-size: 1.25rem; position: relative; }
.mobile-nav a.on { color: var(--accent); }
.mobile-nav .mnav-post span {
  background: var(--hero); color: #fff; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; margin-top: -16px; box-shadow: var(--shadow-lift);
  font-size: 1.5rem; font-weight: 800;
}
.mobile-nav .nav-badge { position: absolute; top: -4px; right: -10px; }

.simple-page { text-align: center; padding: 60px 16px; }
.simple-emoji { font-size: 4rem; margin-bottom: 10px; }
.simple-page p { color: var(--muted); max-width: 420px; margin: 0 auto 22px; }

/* ============ responsive ============ */
@media (min-width: 1100px) {
  .browse-cols { grid-template-columns: 1fr 300px; }
}
@media (max-width: 979px) {
  .home-cols { grid-template-columns: 1fr; }
  .profile { grid-template-columns: 1fr; }
}
@media (max-width: 899px) {
  .ad-page { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  body { padding-bottom: 64px; }
  .head-search, .head-link, .btn-post { display: none; }
  .mobile-nav { display: flex; }
  .site-foot { padding-bottom: 100px; }
  .hero-inner { padding: 26px 20px 20px; }
  .form-2col { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .card-title { font-size: .92rem; }
  .card-snip { display: none; }
  .people-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .flash { top: auto; bottom: 74px; position: fixed; left: 12px; right: 12px; margin: 0; }
  h1 { font-size: 1.4rem; }
  .admin-table thead { display: none; }
  .admin-table tr { display: block; border-bottom: 8px solid var(--bg); }
  .admin-table td { display: flex; gap: 10px; border-bottom: 1px dashed var(--line); }
  .admin-table td::before { content: attr(data-th); font-weight: 700; min-width: 68px; color: var(--muted); font-size: .78rem; }
  .foot-wrap { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
