/* Parallel configurator plugin v1: the phone screen. A site themes it with these custom properties on .pc
   (or any ancestor); the defaults are neutral. Mobile first; nothing here is fixed to one brand. */
.pc {
  --pc-bg: #f2f2ef;
  --pc-paper: #ffffff;
  --pc-ink: #111111;
  --pc-mute: #5c5c5c;
  --pc-line: rgba(0, 0, 0, 0.12);
  --pc-line-2: rgba(0, 0, 0, 0.24);
  --pc-acc: #111111;
  --pc-acc-ink: #ffffff;
  --pc-night: #0c0c0c;
  --pc-on-night: #f2f2ef;
  --pc-stage: radial-gradient(75% 70% at 50% 45%, #fafafa 0, #ececea 60%, #dcdcd8 100%);
  --pc-sans: system-ui, -apple-system, "Segoe UI", sans-serif;
  --pc-mono: ui-monospace, "SF Mono", Menlo, monospace;
  --pc-r: 8px;
  --pc-ease: cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto minmax(220px, 40svh) auto 1fr auto;
  background: var(--pc-bg);
  color: var(--pc-ink);
  font: 400 16px/1.5 var(--pc-sans);
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  /* clip, not hidden, where supported: hidden makes .pc a scroll box and the sticky footer never sticks */
  overflow-x: clip;
}
.pc *,
.pc *::before,
.pc *::after { box-sizing: border-box; }
:where(.pc) button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.pc :focus-visible { outline: 2px solid var(--pc-ink); outline-offset: 3px; }
.pc [hidden] { display: none !important; }

/* top bar */
.pc-top {
  display: flex; align-items: center; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  border-bottom: 1px solid var(--pc-line);
}
.pc-brand { font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; font-size: 14px; margin: 0; }
.pc-link { display: inline-flex; align-items: center; gap: 8px; margin: 0 auto 0 0; font: 500 12px/1 var(--pc-mono); letter-spacing: 0.04em; color: var(--pc-mute); text-transform: uppercase; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-link b { font-weight: 500; }
.pc-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--pc-line-2); transition: background 0.3s; }
.pc-dot.on { background: var(--pc-acc); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.28), 0 0 0 4px color-mix(in srgb, var(--pc-acc) 30%, transparent); }
.pc-leave { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--pc-line-2); font-size: 14px; font-weight: 600; }

/* close-up of the chosen part */
.pc-detail { position: relative; overflow: hidden; background: var(--pc-stage); touch-action: none; user-select: none; -webkit-user-select: none; }
.pc-stage { position: absolute; inset: 0; }
.pc-stage canvas, .pc-stage img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.pc-cap { position: absolute; left: 12px; bottom: 12px; margin: 0; display: grid; gap: 4px; padding: 10px 14px 12px; border-radius: var(--pc-r); background: color-mix(in srgb, var(--pc-paper) 86%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); pointer-events: none; max-width: calc(100% - 24px); }
.pc-k { font: 500 11px/1.3 var(--pc-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--pc-mute); }
.pc-v { font-weight: 800; font-size: 28px; line-height: 1; letter-spacing: -0.03em; transition: opacity 0.25s; }
.pc-hint { position: absolute; left: 16px; top: 14px; margin: 0; padding: 6px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.86); font: 500 11px/1 var(--pc-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--pc-mute); pointer-events: none; }
.pc-tilt { position: absolute; right: 12px; top: 10px; min-height: 44px; padding: 0 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.86); font: 500 12px/1 var(--pc-mono); letter-spacing: 0.04em; text-transform: uppercase; }
.pc-tilt[aria-pressed="false"] { color: var(--pc-mute); }
.pc-from { position: absolute; right: 12px; bottom: 14px; margin: 0; padding: 7px 11px; border-radius: 999px; background: var(--pc-ink); color: var(--pc-bg); font: 500 11px/1 var(--pc-mono); letter-spacing: 0.06em; text-transform: uppercase; opacity: 0; transform: translateY(6px); transition: opacity 0.3s, transform 0.4s var(--pc-ease); pointer-events: none; }
.pc-from.on { opacity: 1; transform: none; }

