/* 오링 웹 (oringboxing.com) — 앱과 같은 색 (app/lib/ui/theme.dart). 회색 바탕 위 흰 카드, 알약 칩, 글 줄 = 앱 커뮤니티 화면 + 당근 동네생활 웹 구성 참고 */
:root { --page:#f4f4f5; --bg:#ffffff; --fg:#111113; --sub:#45454d; --muted:#71717a; --line:#ececef; --soft:#f4f4f5; --brand:#c62828; --brand-ink:#ffffff;
  --ok:#1b873f; --ok-bg:#e8f5ec; --warn:#b26a00; --warn-bg:#fdf3e3; --live:#c62828; --live-bg:#fdecec; --verified:#1d4ed8; --shadow: 0 1px 2px rgba(17,17,19,.04); }
@media (prefers-color-scheme: dark) {
  :root { --page:#0e0e10; --bg:#18181b; --fg:#fafafa; --sub:#c4c4cc; --muted:#a1a1aa; --line:#2a2a30; --soft:#232328; --brand:#e53935; --brand-ink:#ffffff;
    --ok:#4ade80; --ok-bg:#12261a; --warn:#fbbf24; --warn-bg:#2a2010; --live:#ff6b6b; --live-bg:#2c1414; --verified:#64b5f6; --shadow:none; color-scheme: dark; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin:0; background:var(--page); color:var(--fg);
  font: 16px/1.65 "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  letter-spacing: -0.01em; word-break: keep-all; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); }
img { max-width: 100%; }
.wrap { max-width: 1040px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }

/* 위 줄 */
header.top { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 20; }
header.top .wrap { display:flex; align-items:center; gap: 18px; height: 56px; }
.logo { display:flex; align-items:center; gap:8px; color: var(--fg); text-decoration:none; font-weight: 800; font-size: 19px; letter-spacing:-0.03em; flex: none; }
.logo img { width: 28px; height: 28px; border-radius: 7px; }
header.top nav { display:flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
header.top nav::-webkit-scrollbar { display: none; }
header.top nav a { color: var(--muted); text-decoration:none; font-weight: 700; font-size: 15px; white-space: nowrap; padding: 6px 10px; border-radius: 8px; }
header.top nav a:hover { background: var(--soft); }
header.top nav a[aria-current] { color: var(--fg); }
.getapp { flex: none; background: var(--brand); color: var(--brand-ink); text-decoration: none; font-weight: 800; font-size: 14px; padding: 8px 14px; border-radius: 999px; }

/* 틀: 본문 + 옆 칸 (넓은 화면) */
main { padding-top: 16px; padding-bottom: 48px; }
.maincol { min-width: 0; display:flex; flex-direction: column; gap: 12px; }
.side { display:flex; flex-direction: column; gap: 12px; margin-top: 12px; }
@media (min-width: 900px) {
  main.has-side { display:grid; grid-template-columns: minmax(0,1fr) 320px; gap: 20px; align-items: start; }
  .side { margin-top: 0; position: sticky; top: 72px; }
  main.narrow .maincol { max-width: 760px; margin: 0 auto; width: 100%; }
}
.card { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 16px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-h { display:flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 16px 6px; }
.card-h h2 { margin: 0; font-size: 18px; letter-spacing: -0.02em; }
.card-h a { font-size: 14px; font-weight: 700; text-decoration: none; color: var(--muted); white-space: nowrap; }
h1 { font-size: 24px; line-height: 1.35; margin: 2px 0 4px; letter-spacing: -0.03em; text-wrap: balance; }
h2 { font-size: 18px; margin: 0 0 8px; letter-spacing: -0.02em; }
h3 { font-size: 14px; margin: 0; color: var(--muted); font-weight: 700; }
.sub { color: var(--muted); margin: 0; font-size: 15px; }
.crumbs { font-size: 13px; color: var(--muted); margin: 0 2px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.pagehead { padding: 4px 2px 0; }
.note { color: var(--muted); font-size: 13px; }
.empty { color: var(--muted); padding: 18px 16px; margin: 0; }
.more { display:inline-block; font-weight: 700; text-decoration: none; font-size: 15px; padding: 4px 2px; }

/* 게시판 칩 */
.topics { display:flex; gap: 6px; overflow-x: auto; padding: 2px 0; margin: 0; list-style: none; scrollbar-width: none; }
.topics::-webkit-scrollbar { display: none; }
.topics a { display:block; white-space: nowrap; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 600; color: var(--sub); text-decoration: none; }
.topics a[aria-current] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
@media (min-width: 900px) { .topics { flex-wrap: wrap; overflow: visible; } }

/* 글 줄 */
.posts { list-style: none; padding: 0; margin: 0; }
.posts li + li { border-top: 1px solid var(--line); }
.posts a.post { display:flex; gap: 14px; align-items: center; padding: 14px 16px; color: var(--fg); text-decoration: none; }
.posts a.post:hover { background: var(--soft); }
.posts .ptxt { flex: 1; min-width: 0; }
.posts .ptitle { font-weight: 700; font-size: 16px; display:block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.posts .pbody { display:block; color: var(--sub); font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.pfoot { display:flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.pmeta { color: var(--muted); font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pmeta b { color: var(--fg); font-weight: 700; }
.pcount { display:flex; gap: 10px; flex: none; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.pcount span { display:inline-flex; align-items: center; gap: 4px; }
.ico { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.posts .pthumb { flex: none; width: 76px; height: 76px; border-radius: 12px; object-fit: cover; background: var(--soft); }
.tag { display:inline-block; font-size: 12px; font-weight: 800; color: var(--brand); margin-right: 6px; }
.tag.pin { color: var(--fg); background: var(--soft); border-radius: 6px; padding: 1px 6px; }
.pager { display:flex; justify-content: space-between; font-weight: 700; padding: 0 2px; }
.pager a { text-decoration: none; }

/* 글 한 편 */
.chip { display:inline-block; background: var(--soft); color: var(--sub); border-radius: 6px; padding: 2px 8px; font-size: 13px; font-weight: 700; text-decoration: none; }
.byline { display:flex; align-items:center; gap: 10px; margin: 12px 0 14px; }
.av { flex: none; width: 40px; height: 40px; border-radius: 50%; display:grid; place-items:center; color:#fff; font-weight: 800; font-size: 16px; background: hsl(var(--h, 0) 45% 46%); }
.av.sm { width: 32px; height: 32px; font-size: 13px; }
.av.anon { background: var(--muted); }
.byline .who { font-weight: 700; display:block; line-height: 1.3; }
.byline .when { color: var(--muted); font-size: 13px; }
.article h1 { font-size: 22px; margin: 0 0 10px; }
.article .text { font-size: 16.5px; line-height: 1.75; }
.text p { margin: 0 0 12px; }
.text p:last-child { margin-bottom: 0; }
.price { font-size: 20px; font-weight: 800; margin: 0 0 10px; }
.photos { display:flex; flex-direction: column; gap: 8px; margin: 14px 0 0; }
.photos img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); display:block; }
.video { display:block; position: relative; max-width: 520px; margin: 14px 0 0; }
.video img { width: 100%; border-radius: 12px; display:block; }
.video span { position:absolute; left: 12px; bottom: 12px; background: rgba(0,0,0,.72); color: #fff; padding: 4px 10px; border-radius: 8px; font-size: 14px; font-weight: 700; }
.stats { display:flex; gap: 16px; color: var(--muted); font-size: 14px; margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.stats span { display:inline-flex; align-items:center; gap: 5px; }
.stats .ico { width: 18px; height: 18px; }
.comments { list-style: none; padding: 0; margin: 0; }
.comments li { display:flex; gap: 10px; padding: 12px 0; }
.comments li + li { border-top: 1px solid var(--line); }
.comments li.reply { padding-left: 42px; }
.comments .cbody { min-width: 0; flex: 1; }
.comments .who { font-weight: 700; font-size: 14px; }
.comments .when { color: var(--muted); font-size: 13px; margin-left: 6px; }
.comments .gone { color: var(--muted); font-size: 14px; }
.comments p { margin: 2px 0 0; font-size: 15px; }

/* 대회 */
.badge { display:inline-block; font-size: 12.5px; font-weight: 800; padding: 2px 9px; border-radius: 999px; vertical-align: middle; white-space: nowrap; }
.badge.open { color: var(--ok); background: var(--ok-bg); }
.badge.soon { color: var(--warn); background: var(--warn-bg); }
.badge.live { color: var(--live); background: var(--live-bg); }
.badge.closed, .badge.done { color: var(--muted); background: var(--soft); }
.dday { font-weight: 800; color: var(--brand); font-size: 14px; font-variant-numeric: tabular-nums; }
.list { list-style: none; padding: 0; margin: 0; }
.list li + li { border-top: 1px solid var(--line); }
.list a.row { display:flex; gap: 14px; align-items: center; padding: 12px 16px; color: var(--fg); text-decoration: none; }
.list a.row:hover { background: var(--soft); }
.cal { flex: none; width: 52px; height: 56px; border-radius: 12px; background: var(--soft); display:flex; flex-direction: column; align-items:center; justify-content:center; line-height: 1.15; }
.cal i { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.cal b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.list .row .main { flex: 1; min-width: 0; }
.list .row .name { font-weight: 700; display:block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .row .meta { display:block; color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .rside { flex: none; display:flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.yearh { padding: 12px 16px 4px; }
.thead { display:flex; align-items:center; gap: 10px; margin: 8px 0 0; }
.facts { display:grid; grid-template-columns: 5.6em 1fr; gap: 10px 12px; margin: 0; }
.facts dt { color: var(--muted); font-size: 14.5px; }
.facts dd { margin: 0; font-weight: 600; min-width: 0; }
.poster img { width: 100%; height: auto; border-radius: 12px; display:block; }
.chips { display:flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chips li { background: var(--soft); border-radius: 999px; padding: 4px 12px; font-size: 14px; font-weight: 600; }
.chips li b { color: var(--brand); margin-left: 5px; }
.chips + .sub { margin-top: 8px; font-size: 13px; }

/* 체육관 */
.cols { columns: 2 9em; column-gap: 16px; padding: 0; list-style: none; margin: 0; }
@media (min-width: 700px) { .cols { columns: 4 9em; } }
.cols li { break-inside: avoid; padding: 4px 0; }
.cols a { text-decoration: none; font-weight: 600; color: var(--fg); }
.cols a:hover { color: var(--brand); }
.cols span { color: var(--muted); font-size: 13px; margin-left: 5px; }
.gyms { list-style: none; margin: 0; padding: 0; }
.gyms li { padding: 13px 16px; display:flex; gap: 12px; align-items: center; }
.gyms li + li { border-top: 1px solid var(--line); }
.gyms .gmain { flex: 1; min-width: 0; }
.gyms .name a { font-weight: 700; color: var(--fg); text-decoration: none; }
.gyms .addr { color: var(--muted); font-size: 13.5px; }
.gyms .links a { font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; background: var(--soft); color: var(--sub); padding: 6px 10px; border-radius: 8px; }
.ok { color: var(--verified); font-size: 12.5px; font-weight: 800; margin-left: 6px; white-space: nowrap; }

/* 앱 받기 */
.cta { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }
.cta .app { display:flex; align-items:center; gap: 10px; margin-bottom: 10px; }
.cta .app img { width: 44px; height: 44px; border-radius: 11px; }
.cta .app b { display:block; line-height: 1.2; }
.cta .app span { color: var(--muted); font-size: 13px; }
.cta h2 { margin: 0 0 4px; font-size: 17px; }
.cta p { margin: 0 0 14px; color: var(--sub); font-size: 14.5px; }
.stores { display:flex; flex-wrap: wrap; gap: 8px; }
.store { flex: 1 1 auto; text-align:center; padding: 11px 16px; border-radius: 12px; font-weight: 800; text-decoration:none; font-size: 15px; white-space: nowrap; }
.store.primary { background: var(--brand); color: var(--brand-ink); }
.store.secondary { background: var(--soft); color: var(--fg); }

/* 첫 화면 */
.hero { background: linear-gradient(180deg, #7a1616 0%, #4a1012 42%, #17090a 100%); color: #fff; overflow: hidden; }
.hero .wrap { padding-top: 36px; padding-bottom: 0; text-align: center; }
.hero h1 { font-size: 32px; line-height: 1.25; margin: 0 0 10px; letter-spacing: -0.04em; }
.hero .lead { color: rgba(255,255,255,.78); font-size: 16.5px; margin: 0 auto 18px; max-width: 30em; }
.hero .stores { justify-content: center; }
.hero .store { flex: 0 1 auto; min-width: 136px; }
.hero .store.primary { background: #fff; color: #111113; }
.hero .store.secondary { background: rgba(255,255,255,.14); color: #fff; }
.hero .fine { color: rgba(255,255,255,.6); font-size: 13px; margin: 12px 0 0; }
.shots { display:flex; gap: 12px; overflow-x:auto; padding: 26px 16px 0; margin: 0 -16px; scroll-snap-type: x mandatory; scrollbar-width: none; justify-content: safe center; }
.shots::-webkit-scrollbar { display: none; }
.shots img { width: 200px; max-width: 56vw; height: auto; border-radius: 18px 18px 0 0; scroll-snap-align: center; flex: none; display:block; box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
@media (min-width: 900px) { .hero .wrap { padding-top: 56px; } .hero h1 { font-size: 44px; } .hero .lead { font-size: 18px; } .shots img { width: 224px; } }
.home { display:grid; gap: 12px; }
@media (min-width: 900px) { .home { grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); gap: 20px; align-items: start; } }
.grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.grid > div { background: var(--bg); border:1px solid var(--line); border-radius: 16px; padding: 16px; }
.grid h3 { margin: 0 0 4px; font-size: 16px; color: var(--fg); font-weight: 800; }
.grid p { margin: 0; color: var(--sub); font-size: 14.5px; }
.sect { margin: 28px 2px 10px; font-size: 20px; }

/* 아래 */
footer { color: var(--muted); font-size: 13.5px; padding: 8px 0 40px; }
footer a { color: var(--muted); margin-right: 14px; }
footer p { margin: 8px 0 0; }
footer p a { margin-right: 0; }
.appbar { display:none; }
@media (max-width: 899px) {
  .getapp { display:none; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .appbar { display:flex; align-items:center; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--bg); border-top: 1px solid var(--line);
    padding: 10px max(16px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
  .appbar img { width: 36px; height: 36px; border-radius: 9px; flex: none; }
  .appbar div { flex: 1; min-width: 0; line-height: 1.25; }
  .appbar b { display:block; font-size: 14px; }
  .appbar span { color: var(--muted); font-size: 12.5px; display:block; overflow:hidden; text-overflow: ellipsis; white-space: nowrap; }
  .appbar a { flex: none; background: var(--brand); color: var(--brand-ink); text-decoration:none; font-weight: 800; font-size: 14px; padding: 9px 16px; border-radius: 999px; }
}
