.bookmark-button[hidden] { display: none; }
.bookmark-button { color: var(--blue); cursor: pointer; }
.bookmark-dialog {
  width: min(440px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 80px #10264b33;
}
.bookmark-dialog::backdrop { background: #10264b66; }
.bookmark-dialog h2 { font-size: 1.35rem; }
.bookmark-intro { margin-top: 8px; color: var(--muted); font-size: .9375rem; }
.bookmark-help {
  margin-block: 20px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: #1b4cbd;
}
.bookmark-dialog label { display: block; margin-bottom: 6px; font-size: .875rem; font-weight: 600; }
.bookmark-dialog input {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: .875rem;
}
.bookmark-dialog input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.bookmark-status { min-height: 24px; margin-top: 8px; color: var(--muted); font-size: .8125rem; }
.bookmark-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }
.bookmark-actions .btn { cursor: pointer; min-height: 44px; }
/* Keep the additional header action from squeezing the full navigation. */
@media (min-width: 1281px) {
  .site-header .header-inner:has(.bookmark-button) {
    flex-wrap: wrap;
    justify-content: space-between;
    column-gap: 20px;
    row-gap: 0;
    padding-top: 12px;
  }
  .site-header .header-inner:has(.bookmark-button) .primary-nav {
    order: 3;
    width: 100%;
    min-width: 0;
    margin: 8px 0 0;
    gap: 22px;
    overflow-x: auto;
  }
  .site-header .header-inner:has(.bookmark-button) .primary-nav a { min-height: 48px; flex: 0 0 auto; }
}
@media (max-width: 600px) {
  .bookmark-dialog { padding: 24px 20px; }
  .bookmark-actions .btn { flex: 1; }
}
