:root {
  color-scheme: light;
  --ink: #27312d;
  --muted: #61706a;
  --paper: #fff8dc;
  --panel: #fffdf5;
  --grass: #86d867;
  --grass-dark: #48a858;
  --sky: #dff8ff;
  --sun: #ffd94d;
  --coral: #ff7f8f;
  --blue: #47a8df;
  --shadow: rgba(39, 49, 45, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    system-ui,
    sans-serif;
  background: linear-gradient(180deg, var(--sky), #fff3b8 46%, #b8ec83);
}

body.is-auth-required {
  overflow: hidden;
}

button {
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.guide-link {
  position: fixed;
  z-index: 20;
  top: 16px;
  left: 16px;
  display: grid;
  place-items: center;
  min-width: 58px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(72, 168, 88, 0.2);
  border-radius: 999px;
  color: #287a46;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  background: rgba(255, 253, 245, 0.92);
  box-shadow: 0 8px 20px var(--shadow);
}

.identity-gate {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 28px 18px;
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 255, 255, 0.92) 0 4%, transparent 18%),
    linear-gradient(145deg, #dff8ff, #fff4cf 58%, #bde98e);
}

.identity-gate.is-hidden {
  display: none;
}

.identity-card {
  display: grid;
  gap: 18px;
  width: min(520px, 100%);
  padding: 30px;
  border: 1px solid rgba(72, 168, 88, 0.18);
  border-radius: 24px;
  background: rgba(255, 253, 245, 0.97);
  box-shadow: 0 28px 80px rgba(39, 73, 52, 0.2);
}

.identity-card header > span {
  color: #397655;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.identity-card h1 {
  margin: 7px 0 8px;
  color: #286744;
  font-size: clamp(28px, 6vw, 40px);
  line-height: 1.15;
}

.identity-card header p,
.identity-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

#loginForm {
  display: grid;
  gap: 14px;
}

.identity-accounts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.identity-accounts legend {
  grid-column: 1 / -1;
  margin-bottom: 8px;
  color: #42534a;
  font-size: 13px;
  font-weight: 800;
}

.identity-accounts label {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  padding: 10px;
  border: 2px solid rgba(72, 168, 88, 0.16);
  border-radius: 14px;
  cursor: pointer;
  background: #fff;
}

.identity-accounts label:has(input:checked) {
  border-color: #48a858;
  background: #eff9e9;
  box-shadow: 0 0 0 3px rgba(72, 168, 88, 0.1);
}

.identity-accounts label:has(input:focus-visible) {
  outline: 3px solid rgba(71, 168, 223, 0.45);
  outline-offset: 2px;
}

.identity-accounts input {
  position: absolute;
  opacity: 0;
}

.identity-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  font-weight: 900;
  background: #4fae67;
}

.identity-accounts label + label .identity-avatar {
  background: #f07f8d;
}

.identity-accounts strong,
.identity-accounts small {
  display: block;
}

.identity-accounts small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.identity-password {
  display: grid;
  gap: 7px;
  color: #42534a;
  font-size: 13px;
  font-weight: 800;
}

.identity-password input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid rgba(39, 49, 45, 0.22);
  border-radius: 10px;
  color: var(--ink);
  font: inherit;
  background: #fff;
}

.identity-password input:focus-visible {
  border-color: #47a8df;
  outline: 3px solid rgba(71, 168, 223, 0.22);
}

.identity-status {
  min-height: 21px;
  margin: 0;
  color: #60706a;
  font-size: 13px;
}

.identity-submit,
.identity-practice {
  min-height: 48px;
  border-radius: 12px;
  font-weight: 800;
}

.identity-submit {
  color: #fff;
  background: #3f9e59;
  box-shadow: 0 7px 0 #2d7745;
}

.identity-submit:disabled {
  cursor: wait;
  opacity: 0.62;
}

.identity-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  color: #8b958f;
  font-size: 12px;
}

.identity-divider::before,
.identity-divider::after {
  height: 1px;
  background: rgba(39, 49, 45, 0.12);
  content: "";
}

.identity-practice {
  display: grid;
  gap: 3px;
  padding: 8px 12px;
  color: #397655;
  border: 1px solid rgba(72, 168, 88, 0.22);
  background: #edf8e7;
}

.identity-practice small {
  color: #61706a;
  font-size: 12px;
  font-weight: 500;
}

.identity-note {
  font-size: 12px;
  text-align: center;
}

.home-account-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(72, 168, 88, 0.14);
  color: #397655;
  font-size: 13px;
  font-weight: 800;
}

.account-logout {
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid rgba(72, 168, 88, 0.22);
  border-radius: 999px;
  color: #397655;
  font-size: 12px;
  font-weight: 800;
  background: #edf8e7;
}

.account-logout.is-hidden {
  display: none;
}

.yard-home {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  width: min(1360px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 255, 255, 0.9) 0 3%, transparent 15%),
    linear-gradient(180deg, #dff8ff 0 43%, #bee989 43% 100%);
}

.yard-home.is-hidden,
.app-shell.is-hidden {
  display: none;
}

.home-sky {
  position: absolute;
  z-index: -1;
  inset: 0 360px auto 0;
  height: 44%;
  overflow: hidden;
}

.home-cloud {
  position: absolute;
  width: 130px;
  height: 38px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 36px -18px 0 4px rgba(255, 255, 255, 0.78);
}

