

html, body { overscroll-behavior: none; }

* { -webkit-tap-highlight-color: transparent; }

@media (max-width: 640px) {
  
  .wl-row { content-visibility: auto; contain-intrinsic-size: auto 42px; }
  .scn-res .res-row, .ms-card { content-visibility: auto; contain-intrinsic-size: auto 120px; }

  
  .fav-bar:has(.fb-empty) { display: none !important; }

  
  .top-r .auth-btn, #themeBtn, .topbar .search { min-height: 40px; min-width: 40px; }
  .chart-head .hbtn, .chart-head #symBtn, .chart-head #tfMob { min-height: 40px; }
  .chart-head .hbtn:not(#symBtn):not(#tfMob) { min-width: 40px; }
  .chart-foot .hbtn.rng { min-width: 36px; height: 30px; }

  
  .mbar a { position: relative; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
  .mbar a:active { color: var(--text); }
  .mbar a:active .ico { transform: scale(.9); }
  .mbar a .ico { transition: transform .12s; }
  .mbar a.on::before { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; border-radius: 0 0 2px 2px; background: var(--brand-2); }
  .hbtn:active, .tool:active, .wl-row:active, .pop button:active { background: var(--hover, rgba(255,255,255,.06)); }
  .chart-head, .chart-foot, .mbar, .topbar { -webkit-user-select: none; user-select: none; }
  
  #kc, .kc-grid { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

  
  .pop.m-more-pop { touch-action: pan-y; overscroll-behavior: contain; }
  .pop.m-more-pop.dragging, .ip-sheet.dragging { transition: none !important; }
  .side .panel, .pop, .modal-b { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
}
@media (prefers-reduced-motion: reduce) { .mbar a .ico { transition: none; } }


@media (hover: none) and (pointer: coarse) and (orientation: landscape) and (max-height: 520px) {
  :root:root { --topbar-h: 0px; }
  .topbar, .chart-foot, .legal-bar { display: none !important; }
  .shell { height: 100%; padding-left: max(var(--gap), env(safe-area-inset-left)); padding-right: max(var(--gap), env(safe-area-inset-right)); }
}

@media (hover: none) and (pointer: coarse) { .fav-bar:has(.fb-empty) { display: none !important; } }

@media (max-width: 640px) { html.kb-open .mbar { display: none; } }

@media (hover: none), (max-width: 640px) {
  .ax-al:has(> [data-axis="normal"]:not(.on)) { display: flex !important; opacity: 1 !important; }
  .ax-al [data-axis="log"] { display: none; }
  .ax-al [data-axis="normal"] { width: 30px; height: 30px; font-size: 13px; border-radius: 6px; }
}


#kc .touch-aim { position: absolute; left: -11px; top: -11px; width: 22px; height: 22px; border: 3px solid #2962ff; border-radius: 50%; box-sizing: border-box; pointer-events: none; z-index: 24; will-change: transform; }
#kc .touch-aim[hidden] { display: none; }


@media (max-width: 560px) { #searchOv { padding: 0; align-items: stretch; } #searchOv .modal.s-modal, #searchOv .modal.s-modal.s-cmp { width: 100vw; height: 100dvh; border-radius: 0; } #searchOv .s-modal .modal-h { padding-top: max(14px, env(safe-area-inset-top)); } }


@media (max-width: 560px) {
  #indOv .tvi-list { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
}

@media (max-width: 640px) {
  
  #chartWin .chart-head #lastPx { display: none !important; }
  
  .mbar.mbar a { font-size: 12.5px; color: var(--text-2); }
  .mbar.mbar a.on { color: var(--brand-2); }
  
  .top-r .auth-btn:not(.in), .top-r #themeBtn { flex-direction: column; justify-content: center; gap: 1px; padding-top: 2px; padding-bottom: 2px; line-height: 1; }
  .top-r .auth-btn:not(.in) .lbl { display: block !important; font-size: 10px; font-weight: 600; color: var(--text-2); }
  .top-r #themeBtn::after { content: '테마'; font-size: 10px; font-weight: 600; color: var(--text-2); }
  .top-r .auth-btn:not(.in) .ico, .top-r #themeBtn .ico { width: 18px; height: 18px; }
}
@media (max-width: 360px) { .mbar.mbar a { font-size: 11.5px; } }


@media (hover: none) and (pointer: coarse) and (orientation: landscape) and (max-height: 520px) {
  :root:root { --hh: 44px; }
  #chartWin .chart-head { height: 44px !important; }
  #chartWin .chart-head :is(.hbtn, button) { min-height: 40px; }
  #chartWin .chart-head :is(#tfMore, #saveMenuBtn) { min-width: 28px; }
  #chartWin .chart-head #symBtn { min-width: 64px; }
  
  #drawBar, #rail { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; -webkit-mask-image: linear-gradient(#000 calc(100% - 28px), transparent); mask-image: linear-gradient(#000 calc(100% - 28px), transparent); padding-bottom: 24px; }
  #drawBar::-webkit-scrollbar, #rail::-webkit-scrollbar { display: none; }
}


@media (hover: none) and (pointer: coarse) and (min-width: 641px) {
  #drawBar .tool { min-width: 40px; min-height: 40px; }
  #drawBar .dg .dg-more { width: 20px; height: 40px; right: -4px; opacity: 1; font-size: 13px; }
  #chartWin .draw-bar { width: 56px; }
  #rail button { min-height: 44px; }
  .al-acts .tool { width: 40px; height: 40px; }
}


.ul-qt { grid-column: 1 / -1; justify-self: start; min-height: 36px; padding: 0; border: 0; background: none; color: var(--brand-2); font: inherit; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ul-tip p { margin: 0; line-height: 1.6; }
.ul-tip p + p { margin-top: 6px; }
.ul-tip p b { display: block; color: var(--text); }
.ul-tip .ul-tip-pc { color: var(--text-3); font-size: 12px; }
.ul-nocode { grid-column: 1 / -1; margin: 4px 0 0; font-size: 13px; color: var(--text); line-height: 1.55; word-break: keep-all; }
.ul-join.first { margin-top: 4px; padding-top: 0; border-top: 0; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.ul-join-s { word-break: keep-all; }
@media (hover: none) and (pointer: coarse) { .ul-qt { min-height: 44px; } }
