.has-share {
  padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
}

.share-dock {
  position: fixed;
  z-index: 50;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 40px);
}

.share-dock button {
  display: block;
  min-width: 180px;
  max-width: 100%;
  min-height: 48px;
  padding: 12px 32px;
  border: 1px solid #f0d59b;
  border-radius: 999px;
  background: linear-gradient(135deg, #f0d59b, #c09a51);
  box-shadow: 0 8px 30px #0009, 0 0 0 5px #21190e80;
  color: #30220c;
  cursor: pointer;
  font: 600 16px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 2px;
  overflow-wrap: anywhere;
}

.share-dock button:hover {
  background: linear-gradient(135deg, #f7e2b8, #d1ac66);
}

.share-dock button:focus-visible {
  outline: 2px solid #fff0ce;
  outline-offset: 5px;
}

.share-toast {
  position: fixed;
  z-index: 60;
  bottom: calc(89px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 40px);
  padding: 12px 18px;
  border: 1px solid #b08b4c;
  border-radius: 10px;
  background: #17130ef5;
  box-shadow: 0 8px 30px #0007;
  color: #efd5a0;
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  text-align: center;
}

.share-toast:empty {
  display: none;
}

.share-visible-url {
  display: block;
  width: min(520px, 100%);
  min-width: 250px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #a5804366;
  border-radius: 5px;
  background: #282015;
  color: #f0d59b;
  font: 12px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  user-select: text;
}

.share-copy-field {
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  font-size: 16px;
}

@media print {
  .has-share { padding-bottom: 0; }
  .share-dock, .share-toast { display: none; }
}
