/* DirectGay styles */
/* ---------- theme tokens ---------- */
:root {
  color-scheme: light dark;
  --bg: #fbf6f3;
  --surface: #ffffff;
  --surface-2: #f6eff3;
  --ink: #1d1626;
  --ink-2: #3d3349;
  --muted: #6f6680;
  --line: #ece3ec;
  --line-2: #ddd0de;
  --accent: #e0245e;
  --accent-strong: #c81d53;
  --accent-ink: #ffffff;
  --accent-soft: #ffe6ef;
  --violet: #7c3aed;
  --grad: linear-gradient(135deg, #ff3d7f, #a855f7);
  --ok: #059669;
  --warn: #b45309;
  --warn-soft: #fff4e5;
  --safe-soft: #e8f7f1;
  --danger: #c81e1e;
  --glow-1: rgb(255 92 154 / 0.10);
  --glow-2: rgb(139 92 246 / 0.09);
  --head-bg: rgb(251 246 243 / 0.82);
  --tag-mix: 100%;
  --tag-base: #000;
  --tag-bg: 12%;
  --show-light: inline-grid;
  --show-dark: none;
  --shadow: 0 1px 2px rgb(29 22 38 / 0.05), 0 6px 20px rgb(29 22 38 / 0.06);
  --radius: 16px;
  --radius-s: 10px;
  --head-h: 64px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Bricolage Grotesque", var(--font);
}
/* Midnight plum. Applied when the device prefers dark (unless the visitor chose light),
   or when the visitor explicitly chose dark. Keep the two blocks identical. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1e1530;
    --surface: #2a1f3f;
    --surface-2: #362953;
    --ink: #f6f0ff;
    --ink-2: #ddd3ef;
    --muted: #b3a7c8;
    --line: #3b2e55;
    --line-2: #4e3f6c;
    --accent: #ff5c9a;
    --accent-strong: #ff86b4;
    --accent-ink: #2b0b1c;
    --accent-soft: rgb(255 92 154 / 0.17);
    --violet: #b794ff;
    --grad: linear-gradient(135deg, #ff5c9a, #b06cff);
    --ok: #34d399;
    --warn: #fbbf24;
    --warn-soft: rgb(251 191 36 / 0.12);
    --safe-soft: rgb(52 211 153 / 0.12);
    --danger: #ff8fa8;
    --glow-1: rgb(255 92 154 / 0.20);
    --glow-2: rgb(139 92 246 / 0.30);
    --head-bg: rgb(30 21 48 / 0.78);
    --tag-mix: 58%;
    --tag-base: #fff;
    --tag-bg: 24%;
    --show-light: none;
    --show-dark: inline-grid;
    --shadow: 0 1px 2px rgb(10 4 20 / 0.35), 0 10px 28px rgb(10 4 20 / 0.32);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1e1530;
  --surface: #2a1f3f;
  --surface-2: #362953;
  --ink: #f6f0ff;
  --ink-2: #ddd3ef;
  --muted: #b3a7c8;
  --line: #3b2e55;
  --line-2: #4e3f6c;
  --accent: #ff5c9a;
  --accent-strong: #ff86b4;
  --accent-ink: #2b0b1c;
  --accent-soft: rgb(255 92 154 / 0.17);
  --violet: #b794ff;
  --grad: linear-gradient(135deg, #ff5c9a, #b06cff);
  --ok: #34d399;
  --warn: #fbbf24;
  --warn-soft: rgb(251 191 36 / 0.12);
  --safe-soft: rgb(52 211 153 / 0.12);
  --danger: #ff8fa8;
  --glow-1: rgb(255 92 154 / 0.20);
  --glow-2: rgb(139 92 246 / 0.30);
  --head-bg: rgb(30 21 48 / 0.78);
  --tag-mix: 58%;
  --tag-base: #fff;
  --tag-bg: 24%;
  --show-light: none;
  --show-dark: inline-grid;
  --shadow: 0 1px 2px rgb(10 4 20 / 0.35), 0 10px 28px rgb(10 4 20 / 0.32);
}
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head-h) + 100px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--font);
  accent-color: var(--accent);
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 540px at 105% -10%, var(--glow-1), transparent 62%),
    radial-gradient(820px 560px at -12% 22%, var(--glow-2), transparent 60%);
}
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 2px; }
a:hover { color: var(--accent); }
img, svg { max-width: 100%; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-soft); }

.wrap { width: min(1200px, 100%); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 680px; margin: 0 auto; padding: 28px 0 48px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.nowrap { white-space: nowrap; }
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.end { justify-content: flex-end; }
.gap-s { gap: 8px; }
.wrap-row { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 14px; }

/* type */
.display, .h1, .h2, .h3, .post-h, .month-h, .logo-word { font-family: var(--display); letter-spacing: -0.02em; }
.display { font-size: clamp(2.3rem, 6vw, 4rem); line-height: 1.02; margin: 0 0 14px; font-weight: 800; }
.h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.08; margin: 0 0 10px; font-weight: 800; }
.h2 { font-size: clamp(1.35rem, 3vw, 1.7rem); line-height: 1.15; margin: 0; font-weight: 800; }
.h3 { font-size: 1.15rem; line-height: 1.25; margin: 0 0 6px; font-weight: 700; }
.kicker { text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.72rem; font-weight: 800; color: var(--accent); margin: 0 0 6px; }
.lede { font-size: 1.1rem; color: var(--ink-2); max-width: 62ch; margin: 0 0 16px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { color: var(--accent-ink); background: var(--accent-strong); }
.btn-ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 0.9rem; }
.btn-xs { min-height: 32px; padding: 0 11px; font-size: 0.82rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.danger { color: var(--danger) !important; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; color: var(--ink); font-size: 1.2rem; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }

/* header */
.site-head { position: sticky; top: 0; z-index: 30; background: var(--head-bg); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; gap: 18px; height: var(--head-h); }
.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo-mark { width: 32px; height: 32px; stroke: none; }
.logo-word { font-size: 1.4rem; font-weight: 800; }
.logo-word b { color: var(--accent); font-weight: 800; }
.main-nav { display: none; gap: 2px; }
.main-nav a, .tab-nav a { text-decoration: none; font-weight: 650; padding: 8px 12px; border-radius: 999px; color: var(--ink-2); }
.main-nav a:hover, .tab-nav a:hover { background: var(--surface-2); color: var(--ink); }
.main-nav a[aria-current="page"], .tab-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-strong); }
.head-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.head-actions .btn-primary span { display: none; }
.head-actions .btn-primary { padding: 0 11px; }
.tab-nav { display: flex; gap: 4px; overflow-x: auto; padding: 0 12px 10px; scrollbar-width: none; }
.tab-nav::-webkit-scrollbar { display: none; }
.tab-nav a { flex: none; font-size: 0.92rem; padding: 6px 12px; }
@media (min-width: 900px) {
  .main-nav { display: flex; }
  .tab-nav { display: none; }
  .head-actions .btn-primary span { display: inline; }
  .head-actions .btn-primary { padding: 0 14px; }
  html { scroll-padding-top: calc(var(--head-h) + 60px); }
}

