/* Discipline tabs */
.discipline-tabs { display:flex; gap:7px; overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:none; padding:14px 0 9px; }
.discipline-tabs::-webkit-scrollbar { display:none; }
.discipline-tab { flex:none; min-height:38px; padding:0 13px; display:flex; align-items:center; gap:7px; border:1px solid #e6e9e2; border-radius:20px; background:#fff; color:#687168; font:600 11px 'DM Sans',sans-serif; cursor:pointer; }
.discipline-tab span { color:#959d95; font-size:10px; }
.discipline-tab.active { border-color:#dbe8db; background:#edf4ed; color:#315b3d; }
.discipline-tab.active span { color:#4a7251; }
.access-dialog .dialog-actions { margin-top:20px; }
.access-error { min-height:18px; margin:4px 0; color:#a55342; font-size:12px; }
/* Touch-first layout for phones */
@media (max-width: 720px) {
  body { font-size: 15px; }
  .main { padding: 0 14px calc(86px + env(safe-area-inset-bottom)); }
  .topbar { height: 48px; }
  .crumb { max-width: 60%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .crumb span, .crumb b { display: none; }
  .top-right { gap: 8px; }
  .season { font-size: 11px; }
  .avatar.small { width: 32px; height: 32px; }
  .page-head { padding: 21px 0 16px; align-items: center; gap: 10px; }
  .page-head > div:first-child { min-width: 0; }
  .page-head h1 { font-size: 23px; line-height: 1.15; }
  .page-head p { font-size: 12px; line-height: 1.4; }
  .page-head > .head-actions { flex: none; }
  .page-head > .head-actions .button { height: 42px; min-width: 42px; width: auto; padding: 0 11px; font-size: 11px; white-space: nowrap; }
  .page-head > .head-actions .button span { font-size: 16px; margin-right: 3px; }
  .stats { gap: 7px; margin-bottom: 12px; }
  .stat { min-height: 67px; padding: 9px; gap: 7px; }
  .stat-icon { width: 29px; height: 29px; font-size: 14px; }
  .stat small { font-size: 9px; }
  .stat strong { font-size: 17px; }
  .stat:nth-child(3) { min-height: 58px; }
  .content-panel { padding: 15px 12px 18px; }
  .toolbar { gap: 11px; }
  .toolbar h2 { font-size: 16px; }
  .toolbar p { font-size: 11px; line-height: 1.4; }
  .search { height: 44px; border-radius: 9px; }
  .search input { font-size: 16px; }
  .filter-row { height: auto; min-height: 52px; gap: 7px; }
  .discipline-tabs { margin:0 -2px; padding:10px 0 8px; gap:6px; }
  .discipline-tab { min-height:42px; padding:0 13px; font-size:12px; }
  .filters { gap: 4px; }
  .filter { min-height: 40px; padding: 8px 10px; font-size: 12px; }
  .results { font-size: 10px; white-space: nowrap; }
  .contest-grid { gap: 10px; }
  .contest-card { padding: 15px 13px 12px; border-radius: 10px; }
  .discipline, .open-pill { font-size: 10px; }
  .contest-card h3 { margin: 11px 0; font-size: 16px; white-space: normal; line-height: 1.3; }
  .card-info { font-size: 12px; margin: 8px 0; }
  .deadline { padding: 9px; font-size: 11px; line-height: 1.35; }
  .card-bottom { align-items: flex-start; flex-direction: column; gap: 10px; }
  .attending { min-height: 28px; font-size: 11px; }
  .card-actions { width: 100%; gap: 8px; }
  .small-button { min-height: 44px; padding: 0 12px; border-radius: 8px; font-size: 12px; }
  .small-button.icon-only { width: 44px; min-width: 44px; font-size: 15px; }
  .registration-list { margin-top: 12px; }
  .registration-group { border-radius: 10px; }
  .registration-heading { align-items: flex-start; gap: 8px; padding: 13px 12px; font-size: 12px; line-height: 1.4; }
  .registration-heading small { font-size: 10px; text-align: right; white-space: nowrap; }
  .registration-row { grid-template-columns: 1fr auto; gap: 7px 8px; padding: 12px; font-size: 12px; }
  .registration-row .person { grid-column: 1; }
  .registration-row .person-details b { font-size: 12px; }
  .registration-row .muted { padding-left: 36px; line-height: 1.4; }
  .registration-row .cancel-link { grid-column: 2; grid-row: 1 / 3; min-height: 44px; padding: 0 8px; font-size: 11px; }
  .sidebar { height: calc(64px + env(safe-area-inset-bottom)); padding: 4px 8px calc(4px + env(safe-area-inset-bottom)); justify-content: space-evenly; background: #fff; }
  .nav-link { flex: 1; height: 54px; min-width: 0; padding: 4px 3px; gap: 3px; font-size: 10px; line-height: 1.15; white-space: normal; text-align: center; }
  .nav-link > span { width: auto; font-size: 19px; }
  .nav-link i { position: static; margin: 0 0 0 3px; padding: 1px 5px; font-size: 9px; }
  .dialog { inset: auto 0 0; width: 100%; max-width: none; max-height: 92dvh; margin: 0; overflow-y: auto; border-radius: 18px 18px 0 0; padding: 25px 18px calc(18px + env(safe-area-inset-bottom)); }
  .dialog h2 { font-size: 22px; }
  .dialog-sub { font-size: 12px; line-height: 1.45; }
  .dialog label { margin-bottom: 15px; font-size: 12px; }
  .dialog label > input:not([type=checkbox]), .dialog select { height: 48px; padding: 0 12px; font-size: 16px; border-radius: 8px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .check-label { min-height: 44px; gap: 10px; }
  .check-label input { width: 20px; height: 20px; }
  .dialog-actions { position: sticky; bottom: calc(-18px - env(safe-area-inset-bottom)); margin: 10px -18px calc(-18px - env(safe-area-inset-bottom)); padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); }
  .dialog-actions .button { flex: 1; height: 48px; font-size: 13px; }
  .close { right: 0; top: -8px; min-width: 40px; min-height: 40px; font-size: 28px; }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); width: max-content; max-width: calc(100% - 28px); text-align: center; }
  footer { display: none; }
}
@media (max-width: 380px) {
  .main { padding-left: 10px; padding-right: 10px; }
  .page-head h1 { font-size: 21px; }
  .page-head p { font-size: 11px; }
  .page-head > .head-actions .button { padding: 0 8px; }
  .content-panel { padding-left: 10px; padding-right: 10px; }
  .stat { padding: 7px; gap: 5px; }
  .filter { padding-left: 7px; padding-right: 7px; font-size: 11px; }
}
