/* Grebeshok: postcard assistant, reference design #3 */
#grebeshok-helper{position:fixed;left:23px;bottom:23px;z-index:9500;color:#49382a;font-family:Arial,'Segoe UI',sans-serif}#grebeshok-helper[hidden],#grebeshok-helper [hidden]{display:none!important}
.ga-launch{position:relative;display:grid;place-items:center;width:59px;height:59px;border:4px solid #f7e8d0;border-radius:50%;background:radial-gradient(circle at 40% 25%,#fff9e9,#d4a86d);color:#906337;box-shadow:0 6px 0 #8b5e3155,0 11px 24px #50362650;cursor:pointer;transition:transform .2s}.ga-launch:hover{transform:translateY(-3px)}.ga-launch svg{width:34px;height:34px}.ga-dot{position:absolute;top:1px;right:2px;width:10px;height:10px;border:2px solid #fff8ed;border-radius:50%;background:#69ae71}
.ga-hint{position:absolute;bottom:9px;left:69px;width:235px;padding:12px 26px 12px 13px;box-sizing:border-box;background:#fffaf0;border:1px solid #e0c49a;border-radius:15px;box-shadow:0 4px 24px #3a2d202a;color:#71563b;font-size:12px;line-height:1.45}.ga-hint:after{content:'';position:absolute;left:-6px;bottom:17px;width:10px;height:10px;transform:rotate(45deg);background:#fffaf0;border-bottom:1px solid #e0c49a;border-left:1px solid #e0c49a}.ga-hint button{position:absolute;right:7px;top:5px;font-size:19px;color:#9d8266;background:none;border:0;cursor:pointer}
.ga-dialog{position:absolute;left:0;bottom:75px;width:min(374px,calc(100vw - 22px));height:min(590px,calc(100dvh - 115px));display:flex;flex-direction:column;overflow:hidden;border-radius:20px;border:1px solid #ddbc8e;background:#f8ecd9;box-shadow:0 18px 50px #4d352757,0 2px 0 #e6cfa9;isolation:isolate}.ga-dialog:before{content:'';position:absolute;inset:0;pointer-events:none;z-index:-1;background-image:radial-gradient(#a7805418 .65px,transparent 1px),linear-gradient(165deg,#fff7e7,#f3e4cc);background-size:6px 6px,100% 100%}
.ga-head{position:relative;min-height:89px;box-sizing:border-box;display:flex;align-items:flex-start;gap:8px;padding:21px 14px 8px 17px;background:transparent;border-bottom:1px solid #e3c9a8}.ga-head-title{display:flex;gap:8px;align-items:center;position:relative;z-index:1;max-width:245px}.ga-head-palm{font-size:23px;filter:sepia(.35)}.ga-head strong{display:block;font:600 16px Georgia,serif;color:#4e3925}.ga-head small{display:block;margin-top:5px;color:#a07749;font:italic 17px 'Brush Script MT',Georgia,cursive}.ga-close{z-index:3;margin-left:auto;width:30px;height:30px;border:none;border-radius:50%;background:#fff6e7b8;color:#8a6548;font-size:22px;cursor:pointer}.ga-head-decor{position:absolute;right:44px;top:7px;width:92px;height:73px;pointer-events:none}.ga-stamp{position:absolute;right:0;top:0;width:55px;height:47px;padding:4px;background:#fff7eb;transform:rotate(9deg);box-shadow:0 2px 5px #593a352b;outline:1px dashed #a9855a}.ga-stamp img{width:100%;height:100%;object-fit:cover}.ga-postmark{position:absolute;top:25px;left:-17px;border:1.5px solid #a47f5777;border-radius:50%;padding:7px 4px;color:#ab8257;font-size:6px;letter-spacing:1px;text-align:center;transform:rotate(-17deg)}.ga-stampwaves{position:absolute;left:17px;bottom:-6px;font-size:16px;color:#b48d6275}
.ga-chat{flex:1;min-height:0;overflow-y:auto;padding:13px 15px 8px;display:flex;flex-direction:column;gap:10px;scrollbar-color:#dcc19d transparent}.ga-msg{max-width:94%;padding:11px 12px;border-radius:16px;overflow-wrap:anywhere;font-size:12.5px;line-height:1.55;box-shadow:0 2px 9px #73553614}.ga-bot{align-self:flex-start;background:#fffaf3;border:1px solid #ead9be}.ga-user{align-self:flex-end;background:#f0d7b2;border:1px solid #e1bd89}.ga-msg a{color:#865b2d;font-weight:600;text-decoration:underline}
.ga-quick{padding:8px 15px;display:grid;grid-template-columns:1fr 1fr;gap:7px;overflow-y:auto;max-height:99px;min-height:82px}.ga-quick button{border:1px solid #e2c8a5;background:linear-gradient(#fff9ed,#f7e8d1);border-radius:20px;color:#61482f;padding:9px 5px;font-size:12px;cursor:pointer;white-space:nowrap;box-shadow:0 2px 3px #8b653019}.ga-quick button:hover{background:#fffdf7;border-color:#b88d57}.ga-quick button:nth-child(n+5){display:none}
.ga-postcard-bottom{height:54px;display:flex;justify-content:space-between;align-items:center;padding:0 15px 0 32px;color:#ab8259;pointer-events:none}.ga-postcard-bottom span{font:italic 15px 'Brush Script MT',Georgia,cursive;line-height:1.1;transform:rotate(-6deg)}.ga-postcard-bottom svg{width:130px;height:46px;opacity:.63}
.ga-form{display:flex;gap:7px;margin:0 13px 9px;padding:5px;background:#fff9ed;border:1px solid #e1c6a1;border-radius:25px;box-shadow:0 2px 5px #916d3c18}.ga-form input{flex:1;min-width:0;background:transparent;border:none;padding:8px 8px;font:13px Arial,sans-serif;color:#49382a}.ga-form input:focus{outline:none}.ga-form:focus-within{outline:2px solid #e0b77c}.ga-form button{width:38px;min-width:38px;height:38px;border:2px solid #e9cf9f;border-radius:50%;background:linear-gradient(140deg,#c6a16b,#a97845);color:#fff;font-size:19px;cursor:pointer;box-shadow:0 2px 4px #65462b33}.ga-foot{padding:0 10px 9px;text-align:center;color:#a1896d;font-size:9px}
@media(max-width:640px){#grebeshok-helper{left:12px;bottom:83px}.ga-launch{width:55px;height:55px}.ga-dialog{bottom:69px;height:min(570px,calc(100dvh - 170px))}.ga-hint{left:65px;width:205px}.ga-head{min-height:83px}}
@media(max-height:540px){.ga-postcard-bottom{display:none}.ga-head{min-height:65px}.ga-quick{min-height:0}}
@media(prefers-reduced-motion:reduce){.ga-launch{transition:none}}

/* Мурчик: настоящая фотография и положение слева */
.ga-launch{padding:0;overflow:visible;background:#fff6e8;border:3px solid #d5a55d;box-shadow:0 2px 0 #fff6df inset,0 8px 22px #50362655}
.ga-murchik-avatar{display:block;width:100%;height:100%;object-fit:contain;border-radius:50%}
.ga-head-avatar{width:48px;height:48px;flex:none;object-fit:contain;filter:drop-shadow(0 2px 3px #93704b66)}
.ga-head-title{max-width:252px}.ga-head-title strong{font-size:17px}.ga-head-title small{font-size:12px;line-height:1.2;font-style:italic}
.ga-head-decor{opacity:.5}
.ga-hint{width:255px;font-size:12.5px}
@media(max-width:640px){.ga-hint{width:min(230px,calc(100vw - 96px))}.ga-head-avatar{width:42px;height:42px}}

/* Мурчик: курсор живой печати, отключается при завершении ответа */
.ga-msg.ga-typing::after{content:"▍";display:inline-block;color:#9b6f3f;animation:ga-caret .65s steps(1,end) infinite;margin-left:2px}
@keyframes ga-caret{0%,49%{opacity:1}50%,100%{opacity:0}}
@media(prefers-reduced-motion:reduce){.ga-msg.ga-typing::after{animation:none}}

/* Чат Мурчика: больше места для переписки, без быстрых вопросов и подписей */
.ga-chat{flex:1 1 auto;min-height:0;padding-bottom:16px}
.ga-form{flex:0 0 auto;margin-top:9px;margin-bottom:13px}
/* Фотография открывается строго внутри габаритов чата */
.ga-avatar-open{position:relative;flex:none;display:grid;place-items:center;width:52px;height:52px;padding:0;border:1px solid transparent;border-radius:50%;background:transparent;cursor:zoom-in;transition:transform .18s ease,box-shadow .18s ease}
.ga-avatar-open:hover{transform:scale(1.07);box-shadow:0 0 0 2px #d6b38670}
.ga-avatar-open:focus-visible,.ga-photo-close:focus-visible{outline:3px solid #b87d3b;outline-offset:2px}
.ga-avatar-open .ga-head-avatar{display:block;width:48px;height:48px}
.ga-photo-view{position:absolute;inset:0;z-index:20;display:flex;align-items:center;justify-content:center;padding:52px 16px 24px;box-sizing:border-box;background:rgba(34,27,22,.89);backdrop-filter:blur(6px)}
.ga-photo-view[hidden]{display:none!important}
.ga-photo-view>img{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;filter:drop-shadow(0 8px 22px #0006)}
.ga-photo-close{position:absolute;top:13px;right:14px;display:grid;place-items:center;width:36px;height:36px;border:1px solid #eed1a5;border-radius:50%;background:#fff9ed;color:#75512d;font-size:27px;line-height:1;cursor:pointer;box-shadow:0 4px 12px #0005}
@media(max-width:640px){.ga-avatar-open{width:46px;height:46px}.ga-avatar-open .ga-head-avatar{width:42px;height:42px}.ga-photo-view{padding:56px 12px 20px}}
@media(prefers-reduced-motion:reduce){.ga-avatar-open{transition:none}}

/* Мурчик только на главной странице; на мобильных учитывается панель навигации и safe-area. */
@media (max-width:920px){
  /* Иконка у самого нижнего края. При раскрытой навигации панель перекрывает её. */
  #grebeshok-helper{left:12px;bottom:calc(7px + env(safe-area-inset-bottom,0px));z-index:44;transition:bottom .25s ease}
  body.mnav-collapsed #grebeshok-helper{bottom:calc(7px + env(safe-area-inset-bottom,0px))}
  body.mnav-keyboard #grebeshok-helper{bottom:calc(7px + env(safe-area-inset-bottom,0px))}
  /* Открытое окно чата остаётся выше панели, чтобы не терять сообщения и кнопку закрытия. */
  #grebeshok-helper.ga-is-open{z-index:9500;bottom:calc(10px + env(safe-area-inset-bottom,0px))}
  #grebeshok-helper .ga-dialog{left:0;bottom:calc(68px + 0px);max-height:calc(100dvh - 160px)}
  #grebeshok-helper .ga-hint{display:none!important}
}
@media(max-width:400px){#grebeshok-helper .ga-launch{width:50px;height:50px}}
@media(prefers-reduced-motion:reduce){#grebeshok-helper{transition:none!important}}

.ga-storage-note{display:block;color:#51657b;font-size:10.5px;line-height:1.35;margin:0 14px 10px;text-align:center}

/* 2026-11-05: информационное сообщение — отдельно от строки ввода. */
.ga-form{display:flex;flex-wrap:nowrap;align-items:center;min-height:44px}
.ga-form input{flex:1 1 0%;min-width:0;width:0;display:block;visibility:visible;opacity:1}
.ga-form button[type="submit"]{flex:0 0 auto}
.ga-dialog>.ga-storage-note{display:block;flex:0 0 auto;margin:0 18px 11px;text-align:center;color:#725c42;font-size:11px;line-height:1.4}
