/* Guide-only replicas of the site's social screens. No live page component
   class is used inside these scenes, so page CSS cannot resize the story. */
.profile-guide__frame :is(.pg-routes,.pg-library__dialog,.pg-material-tabs,.pg-progress,.pg-achievements,.pg-reputation) *,
.profile-guide__frame :is(.pg-routes,.pg-library__dialog,.pg-material-tabs,.pg-progress,.pg-achievements,.pg-reputation) { box-sizing: border-box; }
.profile-guide__frame :is(.profile-guide__live-routes,.profile-guide__live-library,.profile-guide__live-photos,.profile-guide__live-ranks,.profile-guide__live-achievements,.profile-guide__live-reputation) { overflow-y: auto; scrollbar-width: none; }
.profile-guide__frame :is(.profile-guide__live-routes,.profile-guide__live-library,.profile-guide__live-photos,.profile-guide__live-ranks,.profile-guide__live-achievements,.profile-guide__live-reputation)::-webkit-scrollbar { display: none; }

/* Public routes tab and its route cards. */
.profile-guide__live-routes.pg-routes { padding: 20px 21px; }
.pg-routes__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.pg-routes__title { margin: 0; color: #172331; font-size: 23px; font-weight: 850; line-height: 1.1; }
.pg-routes__summary { margin: 3px 0 0; color: #798594; font-size: 10px; }
.pg-routes__all { display: inline-flex; align-items: center; gap: 5px; color: #e4632c; font-size: 10px; font-weight: 750; white-space: nowrap; }
.pg-routes__all-icon { width: 12px; height: 12px; }
.pg-routes__tabs { display: flex; gap: 6px; margin-bottom: 12px; overflow: hidden; border-bottom: 1px solid #e8ecef; white-space: nowrap; }
.pg-routes__tab { display: inline-flex; min-height: 30px; align-items: center; gap: 4px; padding: 0 9px; border-bottom: 2px solid transparent; color: #76828e; font-size: 10px; }
.pg-routes__tab.is-active { border-bottom-color: #f46e35; color: #d45c29; font-weight: 750; }
.pg-routes__tab-count { color: #e66c36; font-size: 9px; }
.pg-route-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.pg-route-card { min-width: 0; overflow: hidden; border: 1px solid #e3e8eb; border-radius: 13px; background: #fff; box-shadow: 0 5px 14px #1a34420c; }
.pg-route-card__media { position: relative; height: 128px; overflow: hidden; background: #203e49; }
.pg-route-card__image { display: block; width: 100%; height: 100%; object-fit: cover; }
.pg-route-card__shade { position: absolute; inset: 0; background: linear-gradient(0deg,#091e2a55,transparent 55%); }
.pg-route-card__activity { position: absolute; bottom: 8px; left: 9px; display: grid; width: 29px; height: 29px; place-items: center; border-radius: 50%; background: #fff; }
.pg-route-card__activity img { width: 17px; height: 17px; }
.pg-route-card__body { padding: 9px 11px 10px; }
.pg-route-card__title { overflow: hidden; margin: 0; color: #1b2b37; font-size: 12px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.pg-route-card__location { display: flex; align-items: center; gap: 3px; overflow: hidden; margin: 5px 0 0; color: #7a8892; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.pg-route-card__location-icon { width: 10px; height: 10px; }
.pg-route-card__metrics { display: flex; gap: 8px; margin-top: 7px; color: #566674; font-size: 9px; }
.pg-route-card__altitude { height: 32px; margin-top: 7px; }
.pg-route-card__altitude svg { display: block; width: 100%; height: 21px; }
.pg-route-card__altitude-fill { fill: #f47a371a; }
.pg-route-card__altitude-line { fill: none; stroke: #ed7134; stroke-width: 2; }
.pg-route-card__altitude--easy .pg-route-card__altitude-line { stroke: #5b9edd; }
.pg-route-card__altitude span { color: #2f9b63; font-size: 8px; font-weight: 750; }

/* Saved route folders and cards. */
.profile-guide__live-library { padding: 10px !important; }
.pg-library__dialog { height: 100%; overflow: hidden; border: 1px solid #e3e8eb; border-radius: 14px; background: #fff; }
.pg-library__header { display: flex; min-height: 67px; align-items: center; justify-content: space-between; padding: 11px 17px; border-bottom: 1px solid #e8ecee; }
.pg-library__header p { margin: 0 0 2px; color: #e96b32; font-size: 8px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.pg-library__header h2 { margin: 0; color: #152331; font-size: 21px; font-weight: 850; line-height: 1.05; }
.pg-library__header span:not(.pg-library__close) { color: #81909b; font-size: 9px; }
.pg-library__close { display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid #e4e9ec; border-radius: 50%; background: #f8fafb; }
.pg-library__close img { width: 12px; height: 12px; }
.pg-library__layout { display: grid; grid-template-columns: 33% minmax(0,1fr); height: calc(100% - 67px); }
.pg-library__sidebar { position: relative; display: flex; min-width: 0; flex-direction: column; padding: 12px 11px; border-right: 1px solid #e8ecee; }
.pg-library__sidebar-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pg-library__sidebar-title h3 { margin: 0; color: #182835; font-size: 13px; font-weight: 800; }
.pg-library__sidebar-add { display: grid; width: 24px; height: 24px; place-items: center; border: 1px solid #e7ecee; border-radius: 8px; color: #43525e; font-size: 15px; }
.pg-library__folder-tree { display: grid; align-content: start; gap: 3px; min-height: 0; }
.pg-library__folder-row { display: flex; min-height: 29px; align-items: center; justify-content: space-between; gap: 5px; padding: 0 6px; border-radius: 8px; color: #465667; }
.pg-library__folder-row.is-active { background: #fff1e9; color: #d75f2f; }
.pg-library__folder-row.profile-guide__created-folder { position: static; z-index: auto; width: auto; min-height: 29px; padding: 0 6px; border: 0; border-radius: 8px; box-shadow: none; animation: none; }
.pg-library__folder-row.profile-guide__created-folder small { display: block; }
.pg-library__folder-select { display: flex; min-width: 0; align-items: center; gap: 5px; }
.pg-library__folder-select img { width: 12px; height: 12px; }
.pg-library__folder-select strong { overflow: hidden; font-size: 9px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.pg-library__folder-row small { font-size: 9px; }
.pg-library__folder-group-label { margin: 9px 4px 3px; color: #99a3ad; font-size: 8px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.pg-library__new-folder { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding: 5px 4px; border: 0; background: transparent; color: #db602d; font-size: 9px; font-weight: 750; text-align: left; }
.pg-library__new-folder span { font-size: 16px; line-height: 1; }
.pg-library__hint { margin: 2px 0 0; color: #9aa6b0; font-size: 8px; line-height: 1.25; }
.pg-library__content { min-width: 0; overflow: hidden; padding: 12px; }
.pg-library__mobile-back-row { display: none; }
.pg-library__breadcrumb { color: #a0aab2; font-size: 8px; }
.pg-library__folder-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 7px 0 10px; }
.pg-library__folder-copy { display: flex; min-width: 0; align-items: center; gap: 8px; }
.pg-library__folder-mark { display: grid; width: 31px; height: 31px; flex: 0 0 31px; place-items: center; border: 1px solid #f3b28e; border-radius: 9px; background: #fff6ef; }
.pg-library__folder-mark img { width: 16px; height: 16px; }
.pg-library__folder-copy h3 { overflow: hidden; margin: 0; color: #192936; font-size: 15px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.pg-library__folder-copy p { margin: 2px 0 0; color: #81909a; font-size: 8px; }
.pg-library__map-button { display: inline-flex; align-items: center; gap: 4px; min-height: 27px; padding: 0 8px; border-radius: 8px; background: #f47437; color: #fff; font-size: 8px; font-weight: 750; white-space: nowrap; }
.pg-library__map-button img { width: 12px; height: 12px; filter: brightness(0) invert(1); }
.pg-library__toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.pg-library__toolbar input,.pg-library__toolbar select { width: 100%; height: 28px; padding: 0 6px; border: 1px solid #e7ebee; border-radius: 8px; background: #fafbfc; color: #6b7782; font: inherit; font-size: 8px; }
.pg-library__grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.pg-library-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid #e5e9ec; border-radius: 11px; background: #fff; }
.pg-library-card__media { position: relative; height: 93px; overflow: hidden; }
.pg-library-card__media > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pg-library-card__activity { position: absolute; bottom: 5px; left: 5px; display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: #fff; }
.pg-library-card__activity img { width: 14px; height: 14px; }
.pg-library-card__body { padding: 7px; }
.pg-library-card__body h4 { overflow: hidden; margin: 0; color: #1d2b37; font-size: 9px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.pg-library-card__meta { display: flex; gap: 5px; overflow: hidden; margin: 4px 0; color: #77848e; font-size: 7px; white-space: nowrap; }
.pg-library-card__spark { display: block; width: 100%; height: 18px; fill: none; stroke: #ed7035; stroke-width: 2; }
.pg-library-card__difficulty { color: #2e985a; font-size: 7px; font-weight: 750; }
.pg-library-card__folder { position: absolute; top: 6px; right: 6px; display: grid; width: 24px; height: 24px; place-items: center; border: 1px solid #ffffff84; border-radius: 50%; background: #253849b8; }
.pg-library-card__folder img { width: 13px; height: 13px; filter: brightness(0) invert(1); }

/* The profile's feed, photo albums and published story. */
.profile-guide__live-photos { padding: 19px 21px !important; }
.pg-material-tabs { display: flex; gap: 16px; min-height: 31px; align-items: center; overflow: hidden; border-bottom: 1px solid #e7ecef; color: #81909b; font-size: 10px; white-space: nowrap; }
.pg-material-tabs > span { display: grid; height: 31px; align-items: center; border-bottom: 2px solid transparent; }
.pg-material-tabs > .is-active { border-color: #f57537; color: #1d2b37; font-weight: 800; }
.profile-guide__live-photos .profile-guide__demo-albums { margin-top: 12px; }
.profile-guide__live-photos .profile-guide__demo-albums-head { display: flex; align-items: end; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.pg-photos-eyebrow { margin: 0 0 2px; color: #e97137; font-size: 8px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.profile-guide__demo-albums-head h3 { margin: 0; color: #172432; font-size: 20px; font-weight: 850; }
.profile-guide__demo-albums-head button { padding: 6px 8px; border: 0; background: transparent; color: #e16c36; font-size: 9px; font-weight: 750; text-transform: uppercase; }
.pg-photo-collage { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.pg-photo-collage__item { min-width: 0; }
.pg-photo-collage__image { position: relative; height: 154px; overflow: hidden; border-radius: 13px; background: #203f49; }
.pg-photo-collage__image::after { position: absolute; inset: 0; background: linear-gradient(0deg,#091d27c9,transparent 70%); content: ""; pointer-events: none; }
.pg-photo-collage__image > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pg-photo-collage__image > div { position: absolute; z-index: 1; right: 10px; bottom: 9px; left: 10px; color: #fff; }
.pg-album-card-title { margin: 0; color: #fff; font-size: 11px; font-weight: 850; text-transform: uppercase; }
.pg-photo-collage__image p { margin: 2px 0 0; font-size: 9px; }
.profile-guide__live-photos .profile-guide__demo-post { margin-top: 11px; overflow: hidden; border: 1px solid #e7ecef; border-radius: 12px; background: #fff; }
.pg-feed-topbar { display: flex; align-items: center; gap: 7px; min-height: 41px; padding: 5px 9px; }
.pg-feed-avatar { width: 27px; height: 27px; border-radius: 50%; object-fit: cover; }
.pg-feed-topbar > span { display: grid; flex: 1; gap: 2px; }
.pg-feed-topbar strong { color: #172532; font-size: 9px; }
.pg-feed-topbar small { color: #8b97a1; font-size: 8px; }
.pg-feed-topbar > b { padding: 4px 6px; border-radius: 6px; background: #fff3e9; color: #d7612c; font-size: 7px; }
.profile-guide__live-photos .profile-guide__demo-post-cover { display: block; width: 100%; height: 139px; object-fit: cover; }
.pg-feed-body { display: flex; align-items: center; gap: 8px; padding: 8px 10px; }
.pg-feed-body h3 { overflow: hidden; margin: 0; color: #1b2d38; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.pg-feed-body p { display: none; }
.pg-feed-action { display: inline-flex; min-height: 23px; align-items: center; gap: 4px; margin-left: auto; padding: 0 6px; border: 1px solid #e8ecef; border-radius: 7px; background: #fff; color: #e66b37; font-size: 9px; }
.pg-feed-action img { width: 11px; height: 11px; }

/* Progress has its own hero, preventing the live page's animated text layers
   from stacking duplicates inside the small story frame. */
.profile-guide__live-ranks.pg-progress { padding: 16px !important; }
.pg-progress__hero { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,.85fr); gap: 12px; min-height: 190px; align-items: center; padding: 18px; border-radius: 18px; background: radial-gradient(circle at 75% 20%,#477b6d6a,transparent 38%),linear-gradient(120deg,#102c31,#1b4842 64%,#203e3c); color: #fff; box-shadow: 0 12px 25px #0e352a27; }
.pg-progress__hero-copy { min-width: 0; }
.pg-progress__eyebrow { margin: 0; color: #ffc4a1; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.pg-progress__hero h1 { margin: 6px 0 8px; color: #fff; font-size: 24px; font-weight: 900; letter-spacing: -.03em; line-height: 1.08; }
.pg-progress__hero h1 span:not(.pg-progress__hero-white) { color: #ffae83; }
.pg-progress__hero-copy > p:last-of-type { margin: 0; color: #d9e8e5; font-size: 10px; line-height: 1.35; }
.pg-progress__hero-level { position: relative; min-width: 0; padding: 13px; border: 1px solid #ffffff43; border-radius: 14px; background: #ffffff16; color: #fff; }
.pg-progress__hero-level > div { display: grid; gap: 3px; }
.pg-progress__hero-level small { color: #ffcfb2; font-size: 8px; text-transform: uppercase; }
.pg-progress__hero-level strong { color: #fff; font-size: 15px; }
.pg-progress__hero-level div span,.pg-progress__hero-level p { color: #d9e8e5; font-size: 9px; }
.pg-progress__level-orbit { float: right; display: grid; width: 38px; height: 38px; place-items: center; border: 3px solid #fa9b6b; border-radius: 50%; color: #fff; font-size: 15px; font-weight: 900; }
.pg-progress__hero-level progress { display: block; width: 100%; height: 7px; margin-top: 14px; accent-color: #fb915e; }
.pg-progress__hero-level p { margin: 6px 0 0; }

/* Achievement gallery: original site art, no icon disks. */
.profile-guide__live-achievements.pg-achievements { padding: 21px !important; }
.pg-achievements__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pg-achievements__eyebrow { margin: 0 0 3px; color: #d96935; font-size: 9px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.pg-achievements__head h2 { margin: 0; color: #1b2935; font-size: 23px; font-weight: 850; }
.pg-achievements__intro { margin: 3px 0 0; color: #81909a; font-size: 9px; }
.pg-achievements__all { flex: 0 0 auto; padding: 7px 9px; border: 1px solid #f0c9b2; border-radius: 9px; background: #fff7f1; color: #c76537; font-size: 9px; font-weight: 750; }
.pg-achievements__featured { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 5px; margin: 21px 0 17px; }
.pg-achievements__badge { display: flex; min-width: 0; flex-direction: column; align-items: center; gap: 3px; padding: 0; border: 0; background: transparent; color: #263443; text-align: center; }
.pg-achievements__badge img { display: block; width: 71px; height: 71px; max-width: 100%; object-fit: contain; filter: drop-shadow(0 5px 5px #183c2e22); }
.profile-guide__live-achievements .pg-achievements__badge { display: flex; }
.profile-guide__live-achievements .pg-achievements__badge img { width: 71px; height: 71px; padding: 0; border: 0; border-radius: 0; background: transparent; filter: drop-shadow(0 5px 5px #183c2e22); }
.pg-achievements__badge-category { color: #d86b39; font-size: 7px; }
.pg-achievements__badge strong { color: #24323e; font-size: 9px; line-height: 1.1; }
.pg-achievements__categories { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; padding-top: 12px; border-top: 1px solid #e7ecee; }
.pg-achievements__category { min-width: 0; padding: 8px; border: 1px solid #e3eae6; border-radius: 10px; background: #f8faf8; }
.pg-achievements__category-top { display: flex; justify-content: space-between; gap: 3px; }
.pg-achievements__category-top strong,.pg-achievements__category-top span { overflow: hidden; color: #304039; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.pg-achievements__category-track { display: block; height: 5px; margin: 8px 0 5px; border-radius: 99px; background: #e2eae5; }
.pg-achievements__category-track span { display: block; height: 100%; border-radius: inherit; background: #51a678; }
.pg-achievements__category--chronicler .pg-achievements__category-track span { background: #e28a47; }
.pg-achievements__category--scout .pg-achievements__category-track span { background: #678bc6; }
.pg-achievements__category--community .pg-achievements__category-track span { background: #a37ab3; }
.pg-achievements__category small { color: #87938b; font-size: 7px; }
.pg-achievements .profile-guide__achievement-progress { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; padding: 10px; border: 1px solid #e3e9e7; border-radius: 10px; background: #fbfcfc; }
.pg-achievements .profile-guide__achievement-progress div { display: grid; gap: 3px; }
.pg-achievements .profile-guide__achievement-progress strong { color: #25323b; font-size: 10px; }
.pg-achievements .profile-guide__achievement-progress span { color: #83909b; font-size: 8px; }

/* Reputation cards are independent of gamification page layout. */
.profile-guide__live-reputation.pg-reputation { padding: 21px !important; }
.pg-reputation__section-head { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.pg-reputation__eyebrow { margin: 0 0 4px; color: #d16a38; font-size: 9px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.pg-reputation__section-head h2 { margin: 0; color: #1c2b38; font-size: 22px; font-weight: 850; }
.pg-reputation__section-head p:last-child { max-width: 370px; margin: 4px 0 0; color: #82909b; font-size: 10px; line-height: 1.35; }
.pg-reputation__section-mark { color: #a8b2b9; font-size: 9px; font-weight: 750; white-space: nowrap; }
.pg-reputation__explain-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
.pg-reputation__surface { display: block; width: auto; min-width: 0; min-height: 203px; margin: 0; padding: 15px; border: 1px solid #e4e9ec; border-radius: 14px; background: #fff; text-align: left; }
.pg-reputation__surface > span:first-child { display: block; color: #657481; font-size: 9px; }
.pg-reputation__surface > strong { display: block; margin: 7px 0; color: #243340; font-size: 25px; line-height: 1; }
.pg-reputation__surface progress { display: block; width: 100%; height: 7px; margin: 8px 0 13px; accent-color: #4b9b65; }
.pg-reputation__surface h3 { margin: 0 0 5px; color: #25343d; font-size: 12px; }
.pg-reputation__surface p { margin: 0; color: #74818b; font-size: 9px; line-height: 1.35; }
.pg-reputation__details { margin-top: 11px; color: #bc633c; font-size: 9px; }

@media (max-width: 850px) {
    .profile-guide__live-routes.pg-routes { padding: 12px !important; }
    .pg-routes__header { margin-bottom: 6px; }
    .pg-routes__title { font-size: 17px; }
    .pg-routes__summary,.pg-routes__all { font-size: 8px; }
    .pg-routes__tabs { gap: 3px; margin-bottom: 9px; }
    .pg-routes__tab { min-height: 27px; padding: 0 6px; font-size: 9px; }
    .pg-route-grid { grid-template-columns: 1fr; gap: 8px; }
    .pg-route-card:nth-child(n+2) { display: none; }
    .pg-route-card__media { height: 105px; }
    .pg-route-card__body { padding: 8px 9px; }

    .profile-guide__live-library { padding: 7px !important; }
    .pg-library__dialog { border-radius: 12px; }
    .pg-library__header { min-height: 57px; padding: 9px 11px; }
    .pg-library__header h2 { font-size: 18px; }
    .pg-library__layout { display: block; height: calc(100% - 57px); }
    .pg-library__sidebar { height: 100%; padding: 10px 11px; border-right: 0; }
    .pg-library__new-folder { margin-top: 8px; }
    .pg-library__content { display: none; height: 100%; overflow: auto; padding: 10px; }
    .profile-guide__live-library:not(.is-folder-list-open) .pg-library__sidebar { display: none; }
    .profile-guide__live-library:not(.is-folder-list-open) .pg-library__content { display: block; }
    .pg-library__mobile-back-row { display: flex; justify-content: space-between; margin-bottom: 8px; color: #6e7c86; font-size: 9px; }
    .pg-library__folder-heading { margin: 5px 0 8px; }
    .pg-library__folder-copy h3 { font-size: 13px; }
    .pg-library__map-button { display: none; }
    .pg-library-card__media { height: 84px; }

    .profile-guide__live-photos { padding: 12px !important; }
    .pg-material-tabs { gap: 12px; min-height: 27px; font-size: 9px; }
    .pg-material-tabs > span { height: 27px; }
    .profile-guide__live-photos .profile-guide__demo-albums { margin-top: 8px; }
    .profile-guide__demo-albums-head h3 { font-size: 16px; }
    .pg-photo-collage { gap: 6px; }
    .pg-photo-collage__image { height: 108px; border-radius: 10px; }
    .pg-album-card-title { font-size: 8px; }
    .pg-photo-collage__image p { font-size: 7px; }
    .profile-guide__live-photos .profile-guide__demo-post { margin-top: 8px; }
    .profile-guide__live-photos .profile-guide__demo-post-cover { height: 100px; }

    .profile-guide__live-ranks.pg-progress { padding: 9px !important; }
    .pg-progress__hero { display: block; min-height: 0; padding: 12px; border-radius: 12px; }
    .pg-progress__hero h1 { font-size: 18px; }
    .pg-progress__hero-copy > p:last-of-type { font-size: 8px; }
    .pg-progress__hero-level { margin-top: 10px; padding: 9px; }
    .pg-progress__hero-level strong { font-size: 12px; }
    .pg-progress__hero-level progress { margin-top: 8px; }
    .pg-progress__level-orbit { width: 31px; height: 31px; font-size: 12px; }

    .profile-guide__live-achievements.pg-achievements { padding: 12px !important; }
    .pg-achievements__head h2 { font-size: 17px; }
    .pg-achievements__all { padding: 6px; font-size: 8px; }
    .pg-achievements__featured { display: flex; gap: 7px; margin: 12px 0; overflow-x: auto; scrollbar-width: none; }
    .pg-achievements__badge { width: 62px; flex: 0 0 62px; }
    .pg-achievements__badge img { width: 57px; height: 57px; }
    .profile-guide__live-achievements .pg-achievements__badge img { width: 57px; height: 57px; padding: 0; }
    .pg-achievements__badge strong { font-size: 8px; }
    .pg-achievements__categories { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; padding-top: 9px; }
    .pg-achievements__category { padding: 5px; }
    .pg-achievements .profile-guide__achievement-progress { margin-top: 7px; padding: 7px; }

    .profile-guide__live-reputation.pg-reputation { padding: 12px !important; }
    .pg-reputation__section-head { margin-bottom: 10px; }
    .pg-reputation__section-head h2 { font-size: 18px; }
    .pg-reputation__section-head p:last-child { font-size: 8px; }
    .pg-reputation__explain-grid { grid-template-columns: 1fr; gap: 7px; }
    .pg-reputation__surface { min-height: 0; padding: 10px; }
    .pg-reputation__surface > strong { font-size: 22px; }
    .pg-reputation__surface p { font-size: 8px; }
}

html[data-theme="dark"] .profile-guide__frame :is(.pg-route-card,.pg-library__dialog,.pg-library-card,.profile-guide__live-photos .profile-guide__demo-post,.pg-reputation__surface) { border-color: #3a4d5c; background: #213443; }
html[data-theme="dark"] .profile-guide__frame :is(.pg-routes__title,.pg-route-card__title,.pg-library__header h2,.pg-library__sidebar-title h3,.pg-library__folder-copy h3,.pg-library-card__body h4,.profile-guide__demo-albums-head h3,.pg-feed-topbar strong,.pg-feed-body h3,.pg-achievements__head h2,.pg-achievements__badge strong,.pg-reputation__section-head h2,.pg-reputation__surface h3,.pg-reputation__surface > strong) { color: #f1f5f7; }
html[data-theme="dark"] .profile-guide__frame :is(.pg-routes__tabs,.pg-material-tabs,.pg-library__header,.pg-achievements__categories) { border-color: #3a4d5c; }
html[data-theme="dark"] .profile-guide__frame :is(.pg-routes__tab,.pg-material-tabs,.pg-library__folder-row,.pg-route-card__location,.pg-reputation__surface p) { color: #bac8d1; }
html[data-theme="dark"] .profile-guide__frame :is(.pg-library__sidebar,.pg-achievements__category,.pg-achievements .profile-guide__achievement-progress) { border-color: #3a4d5c; background: #263b4a; }
html[data-theme="dark"] .profile-guide__frame .pg-library__folder-row.is-active { background: #503b30; color: #ffac7b; }
html[data-theme="dark"] .profile-guide__frame .pg-library__toolbar :is(input,select) { border-color: #3a4d5c; background: #1b2b39; color: #cad5dc; }
html[data-theme="dark"] .profile-guide__frame .pg-material-tabs > .is-active { color: #f1f5f7; }
html[data-theme="dark"] .profile-guide__frame .pg-achievements__category-top :is(strong,span) { color: #e3ece9; }

/* The expanded level sheet, built from the same isolated progress primitives. */
.profile-guide__xp-stage.pg-progress { display: block; overflow-y: auto; place-items: normal; align-content: normal; gap: 0; padding: 14px; background: #fff; animation: none; scrollbar-width: none; }
.profile-guide__settings-preview { background: #fff; animation: none; }
.profile-guide__conversation { animation: none; }
.profile-guide__xp-stage.pg-progress::-webkit-scrollbar { display: none; }
.profile-guide__xp-stage.pg-progress > :is(.pg-progress__hero,.pg-progress__section,.profile-guide__xp-rules) { width: 100%; }
.profile-guide__xp-stage .pg-progress__hero { min-height: 155px; }
.pg-progress__nav { display: flex; gap: 5px; margin-top: 10px; }
.pg-progress__nav span { padding: 5px 7px; border: 1px solid #ffffff40; border-radius: 99px; background: #ffffff16; color: #fff; font-size: 8px; }
.pg-progress__section { margin-top: 16px; }
.pg-progress__section-head { display: flex; justify-content: space-between; align-items: end; gap: 8px; margin-bottom: 9px; }
.pg-progress__section-head h2 { margin: 2px 0 0; color: #1e2c37; font-size: 17px; }
.pg-progress__section-mark { color: #99a3ab; font-size: 8px; }
.pg-progress__level-panel { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px; border: 1px solid #f0dacb; border-radius: 11px; background: #fff8f2; }
.pg-progress__level-panel > div:first-child { display: grid; gap: 2px; }
.pg-progress__level-panel small,.pg-progress__level-panel span { color: #9b725e; font-size: 8px; }
.pg-progress__level-panel strong { color: #293846; font-size: 11px; }
.pg-progress__level-panel-track { display: flex; min-width: 120px; align-items: center; gap: 5px; }
.pg-progress__level-panel progress { width: 100%; height: 6px; accent-color: #f67b46; }
.pg-progress__rank-ladder { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 5px; margin-top: 8px; }
.pg-progress__rank-ladder article { display: grid; min-width: 0; gap: 2px; padding: 7px; border: 1px solid #e4e9e8; border-radius: 9px; background: #fff; }
.pg-progress__rank-ladder article.is-current { border-color: #ef9d72; background: #fff5ed; }
.pg-progress__rank-ladder strong { overflow: hidden; color: #253440; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.pg-progress__rank-ladder small,.pg-progress__rank-step { color: #89959e; font-size: 7px; }
.profile-guide__xp-rules { margin-top: 12px; padding: 11px 13px; border: 1px solid #e4e9e8; border-radius: 11px; background: #fff; }
.profile-guide__xp-rules h3 { margin: 0 0 3px; color: #253440; font-size: 12px; }
.profile-guide__xp-rules p { margin: 0 0 5px; color: #84909b; font-size: 8px; }
.pg-progress__rule-list { display: grid; }
.pg-progress__rule-list > div { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid #e8ecee; color: #364553; font-size: 9px; }
.pg-progress__rule-list strong { color: #d96836; white-space: nowrap; }

/* Guide-only folder editor and folder-picker sheets. */
.profile-guide__folder-editor .pg-folder-editor__dialog { width: min(85%,360px); overflow: hidden; border: 1px solid #e3e8eb; border-radius: 15px; background: #fff; box-shadow: 0 14px 40px #1028393b; }
.pg-folder-editor__heading { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid #e9edf0; }
.pg-folder-editor__heading p { margin: 0 0 3px; color: #d96532; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.pg-folder-editor__heading h3 { margin: 0; color: #1e2b37; font-size: 18px; }
.pg-folder-editor__heading button { display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid #e3e8eb; border-radius: 50%; background: #f8fafb; }
.pg-folder-editor__heading button img { width: 12px; height: 12px; }
.profile-guide__folder-editor .profile-guide__folder-form { padding: 14px 16px; }
.pg-folder-editor__actions { display: flex; gap: 7px; margin-top: 14px; }
.pg-folder-editor__actions button { flex: 1; min-height: 31px; border: 1px solid #e2e7eb; border-radius: 8px; background: #fff; color: #546371; font-size: 10px; font-weight: 750; }
.pg-folder-editor__actions .pg-folder-editor__save { border-color: #f66d35; background: #f66d35; color: #fff; }
.profile-guide__folder-picker .pg-folder-picker__dialog { width: min(88%,460px); max-height: 88%; overflow: hidden; border: 1px solid #e3e8eb; border-radius: 14px; background: #fff; box-shadow: 0 14px 40px #1028393b; }
.pg-folder-picker__header { display: flex; align-items: start; justify-content: space-between; gap: 7px; padding: 12px 14px; border-bottom: 1px solid #e9edf0; }
.pg-folder-picker__heading > span { color: #df6b39; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.pg-folder-picker__heading h2 { margin: 3px 0; color: #22303d; font-size: 17px; }
.pg-folder-picker__heading p { margin: 0; color: #84919b; font-size: 9px; }
.pg-folder-picker__close { display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid #e3e8eb; border-radius: 50%; background: #f8fafb; color: #51616d; font-size: 17px; }
.pg-folder-picker__toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; }
.pg-folder-picker__toolbar > div { display: grid; gap: 2px; }
.pg-folder-picker__toolbar strong { color: #263542; font-size: 10px; }
.pg-folder-picker__toolbar span { color: #89959d; font-size: 8px; }
.pg-folder-picker__toolbar button { min-height: 27px; padding: 0 7px; border: 1px solid #f1c5af; border-radius: 7px; background: #fff7f1; color: #d86635; font-size: 9px; white-space: nowrap; }
.pg-folder-picker__list { padding: 4px 14px 11px; }
.pg-folder-picker__row { overflow: hidden; border: 1px solid #e6ebee; border-radius: 9px; }
.pg-folder-picker__row.is-selected { border-color: #f19c6c; background: #fff7f1; }
.pg-folder-picker__select { display: flex; width: 100%; min-height: 43px; align-items: center; justify-content: space-between; padding: 5px 9px; border: 0; background: transparent; }
.pg-folder-picker__folder-copy { display: grid; gap: 2px; text-align: left; }
.pg-folder-picker__folder-copy strong { color: #263542; font-size: 10px; }
.pg-folder-picker__folder-copy small { color: #8b96a0; font-size: 8px; }
.pg-folder-picker__select i { display: grid; width: 20px; height: 20px; place-items: center; border: 1px solid #e1e6e9; border-radius: 5px; background: #fff; color: transparent; font-size: 11px; font-style: normal; }
.pg-folder-picker__row.is-selected i { border-color: #f66d35; background: #f66d35; color: #fff; }
.pg-folder-picker__footer { display: flex; gap: 7px; padding: 9px 14px; border-top: 1px solid #e9edf0; }
.pg-folder-picker__footer button { flex: 1; min-height: 31px; border: 1px solid #e2e7eb; border-radius: 8px; background: #fff; color: #526270; font-size: 10px; }
.pg-folder-picker__footer .pg-folder-picker__save { border-color: #f66d35; background: #f66d35; color: #fff; }

/* The dialogue header uses guide-owned names instead of messenger page CSS. */
.profile-guide__messenger-bar.pg-message-window__bar { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e9edf0; background: #fff; }
.pg-message-window__identity { display: flex; align-items: center; gap: 7px; }
.pg-message-window__brand { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; background: #fff0e7; color: #e46a34; }
.pg-message-window__brand svg { width: 19px; height: 19px; }
.pg-message-window__heading { display: grid; gap: 1px; }
.pg-message-window__heading strong { color: #24313d; font-size: 11px; }
.pg-message-window__heading small { color: #929da6; font-size: 8px; }
.pg-message-window__actions { display: flex; gap: 4px; }
.profile-guide__messenger-window-action { display: grid; width: 24px; height: 24px; place-items: center; color: #80909b; }
.profile-guide__messenger-window-action svg { width: 15px; height: 15px; }

@media (max-width: 850px) {
    .profile-guide__xp-stage.pg-progress { padding: 8px; }
    .profile-guide__xp-stage .pg-progress__hero { min-height: 0; }
    .pg-progress__nav { display: none; }
    .pg-progress__section { margin-top: 9px; }
    .pg-progress__section-head h2 { font-size: 14px; }
    .pg-progress__level-panel { padding: 7px; }
    .pg-progress__rank-ladder article { padding: 4px; }
    .pg-progress__rank-ladder strong { font-size: 7px; }
    .pg-progress__rank-ladder small,.pg-progress__rank-step { font-size: 6px; }
    .profile-guide__xp-rules { margin-top: 8px; padding: 8px; }
    .profile-guide__folder-editor .pg-folder-editor__dialog { width: min(95%,360px); }
    .profile-guide__folder-picker .pg-folder-picker__dialog { width: 97%; }
    .pg-folder-picker__heading h2 { font-size: 15px; }
    .pg-folder-picker__toolbar span { font-size: 7px; }
}

html[data-theme="dark"] .profile-guide__xp-stage.pg-progress,
html[data-theme="dark"] .profile-guide__folder-editor .pg-folder-editor__dialog,
html[data-theme="dark"] .profile-guide__folder-picker .pg-folder-picker__dialog,
html[data-theme="dark"] .profile-guide__messenger-bar.pg-message-window__bar { border-color: #3a4d5c; background: #1b2b39; color: #edf3f5; }
html[data-theme="dark"] .profile-guide__frame :is(.pg-progress__section-head h2,.pg-progress__level-panel strong,.pg-progress__rank-ladder strong,.profile-guide__xp-rules h3,.pg-folder-editor__heading h3,.pg-folder-picker__heading h2,.pg-folder-picker__folder-copy strong,.pg-message-window__heading strong) { color: #f1f5f7; }
html[data-theme="dark"] .profile-guide__frame :is(.pg-progress__level-panel,.pg-progress__rank-ladder article,.profile-guide__xp-rules,.pg-folder-picker__row) { border-color: #46535a; background: #253b48; }
html[data-theme="dark"] .profile-guide__frame :is(.pg-folder-editor__heading,.pg-folder-picker__header,.pg-folder-picker__footer) { border-color: #3a4d5c; }
html[data-theme="dark"] .profile-guide__folder-editor .profile-guide__folder-form input,
html[data-theme="dark"] .profile-guide__frame :is(.pg-folder-editor__actions button:not(.pg-folder-editor__save),.pg-folder-picker__footer button:not(.pg-folder-picker__save),.pg-folder-picker__select i,.pg-folder-editor__heading button,.pg-folder-picker__close) { border-color: #465764; background: #243746; color: #eef3f5; }
html[data-theme="dark"] .profile-guide__folder-editor .profile-guide__folder-form input::placeholder { color: #9eafba; }
html[data-theme="dark"] .profile-guide__frame .pg-folder-picker__row.is-selected { border-color: #e88b5a; background: #3a332e; }
html[data-theme="dark"] .profile-guide__frame .pg-folder-editor__heading button img { filter: brightness(0) invert(1); }
