/* Shared page share sheet (LINE / WhatsApp) — category pages */
.tm-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.1;
  white-space: nowrap;
}
.tm-share-btn:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.55);
}
.tm-cta .tm-share-btn {
  /* sits with hero CTAs */
}
.tm-share-fab {
  position: fixed;
  right: 12px;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  box-shadow: 0 10px 28px rgba(2, 6, 23, 0.35);
  background: #0f766e;
  border-color: #5eead4;
  color: #ecfeff;
}
@media (min-width: 901px) {
  .tm-share-fab {
    bottom: 24px;
    right: 20px;
  }
}

.tm-share-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10040;
  background: rgba(2, 6, 23, 0.55);
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}
.tm-share-overlay.open { display: flex; }
.tm-share-sheet {
  width: min(440px, 100%);
  background: #fff;
  color: #0f172a;
  border-radius: 18px 18px 14px 14px;
  padding: 16px;
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.4);
  border: 1px solid #cbd5e1;
}
html.dark .tm-share-sheet,
body.dark .tm-share-sheet {
  background: #0f172a;
  color: #e5eef7;
  border-color: #1e293b;
}
.tm-share-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.tm-share-head strong {
  font-size: 1rem;
  font-weight: 800;
}
.tm-share-close {
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
  color: inherit;
  border-radius: 10px;
  width: 36px;
  height: 36px;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}
html.dark .tm-share-close,
body.dark .tm-share-close {
  background: #1e293b;
  border-color: #334155;
}
.tm-share-preview {
  margin: 0 0 12px;
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-family: ui-monospace, "Cascadia Code", "Segoe UI", monospace;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 220px;
  overflow: auto;
}
html.dark .tm-share-preview,
body.dark .tm-share-preview {
  background: #111827;
  border-color: #1e293b;
}
.tm-share-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.tm-share-action {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  border-radius: 12px;
  padding: 12px 10px;
  font: inherit;
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
}
html.dark .tm-share-action,
body.dark .tm-share-action {
  background: #1e293b;
  border-color: #334155;
  color: #e5eef7;
}
.tm-share-action:hover { border-color: #0f766e; }
.tm-share-action.wa {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #065f46;
}
.tm-share-action.line {
  background: #ecfdf3;
  border-color: #86efac;
  color: #14532d;
}
html.dark .tm-share-action.wa {
  background: #064e3b;
  border-color: #34d399;
  color: #a7f3d0;
}
html.dark .tm-share-action.line {
  background: #14532d;
  border-color: #4ade80;
  color: #bbf7d0;
}
.tm-share-action.native {
  background: #ccfbf1;
  border-color: #2dd4bf;
  color: #115e59;
  grid-column: 1 / -1;
}
html.dark .tm-share-action.native {
  background: #134e4a;
  border-color: #2dd4bf;
  color: #99f6e4;
}
.tm-share-status {
  margin-top: 10px;
  min-height: 1.2em;
  font-size: 0.82rem;
  font-weight: 700;
  color: #64748b;
}
.tm-share-status.ok { color: #16a34a; }
html.dark .tm-share-status.ok { color: #4ade80; }

@media (max-width: 420px) {
  .tm-share-actions { grid-template-columns: 1fr; }
  .tm-share-action.native { grid-column: auto; }
}
