.community-detail-page { width:min(calc(100vw - 40px), 1360px); max-width:1360px; margin:28px auto 72px; padding-inline:0; color:var(--ink); }
.club-head__back { display:inline-flex; align-items:center; gap:8px; margin-bottom:16px; color:var(--copy); font-size:14px; font-weight:600; }
.club-head__back .icon { width:18px; height:18px; }
.club-head__cover { height:clamp(168px,22vw,300px); overflow:hidden; border-radius:20px; border:1px solid var(--line); background:var(--surface); }
.club-head__cover img, .club-head__cover-fallback { width:100%; height:100%; object-fit:cover; object-position:center 64%; }
.club-head__cover-fallback { background:linear-gradient(135deg,#355446,#9ab69d); }
.club-head__body { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:24px; align-items:start; }
.club-head__avatar { width:132px; height:132px; padding:6px; margin: -68px 0 0 24px; position:relative; border-radius:50%; z-index:1; background:conic-gradient(var(--cta,#f60) var(--club-progress),var(--line) 0); box-shadow:0 0 0 4px var(--surface); }
.club-head__avatar > span { display:block; width:100%; height:100%; border:4px solid var(--surface); border-radius:50%; overflow:hidden; background:var(--surface); }
.club-head__avatar img { width:100%; height:100%; object-fit:cover; }
.club-head__avatar > b { position:absolute; right:2px; bottom:2px; width:34px; height:34px; display:grid; place-items:center; border:3px solid var(--surface); border-radius:50%; background:var(--ink); color:var(--surface); font-size:14px; }
.club-head__identity { padding-top:16px; min-width:0; }
.club-head__identity h1 { margin:0; color:var(--ink); font-size:clamp(25px,2vw,34px); line-height:1.15; font-weight:700; letter-spacing:-.025em; }
.club-head__identity p { margin:8px 0; color:var(--copy); font-size:16px; line-height:1.5; }
.club-head__official { display:inline-grid; place-items:center; width:28px; height:28px; margin-left:10px; border-radius:50%; background:var(--orange-soft,#fff0e8); color:#d54806; vertical-align:middle; }
.club-head__official .icon { width:17px; height:17px; }
.club-head__level { display:flex; flex-wrap:wrap; gap:5px 16px; color:var(--quiet); font-size:14px; }
.club-head__level strong { color:var(--ink); }
.club-head__actions { display:flex; flex-wrap:wrap; gap:8px; padding-top:20px; }
.club-head__actions .community-detail-action { min-height:42px; padding:0 18px; border-radius:999px; font-size:14px; font-weight:650; white-space:nowrap; }
.club-head__actions .community-detail-action--light { color:var(--ink); background:var(--surface); border:1px solid var(--line); }
.club-head__actions .community-detail-action--orange { color:#fff; background:#c94600; border:1px solid #c94600; }
.club-head__actions .icon { width:18px; height:18px; }
.club-column { width:100%; margin:0 auto; }
.club-detail-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(260px,340px); gap:32px; align-items:start; }
.club-detail-main { min-width:0; }
.club-detail-sidebar { min-width:0; position:sticky; top:90px; }
.club-about-heading { margin:16px 0 4px; color:var(--ink); font-size:20px; line-height:1.3; }
.club-detail-sidebar .club-about-list>div { grid-template-columns:minmax(80px, 0.7fr) minmax(0,1fr); gap:10px; }
.club-tabs { position:sticky; top:68px; z-index:20; display:flex; gap:4px; overflow-x:auto; margin:56px 0 32px; background:var(--bg); border-bottom:1px solid var(--line); }
.club-tabs button { display:flex; align-items:center; gap:7px; flex:none; padding:13px 16px; border:0; border-bottom:2px solid transparent; background:transparent; color:var(--quiet); font:600 15px/1.3 var(--font-text); cursor:pointer; }
.club-tabs button[aria-selected="true"] { border-bottom-color:var(--cta,#f60); color:var(--ink); }
.club-tabs button span { padding:2px 7px; border-radius:99px; background:var(--bg-soft); font-size:12px; }
.club-panel { display:grid; gap:24px; min-width:0; }
.club-panel[hidden] { display:none !important; }
.club-panel > section { scroll-margin-top:140px; }
.club-panel .community-feed-block { display:grid; gap:24px; padding:0; }
.club-panel .community-feed-heading { padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
.club-panel .community-feed-heading p { display:none; }
.club-panel .community-feed-heading h2 { color:var(--ink); font-size:24px; font-weight:700; letter-spacing:-.02em; }
.club-panel .community-feed-list { gap:40px; }
.club-panel .community-feed-list > .py-10 { border:1px dashed var(--line); border-radius:16px; color:var(--copy); background:var(--surface); }
.club-panel .community-feed-list > .py-10 h3 { color:var(--ink); }
.club-panel .community-detail-section,.club-panel .community-club-panel,.club-panel .community-club-routes-section,.club-panel .community-rides-section { color:var(--ink); background:var(--surface); border:1px solid var(--line); border-radius:18px; }
@media(max-width:767px) { .community-detail-page { width:calc(100% - 32px); margin-top:16px; } .club-head__body { grid-template-columns:80px minmax(0,1fr); gap:12px; } .club-head__avatar { width:80px; height:80px; margin:-40px 0 0 8px; padding:4px; } .club-head__avatar > span { border-width:3px; } .club-head__avatar > b { width:26px; height:26px; font-size:11px; } .club-head__identity { padding-top:12px; } .club-head__identity h1 { font-size:22px; } .club-head__identity p { font-size:14px; } .club-head__actions { grid-column:1/-1; padding-top:0; } .club-tabs { top:0; margin:28px 0 20px; } .club-tabs button { padding:12px 10px; font-size:14px; } }
.community-detail-page { background:var(--bg); }
.club-settings-dialog { width:min(1040px,calc(100% - 48px)); height:min(900px,calc(100dvh - 48px)); max-width:none; max-height:none; padding:0; border:1px solid var(--line); border-radius:var(--r-lg,24px); background:var(--surface); color:var(--ink); overflow:hidden; box-shadow:var(--shadow-lg); }
.club-settings-dialog::backdrop { background:var(--scrim-55, rgb(0 0 0 / .55)); backdrop-filter:blur(6px); }
.club-settings-dialog__head { display:flex; align-items:start; justify-content:space-between; gap:24px; height:96px; padding:24px 32px; border-bottom:1px solid var(--line); }
.club-settings-dialog__head h2 { margin:0; font-size:22px; font-weight:700; }
.club-settings-dialog__head p { margin:4px 0 0; color:var(--copy); font-size:13px; }
.club-settings-dialog__close { display:grid; place-items:center; flex:none; width:40px; height:40px; padding:0; border:1px solid var(--line); border-radius:50%; background:var(--surface); color:var(--ink); }
.club-settings-dialog__close .icon { width:20px; height:20px; }
.club-settings-dialog iframe { display:block; width:100%; height:calc(100% - 96px); border:0; background:var(--surface); }
@media(max-width:767px) { .club-settings-dialog { width:100%; height:100dvh; border:0; border-radius:0; } .club-settings-dialog__head { height:80px; gap:12px; padding:16px 20px; } .club-settings-dialog iframe { height:calc(100% - 80px); } }
html[data-theme="dark"] .community-detail-page :is(.community-detail-section__header,.community-feed-heading,.community-rides-header,.community-club-routes-header) h2,
html[data-theme="dark"] .community-detail-page :is(.community-overview-card,.community-ride-card__top,.community-club-route-card__body,.community-rides-empty,.community-club-routes-empty,.community-feed-list) h3 { color:var(--ink) !important; }
html[data-theme="dark"] .community-detail-page :is(.community-overview-card p,.community-ride-card__description,.community-club-route-card__body p,.community-rides-empty p,.community-club-routes-empty p,.community-feed-list p) { color:var(--copy) !important; }
.club-private-notice { margin-top:40px; padding:28px; border:1px solid var(--line); border-radius:18px; text-align:center; background:var(--surface); }
.club-private-notice h2 { color:var(--ink); font-size:22px; font-weight:700; }
.club-private-notice p { margin:8px 0 0; color:var(--copy); line-height:1.5; }
.club-rides-actions { display:flex; flex-wrap:wrap; gap:8px; }
.club-rides-actions a { display:inline-flex; align-items:center; min-height:40px; padding:0 16px; border:1px solid var(--line); border-radius:999px; color:var(--ink); font-weight:600; }
html[data-theme="dark"] .community-detail-page .club-panel .community-feed-heading { background:var(--surface) !important; color:var(--ink) !important; }
html[data-theme="dark"] .community-detail-page .club-panel .community-feed-heading h2 { color:var(--ink) !important; }
.community-detail-page .club-head__actions .community-detail-action svg { display:block; color:inherit; }
@media(max-width:767px) {
  .community-detail-page { padding:0 !important; }
  .club-head__cover { margin-inline:-16px; border-inline:0; border-radius:0; }
  .club-head__body { grid-template-columns:minmax(0,1fr); gap:0; }
  .club-head__avatar { grid-column:1; margin:-40px 0 0 8px; }
  .club-head__identity { grid-column:1; padding-top:12px; }
  .club-head__actions { grid-column:1; padding-top:16px; }
  .club-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0; overflow:visible; }
  .club-tabs button { min-width:0; justify-content:center; gap:3px; padding:11px 3px; font-size:clamp(11px,3.2vw,14px); white-space:nowrap; }
  .club-tabs button span { padding:2px 5px; font-size:11px; }
}
@media(max-width:900px) {
  .club-detail-layout { grid-template-columns:minmax(0,1fr); gap:24px; }
  .club-detail-sidebar { position:static; }
}
@media(max-width:767px) { .club-panel .community-feed-list { gap:32px; } }
@media(max-width:360px) {
  .club-tabs { display:flex; overflow-x:auto; scrollbar-width:none; }
  .club-tabs::-webkit-scrollbar { display:none; }
  .club-tabs button { flex:1 0 auto; min-height:44px; padding-inline:5px; font-size:11px; }
}

/* Club overview */
.community-detail-page .club-overview > section { padding:24px; box-shadow:none; }
.community-detail-page .club-overview :is(.community-club-panel__header,.community-club-routes-header,.community-rides-header) { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 18px; }
.community-detail-page .club-overview :is(.community-club-panel__header,.community-club-routes-header,.community-rides-header) p { display:none; }
.community-detail-page .club-overview :is(.community-club-panel__header,.community-club-routes-header,.community-rides-header) h2 { margin:0; color:var(--ink); font-size:21px; line-height:1.25; font-weight:700; letter-spacing:-.02em; }
.community-detail-page .club-overview :is(.community-club-routes-header,.community-rides-header) button,
.community-detail-page .club-overview .club-create-action { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:38px; padding:8px 16px; border:1px solid var(--line); border-radius:999px; background:var(--surface); color:var(--ink); box-shadow:none; font:inherit; font-size:13px; font-weight:600; line-height:1.25; text-transform:none; letter-spacing:0; cursor:pointer; }
.community-detail-page .club-overview .club-create-summary { list-style:none; flex-wrap:wrap; cursor:pointer; }
.community-detail-page .club-overview .club-create-summary::-webkit-details-marker { display:none; }
.community-detail-page .club-overview .club-create-summary::marker { content:''; }
.community-detail-page .club-overview .club-create-action { flex:none; margin-left:auto; }
.community-detail-page .club-overview .club-create-action::before { content:'+'; font-size:18px; line-height:1; }
.community-detail-page .club-overview .club-create-summary:focus-visible { outline:2px solid var(--cta,#f60); outline-offset:4px; border-radius:4px; }
.community-detail-page .club-overview :is(.community-club-routes-empty,.community-rides-empty,.community-soft-empty) { min-height:0; padding:22px; border:1px dashed var(--line); border-radius:14px; background:var(--bg-soft,var(--surface)); color:var(--copy); box-shadow:none; text-align:center; }
.community-detail-page .club-overview .community-club-routes-empty > div { display:none; }
.community-detail-page .club-overview :is(.community-club-routes-empty,.community-rides-empty) h3 { margin:0; color:var(--ink); font-size:15px; font-weight:650; }
.community-detail-page .club-overview :is(.community-club-routes-empty,.community-rides-empty) p { margin:6px auto 0; color:var(--copy); font-size:13px; line-height:1.5; }
.community-detail-page .club-overview .community-club-routes-empty button { margin-top:12px; border-radius:999px; background:#c94600; color:white; text-transform:none; letter-spacing:0; box-shadow:none; }
.community-detail-page .club-overview .community-inline-form { margin:0 0 16px; padding:16px; border:1px solid var(--line); border-radius:14px; background:var(--bg-soft,var(--surface)); box-shadow:none; }
.community-detail-page .club-overview .community-ride-field span { color:var(--copy); font-size:13px; font-weight:600; text-transform:none; letter-spacing:0; }
.community-detail-page .club-overview .community-ride-field :is(input,select,textarea) { background:var(--surface); color:var(--ink); border:1px solid var(--line); border-radius:12px; font-size:14px; font-weight:400; }
.community-detail-page .club-overview .community-ride-modal__actions button[type=submit] { border:0; border-radius:999px; background:#c94600; color:#fff; box-shadow:none; text-transform:none; letter-spacing:0; font-size:13px; }
.community-detail-page .club-overview :is(.community-announcement-card,.community-idea-card,.community-ride-card,.community-club-route-card) { background:var(--surface); color:var(--ink); border-color:var(--line); box-shadow:none; }
.community-detail-page .community-announcement-card__content { min-width:0; flex:1; }
.community-detail-page .community-announcement-card__content > small { display:block; margin-top:10px; }
.community-detail-page .community-announcement-edit { margin-top:12px; }
.community-detail-page .community-announcement-edit summary,
.community-detail-page .community-announcement-delete { display:inline-flex; align-items:center; justify-content:center; min-height:36px; padding:7px 12px; border:1px solid var(--line); border-radius:999px; background:var(--surface); color:var(--ink); font:600 13px/1.2 var(--font-text); cursor:pointer; list-style:none; }
.community-detail-page .community-announcement-edit summary::-webkit-details-marker { display:none; }
.community-detail-page .community-announcement-edit[open] summary { margin-bottom:12px; }
.community-detail-page .community-announcement-edit .community-inline-form { display:grid; gap:12px; margin:0; }
.community-detail-page .community-announcement-flags { display:flex; flex-wrap:wrap; gap:16px; font-size:13px; color:var(--ink); }
.community-detail-page .community-announcement-flags label { display:inline-flex; align-items:center; gap:6px; }
.community-detail-page .community-announcement-delete { flex:none; color:#b42318; }
@media (max-width:480px) { .community-detail-page .community-announcement-card { flex-wrap:wrap; } .community-detail-page .community-announcement-card__content { flex-basis:100%; } }
.club-about-rules-link { width:100%; text-align:left; cursor:pointer; font:inherit; }
.community-detail-page .club-about-rules-link > span:first-child { display:grid; flex:1; gap:4px; }
.community-detail-page .club-about-rules-link > span:last-child { flex:none; }
.community-info-modal .community-ride-modal__panel--rules { width:min(560px,calc(100% - 32px)); max-height:min(80dvh,760px); overflow:auto; border:1px solid var(--line); border-radius:20px; background:var(--surface); color:var(--ink); }
.community-info-modal .community-side-rules--modal { display:grid; gap:0; }
.community-info-modal .community-side-rules--modal .community-side-rule { padding:14px 0; border-bottom:1px solid var(--line); background:transparent; }
.community-info-modal .community-side-rules--modal .community-side-rule:last-child { border-bottom:0; }
.community-info-modal .community-side-rules--modal .community-side-rule strong { color:var(--ink); font-size:15px; line-height:1.5; font-weight:500; }
#community-rules-modal { z-index:1000; place-items:center; padding:max(16px,env(safe-area-inset-top)) 16px max(16px,env(safe-area-inset-bottom)); }
#community-rules-modal .community-ride-modal__panel--rules { display:flex; flex-direction:column; width:min(560px,100%); max-height:min(80dvh,760px); overflow:hidden; padding:22px; }
#community-rules-modal .community-ride-modal__header { flex:none; }
#community-rules-modal .community-side-rules--modal { min-height:0; overflow-y:auto; overscroll-behavior:contain; }
#community-rules-modal .community-ride-modal__header h3 { color:var(--ink); }
html[data-theme="dark"] #community-rules-modal .community-ride-modal__header button { color:var(--ink); background:var(--bg-soft); border:1px solid var(--line); }
html[data-theme="dark"] #community-rules-modal .community-side-rule span { background:#3a2922; color:#ff8b4a; }
html[data-theme="dark"] #community-rules-modal .community-side-rules--modal .community-side-rule { border-color:var(--line); }
@media(max-width:767px) {
  .community-detail-page .club-overview > section { padding:18px 16px !important; background:var(--surface) !important; border-color:var(--line) !important; box-shadow:none !important; }
  .community-detail-page .club-overview :is(.community-club-routes-header,.community-rides-header,.club-create-summary) { flex-direction:row !important; align-items:center; flex-wrap:wrap; }
  .community-detail-page .club-overview :is(.community-club-routes-header,.community-rides-header,.club-create-summary) h2 { font-size:19px !important; line-height:1.25 !important; }
  .community-detail-page .club-overview :is(.community-club-routes-header > button,.club-rides-actions) { margin-left:auto; }
  .community-detail-page .club-overview :is(.community-club-routes-header,.community-rides-header) button { min-height:42px !important; border-radius:999px !important; font-size:13px !important; }
  .community-detail-page .club-overview .club-create-action { min-height:42px; }
  .community-detail-page .club-overview .club-create-summary > div { min-width:0; }
  #community-rules-modal .community-ride-modal__panel--rules { padding:20px 18px; }
  .club-tabs { display:flex; }
  .club-tabs button { flex:1 0 auto; }
}
