:root{color-scheme:light}
*{box-sizing:border-box}
html{min-height:100%}
body{margin:0;min-height:100vh;background:#fff4e8;color:#243047;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}
button,a{font:inherit}
button{cursor:pointer}
a:focus-visible,button:focus-visible{outline:3px solid #243047;outline-offset:4px}
.page{min-height:100svh;display:grid;place-items:center;padding:24px 20px}
.card{width:min(100%,1090px);padding:27px;background:#fffaf3;border:2px solid #243047;border-radius:30px;box-shadow:10px 11px 0 #243047}
.heading{border-bottom:2px solid #243047;margin-bottom:19px;padding:4px 4px 21px}
h1{font-size:clamp(53px,7vw,86px);font-weight:800;line-height:.98;letter-spacing:-.075em;margin:0}
.content{display:grid;grid-template-columns:minmax(0,1.85fr) minmax(265px,.8fr);gap:18px}
.actions{min-width:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.action,.share{border:2px solid #243047;border-radius:23px;box-shadow:4px 5px 0 #243047;animation:tile-enter .58s cubic-bezier(.17,.7,.25,1.15) both;animation-delay:var(--enter-delay)}
.action{position:relative;min-width:0;min-height:132px;display:flex;align-items:center;gap:14px;padding:16px 36px 16px 16px;color:#243047;text-align:left;text-decoration:none}
.action--phone{background:#ffc4b0}.action--mail{background:#d8c9ff}.action--max{background:#ffe186}.action--telegram{background:#a9def5}.action--save{background:#bdebd0;grid-column:1/-1;min-height:112px;width:100%}
.action--copy{background:#d6e7ff;grid-column:1/-1;min-height:112px;width:100%}
.action:hover{filter:brightness(1.025)}
.action-icon{width:77px;height:77px;flex:none;display:grid;place-items:center;border:2px solid #243047;border-radius:20px;background:#fffaf3;transform:translate3d(var(--near-x,0px),var(--near-y,0px),0) rotate(var(--near-rotate,0deg));transition:transform .24s cubic-bezier(.2,.8,.2,1)}
.icon-reveal{display:grid;place-items:center;width:100%;height:100%;animation:icon-pop .72s cubic-bezier(.18,.7,.22,1.28) both;animation-delay:calc(var(--enter-delay) + .14s)}
.icon-reveal svg{width:38px;height:38px;fill:none;stroke:#243047;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round;animation:icon-float 3.7s ease-in-out infinite;animation-delay:var(--idle-delay);will-change:transform;backface-visibility:hidden}
.icon-reveal img{display:block;width:51px;height:51px;object-fit:contain;animation:icon-float 3.7s ease-in-out infinite;animation-delay:var(--idle-delay);will-change:transform;backface-visibility:hidden}
.action-text{min-width:0;font-size:19px;font-weight:750;line-height:1.13;letter-spacing:-.035em;overflow-wrap:anywhere}
.action-text--email{font-size:17px;letter-spacing:-.05em}
.action-arrow{position:absolute;right:14px;top:12px;font-size:23px;line-height:1}
.share{min-width:0;background:#ffcbd7;padding:19px;display:grid;place-items:center}
.qr-button{width:100%;height:100%;padding:5px;border:0;background:transparent;color:#243047;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;text-align:center}
.qr-entrance{display:block;width:min(100%,270px);animation:qr-pop .72s cubic-bezier(.18,.7,.22,1.28) .42s both}
.qr-frame{display:block;width:100%;aspect-ratio:1;padding:7px;border:2px solid #243047;border-radius:20px;background:#fffaf3;overflow:hidden;transform:translate3d(var(--qr-near-x,0px),var(--qr-near-y,0px),0);transition:transform .24s cubic-bezier(.2,.8,.2,1);will-change:transform}
.qr-idle{display:block;width:100%;animation:qr-float 3.7s ease-in-out 1.2s infinite;will-change:transform;backface-visibility:hidden}
.qr-button img{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:contain}
.share-copy{display:grid;gap:7px;max-width:220px}
.share-copy strong{font-size:19px;line-height:1.12;letter-spacing:-.03em}
.share-copy span{font-size:12px;line-height:1.35;color:#4f5b70}
.toast{position:fixed;z-index:5;left:50%;bottom:22px;transform:translateX(-50%);padding:12px 19px;border-radius:11px;background:#243047;color:#fff;box-shadow:0 9px 28px #0003;font-size:13px;font-weight:650;opacity:0;pointer-events:none}
.toast.show{opacity:1}
@keyframes tile-enter{from{opacity:0;transform:translateY(18px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes icon-pop{0%{opacity:0;transform:scale(.55) rotate(-24deg)}65%{opacity:1;transform:scale(1.12) rotate(8deg)}100%{opacity:1;transform:scale(1) rotate(0)}}
@keyframes icon-float{0%,100%{transform:translateY(0) rotate(-3deg)}50%{transform:translateY(-4px) rotate(3deg)}}
@keyframes qr-pop{from{transform:translateY(12px)}to{transform:translateY(0)}}
@keyframes qr-float{0%,100%{transform:translate3d(0,0,0)}50%{transform:translate3d(0,-5px,0)}}
@media(max-width:810px){.page{padding:13px 12px 22px;display:block}.card{padding:16px;border-radius:23px;box-shadow:6px 7px 0 #243047}.heading{padding:2px 3px 17px;margin-bottom:16px}h1{font-size:clamp(43px,8vw,66px)}.content{grid-template-columns:1fr;gap:14px}.actions{grid-template-columns:1fr;gap:10px}.action,.action--save{grid-column:auto;min-height:80px;border-radius:17px;padding:9px 36px 9px 12px}.action-icon{width:64px;height:64px;border-radius:16px}.icon-reveal svg{width:32px;height:32px}.icon-reveal img{width:43px;height:43px}.action-text{font-size:19px}.action-text--email{font-size:18px}.share{border-radius:18px;padding:13px}.qr-button{gap:9px;min-height:254px}.qr-entrance{width:min(100%,258px)}.share-copy{gap:3px}.share-copy strong{font-size:17px}}
@media(max-width:380px){.page{padding:9px 8px 20px}.card{padding:12px;border-radius:18px}.heading{padding-bottom:13px;margin-bottom:12px}h1{font-size:clamp(38px,11vw,48px)}.actions{gap:8px}.action,.action--save{min-height:72px;padding:7px 31px 7px 9px;gap:11px}.action-icon{width:57px;height:57px;border-radius:13px}.icon-reveal svg{width:29px;height:29px}.icon-reveal img{width:39px;height:39px}.action-text{font-size:16px}.action-text--email{font-size:15px}.action-arrow{right:9px;top:8px;font-size:20px}.qr-button{min-height:250px}.qr-entrance{width:min(100%,235px)}.share-copy strong{font-size:16px}}
@media(prefers-reduced-motion:reduce){.action,.share,.icon-reveal,.icon-reveal svg,.icon-reveal img,.qr-entrance,.qr-idle{animation:none!important}.action-icon,.qr-frame{transition:none!important}}

/* Touch screens: frames remain fixed; only inner content reacts to gestures. */
@media (hover: none), (pointer: coarse) {
  .action-icon, .qr-frame { transform: none !important; transition: none !important; will-change: auto; }
  .icon-touch { display: grid; place-items: center; width: 100%; height: 100%; transform: translate3d(0,var(--touch-y,0px),0) rotate(var(--touch-rotate,0deg)); transition: transform .26s cubic-bezier(.2,.8,.2,1); }
  .qr-touch { display: block; width: 100%; transform: translate3d(0,var(--qr-touch-y,0px),0); transition: transform .26s cubic-bezier(.2,.8,.2,1); }
}
@media (prefers-reduced-motion: reduce) { .icon-touch, .qr-touch { transform: none !important; transition: none !important; } }

/* Scroll inertia acts on its own mobile-only wrapper. Frames and idle/tap layers stay independent. */
@media (hover: none), (pointer: coarse) {
  .icon-scroll { display:grid; place-items:center; width:100%; height:100%; }
  .qr-scroll { display:block; width:100%; }
}
@media (prefers-reduced-motion: reduce) {
  .icon-scroll, .qr-scroll { transform:none !important; }
}

/* Desktop card scale */
@media (min-width:1024px) and (pointer:fine) {
  .action--copy { display:none; }
  .card { zoom:0.75; }
  .action-text { font-size:22px; }
  .action-text--email { font-size:19px; }
  .action--telegram .action-text { font-size:19px; letter-spacing:-.045em; white-space:nowrap; }
}

/* Pull-to-refresh for touch: down at top, up at bottom. */
@media (hover:none), (pointer:coarse) {
  html, body { overscroll-behavior-y: contain; }
}
.refresh-indicator[hidden] { display: none !important; }
.refresh-indicator {
  position: fixed; z-index: 80; top: 12px; left: 50%;
  transform: translateX(-50%); display: flex; align-items: center;
  gap: 10px; padding: 11px 17px; border-radius: 30px;
  background: #243047; color: #fff; border: 1px solid #f9d5b5;
  box-shadow: 0 8px 24px #0003; font-size: 13px; font-weight: 700;
  text-align: center; white-space: nowrap; pointer-events: none;
}
.refresh-indicator.is-bottom { top: auto; bottom: 15px; }
.refresh-indicator__icon { display:inline-grid; place-items:center; width:20px; height:20px; font-size:22px; line-height:1; }
.refresh-indicator.is-ready .refresh-indicator__icon { color: #bdebd0; }
.refresh-indicator.is-loading .refresh-indicator__icon { animation: refresh-spin .8s linear infinite; }
@keyframes refresh-spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .refresh-indicator.is-loading .refresh-indicator__icon { animation: none; } }
@media (max-width: 360px) { .refresh-indicator { font-size: 12px; padding: 10px 12px; } }

/* Elastic, resisted page movement while refreshing on touch devices. */
@media (hover: none), (pointer: coarse) {
  .page {
    transform: translate3d(0, var(--pull-offset, 0px), 0);
    transition: transform 280ms cubic-bezier(.22,.78,.16,1);
  }
  .page.is-pulling {
    transition: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .page { transition: none !important; }
}

/* Desktop: show the same copy icon as the mobile copy button; preserve plus for mobile vCard. */
.action--save .contact-icon--copy { display: none; }
@media (min-width:1024px) and (pointer:fine) {
  .action--save .contact-icon--add { display: none; }
  .action--save .contact-icon--copy { display: block; }
}

#analytics-consent{position:fixed;z-index:100;bottom:calc(12px + env(safe-area-inset-bottom,0px));left:12px;right:12px;max-width:520px;margin:auto;padding:14px 18px;border:2px solid #243047;border-radius:19px;background:#fffaf3;color:#243047;box-shadow:5px 6px 0 #243047;font:14px/1.45 system-ui,sans-serif;max-height:70dvh;overflow:auto}
#analytics-consent .consent-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}
#analytics-consent button{padding:10px 14px;border:2px solid #243047;border-radius:10px;color:#243047;font-weight:700;cursor:pointer}
#analytics-accept{background:#a9def5}#analytics-reject{background:#ffe186}
@media(max-width:380px){#analytics-consent{left:8px;right:8px;padding:12px 14px;font-size:13px}#analytics-consent button{flex:1}}
@supports selector(body:has(*)){body:has(#analytics-consent[style*='display: block']) .page{padding-bottom:190px}}
