/* V3 profile: layered artwork, compact metadata and mobile-safe player card. */
body.profile-active{background:var(--k-bg);color:var(--k-text)}
body.profile-active .battle-bg{background:var(--k-bg);opacity:.5}
body.profile-active .battle-grade{background:linear-gradient(180deg,#0c101c44,#0c101cf7 85%)}
body.profile-active .fighter{opacity:.3;filter:saturate(.65) brightness(.55);background-size:cover}
body.profile-active .energy{opacity:.1}
body.profile-active .shard,body.profile-active .scan-line,body.profile-active .grid-layer{display:none}
body.profile-active .hud-top{background:var(--k-bg);border:0;box-shadow:none;backdrop-filter:blur(15px);padding:16px 0;position:relative}
body.profile-active .hud-top::before,body.profile-active .hud-top::after{display:none}
body.profile-active .hud-inner{max-width:1000px;padding-right:75px}
body.profile-active .brand-logo-frame{width:39px;height:39px;clip-path:none;border-radius:12px;border:0;box-shadow:none}
body.profile-active .brand-copy small{font-size:7px;letter-spacing:1.3px;color:var(--k-muted)}
body.profile-active .progress-wrap{display:none}
body.profile-active .app-shell{max-width:1000px;padding-bottom:calc(125px + env(safe-area-inset-bottom))}
.profile-screen{padding:22px 0 20px;min-width:0}
.profile-screen::before{display:none}
.profile-heading{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:25px}
.profile-heading small{font-family:system-ui,sans-serif;letter-spacing:2px;font-size:9px;color:var(--k-muted);font-weight:650}
.profile-heading h1{font-family:system-ui,sans-serif;font-size:36px;letter-spacing:-1px;line-height:1.2;margin:7px 0 0;font-weight:750;color:var(--k-text)}
.profile-heading h1 span{color:#c6a8f7}
.profile-heading-tag{font-family:system-ui,sans-serif;font-size:8px;letter-spacing:1.4px;color:var(--k-muted);border:1px solid var(--k-line);border-radius:6px;padding:6px 9px}
.profile-panel{padding:0!important;background:var(--k-panel)!important;border:1px solid var(--k-line)!important;border-radius:24px!important;clip-path:none!important;overflow:hidden;box-shadow:var(--k-shadow)!important;animation:profileV3In .5s ease both}
.profile-panel::before,.profile-panel::after{display:none!important}
.profile-cover{height:190px;position:relative;isolation:isolate;overflow:hidden;background:#1f2038}
.profile-cover-haya,.profile-cover-fanny{position:absolute;inset:0;background-size:cover;background-repeat:no-repeat;transform:scale(1.04);animation:profileCoverDrift 12s ease-in-out infinite alternate}
.profile-cover-haya{right:37%;background-image:url('/assets/bg-dark.png');background-position:50% 30%;filter:saturate(.6);mask-image:linear-gradient(90deg,#000 65%,transparent)}
.profile-cover-fanny{left:37%;background-image:url('/assets/bg-aspirant.png');background-position:50% 38%;filter:saturate(.6);mask-image:linear-gradient(90deg,transparent,#000 30%);animation-direction:alternate-reverse}
.profile-cover-gradient{position:absolute;inset:0;background:linear-gradient(0deg,var(--k-panel),transparent 75%),linear-gradient(90deg,#4d122666,#1e1e4955);z-index:1}
.profile-cover-caption{position:absolute;top:23px;left:28px;z-index:2;color:#d8cfea;font:600 8px system-ui,sans-serif;letter-spacing:2.5px}
.profile-cover-caption i{font-style:normal;opacity:.4;margin:0 6px}
.profile-cover-orb{position:absolute;width:220px;height:220px;right:10%;top:-40px;border:1px solid #cddfff25;border-radius:50%;box-shadow:0 0 0 28px #cddfff06,0 0 0 58px #cddfff03;z-index:1}
.profile-content{position:relative;padding:0 32px 24px;font-family:system-ui,sans-serif}
.profile-hero{display:flex;gap:21px;align-items:center;padding:0 0 25px;margin-top:-36px;position:relative;z-index:2;animation:none}
.profile-avatar-large{width:110px;height:110px;flex:0 0 110px;border-radius:25px!important;border:4px solid var(--k-panel)!important;background:var(--k-panel-2)!important;box-shadow:0 0 0 2px var(--frame-color,#8f83ad)!important;overflow:visible!important;clip-path:none!important;animation:none!important;position:relative;display:grid;place-items:center}
.profile-avatar-large::before,.profile-avatar-large::after{display:none!important}
.profile-avatar-large img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:21px;z-index:1}
.profile-avatar-large>span{font-size:32px;color:#c5b1de;font-weight:700}
.profile-frame-decoration{display:none;position:absolute;inset:-12px;background:var(--frame-color);mask:url('/assets/game/panel-border-025.png') center/100% 100% no-repeat;-webkit-mask:url('/assets/game/panel-border-025.png') center/100% 100% no-repeat;z-index:3;pointer-events:none;image-rendering:pixelated}
.profile-avatar-large[data-frame]:not([data-frame="plain"]) .profile-frame-decoration{display:block}
.profile-avatar-large[data-frame="crimson"] .profile-frame-decoration{mask-image:url('/assets/game/panel-border-014.png');-webkit-mask-image:url('/assets/game/panel-border-014.png')}
.profile-avatar-large[data-frame="storm"] .profile-frame-decoration{mask-image:url('/assets/game/panel-border-000.png');-webkit-mask-image:url('/assets/game/panel-border-000.png')}
.profile-identity{padding-top:25px;min-width:0;flex:1}
.profile-identity>small{color:var(--k-muted);font:600 8px system-ui,sans-serif;letter-spacing:1.5px}
.profile-identity h2{font:750 30px/1.3 system-ui,sans-serif;letter-spacing:-.7px;margin:4px 0 6px;overflow-wrap:anywhere;color:var(--k-text)}
.profile-status,.profile-status.is-accepted{display:inline-flex;color:#8bd4ae;background:#74c49712;border:1px solid #74c49722;border-radius:5px;font:500 9px system-ui,sans-serif;letter-spacing:.2px;padding:5px 8px}
.profile-edit-button{background:var(--k-panel-2);color:var(--k-text);border:1px solid var(--k-line);border-radius:11px;font:500 11px system-ui,sans-serif;min-height:40px;padding:8px 14px;align-self:flex-end;margin-bottom:2px;cursor:pointer;display:flex;align-items:center;gap:6px}
.profile-edit-button span{font-size:18px;color:var(--k-muted)}
.profile-info-grid{display:grid;grid-template-columns:1.1fr 1fr 1.6fr .6fr;gap:0;border:1px solid var(--k-line);border-radius:14px;overflow:hidden;background:var(--k-panel-2);margin-bottom:26px;animation:none}
.profile-info-item,.profile-info-item.profile-info-character,.profile-info-item.profile-info-rank{background:transparent;border:0;border-right:1px solid var(--k-line);padding:16px 18px;box-shadow:none;clip-path:none;min-width:0}
.profile-info-item:last-child{border-right:0}
.profile-info-item small{display:block;color:var(--k-muted);font:600 8px system-ui,sans-serif;letter-spacing:1.1px;margin-bottom:7px}
.profile-info-item strong{font:600 12px/1.5 system-ui,sans-serif;color:var(--k-text);word-break:normal;overflow-wrap:anywhere}
.profile-section{padding:0;margin:0 0 27px;border:0;animation:profileV3In .5s .1s both}
.profile-section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:15px}
.profile-section-title h3{font:650 15px system-ui,sans-serif;letter-spacing:-.2px;margin:0;color:var(--k-text)}
.profile-section-title>small{font:500 7px system-ui,sans-serif;letter-spacing:1.6px;color:var(--k-muted)}
.profile-section-title button{background:none;border:0;color:#bb9bdc;min-height:38px;font:500 11px system-ui,sans-serif;cursor:pointer;display:flex;align-items:center;gap:7px}
.profile-game-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.profile-game-stats>div{display:grid;grid-template-columns:28px 1fr;gap:5px 10px;border:1px solid var(--k-line);border-radius:13px;padding:17px 18px;background:linear-gradient(130deg,#bc99df0a,transparent)}
.profile-game-stats>div>span{color:#c6a3d7;grid-row:span 2;font-size:25px;align-self:center}
.profile-game-stats b{font-size:21px;font-weight:700;line-height:1.2}
.profile-game-stats small{font-size:8px;color:var(--k-muted)}
.profile-heroes-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.profile-hero-card{display:flex;align-items:center;gap:12px;border:1px solid var(--k-line);border-radius:12px;background:var(--k-panel-2);padding:9px;overflow:hidden;min-width:0;box-shadow:none;transition:transform .2s;animation:none;clip-path:none}
.profile-hero-card.is-character{border:1px solid #e295ac40;box-shadow:none}
.profile-hero-card:hover{transform:translateY(-3px);box-shadow:0 5px 20px #0001}
.profile-hero-card::before{display:none}
.profile-hero-card-media{width:58px;height:64px;flex:0 0 58px;aspect-ratio:auto;border-radius:8px;overflow:hidden;position:relative}
.profile-hero-card-media img{width:100%;height:100%;object-fit:cover;opacity:1}
.profile-hero-card-body{padding:0;min-width:0}
.profile-hero-card-body strong{display:block;font:600 12px/1.4 system-ui,sans-serif;color:var(--k-text);overflow-wrap:anywhere}
.profile-hero-card-body small{display:block;font:500 7px system-ui,sans-serif;letter-spacing:.8px;color:var(--k-muted);margin-bottom:4px}
.profile-hero-badge{font:600 0px system-ui,sans-serif;position:absolute;top:3px;left:3px;background:#d75972;border:0;width:6px;height:6px;border-radius:50%;padding:0;box-shadow:0 0 5px #f7abb655}
.profile-about-section{padding:21px;background:linear-gradient(105deg,#baa0e00a,transparent);border:1px solid var(--k-line);border-radius:14px;margin-bottom:20px}
.profile-about{font:400 13px/1.9 system-ui,sans-serif;letter-spacing:normal;color:var(--k-muted);white-space:pre-wrap;overflow-wrap:anywhere;margin:0;background:none;border:0;padding:0}
.profile-updated{font:400 9px system-ui,sans-serif;letter-spacing:.3px;color:var(--k-muted);opacity:.6;margin:0;text-align:right}
.profile-bottom-caption{text-align:center;font:400 10px system-ui,sans-serif;letter-spacing:.5px;color:var(--k-muted);opacity:.7;margin:22px 0 0}
body:not(.profile-active) .profile-theme-toggle{display:none!important}
body[data-legacy-mode="edit"]:not(.arena-active) .kys-bottom-nav{display:none}
:root.light body.profile-active .battle-bg{opacity:.08}
:root.light body.profile-active .brand-copy b{color:var(--k-text)}
:root.light .profile-status{color:#347a57;background:#6abc9715}
:root.light body.profile-active .profile-edit-screen{color:var(--k-text);background:#ffffffdd;border-radius:20px;padding:20px}
.profile-edit-screen input,.profile-edit-screen textarea,.profile-edit-screen select{font-size:max(16px,1rem)}
@keyframes profileV3In{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
@keyframes profileCoverDrift{to{transform:scale(1.08) translateY(4px)}}
@media(max-width:760px){.profile-screen{padding-top:18px}.profile-cover{height:170px}.profile-content{padding:0 23px 22px}.profile-info-item{padding:14px 12px!important}.profile-game-stats{gap:10px}.profile-game-stats>div{padding:14px 11px;grid-template-columns:21px 1fr;gap:5px 7px}.profile-game-stats small{font-size:7px}.profile-heroes-cards{gap:9px}.profile-hero-card{gap:8px;padding:7px}.profile-hero-card-media{width:43px;flex-basis:43px;height:53px}.profile-hero-card-body strong{font-size:10px}}
@media(max-width:520px){body.profile-active .app-shell{padding-left:max(15px,env(safe-area-inset-left));padding-right:max(15px,env(safe-area-inset-right))}.profile-heading{margin-bottom:21px}.profile-heading h1{font-size:29px}.profile-heading small{font-size:8px;letter-spacing:1.4px}.profile-heading-tag{font-size:6px;letter-spacing:.6px;padding:5px}.profile-panel{border-radius:20px!important}.profile-cover{height:153px}.profile-cover-caption{top:19px;left:21px;font-size:6px;letter-spacing:2px}.profile-cover-haya{background-position:61% 27%}.profile-cover-fanny{background-position:50% 31%}.profile-content{padding:0 17px 22px}.profile-hero{display:grid;grid-template-columns:83px minmax(0,1fr);gap:12px;margin-top:-30px;padding-bottom:20px}.profile-avatar-large{width:83px;height:83px;flex-basis:83px;border-radius:20px!important}.profile-avatar-large img{border-radius:16px}.profile-identity{padding-top:24px}.profile-identity h2{font-size:23px}.profile-identity>small{font-size:6px}.profile-status{font-size:8px!important;padding:4px 6px}.profile-edit-button{grid-column:1/-1;justify-content:center;font-size:10px;min-height:37px;margin-top:4px;width:100%}.profile-info-grid{grid-template-columns:1fr 1fr;margin-bottom:24px}.profile-info-item{padding:13px!important;border-right:1px solid var(--k-line)!important;border-bottom:1px solid var(--k-line)!important}.profile-info-item:nth-child(2n){border-right:0!important}.profile-info-item:nth-child(n+3){border-bottom:0!important}.profile-info-item small{font-size:7px;letter-spacing:.8px;margin-bottom:5px}.profile-info-item strong{font-size:11px}.profile-section{margin-bottom:23px}.profile-section-title{margin-bottom:11px}.profile-section-title h3{font-size:14px}.profile-section-title>small{font-size:6px;letter-spacing:.8px}.profile-game-stats{gap:7px}.profile-game-stats>div{display:flex;flex-direction:column;text-align:center;gap:6px;padding:13px 5px}.profile-game-stats>div>span{font-size:20px}.profile-game-stats b{font-size:20px}.profile-game-stats small{font-size:7px;line-height:1.4}.profile-heroes-cards{grid-template-columns:1fr;gap:9px}.profile-hero-card{padding:9px;gap:12px}.profile-hero-card-media{width:47px;flex-basis:47px;height:49px}.profile-hero-card-body strong{font-size:13px}.profile-hero-card-body small{font-size:7px}.profile-about-section{padding:16px}.profile-about{font-size:12px}.profile-updated{font-size:8px;text-align:left}.profile-bottom-caption{font-size:8px}.profile-section-title button{font-size:10px}.profile-edit-heading h2{font-size:22px}.profile-edit-screen{padding-bottom:100px}.profile-edit-actions{padding-bottom:max(12px,env(safe-area-inset-bottom))}}
@media(prefers-reduced-motion:reduce){.profile-screen *,.profile-screen *::before,.profile-screen *::after{animation:none!important;transition:none!important}}

body[data-wizard-step]:not([data-wizard-step="1"]):not(.profile-active):not(.arena-active) .kys-bottom-nav{display:none!important}
@media(max-width:360px){.profile-heading-tag{display:none}}

/* ===== KYS Community: explicit interests + events ===== */
.profile-community-section{display:grid;gap:16px}.profile-interest-list{display:flex;flex-wrap:wrap;gap:9px}.profile-interest-chip{display:grid;grid-template-columns:1fr auto auto;gap:3px 8px;align-items:center;min-width:150px;padding:10px 10px 9px 12px;border:1px solid rgba(255,255,255,.09);border-radius:13px;background:rgba(7,10,15,.56)}.profile-interest-chip.is-public{border-color:rgba(69,204,239,.3);box-shadow:inset 2px 0 rgba(69,204,239,.7)}.profile-interest-chip b{font-size:12px}.profile-interest-chip small{grid-column:1/2;color:rgba(222,232,244,.54);font:600 8px/1.3 var(--mono)}.profile-interest-chip button{width:26px;height:26px;padding:0;border:1px solid rgba(255,255,255,.08);border-radius:8px;background:rgba(255,255,255,.04);color:#dbe7f4}.profile-interest-add{display:grid;grid-template-columns:120px minmax(120px,1fr) 150px auto;gap:8px}.profile-interest-add :is(input,select){min-width:0;padding:10px;border:1px solid rgba(255,255,255,.1);border-radius:10px;background:rgba(6,9,13,.72);color:#edf5ff}.profile-interest-add button,.profile-event-actions button{padding:9px 12px;border:1px solid rgba(69,204,239,.26);border-radius:10px;background:rgba(69,204,239,.1);color:#dff8ff}.profile-community-columns{display:grid;grid-template-columns:1fr 1fr;gap:14px}.profile-community-columns>div{padding:14px;border:1px solid rgba(255,255,255,.08);border-radius:14px;background:rgba(7,10,15,.42)}.profile-community-columns h4{margin:0 0 12px;font-size:12px}.profile-match{display:grid;gap:2px;padding:8px 0;border-bottom:1px solid rgba(255,255,255,.06)}.profile-match:last-child{border-bottom:0}.profile-match small,.profile-event-card span,.profile-community-empty{color:rgba(222,232,244,.56);font-size:9px}.profile-event-card{display:grid;grid-template-columns:1fr auto;gap:10px;padding:10px 0;border-bottom:1px solid rgba(255,255,255,.06)}.profile-event-card>div:first-child{display:grid;gap:3px}.profile-event-actions{display:grid;gap:6px;align-content:center}.profile-event-actions button{font-size:9px;padding:7px 9px}
@media(max-width:680px){.profile-interest-add{grid-template-columns:1fr 1fr}.profile-interest-add button{grid-column:1/-1}.profile-community-columns{grid-template-columns:1fr}.profile-event-card{grid-template-columns:1fr}.profile-event-actions{display:flex;flex-wrap:wrap}}
@media(max-width:380px){.profile-interest-add{grid-template-columns:1fr}}