.cloud-one {
  top: 16%;
  left: 12%;
}

.cloud-two {
  top: 28%;
  right: 15%;
  transform: scale(0.72);
}

.home-scene {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  padding: 52px 42px 30px;
}

.home-brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.home-brand p,
.home-brand h1 {
  margin: 0;
}

.home-brand p {
  color: #4d8665;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.home-brand h1 {
  margin-top: 5px;
  color: #2e6445;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.05;
}

.home-mode {
  padding: 8px 12px;
  border: 1px solid rgba(46, 100, 69, 0.14);
  border-radius: 999px;
  color: #397655;
  font-size: 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.66);
}

.home-garden {
  position: relative;
  min-height: 540px;
  overflow: hidden;
}

.home-house {
  position: absolute;
  top: 118px;
  left: 9%;
  width: 252px;
  height: 190px;
  border: 4px solid rgba(115, 79, 47, 0.22);
  border-radius: 24px 24px 12px 12px;
  background: #fff3c9;
  box-shadow: 0 22px 40px rgba(60, 90, 62, 0.18);
}

.house-roof {
  position: absolute;
  top: -72px;
  left: -25px;
  width: 296px;
  height: 100px;
  border-radius: 140px 140px 22px 22px;
  background: #ef8f72;
  transform: rotate(-2deg);
}

.house-window {
  position: absolute;
  top: 54px;
  left: 42px;
  display: grid;
  place-items: center;
  width: 60px;
  height: 58px;
  border: 5px solid #8c6a49;
  border-radius: 14px;
  color: #fff7a8;
  background: #8fd5df;
}

.house-door {
  position: absolute;
  right: 45px;
  bottom: 0;
  width: 68px;
  height: 108px;
  border-radius: 36px 36px 0 0;
  background: #9e7553;
}

.home-flowerbed {
  position: absolute;
  z-index: 2;
  right: 5%;
  bottom: 116px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  width: 48%;
  min-height: 124px;
  padding: 24px 20px 18px;
  border: 7px solid #c89055;
  border-radius: 46% 46% 28px 28px;
  background: #7dba5e;
  box-shadow: inset 0 -22px 0 rgba(88, 132, 67, 0.24), 0 18px 30px rgba(60, 90, 62, 0.18);
}

