@import url("ui/raster/weather-overview/runtime-frames.css");

/* The legacy sibling divider also matches the new inner value spans. */
body.play-screen .game-hud :is(#coins-value,#stars-value,#words-value) { border: 0; padding: 0; }

body.play-screen:has(#weather-details:popover-open) .weather-shade { background: var(--weather-overview-day) center / 100% 100% no-repeat; }
body.play-screen:has(#weather-details[data-phase=night]:popover-open) .weather-shade { background-image: var(--weather-overview-night); }
/* Keep the animated canvas composited behind the opaque overview. */
body.play-screen:has(#weather-details:popover-open) :is(.scene-label,.scene-note,.camera-controls,.region-controls,.mobile-walk) { visibility: hidden; }
body.play-screen #weather-details .weather-close { --close-size: max(44px,calc(54 * var(--du))); position: sticky; display: block; float: none; top: calc(18 * var(--du)); right: auto; width: var(--close-size); height: var(--close-size); margin: calc(18 * var(--du)) calc(28 * var(--du)) calc(-18 * var(--du) - var(--close-size)) auto; z-index: 2; }

@media (min-width: 700px) {
  body.play-screen:has(#weather-details:popover-open) .game-hud { row-gap: calc(23 * var(--du)); }
  body.play-screen:has(#weather-details:popover-open) .game-hud .hud-progress { width: calc(440 * var(--du)); min-height: calc(181 * var(--du)); padding: calc(63 * var(--du)) calc(44 * var(--du)) calc(18 * var(--du)); background-image: var(--weather-brand); }
  body.play-screen:has(#weather-details:popover-open) .game-hud .brand { justify-content: center; margin: 0; font-size: calc(37 * var(--du)); text-align: center; }
  body.play-screen:has(#weather-details:popover-open) .game-hud #level { margin: calc(4 * var(--du)) 0 calc(10 * var(--du)); font-size: calc(20 * var(--du)); text-align: center; }
  body.play-screen:has(#weather-details:popover-open) .game-hud #level-progress { width: min(100%,calc(270 * var(--du))); height: calc(12 * var(--du)); margin-inline: auto; }
  body.play-screen:has(#weather-details:popover-open) .game-hud .stats { width: calc(432 * var(--du)); grid-template-columns: calc(242 * var(--du)) calc(180 * var(--du)); row-gap: calc(12 * var(--du)); }
  body.play-screen:has(#weather-details:popover-open) .game-hud .stats > * { min-height: max(44px,calc(60 * var(--du))); font-size: calc(24 * var(--du)); }
  body.play-screen:has(#weather-details:popover-open) .game-hud #coins { font-size: calc(26 * var(--du)); }
  body.play-screen:has(#weather-details:popover-open) .game-hud #streak-open { max-width: 100%; min-height: max(44px,calc(60 * var(--du))); font-size: calc(26 * var(--du)); }
  body.play-screen:has(#weather-details:popover-open) .scene-label { top: calc(150 * var(--du)); }
  body.play-screen:has(#weather-details:popover-open) #weather { height: calc(56 * var(--du)); padding-block: 0; }
  body.play-screen:has(#weather-details:popover-open) .map-shortcuts button { min-height: max(44px,calc(60 * var(--du))); font-size: calc(24 * var(--du)); }
  body.play-screen:has(#weather-details:popover-open) .map-shortcuts button { border: calc(4 * var(--du)) solid transparent; border-image: var(--hud-stat-frame) 7 fill / calc(10 * var(--du)) stretch; background: none; }
  body.play-screen:has(#weather-details:popover-open) #village-open { min-width: calc(145 * var(--du)); }
  body.play-screen:has(#weather-details:popover-open) #weather-details h2::before { width: calc(58 * var(--du)); height: calc(52 * var(--du)); }
  body.play-screen:has(#weather-details:popover-open) .actions { width: calc(830 * var(--du)); bottom: calc(34 * var(--du)); gap: calc(16 * var(--du)); }
  body.play-screen:has(#weather-details:popover-open) .actions button { height: calc(174 * var(--du)); border: calc(8 * var(--du)) solid transparent; border-image: var(--ui-secondary-frame) 8 4 / calc(12 * var(--du)) stretch; border-radius: calc(18 * var(--du)); background: #ffedc1; background-clip: padding-box; font-size: calc(32 * var(--du)); }
  body.play-screen:has(#weather-details:popover-open) .actions .nav-label { font-size: inherit; line-height: 1.1; }
  body.play-screen:has(#weather-details:popover-open) .actions button::before { width: calc(110 * var(--du)); height: calc(110 * var(--du)); }
  body.play-screen:has(#weather-details:popover-open) #learn-open { border-image-source: var(--ui-secondary-frame); background: #eadcf4; background-clip: padding-box; color: var(--ui-ink); }
  body.play-screen:has(#weather-details:popover-open) #order-open { background-color: #d9e9bd; }
  body.play-screen:has(#weather-details:popover-open) #shop-open { background-color: #f7d5c9; }
  body.play-screen:has(#weather-details:popover-open) #learn-open::before { background-image: var(--ui-book-art); }
  body.play-screen:has(#weather-details:popover-open) :is(#seed-pouch-open,#farm-controls > summary) { font-size: calc(26 * var(--du)); min-width: calc(218 * var(--du)); min-height: max(44px,calc(72 * var(--du))); }
  body.play-screen:has(#weather-details:popover-open) #seed-pouch-open { bottom: calc(290 * var(--du)); }
  body.play-screen:has(#weather-details:popover-open) #farm-controls > summary { bottom: calc(210 * var(--du)); }
  body.play-screen #weather-details [data-weather-description] { transform: translateY(calc(-4 * var(--du))); }
  body.play-screen #weather-details .weather-rates { transform: translateY(calc(-1 * var(--du))); }
  body.play-screen #weather-details .weather-rates h3 { transform: translateY(calc(-4 * var(--du))); }
  body.play-screen #weather-details .weather-rate { transform: translateY(calc(-5 * var(--du))); }
  body.play-screen #weather-details [data-weather-forecast] { transform: translateY(calc(-6 * var(--du))); }
}

body.play-screen:has(#weather-details:popover-open) #coins .counter-symbol { display: inline-block; width: calc(28 * var(--du)); height: calc(28 * var(--du)); vertical-align: middle; font-size: 0; background: url("/assets/luminous/coin-ui.png") center / contain no-repeat; }
body.play-screen:has(#weather-details:popover-open) #stars .counter-symbol { display: inline-block; width: calc(26 * var(--du)); height: calc(26 * var(--du)); vertical-align: middle; font-size: 0; background: url("/assets/luminous/star-ui.png") center / contain no-repeat; }
body.play-screen:has(#weather-details:popover-open) #words .counter-symbol { color: #efa52e; }

body.play-screen #weather[data-weather=sunny][data-phase=night]::before,
body.play-screen #weather-details[data-weather=sunny][data-phase=night] h2::before { content: ""; background: var(--weather-moon-icon) center / contain no-repeat; font-size: 0; }
body.play-screen #weather-details[data-weather=fog] h2::before,
body.play-screen #weather-details[data-next-weather=fog] [data-weather-forecast]::before { background-image: linear-gradient(#c1d8f4,#c1d8f4),linear-gradient(#a4bde8,#a4bde8),var(--hud-cloud-icon); background-size: 70% 2px,50% 2px,100% calc(100% - 8px); background-position: center bottom,center calc(100% - 4px),center top; background-repeat: no-repeat; }

@media (max-width: 699px) {
  body.play-screen:has(#weather-details:popover-open) .weather-shade { background-size: cover; }
  body.play-screen #weather-details { width: min(360px,calc(100vw - 24px)); padding: 0 0 32px; border: 2px solid transparent; border-image: var(--farm-weather-panel) 160 fill / 36px stretch; border-radius: 0; background: transparent; mask: none; filter: none; font-size: 14px; line-height: 1.4; }
  body.play-screen #weather-details h2 { min-height: 64px; margin: 0; padding: 12px 62px 12px 18px; gap: 8px; border-bottom: 1px solid #f1d2cc; font-size: 18px; line-height: 1.2; }
  body.play-screen #weather-details h2::before { content: ""; display: block; flex: none; width: 36px; height: 32px; background: var(--hud-cloud-icon) center / contain no-repeat; }
  body.play-screen #weather-details[data-weather=storm] h2::before { background-image: var(--ui-storm-art); }
  body.play-screen #weather-details[data-weather=rain] h2::before { background-image: var(--hud-rain-icon); }
  body.play-screen #weather-details[data-weather=sunny] h2::before { background-image: var(--hud-sun-icon); }
  body.play-screen #weather-details .weather-close { --close-size: 44px; top: 10px; margin: 10px 10px -54px auto; }
  body.play-screen #weather-details [data-weather-description] { margin: 14px 20px; color: #51414e; font-size: 14px; }
  body.play-screen #weather-details .weather-rates { margin: 0 16px; padding: 12px; border: 2px solid #efcac7; border-radius: 12px; background: #f5e5df; }
  body.play-screen #weather-details .weather-rates h3 { font-size: 12px; }
  body.play-screen #weather-details .weather-rate { min-height: 30px; font-size: 14px; font-weight: 700; }
  body.play-screen #weather-details [data-weather-forecast] { display: flex; align-items: center; gap: 8px; margin: 14px 20px 10px; color: #51414e; font-size: 13px; }
  body.play-screen #weather-details [data-weather-forecast]::before { content: ""; display: block; flex: none; width: 20px; height: 22px; background: var(--hud-cloud-icon) center / contain no-repeat; }
  body.play-screen #weather-details[data-next-weather=sunny] [data-weather-forecast]::before { background-image: var(--hud-sun-icon); }
  body.play-screen #weather-details[data-next-weather=rain] [data-weather-forecast]::before { background-image: var(--hud-rain-icon); }
  body.play-screen #weather-details[data-next-weather=storm] [data-weather-forecast]::before { background-image: var(--ui-storm-art); }
  body.play-screen #weather-details[data-next-weather=stable] [data-weather-forecast]::before { display: none; }
}
