/* Settings on the phone: one long page (cove-4-ui final phone-settings.html, approved by Jesse 2026-12-01).
   Every page is a section of one scroll with one card; a search field on top, a line of chips that jumps to
   a section, and a Sign out card under the last one. The design's script is settings-page.js (`.lpp`), with
   the app's rows (`.sr`) in place of the design's (`.r`) and the segmented control's thumb drawn as `::before`
   in place of `.th`. A page opened over the long one (Profile look, the whole Look & feel, Coves, the whole
   What's new) keeps the phone's page styles from phone.css. Only for the phone: a window has style.css's
   `.lpw`. */
@media (max-width:600px){
  #ov-settings .dlg.lpp{--t1:140ms;--t2:220ms;--t3:320ms;--ez:cubic-bezier(.2,.8,.2,1)}
  #ov-settings .dlg.lpp.lst{background:var(--base)}
  #ov-settings .lpp:not(.lst)>.lpv{display:none}
  #ov-settings .lpp.lst>.dbody{display:none}
  #ov-settings .lpp>.lpv{flex:1;min-height:0;display:flex;flex-direction:column;background:var(--base)}
  #ov-settings .lpv>.top{flex:none}

  /* search, then the chips that jump to a section */
  #ov-settings .lpv>.find{display:flex;height:44px;flex:none;width:auto;margin:0 16px 10px;padding:0 8px 0 15px;border-radius:999px;background:var(--sheet);box-shadow:none;
    align-items:center;gap:10px;color:var(--faint);font-size:15px;--i:17px;transition:background var(--t2) var(--ez),box-shadow var(--t2) var(--ez),color var(--t2)}
  #ov-settings .lpv>.find input{flex:1;min-width:0;height:100%;background:none;border:0;outline:0;color:var(--ink);font:inherit}
  #ov-settings .lpv>.find input::placeholder{color:var(--faint)}
  #ov-settings .lpv>.find:focus-within{background:var(--card);box-shadow:var(--lift);color:var(--ink)}
  #ov-settings .lpv>.find .clr{--i:14px;flex:none;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;color:var(--muted);background:var(--soft);
    transform:scale(0);opacity:0;transition:transform var(--t2) var(--ez),opacity var(--t1)}
  #ov-settings .lpv>.find.has .clr{transform:none;opacity:1}
  #ov-settings .lpv>.chips{flex:none;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;padding:6px 16px 10px;margin-bottom:-4px;
    -webkit-mask-image:linear-gradient(90deg,transparent,#000 16px,#000 calc(100% - 28px),transparent);mask-image:linear-gradient(90deg,transparent,#000 16px,#000 calc(100% - 28px),transparent)}
  #ov-settings .lpv>.chips::-webkit-scrollbar{display:none}
  #ov-settings .lpv .chips>.list{position:relative;display:flex;gap:2px;width:max-content;flex:none;min-height:0;overflow:visible;padding:0}
  #ov-settings .lpv .glide{position:absolute;left:0;top:0;height:36px;width:0;border-radius:999px;background:var(--card);box-shadow:var(--lift);
    transition:transform var(--t3) var(--ez),width var(--t3) var(--ez),opacity var(--t2);will-change:transform}
  #ov-settings .lpv .chips .ch{display:block;width:auto;height:36px;min-height:0;margin:0;padding:0 14px;border-radius:999px;background:none;box-shadow:none;
    color:var(--muted);font-size:14px;font-weight:550;line-height:36px;white-space:nowrap;position:relative;transition:color var(--t2),opacity var(--t2)}
  #ov-settings .lpv .chips .ch.on{color:var(--ink);font-weight:650}
  #ov-settings .lpv .chips .ch.none{opacity:.38}

  /* the one long page */
  #ov-settings .lpv>.body{flex:1;min-height:0;position:relative;--fade:60px}
  #ov-settings .lpv>.body.end{--fade:0px}
  #ov-settings .lpv .lpg{position:absolute;inset:0;display:block;margin:0;padding:0 16px calc(24px + var(--sab,0px));overflow-y:auto;overflow-x:hidden;scrollbar-width:none;
    -webkit-mask-image:linear-gradient(#000 calc(100% - var(--fade)),transparent calc(100% - 4px));mask-image:linear-gradient(#000 calc(100% - var(--fade)),transparent calc(100% - 4px))}
  #ov-settings .lpv .lpg::-webkit-scrollbar{display:none}
  #ov-settings .lpv .sect h2{position:sticky;top:0;z-index:2;height:52px;display:flex;align-items:center;font-size:19px;font-weight:700;letter-spacing:-.02em;
    margin:0 -16px;padding:0 20px;background:linear-gradient(var(--base) 76%,transparent)}
  #ov-settings .lpv .card{background:var(--card);border-radius:22px;box-shadow:var(--lift);padding:6px;display:flex;flex-direction:column;gap:0}
  #ov-settings .lpv .card.out{margin-top:16px}

  /* a row: label on the left, control on the right */
  #ov-settings .lpv .card .sr:not(:where(.ov .ov *)){--sh:none;flex-wrap:nowrap;align-items:center;gap:12px;width:100%;min-height:52px;max-height:96px;margin:0;
    padding:7px 8px 7px 12px;border-radius:16px;background:none;box-shadow:none;overflow:hidden;text-align:left;
    transition:background var(--t1),max-height var(--t3) var(--ez),min-height var(--t3) var(--ez),padding var(--t3) var(--ez),opacity var(--t2)}
  #ov-settings .lpv .card .sr.tap:active{background:var(--soft);transform:none}
  #ov-settings .lpv .card .sr .l{min-width:0;flex:1;padding:0}
  #ov-settings .lpv .card .sr .l b{display:block;padding:0;font-weight:600;font-size:15px;line-height:1.3;color:var(--ink)}
  #ov-settings .lpv .card .sr .l small{display:block;color:var(--muted);font-size:13px;line-height:1.35}
  #ov-settings .lpv .card .sr.bad .l b{color:var(--bad)}
  #ov-settings .lpv .card .sr.free{padding-left:8px}
  #ov-settings .lpv .card .sr .av.big{--s:48px}

  /* long controls sit under the label at full width: fields, the mic level, three choices or long words */
  #ov-settings .lpv .card .sr:is(label.sr,[data-set=level],[data-set=theme],[data-set=talk],:has(>.seg>button:nth-child(3))){
    flex-direction:column;align-items:stretch;gap:8px;padding:10px 8px 10px 12px;max-height:130px}
  #ov-settings .lpv .card .sr:is(label.sr,[data-set=level],[data-set=theme],[data-set=talk],:has(>.seg>button:nth-child(3)))>.l{flex:none}
  #ov-settings .lpv .card .sr:is(label.sr,[data-set=level],[data-set=theme],[data-set=talk],:has(>.seg>button:nth-child(3)))>:not(.l){margin-left:-4px}
  #ov-settings .lpv .card .sr:is(label.sr,[data-set=level],[data-set=theme],[data-set=talk],:has(>.seg>button:nth-child(3)))>.seg button{flex:1;padding:0 4px}
  #ov-settings .lpv .card label.sr .inp{width:auto;max-width:none;height:44px;border-radius:999px;background:var(--soft);box-shadow:none;padding:0 16px;font-size:15px}
  #ov-settings .lpv .card label.sr .inp:focus{box-shadow:0 0 0 2px var(--accent)}
  #ov-settings .lpv .card .sr>.lvl{width:auto;margin:2px 6px 4px 0}

  /* controls: the segmented control's dark thumb slides to the answer (placed by settings-page.js) */
  #ov-settings .lpv .card .sr>.seg{position:relative;isolation:isolate;display:flex;flex-wrap:nowrap;width:auto;padding:3px;border-radius:999px;background:var(--soft)}
  #ov-settings .lpv .card .sr>.seg::before{content:"";position:absolute;top:3px;left:0;z-index:-1;height:32px;width:var(--thw,0);border-radius:999px;background:var(--ink);
    transform:translateX(var(--thx,0));transition:transform var(--t3) var(--ez),width var(--t3) var(--ez)}
  #ov-settings .lpv .card .sr>.seg.still::before{transition:none}
  #ov-settings .lpv .card .sr>.seg button{position:relative;height:32px;padding:0 13px;border-radius:999px;background:none;font-size:13px;font-weight:600;color:var(--muted);
    white-space:nowrap;text-align:center;transition:color var(--t2)}
  #ov-settings .lpv .card .sr>.seg button.on{background:none;color:var(--card)}
  #ov-settings .lpv .tog{transition:background var(--t2)}
  #ov-settings .lpv .tog::after{border-radius:11px;transition:transform var(--t3) var(--ez),width var(--t1)}
  #ov-settings .lpv .tog:active::after{width:27px;transform:none}
  #ov-settings .lpv .tog.on:active::after{transform:translateX(13px)}
  #ov-settings .lpv .sws button{transition:box-shadow var(--t2) var(--ez),transform var(--t1)}
  #ov-settings .lpv .sws button:active{transform:scale(.9)}
  #ov-settings .lpv .card .btn{height:36px;padding:0 15px;font-size:13.5px;transition:background var(--t1),transform var(--t1)}
  #ov-settings .lpv .card .btn:active{background:var(--soft2);transform:scale(.96)}
  #ov-settings .lpv .card .btn.wide{flex:1;width:auto;height:44px;justify-content:center;font-size:14.5px}
  #ov-settings .lpv .card .btn.bad{color:var(--bad)}

  /* a value row: the answer in --muted and a chevron; the whole row opens its sheet (a drop-down here) */
  #ov-settings .lpv .card .sr>.vv{flex:none;max-width:158px;margin-left:0;gap:4px;color:var(--muted);font-size:14px;font-weight:400;line-height:1.3;text-align:right;overflow:hidden}
  #ov-settings .lpv .card .sr>.vv .ic{color:var(--faint)!important;transition:transform var(--t2) var(--ez)}
  #ov-settings .lpv .card .sr.tap:active>.vv .ic{transform:rotate(-90deg) translateY(3px)}
  #ov-settings .lpv .card .sr>button.inp.dd{position:static;flex:none;display:flex;width:auto!important;max-width:158px;height:auto;margin:0;padding:0;gap:4px;
    background:none;box-shadow:none;color:var(--muted);font-size:14px;line-height:1.3;text-align:right;--i:16px}
  #ov-settings .lpv .card .sr>button.inp.dd .clip{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  #ov-settings .lpv .card .sr>button.inp.dd .ic:last-child{color:var(--faint);transform:rotate(-90deg)}
  #ov-settings .lpv .card .sr>button.inp.dd::after{content:"";position:absolute;inset:0}
  #ov-settings .lpv .card .sr:has(>button.inp.dd:active){background:var(--soft)}
  /* Quiet hours: the hours are the row's value, its switch at the end */
  #ov-settings .lpv .card .sr[data-set=quiet]>button.inp.dd::after{content:none}

  /* the small headings of a card's lists (Your games, Blocked) and the room between its groups */
  #ov-settings .lpv .card>.sec{display:block;font-size:12px;font-weight:650;color:var(--faint);padding:4px 12px 2px!important;margin:10px 0 0}
  #ov-settings .lpv .card>.sec:first-child{margin-top:0}
  #ov-settings .lpv [data-s=look] .card>[data-set=dense],
  #ov-settings .lpv [data-s=chat] .card>[data-set=play_clips],#ov-settings .lpv [data-s=chat] .card>[data-set=typing],
  #ov-settings .lpv [data-s=notify] .card>[data-set=message_sound],#ov-settings .lpv [data-s=notify] .card>[data-set=quiet],
  #ov-settings .lpv [data-s=voice] .card>[data-set=talk],#ov-settings .lpv [data-s=voice] .card>[data-set=share_quality],
  #ov-settings .lpv [data-s=account] .card>[data-set=devices]{margin-top:10px}
  /* the design's order of rows where the app's page has another (Chat, Notifications) */
  #ov-settings .lpv [data-s=chat] .card>*{order:3}
  #ov-settings .lpv [data-s=chat] .card>[data-set=hour24]{order:0}
  #ov-settings .lpv [data-s=chat] .card>[data-set=emoticons]{order:1}
  #ov-settings .lpv [data-s=chat] .card>[data-set=link_previews]{order:2}
  #ov-settings .lpv [data-s=chat] .card>[data-set=typing]{order:4}
  #ov-settings .lpv [data-s=notify] .card>*{order:2}
  #ov-settings .lpv [data-s=notify] .card>:is([data-set=desktop],[data-set=notify],[data-set=show_text]){order:1}
  #ov-settings .lpv [data-s=notify] .card>[data-set=quiet]{order:3}
  /* the design draws Screen share quality on the phone (phone.css hides it on the old pages) */
  #ov-settings .lpv .sr[data-set=share_quality]{display:flex}

  /* search: rows that do not hold the word fold away, a section with none goes */
  #ov-settings .lpv .card .sr:not(:where(.ov .ov *)).nf{max-height:0;min-height:0;padding-top:0;padding-bottom:0;margin-top:0;opacity:0;pointer-events:none}
  #ov-settings .lpv .sect.nf,#ov-settings .lpv .card>.sec.nf,#ov-settings .lpv .card.out.nf{display:none}
  #ov-settings .lpp::highlight(cove-find){background:color-mix(in srgb,var(--accent) 22%,transparent);color:inherit}
  #ov-settings .lpv .nohit{display:none;flex-direction:column;align-items:center;gap:6px;padding:120px 20px 0;color:var(--muted);text-align:center;--i:28px}
  #ov-settings .lpv .nohit b{color:var(--ink);font-size:16px;font-weight:650}
  #ov-settings .lpv .nohit .ic{color:var(--faint);margin-bottom:6px}
  #ov-settings .lpv .lpg.empty .nohit{display:flex}
}