.home-flower {
  display: grid;
  place-items: center;
  width: 44px;
  height: 74px;
  padding-bottom: 32px;
  color: white;
  font-size: 25px;
  text-shadow: 0 2px rgba(121, 67, 80, 0.2);
  background: linear-gradient(90deg, transparent 47%, #3d9555 47% 54%, transparent 54%);
}

.home-collection-display {
  position: absolute;
  z-index: 3;
  right: 5%;
  bottom: 52px;
  display: flex;
  justify-content: center;
  gap: 7px;
  width: 48%;
}

.home-collectible {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 7px;
  border: 2px solid rgba(140, 106, 73, 0.2);
  border-radius: 12px;
  color: #7d5b3e;
  font-size: 11px;
  font-weight: 800;
  background: #fff2c6;
  box-shadow: 0 8px 16px rgba(60, 90, 62, 0.12);
}

.home-path {
  position: absolute;
  right: 26%;
  bottom: -62px;
  width: 210px;
  height: 310px;
  border-radius: 50% 50% 0 0;
  background: repeating-linear-gradient(168deg, #ebd8a7 0 30px, #dfc58b 31px 34px);
  transform: perspective(220px) rotateX(32deg) rotate(8deg);
}

.home-people {
  position: absolute;
  z-index: 3;
  bottom: 42px;
  left: 4%;
  display: flex;
  gap: 8px;
}

.home-people span {
  padding: 10px 14px;
  border-radius: 999px;
  color: #35694b;
  font-size: 13px;
  font-weight: 800;
  background: rgba(255, 253, 245, 0.9);
  box-shadow: 0 8px 20px rgba(60, 90, 62, 0.12);
}

.home-growth-card {
  position: absolute;
  z-index: 3;
  top: 70px;
  right: 4%;
  display: grid;
  width: 180px;
  padding: 16px;
  border: 1px solid rgba(72, 168, 88, 0.18);
  border-radius: 18px;
  background: rgba(255, 253, 245, 0.88);
  box-shadow: 0 14px 30px rgba(60, 90, 62, 0.14);
}

.home-growth-card span,
.home-growth-card small {
  color: var(--muted);
  font-size: 12px;
}

.home-growth-card strong {
  margin: 4px 0;
  color: #3a8b50;
  font-size: 34px;
}

.home-panel {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 76px 28px 32px;
  border-left: 1px solid rgba(72, 168, 88, 0.18);
  background: rgba(255, 253, 245, 0.95);
  box-shadow: -16px 0 40px rgba(60, 90, 62, 0.08);
}

.home-panel-heading span,
.home-plan-preview > span,
.home-recent-card > span {
  color: #4d8665;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.home-panel-heading strong {
  display: block;
  margin-top: 7px;
  font-size: 26px;
  line-height: 1.25;
}

.home-panel-heading p,
.home-plan-preview p,
.home-recent-card p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.home-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.home-summary div,
.home-plan-preview,
.home-recent-card {
  padding: 14px;
  border: 1px solid rgba(72, 168, 88, 0.14);
  border-radius: 14px;
  background: #fffaf0;
}

.home-summary span,
.home-summary strong {
  display: block;
}

.home-summary span {
  color: var(--muted);
  font-size: 12px;
}

.home-summary strong {
  margin-top: 4px;
  color: #3a7b50;
}

.home-plan-preview {
  background: #fff1ec;
  border-color: rgba(239, 143, 114, 0.22);
}

.home-plan-preview strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
}

.home-action-choices {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.home-action-choice {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid rgba(239, 143, 114, 0.2);
  border-radius: 12px;
  text-align: left;
  background: rgba(255, 255, 255, 0.82);
}

.home-action-choice span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: white;
  font-size: 12px;
  font-weight: 800;
  background: #ef8f72;
}

.home-action-choice small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.home-action-choice:disabled {
  cursor: default;
  opacity: 0.52;
}

.home-action-choice.is-picked {
  border-color: #4fae67;
  background: #eef8e8;
}

.home-journal-list {
  display: grid;
  gap: 7px;
  max-height: 150px;
  margin: 12px 0 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.home-journal-list li {
  padding: 8px 9px;
  border-left: 3px solid #7fbd72;
  border-radius: 6px;
  color: #4c6257;
  font-size: 12px;
  line-height: 1.45;
  background: #f3f8eb;
}

.home-enter {
  width: 100%;
  min-height: 54px;
  margin-top: auto;
  border-radius: 14px;
  color: white;
  font-weight: 800;
  background: linear-gradient(135deg, #51ad67, #37925c);
  box-shadow: 0 12px 24px rgba(55, 146, 92, 0.24);
}

.brand-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-return {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(72, 168, 88, 0.18);
  border-radius: 999px;
  color: #397655;
  font-size: 12px;
  font-weight: 800;
  background: #edf8e7;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(640px, 1fr) 340px;
  gap: 18px;
  width: min(1360px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px;
}

.game-wrap {
  position: relative;
  display: grid;
  place-items: start center;
  min-height: calc(100vh - 36px);
  padding-top: 52px;
}

#game {
  width: 100%;
  max-width: 960px;
  aspect-ratio: 16 / 10;
  border: 4px solid #fff8dc;
  border-radius: 8px;
  background: #b8df86;
  box-shadow:
    0 18px 40px var(--shadow),
    0 0 0 2px rgba(72, 168, 88, 0.18);
}

.spot-menu {
  position: absolute;
  z-index: 5;
  display: grid;
  gap: 6px;
  width: 190px;
  padding: 8px;
  border: 2px solid rgba(255, 127, 143, 0.28);
  border-radius: 8px;
  background: rgba(255, 253, 245, 0.98);
  box-shadow: 0 12px 28px var(--shadow);
}

.result-card {
  position: absolute;
  z-index: 9;
  top: 50%;
  left: 50%;
  display: grid;
  gap: 10px;
  width: min(430px, calc(100% - 36px));
  padding: 24px;
  border: 2px solid rgba(255, 217, 77, 0.56);
  border-radius: 22px;
  text-align: center;
  background: rgba(255, 253, 245, 0.97);
  box-shadow: 0 24px 70px rgba(39, 49, 45, 0.28);
  transform: translate(-50%, -46%);
  animation: result-arrive 360ms ease-out both;
}

.result-card.is-hidden {
  display: none;
}

.result-card > span {
  color: #4d8665;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.result-card > strong {
  color: #2f704a;
  font-size: 30px;
}

.result-card > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.result-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.result-details span {
  display: grid;
  gap: 3px;
  padding: 9px 6px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 11px;
  background: #f0f7e8;
}

.result-details strong {
  color: #365e47;
  font-size: 13px;
}

.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

.result-actions button {
  min-height: 44px;
  border-radius: 10px;
  color: white;
  font-weight: 800;
  background: #4fae67;
}

.result-actions button + button {
  color: #397655;
  background: #e8f4e2;
}

@keyframes result-arrive {
  from {
    opacity: 0;
    transform: translate(-50%, -40%) scale(0.96);
  }
}

.spot-menu.is-hidden {
  display: none;
}

.spot-menu-title {
  color: var(--muted);
  font-size: 12px;
}

.spot-menu button {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 6px;
  border: 1px solid rgba(255, 127, 143, 0.2);
  border-radius: 8px;
  text-align: left;
  background: #fff8dc;
}

.spot-menu button:disabled {
  cursor: default;
  opacity: 0.48;
}

.spot-menu-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: white;
  font-size: 12px;
  font-weight: 700;
}

.spot-menu-price {
  color: #8c6a17;
  font-weight: 700;
}

.panel {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border-left: 1px solid rgba(72, 168, 88, 0.16);
  background: rgba(255, 253, 245, 0.94);
}

.developer-badge {
  border: 2px solid #c35d4b;
  border-radius: 999px;
  background: #fff0df;
  color: #9d3f31;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.developer-badge.is-hidden {
  display: none;
}

.developer-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 2px dashed #d27b5f;
  border-radius: 10px;
  background: #fff8e9;
  color: #75382f;
}

.developer-panel.is-hidden {
  display: none;
}

.developer-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.developer-actions button {
  min-height: 34px;
  border: 1px solid #dda18e;
  border-radius: 7px;
  background: #fffdf5;
  color: #75382f;
  font-size: 12px;
  font-weight: 700;
}

.developer-timing {
  display: grid;
  gap: 4px;
  padding-top: 7px;
  border-top: 1px solid #edc5b8;
  font-size: 12px;
}

.developer-timing span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.developer-timing ol {
  display: grid;
  gap: 2px;
  margin: 2px 0 0;
  padding-left: 20px;
}

.save-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(71, 168, 223, 0.28);
  border-radius: 10px;
  background: #eefaff;
}

