/* ═══════════════════════════════════════════════════════════════
   VENUE COMMAND · on a phone (owner 2026-10-17: "mobile friendly so venue
   owners and staff can use on the go").
   The same portal, the same sections, laid out the way the member app is:
   a compact top bar, one column of cards, a bottom tab bar with the four
   things a bar touches most and a "More" sheet for everything else. Modals
   become bottom sheets. Nothing here changes what a section does.
   ═══════════════════════════════════════════════════════════════ */
@media (max-width:900px){
  html{-webkit-text-size-adjust:100%}
  body{padding-bottom:calc(74px + env(safe-area-inset-bottom,0px))}
  body.gated{padding-bottom:0}

  /* top bar: mark · venue · account */
  .topbar{gap:10px;padding:10px 12px;padding-top:calc(10px + env(safe-area-inset-top,0px))}
  .brand .wm,.brand .build,.brand .sub{display:none}
  .brand img{width:30px;height:30px}
  .vswitch{flex:1;min-width:0}
  .vswitch>button{width:100%;padding:7px 10px}
  .vswitch .vmenu{left:0;right:0;width:auto}
  .top-right{gap:6px;margin-left:0}
  .top-right .tbtn,.top-right .wa-b,.top-right .wa-x,.top-right .whoami,.top-right .planpill .lbl{display:none}
  .top-right .tbtn.app{display:inline-flex;padding:7px 9px}.top-right .tbtn.app span{display:none}
  .top-right .tmore>summary.tbtn{display:inline-flex;padding:7px 9px}.top-right .tmore>summary span{display:none}
  .tmenu{width:min(290px,calc(100vw - 24px))}
  .top-right .planpill{font-size:9.5px;padding:5px 8px;white-space:nowrap}
  .top-right a.planpill{display:none}  /* GOD MODE: the owner knows; a phone header has no room for it */
  .vswitch .ar{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  /* the venue switcher takes the room; the right side keeps its icons whole (no sideways scroll on phones) */
  .topbar .top-right{flex:0 0 auto !important}
  .topbar .vswitch{flex:1 1 auto !important;max-width:none}
  /* Tonight's four counts sit two by two, not four full rows */
  .grid:has(>.lv-tile){grid-template-columns:1fr 1fr}.grid:has(>.lv-tile)>*{grid-column:1/-1}.grid>.card.lv-tile{grid-column:auto;padding:14px}
  .hdr-acct{padding:4px}.hdr-acct .ha-nm{display:none}

  /* tonight strip: one scrolling row */
  .marquee{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;min-height:46px}
  .marquee::-webkit-scrollbar{display:none}
  .mq-cell{padding:6px 12px;white-space:nowrap;flex:none}
  .mq-cell.members,.mq-cell.special{display:flex}
  .mq-cell.tonight{padding:6px 12px;font-size:10px}
  .mq-hh{min-width:0;padding:6px 12px;border-right:0}.mq-hh .row{white-space:nowrap}.mq-hh .mq-long{display:none}.mq-fix{min-height:28px;padding:0 10px;font-size:11px}
  .mq-hh{min-width:220px;max-width:70vw;order:0;border-top:0;padding:5px 12px;white-space:nowrap;overflow:hidden}.mq-hh *{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

  /* body */
  .shell{display:block;min-height:0}
  .side{display:none}
  .main{padding:14px 14px 24px}
  .pgtitle{margin-bottom:12px}
  .pgtitle h1{font-size:20px;font-family:var(--body);font-weight:900;letter-spacing:-.02em}
  .pgtitle .sub{width:100%;font-size:13px}
  .grid{grid-template-columns:1fr;gap:12px}
  .grid>*,.c3,.c4,.c5,.c6,.c7,.c8,.c9,.c12{grid-column:1/-1}
  .card{border-radius:20px;padding:16px}
  .kpi .n{font-size:28px}
  .lockwrap{grid-column:1/-1}
  .heatmap{height:300px}
  table{display:block;overflow-x:auto;white-space:nowrap}
  input,textarea,select{font-size:16px;padding:12px 13px;border-radius:14px}  /* 16px stops iOS zooming into fields */
  button.btn,.btn{min-height:46px}

  /* modals become bottom sheets, like the app's */
  .modal-bg{place-items:end stretch;padding:0;backdrop-filter:blur(10px)}
  .modal{width:100%;max-width:100%;max-height:92dvh;border-radius:26px 26px 0 0;border-bottom:0;padding:14px 16px calc(18px + env(safe-area-inset-bottom,0px));animation:vmUp .32s cubic-bezier(.22,1,.36,1)}
  .modal::before{content:"";display:block;width:44px;height:5px;border-radius:3px;background:rgba(168,190,235,.3);margin:0 auto 14px}
  .modal h2{font-family:var(--body);font-size:18px;font-weight:900;letter-spacing:-.02em}
  @keyframes vmUp{from{transform:translateY(40px);opacity:.6}}

  /* bottom tab bar */
  .vm-tabs{position:fixed;left:0;right:0;bottom:0;z-index:70;display:grid;grid-template-columns:repeat(5,1fr);height:calc(62px + env(safe-area-inset-bottom,0px));padding:4px 6px env(safe-area-inset-bottom,0px);
    background:rgba(8,11,20,.92);-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);border-top:1px solid var(--line)}
  body.light .vm-tabs{background:rgba(255,255,255,.92)}
  .vm-tab{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border-radius:14px;color:var(--muted);font:700 10.5px/1 var(--body);letter-spacing:.02em;position:relative;transition:color .15s,transform .15s}
  .vm-tab .ico{width:22px;height:22px}
  .vm-tab:active{transform:scale(.94)}
  .vm-tab.on{color:var(--text)}
  .vm-tab.on .ico{color:var(--red)}
  .vm-tab.on::before{content:"";position:absolute;top:0;width:22px;height:3px;border-radius:2px;background:var(--red)}
  .vm-tab .lk{position:absolute;top:6px;right:calc(50% - 20px);width:8px;height:8px;border-radius:50%;background:var(--amber)}
  body.gated .vm-tabs,body.staff .vm-tabs{display:none}

  /* "More" sheet: every section, grouped, with the live listing and staff app at the end */
  .vm-more{position:fixed;inset:0;z-index:90;background:rgba(6,8,15,.6);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);display:flex;align-items:flex-end;animation:pop .15s ease-out}
  .vm-sheet{width:100%;max-height:88dvh;overflow:auto;background:var(--panel);border-radius:26px 26px 0 0;padding:12px 14px calc(16px + env(safe-area-inset-bottom,0px));animation:vmUp .32s cubic-bezier(.22,1,.36,1)}
  .vm-sheet .grip{width:44px;height:5px;border-radius:3px;background:rgba(168,190,235,.3);margin:0 auto 12px}
  .vm-sheet h3{font:900 18px/1.2 var(--body);letter-spacing:-.02em;margin:4px 2px 12px;display:flex;align-items:center}
  .vm-sheet h3 .x{margin-left:auto;width:34px;height:34px;border-radius:50%;background:var(--panel2);display:grid;place-items:center;color:var(--muted)}
  .vm-k{font:800 9.5px/1 var(--body);letter-spacing:.2em;text-transform:uppercase;color:var(--faint);margin:14px 4px 6px}
  .vm-list{display:grid;gap:2px}
  .vm-it{display:flex;align-items:center;gap:12px;width:100%;min-height:50px;padding:0 10px;border-radius:14px;color:var(--text);font:700 15px/1.2 var(--body);text-align:left;text-decoration:none}
  .vm-it .em{width:36px;height:36px;border-radius:11px;background:var(--panel2);display:grid;place-items:center;color:var(--muted);flex:none}
  .vm-it .em .ico{width:18px;height:18px}
  .vm-it.on{background:var(--red-dim)}
  .vm-it.on .em{background:rgba(255,39,64,.18);color:var(--red)}
  .vm-it .lk{margin-left:auto;font:800 9.5px/1 var(--body);letter-spacing:.14em;text-transform:uppercase;color:var(--amber-t);padding:5px 7px;border-radius:7px;background:var(--amber-dim)}
  .vm-it .go{margin-left:auto;color:var(--faint)}
  .vm-it:active{transform:scale(.985)}
}
@media (max-width:900px){
  /* More sheet = a grid of phone icons, not a list */
  .vm-list{grid-template-columns:repeat(4,1fr);gap:8px}
  .vm-it{flex-direction:column;justify-content:center;gap:7px;min-height:86px;padding:10px 3px 8px;background:var(--panel2);border-radius:16px;font:700 11.5px/1.15 var(--body);text-align:center;position:relative}
  .vm-it .em{width:40px;height:40px;border-radius:13px}.vm-it .em .ico{width:22px;height:22px}
  .vm-it .go{display:none}
  .vm-it .lk{position:absolute;top:5px;right:5px;margin:0;padding:3px 5px;font-size:8px}
  .top-right .tbtn.app{padding:8px 10px;border-radius:12px;background:var(--panel2)}
}
@media (min-width:901px){.vm-tabs,.vm-more{display:none!important}}

