{
  "version": 1,
  "title": "Foldwake",
  "subtitle": "Paper-sea fold puzzle — gameplay and UI implementation guide",
  "theme": {
    "background": "#071827",
    "surface": "#102a40",
    "paper": "#f1e4c6",
    "ink": "#172633",
    "muted": "#9cb3c1",
    "accent": "#45d7df",
    "danger": "#df6b58",
    "gold": "#d9a84e"
  },
  "overview": [
    {
      "label": "Fantasy",
      "text": "Fold a living nautical chart so paired rescue boats land safely on their matching harbors.",
      "sourceRefs": ["M-FOLD", "E-BOAT", "E-HARBOR"]
    },
    {
      "label": "Genre",
      "text": "Single-screen deterministic spatial transformation puzzle with short mobile sessions.",
      "sourceRefs": ["M-FOLD", "M-RESOLVE"]
    },
    {
      "label": "Platform",
      "text": "Phone and tablet, portrait only, offline-first, one-finger touch controls.",
      "sourceRefs": ["SCR-GAMEPLAY", "UI-CREASE-RAIL"]
    },
    {
      "label": "Core loop",
      "text": "Read chart → choose crease → preview overlap → release to resolve → rescue both pairs or retry.",
      "sourceRefs": ["M-FOLD", "M-PREVIEW", "M-RESOLVE", "M-RETRY"]
    },
    {
      "label": "Visual identity",
      "text": "Indigo stitched atlas, cream paper charts, cyan crease energy, amber rescue light, coral hazards.",
      "sourceRefs": ["ENV-CHART", "ENV-ATLAS", "E-CREASE", "E-REEF"]
    },
    {
      "label": "Camera",
      "text": "Locked orthographic top-down board; folding changes topology, never camera perspective.",
      "sourceRefs": ["ENV-CHART", "V-FOLD"]
    },
    {
      "label": "Readability",
      "text": "Glyph, silhouette, hatch, arrows, and labels duplicate every critical color state.",
      "sourceRefs": ["A-COLOR", "A-TEXT"]
    },
    {
      "label": "Hard exclusions",
      "text": "No free-angle folds, realistic ocean, currencies, boosters, shop, dialogue, or decorative depth.",
      "sourceRefs": ["M-FOLD", "ENV-CHART"]
    }
  ],
  "gameplayFlow": [
    {
      "step": 1,
      "title": "Read the live chart",
      "description": "Identify two boats, their paired harbors, the reef, tide arrow, and available crease rail.",
      "assetId": "ART-GAMEPLAY",
      "sourceRefs": ["ST-ACTIVE", "E-BOAT", "E-HARBOR", "E-REEF", "E-TIDE"]
    },
    {
      "step": 2,
      "title": "Touch a crease",
      "description": "Press the board-edge rail; the selected crease and moving half become explicit.",
      "assetId": "ART-ONBOARDING",
      "sourceRefs": ["M-FOLD", "E-CREASE", "UI-CREASE-RAIL"]
    },
    {
      "step": 3,
      "title": "Preview topology",
      "description": "Drag along the rail to see every projected rescue, tide rotation, and reef collision before commitment.",
      "assetId": "ART-GAMEPLAY",
      "sourceRefs": ["M-PREVIEW", "E-TIDE", "E-REEF", "A-COLOR"]
    },
    {
      "step": 4,
      "title": "Release to resolve",
      "description": "The moving half hinges over the crease and the deterministic board state snaps into place.",
      "assetId": "ART-GAMEPLAY",
      "sourceRefs": ["M-RESOLVE", "V-FOLD"]
    },
    {
      "step": 5,
      "title": "Complete both rescues",
      "description": "Both paired boats overlap their matching harbors without touching a reef.",
      "assetId": "ART-SUCCESS",
      "sourceRefs": ["ST-SUCCESS", "V-RESCUE", "V-SUCCESS"]
    },
    {
      "step": 6,
      "title": "Understand failure",
      "description": "A reef collision names the invalid fold, preserves the chart context, and offers an immediate retry.",
      "assetId": "ART-FAILURE",
      "sourceRefs": ["ST-FAILURE", "V-WRECK", "M-RETRY"]
    }
  ],
  "tutorial": [
    { "title": "Observe", "instruction": "Find the boat and the harbor carrying the same pair glyph.", "sourceRefs": ["E-BOAT", "E-HARBOR"] },
    { "title": "Touch", "instruction": "Press and hold the cyan crease rail at the board edge.", "sourceRefs": ["E-CREASE", "UI-CREASE-RAIL"] },
    { "title": "Drag", "instruction": "Move along the locked rail; free-angle folding is never offered.", "sourceRefs": ["M-FOLD"] },
    { "title": "Preview", "instruction": "Read projected matches, tide rotation, and hatched reef danger.", "sourceRefs": ["M-PREVIEW", "E-TIDE", "E-REEF"] },
    { "title": "Release", "instruction": "Commit only when the visible topology produces a safe overlap.", "sourceRefs": ["M-RESOLVE", "V-FOLD"] },
    { "title": "Rescue", "instruction": "Match both boats to both harbors to complete the chart.", "sourceRefs": ["V-RESCUE", "ST-SUCCESS"] },
    { "title": "Collision", "instruction": "A reef overlap ends the attempt without a surprise hidden rule.", "sourceRefs": ["V-WRECK", "ST-FAILURE"] },
    { "title": "Retry", "instruction": "Restart the same chart immediately and apply the learned correction.", "sourceRefs": ["M-RETRY"] }
  ],
  "entityCards": [
    { "title": "Rescue boat", "description": "Cream hull, amber lantern, and pair glyph; shows active, projected, rescued, and wrecked states.", "sourceRefs": ["E-BOAT"] },
    { "title": "Harbor", "description": "Teal ring dock with pair glyph; shows empty, projected match, and completed seal.", "sourceRefs": ["E-HARBOR"] },
    { "title": "Reef", "description": "Irregular coral crown plus diagonal hatch; collision remains readable without color.", "sourceRefs": ["E-REEF", "A-COLOR"] },
    { "title": "Tide arrow", "description": "Broad double-line rule marker that rotates with the folded board half.", "sourceRefs": ["E-TIDE"] }
  ],
  "systemCards": [
    { "title": "Crease fold", "description": "One axis-aligned rail defines the moving half and legal hinge.", "sourceRefs": ["M-FOLD", "E-CREASE"] },
    { "title": "Overlap preview", "description": "All projected rescue and hazard outcomes appear before release.", "sourceRefs": ["M-PREVIEW", "A-COLOR"] },
    { "title": "Deterministic resolve", "description": "Release applies the previewed topology exactly; there is no randomness.", "sourceRefs": ["M-RESOLVE"] },
    { "title": "Immediate retry", "description": "Failure preserves the visible cause and restarts the same chart without cost.", "sourceRefs": ["M-RETRY", "ST-FAILURE"] }
  ],
  "screenAssetIds": [
    "ART-GAMEPLAY",
    "ART-ONBOARDING",
    "ART-HOME",
    "ART-PAUSE",
    "ART-SUCCESS",
    "ART-FAILURE",
    "ART-SETTINGS",
    "ART-ACCESSIBILITY",
    "ART-LEGAL-ERROR"
  ],
  "implementationNotes": [
    { "label": "HUD", "text": "Level, boat count, crease count, and 56×56 pause target stay above the chart.", "sourceRefs": ["UI-TOPBAR"] },
    { "label": "Touch", "text": "Crease rails receive a 16 px invisible extension; every target is at least 48×48.", "sourceRefs": ["UI-CREASE-RAIL"] },
    { "label": "Type", "text": "Essential text starts at 17 px, uses tabular numerals, and scales to 150% without shrinking.", "sourceRefs": ["A-TEXT"] },
    { "label": "Motion", "text": "Fold resolves in 280 ms; reduced motion replaces the hinge with a 100 ms crossfade.", "sourceRefs": ["V-FOLD", "A-MOTION"] },
    { "label": "Access", "text": "Glyphs, hatches, arrows, labels, haptics settings, and screen-reader cell summaries reinforce state.", "sourceRefs": ["A-COLOR", "A-HAPTIC"] },
    { "label": "Export", "text": "Layered runtime sources, 1×/2×/3× sprites, whole-pixel fold edges, and a 2048² atlas ceiling.", "sourceRefs": ["ENV-CHART", "E-CREASE"] }
  ],
  "sourceRefs": [
    "M-FOLD", "M-PREVIEW", "M-RESOLVE", "M-RETRY", "E-BOAT", "E-HARBOR", "E-REEF",
    "E-TIDE", "E-CREASE", "UI-TOPBAR", "UI-CREASE-RAIL", "A-COLOR", "A-MOTION", "A-TEXT",
    "A-HAPTIC", "V-FOLD", "V-RESCUE", "V-WRECK", "V-SUCCESS"
  ]
}
