/* Mr Suits: Build your prom tux */
[hidden] { display: none !important; }
.pb-page { padding-top: calc(84px + env(safe-area-inset-top, 0px)); }
.pb-intro { padding-block: clamp(28px, 6vh, 72px) clamp(22px, 4vh, 44px); display: grid; gap: 16px; }
.pb-intro h1 { font-size: clamp(2.6rem, 7vw, 5.4rem); }
.pb-flag { justify-self: start; font-family: var(--caps); font-size: .62rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--ivory); border: 1px solid var(--ox-line); background: rgba(94, 24, 36, .35); padding: .5em .9em; }

/* Layout: the tux on the left, the choices on the right; on phones the tux stays on top */
.pb-builder { --stage-h: clamp(330px, 56svh, 540px); display: grid; grid-template-columns: minmax(0, 1fr); padding-bottom: clamp(48px, 10vh, 120px); }
.pb-stage { position: sticky; top: 0; z-index: 3; height: var(--stage-h); margin-inline: calc(var(--gutter) * -1); background: #141414; overflow: hidden; isolation: isolate; }
.pb-stage::before { content: ""; position: absolute; inset: -40px; z-index: -1; background: var(--photo, none) center / cover no-repeat, var(--sw, #141414); filter: blur(28px) brightness(.62) saturate(.9); transform: scale(1.1); transition: background .5s var(--ease); }
.pb-canvas { position: absolute; inset: 0; }
.pb-canvas canvas { position: absolute; left: 50%; top: 0; height: 100%; width: auto; max-width: 100%; object-fit: contain; transform: translateX(-50%); opacity: 0; transition: opacity .45s var(--ease); }
.pb-canvas canvas.on { opacity: 1; }
.pb-stage .pb-load { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-family: var(--caps); font-size: .62rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--ivory); opacity: 0; transition: opacity .3s var(--ease); pointer-events: none; }
.pb-stage.loading .pb-load { opacity: .8; }
.pb-stage.loading canvas.on { opacity: .45; }
.pb-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 16px 12px; text-align: center; font-family: var(--caps); font-size: .6rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--ivory); background: linear-gradient(to top, rgba(10, 10, 10, .72), rgba(10, 10, 10, 0)); pointer-events: none; }
.pb-toast { position: absolute; top: 12px; left: 50%; transform: translate(-50%, -6px); font-family: var(--caps); font-size: .62rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--ivory); background: rgba(10, 10, 10, .86); padding: .6em 1.1em; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .3s var(--ease), transform .4s var(--ease); }
.pb-toast.show { opacity: 1; transform: translate(-50%, 0); }
/* Front and back, shown once a patch is picked */
.pb-view { position: absolute; top: 12px; right: 12px; z-index: 1; display: flex; background: rgba(10, 10, 10, .72); border: 1px solid rgba(239, 232, 218, .18); }
.pb-view button { font-family: var(--caps); font-size: .58rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--taupe); background: none; border: 0; padding: .85em 1.05em; cursor: pointer; transition: color .3s var(--ease), background .3s var(--ease); }
.pb-view button[aria-pressed="true"] { color: var(--ink); background: var(--ivory); }
.pb-view button:focus-visible { outline: 1px solid var(--brass); outline-offset: -3px; }

.pb-tabs { position: sticky; top: var(--stage-h); z-index: 3; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); background: var(--ink); border-bottom: 1px solid var(--line); }
.pb-tabs::-webkit-scrollbar { display: none; }
.pb-tabs button { flex: none; display: flex; align-items: baseline; gap: .5em; font-family: var(--caps); font-size: .64rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--taupe); background: none; border: 0; border-bottom: 1px solid transparent; margin-bottom: -1px; padding: 1.35em .9em 1.25em; cursor: pointer; transition: color .3s var(--ease), border-color .3s var(--ease); }
.pb-tabs button b { font-weight: 500; color: var(--ox-line); letter-spacing: 0; }
.pb-tabs button[aria-selected="true"] { color: var(--ivory); border-bottom-color: var(--ivory); }
.pb-tabs button[aria-selected="true"] b { color: var(--ivory); }

.pb-form { min-height: calc(100svh - var(--stage-h) - 52px); }
.pb-step { display: grid; gap: 26px; padding-block: 24px 32px; }
.pb-group { border: 0; display: grid; gap: 12px; min-width: 0; }
.pb-group legend { padding: 0; margin-bottom: 12px; font-size: .66rem; }
.pb-group .chips label { font-size: .86rem; padding: .62em 1em; }
.pb-hint { font-size: .86rem; color: var(--taupe); margin-top: -4px; max-width: 52ch; }
.pb-tiles input, .pb-dots input { position: absolute; opacity: 0; pointer-events: none; }

