/* Mobile (iOS / Android) — body.is-mobile is set below 820px */
.m-shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.m-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--safe-t)) 16px 10px; background: rgba(11, 12, 14, .9); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.m-top .logo { padding: 0; font-size: 20px; }
.m-top__title { flex: 1; min-width: 0; font: 600 20px/1.1 var(--font-display); letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-top .icon-btn { width: 40px; height: 40px; border: 0; background: transparent; }
.m-page { flex: 1; display: flex; flex-direction: column; gap: 20px; padding: 16px 16px calc(96px + var(--safe-b)); }
.m-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; padding: 6px 8px calc(8px + var(--safe-b)); background: rgba(15, 17, 19, .96); backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.m-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 48px; justify-content: center; font-size: 10.5px; font-weight: 600; color: var(--muted); }
.m-nav a.is-active { color: var(--text); }
.m-nav a.is-active:not(.m-nav__live) .i { color: var(--red); }
.m-nav__live span { display: grid; place-items: center; width: 56px; height: 56px; margin-top: -26px; border-radius: 16px; background: var(--red); color: #fff; box-shadow: 0 8px 22px rgba(255, 70, 85, .35), 0 0 0 5px var(--bg); }
.m-nav__live { color: var(--text) !important; }

.is-mobile .card { padding: 16px; border-radius: var(--r-lg); }
.is-mobile .sec-head h2 { font-size: 19px; }
.m-hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.m-hello h1 { font: 700 32px/1 var(--font-display); text-transform: uppercase; letter-spacing: .03em; }
.m-hello .muted { width: 100%; margin-bottom: -8px; }

/* Home */
.card--rank { display: flex; flex-direction: column; gap: 16px; background: radial-gradient(90% 90% at 0% 0%, rgba(197, 143, 240, .1), transparent 60%), var(--surface); }
.is-mobile .rank-card { gap: 14px; }
.is-mobile .rank-card__emblem { width: 76px; height: 76px; }
.is-mobile .rank-card__tier { font-size: 30px; margin: 2px 0 8px; }
.is-mobile .rank-card__meta { gap: 12px; flex-wrap: wrap; font-size: 12px; }
.is-mobile .kpis { grid-template-columns: repeat(4, 1fr); }
.is-mobile .kpi { padding: 0 8px; }
.is-mobile .kpi:first-child { padding-left: 0; }
.is-mobile .kpi__value { font-size: 22px; }
.is-mobile .kpi__label { font-size: 11px; }
.is-mobile .kpi__delta, .is-mobile .kpi__sub { font-size: 11px; }
.is-mobile .card--rank .kpis { padding-top: 14px; border-top: 1px solid var(--line); }
.kpis--m { display: grid; grid-template-columns: 1fr 1fr !important; gap: 10px; }
.kpis--m .kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px !important; }
.is-mobile .live-card { min-height: 250px; }
.is-mobile .live-card__agent { width: 78px; height: 92px; top: 48px; }
.is-mobile .live-card__title { font-size: 30px; }
.is-mobile .scroller.grid-4 { display: grid; grid-auto-flow: column; grid-auto-columns: 72%; grid-template-columns: none; gap: 12px; margin: 0 -16px; padding: 0 16px; scroll-snap-type: x mandatory; }
.is-mobile .scroller.grid-4 > * { scroll-snap-align: start; }
.is-mobile .grid-4 { grid-template-columns: 1fr 1fr; gap: 12px; }
.is-mobile .mrow { grid-template-columns: 44px 1fr auto; grid-template-areas: 'map who score' 'map kda rr'; row-gap: 2px; column-gap: 12px; padding: 10px 0; }
.is-mobile .mrow__map { grid-area: map; width: 44px; height: 44px; }
.is-mobile .mrow__who { grid-area: who; }
.is-mobile .mrow__who .av { display: none; }
.is-mobile .mrow__score { grid-area: score; text-align: right; display: flex; gap: 8px; align-items: baseline; justify-content: flex-end; }
.is-mobile .mrow__kda { grid-area: kda; display: flex; gap: 8px; align-items: baseline; }
.is-mobile .mrow__kda .num { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.is-mobile .mrow__stat { display: none; }
.is-mobile .mrow__rr { grid-area: rr; }
.is-mobile .mrow::before { left: -16px; }
.is-mobile .feature { grid-template-columns: 1fr; }
.is-mobile .feature__art { aspect-ratio: 16/10; }
.is-mobile .feature__body { padding: 16px; }
.is-mobile .feature__body h3 { font-size: 22px; }

/* Live */
.is-mobile .cta-big { flex: none; padding: 14px; }
.is-mobile .cta-big__t { font-size: 18px; }
.m-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.m-tabs a { display: flex; justify-content: center; align-items: center; gap: 6px; height: 46px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.m-tabs a.is-active { color: var(--text); border-color: var(--red); }
.m-tabs em { font-style: normal; font-size: 11px; padding: 2px 6px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); }
.chips--scroll { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
.chips--scroll::-webkit-scrollbar { display: none; }
.chips--scroll .chip { height: 36px; }
.stack-rows--m { gap: 8px; }
.stack-rows--m .lrow { padding: 10px; min-height: 64px; background: var(--surface); border: 1px solid var(--line); }
.stack-rows--m .lrow.is-active { border-color: var(--line-2); }
.stack-rows--m .lthumb--mini { width: 76px; }
.is-mobile .seg--block > * { height: 38px; }
.is-mobile .notice { align-items: flex-start; }

/* Viewer (mobile list) */
.m-viewer-map { position: relative; margin: -16px -16px 0; border-bottom: 1px solid var(--line); background: #0e1013; }
.sample--float { position: absolute; left: 12px; bottom: 10px; background: rgba(0, 0, 0, .6); }
.search--m { width: 100%; height: 46px; }

/* Full-screen lineup detail (second-screen view) */
.m-shell--full { background: var(--bg) var(--tex-grain) repeat; background-size: var(--tex-size); }
.m-detail { display: flex; flex-direction: column; min-height: 100vh; padding-bottom: calc(20px + var(--safe-b)); }
.m-detail__top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; padding: calc(8px + var(--safe-t)) 12px 8px; background: rgba(11, 12, 14, .94); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.m-detail__top .icon-btn { width: 44px; height: 44px; }
.m-detail__top > .icon-btn:first-child { border: 0; background: transparent; }
.m-detail__ttl { flex: 1; min-width: 0; font: 600 18px/1.15 var(--font-display); }
.m-detail__ttl > div:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-detail .video { border-radius: 0; border-left: 0; border-right: 0; }
.m-detail .video__play { width: 64px; height: 64px; }
.m-detail__body { display: flex; flex-direction: column; gap: 16px; padding: 16px; }
.m-detail__row { display: flex; flex-wrap: wrap; gap: 6px; }
.second { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.second__lbl { display: flex; gap: 12px; align-items: center; }
.second__lbl .i { color: var(--orange); }
.second__lbl div { display: flex; flex-direction: column; }
.second__lbl span { font-size: 12px; color: var(--muted); }
.second .switch { width: 50px; height: 30px; }
.second .switch i { width: 24px; height: 24px; }
.second .switch.is-on i { left: 22px; }
.dots { display: flex; gap: 6px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--surface-3); }
.dots i.on { width: 22px; border-radius: 4px; background: var(--orange); }
.m-detail__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini-card { display: flex; flex-direction: column; gap: 8px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.mini-card .lthumb--mini { width: 100%; }
.mini-card__art { aspect-ratio: 16/9; border-radius: 6px; overflow: hidden; }

/* Library mobile */
.m-pick { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); font-weight: 600; }
.m-pick .i { color: var(--muted); margin-right: 8px; }
.is-mobile .feat-row { display: grid; grid-auto-flow: column; grid-auto-columns: 82%; grid-template-columns: none; overflow-x: auto; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }

/* More */
.more-list { display: flex; flex-direction: column; gap: 8px; }
.more-item { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); font-weight: 600; }
.more-item > div { flex: 1; }
.more-item__i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r); background: var(--surface-3); color: var(--text-2); }
.more-item > .i { color: var(--muted); }

