/* ===========================================================
   Deploy polish - mobile + empty states (load after green-ux)
   =========================================================== */

/* ---- Empty states ---- */
.sw-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  padding: 16px 16px 18px;
  border: 1px dashed rgba(47, 158, 74, 0.35);
  background: rgba(47, 158, 74, 0.06);
  border-radius: 2px;
}
.sw-empty-kicker {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green, #2f9e4a);
}
.sw-empty-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink, #121814);
  line-height: 1.25;
}
.sw-empty-body {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-soft, #4a554c);
  max-width: 42ch;
}
.sw-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.sw-empty.is-dark {
  background: rgba(62, 207, 106, 0.06);
  border-color: rgba(62, 207, 106, 0.28);
}
.sw-empty.is-dark .sw-empty-title {
  color: #e6ebe4;
}
.sw-empty.is-dark .sw-empty-body {
  color: rgba(200, 220, 205, 0.75);
}

.account-army-grid.is-empty {
  display: block;
  grid-template-columns: 1fr;
}
.account-army-grid .sw-empty {
  margin-top: 0;
}
.account-unit.is-placeholder {
  opacity: 0.45;
  border-style: dashed;
}

.hx-catalog-loading,
.qp-grid .hx-catalog-loading {
  grid-column: 1 / -1;
  padding: 28px 16px;
  text-align: left;
  font-size: 13px;
  color: var(--ink-soft, #4a554c);
  border: 1px dashed rgba(47, 158, 74, 0.3);
  background: rgba(47, 158, 74, 0.05);
}

.mint-status {
  padding: 10px 12px;
  border-radius: 2px;
  background: rgba(47, 158, 74, 0.06);
  border: 1px solid rgba(47, 158, 74, 0.15);
}
.mint-status:empty {
  display: none;
}
.mint-status.is-err {
  background: rgba(196, 68, 68, 0.08);
  border-color: rgba(196, 68, 68, 0.28);
  color: #a33 !important;
}
.mint-panel-gate {
  margin-top: 8px;
}

/* ---- Ticker compact on small screens ---- */
@media (max-width: 720px) {
  .ticker-bar {
    min-width: 0;
    flex: 1;
  }
  .ticker-label {
    font-size: 9px;
    padding: 0 6px;
  }
  .tick-item {
    font-size: 11px;
  }
  .qt-top {
    gap: 8px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .qt-sub {
    font-size: 11px;
    padding: 8px 12px;
    line-height: 1.35;
  }
}

/* ---- Mobile shell ---- */
@media (max-width: 900px) {
  .qt-brand {
    padding: 14px 14px 8px;
  }
  .qt-sidebar {
    position: sticky;
    top: 0;
    z-index: 50;
  }
  .qt-nav {
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
  }
  .qt-nav-item {
    font-size: 12px;
    padding: 10px 11px;
  }
  .qt-sidebar-foot {
    padding: 8px 12px 12px;
  }
  #walletConnectBtn,
  .qt-connect {
    min-height: 42px;
    font-size: 12px;
  }
  .qp-actions .btn,
  .wars-actions .btn,
  .qp-card .btn {
    min-height: 42px;
    padding: 10px 14px;
  }
  .mint-price {
    font-size: 32px !important;
  }
  .mint-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .mint-qty-row {
    width: 100%;
  }
  .mint-qty-row input {
    min-height: 44px;
    width: 72px;
  }
  .account-layout {
    max-width: none;
  }
  .account-balance {
    font-size: 24px;
  }
  .desk-gate-card {
    padding: 18px 16px 20px;
  }
  .desk-gate-card .qp-card-title {
    font-size: 22px;
    line-height: 1.15;
  }
  .qp-machines {
    gap: 14px;
  }
  .qp-machine-art img {
    width: 100%;
    max-height: 280px;
    object-fit: contain;
  }
  .docs-toc {
    margin-bottom: 12px;
  }
}

@media (max-width: 520px) {
  .mint-meta {
    grid-template-columns: 1fr 1fr !important;
  }
  .qp-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .qp-actions .btn:first-child,
  .qp-actions .btn.btn-black {
    grid-column: 1 / -1;
  }
  .wars-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .wars-actions .btn:first-child {
    grid-column: 1 / -1;
  }
  .wars-title {
    font-size: 26px !important;
    line-height: 1.15;
  }
  .wars-lead {
    font-size: 14px;
  }
  .account-army-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
  .qp-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .qt-live {
    display: none;
  }
  /* Hide long tape on very small; status still in label when offline */
  .ticker-track {
    max-width: 52vw;
  }
}

/* ---- Floor mobile ---- */
@media (max-width: 800px), (pointer: coarse) {
  .floor-hud {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
  }
  .floor-hud-left {
    flex: 1 1 100%;
    min-width: 0;
  }
  .floor-hud-sub {
    font-size: 11px;
  }
  .floor-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .floor-actions .floor-btn {
    flex: 1 1 auto;
    min-height: 42px;
    text-align: center;
    justify-content: center;
  }
  .floor-chips {
    display: flex !important;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
  }
  .floor-chip {
    font-size: 9px;
    padding: 3px 6px;
  }
  .floor-touch {
    right: 10px;
    bottom: 58px;
    grid-template-columns: repeat(3, 54px);
  }
  .floor-touch button {
    width: 54px;
    height: 54px;
    font-size: 15px;
  }
  .floor-flat {
    padding: 72px 14px 36px;
  }
  .floor-flat-list a {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 52px;
    padding: 12px 14px;
    margin-bottom: 8px;
    border: 1px solid rgba(62, 207, 106, 0.2);
    background: rgba(8, 16, 12, 0.85);
    color: #d8e0d4;
    text-decoration: none;
  }
  .floor-flat-list a strong {
    color: #7dff9f;
    font-size: 13px;
    letter-spacing: 0.06em;
  }
  .floor-flat-list a span {
    font-size: 12px;
    color: rgba(200, 220, 205, 0.7);
    line-height: 1.35;
  }
}

/* Safe area for notched phones */
@supports (padding: max(0px)) {
  .floor-touch {
    bottom: max(58px, env(safe-area-inset-bottom, 0px) + 48px);
    right: max(10px, env(safe-area-inset-right, 0px) + 8px);
  }
  .qt-sidebar {
    padding-left: env(safe-area-inset-left, 0px);
  }
  .qt-stage,
  main.container.qt-stage {
    padding-bottom: max(48px, env(safe-area-inset-bottom, 0px) + 32px) !important;
  }
}

/* Touch targets */
@media (pointer: coarse) {
  .btn,
  .qt-nav-item,
  .floor-btn,
  .hx-cat {
    min-height: 44px;
  }
  .hx-cat {
    min-height: 0;
  }
}
