/* The hero and companion share a scene; live player data stays in a calm panel.
   Scoped to the new partial so unrelated game screens keep their own layout. */
.adventure-profile.premium-profile {
  --ink:#eee8dc;--text:#eee8dc;--muted:#c0c6c8;--muted-2:#c0c6c8;
  --panel:#193440;--panel-2:#1b3c49;--bg:#102936;--bg-2:#102936;
  --line:#52616c;--line-strong:#78858a;--mint:#c5cba7;--primary:#d6bd82;--accent:#d6bd82;--gold:#d6bd82;
  --lvl-mint:#c5cba7;--lvl-violet:#b7afc6;--lvl-ink:#eee8dc;--lvl-muted:#c0c6c8;
  padding:0;background:transparent;border:0;border-radius:0;color:var(--ink);
  font-family:Manrope,system-ui,sans-serif;
}
.premium-profile [hidden] {display:none!important}
.premium-profile :is(button,a,summary,input,select):focus-visible {outline:3px solid #efd7a0;outline-offset:4px}
.premium-profile .profile-head {align-items:center;margin-bottom:24px;padding-right:110px;min-height:54px}
.premium-profile .profile-head h2 {font-family:Cinzel,Georgia,serif;font-weight:500;font-size:clamp(24px,2.8vw,34px);line-height:1.2;letter-spacing:-.035em;margin:9px 0 0;text-shadow:none}
.premium-profile .eyebrow {color:#c0c6c8;letter-spacing:.11em;font-size:12px;line-height:1.5;background:none;border:0;padding:0;text-shadow:none}
.premium-profile .profile-grade-chip {top:50%;transform:translateY(-50%);padding:11px 14px;border-radius:8px;background:var(--panel);border-color:var(--line);color:var(--ink);box-shadow:none;font:600 14px/1.2 Manrope,system-ui,sans-serif;letter-spacing:0}
.premium-profile .guest-sync-compact {border-color:var(--line-strong);background:var(--panel);border-radius:10px;padding:14px 16px}
.premium-profile .guest-sync-compact h2 {font-size:15px;color:var(--ink)}
.premium-profile-layout {display:grid;grid-template-columns:minmax(0,1.15fr) minmax(300px,1fr);border:1px solid var(--line);border-radius:16px;background:var(--panel);min-width:0}
.premium-profile-layout>div {min-width:0}
.premium-profile .premium-profile-stage {position:relative;isolation:isolate;margin:0;padding:25px 20px 30px;background:#1b3c49;border-radius:15px 0 0 15px;text-align:center}
.premium-profile-stage::before {content:"";position:absolute;inset:0;z-index:-2;border-radius:inherit;background:url('../images/magic/expedition-world.webp') 74% 45%/cover;opacity:.36}
.premium-profile-stage::after {content:"";position:absolute;inset:0;z-index:-1;border-radius:inherit;background:linear-gradient(0deg,#193440 6%,#19344035 85%)}
.premium-profile .premium-profile-stage-label {margin:0 0 20px;text-align:left;color:#e0dfd4;font-size:12px;letter-spacing:.07em;line-height:1.5}
.premium-profile .adventure-character-row {display:grid;grid-template-columns:207px minmax(0,1fr);gap:12px;align-items:start;justify-content:center;margin:0;min-width:0}
.premium-profile .adventure-character-row:has(>[data-companion-profile][hidden]) {grid-template-columns:minmax(0,1fr)}
.premium-profile-avatar {position:relative;width:207px;min-height:365px;margin:20px auto 0}
.premium-profile .premium-profile-avatar .adventure-profile-portrait {display:block;width:140px;height:210px;margin:0 auto;transform:scale(1.47619);transform-origin:center top}
.premium-profile .premium-profile-avatar .wardrobe-portrait {display:block;width:140px;height:210px;max-width:none;line-height:0}
.premium-profile .premium-profile-avatar [data-profile-portrait] {display:block;width:140px;height:210px;max-width:none;object-fit:contain;filter:drop-shadow(0 8px 10px #16262e80)}
.premium-profile .premium-profile-avatar .adventure-identity-edit {position:absolute;top:326px;right:auto;left:50%;transform:translateX(-50%);display:inline-flex;align-items:center;justify-content:center;gap:8px;width:max-content;max-width:100%;height:auto;min-height:44px;padding:9px 14px;border:1px solid #7b898d;border-radius:8px;background:#193440e8;color:var(--ink);box-shadow:none;clip-path:none;font:600 14px/1.4 Manrope,system-ui,sans-serif}
.premium-profile .adventure-identity-edit .e8k-icon {width:17px;height:17px}
.premium-profile .premium-profile-avatar .adventure-identity-edit:hover {background:#254756;border-color:#bcc3b1}
.premium-profile .lvl-frame::before {box-shadow:none}
.premium-profile .lvl-frame--legend::before,.premium-profile .gh-xpbar i,.premium-profile .portrait-magic i {animation:none!important}
.premium-profile .portrait-magic-ring,.premium-profile .portrait-magic-spark {display:none}
.premium-profile .adventure-active-pets:empty {display:none}

/* Existing companion actions remain live. Controls sit below the illustration
   instead of floating over its face; menus and walking forms stay in flow. */
.premium-profile .adventure-character-row>[data-companion-profile] {display:block;width:100%;min-width:0;max-width:270px;justify-self:center}
.premium-profile .companion-crew-inline {width:100%;margin:0;padding:0;border:0;background:none;box-shadow:none;clip-path:none;gap:8px;font-family:inherit;color:var(--ink)}
.premium-profile .companion-crew-inline .companion-profile-figure {display:flex;flex-direction:column;align-items:center;justify-content:flex-start;width:100%;min-height:0;margin:0;padding:48px 0 0;overflow:visible;background:none;border-radius:0;isolation:isolate}
.premium-profile .companion-profile-figure::before {display:none}
.premium-profile .companion-profile-figure>.companion-care-crystal {display:none}
.premium-profile .companion-crew-inline .companion-profile-portrait {width:150px;flex:0 0 150px;height:150px;max-width:100%;filter:drop-shadow(0 7px 9px #15262d70)}
.premium-profile .companion-profile-figure>.companion-edit {top:0;right:0;width:40px;height:40px;border-radius:8px;background:#193440d9;border-color:var(--line-strong);box-shadow:none;transform:none}
.premium-profile .companion-profile-figure>.companion-edit:hover {background:#254756;box-shadow:none;transform:none}
.premium-profile .companion-profile-figure>.companion-chat-open {top:0;left:0;right:auto;min-height:40px;padding:9px 12px;border:1px solid #d6c495;border-radius:8px;background:#d6c495;color:#122734;font:700 13px/1.4 Manrope,system-ui,sans-serif;letter-spacing:0;box-shadow:none;animation:none}
.premium-profile .companion-profile-figure>.companion-chat-open::after {display:none}
.premium-profile .companion-crew-inline .companion-profile-figure>.companion-chat-open:hover {background:#e4d3a9;color:#122734;border-color:#e4d3a9;box-shadow:none}
.premium-profile .companion-care-orbs {position:static;display:flex;align-items:start;justify-content:center;gap:7px;width:100%;margin-top:15px;pointer-events:auto}
.premium-profile .companion-care-orb {position:static;flex:1;min-width:0;width:auto;min-height:66px;gap:5px;color:var(--ink);font:600 12px/1.4 Manrope,system-ui,sans-serif}
.premium-profile .companion-care-orb .cc-orb {width:42px;height:42px;border:1px solid #83918a;border-radius:10px;background:#193440e8;color:#d3d7bd;box-shadow:none;transition:background .15s}
.premium-profile .companion-care-orb :is(svg,.cc-food) {width:23px;height:23px;font-size:23px;filter:none}
.premium-profile .companion-care-orb small {color:var(--ink);font-size:12px;text-shadow:none;letter-spacing:0;overflow-wrap:anywhere}
.premium-profile .companion-care-orb:hover .cc-orb,.premium-profile .companion-care-orb:focus-visible .cc-orb {background:#4a5f58;border-color:#bcc5a4;box-shadow:none;transform:none}
.premium-profile .companion-care-orb.is-done .cc-orb::after {width:18px;height:18px;background:#c5cba7;color:#102936;right:-4px;top:-4px}
.premium-profile .companion-crew-inline>[data-crew-name] {font:700 17px/1.4 Manrope,system-ui,sans-serif;color:var(--ink);text-shadow:none;letter-spacing:0;text-transform:none}
.premium-profile .companion-crew-inline .companion-care-energy {display:flex;align-items:center;justify-content:center;gap:10px;margin:4px 0 10px;font-size:12px;color:#d0d6b7}
.premium-profile .companion-care-energy .cc-bar {width:70px;max-width:40%;height:5px;background:#283b46}
.premium-profile .companion-care-energy .cc-bar i {background:#c5cba7;box-shadow:none}
.premium-profile .companion-crew-inline :is(.companion-care-benefit,.companion-care-team) {margin:7px 0;color:var(--muted);font-size:13px;line-height:1.5}
.premium-profile .companion-crew-inline [data-crew-care-status] {font-size:13px;color:#eee8dc;text-align:left;line-height:1.5;margin:10px 0;min-height:0}
.premium-profile .companion-crew-inline [data-crew-care-status]:empty {display:none}
.premium-profile .companion-crew-inline .companion-care-foods {background:#102936;border:1px solid #6b7c7f;border-radius:10px;padding:8px;gap:8px}
.premium-profile .companion-care-foods button {border:1px solid #778786;border-radius:8px;background:#3b5059;color:var(--ink);min-height:78px;box-shadow:none}
.premium-profile .companion-care-foods button>small {font:600 13px/1.4 Manrope,system-ui,sans-serif}
.premium-profile .companion-care-walk {padding:14px;margin:14px 0;border-radius:10px;background:#102936;border-color:#72837d;font-size:14px}
.premium-profile .companion-care-walk label {color:var(--ink);gap:10px}
.premium-profile .companion-care-walk input {background:#193440;border-color:#94a095;border-radius:7px;color:var(--ink);min-width:0}
.premium-profile .companion-care-walk button {background:#d6c495;color:#122734;border-radius:7px;clip-path:none;min-height:44px}
.premium-profile .companion-story {color:var(--muted);font-size:13px;line-height:1.5}
.premium-profile .companion-story summary {padding:10px 0;cursor:pointer;color:var(--ink)}
.premium-profile .companion-story p {margin:6px 0}
.premium-profile :is(.companion-config-dialog,.companion-chat-dialog) {background:#102936;color:var(--ink);border-color:#78858a;border-radius:16px;box-shadow:0 18px 65px #15212970}
.premium-profile .companion-config-dialog :is(input[type=text],select) {background:#193440;color:var(--ink);border-color:#78858a}
.premium-profile .companion-config-dialog button[type=submit] {background:#d6c495;color:#122734;border-color:#d6c495}
.premium-profile :is(.companion-care-walk button,.companion-config-dialog button[type=submit]):hover {background:#e4d3a9;color:#122734;border-color:#e4d3a9;box-shadow:none}
.premium-profile .companion-family .companion-personality {color:var(--muted);font-size:12px}
.premium-profile .companion-config-close {min-width:44px;min-height:44px;border-color:#78858a}

.premium-profile-progress {padding:28px;display:flex;flex-direction:column;align-items:stretch;border-left:1px solid var(--line)}
.premium-profile .gh-bohater {display:flex;flex-direction:column;gap:0;text-align:left;font-family:inherit;min-width:0}
.premium-profile .gh-bohater .gh-bohater-name {order:-3;font-size:clamp(26px,2.8vw,35px);font-weight:700;color:var(--ink);line-height:1.2;letter-spacing:-.03em;text-transform:none;margin:9px 0;overflow-wrap:anywhere}
.premium-profile .gh-bohater .lvl-title {order:-2;display:block;align-self:flex-start;margin:0 0 15px;padding:0;border:0;background:none;color:#d6bd82;font:600 14px/1.5 Manrope,system-ui,sans-serif;letter-spacing:0;text-transform:none}
.premium-profile .gh-bohater .gh-hud {display:flex;justify-content:flex-start;gap:10px;margin:3px 0 10px}
.premium-profile .gh-bohater :is(.gh-hud-level,.gh-hud-xp,.gh-hud-coins,.gh-hud-glitch) {font:600 14px/1.4 Manrope,system-ui,sans-serif;letter-spacing:0;text-transform:none;text-shadow:none;clip-path:none;box-shadow:none;white-space:normal}
.premium-profile .gh-bohater .gh-hud-level {padding:9px 12px;background:#d6bd82;color:#102936;border-radius:7px;min-height:40px;box-sizing:border-box}
.premium-profile .gh-bohater .gh-hud-coins {margin-left:auto;padding:8px 10px;background:#4b4e45;border:1px solid #81765f;border-radius:7px;color:#eddbb6}
.premium-profile .gh-bohater .gh-hud-xp {color:#c5cba7}
.premium-profile .gh-bohater .gh-xpbar {order:2;flex-basis:100%;min-width:0;max-width:none;width:100%;height:7px;clip-path:none;border:0;border-radius:6px;background:#0b202b}
.premium-profile .gh-bohater .gh-xpbar i {inset:0 auto 0 0;border-radius:6px;background:#c5cba7;box-shadow:none}
.premium-profile .gh-bohater .gh-hud-glitch {order:3;max-width:100%;min-height:36px;padding:6px 10px;border:1px solid #78858a;border-radius:7px;color:var(--muted);background:none}
.premium-profile .gh-bohater .profile-level-progress {margin:0!important;color:var(--muted)!important;font-size:13px;line-height:1.5}
.premium-profile .gh-bohater .gh-level-panel {left:0;transform:none;background:#102936;border-color:#78858a;color:var(--ink);border-radius:10px;box-shadow:0 12px 28px #15212960;width:min(340px,100%)}
.premium-profile .gh-bohater .gh-level-panel :is(.gh-level-panel-title,b) {color:#eee8dc;letter-spacing:0;font-size:14px}
.premium-profile .gh-bohater .gh-level-panel-sub {color:var(--muted);font-size:13px}
.premium-profile .gh-bohater .lvl-next {width:100%;box-sizing:border-box;margin:20px 0 0;padding:15px;border:1px solid #777c69;background:#414e48;border-radius:10px;color:var(--ink);gap:7px}
.premium-profile .lvl-next :is(.lvl-next-label,small) {font-family:inherit;letter-spacing:0;color:#d2d7bb;font-size:13px}
.premium-profile .lvl-next ul {line-height:1.5;gap:5px}
.premium-profile .gh-bohater .lvl-style {width:100%;margin:12px 0 0;color:var(--muted);font-size:14px}
.premium-profile .lvl-style summary {min-height:36px;line-height:36px;color:var(--muted)}
.premium-profile .lvl-style select {max-width:100%;min-height:44px;background:#102936;border-color:#78858a;border-radius:8px;font-size:16px}
.premium-profile .adventure-profile-links {display:flex;flex-wrap:wrap;justify-content:start;gap:8px;border:0;border-radius:0;background:none;padding:0;margin:22px 0;box-shadow:none}
.premium-profile .adventure-profile-links .btn {flex:1 1 auto;min-height:44px;min-width:0;margin:0;padding:10px 12px;clip-path:none;border:1px solid #78858a;border-radius:8px;background:#1b3c49;color:var(--ink);font:600 14px/1.4 Manrope,system-ui,sans-serif;letter-spacing:0;text-transform:none;white-space:normal;box-shadow:none}
.premium-profile .adventure-profile-links .btn:hover {background:#2b4c5a;border-color:#b1b9ae}
.premium-profile-badges {border-top:1px solid var(--line);padding-top:18px;margin-top:auto}
.premium-profile .adventure-profile-stats-head {justify-content:flex-start;margin:0 0 14px;gap:10px}
.premium-profile .adventure-profile-stats-head h3 {margin:0;font:600 15px/1.4 Manrope,system-ui,sans-serif;letter-spacing:0;text-transform:none;color:var(--ink)}
.premium-profile .stat-info-btn {width:36px;height:36px;color:var(--muted);border-color:var(--line);font-size:17px}
.premium-profile .adventure-hero-badges {justify-content:flex-start;gap:9px;margin:0;flex-wrap:wrap}
.premium-profile :is(.hero-badge,.hero-badges-all) {box-shadow:none;clip-path:none;border-radius:9px;background:#102936;color:var(--muted)}
.premium-profile .hero-badge.is-earned {background:#444e48;color:#d6bd82}
.premium-profile .hero-badges-all {min-height:44px;font:600 13px/1.4 Manrope,system-ui,sans-serif;white-space:normal;border-color:var(--line-strong)}
.premium-profile .player-nfc-section:empty {display:none}
.premium-profile .player-nfc-section:not(:empty) {margin-top:28px}
.premium-profile-learning {margin-top:30px;min-width:0}
.premium-profile-section-heading {display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:17px}
.premium-profile .premium-profile-section-heading h3 {margin:0;color:var(--ink);font-size:21px;letter-spacing:-.02em}
.premium-profile-section-heading p {margin:0;color:var(--muted);font-size:13px}
.premium-profile .phud-quote {border-color:var(--line);background:#193440;color:var(--muted);font-size:14px}
.premium-profile .phud-quote-dot {background:var(--mint);box-shadow:none;animation:none}
.premium-profile .phud-card {background:#193440;border:1px solid var(--line);border-radius:12px;box-shadow:none;transform:none}
.premium-profile .phud-card:hover {box-shadow:none;transform:none}
.premium-profile .phud-card .phud-ring-val {filter:none}
.premium-profile .phud-ring-bg {stroke:#53636e}
.premium-profile .phud-label {font:600 13px/1.4 Manrope,system-ui,sans-serif;letter-spacing:0}
.premium-profile .phud-sub {font-size:12px;color:var(--muted)}
.premium-profile .phud-value {font-family:inherit;font-size:24px}
.premium-profile :is(.phud-note,.phud-pace-note,.phud-empty) {font-size:13px;color:var(--muted)}
.premium-profile .phud-extra {border-color:var(--line);font-size:14px}
.premium-profile .metric-row {font-size:14px}
.premium-profile [data-subject-stats]>h3,.premium-profile .adventure-skills-panel>h3 {font:600 20px/1.4 Manrope,system-ui,sans-serif;margin:28px 0 10px;letter-spacing:-.02em}
.premium-profile [data-subject-stats]>p {color:var(--muted);font-size:14px;line-height:1.6;margin:0 0 16px}
.premium-profile .subject-stat {background:#193440;border-color:var(--line);border-radius:10px;color:var(--ink)}
.premium-profile .subject-stat summary {font-size:15px;line-height:1.5;padding:14px;min-height:44px;box-sizing:border-box}
.premium-profile .subject-domain {font-size:14px;line-height:1.5;border-color:var(--line)}
.premium-profile .subject-domain small {font-size:13px;color:var(--muted)}
.premium-profile .subject-tile {background:#193440;border:1px solid var(--line);border-radius:12px;box-shadow:none;color:var(--ink)}
.premium-profile .subject-tile b {font-size:15px}
.premium-profile .subject-tile small {font-size:13px;color:var(--muted)}
.premium-profile .subject-tile.is-locked {opacity:1;background:#15303d;color:var(--muted)}

@media(max-width:1150px) {
  .premium-profile-layout {grid-template-columns:minmax(0,1fr)}
  .premium-profile .premium-profile-stage {border-radius:15px 15px 0 0;padding-inline:28px}
  .premium-profile .adventure-character-row {grid-template-columns:230px minmax(0,270px);gap:30px}
  .premium-profile-progress {border-left:0;border-top:1px solid var(--line)}
}
@media(max-width:600px) {
  .premium-profile .profile-head {padding-right:0;display:flex;flex-wrap:wrap;gap:14px;margin-bottom:20px}
  .premium-profile .profile-grade-chip {position:static;transform:none;font-size:13px}
  .premium-profile .profile-head h2 {font-size:25px}
  .premium-profile .premium-profile-stage {padding:20px 16px 24px}
  .premium-profile .premium-profile-stage-label {text-align:center;margin-bottom:8px}
  .premium-profile .adventure-character-row {grid-template-columns:minmax(0,1fr);gap:16px}
  .premium-profile-avatar {width:187px;min-height:335px;margin-top:15px}
  .premium-profile .premium-profile-avatar .adventure-profile-portrait {transform:scale(1.33333)}
  .premium-profile .premium-profile-avatar .adventure-identity-edit {top:293px}
  .premium-profile .adventure-character-row>[data-companion-profile] {max-width:290px}
  .premium-profile .companion-crew-inline .companion-profile-figure {padding-top:46px}
  .premium-profile-progress {padding:22px 18px}
  .premium-profile .gh-bohater .gh-bohater-name {font-size:29px}
  .premium-profile .gh-bohater .gh-hud-coins {margin-left:0}
  .premium-profile-section-heading {align-items:start;flex-direction:column;gap:6px}
  .premium-profile .companion-config-dialog {padding:20px 14px;max-width:calc(100vw - 24px)}
  .premium-profile .companion-config-dialog .companion-family {grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(prefers-reduced-motion:reduce) {
  .premium-profile :is(.companion-profile-portrait,.companion-flip-drop,.companion-flip-say) {animation:none!important;transition:none!important}
}

/* A phone keeps the companion and the hero together, with progress within reach. */
@media(min-width:360px) and (max-width:600px){
 .premium-profile .adventure-character-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;align-items:start}
 .premium-profile .premium-profile-avatar{width:140px;min-height:294px;margin:38px auto 0}
 .premium-profile .premium-profile-avatar .adventure-profile-portrait{transform:none}
 .premium-profile .premium-profile-avatar .adventure-identity-edit{top:224px;font-size:11px;padding:8px;min-height:44px}
 .premium-profile .companion-crew-inline .companion-profile-portrait{width:130px;height:130px;flex-basis:130px}
 .premium-profile .companion-care-orbs{gap:3px;margin-top:10px}
 .premium-profile .companion-care-orb{min-height:62px}
 .premium-profile .companion-care-orb .cc-orb{width:40px;height:40px}
 .premium-profile .companion-care-orb small{font-size:9px}
 .premium-profile .companion-crew-inline .companion-care-energy{gap:5px;font-size:10px;flex-wrap:wrap}
 .premium-profile .companion-crew-inline :is(.companion-care-benefit,.companion-care-team){font-size:11px}
 .premium-profile .companion-profile-figure>.companion-chat-open{font-size:10px;padding:7px;min-height:40px}
 .premium-profile .companion-profile-figure>.companion-edit{width:36px}
 .premium-profile .companion-crew-inline .companion-care-foods{grid-template-columns:1fr}
}