/* Generic screens on mobile */
.is-mobile .toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
.is-mobile .toolbar .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
.is-mobile .toolbar__r { margin-left: 0; }
.is-mobile .toolbar .search--inline { width: 100%; }
.is-mobile .review { flex-wrap: wrap; }
.is-mobile .review .seg { margin-left: 0; width: 100%; }
.is-mobile .review .seg > * { flex: 1; }
.is-mobile .agent-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
.is-mobile .agent-card__name { font-size: 20px; }
.is-mobile .agent-card__stats { flex-wrap: wrap; gap: 4px 10px; }
.is-mobile .agent-hero { grid-template-columns: 1fr; }
.is-mobile .agent-hero__art { height: 260px; border-right: 0; border-bottom: 1px solid var(--line); }
.is-mobile .agent-hero__info { padding: 18px; }
.is-mobile .agent-hero__info h2 { font-size: 48px; }
.is-mobile .agent-hero__stats { display: grid; grid-template-columns: repeat(4, 1fr); }
.is-mobile .agent-hero__stats > div { padding: 0 8px; }
.is-mobile .agent-hero__stats b { font-size: 22px; }
.is-mobile .agent-hero__cta { flex-wrap: wrap; }
.is-mobile .abilities { grid-template-columns: 1fr; gap: 10px; }
.is-mobile .two-col, .is-mobile .map-detail, .is-mobile .train-top, .is-mobile .daily, .is-mobile .set-cols { grid-template-columns: 1fr; }
.is-mobile .map-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 150px; gap: 12px; }
.is-mobile .map-tile__name { font-size: 22px; }
.is-mobile .map-tile--lead .map-tile__name { font-size: 36px; }
.is-mobile .map-tile__meta { display: none; }
.is-mobile .map-tile--lead .map-tile__meta { display: flex; }
.is-mobile .streak { flex-direction: column; align-items: flex-start; }
.is-mobile .week { width: 100%; justify-content: space-between; gap: 4px; }
.is-mobile .skills { grid-template-columns: repeat(3, 1fr); row-gap: 18px; }
.is-mobile .fav-agents--row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.is-mobile .collection-top { align-items: stretch; flex-direction: column; }
.is-mobile .collection-tabs { margin: 0 -16px; padding: 0 16px; }
.is-mobile .collection-create { width: 100%; }
.is-mobile .collection-create input { flex: 1; min-width: 0; width: auto; }
.is-mobile .collection-create { flex-wrap: wrap; }
.is-mobile .collection-create select { flex: 1; min-width: 0; max-width: none; }
.is-mobile .collection-note { flex-wrap: wrap; }
.is-mobile .collection-note .btn { width: 100%; justify-content: center; }
.is-mobile .collection-head { align-items: flex-start; flex-direction: column; }
.is-mobile .collection-head .btn { width: 100%; }
.is-mobile .practice-row { align-items: flex-start; flex-wrap: wrap; }
.is-mobile .practice-row__body { min-width: calc(100% - 48px); }
.is-mobile .practice-row__actions { width: 100%; margin-left: 46px; flex-wrap: wrap; }
.is-mobile .practice-row > .btn { margin-left: 46px; }
.is-mobile .practice-empty { align-items: flex-start; flex-wrap: wrap; }
.is-mobile .practice-empty > .btn { margin-left: 32px; }
.is-mobile .coming-soon { grid-template-columns: auto minmax(0, 1fr); }
.is-mobile .coming-soon__list { grid-template-columns: 1fr; }
.is-mobile .library-search { align-items: stretch; }
.is-mobile .library-search .search { min-width: 0; }
.is-mobile .library-filter { display: flex; align-items: flex-start; flex-direction: column; gap: 7px; }
.is-mobile .library-filter .chips { width: 100%; }
.is-mobile .library-filter .seg { width: 100%; }
.is-mobile .library-filter .seg > * { flex: 1; }
.is-mobile .library-filter__state-label { margin-left: 0; }
.is-mobile .library-row { align-items: flex-start; flex-wrap: wrap; }
.is-mobile .library-row__body { min-width: calc(100% - 46px); }
.is-mobile .library-row__ability, .is-mobile .library-row__status { width: auto; margin-left: 42px; }
.is-mobile .library-row__media { width: auto; margin-left: 42px; }
.is-mobile .library-row__saved { margin-left: auto; }
.is-mobile .library-row__go { margin-top: 2px; }
.is-mobile .map-profile { min-height: 240px; }
.is-mobile .map-profile__art { opacity: .34; transform: scale(1.1); }
.is-mobile .map-profile__veil { background: linear-gradient(90deg, rgba(11,12,14,.94), rgba(11,12,14,.62)), linear-gradient(0deg, rgba(11,12,14,.48), transparent); }
.is-mobile .map-profile__body { width: calc(100% - 28px); padding: 26px 18px; }
.is-mobile .map-profile h2 { font-size: 51px; }
.is-mobile .fav-agents--row .agent-card__name { font-size: 15px; }
.is-mobile .empty__ghosts { grid-template-columns: repeat(3, 1fr); }
.is-mobile .profile { flex-wrap: wrap; }
.is-mobile .profile__n { font-size: 26px; }
.is-mobile .profile .btn { width: 100%; }
.is-mobile .themes { grid-template-columns: repeat(3, 1fr); }
.is-mobile .rank-big__top svg { width: 72px; height: 72px; }
.is-mobile .hbar { grid-template-columns: 56px 1fr 40px 26px; gap: 8px; }
.is-mobile .stack__legend { gap: 12px; flex-wrap: wrap; }
.is-mobile .lcard__title { font-size: 14px; }
.is-mobile .chip, .is-mobile .btn { min-height: 36px; }

