/* 诺村 forum (ngn.best/forum). Light editorial style; colours are tokens so a
   dark theme only has to redefine them. */
:root {
  --f-bg: #F7F6F2;
  --f-card: #FFFFFF;
  --f-ink: #15171C;
  --f-sub: #3A3D44;
  --f-soft: #6A6862;
  --f-mute: #9A988F;
  --f-line: #ECEAE3;
  --f-line-2: #E2E0D8;
  --f-inv: #15171C;
  --f-inv-ink: #FFFFFF;
  --f-amber: #F3B562;
  --f-top-bg: rgba(247, 246, 242, .88);
  --f-chip: #EFEEE9;
  --f-body: #2A2D33;
  --f-trade-ink: #134C3A;
  --f-ride: #C9822B; --f-ride-ink: #9A5B12; --f-ride-t: #F8ECDB; --f-ride-s: #FBF6EE;
  --f-trade: #1E6B52; --f-trade-t: #E3F1EA;
  --f-rent: #2F5DA8; --f-rent-t: #E5ECF8;
  --f-qa: #6B4BA8; --f-qa-t: #EEE9F8; --f-qa-s: #F5F2FB;
  --f-event: #C2412D; --f-event-t: #F9E5E0;
  --f-serif: "Noto Serif SC", "Songti SC", serif;
  --f-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --f-num: "Archivo", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.forum { margin: 0; background: var(--f-bg); color: var(--f-ink); font-family: var(--f-sans); font-size: 15px; line-height: 1.6; }
.forum a { color: inherit; text-decoration: none; }
.forum [hidden] { display: none !important; }
.forum button { font-family: inherit; }
.forum img { max-width: 100%; display: block; }
.f-serif { font-family: var(--f-serif); }
.f-num { font-family: var(--f-num); }
.f-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.forum :focus-visible { outline: 2px solid var(--f-ride); outline-offset: 2px; }

/* Header */
.f-top { position: sticky; top: 0; z-index: 20; background: var(--f-top-bg); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--f-line); }
.f-bar { max-width: 1240px; margin: 0 auto; height: 64px; padding: 0 24px; display: flex; align-items: center; gap: 16px; }
.f-logo { display: flex; align-items: baseline; gap: 8px; flex: none; }
.f-logo b { font-family: var(--f-serif); font-size: 26px; font-weight: 700; letter-spacing: .02em; }
.f-logo span { font-family: var(--f-num); font-size: 10px; letter-spacing: .14em; color: #8C8A82; }
.f-search { flex: 1; max-width: 460px; margin-left: 20px; position: relative; }
.f-search input { width: 100%; height: 40px; border: 0; border-radius: 999px; background: var(--f-card); box-shadow: 0 0 0 1px var(--f-line); padding: 0 16px 0 40px; font: inherit; font-size: 14px; color: var(--f-ink); }
.f-search svg { position: absolute; left: 14px; top: 11px; color: var(--f-mute); }
.f-top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.f-link { font-size: 14px; color: var(--f-soft); padding: 8px 10px; }
.f-btn { border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 999px; padding: 9px 18px; font-size: 14px; font-weight: 500; line-height: 1.2; min-height: 38px; }
.forum .f-btn--ink { background: var(--f-inv); color: var(--f-inv-ink); }
.forum .f-btn--amber { background: var(--f-amber); color: #1A1206; }
.forum .f-btn--line { background: transparent; color: var(--f-ink); box-shadow: inset 0 0 0 1px var(--f-line-2); }
.f-btn--on { background: var(--f-trade-t); color: var(--f-trade); box-shadow: inset 0 0 0 1px var(--f-trade); }
.f-btn[disabled] { opacity: .5; cursor: default; }
.f-avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden; color: #FFF; font-size: 13px; font-weight: 500; background: var(--f-trade); }
.f-avatar img { width: 100%; height: 100%; object-fit: cover; }
.f-avatar--sm { width: 28px; height: 28px; font-size: 12px; }

/* Layout */
.f-shell { max-width: 1240px; margin: 0 auto; padding: 24px; display: grid; grid-template-columns: 200px minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.f-shell--detail { grid-template-columns: minmax(0, 1fr) 300px; max-width: 1080px; }
.f-shell--narrow { grid-template-columns: minmax(0, 760px); justify-content: center; }
.f-rail { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 22px; }
.f-rail h3 { margin: 0 0 8px; font-size: 12px; letter-spacing: .08em; color: var(--f-mute); font-weight: 500; }
.f-nav { display: flex; flex-direction: column; gap: 2px; }
.f-nav button, .f-nav a { all: unset; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; font-size: 14px; color: var(--f-sub); }
.f-nav button[aria-pressed="true"], .f-nav a[aria-current="page"] { background: var(--f-card); color: var(--f-ink); font-weight: 600; box-shadow: 0 0 0 1px var(--f-line); }
.f-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.f-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.f-chip { all: unset; cursor: pointer; font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--f-chip); color: var(--f-soft); white-space: nowrap; }
.f-chip[aria-pressed="true"] { background: var(--f-inv); color: var(--f-inv-ink); }
.f-newtag { display: flex; align-items: center; gap: 6px; margin-top: 10px; max-width: 320px; padding: 4px 4px 4px 12px; border-radius: 999px; background: var(--f-chip); color: var(--f-soft); font-size: 13px; }
.f-newtag input { all: unset; flex: 1; min-width: 0; font-size: 13px; color: var(--f-ink); }
.f-newtag .f-chip { background: var(--f-card); }

/* Feed */
.f-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.f-composer { display: flex; align-items: center; gap: 12px; background: var(--f-card); border-radius: 20px; padding: 14px 16px; box-shadow: 0 0 0 1px var(--f-line); }
.f-composer span { flex: 1; color: var(--f-mute); font-size: 14px; }
.f-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--f-line); padding: 0 4px; }
.f-tab { all: unset; cursor: pointer; padding: 10px 0; font-size: 15px; color: var(--f-mute); position: relative; }
.f-tab[aria-selected="true"] { color: var(--f-ink); font-weight: 700; }
.f-tab[aria-selected="true"]::after { content: ""; position: absolute; left: 50%; bottom: -1px; width: 18px; height: 3px; border-radius: 2px; background: var(--f-ride); transform: translateX(-50%); }
.f-cats-m { display: none; }
.f-feed { display: flex; flex-direction: column; gap: 12px; }
.f-card { background: var(--f-card); border-radius: 22px; padding: 18px 20px; box-shadow: 0 0 0 1px var(--f-line); display: flex; flex-direction: column; gap: 12px; }
.f-card-head { display: flex; align-items: center; gap: 10px; }
.f-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.f-who b { font-size: 13px; font-weight: 500; }
.f-who small { font-size: 12px; color: var(--f-mute); }
.f-cat { font-size: 11px; border-radius: 999px; padding: 2px 10px; font-weight: 500; white-space: nowrap; }
.f-cat--ride { background: var(--f-ride-t); color: var(--f-ride-ink); }
.f-cat--trade { background: var(--f-trade-t); color: var(--f-trade); }
.f-cat--rent { background: var(--f-rent-t); color: var(--f-rent); }
.f-cat--qa { background: var(--f-qa-t); color: var(--f-qa); }
.f-cat--event { background: var(--f-event-t); color: var(--f-event); }
.f-pin { font-size: 11px; color: var(--f-ride-ink); font-weight: 600; }
.f-title { font-family: var(--f-serif); font-size: 19px; font-weight: 700; line-height: 1.45; margin: 0; word-break: break-word; }
.f-excerpt { margin: 0; font-size: 14px; color: var(--f-sub); line-height: 1.7; white-space: pre-line; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.f-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.f-tag { font-size: 12px; color: var(--f-soft); }
.f-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-width: 420px; }
.f-thumbs figure { margin: 0; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--f-chip); position: relative; }
.f-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.f-thumbs figure span { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(21,23,28,.45); color: #FFF; font-family: var(--f-num); font-weight: 600; }
.f-acts { display: flex; align-items: center; gap: 18px; }
.forum .f-act { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--f-mute); font-family: var(--f-num); padding: 2px 0; }
.f-act[aria-pressed="true"] { color: var(--f-event); }
.f-act--mark[aria-pressed="true"] { color: var(--f-ride); }
.f-act[data-follow][aria-pressed="true"] { color: var(--f-ride); }
.f-btn[data-follow][aria-pressed="true"] { background: transparent; color: var(--f-ink); box-shadow: inset 0 0 0 1px var(--f-line); }
.f-acts .f-views { margin-left: auto; font-size: 12px; color: var(--f-mute); font-family: var(--f-num); }

