.fire-maker, .fire-maker * {
  box-sizing: border-box;
}
.fire-maker {
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  --pink: var(--accent);
}
/* Limit base controls to maker content without raising selector specificity. */
.fire-maker :where(.workspace, .help) button:not(:where(.sample-sheet button, .sample-pro-layer button, .fire-done button, .lm-top button, .lm-bottom button, .maker-sound-setting, .btn-main)),
.fire-maker .workspace input {
  font: inherit;
}
.fire-maker :where(.workspace, .help) button:not(:where(.sample-sheet button, .sample-pro-layer button, .fire-done button, .lm-top button, .lm-bottom button, .maker-sound-setting, .btn-main)) {
  cursor: pointer;
  border: 1px solid var(--line);
  color: inherit;
  background: var(--surface2);
  border-radius: 999px;
  min-height: 44px;
  padding: 10px 20px;
  font-weight: 700;
  transition:
    background-color 0.15s,
    color 0.15s,
    border-color 0.15s;
}
.fire-maker :where(.workspace, .help) button:not(:where(.sample-sheet button, .sample-pro-layer button, .fire-done button, .lm-top button, .lm-bottom button, .maker-sound-setting, .btn-main)):hover {
  background: var(--line);
}
.fire-maker :where(.workspace, .help) button:not(:where(.sample-sheet button, .sample-pro-layer button, .fire-done button, .lm-top button, .lm-bottom button, .maker-sound-setting, .btn-main)):focus-visible,
.fire-maker .workspace input:focus-visible {
  outline: 3px solid var(--accent-hi);
  outline-offset: 4px;
}
.fire-maker :where(.workspace, .help) button:not(:where(.sample-sheet button, .sample-pro-layer button, .fire-done button, .lm-top button, .lm-bottom button, .maker-sound-setting, .btn-main))[aria-pressed="true"] {
  border: 2px solid var(--pink);
  color: var(--pink);
  background: var(--surface2);
}
.fire-maker :where(.workspace, .help) button:not(:where(.sample-sheet button, .sample-pro-layer button, .fire-done button, .lm-top button, .lm-bottom button, .maker-sound-setting, .btn-main)):disabled {
  opacity: 0.35;
  cursor: default;
}
.fire-maker :where(.workspace, .help) button:not(:where(.sample-sheet button, .sample-pro-layer button, .fire-done button, .lm-top button, .lm-bottom button, .maker-sound-setting, .btn-main)).primary {
  background: var(--pink);
  color: #fff;
  border-color: var(--pink);
}
.fire-maker :where(.workspace, .help) button:not(:where(.sample-sheet button, .sample-pro-layer button, .fire-done button, .lm-top button, .lm-bottom button, .maker-sound-setting, .btn-main)).primary:hover {
  background: var(--accent-deep);
}
.fire-maker .step-guide h1,
.fire-maker .workspace h2,
.fire-maker .workspace p,
.fire-maker .help p {
  margin: 0;
}
.fire-maker .workspace h2,
.fire-maker .workspace legend {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.6;
}
.maker {
  max-width: 1320px;
  margin: auto;
  padding: 0 42px 116px;
}
.app-header {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 82px;
  border-bottom: 1px solid #2c242a;
}
.brand {
  color: var(--pink);
  text-decoration: none;
  font-weight: 900;
  font-size: 19px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand span {
  font-size: 14px;
  color: #eee5eb;
  font-weight: 700;
}
.prototype-label {
  font-size: 11px;
  color: #aa949f;
  border: 1px solid #4b3a44;
  padding: 3px 9px;
  border-radius: 5px;
}
.header-tools {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.header-tools button {
  font-size: 12px;
  background: transparent;
  padding: 6px 13px;
  min-height: 34px;
}
.guide {
  text-align: center;
  padding: 28px 0 30px;
}
.guide h1 {
  font-size: 30px;
  letter-spacing: 0.025em;
}
.guide p {
  font-size: 13px;
  color: #b8aab3;
  margin-top: 10px;
  line-height: 1.7;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(350px, 1fr);
  align-items: start;
  gap: 36px;
}
.stage {
  position: sticky;
  top: 24px;
  border: 2px dashed var(--pink);
  border-radius: 22px;
  overflow: hidden;
  background: #090b13;
  min-width: 0;
}
.touch-stage {
  border: 2px dashed var(--pink);
}
.stage-label {
  position: absolute;
  z-index: 1;
  top: 15px;
  left: 16px;
  border: 1px solid #4e3744;
  color: #e9b8cc;
  background: #281c27;
  padding: 6px 12px;
  font-size: 11px;
  border-radius: 999px;
}
.canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 5/3;
}
.canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
}
.touch-stage canvas {
  cursor: pointer;
  touch-action: none;
}
.canvas-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 12px;
  background: #090b13;
  color: #d2b7c5;
}
.stage-hint {
  font-size: 12px;
  text-align: center;
  color: #d3c3cc;
  min-height: 40px;
  padding: 0 12px 18px;
  pointer-events: none;
}
.empty-preview {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #b6a0ad;
  font-size: 13px;
  background: #090b13;
}
.panel {
  min-width: 0;
}
.panel h2 {
  margin-bottom: 14px;
}
.samples {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.sample {
  padding: 8px 6px 11px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
  font-size: 13px;
  min-width: 0;
}
.sample[aria-pressed="true"] {
  box-shadow: 0 0 0 3px #ff78ab13;
}
.sample .canvas-wrap {
  background: #090b13;
  border-radius: 8px;
  aspect-ratio: 5/6;
}
.sample canvas {
  object-fit: contain;
}
.sample > span {
  display: block;
  margin-top: 8px;
}
.material-note {
  font-size: 12px;
  color: #b7a1ae;
  margin-top: 12px;
}
.separator {
  height: 1px;
  background: var(--line);
  margin: 25px 0;
}
.color-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 22px;
}
.color-row h2 {
  margin: 0;
}
.swatches {
  display: flex;
  gap: 15px;
}
.swatches button {
  width: 35px;
  height: 35px;
  min-height: 35px;
  border: 3px solid #151214;
  padding: 0;
  box-shadow: 0 0 0 1px #74626c;
}
.swatches button[aria-pressed="true"] {
  box-shadow: 0 0 0 3px var(--pink);
}
.choice-group {
  border: 0;
  padding: 0;
  margin: 22px 0 0;
  min-width: 0;
}
.choice-group legend {
  margin-bottom: 10px;
}
.pills {
  display: flex;
  gap: 10px;
}
.pills button {
  flex: 1;
  min-width: 0;
  padding: 9px 8px;
  font-size: 12px;
}
.character-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 25px;
}
.character-picks button {
  min-width: 55px;
  padding: 8px 14px;
  font-size: 20px;
}
.growth {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 8px;
  font-size: 12px;
  color: #baa8b3;
}
.growth > span {
  white-space: nowrap;
}
.growth-dots {
  display: flex;
  gap: 5px;
  flex: 1;
}
.growth-dots i {
  height: 5px;
  width: 18px;
  background: #4b3d46;
  border-radius: 4px;
}
.growth-dots .lit {
  background: var(--pink);
}
.growth button {
  padding: 6px 12px;
  min-height: 36px;
  font-size: 12px;
}
.quiet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.quiet-actions button {
  font-size: 11px;
  min-height: 36px;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: var(--sub);
}
.navigation {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 24px;
}
.navigation button {
  min-width: 110px;
  font-size: 13px;
}
.navigation .primary {
  flex: 1;
  max-width: 260px;
}
.bottom-bar {
  position: fixed;
  z-index: 3;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1d181cef;
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 25px;
  padding: 16px max(32px, calc((100vw - 1236px) / 2));
}
.bottom-bar span {
  font-size: 11px;
  color: #a58d9b;
}
.bottom-bar button {
  min-width: 180px;
}
.muted {
  color: var(--sub);
  font-size: 12px;
  line-height: 1.8;
}
.text-label {
  display: block;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
}
.fire-maker .workspace input {
  display: block;
  width: 100%;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  font-size: 24px;
}
.count {
  text-align: right;
  margin: 8px 0 24px;
}
.font-options {
  display: flex;
  gap: 14px;
}
.font-options button {
  flex: 1;
  border-radius: 14px;
  min-width: 0;
  padding: 16px 6px;
  font-size: 11px;
  white-space: nowrap;
}
.font-options span {
  display: block;
  font-size: clamp(18px, 5vw, 28px);
  white-space: nowrap;
  margin-bottom: 10px;
}
.finish-copy {
  color: #beabb6;
  line-height: 2;
  font-size: 14px;
}
.finish-save {
  margin: 25px 0 10px;
  width: 100%;
}
.text-action {
  display: block;
  background: transparent;
  border: 0;
  color: #efb9d0;
  padding-left: 0;
  margin-top: 15px;
  font-size: 13px;
}
.help {
  padding: 20px;
  background: var(--surface);
  border: 1px solid #5c3c4e;
  border-radius: 16px;
  margin-bottom: 25px;
}
.help ul {
  font-size: 13px;
  line-height: 2;
  padding-left: 20px;
}
.toast {
  position: fixed;
  z-index: 4;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  white-space: nowrap;
  background: #472536;
  color: #fff;
  border-radius: 999px;
  padding: 12px 24px;
  pointer-events: none;
}
.toast:empty {
  display: none;
}
@media (max-width: 760px) {
  .maker {
    padding: 0 14px 110px;
  }
  .app-header {
    height: 60px;
    gap: 8px;
  }
  .brand {
    font-size: 15px;
    gap: 9px;
  }
  .brand span {
    font-size: 12px;
  }
  .prototype-label {
    display: none;
  }
  .header-tools {
    gap: 2px;
  }
  .header-tools button {
    padding: 4px 8px;
    font-size: 10px;
  }
  .guide {
    padding: 23px 0;
  }
  .guide h1 {
    font-size: 22px;
  }
  .guide p {
    font-size: 11px;
    margin-top: 8px;
  }
  .workspace {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
  .stage {
    position: relative;
    top: auto;
    width: 100%;
    border-radius: 18px;
  }
  .stage-label {
    top: 11px;
    left: 11px;
    font-size: 10px;
    padding: 4px 9px;
  }
  .stage-hint {
    font-size: 11px;
    min-height: 34px;
    padding-bottom: 14px;
  }
  .panel {
    width: 100%;
  }
  .panel h2,
  legend {
    font-size: 13px;
  }
  .samples {
    gap: 10px;
  }
  .sample {
    font-size: 12px;
    padding: 6px 5px 10px;
  }
  .sample > span {
    margin-top: 7px;
  }
  .material-note {
    font-size: 11px;
  }
  .separator {
    margin: 22px 0;
  }
  .color-row {
    margin-bottom: 20px;
  }
  .choice-group {
    margin-top: 20px;
  }
  .navigation {
    margin-top: 26px;
    padding-top: 20px;
  }
  .bottom-bar {
    padding: 12px 14px;
    gap: 10px;
  }
  .bottom-bar span {
    font-size: 9px;
    flex: 1;
    line-height: 1.7;
    max-width: 150px;
  }
  .bottom-bar button {
    font-size: 12px;
    min-width: 145px;
  }
  .character-picks button {
    min-width: 50px;
    font-size: 19px;
  }
  .growth {
    gap: 8px;
  }
  .growth-dots i {
    width: 16px;
  }
  .toast {
    bottom: 85px;
    max-width: 92vw;
    font-size: 12px;
    padding: 12px 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  button {
    transition: none;
  }
}

/* Fire surface presentation uses the water maker palette, controls and shared progress. */
.stage-label {
  background: #17141cba;
  color: #cdbac4;
  border-color: #4e374466;
}
.stage-hint {
  min-height: 28px;
  padding-bottom: 12px;
  color: #b6a6af;
}
.sample {
  background: #211c20;
  border-radius: 16px;
  padding: 8px 8px 12px;
}
.sample[aria-pressed="true"] {
  background: #20191f;
  border-color: var(--pink);
  box-shadow: 0 0 0 1px var(--pink);
}
.sample .canvas-wrap {
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 70%, #25120e 0%, #090b13 65%);
}
.sample > span {
  font-size: 14px;
}
.texture-detail {
  display: block;
  width: 100%;
  aspect-ratio: 1.6;
  border-radius: 8px;
  background-position: 43% 56%;
  margin: 0 !important;
}
.swatches button {
  background-image: radial-gradient(
    circle at 40% 35%,
    #ffffff44,
    transparent 55%,
    #00000055
  );
}
@media (max-width: 760px) {
  .guide {
    padding: 18px 0 22px;
  }
  .guide h1 {
    font-size: 21px;
  }
  .sample > span {
    font-size: 13px;
  }
  .sample {
    padding: 5px 5px 9px;
  }
  .stage-label {
    font-size: 9px;
    padding: 3px 8px;
  }
}

.fire-render-status { position: absolute; right: 12px; bottom: 12px; padding: 4px 8px; border-radius: 6px; background: #171318cc; color: #eee; font-size: 12px; pointer-events: none; }