/* Manual setup needs its completion action within a practical phone scroll.
   Two compact choice columns keep the agent and map pickers from becoming a
   long single-file list; the narrowest phones retain the safer single column. */
.setup--m .setup__opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.setup--m .setup__opts > a { min-width: 0; }
.setup--m .agent-chip { gap: 5px; padding: 0 8px 0 5px; font-size: 12px; }
.setup--m .agent-chip__av { width: 26px; height: 26px; font-size: 11px; }
.setup--m .setup__soon { padding: 3px 4px; font-size: 9px; }
@media (max-width: 359px) {
  .setup--m .setup__opts { grid-template-columns: 1fr; }
}

.is-mobile .live-card { min-height: 0; }
.is-mobile .live-card__title { margin-top: 28px; }
.is-mobile .sec-head h2 { flex-wrap: wrap; row-gap: 4px; }
.m-viewer-map .tac-map { aspect-ratio: 7 / 5; }
.is-mobile .grid-4:not(.scroller) .lcard__foot .muted, .is-mobile .grid-4:not(.scroller) .lcard__meta .sbadge { display: none; }
.is-mobile .grid-4:not(.scroller) .lcard__body { padding: 10px 12px 12px; }
.is-mobile .map-tile--info { padding: 12px; gap: 6px; overflow: hidden; }
.is-mobile .map-tile--info ul { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; font-size: 12px; }
.is-mobile .map-tile--info .sample, .is-mobile .map-tile--info li span { display: none; }




