/* Scoped presentation follow-up. No viewport zoom, hidden facts, fixed overlays,
   chart-height overrides, or changes to trading actions and their DOM order. */
@media(max-width:690px),
 (min-width:691px) and (max-width:1024px) and (max-height:500px) and (orientation:landscape) and (pointer:coarse){
 /* Readable editable text without enlarging every button or card. */
 .player-comments textarea{font-size:16px;line-height:1.4}
 .terminal .pair select{font-size:16px}

 /* After period/refresh move beside the plot controls, three actions remain.
    Flex lets speed, finish and retirement share the available row. */
 .terminal .chart-controls{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:4px}
 .terminal .chart-controls .speed-buttons{flex:1 1 auto;justify-content:flex-start}
 .terminal .chart-controls #finish-day,.terminal .chart-controls #retire{flex:0 0 auto;width:auto;margin:0}

 /* Keep the three related zoom controls together instead of leaving “−” alone.
    Explicit spans also work when history is hidden; no visual DOM reordering. */
 .terminal .candle-view-controls{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:4px;align-items:stretch}
 .terminal .candle-view-controls #quote-package-open{grid-column:span 1;min-width:0;width:100%;padding-inline:4px;white-space:normal}
 .terminal .candle-view-controls .quote-refresh-options{grid-column:span 5;min-width:0;max-width:none;width:100%}
 .terminal .candle-view-controls>button:not(#quote-package-open){grid-column:span 2;min-width:0;width:100%}
 .terminal .candle-view-controls .candle-history{grid-column:1/-1;min-width:0;margin:0}
}

/* Short touch landscape keeps market and order cards ahead of the character.
   Normal desktop pointers and taller tablet layouts retain their existing grid. */
@media(min-width:691px) and (max-width:1024px) and (max-height:500px) and (orientation:landscape) and (pointer:coarse){
 .topbar{height:auto;min-height:48px;flex-wrap:nowrap;align-items:center;gap:10px;padding-block:4px}
 .topbar .brand{flex:0 0 auto;font-size:16px;gap:8px}
 .topbar .top-right{flex:1 1 auto;min-width:0;width:auto;max-width:100%;flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;gap:4px;padding:2px 1px 5px;scrollbar-width:thin;overscroll-behavior-x:contain}
 .topbar .top-right>*{flex-shrink:0}
 main{padding-top:10px}
 .page-heading{align-items:center;gap:12px;margin-bottom:8px}
 .page-heading .eyebrow{font-size:10px;letter-spacing:.4px;line-height:1.4}
 .page-heading h1{font-size:24px;margin:2px 0}
 .page-heading p{font-size:11px;margin:3px 0}
 .page-heading .mission{gap:2px;max-width:58%;min-width:0}
 .page-heading .mission b,.page-heading .mission span,.page-heading .mission small{font-size:11px;line-height:1.4;overflow-wrap:anywhere}
 .game-grid>.market-stack{grid-column:1;grid-row:1}
 .game-grid>.trade-card{grid-column:2;grid-row:1}
 .game-grid>#character-card{grid-column:1/-1;grid-row:2}
}
