.wp .top-actions { display: flex; align-items: center; gap: 10px; }
.wp .top-refresh {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  cursor: pointer;
}
.wp .top-refresh:focus-visible { outline: 2px solid var(--good); outline-offset: 2px; }
.wp .top-refresh.is-spinning svg { animation: wp-spin 0.8s linear infinite; }
@keyframes wp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .wp .top-refresh.is-spinning svg { animation: none; }
}
.wp .top-add {
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: var(--good-fill); color: var(--good);
  font: inherit; font-size: 28px; line-height: 1; cursor: pointer;
}
.wp .top-add:focus-visible { outline: 2px solid var(--good); outline-offset: 2px; }

.wp .capture-dialog {
  width: 100%; max-width: 100%; margin: 0; left: 0; right: 0; bottom: 0; top: auto;
  padding: 8px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  border: 0; border-radius: 20px 20px 0 0; background: var(--bg); color: var(--fg);
  font: inherit; outline: none;
}
.wp .capture-dialog::backdrop { background: rgba(0, 0, 0, 0.32); }
.wp .capture-dialog[open] { animation: wp-capture-in 180ms ease-out; }
@keyframes wp-capture-in {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .wp .capture-dialog[open] { animation: none; }
}
@media (min-width: 700px) {
  .wp .capture-dialog {
    width: min(480px, calc(100vw - 32px)); max-width: 480px;
    margin: auto auto 0; left: auto; right: auto; bottom: auto;
    border-radius: 20px;
  }
}

.wp .capture-grip { width: 36px; height: 4px; border-radius: 2px; background: var(--line); margin: 8px auto 12px; }

.wp .capture-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.wp .capture-head h2 {
  margin: 0; font-size: 11px; letter-spacing: 0.14em; color: var(--muted); font-weight: 600;
  text-transform: none;
}
.wp .capture-close {
  min-height: 32px; padding: 4px 6px; border: 0; border-radius: 6px; background: none;
  color: var(--faint); font: inherit; font-size: 13px; cursor: pointer; outline: none;
}
.wp .capture-close:focus-visible { outline: 1px solid var(--faint); outline-offset: 2px; }

.wp .capture-choice {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; min-height: 56px; padding: 0;
  border: 0; border-bottom: 1px solid var(--line); background: none;
  color: var(--fg); text-align: left; font: inherit; font-size: 16px; cursor: pointer;
}
.wp .capture-choice:last-of-type { border-bottom: 0; }
.wp .capture-choice:active { background: var(--cell); }
.wp .capture-choice:focus-visible { outline: 1px solid var(--good); outline-offset: -2px; }
.wp .capture-chevron { color: var(--faint); font-size: 18px; }

.wp #wp-add-text-form label { display: block; margin: 12px 0 8px; font-size: 13px; color: var(--muted); }
.wp #wp-add-text {
  display: block; width: 100%; min-height: 120px; resize: vertical; padding: 12px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg);
  color: var(--fg); font: inherit; font-size: 16px;
}
.wp #wp-add-text:focus-visible { outline: none; border-color: var(--good); }
.wp .capture-form-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.wp #wp-add-text-send {
  min-height: 48px; border: 0; border-radius: 12px; background: var(--good); color: var(--bg);
  font: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
}
.wp #wp-add-text-back {
  min-height: 32px; border: 0; background: none; color: var(--faint);
  font: inherit; font-size: 13px; cursor: pointer;
}

.wp .capture-status { margin: 8px 0 0; }
.wp .capture-status p { margin: 0; min-height: 18px; color: var(--muted); font-size: 13px; }
.wp .capture-status p.is-error { color: var(--warn); }
.wp .capture-retry {
  margin-top: 8px; min-height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 10px;
  background: none; color: var(--fg); font: inherit; font-size: 14px; cursor: pointer;
}

.wp #wp-health-send {
  min-height: 48px; border: 0; border-radius: 12px; background: var(--good); color: var(--bg);
  font: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
}
.wp #wp-health-cancel {
  min-height: 32px; border: 0; background: none; color: var(--faint);
  font: inherit; font-size: 13px; cursor: pointer;
}
