/* Content layouts are sized independently of the shared navigation shell. */
:is(.hw-chart-layout,.mb-matches-layout,.build-catalog-layout,.media-layout,.music-layout,.github-repo-grid)>* {min-width:0;}
:is(.hw-rank-scroll,.hw-catalog-scroll,.hw-comparison-scroll,.mb-table-wrap,.memory-table-wrap,.table-scroll,.game-table-wrap,.history-chart-wrap) {max-width:100%;overscroll-behavior-x:contain;scrollbar-width:thin;}
:is(.hw-controls,.mb-controls,.github-filters,.memory-filters) label {min-width:0;}
:is(.hw-controls,.mb-controls,.github-filters,.memory-filters) :is(input,select) {max-width:100%;}
.project-preview .pet-sprite-frame {flex:0 1 166px;max-width:calc(50% - 6px);height:auto;aspect-ratio:166 / 180;}
.project-preview .pet-sprite-sheet {height:1100%;width:800%;}
.project-repo-slug {max-width:100%;}
.project-repo-slug .icon {flex-shrink:0;}
.media-work-copy {min-width:0;overflow-wrap:anywhere;}
.music-playlist .song-info {min-width:0;}
.music-playlist .song-duration {flex-shrink:0;font-variant-numeric:tabular-nums;}
.market-live {min-width:0;}
.market-quote {flex-wrap:wrap;}
.market-quote dl {flex-wrap:wrap;}
.market-inspection {overflow-wrap:anywhere;}
.market-actions {flex-wrap:wrap;justify-content:flex-end;}
.market-footer {flex-wrap:wrap;}
.game-detail :is(select,fieldset) {min-width:0;max-width:100%;}
.game-detail :is(p,h2,h3,h4,h5) {overflow-wrap:anywhere;}
.script-title {flex-wrap:wrap;}
.script-title .tag {white-space:normal;}
.game-table-wrap {overflow:auto;}

@media(max-width:1100px) {
  .hw-chart-layout,.mb-matches-layout {grid-template-columns:minmax(0,1fr);}
  .hw-catalog-layout .hw-inspector {max-height:none;min-height:0;overflow:visible;}
  .hw-chart-layout .hw-inspector {min-height:0;}
  .hw-specs {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 20px;}
  .mb-board-specs {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 20px;}
}
@media(max-width:700px) {
  .github-repo-grid {grid-template-columns:minmax(0,1fr);}
  .hw-ladder-panel,.mb-workspace {padding:20px 16px;}
  .hw-controls.hw-catalog-controls {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
  .hw-catalog-controls select {min-width:0;width:100%;max-width:none;}
  .hw-controls .hw-search {grid-column:1/-1;width:100%;margin-left:0;}
  .hw-panel-title,.hw-overview,.mb-intro,.mb-models-heading,.mb-ladder-foot,.hw-comparison-heading {align-items:flex-start;flex-wrap:wrap;gap:12px;}
  .hw-snapshot {text-align:left;white-space:normal;}
  .hw-mode-switch {flex-wrap:wrap;}
  .hw-mode-switch>span {width:100%;margin-left:0;}
  .hw-specs,.mb-board-specs {grid-template-columns:minmax(0,1fr);}
  .hw-chart-heading {grid-template-columns:minmax(0,1fr) auto;gap:10px;}
  .hw-chart-heading b {display:none;}
  .hw-rank-row {grid-template-columns:24px minmax(0,1fr) 52px;gap:8px;}
  .hw-rank-number {grid-column:1;grid-row:1;}
  .hw-model-name {grid-column:2;grid-row:1;}
  .hw-relative {grid-column:3;grid-row:1;}
  .hw-rank-row .hw-bar-track {grid-column:2/4;grid-row:2;height:7px;}
  .hw-inspector,.mb-inspector {padding:18px;}
  .hw-comparison-empty span {display:block;margin:8px 0 0;}
  .mb-controls {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
  .mb-controls :is(.mb-cpu-control,.mb-search-control) {min-width:0;grid-column:1/-1;}
  .mb-controls select:not(#mb-cpu) {min-width:0;width:100%;}
  .mb-controls .mb-verified-control {grid-column:1/-1;}
  .mb-table {min-width:450px;}
  .mb-board-specs dd {min-width:0;overflow-wrap:anywhere;}
  .github-filters {grid-template-columns:repeat(2,minmax(0,1fr));width:100%;}
  .github-filters .project-search {grid-column:1/-1;}
  .github-feed-status {align-items:flex-start;flex-wrap:wrap;gap:6px;}
  .project-repo-content {padding:20px;}
  .market-top {align-items:flex-start;flex-wrap:wrap;gap:12px;}
  .market-actions {justify-content:flex-start;gap:10px;}
  .market-quote {display:grid;grid-template-columns:minmax(0,1fr);gap:18px;}
  .market-quote dl {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0;}
  .market-date {text-align:left;}
  .market-date span {display:inline;margin-left:10px;}
  .market-live {padding:20px 16px 15px;}
  .market-title-detail {display:block;margin:8px 0 0;}
  .history-heading,.history-toolbar {flex-wrap:wrap;gap:12px;}
  .history-chart-wrap {overflow:auto;}
  .history-chart {min-width:540px;}
  .stock-chart-select {flex-wrap:wrap;white-space:normal;}
  .stock-chart-select select {min-width:0;max-width:100%;}
}
@media(max-width:420px) {
  .hw-controls.hw-catalog-controls,.mb-controls {grid-template-columns:minmax(0,1fr);}
  .hw-controls .hw-search,.mb-controls :is(.mb-cpu-control,.mb-search-control,.mb-verified-control) {grid-column:auto;}
  .hw-model-name {overflow-wrap:anywhere;}
  .market-quote dl {grid-template-columns:repeat(2,minmax(0,1fr));}
  .market-quote>div {flex-wrap:wrap;gap:12px;}
  .market-ranges {flex-wrap:wrap;}
  .media-work-link {grid-template-columns:80px minmax(0,1fr);gap:12px;}
  .media-work-link .media-cover {width:80px;}
  .media-snapshot-list .media-work-link {grid-template-columns:76px minmax(0,1fr);}
  .media-work-link .media-cover.is-portrait {width:76px;}
  .memory-compare-heading,.memory-result-heading {flex-wrap:wrap;gap:10px;}
  .memory-selector-heading>div:last-child {flex-direction:column;}
  .memory-selector label {width:100%;}
}
@media(pointer:coarse) {
  :is(.hw-controls,.mb-controls,.memory-filters,.memory-selector,.github-filters,.music-search,.music-pagination,.wallpaper-search,.game-detail) :is(input:not([type=checkbox]),select) {font-size:16px;min-height:44px;}
  :is(.hw-mode-switch,.hw-comparison,.mb-chipset-chips,.case-family-tabs,.memory-generation,.game-entry-actions,.script-tabs,.dealer-seats,.market-ranges,.history-switch,.wallpaper-categories,.wallpaper-pagination,.music-pagination) button {min-height:44px;min-width:44px;}
  :is(.hw-catalog-table,.mb-table) button {min-height:44px;}
  .memory-card-top label {display:flex;align-items:center;min-height:44px;gap:7px;}
  .stock-detail-button {min-height:44px;}
}
@media(prefers-reduced-motion:reduce) {
  :is(.media-work-link,.room-project-view):hover img {transform:none;}
}
