{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "fvcms.cms-local.panel-layout.001",
  "title": "Local CMS Module — Panel Layout",
  "description": "Per-app panel manager layout overrides (default size, snap behavior, dock positions). Deep-merged with vendored defaults.",
  "type": "object",
  "required": ["schema"],
  "properties": {
    "schema": { "const": "fvcms.cms-local.panel-layout.001" },
    "defaultSize": {
      "type": "object",
      "description": "Default size of a freshly-spawned floating panel",
      "properties": {
        "w": { "type": "number", "minimum": 200, "maximum": 2000 },
        "h": { "type": "number", "minimum": 100, "maximum": 2000 }
      }
    },
    "mobileSize": {
      "type": "object",
      "description": "Default size on mobile viewports (≤600px)",
      "properties": {
        "w": { "type": "string", "enum": ["85vw", "90vw", "95vw", "100vw"] },
        "h": { "type": ["string", "number"] }
      }
    },
    "snap": {
      "type": "object",
      "description": "Snap-to-edge behavior",
      "properties": {
        "threshold": { "type": "number", "default": 50, "description": "Distance from edge (in px) to trigger snap" },
        "animate":   { "type": "boolean", "default": true }
      }
    },
    "maxPanels": { "type": "integer", "minimum": 1, "maximum": 20, "default": 8 },
    "order": {
      "type": "array",
      "description": "Default z-order of panels (first = top)",
      "items": { "type": "string" }
    }
  },
  "additionalProperties": true
}
