:root{
  --profile-blue:#0b69b0;
  --profile-blue-dark:#17577e;
  --profile-ink:#17212b;
  --profile-muted:#66717d;
  --profile-line:#dfe4e8;
  --profile-soft:#f6f8fa;
}
body{background:#f7f9fb}
.profile-shell{max-width:980px;margin:0 auto;padding:34px 20px 70px;color:var(--profile-ink)}
.profile-kicker{color:var(--profile-blue);text-transform:uppercase;letter-spacing:.11em;font-size:.72rem;font-weight:800;margin-bottom:7px}
.profile-hero{display:grid;grid-template-columns:160px minmax(0,1fr);gap:30px;align-items:center;padding:26px 0 34px;border-bottom:1px solid var(--profile-line)}
.profile-avatar-wrap{width:160px;height:160px}
.profile-avatar{display:block;width:160px;height:160px;object-fit:cover;border-radius:50%;border:1px solid #dce3e8;background:#fff;box-shadow:0 5px 18px rgba(26,43,56,.08)}
.profile-name-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.profile-name-row h1{margin:0;color:var(--profile-ink);font-size:clamp(2.45rem,5vw,4rem);line-height:1;letter-spacing:-.045em;font-weight:800}
.profile-role-badge{display:inline-flex;align-items:center;padding:5px 10px;border-radius:999px;background:#eef5fb;color:#28648a!important;font-size:.72rem;font-weight:750;text-decoration:none!important}
a.profile-role-badge:hover{background:#e3eff7;color:#174f72!important}
.profile-meta{display:flex;flex-wrap:wrap;gap:8px 20px;margin-top:13px;color:var(--profile-muted);font-size:.88rem}
.profile-meta strong{color:#34414b}
.profile-actions{margin-top:20px}
.profile-actions .btn{border-color:#c5d4de;color:#315f7b;font-weight:700}
.profile-actions .btn:hover{background:#eef5f9;border-color:#b5cbd8;color:#174f72}

.profile-about,.profile-topics,.profile-activity{margin-top:40px}
.profile-section-heading{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:15px}
.profile-section-heading h2{margin:0;color:var(--profile-ink);font-size:1.65rem;letter-spacing:-.025em;font-weight:800}
.profile-section-heading p{margin:0;color:#7a858e;font-size:.8rem}
.profile-about-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.profile-about-item{padding:17px 18px;border:1px solid var(--profile-line);border-radius:11px;background:#fff}
.profile-about-item span{display:block;margin-bottom:5px;color:#7a858e;font-size:.71rem;font-weight:800;letter-spacing:.07em;text-transform:uppercase}
.profile-about-item strong{display:block;color:#34414b;font-size:.96rem;line-height:1.45;font-weight:600}
.profile-about-wide{grid-column:1/-1}

.profile-topic-cloud{display:flex;flex-wrap:wrap;gap:7px;padding:18px;border:1px solid var(--profile-line);border-radius:12px;background:#fff}
.profile-topic{display:inline-flex;align-items:center;border-radius:999px;background:#f0f4f6;color:#52636e;line-height:1;padding:7px 10px}
.profile-topic-1{font-size:.72rem;font-weight:600}
.profile-topic-2{font-size:.77rem;font-weight:650;background:#edf3f6;color:#486276}
.profile-topic-3{font-size:.83rem;font-weight:700;background:#e9f1f6;color:#385c75}
.profile-topic-4{font-size:.9rem;font-weight:750;background:#e5eff6;color:#285873}
.profile-topic-5{font-size:.98rem;font-weight:800;background:#deebf4;color:#174f72}

.profile-activity-list{overflow:hidden;border:1px solid var(--profile-line);border-radius:12px;background:#fff;min-height:72px}
.profile-activity-list.is-loading{opacity:.55}
.profile-loading,.profile-empty{padding:28px 20px;text-align:center;color:#77828b}
.profile-activity-row{display:grid;grid-template-columns:minmax(0,1fr) 150px;gap:24px;align-items:center;padding:15px 18px;border-bottom:1px solid #edf0f2}
.profile-activity-row:last-child{border-bottom:0}
.profile-activity-row:hover{background:#f8fbfc}
.profile-activity-type{margin-bottom:3px;color:#74808a;font-size:.67rem;font-weight:800;letter-spacing:.065em;text-transform:uppercase}
.profile-activity-row h3{margin:0;font-size:.98rem;line-height:1.35}
.profile-activity-row h3 a{color:#214d68;text-decoration:none;font-weight:750}
.profile-activity-row h3 a:hover{color:#17577e;text-decoration:underline}
.profile-activity-time{text-align:right;color:#73808a;font-size:.76rem;white-space:nowrap}
.profile-pagination{display:flex;justify-content:center;align-items:center;gap:14px;margin-top:16px}
.profile-page-button{border:1px solid #ced8df;border-radius:7px;background:#fff;color:#53616d;padding:7px 11px;font-size:.8rem;font-weight:700;cursor:pointer}
.profile-page-button:hover:not(:disabled){background:#f1f5f7;color:#17577e}
.profile-page-button:disabled{opacity:.42;cursor:default}
.profile-page-status{min-width:120px;text-align:center;color:#78838c;font-size:.76rem}

@media(max-width:650px){
  .profile-shell{padding:22px 15px 55px}
  .profile-hero{grid-template-columns:92px minmax(0,1fr);gap:18px;padding-top:15px}
  .profile-avatar-wrap,.profile-avatar{width:92px;height:92px}
  .profile-name-row h1{font-size:2.25rem}
  .profile-role-badge{font-size:.66rem;padding:4px 8px}
  .profile-about-grid{grid-template-columns:1fr}
  .profile-about-wide{grid-column:auto}
  .profile-section-heading{display:block}
  .profile-section-heading p{margin-top:5px}
  .profile-activity-row{grid-template-columns:1fr;gap:6px}
  .profile-activity-time{text-align:left}
}
@media(max-width:420px){
  .profile-hero{display:block}
  .profile-avatar-wrap{margin-bottom:18px}
  .profile-pagination{gap:8px}
  .profile-page-status{min-width:auto}
}

/* Profile metrics and history */
.profile-milestones{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}
.profile-milestones span{display:inline-flex;align-items:center;padding:4px 8px;border:1px solid #d7e1e7;border-radius:999px;background:#fff;color:#60717d;font-size:.67rem;font-weight:750}
.profile-numbers,.profile-history{margin-top:40px}
.profile-number-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));overflow:hidden;border:1px solid var(--profile-line);border-radius:12px;background:#fff}
.profile-number{padding:20px 17px;border-right:1px solid var(--profile-line)}
.profile-number:last-child{border-right:0}
.profile-number strong{display:block;color:#203846;font-size:1.65rem;line-height:1;font-weight:800}
.profile-number span{display:block;margin-top:7px;color:#73808a;font-size:.72rem;font-weight:750;line-height:1.3;text-transform:uppercase;letter-spacing:.045em}
.profile-contribution-mix{display:flex;flex-wrap:wrap;gap:8px 18px;padding:12px 16px;border:1px solid var(--profile-line);border-top:0;border-radius:0 0 12px 12px;background:#f7f9fa;color:#697680;font-size:.78rem}
.profile-contribution-mix strong{color:#34414b}

.profile-history-chart{display:flex;align-items:flex-end;gap:7px;min-height:205px;padding:18px 16px 13px;overflow-x:auto;border:1px solid var(--profile-line);border-radius:12px;background:#fff}
.profile-history-season{flex:1 0 42px;min-width:42px;text-align:center}
.profile-history-count{height:18px;margin-bottom:4px;color:#75818a;font-size:.62rem;font-weight:700}
.profile-history-bar-wrap{height:125px;display:flex;align-items:flex-end;justify-content:center}
.profile-history-bar{width:22px;min-height:8px;border-radius:4px 4px 1px 1px;background:#7194aa}
.profile-history-season:hover .profile-history-bar{background:#356d8d}
.profile-history-label{margin-top:7px;color:#73808a;font-size:.59rem;white-space:nowrap;transform:rotate(-42deg);transform-origin:center top;height:30px}


@media(max-width:700px){
  .profile-number-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .profile-number{border-bottom:1px solid var(--profile-line)}
  .profile-number:nth-child(2){border-right:0}
  .profile-number:nth-child(3),.profile-number:nth-child(4){border-bottom:0}
  .profile-history-chart{padding-left:12px;padding-right:12px}
}
@media(max-width:430px){
  .profile-number-grid{grid-template-columns:1fr 1fr}
  .profile-number{padding:16px 13px}
  .profile-number strong{font-size:1.4rem}
}

/* Ski & Tell public profile diary */
.profile-ski-diary{margin-top:40px}
.profile-ski-diary-brand{display:flex;align-items:center;gap:24px;margin-bottom:16px;padding:20px 22px;border:1px solid var(--profile-line);border-radius:14px;background:linear-gradient(135deg,#fff 0%,#f5f9fb 100%)}
.profile-ski-diary-logo{display:block;width:190px;max-width:32%;height:auto;flex:0 0 auto}
.profile-ski-diary-brand-copy{min-width:0}
.profile-ski-diary-brand-copy h2{margin:3px 0 5px;color:var(--profile-ink);font-size:1.65rem;line-height:1.2;letter-spacing:-.025em;font-weight:800}
.profile-ski-diary-brand-copy p{margin:0;color:#6f7c85;font-size:.9rem;line-height:1.5}
.profile-ski-diary-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));overflow:hidden;margin-bottom:16px;border:1px solid var(--profile-line);border-radius:12px;background:#fff}
.profile-ski-diary-stats>div{padding:18px 17px;border-right:1px solid var(--profile-line)}
.profile-ski-diary-stats>div:last-child{border-right:0}
.profile-ski-diary-stats strong{display:block;color:#203846;font-size:1.6rem;line-height:1;font-weight:800}
.profile-ski-diary-stats span{display:block;margin-top:7px;color:#73808a;font-size:.8rem;font-weight:750;line-height:1.3;text-transform:uppercase;letter-spacing:.035em}
.profile-ski-diary-list{overflow:hidden;min-height:76px;border:1px solid var(--profile-line);border-radius:12px;background:#fff;transition:opacity .12s ease}
.profile-ski-diary-list.is-loading{opacity:.55}
.profile-ski-day{display:grid;grid-template-columns:155px minmax(0,1fr);gap:22px;padding:18px 20px;border-bottom:1px solid #edf0f2}
.profile-ski-day:last-child{border-bottom:0}
.profile-ski-day:hover{background:#f9fbfc}
.profile-ski-day-date{color:#65747e;font-size:.84rem;font-weight:750;line-height:1.4}
.profile-ski-day-main{min-width:0}
.profile-ski-day-main h3{margin:0;color:#264e66;font-size:1.05rem;line-height:1.3;font-weight:800}
.profile-ski-day-location{margin-top:3px;color:#78858e;font-size:.84rem;line-height:1.4}
.profile-ski-day-notes{margin-top:9px;color:#44545e;font-size:.9rem;line-height:1.55;overflow-wrap:anywhere}
.profile-ski-diary-pagination{margin-top:14px}
@media(max-width:700px){
  .profile-ski-diary-brand{align-items:flex-start;gap:17px;padding:17px}
  .profile-ski-diary-logo{width:145px;max-width:36%}
  .profile-ski-diary-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .profile-ski-diary-stats>div{border-bottom:1px solid var(--profile-line)}
  .profile-ski-diary-stats>div:nth-child(2){border-right:0}
  .profile-ski-diary-stats>div:nth-child(3),.profile-ski-diary-stats>div:nth-child(4){border-bottom:0}
  .profile-ski-day{grid-template-columns:1fr;gap:4px;padding:16px}
}
@media(max-width:470px){
  .profile-ski-diary-brand{display:block}
  .profile-ski-diary-logo{width:175px;max-width:70%;margin-bottom:14px}
  .profile-ski-diary-brand-copy h2{font-size:1.4rem}
}

/* Ski & Tell year filters */
.profile-ski-year-filters{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
.profile-ski-year-pill{display:inline-flex;align-items:center;gap:4px;min-height:36px;padding:7px 11px;border:1px solid #d4dee4;border-radius:999px;background:#fff;color:#526672;font-size:.8rem;font-weight:800;line-height:1;cursor:pointer}
.profile-ski-year-pill span{color:#87939a;font-weight:700}
.profile-ski-year-pill:hover{border-color:#b8ccd7;background:#f5f9fb;color:#285b75}
.profile-ski-year-pill.is-active{border-color:#b9d0dc;background:#eaf3f8;color:#285f7d}
.profile-ski-year-pill.is-active span{color:#567c92}
.profile-ski-diary-pagination.is-hidden{display:none}


/* Ski & Tell resort summary */
.profile-ski-resorts{margin:0 0 20px}
.profile-ski-resorts-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin:0 2px 11px}
.profile-ski-resorts-heading h3{margin:2px 0 0;color:var(--profile-ink);font-size:1.25rem;line-height:1.2;font-weight:800;letter-spacing:-.02em}
.profile-ski-resorts-heading p{max-width:390px;margin:0;color:#7a858e;font-size:.82rem;line-height:1.4;text-align:right}
.profile-ski-resort-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.profile-ski-resort-card{min-width:0;padding:14px 15px;border:1px solid var(--profile-line);border-radius:10px;background:#fff}
.profile-ski-resort-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.profile-ski-resort-card-top strong{min-width:0;color:#2b536b;font-size:.94rem;line-height:1.35;font-weight:800}
.profile-ski-resort-card-top>span{flex:0 0 auto;padding:4px 7px;border-radius:999px;background:#edf4f7;color:#567486;font-size:.7rem;line-height:1;font-weight:800;white-space:nowrap}
.profile-ski-resort-location{margin-top:4px;color:#74818a;font-size:.8rem;line-height:1.4}
.profile-ski-resort-visits{display:flex;flex-wrap:wrap;gap:4px 14px;margin-top:9px;padding-top:8px;border-top:1px solid #edf0f2;color:#89949b;font-size:.72rem;line-height:1.35}
@media(max-width:700px){.profile-ski-resorts-heading{display:block}.profile-ski-resorts-heading p{margin-top:4px;text-align:left}.profile-ski-resort-grid{grid-template-columns:1fr}}


/* Ski & Tell: ski-season summary */
.profile-ski-seasons{margin:0 0 20px}
.profile-ski-seasons-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin:0 2px 11px}
.profile-ski-seasons-heading h3{margin:2px 0 0;color:var(--profile-ink);font-size:1.25rem;line-height:1.2;font-weight:800;letter-spacing:-.02em}
.profile-ski-seasons-heading p{max-width:390px;margin:0;color:#7a858e;font-size:.82rem;line-height:1.4;text-align:right}
.profile-ski-season-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));overflow:hidden;border:1px solid var(--profile-line);border-radius:11px;background:#fff}
.profile-ski-season-card{min-width:0;padding:14px 15px;border-right:1px solid var(--profile-line);border-bottom:1px solid var(--profile-line)}
.profile-ski-season-card:nth-child(4n){border-right:0}
.profile-ski-season-card strong{display:block;color:#2b536b;font-size:1.02rem;line-height:1.25;font-weight:800}
.profile-ski-season-card span{display:block;margin-top:4px;color:#4d5f6a;font-size:.82rem;line-height:1.35;font-weight:700}
.profile-ski-season-card small{display:block;margin-top:2px;color:#849099;font-size:.72rem;line-height:1.35}
@media(max-width:800px){.profile-ski-season-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.profile-ski-season-card:nth-child(4n){border-right:1px solid var(--profile-line)}.profile-ski-season-card:nth-child(2n){border-right:0}}
@media(max-width:700px){.profile-ski-seasons-heading{display:block}.profile-ski-seasons-heading p{margin-top:4px;text-align:left}}
@media(max-width:430px){.profile-ski-season-grid{grid-template-columns:1fr 1fr}.profile-ski-season-card{padding:12px 13px}}


/* Ski & Tell v6: visually group the complete feature on public profiles */
.profile-ski-diary{margin-top:40px;padding:22px;border:1px solid #d6e2e8;border-radius:17px;background:linear-gradient(180deg,#f4f8fa 0%,#f8fafb 100%);box-shadow:0 3px 12px rgba(31,53,66,.035)}
.profile-ski-diary-brand{margin-bottom:18px;border-color:#d4e1e8;background:#fff}
.profile-ski-diary-stats{margin-bottom:22px}
.profile-ski-seasons,.profile-ski-resorts{padding-top:20px;border-top:1px solid #dce6eb}
.profile-ski-resorts{margin-bottom:22px}
.profile-ski-year-filters{margin-top:2px;padding-top:20px;border-top:1px solid #dce6eb}
.profile-ski-diary-list{box-shadow:0 1px 2px rgba(31,53,66,.025)}
@media(max-width:700px){.profile-ski-diary{padding:16px;border-radius:14px}}
@media(max-width:470px){.profile-ski-diary{padding:12px}}

/* Ski & Tell v9: focused mobile/responsive polish */
@media(max-width:700px){
  .profile-ski-diary{
    padding:15px;
  }
  .profile-ski-diary-brand{
    gap:14px;
    padding:15px;
  }
  .profile-ski-diary-brand-copy p{
    font-size:.92rem;
  }
  .profile-ski-diary-stats>div{
    padding:15px 13px;
  }
  .profile-ski-diary-stats span{
    font-size:.78rem;
  }
  .profile-ski-resort-card-top strong{
    overflow-wrap:anywhere;
  }
  .profile-ski-resort-location,
  .profile-ski-resort-visits{
    overflow-wrap:anywhere;
  }
  .profile-ski-day-date{
    font-size:.88rem;
  }
  .profile-ski-day-main h3{
    overflow-wrap:anywhere;
    font-size:1.08rem;
  }
  .profile-ski-day-location{
    overflow-wrap:anywhere;
    font-size:.88rem;
  }
  .profile-ski-day-notes{
    font-size:.94rem;
  }
}

@media(max-width:620px){
  .profile-ski-year-filters{
    flex-wrap:nowrap;
    width:100%;
    padding-bottom:5px;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:thin;
  }
  .profile-ski-year-pill{
    flex:0 0 auto;
    min-height:40px;
    padding:8px 12px;
    font-size:.88rem;
  }
  .profile-ski-seasons-heading h3,
  .profile-ski-resorts-heading h3{
    font-size:1.2rem;
  }
  .profile-ski-seasons-heading p,
  .profile-ski-resorts-heading p{
    font-size:.88rem;
  }
  .profile-ski-resort-card{
    padding:13px 14px;
  }
  .profile-ski-resort-card-top>span{
    font-size:.76rem;
  }
  .profile-ski-resort-location{
    font-size:.86rem;
  }
  .profile-ski-resort-visits{
    font-size:.8rem;
  }
  .profile-ski-season-card span{
    font-size:.86rem;
  }
  .profile-ski-season-card small{
    font-size:.78rem;
  }
  .profile-ski-diary-pagination{
    flex-wrap:wrap;
    row-gap:8px;
  }
}

@media(max-width:470px){
  .profile-ski-diary{
    padding:11px;
    border-radius:13px;
  }
  .profile-ski-diary-brand{
    padding:14px;
  }
  .profile-ski-diary-logo{
    width:165px;
    max-width:78%;
  }
  .profile-ski-diary-stats{
    grid-template-columns:1fr 1fr;
  }
  .profile-ski-diary-stats>div{
    min-width:0;
  }
  .profile-ski-diary-stats strong{
    font-size:1.45rem;
  }
  .profile-ski-season-grid{
    grid-template-columns:1fr;
  }
  .profile-ski-season-card,
  .profile-ski-season-card:nth-child(2n),
  .profile-ski-season-card:nth-child(4n){
    border-right:0;
  }
  .profile-ski-season-card:last-child{
    border-bottom:0;
  }
  .profile-ski-resort-card-top{
    gap:9px;
  }
  .profile-ski-day{
    padding:14px;
  }
  .profile-ski-diary-pagination{
    justify-content:space-between;
  }
  .profile-ski-diary-pagination .profile-page-status{
    order:3;
    width:100%;
    text-align:center;
  }
}


/* Ski & Tell year pills: wrap rather than horizontal scroll */
.account-ski-diary-year-pills,
.account-ski-diary-years,
.profile-ski-diary-year-pills,
.profile-ski-diary-years {
    display:flex;
    flex-wrap:wrap;
    overflow-x:visible;
    white-space:normal;
}