.save-card-copy {
  display: grid;
  gap: 3px;
}

.save-card-copy strong {
  color: #256c91;
  font-size: 13px;
}

.save-card-copy span,
.save-import-panel small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.save-import-button,
.save-import-panel button {
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid rgba(71, 168, 223, 0.38);
  border-radius: 8px;
  color: #256c91;
  font-weight: 700;
  background: #fff;
}

.save-import-button.is-hidden,
.save-import-panel.is-hidden {
  display: none;
}

.save-import-panel {
  display: grid;
  gap: 7px;
  padding-top: 8px;
  border-top: 1px solid rgba(71, 168, 223, 0.22);
}

.save-import-panel p {
  margin: 0;
  color: #375044;
  font-size: 13px;
}

.save-import-panel > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.save-import-panel #confirmLocalImport {
  color: #fff;
  background: #287a46;
  border-color: #287a46;
}

.room-card {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(72, 168, 88, 0.3);
  border-radius: 10px;
  background: #effbe9;
}

.room-card.is-hidden {
  display: none;
}

.room-card > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.room-card strong {
  color: #287a46;
  font-size: 13px;
}

.room-card span {
  color: var(--muted);
  font-size: 12px;
}

.room-members span {
  flex: 1;
  min-height: 28px;
  padding: 6px 8px;
  border-radius: 999px;
  text-align: center;
  background: rgba(255, 255, 255, 0.75);
}

.brand {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.brand p,
.brand h1 {
  margin: 0;
}

.brand p {
  color: var(--muted);
  font-size: 13px;
}

.brand h1 {
  margin-top: 4px;
  color: #287a46;
  font-size: 30px;
  line-height: 1.1;
  text-shadow: 0 2px 0 #fff2aa;
}

.sound-toggle {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(72, 168, 88, 0.28);
  border-radius: 999px;
  color: #287a46;
  background: #f2ffe8;
  font-size: 12px;
  font-weight: 700;
}

.sound-toggle[aria-pressed="false"] {
  color: var(--muted);
  background: #f3f1e8;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.stats div,
.decor-card {
  min-height: 70px;
  padding: 10px;
  border: 1px solid rgba(72, 168, 88, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, #fffdf5, var(--paper));
}

.stats span,
.decor-card span,
.energy-copy span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.stats strong,
.decor-card strong,
.energy-copy strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
}

.energy {
  display: grid;
  gap: 9px;
}

.energy-copy {
  display: flex;
  justify-content: space-between;
  align-items: end;
}

.meter {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: #d5efd0;
}

.meter span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--coral), var(--sun));
  transition: width 160ms ease;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.tab,
.ghost,
.primary,
.tower-button {
  min-height: 42px;
  border-radius: 8px;
  transition:
    transform 120ms ease,
    background 120ms ease,
    border-color 120ms ease;
}

.tab {
  background: #edf8df;
}

.tab.is-active {
  color: white;
  background: linear-gradient(180deg, #62c765, var(--grass-dark));
}

.view {
  display: none;
  gap: 10px;
}

.view.is-active {
  display: grid;
}

.tower-list {
  display: grid;
  gap: 8px;
}

.level-summary,
.level-button {
  border: 1px solid rgba(72, 168, 88, 0.18);
  border-radius: 8px;
  background: var(--paper);
}

.level-summary {
  display: grid;
  gap: 4px;
  min-height: 74px;
  padding: 11px;
}

.bond-card {
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid rgba(255, 127, 143, 0.35);
  border-radius: 8px;
  background: #fff0f2;
}

.bond-card.is-hidden {
  display: none;
}

.bond-head,
.bond-picks {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.bond-head span,
.bond-picks span {
  color: var(--muted);
  font-size: 12px;
}

.bond-head strong {
  color: #8c4b3e;
  font-size: 13px;
}

.bond-card p {
  margin: 0;
  font-weight: 700;
}

.bond-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.bond-choice {
  min-height: 38px;
  padding: 7px;
  border: 1px solid rgba(39, 49, 45, 0.12);
  border-radius: 8px;
  background: white;
}

.bond-choice.is-picked {
  color: white;
  background: var(--coral);
}

.bond-choice:disabled {
  cursor: default;
  opacity: 0.7;
}

.level-summary strong,
.level-summary span {
  display: block;
}

.level-summary span {
  color: var(--muted);
  font-size: 12px;
}

.level-list {
  display: grid;
  gap: 8px;
}

.chapter-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(124px, 1fr);
  gap: 7px;
  padding-bottom: 3px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.chapter-button {
  display: grid;
  gap: 2px;
  min-height: 68px;
  padding: 8px;
  border: 1px solid rgba(72, 168, 88, 0.2);
  border-radius: 8px;
  text-align: left;
  background: #fffdf5;
}

.chapter-button span,
.chapter-button small {
  color: var(--muted);
  font-size: 11px;
}

.chapter-button strong {
  font-size: 13px;
}

.chapter-button.is-current {
  color: #fff;
  border-color: var(--grass-dark);
  background: var(--grass-dark);
}

.chapter-button.is-current span,
.chapter-button.is-current small {
  color: rgba(255, 255, 255, 0.78);
}

.chapter-button.is-locked {
  opacity: 0.58;
}

.chapter-button-progress {
  position: relative;
  display: block;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(72, 168, 88, 0.14);
}

.chapter-button-progress::after {
  position: absolute;
  inset: 0;
  width: var(--chapter-progress);
  border-radius: inherit;
  background: var(--grass-dark);
  content: "";
}

.chapter-button.is-current .chapter-button-progress {
  background: rgba(255, 255, 255, 0.2);
}

.chapter-button.is-current .chapter-button-progress::after {
  background: #fff;
}

.chapter-summary {
  display: grid;
  gap: 4px;
  padding: 11px;
  border: 1px solid rgba(72, 168, 88, 0.18);
  border-radius: 8px;
  background: linear-gradient(135deg, #f3fae9, #fff8e9);
}

.chapter-progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(72, 168, 88, 0.13);
}

.chapter-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--grass-dark), #8bcf74);
}