/* group tabs */
.pc-tabs { display: flex; gap: 6px; padding: 12px 16px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--pc-line); scroll-snap-type: x proximity; }
.pc-tabs::-webkit-scrollbar { display: none; }
.pc-tab { flex: none; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--pc-line-2); background: var(--pc-paper); font-size: 14px; font-weight: 600; scroll-snap-align: center; transition: background 0.2s, color 0.2s, transform 0.2s var(--pc-ease); }
.pc-tab:active { transform: scale(0.96); }
.pc-tab[aria-current="true"] { background: var(--pc-ink); color: var(--pc-bg); border-color: var(--pc-ink); }

/* options */
.pc-body { padding: 8px 16px 24px; display: grid; align-content: start; gap: 8px; }
.pc-body.pc-enter { animation: pc-enter 0.32s var(--pc-ease); }
@keyframes pc-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.pc-part { padding: 12px 0 16px; border-bottom: 1px solid var(--pc-line); }
.pc-part:last-child { border-bottom: 0; }
.pc-ph { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 12px; font-size: 16px; font-weight: 700; }
.pc-pv { font-weight: 500; color: var(--pc-mute); }
.pc-body[aria-busy="true"] .pc-opts { opacity: 0.45; }
.pc-opts { display: grid; gap: 8px; transition: opacity 0.3s; }
.pc-swatches { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.pc-swatches .pc-opt { position: relative; aspect-ratio: 1; border-radius: 50%; transition: transform 0.25s var(--pc-ease), box-shadow 0.25s; }
.pc-swatches .pc-opt i { position: absolute; inset: 5px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.16); transition: inset 0.25s var(--pc-ease); }
.pc-swatches .pc-opt[aria-checked="true"] { box-shadow: 0 0 0 2px var(--pc-ink); }
.pc-swatches .pc-opt[aria-checked="true"] i { inset: 4px; }
.pc-swatches .pc-opt:active { transform: scale(0.88); }
.pc-cards { grid-template-columns: 1fr 1fr; }
.pc-cards .pc-opt, .pc-chips .pc-opt { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2px 10px; text-align: left; padding: 12px 14px; border-radius: var(--pc-r); border: 1px solid var(--pc-line-2); background: var(--pc-paper); transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s var(--pc-ease); }
.pc-cards .pc-opt b, .pc-chips .pc-opt b { grid-column: 1 / 3; font-size: 15px; line-height: 1.25; }
.pc-cards .pc-opt .pc-dotc ~ b, .pc-chips .pc-opt .pc-dotc ~ b { grid-column: 2 / 3; }
.pc-opt .pc-d { grid-column: 3; grid-row: 1; align-self: start; padding-top: 4px; font: 500 12px/1 var(--pc-mono); color: var(--pc-mute); }
.pc-cards .pc-opt { align-items: start; align-content: start; }
/* narrow phones: the price goes under the name instead of squeezing it */
@media (max-width: 400px) {
  .pc-cards .pc-opt b { grid-column: 1 / 4; }
  .pc-cards .pc-opt .pc-d { grid-column: 1 / 4; grid-row: auto; padding-top: 2px; }
}
.pc-opt small { grid-column: 1 / 4; font-size: 13px; line-height: 1.35; color: var(--pc-mute); }
.pc-dotc { width: 18px; height: 18px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18); }
.pc-cards .pc-opt[aria-checked="true"], .pc-chips .pc-opt[aria-checked="true"] { border-color: var(--pc-ink); box-shadow: inset 0 0 0 1px var(--pc-ink); }
.pc-cards .pc-opt:active, .pc-chips .pc-opt:active { transform: scale(0.97); }
.pc-chips { grid-template-columns: 1fr 1fr; }
.pc-opt.pc-pop { animation: pc-pop 0.42s var(--pc-ease); }
@keyframes pc-pop { 0% { transform: scale(0.9); } 55% { transform: scale(1.06); } 100% { transform: scale(1); } }
.pc-opt:disabled { cursor: default; }

