/* Koderia Uni v62.1.1 — responsive shell + phone polish
   Loaded last on purpose: fixes layout continuously instead of only at one breakpoint. */

html{overflow-x:clip;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{overflow-x:clip;min-width:0}
.uqApp,.uqLayout,.uqSidebar,.uqWorkspace,.uqDashboard,.uqDashboardView,.uqSubject,.uqPanel,.uqTabPanel,.uqStudy,.uqStudy>main,.uqPractice,.uqPractice main{min-width:0;max-width:100%}
img,svg,video,canvas{max-width:100%;height:auto}
button,a,input,textarea,select{max-width:100%}
.uqApp{min-height:100dvh}
.uqPractice,.uqStudy{min-height:100dvh}
.uqTopbar{padding-left:max(18px,env(safe-area-inset-left));padding-right:max(18px,env(safe-area-inset-right))}
.uqWorkspace{overflow:visible}
.uqSectionNav,.uqTabs,.uqCourseSubjects,.uqStudyMap,.uqSessionStats{-webkit-overflow-scrolling:touch}
.uqSectionNav button,.uqTabs button,.uqButton,.uqChoice,.uqSubjectNav,.uqHomeBriefCard{touch-action:manipulation}

/* Fluid desktop/tablet proportions. */
@media(max-width:1180px){
  .uqLayout{grid-template-columns:240px minmax(0,1fr)}
  .uqWorkspace{padding:28px clamp(18px,3vw,34px) 68px}
  .uqSectionNav button{padding-inline:11px}
  .uqHomeBrief{grid-template-columns:repeat(2,minmax(0,1fr))}
  .uqTopicGrid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .uqMetricRow{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Tablets and narrow desktop: stop squeezing a 220px sidebar beside content.
   Turn courses into a compact horizontal rail instead. */
@media(max-width:960px){
  .uqTopbar{height:64px}
  .uqLayout{display:block;min-height:0;width:100%}
  .uqSidebar{position:sticky;top:64px;z-index:18;display:block;width:100%;padding:8px 14px;border-right:0;border-bottom:1px solid rgba(255,255,255,.07);background:rgba(13,18,28,.9);backdrop-filter:blur(16px)}
  .uqSidebarHead,.uqSidebarActions,.uqCourseTitle{display:none!important}
  #uqCourseNav{display:flex;align-items:center;gap:7px;overflow-x:auto;scrollbar-width:none;padding:1px 0 3px}
  #uqCourseNav::-webkit-scrollbar{display:none}
  .uqCourseGroup{display:contents;margin:0}
  .uqCourseSubjects{display:flex;align-items:center;gap:7px;overflow:visible;padding:0}
  .uqSubjectNav{flex:0 0 auto;width:auto;max-width:230px;grid-template-columns:5px minmax(0,1fr) auto;gap:8px;padding:8px 10px;border:1px solid #273348;background:#121a27}
  .uqSubjectNav i{width:4px;height:25px}.uqSubjectNav b{max-width:150px}.uqSubjectNav small{display:none}.uqSubjectNav em{font-size:9px}
  .uqWorkspace{padding:20px clamp(14px,3vw,28px) 70px}
  .uqSectionNav{top:74px}
  .uqDashboardGrid,.uqStudyDashboardGrid,.uqTasksDashboardGrid,.uqHomeActionGrid,.uqProgressColumns{grid-template-columns:1fr!important}
  .uqTodayHero,.uqTodayHero.uqHomeHero{grid-template-columns:minmax(0,1fr) minmax(220px,.58fr)}
  .uqSubjectHero{align-items:center}
  .uqReadiness{width:min(210px,35vw)}
}

/* App-like mobile layout. The navigation becomes the stable bottom bar and
   every content surface uses the full phone width without horizontal jumps. */
@media(max-width:780px){
  :root{--uq-mobile-gutter:12px;--uq-bottom-nav:68px}
  body{padding-bottom:calc(var(--uq-bottom-nav) + env(safe-area-inset-bottom));background:radial-gradient(circle at 50% -10%,rgba(108,124,255,.11),transparent 32%),#0d111b}
  .uqTopbar{height:56px;padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right));gap:8px}
  .uqBrand{gap:8px}.uqBrand>span{width:34px;height:34px;border-radius:11px;font-size:18px}.uqBrand b{font-size:12px}.uqBrand small{font-size:8px}
  .uqTopActions{gap:6px;min-width:0}.uqWalletMini{padding:8px 9px;border-radius:11px;font-size:10px;white-space:nowrap}.uqWalletMini b{font-size:11px}
  .uqWorldLinkCompact{display:none!important}.uqProfile{padding:5px 7px;border-radius:11px}.uqProfile span{font-size:19px}.uqProfile b{display:none}

  .uqSidebar{top:56px;padding:7px var(--uq-mobile-gutter);background:rgba(13,18,28,.92)}
  .uqSubjectNav{max-width:190px;min-height:38px;padding:6px 9px;border-radius:11px}.uqSubjectNav i{height:22px}.uqSubjectNav b{max-width:130px;font-size:11px}.uqSubjectNav em{display:none}

  .uqWorkspace{padding:12px var(--uq-mobile-gutter) 8px}
  .uqSectionNav{position:fixed;left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));bottom:max(8px,env(safe-area-inset-bottom));top:auto;z-index:90;height:60px;margin:0;padding:5px;gap:2px;border:1px solid rgba(125,143,177,.25);border-radius:19px;background:rgba(11,17,26,.94);backdrop-filter:blur(22px) saturate(1.15);box-shadow:0 12px 44px rgba(0,0,0,.52)}
  .uqSectionNav button{flex:1 1 0;min-width:0;min-height:48px;padding:4px 2px;display:grid;grid-template-columns:1fr;justify-items:center;align-content:center;gap:2px;border-radius:14px;font-size:9px}
  .uqSectionNav button>span{font-size:20px;line-height:1}.uqSectionNav button>b{max-width:100%;overflow:hidden;text-overflow:ellipsis}.uqSectionNav button>em{position:absolute;top:1px;right:6px;min-width:17px;height:17px;font-size:8px}.uqSectionNav .uqProgressNav{display:none}

  .uqViewHeader{margin:2px 2px 12px;align-items:flex-start}.uqViewHeader small{font-size:9px}.uqViewHeader h1{margin-top:3px;font-size:clamp(25px,8vw,31px);line-height:1.05}.uqViewHeader p{margin-top:5px;font-size:12px;line-height:1.4}
  .uqPanel{padding:15px;border-radius:18px}.uqPanelHead h2{font-size:18px;margin-bottom:13px}.uqPanelHead small{font-size:8.5px}
  .uqDashboardGrid,.uqSubjectGrid,.uqTopicGrid,.uqHomeBrief,.uqProgressSummary,.uqCollectionStats{grid-template-columns:1fr!important}
  .uqHomeBriefCard{grid-template-columns:44px minmax(0,1fr) 16px;padding:11px;border-radius:15px}.uqHomeBriefCard>span{width:44px;height:44px;border-radius:13px;font-size:22px}.uqHomeBriefCard b{font-size:13px}.uqHomeBriefCard p{font-size:11px}
  .uqTodayHero,.uqTodayHero.uqHomeHero{grid-template-columns:1fr!important;min-height:0!important;padding:17px!important;border-radius:20px!important}.uqTodayHero:after{font-size:72px!important}.uqTodayHeroSide{grid-template-columns:1fr 1fr}.uqTodayHero h1{font-size:clamp(29px,9vw,38px)!important;line-height:1.02}.uqTodayHero p{font-size:12px!important;line-height:1.45}

  .uqSubjectHero{display:grid;gap:16px;padding:18px;border-radius:20px}.uqSubjectTitle h1{font-size:clamp(29px,9vw,38px)}.uqSubjectTitle p{font-size:12px;line-height:1.45}.uqReadiness{width:100%}
  .uqMetricRow{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:10px 0 16px}.uqMetric{padding:11px 12px}.uqMetric b{font-size:18px}.uqMetric span{font-size:9px}
  .uqTabs{margin-inline:-2px;gap:2px;scrollbar-width:none}.uqTabs::-webkit-scrollbar{display:none}.uqTabs button{min-height:44px;padding:10px 12px;font-size:11px}
  .uqListCard{padding:14px;border-radius:14px}.uqListCardHead{display:grid;gap:10px}.uqCardActions{width:100%}.uqCardActions .uqButton{flex:1 1 auto;min-height:40px}
  .uqMaterialText{max-height:none;font-size:12px}

  /* Study shell */
  .uqStudy{overflow-x:hidden}.uqStudyHeader{min-height:58px;height:auto;width:100%!important;padding:max(8px,env(safe-area-inset-top)) 10px 8px;grid-template-columns:auto minmax(0,1fr) auto;gap:5px;background:rgba(11,17,26,.94);backdrop-filter:blur(16px)}
  .uqStudyHeader>button{min-height:38px;padding-inline:8px}.uqStudyHeader>div{min-width:0;padding:0 4px!important}.uqStudyHeader b{display:block;max-width:none!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px}.uqStudyHeader small{display:none}.uqStudyHeader>span{font-size:9px!important;white-space:nowrap}
  .uqStudy>main{width:100%!important;margin:10px auto calc(28px + env(safe-area-inset-bottom));padding:0 var(--uq-mobile-gutter)}
  .uqSessionHud,.uqSessionHudClean{width:100%;grid-template-columns:1fr!important;padding:11px!important;gap:9px;border-radius:18px}.uqSessionEmoji{width:42px!important;height:42px!important;flex-basis:42px!important}.uqSessionIdentity b{font-size:15px!important}.uqSessionIdentity p{display:none!important}.uqSessionStats{display:flex!important;gap:5px!important;overflow-x:auto!important;scrollbar-width:none}.uqSessionStats::-webkit-scrollbar{display:none}.uqSessionStats span{flex:0 0 auto!important;min-height:34px;padding:6px 8px!important;font-size:10px!important}.uqSessionStats b{font-size:11px!important}.uqSessionActions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:7px!important}.uqSessionActions .uqSessionMain{grid-column:1/-1!important;min-height:46px!important}.uqSessionActions .uqButton,.uqSessionActions .uqStudyViewToggle,.uqBossButton{min-height:42px!important;padding:0 10px!important;font-size:11px!important}
  .uqSessionRoute{grid-template-columns:auto 1fr auto 1fr auto;gap:5px;padding:1px 3px}.uqSessionRoute span{gap:3px;font-size:12px}.uqSessionRoute span b{display:none}.uqSessionRoute i{min-width:12px}
  .uqStudyMap{margin:9px 0 12px;padding:7px;border-radius:14px}.uqStudyMap button{grid-template-columns:28px minmax(54px,86px);padding:4px}.uqStudyMap button span{font-size:8.5px}.uqStudyMap>em{flex-basis:12px}
  .uqStudyChapterCard{grid-template-columns:1fr;gap:10px;padding:18px 15px;border-radius:20px}.uqStudyChapterFocus{min-height:0}.uqChapterNumber{width:38px;height:38px;border-radius:12px}.uqChapterMain>h1{font-size:clamp(28px,9vw,36px);line-height:1.04}.uqChapterMeta{font-size:8px}.uqKeywordRow{margin:9px 0 14px}.uqKeywordRow span{font-size:8.5px;padding:5px 8px}.uqStudyBody{font-size:15px!important;line-height:1.64!important}.uqStudyBody p{overflow-wrap:anywhere}.uqStudyCode{overflow-x:auto}.uqStudyCode code{font-size:12px!important}
  .uqStudyDeckNav{gap:7px}.uqStudyDeckNav .uqButton{flex:1;min-height:44px;padding-inline:8px}.uqStudyFinishNote{display:grid;gap:6px}.uqStudyFinishNote b{text-align:left}

  /* Game surfaces: fit a 320–430px phone without microscopic text. */
  .uqGameShell,.uqMicroCard{width:100%;margin:9px 0!important;padding:16px 13px!important;border-radius:21px!important;overflow:hidden}
  .uqGameGlow{width:180px;height:180px}.uqGameTop{display:grid;gap:8px;margin-bottom:14px}.uqGameMeta{position:static!important;justify-content:flex-start!important;gap:5px}.uqGameMeta>span{padding:5px 7px;font-size:9px}.uqGameDifficulty,.uqAdaptiveChip{display:none!important}
  .uqMicroHeader,.uqGameShell .uqMicroHeader{grid-template-columns:42px minmax(0,1fr)!important;gap:10px;margin-bottom:14px}.uqMicroHeader>span,.uqGameShell .uqMicroHeader>span{width:42px!important;height:42px!important;border-radius:13px!important;font-size:21px!important}.uqMicroHeader h1,.uqGameShell .uqMicroHeader h1{padding-right:0!important;font-size:clamp(23px,7.5vw,29px)!important;line-height:1.06}.uqMicroHeader p,.uqGameShell .uqMicroHeader p{font-size:12px!important;line-height:1.4}
  .uqGamePrompt,.uqMicroPrompt{grid-template-columns:38px minmax(0,1fr)!important;gap:9px;padding:12px!important;border-radius:16px}.uqGamePrompt>span,.uqMicroPrompt>span{width:38px!important;height:38px!important}.uqGamePrompt>b,.uqMicroPrompt>div b{font-size:14px!important;line-height:1.4}.uqMicroPrompt .uqButton{grid-column:1/-1;width:100%}
  .uqMicroChoices,.uqFlowChoices{grid-template-columns:1fr!important;gap:8px}.uqMicroChoices button,.uqChoice,.uqArcadeChoices button{min-height:54px!important;padding:11px 12px!important;border-radius:14px!important}.uqArcadeChoices button{grid-template-columns:30px minmax(0,1fr);gap:9px}.uqArcadeChoices button i{width:30px;height:30px}.uqArcadeChoices button b{font-size:14px!important}
  .uqMatchBoard{grid-template-columns:1fr!important;gap:8px}.uqMatchBoard button{min-height:50px;padding:10px 12px}.uqMatchTerms b{font-size:13px}.uqMatchDefs button{font-size:12px}
  .uqDragArena{grid-template-columns:1fr!important;gap:10px}.uqDragCard{min-height:112px!important;padding:16px!important;border-radius:18px}.uqDragCard b{font-size:clamp(20px,7vw,28px)}.uqDropZone{min-height:58px!important;padding:9px 10px;border-radius:14px}.uqDropZone b{font-size:12px}
  .uqSwipeStage{grid-template-columns:1fr!important;min-height:0;margin:0}.uqSwipeHint{display:none!important}.uqSwipeCard{min-height:190px!important;padding:20px 16px!important;border-radius:20px}.uqSwipeCard b{font-size:clamp(21px,7vw,29px)}.uqSwipeCard p{font-size:13px!important;line-height:1.45}.uqSwipeButtons button{min-height:48px}
  .uqDuelArena{position:relative;grid-template-columns:1fr 1fr!important;gap:8px}.uqDuelArena>button{min-height:154px!important;padding:12px 9px!important;border-radius:18px}.uqDuelArena>button span{font-size:30px}.uqDuelArena>button b{font-size:clamp(15px,5vw,19px)}.uqDuelArena>button small,.uqDuelArena>button em{display:none}.uqDuelVs{position:absolute;z-index:4;left:50%;top:50%;width:30px;height:30px;transform:translate(-50%,-50%);border-radius:50%;background:#221a18;border:1px solid #6c5239;font-size:10px}
  .uqAssembleChips{gap:6px}.uqAssembleChips button{padding:9px 10px;border-radius:11px;font-size:11px}.uqAssembleRail span{min-height:40px;font-size:11px}.uqOrderTrack{gap:3px;overflow-x:auto;justify-content:flex-start;padding:3px 1px}.uqOrderTrack i{flex:0 0 30px;width:30px;height:30px}.uqOrderTrack em{flex:0 0 15px;width:15px}.uqOrderChoices button{grid-template-columns:32px minmax(0,1fr)}
  .uqFillPrompt{padding:13px;border-radius:0 13px 13px 0;font-size:14px}.uqMicroFillForm{grid-template-columns:1fr}.uqMicroFillForm input{font-size:16px}.uqCodeChallenge{padding:12px!important;border-radius:15px}.uqCodeChallenge code{font-size:12px!important;line-height:1.55}.uqMemoryFlip{min-height:210px!important}.uqMemoryFlip>span{padding:20px 15px;border-radius:19px}.uqMemoryFlip b{font-size:clamp(19px,6vw,24px)}.uqMicroSelf{grid-template-columns:1fr 1fr;gap:7px}.uqMicroSelf button{min-height:46px;font-size:12px}
  .uqMicroFeedback{margin-top:10px;padding:8px 9px!important;font-size:11.5px!important;line-height:1.4}

  /* Boss is dramatic but still readable on one screen. */
  .uqFlowQuestionCard.uqBossQuestion{width:100%;margin:9px 0;padding:14px 11px!important;border-radius:21px!important}.uqBossArena{grid-template-columns:44px minmax(0,1fr) auto!important;gap:9px;padding:10px;border-radius:16px;margin-bottom:15px}.uqBossAvatar{width:42px!important;height:42px!important;border-radius:13px!important;font-size:25px!important}.uqBossStatus{gap:5px}.uqBossStatus>div:first-child{display:flex!important;gap:6px}.uqBossStatus b{font-size:9px}.uqBossStatus span{font-size:11px}.uqBossStatus>small{display:none}.uqBossHp{height:10px}.uqBossLives{grid-column:auto!important;font-size:15px;gap:1px;justify-content:flex-end!important}.uqBossQuestion>h1{font-size:clamp(23px,7.5vw,29px)!important;margin:7px auto 15px}.uqBossQuestion .uqChoice{font-size:14px!important}.uqBossQuestion .uqFeedback{padding:12px!important;margin-top:11px}.uqBossQuestion .uqFeedback>b{font-size:15px}.uqBossQuestion .uqFeedback p{font-size:12px;line-height:1.4}.uqBossImpact{top:82px!important}

  /* Practice / dialogs */
  .uqPractice>header{height:58px;width:100%;padding:0 10px;grid-template-columns:auto minmax(0,1fr) auto}.uqPractice>header button{font-size:11px}.uqPractice>header div{min-width:0;padding:0 6px}.uqPractice>header small{display:none}.uqPractice>header b{font-size:11px}.uqPractice>header>span{font-size:16px}.uqPractice main{width:100%;margin:18px auto;padding:0 var(--uq-mobile-gutter)}.uqQuestionCard{padding:18px 14px;border-radius:20px}.uqQuestionCard h1{margin:10px 0 16px;font-size:clamp(23px,7vw,30px)}
  .uqDialog{width:calc(100% - 16px);max-height:calc(100dvh - 16px);border-radius:19px}.uqDialog form{padding:17px;gap:12px}.uqDialog textarea{max-height:38dvh}.uqDialog .uqSourceText,.uqDialog .uqCodeText{min-height:160px}.uqFormRow{grid-template-columns:1fr}
  .uqToast{left:10px;right:10px;bottom:calc(78px + env(safe-area-inset-bottom));transform:translateY(20px);width:auto;text-align:center}.uqToast.show{transform:none}
}

@media(max-width:480px){
  :root{--uq-mobile-gutter:10px}
  .uqBrand>div{display:none}.uqWalletMini{max-width:145px;overflow:hidden;text-overflow:ellipsis}.uqProfile{border-color:transparent;background:transparent}
  .uqSectionNav{left:max(6px,env(safe-area-inset-left));right:max(6px,env(safe-area-inset-right));bottom:max(6px,env(safe-area-inset-bottom));height:58px}.uqSectionNav button{min-height:46px}.uqSectionNav button>b{font-size:8.5px}.uqSectionNav button>span{font-size:19px}
  .uqSidebar{padding-inline:10px}.uqSubjectNav{max-width:170px}.uqSubjectNav b{max-width:115px}
  .uqViewHeader p{display:none}.uqPanel{padding:13px}.uqHomeBriefPanel{padding:12px!important}.uqTodayHeroSide{grid-template-columns:1fr}.uqTodayClock{grid-column:auto}
  .uqMetricRow{grid-template-columns:1fr 1fr}.uqMetric{padding:10px}.uqTabs button{padding-inline:10px}
  .uqSessionStats span{padding-inline:7px!important}.uqSessionActions .uqButton,.uqSessionActions .uqStudyViewToggle,.uqBossButton{font-size:10.5px!important}
  .uqSessionRoute{gap:3px}.uqSessionRoute span{font-size:11px}.uqSessionRoute i{min-width:8px}
  .uqStudyMap button{grid-template-columns:26px minmax(46px,70px)}.uqStudyMap button span{font-size:8px}
  .uqDuelPrompt{padding:11px 12px;font-size:13px}.uqDuelArena>button{min-height:140px}.uqMicroSelf{grid-template-columns:1fr}
  .uqBossArena{grid-template-columns:40px minmax(0,1fr)!important}.uqBossAvatar{width:38px!important;height:38px!important;font-size:23px!important}.uqBossLives{grid-column:1/-1!important;justify-content:center!important;margin-top:-2px}.uqBossStatus>div:first-child{display:grid!important}.uqBossQuestion>.uqQuestionEmoji{width:42px;height:42px;font-size:21px}
}

@media(max-width:360px){
  .uqWalletMini{display:none}.uqTopActions{margin-left:auto}.uqSubjectNav{max-width:155px}.uqSubjectNav b{max-width:104px}
  .uqSectionNav button>b{font-size:8px}.uqSectionNav button>span{font-size:18px}
  .uqMetricRow{grid-template-columns:1fr 1fr}.uqSessionActions{grid-template-columns:1fr!important}.uqSessionActions .uqSessionMain{grid-column:auto!important}.uqDuelArena{grid-template-columns:1fr!important}.uqDuelVs{position:static;width:auto;height:22px;transform:none;margin:-3px auto}.uqDuelArena>button{min-height:118px!important}
}

/* Short landscape phones: preserve vertical space and keep actions reachable. */
@media(max-height:560px) and (orientation:landscape){
  body{padding-bottom:0}.uqSidebar{position:static}.uqSectionNav{height:50px;left:8px;right:auto;width:auto;bottom:8px;padding:4px}.uqSectionNav button{width:48px;min-height:40px}.uqSectionNav button>b{display:none}.uqSectionNav button>span{font-size:18px}.uqWorkspace{padding-bottom:55px}
  .uqStudyHeader{min-height:48px;padding-block:4px}.uqStudy>main{margin-top:6px}.uqSessionHud,.uqSessionHudClean{padding:8px!important}.uqSessionIdentity p,.uqSessionRoute{display:none!important}.uqGameShell,.uqMicroCard{margin:6px auto!important;padding:12px!important}.uqGameTop{margin-bottom:8px}.uqMicroHeader,.uqGameShell .uqMicroHeader{margin-bottom:8px}.uqBossArena{margin-bottom:8px}.uqSwipeCard{min-height:150px!important}.uqDuelArena>button{min-height:120px!important}
}

@media(hover:none),(pointer:coarse){
  .uqButton,.uqChoice,.uqSubjectNav,.uqTabs button,.uqSectionNav button,.uqHomeBriefCard,.uqMatchBoard button,.uqDropZone,.uqAssembleChips button{min-height:44px}
  .uqButton:hover,.uqSubjectCard:hover,.uqHomeBriefCard:hover,.uqMatchBoard button:hover,.uqDuelArena>button:hover,.uqAssembleChips button:hover{transform:none}
}

@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}}

