/* Layout: sticky marquee header, one 1100px column; rankings as box-office
   ledger rows, cinema listings as perforated ticket stubs. */
:root {
  --paper: #f4f3f7;
  --card: #ffffff;
  --ink: #1c1a2b;
  --muted: #69667d;
  --line: #dcd9e5;
  --accent: #a8124a;
  --accent-soft: #f7e3ea;
  --on-accent: #ffffff;
  --watched: #1d746c;
  --watched-soft: #ddf0ed;
  --bar: #cfcadd;
  --star: #c98a00;
  --danger: #b42318;
  --shadow: 0 1px 2px rgba(28, 26, 43, .06), 0 6px 20px rgba(28, 26, 43, .06);

  --font-display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-data: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --r: 10px;
  --wrap: 1100px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #14121d; --card: #1d1a2a; --ink: #eeebf6; --muted: #a39fb8;
    --line: #2f2b42; --accent: #f2587f; --accent-soft: #3a1a29; --on-accent: #1a0710;
    --watched: #56c4b6; --watched-soft: #13302d; --bar: #3d3854; --star: #f0b429;
    --danger: #ff7a6e; --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #14121d; --card: #1d1a2a; --ink: #eeebf6; --muted: #a39fb8;
  --line: #2f2b42; --accent: #f2587f; --accent-soft: #3a1a29; --on-accent: #1a0710;
  --watched: #56c4b6; --watched-soft: #13302d; --bar: #3d3854; --star: #f0b429;
  --danger: #ff7a6e; --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { background: var(--paper); }
body {
  color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.55;
  margin: 0;
}
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { text-wrap: balance; line-height: 1.1; margin: 0; }
.wrap {
  max-width: var(--wrap); margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.mono { font-family: var(--font-data); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

/* Header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--ink); }
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9; background: var(--ink); color: var(--paper); }
.site-head .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; padding-block: 8px; }
.brand { font-family: var(--font-display); font-weight: 800; font-size: 28px; letter-spacing: .02em; text-decoration: none; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.brand-bulbs { display: inline-flex; gap: 3px; }
.brand-bulbs i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); display: block; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; padding: 6px 10px; border-radius: 999px; font-weight: 500; font-size: 14px; opacity: .8; }
.nav a:hover, .nav a.on { opacity: 1; background: rgba(255, 255, 255, .12); }
.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card);
  border-radius: 999px; padding: 7px 14px; cursor: pointer; font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.ghost { background: transparent; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn.on-wish { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.btn.on-watched { background: var(--watched-soft); border-color: var(--watched); color: var(--watched); }
.btn svg { width: 16px; height: 16px; flex: none; }
.site-head .btn { background: transparent; color: var(--paper); border-color: color-mix(in srgb, var(--paper) 40%, transparent); }
.site-head .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.demo-bar { background: var(--accent-soft); color: var(--ink); font-size: 13px; }
.demo-bar .wrap { padding-block: 8px; }

main { padding-block: 28px 48px; min-height: 60vh; }
.section { display: grid; gap: 14px; margin-bottom: 40px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-head h2 { font-family: var(--font-display); font-weight: 800; font-size: 34px; text-transform: uppercase; letter-spacing: .01em; }

/* Hero */
.hero { display: grid; gap: 10px; margin-bottom: 32px; }
.hero h1 { font-family: var(--font-display); font-weight: 900; font-size: clamp(40px, 7vw, 76px); text-transform: uppercase; letter-spacing: -.005em; line-height: .95; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { max-width: 60ch; margin: 0; color: var(--muted); font-size: 17px; }

/* Tabs */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { border: 1px solid var(--line); background: transparent; padding: 6px 14px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 14px; }
.tab[aria-selected="true"], .tab[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Ledger rows */
.ledger { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.row {
  display: grid; grid-template-columns: 3.2rem minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 12px 16px; border-top: 1px solid var(--line);
}
.row:first-child { border-top: 0; }
.rank { font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1; color: var(--muted); text-align: right; }
.row.top .rank { color: var(--accent); }
.row-main { min-width: 0; display: grid; gap: 4px; }
.row-title { font-weight: 600; font-size: 16px; text-decoration: none; overflow-wrap: anywhere; }
.row-title:hover { color: var(--accent); }
.row-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--bar); border-radius: 3px; }
.row.top .bar > i { background: var(--accent); }
.row-actions { display: flex; gap: 6px; }
.icon-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.icon-btn:hover { border-color: var(--muted); color: var(--ink); }
.icon-btn.on-wish { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.icon-btn.on-watched { color: var(--watched); border-color: var(--watched); background: var(--watched-soft); }
.icon-btn svg { width: 16px; height: 16px; }
.pill { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.pill.teal { background: var(--watched-soft); color: var(--watched); }
.pill.plain { background: var(--line); color: var(--ink); }

/* Ticket stubs */
.tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 14px; }
.ticket {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  display: grid; grid-template-rows: 1fr auto; text-decoration: none; min-width: 0;
}
.ticket:hover { border-color: var(--accent); }
.ticket-top { padding: 14px 16px 12px; display: grid; gap: 6px; align-content: start; }
.ticket-title { font-family: var(--font-display); font-weight: 800; font-size: 22px; text-transform: uppercase; line-height: 1.02; overflow-wrap: anywhere; }
.ticket-stub {
  border-top: 2px dashed var(--line); padding: 10px 16px; display: flex; justify-content: space-between; gap: 8px;
  font-size: 12px; color: var(--muted); align-items: center;
}
.ticket::before, .ticket::after {
  content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%; background: var(--paper);
  border: 1px solid var(--line); bottom: 33px;
}
.ticket::before { left: -8px; border-left-color: transparent; border-bottom-color: transparent; transform: rotate(45deg); }
.ticket::after { right: -8px; border-right-color: transparent; border-top-color: transparent; transform: rotate(45deg); }

.soon { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.soon a { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); text-decoration: none; align-items: baseline; }
.soon a:first-child { border-top: 0; }
.soon a:hover .t { color: var(--accent); }
.soon .d { font-family: var(--font-data); font-size: 13px; color: var(--muted); }
.soon .t { font-weight: 600; overflow-wrap: anywhere; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 24px; align-items: start; }

/* Movie page */
.movie-head { display: grid; gap: 12px; margin-bottom: 24px; }
.movie-head h1 { font-family: var(--font-display); font-weight: 900; font-size: clamp(38px, 6vw, 64px); text-transform: uppercase; line-height: .95; overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: 10px; }
.fact { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 2px; }
.fact b { font-family: var(--font-display); font-weight: 800; font-size: 28px; line-height: 1.05; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: grid; gap: 14px; min-width: 0; }
.panel h3 { font-size: 17px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.stars { display: inline-flex; gap: 2px; }
.star { background: none; border: 0; padding: 2px; cursor: pointer; color: var(--line); }
.star svg { width: 28px; height: 28px; display: block; }
.star.lit { color: var(--star); }
.stars.readonly .star { cursor: default; }
.score-line { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.score-big { font-family: var(--font-display); font-weight: 900; font-size: 44px; line-height: 1; }

/* Comments */
.composer { display: grid; gap: 8px; }
.composer textarea { width: 100%; min-height: 84px; resize: vertical; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--paper); }
.composer .row-end { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.comments { display: grid; gap: 4px; }
.comment { display: grid; gap: 4px; padding: 12px 0; border-top: 1px solid var(--line); min-width: 0; }
.comment:first-child { border-top: 0; }
.comment .who { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.comment .who b { color: var(--ink); font-weight: 600; }
.comment .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.comment .tools { display: flex; gap: 12px; font-size: 13px; }
.linkish { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; font-weight: 600; }
.linkish:hover { color: var(--accent); }
.linkish.danger:hover { color: var(--danger); }
.replies { margin-left: 18px; padding-left: 14px; border-left: 2px solid var(--line); display: grid; }
.avatar { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--on-accent); background: var(--accent); flex: none; }

/* Tables */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 10px 14px; border-top: 1px solid var(--line); }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-top: 0; font-weight: 600; }
td.num, th.num { text-align: right; font-family: var(--font-data); font-variant-numeric: tabular-nums; }
td a { text-decoration: none; font-weight: 600; }
td a:hover { color: var(--accent); }

.empty { padding: 28px 18px; text-align: center; color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: var(--r); }
.field { display: grid; gap: 6px; }
.field input, .field textarea { border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; background: var(--paper); width: 100%; }
.field label { font-weight: 600; font-size: 14px; }
.note { font-size: 13px; color: var(--muted); }
.err { color: var(--danger); font-size: 13px; }

/* Dialog */
.modal-back { position: fixed; inset: 0; background: rgba(10, 8, 20, .55); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--card); border-radius: 14px; width: min(100%, 420px); padding: 24px; display: grid; gap: 14px; box-shadow: var(--shadow); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; }
.modal h2 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 30px; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 999px; font-size: 14px; z-index: 60; box-shadow: var(--shadow); max-width: calc(100% - 32px); }

/* Footer + ad */
.site-foot { border-top: 1px solid var(--line); padding-block: 24px calc(24px + env(safe-area-inset-bottom, 0px)); }
.site-foot .wrap { display: grid; gap: 16px; }
.ad-slot { min-height: 90px; display: grid; place-items: center; }
.ad-slot.placeholder { border: 1px dashed var(--line); border-radius: var(--r); color: var(--muted); font-size: 13px; text-align: center; padding: 12px; }
.ad-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: center; }
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); justify-content: space-between; }
.foot-links nav { display: flex; gap: 16px; flex-wrap: wrap; }

@media (max-width: 560px) {
  .row { grid-template-columns: 2.4rem minmax(0, 1fr); }
  .row-actions { grid-column: 2; }
  .rank { font-size: 24px; }
  .nav { margin-left: 0; width: 100%; }
}
@media (prefers-reduced-motion: no-preference) {
  .view { animation: rise .25s ease-out; }
  @keyframes rise { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: none; } }
}

/* Search + add a movie */
.head-search { flex: 1 1 14rem; min-width: 0; max-width: 22rem; }
.head-search input {
  width: 100%; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: var(--paper);
  border-radius: 999px; padding: 7px 14px; font-size: 14px;
}
.head-search input::placeholder { color: var(--paper); opacity: .6; }
#search-q { font-size: 17px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); width: 100%; }
.add-form { display: grid; grid-template-columns: minmax(0, 1fr) 7rem auto; gap: 10px; align-items: end; }
.admin-mini { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.admin-mini input { border: 1px solid var(--line); border-radius: 8px; padding: 5px 9px; background: var(--paper); min-width: 0; flex: 1 1 10rem; font-size: 13px; }
.admin-mini input[type="number"] { flex: 0 0 5.5rem; }
@media (max-width: 560px) {
  .add-form { grid-template-columns: 1fr 6rem; }
  .add-form .btn { grid-column: 1 / -1; justify-self: start; }
  .head-search { max-width: none; flex-basis: 100%; order: 3; }
}

/* Jom Keluar */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.filters .field { flex: 1 1 11rem; min-width: 0; }
.filters .field.grow { flex: 2 1 16rem; }
select { border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; background: var(--paper); color: var(--ink); width: 100%; font: inherit; font-size: 15px; }
#jom-q { font-size: 15px; }
.ev-list { display: grid; gap: 4px; }
.month-head { font-family: var(--font-display); font-weight: 800; font-size: 24px; text-transform: uppercase; margin: 14px 0 6px; }
.ev-date { display: grid; justify-items: center; align-content: center; gap: 2px; text-decoration: none; line-height: 1; }
.ev-date b { font-family: var(--font-display); font-weight: 900; font-size: 30px; color: var(--accent); }
.ev-date span { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ext { display: inline-flex; gap: 4px; align-items: center; font-weight: 600; text-decoration: none; }
.ext svg { width: 13px; height: 13px; }
.ext:hover { color: var(--accent); }
.btn svg + * { margin-left: 0; }

/* Share + groups */
.share-row { display: flex; gap: 8px; flex-wrap: wrap; }
.share-row select { flex: 1 1 9rem; width: auto; }
.share-row input { flex: 2 1 12rem; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; background: var(--paper); }
.group-row { text-decoration: none; }
.group-row:hover .row-title { color: var(--accent); }
.group-row .rank svg, .row .rank svg { width: 24px; height: 24px; }
.clip { max-width: 28ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.add-form.two { grid-template-columns: minmax(0, 1fr) auto; }
.chat-panel { padding: 0; gap: 0; overflow: hidden; }
.chat { display: grid; gap: 8px; align-content: start; height: min(62vh, 560px); overflow-y: auto; padding: 16px; background: var(--paper); overscroll-behavior: contain; }
.chat-day { justify-self: center; font-size: 12px; color: var(--muted); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; margin: 6px 0; }
.msg { justify-self: start; max-width: min(80%, 34rem); background: var(--card); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 8px 12px; display: grid; gap: 4px; min-width: 0; }
.msg.mine { justify-self: end; background: var(--accent-soft); border-color: transparent; border-radius: 14px 14px 4px 14px; }
.msg .who { font-size: 12px; font-weight: 700; color: var(--accent); }
.msg .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg .meta { font-size: 11px; color: var(--muted); display: flex; gap: 8px 14px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.msg .meta .acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.msg .meta .time { margin-left: auto; white-space: nowrap; }
.msg .meta .linkish { font-size: 11px; }
.ref-card { display: grid; gap: 1px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--card); text-decoration: none; }
.ref-card b { font-weight: 600; }
.ref-card:hover b { color: var(--accent); }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--card); }.chat-form input, .chat-form textarea.msg-in { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 999px; padding: 10px 14px; background: var(--paper); font-size: 16px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 12px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; color: var(--muted); }
.chip b { color: var(--ink); }
.compare-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 14px; }
.mini-list { margin: 0; padding-left: 1.4em; display: grid; gap: 4px; }
.mini-list a { text-decoration: none; font-weight: 600; }
.mini-list a:hover { color: var(--accent); }
.invite-row { display: flex; gap: 8px; flex-wrap: wrap; }
.invite-row input { flex: 1 1 14rem; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: var(--paper); font-size: 14px; }
.row .rank .avatar { width: 30px; height: 30px; font-size: 12px; }
@media (max-width: 560px) {
  .ev-row { grid-template-columns: 2.6rem minmax(0, 1fr); }
  .ev-date b { font-size: 24px; }
  .add-form.two { grid-template-columns: 1fr; }
  .add-form.two .btn { justify-self: start; }
  .nav a { padding: 6px 8px; }
}

