/* Customize page. Uses the shared tokens (core/css/tokens.css) only. Square corners, hairlines, thin line icons. */

.cz-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cz-ic { width: 26px; height: 26px; flex: none; }
.cz-tic { width: 34px; height: 34px; flex: none; }

/* ---------- Intro ---------- */
.cz-intro { padding: calc(var(--nj-header-h) + clamp(40px, 6vw, 96px)) 0 clamp(32px, 4vw, 56px); background: var(--nj-pearl); }
.cz-intro__in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--nj-gap-4) var(--nj-gap-5); align-items: end; }
.cz-intro .nj-label { margin-bottom: 18px; }
.cz-intro h1 { font-size: clamp(2.6rem, 1.5rem + 4.2vw, 5.4rem); }
.cz-intro__side { display: grid; gap: 22px; }
.cz-jump { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.cz-jump a { font-size: var(--nj-size-caption); letter-spacing: var(--nj-tracking-caps); text-transform: uppercase; font-weight: 400; color: var(--nj-steel-deep); border-bottom: 1px solid var(--nj-line); padding-bottom: 4px; transition: border-color var(--nj-dur-fast), color var(--nj-dur-fast); }
.cz-jump a:hover { color: var(--nj-ink); border-color: var(--nj-ink); }
@media (max-width: 860px) { .cz-intro__in { grid-template-columns: 1fr; } }

/* ---------- Studio frame ---------- */
.cz { --rail: 104px; --panel: clamp(360px, 30vw, 460px); background: var(--nj-white); border-top: 1px solid var(--nj-line); border-bottom: 1px solid var(--nj-line); }
.cz-bar { display: flex; align-items: stretch; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--nj-line); padding-inline: var(--nj-gutter); }
.cz-pieces { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.cz-pieces::-webkit-scrollbar { display: none; }
.cz-piece { position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 18px 18px 17px; background: none; border: 0; color: var(--nj-muted); font-size: var(--nj-size-caption); letter-spacing: var(--nj-tracking-caps); text-transform: uppercase; font-weight: 400; white-space: nowrap; transition: color var(--nj-dur-fast); }
.cz-piece .cz-ic { width: 24px; height: 24px; color: var(--nj-steel); transition: color var(--nj-dur-fast), transform var(--nj-dur) var(--nj-ease); }
.cz-piece::after { content: ""; position: absolute; left: 18px; right: 18px; bottom: -1px; height: 1px; background: var(--nj-ink); transform: scaleX(0); transition: transform var(--nj-dur) var(--nj-ease); }
.cz-piece:hover { color: var(--nj-ink); }
.cz-piece:hover .cz-ic { transform: translateY(-1px); }
.cz-piece[aria-selected="true"] { color: var(--nj-ink); }
.cz-piece[aria-selected="true"] .cz-ic { color: var(--nj-steel-deep); }
.cz-piece[aria-selected="true"]::after { transform: scaleX(1); }
.cz-bar__tools { display: flex; align-items: center; gap: 6px; }
.cz-tool { min-height: 40px; padding: 8px 16px; background: none; border: 1px solid var(--nj-line); font-size: var(--nj-size-caption); letter-spacing: .16em; text-transform: uppercase; font-weight: 400; color: var(--nj-ink); white-space: nowrap; transition: border-color var(--nj-dur-fast), background var(--nj-dur-fast); }
.cz-tool:hover, .cz-tool[aria-expanded="true"] { border-color: var(--nj-ink); }
.cz-tool--icon { display: grid; place-items: center; width: 40px; padding: 0; }
.cz-tool--icon .cz-ic { width: 20px; height: 20px; }

.cz-presets-wrap { padding: 18px var(--nj-gutter) 20px; border-bottom: 1px solid var(--nj-line); background: var(--nj-pearl); animation: cz-drop var(--nj-dur) var(--nj-ease); }
.cz-hint { font-size: var(--nj-size-small); color: var(--nj-text-2); margin-bottom: 12px; }
.cz-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.cz-preset { padding: 9px 16px; border: 1px solid var(--nj-line); background: var(--nj-white); font-size: 14px; color: var(--nj-charcoal); transition: border-color var(--nj-dur-fast); }
.cz-preset:hover { border-color: var(--nj-steel-deep); }
.cz-preset[aria-pressed="true"] { border-color: var(--nj-ink); box-shadow: inset 0 0 0 1px var(--nj-ink); }
@keyframes cz-drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.cz-body { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr) var(--panel); height: clamp(620px, calc(100svh - var(--nj-header-h) - 60px), 980px); }

