/* 花园 DIY */
body.garden { background: var(--soft); }
.g-head { padding-top: 72px; padding-bottom: 32px; }
.g-main { padding-top: 0; padding-bottom: 80px; }

.g-bases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.g-bases button { text-align: left; padding: 16px 20px; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.g-bases button.on { background: var(--ink); color: #fff; box-shadow: none; }
.g-bases b { display: block; font-size: 17px; }
.g-bases small { font-size: 13px; color: var(--mute); }
.g-bases button.on small { color: #aaa; }

.g-layout { display: grid; grid-template-columns: 1fr 360px; gap: 20px; margin-top: 20px; align-items: start; }
.g-stage { background: #fff; border-radius: 24px; padding: 20px; position: relative; }
.g-board { touch-action: none; user-select: none; -webkit-user-select: none; }
.g-board svg { display: block; width: 100%; height: auto; max-height: 68vh; }
.g-item { cursor: grab; }
.g-item:hover { filter: brightness(1.05); }
.g-item.on { filter: drop-shadow(0 0 4px rgba(29,107,69,.8)); }
.g-outline { fill: rgba(29,107,69,.12); stroke: var(--accent); stroke-width: 2; stroke-dasharray: 5 4; }
.g-ghost { opacity: .7; pointer-events: none; }
.g-ghost.bad { opacity: .45; }
body.g-dragging, body.g-dragging * { cursor: grabbing !important; }

.g-tools { display: flex; align-items: center; min-height: 40px; margin-top: 8px; font-size: 14px; }
.g-hint { color: var(--mute); }
.g-sel { display: none; align-items: center; gap: 8px; }
.g-sel.on { display: flex; }
.g-sel b { margin-right: 4px; }
.g-actions { position: absolute; top: 16px; right: 16px; display: flex; gap: 8px; }
.hide { display: none; }

.g-side { background: #fff; border-radius: 24px; padding: 20px; position: sticky; top: 68px; }
.g-tabs { display: flex; gap: 6px; }
.g-tabs button { flex: 1; padding: 8px 0; border-radius: 999px; font-size: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.g-tabs button.on { background: var(--ink); color: #fff; box-shadow: none; }
.g-lib { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; max-height: 340px; overflow-y: auto; }
.g-card { display: flex; flex-direction: column; align-items: flex-start; text-align: left; padding: 10px 12px 12px; border-radius: 14px; background: var(--soft); cursor: grab; }
.g-card.on { box-shadow: inset 0 0 0 2px var(--accent); background: #eef5f0; }
.g-ico { width: 100%; height: 64px; display: grid; place-items: center; margin-bottom: 6px; }
.g-ico svg { max-width: 100%; max-height: 64px; }
.g-card b { font-size: 14px; font-weight: 600; }
.g-card small { font-size: 12px; color: var(--mute); }
.g-card em { font-style: normal; font-size: 14px; margin-top: 4px; }

.g-bill { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.g-lines { font-size: 14px; max-height: 160px; overflow-y: auto; }
.g-lines div { display: flex; justify-content: space-between; padding: 4px 0; }
.g-lines span:last-child { font-variant-numeric: tabular-nums; }
.g-sum { width: 100%; border-collapse: collapse; font-size: 14px; color: var(--mute); margin-top: 10px; }
.g-sum td { padding: 6px 0; border-top: 1px solid var(--line); }
.g-sum td:last-child { text-align: right; color: var(--fg); font-variant-numeric: tabular-nums; }
.g-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; }
.g-total b { font-size: 32px; letter-spacing: -.02em; }
.g-range { font-size: 12px; color: var(--mute); margin: 2px 0 14px; }
.g-note { font-size: 13px; color: var(--mute); margin-top: 20px; }
.muted { color: var(--mute); }

.g-form { background: #fff; border-radius: 24px; padding: 28px; width: 100%; max-width: 400px; position: relative; }
.g-form h3 { font-size: 22px; }
.g-form > p { font-size: 14px; margin: 6px 0 20px; }
.g-form .field input { background: var(--soft); color: var(--fg); }
.g-x { position: absolute; top: 14px; right: 18px; font-size: 22px; color: var(--mute); }

@media (max-width: 900px) {
  .g-layout { grid-template-columns: 1fr; }
  .g-side { position: static; }
  .g-lib { grid-template-columns: repeat(3, 1fr); max-height: none; }
}
@media (max-width: 560px) {
  .g-bases { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .g-bases button { padding: 10px 12px; }
  .g-bases small { display: none; }
  .g-stage { padding: 12px; }
  .g-actions { position: static; margin-top: 4px; }
  .g-lib { grid-template-columns: 1fr 1fr; }
}
