.garden-controls {
  position: absolute; z-index: 4; top: 108px; right: var(--gutter);
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  max-width: calc(100% - var(--gutter) * 2); pointer-events: none;
}
.garden-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; pointer-events: auto; }
.garden-action {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 39px;
  max-width: 100%; padding: 8px 12px; border: 1px solid #758a7e65; border-radius: 8px;
  font-size: 14px; line-height: 1.2; font-weight: 550; text-align: left;
}
.garden-action .icon { width: 17px; height: 17px; }
.garden-primary { background: #efd4a1; color: #20342e; border-color: #c5a569; }
.garden-primary:hover { background: #ffe9bf; }
.garden-secondary { background: #f6f6ec; border-color: #9faa99; color: #263e35; }
.garden-secondary:hover { background: #e7ede3; }
.garden-action:disabled { opacity: .55; cursor: default; }

.game-world-layer { position: absolute; inset: 0; pointer-events: none; }
.tree-sprite {
  position: absolute; width: 200px; height: 204px; translate: -50% -164px;
  transform-origin: 50% 80.4%; pointer-events: none;
}
.tree-sprite[hidden], .plant-hud[hidden] { display: none; }
#plant-ghost { opacity: .7; filter: drop-shadow(0 0 4px #fff3cf); }
.tree-hit { position: absolute; translate: -50% -90%; z-index: 2; border: 0; padding: 0; background: transparent; pointer-events: auto; }
.tree-hit:hover, .tree-hit:focus-visible { z-index: 5; }
.tree-hit .tree-sign {
  min-width: 76px; max-width: 180px; gap: 2px; padding: 7px 11px;
  color: #273f36; background: #fbf2df; border: 1px solid #a98e58;
  box-shadow: 0 4px 13px #16352a43; position: relative;
}
.tree-hit .tree-sign::after { content: ''; position: absolute; left: calc(50% - 4px); bottom: -5px; width: 8px; height: 8px; rotate: 45deg; border-right: 1px solid #a98e58; border-bottom: 1px solid #a98e58; background: #fbf2df; }
.tree-hit.own-tree .tree-sign { background: #f3d9a8; }
.tree-hit.own-tree .tree-sign::after { background: #f3d9a8; }
.tree-hit .tree-sign strong { display: block; font: 600 14px/1.1 var(--serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-hit .tree-sign small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.tree-sign { display: grid; gap: 4px; width: fit-content; max-width: 100%; padding: 10px 17px; border-radius: 7px; background: #f2e3c2; color: #2c4135; text-align: center; overflow-wrap: anywhere; }
.tree-sign strong { font: 500 24px/1.15 var(--serif); }
.tree-sign small { font-size: 14px; color: #526251; }
.watered-tree { animation: fir-water .85s ease; }
@keyframes fir-water { 40% { scale: 1.1; filter: drop-shadow(0 0 12px #d8faff); } }

.plant-hud { position: absolute; z-index: 5; bottom: 88px; left: var(--gutter); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; max-width: min(515px, 86vw); border-radius: 11px; padding: 13px; }
.plant-hud > span { flex-basis: 100%; line-height: 1.35; font-size: 14px; }
.plant-hud .garden-action:last-child { color: #fff5df; background: #ffffff16; }
.map-view.is-planting { cursor: crosshair; }
.plaza-package {
  position: absolute; translate: -50% -50%; width: 15px; height: 13px; rotate: -7deg;
  border: 1px solid #644c5b55; border-radius: 1px; background: var(--wrap); box-shadow: 2px 3px 2px #6f56624f;
}
.plaza-package::before, .plaza-package::after { content: ''; position: absolute; background: #f7df99; }
.plaza-package::before { inset: 0 auto 0 5px; width: 3px; }
.plaza-package::after { inset: 3px 0 auto 0; height: 2px; }

.garden-dialog { max-width: min(690px, calc(100vw - 30px)); }
.garden-dialog .garden-note { margin: 0 0 11px; color: #516356; font-size: 14px; }
.garden-dialog .garden-note:empty, .garden-dialog .garden-status:empty, .garden-buttons:empty { display: none; }
.garden-dialog .game-demo { color: #71521e; background: #f3ead4; border: 1px solid #ddc594; border-radius: 8px; padding: 9px 11px; }
.garden-dialog .garden-status { margin: 14px 0 0; color: #285a49; line-height: 1.35; font-size: 14px; }
.garden-dialog .garden-status[data-error] { color: #9a404a; }
.garden-form, .garden-field { display: grid; gap: 9px; }
.garden-form { gap: 12px; }
.garden-field > span { color: #334d3e; font-size: 14px; font-weight: 550; }
.garden-field input, .garden-field select {
  width: 100%; min-width: 0; min-height: 42px; border: 1px solid #a9b7a9; border-radius: 8px;
  padding: 8px 10px; color: #1e3229; background: #fcfbf3; font: 400 16px/1.3 'Golos Text', system-ui, sans-serif;
}
.garden-field input[type='color'] { padding: 4px; width: 48px; }
.garden-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.custom-color, .garden-swatches, .garden-buttons { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.custom-color { flex-wrap: nowrap; }
.custom-color input[type='text'] { max-width: 150px; }
.garden-swatches:empty { display: none; }
.garden-swatches button { width: 29px; height: 29px; border: 2px solid #fefbf0; border-radius: 50%; background: var(--needle); box-shadow: 0 0 0 1px #a0aa9d; }
.garden-swatches button:hover { box-shadow: 0 0 0 2px #748978; }
.garden-point { display: grid; align-items: start; gap: 6px; padding: 9px; border: 1px dashed #acb7a9; border-radius: 8px; }
.garden-point .garden-action { justify-self: start; }
.garden-point .garden-note { margin: 0; }
.garden-plant-layout { display: grid; grid-template-columns: minmax(140px, .78fr) minmax(0, 1.55fr); gap: 19px; }
.plant-preview-wrap {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 165px; padding: 10px; border-radius: 12px; background: radial-gradient(ellipse at 48% 45%, #f3f4ec, #dce7e2);
}
.garden-preview { width: min(100%, 190px); height: auto; aspect-ratio: 200 / 204; }
.garden-tree-card { display: grid; justify-items: center; align-items: start; gap: 0; padding: 5px 15px 13px; margin-bottom: 12px; border-radius: 13px; background: radial-gradient(ellipse at 50% 32%, #fbf9ee, #dce8e2); }
.garden-tree-card .garden-preview { width: 160px; margin-bottom: -24px; }
.tree-growth { width: min(290px, 100%); margin-top: 13px; }
.tree-growth > div, .decoration-steps li { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tree-growth progress { width: 100%; height: 8px; accent-color: #568675; }
.tree-growth .garden-note { margin: 3px 0 0; }
.decoration-steps { margin: 10px 0 12px; padding: 0; display: grid; gap: 4px; list-style: none; }
.decoration-steps li { margin: 0; font-size: 13px; color: #62705e; }
.decoration-steps .garden-action { min-height: 32px; }
.garden-dialog .garden-buttons + .garden-note, .garden-dialog #garden-content > .garden-action { margin-top: 9px; }
.deck-preview { display: block; margin: -12px auto -17px; width: 150px; }
.garden-results { display: grid; gap: 8px; margin-top: 15px; }
.admin-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-bottom: 15px; }
.admin-stats > div { padding: 8px; background: #e5ece3; border: 1px solid #cbd7cd; border-radius: 8px; }
.admin-stats strong, .admin-stats span { display: block; }
.admin-stats strong { font: 500 clamp(22px, 4vw, 32px)/1.15 var(--serif); }
.admin-stats span, .admin-tree small { color: #496257; font-size: 13px; }
.admin-tree-list { display: grid; gap: 7px; margin: 14px 0; }
.admin-tree { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; padding: 9px; border: 1px solid #ccd5ca; border-radius: 8px; }
.admin-tree > div { min-width: 0; overflow-wrap: anywhere; }
.admin-tree .garden-action { flex: 0 0 min(42%, 133px); }
.garden-dialog .admin-tree p { margin: 3px 0; font-size: 14px; }
.chest-group + .chest-group { margin-top: 16px; padding-top: 13px; border-top: 1px solid #c4c9bb; }
.chest-group h3 { margin: 0 0 8px; font: 500 23px/1.15 var(--serif); }
.chest-list { display: grid; gap: 6px; }
.chest-item { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border: 1px solid #d2d8ca; border-radius: 7px; }
.chest-item small { display: block; color: #627061; margin-top: 3px; }
.chest-item .garden-action { margin-left: auto; }
.ball-stage { display: grid; min-height: 143px; align-content: center; justify-content: center; align-self: stretch; padding-top: 12px; border-radius: 12px; background: radial-gradient(ellipse, #f6eadd, #e3ece7); }
.ball-preview {
  position: relative; width: 98px; height: 98px; border-radius: 50%; color: #fff0d0; display: grid; place-items: center;
  background: radial-gradient(circle at 34% 25%, #fff9, transparent 35%), radial-gradient(circle at 40% 40%, var(--ball-color) 30%, color-mix(in srgb, var(--ball-color), #30283b 42%));
  box-shadow: 0 8px 16px #283a3630; font-size: 41px;
}
.ball-preview::before { content: ''; position: absolute; left: 41%; top: -8%; width: 18%; height: 12%; border-radius: 3px 3px 0 0; background: #d2af65; }
.ball-preview img { width: 79%; height: 79%; object-fit: contain; }
.ball-preview[data-finish='frost'] { outline: 2px solid #fffff5; outline-offset: -5px; }
.ball-preview[data-finish='glossy'] > span { text-shadow: 2px 4px 5px #e9e9ef7c; }
.chest-item .ball-preview { width: 33px; height: 33px; flex: none; font-size: 17px; }
.image-collection { display: flex; flex-wrap: wrap; gap: 8px; }
.image-collection img { width: 65px; height: 65px; object-fit: contain; border-radius: 10px; background: #e7ebe1; }
.square-count { display: flex; align-items: center; gap: 10px; color: #3a5d4d; padding: 8px 13px; border-radius: 8px; background: #e2ebe2; margin-bottom: 10px; }
.square-count strong { font: 500 36px/1 var(--serif); }

.tree-filter {
  display: flex; gap: 2px; padding: 3px; border-radius: 9px; pointer-events: auto;
}
.tree-filter button { padding: 6px 8px; font-size: 12px; border: 0; border-radius: 6px; color: #fcf6e4; background: transparent; }
.tree-filter button[aria-pressed='true'] { color: #233a31; background: #e9d4a8; }
.language-select { appearance: none; min-width: 44px; min-height: 42px; padding: 6px 9px; border-radius: 9px; font: inherit; font-size: 13px; font-weight: 650; text-align: center; }
.forest-documents { display: flex; flex-wrap: wrap; gap: 14px 22px; margin: 0 var(--gutter); padding: 12px 0 25px; border-top: 1px solid #a9b9ae; font-size: 13px; }
.forest-documents a, .garden-note a, .legal-page a, .zone-agree a { text-decoration: underline; text-underline-offset: 3px; }
.forest-documents a:hover, .legal-page a:hover { color: #4d7565; }
.friend-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 7px; margin-top: 6px; padding: 7px; border-radius: 7px; background: #e7ece3; }
.chest-item > .garden-buttons { margin-left: auto; }
.ornament-size { display: grid; grid-template-columns: 1fr minmax(44px, auto); align-items: end; gap: 9px; }
.ornament-size output { align-self: end; padding: 8px 5px; font-variant-numeric: tabular-nums; font-size: 14px; }
.ornament-size input[type='range'] { padding-inline: 0; min-height: 28px; accent-color: #608576; }
.ball-stage .ball-preview { scale: var(--bauble-size, 1); }
.ball-stage { overflow: hidden; min-height: 185px; }
.zone-sprite { position: absolute; width: 400px; height: 290px; translate: -50% -172px; pointer-events: none; }
.zone-sprite[hidden] { display: none; }
.zone-hit .tree-sign { border-color: #ac826a; background: #fae1ce; }
.zone-hit .tree-sign::after { border-color: #ac826a; background: #fae1ce; }
.zone-preview { display: block; width: min(100%, 440px); height: auto; margin: 0 auto; aspect-ratio: 400 / 290; }
.checkout-plot { max-width: 325px; margin: -8px auto -27px; }
.business-editor { display: grid; grid-template-columns: minmax(0, .94fr) minmax(0, 1.12fr); gap: 16px; }
.plot-preview-panel { position: sticky; top: 4px; align-self: start; padding: 10px; border-radius: 10px; background: #e5ece6; }
.plot-preview-panel .garden-note { margin: 6px 0 0; }
.zone-price-summary { display: grid; gap: 6px; margin: 9px 0 10px; padding: 10px 12px; border-radius: 8px; background: #e5ede3; font-size: 14px; }
.zone-price-summary > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.zone-price-summary strong { font-variant-numeric: tabular-nums; word-break: keep-all; }
.zone-price-summary > div + div:last-child { padding-top: 6px; border-top: 1px solid #aebfb2; }
.plot-props { padding: 9px; border: 1px solid #acb7a9; border-radius: 8px; }
.plot-props summary { cursor: pointer; font-size: 14px; font-weight: 580; }
.plot-props .garden-field-row { margin-top: 7px; }
.zone-agree { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.zone-agree :is(input[type='checkbox']) { width: 18px; height: 18px; accent-color: #5d816e; }
.business-list { display: grid; gap: 7px; margin-top: 15px; }
.business-list .garden-action { justify-content: flex-start; }
.plaza-package[data-paper='1'] { background: repeating-linear-gradient(35deg, #ffffff26 0 2px, transparent 2px 6px), var(--wrap); }
.plaza-package[data-paper='2'] { border-radius: 4px 4px 2px 2px; background: radial-gradient(circle, #fff6 1px, transparent 1.5px) 0 0 / 5px 5px, var(--wrap); }
.plaza-package::before, .plaza-package::after { background: var(--gift-ribbon, #f7df99); }
.plaza-gauge { position: absolute; translate: -50% -50%; display: flex; gap: 7px; white-space: nowrap; align-items: center; padding: 4px 9px; border: 1px solid #b19268; border-radius: 7px; background: #f8e5bf; color: #3f4637; font-size: 12px; }
.plaza-gauge strong { color: #86586b; font-size: 17px; font-variant-numeric: tabular-nums; }
.plaza-gauge em { padding: 2px 5px; border-radius: 4px; background: #e9d5ab; font-size: 9px; font-style: normal; }
.legal-page { max-width: 820px; margin: auto; padding: 26px var(--gutter) 45px; line-height: 1.65; color: #2b4238; }
.legal-page header { display: flex; justify-content: space-between; align-items: center; }
.legal-page .language-select { background: #304640; }
.legal-page h1, .legal-page h2 { font: 500 34px/1.15 var(--serif); }
.legal-page nav { display: flex; flex-wrap: wrap; gap: 5px 17px; }
.legal-page section { margin-top: 18px; padding-top: 8px; border-top: 1px solid #c4ccbe; }
.legal-page h3 { margin-bottom: 3px; }
.legal-page :is(h3 + p, h3 + ul) { margin-top: 4px; }
.legal-banner { padding: 9px 13px; background: #eee4cd; border-left: 3px solid #d3b875; }

@media (max-width: 850px) { .garden-controls { top: 100px; } }
@media (max-width: 600px) {
  .garden-controls { top: 79px; left: var(--gutter); right: auto; align-items: flex-start; }
  .garden-actions { justify-content: flex-start; }
  .garden-actions .garden-action { padding: 5px 8px; gap: 5px; min-height: 35px; font-size: 12px; }
  .garden-actions .icon { width: 15px; height: 15px; }
  .garden-actions :is(#square-button, #account-button, #friends-button, #business-button) span { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .language-select { min-height: 36px; min-width: 37px; padding: 4px 6px; font-size: 12px; }
  .intro { top: 164px; }
  .garden-plant-layout { grid-template-columns: 1fr; gap: 9px; }
  .plant-preview-wrap { min-height: auto; padding: 8px; display: grid; grid-template-columns: 76px 1fr; }
  .plant-preview-wrap .tree-sign strong { font-size: 21px; }
  .ball-stage { min-height: 120px; }
  .ball-stage .ball-preview { width: 75px; height: 75px; font-size: 34px; }
  .business-editor { grid-template-columns: 1fr; }
  .plot-preview-panel { position: static; }
  .plot-preview-panel .zone-preview { max-height: 152px; width: auto; }
  .chest-item { flex-wrap: wrap; }
  .chest-item .garden-buttons .garden-action { min-height: 32px; padding: 5px 7px; }
}
@media (max-width: 440px) { .intro { top: 204px; } }
@media (prefers-reduced-motion: reduce) { .watered-tree { animation: none; } }
