/* ForgeEmber Mystical Mandala Maker. All styles are scoped to the shortcode. */
.fe-mm {
  --fe-mm-ink: #e8e6da;
  --fe-mm-muted: #adbfbb;
  --fe-mm-gold: #e2ba70;
  --fe-mm-teal: #83d9ce;
  color: var(--fe-mm-ink);
  background: radial-gradient(ellipse at 12% 0%, #193b3c 0%, #101c27 38%, #0b1721 100%);
  border: 1px solid #4a5147;
  border-radius: 24px;
  padding: clamp(18px, 3.5vw, 38px);
  margin: 24px auto;
  max-width: 1200px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-sizing: border-box;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .18);
}
.fe-mm *, .fe-mm *::before, .fe-mm *::after { box-sizing: border-box; }
.fe-mm .fe-mm-header { text-align: center; padding: 4px 0 25px; }
.fe-mm .fe-mm-kicker, .fe-mm .fe-mm-eyebrow, .fe-mm .fe-mm-stage-top, .fe-mm .fe-mm-footer { color: var(--fe-mm-gold); font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.fe-mm .fe-mm-kicker span { font-size: 15px; margin-right: 5px; }
.fe-mm .fe-mm-header h2 { color: #fff8e8; font: normal clamp(30px, 5vw, 50px)/1.08 Georgia, serif; letter-spacing: -.025em; margin: 9px 0; }
.fe-mm .fe-mm-header p { color: #c7d6d0; font-size: 15px; margin: 0; }
.fe-mm .fe-mm-loading { background: #263441; border-radius: 10px; color: white; padding: 16px; text-align: center; }
.fe-mm .fe-mm-workspace { display: none; }
.fe-mm.fe-mm-ready .fe-mm-loading { display: none; }
.fe-mm.fe-mm-ready .fe-mm-workspace { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); align-items: start; gap: clamp(16px, 2.8vw, 30px); }
.fe-mm .fe-mm-stage, .fe-mm .fe-mm-panel { min-width: 0; }
.fe-mm .fe-mm-stage-top { align-items: center; display: flex; justify-content: space-between; gap: 8px; margin: 0 0 10px; }
.fe-mm .fe-mm-stage-top .fe-mm-stage-hint { color: #b6c6c1; font-size: 11px; font-weight: 500; letter-spacing: 0; text-align: right; }
.fe-mm .fe-mm-paper { position: relative; overflow: hidden; width: 100%; aspect-ratio: 1; border-radius: 15px; background: #101a2b; border: 1px solid #53605b; isolation: isolate; }
.fe-mm .fe-mm-paper[data-background="midnight"] { background-color: #101a2b; }
.fe-mm .fe-mm-paper[data-background="cream"] { background-color: #f6efdf; }
.fe-mm .fe-mm-paper[data-background="teal"] { background-color: #0d383b; }
.fe-mm .fe-mm-paper[data-background="transparent"] { background-color: #d2d9d5; background-image: linear-gradient(45deg, #f0f3f0 25%, transparent 25%), linear-gradient(-45deg, #f0f3f0 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #f0f3f0 75%), linear-gradient(-45deg, transparent 75%, #f0f3f0 75%); background-size: 24px 24px; background-position: 0 0, 0 12px, 12px -12px, -12px 0; }
.fe-mm .fe-mm-canvas { display: block; width: 100%; height: 100%; position: relative; z-index: 2; cursor: crosshair; touch-action: none; outline-offset: -4px; }
.fe-mm .fe-mm-guides { position: absolute; inset: 10%; border: 1px solid rgba(195, 217, 203, .15); border-radius: 50%; z-index: 1; pointer-events: none; }
.fe-mm .fe-mm-guides::before, .fe-mm .fe-mm-guides::after { content: ""; position: absolute; inset: 16%; border: 1px solid rgba(195, 217, 203, .11); border-radius: 50%; }
.fe-mm .fe-mm-guides::after { inset: 34%; }
.fe-mm .fe-mm-paper[data-background="cream"] .fe-mm-guides, .fe-mm .fe-mm-paper[data-background="cream"] .fe-mm-guides::before, .fe-mm .fe-mm-paper[data-background="cream"] .fe-mm-guides::after, .fe-mm .fe-mm-paper[data-background="transparent"] .fe-mm-guides, .fe-mm .fe-mm-paper[data-background="transparent"] .fe-mm-guides::before, .fe-mm .fe-mm-paper[data-background="transparent"] .fe-mm-guides::after { border-color: rgba(31, 59, 59, .16); }
.fe-mm .fe-mm-paper.fe-mm-hide-guides .fe-mm-guides { display: none; }
.fe-mm .fe-mm-cursor { display: none; position: absolute; width: 18px; height: 18px; border: 2px solid white; box-shadow: 0 0 0 2px #193f3e; border-radius: 50%; transform: translate(-50%, -50%); z-index: 3; pointer-events: none; }
.fe-mm .fe-mm-paper.fe-mm-keyboard .fe-mm-cursor { display: block; }
.fe-mm .fe-mm-canvas-help { color: #b5c5c0; font-size: 12px; line-height: 1.5; margin: 9px 1px 14px; }
.fe-mm .fe-mm-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fe-mm button.fe-mm-button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 44px; border: 1px solid #526763; border-radius: 9px; background: #1d3238; color: #edf3ec; padding: 9px 15px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; box-shadow: none; text-decoration: none; }
.fe-mm button.fe-mm-button:hover { background: #29474a; }
.fe-mm button.fe-mm-button:disabled { opacity: .48; cursor: not-allowed; }
.fe-mm button.fe-mm-button-primary { background: #e2ba70; border-color: #e2ba70; color: #132624; margin-left: auto; }
.fe-mm button.fe-mm-button-primary:hover { background: #f0ca84; }
.fe-mm .fe-mm-save-status { color: #b4c5bf; font-size: 11px; line-height: 1.4; margin: 11px 0 0; }
.fe-mm .fe-mm-message { color: #f5ddaa; font-size: 12px; margin-top: 5px; min-height: 0; }
.fe-mm .fe-mm-panel { background: rgba(16, 36, 40, .76); border: 1px solid #405851; border-radius: 15px; padding: clamp(17px, 2.3vw, 25px); }
.fe-mm .fe-mm-panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.fe-mm .fe-mm-panel-heading h3 { color: #fff8e8; font: normal 27px/1.2 Georgia, serif; margin: 5px 0 0; }
.fe-mm .fe-mm-sparkle { color: var(--fe-mm-gold); font-size: 29px; }
.fe-mm .fe-mm-group { border: 0; border-top: 1px solid rgba(202, 218, 197, .15); padding: 16px 0 0; margin: 0 0 18px; min-width: 0; }
.fe-mm .fe-mm-group legend { float: left; width: 100%; padding: 0; margin: 0 0 10px; color: #f5efe1; font-size: 13px; font-weight: 700; }
.fe-mm .fe-mm-group legend + * { clear: both; }
.fe-mm .fe-mm-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.fe-mm .fe-mm-tools button { min-width: 0; min-height: 62px; border: 1px solid #506660; border-radius: 9px; background: #21383b; color: #eaf2e9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font: inherit; font-size: 11px; font-weight: 650; line-height: 1.2; padding: 7px 4px; cursor: pointer; box-shadow: none; }
.fe-mm .fe-mm-tools button:hover { background: #2d4b4c; }
.fe-mm .fe-mm-tools button[aria-pressed="true"] { border-color: #ebca85; background: #465446; color: #fff5d9; box-shadow: inset 0 0 0 1px #ebca85; }
.fe-mm .fe-mm-tool-icon { color: #eacb8e; font-size: 20px; line-height: 1; }
.fe-mm .fe-mm-colours { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fe-mm button.fe-mm-swatch { min-width: 36px; width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 2px solid transparent; background: var(--fe-mm-swatch); box-shadow: 0 0 0 1px #70847c; cursor: pointer; }
.fe-mm button.fe-mm-swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px #e2ba70; }
.fe-mm .fe-mm-custom-colour { position: relative; display: grid; place-items: center; width: 36px; height: 36px; background: #304846; border: 1px solid #77908a; color: white; border-radius: 50%; font-size: 22px; cursor: pointer; overflow: hidden; }
.fe-mm .fe-mm-custom-colour input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .01; cursor: pointer; padding: 0; }
.fe-mm .fe-mm-size-group label, .fe-mm .fe-mm-field label { display: flex; justify-content: space-between; color: #f5efe1; font-size: 13px; font-weight: 700; margin: 0 0 9px; }
.fe-mm .fe-mm-size-value { color: #b7cdc4; }
.fe-mm input.fe-mm-size { width: 100%; height: 22px; margin: 0; accent-color: #e2ba70; cursor: pointer; }
.fe-mm .fe-mm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; border-top: 1px solid rgba(202, 218, 197, .15); padding-top: 15px; }
.fe-mm .fe-mm-field select { width: 100%; min-height: 44px; border: 1px solid #687f77; border-radius: 8px; background: #1c3034; color: #f3f2e8; font: inherit; font-size: 13px; padding: 8px; box-shadow: none; }
.fe-mm .fe-mm-switches { display: grid; gap: 10px; margin: 17px 0 0; }
.fe-mm .fe-mm-switches label { display: flex; align-items: center; gap: 8px; color: #dce8df; font-size: 13px; line-height: 1.3; cursor: pointer; }
.fe-mm .fe-mm-switches input { width: 18px; height: 18px; margin: 0; accent-color: #e2ba70; }
.fe-mm a.fe-mm-cta { display: block; text-align: center; color: #f4d99c; font-size: 14px; font-weight: 700; text-decoration: underline; margin-top: 20px; }
.fe-mm :focus-visible { outline: 3px solid #f5cb72; outline-offset: 3px; }
.fe-mm .fe-mm-custom-colour:focus-within { outline: 3px solid #f5cb72; outline-offset: 3px; }
.fe-mm .fe-mm-footer { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid rgba(202, 218, 197, .15); margin-top: 23px; padding-top: 16px; color: #aabeb2; font-size: 9px; }
.fe-mm { container-type: inline-size; }
.fe-mm [hidden] { display: none !important; }
.fe-mm .fe-mm-paper[data-background="velvet"] { background-color: #2e193e; }
.fe-mm .fe-mm-paper[data-background="black"] { background-color: #0c0c11; }
.fe-mm .fe-mm-guides { background: repeating-conic-gradient(from 0deg, rgba(195,217,203,.1) 0deg .15deg, transparent .15deg var(--fe-mm-spoke, 45deg)); }
.fe-mm .fe-mm-active { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; color: var(--fe-mm-muted); font-size: 11px; line-height: 1.5; margin: 10px 0 13px; }
.fe-mm .fe-mm-active strong { color: #f4d99b; font-weight: 700; }
.fe-mm .fe-mm-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; background: #0c2025; border: 1px solid #415951; padding: 4px; border-radius: 11px; margin-bottom: 16px; }
.fe-mm .fe-mm-tabs button { min-width: 0; min-height: 44px; padding: 8px 4px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #c6d8cf; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: none; }
.fe-mm .fe-mm-tabs button:hover { background: #233d3d; }
.fe-mm .fe-mm-tabs button[aria-selected="true"] { background: #e2ba70; color: #132624; border-color: #e2ba70; }
.fe-mm .fe-mm-mode-panel { margin-bottom: 19px; min-width: 0; }
.fe-mm .fe-mm-stamps { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 12px; }
.fe-mm .fe-mm-stamps button { min-height: 74px; padding: 6px 2px; font-size: 10px; overflow-wrap: anywhere; }
.fe-mm .fe-mm-stamp-icon { display: block; width: 32px; height: 32px; pointer-events: none; }
.fe-mm .fe-mm-note { color: #b4c9bf; font-size: 12px; line-height: 1.55; margin: 11px 0 0; letter-spacing: 0; }
.fe-mm .fe-mm-palette-field { margin-bottom: 12px; }
.fe-mm button.fe-mm-swatch, .fe-mm .fe-mm-custom-colour { min-width: 44px; width: 44px; height: 44px; }
.fe-mm .fe-mm-group legend + .fe-mm-palette-field { clear: both; }
.fe-mm .fe-mm-pattern-actions, .fe-mm .fe-mm-project-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.fe-mm .fe-mm-pattern-actions button { flex: 1; margin-left: 0; }
.fe-mm .fe-mm-project-actions button { flex: 1; white-space: nowrap; }
.fe-mm .fe-mm-details { border-top: 1px solid rgba(202, 218, 197, .17); margin-top: 15px; color: #e3e8dc; }
.fe-mm .fe-mm-details summary { cursor: pointer; min-height: 44px; padding: 12px 0; font-size: 13px; font-weight: 700; line-height: 1.5; color: #f0d59a; }
.fe-mm .fe-mm-details[open] summary { padding-bottom: 8px; }
.fe-mm .fe-mm-details-body { padding: 5px 0 1px; }
.fe-mm .fe-mm-details-body > .fe-mm-size-group + .fe-mm-size-group { margin-top: 16px; }
.fe-mm input.fe-mm-opacity, .fe-mm input.fe-mm-rotation { width: 100%; height: 28px; margin: 0; accent-color: #e2ba70; cursor: pointer; }
.fe-mm .fe-mm-opacity-value, .fe-mm .fe-mm-rotation-value { color: #b7cdc4; }
.fe-mm .fe-mm-switches label { min-height: 34px; }
.fe-mm .fe-mm-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 760px) {
  .fe-mm { border-radius: 16px; padding: 18px; }
  .fe-mm.fe-mm-ready .fe-mm-workspace { grid-template-columns: 1fr; }
  .fe-mm .fe-mm-header { padding-bottom: 19px; }
  .fe-mm .fe-mm-stage-top .fe-mm-stage-hint { font-size: 10px; }
  .fe-mm .fe-mm-panel { padding: 18px; }
  .fe-mm .fe-mm-field select { font-size: 16px; }
}
@media (max-width: 380px) {
  .fe-mm { padding: 13px; }
  .fe-mm .fe-mm-stage-top { font-size: 9px; }
  .fe-mm .fe-mm-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .fe-mm button.fe-mm-button-primary { grid-column: 1 / -1; margin-left: 0; }
}
@media (max-width: 480px) {
  .fe-mm .fe-mm-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .fe-mm .fe-mm-actions button.fe-mm-button-primary { grid-column: auto; margin-left: 0; }
  .fe-mm .fe-mm-row { gap: 8px; }
  .fe-mm .fe-mm-footer { letter-spacing: .08em; font-size: 8px; }
}
@container (max-width: 650px) {
  .fe-mm.fe-mm-ready .fe-mm-workspace { grid-template-columns: 1fr; }
}