/* ===== Koderia Uni v62.1.1 — resize polish =====
   Fixes the 760–900 CSS-px zone seen on Retina MacBooks and keeps the home
   hierarchy intact while the window is resized. */

@media(max-width:980px){
  /* Do not stack two sticky rails on top of the dashboard. */
  .uqSidebar{position:static!important;top:auto!important;z-index:auto!important}
  .uqSectionNav{top:64px!important}
  .uqWorkspace{padding-top:14px!important}

  /* The home hero must collapse before the CTA starts colliding with copy. */
  .uqTodayHero,.uqTodayHero.uqHomeHero{grid-template-columns:1fr!important;gap:12px!important;min-height:0!important;padding:20px!important}
  .uqTodayHero h1{font-size:clamp(31px,4.6vw,40px)!important;line-height:1.02!important;margin:7px 0 10px!important}
  .uqHomeHeroCompact .uqTodayHeroSide{display:grid!important;grid-template-columns:1fr!important}
  .uqHomeHeroCompact .uqTodayHeroSide>.uqButton,.uqHomeHeroCompact .uqHomeSideNote{display:none!important}
  .uqTodayClock{min-height:60px!important;padding:11px 13px!important}

  .uqSmartFocus{grid-template-columns:54px minmax(0,1fr)!important;gap:12px!important;padding:15px!important;margin:12px 0 10px!important}
  .uqSmartFocus>.uqButton{grid-column:1/-1!important;width:100%!important;min-width:0!important;min-height:46px!important}
  .uqSmartFocus h2{font-size:clamp(20px,3.2vw,24px)!important;line-height:1.08!important;overflow-wrap:anywhere}
  .uqSmartFocus p{font-size:12.5px!important;line-height:1.35!important}
  .uqHomeStats{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important;margin-top:10px!important}
  .uqHomeStats span{min-width:0!important;justify-content:center!important;padding:8px 7px!important}
  .uqHomeStats b{font-size:17px!important}.uqHomeStats small{font-size:10.5px!important;white-space:nowrap}
}

