/* «Надпись на торт» (/nadpis-na-tort) — раздел для покупателей: своя подача внутри сайта (мягкий розово-кремовый фон,
   крупные карточки), токены — из site.css. Подключается только на страницах раздела. */
.ndp { --nd-bg: #FFF7F3; --nd-card: #fff; --nd-r: 22px; padding-bottom: 24px; }
.ndp .wrap { max-width: 1200px; }
.nd-head { padding-bottom: 8px; }
.nd-eb { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 22px 0 12px; font-size: 13px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.nd-head h1 { font-size: clamp(30px, 4vw, 48px); max-width: 900px; }
.nd-lead-p { font-size: 18px; line-height: 1.55; color: var(--muted); margin-top: 14px; max-width: 820px; }
.nd-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- примерка ---- */
.nd { margin-top: 26px; background: linear-gradient(160deg, #FFF3EE 0%, #FDEAF0 55%, #FBF1E4 100%); border-radius: 28px; padding: 26px;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--acc) 12%, transparent), 0 30px 60px -44px rgba(120, 30, 60, .55); }
.nd-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.nd-stage { position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: var(--nd-r); overflow: hidden;
    background: radial-gradient(ellipse at 50% 35%, #fff 0%, #FFF8F4 60%, #F8E9E1 100%); box-shadow: inset 0 0 0 1px rgba(46, 37, 48, .06); touch-action: pan-y; }
.nd-svg, .nd-3d { position: absolute; inset: 0; }
.nd-svg svg { width: 100%; height: 100%; display: block; }
.nd-3d { opacity: 0; transition: opacity .35s; }
.nd-stage.is-3d .nd-3d { opacity: 1; }
.nd-stage.is-3d .nd-svg { visibility: hidden; }
.nd-note { position: absolute; left: 12px; right: 12px; bottom: 10px; font-size: 12.5px; font-weight: 700; color: var(--muted); text-align: center; }
.nd-sk .nd-k { fill: var(--krem); }
.nd-sk .nd-top { fill: #fff; opacity: .16; }
.nd-sk .nd-board { fill: #fff; stroke: #E6DCD1; stroke-width: 1.5; }
.nd-sk .nd-kraft { fill: #C9A178; }
.nd-sk .nd-kraft2 { fill: #B88E64; }
.nd-sk .nd-ink { fill: var(--cvet); }
.nd-sk .nd-bd { stroke: rgba(0, 0, 0, .12); stroke-width: .8; }
.nd-sk text { font-family: var(--ff-hand); font-weight: 700; paint-order: stroke; stroke: rgba(40, 20, 20, .14); stroke-width: 1.2px; }

.nd-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin-top: 16px; }
.nd-fs { border: 0; min-width: 0; }
.nd-fs legend { font-size: 13.5px; font-weight: 800; margin-bottom: 8px; }
.nd-seg { flex-wrap: wrap; }
.nd-seg span { height: 38px; padding: 0 12px; font-size: 14px; }
.nd-box { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 14px; font-weight: 700; cursor: pointer; }
.nd-box input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--btn); }
.nd-sw { display: flex; flex-wrap: wrap; gap: 8px; }
.nd-sw label { position: relative; cursor: pointer; }
.nd-sw input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.nd-sw span { display: block; width: 36px; height: 36px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(46, 37, 48, .18); transition: box-shadow .15s, transform .15s; }
.nd-sw input:checked + span { box-shadow: inset 0 0 0 1px rgba(46, 37, 48, .2), 0 0 0 3px #fff, 0 0 0 5px var(--btn); }
.nd-sw input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--btn) 55%, transparent); outline-offset: 4px; }
.nd-sw label:hover span { transform: scale(1.06); }

.nd-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.nd-text input { height: 56px !important; font-size: 19px !important; }
.nd-fit { font-size: 14.5px; font-weight: 600; color: var(--muted); }
.nd-fit b { color: #2F7A60; }
.nd-fit[data-level=tight] b { color: var(--secink); }
.nd-fit[data-level=long] b, .nd-fit[data-level=empty] b { color: var(--btn); }
.nd-warn { font-size: 13.5px; font-weight: 700; color: var(--secink); background: var(--secs); border-radius: 12px; padding: 8px 12px; }
.nd-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.nd-actions .btn { height: 50px; font-size: 15px; padding: 0 18px; }
.nd-actions .btn.pri { flex: 1 1 100%; }
.nd-st { flex: 1 1 100%; font-size: 13.5px; font-weight: 700; color: #2F7A60; min-height: 1px; }
.nd-st:empty { display: none; }
html.js .nd-nojs { display: none; }
html:not(.js) .nd-js { display: none !important; }
.nd-when input { width: 100%; height: 46px; border-radius: 12px; border: 1.5px solid color-mix(in srgb, var(--ink) 18%, transparent); background: #fff; padding: 0 12px; font: inherit; font-weight: 600; color: var(--ink); }

.nd-ideas { margin-top: 6px; background: var(--nd-card); border-radius: var(--nd-r); padding: 18px; box-shadow: 0 0 0 1px rgba(46, 37, 48, .07); }
.nd-h { font-family: var(--ff-head); font-size: 22px; font-weight: 600; margin-bottom: 12px; }
.nd-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nd-filters select { height: 46px !important; }
.nd-tones { margin-top: 10px; }
.nd-pick { margin-top: 10px; height: 46px; }
.nd-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; min-height: 120px; }
.nd-list button, .nd-group button { display: inline-flex; align-items: baseline; gap: 8px; min-height: 44px; padding: 9px 14px; border-radius: 14px; border: 1.5px solid color-mix(in srgb, var(--ink) 12%, transparent);
    background: #fff; font: inherit; font-weight: 700; font-size: 15px; color: var(--ink); cursor: pointer; text-align: left; transition: border-color .15s, background .15s; }
.nd-list button:hover, .nd-group button:hover { border-color: var(--btn); background: var(--accs); }
.nd-list .nd-it { font-family: var(--ff-hand); font-size: 21px; line-height: 1.1; }
.nd-n, .nd-group small { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.nd-hint { font-size: 12.5px; color: var(--muted); margin-top: 10px; }

/* ---- заявка ---- */
html.js .nd-lead:not(.is-open) { display: none; }
.nd-lead { margin-top: 22px; background: #fff; border-radius: var(--nd-r); padding: 24px; box-shadow: 0 0 0 1px rgba(46, 37, 48, .08); scroll-margin-top: 16px; }
.nd-lead-in { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 26px; }
.nd-lead h2 { font-size: clamp(24px, 2.6vw, 32px); }
.nd-lead-t p { color: var(--muted); line-height: 1.55; margin-top: 12px; font-size: 15.5px; }
.nd-lead-sum { background: var(--nd-bg); border-radius: 14px; padding: 12px 14px; color: var(--ink) !important; }
.nd-lead-sum b { font-family: var(--ff-hand); font-size: 22px; }
.nd-lead-form { display: flex; flex-direction: column; gap: 14px; position: relative; }
.nd-lead-form input[type=date], .nd-lead-form textarea { width: 100%; border-radius: 12px; border: 1.5px solid color-mix(in srgb, var(--ink) 18%, transparent); background: #fff; padding: 0 14px; font: inherit; font-size: 15.5px; font-weight: 600; color: var(--ink); }
.nd-lead-form input[type=date] { height: 50px; }
.nd-lead-form textarea { padding: 12px 14px; resize: vertical; min-height: 84px; }
.nd-lead-form input:focus, .nd-lead-form textarea:focus { outline: none; border-color: var(--btn); box-shadow: 0 0 0 4px var(--accs); }
.nd-lead-form .fld.bad input, .nd-lead-form .fld.bad textarea { border-color: var(--btn); }
.nd-lead-form .btn.full { margin-top: 4px; }

/* ---- текст страниц ---- */
.nd-sec { margin-top: 56px; }
.nd-sec h2 { font-size: clamp(26px, 3vw, 36px); margin-bottom: 14px; }
.nd-sub { color: var(--muted); font-size: 16px; line-height: 1.55; margin-top: 10px; max-width: 760px; }
.nd-sub a, .nd-steps a { color: var(--btn); text-decoration: underline; text-underline-offset: 3px; }
.nd-short { background: var(--nd-card); border-radius: var(--nd-r); padding: 26px; box-shadow: 0 0 0 1px rgba(46, 37, 48, .07); }
.nd-short p { font-size: 17px; line-height: 1.6; max-width: 860px; }
.nd-facts { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.nd-facts li { background: var(--nd-bg); border-radius: 16px; padding: 14px 16px; font-size: 15px; color: var(--muted); font-weight: 600; }
.nd-facts b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }
.nd-h3 { font-size: 15px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; }
.nd-cards { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.nd-cards a { display: flex; flex-direction: column; gap: 4px; height: 100%; background: #fff; border-radius: 18px; padding: 16px 18px; box-shadow: 0 0 0 1px rgba(46, 37, 48, .08); transition: box-shadow .15s, transform .15s; }
.nd-cards a:hover { box-shadow: 0 0 0 2px var(--btn); transform: translateY(-1px); }
.nd-card-t { font-weight: 800; font-size: 17px; }
.nd-card-e { font-family: var(--ff-hand); font-size: 21px; color: var(--acc); line-height: 1.15; }
.nd-card-n { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-top: auto; }
.nd-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.nd-group { background: #fff; border-radius: var(--nd-r); padding: 20px; box-shadow: 0 0 0 1px rgba(46, 37, 48, .07); }
.nd-group h3 { font-size: 18px; font-weight: 800; margin-bottom: 12px; }
.nd-group ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.nd-group button { width: 100%; justify-content: space-between; border-color: transparent; background: var(--nd-bg); }
.nd-group button span { font-family: var(--ff-hand); font-size: 21px; line-height: 1.15; }
.nd-group h3::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: 2px; background: var(--sec); }
.nd-g-tender h3::before { background: #E87F9C; }
.nd-g-short h3::before { background: #2F7A60; }
.nd-tip { background: var(--secs); border-radius: var(--nd-r); padding: 24px 26px; }
.nd-tip h2 { font-size: clamp(22px, 2.4vw, 28px); margin-bottom: 8px; }
.nd-tip p { font-size: 16.5px; line-height: 1.6; max-width: 860px; }
.nd-steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.nd-steps li { counter-increment: s; position: relative; background: #fff; border-radius: 18px; padding: 16px 18px 16px 58px; font-size: 15.5px; line-height: 1.55; color: var(--muted); box-shadow: 0 0 0 1px rgba(46, 37, 48, .07); }
.nd-steps li::before { content: counter(s); position: absolute; left: 16px; top: 14px; width: 30px; height: 30px; border-radius: 50%; background: var(--accs); color: var(--acch); font-weight: 800; display: grid; place-items: center; }
.nd-steps b { color: var(--ink); }
.nd-links { margin-top: 14px; }
.nd-links-h { font-size: 13px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.nd-links ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.nd-links a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 99px; background: #fff; font-weight: 700; font-size: 14.5px; box-shadow: 0 0 0 1px rgba(46, 37, 48, .1); }
.nd-links a:hover { color: var(--btn); box-shadow: 0 0 0 1.5px var(--btn); }
.nd-bakers { margin-top: 56px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; border: 1.5px dashed color-mix(in srgb, var(--ink) 25%, transparent); border-radius: var(--nd-r); padding: 18px 22px; }
.nd-bakers p { font-size: 15px; line-height: 1.5; color: var(--muted); max-width: 640px; }
.nd-bakers p b { color: var(--ink); }
.nd-bakers-a { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--btn); }

@media (max-width: 1100px) { .nd-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 959px) {
    .nd-grid, .nd-lead-in { grid-template-columns: minmax(0, 1fr); }
    .nd-groups { grid-template-columns: minmax(0, 1fr); }
    .nd-stage { aspect-ratio: 1 / 1; max-height: 520px; }
}
@media (max-width: 760px) { .nd-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .nd-steps, .nd-facts { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) {
    .nd { padding: 14px; border-radius: 22px; margin-left: -4px; margin-right: -4px; }
    .nd-opts { grid-template-columns: minmax(0, 1fr); }
    .nd-filters { grid-template-columns: minmax(0, 1fr); }
    .nd-lead { padding: 18px 16px; }
    .nd-lead .grid2 { grid-template-columns: minmax(0, 1fr); }
    .nd-actions .btn.sec { flex: 1 1 100%; }
    .nd-sec { margin-top: 40px; }
    .nd-ideas { padding: 14px; }
    .nd-sw span { width: 34px; height: 34px; }
}
@media (max-width: 400px) { .nd-cards { grid-template-columns: minmax(0, 1fr); } }
@media print { .nd-actions, .nd-ideas, .nd-lead, .nd-opts { display: none !important; } }