/* ---------- Group rail ---------- */
.cz-rail { display: flex; flex-direction: column; border-right: 1px solid var(--nj-line); overflow-y: auto; scrollbar-width: none; padding-block: 8px; }
.cz-rail::-webkit-scrollbar { display: none; }
.cz-step { position: relative; display: grid; justify-items: center; gap: 4px; padding: 14px 6px 12px; background: none; border: 0; color: var(--nj-muted); text-align: center; transition: color var(--nj-dur-fast), background var(--nj-dur-fast); }
.cz-step .cz-ic { width: 28px; height: 28px; color: var(--nj-steel); transition: color var(--nj-dur-fast), transform var(--nj-dur) var(--nj-ease); }
.cz-step__n { display: none; }
.cz-step__l { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 400; line-height: 1.3; }
.cz-step::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 1px; background: var(--nj-ink); transform: scaleY(0); transition: transform var(--nj-dur) var(--nj-ease); }
.cz-step:hover { color: var(--nj-ink); }
.cz-step:hover .cz-ic { transform: translateY(-2px); }
.cz-step[aria-current="step"] { color: var(--nj-ink); background: var(--nj-pearl); }
.cz-step[aria-current="step"] .cz-ic { color: var(--nj-steel-deep); }
.cz-step[aria-current="step"]::before { transform: scaleY(1); }

/* ---------- Stage ---------- */
.cz-stage { position: relative; overflow: hidden; background: var(--stage-bg, #F7F7F5); transition: background var(--nj-dur-slow) var(--nj-ease); touch-action: none; }
.cz-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; }
.cz-stage canvas:active { cursor: grabbing; }
.cz-veil { position: absolute; inset: 0; display: grid; place-items: center; background: var(--nj-pearl); transition: opacity 900ms var(--nj-ease); pointer-events: none; z-index: 2; }
.cz-veil span { width: 46px; height: 46px; border: 1px solid var(--nj-steel); transform: rotate(45deg); animation: cz-breathe 1.8s var(--nj-ease) infinite; }
.cz-stage.is-ready .cz-veil { opacity: 0; }
.cz-stage.is-loading .cz-veil { opacity: .7; }
@keyframes cz-breathe { 0%, 100% { opacity: .3; transform: rotate(45deg) scale(.9); } 50% { opacity: 1; transform: rotate(45deg) scale(1); } }
.cz-missing, .cz-nogl { display: none; position: absolute; inset: 0; z-index: 3; place-items: center; padding: 40px; text-align: center; color: var(--nj-text-2); font-size: var(--nj-size-small); max-width: 40ch; margin: auto; }
.cz-stage.is-missing .cz-missing, .cz-stage.is-nogl .cz-nogl { display: grid; }
.cz-stage.is-missing canvas { opacity: 0; }

.cz-stage__top { position: absolute; z-index: 4; top: 14px; left: 16px; right: 16px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; pointer-events: none; }
.cz-stage__top > * { pointer-events: auto; }
.cz-stage__right { display: flex; gap: 6px; align-items: center; }
.cz-seg { display: inline-flex; background: rgba(255,255,255,.82); border: 1px solid var(--nj-line); }
.cz-seg button { min-height: 34px; padding: 6px 12px; background: none; border: 0; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 400; color: var(--nj-muted); transition: color var(--nj-dur-fast), background var(--nj-dur-fast); }
.cz-seg button:hover { color: var(--nj-ink); }
.cz-seg button[aria-pressed="true"] { color: var(--nj-white); background: var(--nj-ink); }
.cz-seg--bg button { padding: 6px 9px; }
.cz-seg--bg i { display: block; width: 16px; height: 16px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(46,46,54,.18); }
.cz-seg--bg button[aria-pressed="true"] { background: var(--nj-mist); }
.cz-seg--bg button[aria-pressed="true"] i { box-shadow: inset 0 0 0 1px rgba(46,46,54,.18), 0 0 0 2px var(--nj-white), 0 0 0 3px var(--nj-ink); }
.cz-round { display: grid; place-items: center; width: 36px; height: 36px; background: rgba(255,255,255,.82); border: 1px solid var(--nj-line); color: var(--nj-charcoal); transition: border-color var(--nj-dur-fast), background var(--nj-dur-fast); }
.cz-round .cz-ic { width: 19px; height: 19px; }
.cz-round:hover { border-color: var(--nj-ink); }
.cz-round[aria-pressed="true"] { background: var(--nj-ink); color: var(--nj-white); border-color: var(--nj-ink); }
.cz-round[aria-pressed="true"] .cz-ic { animation: cz-turn 3s linear infinite; }
@keyframes cz-turn { to { transform: rotate(360deg); } }

.cz-custom { display: none; position: absolute; z-index: 4; top: 60px; left: 16px; align-items: center; gap: 12px; padding: 8px 8px 8px 14px; background: var(--nj-white); border: 1px solid var(--nj-line); font-size: 13px; }
.cz-custom button { padding: 6px 10px; border: 1px solid var(--nj-line); background: none; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.cz-stage.is-custom .cz-custom { display: flex; }

.cz-stage__foot { position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: end; gap: 20px; padding: 18px 22px 20px; pointer-events: none; }
.cz-summary { font-family: var(--nj-font-display); font-size: clamp(1.15rem, 1rem + .6vw, 1.6rem); line-height: 1.25; color: var(--nj-ink); max-width: 34ch; text-wrap: balance; }
.cz-drag { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--nj-muted); white-space: nowrap; }

/* ---------- Panel ---------- */
.cz-panel { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; border-left: 1px solid var(--nj-line); min-height: 0; background: var(--nj-white); }
.cz-search { position: relative; display: flex; align-items: center; gap: 10px; padding: 0 20px; border-bottom: 1px solid var(--nj-line); }
.cz-search .cz-ic { width: 18px; height: 18px; color: var(--nj-steel-deep); }
.cz-search input { flex: 1; min-width: 0; height: 52px; border: 0; background: none; font-size: 14px; color: var(--nj-ink); outline: none; }
.cz-search input::placeholder { color: var(--nj-muted); }
.cz-search:focus-within { box-shadow: inset 0 -1px 0 var(--nj-ink); }
.cz-results { position: absolute; z-index: 10; left: -1px; right: 0; top: 100%; list-style: none; background: var(--nj-white); border: 1px solid var(--nj-line); box-shadow: var(--nj-shadow-float); max-height: 360px; overflow-y: auto; }
.cz-results button { display: grid; width: 100%; padding: 10px 20px; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--nj-line); }
.cz-results button:hover, .cz-results button:focus-visible { background: var(--nj-pearl); }
.cz-results span { font-size: 15px; color: var(--nj-ink); }
.cz-results small { font-size: 12px; color: var(--nj-muted); }
.cz-results__none { padding: 14px 20px; font-size: 14px; color: var(--nj-text-2); }