/* At this width a six-button top rail wastes space and causes layout jumps.
   Switch to the same stable app navigation used by phones slightly earlier. */
@media(max-width:860px){
  :root{--uq-mobile-gutter:12px;--uq-bottom-nav:68px}
  body{padding-bottom:calc(var(--uq-bottom-nav) + env(safe-area-inset-bottom))!important}
  .uqTopbar{height:58px!important;padding-left:max(12px,env(safe-area-inset-left))!important;padding-right:max(12px,env(safe-area-inset-right))!important}
  .uqSidebar{position:static!important;padding:7px var(--uq-mobile-gutter)!important}
  .uqWorkspace{padding:12px var(--uq-mobile-gutter) 10px!important}

  .uqSectionNav{position:fixed!important;left:max(8px,env(safe-area-inset-left))!important;right:max(8px,env(safe-area-inset-right))!important;bottom:max(8px,env(safe-area-inset-bottom))!important;top:auto!important;z-index:90!important;height:60px!important;margin:0!important;padding:5px!important;display:flex!important;gap:2px!important;overflow:visible!important;border-radius:19px!important;background:rgba(11,17,26,.95)!important;backdrop-filter:blur(22px) saturate(1.15)!important;-webkit-backdrop-filter:blur(22px) saturate(1.15)!important;box-shadow:0 12px 44px rgba(0,0,0,.52)!important}
  .uqSectionNav button{flex:1 1 0!important;min-width:0!important;min-height:48px!important;padding:4px 2px!important;display:grid!important;grid-template-columns:1fr!important;justify-items:center!important;align-content:center!important;gap:2px!important;border-radius:14px!important;font-size:9px!important}
  .uqSectionNav button>span{font-size:20px!important;line-height:1!important}.uqSectionNav button>b{max-width:100%!important;font-size:9px!important;overflow:hidden!important;text-overflow:ellipsis!important}.uqSectionNav button>em{position:absolute!important;top:1px!important;right:6px!important;min-width:17px!important;height:17px!important;font-size:8px!important}.uqSectionNav .uqProgressNav{display:none!important}

  .uqHomeHeroCompact{padding:16px!important;border-radius:20px!important}
  .uqHomeHeroCompact .uqTodayHeroSide{display:none!important}
  .uqTodayHero h1{font-size:clamp(29px,7vw,35px)!important}
  .uqTodayKicker{font-size:8.5px!important}
  .uqSmartFocus{grid-template-columns:50px minmax(0,1fr)!important;padding:13px!important;border-radius:18px!important}
  .uqSmartEmoji{width:50px!important;height:50px!important;font-size:27px!important}
  .uqSmartFocus small{font-size:10px!important;margin-bottom:3px!important}.uqSmartFocus h2{font-size:20px!important}.uqSmartFocus p{font-size:11.5px!important;margin-top:4px!important}
  .uqSmartFocus>.uqButton{min-height:44px!important;font-size:12.5px!important}

  .uqViewHeader{margin:0 2px 12px!important}.uqViewHeader h1{font-size:clamp(26px,6vw,31px)!important;line-height:1.05!important}.uqViewHeader p{font-size:11.5px!important;line-height:1.4!important}
  .uqPanel{padding:14px!important;border-radius:18px!important}
}

