/* Layout: a short sunset-striped masthead with launch countdown, then a sidebar of filters beside a card feed; composer and reader open as dialogs; a fixed ad bar along the bottom. Dark-first. */
:root {
  --bg: #14101f; --surface: #1d1730; --surface-2: #261e3d; --line: #33294d;
  --fg: #f3ece4; --muted: #a79ebb;
  --pink: #ff5c8a; --teal: #33d6c6; --sun: #ffb347; --on-accent: #1a0f1f;
  --danger: #ff7a6b;
  --display: "Bungee", "Arial Black", Impact, sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --r: 10px;
  --adbar-h: 0px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) { :root {
  --bg: #f1f5f4; --surface: #ffffff; --surface-2: #e7efed; --line: #d3dedb;
  --fg: #1c1631; --muted: #5d5872;
  --pink: #d02e66; --teal: #0d8b80; --sun: #b86200; --on-accent: #ffffff;
  --danger: #c23a2b; color-scheme: light; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.55 var(--body); padding-bottom: var(--adbar-h); }
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--teal); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 20px; }
@media (max-width: 480px) { .wrap { padding-inline: 16px; } }

/* Loading bar */
.loadbar { position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none;
  transform: scaleX(0); transform-origin: left center; overflow: hidden;
  background: linear-gradient(90deg, var(--teal), var(--pink) 55%, var(--sun));
  box-shadow: 0 0 10px color-mix(in srgb, var(--pink) 70%, transparent), 0 0 4px color-mix(in srgb, var(--teal) 60%, transparent);
  transition: transform .25s ease-out, opacity .35s ease .2s; }
.loadbar::after { content: ""; position: absolute; inset: 0; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  animation: loadshine 1.1s linear infinite; }
.loadbar.done { opacity: 0; }
.loadbar.error { background: var(--danger); box-shadow: 0 0 10px color-mix(in srgb, var(--danger) 70%, transparent); }
.loadbar.error.done { opacity: 0; transition: transform .25s ease-out, opacity .4s ease 1s; }
.loadbar.reset { transition: none; }
@keyframes loadshine { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
@media (prefers-reduced-motion: reduce) { .loadbar::after { animation: none; display: none; } }

/* Top nav */
.topnav { border-bottom: 1px solid var(--line); background: var(--bg); }
.topnav .navbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; flex-wrap: wrap; padding-block: 6px; }
.brand { font: 400 15px/1 var(--display); color: var(--fg); text-decoration: none; }
.brand span { color: var(--pink); }
.navlinks { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; font-size: 14px; }
.navlinks a { color: var(--muted); text-decoration: none; }
.navlinks a:hover { color: var(--fg); }
.me { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.me img { width: 26px; height: 26px; border-radius: 50%; }

.navlinks a[aria-current="page"] { color: var(--fg); }
.menubtn { display: none; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--fg);
  border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 14px; cursor: pointer; }
.burger, .burger::before, .burger::after { display: block; width: 14px; height: 2px; border-radius: 2px; background: currentColor; position: relative; transition: transform .2s, background .2s; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -5px; } .burger::after { top: 5px; }
.menubtn[aria-expanded="true"] .burger { background: transparent; }
.menubtn[aria-expanded="true"] .burger::before { transform: translateY(5px) rotate(45deg); }
.menubtn[aria-expanded="true"] .burger::after { transform: translateY(-5px) rotate(-45deg); }
.navmenu { border-top: 1px solid var(--line); background: var(--bg); max-height: calc(100dvh - 56px); overflow-y: auto; box-shadow: 0 16px 30px rgba(0, 0, 0, .35); }
.navmenu .wrap { display: flex; flex-direction: column; gap: 14px; padding-block: 14px 20px; }
.menulinks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.menulinks a { padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--fg); text-decoration: none; font-weight: 600; }
.menulinks a[aria-current="page"] { border-color: var(--pink); }
.navmenu .label { margin: 4px 0 -4px; }
.menucats { display: flex; flex-wrap: wrap; gap: 8px; }
.menucats a { border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; color: var(--fg); text-decoration: none; font-size: 14px; }
.menucats a[aria-current="page"] { background: var(--surface-2); border-color: var(--muted); }
.menucats .n { font: 500 11px var(--mono); color: var(--muted); margin-left: 4px; }
.menume { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.menume:empty { display: none; }
.navscrim { position: fixed; inset: 56px 0 0; background: rgba(8, 5, 14, .6); z-index: -1; }
html.menu-open { overflow: hidden; }
.menume img { width: 28px; height: 28px; border-radius: 50%; }

@media (max-width: 760px) {
  .topnav { position: sticky; top: 0; z-index: 30; }
  .topnav .navbar { flex-wrap: nowrap; min-height: 56px; }
  .navlinks { display: none; }
  .menubtn { display: inline-flex; }
}

/* Masthead */
.mast { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.mast::before { content: ""; position: absolute; inset: 0; z-index: 0; opacity: .9;
  background:
    repeating-linear-gradient(180deg, transparent 0 14px, var(--bg) 14px 18px),
    linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--sun) 35%, transparent) 55%, color-mix(in srgb, var(--pink) 55%, transparent) 100%);
  -webkit-mask: linear-gradient(90deg, transparent 0%, #000 55%); mask: linear-gradient(90deg, transparent 0%, #000 55%); }
.mast .wrap { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px; padding-block: 36px 26px; }
.eyebrow { font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--teal); }
h1 { font: 400 clamp(30px, 6vw, 54px)/0.95 var(--display); margin: 10px 0 10px; letter-spacing: .01em; text-wrap: balance; }
h1 span { color: var(--pink); }
.tag { color: var(--muted); max-width: 46ch; margin: 0; }
.count { display: flex; align-items: baseline; gap: 10px; background: color-mix(in srgb, var(--bg) 70%, transparent);
  border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; backdrop-filter: blur(6px); }
