/* FOREVER — конструктор термосов */
.th-app{position:fixed;inset:0;z-index:88;background:var(--milk);display:flex;flex-direction:column;opacity:0;transform:translateY(18px);transition:opacity .3s var(--ease),transform .35s var(--ease)}
.th-app.on{opacity:1;transform:none}
.th-app[hidden]{display:none}
.th-top{display:flex;align-items:center;gap:12px;padding:10px 16px;padding-top:calc(10px + env(safe-area-inset-top));border-bottom:1px solid var(--line);background:rgba(255,255,255,.85);backdrop-filter:blur(12px)}
.th-title{display:grid;line-height:1.2;min-width:0;flex:1}
.th-title b{font-family:var(--font-display);font-weight:500;font-size:1.05rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.th-title span{font-size:.78rem;color:var(--muted)}
.th-tools{margin-left:auto;display:flex;gap:6px;flex:none}
.th-ib{min-width:42px;height:42px;border-radius:14px;border:0;background:var(--white);box-shadow:inset 0 0 0 1.5px var(--line);font-size:1.05rem;display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:0 10px;color:var(--brown)}
.th-ib:hover{box-shadow:inset 0 0 0 1.5px var(--brown)}
.th-ib:disabled{opacity:.35;cursor:default}
.th-ib[aria-pressed="true"]{background:var(--pink)}
.th-ib.wide span{font-size:.84rem;font-weight:600}
.th-body{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 460px}
.th-stage-wrap{position:relative;min-height:0;display:flex;flex-direction:column;align-items:center;padding:12px 16px 14px;background:radial-gradient(60% 50% at 50% 45%,#fff,var(--pink-soft) 70%,#F6E3E8);overflow:hidden}
.th-stage{flex:1;min-height:0;width:100%;display:grid;place-items:center}
.th-stage .tb-svg{height:100%;max-height:100%;width:auto;max-width:100%;touch-action:none;user-select:none;-webkit-user-select:none}
.tb-zone{stroke:#fff;stroke-opacity:.85;stroke-width:1.2;stroke-dasharray:5 4;vector-effect:non-scaling-stroke;filter:drop-shadow(0 0 .6px rgba(0,0,0,.7))}
.th-selrect{fill:rgba(244,201,214,.08);stroke:#F4C9D6;stroke-width:1.6;stroke-dasharray:6 3}
.th-hit{cursor:grab}
.th-hit:active{cursor:grabbing}
.th-stage-meta{display:flex;gap:14px;font-size:.78rem;color:var(--muted);margin-top:6px;flex-wrap:wrap;justify-content:center}
.th-warn{position:absolute;top:12px;left:50%;transform:translateX(-50%);background:var(--red);color:#fff;font-size:.8rem;font-weight:600;padding:8px 12px;border-radius:12px;max-width:calc(100% - 24px);text-align:center;z-index:2}
.th-warn[hidden]{display:none}
.th-selbar{width:min(560px,100%);margin-top:10px;background:var(--white);border-radius:18px;padding:10px 12px;box-shadow:var(--shadow-card);display:grid;grid-template-columns:1fr 1fr auto;gap:8px 14px;align-items:center}
.th-selbar[hidden]{display:none}
.th-selbar label{display:grid;gap:2px;font-size:.74rem;font-weight:600;color:var(--muted)}
.th-selbar input[type=range]{width:100%;accent-color:var(--red)}
.th-selbtns{display:flex;gap:4px}
.th-selbtns button{width:38px;height:38px;border-radius:12px;border:0;background:var(--milk);font-size:1rem}
.th-selbtns button:hover{background:var(--pink-soft)}
.th-selbtns .del:hover{background:var(--red);color:#fff}
.th-panel{min-height:0;overflow:auto;border-left:1px solid var(--line);background:var(--white);display:flex;flex-direction:column}
.th-tabs{flex:none;position:sticky;top:0;z-index:2;display:flex;gap:4px;padding:10px;background:var(--white);border-bottom:1px solid var(--line);overflow-x:auto;scrollbar-width:none}
.th-tabs::-webkit-scrollbar{display:none}
.th-tabs button{flex:none;display:flex;align-items:center;gap:6px;border:0;background:var(--milk);border-radius:999px;padding:9px 13px 9px 9px;font-weight:600;font-size:.86rem;white-space:nowrap}
.th-tabs button b{min-width:22px;height:22px;border-radius:11px;display:grid;place-items:center;background:var(--white);font-size:.7rem;padding:0 5px}
.th-tabs button[aria-selected="true"]{background:var(--brown);color:var(--milk)}
.th-tabs button[aria-selected="true"] b{background:var(--yellow);color:var(--brown)}
.th-pane{padding:16px 18px 10px;display:grid;gap:14px;align-content:start}
.th-pane h3{font-size:1.02rem}
.th-note{margin:0;font-size:.86rem;color:var(--muted)}
.th-note.sm{font-size:.78rem}
.th-row{display:flex;gap:8px;flex-wrap:wrap}
.th-alert{background:var(--yellow-soft);border-radius:14px;padding:12px 14px;font-size:.82rem;line-height:1.45}
.th-colors{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:8px}
.th-color{display:flex;align-items:center;gap:10px;border:2px solid transparent;background:var(--milk);border-radius:16px;padding:10px;text-align:left;font-weight:600;font-size:.88rem}
.th-color i{width:34px;height:46px;border-radius:9px 9px 12px 12px;flex:none;box-shadow:inset 0 6px 0 #18181a}
.th-color[aria-pressed="true"]{border-color:var(--red);background:var(--pink-soft)}
.th-tpls{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.th-tpl{border:0;background:var(--milk);border-radius:16px;padding:6px 6px 8px;display:grid;gap:4px;font-size:.74rem;font-weight:600;line-height:1.2;transition:transform .25s var(--ease)}
.th-tpl:hover{transform:translateY(-2px);background:var(--pink-soft)}
.th-tpl .tb-svg{width:100%;height:130px;border-radius:12px}
.th-field{display:grid;gap:6px}
.th-field>label,.th-lbl{font-size:.82rem;font-weight:700}
.th-field small{font-weight:400;color:var(--muted)}
.th-field textarea,.th-in{width:100%;border:1.5px solid var(--line);border-radius:14px;padding:10px 12px;font:inherit;font-size:1rem;background:var(--milk);color:var(--brown)}
.th-field input[type=range]{width:100%;accent-color:var(--red)}
.th-kz{display:flex;flex-wrap:wrap;gap:4px;align-items:center;font-size:.76rem;color:var(--muted)}
.th-kz button{width:30px;height:30px;border-radius:9px;border:1.5px solid var(--line);background:var(--white);font-weight:700}
.th-fgroup{display:grid;gap:4px;margin-bottom:6px}
.th-fgroup>span{font-size:.7rem;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);font-weight:700}
.th-fonts{display:grid;grid-template-columns:repeat(auto-fill,minmax(122px,1fr));gap:6px}
.th-font{border:1.5px solid var(--line);background:var(--white);border-radius:12px;padding:8px 10px;font-size:1.25rem;line-height:1.15;text-align:left;display:grid;gap:2px;overflow:hidden;white-space:nowrap}
.th-font small{font-family:var(--font-body);font-size:.66rem;font-weight:600;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.th-font[aria-pressed="true"]{border-color:var(--red);background:var(--pink-soft)}
.th-font:disabled{opacity:.35}
.th-cats{display:flex;gap:6px;overflow-x:auto;padding-bottom:4px;scrollbar-width:thin}
.th-cats .chip{white-space:nowrap;font-size:.8rem;padding:7px 12px}
.th-motifs{display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:8px}
.th-motif{border:0;background:var(--brown);color:#E9E2DA;border-radius:16px;padding:10px 8px 8px;display:grid;gap:6px;font-size:.7rem;font-weight:600;line-height:1.2;transition:transform .25s var(--ease)}
.th-motif:hover{transform:translateY(-2px);background:#57352f}
.th-motif svg{width:100%;height:58px}
.th-motif span{color:#F6EDE6}
.th-file{position:relative;overflow:hidden;cursor:pointer}
.th-file input{position:absolute;inset:0;opacity:0;cursor:pointer}
.th-seg{display:flex;flex-wrap:wrap;gap:6px}
.th-seg button{border:1.5px solid var(--line);background:var(--white);border-radius:999px;padding:8px 12px;font-size:.8rem;font-weight:600}
.th-seg button[aria-pressed="true"]{background:var(--brown);border-color:var(--brown);color:var(--milk)}
.th-seg button:disabled{opacity:.4}
.th-sum{list-style:none;margin:0;padding:0;display:grid;gap:6px;font-size:.88rem}
.th-sum li{display:flex;justify-content:space-between;gap:12px;background:var(--milk);border-radius:12px;padding:9px 12px}
.th-sum span{color:var(--muted)}.th-sum b{text-align:right}
.th-qty{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:.9rem}
.th-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.th-layers{padding:4px 18px 20px;display:flex;flex-wrap:wrap;gap:6px;align-items:center;border-top:1px dashed var(--line);margin-top:auto}
.th-lt{width:100%;font-size:.7rem;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);font-weight:700;padding-top:10px}
.th-layer{display:inline-flex;gap:6px;align-items:center;border:1.5px solid var(--line);background:var(--white);border-radius:999px;padding:5px 10px 5px 6px;font-size:.78rem;max-width:180px}
.th-layer i{width:20px;height:20px;border-radius:50%;background:var(--pink-soft);display:grid;place-items:center;font-style:normal;font-size:.7rem;font-weight:700;flex:none}
.th-layer span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.th-layer.on{border-color:var(--red);background:var(--pink-soft)}
.th-modal{position:absolute;inset:0;z-index:5;background:rgba(63,39,35,.4);display:grid;place-items:center;padding:16px}
.th-modal[hidden]{display:none}
.th-modal-box{position:relative;background:var(--milk);border-radius:26px;padding:24px;width:min(560px,100%);max-height:calc(100% - 20px);overflow:auto;display:grid;gap:12px}
.th-modal-box .close{position:absolute;right:12px;top:12px}
.th-exp{background:#fff;border-radius:14px;padding:10px;display:grid;place-items:center;max-height:46vh;overflow:auto;box-shadow:inset 0 0 0 1px var(--line)}
.th-exp img{max-height:42vh;width:auto;max-width:100%}
.th-saved{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:10px}
.th-sv{background:var(--white);border-radius:16px;padding:10px;display:grid;gap:4px;justify-items:center;text-align:center;font-size:.82rem}
.th-sv img{height:150px;width:auto}
.th-sv small{color:var(--muted)}
@media (max-width:900px){
  .th-body{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,48%) minmax(0,52%)}
  .th-panel{border-left:0;border-top:1px solid var(--line)}
  .th-stage-wrap{padding:6px 10px 8px}
  .th-ib.wide span{display:none}
  .th-title span{display:none}
  .th-zone-note{display:none}
  .th-selbar{grid-template-columns:1fr 1fr;padding:8px 10px;gap:6px 10px;margin-top:6px}
  .th-selbtns{grid-column:1/-1;justify-content:space-between}
  .th-selbtns button{flex:1}
  .th-tpls{grid-template-columns:repeat(3,1fr)}
  .th-tpl .tb-svg{height:110px}
  .th-pane{padding:14px 14px 8px}
  .th-actions .btn{min-height:48px}
}
@media (max-width:420px){.th-tools{gap:4px}.th-ib{min-width:38px;height:38px;padding:0 8px}.th-title b{font-size:.92rem}}

/* блок на главной */
.thh{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:24px;align-items:center;background:linear-gradient(135deg,var(--pink) 0%,#F9DCE5 45%,var(--milk) 100%);border-radius:var(--r-xl);padding:40px;overflow:hidden;position:relative}
.thh-text{display:flex;flex-direction:column;gap:14px;align-items:flex-start;position:relative;z-index:1}
.thh-text h2{font-size:clamp(1.8rem,4vw,3rem)}
.thh-text p{margin:0;max-width:38ch;font-size:1.05rem}
.thh-price{font-family:var(--font-display);font-size:1.4rem;color:var(--red)}
.thh-points{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:6px}
.thh-points li{background:rgba(255,255,255,.7);border-radius:999px;padding:6px 12px;font-size:.8rem;font-weight:600}
.thh-row{display:flex;justify-content:center;align-items:flex-end;gap:2px;min-height:360px}
.thh-b{border:0;background:none;padding:0;display:grid;justify-items:center;gap:4px;font-size:.74rem;font-weight:600;color:var(--brown);transition:transform .45s var(--ease);animation:thhFloat 6s ease-in-out infinite;animation-delay:calc(var(--i) * -1.1s)}
.thh-b .tb-svg{height:340px;width:auto;filter:drop-shadow(0 18px 18px rgba(63,39,35,.18))}
.thh-b:hover{transform:translateY(-10px) scale(1.04)}
.thh-b:nth-child(odd) .tb-svg{height:320px}
@keyframes thhFloat{50%{translate:0 -8px}}
.thh-disclaimer{font-size:.74rem;color:var(--muted)}
@media (max-width:1000px){.thh{grid-template-columns:1fr;padding:28px}.thh-row{justify-content:flex-start;overflow-x:auto;min-height:0;padding-bottom:8px;scroll-snap-type:x mandatory}.thh-b{scroll-snap-align:center;flex:none}.thh-b .tb-svg,.thh-b:nth-child(odd) .tb-svg{height:250px}}
@media (prefers-reduced-motion:reduce){.thh-b{animation:none}}