.cz-panel__scroll { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--nj-platinum) transparent; }
.cz-panel__body { padding: 28px 28px 20px; }
.cz-panel__body.is-in > * { animation: cz-rise 620ms var(--nj-ease) both; }
.cz-panel__body.is-in > :nth-child(2) { animation-delay: 60ms; }
.cz-panel__body.is-in > :nth-child(3) { animation-delay: 120ms; }
@keyframes cz-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.cz-group__head { margin-bottom: 22px; }
.cz-group__title { font-size: clamp(1.9rem, 1.4rem + 1.2vw, 2.6rem); margin: 8px 0 8px; }
.cz-group__intro { font-size: var(--nj-size-small); color: var(--nj-text-2); line-height: 1.6; }

.cz-opt { padding: 18px 0; border-top: 1px solid var(--nj-line); transition: background 900ms var(--nj-ease); }
.cz-opt.is-flash { background: var(--nj-mist); }
.cz-opt__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cz-opt__label { font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; font-weight: 400; color: var(--nj-text-2); }
.cz-val { font-size: 14px; color: var(--nj-ink); text-align: right; font-variant-numeric: tabular-nums; }
.cz-help { font-size: 12px; color: var(--nj-steel-deep); border-bottom: 1px solid currentColor; white-space: nowrap; }

.cz-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cz-chip { min-height: 36px; padding: 7px 13px; border: 1px solid var(--nj-line); background: var(--nj-white); font-size: 13.5px; color: var(--nj-charcoal); transition: border-color var(--nj-dur-fast), color var(--nj-dur-fast), background var(--nj-dur-fast); }
.cz-chip:hover { border-color: var(--nj-steel-deep); }
.cz-chip[aria-checked="true"] { border-color: var(--nj-ink); background: var(--nj-ink); color: var(--nj-white); }

