/* Shared sizing contract: panels reflow instead of shrinking the whole page. */
.site-header > *, .play-site-header > *, .play-console > *, .play-intro > *,
.deck-layout > *, .deck-workspace > *, .community-head > *, .shop-heading > *,
.net-map > *, .player-resources > *, .play-fields > * { min-width: 0; }
.play-console { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
.play-setup > header { display: block; width: 100%; padding: 0; margin: 0; }
.play-setup h2, .net-screen .net-identity b { overflow-wrap: anywhere; }
.play-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.deck-content, .deck-editor, .deck-editor .panel { min-width: 0; }
.deck-systembar { flex-wrap: wrap; }
.deck-system-tools { margin-left: auto; }
.community-head, .shop-heading, .board-toolbar { flex-wrap: wrap; }
.deck-content input, .deck-content select, .deck-content textarea { max-width: 100%; min-width: 0; }
.deck-content .post-body, .credit-card p, .credits-main a { overflow-wrap: anywhere; }
/* The legacy sidebar rule hides its last panel below 950px. The loadout
   is the editor's only panel and must remain available on phones. */
@media (max-width: 950px) {
 .deck-editor > .panel.deck-loadout { display: block; }
}

@media (max-width: 900px) {
 .play-console { grid-template-columns: minmax(0, 1fr); }
 .play-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 .deck-editor .panel { position: static; max-height: none; overflow: visible; }
 .deck-workspace { grid-template-columns: minmax(0, 1fr); }
 .deck-program-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px; border-right: 0; }
 .deck-program-list > p { display: none; }
 .deck-program-list a { min-height: 44px; margin: 0; }
 .net-screen .net-identity b { font-size: clamp(14px, 2.2vw, 20px); }
}
@media (max-width: 720px) {
 .site-header { gap: 8px; padding: 8px 10px; }
 .site-brand { flex: 1; }
 .site-brand h1 { font-size: clamp(16px, 4.6vw, 23px); }
 .site-brand h1 span { font-size: 9px; line-height: 1.3; }
 .site-brand .eyebrow { display: none; }
 .site-header .profile-corner { flex: 0 0 auto; max-width: 96px; min-height: 44px; }
 .site-header .identity-badge strong { max-width: 48px; }
 .mobile-builder-tabs { top: var(--site-header-height, 65px); }
 .deck-editor .panel { position: static; max-height: none; overflow: visible; }
 .deck-analysis-grid, .analysis-charts { grid-template-columns: minmax(0, 1fr); }
 .play-intro h1 { font-size: clamp(30px, 9vw, 46px); line-height: .95; }
 .play-intro, .play-setup { padding: 24px 16px; }
 .play-setup h2 { font-size: clamp(27px, 7.5vw, 38px); margin-bottom: 24px; }
 .play-fields, .online-choice { grid-template-columns: minmax(0, 1fr); }
 .play-grid-status { min-width: 0; max-width: 100%; }
 .play-modes { padding: 10px; }
 .play-mode b { font-size: clamp(22px, 6vw, 28px); overflow-wrap: anywhere; }
 .play-mode:hover, .play-mode:focus-visible { transform: none; }
 .play-launch { min-width: 0; white-space: normal; line-height: 1.3; }
 .play-fields select, .online-options input, .deck-content input,
 .deck-content select, .deck-content textarea { font-size: 16px; }
 .deck-system-tools button, .community-tabs button, .board-toolbar button,
 .post-actions button, .shop-catalog button { min-height: 44px; }
 .deck-community .community-head { align-items: flex-start; }
 .deck-community .community-head a { min-height: 44px; display: inline-flex; align-items: center; }
 .community-tabs { display: flex; flex-wrap: wrap; }
 .community-tabs button { flex: 1 1 130px; }
 .deck-content { padding: 16px 12px; }
 .net-screen .net-identity { grid-template-columns: 60px minmax(0, 1fr); padding: 12px; gap: 3px 10px; }
 .net-screen .net-identity b { font-size: clamp(13px, 3.6vw, 17px); }
 .net-screen .net-node { min-width: 0; }
 .net-screen .net-node small { overflow-wrap: anywhere; }
 dialog { box-sizing: border-box; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); }
}
@media (max-width: 480px) {
 .play-modes { grid-template-columns: minmax(0, 1fr); }
 .site-header .profile-corner { max-width: 80px; }
 .site-header .identity-badge strong { max-width: 36px; }
 .deck-community .shop-catalog { grid-template-columns: minmax(0, 1fr); }
 .deck-systembar > span { letter-spacing: 0; }
}