@media(max-width:620px){
  .uqWalletMini{padding:7px 8px!important;gap:5px!important}.uqWalletMini span:last-child{display:none!important}
  .uqHomeStats small{font-size:9.5px!important}.uqHomeStats span{padding-inline:5px!important}
  .uqSmartFocus h2{font-size:18.5px!important}.uqSmartFocus p{font-size:11px!important}
  .uqTodayHero:after{font-size:62px!important;right:8px!important;top:8px!important}
}

@media(max-width:430px){
  :root{--uq-mobile-gutter:10px}
  .uqTopbar{height:54px!important}
  .uqBrand>span{width:32px!important;height:32px!important;border-radius:10px!important;font-size:17px!important}
  .uqWalletMini{font-size:9.5px!important;max-width:145px!important}.uqWalletMini b{font-size:10.5px!important}
  .uqProfile{padding:4px 5px!important}.uqProfile span{font-size:18px!important}
  .uqSidebar{padding:6px 10px!important}.uqSubjectNav{max-width:164px!important}
  .uqWorkspace{padding:10px 10px 8px!important}
  .uqHomeHeroCompact{padding:13px!important}.uqTodayHero h1{font-size:29px!important;margin-bottom:8px!important}
  .uqSmartFocus{grid-template-columns:44px minmax(0,1fr)!important;gap:9px!important;padding:11px!important}.uqSmartEmoji{width:44px!important;height:44px!important;font-size:24px!important}.uqSmartFocus small{font-size:9px!important}.uqSmartFocus h2{font-size:17px!important}.uqSmartFocus p{font-size:10.5px!important}.uqSmartFocus>.uqButton{font-size:12px!important}
  .uqHomeStats{gap:5px!important}.uqHomeStats span{display:grid!important;justify-items:center!important;gap:1px!important;padding:7px 3px!important}.uqHomeStats b{font-size:16px!important}.uqHomeStats small{font-size:8.5px!important}
  .uqSectionNav{left:max(6px,env(safe-area-inset-left))!important;right:max(6px,env(safe-area-inset-right))!important;bottom:max(6px,env(safe-area-inset-bottom))!important;height:58px!important}.uqSectionNav button{min-height:46px!important}.uqSectionNav button>b{font-size:8.5px!important}.uqSectionNav button>span{font-size:19px!important}
}

