.contact-widget {
  position: fixed;
  z-index: 50;
  right: max(16px, env(safe-area-inset-right));
  bottom: clamp(24px, 10vh, 110px);
  color: #f8f1e5;
  font-family: Arial, Helvetica, sans-serif;
}

.contact-widget details { position: relative; }
.contact-widget summary { list-style: none; }
.contact-widget summary::-webkit-details-marker { display: none; }
.contact-widget-toggle {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 1px solid rgba(244, 213, 143, .72);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #9d6d31, #5c3a19 72%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35), 0 0 0 7px rgba(216, 169, 86, .1);
  color: #fff7e9;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.contact-widget-toggle:hover,
.contact-widget details[open] .contact-widget-toggle {
  transform: scale(1.06);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .42), 0 0 0 9px rgba(216, 169, 86, .14);
}
.contact-widget-toggle-icon {
  width: 29px;
  height: 24px;
  border: 3px solid currentColor;
  border-radius: 50%;
  position: relative;
}
.contact-widget-toggle-icon::after {
  content: "";
  position: absolute;
  left: 1px;
  bottom: -7px;
  width: 9px;
  height: 9px;
  border-left: 3px solid currentColor;
  transform: skew(-25deg) rotate(-19deg);
  background: transparent;
}
.contact-widget-toggle-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.contact-widget-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 14px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(270px, calc(100vw - 32px));
  opacity: 0;
  visibility: hidden;
  transform: translateY(9px) scale(.96);
  transform-origin: bottom right;
  transition: opacity .2s, transform .2s, visibility .2s;
}
.contact-widget details[open] .contact-widget-menu,
.contact-widget details:hover .contact-widget-menu,
.contact-widget details:focus-within .contact-widget-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.contact-widget-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 9px 13px;
  border: 1px solid rgba(238, 209, 153, .22);
  border-radius: 13px;
  background: rgba(28, 23, 18, .97);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .27);
  color: #f7efe1;
  transition: background .2s, border-color .2s, transform .2s;
}
.contact-widget-link:hover {
  border-color: rgba(238, 209, 153, .65);
  background: #33261a;
  transform: translateX(-3px);
}
.contact-widget-link-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #725027;
  color: #fff0c9;
  font-size: 17px;
  line-height: 1;
}
.contact-widget-link-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.contact-widget-link-copy strong { font-size: 13px; font-weight: 700; }
.contact-widget-link-copy small { color: #cdb993; font-size: 11px; overflow-wrap: anywhere; }
.contact-widget-link--email .contact-widget-link-icon { background: #554636; }

@media (max-width: 760px) {
  .contact-widget {
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(77px + env(safe-area-inset-bottom));
  }
  .contact-widget-toggle { width: 56px; height: 56px; }
  .contact-widget-menu { bottom: calc(100% + 11px); width: min(250px, calc(100vw - 24px)); }
  .contact-widget-link { min-height: 54px; }
}

@media (prefers-reduced-motion: reduce) {
  .contact-widget-toggle,
  .contact-widget-link,
  .contact-widget-menu { transition: none; }
}

/* Use fixed-shape masks instead of font glyphs so every mark is optically centered. */
.contact-widget-link-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 0;
  line-height: 0;
}
.contact-widget-link-icon::before {
  display: block;
  width: 18px;
  height: 18px;
  background: currentColor;
  content: "";
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}
.contact-widget-link:nth-child(1) .contact-widget-link-icon::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0%200%2024%2024'%3E%3Cpath d='M21%203L3%2010.5l7%202.5L12.5%2020%2015%2014l4-3.5L21%203ZM10%2013l9-8' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0%200%2024%2024'%3E%3Cpath d='M21%203L3%2010.5l7%202.5L12.5%2020%2015%2014l4-3.5L21%203ZM10%2013l9-8' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.contact-widget-link:nth-child(2) .contact-widget-link-icon::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0%200%2024%2024'%3E%3Cpath d='M6.5%203.5L10%205%208.5%209a14%2014%200%200%200%206.5%206.5l4-1.5%201.5%203.5-2.5%202.5C10%2020%204%2014%204%206l2.5-2.5Z' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0%200%2024%2024'%3E%3Cpath d='M6.5%203.5L10%205%208.5%209a14%2014%200%200%200%206.5%206.5l4-1.5%201.5%203.5-2.5%202.5C10%2020%204%2014%204%206l2.5-2.5Z' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.contact-widget-link:nth-child(3) .contact-widget-link-icon::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0%200%2024%2024'%3E%3Cpath d='M3%205.5h18v13H3zM3%206l9%207%209-7' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0%200%2024%2024'%3E%3Cpath d='M3%205.5h18v13H3zM3%206l9%207%209-7' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.contact-widget-toggle-icon { transform: translateY(-2px); }
