.kh-sticky-hero-header {
    position: sticky !important;
    top: 0;
    z-index: 9998;
}
body.admin-bar .kh-sticky-hero-header { top: 32px; }
.kh-header-profile,
.kh-hero-hud {
    align-items: center;
    appearance: none;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 14px;
    color: #fff;
    cursor: pointer;
    display: flex;
    gap: 9px;
    margin-left: auto;
    padding: 7px 10px;
    text-align: left;
}
.kh-header-profile { margin-left: 8px; margin-right: 12px; min-width: 218px; }
.kh-header-profile:hover,
.kh-header-profile:focus-visible { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.48); outline: 0; }
.kh-profile-level {
    align-items: center;
    background: linear-gradient(135deg,#ffda67,#ffbd24);
    border-radius: 11px;
    color: #173b73;
    display: flex;
    flex: 0 0 auto;
    font: 800 14px/1 Poppins,Arial,sans-serif;
    height: 34px;
    justify-content: center;
    width: 34px;
}
.kh-profile-level.has-level-badge,
.kh-profile-big-level.has-level-badge,
.kh-result-profile__level.has-level-badge {
    overflow: visible;
    clip-path: none;
    background: transparent;
    border-radius: 0;
    color: transparent;
}
.kh-profile-level.has-level-badge img,
.kh-profile-big-level.has-level-badge img,
.kh-result-profile__level.has-level-badge img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.kh-profile-compact-content { display: grid; flex: 1; gap: 5px; min-width: 0; }
.kh-profile-compact-content strong { color: inherit; font: 700 11px/1.2 Poppins,Arial,sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kh-profile-xp { color: inherit; font: 700 9px/1.1 Poppins,Arial,sans-serif; opacity: .82; white-space: nowrap; }
.kh-profile-progress { background: rgba(255,255,255,.2); border-radius: 99px; display: block; height: 6px; overflow: hidden; }
.kh-profile-progress i { background: linear-gradient(90deg,#ffbd24,#35b779); border-radius: inherit; display: block; height: 100%; }
.kh-profile-streak { color: inherit; font: 800 12px/1 Poppins,Arial,sans-serif; white-space: nowrap; }
body.kh-profile-open { overflow: hidden; }
.kh-profile-overlay {
    align-items: center;
    background: rgba(5,20,43,.76);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 20px;
    position: fixed;
    z-index: 100100;
}
.kh-profile-dialog {
    background: #fff;
    border: 1px solid #d5e2f2;
    border-radius: 26px;
    box-shadow: 0 30px 90px rgba(5,19,43,.34);
    color: #17314f;
    max-height: calc(100dvh - 40px);
    max-width: 760px;
    overflow: auto;
    padding: clamp(24px,4vw,40px);
    position: relative;
    width: 100%;
}
.kh-profile-close {
    appearance: none;
    background: #eef5ff;
    border: 1px solid #d5e2f2;
    border-radius: 50%;
    color: #173b73;
    cursor: pointer;
    font-size: 0;
    height: 42px;
    position: absolute;
    right: 16px;
    top: 16px;
    transition: background-color .2s ease,border-color .2s ease,color .2s ease,transform .2s ease,box-shadow .2s ease;
    width: 42px;
}
.kh-profile-close::before,
.kh-profile-close::after {
    background: currentColor;
    border-radius: 2px;
    content: "";
    height: 2px;
    left: 50%;
    position: absolute;
    top: 50%;
    width: 16px;
}
.kh-profile-close::before { transform: translate(-50%,-50%) rotate(45deg); }
.kh-profile-close::after { transform: translate(-50%,-50%) rotate(-45deg); }
.kh-profile-close:hover {
    background: #173b73;
    border-color: #173b73;
    box-shadow: 0 8px 20px rgba(23,59,115,.22);
    color: #fff;
    transform: rotate(90deg);
}
.kh-profile-close:focus-visible {
    outline: 3px solid rgba(48,167,255,.38);
    outline-offset: 2px;
}
.kh-profile-head { align-items: center; display: grid; gap: 16px; grid-template-columns: auto 1fr; padding-right: 34px; }
.kh-profile-big-level {
    align-items: center;
    background: linear-gradient(135deg,#ffda67,#ffb814);
    border-radius: 20px;
    color: #173b73;
    display: flex;
    font: 800 28px/1 Poppins,Arial,sans-serif;
    height: 72px;
    justify-content: center;
    width: 72px;
}
.kh-profile-head h2 { color: #173b73; font-size: clamp(25px,4vw,36px); margin: 0 0 3px; }
.kh-profile-head p { color: #516b8c; margin: 0 0 10px; }
.kh-profile-dialog .kh-profile-progress { background: #dce7f5; height: 9px; }
.kh-profile-stats { display: grid; gap: 10px; grid-template-columns: repeat(3,1fr); margin: 24px 0; }
.kh-profile-stats > div { align-items: center; background: #f5f9ff; border: 1px solid #d5e2f2; border-radius: 14px; display: grid; grid-template-columns: auto 1fr; padding: 12px; }
.kh-profile-stats span { font-size: 23px; grid-row: 1 / 3; margin-right: 9px; }
.kh-profile-stats strong { color: #173b73; font-size: 18px; }
.kh-profile-stats small { color: #64748b; }
.kh-profile-preference { align-items: center; background: #eef5ff; border: 1px solid #cbdcf1; border-radius: 15px; display: flex; gap: 18px; justify-content: space-between; padding: 14px 16px; }
.kh-profile-preference strong,.kh-profile-preference small { display: block; }
.kh-profile-preference strong { color: #173b73; margin-bottom: 3px; }
.kh-profile-preference small { color: #64748b; line-height: 1.4; }
.kh-profile-preference select { background: #fff; border: 1px solid #b9cde6; border-radius: 10px; color: #173b73; flex: 0 0 210px; font: 600 14px/1.2 Poppins,Arial,sans-serif; min-height: 44px; padding: 8px 34px 8px 12px; }
.kh-profile-dialog h3 { color: #173b73; font-size: 19px; margin: 24px 0 10px; }
.kh-daily-list { display: grid; gap: 8px; }
.kh-daily-item { align-items: center; background: #f5f9ff; border: 1px solid #d5e2f2; border-radius: 13px; display: flex; gap: 12px; justify-content: space-between; padding: 11px 14px; }
.kh-daily-item strong,.kh-daily-item small { display: block; }
.kh-daily-item small { color: #64748b; margin-top: 2px; }
.kh-daily-item b { align-items: center; background: #dce9f7; border-radius: 99px; color: #173b73; display: flex; flex: 0 0 auto; height: 34px; justify-content: center; min-width: 44px; padding: 0 10px; }
.kh-daily-item.is-done { background: #edfbf4; border-color: #a8dfc4; }
.kh-daily-item.is-done b { background: #35b779; color: #fff; }
.kh-daily-item.is-actionable { color: #173b73; cursor: pointer; text-decoration: none; transition: border-color .18s ease,box-shadow .18s ease,transform .18s ease; }
.kh-daily-item.is-actionable:hover { border-color: #74afea; box-shadow: 0 8px 18px rgba(23,59,115,.1); color: #173b73; transform: translateY(-1px); }
.kh-badge-grid { display: grid; gap: 9px; grid-template-columns: repeat(2,minmax(0,1fr)); }
.kh-badge-section-heading { align-items:center; display:flex; gap:10px; margin:18px 0 10px; }
.kh-badge-section-heading > span { align-items:center; background:#eaf3ff; border-radius:11px; display:flex; flex:0 0 38px; font-size:19px; height:38px; justify-content:center; }
.kh-badge-section-heading h3,.kh-badge-section-heading small { display:block; margin:0; }
.kh-badge-section-heading h3 { color:#173b73; font-size:17px; line-height:1.25; }
.kh-badge-section-heading small { color:#64748b; font-size:12px; margin-top:2px; }
.kh-badge-section-heading.is-global { border-top:1px solid #d8e4f1; margin-top:26px; padding-top:22px; }
.kh-badge-section-heading.is-global > span { background:#fff5cf; }
.kh-badge-section-heading.is-thinking-games { border-top:1px solid #d8e4f1; margin-top:26px; padding-top:22px; }
.kh-badge-section-heading.is-thinking-games > span { background:#e9f5ff; }
.kh-badge-grid-thinking { margin-bottom:4px; }
.kh-badge-subsection-title { align-items:center; color:#173b73; display:flex; font-size:15px; gap:7px; margin:16px 0 9px; }
.kh-badge-subsection-title > span { font-size:17px; }
.kh-badge-subsection-title.is-difficulty { border-top:1px dashed #ccdaea; margin-top:22px; padding-top:18px; }
.kh-badge-grid-global { background:#f6f9fd; border:1px solid #d8e4f1; border-radius:16px; padding:10px; }
.kh-badge { align-items: center; background: #f7f8fa; border: 1px solid #e0e5eb; border-radius: 14px; color:#173b73; display: flex; gap: 11px; opacity: .76; padding: 12px; text-decoration:none; }
.kh-badge > span { font-size: 25px; }
.kh-badge strong,.kh-badge small { display: block; }
.kh-badge small { color: #64748b; line-height: 1.35; margin-top: 2px; }
.kh-badge > div { flex:1; min-width:0; }
.kh-badge > b { align-items:center; background:#e6eef8; border-radius:999px; display:flex; flex:0 0 30px; height:30px; justify-content:center; }
.kh-badge.is-actionable { cursor:pointer; transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease; }
.kh-badge.is-actionable:hover { border-color:#74afea; box-shadow:0 8px 18px rgba(23,59,115,.1); color:#173b73; opacity:1; transform:translateY(-1px); }
.kh-badge.is-unlocked { background: #fff8df; border-color: #ead07a; opacity: 1; }
.kh-badge.is-unlocked > b { background:#35b779; color:#fff; }
.kh-badge.is-bronze.is-unlocked { background:#fff4e9; border-color:#d7a36e; }
.kh-badge.is-silber.is-unlocked { background:#f4f7fb; border-color:#aebbc9; }
.kh-badge.is-gold.is-unlocked { background:#fff8df; border-color:#e0bd45; }
.kh-badge-series { display:grid; gap:12px; grid-template-columns:minmax(145px,1fr) auto 30px; opacity:1; }
.kh-badge-series > .kh-badge-series-copy { flex:none; }
.kh-badge-series-copy small { min-height:2.7em; }
.kh-badge-series-progress { background:#dfe9f5; border-radius:999px; display:block; height:6px; margin-top:8px; overflow:hidden; width:100%; }
.kh-badge-series-progress i { background:linear-gradient(90deg,#ffca3a,#35b779); border-radius:inherit; display:block; height:100%; min-width:0; transition:width .25s ease; }
.kh-badge-series > .kh-badge-medals { align-items:center; display:flex; flex:none; gap:7px; }
.kh-badge-medal { align-items:center; background:#edf1f6; border:1px solid #d8e0e9; border-radius:10px; display:flex; flex-direction:column; gap:1px; min-width:61px; opacity:.42; padding:6px 7px 5px; }
.kh-badge-medal i { filter:grayscale(1); font-size:22px; font-style:normal; line-height:1; }
.kh-badge-medal em { color:#64748b; font-size:10px; font-style:normal; font-weight:800; line-height:1.2; }
.kh-badge-medal.is-earned { opacity:1; }
.kh-badge-medal.is-earned i { filter:none; }
.kh-badge-medal.is-next { background:#eef6ff; border-color:#6fa9e5; box-shadow:0 0 0 2px rgba(111,169,229,.14); opacity:.9; }
.kh-badge-medal.is-next i { filter:grayscale(.55); }
.kh-badge-medal.is-bronze.is-earned { background:#fff0e2; border-color:#d7a36e; }
.kh-badge-medal.is-silber.is-earned { background:#f1f5f9; border-color:#aebbc9; }
.kh-badge-medal.is-gold.is-earned { background:#fff6d8; border-color:#e0bd45; }
.kh-badge-medal.is-champion.is-earned { background:#e8f2ff; border-color:#3d78bf; }
.kh-badge-series.is-unlocked { background:#f1fbf6; border-color:#9ad8bb; }
.kh-badge-medal i { background:center/contain no-repeat; display:block; filter:none; flex:0 0 52px; height:52px; width:52px; }
.kh-badge-medal.is-bronze i { background-image:url('../images/badges/kh-badge-bronze-locked.webp'); }
.kh-badge-medal.is-silber i { background-image:url('../images/badges/kh-badge-silber-locked.webp'); }
.kh-badge-medal.is-gold i { background-image:url('../images/badges/kh-badge-gold-locked.webp'); }
.kh-badge-medal.is-champion i { background-image:url('../images/badges/kh-badge-champion-locked.webp'); }
.kh-badge-medal.is-bronze.is-earned i { background-image:url('../images/badges/kh-badge-bronze.webp'); }
.kh-badge-medal.is-silber.is-earned i { background-image:url('../images/badges/kh-badge-silber.webp'); }
.kh-badge-medal.is-gold.is-earned i { background-image:url('../images/badges/kh-badge-gold.webp'); }
.kh-badge-medal.is-champion.is-earned i { background-image:url('../images/badges/kh-badge-champion.webp'); }
.kh-badge-age-control { align-items:center; background:linear-gradient(135deg,#eef5ff,#f8fbff); border:1px solid #bdd4ee; border-radius:16px; display:flex; gap:20px; justify-content:space-between; margin:0 0 12px; padding:15px 17px; }
.kh-badge-age-control strong,.kh-badge-age-control small { display:block; }
.kh-badge-age-control strong { color:#173b73; font-size:15px; }
.kh-badge-age-control small { color:#607494; font-size:12px; margin-top:3px; }
.kh-badge-age-control select { background:#fff; border:1px solid #9fbee1; border-radius:11px; color:#173b73; flex:0 0 230px; font:700 14px/1.2 Poppins,Arial,sans-serif; min-height:45px; padding:8px 36px 8px 12px; }
@media (max-width: 760px) {
    .kh-header-profile { height: 42px; justify-content: center; margin: 0 !important; min-width: 0; order: 2; padding: 4px; width: 42px; }
    .kh-header-profile .kh-profile-compact-content { display: none; }
    .kh-header-profile .kh-profile-streak { display: none; }
    .kh-header-profile .kh-profile-level { height: 32px; width: 32px; }
    .kh-profile-stats { grid-template-columns: 1fr; }
    .kh-profile-preference { align-items: stretch; flex-direction: column; gap: 10px; }
    .kh-profile-preference select { flex-basis: auto; width: 100%; }
    .kh-badge-grid { grid-template-columns: 1fr; }
    .kh-badge-series { grid-template-columns:minmax(0,1fr) auto 30px; }
}
@media (max-width: 480px) {
    body.admin-bar .kh-sticky-hero-header { top: 46px; }
    .kh-header-profile { margin: 0 !important; padding: 4px; }
    .kh-profile-overlay { align-items: flex-end; padding: 0; }
    .kh-profile-dialog { border-radius: 24px 24px 0 0; max-height: 92dvh; padding: 28px 16px 22px; }
    .kh-profile-big-level { border-radius: 15px; height: 58px; width: 58px; }
    .kh-badge-series { align-items:start; grid-template-columns:minmax(0,1fr) 30px; }
    .kh-badge-series > .kh-badge-medals { grid-column:1 / -1; grid-row:2; justify-content:space-between; width:100%; }
    .kh-badge-series > b { grid-column:2; grid-row:1; }
    .kh-badge-medal { flex:1; }
    .kh-badge-age-control { align-items:stretch; flex-direction:column; gap:10px; }
    .kh-badge-age-control select { flex-basis:auto; width:100%; }
}

/* Gemeinsame XP-Anzeige in Rätsel- und Denkspiel-Ergebnisdialogen. */
.kh-result-profile{box-sizing:border-box;display:grid;grid-template-columns:58px minmax(0,1fr) auto;align-items:center;gap:13px;width:100%;margin:0 0 20px;padding:13px 15px;border:1px solid #b9d4ef;border-radius:17px;background:linear-gradient(145deg,#f7fbff,#eaf3ff);color:#173b73;text-align:left;box-shadow:inset 0 1px 0 #fff}
.kh-result-profile[hidden]{display:none!important}.kh-result-profile__level{display:grid;place-items:center;width:54px;height:60px;clip-path:polygon(50% 0,92% 14%,88% 70%,50% 100%,12% 70%,8% 14%);background:linear-gradient(#ffd650,#ffb70d);color:#12365f;font-size:23px;font-weight:900;filter:drop-shadow(0 4px 3px rgba(0,0,0,.16))}
.kh-result-profile__progress{display:grid;gap:6px;min-width:0}.kh-result-profile__progress>strong{overflow:hidden;color:#173b73;font-size:13px;text-overflow:ellipsis;white-space:nowrap}.kh-result-profile__progress>i{display:block;height:8px;overflow:visible;border-radius:99px;background:#cbdced}.kh-result-profile__progress>i>span{position:relative;display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#ffc83d,#39bd81);transform-origin:left;transition:filter .2s ease,transform .2s ease}.kh-result-profile__progress>i>span:after{content:"";position:absolute;top:50%;right:-4px;width:9px;height:9px;border-radius:50%;background:#fff;opacity:0;transform:translateY(-50%);box-shadow:0 0 11px #ffc83d}.kh-result-profile__progress>small{color:#506b8d;font-size:10px;font-weight:700}.kh-result-profile__progress>small b{color:inherit}.kh-result-profile.is-xp-animating .kh-result-profile__progress>i>span{filter:brightness(1.12) drop-shadow(0 0 5px #ffc83d);transform:scaleY(1.55)}.kh-result-profile.is-xp-animating .kh-result-profile__progress>i>span:after{opacity:1}.kh-result-profile.is-xp-animating .kh-result-profile__progress>small b{color:#bd6d00;font-size:12px}
.kh-result-profile__streak{display:grid;grid-template-columns:auto auto;align-items:center;gap:1px 5px;padding-left:12px;border-left:1px solid #c7d8e9;color:#173b73;font-size:17px}.kh-result-profile__streak>b{font-size:19px}.kh-result-profile__streak>small{grid-column:1/-1;color:#607896;font-size:9px;text-align:center}
.kh-result-profile.is-level-up .kh-result-profile__level{animation:kh-result-level-up .8s cubic-bezier(.2,.8,.25,1.35)}
@keyframes kh-result-level-up{0%{transform:scale(.75);filter:drop-shadow(0 4px 3px rgba(0,0,0,.16))}45%{transform:scale(1.22);filter:drop-shadow(0 0 14px #ffc83d)}100%{transform:scale(1)}}
.kh-level-fireworks{position:fixed;z-index:2147483646;inset:0;overflow:hidden;pointer-events:none;isolation:isolate}.kh-level-fireworks i{position:absolute;top:var(--kh-fire-y);left:var(--kh-fire-x);width:var(--kh-fire-size);height:var(--kh-fire-size);border-radius:50%;background:var(--kh-fire-color);box-shadow:0 0 5px var(--kh-fire-color),0 0 14px var(--kh-fire-color);animation:kh-level-firework var(--kh-fire-duration) var(--kh-fire-delay) cubic-bezier(.12,.58,.28,1) both}.kh-level-fireworks i:nth-of-type(3n){border-radius:2px}.kh-level-fireworks__rocket{position:absolute;bottom:-32px;left:var(--kh-fire-x);width:5px;height:22px;border-radius:50% 50% 30% 30%;background:#fff;box-shadow:0 0 7px #fff,0 0 15px var(--kh-fire-color),0 14px 18px var(--kh-fire-color);animation:kh-level-rocket var(--kh-rocket-duration) var(--kh-fire-delay) cubic-bezier(.28,.65,.42,1) both}.kh-level-fireworks__rocket::after{position:absolute;top:12px;left:1px;width:3px;height:52px;border-radius:50%;background:linear-gradient(var(--kh-fire-color),transparent);content:""}.kh-level-fireworks__flash{position:absolute;top:var(--kh-fire-y);left:var(--kh-fire-x);width:var(--kh-flash-size);height:var(--kh-flash-size);border:3px solid var(--kh-fire-color);border-radius:50%;background:radial-gradient(circle,#fff 0 3%,var(--kh-fire-color) 4% 10%,transparent 34%);filter:drop-shadow(0 0 15px var(--kh-fire-color));animation:kh-level-firework-flash .7s var(--kh-fire-delay) ease-out both}
@keyframes kh-level-rocket{0%{transform:translate(-50%,0) scale(.6);opacity:0}8%{opacity:1}82%{opacity:1}100%{transform:translate(calc(-50% + var(--kh-rocket-drift)),var(--kh-rocket-rise)) scale(.75);opacity:0}}
@keyframes kh-level-firework-flash{0%{transform:translate(-50%,-50%) scale(.05);opacity:0}15%{opacity:1}100%{transform:translate(-50%,-50%) scale(1.65);opacity:0}}
@keyframes kh-level-firework{0%{transform:translate(-50%,-50%) scale(.15) rotate(0);opacity:0}7%{opacity:1}66%{opacity:1}100%{transform:translate(calc(-50% + var(--kh-fire-dx)),calc(-50% + var(--kh-fire-dy))) scale(.12) rotate(var(--kh-fire-rotate));opacity:0}}
@media(max-width:480px){.kh-result-profile{grid-template-columns:48px minmax(0,1fr) auto;gap:9px;padding:10px}.kh-result-profile__level{width:46px;height:51px;font-size:19px}.kh-result-profile__progress>strong{font-size:11px}.kh-result-profile__streak{padding-left:8px;font-size:14px}.kh-result-profile__streak>b{font-size:16px}}
@media(prefers-reduced-motion:reduce){.kh-result-profile.is-level-up .kh-result-profile__level,.kh-level-fireworks i,.kh-level-fireworks__rocket,.kh-level-fireworks__flash{animation:none!important}}

/* Kompaktes Profilfenster und ausfuehrliche Profilseite */
.kh-profile-dialog-compact { max-width: 650px; }
.kh-profile-compact-stats { display: grid; gap: 10px; grid-template-columns: repeat(2,minmax(0,1fr)); margin: 16px 0 4px; }
.kh-profile-compact-stat { background: #f5f9ff; border: 1px solid #d5e2f2; border-radius: 14px; padding: 12px 14px; }
.kh-profile-compact-stat strong,.kh-profile-compact-stat small { display: block; }
.kh-profile-compact-stat strong { color: #173b73; font-size: 18px; }
.kh-profile-compact-stat small { color: #64748b; margin-top: 2px; }
.kh-profile-latest-badge { align-items: center; background: #fff8df; border: 1px solid #ead07a; border-radius: 14px; color: #173b73; display: flex; gap: 11px; margin-top: 12px; padding: 12px 14px; }
.kh-profile-latest-badge > span { font-size: 25px; }
.kh-profile-latest-badge strong,.kh-profile-latest-badge small { display: block; }
.kh-profile-latest-badge small { color: #64748b; margin-top: 2px; }
.kh-profile-full-link { align-items: center; background: #173b73; border-radius: 12px; color: #fff !important; display: flex; font-weight: 700; justify-content: center; margin-top: 18px; min-height: 48px; padding: 10px 18px; text-decoration: none !important; }
.kh-profile-full-link:hover { background: #0f2d5a; color: #fff !important; }

.kh-profile-page-main { --kh-primary:#173b73; --kh-muted:#607494; background: #f5f9ff; color: #173b73; min-height: 70vh; padding: 14px 20px 72px; }
body:has(.kh-profile-page-main) .site-content { padding-top: 0 !important; }
.kh-profile-page-shell { margin: 0 auto; max-width: 1180px; }
.kh-profile-page-breadcrumb { align-items:center; background:rgba(255,255,255,.72); border:1px solid #d9e5f3; border-radius:999px; box-shadow:0 5px 16px rgba(23,59,115,.05); display:flex; font-size:.84rem; margin:0 0 14px; max-width:100%; min-height:34px; padding:5px 10px; width:fit-content; }
.kh-profile-page-breadcrumb ol { align-items:center; display:flex; flex-wrap:wrap; gap:4px; list-style:none; margin:0; padding:0; }
.kh-profile-page-breadcrumb li { align-items:center; display:inline-flex; min-width:0; }
.kh-profile-page-breadcrumb li:not(:last-child)::after { color:#91a6c1; content:'\203A'; font-size:1.15em; line-height:1; margin:0 3px 0 7px; }
.kh-profile-page-breadcrumb a,.kh-profile-page-breadcrumb span { color:#607494; text-decoration:none; }
.kh-profile-page-breadcrumb a { border-radius:6px; padding:2px 4px; transition:color .18s ease,background-color .18s ease; }
.kh-profile-page-breadcrumb a:hover { background:#eaf2fc; color:#173b73; }
.kh-profile-page-breadcrumb [aria-current=page] { color:#173b73; font-weight:700; }
.kh-profile-page-hero { align-items:center; background: linear-gradient(135deg,#173b73,#234d86); border-radius: 24px; color: #fff; display:grid; gap:32px; grid-template-columns:minmax(0,1fr) auto; overflow: hidden; padding: 42px clamp(24px,5vw,64px); position: relative; }
.kh-profile-page-hero::after { background: radial-gradient(circle,rgba(88,203,255,.24),transparent 66%); content: ''; height: 320px; pointer-events: none; position: absolute; right: -80px; top: -140px; width: 420px; }
.kh-profile-page-hero span { color: #ffca3a; display: block; font-size: 13px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.kh-profile-page-hero h1 { color: #fff; font-size: clamp(32px,5vw,54px); line-height: 1.05; margin: 9px 0 12px; }
.kh-profile-page-hero p { color: #dce9f7; font-size: 17px; margin: 0; max-width: 690px; }
.kh-profile-page-hero > div { position: relative; z-index: 1; }
.kh-profile-page-hero-copy > a { align-items:center; background: #ffca3a; border-radius: 12px; color: #173b73; display: inline-flex; gap:8px; font-weight: 800; margin-top: 22px; min-height: 46px; padding: 11px 18px; text-decoration: none; }
.kh-profile-page-hero-copy > a:hover { background: #ffd760; color: #173b73; }
.kh-profile-page-hero-copy > a span { color:inherit; display:inline; font-size:inherit; letter-spacing:0; text-transform:none; }
.kh-profile-page-hero-visual { align-items:center; background:rgba(255,255,255,.09); border:1px solid rgba(255,255,255,.2); border-radius:22px; display:flex; flex-direction:column; gap:8px; min-width:210px; padding:20px 24px; text-align:center; }
.kh-profile-page-hero-visual img { filter:drop-shadow(0 10px 18px rgba(4,22,52,.35)); height:112px; object-fit:contain; width:112px; }
.kh-profile-page-hero-visual > span { font-size:72px; letter-spacing:0; line-height:1; text-transform:none; }
.kh-profile-page-hero-visual small { color:#dce9f7; font-size:12px; font-weight:700; max-width:180px; }
.kh-profile-page-content { display:grid; gap:24px; margin-top:26px; }
.kh-profile-dashboard-head { align-items: center; background: #fff; border: 1px solid #d5e2f2; border-radius: 20px; box-shadow: 0 14px 35px rgba(23,59,115,.08); display: flex; gap: 20px; justify-content: space-between; padding: 22px; }
.kh-profile-dashboard-title { align-items: center; display: flex; gap: 14px; }
.kh-profile-dashboard-title .kh-profile-big-level { flex: 0 0 auto; }
.kh-profile-dashboard-title h2 { color: #173b73; font-size: 25px; margin: 0; }
.kh-profile-dashboard-title p { color: #64748b; margin: 4px 0 0; }
.kh-profile-overview-age { flex:0 1 290px; margin:0; min-width:230px; }
.kh-profile-overview-age > span { align-items:center; display:flex; gap:6px; }
.kh-profile-overview-age > span::before { content:'🎯'; font-size:16px; }
.kh-profile-page-xp { min-width: min(360px,40%); }
.kh-profile-page-xp > div { align-items: center; display: flex; font-size: 13px; font-weight: 700; justify-content: space-between; margin-bottom: 7px; }
.kh-profile-page-grid { display: grid; gap: 24px; grid-template-columns: repeat(2,minmax(0,1fr)); }
.kh-profile-panel { background: #fff; border: 1px solid #d5e2f2; border-radius: 20px; box-shadow: 0 10px 28px rgba(23,59,115,.06); padding: 26px; }
.kh-profile-panel.is-wide { grid-column: 1 / -1; }
.kh-profile-panel-heading { align-items:center; display:flex; gap:12px; margin:0 0 18px; }
.kh-profile-panel-icon { align-items:center; background:#fff3c8; border-radius:12px; display:inline-flex; flex:0 0 42px; font-size:21px; height:42px; justify-content:center; }
.kh-profile-panel h2 { color: #173b73; font-size: 22px; margin: 0; }
.kh-profile-panel > p { color: #64748b; margin: 0 0 16px; }
.kh-profile-page-stats { display: grid; gap: 16px; grid-template-columns: repeat(4,minmax(0,1fr)); }
.kh-profile-page-stats > div { align-items:center; background: #fff; border: 1px solid #d5e2f2; border-radius: 16px; box-shadow: 0 8px 22px rgba(23,59,115,.05); display:flex; gap:12px; padding: 18px; }
.kh-profile-page-stats > div > i { align-items:center; background:#edf5ff; border-radius:12px; display:inline-flex; flex:0 0 42px; font-size:20px; font-style:normal; height:42px; justify-content:center; }
.kh-profile-page-stats > div strong,.kh-profile-page-stats > div span { display: block; }
.kh-profile-page-stats > div strong { color: #173b73; font-size: 22px; }
.kh-profile-page-stats > div span { color: #64748b; font-size: 13px; margin-top: 3px; }
.kh-profile-page-stat { background: #f5f9ff; border: 1px solid #d5e2f2; border-radius: 14px; padding: 14px; }
.kh-profile-page-stat strong,.kh-profile-page-stat small { display: block; }
.kh-profile-page-stat strong { color: #173b73; font-size: 22px; }
.kh-profile-page-stat small { color: #64748b; margin-top: 3px; }
.kh-profile-page-select { color: #173b73; display: block; font-size: 13px; font-weight: 700; margin: 14px 0 18px; }
.kh-profile-page-select > span { display: block; margin-bottom: 7px; }
.kh-profile-page-select select { background: #fff; border: 1px solid #b9cde6; border-radius: 11px; color: #173b73; font: 600 14px/1.2 Poppins,Arial,sans-serif; min-height: 45px; padding: 8px 34px 8px 12px; width: 100%; }
.kh-profile-type-grid,.kh-profile-progress-list { display: grid; gap: 10px; }
.kh-profile-type-grid > div { align-items:center; background: #f5f9ff; border: 1px solid #d5e2f2; border-radius: 13px; display: grid; gap: 6px 10px; grid-template-columns:auto 1fr auto; padding: 14px 16px; }
.kh-profile-type-grid > div b { font-size:20px; font-weight:400; grid-row:1 / span 2; }
.kh-profile-type-grid > div strong { color: #173b73; }
.kh-profile-type-grid > div span { color: #64748b; font-size: 13px; }
.kh-profile-type-grid > div i { background: linear-gradient(90deg,#ffca3a,#35b779); border-radius: 99px; display: block; grid-column: 2/-1; height: 6px; max-width: 100%; }
.kh-profile-type-row,.kh-profile-progress-row { background: #f5f9ff; border: 1px solid #d5e2f2; border-radius: 13px; padding: 12px 14px; }
.kh-profile-type-row > div:first-child,.kh-profile-progress-row > div:first-child { align-items: center; display: flex; font-size: 14px; font-weight: 700; justify-content: space-between; margin-bottom: 7px; }
.kh-profile-type-row small,.kh-profile-progress-row small { color: #64748b; }
.kh-profile-recent-list { display: grid; gap: 9px; }
.kh-profile-recent { display: grid; gap: 9px; }
.kh-profile-recent > a { align-items: center; background: #f5f9ff; border: 1px solid #d5e2f2; border-radius: 13px; color: #173b73; display: flex; gap: 14px; justify-content: space-between; padding: 12px 14px; text-decoration: none; }
.kh-profile-recent > a strong,.kh-profile-recent > a small { display: block; }
.kh-profile-recent > a small { color: #64748b; margin-top: 2px; }
.kh-profile-recent-item { align-items: center; background: #f5f9ff; border: 1px solid #d5e2f2; border-radius: 13px; display: flex; gap: 14px; justify-content: space-between; padding: 12px 14px; }
.kh-profile-recent-item a { color: #173b73; font-weight: 700; text-decoration: none; }
.kh-profile-recent-item small { color: #64748b; display: block; margin-top: 2px; }
.kh-profile-time-grid { display: grid; gap: 10px; grid-template-columns: repeat(3,minmax(0,1fr)); }
.kh-profile-time-grid > div { background: #f5f9ff; border: 1px solid #d5e2f2; border-radius: 13px; padding: 13px; }
.kh-profile-time-grid > div span,.kh-profile-time-grid > div strong { display: block; }
.kh-profile-time-grid > div span { color: #64748b; font-size: 13px; }
.kh-profile-time-grid > div strong { color: #173b73; font-size: 20px; margin-top: 3px; }
.kh-profile-progress-columns { display: grid; gap: 14px; grid-template-columns: repeat(2,minmax(0,1fr)); }
.kh-profile-progress-columns > div { background: #f5f9ff; border: 1px solid #d5e2f2; border-radius: 14px; padding: 14px; }
.kh-profile-progress-columns h3 { color: #173b73; font-size: 16px; margin: 0 0 8px; }
.kh-profile-progress-columns p { align-items: center; border-top: 1px solid #dce6f2; display: flex; justify-content: space-between; margin: 0; padding: 7px 0; }
.kh-profile-progress-columns p span { color: #64748b; }
.kh-profile-time-card { background: #f5f9ff; border: 1px solid #d5e2f2; border-radius: 13px; padding: 13px; }
.kh-profile-time-card strong,.kh-profile-time-card small { display: block; }
.kh-profile-time-card small { color: #64748b; margin-top: 3px; }
.kh-profile-reset { background: transparent; border: 1px solid #d66767; border-radius: 10px; color: #ad2f2f; cursor: pointer; font-weight: 700; min-height: 42px; padding: 8px 14px; }
.kh-profile-reset:hover { background: #fff0f0; }
.kh-profile-page-privacy { color: #64748b; font-size: 13px; margin: 18px 4px 0; }
@media (max-width: 800px) {
    .kh-profile-page-main { padding-left: 14px; padding-right: 14px; }
    .kh-profile-dashboard-head { align-items: stretch; flex-direction: column; }
    .kh-profile-overview-age { flex-basis:auto; min-width:0; width:100%; }
    .kh-profile-page-xp { min-width: 0; width: 100%; }
    .kh-profile-page-grid { grid-template-columns: 1fr; }
    .kh-profile-panel.is-wide { grid-column: auto; }
    .kh-profile-page-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .kh-profile-time-grid { grid-template-columns: 1fr; }
    .kh-profile-progress-columns { grid-template-columns: 1fr; }
    .kh-profile-page-hero { grid-template-columns:1fr; }
    .kh-profile-page-hero-visual { display:none; }
}
@media (max-width: 480px) {
    .kh-profile-compact-stats { grid-template-columns: 1fr; }
    .kh-profile-page-hero { border-radius: 18px; padding: 30px 20px; }
    .kh-profile-panel { border-radius: 16px; padding: 17px; }
    .kh-profile-page-stats { grid-template-columns: 1fr 1fr; }
    .kh-profile-recent-item { align-items: flex-start; flex-direction: column; }
    .kh-profile-page-breadcrumb { border-radius:12px; font-size:.79rem; min-height:32px; padding:5px 8px; width:100%; }
}

/* Profile dashboard polish and shared puzzle-type icon language. */
.kh-profile-dashboard-head {
    background: linear-gradient(135deg,#fff 0%,#fff 58%,#f4f8ff 100%);
    display: grid;
    gap: 24px;
    grid-template-columns: auto minmax(260px,1fr) minmax(250px,300px);
    overflow: hidden;
    padding: 28px 30px;
    position: relative;
}
.kh-profile-dashboard-head::before {
    background: linear-gradient(90deg,#ffca3a 0%,#35b779 58%,#55b8ff 100%);
    content: '';
    height: 4px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}
.kh-profile-dashboard-head > .kh-profile-big-level {
    border: 4px solid #fff;
    box-shadow: 0 8px 20px rgba(255,184,20,.3),0 0 0 1px #f2c24a;
    flex: none;
    height: 76px;
    width: 76px;
}
.kh-profile-dashboard-head > .kh-profile-big-level.has-level-badge {
    border: 0;
    box-shadow: none;
}
.kh-profile-dashboard-title {
    align-content: center;
    align-items: initial;
    display: grid;
    gap: 2px;
    min-width: 0;
}
.kh-profile-dashboard-title > span {
    color: #6a7f9d;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.kh-profile-dashboard-title h2 {
    font-size: clamp(24px,2.2vw,30px);
    letter-spacing: -.025em;
}
.kh-profile-dashboard-title p { font-size: 14px; margin-top: 1px; }
.kh-profile-dashboard-title .kh-profile-progress {
    background: #dfe9f6;
    height: 8px;
    margin-top: 10px;
    max-width: 390px;
    width: 100%;
}
.kh-profile-overview-age {
    background: rgba(245,249,255,.94);
    border: 1px solid #d4e2f3;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(23,59,115,.05);
    flex: none;
    min-width: 0;
    padding: 13px 14px 14px;
    width: auto;
}
.kh-profile-overview-age > span { font-size: 12px; letter-spacing: .015em; }
.kh-profile-overview-age > span::before {
    background: radial-gradient(circle,#ef5d4b 0 2px,transparent 2.5px 4px,#ef5d4b 4.5px 6px,transparent 6.5px);
    border: 0;
    border-radius: 50%;
    box-shadow: none;
    box-sizing: border-box;
    content: '';
    flex: 0 0 16px;
    height: 16px;
    width: 16px;
}
.kh-profile-overview-age select { border-color: #aecaeb; box-shadow: 0 3px 8px rgba(23,59,115,.04); }

.kh-profile-page-grid > .kh-profile-panel {
    background: linear-gradient(180deg,#fff 0%,#fbfdff 100%);
}
.kh-profile-type-grid { gap: 11px; }
.kh-profile-type-grid > div {
    background: linear-gradient(135deg,#f7faff 0%,#eef5ff 100%);
    gap: 12px;
    grid-template-columns: 46px minmax(0,1fr);
    padding: 12px 14px;
    transition: border-color .2s ease,box-shadow .2s ease,transform .2s ease;
}
.kh-profile-type-grid > div:hover {
    border-color: #aecaeb;
    box-shadow: 0 8px 18px rgba(23,59,115,.07);
    transform: translateY(-1px);
}
.kh-profile-type-grid > div b {
    --kh-profile-type-icon: none;
    align-items: center;
    background: #fff3c8;
    border: 1px solid #ffe09a;
    border-radius: 12px;
    color: #173b73;
    display: flex;
    font-size: 0;
    grid-row: auto;
    height: 44px;
    justify-content: center;
    width: 44px;
}
.kh-profile-type-grid > div b::before {
    background: currentColor;
    content: '';
    height: 25px;
    -webkit-mask: var(--kh-profile-type-icon) center/contain no-repeat;
    mask: var(--kh-profile-type-icon) center/contain no-repeat;
    width: 25px;
}
.kh-profile-type-grid > div > div {
    align-items: center;
    display: grid;
    gap: 3px 10px;
    grid-template-columns: minmax(0,1fr) auto;
    min-width: 0;
}
.kh-profile-type-grid > div strong { font-size: 15px; grid-column: 1; min-width: 0; }
.kh-profile-type-grid > div span { grid-column: 2; white-space: nowrap; }
.kh-profile-type-grid > div i { grid-column: 1/-1; height: 6px; }
.kh-profile-type-grid > div:nth-child(1) b { --kh-profile-type-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='5' cy='6' r='2'/%3E%3Ccircle cx='19' cy='18' r='2'/%3E%3Cpath d='M7 6h5v6H9v6h8'/%3E%3C/svg%3E"); }
.kh-profile-type-grid > div:nth-child(2) b { --kh-profile-type-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19 8 5l4 14M6 13h5M14 5h4a3 3 0 0 1 0 6h-4Zm0 6h4a4 4 0 0 1 0 8h-4Z'/%3E%3C/svg%3E"); }
.kh-profile-type-grid > div:nth-child(3) b { --kh-profile-type-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cpath d='M9 3v18m6-18v18M3 9h18M3 15h18'/%3E%3C/svg%3E"); }
.kh-profile-type-grid > div:nth-child(4) b { --kh-profile-type-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h6v6H4zm10 0h6v6h-6zM4 14h6v6H4zm10 0h6v6h-6zM10 7h4M7 10v4m10-4v4m-7 3h4'/%3E%3C/svg%3E"); }
.kh-profile-type-grid > div:nth-child(5) b { --kh-profile-type-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h4v4H4zm6 0h4v4h-4zm6 0h4v4h-4zM4 10h4v4H4zm6 0h4v4h-4zm6 0h4v4h-4zM4 16h4v4H4zm6 0h4v4h-4zm6 0h4v4h-4z'/%3E%3Cpath d='M5 5h2v2H5zm6 6h2v2h-2zm6-6h2v2h-2zm0 12h2v2h-2z' fill='black' stroke='none'/%3E%3C/svg%3E"); }
.kh-profile-type-grid > div:nth-child(6) b { --kh-profile-type-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cpath d='M9 3v18m6-18v18M3 9h18M3 15h18M5 6h2m-1-1 1 1-1 1M11 12h2m-1-1 1 1-1 1'/%3E%3C/svg%3E"); }
.kh-profile-type-grid > div:nth-child(7) b { --kh-profile-type-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cpath d='M9 3v18m6-18v18M3 9h18M3 15h18M5 6h2m-1-1 1 1-1 1M17 12h2m-1-1 1 1-1 1M10 18h4'/%3E%3C/svg%3E"); }
.kh-profile-type-grid > div:nth-child(2n) b { background:#e9f8f0; border-color:#c8ead8; }
.kh-profile-type-grid > div:nth-child(3n) b { background:#eaf4ff; border-color:#cce2f7; }

.kh-profile-progress-columns > div {
    background: linear-gradient(145deg,#f7faff,#edf5ff);
    box-shadow: inset 0 1px 0 #fff;
    padding: 16px;
}
.kh-profile-progress-columns h3 {
    align-items: center;
    display: flex;
    font-size: 15px;
    gap: 8px;
    margin-bottom: 10px;
}
.kh-profile-progress-columns h3::before {
    background: #fff3c8;
    border-radius: 8px;
    color: #173b73;
    content: '•';
    display: inline-grid;
    font-size: 20px;
    height: 28px;
    place-items: center;
    width: 28px;
}
.kh-profile-progress-columns > div:nth-child(2) h3::before { content:'◆'; font-size:11px; }
.kh-profile-progress-columns p { min-height: 38px; padding: 8px 2px; }
.kh-profile-progress-columns p strong {
    align-items: center;
    background: #fff;
    border: 1px solid #d5e2f2;
    border-radius: 99px;
    color: #173b73;
    display: inline-flex;
    font-size: 13px;
    height: 27px;
    justify-content: center;
    min-width: 32px;
    padding: 0 8px;
}

@media (max-width: 800px) {
    .kh-profile-dashboard-head {
        grid-template-columns: auto minmax(0,1fr);
        padding: 25px 22px 22px;
    }
    .kh-profile-overview-age { grid-column: 1/-1; width: auto; }
}
@media (max-width: 480px) {
    .kh-profile-dashboard-head { gap: 15px; padding: 22px 17px 17px; }
    .kh-profile-dashboard-head > .kh-profile-big-level { border-radius:16px; font-size:23px; height:60px; width:60px; }
    .kh-profile-dashboard-title h2 { font-size:22px; }
    .kh-profile-dashboard-title p { font-size:12px; }
    .kh-profile-type-grid > div { grid-template-columns:42px minmax(0,1fr); padding:11px 12px; }
    .kh-profile-type-grid > div b { height:40px; width:40px; }
    .kh-profile-type-grid > div span { font-size:11px; }
}
