.contact-widget {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  font-family: "Noto Sans SC", "PingFang SC", system-ui, sans-serif;
}
.contact-trigger {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 16px;
  border: 1px solid
    color-mix(in srgb, var(--accent, #087b4b) 45%, var(--line, #dbe2de));
  border-radius: 999px;
  color: #fff;
  background: #087b4b;
  box-shadow: 0 12px 34px rgba(8, 62, 37, 0.18);
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}
.contact-trigger:hover,
.contact-trigger[aria-expanded="true"] {
  background: #06683f;
  transform: translateY(-1px);
}
html[data-theme="dark"] .contact-trigger {
  color: #06120b;
  border-color: var(--accent, #45dd97);
  background: var(--accent, #45dd97);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.34);
}
html[data-theme="dark"] .contact-trigger:hover,
html[data-theme="dark"] .contact-trigger[aria-expanded="true"] {
  background: #69e8ac;
}
.contact-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: min(340px, calc(100vw - 30px));
  padding: 22px;
  border: 1px solid var(--line, #dbe2de);
  border-radius: 12px;
  color: var(--text, #111814);
  background: var(--panel, var(--surface, #fff));
  box-shadow: 0 24px 70px rgba(10, 31, 19, 0.18);
}
.contact-panel[hidden] {
  display: none;
}
.contact-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.contact-panel h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
}
.contact-panel p {
  margin: 8px 0 0;
  color: var(--sub, var(--muted, #606c65));
  font-size: 12px;
  line-height: 1.7;
}
.contact-close {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line, #dbe2de);
  border-radius: 50%;
  color: var(--sub, var(--muted, #606c65));
  background: transparent;
  cursor: pointer;
}
.contact-close:hover {
  color: var(--accent, #087b4b);
  border-color: var(--accent, #087b4b);
}
.contact-methods {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}
.contact-method {
  min-height: 62px;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 11px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line, #dbe2de);
  border-radius: 8px;
  background: var(--panel-2, var(--surface-2, #f5f7f6));
}
.contact-method:hover {
  color: var(--accent, #087b4b);
  border-color: color-mix(
    in srgb,
    var(--accent, #087b4b) 58%,
    var(--line, #dbe2de)
  );
}
.contact-method-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--accent, #087b4b);
  background: var(--accent-soft, #eaf7f0);
}
.contact-method small,
.contact-method strong {
  display: block;
  min-width: 0;
}
.contact-method small {
  color: var(--sub, var(--muted, #606c65));
  font-size: 9px;
}
.contact-method strong {
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}
.contact-method > i {
  font-size: 10px;
}
html[data-theme="dark"] .contact-panel {
  border-color: var(--line, #2b3931);
  background: var(--panel, var(--surface, #0d1511));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
}
html[data-theme="dark"] .contact-method {
  color: var(--text, #edf6f1);
  border-color: var(--line, #2b3931);
  background: var(--panel-2, var(--surface-2, #111914));
}
html[data-theme="dark"] .contact-method:hover {
  color: var(--accent, #45dd97);
  background: color-mix(
    in srgb,
    var(--accent, #45dd97) 7%,
    var(--panel-2, var(--surface-2, #111914))
  );
}
.purchase-dialog {
  width: min(520px, calc(100vw - 30px));
  margin: auto;
  padding: 30px;
  border: 1px solid var(--line, #dbe2de);
  border-radius: 14px;
  color: var(--text, #111814);
  background: var(--panel, var(--surface, #fff));
  box-shadow: 0 30px 100px rgba(5, 24, 13, 0.28);
}
.purchase-dialog::backdrop {
  background: rgba(3, 9, 6, 0.72);
  backdrop-filter: blur(6px);
}
.purchase-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}
.purchase-kicker {
  color: var(--accent, #087b4b);
  font:
    800 9px/1 ui-monospace,
    "SFMono-Regular",
    monospace;
}
.purchase-dialog h2 {
  margin: 12px 0 0;
  font-size: 27px;
  line-height: 1.2;
}
.purchase-dialog p {
  max-width: 410px;
  margin: 12px 0 0;
  color: var(--sub, var(--muted, #606c65));
  font-size: 13px;
  line-height: 1.75;
}
.purchase-close {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line, #dbe2de);
  border-radius: 50%;
  color: var(--sub, var(--muted, #606c65));
  background: transparent;
  cursor: pointer;
}
.purchase-close:hover {
  color: var(--accent, #087b4b);
  border-color: var(--accent, #087b4b);
}
.purchase-dialog .contact-methods {
  margin-top: 26px;
}
html[data-theme="dark"] .purchase-dialog {
  border-color: var(--line, #2b3931);
  background: var(--panel, var(--surface, #0d1511));
  box-shadow: 0 35px 120px rgba(0, 0, 0, 0.62);
}
html[dir="rtl"] .contact-widget {
  right: auto;
  left: 22px;
}
html[dir="rtl"] .contact-panel {
  right: auto;
  left: 0;
}
html[dir="rtl"] .contact-method {
  grid-template-columns: auto 1fr 36px;
}
html[dir="rtl"] .contact-method-icon {
  grid-column: 3;
  grid-row: 1;
}
html[dir="rtl"] .contact-method span {
  grid-column: 2;
  grid-row: 1;
}
html[dir="rtl"] .contact-method > i {
  grid-column: 1;
  grid-row: 1;
  transform: rotate(180deg);
}
@media (max-width: 620px) {
  .contact-widget {
    right: 15px;
    bottom: 15px;
  }
  .contact-trigger {
    min-height: 44px;
    padding: 0 14px;
  }
  .contact-panel {
    position: fixed;
    right: 15px;
    bottom: 70px;
    left: 15px;
    width: auto;
  }
  .contact-trigger span {
    display: none;
  }
  html[dir="rtl"] .contact-widget {
    right: auto;
    left: 15px;
  }
  html[dir="rtl"] .contact-panel {
    right: 15px;
    left: 15px;
  }
  .purchase-dialog {
    padding: 24px 20px;
  }
  .purchase-dialog h2 {
    font-size: 23px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .contact-trigger {
    transition: none;
  }
}
