/* Shared responsive corrections, loaded after the language and chat styles. */
/* Closed mobile menus leave both the layout and the touch hit-test tree. */
.sheet[hidden] { display: none !important; pointer-events: none !important; }
.sheet { pointer-events: none; }
body.sheet-open .sheet { pointer-events: auto; }
.bottom-nav a, .bottom-nav button, .market-switch { touch-action: manipulation; }
.sheet .card > [data-sheet-close] { width: 44px; height: 44px; font-size: 24px; margin-inline-start: auto; }
.technical-conditions { margin: 0 0 16px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); min-width: 0; }
.technical-conditions legend { padding-inline: 6px; font-weight: 600; }
.technical-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 8px; }
.technical-choices .check { min-height: 44px; margin: 0; padding: 8px; background: var(--surface-2); border-radius: var(--r-md); }
.technical-choices input { flex: 0 0 18px; }
.kpi .k { white-space: normal; overflow-wrap: anywhere; }
.page-head > *, .symbol-head > *, .actions, .row > .fit { max-width: 100%; }
.crumbs, .kv dd { overflow-wrap: anywhere; }
html[dir="ltr"] select { background-position: right 10px center; }
.topbar .topsearch input { width: 160px; }
.who .name { max-width: 100px; overflow: hidden; text-overflow: ellipsis; }
.nav a, .nav summary { padding-inline: 8px; }

@media (max-width: 1199px) {
  /* Keep chat directly accessible without floating over forms and table cells. */
  .chat-launcher { display: none; }
  .bottom-nav { grid-auto-columns: minmax(0, 1fr); }
  .bottom-nav.has-chat a, .bottom-nav.has-chat button { font-size: clamp(9px, 2.7vw, 11px); }
  .bottom-nav a, .bottom-nav button { min-width: 0; }
  .topbar-in .iconbtn { width: 40px; height: 44px; min-width: 40px; }
  .language-switch { min-height: 44px; }
  .topbar-in { padding-inline-start: max(12px, env(safe-area-inset-left)); padding-inline-end: max(12px, env(safe-area-inset-right)); }
  .wrap { padding-inline-start: max(12px, env(safe-area-inset-left)); padding-inline-end: max(12px, env(safe-area-inset-right)); }
  .sheet .card { max-height: 86dvh; }
  .sheet .links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sheet .links > *, .sheet .who-row { overflow-wrap: anywhere; }
  input[type="text"], input[type="password"], input[type="search"],
  input[type="number"], input[type="email"], select, textarea,
  .chat-composer textarea, .topbar .topsearch input {
    font-size: 16px; min-height: 44px; max-width: 100%;
  }
  .btn, button.primary, button.ghost, button.danger, .filters a, .pills a,
  .chat-chip, .row button, .login-card button { min-height: 44px; }
  .row button { padding: 8px 14px; font: inherit; border-radius: var(--r-md); }
  .btn, button.primary, button.ghost, button.danger { white-space: normal; overflow-wrap: anywhere; }
}

@media (max-width: 380px) {
  .topbar-in .brand { font-size: .8rem; }
  .topbar-in .who { gap: 2px; }
  .language-switch { padding-inline: 6px; }
  .login-card { padding: 22px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .sheet .card, .sheet .scrim { transition: none; }
}
