/*
 * Coyoti mobile app shell
 *
 * Shared by public.coyoti.xyz/app and the app.coyoti.xyz Seeker wrapper.
 * Desktop and tablet layouts intentionally remain owned by the primary app CSS.
 */

@media (max-width: 640px) {
  :root {
    --coyoti-mobile-rail: 56px;
    --coyoti-mobile-topbar: 64px;
    --coyoti-mobile-nav: calc(68px + env(safe-area-inset-bottom));
    --coyoti-mobile-gap: clamp(6px, 1.1vh, 10px);
    --coyoti-mobile-radius: 14px;
    color-scheme: dark;
  }

  html,
  body {
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
  }

  body {
    position: fixed;
    inset: 0;
    background: #050913;
  }

  body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
      radial-gradient(circle at 86% 4%, rgba(37, 184, 255, .09), transparent 28%),
      radial-gradient(circle at 12% 54%, rgba(124, 77, 255, .08), transparent 34%);
  }

  .app {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    padding-bottom: 0;
    grid-template-rows: var(--coyoti-mobile-rail) minmax(0, 1fr);
    overflow: hidden;
  }

  .rail {
    position: relative;
    top: auto;
    height: var(--coyoti-mobile-rail);
    min-height: var(--coyoti-mobile-rail);
    padding: 7px 12px;
    z-index: 60;
  }

  .brand {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 9px;
  }

  .brand img {
    width: 28px;
    height: 28px;
  }

  .brand strong {
    font-size: 16px;
  }

  .brand span {
    margin-top: 2px;
    font-size: 9px;
  }

  .main {
    display: grid;
    grid-template-rows: var(--coyoti-mobile-topbar) minmax(0, 1fr);
    width: 100%;
    height: calc(100dvh - var(--coyoti-mobile-rail) - var(--coyoti-mobile-nav));
    min-height: 0;
    overflow: hidden;
  }

  .topbar {
    position: relative;
    top: auto;
    min-height: var(--coyoti-mobile-topbar);
    height: var(--coyoti-mobile-topbar);
    padding: 8px 12px;
    z-index: 38;
  }

  .top-actions {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .wallet-mini {
    max-width: 124px;
    min-height: 40px;
    border-radius: 12px;
  }

  #topCta {
    min-height: 40px;
    border-radius: 12px;
  }

  .content {
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: var(--coyoti-mobile-gap) 10px;
    overflow: hidden;
  }

  .cockpit-layout,
  .main-stack,
  .side-stack {
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  .main-stack,
  .side-stack {
    display: contents;
  }

  .section.screen-visible {
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0 !important;
    border-radius: var(--coyoti-mobile-radius);
    overscroll-behavior: contain;
    scrollbar-width: none;
    animation: coyotiMobileScreenIn .26s cubic-bezier(.2, .82, .32, 1) both;
  }

  .section.screen-visible::-webkit-scrollbar,
  .strategy-form::-webkit-scrollbar,
  .strategy-view::-webkit-scrollbar {
    display: none;
  }

  .section.screen-visible:not(.strategy-workspace) {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .strategy-workspace {
    overflow: hidden;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .strategy-shell {
    display: grid;
    grid-template-rows: auto auto auto auto minmax(0, 1fr);
    gap: var(--coyoti-mobile-gap);
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  .strategy-command {
    min-height: 52px;
    padding: 10px 13px;
    border: 1px solid rgba(68, 233, 255, .28);
    border-radius: var(--coyoti-mobile-radius);
    background:
      linear-gradient(120deg, rgba(37, 184, 255, .11), rgba(124, 77, 255, .07)),
      rgba(8, 18, 32, .92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
  }

  .strategy-command h2 {
    margin: 0;
    font-size: clamp(20px, 6vw, 26px);
    line-height: 1.05;
    letter-spacing: -.035em;
  }

  .strategy-command .strategy-kicker,
  .strategy-command p {
    display: none;
  }

  .strategy-command-actions {
    width: auto;
  }

  .strategy-command-actions .btn {
    width: auto;
    min-height: 36px;
    padding-inline: 11px;
  }

  .strategy-key-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    min-height: 0;
    overflow: hidden;
    border: 1px solid rgba(134, 159, 197, .22);
    border-radius: var(--coyoti-mobile-radius);
    background: rgba(134, 159, 197, .2);
  }

  .strategy-key-metric {
    min-height: 48px;
    padding: 8px 11px;
    background: rgba(6, 14, 26, .96);
  }

  .strategy-key-metric > span {
    font-size: 8px;
    letter-spacing: .055em;
  }

  .strategy-key-metric > b {
    margin-top: 2px;
    font-size: 16px;
  }

  .strategy-key-metric small {
    display: none;
  }

  .strategy-market-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 7px;
    min-height: 48px;
    padding: 6px;
    overflow: visible;
    border-radius: var(--coyoti-mobile-radius);
    background: rgba(5, 13, 24, .9);
  }

  .strategy-market-bar-label,
  .strategy-market-controls {
    display: none !important;
  }

  .mobile-market-picker {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    min-width: 0;
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid rgba(68, 233, 255, .34);
    border-radius: 10px;
    background:
      linear-gradient(135deg, rgba(37, 184, 255, .13), rgba(68, 233, 255, .04)),
      #081525;
    color: #f5fbff;
  }

  .mobile-market-picker::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 12px rgba(66, 223, 116, .68);
  }

  .mobile-market-picker::after {
    content: "⌄";
    color: var(--cyan);
    font-size: 14px;
    line-height: 1;
  }

  .mobile-market-picker label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .mobile-market-picker select {
    min-width: 0;
    width: 100%;
    height: 34px;
    padding: 0;
    border: 0;
    outline: 0;
    appearance: none;
    background: transparent;
    color: inherit;
    font-size: 12px;
    font-weight: 850;
  }

  .strategy-market-bar-actions {
    width: auto;
    min-width: 0;
  }

  .strategy-market-mode {
    height: 100%;
    padding: 3px;
    border-radius: 10px;
    background: #040b15;
  }

  .strategy-market-mode button {
    min-height: 30px;
    min-width: 54px;
    padding-inline: 9px;
    border-radius: 8px;
    font-size: 10px;
  }

  .strategy-market-bar-actions > .btn {
    display: none;
  }

  .strategy-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    min-height: 42px;
    padding: 4px;
    overflow: hidden;
    border: 1px solid rgba(134, 159, 197, .2);
    border-radius: var(--coyoti-mobile-radius);
    background: rgba(3, 9, 17, .68);
  }

  .strategy-tabs button {
    min-width: 0;
    min-height: 34px;
    padding: 0 4px;
    border: 0;
    border-radius: 9px;
    font-size: 10px;
    white-space: nowrap;
  }

  .strategy-tabs button.active {
    background: linear-gradient(135deg, rgba(37, 184, 255, .24), rgba(124, 77, 255, .18));
    box-shadow: inset 0 0 0 1px rgba(68, 233, 255, .35);
  }

  .strategy-content {
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    border-radius: var(--coyoti-mobile-radius);
  }

  .strategy-content > .strategy-view {
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    animation: coyotiMobileStageForward .28s cubic-bezier(.2, .82, .32, 1) both;
  }

  body[data-coyoti-mobile-direction="back"] .strategy-content > .strategy-view {
    animation-name: coyotiMobileStageBack;
  }

  .strategy-view[data-strategy-view="overview"] {
    display: block;
  }

  .strategy-view[data-strategy-view="overview"] > .strategy-state-strip,
  .strategy-view[data-strategy-view="overview"] > .strategy-accounting,
  .strategy-view[data-strategy-view="overview"] > .strategy-live-disclosure {
    display: none;
  }

  .strategy-overview-grid {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  .strategy-overview-grid > .strategy-surface {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    border-radius: var(--coyoti-mobile-radius);
  }

  .strategy-overview-grid > .strategy-surface:nth-child(n + 2) {
    display: none;
  }

  .strategy-overview-grid > .strategy-surface:first-child {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .strategy-overview-grid .strategy-surface-head {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 8px;
    padding: 10px 11px 7px;
  }

  .strategy-overview-grid .strategy-surface-head > div:first-child,
  .strategy-overview-grid .strategy-chart-pip-pin {
    display: none;
  }

  .strategy-overview-grid .strategy-chart-head-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    justify-content: stretch;
    gap: 4px;
    width: 100%;
  }

  .strategy-overview-grid .strategy-timeframes {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px;
    min-width: 0;
  }

  .strategy-overview-grid .strategy-timeframes button,
  .strategy-overview-grid .strategy-chart-reset {
    min-height: 28px;
    width: auto;
    padding: 0 7px;
    font-size: 9px;
  }

  .strategy-overview-grid .strategy-chart {
    width: 100%;
    height: 100% !important;
    min-height: 0 !important;
  }

  .strategy-overview-grid .strategy-chart-legend {
    min-height: 32px;
    padding: 6px 10px;
  }

  .strategy-overview-grid .strategy-chart-source,
  .strategy-overview-grid .strategy-chart-observed {
    width: auto;
    margin: 0;
    font-size: 8px;
    text-align: left;
  }

  body[data-coyoti-strategy-view="configure"] .strategy-key-metrics,
  body[data-coyoti-strategy-view="orders"] .strategy-key-metrics,
  body[data-coyoti-strategy-view="performance"] .strategy-key-metrics {
    display: none;
  }

  .strategy-view[data-strategy-view="configure"] {
    overflow: hidden;
  }

  .strategy-config-grid {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-columns: 1fr;
    gap: 7px;
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  .strategy-config-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    padding: 5px;
    border-radius: 11px;
  }

  .strategy-config-rail button {
    grid-template-columns: 24px minmax(0, 1fr);
    min-height: 42px;
    padding: 6px 8px;
  }

  .strategy-config-rail button > span:first-child {
    width: 24px;
    height: 24px;
  }

  .strategy-config-rail small,
  .strategy-config-rail i {
    display: none;
  }

  .strategy-wizard {
    display: grid;
    grid-template-rows: 40px minmax(0, 1fr) auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    border-radius: var(--coyoti-mobile-radius);
  }

  .strategy-stepper {
    min-height: 40px;
  }

  .strategy-stepper button {
    min-height: 40px;
    padding-inline: 3px;
    font-size: 9px;
  }

  .strategy-form {
    min-height: 0;
    padding: 9px;
    gap: 8px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
  }

  .strategy-form-head {
    flex-direction: row;
    align-items: center;
    gap: 7px;
  }

  .strategy-form-head h3 {
    font-size: 16px;
  }

  .strategy-form-head p {
    display: none;
  }

  body[data-coyoti-strategy-sleeve="perp"] .strategy-wizard[data-active-step="1"] .strategy-choice-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  body[data-coyoti-strategy-sleeve="perp"] .strategy-wizard[data-active-step="1"] .strategy-choice {
    align-content: center;
    min-height: 58px;
    padding: 8px;
  }

  body[data-coyoti-strategy-sleeve="perp"] .strategy-wizard[data-active-step="1"] .strategy-choice span,
  body[data-coyoti-strategy-sleeve="perp"] .strategy-wizard[data-active-step="1"] > .strategy-form > .strategy-live-disclosure {
    display: none;
  }

  body[data-coyoti-strategy-sleeve="perp"] .strategy-wizard[data-active-step="2"] .strategy-form-head,
  body[data-coyoti-strategy-sleeve="perp"] .strategy-wizard[data-active-step="3"] .strategy-form-head,
  body[data-coyoti-strategy-sleeve="perp"] .strategy-wizard[data-active-step="3"] .strategy-liquidation-summary {
    display: none;
  }

  body[data-coyoti-strategy-sleeve="perp"] .strategy-wizard[data-active-step="2"] .strategy-field-grid,
  body[data-coyoti-strategy-sleeve="perp"] .strategy-wizard[data-active-step="3"] .strategy-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  body[data-coyoti-strategy-sleeve="perp"] .strategy-wizard[data-active-step="2"] .strategy-field,
  body[data-coyoti-strategy-sleeve="perp"] .strategy-wizard[data-active-step="3"] .strategy-field {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 3px;
    min-height: 54px;
    padding: 5px 7px;
  }

  body[data-coyoti-strategy-sleeve="perp"] .strategy-wizard[data-active-step="2"] .strategy-field input,
  body[data-coyoti-strategy-sleeve="perp"] .strategy-wizard[data-active-step="3"] .strategy-field input,
  body[data-coyoti-strategy-sleeve="perp"] .strategy-wizard[data-active-step="3"] .strategy-field select {
    min-height: 30px;
  }

  body[data-coyoti-strategy-sleeve="perp"] .strategy-wizard[data-active-step="3"] .strategy-field small {
    display: none;
  }

  body[data-coyoti-strategy-sleeve="perp"] .strategy-wizard[data-active-step="2"] > .strategy-form,
  body[data-coyoti-strategy-sleeve="perp"] .strategy-wizard[data-active-step="3"] > .strategy-form {
    overflow-y: hidden;
  }

  .strategy-wizard[data-active-step="2"] .strategy-field-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .strategy-wizard[data-active-step="2"] .strategy-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(88px, 36%);
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 6px 8px;
    border: 1px solid rgba(134, 159, 197, .16);
    border-radius: 9px;
    background: rgba(255, 255, 255, .018);
  }

  .strategy-wizard[data-active-step="2"] .strategy-field label {
    font-size: 10px;
    line-height: 1.25;
  }

  .strategy-wizard[data-active-step="2"] .strategy-field input,
  .strategy-wizard[data-active-step="2"] .strategy-field select {
    min-height: 34px;
    padding-inline: 8px;
  }

  .strategy-wizard[data-active-step="2"] .strategy-field small {
    display: none;
  }

  .strategy-wizard[data-active-step="3"] .strategy-selectivity {
    gap: 8px;
  }

  .strategy-wizard[data-active-step="3"] .strategy-selectivity-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .strategy-wizard[data-active-step="3"] .strategy-selectivity-option {
    align-content: center;
    min-height: 64px;
    padding: 8px;
  }

  .strategy-wizard[data-active-step="3"] .strategy-selectivity-option > span,
  .strategy-wizard[data-active-step="3"] .strategy-selectivity-option > small,
  .strategy-wizard[data-active-step="3"] .strategy-selectivity-summary,
  .strategy-wizard[data-active-step="3"] .strategy-field small {
    display: none;
  }

  .strategy-wizard[data-active-step="3"] .strategy-selectivity-option strong {
    font-size: 11px;
  }

  .strategy-wizard[data-active-step="3"] .strategy-selectivity-option em {
    top: 4px;
    right: 4px;
    padding: 2px 4px;
    font-size: 6px;
  }

  .strategy-wizard[data-active-step="3"] .strategy-field {
    gap: 5px;
  }

  .strategy-wizard[data-active-step="3"] .strategy-field select {
    min-height: 38px;
  }

  .strategy-wizard[data-active-step="3"] .strategy-advanced-limits {
    display: none;
  }

  .strategy-wizard[data-active-step="4"] .strategy-review-summary {
    gap: 8px;
  }

  .strategy-wizard[data-active-step="4"] .strategy-form-head,
  .strategy-wizard[data-active-step="4"] .strategy-review-hero,
  .strategy-wizard[data-active-step="4"] .strategy-review-flow,
  .strategy-wizard[data-active-step="4"] .strategy-review-advanced,
  .strategy-wizard[data-active-step="4"] > .strategy-form > .strategy-live-disclosure {
    display: none;
  }

  .strategy-wizard[data-active-step="4"] .strategy-review-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
  }

  .strategy-wizard[data-active-step="4"] .strategy-review-fact {
    min-height: 54px;
    padding: 8px;
  }

  .strategy-wizard[data-active-step="4"] .strategy-review-fact:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .strategy-wizard[data-active-step="4"] .strategy-review-fact small {
    display: none;
  }

  .strategy-wallet-import,
  .strategy-selected-assets,
  .strategy-asset-search,
  .strategy-asset-results {
    padding-block: 8px;
  }

  .strategy-asset-picker:not(.mobile-market-sheet-open) .strategy-wallet-import,
  .strategy-asset-picker:not(.mobile-market-sheet-open) .strategy-asset-search,
  .strategy-asset-picker:not(.mobile-market-sheet-open) .strategy-asset-results {
    display: none;
  }

  .mobile-manage-markets,
  .mobile-market-sheet-close {
    min-height: 38px;
    border: 1px solid rgba(68, 233, 255, .3);
    border-radius: 10px;
    background: rgba(37, 184, 255, .08);
    color: var(--cyan);
    font-size: 11px;
    font-weight: 850;
  }

  .mobile-manage-markets {
    width: 100%;
  }

  .mobile-market-sheet-close {
    display: none;
    width: auto;
    padding: 0 14px;
  }

  .strategy-asset-picker.mobile-market-sheet-open {
    position: fixed;
    top: calc(var(--coyoti-mobile-rail) + var(--coyoti-mobile-topbar) + 8px);
    left: 8px;
    right: 8px;
    bottom: calc(var(--coyoti-mobile-nav) + 8px);
    z-index: 120;
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    gap: 10px;
    min-height: 0;
    padding: 14px;
    overflow: hidden;
    border: 1px solid rgba(68, 233, 255, .3);
    border-radius: 18px;
    background:
      radial-gradient(circle at 90% 0, rgba(37, 184, 255, .12), transparent 32%),
      #07111f;
    box-shadow: 0 28px 90px rgba(0, 0, 0, .72);
    animation: coyotiMobileSheetIn .28s cubic-bezier(.2, .82, .32, 1) both;
  }

  body.coyoti-mobile-sheet-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(2, 6, 12, .74);
    backdrop-filter: blur(8px);
  }

  .strategy-asset-picker.mobile-market-sheet-open .strategy-form-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .strategy-asset-picker.mobile-market-sheet-open .strategy-form-head .status {
    display: none;
  }

  .strategy-asset-picker.mobile-market-sheet-open .mobile-market-sheet-close {
    display: inline-grid;
    place-items: center;
  }

  .strategy-asset-picker.mobile-market-sheet-open .strategy-wallet-import {
    display: none;
  }

  .strategy-asset-picker.mobile-market-sheet-open .strategy-selected-assets {
    min-height: 48px;
    padding: 8px;
  }

  .strategy-asset-picker.mobile-market-sheet-open .strategy-asset-search {
    display: grid;
    padding: 0;
  }

  .strategy-asset-picker.mobile-market-sheet-open .strategy-asset-results {
    display: grid;
    min-height: 0;
    padding: 0 2px 8px 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
  }

  .strategy-asset-picker.mobile-market-sheet-open .mobile-manage-markets {
    display: none;
  }

  .strategy-wallet-import {
    padding: 8px 10px;
  }

  .strategy-wallet-import small,
  .strategy-asset-search small {
    display: none;
  }

  .strategy-wizard-actions {
    min-height: 52px;
    padding: 7px 9px;
    background: rgba(3, 9, 17, .94);
  }

  .strategy-wizard-actions > span {
    display: none;
  }

  .strategy-wizard-actions > div {
    width: 100%;
  }

  .strategy-wizard-actions .btn {
    min-height: 38px;
  }

  .strategy-view[data-strategy-view="orders"],
  .strategy-view[data-strategy-view="performance"] {
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
  }

  .strategy-view[data-strategy-view="orders"] .strategy-state-strip,
  .strategy-view[data-strategy-view="performance"] .strategy-state-strip {
    display: none;
  }

  .strategy-view[data-strategy-view="orders"] .strategy-surface,
  .strategy-view[data-strategy-view="performance"] .strategy-surface {
    border-radius: var(--coyoti-mobile-radius);
  }

  .strategy-view[data-strategy-view="performance"] {
    display: grid;
    align-content: start;
    overflow: hidden;
  }

  .strategy-view[data-strategy-view="performance"] > .strategy-accounting {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .strategy-view[data-strategy-view="performance"] > .strategy-accounting .strategy-metric {
    min-height: 92px;
    padding: 12px;
  }

  .strategy-view[data-strategy-view="performance"] > .strategy-accounting .strategy-metric b {
    font-size: 20px;
  }

  .strategy-view[data-strategy-view="performance"] > .strategy-surface,
  .strategy-view[data-strategy-view="performance"] > .strategy-live-disclosure {
    display: none;
  }

  .transaction-screen,
  #addons,
  #billing {
    border-radius: var(--coyoti-mobile-radius);
  }

  .transaction-screen .panel-head,
  #addons .panel-head,
  #billing .panel-head {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 12px 13px 9px;
    background: rgba(9, 18, 32, .96);
    backdrop-filter: blur(18px);
  }

  .transaction-screen .panel-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-height: 52px;
    padding: 8px 11px;
  }

  .transaction-screen .panel-head p {
    margin: 0;
    font-size: 10px;
    line-height: 1.35;
  }

  .transaction-screen .panel-head .btn {
    width: auto;
    min-height: 34px;
    padding-inline: 11px;
  }

  #addons .panel-body,
  #billing .panel-body,
  .transaction-screen .panel-body {
    padding: 11px;
  }

  .addon-card {
    min-height: 0;
    gap: 8px;
    padding: 11px 13px;
    border-radius: 12px;
  }

  #addons .subscription-expiry-card {
    display: none;
  }

  #addons .addons-grid {
    gap: 8px;
  }

  #addons .addon-icon {
    width: 34px;
    height: 34px;
  }

  #addons .addon-card h3 {
    font-size: 15px;
  }

  #addons .addon-card p,
  #addons .addon-meta span {
    font-size: 10px;
    line-height: 1.35;
  }

  #addons .addon-card .status {
    min-height: 24px;
    padding: 4px 8px;
    font-size: 9px;
  }

  #billing {
    overflow: hidden;
  }

  #billing > .billing-plan-summary,
  #billing .checkout-hero,
  #billing #billingMessage {
    display: none !important;
  }

  #billing .checkout {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 8px;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 10px;
    overflow: hidden;
  }

  .mobile-billing-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    border: 1px solid rgba(134, 159, 197, .2);
    border-radius: 12px;
    background: rgba(3, 9, 17, .68);
  }

  .mobile-billing-steps button {
    min-height: 38px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #899ab4;
    font-size: 11px;
    font-weight: 850;
  }

  .mobile-billing-steps button.active {
    color: var(--cyan);
    background: linear-gradient(135deg, rgba(37, 184, 255, .2), rgba(124, 77, 255, .15));
    box-shadow: inset 0 0 0 1px rgba(68, 233, 255, .3);
  }

  #billing .checkout-shell {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  body[data-coyoti-billing-step="plans"] #billing .checkout-summary-card {
    display: none;
  }

  body[data-coyoti-billing-step="review"] #billing .billing-cycle,
  body[data-coyoti-billing-step="review"] #billing .checkout-plans {
    display: none;
  }

  #billing .checkout-plans {
    height: 100%;
    min-height: 0;
  }

  #billing .checkout-plan-compare-label {
    margin: 0 0 7px;
  }

  #billing .billing-cycle {
    gap: 7px;
    margin: 0;
    padding: 10px;
    border-radius: 12px;
  }

  #billing .billing-cycle > span {
    font-size: 10px;
  }

  #billing .billing-cycle .seg button {
    min-height: 42px;
  }

  #billing .plan-grid {
    gap: 7px;
  }

  #billing .plan-card {
    min-height: 0;
    padding: 10px 12px;
    border-radius: 12px;
  }

  #billing .plan-card strong {
    font-size: 19px;
  }

  #billing .plan-card p,
  #billing .plan-card small {
    font-size: 10px;
  }

  #billing .checkout-summary-card {
    position: static;
    display: grid;
    align-content: start;
    gap: 10px;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 13px;
    overflow: hidden;
    border-radius: 14px;
  }

  #billing .checkout-summary-card h3 {
    margin: 0;
  }

  #billing .checkout-total {
    padding: 10px 12px;
  }

  #billing .checkout-total strong {
    font-size: 30px;
  }

  #billing .summary-lines {
    gap: 5px;
  }

  #billing .checkout-primary {
    gap: 8px;
    padding: 11px;
  }

  #billing .checkout-primary .field {
    gap: 5px;
  }

  #billing .checkout-primary input,
  #billing #hostedCheckoutButton {
    min-height: 42px;
  }

  #billing .checkout-renewal-note,
  #billing .checkout-legal {
    font-size: 9px;
    line-height: 1.35;
  }

  .nav {
    height: var(--coyoti-mobile-nav);
    padding-bottom: max(7px, env(safe-area-inset-bottom));
  }

  .nav a {
    min-height: 52px;
    border-radius: 12px;
  }

  .nav a.active {
    background: linear-gradient(145deg, rgba(37, 137, 255, .28), rgba(41, 102, 219, .15));
    box-shadow: inset 0 0 0 1px rgba(68, 233, 255, .12);
  }

  .floating-chat {
    right: 9px;
    bottom: calc(var(--coyoti-mobile-nav) + 7px);
  }

  /*
   * Subscription access is already expressed by the strategy CTA and the
   * persistent Billing destination. Repeating the long desktop warning as a
   * fixed layer obscures the active mobile screen, especially below 800px.
   */
  .subscription-access-warning:not(.hidden) {
    display: none;
  }

  .app-update-notice:not(.hidden),
  .subscription-success-celebration:not(.hidden) {
    position: fixed;
    top: calc(var(--coyoti-mobile-rail) + var(--coyoti-mobile-topbar) + 8px);
    left: 10px;
    right: 10px;
    z-index: 90;
    max-height: calc(100dvh - var(--coyoti-mobile-rail) - var(--coyoti-mobile-topbar) - var(--coyoti-mobile-nav) - 16px);
    overflow: auto;
  }

  .app-update-notice:not(.hidden) {
    padding: 10px 11px;
    border-radius: 12px;
  }

  .subscription-success-celebration:not(.hidden) {
    padding: 11px;
    border-radius: 12px;
  }

  .subscription-success-card {
    gap: 9px;
  }

  .subscription-success-icon {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .subscription-success-card strong {
    font-size: 13px;
  }

  .subscription-success-card span {
    margin-top: 1px;
    font-size: 10px;
  }
}

