:root {
  --tosho-main: var(--color_main, #e78467);
  --tosho-main-dark: var(--color_main_dark, #ad634d);
  --tosho-text: #333;
  --tosho-surface: #fff;
}

.tosho-sticky-cta {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9990;
  width: min(460px, calc(100vw - 48px));
  padding: 14px 14px 12px;
  border: 1px solid color-mix(in srgb, var(--tosho-main) 35%, white);
  border-radius: 14px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 10px 35px rgba(32, 32, 32, .18);
  color: var(--tosho-text);
  transform: translateY(18px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
}

.tosho-sticky-cta.is-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.tosho-sticky-cta__label {
  margin: 0 30px 10px 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.tosho-sticky-cta__buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tosho-sticky-cta__button {
  display: grid;
  min-height: 48px;
  place-items: center;
  border: 2px solid var(--tosho-main);
  border-radius: 9px;
  background: var(--tosho-surface);
  color: var(--tosho-main-dark);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
}

.tosho-sticky-cta__button--factory {
  border-color: var(--tosho-main-dark);
  background: var(--tosho-main-dark);
  color: #fff;
}

.tosho-sticky-cta__button:hover,
.tosho-sticky-cta__button:focus-visible {
  filter: brightness(.96);
  outline: 3px solid rgba(57, 160, 255, .45);
  outline-offset: 2px;
}

.tosho-sticky-cta__close,
.tosho-popup__close {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  color: #333;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.tosho-popup {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, .46);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}

.tosho-popup.is-visible {
  opacity: 1;
  visibility: visible;
}

.tosho-popup__dialog {
  position: relative;
  width: min(720px, 100%);
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .32);
  transform: translateY(18px);
  transition: transform .22s ease;
}

.tosho-popup.is-visible .tosho-popup__dialog { transform: translateY(0); }
.tosho-popup__link { display: block; }
.tosho-popup__image { display: block; width: 100%; height: auto; }
body.tosho-popup-open { overflow: hidden; }

@media (max-width: 767px) {
  .tosho-sticky-cta {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
    padding: 10px;
  }
  .tosho-sticky-cta__label { display: none; }
  .tosho-sticky-cta__button { min-height: 48px; font-size: 13px; }
  .tosho-sticky-cta__close { top: -18px; right: -4px; }
  .tosho-popup { align-items: end; padding: 0; }
  .tosho-popup__dialog { width: 100%; max-height: 70vh; border-radius: 16px 16px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .tosho-sticky-cta, .tosho-popup, .tosho-popup__dialog { transition: none; }
}

