/* 3D-студия памятников ГранитТорг */
:root {
  --bg: #0e0f11;
  --panel: rgba(20, 21, 24, 0.92);
  --panel-solid: #16171a;
  --card: rgba(255, 255, 255, 0.04);
  --card-hi: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.09);
  --line-hi: rgba(255, 255, 255, 0.18);
  --text: #eeeae3;
  --muted: #9d978e;
  --gold: #d9b56c;
  --gold-2: #f0d595;
  --gold-ink: #1c1608;
  --laser: #ff7a2f;
  --danger: #ef6a5b;
  --radius: 16px;
  --panel-w: 420px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body { font-family: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
svg { stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.studio { display: grid; grid-template-columns: 1fr var(--panel-w); height: 100vh; height: 100dvh; }

/* ---------- сцена ---------- */
.scene { position: relative; overflow: hidden; min-height: 0; background: #1a1c20; }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#gl.dragging { cursor: grabbing; }
#gl.over-item { cursor: move; }
.sel { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.sel .box { stroke: var(--gold-2); stroke-width: 1.4; stroke-dasharray: 5 4; fill: rgba(240, 213, 149, 0.05); }
.sel .h { fill: #fff; stroke: var(--gold); stroke-width: 2; pointer-events: all; cursor: nwse-resize; }
.sel .r { fill: var(--gold); stroke: #fff; stroke-width: 2; pointer-events: all; cursor: grab; }
.sel .hover { stroke: rgba(255,255,255,.55); stroke-width: 1; fill: none; stroke-dasharray: 3 4; }

.topbar { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 16px; padding: 14px 18px; pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 11, 13, 0.55), transparent); }
.topbar > * { pointer-events: auto; }
.brand img { height: 30px; width: auto; filter: invert(1) brightness(1.1); display: block; }
.title { display: flex; flex-direction: column; line-height: 1.15; }
.eyebrow { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.title strong { font-family: Forum, serif; font-weight: 400; font-size: 21px; letter-spacing: .01em; }
.top-actions { margin-left: auto; display: flex; gap: 8px; }
.icon-btn { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(20,21,24,.6); border: 1px solid var(--line); backdrop-filter: blur(10px); transition: .2s; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover:not(:disabled) { border-color: var(--line-hi); background: rgba(40,41,44,.7); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.pill-btn { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 12px; font-weight: 600;
  background: rgba(20,21,24,.6); border: 1px solid var(--line); backdrop-filter: blur(10px); transition: .2s; }
.pill-btn svg { width: 16px; height: 16px; }
.pill-btn:hover { border-color: var(--gold); color: var(--gold-2); }

.summary-chip { position: absolute; top: 70px; left: 18px; padding: 8px 12px; border-radius: 12px; background: rgba(14,15,17,.55); border: 1px solid var(--line);
  backdrop-filter: blur(10px); font-size: 12.5px; color: var(--muted); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; max-width: calc(100% - 36px); }
.summary-chip b { color: var(--text); font-weight: 600; }
.summary-chip .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--line-hi); }

.dock { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 8px; padding: 8px; border-radius: 18px;
  background: rgba(14,15,17,.72); border: 1px solid var(--line); backdrop-filter: blur(14px); box-shadow: 0 20px 50px rgba(0,0,0,.35); max-width: calc(100% - 24px); overflow-x: auto; scrollbar-width: none; }
.dock::-webkit-scrollbar { display: none; }
.dock-group { display: flex; align-items: center; gap: 2px; padding: 2px; border-radius: 12px; background: rgba(255,255,255,.03); flex-shrink: 0; }
.dock-group button { height: 32px; padding: 0 9px; border-radius: 10px; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; transition: .18s; }
.dock-group button:hover { color: var(--text); background: rgba(255,255,255,.05); }
.dock-group button.is-active { color: var(--gold-ink); background: linear-gradient(180deg, var(--gold-2), var(--gold)); }
.dock-group.sun { padding: 0 10px; gap: 8px; color: var(--gold-2); }
.dock-group.sun .ic { width: 16px; height: 16px; }
.dock-group.sun span { font-size: 12px; color: var(--muted); min-width: 54px; }
input[type=range] { -webkit-appearance: none; appearance: none; height: 4px; border-radius: 4px; outline: none;
  background: linear-gradient(90deg, var(--gold) var(--p, 50%), rgba(255,255,255,.14) var(--p, 50%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--gold); cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.4); }
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--gold); cursor: pointer; }
#time { width: 104px; background: linear-gradient(90deg, #f6a46a, #ffe2a8 30%, #d8eaff 50%, #ff9a5a 78%, #1d2a4a 92%); }

.dims { position: absolute; pointer-events: none; font-size: 12px; font-weight: 700; color: #fff; }
.dim-label { position: absolute; transform: translate(-50%, -50%); padding: 3px 7px; border-radius: 8px; background: rgba(14,15,17,.75); border: 1px solid var(--gold); white-space: nowrap; }

.hint-bubble { position: absolute; left: 50%; bottom: 82px; transform: translateX(-50%); padding: 9px 14px; border-radius: 12px; font-size: 12.5px; color: var(--text);
  background: rgba(14,15,17,.7); border: 1px solid var(--line); backdrop-filter: blur(10px); transition: opacity .6s; pointer-events: none; white-space: nowrap; }
.hint-bubble.gone { opacity: 0; }

.inspector { position: absolute; right: 16px; top: 70px; width: 290px; padding: 12px; border-radius: 16px; background: rgba(14,15,17,.86);
  border: 1px solid var(--line); backdrop-filter: blur(14px); box-shadow: 0 20px 50px rgba(0,0,0,.4); animation: pop .25s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.insp-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; margin-bottom: 8px; }
.x { width: 28px; height: 28px; border-radius: 9px; font-size: 20px; line-height: 1; color: var(--muted); }
.x:hover { background: var(--card-hi); color: var(--text); }
.insp-row { display: flex; gap: 10px; margin-top: 8px; }
.insp-row.seg { flex-wrap: wrap; gap: 4px; }
.insp-row.seg button { padding: 6px 9px; border-radius: 9px; font-size: 12px; font-weight: 600; background: var(--card); border: 1px solid var(--line); }
.insp-row.seg button.is-active { border-color: var(--gold); color: var(--gold-2); background: rgba(217,181,108,.1); }
.mini { flex: 1; display: flex; flex-direction: column; gap: 8px; font-size: 11.5px; color: var(--muted); }
.insp-row.btns button { flex: 1; padding: 7px 4px; border-radius: 9px; font-size: 12px; font-weight: 600; background: var(--card); border: 1px solid var(--line); }
.insp-row.btns button:hover { border-color: var(--line-hi); }
.insp-row.btns .danger { color: var(--danger); }

.loading { position: absolute; inset: 0; display: grid; place-content: center; gap: 14px; justify-items: center; background: radial-gradient(circle at 50% 45%, #22252b, #0e0f11 70%); transition: opacity .8s; z-index: 5; }
.loading span { font-family: Forum, serif; font-size: 22px; letter-spacing: .04em; color: var(--muted); }
.loading .laser { width: 160px; height: 2px; background: linear-gradient(90deg, transparent, var(--laser), #ffd2a8, var(--laser), transparent); box-shadow: 0 0 18px var(--laser); animation: scan 1.4s ease-in-out infinite alternate; }
@keyframes scan { from { transform: translateY(-30px) scaleX(.6); } to { transform: translateY(30px) scaleX(1); } }
.loading.done { opacity: 0; pointer-events: none; }
.fatal { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 30px; background: #0e0f11; z-index: 6; line-height: 1.6; }
.fatal code { background: #222; padding: 2px 8px; border-radius: 6px; color: var(--gold-2); }

/* ---------- панель ---------- */
.panel { display: flex; flex-direction: column; min-height: 0; background: var(--panel-solid); border-left: 1px solid var(--line); }
.steps { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; padding: 10px 10px 0; }
.step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 2px 10px; border-radius: 12px; color: var(--muted); font-size: 11px; font-weight: 600; transition: .2s; }
.step i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; border: 1px solid var(--line-hi); transition: .2s; }
.step:hover { color: var(--text); background: var(--card); }
.step.is-done i { border-color: var(--gold); color: var(--gold); }
.step.is-active { color: var(--text); }
.step.is-active i { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--gold-ink); border-color: transparent; box-shadow: 0 0 0 4px rgba(217,181,108,.15); }
.panel-body { flex: 1; overflow-y: auto; padding: 6px 20px 24px; scrollbar-width: thin; scrollbar-color: #333 transparent; }
.pane { display: none; animation: fade .35s var(--ease); }
.pane.is-active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateX(8px); } }
.pane h2 { font-family: Forum, serif; font-weight: 400; font-size: 30px; margin: 14px 0 4px; letter-spacing: .01em; }
.pane h3 { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; font-weight: 700; }
.lead { color: var(--muted); margin: 0 0 14px; line-height: 1.5; }
.lead.small { font-size: 12.5px; margin-top: -4px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 8px 12px; border-radius: 11px; background: var(--card); border: 1px solid var(--line); font-weight: 600; font-size: 12.5px; transition: .18s; display: inline-flex; gap: 6px; align-items: center; }
.chip img { width: 18px; height: 18px; filter: invert(1); opacity: .8; }
.chip:hover { border-color: var(--line-hi); }
.chip.is-active { border-color: var(--gold); color: var(--gold-2); background: rgba(217,181,108,.1); }
.chip small { color: var(--muted); font-weight: 500; }

.form-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.form-card { position: relative; aspect-ratio: 3 / 4; border-radius: 12px; background: radial-gradient(circle at 50% 30%, #2a2c31, #1b1c20); border: 1px solid var(--line); display: grid; place-items: center; padding: 10px 8px 18px; transition: .18s; }
.form-card svg { width: 100%; height: 100%; stroke: none; }
.form-card svg path { fill: url(#gstone); }
.form-card span { position: absolute; bottom: 4px; left: 0; right: 0; text-align: center; font-size: 10px; color: var(--muted); letter-spacing: .04em; }
.form-card:hover { border-color: var(--line-hi); transform: translateY(-2px); }
.form-card.is-active { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217,181,108,.15); }

.granites { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.granite { text-align: left; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--card); transition: .18s; }
.granite canvas, .granite .sw { display: block; width: 100%; aspect-ratio: 16 / 10; background-size: cover; background-position: center; }
.granite b { display: block; padding: 7px 8px 0; font-size: 12px; }
.granite small { display: block; padding: 2px 8px 8px; font-size: 10.5px; color: var(--muted); line-height: 1.3; min-height: 2.6em; }
.granite:hover { border-color: var(--line-hi); transform: translateY(-2px); }
.granite.is-active { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217,181,108,.15); }
.granites.small { grid-template-columns: repeat(4, 1fr); }
.granites.small small { display: none; }
.granites.small b { font-size: 10.5px; padding-bottom: 7px; }

.slider-field { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: center; margin-top: 14px; color: var(--muted); font-size: 12.5px; }
.slider-field input { grid-column: 1 / -1; width: 100%; }
.slider-field output { justify-self: end; color: var(--text); font-weight: 700; }

.field-grid { display: grid; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.field input, .field textarea { width: 100%; min-width: 0; padding: 11px 12px; border-radius: 11px; background: #0f1012; border: 1px solid var(--line); outline: none; font-size: 15px; color: var(--text); resize: vertical; transition: .18s; font-weight: 500; }
.field input:focus, .field textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217,181,108,.12); }
.field-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; }
.epitaphs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.epitaphs button { padding: 5px 9px; border-radius: 9px; font-size: 12px; color: var(--muted); border: 1px dashed var(--line-hi); }
.epitaphs button:hover { color: var(--gold-2); border-color: var(--gold); }
.fonts { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px; }
.font-card { padding: 9px 10px; border-radius: 11px; background: var(--card); border: 1px solid var(--line); text-align: left; transition: .18s; }
.font-card b { display: block; font-size: 19px; font-weight: 400; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.font-card small { color: var(--muted); font-size: 10.5px; }
.font-card:hover { border-color: var(--line-hi); }
.font-card.is-active { border-color: var(--gold); background: rgba(217,181,108,.08); }
.row-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.ghost { padding: 10px 14px; border-radius: 11px; border: 1px solid var(--line-hi); font-weight: 600; font-size: 13px; transition: .18s; }
.ghost:hover { border-color: var(--gold); color: var(--gold-2); }
.ghost.danger { color: var(--danger); border-color: rgba(239,106,91,.35); }
.primary { padding: 11px 18px; border-radius: 12px; font-weight: 700; font-size: 13.5px; color: var(--gold-ink); background: linear-gradient(180deg, var(--gold-2), var(--gold)); box-shadow: 0 8px 24px rgba(217,181,108,.25); transition: .18s; }
.primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.primary.wide { width: 100%; margin-top: 6px; }

.drop { display: grid; justify-items: center; gap: 6px; padding: 28px 16px; border-radius: 16px; border: 1.5px dashed var(--line-hi); text-align: center; cursor: pointer; transition: .2s; background: var(--card); }
.drop img { width: 44px; height: 44px; filter: invert(1); opacity: .7; }
.drop span { color: var(--muted); font-size: 12.5px; }
.drop:hover, .drop.over { border-color: var(--gold); background: rgba(217,181,108,.06); }
.drop.has-photo { grid-template-columns: 64px 1fr; justify-items: start; text-align: left; padding: 12px; }
.drop.has-photo img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; filter: none; opacity: 1; grid-row: span 2; }

.decor-cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.decor-cat { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 2px 7px; border-radius: 11px; background: var(--card); border: 1px solid var(--line); font-size: 10.5px; font-weight: 600; color: var(--muted); transition: .18s; }
.decor-cat img { width: 26px; height: 26px; filter: invert(1); opacity: .75; }
.decor-cat:hover { color: var(--text); border-color: var(--line-hi); }
.decor-cat.is-active { color: var(--gold-2); border-color: var(--gold); background: rgba(217,181,108,.08); }
.decor-cat.is-active img { filter: invert(.8) sepia(1) saturate(2.4) hue-rotate(5deg); opacity: 1; }
.decor-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 14px; }
.decor-item { aspect-ratio: 1; border-radius: 11px; background: radial-gradient(circle at 50% 40%, #2b2d32, #18191c); border: 1px solid var(--line); padding: 6px; display: grid; place-items: center; transition: .18s; cursor: grab; }
.decor-item img { max-width: 100%; max-height: 100%; object-fit: contain; pointer-events: none; }
.decor-item:hover { border-color: var(--gold); transform: translateY(-2px); }

.toggles-list { display: grid; gap: 8px; }
.tgl { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 13px; background: var(--card); border: 1px solid var(--line); text-align: left; transition: .18s; }
.tgl b { display: block; font-size: 13.5px; }
.tgl small { color: var(--muted); font-size: 11.5px; }
.tgl .sw { margin-left: auto; width: 40px; height: 23px; border-radius: 20px; background: rgba(255,255,255,.12); position: relative; flex-shrink: 0; transition: .2s; }
.tgl .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: .2s var(--ease); }
.tgl.on { border-color: rgba(217,181,108,.4); }
.tgl.on .sw { background: var(--gold); }
.tgl.on .sw::after { left: 20px; }

.spec { display: grid; gap: 0; border-radius: 14px; border: 1px solid var(--line); overflow: hidden; }
.spec div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; font-size: 12.5px; border-top: 1px solid var(--line); }
.spec div:first-child { border-top: 0; }
.spec span { color: var(--muted); }
.spec b { text-align: right; font-weight: 600; }
.price { margin-top: 14px; padding: 14px; border-radius: 14px; background: linear-gradient(135deg, rgba(217,181,108,.14), rgba(217,181,108,.03)); border: 1px solid rgba(217,181,108,.3); }
.price .total { display: flex; justify-content: space-between; align-items: baseline; }
.price .total strong { font-family: Forum, serif; font-weight: 400; font-size: 30px; color: var(--gold-2); }
.price .total span { color: var(--muted); font-size: 12px; }
.price ul { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.price li { display: flex; justify-content: space-between; }
.variants { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.variant { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #111; aspect-ratio: 3 / 4; }
.variant img { width: 100%; height: 100%; object-fit: cover; display: block; }
.variant span { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 5px; font-size: 10.5px; background: linear-gradient(transparent, rgba(0,0,0,.8)); }
.variant .x { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,.5); width: 22px; height: 22px; font-size: 15px; }
.variant:hover { border-color: var(--gold); }
.variant.empty { display: grid; place-items: center; color: var(--muted); font-size: 11px; text-align: center; padding: 8px; border-style: dashed; aspect-ratio: 3 / 4; }
.final-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.final-actions .primary { grid-column: 1 / -1; padding: 14px; font-size: 15px; }
.contacts { color: var(--muted); font-size: 12px; line-height: 1.6; margin-top: 16px; }
.contacts a { color: var(--gold-2); text-decoration: none; }

.panel-foot { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); background: rgba(10,11,13,.4); }
.foot-price { line-height: 1.2; }
.foot-price small { display: block; color: var(--muted); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; }
.foot-price strong { font-family: Forum, serif; font-weight: 400; font-size: 23px; color: var(--gold-2); }
.foot-nav { margin-left: auto; display: flex; gap: 8px; }

.modal { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px; background: rgba(5,6,8,.6); backdrop-filter: blur(6px); }
.modal[hidden] { display: none; }
.modal-card { position: relative; width: min(440px, 100%); padding: 24px; border-radius: 20px; background: var(--panel-solid); border: 1px solid var(--line); display: grid; gap: 10px; animation: pop .3s var(--ease); }
.modal-card h2 { font-family: Forum, serif; font-weight: 400; font-size: 28px; margin: 0; }
.modal-card .x { position: absolute; top: 12px; right: 12px; }
.fine { font-size: 11.5px; color: var(--muted); line-height: 1.5; margin: 4px 0 0; }

.toast { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 40; padding: 11px 16px; border-radius: 12px; background: #f3efe6; color: #17140e; font-weight: 600; box-shadow: 0 12px 40px rgba(0,0,0,.4); animation: pop .3s var(--ease); max-width: calc(100% - 32px); }

/* ---------- адаптив ---------- */
@media (max-width: 1280px) {
  .dock-group.seasons button { padding: 0 7px; }
  .dock-group.toggles #tg-spin { display: none; }
}
@media (max-width: 1100px) {
  :root { --panel-w: 370px; }
  .title { display: none; }
  .form-grid { grid-template-columns: repeat(3, 1fr); }
  .dock-group.seasons { display: none; }
}
@media (max-width: 820px) {
  body { overflow: auto; }
  .studio { grid-template-columns: 1fr; grid-template-rows: 56vh auto; height: auto; min-height: 100dvh; }
  .scene { position: sticky; top: 0; z-index: 2; height: 56vh; }
  .panel { border-left: 0; border-top: 1px solid var(--line); min-height: 44vh; }
  .panel-body { overflow: visible; padding: 4px 16px 90px; }
  .panel-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: rgba(14,15,17,.96); backdrop-filter: blur(10px); padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .steps { position: sticky; top: 56vh; z-index: 3; background: var(--panel-solid); padding: 8px 6px 4px; overflow-x: auto; }
  .title strong { font-size: 17px; }
  .title { display: none; }
  .pill-btn { padding: 0 10px; font-size: 12px; }
  .summary-chip { top: 60px; left: 10px; font-size: 11px; padding: 6px 9px; }
  .dock { bottom: 8px; padding: 5px; gap: 5px; }
  .dock-group button { padding: 0 8px; height: 30px; font-size: 11.5px; }
  .dock-group.toggles #btn-shot, .dock-group.toggles #tg-spin { display: none; }
  #time { width: 80px; }
  .dock-group.sun span { display: none; }
  .hint-bubble { bottom: 58px; font-size: 11.5px; white-space: normal; width: max-content; max-width: 90%; text-align: center; }
  .inspector { left: 10px; right: 10px; width: auto; top: auto; bottom: 56px; }
  .form-grid { grid-template-columns: repeat(4, 1fr); }
  .decor-cats { grid-template-columns: repeat(5, 1fr); }
  .step { font-size: 10px; }
}
@media (max-width: 480px) {
  .form-grid, .decor-grid { grid-template-columns: repeat(3, 1fr); }
  .granites { grid-template-columns: repeat(2, 1fr); }
  .step span { display: none; }
  .brand img { height: 24px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- примерка на месте ---------- */
.ar-pill { border-color: rgba(217,181,108,.55); color: var(--gold-2); }
.ar-pill:hover { background: rgba(217,181,108,.12); }
.ar-card { display: block; width: 100%; text-align: left; margin-top: 16px; padding: 14px 16px 14px 58px; border-radius: 14px; position: relative;
  background: linear-gradient(135deg, rgba(255,122,47,.16), rgba(217,181,108,.06)); border: 1px solid rgba(255,122,47,.35); }
.ar-card::before { content: ""; position: absolute; left: 16px; top: 50%; width: 28px; height: 28px; margin-top: -14px; border: 2px solid var(--laser); border-radius: 7px; box-shadow: inset 0 0 0 5px rgba(255,122,47,.15); }
.ar-card b { display: block; font-size: 14px; color: #ffd2a8; }
.ar-card span { font-size: 12px; color: var(--muted); line-height: 1.45; }
.ar-bg { position: absolute; inset: 0; background: #111; }
.ar-bg video, .ar-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scene.ar-on .topbar, .scene.ar-on .summary-chip, .scene.ar-on .dock, .scene.ar-on .hint-bubble, .scene.ar-on .inspector { display: none; }
.scene.ar-on #gl { cursor: move; }
.ar-ui { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.ar-ui > * { pointer-events: auto; }
.ar-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: linear-gradient(180deg, rgba(0,0,0,.55), transparent); pointer-events: none; }
.ar-top > * { pointer-events: auto; }
.ar-title strong { display: block; font-family: Forum, serif; font-weight: 400; font-size: 20px; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.ar-done { padding: 9px 16px; border-radius: 12px; font-weight: 700; color: var(--gold-ink); background: linear-gradient(180deg, var(--gold-2), var(--gold)); }
.ar-src { position: absolute; top: 70px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(14,15,17,.7); backdrop-filter: blur(12px); border: 1px solid var(--line); }
.ar-src button { padding: 8px 12px; border-radius: 10px; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.ar-src button.is-active { color: var(--gold-ink); background: linear-gradient(180deg, var(--gold-2), var(--gold)); }
.ar-src .ar-xr { color: #ffd2a8; }
.ar-empty { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; gap: 8px; justify-items: center; text-align: center; padding: 24px; border-radius: 18px; background: rgba(14,15,17,.82); border: 1px dashed var(--line-hi); max-width: 320px; }
.ar-empty b { font-family: Forum, serif; font-weight: 400; font-size: 22px; }
.ar-empty span { color: var(--muted); font-size: 13px; line-height: 1.45; }
.ar-hint { position: absolute; left: 50%; bottom: 104px; transform: translateX(-50%); padding: 8px 13px; border-radius: 12px; font-size: 12.5px; background: rgba(14,15,17,.7); backdrop-filter: blur(10px); white-space: nowrap; transition: opacity .6s; pointer-events: none; }
.ar-hint.gone { opacity: 0; }
.ar-bottom { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 16px 16px max(18px, env(safe-area-inset-bottom)); background: linear-gradient(0deg, rgba(0,0,0,.55), transparent); }
.ar-round { width: 44px; height: 44px; border-radius: 50%; font-size: 20px; background: rgba(14,15,17,.7); border: 1px solid var(--line-hi); backdrop-filter: blur(10px); }
.ar-shot { width: 66px; height: 66px; border-radius: 50%; border: 4px solid #fff; display: grid; place-items: center; flex-shrink: 0; }
.ar-shot i { width: 50px; height: 50px; border-radius: 50%; background: #fff; transition: transform .15s; }
.ar-shot:active i { transform: scale(.88); }
.ar-tilt { display: grid; gap: 6px; font-size: 11px; color: #ddd; text-shadow: 0 1px 4px rgba(0,0,0,.7); width: 130px; }
.ar-xr-ui { position: fixed; inset: 0; pointer-events: none; z-index: 50; font-family: Manrope, sans-serif; color: #fff; }
.ar-xr-msg { position: absolute; top: 24px; left: 16px; right: 16px; text-align: center; padding: 12px; border-radius: 14px; background: rgba(0,0,0,.55); font-size: 14px; }
.ar-xr-btns { position: absolute; bottom: 32px; left: 0; right: 0; display: flex; justify-content: center; gap: 12px; }
.ar-xr-btns button { pointer-events: auto; padding: 14px 18px; border-radius: 14px; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 16px; font-weight: 700; }
@media (max-width: 820px) {
  .ar-pill span { display: none; }
  .ar-pill { padding: 0 10px; }
  .scene.ar-on { height: 100dvh; position: fixed; inset: 0; z-index: 20; }
  .ar-tilt { width: 90px; }
  .ar-hint { white-space: normal; width: max-content; max-width: 90%; text-align: center; bottom: 110px; }
  .ar-bottom { gap: 8px; }
}

/* карточки моделей из каталога сайта */
.form-card.has-photo { padding: 0; overflow: hidden; background: #f4f3f1; aspect-ratio: 4 / 5; display: block; }
.form-card.has-photo .fc-photo { width: 100%; height: 72%; margin-top: 4%; object-fit: cover; object-position: 50% 30%; display: block; mix-blend-mode: multiply; }
.form-card.has-photo .fc-shape { display: none; }
.form-card .fc-shape { width: 100%; height: 100%; display: block; }
.form-card .fc-id { position: absolute; left: 0; right: 0; bottom: 19px; text-align: center; font-size: 11px; font-weight: 700; color: #1b1b1d; }
.form-card .fc-price { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; font-size: 10.5px; color: #8a6a2a; font-weight: 600; }
.form-card:not(.has-photo) .fc-id { color: var(--muted); bottom: 4px; }
.form-card.has-photo.is-active { box-shadow: 0 0 0 3px var(--gold); }
.form-grid { grid-template-columns: repeat(3, 1fr); }
.spec a { color: var(--gold-2); text-decoration: none; }
.form-card.has-photo { display: flex; flex-direction: column; }
.form-card.has-photo .fc-photo { flex: 1; min-height: 0; height: auto; margin: 6px 6px 0; width: calc(100% - 12px); object-fit: contain; }
.form-card.has-photo .fc-id, .form-card.has-photo .fc-price { position: static; padding: 0 4px; line-height: 1.25; }
.form-card.has-photo .fc-price { padding-bottom: 6px; }

/* --- бронзовый декор Caggiati --- */
.decor-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.decor-item.cg-item{aspect-ratio:auto;min-width:0;display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px 6px;background:radial-gradient(circle at 50% 35%,#2b2620,#14130f);border:1px solid rgba(214,170,90,.18);border-radius:12px;min-height:140px}
.decor-item.cg-item img{width:100%;height:72px;object-fit:contain;filter:drop-shadow(0 4px 6px rgba(0,0,0,.5))}
.decor-item.cg-item:hover{border-color:rgba(214,170,90,.7);transform:translateY(-2px)}
.cg-name{font-size:10.5px;line-height:1.15;color:#e8dcc4;text-align:center;max-height:24px;overflow:hidden}
.cg-price{font-size:10.5px;color:#d6aa5a}
.cg-note{grid-column:1/-1;font-size:11px;color:#8d877a;margin:6px 0 0}.cg-note a{color:#d6aa5a}
.decor-cat small{opacity:.55;margin-left:4px}
.cg-insp{font-size:12px;color:#cfc6b2;margin-bottom:6px;width:100%}.cg-insp a{color:#d6aa5a}
.cg-pick-title{margin:14px 0 6px;font-size:12px;color:#d6aa5a;letter-spacing:.04em;text-transform:uppercase}
.cg-pick{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.cg-pick-item{display:flex;flex-direction:column;align-items:center;gap:2px;padding:6px 4px;background:#14130f;border:1px solid rgba(255,255,255,.1);border-radius:10px;color:#e8dcc4;font-size:10px;cursor:pointer}
.cg-pick-item img{width:100%;height:60px;object-fit:contain}
.cg-pick-item.is-active{border-color:#d6aa5a;box-shadow:0 0 0 1px #d6aa5a inset}
.cg-pick-item small{color:#d6aa5a}
.cg-where{font-size:9px;color:#d6aa5a;letter-spacing:.04em;text-transform:uppercase}
.stand-list{grid-column:1/-1;margin-top:8px;min-width:0}
.stand-row{display:grid;grid-template-columns:44px 1fr;gap:6px 10px;align-items:center;padding:8px;margin-top:6px;background:#14130f;border:1px solid rgba(214,170,90,.18);border-radius:12px}
.stand-row img{width:44px;height:52px;object-fit:contain}
.stand-info b{display:block;font-size:12px;font-weight:500;color:#e8dcc4}.stand-info small{font-size:11px;color:#8d877a}
.stand-ctl{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:4px;min-width:0}
.stand-ctl .stand-del{margin-left:auto}
.obj-hint{margin:2px 0 8px;font-size:11px;color:#8d877a}
.letter-types{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.letter-card{display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px;border-radius:12px;background:#14130f;border:1px solid rgba(255,255,255,.1);color:#e8dcc4;cursor:pointer;min-width:0}
.letter-card img{width:100%;height:70px;object-fit:cover;object-position:top;border-radius:8px;background:#ddd}
.letter-card .lt-eng{height:70px;display:grid;place-items:center;font:600 34px Forum,serif;color:#cfcac0}
.letter-card b{font-size:12px;font-weight:600}.letter-card small{font-size:10px;color:#8d877a;text-align:center}
.letter-card.is-active{border-color:#d6aa5a;box-shadow:0 0 0 1px #d6aa5a inset}

.cg-item{position:relative}
.cg-wall{position:absolute;top:6px;right:6px;font-size:9.5px;padding:3px 6px;border-radius:6px;background:rgba(20,20,22,.78);color:#e8c27a;letter-spacing:.03em;cursor:pointer}
.cg-wall:hover{background:#d6aa5a;color:#1b1b1d}

/* подпись разработчика — мелкая строка внизу панели */
.panel-foot { flex-wrap: wrap; row-gap: 4px; }
.credit { flex-basis: 100%; text-align: right; font-size: 10px; line-height: 1; color: var(--muted); opacity: .55; margin-bottom: -4px; }
.credit a { color: inherit; text-decoration: none; }
.credit a:hover { color: var(--gold-2); opacity: 1; }
