/* Shared website / reader / iOS control feedback. Loaded after view styles. */
:root{--ew-focus:#795d91;--ew-field:#ad99bd}
html:root :is(button,a,input,select,textarea,summary,[tabindex]):focus-visible{
  outline:2px solid var(--ew-focus);outline-offset:3px;
}
/* Native selects and restored dialog focus can match :focus-visible after a tap. */
html:root[data-ew-input=pointer] :is(button,a,input,select,textarea,summary,[tabindex]):focus{
  outline:none;
}
html:root .date-picker.ios-date:focus-within{outline:none}
html:root[data-ew-input=keyboard] .date-picker.ios-date:focus-within{
  outline:2px solid var(--ew-focus);outline-offset:3px;
}
/* One calm field boundary, never an extra rectangle around the inner textarea. */
html:root :is(.chat-composer,.on-composer) textarea:focus{
  outline:none;box-shadow:none;
}
html:root :is(.chat-composer,.on-composer):focus-within{
  border-color:var(--ew-field);box-shadow:0 4px 20px #5143600b;
}
html:root[data-ew-input=keyboard] :is(.chat-composer,.on-composer):has(textarea:focus-visible){
  outline:2px solid var(--ew-focus);outline-offset:3px;
}
html:root :is(.field input,.field textarea,.field select):focus{
  border-color:var(--ew-field);
}
/* The language control shares the rounded silhouette of the rest of the UI. */
.language select{border-radius:999px;min-height:44px;transition:background-color .16s ease}
button,a,summary,select{-webkit-tap-highlight-color:transparent;touch-action:manipulation}
@media(hover:hover) and (pointer:fine){
  .language select:hover{background-color:#795d910d}
}
/* Small press feedback without a layout jump; selected states remain separate. */
html:root :is(button,a,summary,select):active:not(:disabled){opacity:.86}
@media(prefers-reduced-motion:reduce){
  html:root :is(button,a,summary,select){transition:none}
  html:root button:active:not(:disabled){transform:none}
}
@media(forced-colors:active){
  :root{--ew-focus:Highlight;--ew-field:Highlight}
}
