/* NightOut on a computer (plan v13, pass D; finding 29). index.html links this sheet with media="(min-width: 1024px)", so a
   phone or a tablet never reads a rule of it. It is the same NightOut laid out wider: the classes, sizes and colours of
   components.css and app.css, put on a grid. Nothing here needs a change of markup: each screen is told by the class of its
   body (.home, .discover, .venue, .route, .tonight, .account), the frame by what #foot holds (the navigation or a bar).
   Colours are names from tokens.css only. */

:root{
  --dw:560px; /* the width of a screen's content; Home, Discover and a place take 1120 px (below) */
  --gut:32px; /* the room either side of it */
  --rail:92px; /* the navigation, down the left side */
  --plan-col:440px; /* a plan's list, beside its map */
}

/* The page is the app's own colour from edge to edge: no dark fields, no frame round a phone column. */
html,body{background:var(--bg)}
.app{max-width:none;box-shadow:none}
.app:has(> #screen > .home),.app:has(> #screen > .discover),.app:has(> #screen > .venue){--dw:1120px}

/* A screen's header and content share one centred column. */
.hdr-row{width:100%;max-width:calc(var(--dw) + 2 * var(--gut));margin:0 auto;padding:0 var(--gut)}
.screen>.body,.screen>.invite{width:100%;max-width:calc(var(--dw) + 2 * var(--gut));margin:0 auto;padding:0 var(--gut) 48px}
.screen>.invite{padding:0}
#foot>.abar{width:100%;max-width:calc(var(--dw) + 2 * var(--gut));margin:0 auto}

/* Home, Discover, Tonight, Account, a place: the navigation is a strip down the left, with the same icons and words. */
.app:has(> #foot > .tabbar){display:grid;grid-template-columns:var(--rail) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}
.app:has(> #foot > .tabbar)>#hdr{grid-area:1/2/2/3}
.app:has(> #foot > .tabbar)>#screen{grid-area:2/2/3/3}
.app:has(> #foot > .tabbar)>#foot{grid-area:1/1/3/2;min-height:0}
.tabbar{flex-direction:column;gap:6px;height:100%;padding:12px 8px;border-top:0;border-right:1px solid var(--line)}
.tab{flex:none;padding:12px 0 10px;border-radius:14px}
.tab:before{inset:0}
.tab:hover{background:var(--cocoa);color:var(--cream)}
.tabbar .tab.has-dot:after{top:12px;border-color:var(--coal)}

/* A plan and a ready route: the list in a column on the left (the phone's own layout, header and "Send to group" with it),
   the map on the rest of the window, where it stays while the list scrolls. map.js follows its box (ResizeObserver). */
.app:has(> #screen > .route){--dw:calc(var(--plan-col) - 40px);--gut:20px;display:grid;grid-template-columns:var(--plan-col) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto}
.app:has(> #screen > .route)>#hdr{grid-area:1/1/2/2}
.app:has(> #screen > .route)>#screen{grid-area:2/1/3/2}
.app:has(> #screen > .route)>#foot{grid-area:3/1/4/2}
.route>.route-map-wrap{position:fixed;z-index:7;top:0;right:0;bottom:0;left:var(--plan-col);padding:0}
.route>.route-map-wrap:has(.map-full){z-index:70} /* the map opened over the whole window covers the list too */
.route>.route-map-wrap>.route-map{height:100%;border:0;border-left:1px solid var(--line);border-radius:0}
.route>.route-map-wrap>.map-full{border:0}

/* Home: the request in a centred column, the ready routes on a grid under it. */
.screen>.home{padding-top:28px}
.screen>.home>*{max-width:640px;margin-left:auto;margin-right:auto}
.home>.ttl{font-size:28px;line-height:34px;letter-spacing:-.02em;text-align:center}
.home .plan-form{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:10px;align-items:start;margin-top:20px}
.home .plan-form>.field{grid-area:1/1}
.home .plan-form>.btn{grid-area:1/2;width:auto;height:56px;margin-top:0;padding:0 28px}
.home .plan-form>.plan-status{grid-column:1/-1}
.home .plan-form>.party-row{grid-column:1/-1;justify-content:center} /* on the axis of the ideas under it (plan v23-UI, PR 3) */
.home .plan-form>.party-row .btn.text{margin:0}
.home>.ideas{justify-content:center;margin-top:14px}
.home>.plan-actions{justify-content:center}
.screen>.home>.route-list,.screen>.home>.sec:has(+ .route-list){max-width:none}
.home>.sec:has(+ .route-list){margin:40px 0 14px}
.home>.route-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.home>.route-list>.card.state{grid-column:1/-1}
.home .rcard .ph{height:180px}
@media (max-width:1280px){.home>.route-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Plan v20, routes A: "See all routes" centred under the grid; the full list's filters as wide as the grid. */
.screen>.home>.all-routes{width:auto;max-width:320px;margin:20px auto 0}
.screen>.home.all-routes-screen>*{max-width:none}
.all-routes-screen .chips{flex-wrap:wrap;overflow:visible;margin:6px 0 0;padding:0}

/* Discover: the search and the filters on top, the places in two columns. */
.screen>.discover{padding-top:8px}
.discover>.field{max-width:640px}
.discover>.chips{flex-wrap:wrap;overflow:visible;margin:14px 0 0;padding:0}
.discover>.vlist{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:40px;margin-top:12px}
.discover>.vlist>.vrow:nth-child(odd):nth-last-child(2){border-bottom:0} /* the last pair has no rule under it */
.discover>.vlist>:not(.vrow){grid-column:1/-1}
.discover>.pool{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:40px;margin-top:28px}
.discover>.pool>:not(.vrow){grid-column:1/-1}

/* A place: the photo on the left, its card on the right, both on the first screen of a 1366 x 768 window. The header (back,
   share) is a row above them, so the photo needs no veil for it. */
.app.has-hero .hdr{position:relative;background:var(--bg)}
.app.has-hero .ibtn.ph{background:var(--coal);border-color:var(--line);-webkit-backdrop-filter:none;backdrop-filter:none}
.screen>.venue{display:grid;grid-template-columns:minmax(0,1fr) 440px;gap:32px;align-items:start;width:100%;max-width:calc(var(--dw) + 2 * var(--gut));min-height:0;margin:0 auto;padding:4px var(--gut) 48px}
.venue>.venue-hero{position:sticky;top:4px;height:auto;aspect-ratio:4/3;max-height:calc(100vh - 108px);border-radius:20px}
.venue>.venue-hero:after{content:none}
.venue>.venue-card{margin:0}

/* Tonight, Account, My nights: one column of 560 px (the default width above). */
.tonight .live-map{height:220px}

/* Sheets (a table request, sign-in, Table requests, Open in maps): a window in the middle, not paper rising from the bottom. */
.sheet{top:50%;bottom:auto;max-width:480px;max-height:calc(100vh - 64px);max-height:calc(100dvh - 64px);padding:28px;border-radius:28px;transform:translate(-50%,-50%);animation-name:pop}
.sheet>.grab{display:none}
@keyframes pop{from{transform:translate(-50%,calc(-50% + 16px));opacity:0}to{transform:translate(-50%,-50%);opacity:1}}

/* The note that rises: at the bottom of the content, which has no bar under it now; on a plan, over its list. */
.toast{bottom:32px}
.app:has(> #foot > .tabbar)~.layer .toast{left:calc(50% + var(--rail) / 2)}
.app:has(> #screen > .route)~.layer .toast{left:calc(var(--plan-col) / 2);bottom:calc(32px + 88px);max-width:calc(var(--plan-col) - 40px)}
