/* Feed the Plant (shared look copied from the colour lab) — fixed 1920×1080 stage scaled into the container.
   Same visual language as the circuit game: Baloo Bhaijaan 2, chunky cards with a solid
   bottom shadow, blue gradient menu, big stars, dashed "did you know?" box.
   Everything is scoped under .ls-plant so nothing leaks into the site. */

.ls-plant {
  --ink: #1d2a44;
  --blue: #1e5bd8;
  --blue-dark: #163f9c;
  --sky: #eaf5ff;
  --paper: #fffaf0;
  --yellow: #ffd54f;
  --orange: #ff9800;
  --green: #2e9d4f;
  --red: #e53935;
  --font: 'Baloo Bhaijaan 2', 'Tajawal', 'Segoe UI', Tahoma, Arial, sans-serif;
  position: relative; height: 100%; overflow: hidden;
  background: #0d1b3a; color: var(--ink); font-family: var(--font);
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.ls-plant, .ls-plant * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
.ls-plant button { font-family: inherit; color: inherit; cursor: pointer; }
.ls-plant button:focus-visible { outline: 6px solid #ffb300; outline-offset: 6px; }
.ls-plant [hidden] { display: none !important; }

.ls-plant #viewport { position: absolute; inset: 0; overflow: hidden; }
.ls-plant #stage {
  position: absolute; left: 0; top: 0; width: 1920px; height: 1080px;
  transform-origin: 0 0; overflow: hidden; background: var(--sky);
}
.ls-plant .screen { position: absolute; inset: 0; display: none; }
.ls-plant .screen.active { display: block; }

/* ---------------------------------------------------------------- menu */
.ls-plant #screen-menu { background: linear-gradient(160deg, #2a62d6, #173b8c); }
.ls-plant .menu-title { margin: 0; padding: 60px 0 30px; text-align: center; color: #fff; font-size: 76px; font-weight: 800; }
.ls-plant #menu-cards { display: grid; grid-template-columns: repeat(4, 380px); gap: 36px; justify-content: center; }
.ls-plant .level-card {
  position: relative; height: 380px; border: none; border-radius: 36px;
  background: #fff; box-shadow: 0 12px 0 #0b2466, 0 20px 40px #0006;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  transition: transform .12s;
}
.ls-plant .level-card:active { transform: translateY(8px) scale(.97); box-shadow: 0 4px 0 #0b2466; }
.ls-plant .level-card .lc-icon { font-size: 110px; line-height: 1.1; }
.ls-plant .level-card .lc-num { font-size: 28px; font-weight: 700; color: #5a6b8c; }
.ls-plant .level-card .lc-name { font-size: 40px; font-weight: 800; padding: 0 16px; text-align: center; line-height: 1.15; }
.ls-plant .level-card .lc-stars { font-size: 46px; letter-spacing: 6px; color: #d7deea; }
.ls-plant .level-card .lc-stars .on { color: var(--yellow); text-shadow: 0 2px 0 #c77800; }
.ls-plant .level-card.lab { background: linear-gradient(160deg, #fff8e1, #ffe082); }
.ls-plant .level-card.locked { background: linear-gradient(160deg, #eceff1, #cfd8dc); color: #546e7a; }
.ls-plant .level-card .lc-badge {
  position: absolute; top: -18px; inset-inline-start: -14px;
  background: var(--red); color: #fff; font-size: 30px; font-weight: 800;
  padding: 6px 22px; border-radius: 30px; transform: rotate(-6deg);
  box-shadow: 0 4px 0 #8e1b1b; animation: lc-wobble 1.8s ease-in-out infinite;
}
@keyframes lc-wobble { 50% { transform: rotate(4deg) scale(1.08); } }
.ls-plant .pill-btn {
  position: absolute; top: 28px; inset-inline-end: 40px;
  min-width: 160px; height: 72px; padding: 0 28px; border-radius: 36px;
  border: 3px solid #ffffff99; background: #ffffff22; color: #fff; font-size: 30px; font-weight: 700;
}

/* ---------------------------------------------------------------- level layout */
.ls-plant #screen-level.active {
  display: grid;
  grid-template-columns: 560px 1360px;
  grid-template-rows: 100px 860px 120px;
  grid-template-areas: "top top" "care garden" "controls controls";
}
.ls-plant #topbar {
  grid-area: top; display: flex; align-items: center; gap: 30px; padding-inline: 40px;
  background: linear-gradient(90deg, var(--blue-dark), var(--blue)); color: #fff;
  box-shadow: 0 4px 12px #0003; z-index: 3;
}
.ls-plant .tb-text { flex: 1; display: flex; align-items: baseline; gap: 26px; min-width: 0; }
.ls-plant #level-name { font-size: 34px; font-weight: 800; white-space: nowrap; background: #ffffff26; padding: 4px 22px; border-radius: 30px; }
.ls-plant #challenge { font-size: 38px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ls-plant #turn-count { font-size: 28px; font-weight: 700; color: #ffffffcc; white-space: nowrap; }
.ls-plant #level-stars { font-size: 48px; letter-spacing: 4px; color: #ffffff55; white-space: nowrap; }
.ls-plant #level-stars .on { color: var(--yellow); }

/* controls */
.ls-plant #controls {
  grid-area: controls; display: flex; align-items: center; justify-content: center; gap: 34px;
  background: #dcebfb; border-top: 4px solid #c5dbf3; z-index: 2;
}
.ls-plant .ctrl {
  width: 96px; height: 96px; border-radius: 26px; border: none; background: #fff; box-shadow: 0 6px 0 #a9c3e2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; transition: transform .08s;
}
.ls-plant .ctrl:active { transform: translateY(5px); box-shadow: 0 1px 0 #a9c3e2; }
.ls-plant .ctrl .ico { font-size: 44px; line-height: 1; }
.ls-plant .ctrl .lbl { font-size: 17px; font-weight: 700; line-height: 1.2; }

/* ---------------------------------------------------------------- Qatra + bubble */
/* Qatra */
.ls-plant #qatra { position: absolute; bottom: 140px; inset-inline-end: 34px; width: 170px; height: 170px; z-index: 6; pointer-events: none; }
.ls-plant .qatra-svg { width: 100%; height: 100%; overflow: visible; }
.ls-plant .qa-body { fill: var(--qa, #64b5f6); stroke: var(--qa-dark, #1e5bd8); stroke-width: 5; stroke-linejoin: round; transition: fill .5s, stroke .5s; }
.ls-plant .qa-aura { fill: var(--qa, #64b5f6); opacity: .22; transition: fill .5s; }
.ls-plant .qa-arm path { fill: none; stroke: var(--qa-dark, #1e5bd8); stroke-width: 7; stroke-linecap: round; }
.ls-plant .qa-arm circle { fill: var(--qa, #64b5f6); stroke: var(--qa-dark, #1e5bd8); stroke-width: 3; }
.ls-plant .qa-bob { animation: qa-bob 2.4s ease-in-out infinite; }
@keyframes qa-bob { 50% { transform: translateY(-7px); } }
.ls-plant .qa-arm-r { transform-origin: 50px 32px; }
.ls-plant .qa-arm-l { transform-origin: -50px 32px; }
.ls-plant .qatra-slot.cheer .qatra-svg { animation: qa-cheer .5s ease-in-out 2; }
@keyframes qa-cheer { 40% { transform: translateY(-50px) rotate(-12deg); } 70% { transform: translateY(0) rotate(8deg); } }
.ls-plant .qatra-slot.cheer .qa-arm { animation: qa-wave .25s ease-in-out infinite alternate; }
@keyframes qa-wave { from { transform: rotate(10deg); } to { transform: rotate(-40deg); } }
.ls-plant .qatra-slot.flash .qatra-svg { animation: qa-flash .3s ease-in-out 6 alternate; }
@keyframes qa-flash { to { filter: drop-shadow(0 0 22px #ffeb3b) brightness(1.15); transform: scale(1.1); } }
.ls-plant .qatra-slot.worried .qatra-svg { animation: qa-shake .12s linear 8; }
@keyframes qa-shake { 25% { transform: translate(-4px, 1px) rotate(-3deg); } 75% { transform: translate(4px, -1px) rotate(3deg); } }

.ls-plant #bubble {
  position: absolute; bottom: 400px; inset-inline-end: 150px; z-index: 6; max-width: 560px; padding: 18px 28px;
  background: #fff; border: 4px solid var(--orange); border-radius: 30px;
  font-size: 32px; font-weight: 700; line-height: 1.3; box-shadow: 0 8px 20px #0003; pointer-events: none;
}
.ls-plant #bubble::after {
  content: ''; position: absolute; bottom: -22px; inset-inline-end: 24px;
  border: 14px solid transparent; border-top: 18px solid var(--orange);
}
.ls-plant #bubble.pop { animation: col-pop .35s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes col-pop { from { transform: scale(.4); opacity: 0; } }

/* ---------------------------------------------------------------- overlays (same as circuit) */
.ls-plant .overlay { position: absolute; inset: 0; z-index: 20; background: #0d1b3acc; display: flex; align-items: center; justify-content: center; }
.ls-plant .card {
  background: #fff; border-radius: 44px; padding: 44px 64px; box-shadow: 0 16px 0 #0b2466, 0 30px 60px #0008;
  text-align: center; animation: col-cardin .45s cubic-bezier(.3, 1.5, .5, 1);
}
@keyframes col-cardin { from { transform: scale(.5) translateY(80px); opacity: 0; } }
.ls-plant .card h2 { margin: 0 0 8px; font-size: 72px; font-weight: 800; color: var(--blue-dark); }
.ls-plant .big-stars { font-size: 110px; letter-spacing: 12px; color: #dde3ec; line-height: 1.1; }
.ls-plant .big-stars span { display: inline-block; }
.ls-plant .big-stars .on { color: var(--yellow); text-shadow: 0 5px 0 #c77800; animation: col-star .5s cubic-bezier(.3, 1.8, .5, 1) backwards; }
@keyframes col-star { from { transform: scale(0) rotate(-90deg); } }
.ls-plant .success-card { width: 1100px; }
.ls-plant .dyk { background: #fff8e1; border: 4px dashed #ffca28; border-radius: 30px; padding: 18px 36px; margin: 18px 0 30px; }
.ls-plant .dyk h3 { margin: 0; font-size: 40px; color: #e65100; }
.ls-plant .dyk p { margin: 8px 0 0; font-size: 36px; font-weight: 600; line-height: 1.4; }
.ls-plant .card-buttons { display: flex; gap: 30px; justify-content: center; }
.ls-plant .btn {
  min-width: 300px; height: 110px; padding: 0 44px; border-radius: 55px; border: none;
  background: #e3ebf7; font-size: 42px; font-weight: 800; box-shadow: 0 8px 0 #a9bad4;
}
.ls-plant .btn.primary { background: var(--green); color: #fff; box-shadow: 0 8px 0 #1b6b33; }
.ls-plant .btn:active { transform: translateY(6px); box-shadow: 0 2px 0 #a9bad4; }
.ls-plant .cert-card { width: 1200px; border: 14px double #ffca28; background: linear-gradient(#fffdf5, #fff6dc); }
.ls-plant .cert-medal { font-size: 120px; line-height: 1; }
.ls-plant .cert-qatra { width: 180px; height: 180px; margin: 0 auto; }
.ls-plant #cert-body { font-size: 44px; font-weight: 700; margin: 6px 0; }
.ls-plant #cert-stars bdi { color: #c77800; font-size: 90px; font-weight: 800; }

@media (prefers-reduced-motion: reduce) {
  .ls-plant *, .ls-plant *::before, .ls-plant *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ================================================================ Feed the Plant specifics */
.ls-plant #qatra { bottom: 4px; inset-inline-end: 30px; width: 160px; height: 160px; }
.ls-plant #bubble { bottom: 16px; inset-inline-end: 196px; max-width: 560px; font-size: 27px; padding: 12px 22px; /* stays clear of the centred control buttons */ }
.ls-plant #bubble::after { bottom: auto; top: 50%; inset-inline-end: -26px; transform: translateY(-50%); border: 13px solid transparent; border-inline-start: 18px solid var(--orange); }

.ls-plant #care {
  grid-area: care; background: var(--paper); border-inline-end: 4px solid #f0dfb8;
  padding: 18px 28px; display: flex; flex-direction: column; gap: 10px; z-index: 2; overflow: hidden;
}
.ls-plant .mood {
  font-size: 26px; font-weight: 800; line-height: 1.25; text-align: center; padding: 10px 14px; border-radius: 22px;
  background: #fff; box-shadow: 0 5px 0 #e3cf9f; min-height: 2.6em; display: grid; place-items: center;
}
.ls-plant .mood[data-kind="happy"] { background: #e8f5e9; color: #1b6b33; }
.ls-plant .mood[data-kind="thirsty"], .ls-plant .mood[data-kind="soggy"], .ls-plant .mood[data-kind="dark"] { background: #fff3e0; color: #b45309; }
.ls-plant .mood[data-kind="dead"] { background: #ffebee; color: #b71c1c; }

.ls-plant .gauge { display: flex; flex-direction: column; gap: 4px; }
.ls-plant .g-label { font-size: 21px; font-weight: 800; }
.ls-plant .g-track { position: relative; height: 24px; border-radius: 12px; background: #e7edf5; overflow: hidden; box-shadow: inset 0 3px 0 #0000000f; }
.ls-plant .g-fill { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; border-radius: 15px; transition: width .6s cubic-bezier(.3, 1.2, .5, 1); }
.ls-plant .g-band { position: absolute; inset-block: 0; background: repeating-linear-gradient(45deg, #a5d6a7 0 10px, #c8e6c9 10px 20px); opacity: .9; }
.ls-plant #g-moist .g-fill { background: #42a5f5aa; }
.ls-plant .g-mark { position: absolute; top: -2px; bottom: -2px; width: 8px; border-radius: 4px; background: #1d2a44; transition: inset-inline-start .4s; }
.ls-plant #g-health .g-fill { background: var(--green); }
.ls-plant #g-health[data-level="mid"] .g-fill { background: var(--orange); }
.ls-plant #g-health[data-level="low"] .g-fill { background: var(--red); }
.ls-plant #g-height .g-fill { background: #8bc34a; }

.ls-plant #setup { display: flex; flex-direction: column; gap: 8px; }
.ls-plant .set-group { display: flex; flex-direction: column; gap: 4px; }
.ls-plant .set-title { font-size: 21px; font-weight: 800; }
.ls-plant .seg { display: flex; gap: 8px; }
.ls-plant .seg-btn {
  flex: 1; height: 56px; border: none; border-radius: 18px; background: #fff; font-size: 23px; font-weight: 800;
  box-shadow: 0 5px 0 #d8c69d;
}
.ls-plant .seg-btn.on { background: #ffe082; box-shadow: 0 5px 0 #c79a00, inset 0 0 0 4px #ffb300; }
.ls-plant .seg-btn:active, .ls-plant .step-btn:active, .ls-plant .soil-btn:active { transform: translateY(4px); }
.ls-plant .soil-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border-radius: 22px; }
.ls-plant .soil-btn {
  display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: start;
  border: none; border-radius: 18px; background: #fff; padding: 5px 10px; box-shadow: 0 5px 0 #d8c69d;
}
.ls-plant .soil-btn i { grid-row: span 2; width: 36px; height: 36px; border-radius: 50%; background: var(--soil); box-shadow: inset 0 -6px 0 #0002, 0 0 0 3px #fff, 0 0 0 5px #0001; }
.ls-plant .soil-btn b { font-size: 22px; }
.ls-plant .soil-btn small { font-size: 16px; color: #5a6b8c; font-weight: 700; }
.ls-plant .soil-btn.on { background: #ffe082; box-shadow: 0 5px 0 #c79a00, inset 0 0 0 4px #ffb300; }
.ls-plant .soil-btn:disabled { opacity: .55; }
.ls-plant .stepper { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 22px; padding: 6px; box-shadow: 0 5px 0 #d8c69d; }
.ls-plant .step-btn { width: 60px; height: 50px; border: none; border-radius: 18px; background: #e3f2fd; font-size: 40px; font-weight: 800; color: #1565c0; }
.ls-plant .drops { flex: 1; text-align: center; font-size: 34px; letter-spacing: 2px; }
.ls-plant .drops .none { font-size: 22px; font-weight: 800; color: #8a97ad; letter-spacing: 0; }
.ls-plant .run-row { margin-top: auto; }
.ls-plant .big-btn {
  width: 100%; min-height: 84px; border: none; border-radius: 28px; font-size: 38px; font-weight: 800;
  background: var(--green); color: #fff; box-shadow: 0 8px 0 #1b6b33;
}
.ls-plant .big-btn:active { transform: translateY(6px); box-shadow: 0 2px 0 #1b6b33; }
.ls-plant .big-btn:disabled { opacity: .55; }
.ls-plant .hint-glow { animation: pl-hint 1s ease-in-out infinite; }
@keyframes pl-hint { 50% { box-shadow: 0 0 0 8px #ffeb3b, 0 0 30px 10px #ffeb3b; } }

.ls-plant #garden { grid-area: garden; position: relative; overflow: hidden; }
.ls-plant #scene { width: 100%; height: 100%; display: block; }
.ls-plant #can { position: absolute; left: 540px; top: 120px; width: 220px; opacity: 0; pointer-events: none; transform-origin: 30% 70%; }
.ls-plant #can svg { width: 100%; height: auto; }
.ls-plant #can.pour { animation: pl-pour 1.3s ease-in-out; }
@keyframes pl-pour { 0% { opacity: 0; transform: translate(-60px, -20px) rotate(0); } 20% { opacity: 1; transform: translate(0, 0) rotate(0); } 55% { opacity: 1; transform: rotate(28deg); } 85% { opacity: 1; transform: rotate(28deg); } 100% { opacity: 0; transform: translate(-30px, -20px) rotate(0); } }
.ls-plant .raindrop { transform: translate(var(--x), 330px); opacity: 0; animation: pl-drop .9s ease-in forwards; }
@keyframes pl-drop { 0% { opacity: 1; transform: translate(var(--x), 330px); } 100% { opacity: .2; transform: translate(var(--x), 590px); } }

/* lab: four plant/season buttons in one row, no height goal */
.ls-plant #care.lab .seg-btn { font-size: 19px; padding: 0 4px; }
.ls-plant #care.lab .seg-btn.season { flex: .8; }
.ls-plant #care.lab .gauge:has(#g-height) { display: none; }
