:root {
  color-scheme: light;
  --background: #f7f7f7;
  --paper: #fff;
  --ink: #161616;
  --muted: #555;
  --line: #dedede;
  --control-line: #929292;
  --surface: #f1f1f1;
  --hover: #ebebeb;
  --action: #181818;
  --action-hover: #373737;
  --radius: 7px;
  --display: Bahnschrift, 'Arial Narrow', 'Segoe UI', sans-serif;
  --body: Aptos, 'Segoe UI', system-ui, sans-serif;
  font-family: var(--body);
  background: var(--background);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 285px; font-size: 1rem; line-height: 1.5; }
body, .site-main { min-width: 0; }
body { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; accent-color: var(--action); }
button, select, summary { cursor: pointer; }
button:disabled { cursor: not-allowed; color: var(--muted); background: #e1e1e1; border-color: #a3a3a3; }
img { display: block; width: 100%; height: auto; }
h1, h2, h3, p, dl, ul, ol { margin: 0; }
h1, h2, h3 { line-height: 1.07; font-family: var(--display); font-weight: 750; letter-spacing: -.035em; }
h1, h2, h3, dd { overflow-wrap: anywhere; }
h1 { font-size: clamp(2.9rem, 5.55vw, 5.25rem); }
h2 { font-size: clamp(1.375rem, 2.5vw, 1.9375rem); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 2px var(--paper); }
::selection { color: var(--ink); background: #d4d4d4; }
[hidden] { display: none !important; }
.icon { flex: 0 0 auto; width: 1.25rem; height: 1.25rem; vertical-align: middle; }
.shell { width: min(1280px, calc(100% - 88px)); margin-inline: auto; }
.skip-link { position: absolute; z-index: 10; left: 18px; top: -100px; padding: .65rem 1rem; color: var(--paper); background: var(--action); border-radius: 4px; }
.skip-link:focus { top: 12px; }
.page-space { padding-top: 26px; }

.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { display: grid; grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr); min-height: 76px; align-items: center; gap: 1.75rem; }
.wordmark { display: inline-flex; width: max-content; min-height: 27px; align-items: center; text-decoration: none; font-family: var(--display); font-size: 2rem; font-weight: 850; font-style: italic; letter-spacing: -.07em; line-height: 1; white-space: nowrap; }
.wordmark-mx { color: #b51f2b; }
.wordmark-dot { color: var(--muted); }
.top-nav, .header-actions, .forum-tabs, .market-tabs { display: flex; align-items: stretch; }
.top-nav { align-self: stretch; gap: .4rem; }
.nav-link { display: inline-flex; gap: .45rem; align-items: center; justify-content: center; position: relative; text-decoration: none; white-space: nowrap; padding: .85rem 1.025rem; font-weight: 650; font-size: .9375rem; color: var(--muted); }
.nav-link:hover { color: var(--ink); text-decoration: underline; }
.nav-link.current { color: var(--ink); }
.nav-link.current::after { content: ''; position: absolute; inset: auto .95rem -1px; height: 3px; background: var(--ink); border-radius: 2px 2px 0 0; }
.header-actions { gap: .9rem; align-items: center; justify-self: end; white-space: nowrap; }
.text-button { display: inline-flex; align-items: center; gap: .3rem; padding: .35rem .15rem; color: var(--muted); background: transparent; border: 0; text-decoration: none; font-size: .875rem; font-weight: 660; }
.text-button:hover { text-decoration: underline; color: var(--ink); }
.button { display: inline-flex; gap: .4rem; min-height: 44px; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 6px; padding: .6rem .9rem; font-size: .875rem; font-weight: 760; line-height: 1.25; text-decoration: none; text-align: center; transition: background-color .16s ease, border-color .16s ease; }
.button-primary, .button-dark { color: var(--paper); background: var(--action); border-color: var(--action); }
.button-primary:not(:disabled):hover, .button-dark:not(:disabled):hover { background: var(--action-hover); border-color: var(--action-hover); }
.button-outline { color: var(--ink); background: transparent; border-color: var(--control-line); }
.button-outline:not(:disabled):hover { border-color: var(--ink); background: var(--hover); }
.site-footer { border-top: 1px solid var(--line); margin-top: clamp(3rem, 7vw, 6rem); background: var(--paper); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; padding-block: 22px; }
.site-footer .wordmark { font-size: 1.35rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .95rem 1.35rem; }
.site-footer nav a { color: var(--muted); font-size: .875rem; text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }

.market-page, .forum-page { padding-top: 22px; }
.market-hero { isolation: isolate; position: relative; min-height: clamp(252px, 25vw, 310px); display: flex; align-items: center; border-radius: var(--radius); overflow: hidden; color: var(--paper); background: var(--ink); }
.market-hero::before, .market-hero::after { content: ''; position: absolute; inset: 0; pointer-events: none; }
.market-hero::before { z-index: -2; background: url('/assets/hero.jpg') 63% 52% / cover no-repeat; filter: grayscale(1); }
.market-hero::after { z-index: -1; background: linear-gradient(90deg, #090909ec 1%, #101010ce 33%, #10101077 55%, #10101019 80%); }
.hero-contents { padding: clamp(1.4rem, 3vw, 2.6rem) clamp(1.4rem, 4.1vw, 3.6rem); width: min(100%, 670px); }
.hero-contents h1 { font-size: clamp(2.8rem, 5.28vw, 4.25rem); max-width: 15ch; letter-spacing: -.055em; font-weight: 790; line-height: 1; text-wrap: balance; }
.hero-contents p { margin-top: .7rem; color: #efefef; max-width: 40ch; font-weight: 520; text-wrap: pretty; }
.hero-search { display: flex; gap: 0; margin-top: 1.1rem; max-width: 440px; }
.hero-search .search-control { flex: 1; min-width: 0; }
.hero-search .search-control input { border-radius: 6px 0 0 6px; border: 0; min-height: 48px; }
.hero-search .button { border-radius: 0 6px 6px 0; padding-inline: 1.1rem; border-color: var(--paper); }
.hero-search .button:not(:disabled):hover { border-color: var(--paper); }
.search-control { position: relative; }
.search-control > .icon { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-control input { width: 100%; min-height: 44px; padding: .6rem .65rem .6rem 2.3rem; border-radius: 6px; border: 1px solid var(--control-line); background: var(--paper); color: var(--ink); font-size: .9375rem; }
.compact-heading { padding: 20px 0 22px; display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.compact-heading h1 { font-size: clamp(2.65rem, 5vw, 4rem); }
.compact-heading p { max-width: 57ch; margin-top: .6rem; color: var(--muted); }
.market-tabs, .forum-tabs { gap: .4rem; border-bottom: 1px solid var(--line); }
.market-tabs { margin-top: .9rem; }
.market-tabs .nav-link, .forum-tabs .nav-link { min-height: 52px; padding-inline: 1rem; }
.market-tabs .nav-link .icon, .forum-tabs .nav-link .icon { color: currentColor; }
.market-tabs .nav-link.current, .forum-tabs .nav-link.current { background: var(--hover); border-radius: 5px 5px 0 0; }
.market-tabs .nav-link.current::after, .forum-tabs .nav-link.current::after { inset-inline: 0; height: 2px; }
.market-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); align-items: start; gap: 25px; margin-top: 23px; }
.filter-panel details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.filter-panel summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .95rem .92rem; font-weight: 750; min-height: 47px; }
.filter-panel summary::-webkit-details-marker { display: none; }
.filter-panel summary > span:first-child { display: flex; align-items: center; gap: .45rem; }
.summary-caret { width: 7px; height: 7px; border-bottom: 2px solid var(--muted); border-right: 2px solid var(--muted); transform: rotate(45deg) translate(-2px,-2px); }
.filter-panel details[open] > summary { border-bottom: 1px solid var(--line); }
.filter-panel details[open] .summary-caret { transform: rotate(225deg) translate(-1px,-1px); }
.filters-form { display: grid; padding: .85rem .9rem 1rem; gap: .7rem; }
.filters-form .button { width: 100%; }
.reset-link { color: var(--muted); display: block; width: fit-content; justify-self: center; font-size: .875rem; }
.results-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem 1rem; margin-bottom: .85rem; }
.results-toolbar p { margin-top: .25rem; color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
.sort-form { display: flex; align-items: end; gap: .5rem; }
.sort-form .field { width: 145px; }
.sort-form .field > span { font-size: .8125rem; }
.sort-apply { align-self: end; border: 1px solid var(--control-line); background: var(--paper); padding: .45rem .55rem; border-radius: 6px; font-size: .875rem; }
.sort-form.enhanced .sort-apply { display: none; }
.listing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.listing-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); transition: border-color .18s ease, box-shadow .18s ease; }
.listing-card:hover { border-color: var(--control-line); box-shadow: 0 5px 14px #17171712; }
.listing-card:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.listing-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; outline-offset: -3px; }
.listing-image { position: relative; }
.photo { display: grid; place-items: center; background: var(--surface); overflow: hidden; }
.listing-image .photo { aspect-ratio: 16 / 10; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.listing-link .photo img { transition: transform .28s ease; }
.listing-link:hover .photo img { transform: scale(1.025); }
.photo.photo-empty { background: var(--surface); color: var(--muted); }
.photo-empty .icon { width: 2rem; height: 2rem; }
.listing-status { position: absolute; top: 11px; left: 11px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); padding: .22rem .47rem; border-radius: 4px; font-size: .8125rem; font-weight: 720; }
.wanted-status { background: var(--action); color: var(--paper); border-color: var(--action); }
.listing-body { padding: .78rem .85rem .92rem; display: flex; flex-direction: column; flex: 1; gap: .38rem; }
.listing-meta, .listing-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .35rem .55rem; color: var(--muted); font-size: .8125rem; }
.listing-meta > span:first-child { color: var(--ink); font-weight: 680; }
.meta-divider { color: var(--muted); }
.listing-body h3 { font-size: clamp(1.13rem, 1.7vw, 1.32rem); font-weight: 730; flex: 1; }
.listing-price { font-weight: 760; font-size: 1.35rem; letter-spacing: -.035em; line-height: 1.2; padding-block: .07rem .15rem; }
.listing-footer { margin-top: .25rem; padding-top: .52rem; border-top: 1px solid var(--line); }
.listing-footer > span { display: inline-flex; align-items: center; gap: .2rem; }
.listing-footer .icon { width: 1rem; height: 1rem; }
.demo-label { display: inline-flex; align-items: center; flex: 0 0 auto; width: fit-content; border: 1px solid var(--control-line); border-radius: 4px; padding: .08rem .34rem; color: var(--muted); font-size: .75rem; font-weight: 680; line-height: 1.5; }
.browse-by { margin-top: 28px; border-top: 1px solid var(--line); padding-block: 20px 6px; }
.browse-by h2 { font-size: 1.25rem; margin-bottom: .7rem; }
.browse-by > div { display: flex; flex-wrap: wrap; gap: .55rem; }
.browse-by a { border: 1px solid var(--line); background: var(--paper); border-radius: 5px; text-decoration: none; padding: .45rem .65rem; font-size: .875rem; }
.browse-by a:hover { border-color: var(--ink); text-decoration: underline; }
.pagination { display: flex; flex-wrap: wrap; gap: .65rem; justify-content: center; align-items: center; margin: 22px 0 4px; font-size: .875rem; color: var(--muted); }

.field { position: relative; display: grid; gap: .27rem; min-width: 0; }
.field > span, legend { color: var(--ink); font-size: .875rem; font-weight: 680; }
.field > small, .field > span small { color: var(--muted); font-size: .8125rem; font-weight: 400; }
.field input, .field select, .field textarea { display: block; width: 100%; min-height: 44px; border: 1px solid var(--control-line); border-radius: 6px; padding: .5rem .62rem; background: var(--paper); font-size: .9375rem; }
.field input:not(:disabled):hover, .field select:not(:disabled):hover, .field textarea:not(:disabled):hover, .search-control input:not(:disabled):hover { border-color: var(--ink); }
.field input::placeholder, .search-control input::placeholder, textarea::placeholder { color: #636363; }
.field :is(input, select, textarea):disabled { color: var(--muted); background: var(--surface); cursor: not-allowed; }
.field select { appearance: none; padding-right: 1.8rem; }
.field:has(select)::after { content: ''; position: absolute; pointer-events: none; right: .75rem; bottom: 18px; width: 6px; height: 6px; transform: rotate(45deg); border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); }
.field textarea { resize: vertical; }
.field input[type='file'] { background: var(--surface); }
.field input::file-selector-button { margin-right: .6rem; border: 1px solid var(--control-line); border-radius: 4px; background: var(--paper); color: var(--ink); padding: .3rem .55rem; font: inherit; cursor: pointer; }
.field-pair, .model-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.filter-panel .model-fields { grid-template-columns: minmax(0, 1fr); }
.price-field { padding: 0; margin: 0; min-inline-size: 0; border: 0; }
.price-field legend { padding: 0 0 .35rem; }
.price-field .field > span { font-size: .8125rem; color: var(--muted); font-weight: 560; }
.empty-state { display: grid; gap: .6rem; place-items: center; text-align: center; min-height: 220px; align-content: center; padding: 1.8rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.empty-state > .icon { width: 1.85rem; height: 1.85rem; color: var(--ink); }
.empty-state p { max-width: 44ch; color: var(--muted); }
.empty-state .button { margin-top: .25rem; }
.error-page { min-height: 300px; }
.error-page h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
.notice { padding: .65rem .75rem; border: 1px solid var(--control-line); background: var(--surface); border-radius: 5px; }
.notice-error { color: var(--ink); border-left: 4px solid var(--ink); }

.forum-banner { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; padding: 1rem 0 1.4rem; }
.forum-banner h1 { font-size: clamp(2.5rem, 4.4vw, 3.75rem); }
.forum-banner p { max-width: 58ch; color: var(--muted); margin-top: .5rem; text-wrap: pretty; }
.forum-filters { display: flex; align-items: end; gap: .8rem; margin: 1.2rem 0; }
.forum-filters .search-control { flex: 1 1 220px; min-width: 0; }
.forum-filters > .field { flex: 0 1 170px; }
.forum-filters .model-fields { flex: 0 1 300px; }
.thread-board, .post-panel, .reply-panel, .event-card, .form-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.board-heading { padding: .9rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: .6rem; border-bottom: 1px solid var(--line); }
.board-heading h2 { font-size: 1.25rem; }
.board-heading > span { color: var(--muted); font-size: .875rem; }
.thread-list, .conversation-list, .message-list { list-style: none; padding: 0; }
.thread-board .empty-state { border: 0; }
.thread-board .pagination { margin-bottom: 15px; }
.thread-row { display: grid; grid-template-columns: 2.8rem minmax(0,1fr) auto; align-items: center; gap: .85rem; padding: 1rem; }
.thread-row + .thread-row { border-top: 1px solid var(--line); }
.thread-row:hover { background: var(--background); }
.thread-symbol, .avatar { width: 2.63rem; height: 2.63rem; border-radius: 6px; display: inline-grid; flex: 0 0 auto; place-items: center; color: var(--ink); background: var(--surface); }
.thread-symbol-event { color: var(--paper); background: var(--action); }
.thread-labels, .detail-tags { display: flex; flex-wrap: wrap; gap: .3rem .55rem; align-items: center; margin-bottom: .35rem; }
.thread-labels > span:not(.label-tag):not(.demo-label), .bike-tag { color: var(--muted); font-size: .8125rem; }
.label-tag { display: inline-block; width: fit-content; padding: .11rem .42rem; border-radius: 4px; color: var(--ink); background: var(--surface); font-size: .8125rem; font-weight: 700; }
.event-tag { color: var(--paper); background: var(--action); }
.thread-summary { min-width: 0; }
.thread-summary h2 { font-size: 1.25rem; line-height: 1.23; }
.thread-summary h2 a { text-decoration: none; }
.thread-summary h2 a:hover { text-decoration: underline; }
.thread-summary p { color: var(--muted); font-size: .9375rem; margin-top: .27rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-row-meta { text-align: right; display: grid; min-width: 5rem; gap: .3rem; color: var(--muted); font-size: .8125rem; }
.thread-row-meta span { display: inline-flex; justify-content: end; align-items: center; gap: .2rem; }
.thread-row-meta .icon { width: 1rem; height: 1rem; }

.breadcrumbs { margin-bottom: 1rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; padding: 0; }
.breadcrumbs li { display: inline-flex; min-width: 0; align-items: center; gap: .18rem; color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
.breadcrumbs li a { text-decoration: none; }
.breadcrumbs li a:hover { text-decoration: underline; }
.breadcrumbs .icon { width: .85rem; height: .85rem; }
.breadcrumbs [aria-current='page'] { color: var(--ink); }
.item-detail { display: grid; grid-template-columns: minmax(0, 1.16fr) minmax(0, .84fr); align-items: start; gap: clamp(1rem, 3vw, 2.5rem); }
.item-photo { min-height: 225px; width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius); }
.item-info { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); padding: clamp(1rem, 2.5vw, 1.9rem); }
.item-info h1, .post-panel h1, .form-panel h1 { font-size: clamp(2.1rem, 4vw, 3.5rem); }
.detail-price { font-size: 1.75rem; font-weight: 760; letter-spacing: -.035em; margin-top: .55rem; }
.detail-facts { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .8rem; border-block: 1px solid var(--line); padding-block: .95rem; margin-block: .95rem; }
.detail-facts dt { font-size: .8125rem; color: var(--muted); }
.detail-facts dd { margin: .1rem 0 0; font-weight: 650; }
.posted-by { min-width: 0; display: flex; gap: .55rem; align-items: center; }
.posted-by strong, .posted-by time { display: block; overflow-wrap: anywhere; }
.posted-by time { color: var(--muted); font-size: .8125rem; }
.avatar { font-size: .86rem; font-weight: 780; }
.item-info > .button, .item-info > form { margin-top: .9rem; }
.description-panel, .related-list { margin-top: 1.45rem; }
.description-panel { max-width: 78ch; }
.description-panel h2, .related-list h2 { margin-bottom: .65rem; }
.body-copy { white-space: pre-wrap; overflow-wrap: anywhere; }
.thread-page { max-width: 1050px; }
.thread-detail.with-event { display: grid; grid-template-columns: minmax(0,1fr) 275px; gap: 16px; align-items: start; }
.with-event .post-panel { grid-area: 1 / 1; }
.with-event .event-card { grid-area: 1 / 2 / span 2; }
.with-event .reply-panel { grid-area: 2 / 1; margin-top: 0; }
.post-panel, .reply-panel, .event-card { padding: clamp(1rem, 2.5vw, 1.7rem); }
.post-byline { display: flex; align-items: center; justify-content: space-between; gap: .55rem; margin: 1rem 0; padding-bottom: .9rem; border-bottom: 1px solid var(--line); }
.post-photo { max-width: 650px; margin-top: 1rem; border-radius: 6px; }
.post-photo img { max-height: 620px; object-fit: contain; }
.event-card h2 { font-size: 1.42rem; }
.event-card dl { display: grid; gap: .68rem; margin: .85rem 0; }
.event-card dt { display: flex; align-items: center; gap: .35rem; color: var(--muted); font-size: .875rem; }
.event-card dd { margin: .12rem 0 0; font-weight: 680; }
.event-card .icon { width: 1rem; height: 1rem; }
.maps-link { display: inline-flex; gap: .3rem; align-items: center; color: var(--ink); font-size: .9375rem; font-weight: 650; }
.event-card form, .event-card > .button, .going-note { margin-top: .8rem; }
.sample-note { color: var(--muted); font-size: .8125rem; margin-top: .5rem; }
.going-note { color: var(--ink); font-size: .875rem; font-weight: 700; }
.reply-panel { margin-top: 1rem; }
.reply-panel h2 { font-size: 1.35rem; margin-bottom: .75rem; }
.reply { border-top: 1px solid var(--line); padding-block: .75rem; }
.reply p { margin-top: .6rem; }
.reply-form { display: grid; gap: .65rem; border-top: 1px solid var(--line); padding-top: .75rem; }
.reply-form .button, .editor-form > .button { justify-self: start; }
.reply-panel .notice { margin-bottom: .7rem; }

.form-page { max-width: 760px; }
.form-panel { padding: clamp(1.05rem, 3vw, 2rem); }
.form-panel header { margin-bottom: 1rem; }
.form-panel header p { color: var(--muted); margin-top: .45rem; }
.form-panel .notice { margin-bottom: 1rem; }
.editor-form { display: grid; gap: .9rem; }
.editor-form .model-fields { grid-template-columns: repeat(3,minmax(0,1fr)); }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.event-fields { margin: 0; padding: .75rem; min-inline-size: 0; border: 1px solid var(--line); border-radius: 6px; display: grid; gap: .75rem; }
.event-fields legend { padding-inline: .35rem; }
.auth-page { max-width: 480px; padding-top: clamp(1.5rem, 5vw, 4rem); }
.auth-page .editor-form > .button { justify-self: stretch; }
.alternate-auth { font-size: .875rem; color: var(--muted); margin-top: .8rem; }
.alternate-auth a, .message-context a { color: var(--ink); font-weight: 650; }
.inbox-page { max-width: 920px; }
.conversation-list li + li { border-top: 1px solid var(--line); }
.conversation-list li > a { padding: .85rem 1rem; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: .65rem; text-decoration: none; }
.conversation-list li > a:hover { background: var(--background); }
.conversation-list li p { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-state { display: grid; gap: .15rem; justify-items: end; font-size: .8125rem; color: var(--muted); }
.message-context { margin-bottom: .75rem; font-size: .9375rem; }
.message-list { display: flex; flex-direction: column; gap: .6rem; margin-bottom: .9rem; }
.message-bubble { width: fit-content; max-width: 88%; background: var(--surface); border-radius: 7px; padding: .6rem .68rem; }
.message-bubble > div { display: flex; align-items: baseline; gap: .35rem .65rem; flex-wrap: wrap; }
.message-bubble time { color: var(--muted); font-size: .8125rem; }
.message-mine { align-self: end; color: var(--paper); background: var(--action); }
.message-mine time { color: #d4d4d4; }
.block-form { margin-top: 1rem; }

@media (max-width: 1110px) {
  .shell { width: calc(100% - 56px); }
  .market-layout { grid-template-columns: 220px minmax(0,1fr); gap: 18px; }
  .listing-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .related-list .listing-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .header-inner { gap: .9rem; }
}

@media (max-width: 780px) {
  .shell { width: calc(100% - 32px); }
  .header-inner { min-height: 0; grid-template-columns: minmax(0,1fr) auto; grid-template-rows: minmax(65px,auto) auto; gap: 0 .5rem; }
  .header-inner > .wordmark { font-size: 1.72rem; }
  .header-actions { gap: .55rem; }
  .header-actions .button { padding: .5rem .62rem; }
  .header-actions .text-button > .icon { display: none; }
  .top-nav { border-top: 1px solid var(--line); grid-row: 2; grid-column: 1 / -1; width: 100%; gap: .25rem; }
  .top-nav .nav-link { padding: .65rem .85rem; min-height: 44px; }
  .top-nav .nav-link.current::after { inset-inline: .5rem; }
  .market-page, .forum-page { padding-top: 14px; }
  .market-layout { grid-template-columns: minmax(0,1fr); gap: 16px; margin-top: 16px; }
  .filters-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .filter-panel .model-fields { grid-column: 1 / -1; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .filters-form .price-field { grid-column: 1 / -1; }
  .reset-link { align-self: center; }
  .forum-filters { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .6rem; }
  .forum-filters .search-control, .forum-filters .model-fields { grid-column: 1 / -1; }
  .forum-filters > .button { align-self: end; width: fit-content; }
  .forum-banner { padding-top: .75rem; }
  .thread-detail.with-event { grid-template-columns: minmax(0,1fr); }
  .with-event .post-panel, .with-event .event-card, .with-event .reply-panel { grid-area: auto; }
  .related-list .listing-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .site-footer nav { gap: .4rem .7rem; }
}

@media (max-width: 540px) {
  .hero-contents { padding: 1.13rem; }
  .hero-contents h1 { font-size: clamp(2.35rem, 10.5vw, 3.15rem); max-width: 14ch; }
  .hero-contents p { margin-top: .6rem; }
  .market-hero { min-height: 254px; }
  .market-hero::before { background-position: 94% 50%; }
  .market-hero::after { background: linear-gradient(90deg, #090909e8, #101010c9 54%, #10101077); }
  .hero-search { margin-top: .9rem; }
  .market-tabs { overflow-x: auto; scrollbar-width: thin; gap: .1rem; }
  .forum-tabs { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.38fr) minmax(0, 1.17fr); gap: .1rem; }
  .market-tabs .nav-link, .forum-tabs .nav-link { padding: .65rem .63rem; min-height: 45px; font-size: .84rem; }
  .market-tabs .icon { width: 1.05rem; height: 1.05rem; }
  .forum-tabs .nav-link { min-height: 49px; padding: .55rem .35rem; white-space: normal; text-align: center; line-height: 1.2; }
  .forum-tabs .icon { display: none; }
  .forum-banner { align-items: start; flex-direction: column; gap: .7rem; }
  .listing-grid, .related-list .listing-grid { grid-template-columns: minmax(0,1fr); gap: 13px; }
  .listing-image .photo { aspect-ratio: 16 / 9; }
  .item-detail { grid-template-columns: minmax(0,1fr); }
  .item-photo { aspect-ratio: 16 / 10; min-height: 185px; }
  .thread-row { grid-template-columns: minmax(0,1fr) auto; padding: .72rem; gap: .45rem; }
  .thread-symbol { display: none; }
  .thread-summary h2 { font-size: 1.11rem; }
  .thread-summary p { font-size: .86rem; }
  .thread-row-meta { min-width: 2rem; }
  .thread-row-meta .reply-word { display: none; }
  .thread-row-meta time { white-space: nowrap; }
  .editor-form .model-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .editor-form .model-fields .field:last-child { grid-column: 1 / -1; }
  .event-fields .field-pair { grid-template-columns: minmax(0,1fr); }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 370px) {
  .shell { width: calc(100% - 24px); }
  .header-inner > .wordmark { font-size: 1.45rem; }
  .header-actions { gap: .4rem; }
  .header-actions .header-list .icon { display: none; }
  .sort-form .field { width: 125px; }
  .sort-apply { padding-inline: .35rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