.is-mobile .stack-rows--m .lrow__title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }


/* ---------- Live Match mobile: map-first ---------- */
.m-mhead { display: flex; align-items: center; gap: 12px; min-width: 0; }
.m-mhead__art { flex: none; width: 44px; height: 50px; }
.m-mhead__art .agent-mono__glyph { left: 6px; top: 5px; font-size: 26px; }
.m-mhead__art .agent-mono__role { display: none; }
.m-mhead__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.m-mhead h2 { font: 700 24px/1 var(--font-display); text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-mhead h2 span { color: var(--muted); font-size: 16px; }
.m-mhead .icon-btn { width: 44px; height: 44px; }
.is-mobile .page--live { gap: 12px; }
.is-mobile .lfilters .chip { height: 38px; }
.is-mobile .mapview { height: clamp(300px, calc(100svh - 360px), 620px); margin: 0 -16px; border-radius: 0; border-left: 0; border-right: 0; }
.is-mobile .mapview__tl .seg > * { height: 40px; min-width: 44px; padding: 0 12px; }
.is-mobile .mapview__legend { display: none; }
.is-mobile .mapview__tag { top: auto; bottom: 12px; left: 12px; right: auto; }
@media (max-width: 359px) {
  .m-mhead h2 { font-size: 20px; }
}

/* ---------- Mobile lineup viewer ---------- */
.mv { display: flex; flex-direction: column; min-height: 100vh; padding-bottom: calc(76px + var(--safe-b)); }
.vplayer--m { border-radius: 0; border-left: 0; border-right: 0; }
.vplayer--m .vplayer__bar { padding: 8px 12px 10px; gap: 8px; }
.vplayer--m .vplayer__speed > * { padding: 0 8px; }
.mv__body { display: flex; flex-direction: column; gap: 14px; padding: 14px 16px; }
.mv__meta { display: flex; flex-wrap: wrap; gap: 6px; }
.vsrc--m { padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.mv__lnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; padding: 8px 12px calc(8px + var(--safe-b)); background: rgba(15, 17, 19, .96); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.mv__lnavbtn { min-width: 0; min-height: 52px; display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.mv__lnavbtn > span { min-width: 0; display: flex; flex-direction: column; }
.mv__lnavbtn em { font-style: normal; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mv__lnavbtn b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv__lnavbtn > .i { flex: none; color: var(--text-2); }
.mv__lnavbtn--next { justify-content: flex-end; text-align: right; }
.mv__lnavpos { font-size: 12px; font-weight: 600; color: var(--muted); }


/* ---------- Live Match mobile map (assignment 006) ---------- */
/* Map ends above the bottom nav: ~238px of header/tools above it, ~84px nav below */
.is-mobile .mapview { height: clamp(300px, calc(100svh - 364px - var(--safe-b)), 640px); }
.is-mobile .lmk { width: 44px; height: 44px; padding: 3px; }
.is-mobile .lmk__n { min-width: 22px; height: 22px; font-size: 12px; }
.is-mobile .lmk__alt { width: 20px; height: 20px; }
.is-mobile .lclu { height: 44px; border-radius: 22px; padding: 0 12px 0 10px; }
.is-mobile .lstart { width: 26px; height: 26px; }
.is-mobile .callout { font-size: 10px; }
.is-mobile .mapview__zoom button { width: 44px; height: 44px; }
.m-mapkey { display: flex; flex-wrap: nowrap; justify-content: space-between; gap: 8px; margin-bottom: -4px; font-size: 11px; color: var(--text-2); white-space: nowrap; overflow: hidden; }
.m-mapkey span { gap: 5px; }

/* Bottom sheet: compact (default) and expanded */
.lsheet__scrim { position: fixed; inset: 0; z-index: 45; background: rgba(0, 0, 0, .45); opacity: 0; pointer-events: none; transition: opacity .2s; }
.lsheet__scrim.is-on { opacity: 1; pointer-events: auto; }
.lsheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; flex-direction: column; max-height: 82vh; background: var(--surface); border-top: 1px solid var(--line-2); border-radius: 18px 18px 0 0; box-shadow: 0 -12px 40px rgba(0, 0, 0, .5); padding-bottom: var(--safe-b); animation: sheetUp .22s ease-out; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
.lsheet__grab { flex: none; display: grid; place-items: center; width: 100%; height: 22px; }
.lsheet__grab i { width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); }
.lsheet__head { display: flex; align-items: center; gap: 10px; padding: 0 10px 10px 14px; border-bottom: 1px solid var(--line); }
.lsheet__head .icon-btn { width: 44px; height: 44px; flex: none; }
.lsheet__head .ldrawer__id h3 { font-size: 20px; }
.lsheet__head .kicker { font-size: 10px; }
.lsheet__head .ldrawer__sub { font-size: 12px; }
.lsheet__mk { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--col); background: #111317; border: 2.5px solid var(--col); }
.lsheet__toggle .i { transform: rotate(180deg); transition: transform .2s; }
.lsheet.is-expanded .lsheet__toggle .i { transform: none; }
.lsheet__compact { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 12px; }
.lsheet__one { list-style: none; margin: 0; padding: 0; }
.lsheet__more { height: 44px; }
.lsheet__full { display: none; min-height: 0; flex-direction: column; overflow: hidden; }
.lsheet.is-expanded .lsheet__compact { display: none; }
.lsheet.is-expanded .lsheet__full { display: flex; }
.lsheet .ldrawer__list { padding: 10px 12px; overflow-y: auto; }
.lsheet .vcard__main { grid-template-columns: 96px minmax(0, 1fr); gap: 10px; }
.lsheet .vcard__thumb { width: 96px; }
.lsheet .vcard__save { width: 40px; height: 40px; top: 6px; right: 6px; }
.lsheet .vcard__t { padding-right: 42px; }
.vcard--compact .vcard__route { font-size: 12px; }
@media (max-width: 359px) {
  .lsheet .vcard:not(.vcard--compact) .vcard__main { grid-template-columns: minmax(0, 1fr); }
  .lsheet .vcard:not(.vcard--compact) .vcard__thumb { width: 100%; }
  .lsheet .vcard--compact .vcard__main { grid-template-columns: 76px minmax(0, 1fr); }
  .lsheet .vcard--compact .vcard__thumb { width: 76px; }
  .lsheet__mk { display: none; }
}

/* Compact sheet: keep it short so the selected spot and its starts stay visible */
.lsheet__grab { height: 32px; }
.lsheet__compact { gap: 6px; padding: 8px 12px 10px; }
.vcard--compact .vcard__main { grid-template-columns: 88px minmax(0, 1fr); gap: 10px; padding: 8px; }
.vcard--compact .vcard__thumb { width: 88px; }
.vcard--compact .vcard__body { gap: 4px; }
.vcard--compact .vcard__t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
.vcard--compact .vcard__route span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vcard--compact .vcard__meta .tagline { height: auto; min-height: 20px; font-size: 11px; -webkit-line-clamp: 2; }
.lsheet__more { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 0 6px; font-size: 13px; color: var(--text-2); }
.lsheet__more span { flex: 1; text-align: left; }
.lsheet__more b { color: var(--text); }
.lsheet__more .i:last-child { color: var(--muted); }

.m-mapkey .lk--shared { margin-right: 6px; }
/* Honesty label: wraps instead of truncating; stays clear of the bottom-right zoom column */
.is-mobile .mapview__tag { max-width: calc(100% - 84px); height: auto; min-height: 20px; padding: 4px 7px; line-height: 1.3; white-space: normal; overflow: visible; }

/* Expanded sheet (live repair): JS sets the height so a map band of max(160px, 20vh)
   stays visible below the top bar; this is the no-JS-measure fallback. */
.lsheet.is-expanded { max-height: calc(100vh - 64px - max(160px, 20vh)); }
.lsheet.is-expanded[style*="height"] { max-height: none; }
.lsheet.is-expanded .lsheet__full { flex: 1; }
.lsheet .ldrawer__list { flex: 1; min-height: 0; overscroll-behavior: contain; }
.lsheet__scrim.is-on { background: rgba(0, 0, 0, .2); }
.m-page.is-sheet-full { padding-bottom: 100vh; }

/* ---------- Mobile lineup viewer (assignment 007) ---------- */
.m-detail__name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal !important; }
.m-detail__top .icon-btn { width: 44px; height: 44px; }
.vplayer--m .vplayer__bar { padding: 10px 12px 12px; gap: 10px; }
.vplayer--m .vch__lbl { font-size: 11.5px; gap: 5px; }
.vplayer--m .vch__lbl b { width: 18px; height: 18px; font-size: 10.5px; }
.vplayer--m .vch { padding: 6px 2px; min-height: 44px; }
.vplayer--m .vplayer__ctrls .icon-btn { width: 40px; height: 40px; }
.vplayer--m .vplayer__speed > * { height: 34px; padding: 0 9px; }
.vstepd--m { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 14px; border-color: var(--line-2); }
.vstepd--m .vstepd__art { max-height: none; }
.vstepd--m .vstepd__k { font-size: 26px; }
.vstepd--m .vstepd__s { font-size: 16px; }
.vstepd--m .vstepd__nav .btn { height: 48px; }
.mv__sec { display: flex; flex-direction: column; gap: 8px; }
.mv__h { font: 600 18px/1.1 var(--font-display); letter-spacing: .02em; }
.mv__maphead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.mv__maphead .sample { min-width: 0; max-width: 100%; height: auto; min-height: 20px; padding-block: 3px; white-space: normal; line-height: 1.3; } /* long reference-point notice wraps at 320px */
.mv .vfacts { margin: 0; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.vsrc--m .vsrc__acts .btn { height: 40px; }
@media (max-width: 359px) {
  .mv .vfacts { grid-template-columns: minmax(0, 1fr); }
  .vplayer--m .vch__lbl > span { display: none; }
  .vplayer--m .vch__lbl { justify-content: center; }
  .vstepd--m .vstepd__nav .btn--ghost span { display: none; }
}
/* Second-screen (readable) mode: bigger step type, secondary panels hidden */

/* Second-screen priority: instruction + step buttons first, illustration after */
.vstepd--m .vstepd__nav { margin-top: 4px; padding-top: 4px; }
.vplayer--m .vplayer__speed > * { height: 40px; min-width: 40px; }
@media (max-width: 359px) {
  .vplayer--m .vplayer__speed > :first-child { display: none; }
  .vplayer--m .vplayer__ctrls { gap: 6px; }
  .vplayer--m .vplayer__ctrls .icon-btn { flex: none; }
}


/* ---------- Viewer final pass (assignment 008) ---------- */
/* Mobile step panel: heading → illustration → instruction → controls */
.vstepd--m { display: flex; flex-direction: column; gap: 10px; }
.vstepd--m .vstepd__art { margin-bottom: 2px; }
.vstepd--m .vstepd__k { line-height: 1.12; }
.vstepd--m .vstepd__nav { display: flex; gap: 10px; margin-top: 4px; padding-top: 0; }
/* Slimmer persistent lineup bar + end-of-set state */
.mv__lnav { padding: 6px 10px calc(6px + var(--safe-b)); gap: 6px; }
.mv__lnavbtn { min-height: 44px; padding: 4px 8px; gap: 4px; }
.mv__lnavbtn em { font-size: 10px; }
.mv__lnavbtn b { font-size: 12.5px; }
.mv__lnavbtn.is-end { background: transparent; border-style: dashed; color: var(--muted); }
.mv__lnavbtn.is-end b { color: var(--muted); font-weight: 500; }
.second { color: inherit; }
.second:hover .switch { border-color: var(--line-2); }
/* Second-screen mode */
.mv--ss { padding-bottom: calc(92px + var(--safe-b)); }
.mv__ssbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px 8px 16px; background: var(--orange-dim); border-bottom: 1px solid rgba(255, 143, 74, .35); }
.mv__sslbl { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--orange); }
.mv__ssbar .btn { height: 40px; }
.mv--ss .vstepd--m { border-color: rgba(255, 143, 74, .55); }
.mv--ss .vstepd__n { font-size: 14px; }
.mv--ss .vstepd__k { font-size: 32px; }
.mv--ss .vstepd__s { font-size: 19px; line-height: 1.45; color: var(--text); }
.mv__ssnote { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; font-size: 12px; color: var(--muted); }
.mv__ssnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.3fr); align-items: center; gap: 8px; padding: 10px 12px calc(10px + var(--safe-b)); background: rgba(15, 17, 19, .97); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.mv__ssnav .btn { height: 60px; font-size: 16px; min-width: 0; }
.mv__ssnav .btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv__sspos { font-size: 13px; color: var(--muted); text-align: center; }
.mv__sspos b { font: 700 22px/1 var(--font-display); color: var(--text); }
@media (max-width: 359px) {
  .mv--ss .vstepd__k { font-size: 27px; }
  .mv--ss .vstepd__s { font-size: 17px; }
  .mv__ssnav .btn { padding: 0 10px; font-size: 15px; }
}
@media (max-width: 359px) { .mv__ssprev > span { display: none; } }
.vplayer__time { white-space: nowrap; }
.vplayer--m .vplayer__ph span:last-child { display: none; }
.vplayer--m .vplayer__ph { top: 56%; padding: 8px 12px; flex-direction: row; gap: 8px; }
.vplayer--m .vplayer__phicon { width: 30px; height: 30px; }
@media (max-width: 359px) { .vplayer--m .vplayer__phtag { display: none; } }
/* Agents role filter: scroll the chip row instead of widening the page (390px overflow). */
.is-mobile .toolbar > .chips { flex-wrap: nowrap; overflow-x: auto; min-width: 0; max-width: 100%; scrollbar-width: none; }
.is-mobile .toolbar > .chips::-webkit-scrollbar { display: none; }
/* Narrow phones: let map-detail and recommended-map grids shrink below their content's min width (320px overflow) */
.is-mobile .map-detail { grid-template-columns: minmax(0, 1fr); }
.is-mobile .map-detail > * { min-width: 0; }
.is-mobile .two-col, .is-mobile .train-top, .is-mobile .daily, .is-mobile .set-cols { grid-template-columns: minmax(0, 1fr); }
.is-mobile .two-col > * { min-width: 0; }

