.login-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 24px;
  align-items: start;
}
.login-card,
.help-card {
  min-width: 0;
}
.login-card h2 {
  font-size: 25px;
  margin-top: 8px;
}
.login-steps {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 24px 0;
  gap: 10px;
}
.login-steps li {
  flex: 1;
  font-size: 12px;
  color: #868b94;
  padding: 10px 0;
  border-top: 3px solid #e8eaee;
}
.login-steps li.done {
  color: #252b34;
  border-color: #252b34;
}
.login-main {
  display: grid;
  place-items: center;
  min-height: 280px;
  padding: 14px 0;
}
.login-main #qr-box {
  text-align: center;
}
.login-main #login-qr {
  display: block;
  width: 240px;
  height: 240px;
  max-width: 100%;
  image-rendering: pixelated;
  margin: auto;
}
.login-state {
  text-align: center;
  max-width: 440px;
  padding: 20px 10px;
}
.login-state p {
  line-height: 1.8;
  color: #626b78;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.state-symbol {
  display: block;
  width: 54px;
  height: 54px;
  margin: 0 auto 20px;
  border-radius: 12px;
  object-fit: contain;
}
.login-actions {
  justify-content: center;
}
.help-choice {
  display: block;
  text-align: left;
  width: 100%;
  padding: 19px;
  margin: 16px 0;
  white-space: normal;
  height: auto;
  background: #fff;
}
.help-choice strong {
  display: block;
  font-size: 15px;
}
.help-choice strong span {
  float: right;
}
.help-choice small {
  display: block;
  line-height: 1.6;
  font-size: 13px;
  color: #6b7380;
  margin-top: 8px;
}
.remote-stage {
  grid-column: 1/-1;
  scroll-margin-top: 80px;
}
.remote-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-block: 1px solid #e5e7eb;
  flex-wrap: wrap;
}
.remote-toolbar button[aria-pressed="true"] {
  background: #24272d;
  color: #fff;
}
.remote-toolbar button {
  min-width: 42px;
}
.remote-toolbar #zoom-label {
  font:
    12px ui-monospace,
    monospace;
  min-width: 40px;
  text-align: center;
}
#remote-viewport {
  display: block;
  position: relative;
  aspect-ratio: auto;
  height: 570px;
  overflow: auto;
  background: #e5e7eb;
  overscroll-behavior: contain;
}
#remote-viewport #view {
  max-width: none;
  height: auto;
  display: block;
  object-fit: initial;
  touch-action: none;
  user-select: none;
  cursor: crosshair;
}
#remote-viewport.pan #view {
  cursor: grab;
}
#remote-viewport.pan #view:active {
  cursor: grabbing;
}
#remote-viewport .view-empty {
  padding: 80px 20px;
  text-align: center;
}
.remote-input input {
  flex: 1;
  min-width: 150px;
}
.remote-controls {
  margin-top: 12px;
}
.remote-fullscreen {
  position: fixed;
  inset: 10px;
  z-index: 110;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 0 100vmax #0009;
}
.remote-fullscreen #remote-viewport {
  flex: 1;
  min-height: 80px;
  height: auto;
}
.remote-fullscreen .stage-footer {
  flex-shrink: 0;
}
.remote-fullscreen .section-head {
  padding: 12px 16px;
}
.remote-fullscreen .section-head .lede {
  display: none;
}
.preflight {
  margin: 22px 0;
  padding-top: 18px;
  border-top: 1px solid #e2e5e9;
}
.preflight > p {
  font-size: 13px;
  color: #626b78;
  line-height: 1.7;
}
.check-row {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #eceef1;
}
.check-row > span {
  font-weight: 700;
  font-size: 13px;
  border-radius: 50%;
  height: 22px;
  width: 22px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: #edf3ee;
  color: #356146;
}
.check-row.blocked > span {
  background: #fcf0dc;
  color: #986019;
}
.check-row strong {
  font-size: 13px;
}
.check-row p {
  font-size: 12px;
  color: #657080;
  line-height: 1.6;
  margin: 4px 0;
  overflow-wrap: anywhere;
}
.verify-row {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e7e9ee;
  padding: 15px 0;
}
.verify-row p {
  font-size: 13px;
  color: #687180;
}
.verify-row button {
  flex-shrink: 0;
}
#mobile-nav,
#mobile-more {
  display: none;
}
.code-dock {
  margin-top: 24px;
}
.help-card > .notice {
  white-space: normal;
}
#ticket .actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
#ticket #preview {
  padding-inline: 12px;
}
#ticket #send {
  padding-inline: 10px;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}