.cz-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.cz-tile { display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 92px; padding: 12px 6px 10px; border: 1px solid var(--nj-line); background: var(--nj-white); color: var(--nj-charcoal); transition: border-color var(--nj-dur-fast), background var(--nj-dur-fast); }
.cz-tile .cz-tic { color: var(--nj-steel-deep); transition: transform var(--nj-dur) var(--nj-ease); }
.cz-tile span { font-size: 12px; line-height: 1.3; text-align: center; }
.cz-tile--text { min-height: 56px; }
.cz-tile:hover { border-color: var(--nj-steel-deep); }
.cz-tile:hover .cz-tic { transform: translateY(-2px); }
.cz-tile[aria-checked="true"] { border-color: var(--nj-ink); box-shadow: inset 0 0 0 1px var(--nj-ink); background: var(--nj-pearl); }
.cz-tile[aria-checked="true"] .cz-tic { color: var(--nj-ink); }
.cz-tiles--shape { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
.cz-tiles--shape .cz-tile { min-height: 84px; }

/* sliders */
.cz-range input, .sz input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; --p: 50%; }
.cz-range input::-webkit-slider-runnable-track, .sz input[type=range]::-webkit-slider-runnable-track { height: 1px; background: linear-gradient(90deg, var(--nj-ink) var(--p), var(--nj-platinum) var(--p)); }
.cz-range input::-moz-range-track, .sz input[type=range]::-moz-range-track { height: 1px; background: linear-gradient(90deg, var(--nj-ink) var(--p), var(--nj-platinum) var(--p)); }
.cz-range input::-webkit-slider-thumb, .sz input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -7.5px; background: var(--nj-white); border: 1px solid var(--nj-ink); transform: rotate(45deg); transition: transform var(--nj-dur-fast) var(--nj-ease); }
.cz-range input::-moz-range-thumb, .sz input[type=range]::-moz-range-thumb { width: 14px; height: 14px; background: var(--nj-white); border: 1px solid var(--nj-ink); border-radius: 0; transform: rotate(45deg); }
.cz-range input:active::-webkit-slider-thumb, .sz input[type=range]:active::-webkit-slider-thumb { transform: rotate(45deg) scale(1.2); background: var(--nj-ink); }
.cz-range__ends { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--nj-muted); font-variant-numeric: tabular-nums; }
.cz-mini { margin-top: 8px; padding: 0; background: none; border: 0; border-bottom: 1px solid currentColor; font-size: 12px; color: var(--nj-steel-deep); }

/* switch */
.cz-switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
.cz-switch input { position: absolute; opacity: 0; pointer-events: none; }
.cz-switch i { position: relative; width: 40px; height: 22px; border: 1px solid var(--nj-platinum); background: var(--nj-pearl); flex: none; transition: background var(--nj-dur-fast), border-color var(--nj-dur-fast); }
.cz-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; background: var(--nj-white); border: 1px solid var(--nj-muted); transition: transform var(--nj-dur) var(--nj-ease), border-color var(--nj-dur-fast); }
.cz-switch input:checked + i { background: var(--nj-ink); border-color: var(--nj-ink); }
.cz-switch input:checked + i::after { transform: translateX(18px); border-color: var(--nj-white); }
.cz-switch input:focus-visible + i { outline: 1.5px solid var(--nj-steel-deep); outline-offset: 3px; }

/* text and notes */
.cz-text { position: relative; }
.cz-text input, .cz-note, .cz-field input, .cz-field select, .cz-field textarea, .sz-field input {
  width: 100%; min-height: 46px; padding: 11px 14px; border: 1px solid var(--nj-line); background: var(--nj-white); font-size: 16px; color: var(--nj-ink); border-radius: 0; outline: none; transition: border-color var(--nj-dur-fast);
}
.cz-text input:focus, .cz-note:focus, .cz-field input:focus, .cz-field select:focus, .cz-field textarea:focus, .sz-field input:focus { border-color: var(--nj-ink); }
.cz-text input { font-family: var(--nj-font-display); font-size: 19px; padding-right: 72px; }
.cz-count { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--nj-muted); }
.cz-note { resize: vertical; font-size: 14.5px; line-height: 1.5; }
.cz-opt--note .cz-opt__label::before { content: "For the bench "; color: var(--nj-steel-deep); }

