/* Color Sort Puzzle: lite mode, landscape phones and very short screens. */

/* Lite mode (low-end phones, data saver, 2G, or Settings > Graphics > Lite): no stars layer, glows, blur or SVG filters.
 * Bottles also drop their decorative strokes and sparkles (js/bottles.js) and pours skip the canvas stream. */
.lite .space-dust,.lite .home-screen:before,.lite .levels-screen:before{display:none}
.lite .bottle svg,.lite .bottle.selected,.lite .bottle.complete,.lite .home-bottles>div,.lite .round img,.lite .tools button img{filter:none}
.lite .bottle.selected{transform:translateY(-3cqw)}
.lite .bottle.selected svg{outline:.6cqw solid #f1a8ff;outline-offset:.4cqw;border-radius:3cqw}
.lite dialog::backdrop{backdrop-filter:none;-webkit-backdrop-filter:none;background:#08011de6}
.lite .game,.lite dialog,.lite .home-play,.lite .next-round{box-shadow:none}
.lite .bottle{transition:none}
.lite .bottle.hinted{animation:none;outline:.6cqw dashed #fff39e;outline-offset:.4cqw;border-radius:3cqw}

/* Landscape phones: the portrait canvas would be tiny, so the game uses the full screen width and sizes from the height
 * (cqh). The board gets the middle, the tools a column on the right. */
@media (orientation:landscape) and (max-height:560px){
  .game{container-type:size;width:100vw;height:100dvh;aspect-ratio:auto}
  .round,.round.small{width:12cqh;height:12cqh}
  .topbar{top:3cqh;left:3cqh;right:3cqh;height:14cqh;gap:2cqh}
  .wallet{display:none}
  .coins{margin-top:1cqh;height:9cqh;min-width:20cqh;font-size:4.5cqh;padding:0 2cqh 0 8cqh;border-radius:3cqh;gap:1cqh}
  .coin-icon{width:9cqh;height:9cqh;border-width:1cqh;left:-2.5cqh;top:-.5cqh;box-shadow:.7cqh .6cqh #c7830b}
  .coin-icon i{width:5cqh;height:5cqh;font-size:4.5cqh;right:-2.5cqh;bottom:-3cqh}
  .level-heading{top:2.5cqh;width:auto;min-width:34cqh}
  .level-heading h2{font-size:6.5cqh;padding:1cqh 3cqh 1.4cqh;border-radius:3cqh}
  .difficulty{font-size:3.6cqh;padding:.6cqh 2.5cqh;top:1.2cqh}
  .paw{width:5cqh;height:5cqh;top:-3.5cqh}
  .scoreboard{top:18cqh;left:auto;right:3cqh;width:32cqh;flex-direction:column;align-items:flex-end;gap:1cqh;font-size:3cqh}
  .scoreboard small{font-size:2.8cqh}.scoreboard b{font-size:5cqh}.scoreboard .target-score>b{font-size:3cqh}
  .board{top:20cqh;height:70cqh;left:3cqh;right:30cqh;width:auto}
  .board .bottle,.board.cols-6 .bottle,.board.cols-5 .bottle,.board.cols-4 .bottle,.board.cols-3 .bottle,.board.rows-3 .bottle{width:12cqh;height:31cqh}
  .board.wide .bottle{width:min(12cqh,10%)}
  .bottle.selected{transform:translateY(-2.5cqh)}
  .play-meta{top:auto;bottom:3cqh;left:3cqh;right:auto;gap:4cqh;font-size:3.2cqh}
  .message{top:auto;bottom:9cqh;left:3cqh;width:auto;right:30cqh;font-size:3.4cqh;min-height:0}
  .tools{top:42cqh;left:auto;right:3cqh;width:24cqh;display:grid;grid-template-columns:1fr 1fr;gap:2.5cqh}
  .tools button{width:auto;height:15cqh;border-radius:3cqh}
  .tools button img{width:8.5cqh;height:8.5cqh}
  .tools button small{font-size:2.6cqh;min-width:4.5cqh;line-height:4.5cqh;border-radius:2.5cqh}
  .pink-footer,.dfg-credit{display:none}
  .win-bar{top:auto;bottom:4cqh;left:auto;right:3cqh;width:42cqh;gap:2cqh}
  .win-bar .home-btn{width:14cqh;height:14cqh}.next-round{height:14cqh;font-size:5cqh;border-radius:3cqh}.next-round img{width:5cqh;height:5cqh}
  /* Home and level select in landscape: two columns. */
  .home-top{top:4cqh;left:3cqh;right:3cqh}
  .home-coins{font-size:4.5cqh;padding:1.5cqh 3cqh;border-radius:3cqh}.coin-dot{width:4cqh;height:4cqh;border-width:.7cqh}
  .home-title{top:6cqh;left:0;width:50%}
  .home-title>span{font-size:2.8cqh;letter-spacing:.8cqh}
  .home-title h1{font-size:15cqh;margin:3cqh 0 1cqh;letter-spacing:-.6cqh}.home-title h1 strong{font-size:18cqh}
  .home-title p{font-size:4cqh;margin:2cqh 0}
  .home-bottles{top:auto;bottom:10cqh;height:24cqh;left:15%;width:20%;gap:2cqh}
  .home-progress{top:20cqh;left:54%;width:40%;padding:3cqh 1cqh;border-radius:3cqh}
  .home-progress small{font-size:2.6cqh}.home-progress b{font-size:6.5cqh}.home-progress b span{font-size:3.5cqh}
  .home-play{top:44cqh;left:54%;width:40%;font-size:6.5cqh;padding:3cqh 5cqh;border-radius:4cqh}
  .home-play img{width:5.5cqh;height:5.5cqh}
  .home-save{top:64cqh;left:54%;width:40%;font-size:3cqh}
  .home-actions{top:71cqh;left:54%;width:40%}
  .home-actions img{width:8cqh;height:8cqh}.home-actions span{font-size:3.2cqh}
  .home-trim{height:2.5cqh;border-radius:0}.home-trim>span,.home-trim .scallops{display:none}
  .levels-grid{bottom:3cqh}
  .levels-top{top:3cqh;left:3cqh;right:3cqh}.levels-top h2{font-size:8cqh}
  .levels-stars{font-size:4cqh;padding:1.5cqh 3cqh;border-radius:3cqh}.levels-stars img{width:5cqh;height:5cqh}
  .levels-tiers{top:19cqh;left:3cqh;right:3cqh;justify-content:center}
  .levels-tiers button{font-size:3.4cqh;padding:1.8cqh 3.5cqh;border-radius:5cqh}
  .levels-grid{top:32cqh;bottom:7cqh;left:3cqh;right:3cqh;grid-template-columns:repeat(10,1fr);gap:2cqh}
  .lvl{font-size:5cqh;border-radius:2.5cqh;aspect-ratio:auto;height:19cqh}.lvl .stars img{width:3.6cqh;height:3.6cqh}.lvl small{font-size:2.4cqh}
  .lvl.locked img.lock{width:6cqh;height:6cqh}
}

/* Very wide desktop windows: keep the portrait canvas, add a soft frame. */
@media (min-width:900px) and (min-height:600px){.game{border-radius:18px}}
