/* Mobile navigation and catalog layouts. Desktop keeps its existing styles. */
.pk-nav-toggle { display: none; }
@media (max-width: 900px), (max-height: 520px) and (pointer: coarse) {
  html.pk-catalog-root { height: auto !important; overflow-y: auto !important; overflow-x: hidden !important; }
  body.pk-mobile-catalog { height: auto !important; min-height: 100dvh !important; overflow: visible !important; }
  body.pk-mobile-nav .header {
    position: fixed !important; top: max(6px, env(safe-area-inset-top)) !important;
    left: max(8px, env(safe-area-inset-left)) !important; right: max(8px, env(safe-area-inset-right)) !important;
    width: auto !important; height: 48px !important; min-height: 48px !important;
    padding: 4px 10px !important; border-radius: 26px !important; gap: 6px !important;
  }
  body.pk-mobile-nav .brand-title { font-size: 18px !important; }
  body.pk-mobile-nav .avatar, body.pk-mobile-nav .icon-btn, body.pk-mobile-nav .back {
    width: 34px !important; height: 34px !important; min-width: 34px !important; min-height: 34px !important;
  }
  body.pk-mobile-nav .icon-btn img { width: 22px !important; height: 22px !important; }
  body.pk-mobile-nav .header-actions { gap: 6px !important; }
  body.pk-mobile-nav .header-score { display: none !important; }
  body.pk-mobile-nav .pk-nav-toggle {
    display: grid; place-items: center; position: fixed; z-index: 10002;
    right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom));
    width: 50px; height: 50px; border-radius: 50%; border: 2px solid #fff5bf;
    background: #ffd64a; color: #34204c; box-shadow: 0 3px 12px #120c3260;
    font: 700 32px/1 system-ui; cursor: pointer;
  }
  body.pk-mobile-nav .footer {
    display: none !important; position: fixed !important; z-index: 10001 !important;
    top: auto !important; bottom: calc(max(12px, env(safe-area-inset-bottom)) + 60px) !important;
    left: auto !important; right: max(12px, env(safe-area-inset-right)) !important;
    width: min(340px, calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right) - 24px)) !important;
    height: auto !important; min-height: 0 !important; max-height: calc(100dvh - 140px) !important;
    padding: 10px !important; border-radius: 24px !important; overflow-y: auto !important;
    background: #26224ff5 !important; transform: none !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px !important;
  }
  body.pk-mobile-nav.pk-nav-open .footer { display: grid !important; }
  body.pk-mobile-nav .footer .tab {
    width: auto !important; min-width: 0 !important; height: 66px !important; min-height: 66px !important;
    padding: 5px !important; border-radius: 18px !important; display: flex !important;
    flex-direction: column !important; gap: 3px !important;
  }
  body.pk-mobile-nav .footer .tab-icon { width: 30px !important; height: 30px !important; font-size: 23px !important; }
  body.pk-mobile-nav .footer .tab-label { font-size: 11px !important; }
  body.pk-index.pk-mobile-nav { --pk-header-h: 48px; --pk-footer-h: 0px; --pk-footer-bottom: 8px; }
  body.pk-mobile-catalog .page {
    display: block !important; width: 100% !important; height: auto !important; min-height: 100dvh !important;
    max-height: none !important; box-sizing: border-box !important; overflow: visible !important;
    padding: calc(max(6px, env(safe-area-inset-top)) + 62px) max(14px, env(safe-area-inset-right)) 82px max(14px, env(safe-area-inset-left)) !important;
  }
  body.pk-mobile-catalog h1 { font-size: 28px !important; line-height: 1.08 !important; margin: 8px 0 !important; }
  body.pk-mobile-catalog .kicker { font-size: 11px !important; height: auto !important; padding: 7px 10px !important; }
  body.pk-mobile-catalog .cta, body.pk-mobile-catalog .watch-btn { font-size: 14px !important; min-height: 44px !important; height: auto !important; padding: 10px 16px !important; }
  body.page-music .shell { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; height: auto !important; gap: 18px !important; }
  body.page-music .left-panel { display: block !important; }
  body.page-music .left-panel > p { font-size: 14px !important; line-height: 1.4 !important; margin: 8px 0 !important; }
  body.page-music .main-cta { margin-top: 12px !important; gap: 8px !important; }
  body.page-music .music-stage { height: auto !important; min-height: 0 !important; padding: 14px !important; border-radius: 26px !important; }
  body.page-music .stage-top { min-height: 0 !important; margin-bottom: 8px !important; }
  body.page-music .stage-title { font-size: 19px !important; }
  body.page-music .stage-pill { display: none !important; }
  body.page-music .carousel-area { height: 310px !important; min-height: 0 !important; }
  body.page-music .covers { grid-template-columns: .25fr 1fr .25fr !important; gap: 8px !important; }
  body.page-music .cov.tiny { display: none !important; }
  body.page-music .cov.center { height: 100% !important; border-radius: 22px !important; }
  body.page-music .cov.side { height: 68% !important; }
  body.page-music .center-info { bottom: 14px !important; width: 65% !important; }
  body.page-music .center-info h2 { font-size: 23px !important; }
  body.page-music .center-info p { font-size: 12px !important; }
  body.page-music .play-center { width: 56px !important; height: 56px !important; font-size: 23px !important; }
  body.page-music .arrow { width: 42px !important; height: 44px !important; font-size: 32px !important; }
  body.page-music .right-panel, body.page-music .music-list { height: auto !important; min-height: 0 !important; overflow: visible !important; }
  body.page-music #albums { scroll-margin-top: calc(env(safe-area-inset-top) + 68px); }
  body.page-series .cinema { width: 100% !important; margin: 0 !important; min-height: 0 !important; }
  body.page-series .page { display: flex !important; flex-direction: column !important; gap: 16px !important; }
  body.page-series .cinema { order: 0; }
  body.page-series .copy { order: 1; width: 100% !important; max-width: none !important; }
  body.page-series .copy-panel { padding: 16px !important; }
  body.page-series .copy p, body.page-series .copy-tagline { font-size: 14px !important; line-height: 1.4 !important; }
  body.page-series .marquee { padding: 8px !important; min-height: 0 !important; font-size: 15px !important; }
  body.page-series .marquee-title { font-size: 18px !important; }
  body.page-series .screen-shell { padding: 10px !important; height: auto !important; min-height: 0 !important; }
  body.page-series .screen { height: 230px !important; min-height: 0 !important; }
  body.page-series .screen-text h2 { font-size: 22px !important; }
  body.page-series .screen-text p { display: none !important; }
  body.page-series .screen-play { width: 48px !important; height: 48px !important; }
  body.page-series .posters { display: flex !important; overflow-x: auto !important; gap: 8px !important; padding: 12px 0 !important; }
  body.page-series .posters > * { flex: 0 0 90px !important; height: 110px !important; }
  body.pk-mobile-games .hero-row { margin: 0 0 14px !important; }
  body.pk-mobile-games .hero-copy, body.pk-mobile-games .hero-title-line { display: block !important; text-align: left !important; }
  body.pk-mobile-games .main-stage { height: 430px !important; min-height: 0 !important; width: 100% !important; padding: 0 !important; }
  body.pk-mobile-games .games-stage, body.pk-mobile-games .games-track { height: 100% !important; }
  body.pk-mobile-games .games-track { display: flex !important; overflow-x: auto !important; gap: 12px !important; scroll-snap-type: x mandatory; }
  body.pk-mobile-games .game-card { flex: 0 0 100% !important; min-width: 100% !important; width: 100% !important; height: 100% !important; scroll-snap-align: start; }
  body.pk-mobile-games .scene { top: 44px !important; bottom: 116px !important; }
  body.pk-mobile-games .card-copy { bottom: 14px !important; }
  body.pk-mobile-games .card-copy h2 { font-size: 25px !important; }
  body.pk-mobile-games .card-copy p { font-size: 13px !important; }
}
@media (max-width: 900px) and (orientation: landscape), (max-height: 520px) and (pointer: coarse) {
  body.page-music .shell { grid-template-columns: minmax(0, .7fr) minmax(0, 1fr) !important; align-items: start !important; }
  body.page-music .right-panel { grid-column: 1 / -1; }
  body.page-music .carousel-area { height: 230px !important; }
  body.pk-mobile-catalog h1 { font-size: 24px !important; }
  body.page-series .page { display: grid !important; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) !important; align-items: start !important; }
  body.page-series .screen { height: 200px !important; }
  body.pk-mobile-games .main-stage { height: 300px !important; }
  body.pk-mobile-games .game-card { flex-basis: calc(50% - 6px) !important; min-width: calc(50% - 6px) !important; width: calc(50% - 6px) !important; }
  body.pk-mobile-games .scene { bottom: 94px !important; }
  body.pk-mobile-games .card-copy h2 { font-size: 20px !important; }
}
@media (max-width: 900px), (max-height: 520px) and (pointer: coarse) {
  html.pk-ios-standalone body.pk-index.pk-mobile-nav .footer { top: auto !important; bottom: calc(max(12px, env(safe-area-inset-bottom)) + 60px) !important; }
}