#remote-stage[hidden],
#view[hidden] {
  display: none !important;
}
@media (max-width: 1100px) {
  .login-workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  .help-card {
    display: block;
  }
  .login-main {
    min-height: 240px;
  }
}
@media (max-width: 760px) {
  html {
    scroll-padding-top: 68px;
  }
  body {
    font-size: 14px;
  }
  #nav {
    display: none !important;
  }
  #app {
    margin: 0;
    padding: 0 0 80px !important;
    min-width: 0;
  }
  .canvas {
    padding: 16px 14px 24px !important;
  }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: 58px;
    min-height: 58px;
    padding: 8px 14px !important;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #e5e7eb;
  }
  .topbar .breadcrumb {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
  }
  .mobile-brand-mark {
    display: block;
    width: 28px;
    height: 28px;
  }
  .topbar .breadcrumb > span,
  .policy-top,
  .topbar .avatar {
    display: none;
  }
  .topbar #active-account {
    max-width: 190px;
    min-width: 0;
    width: auto;
    min-height: 42px;
    font-size: 14px;
  }
  .topbar .actions {
    min-width: 0;
  }
  .page-heading {
    margin: 0 0 14px;
    padding: 0;
    gap: 8px;
  }
  .page-heading h1 {
    font-size: 23px;
  }
  .page-heading p {
    display: none;
  }
  .page-heading .actions {
    gap: 6px;
  }
  .page-heading button {
    font-size: 12px;
    min-height: 40px;
    padding: 8px 10px;
  }
  #stop-worker {
    display: none;
  }
  .status {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-bottom: 16px;
    border-radius: 10px;
    padding: 10px 14px;
  }
  .status > div {
    padding: 7px 0;
    border: 0 !important;
    min-width: 0;
  }
  .status > div:nth-child(2),
  .status > div:nth-child(3),
  .status > div:nth-child(5) {
    display: none;
  }
  .status strong {
    font-size: 13px;
  }
  .status span {
    font-size: 11px;
  }
  .card {
    padding: 19px 16px !important;
    border-radius: 12px;
  }
  .login-workspace {
    gap: 16px;
  }
  .login-card .section-head {
    align-items: start;
  }
  .login-card h2 {
    font-size: 21px;
    line-height: 1.4;
    max-width: 230px;
  }
  .kicker {
    font-size: 10px;
  }
  .login-card .pill {
    font-size: 10px;
    white-space: nowrap;
  }
  .login-steps {
    margin: 18px 0 12px;
    gap: 8px;
  }
  .login-steps li {
    font-size: 11px;
    padding: 8px 0;
  }
  .login-main {
    min-height: 200px;
    padding: 4px 0;
  }
  .login-main #login-qr {
    width: 216px;
    height: 216px;
  }
  .login-state {
    padding: 14px 0;
  }
  .login-state h3 {
    font-size: 17px;
  }
  .login-state p {
    font-size: 13px;
  }
  .state-symbol {
    width: 42px;
    height: 42px;
    margin-bottom: 14px;
  }
  .login-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .login-actions button {
    font-size: 13px;
    padding-inline: 8px;
  }
  .help-card h2 {
    font-size: 20px;
  }
  .help-card > .lede {
    font-size: 13px;
  }
  .help-card .hint {
    font-size: 12px;
  }
  .help-choice {
    padding: 16px;
    min-height: 80px;
  }
  .help-card .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .help-card .actions button {
    font-size: 12px;
    padding: 10px 6px;
  }
  button,
  input,
  select {
    min-height: 44px;
  }
  input,
  select,
  textarea {
    font-size: 16px !important;
  }
  .code-dock {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 14px 0 0;
    gap: 10px;
  }
  .code-dock label,
  .code-dock .hint {
    grid-column: 1/-1;
  }
  .row-2 {
    gap: 12px !important;
  }
  .ticket .fields {
    gap: 16px;
  }
  .ticket h2 {
    font-size: 21px;
  }
  .order-layout {
    gap: 16px;
  }
  .ticket .section-head {
    gap: 10px;
  }
  .order-layout pre {
    font-size: 12px;
    line-height: 1.8;
    max-height: 240px;
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  .remote-stage > .section-head {
    padding: 16px;
  }
  .remote-stage h2 {
    font-size: 18px;
  }
  .remote-stage .lede {
    font-size: 12px;
  }
  .remote-toolbar {
    padding: 8px;
    gap: 8px;
  }
  .remote-toolbar .actions {
    gap: 4px;
  }
  .remote-toolbar button {
    min-width: 38px;
    min-height: 40px;
    padding: 6px 8px;
    font-size: 12px;
  }
  .remote-toolbar #zoom-label {
    min-width: 34px;
  }
  #remote-viewport {
    height: 340px;
  }
  .stage-footer {
    padding: 12px !important;
  }
  .remote-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .remote-controls button {
    padding: 8px;
    font-size: 12px;
  }
  .remote-input {
    display: grid;
    grid-template-columns: 1fr 52px 68px;
    gap: 5px;
  }
  .remote-input input {
    min-width: 0;
  }
  .remote-input button {
    padding: 6px;
    font-size: 12px;
  }
  .remote-fullscreen {
    inset: 0;
    border-radius: 0;
    max-height: 100dvh;
  }
  .remote-fullscreen .section-head {
    padding: 8px 12px;
    flex-shrink: 0;
  }
  .remote-fullscreen .remote-controls {
    display: flex;
    flex-wrap: wrap;
  }
  .remote-fullscreen .remote-controls button {
    flex: 1;
    min-width: 66px;
    font-size: 11px;
  }
  .remote-fullscreen .stage-footer .hint {
    font-size: 11px;
    margin: 5px 0;
  }
  #mobile-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 60;
    background: #fff;
    border-top: 1px solid #e0e4e9;
    padding: 6px 10px max(8px, env(safe-area-inset-bottom));
    gap: 8px;
    height: auto;
    width: auto;
  }
  #mobile-nav button {
    border: 0;
    min-height: 46px;
    font-size: 13px;
    color: #697180;
    border-radius: 8px;
    background: transparent;
    padding: 10px 4px;
  }
  #mobile-nav button[aria-current="true"] {
    background: #f0f2f5;
    color: #20262f;
    font-weight: 650;
  }
  body:has(#app[hidden]) #mobile-nav {
    display: none;
  }
  #mobile-more:not([hidden]) {
    display: grid;
    position: fixed;
    z-index: 65;
    bottom: 76px;
    right: 14px;
    left: 14px;
    background: #fff;
    border: 1px solid #e0e4e9;
    box-shadow: 0 8px 32px #18222d20;
    border-radius: 12px;
    padding: 12px;
    gap: 8px;
  }
  #mobile-more button {
    text-align: left;
  }
  .lock {
    display: block !important;
    min-height: 100dvh;
    padding: 24px 18px !important;
  }
  .lock-intro {
    display: none !important;
  }
  .lock-card {
    box-shadow: none !important;
    border: 0 !important;
    padding: 20px 4px !important;
    max-width: 440px;
    margin: 10vh auto 0 !important;
  }
  .lock-card h2 {
    font-size: 27px;
  }
  .lock-card .lede {
    font-size: 14px;
  }
  .lock-card .lock-links {
    display: flex;
    gap: 20px;
  }
  .lock-card label {
    margin-top: 26px;
  }
  .toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .toolbar .search {
    grid-column: 1/-1;
  }
  .toolbar button {
    align-self: end;
  }
  .table-wrap {
    max-width: 100%;
    overflow: auto;
  }
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
  .verify-row {
    align-items: start;
  }
  .verify-row p {
    font-size: 12px;
  }
  .page-footer {
    font-size: 11px;
  }
  #app .canvas > footer {
    padding: 16px 0;
  }
}

