.fire-choice {
  border: 0;
  padding: 0;
  margin: 0 0 24px;
  min-width: 0;
}
.fire-choice legend {
  margin-bottom: 10px;
}
.fire-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px;
  scroll-snap-type: x mandatory;
}
.fire-strip button {
  flex: 1 1 0;
  min-width: 0;
  padding: 5px 5px 9px;
  border-radius: 12px;
  border: 2px solid transparent;
  background: var(--surface);
  scroll-snap-align: start;
}
.fire-strip button[aria-pressed="true"] {
  border-color: var(--pink);
  background: var(--surface2);
}
.fire-strip .canvas-wrap {
  height: 92px;
  aspect-ratio: auto;
  overflow: hidden;
  background: #090b13;
  border-radius: 7px;
}
.fire-strip canvas {
  object-fit: contain;
}
.fire-strip button > span {
  display: block;
  font-size: 12px;
  margin-top: 7px;
  white-space: nowrap;
}
.fire-brush-hint {
  font-size: 12px;
  line-height: 1.7;
  color: var(--text);
}
.flame-footnote {
  font-size: 11px;
  color: var(--sub);
  line-height: 1.7;
  margin-top: 5px;
}
.deco-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 20px;
}
.deco-tools button {
  font-size: 12px;
}
.maker-deco {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: 82px;
}
.maker-deco > .app-header,
.maker-deco > .steps,
.maker-deco > .guide {
  flex-shrink: 0;
}
.maker-deco .guide {
  padding: 18px 0 22px;
}
.maker-deco .guide h1 {
  font-size: 22px;
}
.maker-deco .help {
  position: absolute;
  z-index: 5;
  top: 75px;
  left: 5%;
  right: 5%;
  box-shadow: 0 12px 50px #0009;
}
.workspace.fire-workspace {
  display: grid;
  flex: 1;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) 400px;
  align-items: center;
  gap: 28px;
  overflow: hidden;
}
.fire-workspace .stage {
  position: relative;
  top: auto;
  width: 100%;
  border: 2px dashed var(--pink);
  max-width: min(100%, calc((100dvh - 410px) * 1.6667));
  margin: auto;
}
.fire-workspace .panel {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 0 20px 28px;
  border-left: 1px solid var(--line);
}
.fire-workspace .navigation {
  margin-top: 22px;
  padding-top: 18px;
}
@media (max-width: 899px) {
  .maker-deco {
    padding-left: 14px;
    padding-right: 14px;
    padding-bottom: 76px;
  }
  .maker-deco .app-header {
    height: 60px;
  }
  .maker-deco .steps {
    margin-top: 14px;
  }
  .maker-deco .guide {
    padding: 10px 0 14px;
  }
  .maker-deco .guide h1 {
    font-size: 18px;
  }
  .maker-deco .guide p {
    font-size: 11px;
    margin-top: 4px;
  }
  .workspace.fire-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 16px;
    align-items: start;
  }
  .fire-workspace .stage {
    max-width: min(100%, calc(30dvh * 1.6667));
    margin: auto;
  }
  .fire-workspace .panel {
    padding: 0 0 20px;
    border: 0;
  }
  .fire-workspace .stage-hint {
    font-size: 10px;
    padding-bottom: 8px;
    min-height: 20px;
  }
  .fire-choice {
    margin-bottom: 18px;
  }
  .fire-strip .canvas-wrap {
    height: 76px;
  }
}
@media (max-height: 600px) {
  .maker-deco {
    height: auto;
    min-height: 100dvh;
  }
  .workspace.fire-workspace {
    overflow: visible;
  }
  .fire-workspace .panel {
    overflow: visible;
  }
  .fire-workspace .stage {
    max-width: 100%;
  }
}

.fire-strip canvas {
  transform: scale(2.1);
  transform-origin: 50% 52%;
}

.flame-appearance > .flame-footnote {
  margin-bottom: 20px;
}
.flame-colors {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.flame-colors button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 8px 3px;
  font-size: 11px;
  background: var(--surface);
}
.flame-colors button[aria-pressed="true"] {
  border-color: var(--pink);
  background: var(--surface2);
}
.flame-color-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 42% 30%,
    #fff9,
    var(--flame-color) 52%,
    #0007
  );
  box-shadow: 0 0 12px color-mix(in srgb, var(--flame-color) 30%, transparent);
}

.samples.material-options {
  width: min(100%, 288px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 3px;
}
/* One surface per material card, including the dark charcoal sample. */
.fire-maker .material-options button.sample {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 6px 4px 8px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: #51494e;
  color: var(--text);
  box-shadow: none;
}
.fire-maker .material-options button.sample:hover { background: #5b5258; }
.fire-maker .material-options button.sample[aria-pressed="true"] {
  border-color: var(--accent-hi);
  background: #51494e;
  color: var(--text);
  box-shadow: none;
}
.fire-maker .material-options .canvas-wrap {
  height: 56px;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
}
.material-options canvas {
  object-fit: contain;
  transform: scale(1.65);
}
.fire-maker .material-options .sample > span {
  margin-top: 4px;
  font-size: 13px;
  line-height: 20px;
  font-weight: 700;
}
.material-options + .fire-choice {
  margin-top: 24px;
  margin-bottom: 32px;
}
.stage.dark-stage {
  background: #000;
}

/* Contrast aid only; the exported canvas remains transparent. */
.stage.light-stage {
  background: #c9c9cd;
}
.stage.light-stage .stage-hint {
  color: #343039;
}

.flame-colors .flame-color-dot {
  background: var(--flame-color);
  border: 1px solid #ffffff55;
}
@media (max-width: 480px) {
  .flame-colors {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.decoration-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.decoration-options button {
  min-width: 0;
  padding: 4px 4px 8px;
  border-radius: 12px;
  border: 2px solid transparent;
  background: var(--surface);
}
.decoration-options button[aria-pressed="true"] {
  border-color: var(--pink);
  background: var(--surface2);
}
.decoration-options .canvas-wrap {
  height: 64px;
  aspect-ratio: auto;
  overflow: hidden;
}
.decoration-options canvas {
  object-fit: contain;
  transform: scale(1.6);
}
.decoration-options button > span {
  display: block;
  font-size: 11px;
  margin-top: 4px;
  white-space: nowrap;
}

.flame-controls > .primary {
  margin-bottom: 24px;
}

/* Shared amount choices: only the selected flame receives a full outline. */
.flame-amount-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.fire-maker .flame-amount-options button,
.fire-maker .flame-amount-options button[aria-pressed="true"],
.fire-maker .flame-amount-options button:hover {
  min-width:0; min-height:0; padding:0 0 4px; border:0;
  border-radius:8px; background:transparent; box-shadow:none; color:var(--text);
}
.flame-amount-options .canvas-wrap { height:84px; aspect-ratio:auto; overflow:hidden; }
.flame-amount-options canvas { object-fit:contain; transform:scale(3.2); transform-origin:50% 60%; }
.flame-amount-options.is-auto canvas { transform:scale(1.5); transform-origin:50% 52%; }
.flame-amount-options button > span {
  display:table; font-size:12px; line-height:18px; margin:4px auto 0;
  padding:0 2px 3px; border-bottom:2px solid transparent; white-space:nowrap;
}
.flame-amount-options button[aria-pressed="true"] > span { color:var(--accent-hi); border-bottom-color:transparent; }
.flame-amount-options button:hover > span { color:var(--accent-hi); }

.fire-maker .flame-amount-options button[aria-pressed="true"] {
  box-shadow:inset 0 0 0 2px var(--accent-hi);
  background:rgba(255,122,168,.05);
}
