
@media (max-width: 1000px) {
  /* Patti JS se banti hai, yaani pehle paint ke baad. Bina jagah bandhe
     wo aate hi neeche ka sab kuch dhakel deti thi - wahi jhatka dikhta tha.
     Ab uski jagah pehle se ghiri hui hai. */
  .menu-disclosure:has(.swimmer-tabs),
  .menu-disclosure:has(.coach-tabs){min-height:58px}

  /* Ye patti header ke neeche chipki rehti hai, scroll karne par bhi. */
  .tabbar {
    position: sticky; top: 0; z-index: 900;
    min-height: 58px; box-sizing: border-box;
    display: flex; gap: 2px;
    margin: 0 0 14px; padding: 4px;
    background: #fff;
    border-bottom: 1px solid #dce6ec;
    box-shadow: 0 2px 10px rgba(13,39,64,.05);
    overflow-x: auto; scrollbar-width: none;
  }
  .tabbar::-webkit-scrollbar { display: none; }

  .tabbar button {
    flex: 1 0 auto; min-width: 62px;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 7px 8px 6px;
    border: 0; border-radius: 10px; background: transparent;
    color: #5d7484; font: inherit; font-size: 10.5px; font-weight: 600;
    line-height: 1.15; text-align: center; cursor: pointer;
    position: relative;
  }
  .tabbar button svg { width: 21px; height: 21px; }
  .tabbar button .tabbar-label {
    max-width: 8ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .tabbar button[data-on="yes"] { color: #067b90; background: #e8f4f8; }

  /* badge (jaise naye membership requests) nishan ke kone par */
  .tabbar button .unread-badge,
  .tabbar button #request-badge {
    position: absolute; top: 3px; right: 50%; transform: translateX(20px);
    min-width: 16px; padding: 0 4px; border-radius: 9px;
    background: #c0392b; color: #fff; font-size: 10px; line-height: 16px;
  }

  /* purana "Sections" hamburger ab zaroorat nahi */
  .menu-disclosure > .menu-toggle { display: none !important; }
  .menu-disclosure > .swimmer-tabs,
  .menu-disclosure > .coach-tabs { display: none !important; }
}

@media (min-width: 1001px) {
  .tabbar { display: none; }   /* bade screen par shabd hi theek hain */
}

/* ---------- join link panel ----------
   Pehle isko beech mein kar ke chhota kar diya tha. Screen par wo ulta
   ganda laga: baaki panel poori chaudai ke, aur ye ek patla dabba beech
   mein tairta hua, neeche khaali jagah ke saath.

   Ek panel apne aas-paas ke panelon jaisa hona chahiye. To ab ye bhi poori
   chaudai ka hai, heading aur note baayein se - baaki page ki tarah - aur
   link ke saath uske dono button ek hi line mein. Nazar link par padti hai
   aur haath turant button par pahunchta hai, beech mein khaali jagah taye
   kiye bina. */
.joinpanel__row{
  display:flex;flex-wrap:wrap;align-items:center;gap:10px;
  margin-top:14px
}
.joinpanel__link{
  flex:1 1 280px;min-width:0;margin:0;
  padding:11px 14px;
  border:1px solid #d5e4ec;border-radius:10px;background:#f4f9fb;
  font:600 14px/1.45 ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  color:#12303f;overflow-wrap:anywhere
}
.joinpanel__actions{display:flex;flex-wrap:wrap;gap:8px;flex:0 0 auto}
.joinpanel__actions .btn{white-space:nowrap}

@media (max-width:640px){
  .joinpanel__row{flex-direction:column;align-items:stretch}
  .joinpanel__actions .btn{flex:1 1 100%}
}


.swim-dialog:not([open]){display:none!important}
.swim-dialog[open]{display:block;position:fixed;inset:0;margin:auto;width:min(520px,calc(100vw - 24px));max-height:90dvh;overflow:auto;box-sizing:border-box;border:1px solid #bcd7e9;border-radius:18px;padding:20px;background:#f7fbff;color:#163b55;box-shadow:0 20px 80px #163b5540;z-index:10000}
.swim-dialog::backdrop{background:#163b5580}
.swim-dialog .panel,.swim-dialog .timing-editor{border:0;box-shadow:none;padding:0;margin:0;background:transparent}
.swim-dialog .swim-close{float:right;min-height:36px;padding:5px 12px;margin:0 0 10px 10px;border:1px solid #bcd7e9;background:#fff;color:#164e73;border-radius:8px;cursor:pointer}
.swim-dialog h3{margin-top:4px}
.swim-dialog .field{margin-bottom:10px}
.swim-dialog input,.swim-dialog select{min-width:0;width:100%;box-sizing:border-box}
.swim-dialog .panel-note{font-size:12px}
.swim-dialog .actions{margin-top:10px}
@media(max-width:420px){.swim-dialog{padding:15px}.swim-dialog .row-2{grid-template-columns:1fr 1fr}}

.quick-card{border:1px solid #dbe7ee;border-radius:14px;background:#fff;padding:16px 16px 14px;margin:0 0 16px}
.quick-card__title{margin:0 0 12px;font-size:13px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#5d7484}
.quick-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(185px,1fr));gap:10px}
.quick{display:flex;align-items:center;gap:12px;width:100%;padding:12px 14px;border:1px solid #d5e4ec;border-radius:12px;background:#f8fbfd;font:inherit;text-align:left;cursor:pointer;transition:border-color .15s,background .15s}
.quick:hover{border-color:#067b90;background:#fff}
.quick:focus-visible{outline:3px solid #f0a500;outline-offset:2px}
.quick__icon{flex:0 0 auto;display:grid;place-items:center;width:38px;height:38px;border-radius:10px;background:#e4f1f6;color:#0b6072}
.quick__icon svg{width:20px;height:20px}
.quick__text{display:flex;flex-direction:column;min-width:0}
.quick__title{font-weight:700;font-size:14px;color:#12303f;line-height:1.25}
.quick__sub{font-size:12px;color:#5d7484;line-height:1.3}
@media(prefers-reduced-motion:reduce){.quick{transition:none}}

/* Club timeline, phone par.

   Chaudi screen par sidebar baayein hai aur post box daayein - theek hai.
   Phone par sidebar poori chaudai le leta hai, isliye "Club timeline",
   status aur "What to share" - teeno post box se pehle aa jaate the, aur
   likhne ki jagah teen screen neeche chali jaati thi.

   Aadmi yahan padhne nahi, likhne aur dekhne aata hai. To phone par post
   box aur feed sabse upar, samjhane wali cheezein neeche. */
@media(max-width:900px){
  .timeline-layout{display:flex;flex-direction:column;gap:14px}
  .timeline-main{order:1}
  .timeline-sidebar{order:2}
  .timeline-sidebar .community-heading{margin-bottom:10px}
}

/* "What to share" ek lambi samjhaane wali cheez hai - pehli baar kaam ki,
   uske baad har roz raaste mein. Phone par ise band rakha hai. */
.share-guide-fold{border:1px solid #dbe7ee;border-radius:12px;background:#fff;padding:0}
.share-guide-fold>summary{cursor:pointer;padding:12px 14px;font-weight:700;font-size:14px;color:#12303f;list-style:none}
.share-guide-fold>summary::-webkit-details-marker{display:none}
.share-guide-fold>summary::after{content:"＋";float:right;color:#5d7484;font-weight:400}
.share-guide-fold[open]>summary::after{content:"−"}
.share-guide-fold .timeline-share-guide{border:0;padding:0 14px 14px;margin:0;background:transparent}
.share-guide-fold .timeline-share-guide>h3{display:none}

/* Post box par label aur ek line ka matlab. Pehle sirf ek lamba placeholder
   tha - phone par wo kat jaata tha ("...website lin"), aur placeholder
   likhna shuru karte hi gayab ho jaata hai, isliye jo samajh nahi aaya wo
   dobara dikhta bhi nahi. Label aur hint hamesha wahin rehte hain. */
.timeline-composer label[for="timeline-text"]{display:block;font-weight:700;font-size:14px;color:#12303f;margin-bottom:6px}
.timeline-composer #timeline-text{min-height:66px;line-height:1.45}

/* Account aur Sign out: phone par hamburger ke andar, bade screen par gear
   ke neeche. Dono jagah wahi do cheezein. */
.account-host{position:relative;display:inline-flex}
.account-gear{display:grid;place-items:center;width:38px;height:38px;border:1px solid #c5d5de;border-radius:10px;background:#fff;color:#315c70;cursor:pointer}
.account-gear:hover{background:#eef5f8;color:#0b6072}
.account-gear[aria-expanded="true"]{background:#e4f1f6;color:#0b6072}
.account-gear:focus-visible{outline:3px solid #f0a500;outline-offset:2px}
.account-pop{position:absolute;right:0;top:calc(100% + 8px);min-width:180px;padding:6px;border:1px solid #d5e4ec;border-radius:12px;background:#fff;box-shadow:0 14px 40px rgba(13,39,64,.16);z-index:9000}
.account-pop[hidden]{display:none}
.account-pop .account-item{display:block;width:100%;padding:9px 12px;border:0;border-radius:8px;background:transparent;color:#12303f;font:inherit;font-size:14px;font-weight:600;text-align:left;text-decoration:none;cursor:pointer}
.account-pop .account-item:hover{background:#eef5f8}
.account-pop .account-signout{color:#a5352b}
.site-nav .account-item{padding:8px 12px;border:0;background:transparent;font:inherit;font-weight:600;color:#315c70;text-align:left;cursor:pointer}
.site-nav .account-signout{color:#a5352b}


.brand{display:inline-flex;align-items:center;gap:9px}
.brand-logo{display:block;width:34px;height:28px;object-fit:contain;flex:0 0 auto}
@media(max-width:520px){.brand-logo{width:30px;height:25px}}
.account-host{position:relative;display:inline-flex}
.account-gear{display:grid;place-items:center;width:38px;height:38px;border:1px solid #c5d5de;border-radius:10px;background:#fff;color:#315c70;cursor:pointer}
.account-gear:hover{background:#eef5f8;color:#0b6072}
.account-gear[aria-expanded="true"]{background:#e4f1f6;color:#0b6072}
.account-gear:focus-visible{outline:3px solid #f0a500;outline-offset:2px}
.account-pop{position:absolute;right:0;top:calc(100% + 8px);min-width:180px;padding:6px;border:1px solid #d5e4ec;border-radius:12px;background:#fff;box-shadow:0 14px 40px rgba(13,39,64,.16);z-index:9000}
.account-pop[hidden]{display:none}
.account-pop .account-item{display:block;width:100%;padding:9px 12px;border:0;border-radius:8px;background:transparent;color:#12303f;font:inherit;font-size:14px;font-weight:600;text-align:left;text-decoration:none;cursor:pointer}
.account-pop .account-item:hover{background:#eef5f8}
.account-pop .account-signout{color:#a5352b}
.site-nav .account-item{
  display:flex;align-items:center;gap:8px;
  width:100%;padding:10px 12px;margin-top:2px;
  border:0;border-radius:9px;background:transparent;
  font:inherit;font-size:14px;font-weight:600;color:#315c70;
  text-align:left;text-decoration:none;cursor:pointer
}
.site-nav .account-item:hover{background:#eef5f8}
.site-nav .account-item::before{
  content:"";flex:0 0 auto;width:18px;height:18px;
  background:currentColor;opacity:.75;
  -webkit-mask:var(--ico) center/contain no-repeat;mask:var(--ico) center/contain no-repeat
}
.site-nav .account-item:first-of-type{margin-top:8px;border-top:1px solid #e1eaf0;padding-top:12px;border-radius:0}
.site-nav .account-signout{color:#a5352b}


/* Keep the layout independent of image loading and deferred modules. */
.timeline-layout,.timeline-main,.timeline-sidebar{min-width:0;box-sizing:border-box}
.timeline-main{width:100%;overflow-wrap:anywhere}
.member-initial{position:relative;width:36px;height:36px;overflow:hidden}
.member-initial img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:50%}
@media(max-width:1000px){
 .swimmer-tabs,.coach-tabs,.menu-disclosure>.swimmer-tabs,.menu-disclosure>.coach-tabs{display:flex!important;flex-wrap:nowrap;overflow-x:auto;box-sizing:border-box;height:58px;min-height:58px;margin:0 0 14px;padding:4px;gap:2px}
 .swimmer-tabs>button,.coach-tabs>button{flex:1 0 auto;font-size:11px;white-space:nowrap}
 .swimmer-tabs.has-icon-bar,.coach-tabs.has-icon-bar,.menu-disclosure>.has-icon-bar{display:none!important}
 .menu-disclosure:has(.swimmer-tabs),.menu-disclosure:has(.coach-tabs){min-height:0;margin:0;padding:0;border:0}
 .menu-disclosure:has(.has-icon-bar){display:none!important}
 .tabbar{height:58px;min-height:58px}
 #tab-race,#tab-measurements,#tab-training{display:none}
}
@media(max-width:900px){
 .timeline-layout{display:flex;flex-direction:column;align-items:stretch;width:100%;gap:14px}
 .timeline-layout>.timeline-main,.timeline-layout>.timeline-sidebar{width:100%;max-width:100%;min-width:0;align-self:stretch}
 .timeline-sidebar{position:static}
}
@media(min-width:1001px){.coach-dashboard #roster .swimmer-card-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}}
@media(min-width:1400px){.coach-dashboard #roster .swimmer-card-grid{grid-template-columns:repeat(5,minmax(0,1fr))}}
.coach-dashboard #roster .swimmer-card-grid>li{grid-template-columns:40px minmax(0,1fr);gap:9px;padding:12px}
.coach-dashboard #roster .swimmer-card-grid>li:has(input){grid-template-columns:1fr}
.swimmer-card-grid .swimmer-avatar{width:40px;height:40px}
.swimmer-card-grid .ls-main{font-size:14px}
.swimmer-card-grid .ls-sub{font-size:11px;line-height:1.4}
.swimmer-card-actions{padding-top:9px}

/* Override the older roster's 210px minimum at the same specificity. */
.coach-dashboard #roster .swimmer-card-grid .ls-main{min-width:0;width:100%;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.coach-dashboard #roster .swimmer-card-grid .ls-sub,.coach-dashboard #roster .swimmer-card-grid b{white-space:normal;overflow-wrap:anywhere;max-width:100%}
.member-person>span:not(.member-initial):not(.unread-badge){min-width:0;flex:1}
.member-initial{flex:0 0 36px}
html{scrollbar-gutter:stable}
.avatar-slot{display:block;width:76px;min-width:76px;height:76px;flex:0 0 76px}
#athmeta{min-height:1.5em}
#timeline-status{min-height:1.5em;margin:8px 0}
.timeline-post>.timeline-image{display:block;width:100%;height:auto;aspect-ratio:4/3;object-fit:contain;background:#f0f7fc}
#timeline-feed:empty{min-height:300px}
@media(max-width:900px){
 .pwa-install:not([hidden]){position:fixed;bottom:12px;left:12px;right:12px;z-index:950;margin:0;width:auto;max-height:35vh;overflow:auto;box-shadow:0 8px 30px #173d4930}
}

.race-records{margin-top:24px}.race-records h3{margin-bottom:6px}.race-records-help{font-size:13px;color:#56738a;margin:0 0 14px}
.race-records-scroll{max-height:65vh;overflow:auto;border:1px solid #d6e6f1;border-radius:12px;scrollbar-gutter:stable}
.race-records-table{width:100%;min-width:580px;margin:0;border-collapse:separate;border-spacing:0;table-layout:fixed}
.race-records-table thead th{position:sticky;top:0;z-index:2;background:#eaf4fc;color:#234f70;white-space:nowrap}
.race-records-table th:nth-child(1){width:20%}.race-records-table th:nth-child(2){width:17%}.race-records-table th:nth-child(3){width:12%}.race-records-table th:nth-child(4){width:33%}.race-records-table th:nth-child(5){width:18%}
.race-records-table td{overflow-wrap:anywhere;padding:12px}.race-records-table .race-event td{padding:0;background:#f4f9fd}
.race-event-toggle{display:flex;align-items:center;gap:12px;width:100%;padding:14px;border:0;background:transparent;color:#244f6d;font:inherit;text-align:left;cursor:pointer}
.race-event-name{flex:1;font-weight:700}.race-event-name small{display:block;font-size:11px;font-weight:400;color:#627e92}.race-event-best{font-weight:700;font-variant-numeric:tabular-nums}.race-event-count{font-size:12px;color:#627e92}.race-chevron{font-size:24px;transition:transform .15s}.race-event-toggle[aria-expanded=true] .race-chevron{transform:rotate(90deg)}
.race-history[hidden]{display:none!important}.race-history tr:nth-child(even):not(.is-best){background:#f8fbfe}.race-pb{display:inline-block;margin-left:5px;font-size:10px;color:#086b70}.race-edit{border:0;background:transparent;padding:6px 0;color:#126ca5;text-decoration:underline;font:inherit;font-size:12px;cursor:pointer}.race-event-toggle:focus-visible,.race-edit:focus-visible{outline:2px solid #1676b6;outline-offset:-2px}
.record-extra{margin-top:18px;border:1px solid #dce9f2;border-radius:10px;padding:14px}.record-extra>summary{font-weight:600;cursor:pointer;color:#315c78}

.race-remove{color:#a7343a}.race-records-table td .sub{display:block;font-size:11px;white-space:normal}
@media print{.race-records-scroll{max-height:none;overflow:visible}.race-records-table{min-width:0}.race-history[hidden]{display:table-row-group!important}.race-records-table thead th{position:static}.race-chevron{display:none}}

/* Match parent tabs to the compact coach workspace navigation. */
@media(min-width:1001px){
 .swimmer-tabs,.menu-disclosure>.swimmer-tabs{display:flex;grid-template-columns:none;justify-content:flex-start;gap:4px;overflow-x:auto}
 .swimmer-tabs button{flex:0 0 auto;width:auto;padding:10px 16px}
 .swimmer-tabs button[aria-selected=true]{background:#e6f3f5;color:#086e7b;box-shadow:none}
}
.coach-metrics .metric-link{display:block;color:inherit;text-decoration:none;border-radius:8px;cursor:pointer}
.coach-metrics .metric-link:hover{background:#e7f4ff}.coach-metrics .metric-link:hover span{text-decoration:underline}
.coach-metrics .metric-link:focus-visible{outline:3px solid #1676b6;outline-offset:5px}
#coach-swimmers,#requests{scroll-margin-top:76px}
/* Keep the parent avatar within its reserved footprint. */
.avatar-slot>.swimmer-avatar{width:100%;height:100%;box-sizing:border-box}