/* swatches: metals, stones, colors */
.cz-fam + .cz-fam { margin-top: 14px; }
.cz-fam__name { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--nj-muted); margin-bottom: 8px; }
.cz-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.cz-swatches--match { margin-bottom: 14px; }
.cz-swatch { display: inline-flex; align-items: center; gap: 9px; min-height: 38px; padding: 5px 13px 5px 6px; border: 1px solid var(--nj-line); background: var(--nj-white); font-size: 13px; color: var(--nj-charcoal); text-align: left; transition: border-color var(--nj-dur-fast); }
.cz-swatch:hover { border-color: var(--nj-steel-deep); }
.cz-swatch[aria-pressed="true"] { border-color: var(--nj-ink); box-shadow: inset 0 0 0 1px var(--nj-ink); }
.cz-metals.is-folded { display: none; }
.cz-dot { display: block; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--c); background-size: cover; background-position: center; box-shadow: inset 0 0 0 1px rgba(46,46,54,.14); }
.cz-dot--metal { box-shadow: inset 0 0 0 1px rgba(46,46,54,.12), inset -3px -4px 6px rgba(0,0,0,.14), inset 3px 3px 6px rgba(255,255,255,.6); }
.cz-dot--facet { border-radius: 0; clip-path: polygon(50% 0, 100% 38%, 50% 100%, 0 38%); background: conic-gradient(from 200deg, var(--c), #fff 18%, var(--c) 36%, rgba(0,0,0,.25) 54%, var(--c) 72%, #fff 86%, var(--c)); }
.cz-dot--pearl { background: radial-gradient(circle at 35% 30%, #fff 0 12%, var(--c) 46%, rgba(0,0,0,.18) 100%); }
.cz-dot--match { background: linear-gradient(90deg, #d8b46e 50%, #dcdcd8 50%); }
.cz-dot--own { background: repeating-linear-gradient(45deg, var(--nj-white) 0 3px, var(--nj-platinum) 3px 6px); }
.cz-birth { margin-bottom: 14px; }
.cz-birth summary { cursor: pointer; font-size: 12px; color: var(--nj-steel-deep); list-style: none; display: inline-block; border-bottom: 1px solid currentColor; }
.cz-birth summary::-webkit-details-marker { display: none; }
.cz-months { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; margin-top: 10px; }
.cz-month { display: grid; justify-items: center; gap: 4px; padding: 8px 2px; border: 1px solid var(--nj-line); background: var(--nj-white); font-size: 11px; color: var(--nj-text-2); }
.cz-month .cz-dot { width: 16px; height: 16px; }
.cz-month:hover { border-color: var(--nj-ink); }
.cz-colors { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cz-sw { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--c); box-shadow: inset 0 0 0 1px rgba(46,46,54,.18); }
.cz-sw[aria-pressed="true"] { box-shadow: inset 0 0 0 1px rgba(46,46,54,.18), 0 0 0 2px var(--nj-white), 0 0 0 3px var(--nj-ink); }
.cz-sw--pick { position: relative; overflow: hidden; background: conic-gradient(#e6b6b6, #e6dcb6, #b6e6c4, #b6d4e6, #cbb6e6, #e6b6b6); cursor: pointer; }
.cz-sw--pick input { position: absolute; inset: -6px; width: 44px; height: 44px; opacity: 0; cursor: pointer; }

/* pager and actions */
.cz-pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--nj-line); }
.cz-pager__b { display: inline-flex; align-items: center; gap: 10px; padding: 8px 0; background: none; border: 0; font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--nj-text-2); font-weight: 400; }
.cz-pager__b .cz-ic { width: 18px; height: 18px; transition: transform var(--nj-dur) var(--nj-ease); }
.cz-pager__b--next { color: var(--nj-ink); }
.cz-pager__b--next:hover .cz-ic { transform: translateX(4px); }
.cz-pager__b:not(.cz-pager__b--next):hover .cz-ic { transform: translateX(-4px); }
.cz-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 14px 20px 16px; border-top: 1px solid var(--nj-line); background: var(--nj-white); }
.cz-cta .nj-btn { padding-inline: 10px; min-height: 48px; letter-spacing: .12em; font-size: 11px; }

/* ---------- Mobile studio: stage on top, rail as a strip, options below ---------- */
@media (max-width: 1100px) { .cz { --rail: 88px; --panel: 380px; } }
@media (max-width: 900px) {
  .cz-body { grid-template-columns: 1fr; grid-template-rows: auto auto auto; height: auto; }
  .cz-stage { order: 1; height: min(46svh, 440px); position: sticky; top: 0; z-index: 3; border-bottom: 1px solid var(--nj-line); }
  .cz-rail { order: 2; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--nj-line); padding: 0 8px; position: sticky; top: min(46svh, 440px); z-index: 3; background: var(--nj-white); }
  .cz-step { grid-auto-flow: column; align-items: center; gap: 8px; padding: 12px 12px; flex: none; }
  .cz-step .cz-ic { width: 20px; height: 20px; }
  .cz-step::before { left: 12px; right: 12px; top: auto; bottom: 0; width: auto; height: 1px; transform: scaleX(0); }
  .cz-step[aria-current="step"]::before { transform: scaleX(1); }
  .cz-step[aria-current="step"] { background: none; }
  .cz-panel { order: 3; border-left: 0; display: block; }
  .cz-panel__scroll { overflow: visible; }
  .cz-panel__body { padding: 22px 16px 12px; }
  .cz-search { padding: 0 16px; }
  .cz-cta { position: sticky; bottom: 0; z-index: 5; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -1px 0 var(--nj-line); }
  .cz-cta .nj-btn { font-size: 11px; letter-spacing: .14em; }
  .cz-bar { padding-inline: 8px; }
  .cz-piece { padding: 14px 10px 13px; gap: 7px; }
  .cz-piece::after { left: 10px; right: 10px; }
  .cz-tool:not(.cz-tool--icon) { font-size: 0; width: 40px; padding: 0; position: relative; }
  .cz-tool:not(.cz-tool--icon)::before { content: ""; position: absolute; inset: 11px; border: 1px solid var(--nj-ink); transform: rotate(45deg) scale(.75); }
  .cz-seg button { padding: 6px 9px; font-size: 10px; }
  .cz-drag { display: none; }
  .cz-stage__foot { padding: 12px 16px 14px; }
  .cz-summary { font-size: 1.1rem; }
  .cz-presets-wrap { padding: 14px 16px; }
}
@media (max-width: 520px) {
  .cz-piece span { display: none; }
  .cz-piece { padding: 14px 12px; }
  .cz-piece .cz-ic { width: 26px; height: 26px; }
  .cz-stage__top { left: 10px; right: 10px; top: 10px; }
  .cz-seg--bg { display: none; }
  .cz-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cz-tiles--shape { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Ring sizer ---------- */
.sz { border: 1px solid var(--nj-line); background: var(--nj-white); }
.sz-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--nj-line); }
.sz-tabs button { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 20px 12px; background: none; border: 0; font-size: var(--nj-size-caption); letter-spacing: var(--nj-tracking-caps); text-transform: uppercase; color: var(--nj-muted); font-weight: 400; }
.sz-tabs button + button { border-left: 1px solid var(--nj-line); }
.sz-tabs .cz-ic { color: var(--nj-steel); }
.sz-tabs button::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--nj-ink); transform: scaleX(0); transition: transform var(--nj-dur) var(--nj-ease); }
.sz-tabs button[aria-selected="true"] { color: var(--nj-ink); background: var(--nj-pearl); }
.sz-tabs button[aria-selected="true"] .cz-ic { color: var(--nj-steel-deep); }
.sz-tabs button[aria-selected="true"]::after { transform: scaleX(1); }
.sz-panel { padding: clamp(24px, 4vw, 56px); }
.sz-chart { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--nj-gap-5); align-items: center; }
.sz-read { display: grid; gap: 14px; justify-items: start; }
.sz-big { font-family: var(--nj-font-display); font-size: clamp(5rem, 3rem + 7vw, 9rem); line-height: .9; color: var(--nj-ink); }
.sz-step { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 12px; width: 100%; max-width: 440px; }
.sz-step button { width: 44px; height: 44px; border: 1px solid var(--nj-line); background: none; font-size: 20px; color: var(--nj-ink); }
.sz-step button:hover { border-color: var(--nj-ink); }
.sz-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--nj-line); border: 1px solid var(--nj-line); width: 100%; margin: 6px 0 4px; }
.sz-grid div { background: var(--nj-white); padding: 14px 14px 12px; }
.sz-grid dt { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--nj-muted); }
.sz-grid dd { margin: 4px 0 0; font-family: var(--nj-font-display); font-size: 1.6rem; color: var(--nj-ink); }
.sz-true { display: grid; justify-items: center; gap: 18px; text-align: center; }
.sz-true__ring { --d: 64px; width: calc(var(--d) + 26px); height: calc(var(--d) + 26px); border-radius: 50%; border: 13px solid var(--nj-frost); box-shadow: inset 0 0 0 1px var(--nj-platinum), 0 0 0 1px var(--nj-platinum); transition: width var(--nj-dur) var(--nj-ease), height var(--nj-dur) var(--nj-ease); }
.sz-true p { font-size: 13px; color: var(--nj-muted); max-width: 30ch; }
.sz-how { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--nj-gap-5); counter-reset: sz; }
.sz-how li { display: grid; gap: 14px; align-content: start; counter-increment: sz; }
.sz-how__t { font-family: var(--nj-font-display); font-size: 1.6rem; color: var(--nj-ink); }
.sz-how__t::before { content: "0" counter(sz); display: block; font-family: var(--nj-font-text); font-size: 11px; letter-spacing: .2em; color: var(--nj-steel-deep); margin-bottom: 6px; }
.sz-how li > p:not(.sz-how__t):not(.sz-out) { color: var(--nj-text-2); font-size: var(--nj-size-small); max-width: 46ch; }
.sz-card-box, .sz-circle-box { display: grid; place-items: center start; min-height: 240px; overflow: hidden; }
.sz-circle-box { place-items: center; }
.sz-card { position: relative; border: 1px dashed var(--nj-steel-deep); border-radius: 10px; background: var(--nj-pearl); max-width: 100%; }
.sz-card span { position: absolute; left: 12px; top: 10px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--nj-steel-deep); }
.sz-circle { --d: 64px; width: var(--d); height: var(--d); border-radius: 50%; border: 1px solid var(--nj-ink); box-shadow: 0 0 0 1px var(--nj-white), 0 0 0 30px var(--nj-mist); }
.sz-out { font-family: var(--nj-font-display); font-size: 1.35rem; color: var(--nj-ink); min-height: 1.6em; }
.sz-field { display: grid; gap: 8px; max-width: 280px; }
.sz-field span { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--nj-text-2); }
.sz-field input { font-family: var(--nj-font-display); font-size: 1.6rem; }
.sz-tips { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--nj-line); }
.sz-tips li { padding: 22px 24px; font-size: 13.5px; line-height: 1.6; color: var(--nj-text-2); }
.sz-tips li + li { border-left: 1px solid var(--nj-line); }
@media (max-width: 900px) {
  .sz-chart, .sz-how { grid-template-columns: 1fr; gap: var(--nj-gap-4); }
  .sz-tips { grid-template-columns: 1fr 1fr; }
  .sz-tips li:nth-child(3) { border-left: 0; }
  .sz-tips li:nth-child(n+3) { border-top: 1px solid var(--nj-line); }
  .sz-tabs button { flex-direction: column; gap: 6px; padding: 14px 6px; font-size: 10.5px; letter-spacing: .12em; }
}
@media (max-width: 520px) { .sz-grid { grid-template-columns: 1fr 1fr; } .sz-tips { grid-template-columns: 1fr; } .sz-tips li + li { border-left: 0; border-top: 1px solid var(--nj-line); } }

