@media (max-width: 820px) {
  html.tx-mobile-cursor-active,
  html.tx-mobile-cursor-active body {
    overscroll-behavior: none;
  }

  .tx-cursor-toggle {
    position: fixed;
    right: max(14px, env(safe-area-inset-right));
    bottom: calc(116px + env(safe-area-inset-bottom));
    z-index: 9000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 94px;
    min-height: 42px;
    padding: 9px 13px;
    border: 1px solid rgba(73, 214, 255, 0.6);
    border-radius: 8px;
    background: rgba(3, 13, 24, 0.86);
    color: #e8fbff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4), inset 0 0 18px rgba(73, 214, 255, 0.12);
    font: 700 12px/1.1 "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 0;
    text-transform: uppercase;
    touch-action: manipulation;
  }

  .tx-cursor-toggle[aria-pressed="true"] {
    border-color: rgba(255, 207, 87, 0.8);
    color: #fff6d1;
    box-shadow: 0 0 0 1px rgba(255, 207, 87, 0.18), 0 10px 28px rgba(0, 0, 0, 0.42), inset 0 0 20px rgba(255, 207, 87, 0.16);
  }

  .tx-virtual-cursor {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 8998;
    width: 30px;
    height: 30px;
    pointer-events: none;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 160ms ease;
  }

  .tx-virtual-cursor::before,
  .tx-virtual-cursor::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    background: #ffd45a;
    box-shadow: 0 0 10px rgba(255, 212, 90, 0.65);
    transform: translate(-50%, -50%);
  }

  .tx-virtual-cursor::before {
    width: 2px;
    height: 30px;
  }

  .tx-virtual-cursor::after {
    width: 30px;
    height: 2px;
  }

  .tx-virtual-cursor__core {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    border: 2px solid #fff4bf;
    border-radius: 50%;
    background: rgba(255, 212, 90, 0.24);
    box-shadow: 0 0 16px rgba(255, 212, 90, 0.8);
    transform: translate(-50%, -50%);
  }

  .tx-cursor-surface {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100dvh;
    z-index: 24;
    display: none;
    background: transparent;
    touch-action: none;
    user-select: none;
  }

  .tx-cursor-pad {
    display: none;
  }

  .tx-cursor-guide-button {
    position: fixed;
    left: max(14px, env(safe-area-inset-left));
    right: auto;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 46;
    display: none;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 212, 90, 0.74);
    border-radius: 50%;
    background: rgba(3, 13, 24, 0.86);
    color: #fff4bf;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.34), inset 0 0 16px rgba(255, 212, 90, 0.14);
    font: 800 16px/1 "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    touch-action: manipulation;
  }

  .tx-cursor-guide-panel {
    position: fixed;
    left: max(14px, env(safe-area-inset-left));
    right: auto;
    bottom: calc(52px + env(safe-area-inset-bottom));
    z-index: 46;
    width: min(292px, calc(100vw - 28px));
    padding: 12px;
    border: 1px solid rgba(73, 214, 255, 0.45);
    border-radius: 8px;
    background: rgba(3, 13, 24, 0.94);
    color: #e8fbff;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), inset 0 0 22px rgba(73, 214, 255, 0.08);
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  }

  .tx-cursor-guide-panel[hidden] {
    display: none;
  }

  .tx-cursor-guide-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 9px;
    color: #35e6d6;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .tx-cursor-guide-panel__close {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(73, 214, 255, 0.28);
    background: rgba(14, 21, 28, 0.88);
    color: #e8fbff;
    font: 800 16px/1 "JetBrains Mono", monospace;
  }

  .tx-cursor-guide-panel ol {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .tx-cursor-guide-panel li {
    display: grid;
    gap: 2px;
    padding-left: 10px;
    border-left: 2px solid rgba(255, 212, 90, 0.62);
  }

  .tx-cursor-guide-panel li strong {
    color: #fff4bf;
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .tx-cursor-guide-panel li span {
    color: rgba(232, 251, 255, 0.78);
    font-size: 10px;
    line-height: 1.35;
  }

  html.tx-mobile-cursor-active .tx-virtual-cursor {
    opacity: 1;
  }

  html.tx-mobile-cursor-active .tx-cursor-surface {
    display: block;
  }

  html.tx-mobile-cursor-active .tx-cursor-guide-button {
    display: inline-flex;
  }

  body:has(#app.panel-open) .tx-cursor-toggle,
  body:has(#app.panel-open) .tx-virtual-cursor,
  body:has(#app.panel-open) .tx-cursor-surface,
  body:has(#app.panel-open) .tx-cursor-guide-button,
  body:has(#app.panel-open) .tx-cursor-guide-panel,
  body:has(.toolbar.is-settings-open) .tx-cursor-guide-button,
  body:has(.toolbar.is-settings-open) .tx-cursor-guide-panel,
  body:has(.atk-toolbar.is-settings-open) .tx-cursor-guide-button,
  body:has(.atk-toolbar.is-settings-open) .tx-cursor-guide-panel,
  body:has(.register-side-shell.open) .tx-cursor-toggle,
  body:has(.register-side-shell.open) .tx-virtual-cursor,
  body:has(.register-side-shell.open) .tx-cursor-surface,
  body:has(.register-side-shell.open) .tx-cursor-guide-button,
  body:has(.register-side-shell.open) .tx-cursor-guide-panel {
    display: none !important;
  }

  body.tx-landing-visible .tx-cursor-toggle,
  body.tx-landing-visible .tx-virtual-cursor,
  body.tx-landing-visible .tx-cursor-surface,
  body.tx-landing-visible .tx-cursor-guide-button,
  body.tx-landing-visible .tx-cursor-guide-panel,
  body:has(.landing-overlay:not([hidden])) .tx-cursor-toggle,
  body:has(.landing-overlay:not([hidden])) .tx-virtual-cursor,
  body:has(.landing-overlay:not([hidden])) .tx-cursor-surface,
  body:has(.landing-overlay:not([hidden])) .tx-cursor-guide-button,
  body:has(.landing-overlay:not([hidden])) .tx-cursor-guide-panel {
    display: none !important;
  }

  body.tx-logo-line-context-open .tx-cursor-surface {
    display: none !important;
  }

  body.tx-logo-line-context-open .logo-line-context-panel {
    z-index: 9102;
  }

  .mobile-cursor-setting .tx-cursor-toggle {
    position: static;
    right: auto;
    bottom: auto;
    z-index: auto;
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 42px;
    box-sizing: border-box;
    padding: 0 14px;
    border-radius: 0;
    clip-path: polygon(6px 0, 100% 0, 100% 100%, 0 100%, 0 6px);
    box-shadow: inset 0 0 0 1px rgba(53, 230, 214, 0.04);
    font-size: 11px;
  }
}

@media (hover: hover) and (pointer: fine) and (min-width: 821px) {
  .tx-cursor-toggle,
  .tx-cursor-surface,
  .tx-virtual-cursor {
    display: none;
  }
}