/* Category blocks */
.f-ticket { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; background: var(--f-ride-s); border-radius: 16px; padding: 14px 18px; }
.f-ticket small { display: block; font-size: 10px; letter-spacing: .14em; color: #9A7A4E; }
.f-ticket b { font-family: var(--f-num); font-size: 28px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.f-ticket-mid { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0 14px; }
.f-ticket-mid span { font-family: var(--f-num); font-size: 12px; color: #9A7A4E; }
.f-ticket-mid i { width: 72px; border-top: 1.5px dashed #D9C7A8; }
.f-ticket-r { text-align: right; }
.f-seats { display: flex; gap: 3px; }
.f-seat { width: 11px; height: 14px; border-radius: 3px; border: 1.5px solid #D9C7A8; }
.f-seat.is-on { background: var(--f-ride); border-color: var(--f-ride); }
.f-rowline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.f-rowline .f-grow { flex: 1; font-size: 13px; color: var(--f-soft); }
.f-price { font-family: var(--f-num); font-weight: 600; }
.f-tile { display: flex; align-items: center; gap: 14px; }
.f-tile-box { width: 64px; flex: none; text-align: center; border-radius: 14px; padding: 6px 0; }
.f-tile-box small { display: block; font-family: var(--f-num); font-size: 10px; letter-spacing: .14em; font-weight: 600; }
.f-tile-box b { display: block; font-family: var(--f-num); font-size: 24px; font-weight: 600; line-height: 1.15; }
.f-tile-box--event { background: var(--f-event-t); color: var(--f-event); }
.f-tile-box--event b { color: var(--f-ink); }
.f-tile-box--trade { background: var(--f-trade-t); color: var(--f-trade-ink); padding: 14px 0; }
.f-tile-box--trade b { font-size: 20px; }
.f-sold { font-size: 11px; color: #FFF; background: var(--f-mute); border-radius: 4px; padding: 1px 6px; }
.f-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.f-stat { background: var(--f-rent-t); border-radius: 14px; padding: 10px 12px; }
.f-stat small { display: block; font-size: 11px; color: var(--f-mute); }
.f-stat b { font-size: 15px; font-weight: 600; }

/* Right rail */
.f-panel { background: var(--f-card); border-radius: 22px; padding: 18px; box-shadow: 0 0 0 1px var(--f-line); }
.f-panel h2 { margin: 0 0 12px; font-family: var(--f-serif); font-size: 17px; }
.f-hot { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.f-hot li { display: flex; gap: 12px; align-items: baseline; }
.f-hot li b { font-family: var(--f-serif); font-size: 20px; color: var(--f-ride); width: 16px; flex: none; }
.f-hot li a { font-size: 14px; line-height: 1.5; }
.f-hot li a:hover { text-decoration: underline; }
.f-dark { background: #15171C; color: #F2F1EC; border-radius: 22px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.f-dark h2 { margin: 0; font-family: var(--f-serif); font-size: 20px; }
.f-dark p { margin: 0; font-size: 13px; color: #B9B7AF; }
.forum .f-dark .f-btn--line { color: #F2F1EC; box-shadow: inset 0 0 0 1px #4A4D55; }
.f-foot { font-size: 12px; color: var(--f-mute); line-height: 1.8; }

/* States */
.f-empty { text-align: center; padding: 48px 16px; color: var(--f-mute); font-size: 14px; }
.f-empty b { display: block; font-family: var(--f-serif); font-size: 18px; color: var(--f-ink); margin-bottom: 4px; }
.f-skel { height: 160px; border-radius: 22px; background: linear-gradient(90deg, var(--f-chip) 0%, var(--f-card) 50%, var(--f-chip) 100%); background-size: 200% 100%; animation: f-shine 1.2s infinite linear; }
@keyframes f-shine { to { background-position: -200% 0; } }
.f-more { align-self: center; }
.f-toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--f-inv); color: var(--f-inv-ink); padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 60; box-shadow: 0 12px 30px -12px rgba(0,0,0,.4); }

/* Detail */
.f-article { background: var(--f-card); border-radius: 24px; padding: 28px 32px; box-shadow: 0 0 0 1px var(--f-line); display: flex; flex-direction: column; gap: 16px; }
.f-article h1 { margin: 0; font-family: var(--f-serif); font-size: 28px; line-height: 1.4; word-break: break-word; }
.f-body { font-size: 16px; line-height: 1.85; color: var(--f-body); white-space: pre-line; word-break: break-word; }
.f-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.f-gallery--one { grid-template-columns: minmax(0, 520px); }
.f-gallery button { all: unset; cursor: zoom-in; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--f-chip); }
.f-gallery--one button { aspect-ratio: auto; max-height: 520px; }
.f-gallery img { width: 100%; height: 100%; object-fit: cover; }
.f-cells { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.f-cell { background: var(--f-bg); border-radius: 14px; padding: 10px 14px; }
.f-cell small { display: block; font-size: 11px; color: var(--f-mute); }
.f-cell b { font-size: 16px; font-weight: 600; }
.f-pending { background: var(--f-ride-t); color: var(--f-ride-ink); border-radius: 14px; padding: 10px 14px; font-size: 13px; }
.f-replies { display: flex; flex-direction: column; gap: 0; }
.f-replies-head { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 0 4px; }
.f-replies-head b { font-family: var(--f-serif); font-size: 18px; }
.f-reply { display: flex; gap: 12px; padding: 16px 0; border-top: 1px solid var(--f-line); }
.f-reply:first-child { border-top: 0; }
.f-reply-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.f-reply-name { font-size: 13px; font-weight: 500; }
.f-reply-name small { color: var(--f-mute); font-weight: 400; margin-left: 6px; }
.f-badge { font-size: 10px; border-radius: 4px; padding: 0 5px; margin-left: 4px; vertical-align: 1px; }
.f-badge--op { color: var(--f-ride-ink); background: var(--f-ride-t); }
.f-official { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 4px; background: var(--f-inv); color: var(--f-inv-ink); font-size: 10px; font-weight: 600; line-height: 16px; vertical-align: 1px; }
.f-reply-text { font-size: 15px; line-height: 1.7; white-space: pre-line; word-break: break-word; }
.f-subs { margin-top: 6px; border-left: 2px solid var(--f-line); padding-left: 14px; display: flex; flex-direction: column; gap: 10px; }
.f-sub { font-size: 14px; line-height: 1.65; word-break: break-word; }
.f-sub b { font-weight: 500; }
.f-sub-acts { display: inline-flex; gap: 12px; margin-left: 8px; }
.f-mini { all: unset; cursor: pointer; font-size: 12px; color: var(--f-mute); }
.f-mini[aria-pressed="true"] { color: var(--f-event); }
.f-write { background: var(--f-card); border-radius: 20px; padding: 14px; box-shadow: 0 0 0 1px var(--f-line); display: flex; flex-direction: column; gap: 10px; }
.f-write textarea { width: 100%; min-height: 84px; resize: vertical; border: 0; outline: 0; font: inherit; font-size: 15px; color: var(--f-ink); background: transparent; }
.f-write-bar { display: flex; align-items: center; gap: 8px; }
.f-write-bar .f-grow { flex: 1; font-size: 12px; color: var(--f-mute); }
.f-replying { font-size: 12px; color: var(--f-rent); display: flex; gap: 8px; align-items: center; }
.f-icon-btn { all: unset; cursor: pointer; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--f-sub); }
.f-icon-btn:hover { background: var(--f-bg); }
.f-lightbox { position: fixed; inset: 0; background: rgba(10, 10, 12, .92); z-index: 80; display: grid; place-items: center; padding: 24px; }
.f-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.f-lightbox button { position: absolute; top: calc(16px + env(safe-area-inset-top)); right: 16px; border: 0; background: rgba(255,255,255,.14); color: #FFF; width: 40px; height: 40px; border-radius: 50%; font-size: 20px; cursor: pointer; }
.f-lightbox .f-lb-nav { top: 50%; transform: translateY(-50%); width: 44px; height: 44px; font-size: 28px; line-height: 1; }
.f-lightbox .f-lb-prev { left: 12px; right: auto; }
.f-lightbox .f-lb-next { right: 12px; }
.f-lb-count { position: absolute; bottom: calc(20px + env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; color: rgba(255,255,255,.8); font: 500 13px var(--f-num); }
.f-lightbox { touch-action: none; user-select: none; -webkit-user-select: none; overflow: hidden; }
.f-lightbox img { transform-origin: center center; will-change: transform; cursor: zoom-in; -webkit-user-drag: none; }

/* Compose */
.f-form { background: var(--f-card); border-radius: 24px; padding: 24px; box-shadow: 0 0 0 1px var(--f-line); display: flex; flex-direction: column; gap: 18px; }
.f-form h1 { margin: 0; font-family: var(--f-serif); font-size: 24px; }
.f-picks { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.f-pick { all: unset; cursor: pointer; border-radius: 16px; padding: 12px 8px; text-align: center; box-shadow: inset 0 0 0 1px var(--f-line-2); display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; }
.f-pick small { font-size: 11px; color: var(--f-mute); font-weight: 400; }
.f-pick[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--f-ink); background: var(--f-bg); }
.f-field { display: flex; flex-direction: column; gap: 6px; }
.f-field label, .f-field .f-label { font-size: 13px; color: var(--f-soft); font-weight: 500; }
.f-input { width: 100%; border: 0; border-radius: 12px; background: var(--f-bg); padding: 11px 14px; font: inherit; font-size: 15px; color: var(--f-ink); box-shadow: inset 0 0 0 1px transparent; }
.f-input:focus { outline: 0; box-shadow: inset 0 0 0 1.5px var(--f-ink); }
.f-input--title { font-family: var(--f-serif); font-size: 20px; font-weight: 700; }
textarea.f-input { min-height: 180px; resize: vertical; line-height: 1.75; }
.f-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.f-seg { display: inline-flex; align-self: flex-start; background: var(--f-bg); border-radius: 12px; padding: 3px; }
.f-seg button { all: unset; cursor: pointer; padding: 8px 14px; border-radius: 10px; font-size: 14px; color: var(--f-soft); }
.f-seg button[aria-pressed="true"] { background: var(--f-card); color: var(--f-ink); font-weight: 600; box-shadow: 0 1px 3px rgba(20,20,20,.08); }
.f-check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.f-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.f-photo { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--f-chip); }
.f-photo img { width: 100%; height: 100%; object-fit: cover; }
.f-photo.is-busy::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.55); }
.f-photo .f-x { position: absolute; top: 5px; right: 5px; border: 0; width: 24px; height: 24px; border-radius: 50%; background: rgba(21,23,28,.72); color: #FFF; cursor: pointer; font-size: 14px; line-height: 1; z-index: 1; }
.f-photo .f-cover { position: absolute; left: 6px; bottom: 6px; font-size: 10px; color: #FFF; background: rgba(21,23,28,.72); border-radius: 4px; padding: 1px 5px; z-index: 1; }
.f-add { all: unset; cursor: pointer; aspect-ratio: 1; border-radius: 14px; border: 1.5px dashed #CFCCC2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--f-soft); font-size: 12px; }
.f-hint { font-size: 12px; color: var(--f-mute); }
.f-error { color: var(--f-event); font-size: 13px; min-height: 1em; }
.f-submit { display: flex; justify-content: flex-end; gap: 10px; }

/* Mobile */
.f-tabbar { display: none; }
@media (max-width: 1080px) {
  .f-shell { grid-template-columns: minmax(0, 1fr) 280px; }
  .f-shell > .f-rail--left { display: none; }
  .f-cats-m { display: flex; }
}
@media (max-width: 760px) {
  body.forum { padding-bottom: 96px; }
  .f-bar { padding: 0 16px; height: 58px; gap: 10px; }
  .f-logo b { font-size: 24px; }
  .f-search { display: none; }
  .f-top-right .f-link, .f-top-right .f-btn { display: none; }
  .f-shell, .f-shell--detail { grid-template-columns: minmax(0, 1fr); padding: 12px 16px; gap: 16px; }
  .f-shell > .f-rail--right { position: static; }
  .f-shell--home > .f-rail--right { display: none; }
  .f-composer { display: none; }
  .f-msearch { display: block !important; }
  .f-cats-m { overflow-x: auto; flex-wrap: nowrap; gap: 8px; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
  .f-cats-m .f-chip { padding: 7px 13px; font-size: 13px; background: var(--f-card); box-shadow: 0 0 0 1px var(--f-line); display: inline-flex; align-items: center; gap: 6px; }
  .f-cats-m .f-chip[aria-pressed="true"] { background: var(--f-inv); color: var(--f-inv-ink); box-shadow: none; }
  .f-card { padding: 16px; border-radius: 20px; }
  .f-title { font-size: 17px; }
  .f-ticket b { font-size: 22px; }
  .f-ticket-mid i { width: 44px; }
  .f-article { padding: 20px 18px; border-radius: 20px; }
  .f-article h1 { font-size: 22px; }
  .f-body { font-size: 15px; }
  .f-picks { grid-template-columns: repeat(5, minmax(64px, 1fr)); overflow-x: auto; }
  .f-pick small { display: none; }
  .f-form { padding: 18px 16px; border-radius: 20px; }
  .f-tabbar { display: flex; position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); height: 62px; border-radius: 22px; background: rgba(255,255,255,.88); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 12px 32px -12px rgba(20,20,20,.28), 0 0 0 1px var(--f-line); align-items: center; justify-content: space-around; z-index: 30; }
  .f-tabbar a { display: grid; place-items: center; width: 52px; height: 46px; border-radius: 14px; color: var(--f-mute); }
  .f-tabbar a[aria-current="page"] { color: var(--f-ink); }
  .f-tabbar a.f-tabbar-post { background: var(--f-inv); color: var(--f-inv-ink); width: 52px; height: 42px; }
  .f-write textarea { min-height: 56px; }
  .f-write textarea:focus { min-height: 110px; }
}
.f-msearch { display: none; }
.f-msearch input { width: 100%; height: 42px; border: 0; border-radius: 999px; background: var(--f-card); box-shadow: 0 0 0 1px var(--f-line); padding: 0 16px; font: inherit; font-size: 14px; }

/* Part 2: join, event progress, best answer */
.f-bar-track { display: block; height: 4px; border-radius: 2px; background: var(--f-event-t); overflow: hidden; max-width: 220px; }
.f-bar-track i { display: block; height: 100%; background: var(--f-event); border-radius: 2px; }
.f-best { background: var(--f-qa-s); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 1.65; color: var(--f-sub); }
.f-best-label { font-size: 12px; font-weight: 600; color: var(--f-qa); }
.f-reply.is-best { background: var(--f-qa-s); border-radius: 16px; padding: 16px; margin: 4px -16px; border-top: 0; box-shadow: inset 0 0 0 1.5px var(--f-qa); }
.f-reply.is-best + .f-reply { border-top: 0; }

/* Dark theme: follows the device until the person picks one (forum.js). */
:root[data-theme="dark"] {
  color-scheme: dark;
  --f-bg: #0E0F12;
  --f-card: #17191E;
  --f-ink: #F2F0EA;
  --f-sub: #C9C6BD;
  --f-soft: #A3A097;
  --f-mute: #77756E;
  --f-line: #25282F;
  --f-line-2: #30333B;
  --f-inv: #F2F0EA;
  --f-inv-ink: #15171C;
  --f-top-bg: rgba(14, 15, 18, .86);
  --f-chip: #22252B;
  --f-body: #DAD7CF;
  --f-ride: #E3A04F; --f-ride-ink: #F1BE7C; --f-ride-t: #3A2A16; --f-ride-s: #221B12;
  --f-trade: #4FB38E; --f-trade-t: #15302A; --f-trade-ink: #8FD9BC;
  --f-rent: #7A9FE0; --f-rent-t: #1A2640;
  --f-qa: #A88BE0; --f-qa-t: #2A2340; --f-qa-s: #1D1A28;
  --f-event: #E5735F; --f-event-t: #3A1F1A;
}
:root[data-theme="dark"] .f-avatar { color: #FFF; }
:root[data-theme="dark"] .f-dark { background: #1D2026; box-shadow: inset 0 0 0 1px var(--f-line-2); }

/* Header icon buttons, notifications */
.f-iconbtn { all: unset; cursor: pointer; position: relative; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--f-sub); flex: none; }
.f-iconbtn:hover { background: var(--f-chip); }
.f-iconbtn:focus-visible { outline: 2px solid var(--f-ride); }
.f-bell { position: relative; display: inline-flex; }
.f-iconbtn .f-badge { position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--f-event); color: #FFF; font: 600 10px/16px var(--f-num); font-style: normal; text-align: center; box-sizing: border-box; }
.f-bell-panel { position: absolute; top: 44px; right: -8px; width: 340px; max-height: 70vh; overflow: auto; background: var(--f-card); border: 1px solid var(--f-line); border-radius: 14px; box-shadow: 0 18px 40px rgba(0,0,0,.14); padding: 6px; z-index: 30; }
.f-bell-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; font-size: 14px; }
.f-note { display: flex; gap: 10px; padding: 10px; border-radius: 10px; font-size: 13px; line-height: 1.5; color: var(--f-sub); }
.f-note:hover { background: var(--f-bg); }
.f-note.is-new { background: var(--f-ride-s); }
.f-note b { color: var(--f-ink); font-weight: 600; }
.f-note small { display: block; color: var(--f-mute); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 250px; }

/* Translate */
.f-trbox { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.f-tr { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--f-rent); padding: 3px 10px; border-radius: 999px; background: var(--f-rent-t); }
.f-tr:disabled { opacity: .6; cursor: progress; }
.f-tr:focus-visible { outline: 2px solid var(--f-rent); }
[data-tr-note] { font-size: 11px; color: var(--f-mute); }

/* Profile */
.f-hero { height: 120px; margin: 0 -24px; border-radius: 18px 18px 0 0; background: linear-gradient(120deg, var(--f-ride-t), var(--f-qa-t) 60%, var(--f-rent-t)); }
.f-profile-card { background: var(--f-card); border: 1px solid var(--f-line); border-radius: 18px; padding: 0 24px 22px; overflow: hidden; display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.f-profile-top { display: flex; justify-content: space-between; align-items: flex-end; margin-top: -40px; }
.forum .f-avatar--xl { width: 84px; height: 84px; font-size: 30px; border: 4px solid var(--f-card); }
.f-pstats { display: flex; gap: 32px; padding: 10px 0 4px; }
.f-pstats div { display: flex; flex-direction: column; }
.f-pstats b { font-size: 22px; font-weight: 600; line-height: 1.2; }
.f-pstats small { color: var(--f-mute); font-size: 12px; }
.f-heat-wrap { display: flex; flex-direction: column; gap: 6px; align-self: flex-start; }
.f-heat { display: grid; grid-template-rows: repeat(7, 11px); grid-auto-columns: 11px; grid-auto-flow: column; gap: 3px; }
.f-heat i { display: block; border-radius: 3px; }
@media (max-width: 760px) {
  .f-bell-panel { position: fixed; top: 60px; left: 12px; right: 12px; width: auto; }
  .f-profile-card { padding: 0 16px 18px; }
  .f-hero { height: 90px; margin: 0 -16px; }
}
:root[data-theme="dark"] .f-tabbar { background: rgba(23, 25, 30, .9); }

/* Report sheet */
.f-sheet { position: fixed; inset: 0; z-index: 70; background: rgba(10, 11, 14, .45); display: grid; place-items: center; padding: 16px; }
.f-sheet-box { width: min(420px, 100%); background: var(--f-card); color: var(--f-ink); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.f-sheet-box h2 { margin: 0; font-size: 20px; }
.f-sheet-box textarea { font: inherit; font-size: 14px; border: 1px solid var(--f-line-2); border-radius: 12px; padding: 10px 12px; background: var(--f-bg); color: var(--f-ink); resize: vertical; }
.f-sheet-acts { display: flex; justify-content: flex-end; gap: 8px; }
.forum .f-sheet-box .f-btn:disabled { opacity: .45; cursor: default; }
@media (max-width: 760px) {
  .f-sheet { place-items: end stretch; padding: 0; }
  .f-sheet-box { width: 100%; border-radius: 20px 20px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}

/* Thin strip back to the NGN main site, above the forum header. */
.f-ngnbar { background: var(--f-inv, #15171C); color: var(--f-inv-ink, #fff); font-size: 12.5px; }
.f-ngnbar-in { max-width: 1240px; margin: 0 auto; padding: 0 24px; height: 34px; display: flex; align-items: center; gap: 16px; }
.f-ngnbar a { color: inherit; text-decoration: none; opacity: .78; white-space: nowrap; }
.f-ngnbar a:hover { opacity: 1; }
.f-ngnbar-home { display: inline-flex; align-items: center; gap: 4px; opacity: 1 !important; }
.f-ngnbar-home b { letter-spacing: .08em; }
.f-ngnbar-links { margin-left: auto; display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; }
.f-ngnbar-links::-webkit-scrollbar { display: none; }
@media (max-width: 760px) { .f-ngnbar-in { padding: 0 16px; gap: 12px; } .f-ngnbar-links { gap: 12px; } }

/* Phones: inputs at 16px so iOS Safari does not zoom the page in on focus
   (it stays zoomed and the page looks cut off); room for the floating tab bar
   plus the iPhone home indicator; all five sections fit on the compose page;
   the whole feed card opens the post. */
.f-card[data-href] { cursor: pointer; }
@media (max-width: 760px) {
  body.forum { padding-bottom: calc(104px + env(safe-area-inset-bottom)); }
  .forum input, .forum textarea, .forum select,
  .f-msearch input, .f-newtag input, .f-write textarea, .f-sheet-box textarea, .f-input { font-size: 16px; }
  .f-input--title { font-size: 18px; }
  .f-picks { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; overflow: visible; }
  .f-pick { padding: 10px 2px; font-size: 13px; border-radius: 14px; }
}

/* ‹ back in the forum header (post, profile, compose pages) */
.f-back { display: grid; place-items: center; width: 36px; height: 36px; margin-left: -8px; border-radius: 50%; color: var(--f-ink); flex: none; }
.f-back:hover { background: var(--f-chip); }

/* Polls */
.f-poll { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 14px; background: var(--f-bg); box-shadow: inset 0 0 0 1px var(--f-line); }
.f-poll-head { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--f-rent); }
.f-poll-head b { font-weight: 600; }
.f-poll-head .f-mini { margin-left: auto; }
.f-poll-opt { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px; background: var(--f-card); box-shadow: inset 0 0 0 1px var(--f-line); font-size: 14px; color: var(--f-ink); }
.f-poll-opt:hover { box-shadow: inset 0 0 0 1px var(--f-rent); }
.f-poll-opt[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px var(--f-rent); }
.f-poll-box { flex: none; width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--f-mute); }
.f-poll-box.is-multi { border-radius: 4px; }
.f-poll-opt[aria-pressed="true"] .f-poll-box { box-shadow: inset 0 0 0 5px var(--f-rent); }
.f-poll-row { position: relative; display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px; background: var(--f-card); overflow: hidden; font-size: 14px; color: var(--f-sub); }
.f-poll-row i { position: absolute; inset: 0 auto 0 0; background: var(--f-rent-t); border-radius: 10px 0 0 10px; transition: width .5s ease; }
.f-poll-row span, .f-poll-row b { position: relative; }
.f-poll-row span { flex: 1; min-width: 0; }
.f-poll-row b { font-size: 13px; font-weight: 600; color: var(--f-soft); }
.f-poll-row.is-top span, .f-poll-row.is-top b { color: var(--f-ink); font-weight: 600; }
.f-poll-row.is-mine span { color: var(--f-rent); }
.f-poll-foot { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--f-mute); }
.f-poll-foot span { margin-right: auto; }
.f-poll-go { padding: 7px 16px; font-size: 13px; }
.f-poll-go[disabled] { opacity: .4; pointer-events: none; }
.f-poll-add { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 9px 14px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--f-line); font-size: 14px; color: var(--f-rent); }
.f-poll-editor { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 14px; background: var(--f-bg); }
.f-poll-line { display: flex; align-items: center; gap: 8px; }
.f-poll-line .f-input, .f-poll-set select { flex: 1; min-width: 0; background: var(--f-card); }
.f-poll-line .f-x { flex: none; border: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--f-chip); color: var(--f-soft); cursor: pointer; font-size: 16px; line-height: 1; }
.f-poll-set { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
.f-poll-set .f-seg { background: var(--f-card); }
.f-poll-set select { width: auto; }