/* Visual QA: the library results header stacks on phones so the status legend wraps instead of squeezing the title and clipping off-screen. */
.is-mobile .library-results .sec-head { flex-direction: column; align-items: flex-start; }
.is-mobile .library-results .status-inline { flex-wrap: wrap; row-gap: 6px; }

/* Find teammates */
.is-mobile .lfg-hero { min-height: 0; padding: 24px 18px; }
.is-mobile .lfg-hero h2, .is-mobile .lfg-create h2 { font-size: 37px; }
.is-mobile .lfg-hero p { font-size: 13px; }
.is-mobile .lfg-hero__art { display: none; }
.is-mobile .lfg-hero__actions { display: grid; grid-template-columns: 1fr; }
.is-mobile .lfg-hero__actions .btn { justify-content: center; }
.is-mobile .lfg-directory { margin-top: 20px; }
.is-mobile .lfg-filters { display: block; padding: 0; }
.is-mobile .lfg-filter { padding: 14px; }
.is-mobile .lfg-filter + .lfg-filter { border-top: 1px solid var(--line); border-left: 0; }
.is-mobile .lfg-filter .chips { flex-wrap: nowrap; }
.is-mobile .lfg-empty { align-items: flex-start; flex-wrap: wrap; padding: 20px; }
.is-mobile .lfg-empty__icon { width: 46px; height: 46px; }
.is-mobile .lfg-empty h3 { font-size: 21px; }
.is-mobile .lfg-empty .btn { width: 100%; margin-left: 0; justify-content: center; }
.is-mobile .lfg-safety { align-items: flex-start; flex-wrap: wrap; padding: 18px; }
.is-mobile .lfg-safety .link-btn { width: 100%; margin-left: 58px; }
.is-mobile .lfg-create { padding: 22px 18px; }
.is-mobile .lfg-create .back-link { margin-bottom: 22px; }
.is-mobile .lfg-form { grid-template-columns: 1fr; gap: 15px; }
.is-mobile .lfg-discord-lock { align-items: flex-start; flex-wrap: wrap; }
.is-mobile .lfg-discord-lock .btn { width: 100%; margin-left: 49px; justify-content: center; }
.is-mobile .lfg-form__actions { flex-wrap: wrap; }
.is-mobile .lfg-form__actions .btn { flex: 1; justify-content: center; }