.chapter-summary span,
.chapter-summary small {
  color: var(--muted);
  font-size: 12px;
}

.chapter-summary p,
.level-empty {
  margin: 0;
  color: #42534a;
  font-size: 13px;
  line-height: 1.5;
}

.level-empty {
  padding: 16px;
  border: 1px dashed rgba(72, 168, 88, 0.3);
  border-radius: 8px;
  text-align: center;
  background: #fffdf5;
}

.level-button {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 10px;
  text-align: left;
}

.level-button.is-current {
  border-color: var(--coral);
  background: #fff0e8;
}

.level-button.is-locked {
  cursor: default;
  opacity: 0.54;
}

.level-no {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: white;
  font-weight: 700;
  background: var(--grass-dark);
}

.level-copy strong,
.level-copy span,
.level-stars {
  display: block;
}

.level-copy span,
.level-stars {
  color: var(--muted);
  font-size: 12px;
}

.shop-list {
  display: grid;
  gap: 8px;
}

.tower-button {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding: 9px;
  border: 2px solid rgba(72, 168, 88, 0.16);
  cursor: grab;
  text-align: left;
  background: linear-gradient(180deg, #fffdf5, #fff3c4);
}

.tower-button.is-selected {
  border-color: var(--coral);
  background: linear-gradient(180deg, #fff8dc, #ffe7ed);
}

.tower-button.is-dragging {
  cursor: grabbing;
  border-color: var(--grass-dark);
  background: #e7f8df;
}

.tower-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: white;
  font-weight: 700;
  box-shadow: inset 0 -4px 0 rgba(39, 49, 45, 0.12);
}

.tower-text {
  min-width: 0;
}

.tower-text strong,
.tower-text span {
  display: block;
}

.tower-text strong {
  font-size: 15px;
}

.tower-text span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tower-cost {
  color: #8c6a17;
  font-weight: 700;
}

.shop-choice {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px;
  border-color: rgba(72, 168, 88, 0.16);
  text-align: left;
  background: #fffdf5;
}

.shop-choice strong,
.shop-choice span {
  display: block;
}

.shop-choice span {
  color: var(--muted);
  font-size: 12px;
}

.shop-price {
  color: #8c6a17;
  font-weight: 700;
  text-align: right;
}

.shop-choice.is-owned {
  background: #e7f2df;
}

.decor-zone {
  display: grid;
  gap: 8px;
}

.decor-zone + .decor-zone {
  padding-top: 4px;
  border-top: 1px dashed rgba(72, 168, 88, 0.24);
}

.decor-zone h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  color: #375044;
  font-size: 14px;
}

.decor-zone h3 small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.decor-choice {
  border-left: 4px solid #9fb89d;
}

.decor-choice.rarity-refined {
  border-left-color: #729fc5;
}

.decor-choice.rarity-treasured {
  border-left-color: #a77ac4;
}

.decor-choice.is-equipped {
  box-shadow: inset 0 0 0 2px rgba(72, 168, 88, 0.28);
}

.decor-meta {
  display: flex !important;
  gap: 6px;
  margin-bottom: 3px;
}

.decor-meta b,
.decor-meta em {
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-style: normal;
}

.decor-meta b {
  color: #4d6655;
  background: #e6efe3;
}

.rarity-refined .decor-meta b {
  color: #3e6684;
  background: #e1edf7;
}

.rarity-treasured .decor-meta b {
  color: #6c4c84;
  background: #eee3f5;
}

.decor-meta em {
  color: #8c6a17;
  background: #fff1bd;
}

.decor-actions {
  display: grid !important;
  gap: 5px;
  min-width: 108px;
}

.decor-actions .ghost {
  min-height: 34px;
  padding: 5px 7px;
  font-size: 11px;
}

.decor-actions .ghost:disabled {
  color: #3f7e51;
  background: #d7edda;
}

.market-zone {
  display: grid;
  gap: 8px;
}

.market-zone + .market-zone {
  padding-top: 4px;
  border-top: 1px dashed rgba(72, 168, 88, 0.24);
}

.market-zone h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  color: #375044;
  font-size: 14px;
}

.market-zone h3 small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.market-choice {
  border-left: 4px solid #9fb89d;
}

.market-choice.rarity-refined {
  border-left-color: #729fc5;
}

