/* ROWING V10 - mobile composition, navigation and cards. Desktop V9 unchanged. */
.mobile-more,.mobile-back-top { display:none; }


@media (max-width:700px) {
  html {scroll-padding-top:12px;}
  .portal {font-size:14px;overflow-x:clip;}
  .portal .workspace {min-width:0;width:100%;margin:0;}

  /* A lean, stationary identity above the sport controls. */
  .portal .sidebar {
    position:relative;top:auto;inset:auto;z-index:40;
    display:block;width:100%;min-height:58px;
    padding:0;overflow:visible;background:#09233d;box-shadow:none;
  }
  .portal .brand {
    width:100%;min-height:58px;display:flex;align-items:center;
    gap:10px;padding:9px 16px;margin:0;
  }
  .portal .brand img {width:33px;height:38px;object-fit:contain;}
  .portal .brand-type {font-size:20px;line-height:1;letter-spacing:1.45px;}
  .portal .brand-type>span {font-size:7px;line-height:1.2;letter-spacing:1.2px;margin-top:5px;}
  .portal .sidebar-divider,.portal .sidebar-label,.portal .sidebar-bottom {display:none;}

  /* Persistent five-item navigation, with a real native disclosure for extras. */
  .portal .sidebar .main-nav {
    position:fixed;left:0;right:0;bottom:0;z-index:80;
    width:100%;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));
    height:auto;min-height:65px;gap:3px;margin:0;
    padding:6px 7px max(6px,env(safe-area-inset-bottom));
    background:#082239;border-top:1px solid #26465e;
    box-shadow:0 -8px 22px rgba(8,33,55,.12);
    overflow:visible;scroll-snap-type:none;
  }
  .portal .sidebar .main-nav>.nav-link[data-route="divisiones"],
  .portal .sidebar .main-nav>.nav-link[data-route="temporadas"] {display:none;}
  .portal .sidebar .main-nav>.nav-link,
  .portal .sidebar .main-nav>.mobile-more>summary {
    display:flex;flex-direction:column;justify-content:center;align-items:center;
    min-width:0;min-height:51px;gap:3px;padding:5px 2px;
    border:0;border-radius:9px;box-shadow:none;
    background:transparent;color:#afc5d7;
    font-size:10px;font-weight:600;line-height:1.15;white-space:nowrap;
  }
  .portal .sidebar .main-nav>.nav-link.is-active,
  .portal .sidebar .main-nav>.mobile-more.is-active>summary,
  .portal .sidebar .main-nav>.mobile-more[open]>summary {
    background:#163f5a;color:#ffffff;box-shadow:inset 0 2px 0 #1ab8e8;
  }
  .portal .sidebar .main-nav .p-nav-icon,
  .portal .sidebar .main-nav .p-nav-icon svg,
  .portal .sidebar .mobile-more svg {width:21px;height:21px;min-width:21px;color:inherit;}
  .portal .sidebar .main-nav>.mobile-more {display:block;min-width:0;}
  .portal .mobile-more summary {cursor:pointer;list-style:none;user-select:none;}
  .portal .mobile-more summary::-webkit-details-marker {display:none;}
  .portal .mobile-more-panel {
    position:fixed;z-index:85;left:12px;right:12px;
    bottom:calc(73px + env(safe-area-inset-bottom));
    display:grid;gap:4px;padding:14px;border-radius:14px;
    color:#e3f0f8;background:#10334d;border:1px solid #31566f;
    box-shadow:0 14px 38px rgba(0,21,40,.35);
  }
  .portal .mobile-more-panel p {padding:3px 10px 6px;font-size:10px;font-weight:700;color:#9ebbd0;letter-spacing:1.1px;}
  .portal .mobile-more-panel a {
    display:flex;align-items:center;min-height:48px;padding:11px 12px;
    font-size:14px;font-weight:600;border-radius:8px;
  }
  .portal .mobile-more-panel a.is-active,
  .portal .mobile-more-panel a:hover {background:#20516f;color:#fff;}
  .portal .sidebar .nav-link:focus-visible,
  .portal .mobile-more summary:focus-visible,
  .portal .mobile-more-panel a:focus-visible {outline:3px solid #21c2f1;outline-offset:-3px;}

  /* Context controls appear immediately below the brand. */
  .portal .topbar {
    display:block;height:auto;min-height:0;gap:0;
    padding:11px 14px 12px;border-bottom:1px solid #dce6ed;
    background:#fff;box-shadow:none;
  }
  .portal .topbar .breadcrumb {display:none;}
  .portal .topbar .topbar-actions {display:block;width:100%;max-width:none;margin:0;}
  .portal .topbar-filters .p-context {
    display:grid;grid-template-columns:72px minmax(0,1.2fr) minmax(0,.88fr);
    align-items:end;gap:8px;width:100%;padding:0;margin:0;border:0;
  }
  .portal .topbar-filters .p-context .p-field:nth-child(3) {grid-column:auto;}
  .portal .topbar-filters .p-field,
  .portal .topbar-filters .p-context .p-field:nth-child(2),
  .portal .topbar-filters .p-context .p-field:nth-child(3) {min-width:0;gap:4px;}
  .portal .topbar-filters .p-field>span {font-size:9px;letter-spacing:.4px;line-height:1.2;color:#60778a;}
  .portal .topbar-filters .p-field select {
    width:100%;min-height:44px;padding:8px 23px 8px 9px;
    border:1px solid #cfdee7;border-radius:9px;background-color:#fff;
    background-position:right 7px center;background-size:13px 13px;
    font-size:13px;line-height:1.15;color:#102c44;
  }
  .portal .topbar-filters .p-field select:focus-visible {outline:3px solid #00a7d8;outline-offset:2px;}

  /* A short mobile introduction, with all four divisions still visible. */
  .portal main {width:100%;min-width:0;padding:16px 14px calc(110px + env(safe-area-inset-bottom));}
  .portal #page-content>.p-heading {display:block;margin-bottom:12px;}
  .portal #page-content>.p-heading .p-kicker {display:none;}
  .p-heading h1 {font-size:clamp(25px,7vw,29px);letter-spacing:-.75px;line-height:1.12;overflow-wrap:break-word;}
  .p-heading p:not(.p-kicker) {margin-top:6px;font-size:12px;line-height:1.45;}
  .p-heading-aside {display:none;}
  .portal .p-divisions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:11px;}
  .portal .p-division {
    min-height:86px;padding:11px 12px;border-radius:11px;
    transition:background .15s,border-color .15s;
  }
  .portal .p-division:hover {transform:none;box-shadow:none;}
  .portal .p-division-comp {font-size:9px;line-height:1.2;letter-spacing:.65px;}
  .portal .p-division h2 {font-size:14px;line-height:1.18;letter-spacing:-.15px;margin:5px 0 6px;}
  .portal .p-division-count {font-size:10px;line-height:1.3;margin-top:auto;}

  /* Scorecard-style KPI layout: clear values, little wasted vertical space. */
  .portal .p-metrics {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:12px;}
  .portal .p-metric {
    min-height:96px;padding:12px 13px!important;
    border-radius:11px;border-color:#dce6ee;
  }
  .portal .p-metric:first-child {padding-top:11px!important;}
  .portal .p-metric>span {font-size:11px;font-weight:700;line-height:1.3;}
  .portal .p-metric strong {font-size:30px;line-height:1.05;margin:7px 0 4px;letter-spacing:-.5px;}
  .portal .p-metric small {font-size:10px;line-height:1.2;}
  .portal .p-home-feature>.p-section-head {margin:14px 0 9px;}
  .p-section-head {align-items:flex-start;gap:9px;margin:23px 0 11px;}
  .p-section-head h2 {font-size:21px;line-height:1.2;}
  .p-section-head p {font-size:11px;}

  /* Scoreboard with room for three columns, even at 320px. */
  .portal .p-board {margin-bottom:14px;border-radius:13px;}
  .portal .p-board-top {padding:12px 13px 0;font-size:9px;gap:8px;letter-spacing:.35px;}
  .portal .p-board .p-badge {font-size:9px;padding:3px 7px;}
  .portal .p-board-main {grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:7px;padding:17px 11px 16px;}
  .portal .p-board-team,.portal .p-board-team:last-child {flex-direction:column;gap:6px;text-align:center;align-items:center;}
  .portal .p-board-team strong {font-size:12px;line-height:1.18;overflow-wrap:anywhere;}
  .portal .p-board-team small {margin:0 0 4px;font-size:8px;line-height:1.2;letter-spacing:.8px;}
  .portal .p-crest,.portal .p-crest-letter {width:41px;height:46px;object-fit:contain;}
  .portal .p-board-score strong {font-size:clamp(38px,11.8vw,50px);}
  .portal .p-board-score>span {font-size:19px;margin:0 3px;}
  .portal .p-board-score>small {font-size:8px;letter-spacing:.25px;margin-top:5px;}
  .portal .p-board-meta {padding:10px 12px;justify-content:center;gap:5px 13px;font-size:10px;line-height:1.35;}

  /* Filters and list cards: compact, readable and genuinely touch-friendly. */
  .portal .p-toolbar {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:13px;border-radius:12px;margin-bottom:13px;}
  .portal .p-toolbar .p-search {grid-column:1/-1;}
  .portal .p-toolbar .p-field {min-width:0;max-width:none;width:100%;gap:5px;}
  .portal .p-toolbar .p-field>span {font-size:10px;letter-spacing:.35px;}
  .portal .p-toolbar .p-field select,
  .portal .p-toolbar .p-field input {width:100%;font-size:16px;min-height:44px;min-width:0;border-radius:8px;}
  .portal .p-toolbar .button {min-width:0;min-height:44px;font-size:12px;}
  .portal .p-toolbar [data-action="export"] {grid-column:1/-1;}
  .portal .p-toolbar [data-action="clear-filters"] {grid-column:1/-1;}
  .portal .p-count-label {margin:8px 0 10px;font-size:11px;}
  .portal .p-panel {border-radius:12px;}
  .portal .p-panel:has(.p-mobile-cards) {background:transparent;border:0;overflow:visible;}
  .portal .p-table.p-mobile-cards tbody {padding:0;gap:9px;background:transparent;}
  .portal .p-table.p-mobile-cards tbody tr {padding:13px 14px;gap:7px 11px;border-radius:12px;box-shadow:0 2px 6px rgba(12,45,69,.035);}
  .portal .p-table.p-mobile-cards td {font-size:13px;line-height:1.35;}
  .portal .p-table.p-mobile-cards td::before {font-size:10px;color:#657c8e;letter-spacing:.15px;margin-bottom:3px;}
  .portal .p-table.p-mobile-cards td.p-name-cell a {font-size:15px;}
  .portal .p-table.p-mobile-cards .p-score-cell {font-size:23px;}
  .portal .p-table.p-mobile-cards.p-matches-table tbody tr {gap:8px 10px;}
  .portal .p-matches-table td:nth-child(7) {grid-column:1/-1;grid-row:5;align-items:stretch!important;}
  .portal .p-matches-table td:nth-child(7)::before {display:none;}
  .portal .p-matches-table td:nth-child(7) a {
    min-height:40px;display:flex;align-items:center;justify-content:center;
    margin-top:2px;padding:9px 12px;
    border-radius:8px;background:#edf7fc;border:1px solid #d1e9f5;
    color:#057da7;font-size:12px;text-decoration:none;
  }
  .portal .p-matches-table td:nth-child(7) a::after {content:' informe  \2192';}
  .portal .p-table.p-mobile-cards.p-rankings-table tbody tr {grid-template-columns:30px minmax(0,1fr) auto;}
  .portal .p-table.p-mobile-cards.p-rankings-table td:nth-child(2) {min-width:0;}
  .portal .p-table.p-mobile-cards.p-rankings-table td:nth-child(3) {text-align:right!important;}
  .portal .p-table.p-mobile-cards.p-rankings-table td:nth-child(6) {font-size:12px;}
  .portal .p-table-note {padding:12px 13px;font-size:11px;line-height:1.45;}

  /* Individual player and match reports get consistent mobile rhythm. */
  .portal .p-player-summary {padding:16px;gap:12px;border-radius:13px;}
  .portal .p-player-summary h1 {font-size:22px;line-height:1.15;}
  .portal .p-player-summary .p-badge {margin-left:0;}
  .portal .p-player-grid {grid-template-columns:1fr;gap:9px;}
  .portal .p-player-tile {min-height:74px;padding:14px 15px;}
  .portal .p-player-tile strong {font-size:14px;line-height:1.25;}
  .portal .p-tabs {display:flex;flex-wrap:wrap;width:100%;gap:6px;}
  .portal .p-tabs button {min-height:44px;flex:1 1 auto;padding:10px 12px;font-size:12px;}
  .portal .p-timeline {padding:0 12px;}
  .portal .p-timeline li {gap:9px;}
  .portal .p-roster {grid-template-columns:1fr;}
  .portal .p-roster-item {padding:12px 0;}
  .portal .p-info-list p {font-size:12px;line-height:1.55;}
  .portal .p-season-card {padding:17px;gap:12px;}
  .portal .p-footer {padding:20px 0 5px;margin-top:24px;}
  .portal .p-footer>div {gap:6px;}
  .portal .p-footer a {min-height:44px;display:flex;align-items:center;}
  .portal .toast {bottom:calc(75px + env(safe-area-inset-bottom));max-width:calc(100vw - 24px);}
  .mobile-back-top {
    position:fixed;z-index:65;right:14px;bottom:calc(84px + env(safe-area-inset-bottom));
    width:44px;height:44px;display:grid;place-items:center;
    border:1px solid #cfe3ed;border-radius:12px;
    background:#fff;color:#11648b;box-shadow:0 4px 14px rgba(9,35,61,.14);
    opacity:0;visibility:hidden;transform:translateY(8px);pointer-events:none;
    transition:opacity .15s,transform .15s,visibility .15s;
  }
  .mobile-back-top svg {width:22px;height:22px;}
  .portal.mobile-scrolled .mobile-back-top {opacity:1;visibility:visible;transform:translateY(0);pointer-events:auto;}
  .mobile-back-top:focus-visible {outline:3px solid #00a9d8;outline-offset:3px;}
}

@media (max-width:380px) {
  .portal .topbar-filters .p-context {grid-template-columns:78px minmax(0,1fr);gap:8px;}
  .portal .topbar-filters .p-context .p-field:nth-child(3) {grid-column:1/-1;}
  .portal .brand {padding-left:12px;padding-right:12px;}
  .portal .topbar {padding-left:12px;padding-right:12px;}
  .portal main {padding-left:12px;padding-right:12px;}
  .portal .p-division {padding:10px 11px;min-height:87px;}
  .portal .p-division h2 {font-size:13px;}
  .portal .p-division-count {font-size:9px;}
  .portal .p-metric {padding:11px!important;}
  .portal .p-metric strong {font-size:27px;}
  .portal .p-board-main {padding-left:8px;padding-right:8px;gap:4px;}
  .portal .p-board-score strong {font-size:37px;}
  .portal .p-board-team strong {font-size:11px;}
  .portal .p-crest,.portal .p-crest-letter {width:35px;height:42px;}
  .portal .p-table.p-mobile-cards tbody tr {padding:12px;}
}

@media (prefers-reduced-motion:reduce) {
  .portal .main-nav,.portal .mobile-more-panel {scroll-behavior:auto;transition:none;}
}
@media print {
  .mobile-more {display:none!important;}
}

/* V12 — compact refinement of the already approved mobile navigation and selectors. */
@media (max-width:700px) {
  .portal .topbar {
    border-bottom-color: #e0e9f0;
    padding-block: 12px;
  }
  .portal .topbar-filters .p-context { column-gap: 8px; }
  .portal .topbar-filters .p-field>span {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .35px;
    line-height: 1.2;
    color: #61788a;
  }
  .portal .topbar-filters .p-field select {
    min-height: 44px;
    font-size: 14px;
    line-height: 1.2;
    padding: 9px 26px 9px 11px;
    background-color: #f9fbfd;
    background-size: 13px 13px;
    background-position: right 9px center;
    border-radius: 9px;
    border-color: #d4e1ea;
  }
  .portal .sidebar .main-nav {
    gap: 4px;
    padding-left: 8px;
    padding-right: 8px;
    background: #09243d;
    border-top-color: #29445c;
    box-shadow: 0 -4px 18px rgba(6, 27, 46, .12);
  }
  .portal .sidebar .main-nav>.nav-link,
  .portal .sidebar .main-nav>.mobile-more>summary {
    border: 1px solid transparent;
    border-radius: 10px;
    color: #b8cbd9;
    font-size: 10px;
    letter-spacing: .08px;
    min-height: 51px;
    transition: background-color .16s ease, color .16s ease, border-color .16s ease;
  }
  .portal .sidebar .main-nav>.nav-link:hover:not(.is-active),
  .portal .sidebar .main-nav>.mobile-more>summary:hover {
    background: #143a55;
    color: #fff;
  }
  .portal .sidebar .main-nav>.nav-link.is-active,
  .portal .sidebar .main-nav>.mobile-more.is-active>summary,
  .portal .sidebar .main-nav>.mobile-more[open]>summary {
    background: #16405c;
    border-color: rgba(90, 178, 212, .34);
    color: #fff;
    box-shadow: none;
  }
  .portal .sidebar .main-nav>.nav-link.is-active .p-nav-icon,
  .portal .sidebar .main-nav>.mobile-more.is-active svg { color: #7cddf8; }
  .portal .mobile-more-panel {
    border-color: #44647a;
    background: #10334c;
    border-radius: 13px;
    box-shadow: 0 12px 32px rgba(4, 25, 43, .26);
    padding: 12px;
    max-height: min(65dvh, 390px);
    overflow-y: auto;
  }
  .portal .mobile-more-panel a { border-radius: 9px; }
  .portal .mobile-more-panel a:focus-visible {outline:2px solid #7bddf8;outline-offset:-2px;}
  .portal .p-toolbar, .portal .p-panel:not(:has(.p-mobile-cards)) {
    border-color: #dae5ed;
    box-shadow: 0 3px 12px rgba(13,45,70,.025);
  }
}
@media (max-width:380px) {
  /* Two rows are retained for readability rather than truncating the tournament. */
  .portal .topbar-filters .p-context {column-gap:8px;}
  .portal .topbar-filters .p-field select {
    padding-left:10px;
    padding-right:28px;
    font-size:14px;
  }
}
@media (prefers-reduced-motion:reduce) {
  .portal .sidebar .main-nav>.nav-link,
  .portal .sidebar .main-nav>.mobile-more>summary {transition:none;}
}

/* V15: final spacing for public mobile pages. */
@media (max-width:700px) {
  .portal .p-source-summary {
    width: 100%;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin: 2px 0 20px;
    padding: 11px 12px;
    font-size: 12px;
  }
  .portal .p-source-inline {margin-top: 20px;padding-top: 12px;font-size: 12px;}
  .portal .p-simple-caveat {font-size: 12px;line-height: 1.5;margin-bottom: 12px;}
  .portal .p-player-summary {align-items: center;}
  .portal .p-player-summary h1 {overflow-wrap: anywhere;}
  .portal .p-roster-item .p-minutes-caption {gap: 8px;}
  .portal .p-roster-item .p-minutes-caption strong {white-space: nowrap;}
}

/* V16 — Inicio mobile: el ultimo resultado es el primer punto de atencion.
   Mismo markup y datos que desktop; JS mueve el bloque, sin duplicar el informe. */
.p-home-results-link { display:none; }
@media (max-width:700px) {
  .portal #page-content>.p-heading:has(+ .p-home-feature) {margin-bottom:6px;}
  .portal #page-content>.p-heading:has(+ .p-home-feature) p:not(.p-kicker) {max-width:36ch;}
  .portal #page-content>.p-home-feature>.p-section-head {
    margin:13px 0 10px;align-items:center;gap:8px;
  }
  .portal #page-content>.p-home-feature>.p-section-head h2 {
    font-size:clamp(19px,5.5vw,23px);letter-spacing:-.4px;line-height:1.17;
  }
  .portal #page-content>.p-home-feature .p-home-results-link {
    display:inline-flex;align-items:center;gap:5px;flex-shrink:0;
    font-size:12px;font-weight:700;white-space:nowrap;
    color:#087da9;text-decoration:none;min-height:36px;
  }
  .portal #page-content>.p-home-feature .p-home-results-link:focus-visible {
    outline:2px solid #00a7d8;outline-offset:3px;border-radius:3px;
  }
  .portal #page-content>.p-home-feature .p-board {
    border:1px solid #158cba;
    box-shadow:0 5px 16px rgba(7,39,66,.14);
    margin-bottom:14px;
  }
  .portal #page-content>.p-home-feature .p-board-top {font-size:10px;}
  .portal #page-content>.p-home-feature .p-board-main {padding-block:17px 16px;}
  .portal #page-content>.p-home-feature + .p-divisions {margin-top:3px;}
  .portal #page-content>.p-home-feature + .p-divisions .p-division {border-color:#d9e5ed;}
  .portal #page-content>.p-home-feature + .p-divisions .p-division.active {border-color:#9ed1e4;}
  .portal #page-content>.p-divisions + .p-metrics {margin-top:4px;}
}
@media (max-width:380px) {
  .portal #page-content>.p-home-feature>.p-section-head h2 {font-size:19px;}
  .portal #page-content>.p-home-feature .p-home-results-link {font-size:11px;}
}

/* V16: subtitulos de seccion exclusivos del Inicio movil. En desktop, los
   wrappers son transparentes y reproducen la distribucion original V15. */
.portal .p-home-divisions,.portal .p-home-summary {display:contents;}
.portal .p-home-divisions>.p-section-head,.portal .p-home-summary>.p-section-head {display:none;}
@media (max-width:700px) {
  .portal #page-content>.p-home-divisions,
  .portal #page-content>.p-home-summary {display:block;min-width:0;}
  .portal #page-content>.p-home-divisions>.p-section-head,
  .portal #page-content>.p-home-summary>.p-section-head {
    display:flex;margin:14px 0 9px;align-items:center;
  }
  .portal #page-content>.p-home-divisions>.p-section-head h2,
  .portal #page-content>.p-home-summary>.p-section-head h2 {
    font-size:19px;line-height:1.2;letter-spacing:-.35px;
  }
  .portal #page-content>.p-home-divisions .p-divisions {margin-bottom:5px;}
  .portal #page-content>.p-home-summary .p-metrics {margin-bottom:10px;}
  .portal #page-content>.p-home-feature .p-board-main {
    padding-top:24px;padding-bottom:22px;
  }
  .portal #page-content>.p-home-feature .p-board-score strong {
    font-size:clamp(40px,12vw,54px);
  }
  .portal #page-content>.p-home-feature .p-crest {
    width:clamp(36px,11vw,49px);
    height:clamp(43px,13vw,58px);
  }
  .portal #page-content>.p-home-feature .p-board-meta {font-size:11px;}
}