/* ── Venue Command home: icons like a phone, four across, one thumb (owner 2026-10-20) ── */
@media (max-width:900px){
  #vmMore{position:fixed;inset:0;z-index:60}
  .vh-home{position:fixed;inset:0;z-index:60;display:flex;flex-direction:column;background:radial-gradient(120% 70% at 50% -10%,#1b2238 0%,#0b0f1b 55%,#070a12 100%);padding:calc(env(safe-area-inset-top,0px) + 14px) 0 calc(70px + env(safe-area-inset-bottom,0px))}
  .vh-top{padding:6px 22px 14px}.vh-top h2{margin:0;font:900 24px/1.05 var(--body,inherit);letter-spacing:-.02em;color:#F3F6FE;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vh-top small{display:block;margin-top:5px;font:700 12px/1 var(--body,inherit);color:#8FA0C4}
  .vh-pager{flex:1;min-height:0;display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;-webkit-overflow-scrolling:touch}.vh-pager::-webkit-scrollbar{display:none}
  /* the home grid: Browse-row tiles, two across, scrolling down (owner 2026-10-25: "match the home page look") */
  .vh-pager{overflow-x:hidden;overflow-y:auto;scroll-snap-type:none}
  .vh-page{flex:0 0 100%;display:grid;grid-template-columns:repeat(2,1fr);align-content:start;gap:10px;padding:6px 14px 24px}
  @media (min-width:600px){.vh-page{grid-template-columns:repeat(3,1fr)}}
  .vh-i{--hb:#FF2740;position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:10px;min-height:124px;padding:12px;border-radius:16px;border:1px solid color-mix(in srgb,var(--hb) 28%,transparent);background:linear-gradient(160deg,color-mix(in srgb,var(--hb) 16%,#0B0F1A) 0%,#0B0F1A 70%);color:#F3F6FE;font-family:var(--body,inherit);text-align:left;min-width:0;text-decoration:none;overflow:hidden;isolation:isolate;-webkit-tap-highlight-color:transparent;transition:transform .16s cubic-bezier(.23,1,.32,1)}
  .vh-i:active{transform:scale(.97)}
  .vh-i .hb-ph{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-2;transform:scale(1.02);transition:transform .5s cubic-bezier(.23,1,.32,1)}
  .vh-i.has-ph{border-color:color-mix(in srgb,var(--hb) 45%,transparent);background:#0B0F1A}
  .vh-i.has-ph::before{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(180deg,rgba(6,8,15,.10) 0%,rgba(6,8,15,.35) 42%,rgba(6,8,15,.92) 100%),linear-gradient(135deg,color-mix(in srgb,var(--hb) 30%,transparent) 0%,transparent 55%)}
  .vh-i::after{content:"";position:absolute;left:0;right:0;bottom:0;height:3px;background:var(--hb)}
  .vh-i:active .hb-ph{transform:scale(1.07)}
  .vh-i .ic-t{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;color:var(--hb);background:rgba(6,8,15,.78);border:1px solid color-mix(in srgb,var(--hb) 55%,transparent);box-shadow:0 6px 14px -8px rgba(0,0,0,.7);transition:transform .18s cubic-bezier(.16,1,.3,1)}
  .vh-i .ic-t svg{width:20px;height:20px}
  .vh-i .l{display:flex;flex-direction:column;gap:3px;min-width:0;max-width:100%}
  .vh-i .l b{font-family:var(--display,var(--body,inherit));font-size:12.5px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;line-height:1.15;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.6)}
  .vh-i .l i{font-style:normal;font:500 11.5px/1.2 var(--body,inherit);color:rgba(255,255,255,.82);text-shadow:0 1px 2px rgba(0,0,0,.6);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .vh-i.on{outline:2px solid #fff;outline-offset:-2px}
  .vh-lk{position:absolute;top:10px;right:10px;width:18px;height:18px;border-radius:50%;background:#FFB020;box-shadow:0 0 0 2px #0b0f1b}
  .vh-dots{display:flex;justify-content:center;gap:7px;padding:10px 0 6px}.vh-dots i{width:7px;height:7px;border-radius:50%;background:rgba(190,205,240,.28)}.vh-dots i.on{background:#fff;transform:scale(1.15)}
  @media(prefers-reduced-motion:reduce){.vh-i .ic-t{transition:none}}
}

/* ── Tonight on a phone, first open (owner 2026-11-01: "make sure mobile dashboard is stunning at first open") ──
   greeting → the venue's photo card → the four counts → actions; plans move to a swipeable row at the end */
@media (max-width:760px){
  .ph-hello{padding:6px 2px 16px}
  .ph-k{display:block;font:700 11px/1.3 'JetBrains Mono',ui-monospace,monospace;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
  .ph-k b{font-weight:700;color:var(--muted)}.ph-k b.op{color:#3DDC84}
  .ph-hello h1{margin:8px 0 4px;font:800 26px/1.12 Unbounded,Outfit,sans-serif;letter-spacing:-.02em;color:#fff}
  .ph-hello p{margin:0;font:500 15px/1.4 Outfit,sans-serif;color:var(--muted)}
  .grid.ph-ov>.lv-hero{order:-3;min-height:320px;border-radius:24px;padding:18px}
  .grid.ph-ov>.lv-tile{order:-2}
  .grid.ph-ov>.lv-hero .lv-dealtxt{font-size:26px;line-height:1.15}
  .grid.ph-ov>.lv-hero .lv-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}.grid.ph-ov>.lv-hero .lv-row .lv-btn{min-height:46px;justify-content:center}
  .grid.ph-ov>.lv-tile .lv-n{font-size:34px}
  body.anim-entry .ph-hello{animation:phRise .5s cubic-bezier(.16,1,.3,1) backwards}
  body.anim-entry .grid.ph-ov>.lv-hero .lv-hero-bg{animation:phSettle 1.4s cubic-bezier(.16,1,.3,1) backwards}
  body.anim-entry .grid.ph-ov>.card{animation:phRise .55s cubic-bezier(.16,1,.3,1) backwards}
  body.anim-entry .grid.ph-ov>.lv-hero{animation-delay:60ms}
  body.anim-entry .grid.ph-ov>.lv-tile:nth-of-type(n){animation-delay:160ms}
  body.anim-entry .grid.ph-ov>.lv-tile+.lv-tile{animation-delay:200ms}
  body.anim-entry .grid.ph-ov>.lv-tile+.lv-tile+.lv-tile{animation-delay:240ms}
  body.anim-entry .grid.ph-ov>.lv-tile+.lv-tile+.lv-tile+.lv-tile{animation-delay:280ms}
  @keyframes phRise{from{opacity:0;transform:translateY(14px)}}
  @keyframes phSettle{from{transform:scale(1.08)}}
  /* plans: one card at a time, swiped */
  .ph-ladder{margin-top:14px}
  .ph-ladder .cl-row{display:grid;grid-auto-flow:column;grid-template-columns:none;grid-auto-columns:84%;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;padding-bottom:4px;margin:0 -16px;padding-left:16px;padding-right:16px;scroll-padding-left:16px}
  .ph-ladder .cl-row::-webkit-scrollbar{display:none}
  .ph-ladder .cl-col{scroll-snap-align:start}
  /* the tonight strip: whole words, it scrolls sideways on its own */
  .mq-hh{min-width:0;max-width:none;flex:none;overflow:visible}.mq-hh *{overflow:visible;text-overflow:clip}
  .mq-hh .track{min-width:160px}
}
@media (max-width:760px) and (prefers-reduced-motion:reduce){
  body.anim-entry .ph-hello,body.anim-entry .grid.ph-ov>.card,body.anim-entry .grid.ph-ov>.lv-hero .lv-hero-bg{animation:none}
}
/* Tonight's four counts on a phone: one quiet row, not four big boxes */
@media (max-width:760px){
  .grid.ph-ov:has(>.lv-tile){grid-template-columns:repeat(4,1fr);gap:8px}
  .grid.ph-ov>.card.lv-tile{grid-column:auto;padding:12px 8px 10px;border-radius:16px;align-items:center;text-align:center;gap:2px}
  .grid.ph-ov>.lv-tile .lv-n{font-size:26px;min-height:28px;justify-content:center}
  .grid.ph-ov>.lv-tile .lv-l{font-size:11.5px;line-height:1.2}
  .grid.ph-ov>.lv-tile .lv-s{display:none}
}
/* Tonight's four counts on a phone: one quiet row, not four big boxes */
@media (max-width:760px){
  .grid.ph-ov:has(>.lv-tile){grid-template-columns:repeat(4,1fr);gap:8px}
  .grid.ph-ov>.card.lv-tile{grid-column:auto;padding:12px 8px 10px;border-radius:16px;align-items:center;text-align:center;gap:2px}
  .grid.ph-ov>.lv-tile .lv-n{font-size:26px;min-height:28px;justify-content:center}
  .grid.ph-ov>.lv-tile .lv-l{font-size:11.5px;line-height:1.2}
  .grid.ph-ov>.lv-tile .lv-s{display:none}
}