.count b { font: 400 40px/1 var(--display); color: var(--sun); font-variant-numeric: tabular-nums; }
.count small { font: 500 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* Body grid */
.main { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; padding-block: 28px 64px; }
@media (max-width: 760px) { .main { grid-template-columns: minmax(0, 1fr); gap: 20px; } }
aside { display: flex; flex-direction: column; gap: 22px; }
@media (min-width: 761px) { aside { position: sticky; top: 20px; align-self: start; } }
.label { font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; display: block; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 9px 16px; cursor: pointer; font-weight: 600; text-decoration: none; color: var(--fg); }
.btn:hover { border-color: var(--muted); }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.primary { background: var(--pink); border-color: var(--pink); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); }
.btn.danger.armed { background: var(--danger); border-color: var(--danger); color: var(--on-accent); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.seg { display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 760px) { .seg { flex-direction: row; flex-wrap: wrap; } }
.seg button { text-align: left; background: none; border: 1px solid transparent; border-radius: 8px; padding: 7px 10px; cursor: pointer; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; }
.seg button:hover { color: var(--fg); background: var(--surface); }
.seg button[aria-pressed="true"] { color: var(--fg); background: var(--surface-2); border-color: var(--line); }
.seg button .n { font: 500 12px var(--mono); font-variant-numeric: tabular-nums; color: var(--muted); }
.search { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; }
.filters { display: flex; flex-direction: column; gap: 22px; }

/* Home page on phones: filters become one swipeable row that sticks under the top bar,
   posts follow the search box, and the sign-in/crew box moves below the posts. */
@media (max-width: 760px) {
  .main { padding-block-start: 0; gap: 14px; }
  .main > aside { display: contents; }
  .filters { order: -2; position: sticky; top: 56px; z-index: 20; flex-direction: row; gap: 6px; align-items: center;
    margin-inline: -16px; padding: 10px 16px; background: var(--bg); border-bottom: 1px solid var(--line);
    overflow-x: auto; scrollbar-width: none; -webkit-mask: linear-gradient(90deg, #000 88%, transparent); mask: linear-gradient(90deg, #000 88%, transparent); }
  .filters::-webkit-scrollbar { display: none; }
  .filters > div { display: contents; }
  .filters .label { display: none; }
  .filters .seg { display: contents; }
  .filters .seg button { flex: none; white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; background: var(--surface); gap: 6px; }
  .filters .seg button[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
  .filters .seg button[aria-pressed="true"] .n { color: var(--bg); opacity: .7; }
  .filters .seg button.zero { display: none; }
  #kindSeg button:last-child { margin-right: 10px; position: relative; }
  #kindSeg button:last-child::after { content: ""; position: absolute; right: -9px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
  .searchbox { order: -1; }
  .searchbox .label { display: none; }
  .main > main { order: 0; }
  .postarea { order: 1; }
  /* Crew get a floating New post button; the rest of the box sits below the posts. */
  .postarea > .btn.primary { position: fixed; right: 16px; bottom: calc(var(--adbar-h) + 16px + env(safe-area-inset-bottom, 0px)); z-index: 25;
    width: auto !important; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
  .postarea > .btn.ghost { margin-top: 0 !important; }
}
.joinbox { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 10px; }
.joinbox strong { color: var(--fg); font-size: 14px; }

.feedhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.feedhead h2 { font: 400 20px/1.1 var(--display); margin: 0; }
.note { color: var(--muted); font-size: 13px; }
.feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }

.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; min-width: 0; }
.card:hover { border-color: color-mix(in srgb, var(--muted) 60%, var(--line)); }
.thumb { aspect-ratio: 16/9; max-width: 100%; display: block; position: relative; overflow: hidden; background: linear-gradient(160deg, var(--teal), var(--pink) 70%, var(--sun)); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .play { position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; border-radius: 50%; background: rgba(10, 6, 18, .72); display: grid; place-items: center; transition: transform .15s; }
.thumb:hover .play { transform: scale(1.08); }
.thumb .play::after { content: ""; border-left: 16px solid #fff; border-top: 10px solid transparent; border-bottom: 10px solid transparent; margin-left: 4px; }
.thumb .yt { position: absolute; left: 10px; bottom: 8px; font: 500 11px var(--mono); color: #fff; background: rgba(10, 6, 18, .7); padding: 3px 7px; border-radius: 4px; }
.cbody { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font: 500 11px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.kind { padding: 2px 7px; border-radius: 4px; }
.kind.guide { background: color-mix(in srgb, var(--teal) 18%, transparent); color: var(--teal); }
.kind.video { background: color-mix(in srgb, var(--pink) 18%, transparent); color: var(--pink); }
.spoil { color: var(--sun); }
.card h3 { margin: 0; font-size: 17px; line-height: 1.3; text-wrap: balance; overflow-wrap: anywhere; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { text-decoration: underline; text-decoration-color: var(--pink); }
.excerpt { color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.blur { filter: blur(5px); user-select: none; cursor: pointer; }
.foot { margin-top: auto; padding-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
.who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 2px 4px; font-size: 13px; text-decoration: none; }
.mini:hover { color: var(--fg); text-decoration: underline; }

.feedad { grid-column: 1 / -1; min-height: 100px; border: 1px dashed var(--line); border-radius: var(--r); padding: 8px; }
.adtag { display: block; font: 500 10px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }

.empty { border: 1px dashed var(--line); border-radius: var(--r); padding: 40px 24px; text-align: center; color: var(--muted); grid-column: 1 / -1; }
.empty strong { display: block; color: var(--fg); font: 400 18px var(--display); margin-bottom: 6px; }
.empty p { margin: 0 auto 16px; max-width: 46ch; }

/* Dialogs */
dialog { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--fg); padding: 0; width: min(680px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); }
dialog::backdrop { background: rgba(8, 5, 14, .6); }
.dhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.dhead h2 { margin: 0; font: 400 18px var(--display); }
.x { background: none; border: 0; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); padding: 4px 8px; }
.dbody { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 13px; }
.field .hint { color: var(--muted); font-size: 12px; }
.field input[type="text"], .field input[type="url"], .field select, .field textarea {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; width: 100%; }
.field textarea { min-height: 200px; resize: vertical; font-family: var(--body); line-height: 1.5; }
.row { display: flex; flex-wrap: wrap; gap: 14px; }
.row > * { flex: 1 1 200px; min-width: 0; }
.kindpick { display: flex; gap: 8px; }
.kindpick button { flex: 1; padding: 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; font-weight: 600; }
.kindpick button[aria-pressed="true"] { border-color: var(--pink); background: color-mix(in srgb, var(--pink) 14%, var(--bg)); }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.err { color: var(--danger); font-size: 13px; margin: 0; }
.actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.people { display: flex; flex-direction: column; gap: 8px; }
.person { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.person .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .t small { color: var(--muted); margin-left: 6px; }

/* Article page */
.article { max-width: 760px; padding-block: 32px 64px; }
.article h1 { font: 700 clamp(26px, 4vw, 36px)/1.2 var(--body); letter-spacing: 0; margin: 10px 0 8px; }
.byline { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.prose { max-width: 65ch; overflow-wrap: anywhere; font-size: 16px; }
.prose h3 { font: 400 17px var(--display); color: var(--teal); margin: 26px 0 8px; }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin-bottom: 5px; }
.prose code { font: 13px var(--mono); background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.spoilwarn { border: 1px solid var(--sun); color: var(--sun); border-radius: var(--r); padding: 14px 16px; margin-bottom: 20px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.videoembed { aspect-ratio: 16/9; width: 100%; border: 0; border-radius: var(--r); background: #000; margin-bottom: 20px; }

/* Topic links (home page and category pages) */
.topics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.topics:empty { display: none; }
.topics .label { width: 100%; margin-bottom: 2px; }
.topics a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--muted); text-decoration: none; }
.topics a:hover { color: var(--fg); border-color: var(--muted); }
.topics a[aria-current="page"] { color: var(--fg); background: var(--surface-2); }
.meta a { color: inherit; text-decoration: none; }
.meta a:hover { color: var(--fg); }

/* Category pages */
.cathead { padding-block: 32px 8px; }
.cathead h1 { font: 400 clamp(26px, 5vw, 40px)/1 var(--display); margin: 10px 0 12px; }
.cathead p { color: var(--muted); max-width: 62ch; margin: 0; }
.catbody { padding-block: 20px 64px; }

/* Toolbars (cheats, tracker) */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 22px; }
.toolbar .search { flex: 1 1 220px; width: auto; min-width: 0; }
.platpick { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface); }
.platpick button { border: 0; background: none; border-radius: 999px; padding: 6px 14px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 13px; }
.platpick button[aria-pressed="true"] { background: var(--surface-2); color: var(--fg); }

/* Cheats */
.cheatcat { margin-bottom: 28px; }
.cheatcat h2 { font: 400 17px var(--display); color: var(--teal); margin: 0 0 10px; }
.cheat { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px 24px; align-items: center;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin-bottom: 8px; }
@media (max-width: 700px) { .cheat { grid-template-columns: minmax(0, 1fr); } }
.cheatinfo h3 { margin: 0; font-size: 16px; }
.cheatinfo p { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
.cheatinfo .cnote { font-size: 12px; color: var(--sun); }
.codes { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.code { display: flex; align-items: center; gap: 10px; min-width: 0; }
.plat { flex: none; width: 82px; font: 500 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.combo { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.key { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 6px;
  border: 1px solid var(--line); border-bottom-width: 2px; background: var(--surface-2); font: 600 12px/1 var(--mono); color: var(--fg); }
.key.dir { font-size: 15px; }
.key.ps-x, .key.ps-o, .key.ps-sq, .key.ps-tri, .key.xb-a, .key.xb-b, .key.xb-x, .key.xb-y { border-radius: 50%; width: 28px; padding: 0; font-size: 15px; }
.key.ps-x { color: #6aa6ff; } .key.ps-o { color: #ff6a7a; } .key.ps-sq { color: #ff8fd0; } .key.ps-tri { color: #3fd7a5; }
.key.xb-a { background: #2f8f2f; color: #fff; border-color: #236b23; }
.key.xb-b { background: #c4302b; color: #fff; border-color: #92231f; }
.key.xb-x { background: #2563c9; color: #fff; border-color: #1b4996; }
.key.xb-y { background: #d9a400; color: #1a1300; border-color: #a27a00; }
.othercode { font: 500 13px var(--mono); overflow-wrap: anywhere; }
.cheats[data-plat="ps"] .plat-xb, .cheats[data-plat="xb"] .plat-ps { display: none; }

/* Completion tracker */
.progress { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 16px 18px; margin-bottom: 20px; }
.pnum { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.pnum b { font: 400 34px/1 var(--display); color: var(--sun); font-variant-numeric: tabular-nums; }
.pnum span { color: var(--muted); font-variant-numeric: tabular-nums; }
.pbar, .tsbar { display: block; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.pbar i, .tsbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--pink)); border-radius: inherit; transition: width .3s; }
.progress .note { margin: 10px 0 0; }
.tsec { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin-bottom: 10px; }
.tsec summary { display: grid; grid-template-columns: minmax(0, 1fr) auto 120px; align-items: center; gap: 14px; padding: 12px 16px; cursor: pointer; list-style: none; }
.tsec summary::-webkit-details-marker { display: none; }
.tsname { font-weight: 700; }
.tsname::before { content: "▸ "; color: var(--muted); }
.tsec[open] .tsname::before { content: "▾ "; }
.tscount { font: 500 12px var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .tsec summary { grid-template-columns: minmax(0, 1fr) auto; } .tsbar { grid-column: 1 / -1; } }
.tsec ul { list-style: none; margin: 0; padding: 0 8px 8px; }
.titem { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; }
.titem:hover { background: var(--surface-2); }
.titem input { width: 18px; height: 18px; accent-color: var(--pink); flex: none; cursor: pointer; }
.titem label { flex: 1; min-width: 0; cursor: pointer; display: flex; flex-direction: column; }
.titem .tnote { color: var(--muted); font-size: 13px; }
.titem.done .tname { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--pink); }
.danger-text { color: var(--danger); }

/* Interactive map */
.mapshell { display: grid; grid-template-columns: 280px minmax(0, 1fr); height: calc(100dvh - 53px - var(--adbar-h)); min-height: 480px; border-bottom: 1px solid var(--line); }
@media (max-width: 900px) { .mapshell { grid-template-columns: minmax(0, 1fr); height: auto; } .mapwrap { order: -1; height: 70dvh; min-height: 360px; } }
.mappanel { display: flex; flex-direction: column; gap: 14px; padding: 18px 16px; border-right: 1px solid var(--line); overflow-y: auto; min-height: 0; }
.maptitle { font: 400 26px/1 var(--display); margin: 8px 0 0; }
.pintypes { display: flex; flex-wrap: wrap; gap: 6px; }
.pintypes button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 10px; font-size: 12px; cursor: pointer; color: var(--fg); }
.pintypes button[aria-pressed="false"] { opacity: .45; }
.pintypes .n { font: 500 11px var(--mono); color: var(--muted); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.pinlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.pinlist button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: none; border: 0; padding: 6px 8px; border-radius: 6px; cursor: pointer; color: var(--fg); font-size: 14px; }
.pinlist button:hover { background: var(--surface-2); }
.mapwrap { position: relative; min-width: 0; min-height: 0; }
.map { width: 100%; height: 100%; background: #0d0a16; }
.map.placing { cursor: crosshair; }
.map.placing .leaflet-interactive, .map.placing.leaflet-container { cursor: crosshair; }
.mapplaceholder { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px;
  background: repeating-linear-gradient(0deg, transparent 0 47px, var(--line) 47px 48px), repeating-linear-gradient(90deg, transparent 0 47px, var(--line) 47px 48px), var(--bg); }
.mapplaceholder .empty { background: var(--surface); max-width: 460px; }
.pinmark span { display: block; width: 16px; height: 16px; margin: 2px; border-radius: 50%; border: 2px solid #120d1c; box-shadow: 0 0 0 2px rgba(255,255,255,.75), 0 2px 6px rgba(0,0,0,.5); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--fg); border: 1px solid var(--line); }
.leaflet-popup-content { margin: 12px 14px; font: 14px/1.45 var(--body); }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
.pinpop { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; min-width: 180px; }
.pinpop p { margin: 0; color: var(--muted); }
.pinpoptype { font: 500 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.leaflet-bar a { background: var(--surface); color: var(--fg); border-color: var(--line); }
.pinsec h2 { display: flex; align-items: center; gap: 8px; font: 400 16px var(--display); margin: 24px 0 8px; }
.pinsec ul { columns: 3 220px; margin: 0; padding-left: 18px; }
.pinsec li { margin-bottom: 4px; break-inside: avoid; }

/* Static pages */
.page { max-width: 760px; padding-block: 32px 64px; }
.page h1 { font: 700 clamp(26px, 4vw, 34px)/1.2 var(--body); letter-spacing: 0; }
.page h2 { font: 400 17px var(--display); color: var(--teal); margin-top: 28px; }
.page p, .page li { max-width: 65ch; }

footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; padding-block: 18px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; }
footer a { color: var(--muted); }

/* Bottom ad bar */
.adbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px); box-shadow: 0 -6px 20px rgba(0, 0, 0, .18); }
.adbar::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: linear-gradient(90deg, var(--teal), var(--pink), var(--sun)); }
.adbar .wrap { display: flex; align-items: center; gap: 12px; padding-block: 6px; }
.adbar .slot { flex: 1; min-width: 0; height: 90px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
@media (max-width: 760px) { .adbar .slot { height: 50px; } }
.adbar .slot ins { width: 100%; height: 100%; }
.adbar .house { color: var(--muted); font-size: 14px; }
.adbar .house strong { color: var(--fg); }
.adclose { flex: none; align-self: flex-start; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
