
@media (pointer: coarse) {
  html, body { overscroll-behavior: none; }
  html, body { touch-action: manipulation; }
  html { -webkit-tap-highlight-color: transparent; }
  body { -webkit-touch-callout: none; }
  input, textarea, [contenteditable="true"], .chat-log .chat-text { -webkit-touch-callout: default; -webkit-user-select: text; user-select: text; }
  :where(button, a[href], [role="button"], [role="tab"], summary):active:not(:disabled, [aria-disabled="true"]) { filter: brightness(.8); scale: .97; }
  .btn:active:not(:disabled) { filter: brightness(.8); scale: .97; }
}

@media (pointer: coarse) {
  @media (min-width: 761px) and (min-height: 501px), (min-width: 761px) and (pointer: fine), (min-width: 761px) and (pointer: none) {
    html { font-size: clamp(14px, calc(min(.8333vw, 1.4815vh) * var(--ui-user-scale)), 22px); }
    .is-hud { --hud-rail-w: 3.95rem; }
    .is-hud #app .hud-rail-btn { width: 3.15rem; height: 3.15rem; }
    .is-hud #app .hud-task-btn { width: 3.15rem; height: 3.15rem; }
    .is-hud #app :is(.window-close, .mw-nav button, .mw-jumps button) { width: 3.15rem; height: 3.15rem; }
    .is-hud #app :is(.segmented button, .lb-tab, .store-cat, .win-go, .dg-vow, .dg-more, .dg-why, .hud-task-btn, .eqw-look-slot, .goal-pin, .mw-chip, .imbue-opt, .bank-tab,
      .filter-chip, .mk-better-card, .mw-pool, .mw-preset-open, .mw-sworn, .tr-views button, .gear-build, .btn, .uc-cost, .stage input.input, .stage .search input, .stage select):not(#ia-top *, #ia-chat *) { min-height: 3.15rem; }
    .is-hud #app :is(.btn-icon, .hud-task-btn, .segmented button, .bank-tab, .dg-vow, .dg-why, .tr-views button, .mw-chip):not(#ia-top *, #ia-chat *) { min-width: 3.15rem; }
    .is-hud #app :is(.src-btn, .lb-player, .win-guide-help, .cw-power) { position: relative; }
    .is-hud #app :is(.src-btn, .lb-player, .win-guide-help, .cw-power)::after, .is-hud #app .toggle::before { content: ""; position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: max(100%, 3.15rem); height: max(100%, 3.15rem); }
    .is-hud #app .lb-table td { padding-block: .7rem; }
    .is-hud #app :is(small, time, th, kbd, .chip):not(#ia-top *, #ia-chat *, .clan-name-badge *) { font-size: max(12px, .86rem); }
    .is-hud #app .chip:not(#ia-top *, #ia-chat *) :is(b, span, small) { font-size: inherit; }
    .is-hud #app :is(.hud-rail-btn b, .uc-cost b, .uc-stat, .uc-stat em, .uc-roman, .uc-effect, .uc-owned, .uc-free, .ul-count, .segmented button, .segmented b, .hud-tab span,
      .fishlog-row span, .fishlog-count :is(b, span), .dg-foe b, .mk-count, .store-badge, .card-people b, .drop-row :is(span, b), .imbue-opt strong, .eqw-look-copy b,
      .settings-popover .row > span, .goal-pin, .mw-chip, .btn-sm, .stage .plaque, .lb-tab, .lb-medal, .win-caps, .well .qty, .mw-pool span, .mw-region-head span, .mw-note,
      .mw-hint span, .ab-corner, .ab-stat em, .ench-skill em, .enchant-note, .enchant-section .t-muted, .filter-toggle, .store-hint span, .chronicle-day h3, .ts-tier,
      .ts-copy .t-caps, .ts-stat em, .detail-caption .t-caps, .action-status .t-muted, .hp-line .t-caps, .bar-label, .eq-hp b, .empty p, .eqw-look-note, .cw-power span,
      .mk-slot-row, .mk-side-note span, .gd-strip-copy span, .clan-note span, .dg-order-label, .dg-branch-head em, .dg-node, .dg-warden-meta, .dg-vow-help, .dg-block-note,
      .dg-more span, .dg-supply-row em, .dg-idle-verdict, .dg-why, .action-note, .lb-note, .tip-line :is(.tl-text, .tl-tier), .lo-preset b, .lo-card-meta, .lo-pick-copy strong,
      .lo-ptile b, .lo-over span, .gear-build span) { font-size: max(12px, .86rem); }
    .is-hud #app .mk-better { grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); }
    .is-hud #app .launcher :is(.ln-group h4, .ln-discord small, .ln-support small) { font-size: max(12px, .86rem); }
    .is-hud #app .launcher :is(.ln-discord, .ln-support) { min-height: 3.15rem; }
    @container eqw (min-width: 50.0625rem) and (max-width: 70rem) {
      .eqw-body { grid-template-columns: minmax(0, 1fr) minmax(23rem, 1.1fr); }
      .eqw-side > .eqw-col { flex: none; }
    }
    .is-hud .bank-hints { display: none; }
    @media (max-width: 1100px) { .is-hud #app .mastery-window .win-body.mw-body { grid-auto-rows: minmax(min(36rem, 52vh), 1fr) auto; } }
  }
}