@media (max-width: 640px) and (max-height: 760px) {
  :root {
    --coyoti-mobile-topbar: 56px;
    --coyoti-mobile-gap: 5px;
  }

  .strategy-command {
    min-height: 44px;
    padding-block: 8px;
  }

  .strategy-command h2 {
    font-size: 20px;
  }

  body[data-coyoti-strategy-view="configure"] .strategy-command {
    display: none;
  }

  .strategy-wizard[data-active-step="1"] .strategy-selected-assets {
    display: none;
  }

  .strategy-key-metric {
    min-height: 40px;
    padding-block: 6px;
  }

  .strategy-key-metric > b {
    font-size: 14px;
  }

  .strategy-tabs {
    min-height: 38px;
  }

  .strategy-tabs button {
    min-height: 30px;
  }
}

@media (max-width: 640px) and (max-height: 660px) {
  :root {
    --coyoti-mobile-rail: 52px;
    --coyoti-mobile-topbar: 52px;
    --coyoti-mobile-nav: calc(62px + env(safe-area-inset-bottom));
    --coyoti-mobile-gap: 4px;
  }

  .rail {
    padding-block: 5px;
  }

  .brand img {
    width: 25px;
    height: 25px;
  }

  .topbar {
    padding-block: 6px;
  }

  .wallet-mini,
  #topCta {
    min-height: 38px;
  }

  .strategy-key-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .strategy-key-metric:nth-child(n + 3) {
    display: none;
  }

  .strategy-overview-grid .strategy-chart-source,
  .strategy-overview-grid .strategy-chart-observed {
    display: none;
  }

  .strategy-overview-grid .strategy-chart-legend {
    min-height: 0;
    padding-block: 4px;
  }

  .nav a {
    min-height: 47px;
  }
}