/* Notifications */
.is-mobile .notice-head { align-items: center; }
.is-mobile .notice-head h2 { font-size: 25px; }
.is-mobile .notice-row { padding: 14px; }
.is-mobile .notice-row i { top: 19px; right: 14px; }
.is-mobile .notice-empty { align-items: flex-start; padding: 22px 18px; }
.is-mobile .notice-empty__art { width: 46px; height: 46px; }
.is-mobile .notice-future { align-items: flex-start; flex-wrap: wrap; }
.is-mobile .notice-future a { width: 100%; margin-left: 29px; }
/* Visual QA: the side toggle fits at 320 px (its labels were 25 px wider than the control), and the row chevron
   stays vertically centred on the right instead of wrapping onto its own line. */
.is-mobile .library-filter .seg > * { min-width: 0; padding: 0 6px; gap: 4px; }
.is-mobile .library-row { position: relative; padding-right: 34px; }
.is-mobile .library-row__go { position: absolute; right: 10px; top: 50%; margin-top: 0; transform: translateY(-50%); }
/* Visual QA: phone touch targets >= 40 px (44 px on map controls), per the project standard. Chips and segmented
   controls grow to 40 px; small icons, text links, switches and map site areas get an invisible, centred hit area so
   their visual size does not change. */
.is-mobile .chip, .is-mobile .chips--scroll .chip, .is-mobile .lfilters .chip { height: 40px; }
.is-mobile .seg > *, .is-mobile .seg--sm > * { height: 40px; }
.is-mobile .seg-sites a { height: 40px; }
.is-mobile .lsheet__grab { height: 40px; }
.is-mobile .icon-btn--sm { width: 40px; height: 40px; }
.is-mobile .m-top > a, .is-mobile .link-btn, .is-mobile .switch { position: relative; }
.is-mobile .m-top > a::after, .is-mobile .link-btn::after, .is-mobile .switch::after, .is-mobile .sitehit::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%); }
.is-mobile .btn--sm { min-height: 40px; }