/* movement: the top, the search field and the chips push in, the sections rise one after another. Coming
   back from a page opened over it, the long page slides back in instead of arriving again. */
@media (max-width:600px) and (prefers-reduced-motion:no-preference){
  @keyframes lpp-rise{from{opacity:0;transform:translateY(10px)}}
  @keyframes lpp-push{from{opacity:0;transform:translateX(24px)}}
  @keyframes lpp-nudge{40%{transform:translateX(4px)}}
  #ov-settings .lpp:not(.again)>.lpv>:is(.top,.find,.chips){animation:lpp-push 300ms var(--ez) both}
  #ov-settings .lpp:not(.again) .sect{animation:lpp-rise 360ms var(--ez) both;animation-delay:calc(80ms + var(--n,0)*60ms)}
  #ov-settings .lpp.again.lst>.lpv{animation:back-in .22s var(--ease) backwards}
  #ov-settings .lpv .sect.hit h2{animation:lpp-nudge 420ms var(--ez)}
  #ov-settings .lpv .lpg.empty .nohit{animation:lpp-rise var(--t3) var(--ez) both}
  /* Leaving: nothing arrives again in the copy. */
  #ov-settings.gone .lpp *,#ov-settings.gone .lpp>.lpv{animation:none!important}
}
@media (max-width:600px) and (prefers-reduced-motion:reduce){
  #ov-settings .lpp *,#ov-settings .lpp *::before,#ov-settings .lpp *::after{animation:none!important;transition:none!important}
}
