/* Shell and village composition from PR #199 c7c8f862. Existing font families stay in their original stylesheets. */
@layer priority {
.shell .main{padding-top:140px!important;padding-bottom:calc(90px + env(safe-area-inset-bottom))!important}
.shell[data-screen=home] .home-gathering{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:0!important;margin:5px 0 0!important;max-width:none!important;align-items:start!important}
.shell[data-screen=home] .gathering-column{display:grid!important;grid-template-columns:minmax(0,1fr) 44px!important;grid-template-rows:44px auto!important;gap:0!important;min-width:0!important;padding:0 2px!important;border:0!important;border-right:1px solid #B88A60!important;border-radius:0!important;background:#0F1F19!important;box-shadow:none!important;color:#F7EBD3!important}
.shell[data-screen=home] .gathering-column:last-child{border-right:0!important}
.shell[data-screen=home] .gathering-symbol{grid-column:1!important;grid-row:1!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:0!important;width:100%!important;min-width:0!important;min-height:44px!important;height:44px!important;margin:0!important;padding:0!important;color:#F7EBD3!important;white-space:nowrap!important}
.shell[data-screen=home] .gathering-symbol .ui-icon{width:15px!important;height:15px!important;flex:none!important;color:#91D88A!important}
.shell[data-screen=home] .gathering-label{font-size:var(--kz-fs-xs) !important;font-weight:600!important;line-height:1!important}
.shell[data-screen=home] .home-profession-swap{grid-column:2!important;grid-row:1!important;display:grid!important;place-items:center!important;width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;margin:0!important;padding:10px!important;border:0!important;border-radius:0!important;background:transparent!important;color:#FFB547!important;box-shadow:none!important}
.shell[data-screen=home] .home-profession-swap .ui-icon{width:19px!important;height:19px!important}
.shell[data-screen=home] .gathering-workers{grid-column:1/-1!important;grid-row:2!important;display:grid!important;grid-template-columns:1fr!important;gap:0!important;margin:0!important;padding:0!important}
.shell[data-screen=home] .gathering-worker{position:relative!important;display:flex!important;justify-content:center!important;align-items:center!important;width:100%!important;height:44px!important;min-height:44px!important;max-height:44px!important;gap:0!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
.shell[data-screen=home] .home-worker-top{display:contents!important}
.shell[data-screen=home] .gathering-portrait{position:relative!important;display:grid!important;place-items:center!important;width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;margin:0!important;padding:5px!important;border:0!important;background:transparent!important}
.shell[data-screen=home] .gathering-portrait .rarity-portrait,.shell[data-screen=home] .gathering-portrait .rarity-portrait img{width:32px!important;height:32px!important;max-width:32px!important;max-height:32px!important;object-fit:contain!important;image-rendering:pixelated!important}
.shell[data-screen=home] .home-worker-attributes,.shell[data-screen=home] .home-worker-name,.shell[data-screen=home] .home-worker-state{display:none!important}
.shell[data-screen=home] .home-worker-energy{position:absolute!important;bottom:0!important;left:calc(50% - 19px)!important;display:block!important;width:38px!important;height:4px!important;margin:0!important;pointer-events:none!important}
.shell[data-screen=home] .home-worker-energy progress{display:block!important;width:38px!important;height:4px!important;margin:0!important;accent-color:#2EBD6E!important}
.shell[data-screen=home] .home-worker-energy span{display:none!important}
.shell[data-screen=home] .gathering-free-slot{display:grid!important;place-items:center!important;width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;justify-self:center!important;padding:0!important;border:1px solid #638569!important;border-radius:0!important;background:#1F3329!important;color:#C1D69A!important;box-shadow:none!important}
.shell[data-screen=home] .gathering-free-slot>span:last-child{display:none!important}
.shell[data-screen=home] .gathering-free-slot .free-slot-portrait{width:26px!important;height:26px!important;border:0!important;background:transparent!important}
.shell[data-screen=home] .gathering-complete{grid-column:1/-1!important;min-height:44px!important}
  .shell .game-header.hud-wood{position:fixed!important;top:0!important;left:50%!important;right:auto!important;transform:translateX(-50%)!important;z-index:100!important;box-sizing:border-box!important;width:min(100vw,520px)!important;max-width:520px!important;height:140px!important;max-height:none!important;margin:0!important;padding:0!important;overflow:visible!important;background:#1F3329!important;border:0!important;border-bottom:3px solid #B88A60!important;border-radius:0!important;box-shadow:none!important;color:#F7EBD3!important}
  .shell .game-header .hud-main{position:relative!important;display:block!important;width:100%!important;height:100%!important;min-height:0!important;margin:0!important;padding:0!important}
  .shell .game-header .study-theme{position:absolute;top:4px;left:6px;width:44px;height:44px;min-width:44px;min-height:44px;display:grid;place-items:center;padding:10px;border:0;background:transparent;color:#FFB547;box-shadow:none}
  .shell .game-header .study-theme img{display:block;width:22px;height:22px;transform:translateX(7px);image-rendering:pixelated;filter:brightness(0) invert(75%) sepia(75%) saturate(1050%) hue-rotate(345deg)}
  .shell .game-header .study-logo{position:absolute;top:29px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:4px;height:35px;white-space:nowrap;color:#F7EBD3;font-size:var(--kz-fs-lg);font-weight:700;line-height:1}
  .shell .game-header .study-logo img{width:24px;height:24px;object-fit:contain;image-rendering:pixelated;filter:brightness(0) invert(78%) sepia(35%) saturate(620%) hue-rotate(43deg)}
  .shell .game-header .study-music{position:absolute;top:4px;left:50px;right:auto;display:flex;gap:0;width:132px;height:44px}
  .shell .game-header .study-music button{display:grid;place-items:center;width:44px;min-width:44px;height:44px;min-height:44px;margin:0;padding:0;border:0;border-radius:0;background:transparent;color:#D8B584;box-shadow:none;font-size:var(--kz-fs-xs) !important;line-height:1}
  .shell .game-header .study-music button:first-child{justify-items:center;padding:0}
  .shell .game-header .study-music button:nth-child(2){justify-items:start;padding-left:2px;color:#FFB547;font-size:var(--kz-fs-xs) !important}
  .shell .game-header .study-music button:last-child{justify-items:start;padding-left:0}
  .shell .game-header .hud-profile-cluster{position:absolute!important;top:65px!important;left:6px!important;right:auto!important;display:block!important;width:190px!important;min-width:0!important;height:64px!important;margin:0!important}
  .shell .game-header .hud-profile{display:flex!important;flex-direction:row!important;justify-content:flex-start!important;align-items:center!important;gap:6px!important;width:190px!important;min-width:0!important;height:52px!important;margin:0!important;padding:0!important}
  .shell .game-header .hud-avatar-open{width:52px!important;min-width:52px!important;height:52px!important;min-height:52px!important;padding:0!important;margin:0!important}
  .shell .game-header .hud-photo{display:grid!important;place-items:center!important;width:52px!important;height:52px!important;margin:0!important;border-width:2px!important;border-radius:var(--kz-r-sm)!important}
  .shell .game-header .hud-photo>img.trainer-sprite{width:44px!important;height:44px!important;border-radius:0!important}
  .shell .game-header .hud-level-badge{font-size:var(--kz-fs-xs) !important;bottom:1px!important;padding:0 2px!important}
  .shell .game-header .hud-identity{display:block!important;width:130px!important;max-width:130px!important;flex:none!important;min-width:0!important;margin:0!important}
  .shell .game-header .hud-nick-row{display:block!important;width:130px!important}
  .shell .game-header .hud-nick-open{display:block!important;width:130px!important;min-width:0!important;min-height:52px!important;padding:0!important;text-align:left!important}
  .shell .game-header .hud-nick{display:block!important;width:130px!important;max-width:130px!important;font-size:var(--kz-fs-md) !important;line-height:52px!important;white-space:nowrap!important;text-overflow:ellipsis!important;overflow:hidden!important;color:#F7EBD3!important;text-shadow:none!important}
  .shell .game-header .hud-club,.shell .game-header .season-title{display:none!important}
  .shell .game-header .hud-identity .hud-xp{position:absolute!important;display:block!important;top:54px!important;left:1px!important;width:50px!important;height:6px!important;margin:0!important;border:1px solid #B88A60!important;border-radius:var(--kz-r-sm)!important;background:#392413!important}
  .shell .game-header .hud-wallet{position:absolute!important;right:6px!important;top:48px!important;display:flex!important;flex-direction:column!important;grid-template-columns:none!important;gap:0!important;width:108px!important;height:88px!important;margin:0!important;padding:0!important}
  .shell .game-header .hud-wallet .wallet-chip{position:relative!important;display:flex!important;flex:none!important;align-items:center!important;gap:0!important;width:108px!important;min-width:108px!important;height:44px!important;min-height:44px!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
  .shell .game-header .hud-wallet .wallet-chip::before{content:""!important;position:absolute!important;z-index:0!important;inset:7px 0 7px 7px!important;border:1px solid #B88A60!important;border-radius:var(--kz-r-md)!important;background:#5C3F27!important;box-shadow:none!important}
  .shell .game-header .hud-wallet .wallet-chip.emeralds::before{border-color:#638569!important;background:#1F3329!important}
  .shell .game-header .wallet-balance{position:relative!important;z-index:1!important;display:flex!important;align-items:center!important;justify-content:flex-end!important;width:64px!important;min-width:64px!important;height:44px!important;min-height:44px!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important}
  .shell .game-header .wallet-balance .currency-art{position:absolute!important;left:-2px!important;top:6px!important;width:32px!important;height:32px!important;object-fit:contain!important;image-rendering:pixelated!important}
  .shell .game-header .wallet-chip:not(.emeralds) .currency-art{left:-5px!important}
  .shell .game-header .wallet-balance strong{position:absolute!important;left:auto!important;right:-8px!important;top:14px!important;display:block!important;flex:none!important;width:max-content!important;min-width:0!important;max-width:none!important;margin:0!important;padding:0!important;color:#FFF5DF!important;font-size:var(--kz-fs-sm) !important;font-weight:700!important;line-height:16px!important;text-align:right!important;white-space:nowrap!important;overflow:visible!important;text-shadow:none!important;pointer-events:none!important}
  .shell .game-header .emeralds .wallet-balance strong{color:#91D88A!important}
  .shell .game-header .wallet-plus{position:relative!important;z-index:1!important;isolation:isolate!important;display:grid!important;place-items:center!important;flex:none!important;width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;color:#0F1F19!important;font-size:var(--kz-fs-md) !important;font-weight:700!important;line-height:1!important}
  .shell .game-header .wallet-plus::before{content:"";position:absolute;z-index:-1;left:12px;top:12px;width:20px;height:20px;border-radius:var(--kz-r-sm);background:#FFB547}
  .shell .game-header .emeralds .wallet-plus::before{background:#2EBD6E}
  .shell .sidebar{position:fixed!important;left:50%!important;right:auto!important;bottom:0!important;top:auto!important;transform:translateX(-50%)!important;z-index:100!important;box-sizing:border-box!important;width:min(100vw,520px)!important;max-width:520px!important;height:calc(69px + env(safe-area-inset-bottom))!important;margin:0!important;padding:0 0 env(safe-area-inset-bottom) 0!important;border:0!important;border-top:3px solid #B88A60!important;border-radius:0!important;background:#1F3329!important;box-shadow:none!important}
  .shell .sidebar>:not(nav.nav){display:none!important}
  .shell .sidebar nav.nav{position:static!important;display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:0!important;box-sizing:border-box!important;width:100%!important;max-width:none!important;height:66px!important;min-height:66px!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:#1F3329!important;box-shadow:none!important;overflow:hidden!important}
  .shell .sidebar nav.nav button{min-width:0!important;min-height:64px!important;height:64px!important;margin:0!important;border-radius:0!important}
  .shell[data-screen=home] .study-work-wrap{position:relative;left:50%;transform:translateX(-50%);width:min(100vw,520px);height:138px;margin:5px 0 0}
  .shell[data-screen=home] .study-work-wrap .home-gathering{display:flex!important;align-items:start!important;gap:0!important;width:100%!important;height:138px!important;margin:0!important;overflow:hidden!important;scroll-snap-type:none!important;scrollbar-width:none}
  .shell[data-screen=home] .study-work-wrap .gathering-column{position:relative!important;box-sizing:border-box!important;flex:0 0 33.333333%;width:33.333333%!important;min-width:0!important;grid-template-columns:minmax(0,1fr) 44px!important;grid-template-rows:44px 94px!important}
  .shell[data-screen=home] .study-work-wrap .gathering-symbol{grid-column:1/-1!important;justify-self:center!important;width:100%!important;min-width:0!important;overflow:visible!important}
  .shell[data-screen=home] .study-work-wrap .home-profession-swap{position:absolute!important;top:0!important;right:0!important;place-items:start end!important;padding:4px!important}
  .shell[data-screen=home] .study-work-wrap .home-profession-swap .ui-icon{width:14px!important;height:14px!important}
  .shell[data-screen=home] .study-work-wrap .gathering-workers{grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-column:1/-1!important;grid-row:2!important;height:94px!important}
  .shell[data-screen=home] .study-work-wrap .gathering-worker{display:flex!important;flex-direction:column!important;justify-content:flex-start!important;align-items:center!important;box-sizing:border-box!important;width:100%!important;height:94px!important;min-height:94px!important;max-height:94px!important;overflow:visible!important}
  .shell[data-screen=home] .study-work-wrap .gathering-portrait{width:clamp(36px,10vw,40px)!important;min-width:0!important;height:44px!important;min-height:44px!important;padding:0!important}
  .shell[data-screen=home] .study-work-wrap .gathering-portrait .rarity-portrait{width:clamp(36px,10vw,40px)!important;height:40px!important}
  .shell[data-screen=home] .study-work-wrap .home-worker-name{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:flex-start!important;gap:4px!important;box-sizing:border-box!important;width:100%!important;max-width:100%!important;height:44px!important;margin-top:5px!important;padding:0 1px!important;color:#F7EBD3!important;text-align:center!important;white-space:normal!important;overflow:hidden!important;text-shadow:none!important}
  .shell[data-screen=home] .study-work-wrap .home-worker-name>span{display:block!important;box-sizing:border-box!important;width:100%!important;height:15px!important;min-height:15px!important;max-height:15px!important;font-size:var(--kz-fs-xs) !important;font-weight:600!important;line-height:15px!important;letter-spacing:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;overflow-wrap:normal!important;word-break:normal!important}
  .shell[data-screen=home] .study-work-wrap .home-worker-level{display:block!important;width:100%!important;height:14px!important;font-size:var(--kz-fs-xs) !important;font-weight:500!important;line-height:14px!important;color:#D8B584!important}
  .shell[data-screen=home] .study-work-wrap .home-worker-energy{top:42px!important;bottom:auto!important;left:calc(50% - 17px)!important;width:34px!important}
  .shell[data-screen=home] .study-work-wrap .home-worker-energy progress{width:34px!important}
  .shell[data-screen=home] .study-scroll-cue{display:none!important}
  .shell[data-screen=home] .study-scroll-cue[hidden]{display:none}
  .shell[data-screen=home] #page>.home-map{box-sizing:border-box!important;width:100%!important;max-width:100%!important;margin-inline:0!important}

  .game-header .study-theme .theme-moon,
  .game-header .study-theme .theme-sun {display:block;width:22px;height:22px;color:#ffb547;font-size:var(--kz-fs-lg);line-height:22px;text-align:center}

  :root[data-theme=normal] .game-header .study-theme .theme-sun,
  :root[data-theme=dark] .game-header .study-theme .theme-moon {display:none!important}

  .game-header .wallet-balance.wallet-compact strong{font-size:var(--kz-fs-xs) !important;letter-spacing:-.25px!important}

  .shell[data-screen=home] .study-work-wrap .gathering-free-slot {box-sizing:border-box!important;width:100%!important;min-width:0!important;height:44px!important}

  .shell .game-header .hud-photo{overflow:hidden!important}

  .shell .game-header .hud-photo>img:not(.hud-frame-art){max-width:100%!important;max-height:100%!important;object-fit:contain!important}

  .shell .game-header .hud-nick-row{display:flex!important;align-items:center!important;gap:2px!important;width:130px!important;min-width:0!important}

  .shell .game-header .hud-nick-open{display:block!important;flex:1 1 auto!important;width:auto!important;min-width:0!important;min-height:44px!important;overflow:hidden!important}

  .shell .game-header .hud-nick{width:100%!important;max-width:100%!important}

  .shell .game-header .hud-club{display:grid!important;place-items:center!important;flex:0 0 44px!important;width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;margin:0!important;padding:7px!important;background:transparent!important;border:0!important;box-shadow:none!important}

  .shell .game-header .hud-club img{width:24px!important;height:28px!important;object-fit:contain!important}

  .shell .game-header .season-title{display:block!important;position:absolute!important;left:58px!important;top:45px!important;box-sizing:border-box!important;max-width:130px!important;width:130px!important;height:16px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;color:#d8b584!important;font-size:var(--kz-fs-xs) !important;line-height:16px!important}

  .shell .sidebar nav.nav{overflow:visible!important}

  .shell .sidebar .nav-free{top:-10px!important;right:3px!important;z-index:3!important;white-space:nowrap!important}
}

@layer priority {
  .shell[data-screen=home]{overflow:visible!important}
  .shell[data-screen=home] #page>.home-map{position:relative;left:50%;transform:translateX(-50%);box-sizing:border-box!important;width:min(calc(100vw - 28px),500px)!important;max-width:500px!important;margin-left:0!important;margin-right:0!important}
  .shell .game-header .music-options summary{border:0!important;border-radius:var(--kz-r-sm)!important;background:transparent!important;box-shadow:none!important;padding:8px!important}
  .shell .game-header .music-symbol{mask:none!important;background:url('/assets/art/ui/music-note.png') center/contain no-repeat!important;width:68px!important;height:68px!important;max-width:none!important}
  .shell .game-header .study-theme,.shell .game-header .study-logo,.shell .game-header .study-music{z-index:2}
  .shell .game-header .study-theme{cursor:pointer}
  .shell .game-header .study-logo strong{font-size:var(--kz-fs-lg)}
  .shell .game-header .study-theme .theme-moon,.shell .game-header .study-theme .theme-sun{display:block;width:22px;height:22px;color:#ffb547;line-height:22px;text-align:center}
  :root[data-theme=normal] .game-header .theme-sun,:root[data-theme=dark] .game-header .theme-moon{display:none!important}
  .shell .game-header .study-music{width:44px;height:44px;z-index:3}
  .shell .game-header .music-player{position:static!important;display:block!important;width:44px;height:44px;margin:0;padding:0;border:0!important;background:transparent!important;box-shadow:none!important}
  .shell .game-header .music-options{border:0!important;position:relative}
  .shell .game-header .music-options summary{box-sizing:border-box;width:44px;height:44px;min-height:44px;padding:8px;border:0;border-radius:var(--kz-r-sm);background:transparent;overflow:hidden;position:relative}
  .shell .game-header .music-symbol{position:absolute;left:50%;top:50%;width:68px;height:68px;transform:translate(-50%,-50%);background:url('/assets/art/ui/music-note.png') center/contain no-repeat;display:block}
  .shell .game-header .music-symbol:before,.shell .game-header .music-symbol:after{display:none!important}
  .shell .game-header .music-popover{top:48px;bottom:auto;left:0;right:auto;max-width:calc(100vw - 64px);z-index:120}
  .shell .game-header .music-popover button{width:auto!important;min-width:44px!important;padding:8px 13px!important;border-radius:var(--kz-r-md)!important;font-size:var(--kz-fs-sm) !important}
  .shell .game-header .music-popover .music-label{display:inline!important}
  .shell .sidebar .nav button{display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:center!important;gap:4px!important;padding:5px 0!important;transform:none!important;background:transparent!important;box-shadow:none!important;color:#c1d69a!important}
  .shell .sidebar .nav button.active{background:#ffb547!important;color:#49331e!important}
  .shell .sidebar .nav .ui-icon{width:23px!important;height:23px!important}
  .shell .sidebar .nav button span:not(.ui-icon){display:block!important;font-size:var(--kz-fs-xs) !important;line-height:1.1!important}
  .shell .sidebar nav.nav{overflow:visible!important}
  .shell .sidebar .nav-free{top:-10px!important;right:3px!important;z-index:3!important;white-space:nowrap!important}
  .shell[data-screen=home] .study-work-wrap{background:#0f1f19}
  .shell[data-screen=home] .study-work-wrap .home-gathering{height:auto!important;min-height:138px;overflow:visible!important}
  .shell[data-screen=home] .study-work-wrap{height:auto;min-height:138px}
  .shell[data-screen=home] .study-work-wrap .gathering-portrait .rarity-portrait{box-sizing:border-box!important;max-width:40px!important;max-height:40px!important}
  .shell[data-screen=home] .study-work-wrap .gathering-portrait .rarity-portrait>img{width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important}
  .shell[data-screen=home] .gathering-column{background:#0f1f19!important;color:#f7ebd3!important}
  .shell[data-screen=home] .study-work-wrap .gathering-column.is-complete{outline:0!important}
  .shell[data-screen=home] .study-work-wrap .gathering-complete{grid-row:3!important;grid-column:1/-1!important;min-height:44px!important;margin:0!important}
  /* A full crate adds one shared action row; workers keep their original row. */
  .shell[data-screen=home] .study-work-wrap .home-gathering{align-items:stretch!important}
  .shell[data-screen=home] .study-work-wrap .home-gathering:has(.is-complete) .gathering-column{grid-template-rows:44px 94px 44px!important}
  .shell[data-screen=home] .study-work-wrap .gathering-complete{box-sizing:border-box!important;height:44px!important;display:grid!important;grid-template-columns:22px minmax(0,1fr)!important;grid-template-rows:auto auto!important;align-content:center!important;column-gap:4px!important;row-gap:0!important;padding:4px!important;text-align:left!important}
  .shell[data-screen=home] .study-work-wrap .gathering-complete-seal{grid-column:1;grid-row:1/3;width:20px!important;height:20px!important;border-width:1px!important;box-shadow:none!important;align-self:center}
  .shell[data-screen=home] .study-work-wrap .gathering-complete-seal .ui-icon{display:block!important;width:12px!important;height:12px!important;background:none!important;mask:none!important}
  .shell[data-screen=home] .study-work-wrap .gathering-complete>strong{grid-column:2;grid-row:1;justify-self:start;font-size:var(--kz-fs-xs) !important;line-height:1.2!important;white-space:nowrap}
  .shell[data-screen=home] .study-work-wrap .gathering-complete-action{grid-column:2;grid-row:2;justify-self:start;font-size:var(--kz-fs-xs) !important;line-height:1.2!important}
  .shell[data-screen=home] .study-work-wrap .is-complete .gathering-symbol .loot-new{display:none!important}
  .shell[data-screen=home] .study-work-wrap .gathering-free-slot{box-sizing:border-box!important;width:100%!important;min-width:0!important;height:44px!important}
  .shell[data-screen=home] .home-map{margin-bottom:0!important}
  .shell[data-screen=home] .village-progress{margin-top:12px!important}
  :root[data-theme=normal] .shell[data-screen=home] .study-work-wrap,:root[data-theme=normal] .shell[data-screen=home] .gathering-column{background:#f7ebd3!important;color:#1f3329!important}
  :root[data-theme=normal] .shell[data-screen=home] .gathering-symbol,:root[data-theme=normal] .shell[data-screen=home] .home-worker-name{color:#1f3329!important}
  :root[data-theme=normal] .shell[data-screen=home] .home-worker-level{color:#705236!important}
  :root[data-theme=normal] .shell[data-screen=home] .gathering-free-slot{background:#e8dcc1!important;color:#365841!important;border-color:#8b6448!important}
  :root[data-theme=normal] .shell[data-screen=home] .study-work-wrap .gathering-complete{color:#1f3329!important}
  :root[data-theme=normal] .shell[data-screen=home] .study-work-wrap .gathering-complete-action{color:#43543a!important}
  @media(max-width:359px){
    .shell[data-screen=home] .study-work-wrap .gathering-portrait,.shell[data-screen=home] .study-work-wrap .gathering-portrait .rarity-portrait{width:32px!important}
    .shell[data-screen=home] .study-work-wrap .home-worker-energy{left:calc(50% - 15px)!important;width:30px!important}
    .shell[data-screen=home] .study-work-wrap .home-worker-energy progress{width:30px!important}
    .shell .game-header .hud-profile-cluster,.shell .game-header .hud-profile{width:calc(100% - 126px)!important}
    .shell .game-header .hud-identity,.shell .game-header .hud-nick-row,.shell .game-header .season-title{width:calc(100vw - 190px)!important;max-width:130px!important}
  }
}

/* Trainer identity: keep the level beside the name and each frame at its native bounds. */
@layer priority {
 .shell .game-header .hud-profile-cluster{width:calc(100% - 126px)!important}
 .shell .game-header .hud-profile{width:100%!important}
 .shell .game-header .hud-identity{flex:1!important;width:auto!important;max-width:none!important}
 .shell .game-header .hud-nick-row{width:100%!important;max-width:none!important}
 .shell .game-header .hud-nick-open{flex:0 1 auto!important;width:auto!important}
 .shell .game-header .hud-nick-row>.hud-club{margin-left:auto!important}
 .shell .game-header .hud-nick-row>.hud-level-badge{position:static!important;inset:auto!important;transform:none!important;flex:none;display:inline-flex;align-items:center;white-space:nowrap;font-size:var(--kz-fs-xs) !important;line-height:1.2;padding:1px 3px!important;margin:0}
 .shell .game-header .hud-photo:has(>.hud-frame-art){border:0!important;box-shadow:none!important;background:transparent!important;border-radius:0!important;overflow:visible!important;--hud-avatar-left:16%;--hud-avatar-top:16%;--hud-avatar-w:68%;--hud-avatar-h:68%}
 .shell .game-header .hud-photo:has(>.hud-frame-art)>img:not(.hud-frame-art){position:absolute!important;left:var(--hud-avatar-left)!important;top:var(--hud-avatar-top)!important;width:var(--hud-avatar-w)!important;height:var(--hud-avatar-h)!important;max-width:none!important;max-height:none!important;margin:0!important;border-radius:0!important;object-fit:contain!important}
 .shell .game-header .hud-photo:has(>.hud-frame-art)>img.uploaded-photo{object-fit:cover!important}
 .shell .game-header .hud-photo>.hud-frame-art{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;margin:0!important;border-radius:0!important;object-fit:contain!important;pointer-events:none}
 .shell .game-header .hud-photo:has(>.hud-frame-art[src*="assets/art/passe/lantern-frame.png"]){--hud-avatar-left:23.4375%;--hud-avatar-top:20.3125%;--hud-avatar-w:53.1250%;--hud-avatar-h:56.2500%}
 .shell .game-header .hud-photo:has(>.hud-frame-art[src*="assets/art/passe/moon-frame.png"]){--hud-avatar-left:17.1875%;--hud-avatar-top:20.3125%;--hud-avatar-w:65.6250%;--hud-avatar-h:62.5000%}
 .shell .game-header .hud-photo:has(>.hud-frame-art[src*="assets/art/profile/frame-club-kozy.png"]){--hud-avatar-left:15.6250%;--hud-avatar-top:15.6250%;--hud-avatar-w:69.7917%;--hud-avatar-h:66.6667%}
 .shell .game-header .hud-photo:has(>.hud-frame-art[src*="assets/art/profile/frame-garden-v2.png"]){--hud-avatar-left:21.0938%;--hud-avatar-top:20.3125%;--hud-avatar-w:57.0312%;--hud-avatar-h:53.9062%}
 .shell .game-header .hud-photo:has(>.hud-frame-art[src*="assets/art/profile/frame-lantern-v2.png"]){--hud-avatar-left:25.7812%;--hud-avatar-top:17.1875%;--hud-avatar-w:57.8125%;--hud-avatar-h:56.2500%}
 .shell .game-header .hud-photo:has(>.hud-frame-art[src*="assets/art/profile/frame-wood-v2.png"]){--hud-avatar-left:22.6562%;--hud-avatar-top:20.3125%;--hud-avatar-w:55.4688%;--hud-avatar-h:54.6875%}
 .shell .game-header .hud-photo:has(>.hud-frame-art[src*="assets/art/shop/frame-bug.png"]){--hud-avatar-left:9.3750%;--hud-avatar-top:12.5000%;--hud-avatar-w:81.2500%;--hud-avatar-h:76.5625%}
 .shell .game-header .hud-photo:has(>.hud-frame-art[src*="assets/art/shop/frame-dark.png"]){--hud-avatar-left:12.5000%;--hud-avatar-top:14.0625%;--hud-avatar-w:75.0000%;--hud-avatar-h:71.8750%}
 .shell .game-header .hud-photo:has(>.hud-frame-art[src*="assets/art/shop/frame-fairy.png"]){--hud-avatar-left:7.8125%;--hud-avatar-top:7.8125%;--hud-avatar-w:84.3750%;--hud-avatar-h:84.3750%}
 .shell .game-header .hud-photo:has(>.hud-frame-art[src*="assets/art/shop/frame-fire.png"]){--hud-avatar-left:12.5000%;--hud-avatar-top:14.0625%;--hud-avatar-w:76.5625%;--hud-avatar-h:71.8750%}
 .shell .game-header .hud-photo:has(>.hud-frame-art[src*="assets/art/shop/frame-grass.png"]){--hud-avatar-left:20.3125%;--hud-avatar-top:20.3125%;--hud-avatar-w:59.3750%;--hud-avatar-h:59.3750%}
 .shell .game-header .hud-photo:has(>.hud-frame-art[src*="assets/art/shop/frame-ice.png"]){--hud-avatar-left:12.5000%;--hud-avatar-top:14.0625%;--hud-avatar-w:75.0000%;--hud-avatar-h:71.8750%}
 .shell .game-header .hud-photo:has(>.hud-frame-art[src*="assets/art/shop/frame-rock.png"]){--hud-avatar-left:12.5000%;--hud-avatar-top:14.0625%;--hud-avatar-w:75.0000%;--hud-avatar-h:71.8750%}
 .shell .game-header .hud-photo:has(>.hud-frame-art[src*="assets/art/shop/frame-water.png"]){--hud-avatar-left:12.5000%;--hud-avatar-top:14.0625%;--hud-avatar-w:75.0000%;--hud-avatar-h:75.0000%}
 @media(max-width:359px){.shell .game-header .hud-club{flex-basis:32px!important;width:32px!important;min-width:32px!important;padding:4px!important}}
}

/* Top logo row and VIP above the left edge of the trainer name. */
@layer priority {
 .shell .game-header .study-logo{top:8px!important}
 .shell .game-header .hud-identity{box-sizing:border-box!important;height:52px!important;padding-top:16px!important}
 .shell .game-header .hud-nick-row{height:32px!important}
 .shell .game-header .hud-nick-open{height:32px!important;min-height:32px!important}
 .shell .game-header .hud-nick{line-height:32px!important}
 .shell .game-header .hud-profile>.hud-club{position:absolute!important;left:58px!important;top:-12px!important;right:auto!important;bottom:auto!important;width:44px!important;min-width:44px!important;height:28px!important;min-height:28px!important;display:grid!important;justify-items:start!important;align-items:center!important;padding:0!important;margin:0!important}
 /* Account for the original icon's transparent left edge without changing the asset. */
 .shell .game-header .hud-profile>.hud-club img{transform:translateX(-5px)}
}