/* ---------- How it works ---------- */
.cz-steps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--nj-line); }
.cz-steps li { padding: 30px 28px 8px 0; display: grid; gap: 12px; align-content: start; }
.cz-steps li + li { padding-left: 28px; border-left: 1px solid var(--nj-line); }
.cz-steps__n { font-size: 11px; letter-spacing: .2em; color: var(--nj-steel-deep); }
.cz-steps h3 { font-size: clamp(1.4rem, 1.2rem + .6vw, 1.8rem); }
.cz-steps p { font-size: var(--nj-size-small); color: var(--nj-text-2); }
.cz-final { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: clamp(56px, 7vw, 104px); padding-top: clamp(32px, 4vw, 48px); border-top: 1px solid var(--nj-line); }
@media (max-width: 900px) { .cz-steps { grid-template-columns: 1fr 1fr; } .cz-steps li:nth-child(3) { padding-left: 0; border-left: 0; } .cz-steps li:nth-child(n+3) { border-top: 1px solid var(--nj-line); margin-top: 8px; } }
@media (max-width: 520px) { .cz-steps { grid-template-columns: 1fr; } .cz-steps li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--nj-line); } .cz-final .nj-btn { width: 100%; white-space: normal; } }

/* ---------- Save and book dialog ---------- */
.cz-dlg { width: min(1080px, calc(100vw - 32px)); max-height: calc(100svh - 32px); padding: 0; border: 0; background: var(--nj-white); color: var(--nj-charcoal); box-shadow: var(--nj-shadow-float); overflow: auto; }
.cz-dlg::backdrop { background: rgba(46, 46, 54, .38); backdrop-filter: blur(2px); }
.cz-dlg[open] { animation: cz-rise 520ms var(--nj-ease); }
.cz-dlg__in { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 560px; }
.cz-dlg__x { position: absolute; z-index: 2; right: 10px; top: 10px; display: grid; place-items: center; width: 44px; height: 44px; background: var(--nj-white); border: 0; }
.cz-dlg__x .cz-ic { width: 20px; height: 20px; }
.cz-dlg__fig { margin: 0; background: var(--nj-pearl); position: relative; min-height: 320px; }
.cz-dlg__fig img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cz-dlg__body { padding: clamp(28px, 4vw, 48px); display: grid; gap: 14px; align-content: start; }
.cz-dlg__title { font-size: clamp(2rem, 1.5rem + 1.6vw, 2.9rem); }
.cz-dlg__sum { color: var(--nj-text-2); font-size: var(--nj-size-small); }
.cz-dlg__text { color: var(--nj-text-2); font-size: var(--nj-size-small); }
.cz-dlg__h3 { font-size: 2rem; }
.cz-dlg [data-step] { display: grid; gap: 14px; }
.cz-dlg [data-step][hidden] { display: none; }
.cz-dlg__acts { display: flex; flex-wrap: wrap; gap: 8px; }
.cz-dlg__acts .nj-btn { flex: 1 1 auto; }
.cz-dlg__main { width: 100%; }
.cz-field { display: grid; gap: 7px; }
.cz-field > span { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--nj-text-2); }
.cz-field--link input { font-size: 13px; color: var(--nj-text-2); }
.cz-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cz-spec { max-height: 260px; overflow-y: auto; border-top: 1px solid var(--nj-line); border-bottom: 1px solid var(--nj-line); padding: 6px 0; }
.cz-spec__g { padding: 10px 0; }
.cz-spec__g + .cz-spec__g { border-top: 1px solid var(--nj-line); }
.cz-spec h4 { font-family: var(--nj-font-text); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--nj-steel-deep); font-weight: 400; margin-bottom: 6px; }
.cz-spec dl { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 3px 16px; margin: 0; font-size: 13.5px; }
.cz-spec dt { color: var(--nj-muted); }
.cz-spec dd { margin: 0; color: var(--nj-ink); }
.cz-done-mark .cz-ic { width: 44px; height: 44px; color: var(--nj-steel-deep); }
.cz-visit { list-style: none; display: grid; gap: 4px; font-size: 15px; color: var(--nj-ink); }
.cz-visit a { border-bottom: 1px solid var(--nj-line); }
@media (max-width: 760px) {
  .cz-dlg__in { grid-template-columns: 1fr; min-height: 0; }
  .cz-dlg__fig { min-height: 0; aspect-ratio: 4 / 3; }
  .cz-field-row { grid-template-columns: 1fr; }
  .cz-dlg__acts .nj-btn, .cz-dlg__main { white-space: normal; }
}

