/* Kootzy Photo Magnets — customer experience */
:root {
  --ink: #1f1b24; --ink-2: #57505f; --ink-3: #8c8494; --line: rgba(31, 27, 36, 0.09);
  --bg: #efe9e1; --card: #ffffff; --accent: #ff5f6d; --accent-2: #ff9a5b;
  --grad: linear-gradient(135deg, #ff9a5b 0%, #ff5f6d 55%, #ff4f8b 100%);
  --ok: #23965e; --warn: #b36a00;
  --r-lg: 22px; --r-md: 16px; --r-sm: 12px;
  --shadow: 0 1px 2px rgba(31, 27, 36, 0.05), 0 8px 24px rgba(31, 27, 36, 0.08), 0 24px 60px rgba(31, 27, 36, 0.08);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --smooth: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input { font: inherit; color: inherit; }
.hidden { display: none !important; }
#viewport { position: fixed; inset: 0; }
#viewport canvas { display: block; touch-action: none; }

.glass {
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
}

/* ---------------- top bar */
.topbar {
  position: fixed; top: 14px; left: 14px; right: 14px; height: 60px; z-index: 5;
  border-radius: 20px; display: flex; align-items: center; gap: 16px; padding: 0 12px 0 16px;
  animation: dropIn .7s var(--smooth) both;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand span { font-size: 15px; letter-spacing: .1px; }
.brand svg { transition: transform .5s var(--spring); }
.brand:hover svg { transform: rotate(-12deg) scale(1.08); }
.stepNow { display: none; }
.stepper { flex: 1; display: flex; justify-content: center; gap: 4px; }
.stepper button {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 99px;
  color: var(--ink-3); font-size: 13.5px; font-weight: 550; transition: color .25s, background .25s;
}
.stepper button i {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal;
  font-size: 12px; font-weight: 700; background: rgba(31, 27, 36, 0.07); color: var(--ink-3);
  transition: background .35s var(--smooth), color .35s, transform .35s var(--spring);
}
.stepper button.done i { background: var(--ink); color: #fff; }
.stepper button.on { color: var(--ink); background: rgba(255, 255, 255, 0.9); box-shadow: 0 2px 10px rgba(31, 27, 36, 0.08); }
.stepper button.on i { background: var(--grad); color: #fff; transform: scale(1.1); }
.stepper button:hover:not(.on) { color: var(--ink-2); }
.fridgePill {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 12px; border-radius: 99px;
  background: var(--ink); color: #fff; font-weight: 600; font-size: 13.5px;
  transition: transform .3s var(--spring), box-shadow .3s;
}
.fridgePill:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(31, 27, 36, 0.25); }
.fridgePill .dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.25); }
.fridgePill .lbl { opacity: .75; font-weight: 500; }
.fridgePill.bump { animation: bump .6s var(--spring); }

/* ---------------- side panel */
.panel {
  position: fixed; top: 88px; left: 14px; bottom: 14px; width: 404px; z-index: 4;
  border-radius: var(--r-lg); display: flex; flex-direction: column; overflow: hidden;
  animation: slideIn .8s var(--smooth) .08s both;
}
.sheetHandle { display: none; }
.progressBar { height: 3px; background: rgba(31, 27, 36, 0.06); }
.progressBar i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 0 3px 3px 0; transition: width .7s var(--smooth); }
.stepView { flex: 1; overflow-y: auto; padding: 24px 24px 12px; scrollbar-width: thin; }
.stepView > * { animation: rise .55s var(--smooth) both; }
.stepView > *:nth-child(2) { animation-delay: .04s; } .stepView > *:nth-child(3) { animation-delay: .08s; }
.stepView > *:nth-child(4) { animation-delay: .12s; } .stepView > *:nth-child(5) { animation-delay: .16s; }
.stepView > *:nth-child(n+6) { animation-delay: .2s; }
.stepView.back > * { animation-name: riseBack; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--accent); margin: 0 0 6px; }
.stepView h2 { margin: 0 0 6px; font-size: 26px; line-height: 1.15; letter-spacing: -0.4px; }
.lede { margin: 0 0 20px; color: var(--ink-2); }
/* a line too long to print clearly (new products): always shown, phones too */
.novelWarn { margin: 8px 0 0; font-size: 13px; font-weight: 600; color: #b4232a; }
.label { font-size: 12.5px; font-weight: 650; color: var(--ink-2); margin: 20px 0 10px; display: flex; justify-content: space-between; align-items: baseline; }
.label small { font-weight: 500; color: var(--ink-3); }
.panelNav { display: flex; gap: 10px; padding: 14px 18px 18px; border-top: 1px solid var(--line); }
.panelNav .ghost { flex: 0 0 auto; }
.panelNav .primary { flex: 1; }

/* ---------------- buttons */
.primary {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 22px; border-radius: 15px; background: var(--grad); color: #fff; font-weight: 650; font-size: 15.5px;
  box-shadow: 0 8px 22px rgba(255, 95, 109, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform .25s var(--spring), box-shadow .25s, filter .25s; overflow: hidden;
}
.primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(255, 95, 109, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.primary:active { transform: translateY(0) scale(0.98); }
.primary svg { transition: transform .3s var(--spring); }
.primary:hover svg { transform: translateX(3px); }
.primary::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-100%); }
.primary:hover::after { transform: translateX(100%); transition: transform .8s var(--smooth); }
.primary:disabled { filter: grayscale(.6) opacity(.55); transform: none; cursor: default; box-shadow: none; }
.ghost { height: 50px; padding: 0 18px; border-radius: 15px; background: rgba(31, 27, 36, 0.05); font-weight: 600; transition: background .2s, transform .2s var(--spring); }
.ghost:hover { background: rgba(31, 27, 36, 0.09); }
.ghost:active { transform: scale(0.97); }
.ghost.danger { color: #c2334d; }
.wide { width: 100%; }
.icon { width: 34px; height: 34px; border-radius: 50%; background: rgba(31, 27, 36, 0.06); display: grid; place-items: center; transition: background .2s, transform .3s var(--spring); }
.icon:hover { background: rgba(31, 27, 36, 0.1); transform: rotate(90deg); }
.link { color: var(--accent); font-weight: 600; font-size: 13.5px; }
.link:hover { text-decoration: underline; }

/* ---------------- step 1: photo */
.drop {
  position: relative; border-radius: var(--r-md); border: 2px dashed rgba(31, 27, 36, 0.16); background: rgba(255, 255, 255, 0.6);
  min-height: 190px; display: grid; place-items: center; text-align: center; padding: 22px; cursor: pointer;
  transition: border-color .25s, background .25s, transform .35s var(--spring);
}
.drop:hover, .drop.over { border-color: var(--accent); background: rgba(255, 245, 243, 0.9); transform: scale(1.01); }
.drop .glyph { width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 18px; background: var(--grad); display: grid; place-items: center; color: #fff; box-shadow: 0 10px 24px rgba(255, 95, 109, .35); transition: transform .5s var(--spring); }
.drop:hover .glyph { transform: translateY(-4px) rotate(-6deg); }
.drop b { display: block; font-size: 16px; margin-bottom: 2px; }
.drop span { color: var(--ink-3); font-size: 13.5px; }
.cropper { position: relative; border-radius: var(--r-md); overflow: hidden; background: #ddd; box-shadow: inset 0 0 0 1px var(--line); cursor: grab; touch-action: none; margin: 0 auto; }
.cropper canvas { display: block; width: 100%; height: 100%; }
.cropper:active { cursor: grabbing; }
.cropRow { display: grid; gap: 12px; }
.cropSide { display: grid; gap: 10px; align-content: center; }
.cropHint { margin: 0; color: var(--ink-3); font-size: 13px; }
.cropTools { display: flex; align-items: center; gap: 12px; }
.ghost.small { height: 40px; padding: 0 14px; border-radius: 12px; font-size: 13.5px; }
.cropTools input[type=range] { flex: 1; }
.sizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.size {
  border-radius: var(--r-sm); background: var(--card); padding: 12px 8px 10px; text-align: center; font-size: 12.5px; font-weight: 600;
  box-shadow: 0 0 0 1px var(--line); transition: box-shadow .25s, transform .3s var(--spring);
}
.size small { display: block; color: var(--ink-3); font-weight: 500; font-size: 11.5px; }
.size .shape { margin: 0 auto 8px; border-radius: 4px; background: linear-gradient(160deg, #ffd9c7, #f3b9c9 60%, #c9d3f3); box-shadow: 0 2px 6px rgba(31, 27, 36, .15); transition: transform .4s var(--spring); }
.size:hover { transform: translateY(-2px); }
.size.on { box-shadow: 0 0 0 2px var(--accent), 0 8px 18px rgba(255, 95, 109, 0.18); }
.size.on .shape { transform: scale(1.08) rotate(-3deg); }
.seg { display: inline-flex; background: rgba(31, 27, 36, 0.06); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { padding: 7px 14px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); transition: background .25s, color .25s, box-shadow .25s; }
.seg.mini button { padding: 5px 10px; font-size: 12.5px; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(31, 27, 36, 0.12); }

.products { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.product { border-radius: var(--r-md); background: var(--card); padding: 10px 12px; text-align: left; box-shadow: 0 0 0 1px var(--line); transition: box-shadow .25s, transform .3s var(--spring); display: grid; grid-template-columns: 30px 1fr; column-gap: 8px; align-items: center; }
.product .pic { grid-row: span 2; font-size: 24px; }
.product b { font-size: 13.5px; }
.product small { color: var(--ink-3); font-size: 11.5px; line-height: 1.25; }
.products.three { grid-template-columns: 1fr 1fr 1fr; }
.products.four { grid-template-columns: 1fr 1fr; }
.products.four .product { padding: 9px 10px; }
.products .product.wide { grid-column: 1 / -1; }
.product .new { font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: var(--accent); border-radius: 99px; padding: 1px 6px; margin-left: 4px; vertical-align: 1px; }
.product .new.paused { background: #8a8494; }
.finPrice.off { color: #c2334d; }
.products.three .product { grid-template-columns: 1fr; text-align: center; padding: 10px 6px; }
.products.three .product .pic { grid-row: auto; }
.stakes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stakePic { width: 6px; margin: 0 auto 8px; border-radius: 3px 3px 3px 3px / 3px 3px 8px 8px; background: linear-gradient(#6fbf5e, #3f8a3a); box-shadow: 0 -6px 0 3px #f3dfb8; }
.buddyPick { gap: 12px; }
.buddyPick b { min-width: 64px; text-align: center; }
.product.on { box-shadow: 0 0 0 2px var(--accent), 0 8px 18px rgba(255, 95, 109, 0.18); }

/* ---------------- step 2: characters */
.themes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.theme {
  position: relative; border-radius: var(--r-md); background: var(--card); padding: 10px 10px 12px; text-align: left;
  box-shadow: 0 0 0 1px var(--line); transition: box-shadow .3s, transform .35s var(--spring);
}
.theme:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--line), 0 12px 26px rgba(31, 27, 36, 0.1); }
.theme.on { box-shadow: 0 0 0 2px var(--accent), 0 12px 26px rgba(255, 95, 109, 0.2); }
.theme.on::after { content: '✓'; position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--grad); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; animation: pop .45s var(--spring); }
.theme .art { height: 84px; border-radius: 11px; background: radial-gradient(120% 90% at 50% 100%, #f7efe6, #efe6dc); display: grid; place-items: center; overflow: hidden; }
.theme .art img { max-width: 94%; max-height: 80px; filter: drop-shadow(0 4px 6px rgba(31,27,36,.18)); animation: fadeUp .5s var(--smooth) both; }
.theme .art .emo { font-size: 34px; }
.theme b { display: block; margin-top: 9px; font-size: 13.5px; }
.theme small { color: var(--ink-3); font-size: 12px; }
.skeleton { background: linear-gradient(100deg, #efe6dc 20%, #f8f2eb 40%, #efe6dc 60%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 13px; border-radius: 99px; background: var(--card);
  box-shadow: 0 0 0 1px var(--line); font-size: 13.5px; font-weight: 550; transition: transform .3s var(--spring), box-shadow .25s, background .25s;
}
.chip:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--line), 0 6px 14px rgba(31, 27, 36, 0.08); }
.chip.on { background: var(--ink); color: #fff; box-shadow: none; }
.chip img { width: 22px; height: 22px; }
.chip .x { opacity: .5; margin-left: 2px; }
.row { display: flex; gap: 8px; align-items: center; }
.field {
  width: 100%; height: 50px; border-radius: 14px; border: 0; padding: 0 16px; background: var(--card); font-size: 17px; font-weight: 600; letter-spacing: 1px;
  box-shadow: 0 0 0 1px var(--line); outline: none; transition: box-shadow .25s;
}
.field:focus { box-shadow: 0 0 0 2px var(--accent), 0 8px 20px rgba(255, 95, 109, 0.15); }
.field.small { height: 42px; font-size: 15px; font-weight: 500; letter-spacing: 0; }
.mixRow { min-height: 52px; padding: 8px; border-radius: 14px; background: rgba(31, 27, 36, 0.04); display: flex; flex-wrap: wrap; gap: 6px; }
.mixRow .chip { animation: pop .4s var(--spring) both; }
.mixRow .empty { color: var(--ink-3); font-size: 13.5px; align-self: center; padding: 0 6px; }
.palette { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.pchar { height: 60px; border-radius: 12px; background: var(--card); box-shadow: 0 0 0 1px var(--line); font-size: 24px; display: grid; place-items: center; transition: transform .3s var(--spring), box-shadow .25s; }
.pchar small { display: block; font-size: 10px; line-height: 1.1; color: var(--ink-3); margin-top: 1px; text-align: center; padding: 0 2px; }
.palette .pchar { height: auto; min-height: 64px; padding: 6px 0; }
.pchar:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 0 0 1px var(--line), 0 8px 16px rgba(31, 27, 36, 0.1); }
.pchar:active { transform: scale(.94); }
.pchar.on, .emojiResults button.on { box-shadow: 0 0 0 2px var(--accent); }
.emojiResults { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; max-height: 196px; overflow-y: auto; padding: 2px; }
.emojiResults button { aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center; transition: background .2s, transform .25s var(--spring); }
.emojiResults button:hover { background: #fff; transform: scale(1.15); box-shadow: 0 4px 10px rgba(31,27,36,.12); }
.emojiResults img { width: 30px; height: 30px; }

/* switch */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--card); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.switch input { display: none; }
.switch .track { position: relative; width: 44px; height: 26px; border-radius: 99px; background: rgba(31, 27, 36, 0.15); transition: background .3s; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.2); transition: transform .35s var(--spring); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(18px); }

/* ---------------- step 4: colours */
.filaments { display: grid; gap: 8px; }
.filament { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--card); box-shadow: 0 0 0 1px var(--line); animation: rise .5s var(--smooth) both; text-align: left; width: 100%; transition: box-shadow .25s; }
.filament.on { box-shadow: 0 0 0 2px var(--accent), 0 6px 16px rgba(255, 95, 109, .16); }
.pickFor { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); margin-bottom: 10px; }
.pickFor .ball { width: 18px; height: 18px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.seg.wide2 { display: flex; width: 100%; margin-bottom: 2px; }
.seg.wide2 button { flex: 1; padding: 10px 8px; }
.filament .ball { width: 38px; height: 38px; border-radius: 50%; flex: none; box-shadow: inset -4px -6px 10px rgba(0,0,0,.18), inset 3px 4px 8px rgba(255,255,255,.35), 0 3px 8px rgba(31,27,36,.18); }
.filament b { display: block; font-size: 14px; }
.filament small { color: var(--ink-3); font-size: 12px; }
.badge { margin-left: auto; font-size: 11.5px; font-weight: 650; padding: 4px 9px; border-radius: 99px; white-space: nowrap; }
.badge.available { background: #e3f6ea; color: #1b7a47; }
.badge.made_to_order { background: #fff1d9; color: #8a5300; }
.badge.custom { background: #f1e6ff; color: #6b2fa3; }
.recolour { display: grid; gap: 12px; }
.recolour .roleName { font-size: 13px; font-weight: 650; margin-bottom: 7px; display: flex; align-items: center; gap: 8px; }
.recolour .roleName i { width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }
.swatchRow { display: flex; flex-wrap: wrap; gap: 7px; }
.swatchRow button { width: 30px; height: 30px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(31,27,36,.12), inset -3px -4px 6px rgba(0,0,0,.15); transition: transform .3s var(--spring), box-shadow .25s; }
.swatchRow button:hover { transform: scale(1.15); }
.swatchRow button.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent); transform: scale(1.08); }
/* named swatches: the circle is the <i>, its name under it */
.swatchRow.named { gap: 10px 6px; }
.swatchRow.named button { width: 56px; height: auto; border-radius: 10px; box-shadow: none; display: grid; justify-items: center; gap: 4px; padding: 2px 0; }
.swatchRow.named button i { width: 30px; height: 30px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(31,27,36,.12), inset -3px -4px 6px rgba(0,0,0,.15); transition: box-shadow .25s; }
.swatchRow.named button small { font-size: 10.5px; line-height: 1.15; color: var(--ink-2); text-align: center; }
.swatchRow.named button:hover { transform: none; }
.swatchRow.named button.on { box-shadow: none; transform: none; }
.swatchRow.named button.on i { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent); }
.swatchRow.named button.on small { color: var(--ink); font-weight: 650; }
.specialNote { margin: 2px 0 0; font-size: 12.5px; grid-column: 1 / -1; }
/* size choices with their measurement under the name */
.seg.sized button, #stripSeg button { display: grid; justify-items: center; line-height: 1.15; }
.seg.sized button small, #stripSeg button small { font-size: 10.5px; font-weight: 500; color: var(--ink-3); min-height: 12px; }
/* the price on the main button */
.livePrice { font-size: 14px; font-weight: 600; opacity: .92; }
/* Kootzy: logo home, a cart link */
.onKootzy .brand img { display: block; height: 28px; width: auto; }
.onKootzy .brand span { font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--accent); }
.cartLink { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: var(--ink); background: rgba(255,255,255,.75); box-shadow: 0 0 0 1px var(--line); flex: none; }
.cartLink b { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.note { padding: 12px 14px; border-radius: 14px; background: rgba(255, 245, 230, 0.9); color: #7a4c00; font-size: 13px; }

/* ---------------- step 5: fridge */
.stick {
  width: 100%; height: 64px; font-size: 17px; border-radius: 18px; margin: 4px 0 6px;
}
.stick .mag { display: inline-block; animation: wiggle 1.6s ease-in-out infinite; }
.finishes { display: flex; gap: 10px; }
.finishes button { width: 44px; height: 44px; border-radius: 14px; box-shadow: 0 0 0 1px var(--line), inset 0 -6px 12px rgba(0,0,0,.08); transition: transform .3s var(--spring), box-shadow .25s; }
.finishes button.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); transform: translateY(-2px); }
.dial { display: flex; align-items: center; gap: 12px; }
.dial output { min-width: 42px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }
input[type=range] { -webkit-appearance: none; appearance: none; height: 6px; border-radius: 99px; background: rgba(31, 27, 36, 0.1); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 3px 8px rgba(31,27,36,.25); cursor: grab; transition: transform .2s var(--spring); }
input[type=range]::-webkit-slider-thumb:active { transform: scale(1.2); cursor: grabbing; }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 3px 8px rgba(31,27,36,.25); }
.done { text-align: center; padding: 10px 0 0; }
.done .burst { font-size: 44px; animation: pop .6s var(--spring) both; }

/* ---------------- floating bits over the scene */
.viewPills { position: fixed; bottom: 22px; left: calc(50% + 210px); transform: translateX(-50%); z-index: 4; border-radius: 99px; padding: 4px; display: flex; gap: 2px; animation: rise .8s var(--smooth) .3s both; }
.viewPills button { padding: 9px 16px; border-radius: 99px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); transition: background .25s, color .25s; }
.viewPills button.on { background: var(--ink); color: #fff; }
.crafting { position: fixed; top: 90px; left: calc(50% + 210px); transform: translateX(-50%); z-index: 4; border-radius: 99px; padding: 9px 16px 9px 12px; display: flex; gap: 10px; align-items: center; font-size: 13.5px; font-weight: 600; animation: rise .35s var(--smooth) both; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid rgba(255, 95, 109, 0.25); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.hint3d { position: fixed; bottom: 78px; left: calc(50% + 210px); transform: translateX(-50%); z-index: 4; border-radius: 14px; padding: 10px 14px; font-size: 13px; font-weight: 550; animation: rise .5s var(--smooth) both; }
.toasts { position: fixed; bottom: 22px; right: 22px; z-index: 20; display: grid; gap: 8px; justify-items: end; }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 14px; font-size: 13.5px; font-weight: 550; box-shadow: var(--shadow); animation: toastIn .45s var(--spring) both; max-width: 340px; }
.toast.out { animation: toastOut .35s var(--smooth) both; }

/* drawer + modal */
.drawer { position: fixed; top: 88px; right: 14px; width: 340px; max-height: calc(100% - 102px); z-index: 6; border-radius: var(--r-lg); padding: 16px; display: flex; flex-direction: column; gap: 12px; transform: translateX(calc(100% + 30px)); transition: transform .55s var(--smooth); }
.drawer.open { transform: none; }
.drawerHead { display: flex; align-items: center; justify-content: space-between; }
.drawerHead h3 { margin: 0; font-size: 18px; }
.drawerList { overflow-y: auto; display: grid; gap: 8px; }
.mItem { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; background: var(--card); box-shadow: 0 0 0 1px var(--line); text-align: left; transition: transform .3s var(--spring), box-shadow .25s; }
.mItem:hover { transform: translateX(-3px); }
.mItem.on { box-shadow: 0 0 0 2px var(--accent); }
.mItem .thumb { width: 64px; height: 44px; border-radius: 10px; background: #f3ece4; display: grid; place-items: center; overflow: hidden; flex: none; }
.mItem .thumb img { max-width: 100%; max-height: 100%; }
.mItem b { display: block; font-size: 13.5px; }
.mItem small { color: var(--ink-3); font-size: 12px; }
.mItem .del { margin-left: auto; opacity: .5; }
.mItem .del:hover { opacity: 1; color: #c2334d; }
.modal { position: fixed; inset: 0; z-index: 30; background: rgba(31, 27, 36, 0.35); display: grid; place-items: center; animation: fade .3s both; }
.modal .sheet { width: min(520px, 94vw); max-height: 88vh; overflow-y: auto; border-radius: 26px; padding: 22px; animation: popIn .5s var(--spring) both; }
.finishList { display: grid; gap: 10px; margin: 16px 0; }
.finishActions { display: grid; gap: 8px; }
.fine { color: var(--ink-3); font-size: 12.5px; text-align: center; margin: 14px 0 0; }

/* ---------------- motion */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes riseBack { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: none; } }
@keyframes dropIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.5); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes popIn { from { transform: translateY(30px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bump { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.18); } 70% { transform: scale(.96); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-14deg); } 40% { transform: rotate(10deg); } 60% { transform: rotate(-6deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(.95); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------------- phones: the panel becomes a bottom sheet
   Layout by importance: the magnet (3D preview) on top, the one decision of
   this step below it. The sheet's height is set per step by customer.js
   (--sheet); nothing floats over the magnet. */
@media (max-width: 820px) {
  :root { font-size: 14.5px; }
  .topbar { top: 8px; left: 8px; right: 8px; height: 52px; border-radius: 16px; gap: 8px; padding: 0 6px 0 10px; }
  .brand span, .fridgePill .lbl, .stepper button span { display: none; }
  /* Kootzy phones: the step name says where you are (Back steps back), so the
     dots make way for the logo, the designs count and the cart */
  .onKootzy .stepper { display: none; }
  .onKootzy .brand img { height: 22px; }
  .onKootzy .fridgePill .lbl { display: inline; }
  .onKootzy .fridgePill { padding: 0 10px; gap: 6px; }
  .cartLink { width: 38px; height: 38px; }
  .brand svg { width: 26px; height: 26px; }
  .stepNow { display: grid; line-height: 1.1; min-width: 0; flex: 1; }
  .stepNow small { font-size: 10.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--accent); }
  .stepNow b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .stepper { flex: none; gap: 0; }
  .stepper button { padding: 4px; min-width: 30px; min-height: 36px; justify-content: center; }
  .stepper button i { width: 22px; height: 22px; font-size: 11px; }
  .stepper button.on { background: none; box-shadow: none; }
  .fridgePill { height: 38px; padding: 0 12px 0 10px; }

  /* the sheet: near-opaque so text never fights the 3D scene */
  .panel {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; height: var(--sheet, 50vh);
    border-radius: 22px 22px 0 0; animation-name: sheetUp; background: rgba(252, 250, 247, 0.96);
    transition: height .45s var(--smooth); border-bottom: 0;
  }
  .sheetHandle { display: block; width: 100%; height: 30px; margin: 0; background: none; position: relative; cursor: pointer; flex: none; touch-action: none; }
  .sheetHandle::before { content: ''; position: absolute; left: 50%; top: 6px; width: 40px; height: 5px; margin-left: -20px; border-radius: 99px; background: rgba(31,27,36,.2); }
  .sheetHandle span { position: absolute; left: 0; right: 0; top: 13px; font-size: 10.5px; font-weight: 650; letter-spacing: .4px; color: var(--ink-3); text-transform: uppercase; }
  .panel.collapsed .stepView { display: none; }
  .progressBar { display: none; }
  .stepView { padding: 2px 16px 10px; position: relative; }
  .eyebrow { display: none; }
  .stepView h2 { font-size: 19px; margin-bottom: 2px; }
  .lede { font-size: 13px; margin-bottom: 12px; }
  /* the title says it; the space goes to the choices */
  body[data-step="characters"] .lede, body[data-step="colours"] .lede, .stepView:has(.cropRow) .lede { display: none; }
  .label { margin: 14px 0 8px; }
  @media (max-height: 780px) { .lede { display: none; } body[data-step="fridge"] .lede { display: block; } }
  .panelNav { padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); gap: 8px; }
  .primary, .ghost { height: 48px; }
  .panelNav .ghost { padding: 0 16px; }

  /* step 1: compact drop target; cropper beside its tools; sizes scroll sideways */
  .drop { min-height: 0; padding: 14px; place-items: stretch; text-align: left; }
  .drop > div { display: grid; grid-template-columns: 48px 1fr; column-gap: 12px; align-items: center; }
  .drop .glyph { width: 48px; height: 48px; margin: 0; grid-row: span 2; border-radius: 15px; }
  .drop b { font-size: 15px; margin: 0; }
  .drop span { font-size: 12.5px; }
  .cropRow { grid-template-columns: auto 1fr; align-items: center; }
  .cropper { margin: 0; }
  .cropSide { gap: 12px; }
  .sizes, .themes {
    display: grid; grid-auto-flow: column; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 4px 16px 8px; scroll-padding: 0 16px;
  }
  .sizes::-webkit-scrollbar, .themes::-webkit-scrollbar { display: none; }
  .sizes { grid-auto-columns: 92px; grid-template-columns: none; }
  .size { scroll-snap-align: start; padding: 10px 6px 8px; }

  /* step 2: theme carousel; the 3D preview above shows the pick at once */
  .themes { grid-auto-columns: 132px; grid-template-columns: none; gap: 10px; }
  .theme { scroll-snap-align: start; padding: 8px 8px 10px; }
  .theme .art { height: 66px; }
  .theme .art img { max-height: 60px; }
  .theme b { margin-top: 7px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .theme small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; }
  .theme:hover { transform: none; }
  .palette { grid-template-columns: repeat(5, 1fr); }
  .pchar { height: 54px; }
  .emojiResults { grid-template-columns: repeat(6, 1fr); max-height: none; }
  .emojiResults img { width: 34px; height: 34px; }

  /* step 4: the four filaments as a 2 × 2 grid; bigger swatches */
  .filaments { grid-template-columns: 1fr 1fr; gap: 6px; }
  .filament { padding: 8px 10px; gap: 4px 8px; flex-wrap: wrap; align-content: center; }
  .filament .badge { flex-basis: 100%; margin-left: 34px; background: none; padding: 0; font-size: 11px; }
  .filament .ball { width: 26px; height: 26px; }
  .filament > div { min-width: 0; flex: 1; }
  .filament b { font-size: 12.5px; line-height: 1.2; }
  .filament small { display: block; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .badge { margin: 0; font-size: 10.5px; padding: 2px 7px; }
  .recolour .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
  .recolour .chip { flex: none; }
  .swatchRow { gap: 10px; }
  .swatchRow button { width: 38px; height: 38px; }

  /* step 5 */
  .stick { height: 58px; }
  .finishes button { width: 42px; height: 42px; }

  /* over the scene: fridge views only on the fridge step, top-left; hint top-right */
  .viewPills { display: none; left: 8px; top: 68px; bottom: auto; transform: none; animation: none; }
  body[data-step="fridge"] .viewPills { display: flex; }
  .viewPills button { padding: 7px 12px; font-size: 12.5px; white-space: nowrap; }
  .hint3d { display: none !important; left: auto; right: 8px; top: 68px; bottom: auto; transform: none; max-width: min(46vw, 200px); font-size: 12px; padding: 8px 11px; }
  .crafting { top: auto; bottom: calc(var(--sheet, 50vh) + 10px); left: 50%; font-size: 12.5px; padding: 7px 14px 7px 10px; }
  .toasts { top: auto; bottom: calc(var(--sheet, 50vh) + 12px); right: 50%; transform: translateX(50%); }
  .toast { font-size: 13px; padding: 10px 14px; white-space: nowrap; }

  /* drawer + finish: solid bottom sheets */
  .drawer { top: auto; bottom: 0; right: 0; left: 0; width: auto; max-height: 75vh; border-radius: 22px 22px 0 0;
    background: #fcfaf7; transform: translateY(105%); padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); z-index: 12; }
  .drawer.open { transform: none; box-shadow: 0 -12px 40px rgba(31,27,36,.18); }
  .modal { place-items: end stretch; }
  .modal .sheet { width: 100%; max-height: 86vh; border-radius: 24px 24px 0 0; background: #fcfaf7; padding: 20px 16px calc(18px + env(safe-area-inset-bottom)); animation-name: sheetUp; }
  @keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
}
@media (max-width: 370px) {
  .brand { display: none; }
  .stepper button { min-width: 27px; }
}

/* DRAW IT YOURSELF — the drawing screen (src/doodle-ui.js) */
.doodleBar { margin: 4px 0 10px; }
.doodlePaper { position: relative; width: 100%; max-width: 440px; margin: 0 auto; aspect-ratio: 1; background: #fff; border-radius: 18px; box-shadow: inset 0 0 0 1.5px #e9e2d6, 0 2px 10px #0000000d; overflow: hidden; }
.doodlePaper canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.doodleSize { position: absolute; right: 10px; top: 8px; font: 700 11px system-ui, sans-serif; color: #8a857d; pointer-events: none; }
.doodleHint { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; font: 600 13px system-ui, sans-serif; color: #8a857d; pointer-events: none; }
.doodleTools { margin-top: 10px; display: grid; gap: 8px; }
.doodleRow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.doodleRow .ghost { flex: 1 1 auto; }
.crayon { width: 38px; height: 38px; border-radius: 50%; border: 0; padding: 0; background: var(--c); box-shadow: inset 0 -4px 0 #0002, 0 1px 4px #0002; cursor: pointer; flex: 0 0 auto; }
.crayon.on { outline: 3px solid #22222a; outline-offset: 2px; }
.crayon.plate { width: 30px; height: 30px; border-radius: 8px; box-shadow: inset 0 0 0 1.5px #0002; }
.doodleRow .width { width: 40px; height: 36px; border-radius: 10px; border: 0; background: #f1ece4; display: grid; place-items: center; cursor: pointer; }
.doodleRow .width i { display: block; width: 60%; background: #22222a; border-radius: 9px; }
.doodleRow .width.on { background: #22222a; } .doodleRow .width.on i { background: #fff; }
.doodleRow .sep { flex: 0 0 6px; }
.doodleLbl { font: 700 11px system-ui, sans-serif; color: #8a857d; text-transform: uppercase; letter-spacing: .5px; }
.doodlePick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px; background: #fff; border-radius: 14px; box-shadow: 0 2px 10px #0001; margin-top: 8px; }
.doodleNote { font: 600 13px system-ui, sans-serif; display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.doodleNote i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 1px #0002; }
@media (max-width: 820px) { .doodlePaper { max-width: min(100%, 50vh); } .crayon { width: 34px; height: 34px; } }
.doodlePrivacy { margin: 10px 0 0; font: 500 12px system-ui, sans-serif; color: #8a857d; }