.market-choice.rarity-treasured {
  border-left-color: #a77ac4;
}

.market-actions {
  display: grid !important;
  gap: 5px;
  min-width: 118px;
}

.market-actions .ghost {
  min-height: 34px;
  padding: 5px 7px;
  font-size: 11px;
}

.decor-max {
  color: #6c4c84 !important;
  font-weight: 800;
  text-align: center;
}

.primary {
  width: 100%;
  color: white;
  background: var(--coral);
}

.primary:disabled {
  cursor: default;
  opacity: 0.45;
}

.primary.is-ready {
  background: #e85f73;
  box-shadow: 0 0 0 3px rgba(255, 217, 77, 0.52);
}

.ghost {
  width: 100%;
  border: 1px solid rgba(39, 49, 45, 0.14);
  background: white;
}

.tab:hover,
.ghost:hover,
.primary:not(:disabled):hover,
.level-button:not(.is-locked):hover,
.bond-choice:not(:disabled):hover,
.spot-menu button:not(:disabled):hover,
.tower-button:hover {
  transform: translateY(-1px);
}

.message {
  min-height: 48px;
  margin: auto 0 0;
  padding: 12px;
  border-radius: 8px;
  color: #375044;
  border: 1px solid rgba(72, 168, 88, 0.16);
  background: #e7f8df;
}

.home-modes-preview {
  display: grid;
  gap: 7px;
  padding: 15px;
  border: 1px solid rgba(92, 117, 213, 0.18);
  border-radius: 16px;
  background: linear-gradient(145deg, #f6f3ff, #fffaf1);
}

.home-modes-preview > span,
.side-mode-heading span {
  color: #6d60a6;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.home-modes-preview > strong {
  color: #40395d;
}

.home-modes-preview p {
  margin: 0;
  color: #6e6980;
  font-size: 13px;
  line-height: 1.5;
}

.home-mode-badges {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
}

.home-mode-badges span {
  display: grid;
  place-items: center;
  min-height: 34px;
  border-radius: 10px;
  color: #aaa3b5;
  background: #ebe8ee;
  filter: grayscale(1);
}

.home-mode-badges span.is-earned {
  color: #fff;
  background: linear-gradient(145deg, #8b77cb, #62539f);
  filter: none;
  box-shadow: 0 5px 12px rgba(89, 72, 143, 0.2);
}

.home-mode-recent {
  color: #665e77;
  line-height: 1.4;
}

.home-modes-preview button,
.side-mode-heading button,
.side-mode-card button,
.side-mode-back {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: #7565b4;
  font-weight: 800;
  cursor: pointer;
}

.side-mode-hub {
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow-y: auto;
  padding: 28px;
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 222, 153, 0.5), transparent 32%),
    linear-gradient(145deg, #edf6ea, #f8f3ff 58%, #fff7e8);
}

.side-mode-hub.is-hidden,
.side-mode-list.is-hidden,
.side-mode-stage.is-hidden {
  display: none;
}

.side-mode-panel {
  width: min(1080px, 100%);
  min-height: calc(100vh - 56px);
  margin: 0 auto;
  padding: 28px;
  border: 1px solid rgba(68, 79, 68, 0.12);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 22px 60px rgba(57, 59, 71, 0.12);
}

.side-mode-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.side-mode-heading h2 {
  margin: 5px 0;
  color: #2f493a;
  font-size: clamp(26px, 4vw, 40px);
}

.side-mode-heading p {
  margin: 0;
  color: #66746b;
}

.side-mode-heading button {
  flex: 0 0 auto;
  min-width: 112px;
  padding: 0 16px;
  color: #4f465f;
  background: #eee9f6;
}

.side-mode-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.side-mode-card {
  display: grid;
  gap: 10px;
  min-height: 220px;
  padding: 20px;
  border: 1px solid rgba(72, 168, 88, 0.15);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(61, 72, 66, 0.07);
}

.side-mode-card-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #5c4e93;
  background: #eee9ff;
  font-size: 27px;
}

.side-mode-card h3 {
  margin: 0;
  color: #33483d;
}

.side-mode-card p,
.side-mode-card small {
  margin: 0;
  color: #6a766f;
  line-height: 1.5;
}

.side-mode-card small {
  margin-top: auto;
}

.side-mode-card button {
  padding: 0 14px;
}

.side-mode-stage {
  min-height: 520px;
  margin-top: 24px;
  padding: 20px;
  border: 1px solid rgba(72, 168, 88, 0.16);
  border-radius: 22px;
  background: #fbfdf9;
}

.side-mode-back {
  padding: 0 16px;
  color: #4d6456;
  background: #e6f1e8;
}

.side-mode-intro {
  display: grid;
  place-items: center;
  min-height: 390px;
  padding: 24px;
  text-align: center;
}

.side-mode-intro > span {
  font-size: 58px;
}

.side-mode-intro h3 {
  margin: 12px 0 5px;
  font-size: 30px;
}

.side-mode-intro p {
  max-width: 520px;
  color: #66746b;
}

.side-mode-level-picker {
  display: grid;
  gap: 22px;
  padding: 18px 4px 4px;
}

.side-mode-level-picker > header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.side-mode-level-picker > header > span {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  color: #5c4e93;
  background: #eee9ff;
  font-size: 34px;
}

.side-mode-level-picker h3,
.side-mode-level-picker p {
  margin: 3px 0;
}

