/* Davin AI — responsive and cross-browser polish layer (additive, no framework migration). */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
*, *::before, *::after { box-sizing: border-box; }
body { min-width: 320px; max-width: 100%; overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; }
button, [role="button"], a { touch-action: manipulation; }
button { -webkit-appearance: none; appearance: none; }
img, svg, canvas, video, iframe { max-width: 100%; }
input, select, textarea { max-width: 100%; min-width: 0; }
:focus-visible { outline: 2px solid var(--accent, #f0b429); outline-offset: 2px; }
.tab { min-width: 0; max-width: 100%; }
.tab > *, .main > *, .analysis-layout > *, .chart-content > * { min-width: 0; }
.card, .panel, .na-card, .hm-card, .bt-card, .lc-panel { min-width: 0; max-width: 100%; }
pre, code, .mono, .na-fundamental-text, .na-prerelease-text { overflow-wrap: anywhere; }
.btn-primary, .btn-secondary, .bottom-btn { min-height: 40px; }
select, input:not([type="checkbox"]):not([type="radio"]), textarea { min-height: 40px; }

/* Consistent, intentionally quiet Coming Soon page used by parked features. */
.davin-coming-soon {
  min-height: min(70vh, 680px); width: 100%; padding: clamp(32px, 7vw, 88px) clamp(18px, 5vw, 48px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  background: radial-gradient(ellipse at 50% 15%, rgba(240,180,41,.09), transparent 52%);
  color: var(--text, #f4f4f5); isolation: isolate;
}
.dcs-icon {
  display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 22px;
  border: 1px solid rgba(240,180,41,.32); border-radius: 18px;
  background: rgba(240,180,41,.09); color: var(--accent, #f0b429);
  font-size: 32px; font-weight: 700; line-height: 1;
}
.dcs-eyebrow { margin-bottom: 10px; color: var(--accent, #f0b429); font-size: 10px; font-weight: 800; letter-spacing: .18em; }
.davin-coming-soon h1 { max-width: 720px; margin: 0; color: var(--text, #f4f4f5); font-size: clamp(25px, 4vw, 38px); font-weight: 800; letter-spacing: -.035em; line-height: 1.15; }
.davin-coming-soon p { max-width: 460px; margin: 14px 0 22px; color: var(--text2, #a1a1aa); font-size: clamp(13px, 1.7vw, 15px); line-height: 1.7; }
.dcs-status { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 7px 13px; border: 1px solid var(--border, #303038); border-radius: 999px; background: var(--bg2, #17171d); color: var(--text2, #a1a1aa); font-size: 11px; font-weight: 700; }
.dcs-status i { display: block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent, #f0b429); }

/* Mobile: prevent cramped controls, clipped cards, and fixed-width chart panels. */
@media (max-width: 767px) {
  body { padding-bottom: env(safe-area-inset-bottom, 0px); }
  .main { width: 100%; max-width: 100vw; }
  .tab { padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); }
  #tab-autotrade, #tab-livechart, #tab-backtest { padding-left: 0 !important; padding-right: 0 !important; }
  .davin-coming-soon { min-height: 62vh; padding-top: 42px; padding-bottom: 70px; }
  .dcs-icon { width: 56px; height: 56px; border-radius: 16px; font-size: 28px; margin-bottom: 18px; }
  .bottom-nav { padding-bottom: env(safe-area-inset-bottom, 0px); }
  .bottom-nav button, .bottom-btn { min-width: 0; min-height: 40px; }
  .grid, [class*="grid-"] { min-width: 0; }
  table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .na-card, .na-section, .na-direction-card, .na-fundamental-box { overflow-wrap: anywhere; }
  .na-pair-row { grid-template-columns: minmax(58px, auto) minmax(30px, 1fr) auto; }
  .na-pair-strength { display: none; }
  .lc-header, .topbar { max-width: 100%; }
}
@media (max-width: 420px) {
  .davin-coming-soon { padding-left: 16px; padding-right: 16px; }
  .davin-coming-soon p { font-size: 13px; }
  button, .btn-primary, .btn-secondary { max-width: 100%; }
  .na-top-pills { flex-wrap: wrap; }
  .na-bias-chip { max-width: 100%; overflow-wrap: anywhere; }
}
@media (min-width: 768px) {
  .davin-coming-soon { min-height: 68vh; }
  .tab:not(#tab-livechart):not(#tab-autotrade):not(#tab-backtest) { padding-bottom: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Small neutral badges for parked features in navigation and tool cards. */
.dcs-nav-badge { display:inline-flex; align-items:center; vertical-align:middle; margin-left:5px; padding:2px 6px; border:1px solid rgba(148,163,184,.28); border-radius:999px; background:rgba(148,163,184,.10); color:var(--text2,#a1a1aa); font-size:9px; font-weight:800; line-height:1.35; white-space:nowrap; }
@media (max-width:420px) { .dcs-nav-badge { font-size:8px; padding:2px 5px; } }
