/* Preserve the common hourly axis: narrow screens scroll the playfield only. */
body,body.auth-page{min-width:0}
button,a,input{touch-action:manipulation}
.timeline-scroll{min-width:0}
@media(max-width:1100px){.topbar{height:auto;min-height:55px;flex-wrap:wrap;gap:10px!important;padding:10px 16px}.topbar .workspace-label{order:3;width:100%;overflow:auto}.topbar-right{margin-left:auto}.topbar .coin-button span{display:inline}.topbar .coin-button{padding:7px}.workspace{grid-template-columns:minmax(0,1fr) 290px;gap:12px}.overview-top{align-items:flex-start;flex-wrap:wrap}.overview-top .hour-window{margin-left:auto}.selected-status{flex-wrap:wrap;white-space:normal;row-gap:6px}.market-status-strip .market-legend{display:none}}
@media(max-width:850px){body:not(.auth-page) main{padding:12px 14px 0}.workspace{grid-template-columns:minmax(0,1fr)}.ticket{position:static;padding:16px}.timeline-scroll{overflow-x:auto;overscroll-behavior-x:contain;padding-bottom:5px}.timeline-stack{min-width:650px}.market-workspace{--tier-gutter:49px}.tier{grid-template-columns:42px minmax(0,1fr);gap:7px}.market-card{min-height:110px}.card-top{flex-wrap:wrap}.chart-plot{height:130px}.timeline-stack{--chart-height:130px}.chart-toolbar{height:34px}.interval-guides,.time-cursor{top:35px}.chart-times{height:23px}.market-card .chance-row{font-size:12px;gap:8px}.portfolio-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.portfolio-main{padding:20px 14px!important}.portfolio-heading{gap:14px;align-items:flex-start}.portfolio-heading h1{font-size:24px}.history-panel{padding:12px}.history-toolbar{gap:12px;flex-wrap:wrap}.history-scroll{max-width:100%}.auth-nav{gap:15px}.auth-nav nav{gap:12px}.positions-heading{flex-wrap:wrap}.positions-heading>.muted{display:none}footer{gap:12px;flex-wrap:wrap}}
@media(max-width:480px){.topbar{padding:9px 12px}.topbar .brand{font-size:16px}.brand small{font-size:7px}.topbar-right{gap:6px}.topbar-right>.muted{display:none}.topbar-right strong{font-size:10px}.topbar .brand-mark{width:27px;height:30px;font-size:21px}.topbar .account-link{font-size:9px;padding:7px}.theme-toggle,.portfolio-icon{width:28px;height:28px}.workspace-label>.badge{display:none}.coin-picker{min-width:max-content}.overview-top{gap:12px}.price-row{gap:8px}.price-clock{padding-left:8px}.spot{font-size:22px}.spot>#btc-change{font-size:9px}.hour-window{width:100%;text-align:left;grid-template-columns:1fr auto}.selected-status{font-size:9px;gap:8px}.position-row{align-items:flex-start}.position-row>div:last-child{min-width:100px}.positions-heading h2{font-size:11px}.pending-history-link{font-size:8px}.rules-strip{align-items:flex-start;flex-wrap:wrap}.rules-strip p{flex:1;min-width:220px}.rules-strip button{margin-left:22px}.auth-nav{padding:18px 16px}.auth-nav nav{gap:8px;font-size:10px}.auth-nav .brand{font-size:17px}.auth-card{margin:20px 14px;padding:24px}.auth-card input{font-size:16px}.portfolio-heading{flex-wrap:wrap}.portfolio-stats{gap:8px}.portfolio-stats>.panel{padding:12px}.portfolio-stats strong{font-size:19px}.portfolio-stats span{font-size:8px}.history-filters{width:100%}.history-filters button{flex:1;padding:10px 8px}.history-scroll table{min-width:850px}dialog{padding:18px}footer>span:last-child{display:none}}

.timeline-scroll,.topbar .workspace-label,.history-scroll{scrollbar-width:thin;scrollbar-color:var(--muted) transparent}

/* Prominent instrument choices on prediction screens. */
.topbar:has(.coin-picker){height:auto;min-height:76px;flex-wrap:wrap;padding-block:12px;gap:14px 24px}
.topbar .workspace-label:has(.coin-picker){order:3;width:100%;overflow-x:auto;padding-bottom:3px}
.topbar .coin-picker{display:flex;gap:8px}
.topbar .coin-button{min-height:58px;padding:9px 14px;gap:10px;border-color:var(--border);background:var(--surface);border-radius:12px;font-size:13px;white-space:nowrap;color:var(--text)}
.topbar .coin-button img{width:38px;height:38px;object-fit:contain;filter:drop-shadow(0 2px 4px #0003)}
.topbar .coin-button:hover{background:var(--raised);border-color:var(--category-accent,var(--green))}
.topbar .coin-button[aria-pressed="true"]{border-color:var(--category-accent,var(--green));color:var(--category-accent,var(--green));background:color-mix(in srgb,var(--category-accent,var(--green)) 12%,var(--surface));box-shadow:inset 0 0 0 1px var(--category-accent,var(--green))}
.topbar .coin-button:focus-visible{outline:2px solid var(--category-accent,var(--green));outline-offset:3px}
.ticket .ticket-coin{gap:12px}
.ticket #ticket-coin-icon{width:44px;height:44px;object-fit:contain;flex-shrink:0}
.chart-coin-icon img{width:42px;height:42px}
@media(max-width:650px){.topbar .coin-button{min-height:54px;padding:8px 11px;font-size:12px}.topbar .coin-button img{width:34px;height:34px}.topbar .coin-picker{gap:7px}}

/* Pair pending and history actions with readable labels and distinct icons. */
.prediction-label-icon{width:20px;height:20px;flex-shrink:0;vertical-align:middle}
.positions-heading h2,.history-toolbar h2{display:flex;align-items:center;gap:9px}
.positions-heading h2{font-size:14px}
.positions-heading h2>.prediction-label-icon{color:var(--amber)}
.topbar .portfolio-icon{width:auto;height:auto;min-height:40px;padding:9px 12px;gap:8px;font-size:12px;font-weight:600;text-decoration:none;white-space:nowrap}
.pending-history-link{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:8px 12px;border:1px solid var(--border);border-radius:8px;background:var(--raised);font-size:12px;font-weight:600;text-decoration:none}
.pending-history-link:hover{border-color:var(--green)}
.portfolio-icon:focus-visible,.pending-history-link:focus-visible{outline:2px solid var(--green);outline-offset:3px}
.history-filters button[data-filter="pending"]{display:inline-flex;align-items:center;justify-content:center;gap:6px}
.history-filters .prediction-label-icon{width:16px;height:16px}
@media(max-width:650px){.topbar-right{flex-wrap:wrap}.topbar .portfolio-icon{font-size:11px;padding:8px}.positions-heading h2{font-size:13px}.pending-history-link{font-size:11px}}

/* Keep the balance prominent at every screen size. */
.account-balance{display:flex;flex-direction:column;gap:3px;flex-shrink:0;white-space:nowrap}
.account-balance>span{font-size:13px;color:var(--muted)}
.topbar-right .account-balance>strong{font-size:22px;line-height:1.2;font-variant-numeric:tabular-nums}
.portfolio-stats .panel:has(#portfolio-balance)>span{font-size:13px}
.portfolio-stats #portfolio-balance{font-size:30px}
@media(max-width:480px){.account-balance>span{font-size:11px}.topbar-right .account-balance>strong{font-size:18px}.portfolio-stats #portfolio-balance{font-size:25px}}

/* Keep the signed-in name beside its logout control, including on mobile. */
.account-identity{display:inline-flex;align-items:center;gap:12px;min-width:0}
.account-identity .signed-in-name{display:inline-block;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:'Sora',sans-serif;font-size:15px;font-weight:600;letter-spacing:.2px;line-height:1.4;color:var(--text)}
@media(max-width:650px){.account-identity{gap:8px}.account-identity .signed-in-name{max-width:120px;font-size:13px}.auth-nav{flex-wrap:wrap}.auth-nav nav{flex-wrap:wrap}}

.community-counts{display:flex;align-items:center;gap:12px;white-space:nowrap;font:11px 'Sora',sans-serif;color:var(--muted)}
.community-counts>span{display:inline-flex;align-items:center;gap:5px}.community-counts strong{font-size:14px;font-variant-numeric:tabular-nums;color:var(--text)}
.community-counts i{width:6px;height:6px;border-radius:50%;background:var(--green)}
@media(max-width:650px){.community-counts{gap:8px;font-size:10px}.community-counts strong{font-size:12px}}
