/* Community's single presentation layer. Existing palette tokens remain the
   source of colour; position previews use the same renderer as the board. */
html body #beta-hub.app-shell>[data-beta-page=community]{--shell-max:1320px;padding-top:20px;padding-bottom:28px}
#beta-hub [data-beta-page=community]{--ch-line:color-mix(in srgb,var(--ink) 15%,var(--panel));--ch-soft:color-mix(in srgb,var(--ink) 4%,var(--panel));font-size:16px;line-height:1.45}
#beta-hub [data-beta-page=community] :is(button,a){-webkit-tap-highlight-color:transparent}
#beta-hub [data-beta-page=community] :is(button,a):focus-visible{outline:3px solid var(--selected);outline-offset:3px}
#beta-hub [data-beta-page=community] :is(button,a):active{filter:brightness(.93)}
#beta-hub .ch-titlebar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}
#beta-hub .ch-titlebar h2{margin:0;font-size:30px;letter-spacing:-.04em;line-height:1.15;font-weight:700}
#beta-hub .ch-inbox{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:8px 14px;border:1px solid var(--ch-line);border-radius:9px;background:var(--panel);color:var(--ink);font-size:14px;font-weight:600}
#beta-hub .ch-inbox.has-unread{border-color:var(--accent);color:var(--ink)}
#beta-hub .ch-inbox[aria-pressed=true]{background:var(--ch-soft);box-shadow:inset 0 -2px var(--accent)}
#beta-hub .ch-inbox svg,.ch-create>svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round;flex:none}
#beta-hub .community-tabs{display:flex;gap:4px;margin:0 0 18px;padding:0 0 12px;border-bottom:1px solid var(--ch-line)}
#beta-hub .community-tabs button{flex:0 1 auto;min-width:100px;min-height:44px;padding:8px 20px;border-radius:8px;border:1px solid transparent;background:transparent;font-size:14px;color:var(--muted);font-weight:600;box-shadow:none}
#beta-hub .community-tabs button[aria-pressed=true]{background:var(--panel);border-color:var(--ch-line);color:var(--ink);box-shadow:inset 0 -2px var(--accent)}
#beta-hub .ch-home{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(280px,1fr);gap:18px;align-items:start}
#beta-hub .ch-home[hidden]{display:none}
#beta-hub .ch-card{min-width:0;margin:0;border:1px solid var(--ch-line);border-radius:12px;background:var(--panel);overflow:hidden;box-shadow:none}
#beta-hub .ch-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0;padding:16px 18px 12px}
#beta-hub .ch-heading h3{margin:0;font-size:18px;letter-spacing:-.02em;font-weight:650;line-height:1.3}
#beta-hub .ch-heading small{font-size:13px;color:var(--muted)}
#beta-hub .ch-heading .ch-eyebrow{display:block;margin-bottom:4px}
#beta-hub .ch-eyebrow{font-size:12px;font-weight:600;letter-spacing:.03em;color:var(--muted)}
#beta-hub .ch-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 14px;border:1px solid var(--ch-line);border-radius:8px;background:var(--panel);color:var(--ink);font:inherit;font-size:14px;font-weight:600;text-decoration:none;cursor:pointer;box-shadow:none}
#beta-hub .ch-button.primary{background:var(--ui-primary,var(--accent));border-color:transparent;color:var(--ui-on-primary,var(--bg))}
#beta-hub .ch-button:hover{border-color:var(--accent)}
#beta-hub .ch-link{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:5px 2px;border:0;border-radius:4px;background:transparent;color:var(--ink);font-size:14px;font-weight:500;text-decoration:underline;text-decoration-color:var(--ch-line);text-underline-offset:4px;cursor:pointer;box-shadow:none}
#beta-hub .ch-link:hover{text-decoration-color:var(--accent)}
#beta-hub .ch-feature-board{display:block;width:calc(100% - 20px);margin:0 10px;padding:0;border:0;border-radius:7px;overflow:hidden;background:var(--bg);cursor:pointer}
#beta-hub .position-preview{display:block;width:100%;height:auto;aspect-ratio:1.6;pointer-events:none;isolation:isolate}
#beta-hub .ch-feature-board .position-preview{aspect-ratio:auto;height:260px}
.position-preview .tile-group{filter:drop-shadow(1px 4px 2px #0004)}
#beta-hub .ch-feature-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px}
#beta-hub .ch-feature-footer span{display:grid;gap:3px;min-width:0}
#beta-hub .ch-feature-footer strong{font-size:14px;font-weight:600}
#beta-hub .ch-feature-footer small{font-size:13px;color:var(--muted)}
#beta-hub .ch-week{padding:6px 18px 12px;border-top:1px solid var(--ch-line)}
#beta-hub .ch-week .ch-heading{padding:0 0 6px;font-size:13px}
#beta-hub .ch-week-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}
#beta-hub .ch-week-day{display:grid;justify-items:center;gap:4px;color:var(--muted)}
#beta-hub .ch-week-day small{font-size:12px}
#beta-hub .ch-day-mark{position:relative;display:grid;place-items:center;width:28px;height:30px}
#beta-hub .ch-day-mark svg{width:28px;height:30px;fill:transparent;stroke:var(--ch-line);stroke-width:1.3}
#beta-hub .ch-day-mark b{position:absolute;font-size:15px;color:var(--ui-on-primary,var(--bg))}
#beta-hub .ch-week-day[data-today=true] svg{stroke:var(--accent);stroke-width:2}
#beta-hub .ch-week-day[data-solved=true] svg{fill:var(--ui-primary,var(--accent));stroke:var(--ui-primary,var(--accent))}
#beta-hub .ch-week .ch-link{min-height:34px;font-size:13px;margin:0}
#beta-hub .ch-side{display:grid;gap:18px;min-width:0}
#beta-hub .ch-actions{display:flex;gap:8px;padding:0 18px 14px}
#beta-hub .ch-actions>*{flex:1}
#beta-hub .ch-table-home{padding:0 18px 10px}
#beta-hub .ch-table-home #community-tables>article:nth-of-type(n+4){display:none}
#beta-hub .ch-table-home .community-empty{min-height:0;padding:8px 0 6px;border:0;background:none;gap:2px}
#beta-hub .ch-table-home .community-empty strong{font-size:14px;color:var(--muted);font-weight:400}
#beta-hub .ch-table-home .community-empty :is(p,button){display:none}
#beta-hub .ch-table-home .community-table-card{padding:10px 0;margin:0;border:0;border-top:1px solid var(--ch-line);border-radius:0;background:none}
#beta-hub .ch-table-home .community-table-card strong{font-size:14px}
#beta-hub .ch-table-home .community-table-card>div>span{font-size:12px}
#beta-hub .ch-table-home .table-host-mark{width:32px;height:36px;min-width:32px;flex:none}
#beta-hub #community-faces{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:0 18px;overflow:visible}
#beta-hub .community-face{display:flex;flex-direction:column;align-items:center;min-width:0;min-height:0;padding:8px 4px;gap:6px;background:var(--ch-soft);border:0;border-radius:8px}
#beta-hub .community-face .account-avatar{width:38px;height:42px;clip-path:polygon(50% 0,94% 25%,94% 75%,50% 100%,6% 75%,6% 25%);border-radius:0}
#beta-hub .community-face strong{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:600}
#beta-hub .community-face small{font-size:12px}
#beta-hub .community-welcome{grid-column:1/-1;margin:0;padding:0;border:0;border-radius:0;font-size:14px;line-height:1.6;color:var(--muted)}
#beta-hub .ch-rankings{margin:8px 18px 10px}
#beta-hub .ch-shelf{grid-column:1/-1}
#beta-hub .ch-shelf .ch-creation-grid{padding:0 18px 18px}
#beta-hub .ch-creation-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
#beta-hub .ch-creation{position:relative;display:flex;flex-direction:column;min-width:0;padding:0;border:1px solid var(--ch-line);border-radius:9px;background:var(--panel);color:var(--ink);text-align:left;text-decoration:none;overflow:hidden;cursor:pointer;box-shadow:none;font:inherit}
#beta-hub .ch-creation:hover{border-color:var(--accent)}
#beta-hub .ch-preview{display:block;width:100%;aspect-ratio:1.6;overflow:hidden;background:var(--ch-soft)}
#beta-hub .ch-preview-empty{display:grid;place-items:center;height:100%;font-size:14px;color:var(--muted)}
#beta-hub .ch-creation-copy{display:grid;gap:4px;padding:12px 32px 12px 12px;min-width:0}
#beta-hub .ch-creation-copy strong{font-size:15px;line-height:1.3;font-weight:600;overflow-wrap:anywhere}
#beta-hub .ch-author{font-size:13px;color:var(--muted)}
#beta-hub .ch-creation>svg{position:absolute;right:10px;bottom:20px;width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6}
#beta-hub .ch-create{grid-column:1/-1;display:flex;align-items:center;gap:14px;min-height:68px;padding:14px 18px;border:1px solid var(--ch-line);border-radius:10px;background:var(--panel);text-align:left;color:var(--ink)}
#beta-hub .ch-create>span{display:grid;gap:2px;flex:1}
#beta-hub .ch-create strong{font-size:15px;font-weight:600}
#beta-hub .ch-create small{font-size:13px;color:var(--muted)}
#beta-hub .ch-creations>.ch-heading{padding:0 0 16px}
#beta-hub .ch-filters{display:flex;gap:6px;margin-bottom:18px}
#beta-hub .ch-filters button{min-height:44px;padding:8px 18px;border:1px solid var(--ch-line);border-radius:8px;font-size:14px;background:var(--panel)}
#beta-hub .ch-filters button[aria-pressed=true]{background:var(--ch-soft);border-color:var(--accent);color:var(--ink)}
#beta-hub .ch-note{font-size:14px;line-height:1.6;color:var(--muted)}
#beta-hub .ch-catalog-status:empty{display:none}
#beta-hub .ch-catalog-status{margin-bottom:16px}
#beta-hub .ch-inbox-page{max-width:880px;margin:auto}
#beta-hub .ch-inbox-page>.community-section{margin-bottom:24px;border-bottom:1px solid var(--ch-line);padding-bottom:12px}
#beta-hub .ch-inbox-page .community-section-heading h3{font-size:18px}
#beta-hub [data-community-section=players],#beta-hub [data-community-section=ratings],#beta-hub [data-community-section=tables]{max-width:980px;margin:auto}
#beta-hub #community-players{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
#beta-hub #community-players .community-player-card{background:var(--panel);border-color:var(--ch-line)}
#beta-hub #community-players .community-player-presence{font-size:13px}
#beta-hub #community-players .community-player-actions button{font-size:14px;min-height:44px}
#beta-hub #shell-avatar{clip-path:polygon(50% 0,94% 25%,94% 75%,50% 100%,6% 75%,6% 25%);border-radius:0}
@media(min-width:1051px){
 #beta-hub .ch-challenge{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(180px,.85fr)}
 #beta-hub .ch-challenge>.ch-heading{grid-column:2;grid-row:1;align-items:start;padding:24px 22px 8px}
 #beta-hub .ch-challenge>.ch-heading h3{font-size:24px;line-height:1.25}
 #beta-hub .ch-challenge>.ch-feature-board{grid-column:1;grid-row:1/3;width:100%;margin:0;border-radius:0}
 #beta-hub .ch-feature-board .position-preview{height:320px}
 #beta-hub .ch-feature-footer{grid-column:2;grid-row:2;flex-direction:column;align-items:start;justify-content:space-between;padding:12px 22px 24px}
 #beta-hub .ch-week{grid-column:1/-1}
}
@media(max-width:1050px){
 #beta-hub .ch-home{grid-template-columns:minmax(0,1.35fr) minmax(260px,1fr);gap:14px}
 #beta-hub .ch-actions{flex-direction:column}
 #beta-hub .ch-creation-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
 #beta-hub .ch-shelf .ch-creation:nth-child(n+4){display:none}
}
@media(max-width:700px){
 html body #beta-hub.app-shell>[data-beta-page=community]{padding:14px 12px 22px}
 #beta-hub .ch-titlebar{margin-bottom:10px}
 #beta-hub .ch-titlebar h2{font-size:27px}
 #beta-hub .community-tabs{margin-bottom:14px;padding-bottom:10px}
 #beta-hub .community-tabs button{flex:1;min-width:0;min-height:44px;padding:8px 12px}
 #beta-hub .ch-home{display:flex;flex-direction:column;gap:14px}
 #beta-hub .ch-home>*{width:100%;box-sizing:border-box}
 #beta-hub .ch-heading{padding:13px 14px 10px}
 #beta-hub .ch-heading h3{font-size:18px}
 #beta-hub .ch-challenge .ch-heading h3{font-size:20px}
 #beta-hub .ch-feature-footer{padding:12px 14px;gap:10px}
 #beta-hub .ch-feature-footer .ch-button{max-width:50%;padding:10px 12px}
 #beta-hub .ch-feature-footer small{font-size:12px}
 #beta-hub .ch-feature-board .position-preview{height:210px}
 #beta-hub .ch-week{padding:6px 14px 12px}
 #beta-hub .ch-week .ch-link{min-height:44px}
 #beta-hub .ch-side{display:contents}
 #beta-hub .ch-side>*{width:100%;box-sizing:border-box}
 #beta-hub .ch-games{order:2}
 #beta-hub .ch-shelf{order:3}
 #beta-hub .ch-people{order:4}
 #beta-hub .ch-create{order:5}
 #beta-hub .ch-actions{flex-direction:row;padding:0 14px 12px}
 #beta-hub .ch-table-home{padding:0 14px 8px}
 #beta-hub .ch-shelf .ch-creation-grid{padding:0 12px 12px}
 #beta-hub .ch-creation-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 #beta-hub .ch-shelf .ch-creation:nth-child(n+4){display:flex}
 #beta-hub .ch-creation-copy{padding:10px 22px 10px 10px}
 #beta-hub .ch-creation-copy .ch-eyebrow{font-size:12px;letter-spacing:0}
 #beta-hub .ch-creation-copy strong{font-size:14px}
 #beta-hub .ch-creation>svg{right:5px;width:13px}
 #beta-hub #community-players{grid-template-columns:1fr}
 #beta-hub .ch-inbox{padding:8px 12px}
}
@media(prefers-reduced-motion:no-preference){#beta-hub .ch-creation{transition:border-color .15s,background-color .15s}}