@media(max-width:350px){
  .uqBrand>div{display:none!important}.uqWalletMini{max-width:132px!important}.uqHomeStats small{font-size:8px!important}.uqSectionNav button>b{font-size:8px!important}
}


/* ===== Koderia Uni v62.1.2 — lazy collection modal fail-safe ===== */
/* Collection CSS is lazy-loaded. These three nodes live in index.html, so
   keep them invisible even before the collection stylesheet has downloaded. */
#packModal[aria-hidden="true"],#cardDetailModal[aria-hidden="true"],#rarityMoment[aria-hidden="true"],
#packModal[hidden],#cardDetailModal[hidden],#rarityMoment[hidden]{display:none!important}


/* ===== Koderia Uni: Party entry v63.0.1 ===== */
.uqPartyLink{display:inline-flex;align-items:center;gap:6px;padding:8px 11px;border:1px solid rgba(111,168,255,.34);border-radius:12px;background:linear-gradient(120deg,rgba(84,116,255,.22),rgba(132,82,220,.16));color:#eef2ff;text-decoration:none;font-size:11px;font-weight:900;white-space:nowrap;box-shadow:0 7px 20px rgba(75,92,220,.12)}
.uqPartyLink:hover{border-color:rgba(133,158,255,.62);transform:translateY(-1px)}
.uqPartyNavLink{display:flex;align-items:center;justify-content:center;gap:6px;min-height:42px;padding:8px 10px;border:1px solid rgba(119,138,255,.22);border-radius:12px;background:rgba(109,94,255,.09);color:#dfe5ff;text-decoration:none;font-size:10px;font-weight:900;text-align:center}
.uqPartyNavLink span{font-size:18px;line-height:1}.uqPartyNavLink b{font-size:10px;line-height:1}
.uqPartyNavLink:hover{background:rgba(109,94,255,.16);border-color:rgba(119,138,255,.42)}
@media(max-width:720px){
  .uqPartyLink{display:none!important}
  .uqSectionNav .uqPartyNavLink{position:relative!important;flex:1 1 0!important;min-width:0!important;width:auto!important;min-height:50px!important;padding:4px 2px!important;border:0!important;border-radius:14px!important;background:linear-gradient(145deg,rgba(112,92,255,.20),rgba(79,139,255,.10))!important;color:#eef1ff!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:2px!important}
  .uqSectionNav .uqPartyNavLink span{font-size:20px!important;line-height:1!important}
  .uqSectionNav .uqPartyNavLink b{font-size:9px!important;line-height:1!important;max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
}
@media(min-width:721px){
  .uqSectionNav .uqPartyNavLink{display:none!important}
}

/* ===== Koderia Uni v64.2.0 — refined Party entry ===== */
.uqPartyLink{position:relative;display:inline-grid!important;grid-template-columns:auto auto auto;align-items:center;gap:9px;min-height:44px;padding:6px 10px 6px 7px!important;border:1px solid rgba(128,153,202,.26)!important;border-radius:15px!important;background:linear-gradient(145deg,rgba(25,35,53,.94),rgba(17,24,38,.96))!important;color:#ecf3ff!important;text-decoration:none!important;box-shadow:inset 0 1px rgba(255,255,255,.055),0 8px 24px rgba(2,8,18,.14)!important;transition:border-color .16s ease,background .16s ease,transform .16s ease!important;overflow:hidden}
.uqPartyLink::after{content:"";position:absolute;inset:auto -18px -30px auto;width:72px;height:72px;border-radius:50%;background:radial-gradient(circle,rgba(111,126,255,.18),transparent 68%);pointer-events:none}
.uqPartyLink:hover{transform:translateY(-1px);border-color:rgba(145,165,215,.45)!important;background:linear-gradient(145deg,rgba(30,42,62,.98),rgba(18,27,43,.98))!important}
.uqPartyMark{position:relative;z-index:1;display:grid;place-items:center;width:32px;height:32px;border:1px solid rgba(134,153,255,.22);border-radius:11px;background:linear-gradient(145deg,rgba(108,123,255,.18),rgba(66,192,176,.08));color:#bfc9ff;box-shadow:inset 0 1px rgba(255,255,255,.05)}
.uqPartyMark svg,.uqPartyNavMark svg{width:20px;height:20px;overflow:visible}.uqPartyMark circle,.uqPartyNavMark circle{fill:currentColor}.uqPartyMark path,.uqPartyNavMark path{fill:none;stroke:currentColor;stroke-width:1.45;stroke-linecap:round;opacity:.72}
.uqPartyLinkText{position:relative;z-index:1;display:grid;gap:1px;line-height:1;text-align:left}.uqPartyLinkText small{font-size:7px;letter-spacing:.12em;color:#7f90a9;font-weight:850}.uqPartyLinkText b{font-size:12px;letter-spacing:.01em;color:#eef4ff;font-weight:850}
.uqPartyArrow{position:relative;z-index:1;color:#778aa5;font-size:13px;font-weight:900}
.uqPartyNavLink{color:#dfe7f6!important;text-decoration:none!important}.uqPartyNavMark{display:grid;place-items:center;width:24px;height:24px;color:#aebcff}.uqPartyNavMark svg{width:21px;height:21px}
@media(max-width:720px){.uqPartyLink{display:none!important}.uqSectionNav .uqPartyNavLink{background:rgba(98,111,157,.08)!important;color:#dfe7f6!important}.uqSectionNav .uqPartyNavLink:hover{background:rgba(98,111,157,.13)!important}.uqSectionNav .uqPartyNavMark{width:22px!important;height:22px!important}.uqSectionNav .uqPartyNavMark svg{width:19px!important;height:19px!important}.uqSectionNav .uqPartyNavLink b{font-size:9px!important}}
@media(min-width:721px){.uqSectionNav .uqPartyNavLink{display:none!important}}


/* v64.2.1 — unified desktop topbar controls */
@media(min-width:721px){
  .uqTopActionsClean{gap:8px!important;align-items:center}
  .uqTopActionsClean>.uqWalletMini,
  .uqTopActionsClean>.uqPartyLink,
  .uqTopActionsClean>.uqWorldLinkCompact,
  .uqTopActionsClean>.uqProfile{
    box-sizing:border-box;
    min-height:44px!important;
    height:44px!important;
    border:1px solid rgba(82,101,132,.58)!important;
    border-radius:14px!important;
    background:linear-gradient(180deg,rgba(18,26,39,.96),rgba(14,21,33,.96))!important;
    box-shadow:inset 0 1px rgba(255,255,255,.045),0 7px 20px rgba(0,0,0,.11)!important;
    color:#e9eef8!important;
    transition:border-color .16s ease,background .16s ease,transform .16s ease!important;
  }
  .uqTopActionsClean>.uqPartyLink:hover,
  .uqTopActionsClean>.uqWorldLinkCompact:hover,
  .uqTopActionsClean>.uqProfile:hover{
    border-color:rgba(112,136,178,.78)!important;
    background:linear-gradient(180deg,rgba(23,33,49,.98),rgba(16,24,37,.98))!important;
    transform:translateY(-1px)
  }
  .uqTopActionsClean>.uqWalletMini{display:flex!important;align-items:center!important;gap:10px!important;padding:0 12px!important;font-size:11px!important;white-space:nowrap}
  .uqTopActionsClean>.uqWalletMini b{font-size:12px!important;color:#f1f5fb}
  .uqTopActionsClean>.uqWalletMini>span:not(.uqWalletCoin){color:#a5b0c2!important;font-size:11px!important}
  .uqWalletCoin{display:inline-flex!important;align-items:center!important;gap:6px!important;color:#eef3fb!important}
  .uqWalletCoin i{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;border:1px solid rgba(196,208,226,.32);background:radial-gradient(circle at 34% 28%,#f0f4f8 0 7%,#abb7c6 24%,#5c6879 62%,#333e4d 100%);box-shadow:inset 0 1px 2px rgba(255,255,255,.42),inset 0 -2px 3px rgba(0,0,0,.28),0 2px 8px rgba(0,0,0,.2);color:#152030;font-style:normal;font-size:11px;font-weight:1000;text-shadow:0 1px rgba(255,255,255,.28)}
  .uqTopActionsClean>.uqPartyLink{display:inline-flex!important;grid-template-columns:none!important;gap:8px!important;padding:0 11px 0 7px!important;overflow:visible!important}
  .uqTopActionsClean>.uqPartyLink::after{display:none!important}
  .uqPartyMark,.uqWorldMark{display:grid;place-items:center;width:30px;height:30px;flex:0 0 30px;border-radius:10px;border:1px solid rgba(122,145,190,.24);background:rgba(75,96,142,.14)}
  .uqPartyMark svg,.uqWorldMark svg{width:18px;height:18px;fill:none;stroke:#b5c6e2;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
  .uqPartyLinkText{display:grid!important;gap:1px!important;line-height:1!important}
  .uqPartyLinkText small{font-size:6.5px!important;letter-spacing:.12em!important;color:#7889a3!important}
  .uqPartyLinkText b{font-size:11.5px!important;font-weight:850!important}
  .uqPartyArrow{margin-left:1px;color:#7889a3!important;font-size:11px!important}
  .uqTopActionsClean>.uqWorldLinkCompact{display:inline-flex!important;align-items:center!important;gap:8px!important;padding:0 11px 0 7px!important;text-decoration:none!important;color:#dce5f2!important;font-size:11.5px!important;font-weight:850!important}
  .uqTopActionsClean>.uqWorldLinkCompact .uqWorldMark{background:rgba(88,100,124,.11)}
  .uqTopActionsClean>.uqProfile{gap:8px!important;padding:0 11px 0 7px!important;cursor:pointer}
  .uqTopActionsClean>.uqProfile>span{display:grid;place-items:center;width:30px;height:30px;border-radius:10px;background:rgba(91,104,132,.13);font-size:18px!important;line-height:1}
  .uqTopActionsClean>.uqProfile>b{font-size:11.5px!important;font-weight:850!important;letter-spacing:.01em}
}
