/* /create/<tool>/: what the tools add to the quiz look (start.css): many-option photo tiles, colour swatches,
   switches, the garment tile and the free tool's cap screen. Mobile first. */

/* ---------- photo tiles (styles, outfits, free styles) ---------- */
.create .cr-count { margin: -4px 0 14px; text-align: center; font-size: 14px; color: var(--ink-3); }
.create .cr-count b { color: var(--accent-ink); font-weight: 700; }
.create .cards.cr-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.create .cr-grid .card-opt { padding: 4px 4px 8px; border-radius: 12px; }
.create .cr-grid .card-opt .lbl { padding: 7px 3px 0; font-size: 13.5px; line-height: 1.25; text-align: center; }
.create .cr-grid .card-opt .tick { top: 9px; right: 9px; width: 22px; height: 22px; }
.create .cr-grid .card-opt .tick svg { width: 13px; height: 13px; }
.create .card-opt.is-off { opacity: .5; }
.create .card-opt.is-off:hover { border-color: #E6D8DA; }

.create .cr-pic {
  position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 8px;
  color: var(--accent-ink); background: linear-gradient(160deg, #FFE3EA 0%, #FFE6DC 55%, #FFF0E2 100%);
}
.create .cr-pic > svg { width: 34%; height: auto; opacity: .55; }
.create .cr-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; border-radius: 0; aspect-ratio: auto; }
.create .cr-pic.has-img > svg { display: none; }
.create .card-opt .cr-pic img { border-radius: 0; }

/* the outfit tool's "your own item" tile */
.create .cr-garment { cursor: default; }
.create .cr-pic--add { border: 1.5px dashed var(--accent-dim); background: var(--accent-soft); gap: 2px; align-content: center; text-align: center; padding: 8px 8px 44px; }
.create .cr-pic--add > svg { width: 30%; opacity: .9; }
.create .cr-pic--add b { font-size: 13px; color: var(--ink); line-height: 1.2; }
.create .cr-pic--add small { font-size: 11.5px; color: var(--ink-3); line-height: 1.25; }
.create .cr-g-btn {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); z-index: 1; display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 10px; border-radius: 999px; background: var(--surface); box-shadow: 0 1px 4px rgba(42, 15, 31, .18);
  font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; cursor: pointer;
}
.create .cr-g-btn svg { width: 14px; height: 14px; }
.create .cr-g-btn:focus-within, .create .cr-g-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.create .cr-g-rm {
  position: absolute; top: 9px; left: 9px; width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .92); color: var(--ink-2); box-shadow: 0 1px 3px rgba(42, 15, 31, .18); cursor: pointer;
}
.create .cr-g-rm svg { width: 15px; height: 15px; }
.create .cr-g-bar { position: absolute; left: 12px; right: 12px; bottom: 48px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .8); overflow: hidden; }
.create .cr-g-bar b { display: block; height: 100%; width: 5%; background: var(--accent); transition: width .2s; }
.create .cr-garment.is-busy .cr-g-btn { visibility: hidden; }

/* free styles: three tiles, larger */
.create .cards--pick.cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.create .cards--pick .card-opt { padding: 4px 4px 8px; }
.create .cards--pick .card-opt .lbl { padding: 8px 2px 0; font-size: 14px; text-align: center; }
.create .cards--pick .card-opt .tick { top: 9px; right: 9px; width: 22px; height: 22px; }

/* ---------- hair colour swatches ---------- */
.create .cr-swatches { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.create .cr-sw {
  position: relative; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 34px 8px 8px; border: 1px solid #E6D8DA;
  border-radius: 12px; background: var(--surface); box-shadow: 0 1px 2px rgba(42, 15, 31, .05); text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.create .cr-dot { flex: none; width: 38px; height: 38px; border-radius: 50%; background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, .45), transparent 42%), var(--c); box-shadow: inset 0 0 0 1px rgba(42, 15, 31, .12); }
