/* v4 | progressive candy craft UI */
:root {
  --bg: #fffaf7;
}
#page-studio {
  background: linear-gradient(180deg,#fff7fb 0%,#fffbf2 22%,#f7fffc 53%,#faf6ff 81%,#fff8fb 100%);
}
.progress-overview {
  margin-top: 22px;
  background: white;
  border: 1.5px solid #e7d4f7;
  box-shadow: 0 7px 19px rgba(107,78,134,.06);
  border-radius: 18px;
  padding: 15px 18px;
}
.progress-overview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.progress-overview-top strong {
  font-size: 13px;
  color: #674a78;
}
.progress-kicker {
  font-weight: 1000;
  letter-spacing: .09em;
  color: #b377c3;
  font-size: 10px;
}
.progress-meter {
  height: 9px;
  border-radius: 9px;
  background: #f3eaf9;
  overflow: hidden;
}
.progress-meter>div {
  height: 100%;
  background: linear-gradient(90deg,#f794bc,#bd8fee,#74cfc1);
  border-radius: 9px;
  transition: width .2s;
}
.progress-track {
  margin: 13px 0 23px;
  gap: 8px;
}
.progress-chip {
  border: 1.5px solid #eedfeb;
  background: #fff;
  font-size: 11px;
}
.progress-chip.active {
  color: #9c3b79;
  border-color: #e993bb;
  background: #fff0f7;
  box-shadow: 0 4px 0 #f8d9e7;
}
.step-card {
  border: 2px solid #ebddec;
  box-shadow: 0 13px 28px rgba(84,58,99,.085);
  overflow: hidden;
  scroll-margin-top: 96px;
}
.step-card[data-color="pink"] {
  background: #fff7fb;
  border-color: #f7bad5;
  border-top: 8px solid #f080ad;
}
.step-card[data-color="yellow"] {
  background: #fffaf0;
  border-color: #f5d68f;
  border-top: 8px solid #f4c158;
}
.step-card[data-color="mint"] {
  background: #f3fdf9;
  border-color: #ace0ce;
  border-top: 8px solid #66c9ac;
}
.step-card[data-color="lav"] {
  background: #f9f6ff;
  border-color: #d4c4f8;
  border-top: 8px solid #aa93ee;
}
.step-card[data-color="blue"] {
  background: #f5faff;
  border-color: #bcd7f9;
  border-top: 8px solid #86b3ef;
}
.step-card[data-color="peach"] {
  background: #fff7f1;
  border-color: #f5c6b3;
  border-top: 8px solid #f6a684;
}
.step-card .step-header {
  position: relative;
  padding-bottom: 17px;
  border-bottom: 1px solid rgba(120,83,129,.12);
}
.step-header:after {
  position: absolute;
  right: 0;
  top: 4px;
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(125,92,137,.14);
  border-radius: 99px;
  font-size: 10px;
  font-weight: 1000;
  color: #896c91;
  padding: 6px 10px;
}
#step-character .step-header:after {
  content: 'STEP 1/6';
}
#step-shape .step-header:after {
  content: 'STEP 2/6';
}
#step-style .step-header:after {
  content: 'STEP 3/6';
}
#step-details .step-header:after {
  content: 'STEP 4/6';
}
#step-result .step-header:after {
  content: 'STEP 5/6';
}
#step-prompt .step-header:after {
  content: 'STEP 6/6';
}
.step-card[data-color="peach"] .step-no {
  background: #ffe3d1;
  color: #b45d3e;
}
.step-card h2 {
  padding-right: 82px;
}
.form-field select,.form-field input,.form-field textarea {
  background: #fff;
}
.quick-button {
  background: #fff;
}
.subtle-link {
  display: inline-block;
  border: 0;
  background: transparent;
  color: #b54a81;
  font-weight: 900;
  font-size: 12px;
  margin-top: 11px;
  padding: 7px 3px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.custom-shape-trigger {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 17px;
  margin-top: 15px;
  width: 100%;
  min-height: 86px;
  background: #fffdff;
  border-style: dashed;
  border-color: #cdb4dc;
  padding: 12px 17px;
}
.custom-shape-trigger .custom-shape-icon {
  display: grid;
  place-items: center;
  font-size: 31px;
  flex: none;
  background: #f6eafb;
  width: 54px;
  height: 54px;
  border-radius: 14px;
}
.custom-shape-trigger b {
  display: block;
  font-size: 15px;
}
.custom-shape-trigger small {
  display: block;
  font-size: 11px;
  color: #917b96;
  margin-top: 3px;
}
.custom-badge {
  margin-left: auto;
  flex: none;
  border-radius: 30px;
  padding: 5px 9px;
  background: #f5eaff;
  color: #8b52ae;
  font-size: 10px;
  font-weight: 1000;
}
.custom-shape-field {
  margin-top: 16px;
  background: #fff;
  border: 1px solid #e6c9ef;
  padding: 17px;
  border-radius: 17px;
}
.palette-grid {
  grid-template-columns: repeat(4,minmax(0,1fr));
}
.palette-card {
  min-height: 91px;
  box-shadow: 0 3px 0 #eadbe4;
}
.palette-dots i {
  width: 25px;
  height: 25px;
}
.custom-palette-field {
  margin-top: 14px;
  border-radius: 16px;
  background: #fff;
  border: 1.5px solid #addcc6;
  padding: 17px;
}
.custom-palette-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 7px;
  color: #497d69;
  font-size: 13px;
}
.custom-palette-head span {
  font-size: 11px;
  color: #81988f;
}
.color-pickers {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 11px;
  margin-top: 12px;
}
.color-pickers label {
  font-size: 10px;
  color: #735c78;
  font-weight: 900;
}
.color-pickers input {
  display: block;
  margin-top: 5px;
  width: 100%;
  height: 44px;
  border: 1.5px solid #dfd6e4;
  border-radius: 10px;
  cursor: pointer;
  background: #fff;
  padding: 4px;
}
.auto-size-hero {
  background: #fff;
  border: 1.5px solid #cec3ee;
  border-radius: 17px;
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 19px;
}
.auto-size-hero b {
  font-size: 14px;
  color: #6653a8;
}
.auto-size-hero p {
  font-size: 12px;
  margin: 5px 0 0;
  line-height: 1.5;
}
.auto-size-emoji {
  font-size: 28px;
}
.auto-size-ok {
  margin-left: auto;
  border-radius: 30px;
  background: #e9e4ff;
  color: #7c67b0;
  font-size: 10px;
  font-weight: 1000;
  padding: 7px;
  white-space: nowrap;
}
.advanced-settings {
  background: #fff;
  border: 1.5px solid #e2d6f5;
  border-radius: 17px;
  margin-top: 14px;
  overflow: hidden;
}
.advanced-settings summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 17px;
  font-size: 13px;
  font-weight: 900;
  color: #655787;
  cursor: pointer;
}
.advanced-settings summary::-webkit-details-marker {
  display: none;
}
.advanced-settings summary:before {
  content: '▸';
  color: #9479c7;
}
.advanced-settings[open] summary:before {
  content: '▾';
}
.advanced-tag {
  font-size: 10px;
  border-radius: 30px;
  background: #f1edfc;
  padding: 6px 10px;
  color: #8d71bc;
}
.advanced-content {
  padding: 4px 17px 18px;
}
.manual-size-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 900;
  margin: 15px 0;
  cursor: pointer;
}
.manual-size-check input {
  accent-color: #ad77e0;
  width: 18px;
  height: 18px;
}
.manual-size-fields {
  margin: 10px 0 16px;
}
.not-final-notice {
  display: flex;
  align-items: center;
  gap: 13px;
  background: #fff3dc;
  border: 2px solid #f3d08a;
  border-radius: 15px;
  padding: 15px;
  margin: 0 0 20px;
}
.not-final-icon {
  font-size: 27px;
}
.not-final-notice strong {
  display: block;
  font-size: 12px;
  color: #9c6824;
  letter-spacing: .02em;
}
.not-final-notice span:not(.not-final-icon) {
  display: block;
  color: #806d58;
  font-size: 12px;
  margin-top: 4px;
  line-height: 1.55;
}
.preview-stage {
  position: relative;
}
.preview-watermark {
  position: absolute;
  bottom: 13px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  padding: 7px 12px;
  border-radius: 30px;
  background: #5e467f;
  color: #fff;
  font-size: 10px;
  font-weight: 1000;
  white-space: nowrap;
  box-shadow: 0 4px 15px #513b754d;
}
.preview-page {
  opacity: .86;
}
.step-next {
  margin-top: 22px;
  display: flex;
  justify-content: flex-end;
}
.step-next a {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  background: #fff;
  border: 1.5px solid #c8b7e8;
  padding: 14px 20px;
  border-radius: 13px;
  color: #7056a3;
  font-size: 13px;
  font-weight: 950;
}
.step-next a span {
  font-size: 20px;
}
.strong-next a {
  background: #637ddc;
  color: white;
  border-color: #637ddc;
  min-width: 260px;
  box-shadow: 0 4px 0 #4c62aa;
}
.prompt-howto {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.prompt-howto span {
  background: white;
  border: 1px solid #f0d4c5;
  border-radius: 100px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 900;
  color: #98664c;
}
@media(max-width:700px) {
  .step-card h2 {
    padding-right: 66px;
  }
  .step-header:after {
    font-size: 9px;
    padding: 4px 7px;
    top: 2px;
  }
  .palette-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .color-pickers {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .progress-overview {
    margin-top: 13px;
  }
  .progress-track {
    margin-bottom: 16px;
  }
  .auto-size-hero {
    flex-wrap: wrap;
  }
  .auto-size-ok {
    margin-left: 0;
  }
  .step-next a {
    width: 100%;
  }
  .preview-watermark {
    font-size: 9px;
    bottom: 10px;
  }
  .prompt-howto span {
    font-size: 10px;
  }
}
/* v5 construction selector and step navigation improvements */
html {
  scroll-padding-top: 96px;
}
.step-card {
  scroll-margin-top: 94px;
}
.output {
  scroll-margin-top: 96px;
}
.puffy-construction {
  margin-top: 18px;
  border-radius: 20px;
  padding: 17px 18px 16px;
  background: #fff9e9;
  border: 1.5px solid #f3dcaa;
}
.puffy-construction .section-caption {
  margin-top: 0!important;
}
.puffy-methods {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
  margin-top: 12px;
}
.puffy-method {
  display: flex;
  text-align: left;
  gap: 12px;
  align-items: flex-start;
  border: 1.7px solid #ead7e6;
  border-radius: 16px;
  background: #fff;
  padding: 15px;
  min-height: 95px;
  color: #51405e;
}
.puffy-method[aria-pressed="true"] {
  background: #fff0f7;
  border-color: #e568a1;
  box-shadow: 0 0 0 3px #fce0ed;
}
.method-icon {
  font-size: 24px;
  line-height: 1.2;
}
.puffy-method span:last-child {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.puffy-method b {
  font-size: 14px;
}
.puffy-method small {
  font-size: 10px;
  background: #ffe2a1;
  border-radius: 30px;
  padding: 3px 8px;
  color: #96621f;
  margin-left: 4px;
  font-weight: 800;
}
.puffy-method em {
  font-style: normal;
  font-size: 12px;
  line-height: 1.45;
  color: #74667c;
}
.method-explainer {
  margin-top: 12px;
  font-size: 12px;
  font-weight: 800;
  color: #66536b;
  background: #fff;
  border-radius: 11px;
  padding: 10px 12px;
}
@media(max-width:570px) {
  .puffy-methods {
    grid-template-columns: 1fr;
  }
  .puffy-construction {
    padding: 14px;
  }
}

/* MIRALA Access v0.1 — compact, responsive session/device management. */
.access-device-panel {
  margin: 14px 0 20px;
  background: #fffefb;
  border: 1px solid #e8dce5;
  border-radius: 16px;
  padding: 13px 17px;
  color: #55445b;
  box-shadow: 0 3px 14px rgba(60, 35, 60, .04);
}
.access-device-panel summary {
  cursor: pointer;
  list-style-position: inside;
  font-weight: 750;
  font-size: 14px;
  line-height: 1.5;
}
.access-device-panel summary span {
  color: #846a80;
  font-weight: 600;
}
.access-device-panel > p {
  margin: 12px 0;
  font-size: 13px;
  line-height: 1.5;
}
.access-device-list {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}
.access-device-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border-radius: 10px;
  background: #faf5f9;
  border: 1px solid #f0e5ed;
}
.access-device-label {
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.access-device-remove {
  font: inherit;
  color: #755069;
  background: #fff;
  border: 1px solid #dacbd5;
  border-radius: 9px;
  padding: 7px 11px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  white-space: normal;
}
.access-device-remove:hover,
.access-device-remove:focus-visible {
  background: #f6edf4;
  outline-offset: 2px;
}
.access-device-remove:disabled {
  opacity: .6;
  cursor: wait;
}
.access-device-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 11px;
}
@media(max-width: 480px) {
  .access-device-panel {padding: 12px;}
  .access-device-row {align-items: flex-start;flex-direction: column;}
  .access-device-remove {width: 100%;text-align: center;}
}