/* Catalogue search */
.suggest-host { position: relative; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; min-width: min(22rem, calc(100vw - 32px)); }
.sg { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); gap: 8px; align-items: center; padding: 9px 12px; text-decoration: none; border-top: 1px solid var(--line); }
.sg:first-child { border-top: 0; }
.sg:hover, .sg.on { background: var(--accent-soft); }
.sg-kind { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sg-main { display: grid; min-width: 0; }
.sg-main b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-main span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-all { grid-template-columns: 1fr; font-size: 13px; font-weight: 600; color: var(--accent); }
.sg-empty { padding: 10px 12px; font-size: 13px; color: var(--muted); }
.chip.link { text-decoration: none; color: var(--ink); background: var(--card); }
.chip.link:hover { border-color: var(--accent); color: var(--accent); }
.chips.cast { align-items: center; }
.chips.cast .chip, .actor-chips .chip { font-size: 13px; padding: 3px 10px; }
.actor-chips { align-items: center; margin-bottom: 4px; }

/* My Log + community feed */
.log-stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); }
.log-stats .fact b { font-family: var(--font-display); font-size: 34px; font-weight: 900; line-height: 1; }
.log-tabs { display: flex; gap: 18px 28px; flex-wrap: wrap; }
.log-group { display: grid; gap: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.feed-row { text-decoration: none; }
.feed-row:hover .row-title { color: var(--accent); }
.feed-body { font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.feed-row .rank svg { width: 22px; height: 22px; }

/* Movies menu with its links always shown */
.nav-group { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.nav-group .nav-head { padding-bottom: 2px; }
.nav-sub { display: flex; gap: 2px; flex-wrap: wrap; }
.nav .nav-sub a { font-size: 12px; padding: 2px 8px; opacity: .65; }
.nav .nav-sub a:hover, .nav .nav-sub a.on { opacity: 1; background: rgba(255, 255, 255, .12); }
@media (max-width: 560px) {
  .nav-group { width: 100%; flex-direction: row; align-items: center; flex-wrap: wrap; border-bottom: 1px solid rgba(255, 255, 255, .12); padding-bottom: 6px; margin-bottom: 2px; }
  .nav-group .nav-head { padding-bottom: 6px; }
}
@media (min-width: 561px) {
  .nav { align-items: flex-start; }
  .nav > a, .nav > .btn { margin-top: 0; }
}
@media (min-width: 561px) {
  .nav-group { align-items: center; }
}

/* Tap-to-rate stars in My Log rows */
.stars.inline { gap: 0; }
.stars.inline .star { padding: 4px 3px; color: var(--muted); opacity: .35; transition: color .12s, opacity .12s, transform .12s; }
.stars.inline .star svg { width: 22px; height: 22px; }
.stars.inline .star.lit { color: var(--star); opacity: 1; }
.stars.inline .star:hover { opacity: .8; color: var(--star); transform: scale(1.12); }
.stars.inline .star:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 4px; }
.rate-hint { font-size: 12px; }
.view.still { animation: none !important; }
.name-status { font-size: 13px; min-height: 1.2em; }
.name-status.good { color: var(--watched); font-weight: 600; }
.name-status.err { color: var(--danger); }
.name-status .linkish { color: var(--accent); text-decoration: underline; }

/* Member-added events */
.jom-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.pill.verified { background: var(--watched-soft); color: var(--watched); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid .span2 { grid-column: 1 / -1; }
.field select { font-size: 15px; }
.req { color: var(--danger); }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

/* Community checks */
.pill.spam { background: var(--accent-soft); color: var(--accent); }
.vote-panel { gap: 10px; }
.vote-row .btn.vote b { font-variant-numeric: tabular-nums; margin-left: 2px; }
.vote-row .btn.vote.on { background: var(--watched-soft); border-color: var(--watched); color: var(--watched); }
.vote-row .btn.vote[data-v="spam"].on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.vote-row .btn.vote:disabled { opacity: .55; cursor: not-allowed; }
.dup-pick { display: grid; gap: 6px; }
.owner-tools { display: grid; gap: 8px; border-top: 1px dashed var(--line); padding-top: 10px; }
.vote-settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 10px; align-items: end; }
#community-checks h4 { margin: 8px 0 0; font-size: 15px; }

/* Trusted member badge */
.tbadge { display: inline-grid; place-items: center; width: 16px; height: 16px; margin-left: 4px; border-radius: 4px; background: var(--watched); color: #fff; font: 800 10px/1 var(--font-body, inherit); letter-spacing: 0; vertical-align: 1px; cursor: help; text-transform: none; }
.tbadge.off { background: var(--line); color: var(--ink); opacity: .7; }
.trust-line { margin: 0; display: flex; gap: 6px; align-items: baseline; }
.trust-line .tbadge { margin-left: 0; flex: none; }
#trusted-members h3 .tbadge { vertical-align: 3px; }

/* Bell and account menu */
.head-tools { display: flex; align-items: center; gap: 6px; margin-left: 4px; }
.pop-host { position: relative; }
.site-head .icon-btn.bell { position: relative; color: var(--paper); border-color: color-mix(in srgb, var(--paper) 40%, transparent); background: transparent; }
.site-head .icon-btn.bell:hover { background: color-mix(in srgb, var(--paper) 12%, transparent); }
.bell-count { position: absolute; top: -5px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font: 700 11px/18px var(--font-body, inherit); text-align: center; box-shadow: 0 0 0 2px var(--ink); }
.acct-btn { min-width: 34px; justify-content: center; }
.acct-btn svg { width: 16px; height: 16px; }
.acct-btn .tbadge { margin-left: 3px; }
.pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; width: min(22rem, calc(100vw - 24px)); background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; display: grid; gap: 2px; }
.pop[hidden] { display: none; }
.pop:not([hidden]) { max-height: calc(100dvh - var(--head-h, 54px) - 24px); overflow-y: auto; overscroll-behavior: contain; }
#pop-acct { width: 15rem; }
.pop-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 6px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.pop .pop-item { opacity: 1; display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: inherit; background: none; border: 0; font: inherit; font-size: 14px; cursor: pointer; }
.pop .pop-item:hover, .pop .pop-item:focus-visible { background: var(--line); }
.note-list { display: grid; gap: 2px; max-height: min(60vh, 26rem); overflow-y: auto; }
.pop .note-item { opacity: 1; display: grid; gap: 2px; padding: 8px 10px 8px 18px; border-radius: 8px; text-decoration: none; color: inherit; font-size: 14px; line-height: 1.35; position: relative; }
.pop .note-item:hover { background: var(--line); }
.pop .note-item small { color: var(--muted, inherit); opacity: .7; font-size: 12px; }
.pop .note-item.unread::before { content: ''; position: absolute; left: 6px; top: 14px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.pop .note-item:not(.unread) { opacity: .75; }
.pop .pop-foot { border-radius: 0; opacity: .85; font-size: 13px; padding: 8px 10px 4px; border-top: 1px solid var(--line); margin-top: 4px; }
.notify-pref { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; margin: 0; }
.pop-theme { display: flex; align-items: center; gap: 4px; padding: 8px 6px 4px; margin-top: 4px; border-top: 1px solid var(--line); }
.pop-theme .note { margin-right: auto; font-size: 12px; }
.pop-theme button { font: inherit; font-size: 12px; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line); background: none; color: inherit; cursor: pointer; }
.pop-theme button.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.notify-pref legend { font-weight: 600; font-size: 14px; padding: 0 4px; }
@media (max-width: 560px) { .head-tools { margin-left: auto; } .pop, #pop-acct { position: fixed; left: 12px; right: 12px; width: auto; } }

/* One-row header on wide screens: logo and search sit on the same row as the menu */
@media (min-width: 1150px) {
  .site-head .wrap { flex-wrap: nowrap; max-width: 1320px; gap: 14px; padding-block: 6px; }
  .brand { font-size: 24px; flex: none; }
  .head-search { flex: 1 1 11rem; min-width: 11rem; max-width: 17rem; }
  .nav { flex-wrap: nowrap; flex: none; }
  .nav > a { white-space: nowrap; }
}

/* Movies dropdown in the header */
.nav .nav-head { font: inherit; font-weight: 500; font-size: 14px; color: inherit; background: none; border: 0; cursor: pointer; padding: 6px 10px; border-radius: 999px; opacity: .8; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.nav .nav-head:hover, .nav .nav-head.on, .nav .nav-head[aria-expanded="true"] { opacity: 1; background: color-mix(in srgb, var(--paper) 12%, transparent); }
.nav .caret { font-size: 10px; opacity: .8; }
.pop.pop-left { left: 0; right: auto; width: 12rem; }
.pop .pop-item.on { font-weight: 700; background: var(--line); }
@media (max-width: 560px) { .pop.pop-left { width: auto; } }

/* Feedback */
.site-head .nav a.head-icon { width: 34px; height: 34px; border-radius: 50%; border: 1px solid; color: var(--paper); border-color: color-mix(in srgb, var(--paper) 40%, transparent); background: transparent; display: inline-grid; place-items: center; opacity: 1; padding: 0; }
.site-head .nav a.head-icon:hover, .site-head .nav a.head-icon.on { background: color-mix(in srgb, var(--paper) 12%, transparent); }
.tab.radio { white-space: nowrap; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.tab.radio input { accent-color: var(--accent); margin: 0; }
.tab.radio:has(input:checked) { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.fb-list { display: grid; gap: 10px; }
.fb-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; }
.fb-item p { margin: 0; white-space: pre-wrap; }
.fb-reply { background: var(--watched-soft); border-radius: 8px; padding: 8px 10px; }
.fb-reply p { margin-top: 2px; }
.pill.fb-new { background: var(--accent-soft); color: var(--accent); }
.pill.fb-planned { background: var(--line); color: var(--ink); }
.pill.fb-done { background: var(--watched-soft); color: var(--watched); }

/* Stars on every ranking row */
.row-rate { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.rate-tip { margin-top: -6px; }
.tabs .pop-host { display: inline-block; }
.rk-pop { width: 11rem; }

/* Owner page: members */
.mem-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 4px 0 12px; }
.mem-stat { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 2px; }
.mem-stat b { font-family: var(--font-data); font-size: 22px; }
.mem-stat span { font-size: 12px; color: var(--muted); }
.mem-table-wrap { overflow-x: auto; }
.mem-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mem-table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.mem-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.mem-table td:last-child, .mem-table th:last-child { text-align: right; font-family: var(--font-data); }

/* Header: the page you're on glows */
.site-head .nav a.on:not(.head-icon), .site-head .nav .nav-head.on {
  opacity: 1; color: #fff; font-weight: 600;
  background: linear-gradient(135deg, #e8336f, #c4145a);
  box-shadow: 0 0 0 1px rgba(255, 120, 160, .55), 0 0 12px 2px rgba(242, 88, 127, .55), 0 0 26px 4px rgba(242, 88, 127, .25);
  text-shadow: 0 0 8px rgba(255, 255, 255, .45);
  animation: nav-glow 2.8s ease-in-out infinite;
}
@keyframes nav-glow {
  50% { box-shadow: 0 0 0 1px rgba(255, 140, 175, .75), 0 0 16px 3px rgba(242, 88, 127, .7), 0 0 34px 8px rgba(242, 88, 127, .32); }
}
@media (prefers-reduced-motion: reduce) { .site-head .nav a.on, .site-head .nav .nav-head.on { animation: none; } }

/* Settings: delete account */
.danger-zone { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.danger-zone summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
.danger-zone summary::-webkit-details-marker { display: none; }
.danger-zone summary::after { content: '▸'; color: var(--muted); }
.danger-zone[open] summary::after { content: '▾'; }
.danger-zone summary h3 { margin: 0; color: var(--danger); }
.danger-body { margin-top: 10px; font-size: 14px; }
.danger-body ul { padding-left: 18px; display: grid; gap: 4px; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }

.log-sub { font-size: 15px; margin: 20px 0 4px; }
.note svg { width: 14px; height: 14px; vertical-align: -2px; }

/* Settings page */
.settings { display: grid; gap: 16px; max-width: 760px; }
.settings .panel { margin: 0; }
.settings-card h3 { margin: 0 0 10px; }
.settings-card .notify-pref { border: 0; padding: 0; }
.settings-card .notify-pref legend { padding: 0; margin-bottom: 4px; }

/* Group chat: switch bar */
.group-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.group-switch select { font: inherit; font-size: 14px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); max-width: 260px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Near me */
.near-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 8px 0 12px; }
.near-bar.on { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--card); }
.near-bar .tabs { margin: 0; }
.near-bar .note { flex-basis: 100%; margin: 0; font-size: 12px; }
.near-bar:not(.on) .note { flex-basis: auto; }
.near-tools { font-size: 13px; }
.pill.dist { background: var(--watched-soft); color: var(--watched); font-weight: 600; }
.map-modal { width: min(720px, 100%); }
.pick-map { height: min(60vh, 420px); border-radius: 10px; border: 1px solid var(--line); background: var(--paper); }
.map-search { display: flex; gap: 8px; }
.map-search input { flex: 1; font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }

/* Movie page: cinemas near you */
.chain-list { display: grid; gap: 8px; }
.chain { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chain b { min-width: 7.5rem; }

/* Outside review scores */
.ext { display: inline-flex; align-items: center; gap: 3px; font-family: var(--font-data); font-size: 12px; font-weight: 600; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); white-space: nowrap; }
.ext.rt { color: #c4280e; border-color: color-mix(in srgb, #fa320a 40%, var(--line)); }
.ext.mc { color: var(--ink); background: color-mix(in srgb, var(--watched) 14%, transparent); }
:root[data-theme="dark"] .ext.rt { color: #ff7a5c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ext.rt { color: #ff7a5c; } }
.row-rate .ext { margin-left: 6px; }
.reviews-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 8px 0; }
.reviews-line .note { font-size: 12px; }

/* Campsite page: photo banner, smaller title, chat on the right */
.camp-hero { position: relative; height: clamp(200px, 34vw, 340px); border-radius: 14px; overflow: hidden; margin: 6px 0 14px; background: var(--card); border: 1px solid var(--line); }
.camp-hero img, .camp-hero .area-map { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.camp-hero.is-map::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.25), transparent 30%, transparent 70%, rgba(0,0,0,.35)); pointer-events: none; z-index: 400; }
.hero-btn { font: inherit; font-size: 12px; background: rgba(10, 8, 20, .62); color: #fff; padding: 5px 11px; border-radius: 999px; border: 0; text-decoration: none; cursor: pointer; backdrop-filter: blur(4px); }
.hero-btn.warn { background: rgba(180, 35, 24, .85); }
.camp-hero .back { position: absolute; left: 10px; top: 10px; z-index: 500; }
.hero-top { position: absolute; right: 10px; top: 10px; display: flex; gap: 6px; z-index: 500; }
.photo-tools { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 6px; z-index: 500; }
.hero-credit { position: absolute; right: 10px; bottom: 10px; z-index: 500; font-size: 11px; background: rgba(10, 8, 20, .62); color: #fff; padding: 3px 9px; border-radius: 999px; max-width: 60%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-credit a { color: #fff; }
.hero-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 500; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(10, 8, 20, .55); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.hero-nav.prev { left: 10px; } .hero-nav.next { right: 10px; }
.camp-head { display: grid; gap: 8px; margin-bottom: 16px; }
.camp-head .actions { margin: 0; }
h1.camp-title { font-size: clamp(24px, 3.2vw, 36px); line-height: 1.1; margin: 0; letter-spacing: 0; }
.camp-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .camp-layout { grid-template-columns: 1fr; } }
.camp-side { display: grid; gap: 14px; min-width: 0; }
.facts.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.chatbox { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.chatbox h3 { margin: 0; }
.chat-switch { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { font: inherit; font-size: 13px; border: 0; background: none; color: var(--ink); padding: 6px 16px; border-radius: 999px; cursor: pointer; }
.seg button.on { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.chat-switch select { font: inherit; font-size: 13px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); max-width: 240px; }
.chat-foot { margin: 0; font-size: 12px; }

/* One chat window look for public and group chats on movie, event and campsite pages */
.chat-window { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: grid; background: var(--card); }
.chat-window .chat { height: min(60vh, 480px); }
.chat-window .chat-form { border-top: 1px solid var(--line); }
.chat-signin { justify-content: center; }
.chat-empty { justify-self: center; margin: auto 0; }
.reply-bar { display: flex; gap: 8px; align-items: center; justify-content: space-between; font-size: 12px; padding: 6px 12px; background: var(--accent-soft); border-top: 1px solid var(--line); }
.reply-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.msg .quote { display: block; font-size: 12px; color: var(--muted); border-left: 3px solid var(--accent); padding: 2px 8px; border-radius: 4px; background: color-mix(in srgb, var(--paper) 60%, transparent); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.msg.flash { outline: 2px solid var(--accent); outline-offset: 2px; }
.chatbox .chat-foot { margin: 0; }

/* Compact one-row info boxes (movie, event, campsite pages); swipe sideways when there are more than fit */
.facts.strip { display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: thin; padding-bottom: 4px; }
.facts.strip.more { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
.facts.strip .fact { flex: 1 0 112px; min-width: 112px; max-width: 220px; padding: 8px 10px; gap: 1px; scroll-snap-align: start; }
.facts.strip .fact > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.facts.strip .fact .eyebrow { font-size: 10px; }
.facts.strip .fact b { font-size: 18px; line-height: 1.15; }
.facts.strip .fact .note { font-size: 11px; }
@media (hover: none), (max-width: 760px) { .facts.strip .fact { flex: 0 0 auto; max-width: 85vw; } }

/* Chat on movie, event and campsite pages: same bottom edge as the left column */
.grid-2 > .chatbox, .camp-layout > .chatbox { align-self: stretch; }
.chatbox { display: flex; flex-direction: column; }
.chatbox .chat-window { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chatbox .chat-window .chat { flex: 1 1 0; height: 0; min-height: 260px; }
@media (max-width: 860px) { .chatbox .chat-window .chat { flex: none; height: min(60vh, 480px); } }
/* …and when the chat is the taller one, the last box on the left stretches so both bottoms still line up. */
@media (min-width: 861px) {
  .grid-2:has(> .chatbox) > div:first-child, .camp-layout > .camp-side { align-self: stretch; display: flex !important; flex-direction: column; }
  .grid-2:has(> .chatbox) > div:first-child > :last-child, .camp-layout > .camp-side > :last-child { flex-grow: 1; }
}

/* Chat page: one window that fills the screen; only the messages scroll */
.chat-page { display: grid; gap: 10px; padding-top: 6px; }
.chat-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
h1.chat-title { font-size: 26px; margin: 0 auto 0 0; letter-spacing: 0; }
.chat-top .tabs { margin: 0; }
.dd-btn { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop.pop-left.chat-groups-pop { width: min(19rem, calc(100vw - 24px)); }
.pop .gpick { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.pop .gpick small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.pop .gpick.on { font-weight: 700; background: var(--line); }
.pop-sep { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
.pop .new-group { color: var(--accent); font-weight: 700; }
.room-window { height: 70vh; display: flex; flex-direction: column; }
.room-window .chat { flex: 1 1 0; height: auto; min-height: 0; }
.extras-pane { display: block; }
.older { justify-self: center; font-size: 12px; }
.item-tag { justify-self: start; font: inherit; font-size: 12px; font-weight: 600; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 999px; padding: 2px 9px; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-tag:hover { border-color: var(--accent); color: var(--accent); }
button.quote { font: inherit; text-align: left; cursor: pointer; border-top: 0; border-right: 0; border-bottom: 0; color: var(--muted); }
.msg[data-swipe] { transition: transform .15s ease; touch-action: pan-y; }
.modal.peek { max-width: 26rem; }
@media (max-width: 560px) { .chat-top { gap: 8px; } h1.chat-title { font-size: 22px; } .chat-extras { width: 100%; overflow-x: auto; flex-wrap: nowrap; } }
/* ===== "Pesta" theme: loud, happy, Yahoo! JAPAN-style portal colours ===== */
:root[data-theme="pesta"] {
  --paper: #fff8e7; --card: #ffffff; --ink: #1a1446; --muted: #5b5486; --line: #ffd36e;
  --accent: #ff1f8e; --accent-soft: #ffe0f0; --on-accent: #ffffff;
  --watched: #00a86b; --watched-soft: #d9fbe9; --bar: #ffe9a8; --star: #ff9f00; --danger: #e5002b;
  --shadow: 0 3px 0 rgba(26, 20, 70, .12), 0 8px 22px rgba(255, 31, 142, .12);
  --p1: #ff1f8e; --p2: #ff7a00; --p3: #ffd000; --p4: #00c26e; --p5: #00a3ff; --p6: #7b3bff;
  color-scheme: light;
}
:root[data-theme="pesta"] body {
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 12px 12px, rgba(255, 31, 142, .18) 3px, transparent 4px),
    radial-gradient(circle at 46px 38px, rgba(0, 163, 255, .18) 3px, transparent 4px),
    radial-gradient(circle at 30px 64px, rgba(255, 208, 0, .35) 3px, transparent 4px),
    radial-gradient(circle at 70px 20px, rgba(0, 194, 110, .2) 3px, transparent 4px);
  background-size: 84px 84px;
}
/* rainbow header with white text */
:root[data-theme="pesta"] .site-head { background: linear-gradient(90deg, var(--p1), var(--p2) 22%, var(--p3) 40%, var(--p4) 60%, var(--p5) 80%, var(--p6)); color: #fff; box-shadow: 0 3px 0 rgba(26, 20, 70, .18); }
:root[data-theme="pesta"] .site-head .brand { color: #fff; text-shadow: 2px 2px 0 rgba(26, 20, 70, .35); }
:root[data-theme="pesta"] .site-head .nav a, :root[data-theme="pesta"] .site-head .nav .nav-head { color: #fff; opacity: 1; font-weight: 700; text-shadow: 1px 1px 0 rgba(26, 20, 70, .3); }
:root[data-theme="pesta"] .site-head .nav a.on:not(.head-icon), :root[data-theme="pesta"] .site-head .nav .nav-head.on { background: #fff; color: var(--p1); text-shadow: none; box-shadow: 0 0 0 3px var(--p3), 0 0 18px 4px rgba(255, 255, 255, .8); }
:root[data-theme="pesta"] .site-head input[type=search], :root[data-theme="pesta"] .site-head .search input { background: #fff; color: var(--ink); border: 2px solid #fff; }
:root[data-theme="pesta"] .site-head .head-icon, :root[data-theme="pesta"] .site-head .btn { color: #fff; border-color: rgba(255, 255, 255, .85); }
/* big rainbow titles */
:root[data-theme="pesta"] .hero h1 { background: linear-gradient(90deg, var(--p1), var(--p2), var(--p3), var(--p4), var(--p5), var(--p6)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(3px 3px 0 rgba(26, 20, 70, .18)); }
:root[data-theme="pesta"] .hero h1 em { color: transparent; }
:root[data-theme="pesta"] .eyebrow { color: var(--p6); }
/* cards: each one gets its own colour stripe on top */
:root[data-theme="pesta"] .panel, :root[data-theme="pesta"] .fact, :root[data-theme="pesta"] .ledger { border: 2px solid var(--ink); border-top-width: 6px; box-shadow: 4px 4px 0 var(--ink); }
:root[data-theme="pesta"] .panel:nth-of-type(6n+1), :root[data-theme="pesta"] .fact:nth-child(6n+1) { border-top-color: var(--p1); }
:root[data-theme="pesta"] .panel:nth-of-type(6n+2), :root[data-theme="pesta"] .fact:nth-child(6n+2) { border-top-color: var(--p2); }
:root[data-theme="pesta"] .panel:nth-of-type(6n+3), :root[data-theme="pesta"] .fact:nth-child(6n+3) { border-top-color: var(--p3); }
:root[data-theme="pesta"] .panel:nth-of-type(6n+4), :root[data-theme="pesta"] .fact:nth-child(6n+4) { border-top-color: var(--p4); }
:root[data-theme="pesta"] .panel:nth-of-type(6n+5), :root[data-theme="pesta"] .fact:nth-child(6n+5) { border-top-color: var(--p5); }
:root[data-theme="pesta"] .panel:nth-of-type(6n), :root[data-theme="pesta"] .fact:nth-child(6n) { border-top-color: var(--p6); }
:root[data-theme="pesta"] .ledger { border-top-color: var(--p5); }
/* list rows: zebra in candy colours, coloured rank numbers */
:root[data-theme="pesta"] .ledger .row:nth-child(odd) { background: #fff; }
:root[data-theme="pesta"] .ledger .row:nth-child(even) { background: #fff4fa; }
:root[data-theme="pesta"] .row .rank { color: var(--p5); }
:root[data-theme="pesta"] .row.top .rank, :root[data-theme="pesta"] .row:nth-child(1) .rank { color: var(--p1); }
:root[data-theme="pesta"] .row:nth-child(2) .rank { color: var(--p2); }
:root[data-theme="pesta"] .row:nth-child(3) .rank { color: var(--p4); }
:root[data-theme="pesta"] .bar i { background: linear-gradient(90deg, var(--p1), var(--p2), var(--p3), var(--p4), var(--p5)); }
/* buttons and tabs */
:root[data-theme="pesta"] .btn { border: 2px solid var(--ink); font-weight: 700; box-shadow: 2px 2px 0 var(--ink); }
:root[data-theme="pesta"] .btn.primary { background: var(--p3); color: var(--ink); }
:root[data-theme="pesta"] .btn:active { transform: translate(2px, 2px); box-shadow: none; }
:root[data-theme="pesta"] .tab { border: 2px solid var(--ink); font-weight: 700; }
:root[data-theme="pesta"] .tab[aria-selected="true"], :root[data-theme="pesta"] .tab[aria-pressed="true"] { background: var(--p5); color: #fff; border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
:root[data-theme="pesta"] .pill { background: var(--p3); color: var(--ink); font-weight: 700; }
:root[data-theme="pesta"] .pill.plain { background: #e6f6ff; color: #0060a0; }
:root[data-theme="pesta"] .pill.dist { background: var(--p4); color: #fff; }
/* event date blocks in rotating colours */
:root[data-theme="pesta"] .ev-row:nth-child(5n+1) .ev-date { background: var(--p1); color: #fff; }
:root[data-theme="pesta"] .ev-row:nth-child(5n+2) .ev-date { background: var(--p2); color: #fff; }
:root[data-theme="pesta"] .ev-row:nth-child(5n+3) .ev-date { background: var(--p4); color: #fff; }
:root[data-theme="pesta"] .ev-row:nth-child(5n+4) .ev-date { background: var(--p5); color: #fff; }
:root[data-theme="pesta"] .ev-row:nth-child(5n) .ev-date { background: var(--p6); color: #fff; }
:root[data-theme="pesta"] .ev-date { border-radius: 10px; border: 2px solid var(--ink); }
/* chat bubbles */
:root[data-theme="pesta"] .msg { border: 2px solid var(--ink); background: #e6f6ff; }
:root[data-theme="pesta"] .msg.mine { background: #fff1a8; border-color: var(--ink); }
:root[data-theme="pesta"] .chat { background: #fffdf5; }
:root[data-theme="pesta"] .ev-row .ev-date b, :root[data-theme="pesta"] .ev-row .ev-date span { color: #fff; }
:root[data-theme="pesta"] .site-head input, :root[data-theme="pesta"] .site-head input::placeholder { color: var(--muted); }
:root[data-theme="pesta"] .site-head input { background: #fff !important; color: var(--ink) !important; }
.pop-theme { flex-wrap: wrap; }
.pop-theme button { white-space: nowrap; }
.pop-theme .note { flex-basis: 100%; margin-bottom: 2px; }

/* ===== Pesta: a different colour mood for each section (html[data-zone]) ===== */
@keyframes zone-in { 0% { opacity: .2; filter: saturate(2.2) hue-rotate(-40deg) brightness(1.15); } 100% { opacity: 1; filter: none; } }
:root[data-theme="pesta"].zone-in main { animation: zone-in .55s ease-out; }
@media (prefers-reduced-motion: reduce) { :root[data-theme="pesta"].zone-in main { animation: none; } }
:root[data-theme="pesta"] body { transition: background-color .5s ease, color .5s ease; }

/* 🌴 CampLah Pulok: jungle at sunset */
:root[data-theme="pesta"][data-zone="camp"] {
  --paper: #eafbe4; --card: #ffffff; --ink: #0d3b1e; --muted: #3f6b4c; --line: #9be27f;
  --accent: #ff6b00; --accent-soft: #ffe7d1; --watched: #0a8f4e; --star: #ff9f00;
  --p1: #ff6b00; --p2: #ffb800; --p3: #b5e300; --p4: #12b34b; --p5: #00a6a6; --p6: #0077c8;
}
:root[data-theme="pesta"][data-zone="camp"] body {
  background-image:
    radial-gradient(ellipse 22px 10px at 20px 20px, rgba(18, 179, 75, .22) 60%, transparent 62%),
    radial-gradient(ellipse 10px 20px at 66px 58px, rgba(181, 227, 0, .35) 60%, transparent 62%),
    radial-gradient(ellipse 18px 8px at 40px 84px, rgba(0, 166, 166, .18) 60%, transparent 62%);
  background-size: 96px 96px;
}
:root[data-theme="pesta"][data-zone="camp"] .site-head { background: linear-gradient(90deg, #ff4d00, #ff8a00 25%, #ffc300 45%, #7cc800 70%, #0f9d58); }
:root[data-theme="pesta"][data-zone="camp"] .ledger .row:nth-child(even) { background: #f3fff0; }
:root[data-theme="pesta"][data-zone="camp"] .tab[aria-selected="true"], :root[data-theme="pesta"][data-zone="camp"] .tab[aria-pressed="true"] { background: var(--p4); }
:root[data-theme="pesta"][data-zone="camp"] .btn.primary { background: var(--p2); }
:root[data-theme="pesta"][data-zone="camp"] .msg { background: #e9fbe2; }

/* 🎬 Movies: old cinema — velvet purple, red and gold */
:root[data-theme="pesta"][data-zone="movies"] {
  --paper: #22072f; --card: #34103f; --ink: #fff4d6; --muted: #e3c98f; --line: #ffcc33;
  --accent: #ffcc33; --accent-soft: #4a1a3e; --on-accent: #22072f; --watched: #3fe0a0; --watched-soft: #123a2b;
  --bar: #4a2456; --star: #ffcc33; --danger: #ff6b6b;
  --p1: #ff2e4d; --p2: #ff8a00; --p3: #ffcc33; --p4: #fff1a8; --p5: #ff5fd2; --p6: #c86bff;
  --shadow: 0 0 0 1px rgba(255, 204, 51, .2), 0 10px 30px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
:root[data-theme="pesta"][data-zone="movies"] body {
  background-color: var(--paper);
  background-image: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(255, 204, 51, .22), transparent 70%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .22) 0 18px, rgba(255, 255, 255, 0) 18px 36px);
  background-size: auto; background-attachment: fixed;
}
:root[data-theme="pesta"][data-zone="movies"] .site-head { background: linear-gradient(180deg, #b3001b, #7a0014); box-shadow: 0 3px 0 #ffcc33, 0 6px 0 #7a0014; }
:root[data-theme="pesta"][data-zone="movies"] .site-head .nav a.on:not(.head-icon), :root[data-theme="pesta"][data-zone="movies"] .site-head .nav .nav-head.on { background: #ffcc33; color: #7a0014; box-shadow: 0 0 0 3px #fff1a8, 0 0 22px 6px rgba(255, 204, 51, .8); }
:root[data-theme="pesta"][data-zone="movies"] .panel, :root[data-theme="pesta"][data-zone="movies"] .fact, :root[data-theme="pesta"][data-zone="movies"] .ledger {
  border-color: #ffcc33; box-shadow: 0 0 0 3px #22072f, 0 0 0 5px rgba(255, 204, 51, .55), 0 0 24px rgba(255, 204, 51, .25);
  background-image: radial-gradient(circle, #fff1a8 1.6px, transparent 2.2px); background-size: 16px 16px; background-repeat: repeat-x; background-position: 0 -4px;
}
:root[data-theme="pesta"][data-zone="movies"] .ledger .row:nth-child(odd) { background: #34103f; }
:root[data-theme="pesta"][data-zone="movies"] .ledger .row:nth-child(even) { background: #3f1548; }
:root[data-theme="pesta"][data-zone="movies"] .hero h1 { filter: drop-shadow(0 0 18px rgba(255, 204, 51, .45)); }
:root[data-theme="pesta"][data-zone="movies"] .btn { border-color: #ffcc33; box-shadow: 2px 2px 0 #ffcc33; color: var(--ink); background: #4a1a3e; }
:root[data-theme="pesta"][data-zone="movies"] .btn.primary { background: #ffcc33; color: #22072f; }
:root[data-theme="pesta"][data-zone="movies"] .tab { border-color: #ffcc33; color: var(--ink); background: transparent; }
:root[data-theme="pesta"][data-zone="movies"] .tab[aria-selected="true"], :root[data-theme="pesta"][data-zone="movies"] .tab[aria-pressed="true"] { background: #ff2e4d; color: #fff; border-color: #ffcc33; box-shadow: 0 0 14px rgba(255, 46, 77, .7); }
:root[data-theme="pesta"][data-zone="movies"] .pill { background: #ffcc33; color: #22072f; }
:root[data-theme="pesta"][data-zone="movies"] .pill.plain { background: #4a1a3e; color: #fff1a8; }
:root[data-theme="pesta"][data-zone="movies"] .msg { background: #4a1a3e; border-color: #ffcc33; }
:root[data-theme="pesta"][data-zone="movies"] .msg.mine { background: #7a0014; }
:root[data-theme="pesta"][data-zone="movies"] .chat { background: #2a0a36; }
:root[data-theme="pesta"][data-zone="movies"] input, :root[data-theme="pesta"][data-zone="movies"] select, :root[data-theme="pesta"][data-zone="movies"] textarea { background: #2a0a36; color: var(--ink); border-color: #8a5a2a; }

/* 💬 Chat: neon night market */
:root[data-theme="pesta"][data-zone="chat"] {
  --paper: #07060f; --card: #120f24; --ink: #eafcff; --muted: #9fb3d9; --line: #00f0ff;
  --accent: #ff2bd6; --accent-soft: #2a0b33; --on-accent: #07060f; --watched: #39ff88; --watched-soft: #0b2a1a;
  --bar: #1f1a3a; --star: #ffe600; --danger: #ff4d6d;
  --p1: #ff2bd6; --p2: #00f0ff; --p3: #ffe600; --p4: #39ff88; --p5: #7b5cff; --p6: #ff7a00;
  --shadow: 0 0 18px rgba(0, 240, 255, .25);
  color-scheme: dark;
}
:root[data-theme="pesta"][data-zone="chat"] body {
  background-color: var(--paper);
  background-image: linear-gradient(rgba(0, 240, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 43, 214, .07) 1px, transparent 1px);
  background-size: 34px 34px;
}
:root[data-theme="pesta"][data-zone="chat"] .site-head { background: #07060f; box-shadow: 0 2px 0 #ff2bd6, 0 0 22px rgba(255, 43, 214, .6); }
:root[data-theme="pesta"][data-zone="chat"] .site-head .brand { color: #00f0ff; text-shadow: 0 0 10px #00f0ff; }
:root[data-theme="pesta"][data-zone="chat"] .site-head .nav a, :root[data-theme="pesta"][data-zone="chat"] .site-head .nav .nav-head { color: #eafcff; text-shadow: 0 0 6px rgba(0, 240, 255, .6); }
:root[data-theme="pesta"][data-zone="chat"] .site-head .nav a.on:not(.head-icon) { background: transparent; color: #ff2bd6; box-shadow: 0 0 0 2px #ff2bd6, 0 0 18px #ff2bd6, inset 0 0 10px rgba(255, 43, 214, .5); text-shadow: 0 0 8px #ff2bd6; }
:root[data-theme="pesta"][data-zone="chat"] .panel, :root[data-theme="pesta"][data-zone="chat"] .chat-window, :root[data-theme="pesta"][data-zone="chat"] .ledger { border: 2px solid #00f0ff; box-shadow: 0 0 14px rgba(0, 240, 255, .45), inset 0 0 14px rgba(0, 240, 255, .12); }
:root[data-theme="pesta"][data-zone="chat"] .chat { background: #0b0919; }
:root[data-theme="pesta"][data-zone="chat"] .msg { background: #120f24; border: 2px solid #00f0ff; box-shadow: 0 0 10px rgba(0, 240, 255, .45); color: var(--ink); }
:root[data-theme="pesta"][data-zone="chat"] .msg.mine { border-color: #ff2bd6; box-shadow: 0 0 10px rgba(255, 43, 214, .55); background: #1c0b24; }
:root[data-theme="pesta"][data-zone="chat"] .msg .who { color: #ffe600; text-shadow: 0 0 6px rgba(255, 230, 0, .6); }
:root[data-theme="pesta"][data-zone="chat"] .btn { background: #120f24; color: var(--ink); border-color: #00f0ff; box-shadow: 0 0 10px rgba(0, 240, 255, .5); }
:root[data-theme="pesta"][data-zone="chat"] .btn.primary { background: #ff2bd6; color: #07060f; border-color: #ff2bd6; box-shadow: 0 0 16px #ff2bd6; }
:root[data-theme="pesta"][data-zone="chat"] .seg button.on, :root[data-theme="pesta"][data-zone="chat"] .tab[aria-selected="true"] { background: #39ff88; color: #07060f; box-shadow: 0 0 14px #39ff88; }
:root[data-theme="pesta"][data-zone="chat"] .tab { background: transparent; color: var(--ink); border-color: #7b5cff; }:root[data-theme="pesta"][data-zone="chat"] input, :root[data-theme="pesta"][data-zone="chat"] select, :root[data-theme="pesta"][data-zone="chat"] .chat-form input, :root[data-theme="pesta"][data-zone="chat"] .chat-form textarea.msg-in { background: #07060f; color: var(--ink); border-color: #7b5cff; }
:root[data-theme="pesta"][data-zone="chat"] .chat-form { background: #120f24; }
:root[data-theme="pesta"][data-zone="chat"] .ledger .row:nth-child(odd), :root[data-theme="pesta"][data-zone="chat"] .ledger .row:nth-child(even) { background: #120f24; }
:root[data-theme="pesta"][data-zone="chat"] .pill { background: #ffe600; color: #07060f; }
:root[data-theme="pesta"][data-zone="chat"] .item-tag, :root[data-theme="pesta"][data-zone="chat"] .ref-card { background: #07060f; color: #00f0ff; border-color: #00f0ff; }

/* 🌈 Community, My Log, Settings and the rest: rainbow */
:root[data-theme="pesta"][data-zone="rainbow"] { --paper: #f6f3ff; --line: #c9b8ff; --accent: #7b3bff; --accent-soft: #ece4ff; }
:root[data-theme="pesta"][data-zone="rainbow"] body {
  background-image: repeating-linear-gradient(135deg, rgba(255, 31, 142, .06) 0 14px, rgba(255, 122, 0, .06) 14px 28px, rgba(255, 208, 0, .08) 28px 42px, rgba(0, 194, 110, .06) 42px 56px, rgba(0, 163, 255, .06) 56px 70px, rgba(123, 59, 255, .06) 70px 84px);
  background-size: auto;
}
/* Pesta fixes: header icons always white, header search always dark text, empty stars visible on dark moods */
:root[data-theme="pesta"] .site-head .icon-btn.bell, :root[data-theme="pesta"] .site-head .icon-btn.burger, :root[data-theme="pesta"] .site-head .nav a.head-icon, :root[data-theme="pesta"] .site-head #acct-btn { color: #fff; border-color: rgba(255, 255, 255, .85); background: rgba(0, 0, 0, .12); }
:root[data-theme="pesta"] .site-head input, :root[data-theme="pesta"] .site-head input::placeholder { color: #4b4570 !important; }
:root[data-theme="pesta"][data-zone="movies"] .star, :root[data-theme="pesta"][data-zone="chat"] .star { color: rgba(255, 255, 255, .22); }
:root[data-theme="pesta"][data-zone="movies"] .star.lit, :root[data-theme="pesta"][data-zone="chat"] .star.lit { color: var(--star); }

/* ===== Theme gallery ===== */
.theme-gallery { display: grid; gap: 12px; }
.theme-gallery .legend { font-weight: 600; font-size: 14px; }
.tc-group { display: grid; gap: 6px; }
.tc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
@media (max-width: 420px) { .tc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.theme-card { font: inherit; display: grid; gap: 6px; padding: 6px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; text-align: left; }
.theme-card:hover { border-color: var(--accent); }
.theme-card.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tc-mini { position: relative; display: block; height: 64px; border-radius: 8px; overflow: hidden; border: 1px solid rgba(0, 0, 0, .15); }
.tc-head { position: absolute; left: 0; right: 0; top: 0; height: 14px; }
.tc-line { position: absolute; left: 8px; top: 22px; width: 60%; height: 5px; border-radius: 3px; opacity: .85; }
.tc-line.short { top: 32px; width: 40%; opacity: .5; }
.tc-btn { position: absolute; left: 8px; bottom: 8px; width: 34px; height: 12px; border-radius: 999px; }
.tc-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.season-switch { padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; }
.theme-modal { width: min(640px, 100%); max-height: 90vh; overflow: auto; }
.pop-theme .more-themes { border-style: dashed; }

/* ===== Shared helpers for the extra themes ===== */
:root[data-theme="raya"], :root[data-theme="batik"], :root[data-theme="pantai"], :root[data-theme="akhbar"], :root[data-theme="mudah"], :root[data-theme="merdeka"] { color-scheme: light; }
:root[data-theme="pasar"], :root[data-theme="retro"], :root[data-theme="arcade"], :root[data-theme="malam"] { color-scheme: dark; }
:root[data-theme] body { background-color: var(--paper); }

/* 🌙 Raya: green and gold, ketupat weave, glowing pelita buttons */
:root[data-theme="raya"] { --paper: #f4f8ef; --card: #ffffff; --ink: #123d2a; --muted: #4a6b5a; --line: #cfe3c4; --accent: #0b6b43; --accent-soft: #e2f2e6; --on-accent: #fff; --watched: #0b6b43; --watched-soft: #e2f2e6; --bar: #e6efd9; --star: #d4a017; }
:root[data-theme="raya"] body { background-image: repeating-linear-gradient(45deg, rgba(212, 160, 23, .09) 0 10px, transparent 10px 20px), repeating-linear-gradient(-45deg, rgba(11, 107, 67, .07) 0 10px, transparent 10px 20px); }
:root[data-theme="raya"] .site-head { background: linear-gradient(90deg, #0b5d3b, #0f7a4c); color: #fff; box-shadow: 0 3px 0 #d4a017; }
:root[data-theme="raya"] .site-head::after { content: ''; position: absolute; left: 0; right: 0; bottom: -9px; height: 6px; background: radial-gradient(circle, #ffd86b 2.5px, transparent 3px) 0 0 / 22px 6px repeat-x; filter: drop-shadow(0 0 4px #ffd86b); pointer-events: none; }
:root[data-theme="raya"] .hero h1 em, :root[data-theme="raya"] .eyebrow { color: #b8860b; }
:root[data-theme="raya"] .btn.primary { background: #d4a017; color: #123d2a; box-shadow: 0 0 14px rgba(212, 160, 23, .6); }
:root[data-theme="raya"] .panel, :root[data-theme="raya"] .fact, :root[data-theme="raya"] .ledger { border-color: #d4a017; }

/* 🌺 Batik: indigo, maroon and turmeric, songket edges */
:root[data-theme="batik"] { --paper: #f7efe1; --card: #fffaf0; --ink: #2b1d5c; --muted: #6b5a7a; --line: #e2cfa8; --accent: #8a1c3b; --accent-soft: #f6e0e3; --on-accent: #fff; --watched: #2b6b5c; --watched-soft: #e0efe9; --bar: #ecdcbc; --star: #d99a1c; }
:root[data-theme="batik"] body { background-image: radial-gradient(circle at 20px 20px, rgba(138, 28, 59, .10) 7px, transparent 8px), radial-gradient(circle at 20px 20px, transparent 11px, rgba(43, 29, 92, .08) 12px, transparent 13px), radial-gradient(circle at 60px 60px, rgba(217, 154, 28, .14) 5px, transparent 6px); background-size: 80px 80px; }
:root[data-theme="batik"] .site-head { background: linear-gradient(90deg, #2b1d5c, #6b1530); color: #fff; border-bottom: 4px solid transparent; border-image: repeating-linear-gradient(90deg, #d99a1c 0 8px, #8a1c3b 8px 12px, #2b1d5c 12px 16px) 4; }
:root[data-theme="batik"] .panel, :root[data-theme="batik"] .fact, :root[data-theme="batik"] .ledger { border: 2px solid #d99a1c; outline: 1px solid #8a1c3b; outline-offset: -5px; }
:root[data-theme="batik"] .hero h1 em { color: #8a1c3b; }
:root[data-theme="batik"] .btn.primary { background: #8a1c3b; }

/* 🍜 Pasar Malam: night sky, string lights, awning stripes */
:root[data-theme="pasar"] { --paper: #141026; --card: #1f1838; --ink: #fff2dc; --muted: #c9b9a0; --line: #3a2d5c; --accent: #ffb648; --accent-soft: #3a2b1a; --on-accent: #1b1530; --watched: #7ee0a8; --watched-soft: #173326; --bar: #2c2350; --star: #ffd166; --danger: #ff7a6e; --shadow: 0 8px 24px rgba(0, 0, 0, .45); }
:root[data-theme="pasar"] body { background-image: radial-gradient(1px 1px at 20px 30px, #fff8 50%, transparent 51%), radial-gradient(1px 1px at 120px 80px, #fff6 50%, transparent 51%), radial-gradient(1.5px 1.5px at 200px 40px, #ffe9a8 50%, transparent 51%); background-size: 240px 120px; }
:root[data-theme="pasar"] .site-head { background: #1b1530; color: #fff2dc; }
:root[data-theme="pasar"] .site-head::after { content: ''; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px; background: radial-gradient(circle at 50% 30%, #ffd166 3px, transparent 4px) 0 0 / 26px 10px repeat-x; filter: drop-shadow(0 0 5px #ffb648); pointer-events: none; }
:root[data-theme="pasar"] .section-head h2, :root[data-theme="pasar"] .panel h3 { background: repeating-linear-gradient(90deg, #c8102e 0 14px, #f7f1e3 14px 28px); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="pasar"] .pill { background: #2b2b2b; color: #fff; border: 1px dashed #fff8; font-family: var(--font-data); }
:root[data-theme="pasar"] .hero h1 em { color: #ffb648; text-shadow: 0 0 14px rgba(255, 182, 72, .5); }

/* 🏝️ Pantai Timur: sand, sea and coral, a wave under the header */
:root[data-theme="pantai"] { --paper: #fbf3e4; --card: #ffffff; --ink: #0b3954; --muted: #4c6a7c; --line: #cde7ef; --accent: #e8573f; --accent-soft: #ffe6e0; --on-accent: #fff; --watched: #0a8a7a; --watched-soft: #dff5f1; --bar: #f2e3c6; --star: #ffb000; }
:root[data-theme="pantai"] body { background-image: radial-gradient(rgba(194, 154, 92, .18) 1px, transparent 1.5px); background-size: 9px 9px; }
:root[data-theme="pantai"] .site-head { background: linear-gradient(90deg, #0077b6, #00b4d8); color: #fff; }
:root[data-theme="pantai"] .site-head::after { content: ''; position: absolute; left: 0; right: 0; bottom: -12px; height: 12px; background: radial-gradient(circle at 12px -4px, transparent 12px, #00b4d8 13px) 0 0 / 24px 12px repeat-x; pointer-events: none; }
:root[data-theme="pantai"] .panel, :root[data-theme="pantai"] .fact, :root[data-theme="pantai"] .ledger { border: 2px solid #8fd3e8; border-radius: 14px; }
:root[data-theme="pantai"] .hero h1 em { color: #e8573f; }

/* 🛶 Nelayan: east-coast fishing village. Teal sea header with waves, sand-cream page with a fishing-net pattern,
   golden buttons and selected items, deep teal text, tall condensed titles. */
:root[data-theme="nelayan"] { --paper: #fbefd6; --card: #fffdf8; --ink: #123039; --muted: #4d6870; --line: #c3e1e7; --accent: #0f6b7c; --accent-soft: #dff1f4; --on-accent: #fff; --watched: #137687; --watched-soft: #e0f2f4; --bar: #f3e2bd; --star: #f5a80a; --font-display: "Oswald", "Roboto Condensed", "Arial Narrow", sans-serif; color-scheme: light; }
:root[data-theme="nelayan"] body { background-image: repeating-linear-gradient(45deg, rgba(196, 150, 80, .14) 0 1px, transparent 1px 22px), repeating-linear-gradient(-45deg, rgba(196, 150, 80, .14) 0 1px, transparent 1px 22px); }
:root[data-theme="nelayan"] .site-head { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='60'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.13' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 40c10-12 26-12 34 0'/%3E%3Ccircle cx='40' cy='30' r='8'/%3E%3Cpath d='M66 16c10-12 26-12 34 0'/%3E%3Ccircle cx='100' cy='6' r='8'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 120px 60px, linear-gradient(180deg, #56a9bd, #3f93a9); color: #fff; }
:root[data-theme="nelayan"] .site-head::after { content: ''; position: absolute; left: 0; right: 0; bottom: -12px; height: 12px; background: radial-gradient(circle at 15px -6px, transparent 14px, #3f93a9 15px) 0 0 / 30px 12px repeat-x; pointer-events: none; }
:root[data-theme="nelayan"] .site-head .brand { --logo: currentColor; }
:root[data-theme="nelayan"] .site-head .nav a, :root[data-theme="nelayan"] .site-head .nav .nav-head { color: #fff; opacity: 1; }
:root[data-theme="nelayan"] .site-head .icon-btn.bell, :root[data-theme="nelayan"] .site-head .icon-btn.burger, :root[data-theme="nelayan"] .site-head .nav a.head-icon, :root[data-theme="nelayan"] .site-head #acct-btn { color: #fff; border-color: rgba(255, 255, 255, .8); }
:root[data-theme="nelayan"] .site-head .nav a.on:not(.head-icon), :root[data-theme="nelayan"] .site-head .nav .nav-head.on { background: #f6c544; color: #123039; text-shadow: none; animation: none; box-shadow: 0 3px 0 #d9a520, 0 6px 14px rgba(18, 48, 57, .25); }
:root[data-theme="nelayan"] .btn.primary, :root[data-theme="nelayan"] .site-head .btn.primary, :root[data-theme="nelayan"] .pop-theme button.on, :root[data-theme="nelayan"] .seg button.on, :root[data-theme="nelayan"] .seg a.on, :root[data-theme="nelayan"] .side-link.on, :root[data-theme="nelayan"] .side-sub.on, :root[data-theme="nelayan"] .tab[aria-selected="true"], :root[data-theme="nelayan"] .chips .chip[data-act="didik-cat"].on, :root[data-theme="nelayan"] .chips .chip[data-act="cs-tab"].on, :root[data-theme="nelayan"] .chat-window .lobby-src .chip.on, :root[data-theme="nelayan"] .cf-tabs .chip.on, :root[data-theme="nelayan"] .link-chip:hover, :root[data-theme="nelayan"] .glist-item.on, :root[data-theme="nelayan"] .gchip.on, :root[data-theme="nelayan"] .theme-card.on .tc-name { background: #f6c544; border-color: #f6c544; color: #123039; box-shadow: 0 3px 0 #d9a520; }
:root[data-theme="nelayan"] .btn.primary:hover { background: #f2b928; border-color: #f2b928; color: #123039; }
:root[data-theme="nelayan"] .side-link.on:hover, :root[data-theme="nelayan"] .side-sub.on:hover { color: #123039; }
:root[data-theme="nelayan"] .panel, :root[data-theme="nelayan"] .fact, :root[data-theme="nelayan"] .ledger { border: 2px solid #a9d6df; border-radius: 16px; }
:root[data-theme="nelayan"] .side-nav { background: #fffaf0; border-color: #a9d6df; box-shadow: inset 0 0 0 1px #a9d6df; }
:root[data-theme="nelayan"] .glist-item.on *, :root[data-theme="nelayan"] .gchip.on * { color: #123039; opacity: 1; }
:root[data-theme="nelayan"] .hero h1 { font-weight: 700; letter-spacing: .01em; color: #123039; }
:root[data-theme="nelayan"] .hero h1 em { color: #0f6b7c; }
:root[data-theme="nelayan"] .section-head h2, :root[data-theme="nelayan"] .movie-head h1 { font-weight: 700; }
:root[data-theme="nelayan"] h2, :root[data-theme="nelayan"] h3 { font-family: "Plus Jakarta Sans", var(--font-body, sans-serif); }
:root[data-theme="nelayan"] .section-head h2 { font-family: var(--font-display); }
:root[data-theme="nelayan"] .eyebrow { color: #c0392b; }

/* 📼 Retro 80s: sunset grid, neon pink and purple */
:root[data-theme="retro"] { --paper: #120458; --card: #1d0b6b; --ink: #fdf0ff; --muted: #c9b6f2; --line: #4b2a9e; --accent: #ff2a6d; --accent-soft: #3a0f5c; --on-accent: #fff; --watched: #05d9e8; --watched-soft: #0b2a5c; --bar: #2a1580; --star: #f9c80e; --danger: #ff6b6b; --shadow: 0 0 18px rgba(255, 42, 109, .25); }
:root[data-theme="retro"] body { background-image: linear-gradient(180deg, transparent 55%, rgba(255, 42, 109, .14)), linear-gradient(rgba(5, 217, 232, .16) 1px, transparent 1px), linear-gradient(90deg, rgba(5, 217, 232, .16) 1px, transparent 1px); background-size: 100% 100%, 40px 40px, 40px 40px; background-attachment: fixed; }
:root[data-theme="retro"] .site-head { background: linear-gradient(90deg, #ff2a6d, #7a04eb); color: #fff; }
:root[data-theme="retro"] .hero h1 { background: linear-gradient(180deg, #f9c80e 0%, #ff2a6d 55%, #7a04eb 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 12px rgba(255, 42, 109, .55)); }
:root[data-theme="retro"] .hero h1 em { color: transparent; }
:root[data-theme="retro"] .panel, :root[data-theme="retro"] .fact, :root[data-theme="retro"] .ledger { border-color: #05d9e8; box-shadow: 0 0 12px rgba(5, 217, 232, .35); }
:root[data-theme="retro"] .btn.primary { background: #ff2a6d; box-shadow: 0 0 14px #ff2a6d; }

/* 🕹️ Arcade: pixel titles, chunky pixel borders */
:root[data-theme="arcade"] { --paper: #0b0b1e; --card: #15153a; --ink: #f8f8f8; --muted: #a8a8d8; --line: #3b3b8a; --accent: #39ff14; --accent-soft: #10331a; --on-accent: #0b0b1e; --watched: #39ff14; --watched-soft: #10331a; --bar: #22225a; --star: #ffd800; --danger: #ff3b3b; --r: 0px; --shadow: none; }
:root[data-theme="arcade"] .site-head { background: #000; color: #fff; border-bottom: 4px solid #ff00aa; }
:root[data-theme="arcade"] .hero h1, :root[data-theme="arcade"] .brand, :root[data-theme="arcade"] h2, :root[data-theme="arcade"] .fact b { font-family: "Press Start 2P", var(--font-data); letter-spacing: 0; text-transform: uppercase; }
:root[data-theme="arcade"] .hero h1 { font-size: clamp(22px, 4.2vw, 44px); line-height: 1.3; color: #ffd800; text-shadow: 4px 4px 0 #ff00aa; }
:root[data-theme="arcade"] .hero h1 em { color: #39ff14; }
:root[data-theme="arcade"] .brand { font-size: 16px; }
:root[data-theme="arcade"] h2 { font-size: 16px; line-height: 1.4; }
:root[data-theme="arcade"] .fact b { font-size: 14px; }
:root[data-theme="arcade"] .panel, :root[data-theme="arcade"] .fact, :root[data-theme="arcade"] .ledger, :root[data-theme="arcade"] .btn, :root[data-theme="arcade"] .tab, :root[data-theme="arcade"] .msg, :root[data-theme="arcade"] .chat-window { border-radius: 0 !important; border: 3px solid #fff; box-shadow: 4px 4px 0 #ff00aa; }
:root[data-theme="arcade"] .btn.primary { background: #39ff14; color: #000; }

/* 📰 Surat Khabar: old newspaper */
:root[data-theme="akhbar"] { --paper: #f3eee2; --card: #f8f4ea; --ink: #111111; --muted: #4d4a42; --line: #1111112e; --accent: #111111; --accent-soft: #e6e0d0; --on-accent: #f3eee2; --watched: #2f4f2f; --watched-soft: #e3e8dc; --bar: #ddd5c2; --star: #6b4e16; --r: 0px; --shadow: none; }
:root[data-theme="akhbar"] body { background-image: radial-gradient(rgba(0, 0, 0, .035) 1px, transparent 1px); background-size: 4px 4px; }
:root[data-theme="akhbar"] .site-head { background: #f3eee2; color: #111; border-bottom: 3px double #111; }
:root[data-theme="akhbar"] .hero h1, :root[data-theme="akhbar"] h2, :root[data-theme="akhbar"] h3, :root[data-theme="akhbar"] .brand, :root[data-theme="akhbar"] .row-title { font-family: "Playfair Display", Georgia, "Times New Roman", serif; text-transform: none; letter-spacing: 0; }
:root[data-theme="akhbar"] .hero h1 { font-weight: 900; border-bottom: 1px solid #111; padding-bottom: 6px; }
:root[data-theme="akhbar"] .hero h1 em { color: #111; font-style: italic; }
:root[data-theme="akhbar"] .panel, :root[data-theme="akhbar"] .fact, :root[data-theme="akhbar"] .ledger { border: 1px solid #111; border-radius: 0; }
:root[data-theme="akhbar"] .btn, :root[data-theme="akhbar"] .tab, :root[data-theme="akhbar"] .pill { border-radius: 0; }

/* 🌙 Malam Lembut: very dark, warm, low blue */
:root[data-theme="malam"] { --paper: #141110; --card: #1d1916; --ink: #e8dccb; --muted: #a8998a; --line: #332b25; --accent: #d9a066; --accent-soft: #2e231a; --on-accent: #141110; --watched: #9fbf8a; --watched-soft: #1f261a; --bar: #2a231e; --star: #d9a066; --danger: #e08a7a; --shadow: none; }
:root[data-theme="malam"] .site-head { background: #1a1612; color: #e8dccb; border-bottom: 1px solid #332b25; }

/* 🔠 Mudah Baca: bigger text, strong contrast, big buttons */
:root[data-theme="mudah"] { --paper: #ffffff; --card: #ffffff; --ink: #000000; --muted: #262626; --line: #000000; --accent: #0047ab; --accent-soft: #e0ebff; --on-accent: #fff; --watched: #00611f; --watched-soft: #e2f5e7; --bar: #d6d6d6; --star: #a35f00; --danger: #b00020; --shadow: none; }
:root[data-theme="mudah"] body { zoom: 1.15; }
:root[data-theme="mudah"] .site-head { background: #000; color: #fff; }
:root[data-theme="mudah"] .btn, :root[data-theme="mudah"] .tab { border: 2px solid #000; font-weight: 700; min-height: 40px; }
:root[data-theme="mudah"] .note, :root[data-theme="mudah"] .row-meta { color: #262626; }
:root[data-theme="mudah"] a { text-decoration-thickness: 2px; }
:root[data-theme="mudah"] :focus-visible { outline: 3px solid #ffbf00; outline-offset: 2px; }

/* 🇲🇾 Merdeka (seasonal): Jalur Gemilang colours */
:root[data-theme="merdeka"] { --paper: #f7f8fc; --card: #ffffff; --ink: #0b1f5c; --muted: #4a5578; --line: #d4d9ea; --accent: #cc0001; --accent-soft: #fde6e6; --on-accent: #fff; --watched: #010066; --watched-soft: #e3e6f7; --bar: #e3e6f2; --star: #ffcc00; }
:root[data-theme="merdeka"] body { background-image: repeating-linear-gradient(180deg, rgba(204, 0, 1, .05) 0 14px, rgba(255, 255, 255, 0) 14px 28px); }
:root[data-theme="merdeka"] .site-head { background: linear-gradient(90deg, #010066 0 32%, #cc0001 32% 100%); color: #fff; box-shadow: 0 4px 0 #ffcc00; }
:root[data-theme="merdeka"] .hero h1 em { color: #cc0001; }
:root[data-theme="merdeka"] .btn.primary { background: #ffcc00; color: #010066; }

/* Header pieces on custom themes: keep nav text and icons readable */
:root[data-theme="raya"] .site-head .nav a, :root[data-theme="batik"] .site-head .nav a, :root[data-theme="pantai"] .site-head .nav a, :root[data-theme="retro"] .site-head .nav a, :root[data-theme="merdeka"] .site-head .nav a, :root[data-theme="arcade"] .site-head .nav a,
:root[data-theme="raya"] .site-head .nav .nav-head, :root[data-theme="batik"] .site-head .nav .nav-head, :root[data-theme="pantai"] .site-head .nav .nav-head, :root[data-theme="retro"] .site-head .nav .nav-head, :root[data-theme="merdeka"] .site-head .nav .nav-head, :root[data-theme="arcade"] .site-head .nav .nav-head { color: #fff; opacity: 1; }
:root[data-theme="raya"] .site-head .icon-btn.bell, :root[data-theme="raya"] .site-head .icon-btn.burger, :root[data-theme="batik"] .site-head .icon-btn.bell, :root[data-theme="batik"] .site-head .icon-btn.burger, :root[data-theme="pantai"] .site-head .icon-btn.bell, :root[data-theme="pantai"] .site-head .icon-btn.burger, :root[data-theme="retro"] .site-head .icon-btn.bell, :root[data-theme="retro"] .site-head .icon-btn.burger, :root[data-theme="merdeka"] .site-head .icon-btn.bell, :root[data-theme="merdeka"] .site-head .icon-btn.burger, :root[data-theme="arcade"] .site-head .icon-btn.bell, :root[data-theme="arcade"] .site-head .icon-btn.burger, :root[data-theme="mudah"] .site-head .icon-btn.bell, :root[data-theme="mudah"] .site-head .icon-btn.burger,
:root[data-theme="raya"] .site-head .nav a.head-icon, :root[data-theme="batik"] .site-head .nav a.head-icon, :root[data-theme="pantai"] .site-head .nav a.head-icon, :root[data-theme="retro"] .site-head .nav a.head-icon, :root[data-theme="merdeka"] .site-head .nav a.head-icon, :root[data-theme="arcade"] .site-head .nav a.head-icon, :root[data-theme="mudah"] .site-head .nav a.head-icon,
:root[data-theme="raya"] .site-head #acct-btn, :root[data-theme="batik"] .site-head #acct-btn, :root[data-theme="pantai"] .site-head #acct-btn, :root[data-theme="retro"] .site-head #acct-btn, :root[data-theme="merdeka"] .site-head #acct-btn, :root[data-theme="arcade"] .site-head #acct-btn, :root[data-theme="mudah"] .site-head #acct-btn { color: #fff; border-color: rgba(255, 255, 255, .8); }
:root[data-theme="akhbar"] .site-head .nav a, :root[data-theme="akhbar"] .site-head .nav .nav-head, :root[data-theme="akhbar"] .site-head .icon-btn.bell, :root[data-theme="akhbar"] .site-head .icon-btn.burger, :root[data-theme="akhbar"] .site-head .nav a.head-icon, :root[data-theme="akhbar"] .site-head #acct-btn { color: #111; border-color: #111; opacity: 1; }
:root[data-theme="pasar"] .site-head .icon-btn.bell, :root[data-theme="pasar"] .site-head .icon-btn.burger, :root[data-theme="pasar"] .site-head .nav a.head-icon, :root[data-theme="pasar"] .site-head #acct-btn, :root[data-theme="malam"] .site-head .icon-btn.bell, :root[data-theme="malam"] .site-head .icon-btn.burger, :root[data-theme="malam"] .site-head .nav a.head-icon, :root[data-theme="malam"] .site-head #acct-btn { color: var(--ink); border-color: rgba(255, 242, 220, .5); }
:root[data-theme] .site-head { position: sticky; }
:root[data-theme="akhbar"] .site-head .nav a.on:not(.head-icon), :root[data-theme="akhbar"] .site-head .nav .nav-head.on { background: #111; color: #f3eee2; box-shadow: none; animation: none; text-shadow: none; }
:root[data-theme="malam"] .site-head .nav a.on:not(.head-icon), :root[data-theme="malam"] .site-head .nav .nav-head.on { background: #d9a066; color: #141110; box-shadow: none; animation: none; }
:root[data-theme="mudah"] .site-head .nav a.on:not(.head-icon), :root[data-theme="mudah"] .site-head .nav .nav-head.on { background: #ffbf00; color: #000; box-shadow: none; animation: none; text-shadow: none; }
/* Keep the campsite banner map in its own layer so header menus always sit above it */
.camp-hero { isolation: isolate; z-index: 0; }
.site-head { z-index: 40; }
.modal-back { z-index: 60; }

/* Hero text with a button beside it (CampLah Pulok) */
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.hero-row > .btn { flex: none; margin-left: auto; }
.hero:has(.hero-row) { margin-bottom: 20px; }

/* Page layout: left menu (ranking pages) | page | right column kept for ads */
.layout { display: block; }
.side-ad:empty { display: none; }
.side-nav { position: relative; display: flex; gap: 6px; align-items: center; overflow-x: auto; scrollbar-width: none; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--card); }
.side-nav::-webkit-scrollbar { display: none; }
.side-title { display: none; }
.side-group { display: contents; }
.side-link, .side-sub, .side-head { display: inline-flex; align-items: center; gap: 7px; flex: none; white-space: nowrap; text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); }
.side-head { border: 0; background: none; padding: 6px 2px 6px 8px; color: var(--muted); }
.side-head.on { color: var(--accent); }
.side-link:hover, .side-sub:hover { border-color: var(--accent); color: var(--accent); }
.side-link.on, .side-sub.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent), 0 0 14px 2px color-mix(in srgb, var(--accent) 45%, transparent); }
.side-link.on:hover, .side-sub.on:hover { color: var(--on-accent); }

@media (min-width: 960px) {
  .layout { display: grid; grid-template-columns: 196px minmax(0, var(--wrap)); justify-content: center; gap: 0 28px; padding-inline: 16px; }
  .layout > main.wrap { max-width: none; margin: 0; padding-inline: 0; min-width: 0; grid-column: 2; grid-row: 1; }
  /* footer lives in the page column, beside the menu, so the menu stays put to the very bottom */
  .layout > .site-foot { grid-column: 2; grid-row: 2; min-width: 0; }
  .layout > .site-foot .wrap { max-width: none; padding-inline: 0; }
  .side-nav { grid-column: 1; grid-row: 1 / span 2; position: sticky; top: calc(var(--head-h, 60px) + 28px); align-self: start; flex-direction: column; align-items: stretch; gap: 4px; overflow: visible; margin-top: 28px; padding: 14px 10px; border: 1px solid var(--line); border-radius: 14px; }
  .side-title { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--muted); padding: 0 10px 6px; }
  .side-group { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
  .side-link, .side-sub, .side-head { border: 0; background: none; border-radius: 10px; padding: 8px 10px; white-space: normal; }
  .side-head { padding: 6px 10px 4px; color: var(--ink); }
  .side-head.on { color: var(--accent); }
  .side-sub { font-size: 13px; font-weight: 500; padding: 6px 10px 6px 36px; color: var(--muted); }
  .side-link:hover, .side-sub:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
}
@media (min-width: 1440px) {
  .layout { grid-template-columns: 196px minmax(0, var(--wrap)) 196px; }
  .side-ad { display: block; grid-column: 3; grid-row: 1 / span 2; }
  .side-ad:empty { display: block; visibility: hidden; }
}

/* Campsite: booking sites */
.book-panel { display: grid; gap: 10px; }
.book-panel h3 { margin: 0; }
.book-item { display: inline-flex; align-items: center; gap: 6px; }
.book-btn { font-weight: 700; }
.book-btn svg { width: 13px; height: 13px; }
.book-wait { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; }
.book-suggest summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.book-suggest summary:hover { color: var(--accent); }
.book-suggest form { display: flex; gap: 8px; margin: 8px 0 6px; }
.book-suggest input { flex: 1 1 auto; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: var(--paper); font-size: 14px; }

/* Movie page: poster spot + trailer */
.movie-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px 28px; margin-bottom: 24px; align-items: end; }
.movie-top .movie-head { margin-bottom: 0; }
.poster { --ph: 340; width: 150px; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; position: relative; display: grid; align-content: end; gap: 4px; padding: 14px 12px;
  color: #fff; box-shadow: var(--shadow), 0 10px 26px rgba(0, 0, 0, .18);
  background: radial-gradient(120% 70% at 20% 0%, hsl(calc(var(--ph) + 40) 85% 62% / .9), transparent 60%), linear-gradient(160deg, hsl(var(--ph) 70% 38%), hsl(calc(var(--ph) + 30) 60% 14%)); }
.poster::before { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 8px; pointer-events: none; }
.poster-mark { position: absolute; top: 14px; left: 14px; font-size: 20px; opacity: .9; }
.poster-title { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: 21px; line-height: .98; overflow-wrap: anywhere; text-shadow: 0 2px 10px rgba(0, 0, 0, .35); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.poster-year { font-family: var(--font-data); font-size: 12px; opacity: .85; }
.poster.has-img { padding: 0; background: var(--card); }
.poster.has-img::before { display: none; }
.poster.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (min-width: 640px) { .movie-top { grid-template-columns: 170px minmax(0, 1fr); } .poster { width: 170px; } }
@media (max-width: 639px) { .movie-top { grid-template-columns: 92px minmax(0, 1fr); gap: 14px; align-items: start; } .movie-top .movie-head h1 { font-size: clamp(28px, 8vw, 40px); } .poster { width: 92px; padding: 8px; border-radius: 8px; } .poster::before { inset: 5px; } .poster-title { font-size: 12px; } .poster-year { font-size: 10px; } .poster-mark { top: 8px; left: 8px; font-size: 13px; } }
.trailer { display: grid; gap: 10px; }
.trailer h3 { margin: 0; }
.yt-lite { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; border-radius: 10px; overflow: hidden; background: #000; cursor: pointer; }
.yt-lite img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .92; transition: opacity .15s; }
.yt-lite:hover img { opacity: 1; }
.yt-play { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; transform: translate(-50%, -50%); border-radius: 14px; background: #e00; box-shadow: 0 4px 18px rgba(0, 0, 0, .4); }
.yt-play::after { content: ""; position: absolute; left: 27px; top: 14px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; }
.yt-frame { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; display: block; background: #000; }
.trailer-set { display: flex; flex-wrap: wrap; gap: 8px; }
.trailer-set input { flex: 1 1 14rem; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: var(--paper); font-size: 14px; }

/* Public chat: Topic filter */
.topic-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--accent-soft); color: var(--ink); font-size: 13px; font-weight: 600; }
.topic-bar > span { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.topic-bar .item-tag { margin: 0; }
.topic-btn { white-space: nowrap; }

/* Search everything: result sections */
.search-sec { display: grid; gap: 10px; }
.search-sec .section-head { margin: 8px 0 0; }
.search-sec h2 .note { font-family: var(--font-body); font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none; }

/* Add a movie: small hint on search, form panel */
.add-hint { margin: 4px 0 0; }
.add-movie-panel { display: grid; gap: 10px; margin-bottom: 20px; }
.add-movie-panel h3 { margin: 0; }

/* Carta Didik */
.seg a { font-size: 13px; color: var(--ink); padding: 6px 16px; border-radius: 999px; text-decoration: none; }
.seg a.on { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.didik-bar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 14px; }
.didik-bar .field { margin: 0; min-width: 10rem; }
.edu-row .row-title .note { font-weight: 500; }
.edu-row .row-actions .btn { white-space: nowrap; }
.move { font-size: 11px; font-weight: 700; font-family: var(--font-data); }
.move.up { color: var(--watched); } .move.down { color: var(--danger); } .move.same { color: var(--muted); }
.move.new { color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.edu-title { font-family: var(--font-display); font-weight: 900; font-size: clamp(30px, 4.6vw, 52px); text-transform: uppercase; line-height: .98; overflow-wrap: anywhere; margin: 0; }
.edu-grid { align-items: start; }
.edu-right { display: grid; gap: 24px; min-width: 0; align-content: start; }
.edu-right .chatbox { min-height: 440px; }
.edu-events h3 { margin: 0 0 8px; }
.edu-events .ledger { margin-top: 6px; }
.edu-ev .ev-date small { font-size: 10px; color: var(--muted); }
.edu-ev.past { opacity: .72; }
.edu-ev .row-main { display: grid; gap: 4px; }
.edu-ev .row-title { font-weight: 700; }
.edu-ev .row-actions { display: grid; justify-items: end; gap: 4px; }
.ev-desc { margin: 2px 0; font-size: 14px; color: var(--ink); white-space: pre-line; }
.edu-ev-form { display: grid; gap: 10px; }
.edu-ev-form h3 { margin: 0; }
.edu-ev-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.edu-ev-form .field { margin: 0; }
.edu-ev-form textarea { width: 100%; }
.edu-studied { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.edu-studied select { min-width: 9rem; }
.add-edu-grid { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 10px; }
.add-edu-grid .field { margin: 0; }
@media (max-width: 560px) { .edu-ev-form .two, .add-edu-grid { grid-template-columns: 1fr; } }
.chips .chip[data-act="didik-cat"] { cursor: pointer; font: inherit; font-size: 13px; }
.chips .chip[data-act="didik-cat"].on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.edu-events { margin-top: 24px; min-height: 180px; align-content: start; }
.hero-row > .mv-month { flex: none; margin: 0 0 0 auto; min-width: 10rem; }
.didik-cats { margin-bottom: 12px; }

/* My Log: groups on one page */
.log-groups { display: grid; gap: 16px; }
.log-group-box { border: 1px solid var(--line); border-radius: 14px; background: var(--card); overflow: hidden; }
.log-group-head { width: 100%; display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 14px 18px; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.log-group-head:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.log-group-title { font-family: var(--font-display); font-weight: 800; font-size: 22px; text-transform: uppercase; letter-spacing: .02em; }
.log-sum { flex: 1 1 auto; font-size: 13px; }
.log-caret { font-size: 14px; color: var(--muted); margin-left: auto; }
.log-group-body { display: grid; gap: 14px; padding: 4px 18px 18px; border-top: 1px solid var(--line); }
.log-list { display: grid; gap: 6px; padding-top: 10px; }
.log-list-head { display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.log-list-head .log-caret { margin-left: 0; }
.log-list-title { font-weight: 700; font-size: 15px; }
.log-list.empty-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.log-list.empty-line .note { font-size: 13px; }
.log-more { justify-self: start; font-size: 13px; }
.arrange-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: ar; }
.arrange-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; counter-increment: ar; font-weight: 600; }
.arrange-list li > span:first-child::before { content: counter(ar) ". "; color: var(--muted); }
.arrange-btns { display: inline-flex; gap: 6px; }
.hero-row > h1 { margin: 0; }

/* Groups page */
.group-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 8px; }
.group-pick { margin: 0; min-width: 14rem; }
.group-sec { display: grid; gap: 14px; padding-top: 12px; }
.group-sec .section { margin: 0; }
.group-sec .section-head h2 { font-size: 20px; }
.group-page-link { margin-left: auto; }

/* Phone header: search + bell + menu in one row */
.burger-host { display: none; }
.site-head .head-tools > a.head-chat { display: none; }
.site-head .icon-btn.burger { width: 34px; height: 34px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--paper) 40%, transparent); background: transparent; color: var(--paper); display: inline-grid; place-items: center; padding: 0; cursor: pointer; }
.burger-lines, .burger-lines::before, .burger-lines::after { display: block; width: 16px; height: 2px; border-radius: 2px; background: currentColor; position: relative; content: ""; }
.burger-lines::before { position: absolute; top: -5px; } .burger-lines::after { position: absolute; top: 5px; }
.pop .pop-item.on { font-weight: 700; color: var(--accent); }
.pop .burger-home { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
@media (max-width: 640px) {
  .site-head .wrap { flex-wrap: nowrap; gap: 8px; min-height: 52px; padding-block: 8px; }
  .site-head .brand { display: none; }
  .site-head .head-search { flex: 1 1 auto; min-width: 0; max-width: none; order: 0; }
  .site-head .nav { flex: 0 0 auto; width: auto; margin-left: 0; flex-wrap: nowrap; gap: 6px; align-items: center; justify-content: flex-end; }
  .site-head .nav > a { display: none; }
  .site-head .head-tools { margin-left: 0; display: flex; gap: 6px; align-items: center; }
  .site-head .head-tools > a.head-icon, .site-head .acct-host { display: none; }
  .site-head .head-tools > a.head-icon.head-chat { display: inline-grid; }
  .burger-host { display: block; }
  .pop, #pop-acct, #pop-burger { position: fixed; left: 12px; right: 12px; width: auto; }
}

/* Phones and narrow windows: the Explore row stays under the header while scrolling */
@media (max-width: 959px) {
  .side-nav { position: sticky; top: var(--head-h, 54px); z-index: 30; }
}
@media (max-width: 640px) { .group-page-link { display: none; } }
/* Phones: less empty space above the Public / Group row on the Chat page */
@media (max-width: 640px) {
  main:has(.chat-page) { padding-top: 8px; }
  .chat-page { padding-top: 0; }
}
/* The box beside the chat stays tall, but its contents sit at the top as normal */
.grid-2:has(> .chatbox) > div:first-child > :last-child, .camp-layout > .camp-side > :last-child { align-content: start; }

/* Emoji reactions */
.rx { display: flex; flex-wrap: wrap; gap: 4px; }
.rx:empty { display: none; }
.rx-chip { font: inherit; font-size: 12px; line-height: 1; display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.rx-chip b { font-size: 11px; font-weight: 600; color: var(--muted); }
button.rx-chip { cursor: pointer; }
button.rx-chip:hover { border-color: var(--accent); }
.rx-chip.on { border-color: var(--accent); background: var(--accent-soft); }
.rx-chip.on b { color: var(--accent); }
.msg .meta .rx-add { font-size: 14px; line-height: 1; padding: 0 2px; filter: grayscale(1); opacity: .7; }
.msg .meta .rx-add:hover, .msg .meta .rx-add:focus-visible { filter: none; opacity: 1; }
.rx-pop { position: fixed; z-index: 200; display: grid; grid-template-columns: repeat(6, 36px); gap: 2px; padding: 6px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 28px rgba(0, 0, 0, .25); }
.rx-pop button { font: inherit; font-size: 20px; line-height: 1; width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; }
.rx-pop button:hover, .rx-pop button:focus-visible { background: var(--accent-soft); }
.rx-pop button.on { background: var(--accent-soft); outline: 1px solid var(--accent); }
/* Emoji button inside the message box */
.chat-form.has-em { position: relative; }
.chat-form.has-em input { padding-left: 70px; }
.em-btn { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border: 0; border-radius: 999px; background: transparent; font-size: 18px; line-height: 1; cursor: pointer; filter: grayscale(1); opacity: .75; z-index: 1; }
.em-btn:hover, .em-btn:focus-visible { filter: none; opacity: 1; background: var(--accent-soft); }
.em-pop { position: fixed; z-index: 200; display: grid; grid-template-columns: repeat(8, 36px); gap: 2px; padding: 6px; max-height: 50vh; overflow-y: auto; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 28px rgba(0, 0, 0, .25); }
.em-pop button { font: inherit; font-size: 20px; line-height: 1; width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; }
.em-pop button:hover, .em-pop button:focus-visible { background: var(--accent-soft); }
@media (max-width: 360px) { .em-pop { grid-template-columns: repeat(7, 36px); } }
/* Messages that are only emoji show them big */
.msg .body.emo-big { font-size: 40px; line-height: 1.15; letter-spacing: 2px; }
.msg .body.emo-mid { font-size: 28px; line-height: 1.2; letter-spacing: 1px; }

/* Photos and files in chat */
.att-btn { position: absolute; left: 44px; top: 50%; transform: translateY(-50%); width: 28px; height: 30px; border: 0; border-radius: 999px; background: transparent; font-size: 17px; line-height: 1; cursor: pointer; filter: grayscale(1); opacity: .75; z-index: 1; }
.att-btn:hover, .att-btn:focus-visible { filter: none; opacity: 1; background: var(--accent-soft); }
.msg .body:empty { display: none; }
.att-photo { display: block; width: fit-content; max-width: 100%; margin: 2px 0; border-radius: 10px; overflow: hidden; background: var(--paper); line-height: 0; }
.att-photo img { display: block; width: 260px; max-width: 100%; height: auto; max-height: 320px; object-fit: cover; min-height: 60px; }
.att-photo:not([href]) img { visibility: hidden; height: 120px; }
.att-file { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; margin: 2px 0; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); text-decoration: none; max-width: 320px; }
.att-file:hover { border-color: var(--accent); }
.att-file .att-ic { font-size: 22px; line-height: 1; }
.att-file .att-nm { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-file .att-sz { font-size: 11px; color: var(--muted); white-space: nowrap; }
.att-pend { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--line); background: var(--card); font-size: 13px; }
.att-pend img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.att-pend .att-ic { font-size: 24px; line-height: 1; }
.att-pend .att-nm { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-pend .att-sz { color: var(--muted); font-size: 12px; white-space: nowrap; }
.att-view { position: fixed; inset: 0; z-index: 300; background: rgba(0, 0, 0, .88); display: grid; place-items: center; padding: 16px; cursor: zoom-out; }
.att-view img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.att-view-x { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .15); color: #fff; font-size: 18px; cursor: pointer; }
/* Badges next to names */
.ubadge, .umedal { font-size: 12px; line-height: 1; margin-left: 2px; }
.who.who-hl { background: linear-gradient(90deg, #ff2d75, #ff9a3c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.msg.msg-star { border: 2px solid #f5b301; box-shadow: 0 0 0 3px rgba(245, 179, 1, .18); }
/* Badges & Ranking box */
.bdg { display: grid; gap: 18px; margin-top: 10px; }
.bdg h4 { margin: 0; font-size: 15px; }
.bdg-sec { display: grid; gap: 8px; }
.bdg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.bdg-me { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
.bdg-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.bdg-stats > div { display: grid; gap: 2px; padding: 10px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); text-align: center; }
.bdg-stats b { font-size: 22px; line-height: 1.1; }
.bdg-stats span { font-size: 11px; color: var(--muted); }
.bdg-ctrls { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.bdg-field { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; flex-wrap: wrap; }
.bdg-field select { padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; }
.bdg-check { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.bdg-ref { display: grid; gap: 6px; }
.bdg-label { font-size: 13px; font-weight: 600; }
.bdg-board { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.bdg-board li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); }
.bdg-board li.me { border-color: var(--accent); background: var(--accent-soft); }
.bdg-board li.bdg-gap { display: block; text-align: center; padding: 0; border: 0; background: none; color: var(--muted); }
.bdg-rank { font-weight: 700; text-align: center; color: var(--muted); }
.bdg-board li:nth-child(1) .bdg-rank, .bdg-board li:nth-child(2) .bdg-rank, .bdg-board li:nth-child(3) .bdg-rank { color: var(--accent); }
.bdg-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.bdg-pts { font-weight: 700; }
.bdg-table td, .bdg-table th { vertical-align: top; font-size: 13px; }
.bdg-table tr.got td:first-child b { color: var(--accent); }
.bdg-ic { font-size: 18px; }
.bdg-you { display: grid; gap: 3px; min-width: 110px; font-size: 12px; }
.bdg-bar { display: block; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bdg-bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
@media (max-width: 640px) {
  .bdg-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bdg-badges thead { display: none; }
  .bdg-badges, .bdg-badges tbody, .bdg-badges tr, .bdg-badges td { display: block; width: 100%; }
  .bdg-badges tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .bdg-badges td { padding: 2px 0; border: 0; text-align: left; }
  .bdg-badges td.num::before { content: 'Members: '; color: var(--muted); }
}
.bdg-badges td.num { white-space: nowrap; }
/* Reports and Moderation */
.rep-btn { opacity: .55; font-weight: 400; }
.rep-btn:hover { opacity: 1; color: var(--danger) !important; }
.rp-reasons { display: grid; gap: 6px; }
.rp-opt { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.rp-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.modal textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: inherit; background: var(--paper); color: var(--ink); }
.mod-wrap { display: grid; gap: 22px; }
.mod-wrap section { display: grid; gap: 10px; }
.mod-h { font-size: 18px; margin: 0; }
.mod-card { gap: 8px; }
.mod-top { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; }
.mod-content { display: grid; gap: 4px; padding: 10px 12px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); }
.mod-content p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.mod-reasons { margin: 0; padding-left: 18px; font-size: 13px; display: grid; gap: 2px; }
.mod-photo { grid-template-columns: 120px minmax(0, 1fr); display: grid; align-items: start; }
.mod-photo img { width: 120px; height: 90px; object-fit: cover; border-radius: 8px; }
.mod-photo-info { display: grid; gap: 4px; }
.bdg-strikes { display: grid; gap: 6px; margin-bottom: 6px; }
.bdg-strike { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--danger, #c0392b); background: var(--paper); font-size: 13px; }
.bdg-strike.old { border-color: var(--line); opacity: .7; }
/* Share links and sections */
.log-group-headrow { display: flex; align-items: center; }
.log-group-headrow .log-group-head { flex: 1; min-width: 0; }
.box-share { margin-right: 12px; flex: 0 0 auto; font-size: 15px; opacity: .7; }
.box-share:hover, .box-share:focus-visible { opacity: 1; }
.log-group-box.flash { animation: box-flash 2.4s ease-out; }
@keyframes box-flash { 0%, 40% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }
.share-row { margin: 6px 0 2px; }
.share-pop { position: fixed; z-index: 220; display: grid; min-width: 230px; max-width: min(320px, calc(100vw - 16px)); padding: 6px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 28px rgba(0, 0, 0, .25); max-height: 70vh; overflow-y: auto; }
.share-pop .share-head { font-size: 12px; color: var(--muted); padding: 6px 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-pop button, .share-pop a { display: block; width: 100%; text-align: left; font: inherit; font-size: 14px; padding: 9px 10px; border: 0; border-radius: 10px; background: transparent; color: inherit; text-decoration: none; cursor: pointer; }
.share-pop button:hover, .share-pop a:hover, .share-pop button:focus-visible { background: var(--accent-soft); }
/* Links inside chat messages */
.link-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent-soft); color: var(--ink); font-weight: 600; font-size: 13px; text-decoration: none; vertical-align: baseline; white-space: normal; }
.link-chip:hover { background: var(--accent); color: #fff; }
.ext-link { color: var(--accent); text-decoration: underline; overflow-wrap: anywhere; }
.ext-host { font-size: 11px; color: var(--muted); }
.log-group-box { scroll-margin-top: calc(var(--head-h, 60px) + 14px); }
@media (max-width: 959px) { .log-group-box { scroll-margin-top: calc(var(--head-h, 54px) + 72px); } }
/* Chat page: group list on the left, chips on phones */
.chat-top-gap { flex: 1; }
.room-window.gwin { flex-direction: row; }
.gwin .gmain { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.gwin .gmain .chat { flex: 1 1 0; height: auto; min-height: 0; }
.glist { flex: 0 0 220px; width: 220px; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--card); min-height: 0; }
.glist.closed { flex-basis: 44px; width: 44px; }
.glist-toggle { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; cursor: pointer; text-align: left; }
.glist.closed .glist-toggle { justify-content: center; padding: 10px 0; border-bottom: 0; }
.glist-toggle:hover { color: var(--accent); }
.glist-items { display: grid; align-content: start; gap: 2px; padding: 6px; overflow-y: auto; min-height: 0; flex: 1; }
.glist-item { display: grid; gap: 1px; padding: 8px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.glist-item:hover { background: var(--accent-soft); }
.glist-item.on { background: var(--accent); color: #fff; }
.glist-item.on .glist-meta { color: rgba(255, 255, 255, .8); }
.glist-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.glist-meta { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.glist-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-left: 4px; }
.glist-item.on .glist-dot { background: #fff; }
.glist-new { color: var(--accent); font-weight: 600; font-size: 13px; margin-top: 4px; border: 1px dashed var(--line); }
.gchips { display: none; }
@media (max-width: 640px) {
  .glist { display: none; }
  .gchips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 0 0 2px; }
  .gchips::-webkit-scrollbar { display: none; }
  .gchip { flex: 0 0 auto; display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
  .gchip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
  .gchip-new { color: var(--accent); border-style: dashed; }
}
/* − Font + */
.font-ctl { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--card); overflow: hidden; }
.font-ctl span { font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 4px; }
.font-ctl button { width: 30px; height: 30px; border: 0; background: none; color: var(--ink); font-size: 17px; font-weight: 700; cursor: pointer; line-height: 1; }
.font-ctl button:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent); }
.font-ctl button:disabled { opacity: .3; cursor: default; }
.chatbox-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
/* Chat text follows the chosen size (--cfs, default 16px) */
.chat-window .msg .body { font-size: var(--cfs, 16px); }
.chat-window .msg .body.emo-big { font-size: calc(var(--cfs, 16px) * 2.6); }
.chat-window .msg .body.emo-mid { font-size: calc(var(--cfs, 16px) * 1.8); }
.chat-window .msg .who { font-size: calc(var(--cfs, 16px) * .8); }
.chat-window .msg .meta, .chat-window .msg .meta .linkish { font-size: calc(var(--cfs, 16px) * .72); }
.chat-window .msg .quote, .chat-window .msg .item-tag, .chat-window .reply-bar, .chat-window .chat-day, .chat-window .rx-chip, .chat-window .topic-bar { font-size: calc(var(--cfs, 16px) * .8); }
.chat-window .link-chip, .chat-window .att-file .att-nm { font-size: calc(var(--cfs, 16px) * .87); }.chat-window .chat-form input, .chat-window .chat-form textarea.msg-in { font-size: max(16px, var(--cfs, 16px)); }
/* Chat page: group list on the left, chips on phones */
.chat-top-gap { flex: 1; }
.room-window.gwin { flex-direction: row; }
.gmain { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gmain .chat { flex: 1 1 0; height: auto; min-height: 0; }
.glist { flex: 0 0 220px; width: 220px; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--card); min-height: 0; }
.glist.closed { flex-basis: 44px; width: 44px; }
.glist-toggle { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; text-align: left; }
.glist-toggle:hover { color: var(--accent); }
.glist.closed .glist-toggle { justify-content: center; padding: 12px 0; border-bottom: 0; }
.glist-items { display: grid; align-content: start; gap: 2px; padding: 6px; overflow-y: auto; flex: 1; min-height: 0; }
.glist-item { display: grid; gap: 2px; padding: 9px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.glist-item:hover { background: var(--accent-soft); }
.glist-item.on { background: var(--accent); color: #fff; }
.glist-item.on .glist-meta { color: rgba(255, 255, 255, .85); }
.glist-name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.glist-meta { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.glist-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-left: 4px; }
.glist-item.on .glist-dot { background: #fff; }
.glist-new { color: var(--accent); font-weight: 700; font-size: 13px; margin-top: 4px; border: 1px dashed var(--line); }
.gchips { display: none; }
@media (max-width: 640px) {
  .glist { display: none; }
  .gchips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
  .gchips::-webkit-scrollbar { display: none; }
  .gchip { flex: 0 0 auto; display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
  .gchip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
  .gchip-new { color: var(--accent); border-style: dashed; }
}
/* − Font + */
.font-ctl { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--card); font-size: 12px; font-weight: 600; color: var(--muted); }
.font-ctl span { padding: 0 6px; }
.font-ctl button { width: 28px; height: 28px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font: inherit; font-size: 16px; font-weight: 700; line-height: 1; cursor: pointer; }
.font-ctl button:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent); }
.font-ctl button:disabled { opacity: .35; cursor: default; }
.chatbox-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
/* Chat text size applies inside every chat window */
.chat-window .msg .body { font-size: var(--cfs, 16px); }
.chat-window .msg .body.emo-big { font-size: calc(var(--cfs, 16px) * 2.5); }
.chat-window .msg .body.emo-mid { font-size: calc(var(--cfs, 16px) * 1.75); }
.chat-window .msg .who, .chat-window .msg .quote, .chat-window .chat-day, .chat-window .msg .item-tag, .chat-window .rx-chip, .chat-window .reply-bar, .chat-window .topic-bar { font-size: calc(var(--cfs, 16px) * .8); }
.chat-window .msg .meta, .chat-window .msg .meta .linkish { font-size: calc(var(--cfs, 16px) * .73); }
.chat-window .link-chip, .chat-window .att-file .att-nm { font-size: calc(var(--cfs, 16px) * .87); }.chat-window .chat-form input, .chat-window .chat-form textarea.msg-in { font-size: max(16px, var(--cfs, 16px)); }
.chat-window .glist { font-size: 14px; }
.dd-phone { display: none; }
@media (max-width: 640px) { .dd-phone { display: block; } }
/* Phones: compact "− +" text size control, kept on the same row as Public / Group */
@media (max-width: 640px) {
  .chat-top { flex-wrap: nowrap; gap: 6px; min-width: 0; }
  .chat-page { grid-template-columns: minmax(0, 1fr); }
  .chat-top .seg { flex: 0 0 auto; }
  .chat-top .dd-phone { flex: 0 1 auto; min-width: 0; }
  .chat-top .dd-btn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .chat-top .font-ctl { flex: 0 0 auto; }
  .font-ctl span { display: none; }
  .font-ctl button { width: 26px; height: 26px; }
}
/* Bookmark ☆ and task ☑ on each bubble, right side before the time */
.msg .meta .meta-right { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.msg .meta .meta-right .time { margin-left: 0; }
.msg .meta .sv-btn { font-size: 1.25em; line-height: 1; padding: 0 1px; opacity: .55; filter: grayscale(1); }
.msg .meta .sv-btn:hover { opacity: 1; filter: none; }
.msg .meta .sv-btn.on { opacity: 1; filter: none; }
.msg .meta .sv-bm.on { color: #e0a800; }
.msg .meta .sv-task.on { color: var(--accent); }
/* Chat modes: four buttons on computers, a dropdown on phones */
.mode-pick { display: none; }
.mode-pick select { font: inherit; font-size: 14px; font-weight: 600; padding: 7px 30px 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
@media (max-width: 640px) {
  .chat-top .chat-modes { display: none; }
  .mode-pick { display: block; flex: 0 1 auto; min-width: 0; }
  .mode-pick select { max-width: 100%; }
}
/* Bookmarks and tasks lists */
.sv-list { gap: 10px; }
.sv-item { display: grid; gap: 6px; padding: 12px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.sv-src { display: flex; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; font-size: calc(var(--cfs, 16px) * .8); font-weight: 700; }
.sv-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--cfs, 16px); display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.sv-acts { display: flex; gap: 12px; align-items: center; }
.task-form { display: flex; gap: 8px; margin-bottom: 4px; }
.task-form input, .task-edit input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; background: var(--card); color: var(--ink); font: inherit; font-size: max(16px, var(--cfs, 16px)); }
.task-edit { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.task { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.task-check { width: 28px; height: 28px; border: 0; background: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; padding: 0; }
.task-check:hover { color: var(--accent); }
.task-main { display: grid; gap: 3px; min-width: 0; }
.task-text { font-size: var(--cfs, 16px); white-space: pre-wrap; overflow-wrap: anywhere; padding-top: 2px; }
.task-src { justify-self: start; font-size: calc(var(--cfs, 16px) * .75); text-align: left; }
.task-acts { display: flex; gap: 8px; align-items: center; padding-top: 2px; }
.task.done { opacity: .65; }
.task.done .task-text { text-decoration: line-through; }
.task.done .task-check { color: var(--accent); }
.sv-done { margin-top: 6px; display: grid; gap: 8px; }
.sv-done > summary { cursor: pointer; color: var(--muted); font-weight: 700; font-size: 14px; padding: 6px 2px; }
.sv-done[open] > summary { margin-bottom: 8px; }
.sv-done .task + .task { margin-top: 8px; }
.msg .meta .sv-task.done { color: #1f9d55; opacity: 1; filter: none; }
.msg .meta .sv-done-lbl { font-size: .95em; font-weight: 700; color: #1f9d55; white-space: nowrap; margin-left: -4px; }
.msg .meta .linkish.replied { color: var(--accent); }
/* Expand all / Collapse all next to Arrange */
.box-tools { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
@media (max-width: 640px) { .box-tools .btn { padding-inline: 10px; } }
/* Owner tools inside collapsible sections: the old panels lose their frame and duplicate heading */
.adm-box { margin-top: 10px; }
.adm-box > .panel { border: 0; padding: 0; background: none; box-shadow: none; margin-top: 0 !important; }
.adm-box > .panel > h3:first-child { display: none; }
.adm-box > .panel + .panel { margin-top: 18px !important; }
/* Chat page left column: Members and Available groups */
.gsec { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 4px; }
.gsec-head { display: flex; align-items: center; gap: 6px; width: 100%; padding: 8px 6px; border: 0; background: none; color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; text-align: left; border-radius: 8px; }
.gsec-head:hover { color: var(--accent); }
.gsec-car { width: 12px; color: var(--muted); }
.gsec-body { display: grid; gap: 2px; padding: 0 0 4px; }
.gsec-note { margin: 4px 6px; font-size: 12px; }
.gmem { display: flex; align-items: center; gap: 8px; padding: 5px 6px; font-size: 13px; min-width: 0; }
.gmem .avatar { width: 26px; height: 26px; font-size: 11px; flex: 0 0 auto; }
.gmem-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gmem-name small { color: var(--muted); }
.gmem-role { font-size: 11px; color: var(--accent); font-weight: 700; }
.gavail { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.gav-state { font-size: 11px; font-weight: 700; color: var(--accent); }
.gj-modal { display: grid; gap: 12px; max-width: 420px; }
.gj-err { margin: 0; color: #c0392b; font-size: 14px; }
.join-modes { flex-wrap: wrap; }
.gj-modal h2 { font-size: 22px; line-height: 1.2; margin: 0; }
.ng-modes { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.ng-modes legend { font-weight: 600; font-size: 14px; margin-bottom: 6px; padding: 0; }
/* ⚙ Manage pop-up */
.manage-modal { width: min(600px, calc(100vw - 24px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; gap: 10px; }
.mg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mg-head h2 { font-size: 22px; line-height: 1.2; margin: 0; overflow-wrap: anywhere; }
.mg-body { overflow-y: auto; min-height: 0; display: grid; gap: 12px; padding-right: 2px; }
.mg-body .panel { margin: 0; }
.mg-body .join-modes { border-radius: 14px; }
/* "Already on the site?" suggestions */
.dup-sug { border: 1px solid var(--accent); background: var(--accent-soft); border-radius: 12px; padding: 10px 12px; font-size: 14px; display: grid; gap: 6px; grid-column: 1 / -1; }
.dup-sug ul { margin: 0; padding-left: 18px; display: grid; gap: 3px; }
.dup-sug a { color: var(--accent); font-weight: 600; }
.dup-ok { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.dup-sug.need { box-shadow: 0 0 0 3px var(--accent); }
/* Logo (theme coloured) */
.sc-logo { position: relative; display: block; flex: none; aspect-ratio: 600 / 399; }
.sc-logo::before, .sc-logo::after { content: ""; position: absolute; inset: 0; -webkit-mask: url(sc-logo.webp) center / contain no-repeat; mask: url(sc-logo.webp) center / contain no-repeat; }
.sc-logo::before { background: var(--logo, var(--accent)); }
.sc-logo::after { background: url(sc-logo.webp) center / contain no-repeat; mix-blend-mode: overlay; }
.brand .sc-logo { height: 1.3em; }
.foot-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); justify-self: start; }
.foot-brand .sc-logo { height: 56px; }
.foot-brand span { display: grid; line-height: 1.15; }
.foot-brand b { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: .02em; text-transform: uppercase; color: var(--accent); }
.foot-brand small { font-size: 14px; color: var(--muted); font-weight: 600; }
/* On colourful headers the logo takes the header's text colour so it stays visible */
:root[data-theme="pesta"] .site-head .brand, :root[data-theme="raya"] .site-head .brand, :root[data-theme="batik"] .site-head .brand,
:root[data-theme="pantai"] .site-head .brand, :root[data-theme="retro"] .site-head .brand { --logo: currentColor; }
:root:not([data-theme]) .site-head .brand, :root[data-theme="light"] .site-head .brand { --logo: color-mix(in srgb, var(--accent) 70%, #fff); }
/* Header search: always the theme's card colours, so typed text is readable in every theme */
.site-head .head-search #head-q { background: var(--card) !important; color: var(--ink) !important; border: 1px solid var(--line) !important; -webkit-text-fill-color: var(--ink); caret-color: var(--accent); }
.site-head .head-search #head-q::placeholder { color: var(--muted) !important; -webkit-text-fill-color: var(--muted); opacity: 1; }
/* Event page: Your plan | Community check, then a full-width chat that folds */
.ev-body { display: grid; gap: 24px; min-width: 0; }
.ev-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.ev-duo.solo { grid-template-columns: minmax(0, 1fr); }
.ev-duo > .panel { margin: 0; min-width: 0; }
@media (max-width: 760px) { .ev-duo { grid-template-columns: minmax(0, 1fr); } }
.ev-badges .share-btn, .ev-badges [data-act="share"] { margin: 0; }
.chat-fold { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer; font: inherit; color: var(--ink); }
.chat-fold > span:first-child { font-weight: 700; font-size: 18px; }
.chat-fold .note { flex: 1; min-width: 0; }
.chat-fold:hover { border-color: var(--accent); }
.chat-fold-car { color: var(--muted); font-size: 14px; }
.chat-fold-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.chat-fold-btn:hover h3 { color: var(--accent); }
.chatbox.chat-wide .chat-window .chat { flex: none; height: min(55vh, 460px); }
.ev-badges { align-items: center; } .ev-badges .share-row { display: inline-flex; margin: 0; }
.ev-duo > .panel { align-content: start; justify-content: flex-start; }
/* Event page: photo area beside the title; the fact boxes sit in front of its lower part */
.ev-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 38%); grid-template-rows: auto auto; column-gap: 20px; margin-bottom: 24px; }
.ev-top > .movie-head { grid-column: 1; grid-row: 1; margin-bottom: 16px; }
.ev-top > .ev-photos { grid-column: 2; grid-row: 1 / 3; }
.ev-top > .strip-wrap { grid-column: 1 / -1; grid-row: 2; position: relative; z-index: 2; align-self: end; margin: 0; }
.ev-top > .strip-wrap > .facts.strip .fact { box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
.ev-photos { position: relative; border-radius: 14px; overflow: hidden; background: var(--card); border: 1px solid var(--line); min-height: 220px; isolation: isolate; z-index: 1; }
.ev-photo-open { position: absolute; inset: 0; padding: 0; border: 0; background: none; cursor: zoom-in; display: block; }
.ev-photo-open img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ev-photos .hero-top { z-index: 3; }
.ev-ph-warn { position: absolute; left: 10px; top: 10px; z-index: 3; }
.ev-photos.empty { border-style: dashed; background: color-mix(in srgb, var(--accent) 6%, var(--card)); }
.ev-photo-first { position: absolute; inset: 0 0 40% 0; display: grid; place-content: center; justify-items: center; gap: 6px; font: inherit; font-size: 30px; color: var(--muted); cursor: pointer; background: none; border: 0; }
.ev-photo-first span { font-size: 14px; font-weight: 600; color: var(--accent); }
.ev-photo-first:hover span { text-decoration: underline; }
@media (max-width: 760px) {
  .ev-top { grid-template-columns: minmax(0, 1fr); }
  .ev-top > .ev-photos { grid-column: 1; grid-row: 2; height: 210px; min-height: 0; margin-bottom: 12px; }
  .ev-top > .strip-wrap { grid-row: 3; }
  .ev-photo-first { inset: 0; }
  .ev-top > .strip-wrap > .facts.strip .fact { box-shadow: none; }
}
/* Full-screen photo viewer */
body.pv-open { overflow: hidden; }
.photo-viewer { position: fixed; inset: 0; z-index: 80; background: rgba(5, 4, 10, .94); display: grid; place-items: center; touch-action: pan-y; }
.pv-fig { margin: 0; width: 100%; height: 100%; display: grid; grid-template-rows: minmax(0, 1fr) auto; place-items: center; padding: 56px 56px 16px; box-sizing: border-box; }
.pv-fig img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; user-select: none; }
.pv-fig figcaption { color: #eee; font-size: 14px; display: flex; gap: 16px; justify-content: space-between; width: min(100%, 900px); padding-top: 10px; }
.pv-x { position: absolute; top: 12px; right: 12px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; font-size: 20px; cursor: pointer; z-index: 2; }
.pv-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; z-index: 2; }
.pv-nav.prev { left: 10px; } .pv-nav.next { right: 10px; }
.pv-x:hover, .pv-nav:hover { background: rgba(255, 255, 255, .28); }
.pv-tools { position: absolute; top: 16px; left: 16px; display: flex; gap: 8px; flex-wrap: wrap; z-index: 2; }
.pv-tag { font-size: 12px; background: rgba(180, 35, 24, .85); color: #fff; padding: 5px 11px; border-radius: 999px; }
.pv-empty { color: #fff; }
@media (max-width: 640px) { .pv-fig { padding: 60px 8px 12px; } .pv-nav { display: none; } }
/* Events without a Community check: the photo box sits beside Your plan instead of beside the title */
.ev-top.no-photo { grid-template-columns: minmax(0, 1fr); }
.ev-duo > .ev-photos { min-height: 220px; }
@media (max-width: 760px) { .ev-top.no-photo > .strip-wrap { grid-row: 2; } .ev-duo > .ev-photos { height: 210px; min-height: 0; } }
.ev-links { align-items: center; } .ev-links .share-row { display: inline-flex; margin: 0; } .ev-links .share-row .btn { font-size: 14px; padding: 7px 14px; }
.conn-error p { margin: 0 0 10px; }
.conn-error .conn-detail { margin: 6px 0 0; font-size: 12px; opacity: .7; }
/* Event page: one swipeable row of boxes (photo, Your plan, Community check).
   Each box is only as wide as it needs; ‹ › buttons appear on computers when the row doesn't fit. */
.ev-swipe { position: relative; min-width: 0; }
.ev-row { display: flex; gap: 16px; align-items: stretch; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding: 0; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 0 0 8px; }
.ev-row::-webkit-scrollbar { display: none; }
.ev-row > * { flex: 0 0 auto; margin: 0; scroll-snap-align: start; min-width: 0; }
.ev-row > .ev-photos { flex: 1 0 300px; width: auto; min-height: 240px; }
.ev-row > .ev-plan { width: max-content; max-width: 86vw; align-content: start; }
.ev-row > .ev-plan .actions { flex-wrap: nowrap; }
.ev-row > .vote-panel { width: 420px; max-width: 86vw; align-content: start; }
.sw-nav { display: none; position: absolute; top: 50%; transform: translateY(-50%); z-index: 4; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, .25); padding: 0 0 3px; }
.sw-nav:hover { border-color: var(--accent); color: var(--accent); }
.sw-nav.prev { left: -12px; } .sw-nav.next { right: -12px; }
@media (hover: hover) and (pointer: fine) {
  .ev-swipe.can-prev .sw-nav.prev, .ev-swipe.can-next .sw-nav.next { display: block; }
}
.ev-swipe.can-next .ev-row { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
.ev-swipe.can-prev.can-next .ev-row { -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
.ev-swipe.can-prev:not(.can-next) .ev-row { -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px); mask-image: linear-gradient(90deg, transparent, #000 40px); }
@media (max-width: 760px) {
  .ev-row { gap: 12px; }
  .ev-row > .ev-photos { flex: 0 0 82vw; width: 82vw; height: auto; min-height: 220px; }
  .ev-row > .ev-plan, .ev-row > .vote-panel { max-width: 82vw; }
  .ev-row > .ev-plan .actions { flex-wrap: wrap; }
}
.ev-row .ev-photo-first { inset: 0; }
@media (min-width: 761px) { .ev-top > .strip-wrap > .facts.strip .fact { flex: 1 1 0; max-width: none; } }
/* Full-screen viewer: shrink every photo (portrait or landscape) to fit the screen, never enlarge.
   The height left for the photo = screen height − top space − bottom space − caption line. */
.pv-fig { height: 100vh; height: 100dvh; overflow: hidden; }
.pv-fig img { width: auto; height: auto; max-width: 100%; max-height: calc(100vh - 116px); max-height: calc(100dvh - 116px); }
@media (max-width: 640px) { .pv-fig img { max-height: calc(100vh - 116px); max-height: calc(100dvh - 116px); } }
/* ---------- Share a Moment: filmstrip cards under the event chat ---------- */
.mo-section { display: grid; gap: 10px; min-width: 0; }
.mo-headrow { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.mo-headrow h3 { margin: 0; font-size: 18px; }
.mo-headrow .note { flex: 1; min-width: 12rem; }
.mo-tools { display: inline-flex; gap: 8px; margin-left: auto; }
.mo-row { gap: 14px; }
.mo-card { --film: #1b1a1f; --film-ink: #f3f1ec; --film-dim: #b9b5ac; position: relative; box-sizing: border-box; width: 300px; flex: 0 0 300px !important;
  background: var(--film); color: var(--film-ink); border-radius: 10px; padding: 20px 10px 22px; display: flex; flex-direction: column; gap: 8px; border: 0; text-align: left; font: inherit; }
.mo-card::before, .mo-card::after { content: ""; position: absolute; left: 10px; right: 10px; height: 7px; border-radius: 2px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .82) 0 9px, transparent 9px 18px); opacity: .9; }
.mo-card::before { top: 6px; } .mo-card::after { bottom: 7px; }
.mo-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; }
.mo-who { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mo-aud { font-size: 12px; color: var(--film-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.mo-collage { position: relative; display: grid; gap: 3px; height: 220px; border-radius: 4px; overflow: hidden; background: #000; }
.mo-collage.c1 { grid-template-columns: 1fr; }
.mo-collage.c2 { grid-template-columns: 1fr 1fr; }
.mo-collage.c3 { grid-template-columns: 3fr 2fr; grid-template-rows: 1fr 1fr; } .mo-collage.c3 .t1 { grid-row: 1 / 3; }
.mo-collage.c4 { grid-template-columns: 3fr 2fr; grid-template-rows: repeat(3, 1fr); } .mo-collage.c4 .t1 { grid-row: 1 / 4; }
.mo-collage.c5 { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(6, 1fr); }
.mo-collage.c5 .t1 { grid-column: 1; grid-row: 1 / 4; } .mo-collage.c5 .t2 { grid-column: 1; grid-row: 4 / 7; }
.mo-collage.c5 .t3 { grid-column: 2; grid-row: 1 / 3; } .mo-collage.c5 .t4 { grid-column: 2; grid-row: 3 / 5; } .mo-collage.c5 .t5 { grid-column: 2; grid-row: 5 / 7; }
.mo-tile { position: relative; padding: 0; border: 0; background: #222; cursor: zoom-in; min-height: 0; min-width: 0; overflow: hidden; }
.mo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.mo-tile:hover img { transform: scale(1.03); }
.mo-more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .5); color: #fff; font-size: 26px; font-weight: 800; }
.mo-vbadge { position: absolute; right: 6px; bottom: 6px; border: 0; border-radius: 999px; padding: 4px 10px; background: rgba(0, 0, 0, .7); color: #fff; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.mo-vtile { display: grid; place-content: center; justify-items: center; gap: 6px; border: 0; cursor: pointer; color: #fff; font: inherit; background: #2a2730; }
.mo-vtile span { font-size: 40px; line-height: 1; }
.mo-text { all: unset; cursor: pointer; font-size: 14px; line-height: 1.45; color: var(--film-ink); white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.mo-card.text-only .mo-text { font-size: 17px; -webkit-line-clamp: 9; flex: 1; font-style: italic; }
.mo-text:hover, .mo-text:focus-visible { text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .4); }
.mo-warn { color: #f5a3a3 !important; margin: 0; font-size: 12px; }
.mo-card.is-hidden { outline: 2px dashed #e06666; outline-offset: -2px; }
.mo-foot { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.mo-card .mo-foot .btn { color: var(--film-ink); border-color: rgba(255, 255, 255, .28); background: transparent; }
.mo-card .mo-foot .btn:hover { border-color: #fff; }
.mo-empty { cursor: pointer; align-items: center; justify-content: center; text-align: center; min-height: 300px; }
.mo-empty > * { position: relative; }
.mo-empty .mo-plus { font-size: 40px; line-height: 1; width: 64px; height: 64px; display: grid; place-items: center; border: 2px dashed rgba(255, 255, 255, .5); border-radius: 50%; }
.mo-empty .note { color: var(--film-dim); max-width: 16rem; }
.mo-empty:hover .mo-plus { border-color: #fff; }
.mo-row > .mo-card { align-self: stretch; }
@media (max-width: 760px) { .mo-card { width: 80vw; flex-basis: 80vw !important; } .mo-collage { height: 240px; } .mo-tools { margin-left: 0; } }
/* Pop-ups: one moment in full, all moments, and the share form */
.mo-modal { width: min(100%, 760px); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; box-sizing: border-box; }
.mo-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.mo-modal-head h2 { margin: 0; }
.mo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mo-grid > .mo-card { width: auto; flex: none !important; }
@media (max-width: 640px) { .mo-grid { grid-template-columns: minmax(0, 1fr); } }
.mo-full { white-space: pre-line; margin: 0; line-height: 1.55; overflow-wrap: anywhere; }
.mo-video { width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.mo-video.tall { aspect-ratio: 9 / 16; width: min(100%, 340px); max-height: 70vh; justify-self: center; }
.mo-video iframe { width: 100%; height: 100%; border: 0; display: block; }
.mo-vlink { margin-top: -8px; }
.mo-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.mo-thumbs button { padding: 0; border: 0; aspect-ratio: 1; border-radius: 6px; overflow: hidden; cursor: zoom-in; background: var(--line); }
.mo-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mo-modal .mo-foot .btn { color: var(--ink); }
.mo-form { width: min(100%, 560px); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; box-sizing: border-box; }
.mo-form .field { display: grid; gap: 6px; }
.mo-form select, .mo-form input[type=url] { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: inherit; background: var(--paper); color: var(--ink); }
.mo-aud-pick { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.mo-aud-pick legend { font-size: 13px; color: var(--muted); margin-bottom: 6px; padding: 0; }
.mo-aud-pick label { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 14px; }
.mo-aud-pick label.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); font-weight: 700; }
.mo-aud-pick input { position: absolute; opacity: 0; pointer-events: none; }
.mo-aud-pick label:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.mo-aud-pick label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.mo-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.mo-pthumb { position: relative; width: 64px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--line); }
.mo-pthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mo-pthumb.gone img { opacity: .25; filter: grayscale(1); }
.mo-pthumb.new { outline: 2px solid var(--accent); outline-offset: -2px; }
.mo-pthumb button { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .65); color: #fff; font-size: 12px; line-height: 1; cursor: pointer; padding: 0; }
.mo-padd { width: 64px; height: 64px; border: 2px dashed var(--line); border-radius: 8px; display: grid; place-content: center; justify-items: center; cursor: pointer; font-size: 20px; color: var(--accent); }
.mo-padd span { font-size: 10px; color: var(--muted); }
.mo-padd:hover { border-color: var(--accent); }
.mo-vrow { display: flex; gap: 6px; align-items: center; }
/* Friends in My Log */
.fr-find { display: flex; gap: 8px; margin: 4px 0 8px; }
.fr-find input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: inherit; background: var(--paper); color: var(--ink); }
.fr-results { margin-bottom: 4px; }
.fr-row .row-actions { gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
/* Events with only the photo and Your plan: two boxes of the same width (computers). */
@media (min-width: 761px) {
  .ev-row.two > .ev-photos, .ev-row.two > .ev-plan { flex: 1 1 0; width: auto; max-width: none; min-width: max-content; }
  .ev-row.two > .ev-photos { min-width: 0; }
}
/* Cover Photos box: label, and style B (big cover on top, small frames below) */
.ev-photos .cov-label { position: absolute; left: 10px; top: 10px; z-index: 3; pointer-events: none; }
.ev-photos.empty .cov-label { background: color-mix(in srgb, var(--ink) 55%, transparent); }
.ev-photos.cov { background: #000; }
.cov-grid { position: absolute; inset: 0; display: grid; grid-template-rows: minmax(0, 1fr) minmax(0, 32%); gap: 3px; }
.cov-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; min-height: 0; }
.cov-main, .cov-frame { position: relative; padding: 0; border: 0; background: #222; cursor: zoom-in; overflow: hidden; min-height: 0; min-width: 0; display: block; }
.cov-main img, .cov-frame img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.cov-main:hover img, .cov-frame:hover img { transform: scale(1.03); }
.cov-more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .5); color: #fff; font-size: 22px; font-weight: 800; }
/* Faint, slowly changing cover photo behind the top of the event page */
.ev-top { position: relative; isolation: isolate; }
.ev-bg { position: absolute; inset: -14px; z-index: -1; border-radius: 16px; overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 50%, transparent 100%); mask-image: linear-gradient(to bottom, #000 0%, #000 50%, transparent 100%); }
.ev-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.4s ease; filter: saturate(.9); }
.ev-bg img.on { opacity: .2; }
@media (prefers-reduced-motion: reduce) { .ev-bg img { transition: none; } }
/* Campsite, university and school pages in the event layout */
.ev-row > .ev-map-box { width: 340px; padding: 0; overflow: hidden; display: flex; flex-direction: column; min-height: 240px; }
.ev-map-box .area-map { flex: 1; min-height: 190px; height: auto; border-radius: 0; }
.ev-map-box .map-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; flex-wrap: wrap; }
.ev-map-box .map-foot .note { font-size: 12px; }
.ev-row > .book-panel { width: 340px; max-width: 86vw; align-content: start; }
.ev-row > .edu-study, .ev-row > .edu-members { width: 320px; max-width: 86vw; }
.ev-row > .edu-study .edu-studied { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.place-row .ev-plan .score-line { flex-wrap: wrap; }
@media (max-width: 760px) { .ev-row > .ev-map-box, .ev-row > .book-panel { width: 82vw; } }
.movie-head .edu-links { margin-top: 14px; }
/* Slide-in panel for event, campsite, movie, university and school pages */
body.drawer-open { overflow: hidden; }
.drawer-wrap .drawer-dim { position: fixed; left: 0; right: 0; bottom: 0; top: var(--drawer-top, 0px); background: rgba(10, 8, 20, .45); opacity: 0; transition: opacity .32s ease; z-index: 30; cursor: pointer; }
.drawer-wrap .drawer-panel { position: fixed; top: var(--drawer-top, 0px); bottom: 0; right: 0; left: var(--drawer-left, 0px); z-index: 31; background: var(--paper);
  transform: translateX(100%); transition: transform .34s cubic-bezier(.22, .7, .2, 1); box-shadow: -14px 0 34px rgba(0, 0, 0, .35); display: flex; flex-direction: column;
  border-left: 1px solid var(--line); }
.drawer-wrap.open .drawer-panel { transform: none; }
.drawer-wrap.open .drawer-dim { opacity: 1; }
.drawer-wrap.closing .drawer-panel { transform: translateX(100%); }
.drawer-wrap.closing .drawer-dim { opacity: 0; }
/* Second layer (a course on top of its field page): above the first, starting a little further right on wide screens. */
#drawer2 .drawer-dim { z-index: 40; }
#drawer2 .drawer-panel { z-index: 41; left: var(--drawer2-left, 0px); }
.drawer-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 22px 28px 56px; -webkit-overflow-scrolling: touch; }
.drawer-x { position: absolute; top: 12px; right: 16px; z-index: 6; font: inherit; font-size: 13px; font-weight: 700; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 999px; padding: 6px 14px; cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.drawer-x:hover { border-color: var(--accent); color: var(--accent); }
.drawer-body .ev-top { margin-top: 14px; }
@media (max-width: 760px) { .drawer-body { padding: 18px 16px 48px; } .drawer-wrap .drawer-panel { border-left: 0; } }
@media (prefers-reduced-motion: reduce) { .drawer-wrap .drawer-panel, .drawer-wrap .drawer-dim { transition: none; } }
/* ---------- Friend chat ---------- */
.msg .who[data-act="who"] { cursor: pointer; }
.msg .who[data-act="who"]:hover, .msg .who[data-act="who"]:focus-visible { text-decoration: underline; }
.mode-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px; background: #e0245e; color: #fff; font-size: 11px; line-height: 1; }
.fl-av { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 14%, var(--card)); color: var(--ink); font-weight: 800; font-size: 15px; position: relative; box-shadow: 0 0 0 2px var(--line); }
.fl-av.on { box-shadow: 0 0 0 2.5px #22c55e; }
.fl-av.on::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #22c55e; border: 2px solid var(--card); }
.fl-av.big { width: 56px; height: 56px; font-size: 24px; }
.fl-item { display: flex !important; align-items: center; gap: 10px; }
.fl-text { display: grid; min-width: 0; flex: 1; }
.fl-text .glist-name, .fl-text .glist-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-count { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #e0245e; color: #fff; font-size: 11px; display: grid; place-items: center; }
.fl-head { display: flex; justify-content: space-between; align-items: center; width: 100%; font: inherit; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px 10px 4px; background: none; border: 0; text-align: left; }
.fl-fold { cursor: pointer; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; }
.fl-fold:hover { color: var(--ink); }
.fl-none { margin: 2px 10px 6px; font-size: 13px; }
.fl-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #9ca3af; margin-right: 7px; vertical-align: 1px; }
.fl-dot.on { background: #22c55e; }
.dm-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.dm-head > span:last-child { display: grid; line-height: 1.25; }
.dm-head .note { font-size: 12px; }
.who-top { display: flex; align-items: center; gap: 12px; }
.who-top h2 { margin: 0; font-size: 24px; }
/* Chat balloons: a friend's message pops up at the bottom right for a few seconds */
#balloons { position: fixed; right: 18px; bottom: 18px; z-index: 70; display: grid; gap: 10px; justify-items: end; pointer-events: none; }
.balloon { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; max-width: min(340px, calc(100vw - 36px)); padding: 12px 14px; border: 1px solid var(--line); border-radius: 18px 18px 4px 18px;
  background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
  opacity: 0; transform: translateY(14px) scale(.96); transition: opacity .35s ease, transform .35s ease; }
.balloon.in { opacity: 1; transform: none; }
.balloon.out { opacity: 0; transform: translateY(6px); transition-duration: .6s; }
.balloon:hover { border-color: var(--accent); }
.bl-text { display: grid; gap: 2px; min-width: 0; }
.bl-text span { font-size: 14px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 760px) { #balloons { right: 10px; left: 10px; bottom: 12px; justify-items: stretch; } .balloon { max-width: none; } }
@media (prefers-reduced-motion: reduce) { .balloon { transition: none; } }
.gmem-click { cursor: pointer; border-radius: 8px; }
.gmem-click:hover .gmem-name, .gmem-click:focus-visible .gmem-name, .who-link:hover, .who-link:focus-visible { text-decoration: underline; }
.gmem-click:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.who-link { cursor: pointer; }
/* Chat page: chat buttons sit just below the top bar */
main:has(> .view > .chat-page) { padding-top: 10px; }
main > .view > .chat-page { padding-top: 0; }
/* Your online status button + pop-up (Friend chat) */
.my-status { position: relative; }
.flist .my-status { padding: 6px 8px 2px; }
.flist.closed .my-status { padding: 6px 0; display: flex; justify-content: center; }
.st-btn { width: 100%; justify-content: flex-start; gap: 6px; }
.my-status.compact .st-btn { width: auto; }
.st-pop { position: fixed; min-width: 0; right: auto; z-index: 45; }
.st-opt { display: grid !important; gap: 2px; text-align: left; width: 100%; font: inherit; background: none; border: 0; cursor: pointer; }
.st-opt small { color: var(--muted); font-size: 12px; }
.st-opt.on { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.st-tick { color: var(--accent); }
.st-more { font-size: 13px; }
/* Chat mode buttons: the chosen one looks bold without getting wider, so the row never shifts */
.chat-modes button.on { font-weight: inherit; text-shadow: .35px 0 0 currentColor, -.35px 0 0 currentColor; }
/* ---------- Forum: Lobby + topics ---------- */
.folist { flex-basis: 260px; width: 260px; }
.fnav { gap: 2px; }
.fnav-top { display: grid; gap: 6px; padding: 2px 0 6px; }
.forum-q { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit; font-size: 14px; }
.forum-q:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.fnav .glist-new, .forum-pop .glist-new { margin: 0; text-align: left; background: none; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.fnav-list { display: grid; gap: 2px; align-content: start; }
.gsec-title { margin: 12px 6px 0; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.fnav-list .gsec-head small, .forum-pop .gsec-head small { font-weight: 500; color: var(--muted); }
.ftopic .glist-name { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
.ftopic .glist-meta { justify-content: space-between; }
.ft-unread { display: inline-block; min-width: 18px; padding: 1px 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; text-align: center; line-height: 1.5; }
.glist-item.on .ft-unread { background: #fff; color: var(--accent); }
.flobby .glist-name { font-size: 15px; }
button.gsec-note { justify-self: start; }
/* Lobby activity lines */
.forum-log { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; align-self: center; width: fit-content; max-width: min(94%, 640px); margin: 6px auto; padding: 7px 12px; border-radius: 12px; border: 1px dashed var(--line); background: var(--accent-soft); color: var(--ink); text-decoration: none; font-size: calc(var(--cfs, 16px) * .82); line-height: 1.4; }
.forum-log:hover, .forum-log:focus-visible { border-color: var(--accent); }
.forum-log time { flex: 0 0 auto; color: var(--muted); font-size: .9em; white-space: nowrap; }
/* Topic header */
.chat-window .forum-head { flex-wrap: nowrap; justify-content: flex-start; gap: 10px; padding: 8px 10px; font-size: 14px; font-weight: 400; }
.fh-back { flex: 0 0 auto; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 18px; font-weight: 700; }
.fh-back:hover { background: var(--card); color: var(--accent); }
.fh-main { flex: 1 1 auto; min-width: 0; display: grid; gap: 1px; }
.fh-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.fh-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.fh-acts { flex: 0 0 auto; display: flex; gap: 6px; align-items: center; }
.btn.on-follow { border-color: var(--accent); color: var(--accent); background: var(--card); }
.fh-warn { margin: 0; padding: 6px 12px; border-bottom: 1px solid var(--line); background: #fff4d6; color: #6b5200; font-size: 13px; }
/* Phones: the forum list is a dropdown */
.forum-pop { width: min(21rem, calc(100vw - 24px)); max-height: min(70vh, 560px); overflow-y: auto; padding: 8px; }
.forum-pop .glist-item { color: var(--ink); }
.forum-pop .glist-item.on { color: #fff; }
.fdd .dd-btn { display: inline-flex; align-items: center; gap: 4px; }
.fdd-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.nt-modal textarea { width: 100%; box-sizing: border-box; }
.nt-modal .dup-sug, .ft-tools .field { margin: 0; }
@media (max-width: 640px) {
  .chat-window .forum-head { padding: 6px 8px; gap: 6px; }
  .fh-meta { display: none; }
  .fh-acts .btn { padding: 5px 9px; }
  .fh-back { width: 28px; height: 28px; }
}
@media (max-width: 640px) { .chat-top .fdd { flex: 0 1 auto; min-width: 0; max-width: 40vw; } }
/* ---------- Carta Didik › Top courses ---------- */
.chips .chip[data-act="cs-tab"] { cursor: pointer; font: inherit; font-size: 13px; }
.chips .chip[data-act="cs-tab"].on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.cs-jobs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 6px; }
.cs-jobs .pill { font-size: 10px; }
.cs-years { width: 100%; border-collapse: collapse; font-size: 14px; }
.cs-years th, .cs-years td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.cs-years th { font-size: 12px; color: var(--muted); font-weight: 700; }
.cs-years small { color: var(--muted); }
.cs-field, .cs-page { gap: 20px; align-items: start; margin-bottom: 20px; }
.cs-page .chatbox .chat { max-height: 420px; }
@media (max-width: 640px) { .cs-row .row-actions { display: none; } }
/* ---------- Port Makan ---------- */
.check-row { display: inline-flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 14px; cursor: pointer; }
.check-row input { width: 18px; height: 18px; accent-color: var(--accent); }
.pill.halal-jakim { background: #e3f6e8; color: #17672e; border-color: #b7e2c3; }
.pill.halal-muslim { background: #eef8e6; color: #3d6b16; border-color: #cfe6bb; }
.pill.halal-pork_free { background: #fff6dc; color: #7a5b00; border-color: #f0dfa6; }
.pill.halal-non_halal { background: #fdeaea; color: #8f2424; border-color: #f2c4c4; }
.food-pills:empty { display: none; }
.maps-paste .invite-row { gap: 8px; }
.maps-paste .invite-row input { flex: 1; min-width: 0; }
.maps-msg:empty { display: none; }
@media (max-width: 640px) { .maps-paste .invite-row { flex-wrap: wrap; } .maps-paste .invite-row .btn { width: 100%; } }
/* Lobby: filter chips (where the chats come from) */
.chat-window .lobby-src { display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; padding: 8px 10px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.chat-window .lobby-src::-webkit-scrollbar { display: none; }
.chat-window .lobby-src .chip { flex: 0 0 auto; font: inherit; font-size: 13px; padding: 5px 11px; cursor: pointer; background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.chat-window .lobby-src .chip:hover { border-color: var(--accent); color: var(--accent); }
.chat-window .lobby-src .chip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
a.item-tag { text-decoration: none; display: inline-block; }
/* Phones: the Explore links move into the ☰ menu, and the Chat page works like a chat app */
.pop-explore-title { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--muted); padding: 6px 10px 4px; }
.pop-explore-head { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--muted); padding: 8px 10px 2px; }
.pop .pop-explore .pop-item { display: flex; align-items: center; gap: 8px; }
.pop .pop-item.pop-indent { padding-left: 34px; }
@media (max-width: 640px) {
  .side-nav { display: none; }
  #pop-burger { max-height: calc(100dvh - var(--head-h, 54px) - 16px); overflow-y: auto; overscroll-behavior: contain; }
  html:has(body.chat-app), body.chat-app { height: 100%; overflow: hidden; overscroll-behavior: none; }
  body.chat-app .site-foot, body.chat-app .side-ad, body.chat-app .demo-bar { display: none; }
  body.chat-app main { padding-bottom: 0; }
}

/* Chat message box: a multi-line box that grows to about three lines */
.chat-form textarea.msg-in { resize: none; line-height: 1.35; max-height: 112px; overflow-y: auto; border-radius: 20px; font-family: inherit; color: var(--ink); display: block; align-self: center; }
.chat-form.has-em textarea.msg-in { padding-left: 70px; }
.chat-form:has(textarea.msg-in) { align-items: flex-end; }
.chat-form:has(textarea.msg-in) .em-btn, .chat-form:has(textarea.msg-in) .att-btn { top: auto; bottom: 19px; transform: none; }
.chat-form:has(textarea.msg-in) > .btn { align-self: flex-end; }
.chat-form textarea.msg-in { align-self: auto; }
/* Phones: the topic / group / friend list slides in from the left, like a chat app */
@media (max-width: 640px) {
  .chat-top .dd-phone .dd-btn[data-menu^="chat"]::before { content: '☰'; margin-right: 6px; font-weight: 700; }
  #pop-chatforum, #pop-chatgroups, #pop-chatfriends { position: fixed !important; top: 0 !important; bottom: 0 !important; left: 0 !important; right: auto !important;
    width: min(84vw, 340px) !important; max-height: none !important; margin: 0; border-radius: 0 18px 18px 0; overflow-y: auto; overscroll-behavior: contain;
    padding: 16px 10px calc(16px + env(safe-area-inset-bottom)); z-index: 1001; align-content: start; grid-auto-rows: max-content; box-shadow: 8px 0 30px rgba(0, 0, 0, .35); animation: side-pop-in .24s cubic-bezier(.22, .7, .2, 1); }
  #side-pop-dim { position: fixed; inset: 0; background: rgba(10, 8, 20, .45); z-index: 1000; animation: side-dim-in .24s ease; }
}
@keyframes side-pop-in { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes side-dim-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #pop-chatforum, #pop-chatgroups, #pop-chatfriends, #side-pop-dim { animation: none; } }
/* Jom Keluar: "Verified events only" sits in the same row as All events / Going / My history */
.jom-bar-left { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; }
.jom-bar-left .check.jom-verified { margin: 0; white-space: nowrap; align-items: center; }
/* Jom Keluar: Reset at the end of the search row */
.filters .jom-reset { flex: 0 0 auto; align-self: end; height: 42px; }
.filters .jom-reset.idle { opacity: .45; cursor: default; }
/* Event, campsite, place and school pages: extra room at the top so more of the background photo shows */
.ev-top:has(> .ev-bg) > .movie-head { padding-top: 120px; }
@media (max-width: 640px) { .ev-top:has(> .ev-bg) > .movie-head { padding-top: 70px; } }
/* Top courses: ranking courses inside a field */
.cf-tabs { margin: 4px 0 6px; }
.cf-tabs .chip { cursor: pointer; font: inherit; font-size: 13px; padding: 5px 12px; background: var(--card); color: var(--ink); }
.cf-tabs .chip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.cf-note { margin: 0 0 10px; }
.cs-course .row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
/* Top courses: find jobs and big employers */
.find-jobs .actions { gap: 6px; }
.cs-find { margin-bottom: 18px; }
.emp-panel { margin-bottom: 18px; }
.emp-list { display: grid; gap: 6px; }
.emp-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); background: var(--paper); }
.emp-row:hover { border-color: var(--accent); }
.emp-row b { font-weight: 600; }
.emp-row .emp-go { margin-left: auto; font-size: 13px; color: var(--accent); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
/* Keep the scrollbar's space so the page doesn't jump sideways when a slide-in panel opens or closes */
html { scrollbar-gutter: stable; }
/* Course page: Find jobs, Big employers and Jobs short of in one row you swipe left/right; chat full width below */
.cs-swipe { position: relative; margin-bottom: 20px; }
.cs-row > .panel { width: 380px; max-width: 86vw; align-content: start; }
.cs-swipe + #discussion, .cs-swipe + .panel { margin-top: 0; }
.cs-row > .emp-panel { margin-bottom: 0; }

/* Long lists: rows arrive 30 at a time as you scroll ("Show more" is the fallback). */
.ev-list > .lazy-list { display: grid; gap: 4px; }
.lazy-more { display: flex; justify-content: center; padding: 14px 0 6px; }

/* Movie page: boxes in one swipe row, owner's "Edit details" under it, chat full width at the bottom. */
.mv-swipe .cs-row > .trailer { width: 460px; }
.mv-admin { margin-bottom: 20px; }
.mv-admin + #discussion { margin-top: 0; }

/* Event, campsite, Port Makan and school pages: every box in the swipe row has the same width. */
.ev-body .ev-swipe:not(.mo-swipe) > .ev-row > * { flex: 0 0 380px; width: 380px; max-width: 86vw; }
.ev-body .ev-swipe:not(.mo-swipe) > .ev-row > .ev-plan .actions { flex-wrap: wrap; }

/* Swipe rows: boxes start at 380px; when they all fit, they grow equally to fill the row (no empty space). */
.ev-body .ev-swipe:not(.mo-swipe) > .ev-row > *, .cs-row > .panel { flex: 1 0 380px; width: auto; max-width: none; }
.mv-swipe .cs-row > .trailer { flex-basis: 460px; width: auto; }
@media (max-width: 640px) {
  .ev-body .ev-swipe:not(.mo-swipe) > .ev-row > *, .cs-row > .panel, .mv-swipe .cs-row > .trailer { flex: 0 0 86vw; width: 86vw; max-width: 86vw; }
}
/* Forum list: ☆/★ on each topic, and the ☕ Kedai Kopi / 🏠 Laman Kita blocks that fold up */
.ftopic-row { display: flex; align-items: stretch; gap: 2px; }
.ftopic-row .ftopic { flex: 1; min-width: 0; }
.ftopic-star { flex: none; width: 30px; border: 0; background: none; color: var(--muted); font-size: 17px; line-height: 1; cursor: pointer; border-radius: 8px; padding: 0; }
.ftopic-star:hover { color: var(--accent); background: var(--accent-soft); }
.ftopic-star.on { color: #f5b301; }
.ftopic-star:disabled { opacity: .5; }
.gsec-block { display: flex; align-items: center; gap: 6px; width: calc(100% - 12px); border: 0; background: none; padding: 8px 0 4px; cursor: pointer; text-align: left; font-family: inherit; }
.gsec-block:hover { color: var(--accent); }
.gsec-block small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.gblock { border-top: 1px solid var(--line, rgba(127,127,127,.2)); margin-top: 6px; }
.fh-star { font-size: 18px; line-height: 1; min-width: 38px; }
.fh-star.on-follow { color: #f5b301; }

/* Forum list sizes: main blocks big, sub-groups smaller, threads smallest */
.fnav-list .gsec-head, .forum-pop .gsec-head, .fnav-list .gsec-block, .forum-pop .gsec-block { font-size: 14.5px; font-weight: 800; color: var(--ink); text-transform: none; letter-spacing: 0; }
.fnav-list .gsec-car, .forum-pop .gsec-car { width: 18px; font-size: 18px; line-height: 1; color: var(--ink); flex: none; text-align: center; }
.gblock-body .gsec-head { font-size: 13px; font-weight: 700; padding: 6px 6px 6px 14px; color: var(--ink); }
.gblock-body .gsec-car { width: 12px; font-size: 12px; color: var(--muted); }
.fnav-list .ftopic .glist-name, .forum-pop .ftopic .glist-name { font-size: 12.5px; font-weight: 600; }
.fnav-list .ftopic .glist-meta, .forum-pop .ftopic .glist-meta { font-size: 10.5px; }
.fnav-list .gsec-body .ftopic-row, .forum-pop .gsec-body .ftopic-row { padding-left: 10px; }
.ftopic-star { font-size: 15px; width: 26px; }
/* Main forum blocks: arrows twice as big */
.fnav-list > .gsec > .gsec-head .gsec-car, .fnav-list > .gblock > .gsec-block .gsec-car { width: 30px; font-size: 36px; line-height: 0.8; margin: -4px 0; }
/* 📢 Hebahan Setempat */
.pill.nt-live { background: #e8f7ee; color: #146c35; border-color: #b6e3c6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.nt-live { background: #12351f; color: #8fe0ab; border-color: #1f5a34; } }
:root[data-theme="dark"] .pill.nt-live { background: #12351f; color: #8fe0ab; border-color: #1f5a34; }
.nt-row.nt-past { opacity: .7; }
.nt-alert { display: grid; gap: 8px; }
.nt-alert .invite-row select { flex: 1; min-width: 0; }
.nt-body { white-space: pre-line; max-width: 70ch; }
/* 🏠 Home */
.hm-stories { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; scrollbar-width: thin; }
.hm-story { flex: none; width: 96px; height: 140px; border-radius: 14px; border: 0; padding: 8px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; color: #fff; font: inherit; font-size: 12px; cursor: pointer; background: var(--accent-soft) center / cover no-repeat; position: relative; overflow: hidden; text-align: left; }
.hm-story::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .65), transparent 55%); }
.hm-story > * { position: relative; z-index: 1; }
.hm-story b { text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.hm-story-add { background: var(--card); color: var(--ink); border: 1px dashed var(--line); justify-content: center; align-items: center; text-align: center; }
.hm-story-add::after { display: none; }
.hm-story-add span { font-size: 26px; color: var(--accent); }
.hm-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
@media (max-width: 900px) { .hm-grid { grid-template-columns: minmax(0, 1fr); } }
.hm-feed { display: grid; gap: 14px; min-width: 0; }
.hm-side { display: grid; gap: 14px; position: sticky; top: 80px; }
@media (max-width: 900px) { .hm-side { position: static; } }
.hm-av { width: 38px; height: 38px; font-size: 14px; flex: none; }
.hm-av.sm { width: 28px; height: 28px; font-size: 11px; }
.hm-compose { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; }
.hm-compose-in { text-align: left; border: 0; border-radius: 12px; padding: 12px 14px; background: var(--paper); color: var(--muted); font: inherit; cursor: pointer; }
.hm-compose-row { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.hm-card { display: grid; gap: 10px; }
.hm-card.is-hidden { opacity: .6; }
.hm-who { display: flex; gap: 10px; align-items: center; }
.hm-who small { display: block; color: var(--muted); font-size: 12px; }
.hm-aud { font-size: 11px; }
.hm-body { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.hm-tag { justify-self: start; display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 13px; text-decoration: none; color: var(--ink); }
.hm-tag:hover { border-color: var(--accent); color: var(--accent); }
.hm-acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 8px; }
.hm-btn { border: 0; background: none; color: var(--muted); font: inherit; font-weight: 600; font-size: 14px; padding: 6px 10px; border-radius: 999px; cursor: pointer; }
.hm-btn:hover { background: var(--accent-soft); color: var(--ink); }
.hm-btn.on { color: var(--accent); }
.hm-more { margin-left: auto; font-size: 13px; color: var(--muted); }
.hm-comments { display: grid; gap: 8px; background: var(--paper); border-radius: 12px; padding: 10px 12px; }
.hm-cm { font-size: 14px; overflow-wrap: anywhere; }
.hm-mini { display: grid; gap: 8px; font-size: 14px; }
.hm-mini a:not(.linkish) { display: flex; gap: 8px; align-items: center; text-decoration: none; color: var(--ink); line-height: 1.3; }
.hm-mini a:not(.linkish):hover { color: var(--accent); }
.hm-mini .linkish { font-size: 13px; justify-self: start; }
.hm-card .mo-collage { margin: 0; }
/* 🤖 Ask a helper (public chat) */
.ask-bots { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 6px 2px 2px; font-size: 13px; }
.ask-bot { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.ask-bot:hover { border-color: var(--accent); color: var(--accent); }
.ask-note { margin-left: auto; font-size: 11px; }
@media (max-width: 640px) { .ask-note { display: none; } }

/* Dropdowns (account, menu, bell) live inside the coloured top bar: keep their text dark on any theme */
:root[data-theme] .site-head .nav .pop .pop-item, :root[data-theme] .site-head .nav .pop a:not(.btn) { color: var(--ink); opacity: 1; text-shadow: none; }
:root[data-theme] .site-head .nav .pop .pop-item.on { color: var(--accent); }

/* ---------- LamanKu: profile photos, profile form, section sharing ---------- */
.has-face { background: var(--line) !important; padding: 0; overflow: visible; }
.has-face img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.rank .avatar, .fr-row .rank .avatar { width: 30px; height: 30px; font-size: 12px; }
.acct-face { width: 24px; height: 24px; margin: -4px 2px -4px -6px; display: inline-block; border-radius: 50%; }
.acct-btn .acct-face img { width: 24px; height: 24px; }
.pcbadge { font-size: .85em; margin-left: 1px; }
.log-caret-btn { flex: none; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 14px 18px 14px 8px; opacity: .8; }
.sec-share { flex: none; font: inherit; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; white-space: nowrap; }
.sec-share:hover, .sec-share:focus-visible { border-color: var(--accent); }
.sec-share.sh-public { border-color: color-mix(in srgb, #2e9d5b 60%, var(--line)); }
.sec-share.sh-friends, .sec-share.sh-group, .sec-share.sh-family { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.sh-opts { display: grid; gap: 6px; }
.sh-opt { display: flex; gap: 12px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; cursor: pointer; }
.sh-opt small { display: block; color: var(--muted); font-size: 12px; }
.sh-opt.on { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.sh-ic { font-size: 20px; }
.sh-tick { margin-left: auto; font-weight: 800; color: var(--accent); min-width: 1em; text-align: right; }
.sh-opt[disabled] { opacity: .75; cursor: default; }
.pf-form { display: grid; gap: 12px; padding: 4px 0 6px; }
.pf-photo { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.pf-av { width: 84px; height: 84px; font-size: 28px; }
.pf-photo-btns { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; flex: 1 1 220px; }
.pf-photo-btns .note { flex-basis: 100%; margin: 0; }
.pf-status { margin: 0; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 8%, transparent); font-size: 14px; }
.pf-status.ok { background: color-mix(in srgb, #2e9d5b 12%, transparent); }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px 14px; }
.pf-grid .field { margin: 0; display: grid; gap: 4px; min-width: 0; align-content: start; align-self: start; }
.pf-grid .pf-wide { grid-column: 1 / -1; }
.pf-grid input, .pf-grid select, .pf-grid textarea { width: 100%; min-width: 0; }
.pf-grid .note { font-size: 12px; }
.pf-lockrow { display: flex; gap: 6px; }
.pf-lockrow input { flex: 1 1 auto; }
.pf-lock { flex: 0 0 auto; width: auto !important; font-size: 13px; }
@media (max-width: 560px) { .log-group-headrow { flex-wrap: wrap; } .log-group-headrow .log-group-head { flex: 1 1 calc(100% - 48px); } .log-caret-btn { order: 2; } .sec-share { order: 3; margin: -8px 0 12px 18px; } }
.pf-grid .pf-lockf { grid-column: span 2; }
@media (max-width: 760px) { .pf-grid .pf-lockf { grid-column: auto; } }

/* ---------- "Laman <name>" slide-in panel ---------- */
.laman-wrap { position: fixed; inset: 0; z-index: 80; }
.lp-back { position: absolute; inset: 0; background: rgba(10, 8, 20, .45); opacity: 0; transition: opacity .2s; }
.lp-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: var(--paper); color: var(--ink); box-shadow: -12px 0 40px rgba(0, 0, 0, .3); transform: translateX(100%); transition: transform .22s ease; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; }
.laman-wrap.in .lp-back { opacity: 1; }
.laman-wrap.in .lp-panel { transform: none; }
body.laman-open { overflow: hidden; }
.lp-head { display: flex; gap: 14px; align-items: center; padding: 20px 18px 14px; border-bottom: 1px solid var(--line); background: var(--card); position: sticky; top: 0; z-index: 1; }
.lp-av { width: 64px; height: 64px; font-size: 22px; }
.lp-who { flex: 1; min-width: 0; display: grid; gap: 2px; }
.lp-who .eyebrow { margin: 0; }
.lp-who h2 { margin: 0; font-size: 26px; line-height: 1.05; overflow-wrap: anywhere; }
.lp-x { position: static; flex: none; align-self: flex-start; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: 18px; display: grid; place-items: center; cursor: pointer; box-shadow: none; }
.lp-x:hover, .lp-x:focus-visible { border-color: var(--accent); }
.lp-body { padding: 14px 18px 28px; display: grid; gap: 14px; }
.lp-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lp-tools { margin: -6px 0 0; font-size: 13px; }
.lp-sec { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 8px; }
.lp-sec h3 { margin: 0; font-size: 16px; }
.lp-bio { margin: 0; white-space: pre-line; }
.lp-dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 14px; }
.lp-dl dt { color: var(--muted); }
.lp-dl dd { margin: 0; overflow-wrap: anywhere; }
.lp-socs { display: flex; gap: 6px; flex-wrap: wrap; }
.lp-soc { text-decoration: none; }
.lp-list { font-size: 14px; }
.lp-list ul { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 2px; }
.lp-fr { display: inline-flex; align-items: center; gap: 6px; }
.lp-private { margin: 6px 0; padding: 14px; border-radius: 12px; background: var(--card); border: 1px dashed var(--line); text-align: center; }
.hm-face-btn { background: none; border: 0; padding: 0; cursor: pointer; border-radius: 50%; }

/* ---------- Two-step sign-in ---------- */
.mfa-gate { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--paper) 92%, #000 8%); backdrop-filter: blur(6px); }
.mfa-box { position: relative; width: min(420px, 100%); display: grid; gap: 12px; }
.mfa-code { font-size: 28px; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; padding: 10px 12px; width: 100%; }
.mfa-qr { display: grid; place-items: center; padding: 10px; background: #fff; border-radius: 12px; justify-self: center; }
.mfa-qr img { display: block; width: 200px; height: 200px; }
.mfa-secret { display: block; margin-top: 6px; padding: 8px; border-radius: 8px; background: var(--line); word-break: break-all; font-size: 14px; letter-spacing: .08em; user-select: all; }
.mfa-steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.pill.mfa-on { font-size: 12px; vertical-align: middle; }
.settings-moved { margin: 0 0 4px; padding: 10px 14px; border-radius: 12px; border: 1px dashed var(--line); }
.pf-grid input, .pf-grid select, .pf-lockrow .pf-lock { height: 43px; box-sizing: border-box; }

/* Section boxes (LamanKu, Community, Groups, Owner tools): tinted header strip so header and content are easy to tell apart */
.log-group-headrow { background: color-mix(in srgb, var(--accent) 9%, var(--card)); transition: background .15s; }
.log-group-headrow:hover { background: color-mix(in srgb, var(--accent) 14%, var(--card)); }
.log-group-headrow .log-group-head:hover { background: none; }
.log-group-body { padding-top: 14px; }

/* Page Chat box (events, campsites, food, arenas): same tinted, clickable header as the section boxes */
.chat-fold { padding: 14px 18px; gap: 10px 14px; flex-wrap: wrap; border-radius: 14px; background: color-mix(in srgb, var(--accent) 9%, var(--card)); transition: background .15s; }
.chat-fold:hover { background: color-mix(in srgb, var(--accent) 14%, var(--card)); border-color: var(--line); }
.chat-fold .log-sum { flex: 1 1 auto; font-size: 13px; }
.chatbox.chat-wide { padding-top: 0; border-radius: 14px; overflow: hidden; }
.chat-head-tint { margin: 0 -18px; padding: 10px 18px; background: color-mix(in srgb, var(--accent) 9%, var(--card)); border-bottom: 1px solid var(--line); cursor: pointer; transition: background .15s; }
.chat-head-tint:hover { background: color-mix(in srgb, var(--accent) 14%, var(--card)); }
.chat-head-tint .chat-fold-btn { flex: 1; min-width: 0; gap: 10px 14px; flex-wrap: wrap; text-align: left; }
.chat-head-tint .chat-fold-btn .log-sum { font-size: 13px; }
.chat-head-tint .chat-fold-btn:hover .log-group-title { color: inherit; }
.chat-head-r { display: inline-flex; align-items: center; gap: 12px; flex: none; }
@media (max-width: 560px) { .chat-head-tint .log-sum { display: none; } }
.chatbox.chat-wide .chat { overscroll-behavior: auto; } /* page chat boxes: at the end of the messages, keep scrolling the page */

/* Feedback page: wide "Send a message" (3/4 of the page), "Your messages" below at full width, opens and closes */
.fb-layout { display: grid; gap: 18px; }
.fb-send { width: 75%; }
.fb-mine.chatbox { gap: 12px; }
.fb-mine .fb-list { padding-bottom: 4px; }
@media (max-width: 760px) { .fb-send { width: auto; } }

/* ---------- 🎁 Biasiswa & Tajaan ---------- */
.tj-cats { flex-wrap: wrap; }
.tj-row .row-main { min-width: 0; }
.tj-row .row-title { font-weight: 700; }
.tj-cat { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 10%, var(--card)); white-space: nowrap; }
.pill.tj-open { background: color-mix(in srgb, #2e9d5b 18%, var(--card)); color: inherit; border-color: color-mix(in srgb, #2e9d5b 50%, var(--line)); }
.pill.tj-soon { background: color-mix(in srgb, #e0a800 18%, var(--card)); color: inherit; border-color: color-mix(in srgb, #e0a800 50%, var(--line)); }
.pill.tj-closed, .pill.tj-usual { background: var(--card); color: var(--muted); }
.tj-row.tj-open { box-shadow: inset 3px 0 0 #2e9d5b; }
.tj-row.tj-soon { box-shadow: inset 3px 0 0 #e0a800; }
.tj-check { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; border: 1px dashed var(--line); }
.tj-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px 14px; }
.tj-form-grid .field { margin: 0; display: grid; gap: 4px; min-width: 0; align-content: start; }
.tj-form-grid .tj-wide { grid-column: 1 / -1; }
.tj-form-grid fieldset { border: 0; padding: 0; }
.tj-form-grid legend { font-weight: 600; margin-bottom: 4px; }
.tj-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.tj-checks .check { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; }
.tj-promo { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; margin: 0 0 18px; background: color-mix(in srgb, var(--accent) 8%, var(--card)); }
.tj-promo:hover { background: color-mix(in srgb, var(--accent) 14%, var(--card)); }
.tj-promo > span:nth-child(2) { flex: 1; display: grid; gap: 2px; }
.tj-promo-ic { font-size: 28px; }
.ledger .row.tj-row { display: flex; align-items: center; gap: 12px; grid-template-columns: none; }
.tj-row .row-main { flex: 1 1 auto; display: grid; gap: 6px; }
.tj-row .row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.tj-row .row-actions { flex: none; }
.tj-info { margin: 6px 0; }
@media (max-width: 560px) { .ledger .row.tj-row { flex-wrap: wrap; } .tj-row .row-actions { width: 100%; } }

/* ---------- 📅 Calendar (LamanKu) ---------- */
.cal { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.cal-main { min-width: 0; }
.cal-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.cal-title { margin: 0 4px; font-family: var(--font-display); font-weight: 800; font-size: 20px; text-transform: uppercase; letter-spacing: .02em; min-width: 11rem; text-align: center; }
.cal-sp { flex: 1; }
.cal-seg { margin: 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); }
.cal-dow { padding: 6px 6px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; background: color-mix(in srgb, var(--accent) 7%, var(--card)); border-bottom: 1px solid var(--line); }
.cal-d { min-height: 84px; padding: 6px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; align-items: stretch; gap: 3px; cursor: pointer; background: var(--card); color: var(--ink); font: inherit; text-align: left; min-width: 0; }
.cal-d:nth-child(7n) { border-right: 0; }
.cal-d:hover { background: color-mix(in srgb, var(--accent) 5%, var(--card)); }
.cal-d.out { color: var(--muted); background: color-mix(in srgb, var(--line) 28%, var(--card)); }
.cal-grid { user-select: none; -webkit-user-select: none; }
.cal-d.rng { background: color-mix(in srgb, var(--accent) 18%, var(--card)); box-shadow: inset 0 0 0 1px var(--accent); }
.cal-d.sel { box-shadow: inset 0 0 0 2px var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--card)); }
.cal-n { font-size: 13px; font-weight: 700; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.cal-d.today .cal-n { background: var(--accent); color: var(--on-accent, #fff); }
.cal-e { font-size: 11.5px; line-height: 1.25; padding: 2px 5px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: color-mix(in srgb, var(--cal-c) 18%, var(--card)); color: color-mix(in srgb, var(--cal-c) 70%, var(--ink)); }
.cal-more { font-size: 11px; color: var(--muted); }
.cal-dots { display: none; gap: 3px; flex-wrap: wrap; }
.cal-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--cal-c); }
.cal-k-fam { --cal-c: #7a8599; }
.cal-k-event { --cal-c: #2fae63; } .cal-k-movie { --cal-c: #8b6cf0; } .cal-k-tajaan { --cal-c: #e05680; } .cal-k-plan { --cal-c: #e8b33a; } .cal-k-gplan { --cal-c: #1fa5a5; }
.cal-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 10px; }
.cal-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; background: var(--cal-c); }
.cal-side { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 12px; background: var(--card); min-width: 0; }
.cal-side h4 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 20px; text-transform: uppercase; }
.cal-list { display: grid; }
.cal-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.cal-item .row-main { flex: 1; min-width: 0; }
.cal-t { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.cal-t a { text-decoration: none; }
.cal-t a:hover { color: var(--accent); }
.cal-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.cal-item .row-actions { display: flex; align-items: center; gap: 4px; }
.cal-stripe { width: 4px; align-self: stretch; border-radius: 4px; background: var(--cal-c); flex: none; margin: 0; }
.cal-when { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.cal-ic { font-size: 14px; }
.cal-year { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.cal-ym { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; display: grid; gap: 6px; }
.cal-ym:hover { background: color-mix(in srgb, var(--accent) 5%, var(--card)); }
.cal-ym b { font-size: 13px; text-transform: uppercase; }
.cal-ym.cur { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-ym .cal-dots { display: flex; }
.plan-form { display: grid; gap: 10px; border: 1px dashed var(--line); border-radius: 10px; padding: 12px; }
.plan-form h3 { margin: 0; font-size: 15px; }
.plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
.plan-grid { align-items: start; }
.plan-grid .field { margin: 0; min-width: 0; }
.plan-grid .field input[type="date"], .plan-grid .field input[type="time"] { width: 100%; box-sizing: border-box; min-width: 0; max-width: 100%; min-height: 42px; padding-left: 8px; padding-right: 8px; font-size: 14px; }
.plan-hint { margin: -2px 0 0; }
.plan-wide { grid-column: 1 / -1; }
.plan-remind { align-self: end; padding-bottom: 8px; }
.plan-friends { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.plan-modal { width: min(100%, 520px); }
.cal.cal-narrow, .cal.cal-narrow .cal-main { grid-template-columns: 1fr; }
.cal-narrow .cal-d { min-height: 44px; padding: 4px; align-items: center; }
.cal-narrow .cal-e, .cal-narrow .cal-more { display: none; }
.cal-narrow .cal-dots { display: flex; justify-content: center; }
.cal-narrow .cal-title { min-width: 0; font-size: 17px; }
.cal-narrow .cal-year { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) {
  .cal { grid-template-columns: 1fr; }
  .cal-d { min-height: 44px; padding: 4px; align-items: center; }
  .cal-e, .cal-more { display: none; }
  .cal-dots { display: flex; justify-content: center; }
  .cal-title { min-width: 0; font-size: 17px; }
  .cal-year { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .plan-grid { gap: 8px; }
}
@media (max-width: 520px) { .plan-grid .field input[type="date"], .plan-grid .field input[type="time"] { font-size: 13px; padding-left: 6px; padding-right: 6px; } }

.pl-pick { width: 100%; box-sizing: border-box; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.pl-pick:hover, .pl-pick:focus-visible { border-color: var(--accent); }
.pl-pick i { font-style: normal; }
.rp { border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: var(--card); display: grid; gap: 6px; }
.rp[hidden] { display: none; }
.rp-bar { display: flex; align-items: center; justify-content: space-between; }
.rp-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; user-select: none; -webkit-user-select: none; }
.rp-dow { text-align: center; font-size: 11px; color: var(--muted); padding: 2px 0; }
.rp-d { height: 36px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; padding: 0; }
.rp-d:hover { background: color-mix(in srgb, var(--accent) 10%, var(--card)); }
.rp-d.out { color: var(--muted); }
.rp-d.today { box-shadow: inset 0 0 0 1px var(--muted); }
.rp-d.in { background: color-mix(in srgb, var(--accent) 20%, var(--card)); border-radius: 0; }
.rp-d.edge { background: var(--accent); color: var(--on-accent, #fff); border-radius: 6px; }
.rp-act { display: flex; justify-content: flex-end; }

/* Separate days + repeat */
.plan-form [hidden] { display: none !important; }
.pl-mode { display: inline-flex; width: fit-content; max-width: 100%; }
.pl-rep { border: 1px solid var(--line, #d9d2c3); border-radius: 10px; padding: 8px 10px; margin: 0; min-width: 0; }
.pl-rep legend { padding: 0 6px; font-weight: 600; }
.rep-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0; }
.rep-row select, .rep-row input[type="date"], .rep-row input[type="number"] { min-width: 0; max-width: 100%; }
.rep-row input[type="number"] { width: 4.5em; }
.rep-n, .rep-c { display: inline-flex; gap: 6px; align-items: center; }
.rep-sum { display: block; }
.rep-n { order: -1; }

/* Sign in / register box */
.si-form { gap: 12px; }
.si-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.si-rem { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.si-rem input { width: 18px; height: 18px; accent-color: var(--accent); }
.si-links { font-size: 13px; }
.si-links .linkish { font-size: inherit; }
.si-msg:empty { display: none; }
.si-msg.err { color: var(--bad, #b3261e); }

/* Inside the slide-in panel on a Rasa Negeri article: only the chat or the moments are shown. */
html.embed .site-head, html.embed .demo-bar, html.embed .side-nav, html.embed .side-ad, html.embed .site-foot { display: none !important; }
html.embed #main { padding: 56px 16px 40px; max-width: none; margin: 0; }
@media (max-width: 760px) { html.embed #main { padding: 54px 16px 48px; } }
html.embed, html.embed body { overscroll-behavior: contain; }

.chat-back { position: fixed; left: 16px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 45; padding: 10px 18px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--paper) 30%, transparent); background: var(--accent); color: var(--on-accent); font: 600 14px inherit; font-family: inherit; cursor: pointer; box-shadow: var(--shadow); }
html.embed .chat-back { display: none; }

/* Chat and moments shown inline in the middle of an article page (an iframe that reports its own height). */
html.embed-inline body { background: transparent; }
html.embed-inline, html.embed-inline body { overflow: hidden; }
html.embed-inline #main { padding: 0; min-height: 0; }
html.embed-inline .modal-back, html.embed-inline .att-view, html.embed-inline .photo-viewer { inset: auto; left: 0; right: 0; top: var(--vt, 0px); height: var(--vh, 100%); }
html.embed-inline .toast { bottom: auto; top: calc(var(--vt, 0px) + var(--vh, 600px) - 64px); }
/* The article text shown at the top of the slide-in version. */
.art-doc { display: grid; gap: 14px; margin: 4px 0 22px; max-width: 44rem; }
.art-doc h2 { font-family: var(--font-display); text-transform: uppercase; font-size: 24px; margin: 14px 0 0; }
.art-doc p, .art-doc li { line-height: 1.65; font-size: 16px; max-width: 65ch; margin: 0; }
.art-doc .lede { font-size: 18px; } .art-doc .maplink { font-weight: 600; }
.art-doc figure { margin: 6px 0; display: grid; gap: 6px; justify-items: start; } .art-doc figure img { max-width: 100%; max-height: 480px; width: auto; height: auto; border-radius: 12px; }
.art-doc figcaption { font-size: 14px; opacity: .75; } .art-doc .eyebrow { display: none; }
html.embed-inline, html.embed-inline body, html.embed-inline .chat { overscroll-behavior: auto; } /* let the article page keep scrolling when the mouse is over the boxes */
html.embed-inline { scrollbar-gutter: auto; } /* the iframe never scrolls itself, so no space is kept for a scrollbar: the boxes are as wide as the page above them */

.toast { z-index: 400; }
.btn.copied { background: #2e7d4f; border-color: #2e7d4f; color: #fff; }

/* Phones: arrows, page dots and an edge fade on sideways rows */
.sw-dots { display: none; justify-content: center; align-items: center; gap: 5px; margin-top: 4px; min-height: 8px; }
.sw-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); transition: width .2s, background .2s; }
.sw-dots i.on { width: 16px; border-radius: 3px; background: var(--ink); }
.sw-dots.count { font-size: 12px; color: var(--muted, #6b6b78); }
@media (hover: none), (max-width: 760px) {
  .sw-dots { display: flex; }
  .ev-swipe.can-prev .sw-nav.prev, .ev-swipe.can-next .sw-nav.next { display: block; }
  .sw-nav { width: 32px; height: 32px; font-size: 22px; padding: 0 0 2px; top: calc(50% - 10px); box-shadow: 0 1px 6px rgba(0, 0, 0, .25); }
  .sw-nav.prev { left: 2px; } .sw-nav.next { right: 2px; }
}

.strip-wrap { position: relative; min-width: 0; }
@media (hover: none), (max-width: 760px) {
  .strip-wrap.can-prev .sw-nav.prev, .strip-wrap.can-next .sw-nav.next { display: block; }
  .strip-wrap > .facts.strip { padding-bottom: 0; scrollbar-width: none; }
  .strip-wrap > .facts.strip::-webkit-scrollbar { display: none; }
}

/* Event, campsite, food, arena and school pages: Your plan first, then the vote box, then the map, Cover Photos last (CSS order only) */
.ev-swipe:not(.cs-swipe):not(.mo-swipe) > .ev-row > .ev-plan { order: 1; }
.ev-swipe:not(.cs-swipe):not(.mo-swipe) > .ev-row > .vote-panel { order: 2; }
.ev-swipe:not(.cs-swipe):not(.mo-swipe) > .ev-row > .ev-map-box { order: 3; }
.ev-swipe:not(.cs-swipe):not(.mo-swipe) > .ev-row > .ev-photos { order: 4; }
.ev-swipe:not(.cs-swipe):not(.mo-swipe) > .ev-row > .book-panel { order: 2; }