.create .cr-dot--keep { display: grid; place-items: center; background: var(--paper-2); color: var(--accent-ink); }
.create .cr-dot--keep svg { width: 20px; height: 20px; }
.create .cr-sw-l { font-size: 14.5px; font-weight: 600; line-height: 1.25; color: var(--ink); }
.create .cr-sw .tick {
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--line-2); color: transparent; background: var(--surface);
}
.create .cr-sw .tick svg { width: 12px; height: 12px; }
.create .cr-sw.is-sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.create .cr-sw.is-sel .tick { border-color: var(--accent); background: var(--accent); color: #fff; }
.create .cr-sw.is-off { opacity: .5; }
@media (hover: hover) { .create .cr-sw:hover:not(.is-sel) { border-color: var(--accent-dim); } }
.create .cr-sw:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- restoration switches ---------- */
.create .cr-toggles { display: grid; gap: 10px; }
.create .cr-tog {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; border: 1px solid #E6D8DA; border-radius: 14px;
  background: var(--surface); box-shadow: 0 1px 2px rgba(42, 15, 31, .05); cursor: pointer;
}
.create .cr-tog-ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); }
.create .cr-tog-ic svg { width: 22px; height: 22px; }
.create .cr-tog-l { flex: 1; font-size: 15.5px; font-weight: 600; line-height: 1.3; color: var(--ink); }
.create .cr-tog input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.create .cr-switch { flex: none; position: relative; width: 46px; height: 28px; border-radius: 999px; background: var(--line-2); transition: background .2s var(--ease-out); }
.create .cr-switch::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(42, 15, 31, .25); transition: transform .2s var(--ease-out);
}
.create .cr-tog input:checked + .cr-switch { background: var(--accent); }
.create .cr-tog input:checked + .cr-switch::after { transform: translateX(18px); }
.create .cr-tog:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.create .cr-tog:has(input:checked) { border-color: var(--accent-dim); }
@media (prefers-reduced-motion: reduce) { .create .cr-switch, .create .cr-switch::after { transition: none; } }

/* ---------- upload meter without the 6-photo marks ---------- */
.create .cr-meter { position: relative; height: 8px; border-radius: 8px; background: var(--paper-2); overflow: hidden; }
.create .cr-meter > b { display: block; height: 100%; width: 0; border-radius: 8px; background: var(--accent-dim); transition: width .3s var(--ease-out); }
.create .cr-meter.is-ok > b { background: var(--ok); }

/* ---------- free tool closed / used ---------- */
.create .cr-cap { padding-top: 36px; text-align: center; }
.create .cr-cap-art { width: 148px; margin: 0 auto 22px; aspect-ratio: 2 / 3; border-radius: 18px; overflow: hidden; background: var(--paper-2); box-shadow: 0 10px 30px rgba(42, 15, 31, .14); transform: rotate(-3deg); }
.create .cr-cap-art img { width: 100%; height: 100%; object-fit: cover; }
.create .cr-cap h1 { font-size: 26px; text-wrap: balance; }
.create .cr-cap .btn { display: flex; width: 100%; max-width: 340px; margin: 26px auto 0; }
.create .cr-cap .btn--ghost { margin-top: 12px; }

@media (min-width: 700px) {
  .create .cards.cr-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .create .cr-swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .create #app:has(.cr-grid) { max-width: 1080px; }
  .create #app .screen .content:has(> .cr-grid) { max-width: none; }
  .create .cards.cr-grid { grid-template-columns: repeat(var(--dcols, 6), minmax(0, 1fr)); gap: 14px; justify-content: stretch; }
  .create #app:has(.cr-grid[style*="--dcols:5"]) { max-width: 920px; }
  .create #app:has(.cr-grid[style*="--dcols:4"]) { max-width: 760px; }
  .create .cr-grid .card-opt .lbl { font-size: 14.5px; }
  .create #app:has(.cr-swatches) { max-width: 880px; }
  .create #app .screen .content:has(> .cr-swatches) { max-width: none; }
  .create .cr-swatches { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
  .create .cr-sw { flex-direction: column; align-items: center; text-align: center; padding: 16px 10px 14px; gap: 10px; }
  .create .cr-dot { width: 52px; height: 52px; }
  .create .cr-sw .tick { top: 10px; right: 10px; transform: none; }
  .create .cr-toggles { max-width: 460px; margin: 0 auto; }
  .create .cards--pick.cards--3 { grid-template-columns: repeat(3, 236px); gap: 16px; }
  .create .cards--pick .card-opt .lbl { font-size: 16px; }
}
