/* Shared touch and small-screen rules, including controller-rendered pages. */
*, *::before, *::after { box-sizing: border-box; }
input, select, textarea { min-width: 0; max-width: 100%; font: inherit; font-size: 16px; }
button, summary, .button-link, .icon-link { touch-action: manipulation; }
button, .button-link, .icon-link, summary { min-height: 44px; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid #9ff3dc; outline-offset: 3px; }
h1, h2, h3, dd, .shell__user, .game-name { overflow-wrap: anywhere; }
.search-field, .extra-filters { grid-column: 1 / -1; }
.search-field input { width: 100%; min-height: 52px; }
.extra-filters summary, .quick-location summary { cursor: pointer; padding: 12px 0; color: #bff8eb; }
.extra-filters__fields { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 14px; padding: 12px 0; }
.quick-location form, .quick-location label { display: grid; gap: 10px; }
.quick-location input { width: 100%; padding: 12px; border-radius: 12px; border: 1px solid #637c90; background: #09121c; color: white; }
.quick-location { min-width: 170px; }
.quick-location p { overflow-wrap: anywhere; }
.quick-location button { padding: 10px 14px; border-radius: 14px; }
.quick-location [hidden] { display: none; }
.quick-location p:empty { display: none; }
.location-detail { margin-bottom: 16px; }
.boardgames-page .shell__menu-toggle { display: none; }
.game-form input:not([type='checkbox']):not([type='hidden']) { width: 100%; }
.check { min-height: 44px; }
.check input[type='checkbox'] { width: 22px; height: 22px; flex-shrink: 0; }
.form-save { position: sticky; bottom: 8px; z-index: 5; padding: 12px; border-radius: 16px; background: #163247; box-shadow: 0 4px 24px #0008; }
.form-section-title { grid-column: 1 / -1; font-size: 20px; margin: 12px 0 0; }
@media (max-width: 700px) {
  .shell { max-width: 100%; }
  .shell__header { position: static; }
  .boardgames-page .shell__header { display: grid; grid-template-columns: 1fr auto; padding: 12px; gap: 10px; margin-bottom: 12px; }
  .boardgames-page .shell__brand { gap: 4px; }
  .boardgames-page .shell__brand a { font-size: 22px; }
  .boardgames-page .shell__brand span { display: none; }
  .boardgames-page .shell__menu-toggle { display: inline-flex; }
  .boardgames-page .shell__nav { display: none; grid-column: 1 / -1; width: 100%; }
  .boardgames-page .shell__nav.is-open { display: grid; grid-template-columns: 1fr 1fr; }
  .boardgames-page .shell__nav a { padding: 12px 8px; }
  .boardgames-page .shell__user { grid-column: 1 / -1; }
  .page-head { padding: 16px; }
  .page-head h1 { font-size: 30px; }
  .page-head .hero__eyebrow { display: none; }
  .filter-panel, .game-form, .detail-grid { grid-template-columns: minmax(0,1fr); }
  .extra-filters__fields { grid-template-columns: minmax(0,1fr); }
  .filter-panel, .game-form { padding: 14px; }
  .filter-actions { gap: 8px; }
  .filter-actions > * { flex: 1 1 auto; }
  .filter-hint { display: none; }
  .boardgames-page .catalog__table-wrap { display: block; overflow: visible; background: none; border: 0; box-shadow: none; backdrop-filter: none; }
  .boardgames-page .catalog__table, .boardgames-page .catalog__table tbody { display: block; }
  .boardgames-page .catalog__table thead { display: none; }
  .boardgames-page .catalog__table tr { display: grid; grid-template-columns: 1fr 1fr; background: #203e55; border: 1px solid #ffffff26; border-radius: 18px; padding: 14px; margin: 12px 0; gap: 8px; }
  .boardgames-page .catalog__table td { display: block; border: 0; padding: 4px 0; min-width: 0; overflow-wrap: anywhere; }
  .boardgames-page .catalog__table td::before { content: attr(data-label); display: block; color: #aec4d5; font-size: 12px; }
  .boardgames-page .catalog__table td:first-child { display: none; }
  .boardgames-page .catalog__table .game-name { grid-column: 1 / -1; grid-row: 1; font-size: 21px; }
  .boardgames-page .catalog__table td:nth-child(3), .boardgames-page .catalog__table td:nth-last-child(-n+2) { grid-column: 1 / -1; }
  .boardgames-page .catalog__table td:nth-child(8) { display: none; }
  .pagination { padding: 12px; gap: 8px; }
  .pagination__links { gap: 5px; }
  .pagination a, .pagination__current { padding: 10px 12px; }
  .detail-actions { width: 100%; }
  .detail-actions a { flex: 1; }
  .detail-list dd { overflow-wrap: anywhere; }
  .form-save { bottom: max(8px, env(safe-area-inset-bottom)); }
}
