/* iOS can zoom when an editable field is smaller than 16px. Keep page zoom
 * available and give forms one minimum on compact and touch layouts.
 * The selector also covers teleported dialogs and standalone sign-in pages.
 * Fields designed with larger text declare --fp-field-size on the field. */
@media (max-width: 1023px), (any-pointer: coarse) {
  :where(
    input:not([type]), input[type="text"], input[type="search"], input[type="number"],
    input[type="tel"], input[type="email"], input[type="password"], input[type="url"],
    input[type="date"], input[type="datetime-local"], input[type="month"], input[type="week"],
    input[type="time"], select, textarea, [contenteditable="true"], [contenteditable="plaintext-only"]
  ) {
    font-size: max(16px, var(--fp-field-size, 16px)) !important;
  }
}

/* Selected text everywhere: a soft honey with the page's ink, not the browser's blue
 * (the owner, 2026-11-21: 「文字选中的显示也需要优化，蓝色太丑了」). Plain colours: Chrome 109 paints ::selection. */
::selection {
  background-color: #f2dfb0;
  color: #121926;
}

/* While awaiting a replacement, show a caret. Touch leaves the control
 * visually empty, and the pointer script restores it if the user leaves. */
[data-fp-replace-field] {
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  caret-color: var(--svc-ink, #121926);
}
[data-fp-replace-field]::selection {
  color: transparent;
  background: transparent;
}
