.gtoc-ov{position:fixed;inset:0;touch-action:none;overscroll-behavior:contain;background:rgba(0,0,0,.45);z-index:100000;opacity:0;transition:opacity .2s}
.gtoc{position:fixed;left:0;right:0;bottom:0;z-index:100001;background:#fff;border-radius:18px 18px 0 0;padding:10px 20px calc(18px + env(safe-area-inset-bottom));font-family:-apple-system,BlinkMacSystemFont,Roboto,Arial,sans-serif;color:#1d1d1f;box-shadow:0 -6px 24px rgba(0,0,0,.15);transform:translateY(100%);transition:transform .25s ease;max-height:92vh;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
.gtoc.on{transform:none}.gtoc-ov.on{opacity:1}
.gtoc *{box-sizing:border-box}
.gtoc .gr{width:40px;height:5px;border-radius:3px;background:#d6d6d6;margin:0 auto 14px}
.gtoc .hd{display:flex;justify-content:space-between;align-items:center}
.gtoc h3{margin:0;font-size:22px;font-weight:700;color:#1d1d1f;line-height:1.2}
.gtoc .x{font-size:28px;color:#999;line-height:1;background:none;border:0;padding:0 0 0 12px;cursor:pointer}
.gtoc .sub{font-size:14px;color:#666;margin:6px 0 14px;line-height:1.4}
.gtoc .it{display:flex;gap:12px;align-items:center;background:#f5f6f8;border-radius:12px;padding:10px}
.gtoc .it img{width:56px;height:56px;object-fit:contain;background:#fff;border-radius:8px;flex:none}
.gtoc .it .n{flex:1;font-size:14px;line-height:1.3;min-width:0}
.gtoc .qty{display:flex;align-items:center;gap:10px;margin-top:6px;font-size:14px}
.gtoc .qty button{display:inline-flex;width:30px;height:30px;border-radius:8px;background:#fff;border:1px solid #ddd;align-items:center;justify-content:center;font-size:17px;color:#1d1d1f;padding:0}
.gtoc .it .p{font-weight:700;font-size:16px;white-space:nowrap}
.gtoc label{display:block;font-size:13px;color:#666;margin:14px 0 6px;font-weight:400}
.gtoc input,.gtoc textarea{width:100%;height:50px;border:1px solid #dcdfe4;border-radius:12px;padding:0 14px;font-size:17px;background:#f9fafb;color:#1d1d1f;-webkit-appearance:none;outline:none;margin:0}
.gtoc textarea{height:76px;padding:12px 14px;resize:none;font-family:inherit}
.gtoc input:focus,.gtoc textarea:focus{border:2px solid #1565c0;background:#fff}
.gtoc input.err{border:2px solid #d32f2f;background:#fff}
.gtoc .em{color:#d32f2f;font-size:13px;margin-top:6px;display:none}
.gtoc .more{display:inline-block;margin-top:12px;font-size:14px;color:#1565c0;background:none;border:0;padding:0}
.gtoc .ext{display:none}.gtoc .ext.on{display:block}
.gtoc .btn{display:block;width:100%;height:54px;margin-top:16px;border:0;border-radius:14px;background:#1565c0;color:#fff;font-size:17px;font-weight:600}
.gtoc .btn[disabled]{opacity:.6}
.gtoc .lic{font-size:12px;color:#888;text-align:center;margin-top:10px;line-height:1.35}
.gtoc .lic a{color:#1565c0}
.gtoc .ok{text-align:center;padding:14px 0 6px}
.gtoc .ok .ic{width:64px;height:64px;border-radius:50%;background:#e8f5e9;color:#2e7d32;font-size:34px;display:flex;align-items:center;justify-content:center;margin:0 auto 12px}
.gtoc .ok .ic.bad{background:#ffebee;color:#c62828}
.gtoc .ok h3{margin-bottom:8px}
.gtoc .ok p{font-size:15px;color:#555;line-height:1.45;margin:0 0 4px}
html.gtoc-lock,html.gtoc-lock body{overflow:hidden}
/* телефон: форма на всю видимую область (высота и верх задаются из visualViewport через --gtoc-vh / --gtoc-top) */
@media (max-width:767px){
 .gtoc{box-sizing:border-box;top:var(--gtoc-top,0px);bottom:auto;height:var(--gtoc-vh,100%);max-height:none;overflow:hidden;padding:0;border-radius:0;box-shadow:none;display:flex;flex-direction:column}
 .gtoc .gr{display:none}
 .gtoc .top{flex:none;padding:calc(14px + env(safe-area-inset-top)) 20px 10px;border-bottom:1px solid #eef0f3;background:#fff}
 .gtoc .bd{flex:1 1 auto;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;padding:12px 20px 0}
 .gtoc .ft{position:sticky;bottom:0;z-index:2;margin:16px -20px 0;padding:18px 20px calc(12px + env(safe-area-inset-bottom));background:linear-gradient(rgba(255,255,255,0),#fff 14px)}
 .gtoc .ft .btn{margin-top:0}
 .gtoc .lic{padding-bottom:24px}
 .gtoc.kb .ft{padding-bottom:12px}
 .gtoc.kb .top{padding-top:calc(8px + env(safe-area-inset-top));padding-bottom:6px}
 .gtoc.kb h3{font-size:18px}
 .gtoc.kb.ios{padding-bottom:48px}
 .gtoc.res .top{display:none}
 .gtoc.res .bd{display:flex;flex-direction:column;justify-content:center;padding-top:calc(20px + env(safe-area-inset-top))}
}
body.gtoc-fix{position:fixed;left:0;right:0;width:100%}
/* === единая форма (режим gt_oc=2): E-mail, ссылка на доставку, десктопное окно === */
.gtoc .opt{color:#999;font-size:12px}
.gtoc .dl{display:block;text-align:center;margin-top:12px;font-size:14px;color:#1565c0;text-decoration:none;border-bottom:0}
.gtoc .dl:hover{text-decoration:underline}
@media (min-width:768px){
 .gtoc.n2{left:50%;right:auto;bottom:auto;top:50%;width:480px;max-width:calc(100vw - 32px);max-height:calc(100vh - 40px);overflow-y:auto;border-radius:10px;padding:26px 30px 24px;font-family:Ubuntu,Arial,Helvetica,sans-serif;box-shadow:0 12px 40px rgba(0,0,0,.28);opacity:0;transform:translate(-50%,-47%);transition:opacity .2s,transform .2s}
 .gtoc.n2.on{opacity:1;transform:translate(-50%,-50%)}
 .gtoc.n2 .gr{display:none}
 .gtoc.n2 h3{font-size:24px;font-weight:500;color:#333}
 .gtoc.n2 .hd{padding-bottom:14px;border-bottom:2px solid #006ac5;margin-bottom:12px}
 .gtoc.n2 .x{cursor:pointer}.gtoc.n2 .x:hover{color:#333}
 .gtoc.n2 .sub{margin:0 0 14px}
 .gtoc.n2 label{margin:12px 0 5px;color:#888;font-size:13px}
 .gtoc.n2 input,.gtoc.n2 textarea{height:40px;font-size:14px;border-radius:4px;border:1px solid #e8e8e8;background:#f7f7f7;padding:0 12px;font-family:inherit}
 .gtoc.n2 textarea{height:84px;padding:10px 12px}
 .gtoc.n2 input:focus,.gtoc.n2 textarea:focus{border:1px solid #006ac5;background:#fff}
 .gtoc.n2 input.err{border:1px solid #d32f2f}
 .gtoc.n2 .more{color:#006ac5;cursor:pointer}
 .gtoc.n2 .btn{height:44px;border-radius:4px;background:#006ac5;font-size:15px;font-weight:500;cursor:pointer;font-family:inherit}
 .gtoc.n2 .btn:hover:not([disabled]){background:#005fb1}
 .gtoc.n2 .it{border-radius:6px}
 .gtoc.n2 .qty button{cursor:pointer;border-radius:4px}
 .gtoc.n2 .dl{color:#006ac5;cursor:pointer}.gtoc.n2 .lic a{color:#006ac5}
 .gtoc.n2 .ok{padding:22px 0 8px}
 .gtoc-ov{cursor:pointer}
}