.install-tip-host { position: relative; z-index: 85; }
.it-scrim { padding: calc(1rem + env(safe-area-inset-top)) calc(1rem + env(safe-area-inset-right)) calc(1rem + env(safe-area-inset-bottom)) calc(1rem + env(safe-area-inset-left)); }
.it-scrim-hit { position: absolute; inset: 0; cursor: default; }
.modal.install-tip { position: relative; width: min(26rem, 100%); max-height: 100%; overflow-y: auto; overscroll-behavior: contain; align-items: center; padding: 1.6rem 1.2rem 1.2rem; text-align: center;
  background: linear-gradient(180deg, rgba(22, 36, 60, .985), rgba(9, 15, 27, .99)); animation: none; }
.install-tip:focus, .install-tip:focus-visible { outline: none; }
.modal.install-tip::before { inset: 0; }
.it-icon { flex: none; width: 4.6rem; height: 4.6rem; margin: 0 auto .8rem; border-radius: 1.05rem; box-shadow: 0 0 0 1px rgba(242, 198, 106, .35), 0 .5rem 1.2rem rgba(0, 0, 0, .5); }
.install-tip h2 { margin: 0 0 .45rem; font-size: 1.55rem; }
.install-tip .it-text { margin: 0 0 1rem; font-size: 1rem; line-height: 1.45; text-wrap: balance; }
.it-close { position: absolute; top: .45rem; right: .45rem; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; min-width: 44px; min-height: 44px; border-radius: .8rem; color: var(--text-2); }
.it-close .ia-glyph { width: 1.15rem; height: 1.15rem; }
.it-steps { display: grid; gap: .55rem; width: 100%; margin: 0 0 1.1rem; padding: 0; list-style: none; text-align: left; }
.it-steps li { display: flex; align-items: flex-start; gap: .7rem; padding: .6rem .7rem; border: 1px solid var(--edge-soft); border-radius: .7rem; background: rgba(5, 8, 14, .45); }
.it-num { flex: none; display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; font-size: .95rem; font-weight: 700; color: #2a1a07; background: linear-gradient(180deg, var(--gold-1), var(--gold-3)); }
.it-steps b { display: flex; align-items: center; gap: .4rem; font-size: 1rem; font-weight: 600; color: var(--text-1); }
.it-steps small { display: block; margin-top: .15rem; font-size: .9rem; line-height: 1.35; color: var(--text-3); }
.it-share { width: 1.25rem; height: 1.25rem; color: var(--azure); }
.install-tip .it-go { min-height: 3.3rem; gap: .5rem; }
.install-tip .it-later { align-self: center; min-height: 3.3rem; margin-top: .4rem; padding: 0 1.4rem; font-size: .95rem; }
@media (max-height: 500px) and (pointer: coarse) {
  .modal.install-tip { width: min(46rem, 100%); padding: 1rem 1.3rem 1rem; }
  .it-icon { width: 3.2rem; height: 3.2rem; margin-bottom: .45rem; border-radius: .75rem; }
  .install-tip h2 { font-size: 1.35rem; margin-bottom: .3rem; }
  .install-tip .it-text { margin-bottom: .7rem; }
  .it-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: .75rem; }
  .it-steps li { flex-direction: column; gap: .4rem; }
}