/* The seven tuxedos */
.pb-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 14px 10px; }
.pb-tiles label { display: grid; gap: 8px; align-content: start; font-size: .78rem; line-height: 1.3; color: var(--bone); cursor: pointer; }
.pb-tiles .pic { position: relative; display: block; aspect-ratio: 4 / 5; background: var(--sw) center / cover no-repeat; outline: 1px solid transparent; outline-offset: 3px; transition: outline-color .3s var(--ease); overflow: hidden; }
.pb-tiles .pic::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255, 255, 255, .08), rgba(0, 0, 0, .25)); }
.pb-tiles .pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pb-tiles input:checked + label { color: var(--ivory); }
.pb-tiles input:checked + label .pic { outline-color: var(--ivory); }
.pb-tiles input:focus-visible + label .pic { outline: 1px dashed var(--brass); }

/* Satin color dots */
.pb-dots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px 10px; }
.pb-dots label { display: flex; align-items: center; gap: 10px; font-size: .86rem; color: var(--bone); cursor: pointer; padding: 4px 0; }
.pb-dots label i { flex: none; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, .55) 0, rgba(255, 255, 255, 0) 46%), linear-gradient(150deg, var(--c), color-mix(in srgb, var(--c) 55%, #000)); background-color: var(--c); border: 1px solid rgba(239, 232, 218, .22); outline: 1px solid transparent; outline-offset: 3px; transition: outline-color .3s var(--ease); }
.pb-dots label i.none { background: linear-gradient(135deg, transparent 46%, var(--taupe) 46% 54%, transparent 54%); }
.pb-dots input:checked + label { color: var(--ivory); }
.pb-dots input:checked + label i { outline-color: var(--ivory); }
.pb-dots input:focus-visible + label i { outline: 1px dashed var(--brass); }

.pb-next { justify-self: start; padding: 1.05em 1.8em; }
.pb-places label::before { content: "+"; display: inline-block; width: 1em; margin-right: .35em; color: var(--taupe); }
.pb-places input:checked + label::before { content: "\2713"; color: var(--ink); }
.pb-unique { font-size: .9rem; line-height: 1.6; color: var(--bone); border-left: 1px solid var(--ox-line); padding: .2em 0 .2em 1em; max-width: 52ch; }

/* Your look */
.pb-h { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.pb-sum { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px 18px; border-top: 1px solid var(--line); padding-top: 18px; }
.pb-sum dt { font-family: var(--caps); font-size: .62rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--taupe); padding-top: .3em; }
.pb-sum dd { font-size: .95rem; color: var(--ivory); line-height: 1.5; }
.pb-edit { margin-left: .6em; font: inherit; font-size: .8rem; color: var(--taupe); background: none; border: 0; border-bottom: 1px solid currentColor; cursor: pointer; padding: 0; }
.pb-edit:hover { color: var(--ivory); }
.pb-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.pb-fine { font-size: .86rem; color: var(--taupe); max-width: 52ch; }

@media (max-width: 899px) {
  body.pb-pinned .site-header { transform: translateY(-100%); }
}
@media (min-width: 900px) {
  .pb-builder { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); grid-template-rows: auto 1fr; column-gap: clamp(32px, 5vw, 80px); }
  .pb-stage { grid-row: 1 / span 2; top: 104px; height: calc(100svh - 128px); max-height: 900px; margin-inline: 0; }
  .pb-tabs { top: 84px; margin-inline: 0; padding-inline: 0; }
  .pb-form { min-height: 0; }
  .pb-step { padding-block: 32px 40px; gap: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .pb-canvas canvas, .pb-toast, .pb-stage::before { transition: none !important; }
}

/* Start over (Moe 2026-10-26): a real button on the first step and on Your Look, with Undo in the message */
.pb-nav { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.pb-restart { justify-self: start; display: inline-flex; align-items: center; gap: .7em; padding: 1.05em 1.6em; border-color: rgba(239, 232, 218, .55); color: var(--ivory); }
.pb-restart svg { flex: none; }
.pb-restart:hover svg { transform: rotate(-40deg); }
.pb-restart svg { transition: transform .4s var(--ease); }
.pb-toast.has-undo { pointer-events: auto; display: flex; align-items: center; gap: 1em; padding-right: .6em; }
.pb-toast button { font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--ink); background: var(--ivory); border: 0; padding: .7em 1em; min-height: 36px; cursor: pointer; }

/* Patch designs (Moe's patch photos 2026-10-28): each tile shows the patch in the chosen color on the chosen tux's color */
.pb-designs { grid-template-columns: repeat(auto-fill, minmax(112px, 150px)); }
.pb-designs .pic { aspect-ratio: 3 / 4; background: radial-gradient(ellipse at 50% 40%, rgba(255, 255, 255, .07), rgba(0, 0, 0, 0) 70%), var(--tux, #141414); }
.pb-designs .pic canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
