.share-page-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 7px;
  min-width: 44px;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--rule, #d5e1dc);
  border-radius: 9px;
  background: transparent;
  color: var(--ink-soft, #526671);
  font: inherit;
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.share-page-button[hidden],
.share-notice[hidden],
.share-manual-copy[hidden] { display: none !important; }

.share-page-button svg { display: block; width: 18px; height: 18px; flex: none; }
.share-page-button:hover { color: var(--green, #087a68); border-color: var(--green, #087a68); background: var(--green-soft, #e7f0ec); }
.share-page-button[aria-disabled="true"] { cursor: progress; opacity: .65; }
.share-page-button:focus-visible,
.share-notice-close:focus-visible,
.share-manual-copy input:focus-visible { outline: 3px solid var(--green, #087a68); outline-offset: 3px; }

.share-notice {
  box-sizing: border-box;
  position: fixed;
  z-index: 1200;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  width: min(410px, calc(100vw - 40px));
  padding: 20px 54px 20px 20px;
  border: 1px solid var(--rule, #d5e1dc);
  border-radius: 12px;
  background: var(--panel, #f8faf9);
  color: var(--ink, #162633);
  box-shadow: 0 8px 32px rgba(22, 38, 51, .18);
  font: .84rem/1.6 var(--font-body, system-ui, sans-serif);
  text-align: left;
}

.share-notice-status { margin: 0; color: inherit; font: inherit; }
.share-notice-close {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-soft, #526671);
  font: 1.55rem/1 system-ui, sans-serif;
  cursor: pointer;
}
.share-notice-close:hover { background: var(--green-soft, #e7f0ec); }
.share-manual-copy { display: block; margin-top: 12px; font-size: .75rem; font-weight: 600; }
.share-manual-copy span { display: block; margin-bottom: 6px; }
.share-manual-copy input {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--rule, #d5e1dc);
  border-radius: 7px;
  background: var(--bg, #eef3f1);
  color: var(--ink, #162633);
  font: .85rem/1.4 var(--font-body, system-ui, sans-serif);
}

@media (max-width: 820px) {
  .share-page-button { width: 44px; padding: 9px; }
  .share-page-label { display: none; }
}

@media (max-width: 480px) {
  .share-notice { right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); width: calc(100vw - 24px); }
}