.side-mode-level-picker header small,
.side-mode-level-picker p {
  color: #66746b;
}

.side-mode-level-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.side-mode-level-grid button {
  display: grid;
  gap: 7px;
  min-height: 132px;
  padding: 14px;
  border: 1px solid rgba(92, 78, 147, 0.16);
  border-radius: 16px;
  text-align: left;
  background: #fff;
}

.side-mode-level-grid button span,
.side-mode-level-grid button small {
  color: #7565b4;
  font-size: 12px;
}

.side-mode-level-grid button em {
  color: #61706a;
  font-size: 11px;
  font-style: normal;
  line-height: 1.45;
}

.side-mode-level-grid button:disabled {
  cursor: default;
  filter: grayscale(0.5);
  opacity: 0.52;
}

.side-mode-free-entry {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px 16px;
  min-height: 72px;
  padding: 14px 18px;
  border: 1px solid rgba(92, 78, 147, 0.2);
  border-radius: 18px;
  text-align: left;
  background: #f6f3ff;
}

.side-mode-free-entry span {
  color: #5c4e93;
  font-weight: 900;
}

.side-mode-free-entry small {
  color: #66746b;
}

.side-game-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.side-game-header span {
  color: #7565b4;
  font-size: 13px;
  font-weight: 800;
}

.side-game-header h3 {
  margin: 5px 0 0;
  color: #33483d;
  font-size: clamp(23px, 4vw, 34px);
}

.side-game-header > strong {
  padding: 9px 14px;
  border-radius: 999px;
  color: #5b4c8e;
  background: #eee9ff;
}

.side-game-tip {
  margin: 10px 0 18px;
  color: #65736a;
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
}

.memory-card {
  min-height: 112px;
  border: 2px solid #d9d2f2;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(145deg, #8171bd, #5e4d98);
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(80, 63, 137, 0.15);
}

.memory-card.is-open {
  color: #425448;
  background: #fff9e8;
}

.memory-card.is-matched {
  border-color: #90c996;
  background: #e5f6df;
}

.side-game-result {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  padding: 14px;
  border-radius: 16px;
  color: #3f5a49;
  background: #e8f6e4;
}

.side-game-result button {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: #5f9b64;
  font-weight: 800;
  cursor: pointer;
}

.irrigation-board-wrap {
  display: grid;
  grid-template-columns: auto minmax(320px, 620px) auto;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 32px auto;
}

.irrigation-source,
.irrigation-target {
  padding: 10px;
  border-radius: 14px;
  color: #fff;
  background: #5f9db5;
  font-weight: 900;
}

.irrigation-target {
  background: #d47c9a;
}

.irrigation-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(72px, 1fr));
  gap: 9px;
  padding: 14px;
  border-radius: 22px;
  background: #e9dfc7;
}

.irrigation-tile {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-height: 72px;
  border: 2px solid #d3c3a1;
  border-radius: 15px;
  color: #8c7652;
  background: #fff9eb;
  cursor: pointer;
}

.irrigation-tile span {
  display: block;
  font-size: clamp(38px, 7vw, 62px);
  line-height: 1;
  transition: transform 160ms ease;
}

.irrigation-tile.is-watered {
  border-color: #5ca9c8;
  color: #3e9fc5;
  background: #e0f5fb;
  box-shadow: inset 0 0 0 3px rgba(80, 174, 207, 0.12);
}

