.tile { position: relative; }

.tile-share-btn {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  font-family: -apple-system, "Hiragino Sans", sans-serif;
  padding: 0 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.tile-share-btn:hover, .tile-share-btn:active {
  background: rgba(185, 151, 79, 0.18);
  color: #b9974f;
  border-color: rgba(185, 151, 79, 0.5);
}

.share-hint {
  margin-top: 20px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.34);
  text-align: center;
  letter-spacing: 0.08em;
}

.page-share-btn {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  right: 12px;
  z-index: 100;
  height: 40px;
  padding: 0 14px 0 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(0, 0, 0, 0.55);
  color: #b9974f;
  border: 1px solid rgba(185, 151, 79, 0.5);
  backdrop-filter: blur(6px);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1;
}
.page-share-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.page-share-btn span {
  display: inline-block;
}
.page-share-btn:hover, .page-share-btn:active {
  background: rgba(185, 151, 79, 0.25);
}

.share-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
}
.share-modal.open { display: block; }

.share-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.66);
  backdrop-filter: blur(4px);
}

.share-sheet {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(440px, 100%);
  background: linear-gradient(160deg, #07233b, #03192d);
  color: white;
  padding: 28px 24px calc(env(safe-area-inset-bottom, 12px) + 24px);
  border-top: 1px solid rgba(185, 151, 79, 0.45);
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
}

.share-eyebrow {
  font-size: 10px;
  letter-spacing: 0.28em;
  color: #b9974f;
  margin-bottom: 6px;
}
.share-title {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 18px;
  letter-spacing: 0.04em;
}

.share-qr {
  display: block;
  width: 220px;
  height: 220px;
  margin: 0 auto 14px;
  background: white;
  padding: 12px;
  box-sizing: content-box;
}

.share-url {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.66);
  word-break: break-all;
  text-align: center;
  margin-bottom: 16px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.share-actions {
  display: flex;
  gap: 8px;
}
.share-actions button {
  flex: 1;
  padding: 13px 0;
  background: transparent;
  color: white;
  border: 1px solid rgba(185, 151, 79, 0.5);
  font-size: 13px;
  letter-spacing: 0.04em;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.share-actions button:hover, .share-actions button:active {
  background: rgba(185, 151, 79, 0.18);
}
.share-actions button.muted {
  border-color: rgba(255, 255, 255, 0.18);
}