/* account menu */
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; border-radius: 999px; }
.menu summary::-webkit-details-marker { display: none; }
.avatar { --h: 330; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; font-weight: 800; color: #fff; background: linear-gradient(135deg, hsl(var(--h) 75% 55%), hsl(calc(var(--h) + 50) 70% 50%)); font-size: 0.95rem; flex: none; }
.avatar-s { width: 22px; height: 22px; font-size: 0.7rem; }
.avatar-l { width: 64px; height: 64px; font-size: 1.6rem; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; }
.menu-pop a, .menu-pop button { text-align: left; padding: 10px 12px; border-radius: 9px; text-decoration: none; background: none; border: 0; cursor: pointer; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--surface-2); color: var(--ink); }
.menu-head { padding: 8px 12px 10px; font-size: 0.85rem; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-head b { color: var(--ink); }

/* layout */
main.wrap { padding-top: 20px; padding-bottom: 48px; min-height: 60vh; }
.cols { display: grid; gap: 24px; }
.col-main { min-width: 0; }
@media (min-width: 1000px) { .cols { grid-template-columns: minmax(0, 1fr) 330px; gap: 32px; } }
.sidebar { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.side-title { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.side-h { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted); margin: 0 0 8px; font-weight: 800; }
.side-title .side-h { margin: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 18px; }
.page-head { padding: 12px 0 18px; }
.sec-h { margin: 36px 0 14px; }

/* hero */
.hero { display: grid; gap: 22px; padding: 18px 0 30px; align-items: center; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.15fr 1fr; padding: 28px 0 36px; } }
.hero-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hero-card { display: flex; flex-direction: column; gap: 2px; padding: 16px; border-radius: 18px; text-decoration: none; color: #fff; min-height: 128px; justify-content: flex-end; box-shadow: var(--shadow); transition: transform 0.15s ease; }
.hero-card:hover { color: #fff; transform: translateY(-2px); }
.hero-card .kicker { color: rgb(255 255 255 / 0.85); margin: 0; }
.hero-card b { font-family: var(--display); font-size: 1.2rem; line-height: 1.1; }
.hero-card span:last-child { font-size: 0.85rem; opacity: 0.9; }
.hc-1 { background: linear-gradient(140deg, #f97316, #e0245e); }
.hc-2 { background: linear-gradient(140deg, #1e3a8a, #7c3aed); }
.hc-3 { background: linear-gradient(140deg, #9333ea, #db2777); }
.hc-4 { background: linear-gradient(140deg, #0891b2, #2563eb); }

/* coming-up strip */
.strip { margin-bottom: 22px; }
.strip-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.strip-head .h3 { margin: 0; }
.strip-row { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; }
.strip-row .ev-mini { flex: 0 0 min(250px, 78%); scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line); }
@media (min-width: 1000px) { .strip { display: none; } }

/* feed */
.feed-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.feed-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.feed-head .feed-tools { margin: 0; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg a { text-decoration: none; padding: 6px 14px; border-radius: 999px; font-weight: 650; font-size: 0.9rem; color: var(--ink-2); }
.seg a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / 0.12); }
.seg-sm a { padding: 4px 11px; font-size: 0.82rem; }
.feed { display: flex; flex-direction: column; gap: 10px; }
.post-row, .post-full { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 10px 8px; }
.post-row:hover { border-color: var(--line-2); }
.post-row.pinned, .post-full.pinned { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.post-main { min-width: 0; flex: 1; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--muted); }
.post-title { font-size: 1.08rem; line-height: 1.3; margin: 5px 0 6px; font-weight: 700; overflow-wrap: anywhere; }
.post-title > a { text-decoration: none; }
.domain { display: inline-flex; align-items: center; gap: 3px; font-size: 0.78rem; font-weight: 600; color: var(--muted); text-decoration: none; vertical-align: middle; }
.post-actions, .c-actions, .news-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-left: -8px; }
.post-actions a, .post-actions button, .c-actions button {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; min-height: 34px; border-radius: 8px;
  font-size: 0.84rem; font-weight: 650; color: var(--muted); text-decoration: none; background: none; border: 0; cursor: pointer;
}
.post-actions a:hover, .post-actions button:hover, .c-actions button:hover { background: var(--surface-2); color: var(--ink); }
.user { font-weight: 700; color: var(--ink-2); text-decoration: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.8rem; color: var(--ink); text-decoration: none; background: var(--surface-2); padding: 2px 9px; border-radius: 999px; }
.dot { width: 8px; height: 8px; border-radius: 99px; display: inline-block; flex: none; }
.tag { --tc: var(--muted); display: inline-flex; align-items: center; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.02em; color: color-mix(in srgb, var(--tc) var(--tag-mix), var(--tag-base)); background: color-mix(in srgb, var(--tc) var(--tag-bg), transparent); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.tag-pin { --tc: var(--accent); }
.tag-op { --tc: var(--violet); }
.tag-soft { --tc: var(--ink-2); font-weight: 650; }

/* votes */
.vote { display: flex; flex-direction: column; align-items: center; gap: 0; min-width: 40px; }
.vote button { display: grid; place-items: center; width: 36px; height: 32px; border-radius: 8px; background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 1.15rem; }
.vote button:hover { background: var(--surface-2); }
.vote .vote-up.on { color: var(--accent); }
.vote .vote-up.on svg { fill: currentColor; }
.vote .vote-down.on { color: #6366f1; }
.vote .vote-down.on svg { fill: currentColor; }
.vote-score { font-weight: 800; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.vote-compact { flex-direction: row; min-width: 0; margin-right: 4px; }
.vote-compact button { width: 30px; height: 30px; font-size: 1rem; }

.pager { display: flex; justify-content: space-between; margin-top: 18px; }
.empty { text-align: center; padding: 40px 20px; background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.empty .btn { margin-top: 8px; }

/* sidebar bits */
.headline-list, .link-list, .board-list, .source-list, .comment-list, .admin-list { list-style: none; margin: 0; padding: 0; }
.headline-list li { padding: 8px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.headline-list li:first-child { border-top: 0; padding-top: 0; }
.headline-list a { font-weight: 650; font-size: 0.93rem; line-height: 1.3; text-decoration: none; }
.link-list li { padding: 5px 0; }
.link-list a { font-weight: 650; text-decoration: none; }
.board-group + .board-group { margin-top: 14px; }
.board-list a { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 0.93rem; }
.board-list a:hover, .board-list a[aria-current="page"] { background: var(--surface-2); color: var(--ink); }
.rules-mini { padding-left: 18px; margin: 0 0 8px; }
.source-list li { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-top: 1px solid var(--line); }
.source-list li:first-child { border-top: 0; }
.source-list a { font-weight: 650; text-decoration: none; }
.source-list a[aria-current="page"] { color: var(--accent); }

/* board head */
.board-head { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-end; padding: 20px; margin-bottom: 18px; border-radius: 20px; background: linear-gradient(135deg, color-mix(in srgb, var(--bc) 16%, var(--surface)), var(--surface)); border: 1px solid color-mix(in srgb, var(--bc) 25%, var(--line)); }
.board-head .kicker { color: var(--bc); }
.board-head .h1 { margin-bottom: 4px; }
.board-head p { margin: 0; max-width: 60ch; }

/* post page */
.crumbs { margin-bottom: 10px; }
.post-full { padding: 16px 18px 12px 10px; }
.post-h { font-size: clamp(1.4rem, 3.4vw, 2rem); line-height: 1.15; margin: 6px 0 12px; overflow-wrap: anywhere; }
.link-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; text-decoration: none; margin-bottom: 12px; overflow: hidden; }
.link-card > span { display: flex; flex-direction: column; min-width: 0; }
.link-card .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-card svg { font-size: 1.2rem; color: var(--accent); }
.notice { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); margin: 0 0 12px; }
.notice.warn { background: var(--warn-soft); }
.mod-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line-2); }

.prose { overflow-wrap: anywhere; }
.prose p { margin: 0 0 12px; }
.prose ul, .prose ol { margin: 0 0 12px; padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose blockquote { margin: 0 0 12px; padding: 4px 14px; border-left: 3px solid var(--line-2); color: var(--ink-2); }
.prose code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: 0.9em; }
.prose a { color: var(--accent); font-weight: 600; }
.prose h2 { font-family: var(--display); font-size: 1.5rem; letter-spacing: -0.02em; margin: 34px 0 12px; line-height: 1.2; }
.prose h3 { font-size: 1.1rem; margin: 18px 0 8px; }
.prose section:first-child h2 { margin-top: 0; }

/* comments */
.comments-wrap { margin-top: 22px; }
.composer { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 18px; }
textarea, input[type="text"], input[type="email"], input[type="url"], input:not([type]), input[inputmode], select {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; padding: 11px 13px; min-height: 46px;
}
textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
textarea:focus, input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.comments { list-style: none; margin: 0; padding: 0; }
.comments.nested { margin-left: 12px; padding-left: 12px; border-left: 2px solid var(--line); }
.comment { padding: 10px 0 4px; }
.c-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 0.84rem; }
.c-head a.muted { text-decoration: none; }
.c-body { display: flex; align-items: flex-start; gap: 4px; margin-top: 4px; }
.c-text { flex: 1; min-width: 0; padding-top: 3px; }
.c-text p:last-child { margin-bottom: 4px; }
.c-actions { margin-left: 0; }
.reply-slot:not(:empty) { margin: 6px 0 10px; }
.comment:target > .c-body .c-text { background: var(--accent-soft); border-radius: 8px; padding: 4px 8px; }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 650; }
.field > span { font-size: 0.9rem; }
.check, .radio { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; }
.check input, .radio input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.code-input { font-size: 1.6rem; letter-spacing: 0.3em; text-align: center; font-family: ui-monospace, Menlo, monospace; }
.auth { padding-top: 40px; }
.danger-zone { border-color: color-mix(in srgb, #c81e1e 30%, var(--line)); box-shadow: none; }
.search-form { display: flex; gap: 8px; margin-bottom: 24px; }
.search-sec { margin-bottom: 26px; }
.search-sec .h3 { margin-bottom: 10px; }
.result { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; margin-bottom: 8px; }

/* filter chips */
.fchips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: thin; }
.fchip { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2); text-decoration: none; font-weight: 650; font-size: 0.9rem; }
.fchip.on { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgb(224 36 94 / 0.25); }
.fchip.on:hover { color: #fff; }

/* calendar */
.cal-head .lede { margin-bottom: 14px; }
.cal-tools { padding: 4px 0 0; }
.month-nav { position: sticky; top: calc(var(--head-h) + 44px); z-index: 10; display: flex; gap: 6px; overflow-x: auto; margin: 6px -16px 0; padding: 8px 16px; scrollbar-width: none; background: var(--head-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .month-nav { top: var(--head-h); } }
.month-nav::-webkit-scrollbar { display: none; }
.month-nav a { flex: none; text-decoration: none; font-size: 0.85rem; font-weight: 700; padding: 5px 10px; border-radius: 10px; background: var(--surface-2); display: inline-flex; gap: 6px; align-items: center; }
.month-nav a span { font-size: 0.72rem; color: var(--muted); font-weight: 800; }
.month { margin: 22px 0 8px; }
.month-h { font-size: 1.5rem; margin: 0 0 12px; font-weight: 800; }
.month-h span { color: var(--muted); font-weight: 600; }
.ev-list { display: grid; gap: 12px; }
@media (min-width: 760px) { .month .ev-list { grid-template-columns: 1fr 1fr; } }
.ev-card { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.ev-card:target { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.ev-card.is-now { border-color: color-mix(in srgb, var(--ok) 50%, var(--line)); }
.ev-date { flex: none; width: 58px; height: 62px; border-radius: 14px; background: var(--accent); color: var(--accent-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.ev-date span { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }
.ev-date b { font-family: var(--display); font-size: 1.6rem; font-weight: 800; }
.ev-date.is-tba { background: var(--surface-2); color: var(--ink-2); border: 1px dashed var(--line-2); }
.ev-body { min-width: 0; flex: 1; }
.ev-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 4px; }
.ev-name { font-family: var(--display); font-size: 1.18rem; line-height: 1.2; margin: 2px 0 4px; letter-spacing: -0.01em; }
.ev-where { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0 0 6px; font-size: 0.88rem; font-weight: 600; }
.ev-where svg { color: var(--accent); }
.ev-when { color: var(--ink-2); }
.tba { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; color: var(--warn); }
.ev-desc { margin: 0 0 8px; font-size: 0.93rem; color: var(--ink-2); }
.ev-links { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.85rem; font-weight: 700; }
.ev-links a { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; color: var(--accent); min-height: 30px; }
.live { display: inline-flex; align-items: center; gap: 5px; font-size: 0.72rem; font-weight: 800; color: var(--ok); text-transform: uppercase; letter-spacing: 0.05em; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 9px; background: currentColor; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .live::before { animation: none; } * { scroll-behavior: auto !important; } }
.ev-mini { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; text-decoration: none; }
.ev-mini:hover { background: var(--surface-2); color: var(--ink); }
.ev-mini .ev-date { width: 46px; height: 48px; border-radius: 11px; }
.ev-mini .ev-date b { font-size: 1.2rem; }
.ev-mini .ev-date span { font-size: 0.62rem; }
.ev-mini-body { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.ev-mini-body b { font-size: 0.93rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cal-foot { margin-top: 28px; max-width: 80ch; }

/* news */
.day-h { font-family: var(--display); font-size: 1.15rem; margin: 22px 0 8px; color: var(--muted); }
.day-h:first-child { margin-top: 0; }
.news-item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 8px; margin-bottom: 8px; }
.news-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.news-title { font-size: 1.05rem; line-height: 1.3; margin: 6px 0 6px; }
.news-title a { text-decoration: none; }
.news-actions { margin-left: 0; gap: 6px; }

/* guides & cities */
.guide-grid, .city-card-grid { display: grid; gap: 14px; }
@media (min-width: 700px) { .guide-grid, .city-card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1050px) { .guide-grid, .city-card-grid { grid-template-columns: repeat(3, 1fr); } }
.guide-card, .city-card { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: 20px; text-decoration: none; background: var(--surface); border: 1px solid var(--line); position: relative; overflow: hidden; transition: transform 0.15s ease, border-color 0.15s ease; }
.guide-card:hover, .city-card:hover { transform: translateY(-2px); border-color: var(--line-2); color: var(--ink); }
.guide-card p, .city-card p { margin: 0; color: var(--ink-2); }
.guide-card::before, .city-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--g); }
.gc-1, .cc-1 { --g: linear-gradient(90deg, #f97316, #e0245e); }
.gc-2, .cc-2 { --g: linear-gradient(90deg, #1e3a8a, #7c3aed); }
.gc-3, .cc-3 { --g: linear-gradient(90deg, #9333ea, #db2777); }
.gc-4, .cc-4 { --g: linear-gradient(90deg, #0891b2, #2563eb); }
.gc-5, .cc-5 { --g: linear-gradient(90deg, #059669, #0891b2); }
.gc-6, .cc-6 { --g: linear-gradient(90deg, #eab308, #f97316); }
.more { color: var(--accent); font-weight: 700; margin-top: auto; padding-top: 6px; }
.city-grid { display: grid; gap: 10px; }
@media (min-width: 700px) { .city-grid { grid-template-columns: repeat(3, 1fr); } }
.city-chip { display: flex; flex-direction: column; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; }

.guide-head { padding: 12px 0 18px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.guide-head .h1 { max-width: 30ch; }
.guide-cols { display: grid; gap: 24px; }
@media (min-width: 1000px) { .guide-cols { grid-template-columns: 230px minmax(0, 1fr); gap: 40px; } }
.toc { align-self: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.toc ol { margin: 0; padding-left: 18px; font-size: 0.92rem; }
.toc li { margin: 4px 0; }
.toc a { text-decoration: none; font-weight: 600; }
@media (min-width: 1000px) { .toc { position: sticky; top: calc(var(--head-h) + 16px); } }
.guide-body { max-width: 760px; font-size: 1.03rem; }
.guide-body section { scroll-margin-top: calc(var(--head-h) + 60px); }
.callout { display: block; padding: 14px 16px; border-radius: 14px; background: var(--accent-soft); margin: 14px 0; }
.callout > strong { display: block; margin-bottom: 4px; }
.callout ul { margin: 6px 0 0; }
.callout.warn { background: var(--warn-soft); }
.callout.safe { background: var(--safe-soft); }
.facts { list-style: none; padding: 0 !important; display: grid; gap: 8px; }
.facts li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 0 !important; }
.steps { counter-reset: s; list-style: none; padding: 0 !important; }
.steps > li { counter-increment: s; position: relative; padding: 2px 0 12px 46px !important; margin: 0 !important; }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 99px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 0.9rem; }
.timeline { list-style: none; padding: 0 0 0 18px !important; border-left: 3px solid var(--accent-soft); }
.timeline li { position: relative; padding-left: 12px; }
.timeline li::before { content: ""; position: absolute; left: -26px; top: 8px; width: 13px; height: 13px; border-radius: 99px; background: var(--accent); border: 3px solid var(--bg); }
.two-col { display: grid; gap: 14px; margin-bottom: 12px; }
@media (min-width: 700px) { .two-col { grid-template-columns: 1fr 1fr; } }
.two-col > div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.two-col h3 { margin-top: 0; }
.table-wrap { overflow-x: auto; margin: 0 0 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
table.data th, table.data td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); background: var(--surface-2); }
table.data tr:last-child td { border-bottom: 0; }
.bar-grid, .hood-grid { display: grid; gap: 10px; margin-bottom: 12px; }
@media (min-width: 700px) { .bar-grid, .hood-grid { grid-template-columns: 1fr 1fr; } }
.bar-card, .hood { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.bar-card h3, .hood h3 { margin: 0 0 2px; font-size: 1.02rem; }
.bar-card p, .hood p { margin: 0 0 6px; font-size: 0.93rem; }
.bar-card .muted { display: flex; align-items: center; gap: 4px; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.rent { font-weight: 800; color: var(--ok); font-size: 0.85rem; letter-spacing: 0.05em; }
.cta-card { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; padding: 20px; border-radius: 20px; background: linear-gradient(135deg, var(--accent-soft), var(--surface)); border: 1px solid var(--line); margin-top: 30px; }
.cta-card p { margin: 0; }
.static .lede { font-size: 1.15rem; }
.rules li { margin-bottom: 10px; }

/* profile / admin */
.profile-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.profile-head p { margin: 0; }
.comment-list li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.comment-list p { margin: 4px 0; }
.stat-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 16px; display: flex; flex-direction: column; }
.stat b { font-family: var(--display); font-size: 1.6rem; }
.stat span { font-size: 0.8rem; color: var(--muted); }
.admin-list li { padding: 8px 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.admin-list li:first-child { border-top: 0; }

/* dialog + toast */
.dialog { border: 1px solid var(--line); border-radius: 20px; padding: 22px; width: min(440px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgb(0 0 0 / 0.3); }
.dialog::backdrop { background: rgb(20 10 32 / 0.55); backdrop-filter: blur(3px); }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-weight: 650; box-shadow: var(--shadow); z-index: 60; max-width: calc(100vw - 32px); }
.toast.err { background: #c81e1e; color: #fff; }

/* footer */
.site-foot { border-top: 1px solid var(--line); padding: 28px 0 36px; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; }
.foot-row p { max-width: 40ch; margin: 8px 0 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; align-content: flex-start; max-width: 520px; }
.foot-links a { text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.foot-note { margin-top: 18px; }

/* theme menu */
.theme-menu .ti { display: none; }
.theme-menu .ti-light { display: var(--show-light); place-items: center; }
.theme-menu .ti-dark { display: var(--show-dark); place-items: center; }
.theme-menu summary.icon-btn { display: inline-grid; }
.menu-pop button { display: flex; align-items: center; gap: 10px; }
.menu-pop button[aria-pressed="true"] { color: var(--accent-strong); font-weight: 700; }
.menu-pop button[aria-pressed="true"]::after { content: "✓"; margin-left: auto; }

/* location */
.loc-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 0.9rem; margin: 8px 0 4px; }
.loc-bar > svg { color: var(--accent); }
.link-btn { background: none; border: 0; padding: 4px 2px; color: var(--accent-strong); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; font-size: inherit; }
.link-btn.small { font-size: 0.875rem; }
.away { font-size: 0.78rem; font-weight: 700; color: var(--accent-strong); background: var(--accent-soft); padding: 1px 7px; border-radius: 999px; }
.side-near { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); background: linear-gradient(160deg, var(--accent-soft), var(--surface) 55%); }
.side-near > a.small { display: inline-block; margin-top: 6px; font-weight: 700; color: var(--accent-strong); }
.city-card.is-near { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.city-card .kicker { margin: 0; }
@media (max-width: 420px) {
  .head-row { gap: 10px; }
  .logo-word { font-size: 1.22rem; }
  .logo-mark { width: 28px; height: 28px; }
  .head-actions { gap: 2px; }
  .head-actions .btn-sm { padding: 0 11px; }
}