/* ROWING V17 — compact mobile discovery, no changes to the existing main navigation. */
@media (max-width:700px) {
  .portal .sidebar {position:relative;}
  .portal .brand {padding-right:68px;}
  .portal .brand-search {display:flex;position:absolute;top:8px;right:13px;align-items:center;justify-content:center;width:43px;height:43px;color:#d5e6f2;border:1px solid #31526a;border-radius:10px;background:#12334c;}
  .portal .brand-search.is-active {color:#fff;background:#194b68;border-color:#42aace;}
  .portal .topbar-search {display:none;}
  .portal .p-recent-form {padding:12px 13px;margin:0 0 16px;gap:9px;}
  .portal .p-recent-form-title {width:100%;justify-content:space-between;gap:5px;}
  .portal .p-recent-form-title strong {font-size:12px;}
  .portal .p-recent-form-title span {font-size:10px;}
  .portal .p-form-results {width:100%;justify-content:space-between;gap:7px;}
  .portal .p-form-pill {width:calc((100% - 28px)/5);max-width:65px;min-height:39px;}
  .portal .p-global-search-toolbar {display:flex;flex-wrap:wrap;padding:12px;}
  .portal .p-global-search-toolbar .p-search {flex:1 1 100%;}
  .portal .p-global-search-toolbar .button {flex:1;min-height:42px;}
  .portal .p-search-match {padding:10px 11px;gap:9px;min-height:68px;}
  .portal .p-search-match strong {font-size:12px;}
  .portal .p-search-match small {font-size:10px;}
  .portal .p-search-score {font-size:13px;}
}