@media (max-width: 760px) {
  .lock[hidden] {
    display: none !important;
  }
}

#remote-viewport #view {
  margin-inline: auto;
}

.remote-stage > .section-head > div {
  min-width: 0;
  flex: 1;
}
.remote-stage > .section-head > button {
  flex-shrink: 0;
  min-width: 60px;
  white-space: nowrap;
}

.market-strip {display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid var(--line,#e5e7eb);padding-top:12px}
.market-strip strong {font-size:18px;font-variant-numeric:tabular-nums}
.ledger-summary {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:18px 0}
.ledger-summary span {display:block;color:#737780;font-size:12px;margin-bottom:8px}
.ledger-summary strong {font-size:20px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.trade-record {padding:16px 0;border-top:1px solid #e5e7eb}
.trade-record-head {display:flex;justify-content:space-between;gap:12px;align-items:center}
.trade-record-head span {font-weight:600;font-variant-numeric:tabular-nums}
.trade-record p {font-size:13px;color:#626671;line-height:1.65;margin:6px 0 0;overflow-wrap:anywhere}
.trade-record .loss {color:#a13b36}
#payout[readonly] {background:#f4f5f6;font-variant-numeric:tabular-nums}
@media(max-width:760px){.ledger-summary{gap:10px}.ledger-summary strong{font-size:17px}.trade-record-head{align-items:flex-start}.market-strip strong{font-size:16px}.market-strip button{flex-shrink:0}}

#mobile-more a { display: block; padding: 14px 16px; color: inherit; text-decoration: none; min-height: 44px; box-sizing: border-box; }
