.content-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  padding: 0;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 30%, transparent);
  text-underline-offset: .18em;
}
.content-link:hover { text-decoration-color: currentColor; }

.content-dialog {
  border: 0;
  border-radius: 22px;
  box-shadow: 0 28px 90px rgba(15, 23, 42, .28);
  color: var(--text, #172033);
  margin: auto;
  max-height: min(90vh, 900px);
  max-width: min(820px, calc(100vw - 28px));
  padding: 0;
  width: 100%;
}
.content-dialog::backdrop { background: rgba(15, 23, 42, .58); backdrop-filter: blur(3px); }
.content-dialog__shell { background: var(--card, #fff); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: min(90vh, 900px); }
.content-dialog__header,
.content-dialog__footer { align-items: center; display: flex; gap: 12px; padding: 18px 22px; }
.content-dialog__header { border-bottom: 1px solid var(--border, #e2e8f0); justify-content: space-between; }
.content-dialog__header h2 { margin: 2px 0 0; }
.content-dialog__footer { border-top: 1px solid var(--border, #e2e8f0); justify-content: flex-end; }
.content-dialog__body { overflow: auto; padding: 22px; }
.content-dialog__loading { color: var(--muted, #64748b); padding: 42px 12px; text-align: center; }
.content-detail__hero { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.content-detail__images { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.content-detail__images figure { margin: 0; }
.content-detail__images img { border-radius: 14px; height: 190px; object-fit: contain; width: 100%; background: #f8fafc; }
.content-detail__images figcaption { color: var(--muted, #64748b); font-size: .72rem; margin-top: 4px; }
.content-detail__meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.content-detail__meta span { background: #f1f5f9; border-radius: 999px; padding: 6px 10px; }
.content-detail__section { border-top: 1px solid var(--border, #e2e8f0); margin-top: 18px; padding-top: 16px; }
.content-detail__section h3 { margin: 0 0 10px; }
.routine-render { display: grid; gap: 8px; }
.routine-render__heading { font-size: 1.08rem; margin: 10px 0 2px; }
.routine-render__step { align-items: baseline; background: #f8fafc; border-radius: 11px; display: flex; gap: 10px; justify-content: space-between; padding: 10px 12px; }
.routine-render__step span:first-child::before { color: var(--primary, #2563eb); content: "•"; font-weight: 900; margin-right: 9px; }
.routine-render__dose { color: var(--muted, #64748b); font-weight: 650; white-space: nowrap; }
.routine-render__note { border-left: 3px solid #93c5fd; color: var(--muted, #64748b); padding: 7px 10px; }
.content-detail__source { display: inline-flex; margin-top: 8px; }

@media (max-width: 640px) {
  .content-dialog { border-radius: 20px 20px 0 0; margin: auto 0 0; max-height: 94vh; max-width: 100vw; width: 100vw; }
  .content-dialog__header, .content-dialog__footer, .content-dialog__body { padding: 16px; }
}

@media print {
  body.content-detail-printing > *:not(.content-dialog[open]) { display: none !important; }
  .content-dialog[open] { box-shadow: none; max-height: none; max-width: none; position: static; width: 100%; }
  .content-dialog__header button, .content-dialog__footer { display: none !important; }
  .content-dialog__body { overflow: visible; }
}
