{
  "version": 1,
  "title": "Refrain Garden",
  "subtitle": "Permanent-current mobile puzzle — gameplay and UI implementation guide",
  "theme": {
    "background": "#081425",
    "surface": "#142940",
    "paper": "#e9e2ce",
    "ink": "#132132",
    "muted": "#9fb3c4",
    "accent": "#55dfe6",
    "danger": "#f06d62",
    "gold": "#f1c66a"
  },
  "overview": [
    {
      "label": "Fantasy",
      "text": "Conduct living wind through a moonlit garden so glyph seeds bloom their matching flowers.",
      "sourceRefs": [
        "E-SEED",
        "E-FLOWER",
        "ENV-GARDEN"
      ]
    },
    {
      "label": "Genre",
      "text": "Portrait deterministic motion-composition puzzle with authored 45–120 second boards.",
      "sourceRefs": [
        "M-RIBBON",
        "M-BREATH"
      ]
    },
    {
      "label": "Platform",
      "text": "Mobile-first phone and tablet, portrait only, offline-first, one-finger snapped paths.",
      "sourceRefs": [
        "SCR-GAMEPLAY",
        "E-ANCHOR"
      ]
    },
    {
      "label": "Core loop",
      "text": "Read → draw one ribbon → inspect four beats → commit → every old current replays → bloom or retry.",
      "sourceRefs": [
        "M-RIBBON",
        "M-PREVIEW",
        "M-BREATH",
        "M-BLOOM",
        "M-RETRY"
      ]
    },
    {
      "label": "Visual identity",
      "text": "Indigo pressed-paper garden, pale anchors, cyan numbered currents, glyph seeds, coral hazards, warm blooms.",
      "sourceRefs": [
        "ENV-NIGHT",
        "E-ANCHOR",
        "E-SEED",
        "E-THORN",
        "V-BLOOM"
      ]
    },
    {
      "label": "Camera",
      "text": "Locked orthographic top-down board; the full integer grid remains visible and never rotates or crops.",
      "sourceRefs": [
        "ENV-GARDEN",
        "SCR-GAMEPLAY"
      ]
    },
    {
      "label": "Readability",
      "text": "Glyphs, outlines, hatches, numbered seals, chevrons, beat labels, and text duplicate every semantic color.",
      "sourceRefs": [
        "A-COLOR",
        "A-TEXT",
        "UI-TIMELINE"
      ]
    },
    {
      "label": "Hard exclusions",
      "text": "No freeform physics, pipe connection, perspective, characters, currencies, boosters, dialogue, or hidden cells.",
      "sourceRefs": [
        "M-VECTOR",
        "UI-UNLOCK"
      ]
    }
  ],
  "gameplayFlow": [
    {
      "step": 1,
      "title": "Read the live garden",
      "description": "Identify seeds, matching flowers, old numbered ribbons, hazards, gates, and remaining ribbon budget.",
      "assetId": "ART-GAMEPLAY",
      "sourceRefs": [
        "ST-ACTIVE",
        "E-SEED",
        "E-FLOWER",
        "E-THORN",
        "E-GATE"
      ]
    },
    {
      "step": 2,
      "title": "Draw one snapped ribbon",
      "description": "Start on an enabled border anchor and cross unique orthogonal cells to another enabled anchor.",
      "assetId": "ART-ONBOARDING",
      "sourceRefs": [
        "ST-DRAWING",
        "M-RIBBON",
        "E-ANCHOR"
      ]
    },
    {
      "step": 3,
      "title": "Inspect four exact beats",
      "description": "Scrub Start through beat 4 and read every seed intent, block, gate, collision, and projected bloom.",
      "assetId": "ART-GAMEPLAY",
      "sourceRefs": [
        "ST-PREVIEW",
        "M-PREVIEW",
        "UI-TIMELINE"
      ]
    },
    {
      "step": 4,
      "title": "Commit the new current",
      "description": "The new ribbon is numbered and becomes a permanent vector field beside every prior ribbon.",
      "assetId": "ART-GAMEPLAY",
      "sourceRefs": [
        "M-RIBBON",
        "M-VECTOR",
        "V-RIBBON"
      ]
    },
    {
      "step": 5,
      "title": "Resolve together",
      "description": "All seeds calculate and move simultaneously for four beats through combined old and new vectors.",
      "assetId": "ART-GAMEPLAY",
      "sourceRefs": [
        "ST-RESOLVING",
        "M-BREATH",
        "V-PULSE"
      ]
    },
    {
      "step": 6,
      "title": "Bloom or learn",
      "description": "Valid matching flowers bloom; a fatal rule preserves decisive cells and supports immediate retry.",
      "assetId": "ART-SUCCESS",
      "sourceRefs": [
        "ST-SUCCESS",
        "ST-FAILURE",
        "M-BLOOM",
        "M-RETRY"
      ]
    }
  ],
  "tutorial": [
    {
      "title": "Match",
      "instruction": "Find the seed and sleeping flower with the same glyph and outline.",
      "sourceRefs": [
        "E-SEED",
        "E-FLOWER",
        "A-COLOR"
      ]
    },
    {
      "title": "Anchor",
      "instruction": "Press one glowing border anchor; disabled anchors show a slash and label.",
      "sourceRefs": [
        "E-ANCHOR",
        "ST-DISABLED"
      ]
    },
    {
      "title": "Draw",
      "instruction": "Drag through snapped orthogonal cells without revisiting a cell.",
      "sourceRefs": [
        "M-RIBBON",
        "ST-DRAWING"
      ]
    },
    {
      "title": "Preview",
      "instruction": "Use Start, 1, 2, 3, 4 to inspect the exact result before committing.",
      "sourceRefs": [
        "M-PREVIEW",
        "UI-TIMELINE"
      ]
    },
    {
      "title": "Commit",
      "instruction": "Commit only when every visible beat is acceptable; release alone never commits.",
      "sourceRefs": [
        "UI-PRIMARY",
        "ST-PREVIEW"
      ]
    },
    {
      "title": "Refrain",
      "instruction": "Watch the old numbered current replay together with the current you just added.",
      "sourceRefs": [
        "M-BREATH",
        "V-PULSE"
      ]
    },
    {
      "title": "Collision",
      "instruction": "Same-cell and swap intents identify both seeds and the decisive beat.",
      "sourceRefs": [
        "V-COLLISION",
        "ST-FAILURE"
      ]
    },
    {
      "title": "Retry",
      "instruction": "Restart the exact authored garden immediately without currency or delay.",
      "sourceRefs": [
        "M-RETRY",
        "SCR-FAILURE"
      ]
    }
  ],
  "entityCards": [
    {
      "title": "Glyph seed",
      "description": "Luminous seed with unique glyph and outline; idle, projected, moving, blocked, collision, and bloom-bound states.",
      "sourceRefs": [
        "E-SEED",
        "A-COLOR"
      ]
    },
    {
      "title": "Sleeping flower",
      "description": "Closed paper-light bud with matching glyph ring; sleeping, eligible, wrong-order, and bloomed states.",
      "sourceRefs": [
        "E-FLOWER",
        "M-BLOOM"
      ]
    },
    {
      "title": "Thorn and stone",
      "description": "Coral spike-hatch is fatal; pale solid stone blocks movement and leaves the seed in place.",
      "sourceRefs": [
        "E-THORN",
        "E-STONE"
      ]
    },
    {
      "title": "Anchor and gate",
      "description": "Large border anchors begin/end ribbons; aperture gates show open/closed state and beat numeral.",
      "sourceRefs": [
        "E-ANCHOR",
        "E-GATE"
      ]
    }
  ],
  "systemCards": [
    {
      "title": "Permanent ribbon",
      "description": "Each committed path remains visible, numbered by age, and active on every later breath.",
      "sourceRefs": [
        "M-RIBBON",
        "V-RIBBON"
      ]
    },
    {
      "title": "Vector composition",
      "description": "Opposites cancel, reinforcement remains one cell, and perpendicular inputs form one diagonal move.",
      "sourceRefs": [
        "M-VECTOR"
      ]
    },
    {
      "title": "Exact preview",
      "description": "Five inspectable frames show the same deterministic outcome that Commit will resolve.",
      "sourceRefs": [
        "M-PREVIEW",
        "UI-TIMELINE"
      ]
    },
    {
      "title": "Four-beat breath",
      "description": "All remaining seeds resolve simultaneous intent, blocking, collision, and bloom checks four times.",
      "sourceRefs": [
        "M-BREATH",
        "M-BLOOM"
      ]
    }
  ],
  "screenAssetIds": [
    "ART-GAMEPLAY",
    "ART-GAMEPLAY-STATES",
    "ART-ONBOARDING",
    "ART-HOME",
    "ART-BED-SELECT",
    "ART-PAUSE",
    "ART-SUCCESS",
    "ART-FAILURE",
    "ART-SETTINGS",
    "ART-ACCESSIBILITY",
    "ART-LEGAL-ERROR"
  ],
  "implementationNotes": [
    {
      "label": "HUD",
      "text": "Budget and bed stay above the board; Start/1/2/3/4 remains between HUD and garden.",
      "sourceRefs": [
        "UI-TOPBAR",
        "UI-TIMELINE"
      ]
    },
    {
      "label": "Touch",
      "text": "Anchors are 56×56 plus inward extension; all other controls are at least 48×48.",
      "sourceRefs": [
        "E-ANCHOR",
        "UI-PRIMARY"
      ]
    },
    {
      "label": "Type",
      "text": "Essential text starts at 17 logical px and scales to 150% without covering cells.",
      "sourceRefs": [
        "A-TEXT"
      ]
    },
    {
      "label": "Motion",
      "text": "Each beat is at most 300 ms; reduced motion uses four 100 ms stepped highlights.",
      "sourceRefs": [
        "V-PULSE",
        "A-MOTION"
      ]
    },
    {
      "label": "Access",
      "text": "Glyphs, hatches, seals, chevrons, labels, haptic settings, and cell summaries reinforce state.",
      "sourceRefs": [
        "A-COLOR",
        "A-HAPTIC"
      ]
    },
    {
      "label": "Export",
      "text": "Layered runtime sources, 1×/2×/3× atlases, whole-pixel grid edges, and no runtime generated art.",
      "sourceRefs": [
        "ENV-GARDEN",
        "V-RIBBON"
      ]
    }
  ],
  "sourceRefs": [
    "M-RIBBON",
    "M-PREVIEW",
    "M-BREATH",
    "M-VECTOR",
    "M-BLOOM",
    "M-RETRY",
    "E-SEED",
    "E-FLOWER",
    "E-ANCHOR",
    "E-THORN",
    "E-STONE",
    "E-GATE",
    "ENV-GARDEN",
    "ENV-NIGHT",
    "ENV-HERBARIUM",
    "UI-TOPBAR",
    "UI-TIMELINE",
    "UI-PRIMARY",
    "UI-MODAL",
    "UI-UNLOCK",
    "A-COLOR",
    "A-MOTION",
    "A-TEXT",
    "A-HAPTIC",
    "V-RIBBON",
    "V-PULSE",
    "V-BLOOM",
    "V-THORN",
    "V-EDGE",
    "V-COLLISION",
    "V-ORDER",
    "V-SUCCESS"
  ]
}