@media (max-width: 900px) {
  body.pk-home .side { overflow: hidden; }
  body.page-series .screen-shell { width: 100% !important; margin-top: 12px !important; box-sizing: border-box; }
  body.page-series .marquee { position: relative !important; inset: auto !important; transform: none !important; width: 100% !important; }
}
/* Final phone composition: persistent portrait tabs, expandable landscape menu. */
.pk-nav-extra { display: none !important; }
@media (max-width: 900px), (max-height: 520px) and (pointer: coarse) {
  body.pk-home .nova-side .character-img { height: min(34dvh, 304px); }
  body.pk-mobile-nav .footer .tab-icon, body.pk-mobile-nav .footer .tab-label { display: block !important; visibility: visible !important; opacity: 1 !important; }
  body.pk-mobile-nav .footer { background: linear-gradient(130deg, #78619bbd, #325d93b8, #40c8cbb3) !important; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid #ffffffa0; box-shadow: 0 8px 28px #160b4b40; }
  body.page-music .right-panel, body.page-music .main-cta .ghost { display: none !important; }
  body.pk-mobile-games .stage-arrow,
  body.pk-mobile-games .stage-arrow:hover,
  body.pk-mobile-games .stage-arrow:active,
  body.pk-mobile-games .stage-arrow:focus { top: 50% !important; transform: translateY(-50%) !important; transition: background .15s !important; width: 40px !important; height: 54px !important; }
  body.page-series .cinema { display: flex !important; flex-direction: column !important; height: auto !important; justify-content: flex-start !important; align-items: stretch !important; gap: 10px !important; }
  body.page-series .marquee { flex: 0 0 auto !important; height: 46px !important; margin: 0 !important; display: flex !important; align-items: center !important; justify-content: center !important; box-sizing: border-box; }
  body.page-series .marquee-title { font-size: 17px !important; }
  body.page-series .screen-shell { margin: 0 !important; flex: 1 1 auto !important; min-height: 0 !important; }
  body.page-series .posters, body.page-series .ticket,
  body.page-series #copySynopsis, body.page-series .series-meta,
  body.page-series .copy .kicker { display: none !important; }
  body.page-series .copy-panel { margin: 0 !important; padding: 8px !important; }
  body.page-series .copy { margin: 0 !important; padding: 0 !important; transform: none !important; }
  body.page-series .screen-copy { padding: 12px !important; }
}
@media (max-width: 900px) and (orientation: portrait) {
  body.pk-mobile-nav .pk-nav-toggle { display: none !important; }
  html body.pk-mobile-nav .footer,
  html.pk-ios-standalone body.pk-index.pk-mobile-nav .footer {
    display: flex !important; justify-content: space-around !important;
    left: max(8px, env(safe-area-inset-left)) !important; right: max(8px, env(safe-area-inset-right)) !important;
    top: auto !important; bottom: max(8px, env(safe-area-inset-bottom)) !important;
    width: auto !important; height: 66px !important; min-height: 66px !important;
    padding: 4px !important; gap: 4px !important; border-radius: 28px !important;
    overflow: hidden !important;
  }
  body.pk-mobile-nav .footer .tab { flex: 1 !important; height: 56px !important; min-height: 56px !important; padding: 3px !important; max-width: 76px !important; }
  body.pk-index.pk-mobile-nav { --pk-footer-h: 66px; --pk-footer-bottom: max(8px, env(safe-area-inset-bottom)); }
  body.pk-mobile-catalog .page { padding-bottom: calc(82px + env(safe-area-inset-bottom)) !important; }
  body.page-music .shell { gap: 12px !important; }
  body.page-music .left-panel > p { display: none !important; }
  body.page-music .carousel-area { height: clamp(220px, calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 300px), 350px) !important; }
  body.pk-mobile-games .main-stage { height: clamp(300px, calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 205px), 480px) !important; }
  body.page-series .page { gap: 12px !important; }
  body.page-series .screen { height: clamp(220px, calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 330px), 340px) !important; }
  body.page-series .copy-tagline { margin: 6px 0 !important; }
}
@media (max-width: 900px) and (orientation: landscape), (max-height: 520px) and (pointer: coarse) {
  body.pk-mobile-nav .footer .pk-nav-extra { display: flex !important; }
  body.pk-mobile-catalog .page { height: 100dvh !important; min-height: 0 !important; padding-bottom: max(8px, env(safe-area-inset-bottom)) !important; }
  body.pk-mobile-games .page { display: grid !important; grid-template-rows: auto minmax(0, 1fr) !important; gap: 8px !important; }
  body.pk-mobile-games .hero-row { margin: 0 !important; }
  body.pk-mobile-games .hero-title-line { display: flex !important; align-items: center !important; gap: 10px !important; }
  body.pk-mobile-games .hero-copy h1 { font-size: 20px !important; margin: 0 !important; }
  body.pk-mobile-games .main-stage { height: 100% !important; margin: 0 !important; }
  body.pk-mobile-games .more-games { display: none !important; }
  body.pk-mobile-games .card-badges { top: 8px !important; left: 10px !important; right: 10px !important; }
  body.pk-mobile-games .badge { font-size: 10px !important; padding: 4px 6px !important; }
  body.pk-mobile-games .scene { top: 32px !important; bottom: 72px !important; }
  body.pk-mobile-games .card-copy { bottom: 8px !important; left: 16px !important; right: 16px !important; }
  body.pk-mobile-games .card-copy h2 { font-size: 17px !important; line-height: 1 !important; }
  body.pk-mobile-games .card-copy p { display: none !important; }
  body.pk-mobile-games .play-pill { margin-top: 5px !important; padding: 7px 12px !important; font-size: 13px !important; min-height: 32px !important; }
  body.page-music .shell { height: 100% !important; }
  body.page-music .center-panel, body.page-music .music-stage { height: 100% !important; min-height: 0 !important; box-sizing: border-box; }
  body.page-music .music-stage { display: flex !important; flex-direction: column !important; }
  body.page-music .carousel-area { height: auto !important; flex: 1 !important; }
  body.page-music .left-panel > p { font-size: 12px !important; }
  body.page-series .page { grid-template-rows: minmax(0, 1fr) !important; }
  body.page-series .cinema { height: 100% !important; }
  body.page-series .screen { height: 100% !important; }
  body.page-series .screen-shell { display: flex !important; flex-direction: column; }
  body.page-series .copy { align-self: center !important; }
}
@media (max-width: 900px) and (orientation: portrait) {
  body.pk-mobile-nav .footer .pk-nav-extra { display: none !important; }
}
/* Shared phone spacing and compact detail pages. */
@media (max-width:900px) and (orientation:portrait) {
  body.pk-mobile-nav .footer .tab { flex:0 0 52px!important; width:52px!important; max-width:52px!important; border-radius:20px!important; }
  html body.pk-mobile-nav .footer { padding:6px!important; justify-content:space-between!important; }
  body.pk-mobile-nav .footer .tab-label { font-size:9px!important; }
  body.pk-mobile-nav .footer .tab-icon { display:grid!important; place-items:center; }
  body.page-music .page { height:100dvh!important; min-height:0!important; display:flex!important; align-items:center!important; }
  body.page-music .shell { width:100%; }
  body.page-series .screen { height:clamp(200px,calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 385px),310px)!important; }
}
@media (max-width:900px), (max-height:520px) and (pointer:coarse) {
  body.page-series .screen-text p { display:block!important; font-size:11px!important; line-height:1.25!important; margin:4px 0 0!important; }
  body.page-series .screen-text { min-width:0; flex:1; }
  body.page-series #copyTagline { display:none!important; }
  body.page-series #copySynopsis { display:block!important; font-size:12px!important; line-height:1.35!important; margin:6px 0!important; }
  body.page-series .series-meta { display:flex!important; gap:5px!important; flex-wrap:wrap; margin:8px 0!important; }
  body.page-series .meta-chip { font-size:10px!important; height:26px!important; padding:0 8px!important; }
  body.page-series .watch-btn { font-size:12px!important; min-height:36px!important; padding:8px 14px!important; margin-top:6px!important; }
  body.page-series .copy-panel::before { content:'🍿 CINEMA'; display:inline-block; padding:5px 10px; background:#ffda61; color:#392700; border-radius:6px; font-size:11px; font-weight:900; transform:rotate(-3deg); }
  body.page-music-player .wrap { height:100dvh!important; min-height:0!important; padding:calc(env(safe-area-inset-top) + 62px) 14px calc(env(safe-area-inset-bottom) + 82px)!important; display:grid!important; grid-template-columns:1fr!important; grid-template-rows:auto minmax(0,1fr)!important; gap:12px!important; box-sizing:border-box; }
  body.page-music-player .player-side { min-height:0!important; width:100%!important; }
  body.page-music-player .title { font-size:24px!important; line-height:1.1!important; margin:0!important; }
  body.page-music-player .artist { font-size:14px!important; margin:4px 0!important; }
  body.page-music-player .waveBox { height:64px!important; margin:4px 0!important; width:100%!important; }
  body.page-music-player .centerPlay { width:60px!important; height:60px!important; font-size:24px!important; }
  body.page-music-player .times { font-size:11px!important; margin:2px 0!important; }
  body.page-music-player .controls { gap:12px!important; margin:6px 0!important; }
  body.page-music-player .controls .btn { width:44px!important; height:44px!important; min-height:44px!important; padding:4px!important; font-size:20px!important; }
  body.page-music-player .phone-playlist { width:100%!important; height:100%!important; min-height:0!important; padding:8px!important; border-radius:24px!important; }
  body.page-music-player .phone-playlist::before { display:none!important; }
  body.page-music-player .phone-screen { padding:10px!important; border-radius:18px!important; }
  body.page-music-player .playlist-kicker, body.page-music-player .phone-screen > p { display:none!important; }
  body.page-music-player .phone-screen h2 { font-size:20px!important; margin:0 0 8px!important; }
  body.page-music-player .track-list { gap:6px!important; }
  body.page-music-player .track-item { flex-shrink:0; min-height:52px!important; padding:6px 8px!important; grid-template-columns:36px 1fr auto!important; gap:8px!important; border-radius:16px!important; }
  body.page-music-player .track-play { width:36px!important; height:36px!important; font-size:18px!important; }
  body.page-music-player .track-title { font-size:13px!important; }
  body.page-music-player .track-sub,body.page-music-player .track-video-tag { font-size:10px!important; }
  body.page-series-player .page { padding:calc(env(safe-area-inset-top) + 66px) 14px calc(env(safe-area-inset-bottom) + 88px)!important; }
  body.page-series-player .hero { display:grid!important; grid-template-columns:1fr!important; gap:12px!important; min-height:0!important; }
  body.page-series-player .copy { padding:0!important; }
  body.page-series-player .kicker { font-size:10px!important; padding:5px 8px!important; height:auto!important; }
  body.page-series-player h1 { font-size:28px!important; margin:6px 0!important; }
  body.page-series-player .tagline,body.page-series-player .synopsis { font-size:12px!important; line-height:1.35!important; margin:6px 0!important; }
  body.page-series-player .series-meta { margin:8px 0!important; gap:5px!important; }
  body.page-series-player .meta-chip { font-size:10px!important; height:26px!important; padding:0 7px!important; }
  body.page-series-player .actions { gap:6px!important; margin-top:8px!important; flex-wrap:wrap; }
  body.page-series-player .cta { font-size:12px!important; padding:8px 12px!important; min-height:36px!important; height:auto!important; }
  body.page-series-player .showcase-shell { min-height:0!important; padding:8px!important; border-radius:22px!important; }
  body.page-series-player .showcase, body.page-series-player .showcase img { min-height:0!important; height:clamp(180px,calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 405px),280px)!important; }
  body.page-series-player .showcase-copy { left:12px!important; right:12px!important; bottom:12px!important; gap:8px!important; }
  body.page-series-player .showcase-title { font-size:20px!important; line-height:1.1!important; }
  body.page-series-player .showcase-desc { font-size:11px!important; }
  body.page-series-player .play-circle { width:44px!important; height:44px!important; flex-shrink:0; font-size:20px!important; }
  body.page-series-player .episodes-wrap { margin-top:24px!important; }
}
@media (max-width:900px) and (orientation:landscape), (max-height:520px) and (pointer:coarse) {
  body.page-music-player .wrap { grid-template-columns:1fr 1fr!important; grid-template-rows:minmax(0,1fr)!important; padding-bottom:calc(env(safe-area-inset-bottom) + 12px)!important; padding-left:max(14px,env(safe-area-inset-left))!important; padding-right:calc(max(14px,env(safe-area-inset-right)) + 58px)!important; }
  body.page-series-player .hero { grid-template-columns:1fr 1fr!important; align-items:center; }
  body.page-series-player .showcase,body.page-series-player .showcase img { height:240px!important; }
  body.page-series-player .page { padding-left:max(14px,env(safe-area-inset-left))!important; padding-right:max(14px,env(safe-area-inset-right))!important; }
  body.page-series .copy-panel { padding-right:20px!important; }
}
/* Align the visible artwork, compensating each PNG's transparent margins.
   Source alpha bounds: Lumi (443,40)-(1075,889), Rocky (566,75)-(1089,844). */