.seed-catch-field {
  position: relative;
  width: min(680px, 100%);
  height: 330px;
  margin: 18px auto;
  overflow: hidden;
  border: 2px solid #b9d8ae;
  border-radius: 22px;
  background:
    repeating-linear-gradient(90deg, transparent 0 19.7%, rgba(75, 130, 75, 0.08) 19.7% 20%),
    linear-gradient(#dff3ff, #f5f0d2 72%, #cfe4b9 72%);
}

.falling-item {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
  font-size: 28px;
  transition: top 90ms linear;
}

.falling-item.is-seed {
  color: #8e5aa9;
}

.seed-basket {
  position: absolute;
  bottom: 8px;
  z-index: 3;
  width: 76px;
  min-height: 38px;
  transform: translateX(-50%);
  border: 3px solid #9a673f;
  border-top: 0;
  border-radius: 5px 5px 20px 20px;
  color: #6c4329;
  background: #dfb77d;
  font-size: 13px;
  font-weight: 900;
  line-height: 34px;
  text-align: center;
  transition: left 100ms ease;
}

.seed-catch-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.seed-catch-controls button {
  min-width: 130px;
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: #6e9e6a;
  font-weight: 900;
  cursor: pointer;
}

.puzzle-plant-palette {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.puzzle-plant-palette button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 66px;
  padding: 10px;
  border: 2px solid #dce7d8;
  border-radius: 14px;
  color: #405148;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.puzzle-plant-palette button > span {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff;
  background: #70a56d;
  font-weight: 900;
}

.puzzle-plant-palette button small {
  display: block;
  margin-top: 3px;
  color: #78847c;
  font-weight: 500;
}

.puzzle-plant-palette button.is-selected {
  border-color: #7565b4;
  background: #f2efff;
}

.puzzle-lanes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.puzzle-lane {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid #d9e3d6;
  border-radius: 16px;
  background: linear-gradient(#f2f8ea, #e4d8bd);
  text-align: center;
}

.puzzle-lane.is-cleared {
  opacity: 0.65;
  background: #e6f4e3;
}

.puzzle-lane button,
.puzzle-simulate {
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: #679566;
  font-weight: 900;
  cursor: pointer;
}

.puzzle-lane .puzzle-remove {
  min-height: 38px;
  color: #706677;
  background: #eee8ef;
}

.puzzle-simulate {
  display: block;
  width: min(360px, 100%);
  margin: 18px auto 0;
  background: #7565b4;
}

.endless-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.endless-summary span {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 13px;
  color: #6d786f;
  background: #eef4ea;
  text-align: center;
}

.endless-summary strong {
  color: #3f5848;
}

.endless-lanes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.endless-lane {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid #ddd5c5;
  border-radius: 18px;
  background: linear-gradient(160deg, #f5f8ec, #ecdfc5);
  text-align: center;
}

.endless-lane button,
.endless-actions button {
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: #688f67;
  font-weight: 900;
  cursor: pointer;
}

.endless-distance {
  display: flex;
  justify-content: center;
  gap: 5px;
}

.endless-distance i {
  width: 24px;
  height: 8px;
  border-radius: 999px;
  background: #d3a6a0;
}

.endless-distance i.is-safe {
  background: #7fbd79;
}

.endless-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.endless-actions button {
  min-width: 190px;
  padding: 0 16px;
}

.endless-actions button:last-child {
  background: #7565b4;
}

@media (max-width: 900px) {
  .side-mode-hub {
    padding: 14px;
  }

  .side-mode-panel {
    min-height: calc(100vh - 28px);
    padding: 20px;
  }

  .side-mode-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-mode-level-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 761px) and (max-width: 1100px) {
  body {
    height: 100vh;
    overflow: hidden;
  }

  .app-shell {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 10px;
    height: 100vh;
    min-height: 0;
    padding: 10px;
  }

  .game-wrap {
    align-self: start;
    min-width: 0;
    min-height: 0;
    padding-top: 48px;
  }

  .panel {
    height: calc(100vh - 20px);
    gap: 10px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 12px;
  }

  .sound-toggle,
  .tab,
  .ghost,
  .primary,
  .save-import-button,
  .save-import-panel button,
  .bond-choice,
  .spot-menu button {
    min-height: 44px;
  }

  .message {
    margin-top: 0;
  }

  .yard-home {
    grid-template-columns: minmax(0, 1fr) 320px;
    height: 100vh;
    min-height: 0;
  }

  .home-scene {
    padding: 52px 24px 18px;
  }

  .home-garden {
    min-height: 0;
  }

  .home-house {
    top: 104px;
    left: 5%;
    transform: scale(0.85);
    transform-origin: left top;
  }

  .home-growth-card {
    top: 56px;
  }

  .home-panel {
    height: 100vh;
    overflow-y: auto;
    padding: 56px 20px 22px;
  }
}

@media (max-width: 760px) {
  .yard-home {
    grid-template-columns: 1fr;
  }

  .home-scene {
    min-height: 620px;
    padding: 54px 18px 18px;
  }

  .home-panel {
    padding: 28px 18px;
    border-top: 1px solid rgba(72, 168, 88, 0.18);
    border-left: 0;
  }

  .home-enter {
    margin-top: 8px;
  }

  .app-shell {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .game-wrap {
    min-height: auto;
    padding-top: 48px;
  }

  .panel {
    border-left: 0;
    border-top: 1px solid rgba(39, 49, 45, 0.12);
  }
}

@media (max-width: 560px) {
  .identity-gate {
    align-items: start;
    padding: 18px 12px;
  }

  .identity-card {
    padding: 22px 16px;
    border-radius: 18px;
  }

  .identity-accounts {
    grid-template-columns: 1fr;
  }

  .home-brand {
    display: grid;
  }

  .home-garden {
    min-height: 510px;
  }

  .home-house {
    left: -4%;
    transform: scale(0.72);
    transform-origin: left top;
  }

  .home-flowerbed {
    right: -4%;
    width: 54%;
  }

  .home-growth-card {
    top: 54px;
    right: 0;
    width: 150px;
  }

  .home-people {
    display: grid;
  }

  .stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .stats div {
    min-height: 64px;
    padding: 8px;
  }

  .stats strong {
    font-size: 18px;
  }

  .brand h1 {
    font-size: 25px;
  }

  .side-mode-heading {
    display: grid;
  }

  .side-mode-list {
    grid-template-columns: 1fr;
  }

  .side-mode-level-picker > header {
    align-items: flex-start;
  }

  .side-mode-level-grid {
    grid-template-columns: 1fr;
  }

  .side-mode-free-entry {
    grid-template-columns: 1fr;
  }

  .memory-grid {
    grid-template-columns: repeat(3, minmax(70px, 1fr));
  }

  .memory-card {
    min-height: 88px;
  }

  .irrigation-board-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .irrigation-grid {
    width: 100%;
    grid-template-columns: repeat(4, minmax(58px, 1fr));
  }

  .irrigation-source,
  .irrigation-target {
    width: 100%;
    text-align: center;
  }

  .puzzle-plant-palette {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .puzzle-lanes {
    grid-template-columns: 1fr;
  }

  .endless-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .endless-lanes {
    grid-template-columns: 1fr;
  }

  .endless-actions {
    display: grid;
  }
}
