/* Reel on the web — phones first. Reel's own screens, with computer-only parts hidden, the TV's simple Settings
   and sign-in screens, and a phone layout: bottom tab bar, smaller banner, thumb-sized cards, safe areas. */
body.web { -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }

/* Computer-only bits */
body.web #drag, body.web .mac-lights, body.web .upd-btn, body.web .import-block, body.web .lb-how,
body.web .search-bar .seg, body.web .vibe-chips, body.web .discord-btn, body.web .pipbtn { display: none !important; }
/* Accounts are made on the computer; the web signs in */
body.web .setup-card .acct-why { display: none !important; }
body.web .setup-card .acct-choices .su { margin-top: 10px; }
body.web .setup-card .acct-choices::after { content: "Use Discord or a Reel username (no email needed), or link this browser from Reel on your computer."; display: block; margin-top: 14px; font-size: 14px; color: var(--text-3); text-align: center; }

/* Settings (the simple one, shared with the TV) */
body.web .tvs { max-width: 720px; margin: 0 auto; padding: 96px 20px 120px; }
.tvs-list { display: flex; flex-direction: column; gap: 8px; }
.tvs-h { margin: 22px 4px 4px; font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.tvs-row, .tvs-info { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 62px; padding: 0 24px; border-radius: 16px; font-size: 18px; text-align: left; }
.tvs-row { background: rgba(255,255,255,.07); color: #fff; width: 100%; }
.tvs-row b, .tvs-info b { font-weight: 600; color: var(--text-2); }
.tvs-row.off b { color: var(--text-3); }
.tvs-info { padding: 0 24px; color: var(--text-2); }
.tvs-info b { color: #fff; }
.tvs-info i { font-style: normal; color: var(--text-3); font-weight: 500; margin-left: 6px; }
.tvs-note { color: var(--text-3); font-size: 15px; line-height: 1.5; margin: 14px 4px 0; }
.tv-confirm { text-align: center; padding: 10px 6px; }
.tv-confirm .btns { justify-content: center; margin-top: 18px; }
.tvs-row:active { background: rgba(255,255,255,.14); }

/* Sign in (shared with the TV) */
body.web .modal-back.tv-auth-back .sheet { width: min(1080px, 92vw); max-width: none; padding: 44px 48px 34px; border-radius: 30px; background: rgba(20,20,24,.98); border: 1px solid rgba(255,255,255,.08); }
.tv-auth .ta-head { display: flex; align-items: center; gap: 18px; }
.tv-auth .ta-head img { width: 58px; height: 58px; border-radius: 14px; }
.tv-auth .ta-head h2 { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -.03em; }
.tv-auth .ta-head p { margin: 4px 0 0; color: var(--text-2); font-size: 16px; }
.tv-auth .ta-cols { display: grid; grid-template-columns: 1fr auto 1fr; gap: 26px; margin-top: 30px; align-items: stretch; }
.tv-auth .ta-card { display: flex; flex-direction: column; gap: 14px; padding: 28px; border-radius: 22px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); }
.tv-auth .ta-label { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; color: var(--text-2); }
.tv-auth .ta-label svg { width: 20px; height: 20px; color: #fff; }
.tv-auth .ta-code { display: grid; place-items: center; min-height: 100px; font-size: 54px; font-weight: 800; letter-spacing: .16em; padding-left: .16em; font-variant-numeric: tabular-nums; border-radius: 16px; background: rgba(255,255,255,.06); }
.tv-auth ol { margin: 4px 0 0; padding-left: 20px; color: var(--text-2); font-size: 15.5px; line-height: 1.85; }
.tv-auth ol b { color: #fff; font-weight: 600; }
.tv-auth .ta-wait { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 6px; font-size: 14px; color: var(--text-3); }
.tv-auth .ta-or { display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--text-3); font-size: 13px; font-weight: 600; }
.tv-auth .ta-or::before, .tv-auth .ta-or::after { content: ""; flex: 1; width: 1px; background: rgba(255,255,255,.1); }
.tv-auth .ta-field { display: flex; flex-direction: column; gap: 7px; }
.tv-auth .ta-field span { font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.tv-auth .ta-field .input { height: 54px; font-size: 17px; padding: 0 18px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); }
.tv-auth .ta-err { min-height: 18px; color: #ff8a80; font-size: 14px; }
.tv-auth .ta-go { height: 54px; font-size: 17px; font-weight: 700; border-radius: 15px; justify-content: center; }
.tv-auth .ta-note { margin: 2px 0 0; text-align: center; font-size: 13.5px; color: var(--text-3); }
.tv-auth .ta-cancel { display: flex; margin: 26px auto 0; padding: 0 30px; height: 46px; border-radius: 14px; background: rgba(255,255,255,.07); }
.tv-cover { position: fixed; inset: 0; z-index: 3000; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; transition: opacity .3s ease-out; }
.tv-cover.out { opacity: 0; }
.tv-cover img { width: 72px; height: 72px; border-radius: 18px; margin-bottom: 8px; }
.tv-cover b { font-size: 24px; }
.tv-cover span { color: var(--text-2); font-size: 15px; margin-bottom: 10px; }

/* First screen: one big Sign in button, the hint under it */
body.web .setup-card .acct-choices { flex-direction: column; align-items: stretch; gap: 0; }
body.web .setup-card .acct-choices .btn { flex: none; height: 50px; font-size: 16px; border-radius: 14px; justify-content: center; }
body.web.phone .setup-card { width: calc(100vw - 32px); padding: 30px 24px 26px; border-radius: 26px; }
body.web.phone .setup-card h1 { font-size: 30px; }

/* Sign-in sheet on a phone: the two ways stacked, the code smaller */
body.web.phone .modal-back.tv-auth-back .sheet { width: calc(100vw - 24px); padding: 24px 18px 20px; border-radius: 24px; max-height: calc(100dvh - 40px); overflow-y: auto; }
body.web.phone .tv-auth .ta-cols { grid-template-columns: 1fr; gap: 14px; margin-top: 20px; }
body.web.phone .tv-auth .ta-or { flex-direction: row; }
body.web.phone .tv-auth .ta-or::before, body.web.phone .tv-auth .ta-or::after { width: auto; height: 1px; flex: 1; }
body.web.phone .tv-auth .ta-head h2 { font-size: 24px; }
body.web.phone .tv-auth .ta-head img { width: 46px; height: 46px; }
body.web.phone .tv-auth .ta-card { padding: 20px; }
body.web.phone .tv-auth .ta-code { font-size: 40px; min-height: 76px; }
body.web.phone .tv-auth .ta-pass { order: -1; }   /* typing your username is the easy way on a phone */
body.web.phone .tv-auth .ta-or { order: 0; }
body.web.phone .tv-auth .ta-link { order: 1; }

/* ===================== Phone layout ===================== */
body.web.phone { --gutter: 16px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px); }
/* Top: just the round buttons, on the right, over a soft fade */
body.web.phone #nav { height: auto; padding: calc(8px + var(--safe-t)) 12px 10px; display: flex; justify-content: flex-end; }
body.web.phone #nav::before { opacity: 1 !important; background: linear-gradient(180deg, rgba(0,0,0,.6), rgba(0,0,0,0)) !important; inset: 0 0 -24px 0 !important; }
body.web.phone .nav-back { display: none !important; }
body.web.phone .nav-cluster { padding: 3px; gap: 2px; background: rgba(28,28,32,.55); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); }
body.web.phone .nav-cluster .clock { display: none; }
body.web.phone .icon-btn { width: 36px; height: 36px; }
/* Bottom tab bar: icon + label, like a phone app */
body.web.phone #tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; margin: 0; border-radius: 0; gap: 0;
  display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 4px calc(6px + var(--safe-b));
  background: rgba(14,14,16,.88); backdrop-filter: blur(24px) saturate(170%); -webkit-backdrop-filter: blur(24px) saturate(170%);
  border: 0; border-top: 1px solid rgba(255,255,255,.08); box-shadow: none; pointer-events: auto;
}
body.web.phone #tabs .indicator { display: none; }
body.web.phone #tabs button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 2px; border-radius: 12px; font-size: 10.5px; font-weight: 600; color: rgba(255,255,255,.55); background: none !important; }
body.web.phone #tabs button.active { color: #fff; }
body.web.phone #tabs button::before { content: ""; width: 24px; height: 24px; background: currentColor; -webkit-mask: var(--ico) center/contain no-repeat; mask: var(--ico) center/contain no-repeat; }
body.web.phone #tabs [data-go=home] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 2.5 11h2.7v9.5h5.3v-6h3v6h5.3V11h2.7z'/%3E%3C/svg%3E"); }
body.web.phone #tabs [data-go=movies] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h16a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm1 2v2h2V6zm12 0v2h2V6zM5 10v4h2v-4zm12 0v4h2v-4zM5 16v2h2v-2zm12 0v2h2v-2zM9 6v12h6V6z'/%3E%3C/svg%3E"); }
body.web.phone #tabs [data-go=tv] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 6.5A1.5 1.5 0 0 1 4.5 5h15A1.5 1.5 0 0 1 21 6.5v10a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 3 16.5zM8 19.5h8V21H8zM8.6 2.2l3.4 2.6 3.4-2.6.9 1.2L13 6h-2L7.7 3.4z'/%3E%3C/svg%3E"); }
body.web.phone #tabs [data-go=discover] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l2.2 6.3L21 9l-5.2 4.1L17.5 20 12 16.3 6.5 20l1.7-6.9L3 9l6.8-.7z'/%3E%3C/svg%3E"); }
body.web.phone #tabs [data-go=library] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 3h3v18H4zm5 0h3v18H9zm5.2.8 2.9-.8 4.7 17.4-2.9.8z'/%3E%3C/svg%3E"); }
/* Room for the tab bar at the bottom of every page */
body.web.phone #view { padding-bottom: calc(76px + var(--safe-b)); box-sizing: border-box; }
body.web.phone .toast, body.web.phone #toasts { bottom: calc(84px + var(--safe-b)) !important; }

/* Banner: shorter, buttons on one row */
body.web.phone .hero { height: 64vh; min-height: 420px; margin-bottom: -36px; }
body.web.phone .hero-content { left: var(--gutter); right: var(--gutter); bottom: 56px; max-width: none; }
body.web.phone .hero-logo { max-width: 230px; max-height: 90px; margin-bottom: 10px; }
body.web.phone .hero-title { font-size: 32px; }
body.web.phone .hero-eyebrow { font-size: 11.5px; margin-bottom: 10px; }
body.web.phone .hero-meta { font-size: 12.5px; }
body.web.phone .hero-overview { display: none; }
body.web.phone .hero .btns { flex-wrap: nowrap; gap: 8px; }
body.web.phone .hero .btns .btn { height: 42px; padding: 0 18px; font-size: 14.5px; }
body.web.phone .hero .btns .btn.round { width: 42px; padding: 0; }
body.web.phone .hero-dots { right: var(--gutter); bottom: 64px; }

/* Rows and cards: a peek of the next card so it's obvious you can swipe */
body.web.phone .row { margin-bottom: 14px; }
body.web.phone .row h2, body.web.phone .row-title { font-size: 19px; }
body.web.phone .row h2 small { display: none; }
body.web.phone .shelf { gap: 10px; padding-top: 8px; padding-bottom: 14px; scroll-snap-type: x mandatory; scroll-padding: var(--gutter); }
body.web.phone .card.land .art, body.web.phone .card.land.big .art { width: 68vw; border-radius: 12px; }
body.web.phone .card.land .sub, body.web.phone .card .why, body.web.phone .card.land.big .sub, body.web.phone .card.land.big .why { width: 68vw; font-size: 12px; }
body.web.phone .card.poster .art, body.web.phone .card.poster .cap, body.web.phone .card.poster .sub { width: 31vw; }
body.web.phone .card.poster .art { border-radius: 10px; }
body.web.phone .card .cap { font-size: 12.5px; }
body.web.phone .card.ranked .rank-num { font-size: 84px; margin-right: -10px; }
body.web.phone .card .art .title-on { font-size: 15px; left: 12px; right: 12px; bottom: 10px; }
body.web.phone .card .art .title-on img { max-height: 36px; }
body.web.phone .card .fb, body.web.phone .card .more, body.web.phone .sh-arrow { display: none !important; }
body.web.phone .grid { grid-template-columns: repeat(3, 1fr) !important; gap: 10px !important; }
body.web.phone .grid .card.poster .art, body.web.phone .grid .card.poster .cap, body.web.phone .grid .card.poster .sub { width: 100%; }
body.web.phone .page { padding-left: var(--gutter); padding-right: var(--gutter); }
body.web.phone .page.flush { padding-left: 0; padding-right: 0; }
body.web.phone .page-title { font-size: 30px; margin-top: 4px; }
body.web.phone .hero-dots { display: none !important; }
body.web.phone #tabs { width: 100% !important; max-width: none !important; justify-self: stretch !important; box-sizing: border-box; }

/* Player on a phone: no volume slider (phones have buttons), bigger touch targets, skip bubble */
body.web.phone .player .p-vol { display: none !important; }
body.web.phone .player .p-top { top: calc(14px + var(--safe-t)); left: 14px; right: 14px; }
body.web.phone .player .p-bottom { left: 16px; right: 16px; bottom: calc(14px + var(--safe-b)); }
body.web.phone .player .p-info .t { font-size: 19px; }
body.web.phone .player .scrub { height: 32px; }
body.web.phone .player .pbtn { width: 44px; height: 44px; }
body.web.phone .player .pbtn.ring.big { width: 76px; height: 76px; }
body.web.phone .player .p-center { gap: 34px; }
.web-skip { position: absolute; top: 50%; z-index: 5; transform: translateY(-50%); padding: 10px 16px; border-radius: 999px; background: rgba(28,28,32,.7); color: #fff; font-weight: 700; font-size: 15px; opacity: 0; pointer-events: none; }
.web-skip.l { left: 12%; } .web-skip.r { right: 12%; }
.web-skip.show { animation: webSkip .7s ease-out; }
@keyframes webSkip { 0% { opacity: 0; transform: translateY(-50%) scale(.85); } 20% { opacity: 1; transform: translateY(-50%) scale(1); } 100% { opacity: 0; } }
body.web.phone .grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
body.web.phone .grid .card, body.web.phone .grid .card .art, body.web.phone .grid .card .cap, body.web.phone .grid .card .sub { width: 100% !important; min-width: 0; }

/* Discord on the web sign-in sheet */
.tv-auth .ta-discord { height: 52px; justify-content: center; gap: 10px; border-radius: 15px; font-size: 16px; font-weight: 700; background: #5865f2 !important; color: #fff !important; border: 0; }
.tv-auth .ta-discord svg { width: 22px; height: 22px; }
.tv-auth .ta-discord:hover { background: #6d78f5 !important; }
.tv-auth .ta-mini-or { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 12.5px; font-weight: 600; margin: 4px 0 2px; }
.tv-auth .ta-mini-or::before, .tv-auth .ta-mini-or::after { content: ""; flex: 1; height: 1px; background: rgba(255,255,255,.1); }

/* ===================== Phone polish ===================== */
/* No desktop scrollbars on phones: they steal 10px on the right and make rows look cut off */
body.web.phone, body.web.phone * { scrollbar-width: none; }
body.web.phone ::-webkit-scrollbar { display: none; width: 0; height: 0; }
/* The welcome / sign-in screen: no tab bar until you're in, and the card fits the screen */
body.web.phone.setup-mode #tabs { display: none !important; }
body.web.phone .setup-card { width: auto !important; max-width: none !important; margin: 0 16px !important; box-sizing: border-box; }
body.web.phone.setup-mode #view { padding-bottom: 0; }
/* Taps feel instant and don't flash grey */
body.web.phone { -webkit-tap-highlight-color: transparent; }
body.web.phone button, body.web.phone .card, body.web.phone a { touch-action: manipulation; }

/* Player loading screen: logo and title sized for a phone */
body.web.phone .load-card { max-width: 100%; padding: 0 28px; box-sizing: border-box; }
body.web.phone .load-logo img { max-width: min(72vw, 300px); max-height: 84px; }
body.web.phone .load-title { font-size: 28px; line-height: 1.15; }
body.web.phone .load-card .spinner { margin-top: 22px; width: 34px; height: 34px; }
body.web.phone .player .loading .msg { font-size: 13px; }
/* The player fills the whole phone screen, notch included */
body.web.phone .player { position: fixed; inset: 0; height: 100dvh; }
body.web.phone .player video { object-fit: contain; }
/* A bigger, easier progress bar to drag */
body.web.phone .player .scrub { height: 36px; touch-action: none; }
body.web.phone .player .scrub .knob { width: 16px; height: 16px; }
body.web.phone .player .scrub.dragging .knob { transform: translate(-50%, -50%) scale(1.35); }
body.web.phone .player .scrub.dragging .hover-time { opacity: 1; }
body.web.phone .player .p-tools .pbtn { width: 42px; height: 42px; }
/* Sideways phone: controls hug the edges, less padding, smaller title */
@media (orientation: landscape) {
  body.web.phone .player .p-top { top: 10px; left: calc(14px + env(safe-area-inset-left, 0px)); right: calc(14px + env(safe-area-inset-right, 0px)); }
  body.web.phone .player .p-bottom { left: calc(20px + env(safe-area-inset-left, 0px)); right: calc(20px + env(safe-area-inset-right, 0px)); bottom: 8px; }
  body.web.phone .player .p-info .t { font-size: 17px; }
  body.web.phone .player .p-info { margin-bottom: 2px; }
  body.web.phone .player .pbtn.ring.big { width: 64px; height: 64px; }
  body.web.phone .load-logo img { max-height: 70px; }
  /* Tab bar slimmer when sideways */
  body.web.phone #tabs button { flex-direction: row; gap: 6px; padding: 4px 0; font-size: 12px; }
  body.web.phone #tabs button::before { width: 20px; height: 20px; }
  body.web.phone #view { padding-bottom: calc(52px + var(--safe-b)); }
  body.web.phone .hero { height: 88vh; min-height: 0; }
}

/* "Part of a collection" under a movie: title, count and progress stacked, button on its own line */
body.web.phone .collection .col-head { flex-direction: column; align-items: stretch; gap: 10px; }
body.web.phone .collection .col-head .row-title { font-size: 19px; }
body.web.phone .collection .col-head .next-col { align-self: flex-start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.web.phone .collection .ch-bar { max-width: none !important; }
/* No dimmed "paused" title screen on phones: pausing just leaves the controls up */
body.web.phone .player .pause-info { display: none !important; }
body.web.phone .player.pinfo .chrome, body.web.phone .player.pinfo .subs { opacity: 1 !important; }
body.web.phone .player.pinfo video { filter: none !important; opacity: 1 !important; }

/* Versions list on phones: quality on the left; tags, file name and details stacked on the right */
body.web.phone .stream { grid-template-columns: 54px minmax(0, 1fr); grid-template-areas: "q body" "q meta"; gap: 4px 12px; padding: 12px 12px; }
body.web.phone .stream > .q { grid-area: q; font-size: 16px; }
body.web.phone .stream > div:nth-child(2) { grid-area: body; min-width: 0; }
body.web.phone .stream > .meta { grid-area: meta; text-align: left; font-size: 12px; white-space: normal; }
body.web.phone .stream > .meta br { display: none; }
body.web.phone .stream > .meta .peers { margin-left: 6px; }
body.web.phone .stream .fn { -webkit-line-clamp: 2; font-size: 12px; }
body.web.phone .stream .tags { flex-wrap: wrap; }
body.web.phone .stream:hover { transform: none; }
/* Sheets use the whole phone width */
body.web.phone .modal-back .sheet { width: auto !important; max-width: none !important; margin: 0 10px !important; padding: 20px 16px !important; box-sizing: border-box; max-height: calc(100dvh - 40px); }
/* iPhone zooms the page into any text box under 16px: keep them at 16px */
body.web.phone input:not([class*=code]):not([type=range]):not([type=checkbox]), body.web.phone textarea, body.web.phone select { font-size: 16px !important; }
body.web.phone .ep-actions { margin-left: 0 !important; }
/* One Pace list on phones: smaller thumbnails, taller list */
body.web.phone .op-body { max-height: calc(100dvh - 250px); }
body.web.phone .op-num { width: 40px; height: 40px; font-size: 14px; }
body.web.phone .op-et em { -webkit-line-clamp: 2; font-size: 12px; }
body.web.phone .op-arc-head { padding: 12px 10px; gap: 10px; }
body.web.phone .op-n { width: 22px; }

/* ===================== Search on phones ===================== */
body.web:not(.phone) .ph-filters-btn, body.web:not(.phone) .sb-cancel, body.web:not(.phone) .sb-ic { display: none !important; }
/* The box lives at the very top of the screen (where the round buttons are on other screens) */
body.web.phone[data-route="search"] #nav .nav-cluster { visibility: hidden; }
body.web.phone[data-route="search"] .search-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 130; margin: 0; gap: 12px;
  padding: calc(10px + var(--safe-t)) 14px 10px; background: rgba(0,0,0,.78);
  backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
body.web.phone[data-route="search"] .page { padding-top: calc(74px + var(--safe-t)) !important; }
body.web.phone .search-bar { position: relative; }
body.web.phone .search-bar .q { height: 44px; font-size: 16px !important; padding: 0 14px 0 40px; border-radius: 14px; min-width: 0; box-shadow: none; }
body.web.phone .search-bar .q:focus { outline: none; box-shadow: 0 0 0 2px rgba(255,255,255,.22); }
body.web.phone .search-bar .sb-ic { position: absolute; left: 28px; top: calc(50% + var(--safe-t) / 2); transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-3); pointer-events: none; z-index: 1; }
body.web.phone .search-bar .sb-ic .ic { width: 18px; height: 18px; }
body.web.phone .sb-cancel { flex: none; background: none; border: 0; color: #fff; font-size: 16px; font-weight: 600; padding: 8px 2px; }
/* One row: All · Movies · Shows · People, then Filters */
body.web.phone .search-filters { flex-wrap: nowrap; gap: 8px; margin: 2px calc(-1 * var(--gutter)) 16px; padding: 0 var(--gutter); overflow-x: auto; }
body.web.phone .search-filters > * { flex: none; }
body.web.phone .search-filters:not(.open) > :not(:first-child):not(.ph-filters-btn) { display: none !important; }
body.web.phone .search-filters.open { flex-wrap: wrap; overflow: visible; }
body.web.phone .search-filters .seg { padding: 3px; }
body.web.phone .search-filters .seg button { padding: 7px 11px; font-size: 13.5px; }
body.web.phone .search-filters .gsel { height: 38px; font-size: 13.5px; }
body.web.phone .ph-filters-btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  color: var(--text-2); background: var(--glass); border: 1px solid var(--glass-border); }
body.web.phone .ph-filters-btn .ic { width: 15px; height: 15px; }
body.web.phone .ph-filters-btn.on { color: #000; background: rgba(255,255,255,.94); border-color: transparent; }
body.web.phone[data-route="search"] .results > .dim:first-child, body.web.phone[data-route="search"] .res-count { font-size: 12.5px; margin-bottom: 10px; }
body.web.phone[data-route="search"] #nav::before { opacity: 0 !important; }
/* Filters is a small round icon until filters are open or set, so the whole row fits a phone */
body.web.phone .ph-filters-btn:not(.on) { width: 38px; padding: 0; justify-content: center; }
body.web.phone .ph-filters-btn:not(.on) span { display: none; }
body.web.phone .search-filters .seg button { padding: 7px 10px !important; }

/* ===================== Phone: tidier screens ===================== */
/* Hover labels ("Fullscreen (F)") are for a mouse: a tap would leave them stuck on screen */
@media (hover: none) { #tip { display: none !important; } }
body.web.phone #tip { display: none !important; }
/* Pages start just under the round buttons, not halfway down the screen */
body.web.phone .page:not(.flush) { padding-top: calc(64px + var(--safe-t)) !important; }
body.web.phone .page-head { margin-bottom: 14px; }
/* "Complete your profile" belongs to the computer app */
body.web .profile-nudge, body.web .nudge-slot { display: none !important; }
/* Library tabs: every tab visible at once (two rows of chips), no sideways scrolling */
body.web.phone .lib-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; background: none; border: 0; box-shadow: none; width: auto; overflow: visible; }
body.web.phone .lib-tabs .indicator { display: none !important; }
body.web.phone .lib-tabs button { flex: none; padding: 8px 15px; border-radius: 999px; font-size: 14px; background: var(--glass); border: 1px solid var(--glass-border); }
body.web.phone .lib-tabs button.on { background: rgba(255,255,255,.94); color: #000; border-color: transparent; }
/* For You: the six modes as a 3 × 2 grid of small tiles */
body.web.phone .disc { display: block; height: auto; padding: calc(64px + var(--safe-t)) var(--gutter) calc(90px + var(--safe-b)); }
body.web.phone .disc-side { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0; margin: 0 0 18px; background: none !important; border: 0 !important; box-shadow: none !important; overflow: visible !important; width: auto !important; }
body.web.phone .disc-side .side-item { flex-direction: column; justify-content: center; gap: 6px; padding: 12px 6px; min-height: 66px; text-align: center; font-size: 12.5px; font-weight: 600; border-radius: 16px;
  background: var(--glass); border: 1px solid var(--glass-border); white-space: normal; line-height: 1.2; }
body.web.phone .disc-side .side-item .ic { width: 20px; height: 20px; opacity: 1; }
body.web.phone .disc-side .side-item.on { background: rgba(255,255,255,.94); color: #000; box-shadow: none; }
body.web.phone .disc-side > :not(.side-item) { display: none !important; }
/* Turned sideways during a video: a one-tap way into full screen */
.web-fs-hint { position: absolute; left: 50%; top: 18px; transform: translate(-50%, -10px); z-index: 9; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; color: #fff;
  background: rgba(28,28,32,.82); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.web-fs-hint.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.web-fs-hint .ic { width: 16px; height: 16px; }
body.web.phone .lib-tabs::before, body.web.phone .lib-tabs::after, body.web.phone .lib-tabs > :not(button) { display: none !important; }

/* Library tabs on phones: plain chips. No frosted bar behind them (it picked up the colors under it), not pinned. */
body.web.phone .lib-tabs { position: static !important; background: transparent !important; box-shadow: none !important; border: 0 !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important; margin: 4px 0 22px !important; }

/* For You tools on phones: one even list of full-width rows instead of a 3 + 2 grid */
body.web.phone .d-tiles { display: flex !important; flex-direction: column; gap: 8px; margin-bottom: 26px; }
body.web.phone .d-tile { display: grid !important; grid-template-columns: 40px minmax(0, 1fr) 16px; grid-template-rows: auto auto; column-gap: 14px; row-gap: 2px; align-items: center; padding: 12px 14px; border-radius: 16px; }
body.web.phone .d-tile .ti { grid-row: 1 / 3; margin: 0; width: 40px; height: 40px; border-radius: 12px; }
body.web.phone .d-tile b { grid-column: 2; font-size: 15.5px; }
body.web.phone .d-tile small { grid-column: 2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.web.phone .d-tile::after { content: ""; grid-column: 3; grid-row: 1 / 3; width: 8px; height: 8px; border-right: 2px solid var(--text-3); border-top: 2px solid var(--text-3); transform: rotate(45deg); justify-self: center; }

/* Show page on phones: Play across the top, the other big buttons side by side, the small icons spread out */
body.web.phone .actions.compact { display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
body.web.phone .actions.compact > .btn { width: 100%; margin: 0 !important; justify-content: center; height: 48px; padding: 0 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.web.phone .actions.compact > .btn.primary { grid-column: 1 / -1; height: 52px; font-size: 17px; }
body.web.phone .actions.compact > .btn:last-child:nth-child(even) { grid-column: 1 / -1; }
body.web.phone .action-cluster.compact { display: flex !important; justify-content: space-around; width: 100%; box-sizing: border-box; margin-top: 12px; padding: 6px 4px; }
body.web.phone .action-cluster.compact .act, body.web.phone .action-cluster.compact .more-btn { width: 46px; height: 46px; }
body.web.phone .disc-side { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }

/* Sign-in sheet: switch between signing in and creating an account */
.tv-auth .ta-switch { margin-top: 12px; background: none; border: 0; color: var(--text-2); font-size: 14px; padding: 6px; align-self: center; }
.tv-auth .ta-switch b { color: #fff; }
.tv-auth .ta-hint { margin: -2px 0 4px; font-size: 12.5px; color: var(--text-3); line-height: 1.45; }
.tv-auth [hidden] { display: none !important; }