body.pk-home { --home-visible-height:min(60vh,650px); }
body.pk-home .side .character-img {
  top:54%!important; bottom:auto!important; left:50%!important; right:auto!important;
  width:auto!important; max-width:none!important; max-height:none!important;
}
body.pk-home .nova-side .character-img { height:calc(var(--home-visible-height) * 1.20612)!important; translate:-49.414% -45.361%!important; }
body.pk-home .kai-side .character-img { height:calc(var(--home-visible-height) * 1.33160)!important; translate:-53.874% -44.873%!important; }
@media (max-width:900px) and (orientation:portrait) {
  body.pk-home { --home-visible-height:min(28dvh,260px); }
}
#startAdventure { display:inline-flex!important; align-items:center!important; justify-content:center!important; gap:10px!important; line-height:1!important; text-align:center!important; }
#startAdventure::before { margin:0!important; line-height:1!important; flex-shrink:0; }
@media (max-width:900px) and (orientation:landscape), (max-height:520px) and (pointer:coarse) {
  body.page-music .shell { grid-template-columns:minmax(0,1.2fr) minmax(0,1fr)!important; }
  body.page-music .center-panel { grid-column:1!important; grid-row:1!important; }
  body.page-music .left-panel { grid-column:2!important; grid-row:1!important; align-self:center!important; padding:0 12px 40px!important; }
  body.page-music .left-panel h1 { font-size:30px!important; }
  body.page-music .left-panel > p { font-size:14px!important; }
  body.pk-index .page { grid-template-columns:minmax(0,.56fr) minmax(0,.44fr)!important; }
  body.pk-index .carousel-wrap { order:1!important; }
  body.pk-index .copy { order:2!important; padding-bottom:52px!important; box-sizing:border-box; }
}
@media (max-width:900px), (max-height:520px) and (pointer:coarse) {
  body.page-vivos .page { height:100dvh!important; min-height:0!important; padding:calc(env(safe-area-inset-top) + 64px) 14px calc(env(safe-area-inset-bottom) + 86px)!important; display:grid!important; grid-template-columns:1fr!important; grid-template-rows:auto minmax(0,1fr)!important; gap:12px!important; box-sizing:border-box; }
  body.page-vivos .copy { padding:0!important; margin:0!important; }
  body.page-vivos h1 { font-size:28px!important; margin:6px 0!important; line-height:1.1!important; }
  body.page-vivos .copy p { font-size:12px!important; line-height:1.3!important; margin:6px 0!important; }
  body.page-vivos .kicker { font-size:10px!important; padding:5px 8px!important; height:auto!important; }
  body.page-vivos .copy-cta { font-size:12px!important; padding:8px 12px!important; min-height:36px!important; height:auto!important; }
  body.page-vivos .carousel-wrap { min-height:0!important; padding-bottom:18px!important; }
  body.page-vivos .carousel { width:100%!important; height:100%!important; min-height:0!important; margin:0!important; }
  body.page-vivos .live-card.center { width:100%!important; height:100%!important; min-height:0!important; }
  body.page-vivos .live-card.left, body.page-vivos .live-card.right, body.page-vivos .live-card.hidden { display:none!important; }
  body.page-vivos .live-content { padding:12px!important; }
  body.page-vivos .live-title { font-size:25px!important; line-height:1.1!important; }
  body.page-vivos .live-sub { font-size:13px!important; margin:5px 0!important; }
  body.page-vivos .live-badge { font-size:11px!important; padding:6px 10px!important; }
  body.page-vivos .countdown { padding:8px!important; margin:8px 0 0!important; }
  body.page-vivos .clock { font-size:23px!important; }
  body.page-vivos .count-label { font-size:10px!important; }
  body.page-vivos .live-desc { font-size:11px!important; margin:5px 0!important; }
  body.page-vivos .arrow { width:40px!important; height:40px!important; font-size:30px!important; }
  body.page-vivos .dots { bottom:0!important; }
  body.pk-academia .academy-page { padding:calc(env(safe-area-inset-top) + 64px) 12px calc(env(safe-area-inset-bottom) + 84px)!important; display:grid!important; grid-template-columns:1fr!important; gap:10px!important; min-height:100dvh!important; height:auto!important; box-sizing:border-box; }
  body.pk-academia .teacher-zone { height:190px!important; min-height:0!important; overflow:hidden!important; }
  body.pk-academia .teacher-badge { display:none!important; }
  body.pk-academia .academy-character-stage { position:absolute!important; inset:0 0 52px!important; }
  body.pk-academia #characterHolder.academy-character-dual { position:relative!important; width:100%!important; height:100%!important; inset:auto!important; transform:none!important; }
  body.pk-academia #characterHolder.academy-character-dual [data-academy-layer] { height:100%!important; width:100%!important; max-width:100%!important; }
  body.pk-academia .academy-assistant-controls { bottom:6px!important; min-height:0!important; gap:4px!important; }
  body.pk-academia .teacher-message { padding:6px 10px!important; border-radius:16px!important; }
  body.pk-academia .teacher-message h2 { font-size:17px!important; margin:0!important; }
  body.pk-academia .teacher-message p { font-size:12px!important; margin:3px 0!important; }
  body.pk-academia .learning-shell:not(.lesson-mode) { min-height:0!important; padding:12px!important; border-radius:24px!important; }
  body.pk-academia .learning-topbar { margin-bottom:8px!important; min-height:0!important; font-size:11px!important; }
  body.pk-academia .board { min-height:0!important; padding:8px!important; }
  body.pk-academia .board-copy h1,body.pk-academia .board-copy h2 { font-size:23px!important; line-height:1.1!important; margin:6px 0!important; }
  body.pk-academia .board-copy p { font-size:12px!important; line-height:1.35!important; margin:6px 0!important; }
  body.pk-academia .board-kicker { font-size:9px!important; padding:5px 8px!important; }
  body.pk-academia .choice-grid { display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important; gap:10px!important; padding:8px 0!important; }
  body.pk-academia .choice-grid .subject-portal { width:128px!important; height:128px!important; min-height:0!important; max-width:100%!important; padding:0!important; justify-self:center; }
  body.pk-academia .subject-portal .choice-icon { width:42px!important; height:42px!important; top:20%!important; }
  body.pk-academia .subject-portal .choice-icon svg { width:100%!important; height:100%!important; }
  body.pk-academia .portal-copy { bottom:14px!important; }
  body.pk-academia .choice-label { font-size:14px!important; }
  body.pk-academia .choice-sub { display:none!important; }
  body.pk-academia .portal-symbol { font-size:12px!important; }
  body.pk-academia .choice-grid .academy-path-card { width:100%!important; min-height:0!important; padding:8px!important; }
  body.pk-academia .path-orbit { width:90px!important; }
  body.pk-academia .path-emoji { font-size:34px!important; }
  body.pk-academia .academy-path-card strong { font-size:15px!important; margin-top:8px!important; }
  body.pk-academia .academy-path-card small { font-size:11px!important; }
}
@media (max-width:900px) and (orientation:landscape), (max-height:520px) and (pointer:coarse) {
  body.page-vivos .page { grid-template-columns:1.2fr 1fr!important; grid-template-rows:minmax(0,1fr)!important; padding-bottom:calc(env(safe-area-inset-bottom) + 12px)!important; padding-left:max(14px,env(safe-area-inset-left))!important; padding-right:max(14px,env(safe-area-inset-right))!important; }
  body.page-vivos .carousel-wrap { order:0; }
  body.page-vivos .copy { order:1; align-self:center; padding-bottom:44px!important; }
  body.pk-academia .academy-intro { padding:12px max(12px,env(safe-area-inset-right)) 12px max(12px,env(safe-area-inset-left))!important; overflow:auto!important; }
  body.pk-academia .intro-card { width:min(760px,100%)!important; height:calc(100dvh - 24px)!important; min-height:0!important; padding:16px!important; display:grid!important; grid-template-columns:.8fr 1.2fr!important; grid-template-rows:1fr auto!important; gap:10px!important; }
  body.pk-academia .intro-character { position:relative!important; inset:auto!important; width:100%!important; height:100%!important; grid-row:1 / 3; transform:none!important; }
  body.pk-academia .intro-character img { width:100%!important; height:100%!important; max-height:100%!important; object-fit:contain!important; animation:none!important; }
  body.pk-academia .intro-board { position:relative!important; inset:auto!important; width:100%!important; padding:14px!important; margin:0!important; transform:none!important; align-self:center; }
  body.pk-academia .intro-board h1 { font-size:28px!important; margin:6px 0!important; }
  body.pk-academia .intro-board p { font-size:16px!important; }
  body.pk-academia .intro-board small { font-size:11px!important; }
  body.pk-academia .intro-kicker { font-size:10px!important; padding:5px 8px!important; }
  body.pk-academia .start-academy { position:relative!important; inset:auto!important; transform:none!important; margin:0!important; width:100%!important; min-height:44px!important; height:44px!important; padding:8px!important; font-size:17px!important; grid-column:2; }
  body.pk-academia .academy-page { grid-template-columns:.35fr .65fr!important; min-height:100dvh!important; padding-left:max(12px,env(safe-area-inset-left))!important; padding-right:calc(max(12px,env(safe-area-inset-right)) + 56px)!important; padding-bottom:12px!important; }
  body.pk-academia .teacher-zone { height:calc(100dvh - env(safe-area-inset-top) - 80px)!important; }
  body.pk-academia .choice-grid:has(.subject-portal) { grid-template-columns:repeat(4,minmax(0,1fr))!important; gap:6px!important; }
  body.pk-academia .choice-grid .subject-portal { width:88px!important; height:88px!important; }
  body.pk-academia .subject-portal .choice-icon { width:28px!important; height:28px!important; }
  body.pk-academia .portal-copy { bottom:10px!important; }
  body.pk-academia .choice-label { font-size:10px!important; }
  body.pk-academia .portal-symbol { font-size:9px!important; }
  body.pk-academia .board-copy h1,body.pk-academia .board-copy h2 { font-size:20px!important; }
}
@media (max-width:900px), (max-height:520px) and (pointer:coarse) {
  body.pk-academia { overflow-y:auto!important; overflow-x:hidden!important; }
  body.pk-academia .academy-intro { z-index:11000!important; }
  body.pk-academia .subject-portal .choice-icon { top:39%!important; }
  body.pk-academia .header .icon-btn[title="Volver"] { font-size:0!important; padding:0!important; display:grid!important; place-items:center!important; }
}
/* Academy: explicit tracks replace inherited desktop named areas. */
@media (max-width:900px) and (orientation:landscape), (max-height:520px) and (pointer:coarse) {
  body.pk-academia .intro-card {
    top:0!important; grid-template-areas:"character board" "character button"!important;
    grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr)!important;
    grid-template-rows:minmax(0,1fr) 44px!important; overflow:hidden!important;
  }
  body.pk-academia .intro-character { grid-area:character!important; min-width:0!important; min-height:0!important; align-self:stretch!important; }
  body.pk-academia .intro-character img { display:block!important; position:relative!important; inset:auto!important; transform:none!important; max-width:100%!important; }
  body.pk-academia .intro-board { grid-area:board!important; min-width:0!important; }
  body.pk-academia .start-academy { grid-area:button!important; }
  body.pk-academia .academy-page { align-items:start!important; }
  body.pk-academia .learning-shell:not(.lesson-mode) { padding:8px!important; }
  body.pk-academia .learning-shell:not(.lesson-mode):has(.academy-path-card) .board { padding:4px!important; margin:0!important; }
  body.pk-academia .learning-shell:not(.lesson-mode):has(.academy-path-card) .path-orbit { width:72px!important; }
  body.pk-academia .learning-shell:not(.lesson-mode):has(.academy-path-card) .choice-grid { padding:4px 0!important; }
  body.pk-academia .academy-path-card small { display:none!important; }
}
@media (max-width:900px) and (orientation:portrait) {
  body.pk-academia .academy-page { grid-template-rows:140px auto!important; gap:8px!important; align-content:start!important; }
  body.pk-academia .teacher-zone { height:140px!important; }
  body.pk-academia .academy-character-stage { inset:0 0 44px!important; }
  body.pk-academia .teacher-message h2 { font-size:14px!important; }
  body.pk-academia .teacher-message p { font-size:10px!important; }
  body.pk-academia .learning-shell:not(.lesson-mode) .board { padding:4px!important; margin:0!important; }
  body.pk-academia .learning-shell:not(.lesson-mode) .board-copy { padding:0!important; margin:0!important; }
  body.pk-academia .learning-shell:not(.lesson-mode) .board-copy h1 { font-size:19px!important; }
  body.pk-academia .learning-shell:not(.lesson-mode) .board-copy p { font-size:11px!important; margin:4px 0!important; }
  body.pk-academia .choice-grid .subject-portal { width:94px!important; height:94px!important; }
  body.pk-academia .subject-portal .choice-icon { width:30px!important; height:30px!important; }
  body.pk-academia .subject-portal .choice-label { font-size:11px!important; }
  body.pk-academia .subject-portal .portal-copy { bottom:10px!important; }
  body.pk-academia .choice-grid { gap:6px!important; padding:4px 0!important; }
}
@media (max-width:900px), (max-height:520px) and (pointer:coarse) {
  body.pk-academia .learning-shell.lesson-mode {
    inset:max(6px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))!important;
    height:auto!important; min-height:0!important; padding:0!important;
    grid-template-columns:minmax(110px,.28fr) minmax(0,.72fr)!important;
    grid-template-rows:44px minmax(0,1fr)!important;
    grid-template-areas:"teacher topbar" "teacher board"!important;
    z-index:10500!important; overflow:hidden!important;
  }
  body.pk-academia .learning-shell.lesson-mode .lesson-teacher-panel {
    grid-area:teacher!important; display:grid!important; grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:auto minmax(0,1fr) auto auto!important; min-height:0!important;
    height:100%!important; padding:8px!important; gap:6px!important; overflow:hidden!important;
  }
  body.pk-academia .learning-shell.lesson-mode .lesson-teacher-image-wrap { grid-area:auto!important; grid-row:2!important; height:100%!important; min-height:0!important; width:100%!important; overflow:hidden!important; }
  body.pk-academia .learning-shell.lesson-mode .lesson-teacher-image { display:block!important; height:100%!important; width:100%!important; max-height:100%!important; max-width:100%!important; animation:none!important; transform:none!important; object-fit:contain!important; }
  body.pk-academia .learning-shell.lesson-mode .lesson-teacher-badge { display:block!important; font-size:9px!important; padding:5px!important; }
  body.pk-academia .learning-shell.lesson-mode .lesson-speech-card { padding:6px!important; font-size:11px!important; }
  body.pk-academia .learning-shell.lesson-mode .lesson-voice-button { font-size:11px!important; padding:6px!important; min-height:36px!important; margin:0!important; }
  body.pk-academia .learning-shell.lesson-mode .learning-topbar { grid-area:topbar!important; min-height:0!important; padding:4px 8px!important; gap:6px!important; }
  body.pk-academia .learning-shell.lesson-mode .close-lesson-modal { width:32px!important; height:32px!important; }
  body.pk-academia .learning-shell.lesson-mode .board { grid-area:board!important; margin:8px!important; padding:10px!important; min-height:0!important; overflow:auto!important; align-content:start!important; }
  body.pk-academia .learning-shell.lesson-mode .board-visual { min-height:100px!important; }
  body.pk-academia .learning-shell.lesson-mode .progress-dots { max-width:100px!important; }
}
@media (max-width:900px) and (orientation:portrait) {
  body.pk-academia .learning-shell.lesson-mode { grid-template-columns:1fr!important; grid-template-rows:44px 140px minmax(0,1fr)!important; grid-template-areas:"topbar" "teacher" "board"!important; }
  body.pk-academia .learning-shell.lesson-mode .lesson-teacher-panel { grid-template-columns:100px minmax(0,1fr)!important; grid-template-rows:1fr auto!important; }
  body.pk-academia .learning-shell.lesson-mode .lesson-teacher-image-wrap { grid-column:1!important; grid-row:1 / 3!important; }
  body.pk-academia .learning-shell.lesson-mode .lesson-teacher-badge { display:none!important; }
  body.pk-academia .learning-shell.lesson-mode .lesson-speech-card,body.pk-academia .learning-shell.lesson-mode .lesson-voice-button { grid-column:2!important; }
}
/* Academy phone composition: fit the visible teacher, not the wide WebP canvas. */
@media (max-width:900px), (max-height:520px) and (pointer:coarse) {
  body.pk-academia .intro-character { overflow:hidden!important; padding:0!important; }
  body.pk-academia .intro-character img { width:100%!important; height:100%!important; max-width:none!important; max-height:none!important; object-fit:cover!important; object-position:center!important; animation:none!important; transform:none!important; }
  body.pk-academia .start-academy { display:flex!important; justify-content:center!important; align-items:center!important; gap:14px!important; line-height:1.15!important; }
  body.pk-academia .start-academy b { position:static!important; margin:0!important; flex:0 0 36px!important; width:36px!important; height:36px!important; display:grid!important; place-items:center!important; font-size:26px!important; line-height:1!important; transform:none!important; }
  body.pk-academia .academy-page { height:100dvh!important; min-height:0!important; }
  body.pk-academia .teacher-zone { display:grid!important; grid-template-rows:minmax(0,1fr) auto!important; padding:8px!important; box-sizing:border-box!important; }
  body.pk-academia .academy-character-stage { position:relative!important; inset:auto!important; min-height:0!important; overflow:hidden!important; }
  body.pk-academia #characterHolder.academy-character-dual [data-academy-layer] { min-width:0!important; width:100%!important; height:100%!important; object-fit:cover!important; object-position:center!important; }
  body.pk-academia .academy-assistant-controls { position:relative!important; inset:auto!important; width:100%!important; transform:none!important; }
  body.pk-academia .teacher-message strong { font-size:15px!important; line-height:1.15!important; }
  body.pk-academia .teacher-message span { font-size:11px!important; line-height:1.2!important; }
  body.pk-academia .learning-shell:not(.lesson-mode) { height:100%!important; min-height:0!important; display:flex!important; flex-direction:column!important; overflow:auto!important; box-sizing:border-box!important; }
  body.pk-academia .learning-shell:not(.lesson-mode) .board { flex:1!important; display:flex!important; flex-direction:column!important; justify-content:center!important; gap:6px!important; }
  body.pk-academia .learning-shell:not(.lesson-mode) .board-copy,
  body.pk-academia .learning-shell:not(.lesson-mode) .choice-grid { transform:none!important; }
  body.pk-academia .learning-shell:not(.lesson-mode):has(.academy-path-card) .academy-path-card { min-height:0!important; }
  body.pk-academia .subject-portal { animation:none!important; transform:none!important; }
  body.pk-academia .subject-portal .portal-symbol, body.pk-academia .path-orbit i { display:none!important; }
  body.pk-academia .path-emoji { animation:none!important; font-size:30px!important; }
  body.pk-academia .academy-path-card { gap:4px!important; }
  body.pk-academia .academy-path-card strong { font-size:13px!important; }
  body.pk-academia .academy-path-card small { display:none!important; }
  body.pk-academia .learning-shell.lesson-mode .lesson-teacher-image { object-fit:cover!important; object-position:center!important; }
  body.pk-academia .learning-shell.lesson-mode .board { grid-template-columns:minmax(0,1fr)!important; grid-template-rows:auto auto auto!important; gap:8px!important; align-content:center!important; }
  body.pk-academia .learning-shell.lesson-mode .board-copy { align-self:start!important; padding:0!important; }
  body.pk-academia .learning-shell.lesson-mode .board h1 { font-size:21px!important; margin:5px 0!important; }
  body.pk-academia .learning-shell.lesson-mode .board p { font-size:12px!important; line-height:1.3!important; margin:4px 0!important; }
  body.pk-academia .learning-shell.lesson-mode .board-visual { min-height:0!important; height:auto!important; padding:10px!important; }
  body.pk-academia .learning-shell.lesson-mode .board-visual > svg { height:auto!important; max-height:160px!important; width:100%!important; }
  body.pk-academia .academy-counting-token { width:28px!important; height:28px!important; font-size:24px!important; }
  body.pk-academia .academy-counting-row { gap:5px!important; }
  body.pk-academia .equation,body.pk-academia .helper-equation { font-size:22px!important; padding:6px 12px!important; }
  body.pk-academia .learning-shell.lesson-mode .answer-panel { padding:8px!important; }
  body.pk-academia .learning-shell.lesson-mode .answer-actions { grid-template-columns:minmax(0,1fr) auto!important; gap:6px!important; }
  body.pk-academia .learning-shell.lesson-mode .lesson-speech-card strong { font-size:15px!important; }
  body.pk-academia .learning-shell.lesson-mode .lesson-speech-card p { font-size:12px!important; margin:4px 0!important; }
}
@media (max-width:900px) and (orientation:portrait) {
  body.pk-academia .intro-card { height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 32px)!important; min-height:0!important; top:0!important; padding:16px!important; display:grid!important; grid-template-areas:"character" "board" "button"!important; grid-template-rows:minmax(0,1fr) auto 52px!important; grid-template-columns:minmax(0,1fr)!important; gap:12px!important; }
  body.pk-academia .intro-character { grid-area:character!important; position:relative!important; inset:auto!important; height:100%!important; width:100%!important; min-height:0!important; transform:none!important; }
  body.pk-academia .intro-board { grid-area:board!important; position:relative!important; inset:auto!important; margin:0!important; transform:none!important; padding:16px!important; width:100%!important; box-sizing:border-box!important; }
  body.pk-academia .start-academy { grid-area:button!important; position:relative!important; inset:auto!important; transform:none!important; width:100%!important; margin:0!important; font-size:14px!important; padding:6px!important; }
  body.pk-academia .academy-page { grid-template-rows:minmax(210px,.48fr) minmax(0,.52fr)!important; align-content:stretch!important; }
  body.pk-academia .teacher-zone { height:100%!important; }
  body.pk-academia .learning-shell:not(.lesson-mode) .board-copy h1 { font-size:17px!important; }
  body.pk-academia .learning-shell:not(.lesson-mode) .board-copy p,body.pk-academia .learning-shell:not(.lesson-mode) .board-kicker { display:none!important; }
  body.pk-academia .choice-grid .subject-portal { width:76px!important; height:76px!important; }
  body.pk-academia .subject-portal .choice-icon { width:24px!important; height:24px!important; }
  body.pk-academia .subject-portal .portal-copy { bottom:8px!important; }
  body.pk-academia .subject-portal .choice-label { font-size:10px!important; }
  body.pk-academia .path-orbit { width:64px!important; }
  body.pk-academia .learning-shell.lesson-mode { grid-template-rows:40px minmax(210px,.45fr) minmax(0,.55fr)!important; }
  body.pk-academia .learning-shell.lesson-mode .lesson-teacher-panel { grid-template-columns:minmax(0,.45fr) minmax(0,.55fr)!important; align-items:center!important; }
  body.pk-academia .learning-shell.lesson-mode .lesson-teacher-image-wrap { align-self:stretch!important; }
}
@media (max-width:900px) and (orientation:landscape), (max-height:520px) and (pointer:coarse) {
  body.pk-academia .intro-character img { object-fit:cover!important; }
  body.pk-academia .academy-page { grid-template-rows:minmax(0,1fr)!important; align-items:stretch!important; }
  body.pk-academia .teacher-zone { height:100%!important; }
  body.pk-academia .learning-shell:not(.lesson-mode) .board-copy p { font-size:11px!important; }
  body.pk-academia .learning-shell:not(.lesson-mode) .board-kicker { display:none!important; }
  body.pk-academia .learning-shell.lesson-mode { grid-template-columns:minmax(150px,.34fr) minmax(0,.66fr)!important; }
  body.pk-academia .learning-shell.lesson-mode .board { grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important; grid-template-rows:auto auto!important; align-content:center!important; }
}
/* Keep the teacher stage definite: Safari cannot resolve nested percentage
   heights reliably inside the previous intrinsic grid track. */
@media (max-width:900px), (max-height:520px) and (pointer:coarse) {
  body.pk-academia .intro-character img { scale:.85!important; transform-origin:center!important; }
  body.pk-academia .teacher-zone { display:block!important; }
  body.pk-academia .academy-character-stage { position:absolute!important; inset:8px 8px 64px!important; }
  body.pk-academia #characterHolder.academy-character-dual { position:absolute!important; inset:0!important; width:100%!important; height:100%!important; transform:none!important; }
  body.pk-academia .academy-assistant-controls { position:absolute!important; left:50%!important; right:auto!important; top:auto!important; bottom:8px!important; width:calc(100% - 16px)!important; transform:translateX(-50%)!important; }
  body.pk-academia .academy-volume { display:block!important; width:54px!important; min-width:0!important; }
}