/* footer */
.pc-foot { position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--pc-paper) 94%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top: 1px solid var(--pc-line); }
.pc-sum { display: grid; margin: 0; line-height: 1.2; min-width: 0; }
.pc-price { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.pc-code { font: 500 11px/1.4 var(--pc-mono); letter-spacing: 0.06em; color: var(--pc-mute); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-keep, .pc-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border-radius: 999px; font-weight: 700; font-size: 15px; text-decoration: none; color: var(--pc-ink); border: 1px solid var(--pc-line-2); transition: transform 0.2s var(--pc-ease), background 0.2s; }
.pc-keep, .pc-btn-acc { background: var(--pc-acc); color: var(--pc-acc-ink); border-color: transparent; }
.pc-keep:active, .pc-btn:active { transform: scale(0.97); }
.pc-keep:disabled { opacity: 0.5; }

/* start / failure gate */
.pc-gate { position: fixed; inset: 0; z-index: 10; display: grid; align-items: end; background: var(--pc-night); color: var(--pc-on-night); padding: 24px 20px calc(28px + env(safe-area-inset-bottom)); }
.pc-gate-in { display: grid; gap: 14px; max-width: 30rem; animation: pc-enter 0.5s var(--pc-ease); }
.pc-gate .pc-eyebrow { color: var(--pc-acc); }
.pc-eyebrow { margin: 0; font: 500 12px/1.4 var(--pc-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--pc-mute); }
.pc-gate-t { margin: 0; font-weight: 800; font-size: clamp(40px, 12vw, 56px); line-height: 0.95; letter-spacing: -0.045em; }
.pc-gate-b { margin: 0; font-size: 17px; color: color-mix(in srgb, var(--pc-on-night) 82%, transparent); }
.pc-gate-n { margin: 0; font: 500 12px/1.5 var(--pc-mono); color: color-mix(in srgb, var(--pc-on-night) 62%, transparent); }
.pc-gate .pc-btn { color: var(--pc-on-night); border-color: color-mix(in srgb, var(--pc-on-night) 40%, transparent); }
.pc-gate .pc-btn-acc { color: var(--pc-acc-ink); }
.pc-start { min-height: 56px; font-size: 16px; }
.pc-gated > :not(.pc-gate) { visibility: hidden; }

/* footer with an order: price on top, Order this pair full width */
.pc-foot-order { display: grid; grid-template-columns: 1fr auto; gap: 10px 12px; }
.pc-foot-order .pc-keep { grid-column: 1 / -1; min-height: 54px; font-size: 16px; }
.pc-more { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--pc-line-2); font-size: 14px; font-weight: 700; white-space: nowrap; }
.pc-more:disabled { opacity: 0.5; }

/* finishing sheet: done, size, saved */
.pc-sheet { position: fixed; inset: 0; z-index: 12; display: grid; align-items: end; background: rgba(0, 0, 0, 0.4); }
.pc-sheet-in { position: relative; max-height: 94svh; overflow: auto; overscroll-behavior: contain; background: var(--pc-paper); border-radius: 18px 18px 0 0; padding: 14px 20px calc(24px + env(safe-area-inset-bottom)); display: grid; gap: 12px; }
.pc-sheet.pc-in { animation: pc-fade 0.3s ease; }
.pc-sheet.pc-in .pc-sheet-in { animation: pc-up 0.45s var(--pc-ease); }
@keyframes pc-fade { from { background: rgba(0, 0, 0, 0); } }
@keyframes pc-up { from { transform: translateY(100%); } }
.pc-sheet-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.pc-x, .pc-back { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--pc-line-2); font-size: 14px; font-weight: 600; }
.pc-x { margin-left: auto; }
.pc-back::before { content: "‹ "; }
.pc-sheet-t { margin: 0; font-weight: 800; font-size: 34px; line-height: 1; letter-spacing: -0.035em; outline: none; }
.pc-sheet-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pc-sheet-price { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.pc-sheet-pnote { margin: 0; font: 500 11px/1.4 var(--pc-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--pc-mute); text-align: right; }
.pc-list { margin: 0; }
.pc-list div { display: grid; grid-template-columns: 88px 1fr; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--pc-line); font-size: 14px; }
.pc-list dt { color: var(--pc-mute); }
.pc-list dd { margin: 0; }
.pc-main-acts { display: grid; gap: 8px; margin-top: 4px; }
.pc-btn-big { min-height: 54px; font-size: 16px; width: 100%; }
.pc-btn:disabled { opacity: 0.45; cursor: default; }
.pc-note { margin: 0; font-size: 13px; line-height: 1.45; color: var(--pc-mute); }
.pc-msg { margin: 0; font-size: 14px; color: var(--pc-mute); overflow-wrap: anywhere; min-height: 1.4em; }
.pc-ref { margin: 4px 0 0; font: 500 11px/1.4 var(--pc-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--pc-mute); }
.pc-more-links { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.pc-textlink { font-size: 14px; font-weight: 600; color: var(--pc-ink); text-underline-offset: 4px; min-height: 44px; display: inline-flex; align-items: center; }

/* share */
.pc-share { display: grid; gap: 10px; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--pc-line); }
.pc-share-t { margin: 0; font: 500 12px/1.4 var(--pc-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--pc-mute); }
.pc-share-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pc-sh { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 8px; border-radius: var(--pc-r); border: 1px solid var(--pc-line-2); background: var(--pc-paper); color: var(--pc-ink); font-size: 14px; font-weight: 700; text-decoration: none; text-align: center; transition: transform 0.2s var(--pc-ease), border-color 0.2s; }
.pc-sh:active { transform: scale(0.97); }
.pc-sh-native { grid-column: 1 / -1; background: var(--pc-ink); color: var(--pc-bg); border-color: var(--pc-ink); }

