:root { --bg:#0a0d12; --text:#e6edf3; --dim:#7d8a99; --up:#0ecb81; --down:#f6465d;
        --amber:#f0b429; --line:#1c2531; }
* { box-sizing:border-box; -webkit-tap-highlight-color:transparent; }

html,body { margin:0; height:100%; background:var(--bg); color:var(--text); overflow:hidden;
            font:14px/1.3 -apple-system,"Segoe UI",Roboto,sans-serif;
            overscroll-behavior:none; }

header { display:flex; align-items:baseline; gap:14px; padding:12px 18px;
         border-bottom:1px solid var(--line); flex-wrap:wrap; }
.price { font-size:30px; font-weight:600; font-variant-numeric:tabular-nums; }
.delta { font-size:17px; color:var(--dim); font-variant-numeric:tabular-nums; }
.stuck { font-size:17px; font-weight:700; color:var(--amber); letter-spacing:.03em; display:none; }
.stuck.on { display:inline-block; }
.dot { width:8px; height:8px; border-radius:50%; background:var(--amber); margin-left:auto;
       align-self:center; }
.dot.live { background:var(--up); }
.dot.err { background:var(--down); }

main { height:calc(100% - 96px); overflow-y:auto; -webkit-overflow-scrolling:touch;
       padding:4px 18px 16px; }

.print { display:flex; align-items:baseline; gap:16px; padding:2px 0;
         font-variant-numeric:tabular-nums; }
.print .qty { width:130px; text-align:right; font-size:14px; }
.print .px { color:var(--dim); font-size:12px; }
.print.buy .qty { color:var(--up); }
.print.sell .qty { color:var(--down); }
.print.big .qty { font-size:20px; font-weight:700; }
.print.big .px { color:var(--text); }

footer { padding:7px 18px calc(7px + env(safe-area-inset-bottom)); border-top:1px solid var(--line);
         color:var(--dim); font-size:11px; }

/* ---------------- phones ---------------- */
@media (max-width: 640px) {
  header { padding:10px 14px; gap:10px; }
  .price { font-size:26px; }
  .delta { font-size:15px; }
  .stuck { font-size:15px; }
  main { padding:2px 14px 14px; height:calc(100% - 104px); }
  .print { gap:10px; padding:3px 0; }
  .print .qty { width:110px; font-size:15px; }   /* bigger touch-friendly rows */
  .print .px { font-size:11px; }
  .print.big .qty { font-size:22px; }
  footer { display:none; }                        /* no room for the legend on a phone */
}

/* tall phones: keep the newest prints at the top and give the list the whole screen */
@media (max-height: 500px) {
  header { padding:6px 14px; }
  .price { font-size:22px; }
  main { height:calc(100% - 74px); }
}