.cz-toast { position: fixed; z-index: 90; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; padding: 12px 20px; background: var(--nj-ink); color: var(--nj-white); font-size: 14px; pointer-events: none; transition: opacity var(--nj-dur) var(--nj-ease), transform var(--nj-dur) var(--nj-ease); max-width: calc(100vw - 32px); }
.cz-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  .cz-panel__body.is-in > *, .cz-dlg[open], .cz-presets-wrap { animation: none; }
  .cz-veil span, .cz-round[aria-pressed="true"] .cz-ic { animation: none; }
}
.sz button.nj-link, .cz button.nj-link { border: 0; background-color: transparent; padding-inline: 0; }
.cz-seg--zoom button { display: grid; place-items: center; width: 34px; padding: 0; color: var(--nj-charcoal); }
.cz-seg--zoom button + button { border-left: 1px solid var(--nj-line); }
.cz-seg--zoom .cz-ic { width: 16px; height: 16px; }
.cz-seg--zoom button:active { background: var(--nj-mist); }

/* ---------- Photo mode ---------- */
.cz-tool--photo { display: inline-flex; align-items: center; gap: 10px; background: var(--nj-ink); color: var(--nj-white); border-color: var(--nj-ink); }
.cz-tool--photo .cz-ic { width: 18px; height: 18px; }
.cz-tool--photo:hover { background: var(--nj-charcoal); }
.cz-photo { width: min(1280px, calc(100vw - 32px)); max-height: calc(100svh - 32px); padding: 0; border: 0; background: var(--nj-white); color: var(--nj-charcoal); box-shadow: var(--nj-shadow-float); overflow: auto; }
.cz-photo::backdrop { background: rgba(46, 46, 54, .5); }
.cz-photo[open] { animation: cz-rise 520ms var(--nj-ease); }
.cz-photo__in { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.cz-photo__head { position: relative; display: flex; justify-content: space-between; align-items: end; gap: 16px; padding: 22px 28px 16px; }
.cz-photo__head .cz-dlg__x { position: static; }
.cz-photo__title { font-size: clamp(1.7rem, 1.3rem + 1.2vw, 2.4rem); margin-top: 6px; }
.cz-photo__frame { position: relative; aspect-ratio: 16 / 10; max-height: calc(100svh - 260px); width: 100%; background: var(--stage-bg, #F7F7F5); overflow: hidden; }
.cz-photo__frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.cz-photo__wait { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 18px; background: var(--stage-bg, #F7F7F5); transition: opacity 900ms var(--nj-ease); }
.cz-photo__wait span { width: 46px; height: 46px; border: 1px solid var(--nj-steel); transform: rotate(45deg); animation: cz-breathe 1.8s var(--nj-ease) infinite; }
.cz-photo__wait p { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--nj-muted); }
.cz-photo.is-running .cz-photo__wait { opacity: 0; pointer-events: none; }
.cz-photo__foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 28px; align-items: center; padding: 0 28px 24px; }
.cz-photo__prog { grid-column: 1 / -1; height: 1px; background: var(--nj-platinum); }
.cz-photo__prog i { display: block; height: 100%; width: 0; background: var(--nj-ink); transition: width 300ms linear; }
.cz-photo__status { font-size: var(--nj-size-small); color: var(--nj-text-2); max-width: 60ch; }
.cz-photo__acts { display: flex; gap: 8px; flex-wrap: wrap; }
.cz-photo__acts .nj-btn[disabled] { opacity: .45; pointer-events: none; }
@media (max-width: 900px) {
  .cz-tool--photo span { font-size: 0; }
  .cz-tool--photo span::after { content: "Photo mode"; font-size: 11px; }
}
@media (max-width: 760px) {
  .cz-photo__frame { aspect-ratio: 4 / 5; max-height: calc(100svh - 300px); }
  .cz-photo__foot { grid-template-columns: 1fr; padding: 0 16px 18px; }
  .cz-photo__head { padding: 16px; }
  .cz-photo__acts .nj-btn { flex: 1 1 auto; }
}
@media (max-width: 520px) { .cz-tool--photo span::after { content: "Photo"; } }
