.sagz-support {
  --support-green: #09774c;
  box-sizing: border-box;
  width: calc(100% - 32px);
  max-width: 1170px;
  margin: 18px auto;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #dce9e1;
  border-radius: 12px;
  background: #fff;
  color: #172e47;
  line-height: 1.5;
}
.sagz-support-copy strong, .sagz-support-copy span { display: block; }
.sagz-support-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sagz-support-copy span { color: #56677d; font-size: 12px; }
.sagz-support-open, .sagz-support-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #c9e5d5;
  border-radius: 9px;
  background: #e9f7ef;
  color: var(--support-green);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.sagz-support-open:hover, .sagz-support-save:hover { background: #d9f2e3; color: #075f3d; }
.sagz-support :focus-visible { outline: 2px solid #09774c; outline-offset: 2px; }
.sagz-support-panel {
  box-sizing: border-box;
  width: min(320px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  padding: 22px 18px;
  border: 1px solid #dce9e1;
  border-radius: 18px;
  background: #fff;
  color: #172e47;
  box-shadow: 0 16px 48px #172e4730;
  text-align: center;
}
.sagz-support-panel:not([open]), .sagz-support-panel [hidden] { display: none; }
.sagz-support-panel::backdrop { background: #152a4570; }
.sagz-support-panel h2 { margin: 0 0 3px; font-size: 18px; }
.sagz-support-panel p { margin: 0; font-size: 13px; color: #56677d; }
.sagz-support-panel form { margin: 0; }
.sagz-support-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #f0f3f6;
  color: #172e47;
  font-size: 23px;
  cursor: pointer;
}
.sagz-support-qr { display: block; width: 176px; max-width: 100%; height: auto; aspect-ratio: 1; margin: 14px auto; object-fit: contain; }
.sagz-support-save { margin-top: 12px; }
.sagz-support .sagz-support-follow {
  color: #d90938;
  border-color: #f2d8df;
  background: #fff6f7;
}
.sagz-support .sagz-support-follow:hover { background: #ffedf1; }
.sagz-support-panel.is-follow h2 { color: #d90938; }
.sagz-support-phone { position: relative; }
.sagz-support .sagz-support-phone-trigger {
  box-sizing: border-box;
  width: 100%;
  color: #b32440;
  border-color: #efd8df;
  background: #fff5f7;
}
.sagz-support .sagz-support-phone-trigger:hover { background: #feeaf0; }
.sagz-support-phone-popover {
  position: absolute;
  bottom: calc(100% + 7px);
  right: 0;
  z-index: 2;
  display: none;
  min-width: 168px;
  width: max-content;
  padding: 10px 13px;
  background: #fff;
  border: 1px solid #f0dce1;
  border-radius: 11px;
  box-shadow: 0 8px 24px #172e471a;
  white-space: nowrap;
}
.sagz-support-phone:hover .sagz-support-phone-popover,
.sagz-support-phone:focus-within .sagz-support-phone-popover { display: grid; gap: 3px; }
.sagz-support-phone-popover::after { content: ""; position: absolute; inset: 100% 0 auto; height: 8px; }
.sagz-support-phone-popover strong { font-size: 13px; }
.sagz-support-phone-popover a:hover { text-decoration: underline; }
.sagz-support-phone-popover .sagz-support-phone-list { margin: 3px 0 0; grid-auto-columns: minmax(122px, 1fr); }
.sagz-support[data-device="mobile"] {
  position: fixed;
  right: env(safe-area-inset-right, 0px);
  top: clamp(82px, 59%, calc(100% - 185px));
  z-index: 9;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.sagz-support[data-device="mobile"] .sagz-support-copy { display: none; }
.sagz-support[data-device="mobile"] .sagz-support-actions {
  position: relative;
  isolation: isolate;
  flex-direction: column;
  gap: 0;
}
.sagz-support[data-device="mobile"] .sagz-support-actions::before {
  content: "";
  position: absolute;
  inset: 3px 0 3px auto;
  width: 30px;
  z-index: -1;
  pointer-events: none;
  border: 1px solid #e9e4e8;
  border-right: 0;
  border-radius: 17px 0 0 17px;
  background: #fff;
  box-shadow: -2px 3px 12px #172e4710;
}
.sagz-support[data-device="mobile"] .sagz-support-open {
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0 0 0 14px;
  border: 0;
  border-radius: 14px 0 0 14px;
  background: transparent;
}
.sagz-support[data-device="mobile"] .sagz-support-open svg { width: 17px; height: 17px; }
.sagz-support[data-device="mobile"] .sagz-support-open + .sagz-support-open::before {
  content: "";
  position: absolute;
  top: 0;
  right: 8px;
  width: 14px;
  border-top: 1px solid #eee8ec;
  pointer-events: none;
}
.sagz-support[data-device="mobile"] .sagz-support-phone:not(:first-child)::before {
  content: "";
  position: absolute;
  top: 0;
  right: 8px;
  width: 14px;
  border-top: 1px solid #eee8ec;
  pointer-events: none;
}
.sagz-support[data-device="mobile"] .sagz-support-phone .sagz-support-phone-trigger {
  width: 44px;
  background: transparent;
}
.sagz-support[data-device="mobile"] .sagz-support-open span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
body:has(.m-nav-mask.show) .sagz-support[data-device="mobile"],
body:has(dialog[open]:not(.sagz-support-panel)) .sagz-support[data-device="mobile"] { visibility: hidden; }
.sagz-support[data-device="mobile"] .sagz-support-panel {
  inset: auto 0 0;
  margin: 0 auto;
  width: min(100%, 520px);
  max-width: 100%;
  border-radius: 22px 22px 0 0;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}
.sagz-support[data-device="mobile"] .sagz-support-phone-panel {
  padding: 25px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  border-color: #ebdce0;
  background: #fbf7f8;
  text-align: left;
}
.sagz-support-phone-panel::before {
  content: "";
  position: absolute;
  inset: 8px 0 auto;
  margin: 0 auto;
  width: 30px;
  height: 3px;
  border-radius: 4px;
  background: #d5c1c8;
}
.sagz-support-phone-panel .sagz-support-close { top: 16px; right: 11px; background: transparent; }
.sagz-support-phone-list { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 7px; margin: 13px 0 9px; }
.sagz-support-phone-list a {
  box-sizing: border-box;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 5px 12px;
  border: 1px solid #f0dce1;
  border-radius: 12px;
  background: #fff;
  color: #26364a;
  font-size: 13px;
  text-decoration: none;
}
.sagz-support-phone-list strong { color: #b32440; font-size: 16px; font-variant-numeric: tabular-nums; white-space: normal; overflow-wrap: anywhere; }
.sagz-support[data-device="mobile"] .sagz-support-phone-list strong { font-size: clamp(13px, 4.4vw, 16px); }
.sagz-support-phone-cancel {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: #f0e8ec;
  color: #26364a;
  font: inherit;
  cursor: pointer;
}
@media (min-width: 1400px) and (min-height: 450px) {
  .sagz-support[data-device="pc"] {
    position: fixed;
    top: 58%;
    right: 10px;
    z-index: 20;
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    transform: translateY(-50%);
  }
  .sagz-support[data-device="pc"] .sagz-support-copy { display: none; }
  .sagz-support[data-device="pc"] .sagz-support-actions { flex-direction: column; }
  .sagz-support[data-device="pc"] .sagz-support-open {
    flex-direction: column;
    padding: 9px 5px;
    background: var(--support-green);
    color: #fff;
    box-shadow: 0 6px 18px #17332f22;
  }
  .sagz-support[data-device="pc"] .sagz-support-panel {
    position: fixed;
    inset: clamp(12px, calc(58% - 150px), calc(100% - 330px)) 76px auto auto;
    margin: 0;
  }
  .sagz-support[data-device="pc"] .sagz-support-panel::backdrop { background: transparent; }
  .sagz-support[data-device="pc"] .sagz-support-follow { background: #fff6f7; color: #d90938; border: 1px solid #f2d8df; }
  .sagz-support[data-device="pc"] .sagz-support-phone-trigger { background: #fff5f7; color: #b32440; }
  .sagz-support-phone-popover { top: 0; right: calc(100% + 7px); bottom: auto; }
  .sagz-support-phone-popover::after { inset: 0 auto 0 100%; width: 8px; height: auto; }
}
@media (max-height: 350px) {
  .sagz-support[data-device="mobile"] { top: 70px; }
}
