/* Moon Lantern Garden, chapter 2 of The Lost Constellation. */
.moon-garden-level.moon-garden-expedition {
  z-index: 50;
  display: flex;
  flex-direction: column;
  padding: 16px clamp(12px, 2.3vw, 36px) 20px;
  padding-top: max(16px, env(safe-area-inset-top));
  overflow: auto;
  color: #243e3d;
  background: #f4f2e7;
  font-family: "Inter", system-ui, sans-serif;
}
.garden-expedition-header {
  width: 100%; max-width: 1600px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 20px; padding: 0 0 16px;
}
.garden-exit, .garden-panel-footer button {
  justify-self: start; min-height: 44px; border: 1px solid #bfcfc4;
  border-radius: 12px; background: #fffdf6; color: #294841;
  padding: 10px 16px; font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.garden-title { text-align: center; }
.garden-title > span { font-size: 10px; font-weight: 800; letter-spacing: 1.8px; text-transform: uppercase; color: #6b7c6d; }
.garden-title h1 { margin: 4px 0 0; font-family: Georgia, serif; font-size: clamp(23px, 2.3vw, 37px); font-weight: 500; letter-spacing: -1px; }
.garden-chapters { display: flex; gap: 8px; justify-self: end; }
.garden-chapters span { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #c6d1c5; border-radius: 50%; font-size: 12px; color: #6d7c73; }
.garden-chapters .active { background: #244c42; border-color: #244c42; color: #fffdf2; box-shadow: 0 0 0 4px #e1e9dc; }
.garden-chapters .done { background: #dce8ce; color: #33543c; }
.garden-expedition-body {
  flex: 1; min-height: 450px; max-height: 1000px; width: 100%; max-width: 1600px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(300px, 27vw, 380px);
  border-radius: 24px; overflow: hidden; border: 1px solid #d4dacb; box-shadow: 0 20px 60px #394a3614;
}
.garden-world { position: relative; min-height: 0; overflow: hidden; background: #26414c; }
.garden-canvas { position: absolute; inset: 0; }
.garden-canvas canvas { width: 100% !important; height: 100% !important; display: block; }
.garden-location { pointer-events: none; position: absolute; top: 25px; left: 26px; max-width: calc(100% - 150px); color: #fffbea; text-shadow: 0 2px 13px #17302acc; }
.garden-location > span { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; font-weight: 800; }
.garden-location h2 { font: 500 clamp(26px, 3vw, 45px)/1.1 Georgia, serif; margin: 7px 0; letter-spacing: -0.8px; }
.garden-location p { margin: 0; max-width: 300px; font-size: 13px; line-height: 1.45; color: #faf5e6; }
.garden-sky-count { position: absolute; right: 22px; top: 25px; width: 90px; display: flex; flex-direction: column; align-items: center; color: #fff7dc; background: #143e455c; border: 1px solid #fff7d244; border-radius: 17px; padding: 10px; backdrop-filter: blur(12px); }
.garden-sky-count strong { font: 500 34px/1.05 Georgia, serif; }
.garden-sky-count span { font-size: 10px; text-align: center; margin-top: 5px; }
.garden-seed-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; position: absolute; bottom: 18px; left: 10%; right: 10%; }
.garden-seed-picker button { min-height: 53px; padding: 7px 8px; border-radius: 14px; border: 1px solid #f8e6bf66; background: #153e43b8; color: #fff9e9; cursor: pointer; backdrop-filter: blur(12px); }
.garden-seed-picker span { display: block; font-size: 13px; font-weight: 800; }
.garden-seed-picker small { display: block; margin-top: 4px; color: #e1eee3; font-size: 10px; }
.garden-seed-picker .selected { background: #f8edd4f2; color: #294b40; border-color: #fff7d8; box-shadow: 0 0 0 3px #fff9d033; }
.garden-seed-picker .selected small { color: #486650; }
.garden-seed-picker button:disabled { cursor: default; }
.garden-play-panel { display: flex; flex-direction: column; gap: 17px; padding: clamp(18px, 2vw, 30px); background: linear-gradient(155deg, #fffdf6, #edf0e3); border-left: 1px solid #d4dacb; }
.garden-friend-row { display: flex; align-items: center; gap: 8px; min-height: 74px; }
.garden-friend-portrait { flex: 0 0 70px; width: 70px; height: 70px; background-size: 280px 140px; background-position: 0 0; border-radius: 50%; filter: drop-shadow(0 6px 8px #9cbeaf55); }
.garden-friend-portrait.friend-0 { background-image: url("../data/generated-assets/moon-aliens-v2/alien-blue-helper-atlas-v3.png"); }
.garden-friend-portrait.friend-1 { background-image: url("../data/generated-assets/moon-aliens-v2/alien-green-guide-atlas-v3.png"); }
.garden-friend-portrait.friend-2 { background-image: url("../data/generated-assets/moon-aliens-v2/alien-lavender-scout-atlas-v3.png"); }
.garden-friend-row small { font-size: 10px; text-transform: uppercase; letter-spacing: 1.3px; color: #6d8274; font-weight: 800; }
.garden-friend-row h2 { font: 500 25px/1.14 Georgia, serif; margin: 7px 0 0; letter-spacing: -0.5px; }
.garden-status { margin: 0; font-size: 14px; line-height: 1.6; color: #4a6458; min-height: 89px; }
.garden-magic-label { display: flex; flex-direction: column; gap: 5px; margin-top: auto; }
.garden-magic-label strong { font-size: 14px; color: #294b40; }
.garden-magic-label span { font-size: 11px; color: #738374; }
.garden-magic-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.garden-magic { display: flex; flex-direction: column; align-items: center; gap: 7px; min-height: 116px; padding: 13px 4px 10px; border: 1px solid #d5d8bd; border-radius: 18px; cursor: pointer; font-family: inherit; color: #354d3c; transition: transform 160ms, box-shadow 160ms; }
.garden-magic.magic-light { background: #fff2c5; border-color: #e8d696; }
.garden-magic.magic-water { background: #def1ee; border-color: #b1d9d7; }
.garden-magic.magic-crystal { background: #eae1f5; border-color: #d2c4e2; }
.garden-magic b { font-size: 16px; }
.garden-magic small { font-size: 10px; color: #526653; white-space: nowrap; }
.garden-magic:enabled:hover { transform: translateY(-3px); box-shadow: 0 6px 14px #203c3a18; }
.garden-magic:enabled:active { transform: translateY(1px) scale(0.97); }
.garden-magic:disabled { opacity: 0.5; cursor: default; }
.garden-magic-symbol { display: block; width: 32px; height: 32px; position: relative; }
.magic-light .garden-magic-symbol { border-radius: 50%; background: radial-gradient(circle at 38% 32%, #fffdf0 0, #fff7af 28%, #eab441 74%, #bd842c); box-shadow: 0 0 0 4px #e9bd5333, 0 0 19px #edd581; }
.magic-water .garden-magic-symbol { border-radius: 52% 52% 52% 7%; width: 26px; height: 30px; transform: rotate(-45deg); background: radial-gradient(circle at 65% 35%, #efffff 5%, #83dce8 40%, #399cba 90%); box-shadow: 0 4px 9px #2e9faf22; }
.magic-crystal .garden-magic-symbol { background: linear-gradient(115deg, #fcf5ff, #c89ae3 45%, #9972cd 46%, #d9b9ef 80%); clip-path: polygon(50% 0, 92% 43%, 50% 100%, 8% 43%); }
.garden-helper { display: flex; flex-direction: column; gap: 5px; align-items: center; justify-content: center; min-height: 56px; padding: 10px 9px; border-radius: 13px; border: 1px solid #bccfba; background: #e0ecd4; color: #37513a; font-size: 12px; font-weight: 800; cursor: pointer; font-family: inherit; }
.garden-helper small { color: #62745e; font-size: 10px; font-weight: 500; }
.garden-helper:disabled { background: #eef0e5; border-style: dashed; color: #6d806c; cursor: default; }
.garden-next, .garden-finale-card button { min-height: 56px; padding: 13px; border-radius: 14px; border: 1px solid #235746; background: #285d4b; color: #fff8df; font-family: inherit; font-size: 14px; font-weight: 800; cursor: pointer; box-shadow: 0 4px 0 #183d31; }
.garden-sending { margin: 0; padding: 15px 10px; border-radius: 13px; background: #eee6c8; font-size: 13px; text-align: center; }
.garden-panel-footer { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 3px; }
.garden-panel-footer > span { text-align: center; font-size: 9px; color: #84917e; }
.garden-panel-footer button { min-height: 44px; padding: 7px 15px; background: transparent; border-color: transparent; text-decoration: underline; color: #75836c; font-size: 11px; }
.garden-finale-card { position: absolute; z-index: 3; inset: 30% 16% auto; background: #fff9e7f0; border: 1px solid #fff4c9; border-radius: 23px; color: #355041; text-align: center; padding: 27px; box-shadow: 0 20px 70px #152e3859; backdrop-filter: blur(16px); }
.garden-finale-card > span { font-size: 10px; text-transform: uppercase; letter-spacing: 2px; font-weight: 800; color: #7d825f; }
.garden-finale-card h2 { margin: 10px 0; font: 500 clamp(29px, 3vw, 43px)/1.1 Georgia, serif; }
.garden-finale-card p { font-size: 13px; margin: 10px 0 20px; }
.garden-finale-card button { width: 100%; }
.moon-garden-expedition button:focus-visible { outline: 3px solid #258779; outline-offset: 3px; }
@media (max-width: 1000px) {
  .garden-expedition-header { grid-template-columns: 1fr auto; gap: 10px; }
  .garden-title { text-align: left; grid-column: 1; grid-row: 1; }
  .garden-exit { grid-column: 2; grid-row: 1; padding: 9px 12px; max-width: 140px; }
  .garden-chapters { display: none; }
  .garden-expedition-body { grid-template-columns: minmax(0, 1fr) 295px; }
  .garden-play-panel { gap: 13px; padding: 19px; }
  .garden-status { font-size: 13px; }
  .garden-friend-row h2 { font-size: 22px; }
  .garden-location { left: 18px; top: 20px; max-width: calc(100% - 115px); }
  .garden-sky-count { right: 15px; top: 20px; width: 65px; }
}
@media (max-width: 760px) {
  .moon-garden-level.moon-garden-expedition { padding: 11px 10px 12px; padding-top: max(11px, env(safe-area-inset-top)); }
  .garden-expedition-header { padding-bottom: 11px; }
  .garden-title > span { font-size: 8px; letter-spacing: 0.9px; }
  .garden-title h1 { font-size: 24px; letter-spacing: -0.7px; }
  .garden-exit { font-size: 11px; padding: 7px 8px; max-width: 105px; }
  .garden-expedition-body { flex: none; min-height: 0; max-height: none; grid-template-columns: 1fr; overflow: visible; border-radius: 18px; }
  .garden-world { height: clamp(300px, 39svh, 360px); border-radius: 17px 17px 0 0; }
  .garden-play-panel { border-left: 0; border-top: 1px solid #d4dacb; border-radius: 0 0 17px 17px; padding: 16px; gap: 12px; display: grid; grid-template-columns: 1fr; }
  .garden-friend-row { min-height: 49px; gap: 7px; }
  .garden-friend-portrait { width: 51px; height: 51px; flex-basis: 51px; background-size: 204px 102px; }
  .garden-friend-row small { font-size: 9px; }
  .garden-friend-row h2 { margin-top: 4px; font-size: 23px; }
  .garden-status { min-height: 0; font-size: 12px; line-height: 1.5; }
  .garden-location { max-width: calc(100% - 110px); left: 18px; top: 18px; }
  .garden-location h2 { font-size: 28px; }
  .garden-location p { font-size: 11px; }
  .garden-location > span { font-size: 9px; }
  .garden-sky-count { width: 64px; top: 17px; right: 13px; padding: 8px; }
  .garden-sky-count strong { font-size: 28px; }
  .garden-sky-count span { font-size: 9px; }
  .garden-magic-label { margin: 0; flex-direction: row; justify-content: space-between; align-items: center; gap: 10px; }
  .garden-magic-label strong { font-size: 12px; }
  .garden-magic-label span { font-size: 9px; }
  .garden-magic-controls { gap: 10px; }
  .garden-magic { min-height: 84px; padding: 10px 5px; gap: 4px; border-radius: 14px; }
  .garden-magic-symbol { width: 24px; height: 24px; }
  .magic-water .garden-magic-symbol { width: 21px; height: 24px; }
  .garden-magic b { font-size: 15px; }
  .garden-helper { min-height: 49px; padding: 8px; }
  .garden-panel-footer { padding: 0; gap: 4px; }
  .garden-panel-footer > span { display: none; }
  .garden-seed-picker { bottom: 12px; left: 6%; right: 6%; gap: 8px; }
  .garden-seed-picker button { min-height: 47px; border-radius: 12px; }
  .garden-seed-picker span { font-size: 12px; }
  .garden-finale-card { inset: 21% 7% auto; padding: 18px; max-height: 75%; overflow: auto; }
}
@media (max-height: 670px) and (min-width: 761px) {
  .moon-garden-level.moon-garden-expedition { padding-top: 10px; }
  .garden-expedition-header { padding-bottom: 9px; }
  .garden-title h1 { font-size: 25px; }
  .garden-expedition-body { min-height: 480px; }
  .garden-play-panel { gap: 11px; padding: 16px 18px; }
  .garden-friend-row { min-height: 50px; }
  .garden-friend-portrait { width: 51px; height: 51px; flex-basis: 51px; background-size: 204px 102px; }
  .garden-friend-row h2 { font-size: 22px; }
  .garden-status { min-height: 0; font-size: 12px; }
  .garden-magic { min-height: 92px; padding: 10px 4px; gap: 5px; }
}
@media (prefers-reduced-motion: reduce) { .garden-magic { transition: none; } }
