#phone-dock {display:none}
.phone-layout {
  --edge-left:max(10px,env(safe-area-inset-left));
  --edge-right:max(10px,env(safe-area-inset-right));
  --edge-top:max(4px,env(safe-area-inset-top));
  --edge-bottom:max(5px,env(safe-area-inset-bottom));
  margin:0; width:100%; height:100dvh; max-width:none;
  display:flex; flex-direction:column; overscroll-behavior:none;
}
.phone-layout .phone-skip,.phone-layout .page-turn[hidden] {display:none!important}
.phone-layout select,.phone-layout .page-turn button {
  font:800 16px/1.15 Nunito,sans-serif; color:#eff5de; background:#294a40;
  border:1px solid #789782; border-radius:9px; padding:5px 10px; min-height:40px;
}
.phone-layout .btn {min-height:40px; font-size:16px; padding:7px 13px}
.phone-layout .topbar {height:calc(44px + var(--edge-top));flex:none;padding:var(--edge-top) var(--edge-right) 0 var(--edge-left)}
.phone-layout .topbar .nav,.phone-layout .topbar .round {height:40px;min-width:40px;font-size:15px}
.phone-layout .topbar .brand {font-size:24px}
.phone-layout:not(.focus-play) main {
  flex:1;min-height:0;width:100%;max-width:none;display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  padding:3px var(--edge-right) var(--edge-bottom) var(--edge-left);gap:4px;
}
.phone-layout:not(.focus-play) .page-head {grid-row:1;height:auto;min-height:30px;margin:0}
.phone-layout .page-head>div:first-child {display:block}
.phone-layout .page-head h1 {font-size:22px;line-height:1.15;margin:0}
.phone-layout .page-head .eyebrow {display:none}
.phone-layout:not(.focus-play) .layout,.phone-layout:not(.focus-play) .game-column,.phone-layout:not(.focus-play) aside {display:contents}
.phone-layout:not(.focus-play) .layout .stage,.phone-layout:not(.focus-play) .layout .panel,
.phone-layout:not(.focus-play) #overview-air-slot,.phone-layout:not(.focus-play) #stations {display:none}
.phone-layout:not(.focus-play) main[data-view=map] .stage,
.phone-layout main[data-view=board] .board,.phone-layout main[data-view=outside] .conditions,
.phone-layout main[data-view=crew] .crew,.phone-layout main[data-view=service] #service:not([hidden]),
.phone-layout main[data-view=air] #overview-air-slot,.phone-layout main[data-view=stations] #stations:not([hidden]) {
  display:block;grid-row:2;grid-column:1;width:100%;height:100%;min-height:0;max-height:none;margin:0;
}
.phone-layout:not(.focus-play) #phone-dock {display:flex;grid-row:3;gap:8px;align-items:center;justify-content:space-between}
.phone-layout #phone-dock select {max-width:40vw}
.phone-layout #command {display:flex;align-items:center;gap:7px}
.phone-layout #command .job-line {display:none}
.phone-layout .panel,.phone-layout #stations {padding:9px 14px}
.phone-layout .panel .section-line,.phone-layout #stations .section-line {display:flex;margin-bottom:6px}
.phone-layout .section-line h2 {font-size:19px}
.phone-layout #tickets,.phone-layout #station-list,.phone-layout #stations {max-height:none;overflow:visible}
.phone-layout .ticket,.phone-layout .ticket.compact {width:100%;padding:8px 14px}
.phone-layout .ticket .ticket-title {font-size:19px}
.phone-layout .ticket p,.phone-layout .ticket.compact p,.phone-layout .roommate,.phone-layout .conditions-content p,.phone-layout .roommate small {font-size:15px}
.phone-layout .ticket-tag,.phone-layout .stage-foot span,.phone-layout .stage-top button,.phone-layout .live-tag {font-size:13px}
.phone-layout .service-line,.phone-layout .service-note,.phone-layout .station {font-size:15px}
.phone-layout #station-list {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;white-space:normal}
.phone-layout #station-list button,.phone-layout #filter-data button {min-height:40px;white-space:normal}
.phone-layout #filter-data {display:grid;grid-template-columns:1fr 1fr;gap:6px 16px;align-items:center}
.phone-layout #filter-data .service-line {margin:0}
.phone-layout #station-list .page-turn,.phone-layout #filter-data .page-turn {grid-column:1/-1}
.phone-layout .page-turn {display:flex;gap:10px;align-items:center;justify-content:center;margin-top:8px;color:inherit;font:800 14px Nunito}
.phone-layout .page-turn button:disabled {opacity:.45}
.phone-layout #dialog {
  width:min(760px,calc(100vw - var(--edge-left) - var(--edge-right)));
  max-width:calc(100vw - var(--edge-left) - var(--edge-right));
  max-height:calc(100dvh - var(--edge-top) - var(--edge-bottom) - 4px);margin:auto;
}
.phone-layout #dialog .dialog-inner {padding:14px 18px}
.phone-layout #dialog h2 {font-size:24px;line-height:1.1;margin:0 46px 7px 0}
.phone-layout #dialog h3 {font-size:19px;margin:5px 0}
.phone-layout #dialog p,.phone-layout #dialog label,.phone-layout #dialog .lesson-steps span {font-size:16px;line-height:1.35}
.phone-layout #dialog p {margin:7px 0}
.phone-layout #dialog .round.close {width:40px;height:40px;right:8px;top:6px;z-index:2}
.phone-layout #dialog .btn {margin:6px 0 0}
.phone-layout #dialog .setup-sheet {display:block}
.phone-layout .fitting-room {display:flex;justify-content:center;gap:18px}
.phone-layout .look-preview {height:clamp(105px,36dvh,164px);width:auto;flex:none}
.phone-layout .look-controls button {font-size:15px}
.phone-layout .look-controls button {min-height:34px}
.phone-layout #dialog .home-picks img {height:clamp(35px,19dvh,98px)}
.phone-layout .home-picks strong {font-size:15px}
.phone-layout .home-picks small,.phone-layout .look-controls small {font-size:13px}
.phone-layout .setup-name {padding-right:26px}
.phone-layout #name-picker {margin:4px 0}
.phone-layout #name-picker legend {font-size:20px}
.phone-layout #dialog .name-parts label {display:grid;margin:0}
.phone-layout .lesson-steps {margin:6px 0}
.phone-layout .lesson-steps li:before {content:none}
.phone-layout .lesson-steps li {padding:8px 0 0}
.phone-layout .lesson-steps b {font-size:19px}
.phone-layout #dialog[data-sheet=pause] #dialog-content {display:grid;grid-template-columns:1fr 1fr;gap:4px 8px}
.phone-layout #dialog[data-sheet=pause] :is(.dialog-kicker,h2,p) {grid-column:1/-1}
.phone-layout #dialog[data-sheet=pause] .btn {margin:0}
.phone-layout .guide-picker {display:flex;gap:10px;margin:8px 0}
.phone-layout .guide-picker select {min-width:0;max-width:70%}
.phone-layout #guide-reading:has(figure) {display:grid;grid-template-columns:minmax(100px,26%) 1fr;gap:16px;align-items:center}
.phone-layout #guide-reading figure {margin:0}
.phone-layout #guide-reading .pollutant-art {width:100%;max-width:none}
.phone-layout #guide-reading figcaption {font-size:14px}
.phone-layout #guide-reading a,.phone-layout #dialog[data-sheet=privacy] a {color:var(--mint)}
.phone-layout #window-lab {display:grid;grid-template-columns:1fr 1fr;gap:4px 12px;align-items:center}
.phone-layout #window-lab .chart-select {grid-area:1/1;gap:6px}
.phone-layout #window-lab .chart-select label {margin:0;font-size:14px}
.phone-layout #window-lab .chart-select select {min-height:34px;font-size:14px}
.phone-layout #window-lab [data-plot] {grid-area:1/2/3/3}
.phone-layout #window-lab [data-street] {grid-area:2/1;font-size:15px}
.phone-layout #window-lab .lab-actions {grid-column:1/-1;display:flex;gap:6px}
.phone-layout #window-lab .lab-actions button {min-height:38px;font-size:15px}
.phone-layout #window-lab .air-plot {max-height:90px}
.phone-layout .standings-title>span,.phone-layout .empty-homes {display:none}
.phone-layout .standings-controls {margin:6px 0}
.phone-layout #standings-list {min-height:0;max-height:none;overflow:visible;scrollbar-gutter:auto}
.phone-layout .board-empty,.phone-layout .board-message {padding:7px}
.phone-layout .standings-footer {margin-top:3px}
.phone-layout .standings-footer a {white-space:nowrap}
.phone-layout .standings-sheet .record-row {padding:3px 8px}
.phone-layout .standings-sheet .record-row small {font-size:13px}
.phone-layout .standings-sheet .page-turn {margin:0;padding:3px}
.phone-layout .standings-sheet .page-turn button {min-height:34px}
.phone-layout .pilot-stack {width:clamp(210px,32vw,288px);max-width:none}
.phone-layout .pilot-stack .pilot-hud {padding:3px 7px;gap:5px}
.phone-layout .pilot-hud strong {font-size:16px}
.phone-layout #climate,.phone-layout .pilot-bars {font-size:12px}
.phone-layout #pilot-air-slot #hud-air {padding:4px 7px}
.phone-layout #hud-air .air-heading strong,.phone-layout .air-series>strong {font-size:15px}
.phone-layout .air-heading span,.phone-layout .air-series small,.phone-layout .plot-axis,.phone-layout .plot-scale {font-size:11px}
.phone-layout .air-plots {gap:7px;margin:2px 0}
.phone-layout .air-series {display:grid;grid-template-columns:1fr auto;gap:0}
.phone-layout .air-series>strong,.phone-layout .air-series .concentration {grid-column:1/-1}
.phone-layout .air-series .concentration b {font-size:20px;line-height:1.1}
.phone-layout .air-series .concentration span {font-size:12px}
.phone-layout .air-chart-area svg {height:clamp(23px,7dvh,42px)}
.phone-layout .air-conditions {gap:4px;padding-top:3px}
.phone-layout .air-conditions span {display:block;font-size:12px}
.phone-layout .air-conditions b {display:block;font-size:15px}
.phone-layout #pace-line {font-size:13px;margin-top:3px;padding-top:2px}
.phone-layout #overview-air-slot #hud-air {height:100%;padding:8px 14px}
.phone-layout #overview-air-slot .air-series {grid-template-columns:auto 1fr}
.phone-layout #overview-air-slot .air-series small {grid-column:2;grid-row:2;align-self:center;text-align:right}
.phone-layout #overview-air-slot .air-chart-area svg {height:clamp(30px,13dvh,90px)}
.phone-layout .hud-tool {min-width:40px;min-height:40px;font-size:14px}
.phone-layout .mission {font-size:15px;min-height:38px;max-width:30vw;padding:5px 8px}
.phone-layout #cue-title,.phone-layout .action-prompt strong {font-size:16px}
.phone-layout #cue-cost,.phone-layout .action-prompt small,.phone-layout #cue-options .station-swap,.phone-layout #cue-options .unit-actions button {font-size:13px}
.phone-layout .hud-tools {gap:4px;right:var(--edge-right)}
.phone-layout #map span,.phone-layout #find-filter span {display:none}
.phone-layout #map:after {content:'Map';font-size:14px}
.phone-layout .action-prompt {max-width:45vw}
.phone-layout #toast {font-size:15px}
@media(orientation:landscape) and (max-height:390px){
  .phone-layout .pilot-stack .pilot-hud>div {display:grid;grid-template-columns:1fr auto;align-items:center;column-gap:4px}
  .phone-layout .pilot-hud .avatar {display:none}
  .phone-layout #climate {font-size:12px;max-width:108px}
  .phone-layout #play-hud {--pad-bottom:20px}
  .phone-layout #stick {width:74px}
  .phone-layout #pilot-air-slot .air-series {display:grid;gap:0}
  .phone-layout #pilot-air-slot .air-conditions span {display:block}
  .phone-layout #dialog[data-sheet=records] .standings-title p {display:none}
  .phone-layout #dialog[data-sheet=records] [data-action=close] {display:none}
}
@media(orientation:portrait){
  .phone-layout:not(.focus-play) #phone-dock {flex-wrap:wrap}
  .phone-layout #command {flex-wrap:wrap}
  .phone-layout .pilot-stack {width:min(61vw,280px)}
  .phone-layout .mission {max-width:85vw}
  .phone-layout .action-prompt {max-width:85vw}
  .phone-layout #dialog .dialog-inner {padding:17px 12px}
  .phone-layout .fitting-room {gap:8px;align-items:center}
  .phone-layout .look-preview {max-width:31%;height:auto;aspect-ratio:1/1.25}
  .phone-layout .look-controls {min-width:0}
  .phone-layout #guide-reading:has(figure),.phone-layout #window-lab {display:block}
  .phone-layout #guide-reading figure {max-width:165px;margin:10px 0}
  .phone-layout #window-lab .lab-actions {margin:8px 0}
  .phone-layout #station-list {grid-template-columns:1fr 1fr}
}
.phone-layout {min-height:0}
.phone-layout .air-heading {gap:6px;white-space:nowrap}
.phone-layout #pilot-air-slot .air-series {grid-template-columns:minmax(0,1fr) auto}
.phone-layout #pilot-air-slot .concentration {grid-column:1;grid-row:2;white-space:nowrap}
.phone-layout #pilot-air-slot .air-series small {grid-column:2;grid-row:2;align-self:center}
.phone-layout #pilot-air-slot .air-series .concentration b {font-size:18px}
.phone-layout #pilot-air-slot .air-series .concentration span {font-size:11px}
@media(orientation:landscape){
  .phone-layout .pilot-stack {width:clamp(246px,32vw,290px)}
  .phone-layout #pilot-air-slot .air-series {display:grid;grid-template-columns:minmax(0,1fr) auto}
  .phone-layout #dialog[data-sheet=window-lab] #dialog-content {display:grid;grid-template-columns:1fr auto;align-items:center}
  .phone-layout #dialog[data-sheet=window-lab] #dialog-content>h2 {grid-area:1/1}
  .phone-layout #dialog[data-sheet=window-lab] #dialog-content>.btn {grid-area:1/2;margin:0 37px 0 0;width:auto}
  .phone-layout #dialog[data-sheet=window-lab] #dialog-content>p {grid-column:1/-1;margin:2px 0}
  .phone-layout #window-lab {grid-column:1/-1;margin:3px 0 0}
  .phone-layout #window-lab .chart-select {display:grid;grid-template-columns:minmax(65px,.8fr) minmax(100px,1.5fr);align-items:end}
  .phone-layout #window-lab .chart-select label,.phone-layout #window-lab .chart-select select {min-width:0;max-width:100%;width:100%}
  .phone-layout #window-lab .lab-actions {margin:0}
  .phone-layout #window-lab .trace-values {margin:0}
}
@media(max-width:710px){
  .phone-layout .topbar,.phone-layout .topbar nav,.phone-layout .top-tools {gap:2px}
  .phone-layout .topbar .nav[data-nav=home] span {display:none}
}
@media(orientation:portrait){
  .phone-layout .topbar .nav {min-width:36px;padding:5px}
  .phone-layout .topbar .brand {gap:3px;font-size:21px}
  .phone-layout .topbar .brand img {width:30px;height:30px}
}
.phone-layout .page-turn [data-next][hidden] {display:none}
.phone-layout #dialog .page-turn .btn {width:auto;margin:0}
.phone-layout .section-line .page-turn {margin:0 0 0 auto}
.phone-layout .section-line:has(.page-turn:not([hidden]))>.count,
.phone-layout .section-line:has(.page-turn:not([hidden]))>span {display:none}
.phone-layout #filter-data {display:block}
.phone-layout .service-group {display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:6px 12px}
.phone-layout #filter-data .service-note {margin:0}
.phone-layout .service-group .meter {grid-column:1/-1;margin:0}
.phone-layout #dialog[data-sheet=privacy] #dialog-content>button,.phone-layout .standings-sheet>[data-action=close] {display:none}
.phone-layout #toast {pointer-events:none}
@media(orientation:landscape) and (max-height:340px){
  .phone-layout #dialog .dialog-inner {padding:9px 15px}
  .phone-layout #dialog .look-preview {height:108px}
  .phone-layout #dialog .standings-controls select {min-height:36px}
  .phone-layout:not(.focus-play) main:not([data-view=map]) .page-head {display:none}
  .phone-layout:not(.focus-play) main:not([data-view=map]) {grid-template-rows:0 minmax(0,1fr) auto}
  .phone-layout #dialog[data-sheet=pause] .dialog-kicker {display:none}
  .phone-layout #dialog[data-sheet=pause] #dialog-content {gap:3px 7px}
}
@media(orientation:landscape) and (max-height:300px){
  .phone-layout #climate {max-width:none}
  .phone-layout .air-heading strong {display:none}
  .phone-layout #pilot-air-slot .air-heading {position:absolute;right:7px;top:3px}
  .phone-layout #pilot-air-slot #hud-air {position:relative;padding-top:17px}
  .phone-layout #pilot-air-slot .air-conditions {gap:4px}
  .phone-layout #pilot-air-slot .air-conditions span {display:grid;gap:0;font-size:12px;line-height:1.1}
  .phone-layout #pilot-air-slot .air-conditions b {font-size:13px}
  .phone-layout #pilot-air-slot #pace-line {margin-top:1px;padding-top:1px}
  .phone-layout #play-hud {--pad-bottom:14px}
  .phone-layout #stick {width:65px}
}
@media(orientation:landscape) and (max-height:340px){
  .phone-layout #dialog[data-sheet=guide] #dialog-content {display:grid;grid-template-columns:auto minmax(0,1fr);gap:5px 10px;align-items:center}
  .phone-layout #dialog[data-sheet=guide] h2 {font-size:21px;margin:0}
  .phone-layout #dialog[data-sheet=guide] .guide-picker {margin:0 35px 0 0;justify-content:end;gap:4px}
  .phone-layout #dialog[data-sheet=guide] .guide-picker select {max-width:65%;font-size:15px}
  .phone-layout #guide-reading {grid-column:1/-1}
  .phone-layout #guide-reading:not(:has(figure)) h3 {display:none}
  .phone-layout #dialog[data-sheet=privacy] p {line-height:1.28}
  .phone-layout #dialog[data-sheet=privacy] .page-turn {margin-top:4px}
  .phone-layout #dialog[data-sheet=privacy] .page-turn .btn {margin:0}
}
.phone-layout #dialog .standings-footer>.btn {width:auto;margin:0;min-height:36px}
@media(orientation:landscape) and (max-height:300px){
  .phone-layout #dialog .setup-name #name-picker {margin:0}
  .phone-layout .setup-name #score-identity p {margin:3px 0}
  .phone-layout #dialog .setup-name .btn {margin-top:2px}
  .phone-layout #dialog .standings-title {margin-bottom:0}
  .phone-layout #dialog .standings-controls {margin:4px 0}
}
@media(orientation:landscape){
  .phone-layout #dialog[data-sheet=over] #dialog-content {display:grid;grid-template-columns:minmax(155px,1fr) 1.4fr;gap:4px 15px}
  .phone-layout #dialog[data-sheet=over] #dialog-content>.btn {grid-column:1/-1}
  .phone-layout #dialog .result-options label {margin:6px 0}
}
@media(orientation:landscape) and (max-height:300px){
  .phone-layout #dialog .result-options label {margin:3px 0;line-height:1.25}
  .phone-layout #dialog[data-sheet=over] .btn {margin-top:3px}
}