@media (max-width: 640px) and (max-height: 600px) {
  .strategy-command {
    display: none;
  }
}

@media (max-width: 360px) {
  .brand {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 7px;
  }

  .brand img {
    width: 24px;
    height: 24px;
  }

  .brand strong {
    font-size: 14px;
  }

  .wallet-mini {
    max-width: 112px;
    padding-inline: 9px;
  }

  #topCta {
    padding-inline: 11px;
    font-size: 12px;
  }

  .strategy-command {
    padding-inline: 10px;
  }

  .strategy-command h2 {
    font-size: 18px;
  }

  .strategy-command-actions .btn {
    min-height: 34px;
    padding-inline: 9px;
    font-size: 11px;
  }

  .strategy-key-metric {
    padding-inline: 9px;
  }

  .strategy-market-mode button {
    min-width: 44px;
    padding-inline: 7px;
  }

  .strategy-tabs button {
    font-size: 9px;
  }

  .strategy-overview-grid .strategy-chart-head-actions {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .strategy-overview-grid .strategy-chart-reset {
    display: none;
  }

  .strategy-chart-readout {
    top: 7px;
    left: 8px;
    gap: 6px;
    padding-inline: 6px;
  }

  .strategy-chart-readout span:not(.up):not(.down) {
    display: none;
  }

  .strategy-chart-overlays {
    gap: 4px;
    flex-wrap: nowrap;
    width: 100%;
  }

  .strategy-chart-overlays .strategy-overlay-key {
    min-width: 0;
    min-height: 22px;
    padding-inline: 5px;
    overflow: hidden;
    font-size: 8px;
    text-overflow: ellipsis;
  }

  .strategy-chart-overlays .strategy-overlay-key:nth-child(2),
  .strategy-chart-overlays .strategy-overlay-key:nth-child(4) {
    display: none;
  }

  .nav a {
    padding-inline: 2px;
    font-size: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .section.screen-visible,
  .strategy-content > .strategy-view {
    animation: none !important;
  }
}

@keyframes coyotiMobileScreenIn {
  from {
    opacity: 0;
    transform: translate3d(0, 8px, 0) scale(.992);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes coyotiMobileStageForward {
  from {
    opacity: 0;
    transform: translate3d(14px, 0, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes coyotiMobileStageBack {
  from {
    opacity: 0;
    transform: translate3d(-14px, 0, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes coyotiMobileSheetIn {
  from {
    opacity: 0;
    transform: translate3d(0, 18px, 0) scale(.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