/* size */
.pc-seg { display: inline-grid; grid-auto-flow: column; justify-self: start; gap: 2px; padding: 3px; border-radius: 999px; background: var(--pc-bg); border: 1px solid var(--pc-line); }
.pc-seg-b { min-height: 40px; min-width: 56px; padding: 0 14px; border-radius: 999px; font: 600 13px/1 var(--pc-mono); letter-spacing: 0.04em; color: var(--pc-mute); }
.pc-seg-b[aria-checked="true"] { background: var(--pc-ink); color: var(--pc-bg); }
.pc-sizes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.pc-size { display: grid; place-items: center; gap: 2px; min-height: 58px; padding: 6px 2px; border-radius: var(--pc-r); border: 1px solid var(--pc-line-2); background: var(--pc-paper); transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s var(--pc-ease); }
.pc-size b { font-size: 17px; font-weight: 800; line-height: 1; letter-spacing: -0.01em; }
.pc-size small { font: 500 10px/1.2 var(--pc-mono); letter-spacing: 0.02em; color: var(--pc-mute); white-space: nowrap; }
.pc-size.low small { color: var(--pc-warn, #9a5b00); }
.pc-size[aria-checked="true"] { border-color: var(--pc-ink); box-shadow: inset 0 0 0 1px var(--pc-ink); background: color-mix(in srgb, var(--pc-acc) 22%, var(--pc-paper)); }
.pc-size:disabled { opacity: 0.4; cursor: not-allowed; }
.pc-size:disabled b { text-decoration: line-through; }
.pc-size:not(:disabled):active { transform: scale(0.95); }
.pc-size-all { margin: 0; min-height: 1.4em; font: 500 12px/1.4 var(--pc-mono); letter-spacing: 0.06em; text-transform: uppercase; }
.pc-qty { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--pc-line); border-bottom: 1px solid var(--pc-line); font-weight: 700; }
.pc-stepper { display: inline-flex; align-items: center; gap: 4px; }
.pc-stepper output { min-width: 32px; text-align: center; font-size: 18px; font-weight: 800; }
.pc-step { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--pc-line-2); font-size: 20px; line-height: 1; }
.pc-step:disabled { opacity: 0.35; cursor: default; }

/* saved */
.pc-tick { width: 56px; height: 56px; border-radius: 50%; background: var(--pc-acc); position: relative; margin-top: 4px; animation: pc-pop 0.5s var(--pc-ease); }
.pc-tick::after { content: ""; position: absolute; left: 20px; top: 14px; width: 12px; height: 22px; border: solid var(--pc-acc-ink); border-width: 0 3px 3px 0; transform: rotate(45deg); }
.pc-saved-b { margin: 0; font-size: 16px; color: var(--pc-mute); }
.pc-saved-line { margin: 0; font: 500 13px/1.4 var(--pc-mono); letter-spacing: 0.06em; text-transform: uppercase; }

@media (prefers-reduced-motion: reduce) {
  .pc *, .pc *::before, .pc *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
