
/* Ocean swim scenes, scoped to the shared layout, with existing honor hall retained. */
.swim-site.swim-freestyle{--swim-art:url('../img/leaderboard-swimmer.webp');--swim-size:auto 100%}
.swim-site.swim-butterfly{--swim-art:url('../img/swim-butterfly.webp');--swim-size:auto 112px}
.swim-site.swim-backstroke{--swim-art:url('../img/swim-backstroke.webp');--swim-size:auto 112px}
.swim-site.swim-breaststroke{--swim-art:url('../img/swim-breaststroke.webp');--swim-size:auto 112px}
.swim-site:not(.honor-page){background:radial-gradient(ellipse at 70% 5%,#0e6782 0,transparent 34%),linear-gradient(180deg,#073c59,#052b46 42%,#031b31 76%,#021322);background-repeat:no-repeat;background-size:100% 100%}
.swim-site:not(.honor-page) .topbar{background:linear-gradient(115deg,#041c31,#083a54);border-bottom:1px solid #4dc9dc55}
.swim-site:not(.honor-page) .bottom-nav{background:linear-gradient(180deg,#0b3b52f5,#031a2def);border-color:#44c1d36b}
.swim-site:not(.honor-page) .page{position:relative;isolation:isolate}
.swim-site:not(.honor-page):not(.swim-home):not(.swim-profile) .page::before{content:"";position:absolute;z-index:-1;top:26px;left:0;right:0;height:163px;pointer-events:none;background-image:linear-gradient(90deg,#062d46 0%,#062d46b3 20%,#062d4630 44%,transparent 70%),linear-gradient(0deg,#052c46 0%,transparent 32%,transparent 86%,#06344e 100%),var(--swim-art);background-repeat:no-repeat;background-size:100% 100%,100% 100%,var(--swim-size);background-position:center,center,right center;mask-image:linear-gradient(180deg,transparent,#000 14%,#000 77%,transparent)}
.swim-site:not(.honor-page) .page-title{min-height:120px;padding:14px 0 12px;position:relative;text-shadow:0 2px 8px #001727}
.swim-site:not(.honor-page) .page-title h1{font-size:clamp(27px,6vw,35px);font-style:italic;font-weight:850;letter-spacing:.5px}
.swim-site:not(.honor-page) .page-title p{color:#e2f4fb;max-width:75%;line-height:1.65}
.swim-site:not(.honor-page) .page-title .eyebrow{color:#84fff4}
.swim-home .ocean-hero{background:linear-gradient(90deg,#05283fee 0%,#052b44d9 28%,#06334e66 57%,#06334e10 100%),linear-gradient(0deg,#052b43 0%,transparent 35%),var(--swim-art) right top/auto 100% no-repeat,#073852;border-color:#73dfed70;box-shadow:0 0 22px #24cfe225,inset 0 1px 0 #c2ffff35}
.swim-home .ocean-hero h1{position:relative;font-size:clamp(26px,6vw,35px);font-style:italic;text-shadow:0 2px 9px #00172d}
.swim-home .ocean-hero p,.swim-home .hero-label{position:relative;text-shadow:0 2px 5px #00172d}
.swim-home .hero-bottom{background:linear-gradient(0deg,#05263e77,transparent);border-top-color:#8fe9ee44}
.swim-profile .profile-hero{background:linear-gradient(90deg,#052a44f2 0%,#052a44a8 29%,#052a4438 76%,#052a4410 100%),linear-gradient(0deg,#052b43 0%,transparent 38%),var(--swim-art) right 12px/auto 130px no-repeat,#073852;border-color:#6dd9e365;box-shadow:0 0 23px #36cfe028}
.swim-profile .profile-hero h1,.swim-profile .profile-hero p{text-shadow:0 2px 6px #001728}
.swim-site:not(.honor-page) .auth-wrap{position:relative;margin-top:22px}
.swim-site:not(.honor-page) .auth-wrap h1,.swim-site:not(.honor-page) .auth-wrap p{text-shadow:0 1px 7px #00172d}
.swim-site:not(.honor-page) .form-card,.swim-site:not(.honor-page) .record-card{background:linear-gradient(145deg,#073451f5,#031f37f2);border-color:#66cbd34d}
.swim-site:not(.honor-page) .activity-row,.swim-site:not(.honor-page) .stat-card{border-color:#62c9d84d;box-shadow:inset 0 0 12px #4ed4e213,0 3px 13px #0018285e}
@media(min-width:600px){.swim-site.swim-butterfly,.swim-site.swim-backstroke,.swim-site.swim-breaststroke{--swim-size:auto 144px}.swim-site:not(.honor-page):not(.swim-home):not(.swim-profile) .page::before{height:190px}.swim-site:not(.honor-page) .page-title{min-height:145px}.swim-profile .profile-hero{background-size:auto,auto,auto 160px,auto}}
@media(max-width:360px){.swim-site.swim-butterfly,.swim-site.swim-backstroke,.swim-site.swim-breaststroke{--swim-size:auto 94px}.swim-site:not(.honor-page) .page-title p{max-width:90%}}

/* Seamless ocean heroes */
.swim-home .ocean-hero,.swim-profile .profile-hero{
  position:relative;isolation:isolate;overflow:visible;
  border:0;border-radius:0;box-shadow:none;background:transparent;
  margin-left:-16px;margin-right:-16px;
}
.swim-home .ocean-hero{padding-left:24px;padding-right:24px}
.swim-home .ocean-hero::before,.swim-profile .profile-hero::before{
  content:"";position:absolute;inset:-12px 0 -14px;z-index:-1;
  width:auto;height:auto;left:0;bottom:-14px;right:0;top:-12px;
  border:0;border-radius:0;box-shadow:none;transform:none;pointer-events:none;
  background-repeat:no-repeat;
  background-position:center,right center;
  mask-image:linear-gradient(180deg,transparent,#000 13%,#000 59%,transparent 100%);
  -webkit-mask-image:linear-gradient(180deg,transparent,#000 13%,#000 59%,transparent 100%);
}
.swim-home .ocean-hero::before{
  background-image:linear-gradient(90deg,#052c4799 0%,#052c4744 36%,transparent 72%),var(--swim-art);
  background-size:100% 100%,auto 94%;
}
.swim-home .ocean-hero::after{content:none}
.swim-home .hero-bottom{background:transparent;border-top-color:#8fe9ee28}
.swim-profile .profile-hero::before{
  background-image:linear-gradient(90deg,#052b4655 0%,#052b4622 48%,transparent 100%),var(--swim-art);
  background-size:100% 100%,auto 180px;
  background-position:center,right 8px;
  mask-image:linear-gradient(180deg,transparent,#000 13%,#000 50%,transparent 90%);
  -webkit-mask-image:linear-gradient(180deg,transparent,#000 13%,#000 50%,transparent 90%);
}
.swim-profile .profile-hero .profile-avatar{position:relative}
@media(max-width:360px){.swim-home .ocean-hero{padding-left:20px;padding-right:20px}.swim-profile .profile-hero::before{background-size:100% 100%,auto 150px}}
@media(min-width:600px){.swim-home .ocean-hero::before{background-size:100% 100%,auto 100%}.swim-profile .profile-hero::before{background-size:100% 100%,auto 195px}}

/* Swim image blend repair 20261126-v4 */
/* Original swimmers retained; transparent edge feathering is baked into the
   new assets. Only the four existing hero background layers are changed. */
.swim-site.swim-home,.swim-site.honor-page{
  --swim-art:url('../img/leaderboard-swimmer-blend-v4.webp');
}
.swim-site.swim-profile{
  --swim-art:url('../img/swim-breaststroke-blend-v4.webp');
}
.swim-home .ocean-hero::before{
  background-image:var(--swim-art);
  background-size:auto 94%;
  background-position:right center;
  mask-image:linear-gradient(90deg,transparent 0%,#000 27%,#000 97%,transparent 100%);
  -webkit-mask-image:linear-gradient(90deg,transparent 0%,#000 27%,#000 97%,transparent 100%);
}
.honor-page .honor-hero::before{
  background-image:var(--swim-art);
  background-size:auto 100%;
  background-position:right center;
  mask-image:linear-gradient(90deg,transparent 0%,transparent 12%,#000 52%,#000 97%,transparent 100%);
  -webkit-mask-image:linear-gradient(90deg,transparent 0%,transparent 12%,#000 52%,#000 97%,transparent 100%);
  mask-composite:add;
  -webkit-mask-composite:source-over;
}
.honor-page .honor-hero::after{content:none}
.swim-site.swim-backstroke .page:has(> .page-title + .stats-grid)::before{
  background-image:url('../img/swim-backstroke-blend-v4.webp');
  background-size:var(--swim-size);
  background-position:right center;
  mask-image:linear-gradient(90deg,transparent 0%,#000 38%,#000 97%,transparent 100%);
  -webkit-mask-image:linear-gradient(90deg,transparent 0%,#000 38%,#000 97%,transparent 100%);
}
.swim-profile .profile-hero::before{
  background-image:var(--swim-art);
  background-size:auto 180px;
  background-position:right 8px;
  mask-image:linear-gradient(90deg,transparent 0%,#000 9%,#000 96%,transparent 100%);
  -webkit-mask-image:linear-gradient(90deg,transparent 0%,#000 9%,#000 96%,transparent 100%);
}
@media(max-width:360px){
  .swim-profile .profile-hero::before{background-size:auto 150px}
}
@media(min-width:600px){
  .swim-home .ocean-hero::before{background-size:auto 100%}
  .swim-profile .profile-hero::before{background-size:auto 195px}
}

/* Ocean background v6 — portrait-first full-viewport scenes, no layout changes. */
body.swim-site.swim-freestyle { --ocean-v6-art: url('../img/ocean-v6-freestyle.webp'); }
body.swim-site.swim-butterfly, body.swim-site.honor-page { --ocean-v6-art: url('../img/ocean-v6-butterfly.webp'); }
body.swim-site.swim-backstroke { --ocean-v6-art: url('../img/ocean-v6-backstroke.webp'); }
body.swim-site.swim-breaststroke, body.swim-site.swim-profile { --ocean-v6-art: url('../img/ocean-v6-breaststroke.webp'); }
body.swim-site, body.swim-site:not(.honor-page), body.swim-site.honor-page {
  position: relative;
  isolation: isolate;
  background: #041d32;
  --ocean-v6-shade: linear-gradient(90deg, rgba(2,22,39,.58), rgba(2,22,39,.22) 54%, rgba(2,22,39,.07));
}
body.swim-site.swim-profile {
  --ocean-v6-shade: linear-gradient(90deg,rgba(2,22,39,.23),rgba(2,22,39,.49) 50%,rgba(2,22,39,.18));
}
body.swim-site::before {
  content: '';
  position: fixed;
  z-index: -1;
  pointer-events: none;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 100vh;
  height: 100lvh;
  background-color: #041d32;
  background-image:
    linear-gradient(180deg,rgba(3,24,43,.12) 0%,rgba(3,24,43,.17) 12%,rgba(3,24,43,.30) 24%,rgba(3,24,43,.56) 39%,rgba(4,29,50,.83) 56%,#041d32 83%),
    var(--ocean-v6-shade), var(--ocean-v6-art);
  background-size: 100% 100%,100% 100%,100% auto;
  background-repeat: no-repeat;
  background-position: center top;
}
/* The original hero decorations become redundant with a continuous image. */
.swim-site:not(.honor-page):not(.swim-home):not(.swim-profile) .page::before,
body.swim-site .ocean-hero::before, body.swim-site .ocean-hero::after,
body.swim-site .profile-hero::before, body.swim-site .honor-hero::before,
body.swim-site .honor-hero::after { content: none; }
/* Keep existing layout, borders, and navigation geometry unchanged. */
body.swim-site .topbar { background: linear-gradient(180deg,rgba(3,25,43,.65),rgba(3,27,45,.51)); }
body.swim-site .beijing-clock { text-shadow: 0 1px 5px #031b2d,0 0 10px #031b2d; }
body.swim-site .ocean-hero h1,body.swim-site .page-title h1,body.swim-site .profile-hero h1,
body.swim-site .ocean-hero p,body.swim-site .page-title p,body.swim-site .profile-hero p {
  text-shadow: 0 2px 5px #00182d,0 0 16px #00182d;
}
body.swim-site .ocean-hero, body.swim-site .profile-hero { background:transparent; }
/* Feather lateral edges in wider windows. The mobile portrait is not stretched. */
@media(min-width: 600px) {
  body.swim-site::before {
    width:min(100%,680px,72vh);
    mask-image:linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent);
    -webkit-mask-image:linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent);
  }
}
@media(max-height: 500px) and (min-width:600px) {
  body.swim-site::before { width:min(100%,640px); }
}

/* Upload and confirmation UX 20261126-upload-v7 */
body.swim-site .upload-compact-title,body.swim-site .confirm-compact-title{margin-bottom:10px}
body.swim-site .upload-flow,body.swim-site .confirm-flow{margin-top:12px;padding:16px;min-width:0}
.upload-flow .activity-file-drop{position:relative;padding:16px 10px;overflow:hidden;min-height:130px;margin:8px 0 0}
.upload-flow .activity-file-drop input[type=file]{display:block;position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;opacity:0;cursor:pointer;z-index:2}
.activity-preview{max-width:100%;width:auto;max-height:124px;object-fit:contain;border-radius:8px;margin:0 auto 8px;display:block}
.activity-preview[hidden],.upload-progress[hidden],#activity-file-icon[hidden]{display:none!important}
.upload-flow .file-name{overflow-wrap:anywhere;margin-top:8px;font-size:12px}
.upload-flow .file-drop.is-selected{border-color:#70e9e0}
.upload-flow .file-drop.is-selected .file-name{color:#8df4e3}
.upload-flow .file-drop.is-invalid .file-name{color:#ffd0c6}
.upload-flow .upload-action{margin-top:12px}
.upload-flow .primary-button:disabled,.confirm-flow .primary-button:disabled{opacity:.62;cursor:wait}
.upload-progress{display:flex;align-items:center;gap:10px;color:#c6f3ef;font-size:13px;margin-top:12px;line-height:1.5}
.upload-spinner{width:18px;height:18px;border:2px solid rgba(124,240,232,.25);border-top-color:#7cf0e8;border-radius:50%;flex:none;animation:upload-spin .9s linear infinite}
@keyframes upload-spin{to{transform:rotate(360deg)}}
.upload-instructions{margin-top:14px}
.upload-instructions summary,.confirm-notes summary{cursor:pointer;color:#d6eef4;font-weight:650;font-size:13px}
.upload-public-note{margin-top:10px;font-size:11px;line-height:1.5}
.confirm-flow form,.confirm-flow .swim-entry,.confirm-optional-grid>div{min-width:0}
.confirm-flow .swim-entry{border:1px solid rgba(149,222,239,.23);border-radius:12px;padding:10px;margin:0 0 10px}
.confirm-flow .swim-entry label{display:block;margin:8px 0 3px;font-size:13px;line-height:1.35}
.confirm-flow .swim-entry input:not([type=file]){display:block;width:100%;max-width:100%;min-width:0;box-sizing:border-box;height:42px;font-size:16px;padding:0 9px}
.confirm-flow .swim-entry input[type=date]{appearance:none;-webkit-appearance:none;min-inline-size:0}
.confirm-flow .swim-entry input[type=date]::-webkit-date-and-time-value{min-width:0;text-align:left}
.confirm-optional-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:9px}
.confirm-flow .remove-swim-entry:disabled{visibility:hidden}
.confirm-flow .remove-swim-entry{background:transparent;border:1px solid #45798c;color:#c7e9ed;border-radius:12px}
.confirm-total,.confirm-help,.date-check-note{font-size:12px;line-height:1.45;color:#b9dce7;margin:7px 0}
.date-check-note{color:#ffe0a1}
.confirm-notes{margin:10px 0}
.confirm-notes textarea{margin-top:8px;min-height:65px;max-width:100%}
.confirm-flow .primary-button{margin-top:10px}

/* Confirmation screenshot preview v9 */
.confirm-flow .confirm-shot{margin:0 0 14px;border:1px solid rgba(149,222,239,.23);border-radius:12px;padding:9px;overflow:hidden}
.confirm-shot summary{list-style:none;display:flex;align-items:center;gap:14px;cursor:pointer}
.confirm-shot summary::-webkit-details-marker{display:none}
.confirm-shot img{display:block;flex:none;width:80px;height:105px;object-fit:contain;background:#041d32;border-radius:8px}
.confirm-shot-label{display:flex;flex-direction:column;gap:5px;min-width:0;color:#e4fbff;font-size:14px}
.confirm-shot-label small{font-size:12px;color:#83dfdf}
.confirm-shot .shot-collapse{display:none}
.confirm-shot[open] summary{flex-direction:column;align-items:center}
.confirm-shot[open] img{width:auto;max-width:100%;height:auto;max-height:none}
.confirm-shot[open] .confirm-shot-label{align-items:center}
.confirm-shot[open] .shot-expand{display:none}
.confirm-shot[open] .shot-collapse{display:block}
/* Profile inline portrait v12: keep the swimmer's face unobstructed. */
body.swim-site.swim-profile .profile-hero > .profile-identity-row {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  margin:clamp(42px,10.5vw,64px) auto 5px;
  min-width:0;
  max-width:100%;
}
body.swim-site.swim-profile .profile-identity-row > .profile-avatar {
  width:36px;
  height:36px;
  flex:0 0 36px;
  margin:0;
  position:relative;
  top:auto;
  font-size:17px;
}
body.swim-site.swim-profile .profile-identity-row > .profile-avatar .avatar-photo {
  width:100%;
  height:100%;
  object-fit:cover;
}
body.swim-site.swim-profile .profile-identity-row > h1 {
  min-width:0;
  margin:0;
  position:relative;
  top:auto;
  line-height:1.25;
  overflow-wrap:anywhere;
  text-align:left;
}
body.swim-site.swim-profile .profile-hero > p {
  position:relative;
  top:auto;
}

/* Community challenge v13 */
.challenge-panel{margin:12px 0;padding:14px;border:1px solid rgba(117,221,228,.28);border-radius:14px;background:rgba(5,42,64,.94);overflow-wrap:anywhere}
.challenge-panel p{font-size:13px;line-height:1.5;margin:7px 0}
.challenge-panel summary{cursor:pointer;color:#86e9e6;font-weight:600;margin:8px 0}
.challenge-panel form{margin-top:8px}
.challenge-panel textarea,.challenge-panel select{max-width:100%;width:100%;box-sizing:border-box}
.challenge-panel .primary-button{margin-top:8px}
.challenge-vote{border-top:1px solid rgba(117,221,228,.19);padding:10px 0}
.challenge-badge{display:inline-block;vertical-align:middle;background:#b83c4c;color:white;border-radius:20px;padding:2px 6px;margin-left:4px;font-size:11px;line-height:1.4}
.challenge-header-links{display:flex;align-items:center;gap:9px;min-width:0}
.challenge-header-links .challenge-notice-link{color:#a2f5f0;font-size:12px;white-space:nowrap;text-decoration:none}

/* Challenge layout v14 */
body.swim-site .record-distance.challenge-distance{position:relative;min-height:68px;display:flex;align-items:center;justify-content:center;padding:12px 58px;box-sizing:border-box}
body.swim-site .challenge-jump{position:absolute;left:7px;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:46px;height:46px;border-radius:50%;border:1px solid #dfae79;background:linear-gradient(145deg,rgba(222,164,91,.20),rgba(4,34,52,.75));color:#ffe1ae;font-size:13px;font-weight:750;text-decoration:none;box-shadow:0 0 14px rgba(229,169,100,.10)}
body.swim-site .challenge-jump:active{background:rgba(219,165,92,.32)}
#challenge-section{scroll-margin-top:20px}
body.swim-site .challenge-panel{padding:16px;margin:14px 0;background:linear-gradient(145deg,rgba(9,57,76,.97),rgba(5,32,51,.97));border:1px solid rgba(113,221,230,.30);border-radius:16px}
.challenge-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#e8fbff}
.challenge-heading strong{font-size:16px}
.challenge-count{color:#91efeb;font-size:13px;font-weight:700}
.challenge-cancelled .challenge-count{color:#ffd19f}
.challenge-meter{display:flex;gap:5px;margin:10px 0 8px}
.challenge-meter i{flex:1;height:5px;background:rgba(119,214,225,.14);border-radius:6px}
.challenge-meter i.filled{background:#efb679}
body.swim-site .challenge-form{margin-top:16px}
.challenge-form .challenge-field-label{display:block;font-size:13px;color:#d7edf3;margin:12px 0 6px;line-height:1.4;font-weight:600}
.challenge-field-label small{font-weight:400;color:#9bbac8;font-size:11px;margin-left:4px}
body.swim-site .challenge-form select,body.swim-site .challenge-form textarea{display:block;width:100%;min-width:0;max-width:100%;padding:11px 12px;border:1px solid #347187;border-radius:11px;background:#06283c;color:#e6faff;font:inherit;font-size:16px;box-sizing:border-box;color-scheme:dark}
body.swim-site .challenge-form select{appearance:none;-webkit-appearance:none;padding-right:34px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 7 5 5 5-5' fill='none' stroke='%237ce6e6' stroke-width='1.8'/%3E%3C/svg%3E");background-position:right 10px center;background-repeat:no-repeat;background-size:18px}
body.swim-site .challenge-form option{background:#06283c;color:#e6faff}
body.swim-site .challenge-form textarea{min-height:82px;resize:vertical}
.challenge-form textarea::placeholder{color:#91b4c4}
body.swim-site .challenge-consent{display:flex;align-items:flex-start;gap:8px;font-size:12px;line-height:1.5;color:#b4d6e0;margin:13px 0 10px;cursor:pointer}
body.swim-site .challenge-consent input[type=checkbox]{appearance:auto;-webkit-appearance:checkbox;flex:0 0 17px;width:17px;height:17px;margin:1px 0 0;padding:0;accent-color:#65dedb}
.challenge-public-list{margin-top:12px;border-top:1px solid rgba(111,205,220,.19)}
.challenge-person{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid rgba(111,205,220,.14)}
.challenge-person-avatar{width:34px;height:34px;flex:0 0 34px;display:flex;align-items:center;justify-content:center;overflow:hidden;border-radius:50%;background:#237f93;color:#d8faff;text-decoration:none}
.challenge-person-avatar img{width:100%;height:100%;object-fit:cover}
.challenge-person-info{min-width:0;display:flex;flex-direction:column;gap:4px;font-size:13px;overflow-wrap:anywhere}
.challenge-person-info a{color:#a3f3ec;text-decoration:none;font-weight:650}
.challenge-person-info small,.challenge-history-label{font-size:11px;color:#9bbac8}
.challenge-history-label{padding:10px 0 2px}
.challenge-submitted{color:#8ee9dd}
@media(max-width:360px){body.swim-site .challenge-jump{width:40px;height:40px;left:3px}body.swim-site .record-distance.challenge-distance{padding:10px 46px}}

/* Public challenge reasons v15 */
.challenge-list-title{font-size:14px;color:#dcf8fb;margin:12px 0 3px}
.challenge-person{align-items:flex-start}
.challenge-person-info{flex:1}
.challenge-public-reason{font-size:13px;color:#cdebf0;line-height:1.5}
.challenge-public-note{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.6;color:#c4e1e9;background:rgba(3,29,45,.55);border-radius:8px;padding:8px 10px;margin:3px 0}

/* Record challenge inline count v18 */
body.swim-site .record-distance.challenge-distance{
  display:grid;grid-template-columns:minmax(max-content,1fr) auto minmax(0,1fr);
  align-items:center;gap:0;min-height:68px;padding:12px 7px;box-sizing:border-box;
}
body.swim-site .challenge-inline-entry{
  grid-column:1;grid-row:1;justify-self:start;display:inline-flex;align-items:center;gap:5px;
  white-space:nowrap;text-decoration:none;line-height:1;
}
body.swim-site .challenge-inline-entry .challenge-jump{
  position:static;transform:none;left:auto;top:auto;flex:0 0 46px;
  box-sizing:border-box;color:#ffe1ae;
}
body.swim-site .challenge-inline-entry .challenge-inline-count{
  color:#ffd89f;font-size:13px;font-weight:750;line-height:1;white-space:nowrap;font-variant-numeric:tabular-nums;
}
body.swim-site .challenge-inline-entry.is-full .challenge-inline-count{color:#ffb39a}
body.swim-site .record-distance-value{grid-column:2;grid-row:1;display:flex;align-items:baseline;justify-content:center;gap:4px;white-space:nowrap}
body.swim-site .challenge-inline-entry:focus-visible{outline:2px solid #ffe1ae;outline-offset:3px;border-radius:24px}
@media(max-width:480px){
  body.swim-site .record-distance.challenge-distance{padding:10px 3px}
  body.swim-site .challenge-inline-entry{gap:4px}
  body.swim-site .challenge-inline-entry .challenge-jump{width:38px;height:38px;flex-basis:38px;font-size:12px}
  body.swim-site .challenge-inline-entry .challenge-inline-count{font-size:12px}
  body.swim-site .record-distance-value strong{font-size:clamp(25px,8vw,38px)}
  body.swim-site .record-distance-value span{font-size:12px}
}
@media(max-width:350px){
  body.swim-site .challenge-inline-entry .challenge-jump{width:34px;height:34px;flex-basis:34px;font-size:11px}
  body.swim-site .challenge-inline-entry .challenge-inline-count{font-size:11px}
  body.swim-site .record-distance-value{gap:2px}
}

/* Profile record challenge counts v19 */
body.swim-site.swim-profile .profile-activity-info{display:flex;align-items:center;gap:15px;flex-wrap:wrap;row-gap:5px;min-width:0}
body.swim-site.swim-profile .profile-activity-label{flex:0 0 auto}
body.swim-site.swim-profile .profile-challenge-count{display:inline-flex;align-items:center;white-space:nowrap;font-size:12px;font-weight:700;color:#ffda9f;border:1px solid rgba(235,182,112,.42);background:rgba(201,141,69,.11);padding:4px 8px;border-radius:999px;line-height:1.25;font-variant-numeric:tabular-nums}
body.swim-site.swim-profile .activity-distance{flex:0 0 auto;white-space:nowrap}
@media(max-width:380px){body.swim-site.swim-profile .profile-activity-info{gap:5px 7px}body.swim-site.swim-profile .profile-challenge-count{font-size:11px;padding:3px 6px}}

/* Home recent record challenge counts v20 */
body.swim-site.swim-home .home-activity-info{display:flex;align-items:center;gap:15px;flex-wrap:wrap;row-gap:5px;min-width:0}
body.swim-site.swim-home .home-activity-label{flex:0 1 auto;min-width:0;max-width:100%;overflow-wrap:anywhere}
body.swim-site.swim-home .profile-challenge-count{display:inline-flex;align-items:center;white-space:nowrap;font-size:12px;font-weight:700;color:#ffda9f;border:1px solid rgba(235,182,112,.42);background:rgba(201,141,69,.11);padding:4px 8px;border-radius:999px;line-height:1.25;font-variant-numeric:tabular-nums}
body.swim-site.swim-home .activity-distance{flex:0 0 auto;white-space:nowrap}
@media(max-width:380px){body.swim-site.swim-home .home-activity-info{gap:5px 7px}body.swim-site.swim-home .profile-challenge-count{font-size:11px;padding:3px 6px}}

/* Cancelled challenge rows v21: display only, never count as valid results. */
body.swim-site .activity-row.challenge-row-cancelled{
  background:linear-gradient(145deg,#283741,#202d37);
  border-color:#52616c;box-shadow:none;
}
body.swim-site .challenge-row-cancelled .activity-icon{background:#35434e;border-color:#58646d;filter:grayscale(1)}
body.swim-site .challenge-row-cancelled .activity-info strong{color:#aebbc4}
body.swim-site .challenge-row-cancelled .activity-info small{color:#9aaab6}
body.swim-site .challenge-row-cancelled .activity-distance{color:#a0adb7;text-decoration:line-through;text-decoration-thickness:1px}
body.swim-site .challenge-row-cancelled .profile-challenge-count.challenge-list-cancelled{
  color:#c4ced5;background:#3b4852;border-color:#65737e;
}

/* Profile month filter and leaderboard pending challenges v22 */
.honor-page .honor-challenge-count{display:inline-block;color:#ffda9f;background:#493e30;border:1px solid #b48b5366;border-radius:99px;font-size:10px;line-height:1.3;padding:2px 6px;white-space:nowrap;font-weight:650}
.honor-page .honor-card .honor-challenge-count{margin-top:5px;max-width:100%;box-sizing:border-box}
.honor-page .honor-info .honor-challenge-count{align-self:flex-start}
body.swim-site.swim-profile .profile-month-filter{display:flex;align-items:center;gap:8px;margin:0 0 10px}
body.swim-site.swim-profile .profile-month-filter label{font-size:12px;color:#b6d5e0;flex:none}
body.swim-site.swim-profile .profile-month-filter select{flex:1;min-width:0;color:#e2f9fc;background:#082d44;border:1px solid #4ac3d35e;border-radius:10px;padding:9px 10px;font-size:16px;color-scheme:dark}
body.swim-site.swim-profile .profile-month-filter button{border:1px solid #4ac3d35e;background:#124459;color:#b0f8f3;border-radius:10px;padding:10px 14px;white-space:nowrap;font-size:13px}
body.swim-site.swim-profile .profile-month-summary{display:grid;grid-template-columns:1fr 1fr;gap:12px;background:#0b344a;border:1px solid #49b8ca55;border-radius:14px;padding:12px 14px;margin-bottom:12px}
.profile-month-summary small{display:block;color:#b6d5e0;font-size:11px;margin-bottom:5px}
.profile-month-summary strong{display:block;color:#8af3ea;font-size:19px;overflow-wrap:anywhere}
.profile-month-summary strong span{font-size:11px;font-weight:500}
.profile-record-pages{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:10px;margin:18px 0;color:#b9d8e3;font-size:12px}

/* Leaderboard inline challenge label v23 */
.honor-page .honor-session-line{display:flex;align-items:center;flex-wrap:wrap;gap:3px 6px;min-width:0;line-height:1.35}
.honor-page .honor-session-line small{white-space:nowrap}
.honor-page .honor-info .honor-session-line .honor-challenge-count{align-self:center;margin:0}
.honor-page .honor-card .honor-session-line{justify-content:center;gap:3px 4px;width:100%;margin-top:3px}
.honor-page .honor-card .honor-session-line .honor-count{margin-top:0}
.honor-page .honor-card .honor-session-line .honor-challenge-count{margin:0;padding:1px 4px;font-size:9px}

/* Batch upload / confirmation v25 */
.batch-selection-heading{font-size:13px;color:#9ceee4;margin:12px 0 8px}
.batch-file-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.batch-file-cell{position:relative;min-width:0;padding:6px;background:#06283d;border:1px solid #387386;border-radius:10px;overflow:hidden}
.batch-file-cell img{display:block;width:100%;height:100px;object-fit:contain;border-radius:6px;background:#041d30}
.batch-file-cell small{display:block;color:#c2e5e9;font-size:11px;line-height:1.4;overflow-wrap:anywhere;margin-top:5px}
body.swim-site .batch-file-remove{position:absolute;right:4px;top:4px;width:25px;height:25px;padding:0;border:1px solid #7fb6c2;border-radius:50%;background:#052538e8;color:#fff;font-size:20px;line-height:1}
.batch-message{font-size:13px;color:#ffd6a6;overflow-wrap:anywhere}
.batch-progress-track{height:6px;background:#16485c;border-radius:6px;overflow:hidden;margin:12px 0 6px}
#batch-progress-bar{height:100%;width:0;background:#72e8dd;transition:width .25s}
#batch-progress-label{font-size:12px}
body.swim-site .batch-review-link{display:block;text-align:center;margin-top:10px}
.batch-review-link[hidden],#batch-progress-box[hidden]{display:none!important}
.batch-confirm-item{padding:12px;border:1px solid #39768a;background:#082d43;border-radius:14px;margin:0 0 14px;min-width:0}
.batch-confirm-heading{display:flex;align-items:center;justify-content:space-between;gap:6px;flex-wrap:wrap;margin-bottom:10px}
.batch-confirm-heading strong{font-size:14px}
.batch-confirm-flow .batch-include{display:flex;align-items:center;gap:6px;font-size:12px;margin:0}
body.swim-site .batch-include input{appearance:auto;width:17px;height:17px;accent-color:#67dfd7;margin:0}
.batch-fields{padding:0;margin:0;border:0;min-width:0}
.batch-excluded .batch-fields{opacity:.48}
.batch-ocr-state{color:#a7eae3;font-size:12px}
body.swim-site .batch-confirm-flow .batch-retry,body.swim-site .batch-confirm-flow .batch-remove-row{width:auto;padding:5px 9px;font-size:11px;white-space:nowrap}
.batch-add-row{width:100%;margin-bottom:8px}
@media(max-width:360px){.batch-file-list{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Profile action buttons v29: two aligned rows on narrow screens. */
body.swim-site .profile-hero .profile-actions{display:flex;flex-direction:column;align-items:center;gap:7px;width:100%;max-width:312px;margin:9px auto 0}
body.swim-site .profile-hero .profile-action-row{display:flex;justify-content:center;align-items:stretch;gap:6px;width:100%;min-width:0}
body.swim-site .profile-hero .profile-action-row > a,body.swim-site .profile-hero .profile-action-row > form{flex:1 1 0;max-width:100px;min-width:0;margin:0}
body.swim-site .profile-hero .profile-action-row .avatar-edit-link{display:flex;box-sizing:border-box;align-items:center;justify-content:center;min-height:34px;gap:0;margin:0;padding:6px 3px;white-space:nowrap;font-size:12px;line-height:1.3;font-weight:500;text-decoration:none}
body.swim-site .profile-hero .profile-logout{display:flex}
body.swim-site .profile-hero .profile-logout-button{width:100%;font-family:inherit;color:#c1dfe9;cursor:pointer}
body.swim-site .profile-hero .profile-action-row .challenge-badge{font-size:10px;line-height:1.2;padding:2px 4px;margin-left:2px;max-width:32px;overflow:hidden;text-overflow:ellipsis}
@media(max-width:350px){body.swim-site .profile-hero .profile-action-row{gap:4px}body.swim-site .profile-hero .profile-action-row .avatar-edit-link{font-size:11px;padding:5px 2px}}

/* Compact unread notification badges v31. */
body.swim-site .challenge-header-links{gap:10px}
body.swim-site .challenge-header-links .challenge-notice-link{position:relative;display:inline-flex;align-items:center;min-height:28px;padding:0 5px 0 0}
body.swim-site .challenge-header-links .challenge-notice-link .challenge-badge,
body.swim-site .profile-action-row .score-notice-link .challenge-badge{
 position:absolute;top:-1px;right:-5px;display:inline-flex;align-items:center;justify-content:center;
 box-sizing:border-box;min-width:14px;height:14px;padding:0 3px;margin:0;border-radius:999px;
 background:#e45465;color:#fff;font-size:9px;font-weight:700;line-height:1;white-space:nowrap;
 box-shadow:0 0 0 1.5px #083148;max-width:none;overflow:visible
}
body.swim-site .profile-action-row .score-notice-link{position:relative}
body.swim-site .profile-action-row .score-notice-link .challenge-badge{top:-4px;right:0}

/* Role labels v32: small capsule attached to the avatar, not the nickname. */
body.swim-site .avatar-role-anchor{position:relative;overflow:visible}
body.swim-site .avatar-role-tag{
 position:absolute;z-index:3;top:-5px;left:50%;transform:translateX(-50%);
 display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;
 min-height:13px;padding:1px 4px;border-radius:999px;border:1px solid #6bded7;
 background:#0c5464;color:#a4fff4;font-size:8px;line-height:1.1;font-weight:700;
 font-style:normal;white-space:nowrap;letter-spacing:0;text-shadow:none;
 box-shadow:0 1px 3px #001b2c99;pointer-events:none
}
body.swim-site .avatar-role-tag.role-owner{background:#e8b85e;border-color:#ffe0a4;color:#53370e}
body.swim-site .honor-emblem .avatar-role-tag{top:13%;left:auto;right:-7px;transform:none;font-size:9px;padding:2px 4px}
body.swim-site .record-author .avatar-role-tag{margin:0}
body.swim-site .challenge-person-avatar img{border-radius:50%}
