/* Control -- same skin as T2W: dark, frosted cards, monochrome accent. */

:root {
  --bg:      #0a0a0c;
  --surface: rgba(28, 28, 30, .72);
  --raised:  rgba(255, 255, 255, .08);
  --line:    rgba(255, 255, 255, .08);
  --text:    #f5f5f7;
  --muted:   #98989f;
  --live:    #30d158;
  --warn:    #ffd60a;
  --down:    #ff453a;
  --radius:  22px;
  --blur:    blur(20px) saturate(1.8);
  /* Liquid glass, toned down (shared with T2W): a light gradient over a real
     tint, a hairline rim, blur behind. */
  --glass:   linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .025)), rgba(26, 26, 30, .66);
  --glass2:  linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02)), rgba(26, 26, 30, .58);
  --btn:     linear-gradient(180deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .05));
  --edge:    1px solid rgba(255, 255, 255, .13);
  --rim:     inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -1px 0 rgba(0, 0, 0, .28);
  --spring:  cubic-bezier(.34, 1.4, .4, 1);
  --ease:    cubic-bezier(.2, .8, .2, 1);      /* T2W's, for what settles without a bounce */
  --ios:     cubic-bezier(.32, .72, 0, 1);     /* a sheet's */
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { overflow-x: clip; }   /* the header's 100vw glass counts the scrollbar; never a sideways scroll for it */
html, body {
  margin: 0; color: var(--text);
  font: 15px/1.45 -apple-system, system-ui, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
}
/* Same widths as T2W: 1040 on a laptop, 1800 on a desktop, phone-tight below.
   The nav strip is fixed, so the page starts 38px down. */
body {
  max-width: 1040px; margin: 0 auto; padding: 64px 20px 32px;
  background-color: var(--bg);
}
/* A colour for each tab (T2W ADR-134): a still light from the top, the tab's own -- the Hub a calm dusk,
   Files Finder's blue, Settings graphite with a trace of violet; T2W's page keeps its warm one. The page
   cross-fade blends one into the next. Never animated: glass sits on it (ADR-091). A locked page shows
   no view, so no colour: the PIN pad stays on black. */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(90% 70% at 50% 0%, transparent 45%, rgba(10, 10, 12, .92) 100%),
              radial-gradient(52% 58% at 22% 0%, var(--tint1, transparent), transparent 75%),
              radial-gradient(44% 50% at 80% 6%, var(--tint2, transparent), transparent 75%); }
body:has(#view-hub:not([hidden])) { --tint1: rgba(94, 92, 230, .32); --tint2: rgba(64, 200, 224, .16); }
body:has(#view-files:not([hidden])) { --tint1: rgba(10, 132, 255, .30); --tint2: rgba(48, 209, 88, .13); }
body:has(#view-settings:not([hidden])) { --tint1: rgba(142, 142, 147, .22); --tint2: rgba(191, 90, 242, .15); }
@media (min-width: 1080px) { body { max-width: 1800px; padding: 64px 24px 32px; } }
@media (max-width: 640px)  { body { padding: 64px 12px 24px; } }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.num   { font-variant-numeric: tabular-nums; }

/* ---- the Hub's title: the house's name, the light before it (T2W ADR-132). The nav pill, the door
   and the chat bubble are ui/nav.html's, on every page. */
html { scroll-padding: 64px 0 88px; }        /* a row brought into view by the keyboard clears the pill and the bubble */
#view-hub { max-width: 1160px; margin-inline: auto; }
.hub-title { display: flex; align-items: center; gap: 12px; margin: 4px 6px 2px; }
.hub-title h1 { margin: 0; font-size: 28px; font-weight: 750; letter-spacing: -.025em; line-height: 1.15; }
.hub-title .dot { width: 11px; height: 11px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--down);
       box-shadow: 0 0 0 3px rgba(255, 69, 58, .15); transition: background .2s; }
.dot.live { background: var(--live); box-shadow: 0 0 0 3px rgba(48, 209, 88, .15); }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 3px rgba(255, 214, 10, .15); }
.dot.off  { background: rgba(255, 255, 255, .25); box-shadow: none; }
.dot.down { background: var(--down); box-shadow: 0 0 0 3px rgba(255, 69, 58, .15); }
#host-dot.live { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(48, 209, 88, .15); }
  50%      { box-shadow: 0 0 0 6px rgba(48, 209, 88, .05); }
}

/* ---- round buttons */
.iconbtn {
  position: relative; display: grid; place-items: center;
  width: 36px; height: 36px; padding: 0; border-radius: 50%; font-size: 16px;
  color: var(--text); background: var(--btn); border: var(--edge); box-shadow: var(--rim);
}
.iconbtn:hover { color: var(--text); background: rgba(255, 255, 255, .1); }

/* ---- cards */
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; }
.card {
  padding: 16px 18px; min-width: 0;
  background: var(--glass); border: var(--edge); border-radius: var(--radius);
  box-shadow: var(--rim), 0 24px 70px rgba(0, 0, 0, .45);
  /* No backdrop blur: a card scrolls over a still, dark room, where a 28 px
     blur shows nothing -- and twelve of them were re-blurred on every scroll
     frame. Blur stays on what floats over moving content: the nav, the veil
     under it, the viewer. */
}
/* The cards rise like T2W's sections (T2W ADR-087/132): a touch longer and softer, with a breath of scale.
   Backwards, never both: a filling animation keeps its transform, and a transformed card traps the fixed
   things inside it (#card-files' drop zone). */
.card, .hub-title { animation: hub-rise .7s cubic-bezier(.22, 1, .36, 1) backwards; }
/* The cards rise in page order: the ninth and tenth (Drives, *arr) used to have no
   delay and popped in before their neighbours, which read as "not animated". */
.card:nth-child(2) { animation-delay: .05s } .card:nth-child(3) { animation-delay: .1s } .card:nth-child(4) { animation-delay: .15s }
.card:nth-child(5) { animation-delay: .2s } .card:nth-child(6) { animation-delay: .25s } .card:nth-child(7) { animation-delay: .3s } .card:nth-child(8) { animation-delay: .35s }
.card:nth-child(9) { animation-delay: .4s } .card:nth-child(10) { animation-delay: .45s } .card:nth-child(11) { animation-delay: .5s } .card:nth-child(12) { animation-delay: .55s }
.grid > .card { animation-delay: calc(min(sibling-index() - 1, 14) * 50ms); }   /* every card, where the browser can count */
@keyframes hub-rise { from { opacity: 0; transform: translateY(18px) scale(.985) } }
@keyframes rise { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }   /* uploads, the lock, the player's next */
/* What comes into a list comes in once (T2W ADR-132): keyed() marks a new row, a list drawn whole marks its first
   fill; the class goes when it has played (app.js), so a row that moves or a tab shown again never replays it.
   From-only, so a row that is dimmed on purpose stays dimmed. */
.in { animation: hub-in .5s var(--spring) backwards; animation-delay: calc(var(--i, 0) * 30ms); }
@keyframes hub-in { from { opacity: 0; transform: translateY(10px) scale(.96) } }
/* Files: a listing arrives at once, a soft fade -- not row after row "like a piano" (T2W ADR-134). An upload's
   row keeps its own rise (it would play twice). */
@media (prefers-reduced-motion: no-preference) {
  #view-files .in:not(.fb-task) { animation: hub-in-soft .22s ease-out backwards; animation-delay: 0s; } }
@keyframes hub-in-soft { from { opacity: 0; transform: translateY(4px) } }
@media (prefers-reduced-motion: reduce) { .card, .hub-title, .in, #host-dot.live, .fill.moving { animation: none }
  :root .gauge .arc, :root .fill, :root .part { transition: none } }   /* :root -- their own rules come later in the file */
.span-4  { grid-column: span 4; }
.span-6  { grid-column: span 6; }
.span-5  { grid-column: span 5; }
.span-7  { grid-column: span 7; }
.span-12 { grid-column: span 12; }
@media (max-width: 900px) { .span-4 { grid-column: span 6; } .span-5, .span-7 { grid-column: span 12; } }
@media (max-width: 640px) { .span-4, .span-6 { grid-column: span 12; } .smb { grid-template-columns: 1fr !important; }
  /* a phone: one *arr app to a row, its buttons beside it -- not two half tiles with the buttons wrapped under */
  #arr-apps { grid-template-columns: 1fr; }
  #arr-apps .tile { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; }
  #arr-apps .tile .acts { grid-column: 2; grid-row: 1 / span 2; margin: 0; flex-wrap: nowrap; }
  .card-head .pillbtn.night { flex: 1 1 auto; margin-left: 0; } }

h2 { margin: 0 0 12px; font-size: 17px; font-weight: 620; letter-spacing: -.02em;
     display: flex; align-items: center; gap: 8px; }
h3 { margin: 14px 0 8px; font-size: 11px; font-weight: 600; letter-spacing: .08em;
     text-transform: uppercase; color: var(--muted); }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-head h2 { margin-bottom: 12px; }
.row-head { display: flex; align-items: center; justify-content: space-between; }
.row-head h3 { margin: 14px 0 8px; }

/* ---- the T2W module (the hub's front door to the panel) */
.t2w { display: grid; grid-template-columns: auto 1fr; gap: 12px 18px; align-items: center; }
.t2w .art {
  width: 64px; height: 96px; border-radius: 12px; overflow: hidden; position: relative; flex: none;
  background: linear-gradient(135deg, #2c2c30, #151518); display: grid; place-items: center;
  font-weight: 700; color: rgba(255, 255, 255, .55); box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
.t2w .art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.t2w .next { grid-column: 1 / -1; margin-top: -4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#card-stream .health .h1 { font-size: 13px; color: var(--muted); }
#card-stream .health .pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* ---- the shelf's week: a strip of posters, then what is on the way */
.shelf { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.shelf::-webkit-scrollbar { display: none; }
.pcard { flex: none; width: 104px; text-decoration: none; color: inherit; }
.pcard .poster {
  position: relative; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden;
  background: var(--glass2); border: var(--edge); box-shadow: var(--rim), 0 10px 28px rgba(0, 0, 0, .45);
  transition: transform .45s var(--spring), box-shadow .3s ease;
}
.pcard:hover .poster { transform: translateY(-4px) scale(1.03); box-shadow: var(--rim), 0 18px 40px rgba(0, 0, 0, .55); }
.pcard img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard .kind { position: absolute; left: 6px; top: 6px; font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
               padding: 1px 6px; border-radius: 999px; background: rgba(20, 20, 22, .72); color: rgba(255, 255, 255, .85); }
.pcard .t { margin-top: 7px; font-size: 12px; font-weight: 560; line-height: 1.3; overflow: hidden;
            display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pcard .m { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fact { grid-template-columns: 1fr auto; }
.peer { grid-template-columns: 10px 1fr auto; }
.peer .name a { color: inherit; text-decoration: none; border-bottom: 1px dotted rgba(255, 255, 255, .35); }
.peer .name a:hover { border-bottom-color: currentColor; }
.dot.on { background: rgba(255, 255, 255, .55); box-shadow: none; }
.pill.dim { opacity: .6; }
#tail-relays { margin-top: 10px; }
.coming { grid-template-columns: 34px 1fr auto; row-gap: 4px; text-decoration: none; color: inherit; }   /* a title on its way (T2W ADR-122) */
.coming:hover .name { text-decoration: underline; text-underline-offset: 2px; }
.coming .cposter { grid-row: span 2; width: 34px; aspect-ratio: 2 / 3; border-radius: 6px; overflow: hidden; background: rgba(255, 255, 255, .08); align-self: start; }
.coming .cposter img { width: 100%; height: 100%; object-fit: cover; display: block; }
.coming .bar-mini { grid-column: 2 / -1; display: grid; grid-template-columns: 1fr auto; grid-auto-flow: dense; gap: 8px; align-items: center; }
.coming .bar-mini[hidden] { display: none; }
.coming .bar-mini .track { margin: 0; grid-column: 1; }
.coming .bar-mini .num { grid-column: 2; }
.t2w .title { font-size: 19px; font-weight: 650; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t2w .meta { font-size: 13px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t2w .bar-row { grid-column: 1 / -1; }
.card-head .iconbtn.open { margin-left: auto; }
/* watch night (T2W ADR-133): the live red while it may be called, who called it after */
.card-head .pillbtn.night { margin-left: auto; align-self: center; }
.card-head .pillbtn.night + .iconbtn.open { margin-left: 0; }
.pillbtn.night:not(:disabled) { background: linear-gradient(180deg, #ff5b50, #e2352b); border-color: transparent; color: #fff; font-weight: 650;
  box-shadow: 0 6px 20px rgba(255, 69, 58, .32), inset 0 1px 0 rgba(255, 255, 255, .25); }
.pillbtn.night:disabled { opacity: .75; }
.t2w a.open:hover { background: #fff; }
.t2w .pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* ---- key/value */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; font-size: 13px; margin: 14px 0 0; }
.kv dt { color: var(--muted); margin: 0; }
.kv dd { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- gauges (SVG arcs); each sweeps up from empty when it is first drawn, or its tab is shown again */
@starting-style { .gauge .arc { stroke-dashoffset: 188.5; } }
.gauges { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-around; }
.gauge { display: flex; flex-direction: column; align-items: center; width: 112px; }
.gauges.small .gauge { width: 84px; }
.gauge svg { width: 100%; height: auto; display: block; }
.gauge .arc-track { fill: none; stroke: rgba(255, 255, 255, .1); stroke-width: 9; stroke-linecap: round; }
.gauge .arc { fill: none; stroke: #f5f5f7; stroke-width: 9; stroke-linecap: round;
              transition: stroke-dashoffset .9s cubic-bezier(.3, .8, .3, 1), stroke .4s; }
.gauge.warn .arc { stroke: var(--warn); }
.gauge.down .arc { stroke: var(--down); }
.gauge .value { font-size: 20px; font-weight: 620; letter-spacing: -.02em; fill: var(--text); }
.gauges.small .value { font-size: 17px; }
.gauges.small .label { margin-top: 0; }
.gauge .label { margin-top: -4px; font-size: 12px; color: var(--muted); text-align: center;
                max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gauge .sub { font-size: 11px; color: var(--text); text-align: center; margin-top: 1px;
              max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- bars */
.bars { display: flex; flex-direction: column; gap: 9px; }
.bar-row { font-size: 12px; }
/* the numbers go under the name when both do not fit (a phone): the name keeps its line, not 60 px of it */
.bar-label { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; color: var(--muted); }
.bar-label span:first-child { flex: 1 1 120px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-label b { color: var(--text); font-weight: 500; flex: none; margin-left: auto; }
.track { height: 6px; margin-top: 4px; background: rgba(255, 255, 255, .08); border-radius: 999px; overflow: hidden; }
.fill { height: 100%; width: 0; background: #f5f5f7; border-radius: 999px; transition: width .5s ease; }
.fill.warn { background: var(--warn); }
.fill.live { background: var(--live); }
.fill.down { background: var(--down); }
.fill.dim  { background: rgba(255, 255, 255, .35); }
.fill.moving { background-image: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.45) 50%, rgba(255,255,255,0) 100%);
               background-size: 40% 100%; background-repeat: no-repeat; background-color: #f5f5f7;
               animation: shimmer 1.8s linear infinite; }
@keyframes shimmer { from { background-position: -40% 0 } to { background-position: 140% 0 } }
@media (prefers-reduced-motion: reduce) { .fill.moving { animation: none; } }   /* here, after it: the earlier rule lost to this one's order */
/* No total known (a copy into the share): a faint full bar with the shimmer travelling. */
.fill.indet { background-color: rgba(255, 255, 255, .18); }

/* ---- pills */
.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, .1); font-size: 12px; color: var(--muted); font-weight: 500;
  line-height: 1.4; white-space: nowrap;
}
.pill.state { min-width: 72px; justify-content: center; font-size: 11px; letter-spacing: .04em; }
.pill.ok   { color: var(--live); background: rgba(48, 209, 88, .12); }
.pill.warn { color: var(--warn); background: rgba(255, 214, 10, .12); }
.pill.down { color: var(--down); background: rgba(255, 69, 58, .12); }
.pill.live { color: var(--live); }
.pill.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--live); }
.pill.stale { color: var(--warn); }
.pill.stale::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }

/* ---- rows (lists) */
.rows { display: flex; flex-direction: column; }
.rw {
  display: grid; align-items: center; gap: 10px;
  padding: 9px 2px; border-top: 1px solid var(--line); font-size: 13px; min-width: 0;
}
.rw:first-child { border-top: 0; }
.rw > div { min-width: 0; }              /* a long model name shrinks; it never widens the card */
.rw .name { font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rw .sub  { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rw .right { text-align: right; }
.rw .bar-mini { width: 100%; }
.guest { grid-template-columns: 10px 1fr auto 72px; }
.guest .track { margin-top: 3px; }
.disk  { grid-template-columns: 1fr auto auto; row-gap: 4px; }
.disk .wear { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.disk .wear .track { margin: 0; }

/* ---- pool tree */
.pool { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; padding: 4px 0 8px; }
.pool .name { font-size: 15px; font-weight: 620; letter-spacing: -.01em; display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; min-width: 0; }
.pool .name .muted { font-weight: 400; font-size: 12px; }
.vdev { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px;
        padding: 8px 10px; border-radius: 10px; font-size: 13px; background: rgba(255, 255, 255, .035); margin-bottom: 6px; }
.vdev > div { min-width: 0; }
.vdev .name { font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vdev .sub  { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vdev.group { background: transparent; padding: 2px 2px 4px; margin: 4px 0 0; color: var(--muted); font-size: 11px;
              letter-spacing: .08em; text-transform: uppercase; }
.vdev.group .name { font-weight: 600; color: var(--muted); }
#datasets { margin-top: 12px; }
.stack { margin-bottom: 4px; }
.track.stacked { display: flex; height: 10px; margin-top: 0; }
.part { height: 100%; transition: width .6s ease; }
.part:first-child { border-radius: 999px 0 0 999px; }
.s0 { background: #f5f5f7; } .s1 { background: rgba(255, 255, 255, .62); } .s2 { background: rgba(255, 255, 255, .4); } .s3 { background: rgba(255, 255, 255, .25); }
.sw.free { background: rgba(255, 255, 255, .08); border: 1px solid var(--line); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend b { color: var(--text); font-weight: 500; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }

/* ---- smb */
.smb { display: grid; grid-template-columns: 1fr 1.4fr; gap: 6px 28px; }

/* ---- arr */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile {
  display: flex; flex-direction: column; gap: 6px; padding: 12px 13px;
  background: var(--glass2); border: var(--edge); box-shadow: var(--rim); border-radius: 16px; min-width: 0;
}
.tile .top { display: flex; align-items: center; gap: 8px; font-weight: 590; }
.tile .top > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tile .updot { width: 7px; height: 7px; border-radius: 50%; background: #64d2ff; flex: none; box-shadow: 0 0 0 3px rgba(100, 210, 255, .18); }
.tile .status.upd { color: #64d2ff; }
.arr-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
/* ---- sparklines: a day under each gauge, and the line under the net rates */
.spark { display: block; width: 100%; height: 26px; margin-top: 4px; overflow: visible; }
.spark.empty { visibility: hidden; }
.spark .line { fill: none; stroke: rgba(255, 255, 255, .55); stroke-width: 1.2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.spark .area { fill: rgba(255, 255, 255, .07); }
.gauge.warn .spark .line { stroke: rgba(255, 214, 10, .6); } .gauge.down .spark .line { stroke: rgba(255, 69, 58, .6); }
.net-spark { height: 28px; margin: -4px 0 8px; }
.net-spark .line.rx { stroke: rgba(255, 255, 255, .55); } .net-spark .line.tx { stroke: rgba(100, 210, 255, .7); }
.net { display: flex; gap: 18px; justify-content: center; margin: 2px 0 10px; font-size: 13px; color: var(--muted); }
.net span { display: inline-flex; align-items: center; gap: 5px; }
.net svg.i { width: 14px; height: 14px; }
.net b { color: var(--text); font-weight: 560; min-width: 64px; text-align: left; }
.spin svg.i { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }
button.spin:disabled { opacity: .8; }
.tile .status { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.tile .acts a, .tile .acts button { font-size: 12px; padding: 4px 9px; }
.tile .acts a { color: var(--text); text-decoration: none; background: var(--raised); border-radius: 999px; }
.tile { transition: transform .35s var(--spring), background .2s; }
.tile:hover { transform: translateY(-3px); background: var(--glass); }

/* ---- forms */
input[type="text"], input[type="password"] {
  font: inherit; color: var(--text); background: var(--btn); box-shadow: var(--rim);
  border: var(--edge); border-radius: 999px; padding: 8px 14px; min-width: 0; flex: 1;
}
select {
  appearance: none; -webkit-appearance: none; font: inherit; color: var(--text);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398989f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 14px, var(--btn);
  border: var(--edge); border-radius: 999px; padding: 6px 30px 6px 12px; box-shadow: var(--rim);
}
input:focus, select:focus, button:focus-visible { outline: 2px solid rgba(255, 255, 255, .45); outline-offset: 1px; }
.dd-btn { padding: 6px 30px 6px 12px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398989f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 14px, var(--btn); }   /* a <select>'s look (dropdown.js) */
button {
  font: inherit; color: var(--text); background: var(--btn); box-shadow: var(--rim);
  border: var(--edge); border-radius: 999px; padding: 8px 14px; cursor: pointer;
  transition: transform .35s var(--spring), background .2s;
}
button:hover:not(:disabled) { background: linear-gradient(180deg, rgba(255, 255, 255, .19), rgba(255, 255, 255, .08)); }
button:active:not(:disabled) { transform: scale(.94); }
button:disabled { opacity: .35; cursor: default; }
button.primary { background: #f5f5f7; color: #0a0a0c; }
button.danger { color: var(--down); }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: block; flex: none; }
.iconbtn.primary { background: #f5f5f7; color: #0a0a0c; }
.iconbtn.primary:hover { background: #fff; color: #0a0a0c; }
a.iconbtn { text-decoration: none; }
.tile .acts .iconbtn { width: 30px; height: 30px; padding: 0; }
.iconbtn.active { color: #0a0a0c; background: #f5f5f7; }
.iconbtn.active:hover { background: #fff; }
.tile .acts .iconbtn svg.i { width: 15px; height: 15px; }
.rw .iconbtn { width: 32px; height: 32px; }
.iconbtn.danger { color: var(--down); }
.iconbtn.danger:hover { color: var(--down); background: rgba(255, 69, 58, .14); }
button.ghost { background: transparent; border-color: transparent; box-shadow: none; }

.error {
  margin: 0 0 12px; padding: 8px 12px;
  background: rgba(255, 69, 58, .12); border: 1px solid rgba(255, 69, 58, .3);
  border-radius: 10px; color: #ff9f9a; font-size: 13px;
}
.empty { color: var(--muted); font-size: 13px; padding: 6px 0; }

/* -------------------------------------------------------------- settings */
#card-access h3 { margin: 16px 0 6px; }
.pinrow { grid-template-columns: 1fr auto auto auto; }
.theme-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.theme-tile { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.theme-tile:has(input:checked) { border-color: rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .06); }
.theme-tile input { position: absolute; opacity: 0; pointer-events: none; }
.theme-tile .swatch { display: flex; gap: 5px; align-items: center; justify-content: center; height: 64px; border-radius: 10px; margin-bottom: 6px; }
.theme-tile .swatch i { width: 16px; height: 20px; border-radius: 5px; display: grid; place-items: center; }
.theme-tile .swatch i::before { content: ""; width: 5px; height: 5px; border-radius: 50%; }
.swatch.normal { background: linear-gradient(135deg, #2a2a2e, #141416); }
.swatch.normal i { background: rgba(40, 40, 44, .9); border: 1px solid rgba(255, 255, 255, .12); } .swatch.normal i::before { background: #f5f5f7; }
.swatch.spooky { background: radial-gradient(60% 80% at 30% 40%, rgba(120, 0, 14, .55), transparent 70%), radial-gradient(50% 60% at 75% 70%, rgba(255, 150, 60, .18), transparent 60%), #050406; }
.swatch.spooky i { background: rgba(8, 8, 10, .9); border: 1px solid rgba(190, 150, 110, .2); } .swatch.spooky i::before { background: #ff453a; box-shadow: 0 0 6px rgba(255, 69, 58, .8); }

/* ------------------------------------------------------------------ lock */
/* The hub's PIN pad: an old room. Same bones as T2W's -- four slots, a dot
   per digit -- but the room is a derelict one: near-black with a thin,
   sepia-drained blur of the page under it, two clouds of dark red drifting
   past each other, cobwebs in the corners that tremble, a spider that comes
   down on its thread now and then, dust hanging in a candle's light, film
   grain, scratches, a vignette that breathes, a brand in a worn serif that
   doubles and glitches, and a pair of eyes in the fog that are not always
   there. Everything decorative exists ONLY while the pad is asking
   (`.lock.show`): on a device that already typed the code the curtain is
   hidden before the first paint, so nothing of this is ever seen between
   pages. Transforms and opacity only -- no animated filters or shadows. */
.lock {
  position: fixed; inset: 0; z-index: 45; overflow: hidden;              /* over the pill (30) and the chat bubble (38) */
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(2, 2, 4, .82);
  -webkit-backdrop-filter: blur(9px) saturate(.4) sepia(.25) brightness(.6); backdrop-filter: blur(9px) saturate(.4) sepia(.25) brightness(.6);
  transition: opacity 1.2s ease, background .5s ease, -webkit-backdrop-filter .8s ease, backdrop-filter .8s ease;
}
.lock > :not(.lock-box) { opacity: 0; transition: opacity 1.2s ease; pointer-events: none; }
.lock.show > :not(.lock-box) { opacity: 1; }
/* ...except the things that are only ever shown by their own cue. */
.lock.show .lock-flash, .lock.show .lock-eyes, .lock.show .lock-scratch { opacity: 0; }

.lock::before, .lock::after {                      /* the fog */
  content: ""; position: absolute; inset: -30%; pointer-events: none; will-change: transform; opacity: 0;
  transition: opacity 1.2s ease;
  background:
    radial-gradient(40% 35% at 30% 40%, rgba(120, 0, 14, .38), transparent 70%),
    radial-gradient(35% 45% at 72% 66%, rgba(70, 0, 50, .32), transparent 70%);
  animation: fog 28s ease-in-out infinite alternate;
}
.lock::after {
  background:
    radial-gradient(45% 40% at 66% 28%, rgba(90, 0, 0, .3), transparent 70%),
    radial-gradient(30% 30% at 24% 76%, rgba(24, 0, 40, .5), transparent 70%);
  animation: fog 37s ease-in-out infinite alternate-reverse;
}
.lock.show::before, .lock.show::after { opacity: 1; }
@keyframes fog {
  from { transform: translate(-4%, -3%) rotate(0) scale(1); }
  50%  { transform: translate(3%, 2%) rotate(3deg) scale(1.08); }
  to   { transform: translate(-2%, 4%) rotate(-2deg) scale(1.02); }
}

.lock-candle {                                     /* one candle, somewhere behind the pad */
  position: absolute; left: 50%; top: 50%; width: 130vmax; height: 130vmax; transform: translate(-50%, -50%);
  background: radial-gradient(circle at center, rgba(255, 150, 60, .13), rgba(255, 120, 40, .05) 22%, transparent 45%);
  will-change: transform, opacity;
}
.lock.show .lock-candle { animation: waver 3.4s ease-in-out infinite, gutter 11s linear infinite; }
@keyframes waver  { 0%, 100% { transform: translate(-50%, -50%) scale(1) } 50% { transform: translate(-50.6%, -49.4%) scale(1.06) } }
@keyframes gutter { 0%, 100% { opacity: 1 } 63% { opacity: 1 } 64% { opacity: .35 } 65.5% { opacity: .9 } 67% { opacity: .5 } 69% { opacity: 1 } }

.lock-dust {                                       /* motes in the candlelight */
  position: absolute; top: 0; left: 0; width: 2px; height: 2px; border-radius: 50%; will-change: transform;
}
.lock-dust.a { box-shadow: 80px 684px 0 0px rgba(220, 205, 170, 0.28), 1142px 586px 0 0px rgba(220, 205, 170, 0.28), 696px 711px 0 0px rgba(220, 205, 170, 0.28), 1217px 508px 0 1px rgba(220, 205, 170, 0.28), 934px 70px 0 0px rgba(220, 205, 170, 0.28), 552px 485px 0 1px rgba(220, 205, 170, 0.28), 1360px 66px 0 0px rgba(220, 205, 170, 0.28), 634px 662px 0 1px rgba(220, 205, 170, 0.28), 1395px 841px 0 0px rgba(220, 205, 170, 0.28), 582px 733px 0 0px rgba(220, 205, 170, 0.28), 1369px 355px 0 0px rgba(220, 205, 170, 0.28), 945px 363px 0 0px rgba(220, 205, 170, 0.28), 1251px 119px 0 0px rgba(220, 205, 170, 0.28), 120px 223px 0 0px rgba(220, 205, 170, 0.28), 264px 756px 0 0px rgba(220, 205, 170, 0.28), 814px 400px 0 0px rgba(220, 205, 170, 0.28), 165px 170px 0 0px rgba(220, 205, 170, 0.28), 822px 562px 0 0px rgba(220, 205, 170, 0.28), 280px 838px 0 0px rgba(220, 205, 170, 0.28), 1126px 285px 0 1px rgba(220, 205, 170, 0.28), 850px 367px 0 1px rgba(220, 205, 170, 0.28), 779px 236px 0 0px rgba(220, 205, 170, 0.28), 169px 180px 0 0px rgba(220, 205, 170, 0.28), 475px 674px 0 0px rgba(220, 205, 170, 0.28), 24px 496px 0 1px rgba(220, 205, 170, 0.28), 373px 269px 0 0px rgba(220, 205, 170, 0.28), 8px 149px 0 0px rgba(220, 205, 170, 0.28), 1094px 378px 0 1px rgba(220, 205, 170, 0.28), 1159px 326px 0 0px rgba(220, 205, 170, 0.28), 1055px 632px 0 1px rgba(220, 205, 170, 0.28), 1384px 757px 0 0px rgba(220, 205, 170, 0.28), 935px 891px 0 1px rgba(220, 205, 170, 0.28), 1145px 401px 0 0px rgba(220, 205, 170, 0.28), 817px 403px 0 0px rgba(220, 205, 170, 0.28); }
.lock-dust.b { box-shadow: 986px 649px 0 0px rgba(220, 205, 170, 0.18), 127px 195px 0 0px rgba(220, 205, 170, 0.18), 427px 451px 0 0px rgba(220, 205, 170, 0.18), 225px 348px 0 1px rgba(220, 205, 170, 0.18), 107px 104px 0 0px rgba(220, 205, 170, 0.18), 1160px 154px 0 1px rgba(220, 205, 170, 0.18), 207px 372px 0 1px rgba(220, 205, 170, 0.18), 52px 72px 0 0px rgba(220, 205, 170, 0.18), 1257px 385px 0 0px rgba(220, 205, 170, 0.18), 1299px 258px 0 0px rgba(220, 205, 170, 0.18), 1233px 372px 0 0px rgba(220, 205, 170, 0.18), 251px 118px 0 0px rgba(220, 205, 170, 0.18), 954px 491px 0 0px rgba(220, 205, 170, 0.18), 638px 87px 0 0px rgba(220, 205, 170, 0.18), 209px 767px 0 0px rgba(220, 205, 170, 0.18), 542px 490px 0 1px rgba(220, 205, 170, 0.18), 330px 528px 0 0px rgba(220, 205, 170, 0.18), 420px 540px 0 0px rgba(220, 205, 170, 0.18), 300px 706px 0 1px rgba(220, 205, 170, 0.18), 55px 776px 0 1px rgba(220, 205, 170, 0.18), 610px 658px 0 0px rgba(220, 205, 170, 0.18), 534px 530px 0 0px rgba(220, 205, 170, 0.18); }
.lock.show .lock-dust.a { animation: drift 46s linear infinite; }
.lock.show .lock-dust.b { animation: drift 71s linear infinite reverse; }
@keyframes drift { from { transform: translate(0, 40px) } to { transform: translate(-30px, -90px) } }

.lock-scratch {                                    /* old film */
  position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255, 245, 225, .14); opacity: 0;
}
.lock-scratch.s1 { left: 23%; } .lock-scratch.s2 { left: 71%; }
.lock.show .lock-scratch.s1 { animation: scratch 7s linear infinite; }
.lock.show .lock-scratch.s2 { animation: scratch 11s linear infinite 3s; }
@keyframes scratch {
  0%, 100% { opacity: 0 } 30% { opacity: 0 } 30.5% { opacity: 1; transform: translateX(0) } 31.5% { opacity: 0 }
  32% { opacity: .7; transform: translateX(3px) } 33% { opacity: 0 } 80% { opacity: 0 } 80.4% { opacity: .8; transform: translateX(-2px) } 81% { opacity: 0 }
}

.web-slot {                                        /* cobwebs, anchored in their corner */
  position: absolute; width: min(42vmin, 300px); height: min(42vmin, 300px); display: block;
}
.web-slot.tl { top: 0; left: 0; transform-origin: 0 0; }
.web-slot.br { right: 0; bottom: 0; transform: rotate(180deg); transform-origin: 50% 50%; width: min(48vmin, 340px); height: min(48vmin, 340px); }
.web-slot.bl { left: 0; bottom: 0; transform: rotate(-90deg); width: min(22vmin, 150px); height: min(22vmin, 150px); }
.web { width: 100%; height: 100%; fill: none; stroke: rgba(235, 225, 205, .34); stroke-width: .8; }
.web .loose { stroke: rgba(235, 225, 205, .2); }
.lock.show .web-slot.tl .web { animation: tremble 9s ease-in-out infinite; transform-origin: 0 0; }
.lock.show .web-slot.br .web { animation: tremble 13s ease-in-out infinite 2s; transform-origin: 0 0; }
.lock.show .web-slot.bl .web { animation: tremble 7s ease-in-out infinite 1s; transform-origin: 0 0; }
@keyframes tremble { 0%, 100% { transform: rotate(0) scale(1) } 38% { transform: rotate(.6deg) scale(1.004) } 41% { transform: rotate(-.4deg) } 70% { transform: rotate(.3deg) scale(.997) } }

.lock-spider {                                     /* down it comes, on its thread */
  position: absolute; top: -470px; left: 76%; width: 40px; height: 516px; will-change: transform;
  display: flex; flex-direction: column; align-items: center;
}
.lock-spider .thread { width: 1px; flex: 1; background: linear-gradient(to bottom, transparent, rgba(235, 225, 205, .35)); }
.spider-svg { width: 34px; height: 39px; display: block; filter: drop-shadow(0 6px 4px rgba(0, 0, 0, .6)); }
.lock.show .lock-spider { animation: descend 34s ease-in-out infinite 4s; }
@keyframes descend {
  0% { transform: translateY(0) } 10% { transform: translateY(0) }
  30% { transform: translateY(520px) } 36% { transform: translateY(496px) } 42% { transform: translateY(516px) }
  50% { transform: translateY(508px) } 62% { transform: translateY(520px) }
  84% { transform: translateY(0) } 100% { transform: translateY(0) }
}
.lock.show .spider-svg { animation: sway 2.6s ease-in-out infinite; transform-origin: 50% 0; }
@keyframes sway { 0%, 100% { transform: rotate(-3deg) } 50% { transform: rotate(3deg) } }
.lock.show .spider-svg .legs { animation: twitch 1.1s steps(2) infinite; transform-origin: 50% 55%; }
@keyframes twitch { 0%, 100% { transform: scale(1) } 50% { transform: scale(1.03, .97) } }

.lock-eyes {                                       /* not always there */
  position: absolute; left: 11%; top: 61%; display: flex; gap: 14px; opacity: 0;
}
.lock-eyes span {
  width: 7px; height: 4px; border-radius: 50%; background: #ff453a;
  box-shadow: 0 0 10px rgba(255, 69, 58, .8), 0 0 22px rgba(255, 69, 58, .4);
}
.lock.show .lock-eyes { animation: watch 31s linear infinite 9s; }
.lock.show .lock-eyes span { animation: blink 4.2s linear infinite; }
@keyframes watch { 0%, 100% { opacity: 0 } 40% { opacity: 0 } 41% { opacity: .9 } 48% { opacity: .9 } 49% { opacity: 0 } }
@keyframes blink { 0%, 100% { transform: scaleY(1) } 91% { transform: scaleY(1) } 93% { transform: scaleY(.1) } 95% { transform: scaleY(1) } }

.lock-grain {                                      /* film grain, jittering */
  position: absolute; inset: -50%; will-change: transform;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.lock.show .lock-grain { opacity: .1; animation: grain .7s steps(6) infinite; }
@keyframes grain {
  0% { transform: translate(0, 0) } 20% { transform: translate(-5%, 4%) } 40% { transform: translate(4%, -6%) }
  60% { transform: translate(-3%, 7%) } 80% { transform: translate(6%, -2%) } 100% { transform: translate(-4%, -5%) }
}
.lock-vig {                                        /* the dark closing in, slowly */
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0, 0, 0, .92) 100%);
}
.lock.show .lock-vig { animation: breathe 7s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: .78 } 50% { opacity: 1 } }
.lock-flash {                                      /* a red blink on a wrong answer */
  position: absolute; inset: 0; background: rgba(140, 0, 10, .4); transition: opacity .6s ease;
}

/* ---- the pad itself */
.lock-box {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  margin: 0; opacity: 0; transform: scale(1.05); filter: blur(8px);
  transition: opacity 1.2s ease, transform 1.2s cubic-bezier(.2, .8, .2, 1), filter 1.2s ease;
}
/* The pad itself holds still: it used to flicker like the candle, and that
   read as the code entry vanishing and glitching back (operator, 2026-09-13).
   The room may flicker; the thing you type into may not. */
.lock.show .lock-box { opacity: 1; transform: none; filter: none; }
.lock-brand, .lock-hint, .lock-whisper {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
}
.lock-brand {
  font-size: 22px; font-weight: 500; letter-spacing: .34em; text-transform: uppercase; color: #b9ad94;
  text-shadow: 0 0 14px rgba(255, 170, 80, .16), 1px 0 0 rgba(120, 0, 14, .35);
}
@keyframes glitch {
  0%, 89%, 92.5%, 94.5%, 100% { text-shadow: 0 0 14px rgba(255, 170, 80, .16), 1px 0 0 rgba(120, 0, 14, .35); transform: none; }
  90%   { text-shadow: -3px 0 rgba(255, 0, 40, .7), 3px 0 rgba(185, 173, 148, .5); transform: translateX(1px); }
  91%   { text-shadow: 3px 0 rgba(255, 0, 40, .7), -3px 0 rgba(185, 173, 148, .5); transform: translateX(-1px); }
  95%   { text-shadow: -2px 0 rgba(255, 0, 40, .7), 2px 0 rgba(185, 173, 148, .5); }
  95.5% { text-shadow: 0 0 14px rgba(255, 170, 80, .16); }
}
.lock-hint { font-size: 16px; font-style: italic; min-height: 22px; color: #7d7466; transition: color .3s ease; }
.lock-whisper {
  margin-top: 22px; font-size: 13px; font-style: italic; letter-spacing: .04em; min-height: 18px;
  color: rgba(185, 173, 148, .55); opacity: 0; transition: opacity 2.4s ease;
}
.lock-whisper.on { opacity: 1; }
.lock-fields { display: flex; flex-direction: column; gap: 10px; width: min(300px, 78vw); margin-top: 16px; }   /* still: you type into them */
.lock .lock-in {                                    /* a field: a slab of the dark, lit from inside when you type (.lock: over input[type=password]) */
  flex: none; width: 100%; height: 50px; margin: 0; padding: 0 18px; border-radius: 16px; outline: 0;
  font: 500 16px/1.2 -apple-system, system-ui, "Segoe UI", Roboto, sans-serif; letter-spacing: .02em;  /* 16 px: a phone does not zoom */
  color: #eadcc2; caret-color: #ff5a50; background: rgba(8, 8, 10, .82); border: 1px solid rgba(190, 150, 110, .16);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .6), inset 0 0 18px rgba(0, 0, 0, .7);
  transition: border-color .3s ease, background .4s ease, transform .3s ease, box-shadow .4s ease, color .3s ease;
}
.lock .lock-in::placeholder { color: rgba(185, 173, 148, .42); font-style: italic;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif; }
.lock .lock-in:focus { outline: 0; border-color: rgba(255, 69, 58, .42); box-shadow: 0 10px 30px rgba(0, 0, 0, .6), inset 0 0 18px rgba(0, 0, 0, .7), 0 0 0 4px rgba(255, 69, 58, .06); }
.lock-in[hidden], .lock-alt[hidden] { display: none; }
/* the second step, set up at the door (T2W ADR-160): the code to scan, a link for the phone it is on, the key itself */
.lock-qr { display: grid; justify-items: center; gap: 10px; }
.lock-qr[hidden] { display: none; }
.lock-qr-pic { width: 180px; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .6); }
.lock-qr-pic svg { display: block; width: 100%; height: auto; }
.lock-qr-link { color: #dccdae; font-size: 14px; }
.lock-qr-key { font: 500 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; color: rgba(185, 173, 148, .8);
  text-align: center; user-select: all; }
.lock.show .lock-in { animation: emerge 1.1s cubic-bezier(.2, .8, .2, 1) both; }
.lock.show .lock-in:nth-child(2) { animation-delay: .1s } .lock.show .lock-in:nth-child(3) { animation-delay: .2s }
.lock.show .lock-in:nth-child(4) { animation-delay: .3s } .lock.show .lock-in:nth-child(5) { animation-delay: .4s }
@keyframes emerge {
  from { opacity: 0; filter: blur(12px); transform: scale(1.08); }
  60%  { opacity: 1; }
  to   { opacity: 1; filter: blur(0); transform: none; }
}
.lock-go {                                          /* the way in: an ember of a button */
  margin-top: 16px; min-width: 168px; height: 46px; padding: 0 28px; border-radius: 999px; cursor: pointer;
  font: 600 14px/1 "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  letter-spacing: .2em; text-transform: uppercase; color: #f1e2c6;
  background: rgba(70, 6, 10, .72); border: 1px solid rgba(255, 69, 58, .42);
  box-shadow: 0 0 24px rgba(255, 69, 58, .16), inset 0 0 14px rgba(0, 0, 0, .6);
  transition: box-shadow .3s ease, background .3s ease, transform .2s ease, opacity .2s ease;
}
.lock-go:hover, .lock-go:focus-visible { outline: 0; background: rgba(95, 8, 14, .8); box-shadow: 0 0 34px rgba(255, 69, 58, .3), inset 0 0 14px rgba(0, 0, 0, .5); }
.lock-go:active { transform: scale(.97); }
.lock-go:disabled { opacity: .55; cursor: default; }
.lock.show .lock-go { animation: emerge 1.1s cubic-bezier(.2, .8, .2, 1) .45s both; }
.lock-alt {
  margin-top: 4px; padding: 10px 14px; border: 0; background: none; cursor: pointer; box-shadow: none;
  font: italic 15px/1 "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  color: rgba(185, 173, 148, .6); transition: color .3s ease;
}
.lock-alt:hover, .lock-alt:focus-visible { outline: 0; color: #dccdae; }
/* The entrance plays once a page: once it is over the fields simply are (app.js adds .settled), so nothing
   -- a focus, a mode, a browser's autofill -- can play it again. A field a new mode shows fades in by script. */
.lock.settled .lock-in, .lock.settled .lock-go { animation: none !important; }

/* Wrong: the room blinks red, the eyes open, the fields jolt and go red at the edges. */
.lock.wrong .lock-flash { opacity: 1; transition-duration: .05s; }
.lock.wrong .lock-eyes { animation: none; opacity: 1; }
.lock.wrong .lock-fields { animation: jolt .5s cubic-bezier(.36, .07, .19, .97); }
.lock.wrong .lock-in { border-color: rgba(255, 69, 58, .6); }
.lock.wrong .lock-hint { color: var(--down); animation: glitch 1s 1; }
@keyframes jolt {
  10%, 90% { transform: translate(-2px, 1px) rotate(-.4deg) } 20%, 80% { transform: translate(5px, -1px) rotate(.4deg) }
  30%, 50%, 70% { transform: translate(-8px, 2px) rotate(-.8deg) } 40%, 60% { transform: translate(8px, -2px) rotate(.8deg) }
}

/* Right: the candle goes out, the fields flare, the button goes white, then the lights go
   out -- pure black for a beat -- and the black dissolves to the hub rising in. */
.lock.ok .lock-candle { opacity: 0; transition: opacity .25s ease; animation: none; }
.lock.ok .lock-in { animation: none; border-color: rgba(255, 69, 58, .7); transform: translateY(-3px); box-shadow: 0 0 40px rgba(255, 69, 58, .25); }
.lock.ok .lock-go { animation: none; background: #fff; color: #0a0a0c; box-shadow: 0 0 26px rgba(255, 255, 255, .9); }
.lock.dark { background: #000; -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); }
.lock.dark .lock-box { opacity: 0; filter: blur(10px); transform: scale(1.1); animation: none; transition-duration: .5s; }
.lock.dark::before, .lock.dark::after, .lock.dark > :not(.lock-box) { opacity: 0; transition: opacity .5s ease; }
.lock.open { opacity: 0; pointer-events: none; }
.lock.quick { transition-duration: .3s; }

/* ---- the other theme: T2W's clean look. A frosted curtain over the page,
   glass fields that rise in, a white button; wrong shakes red, right lights
   the fields white and the blur dissolves. Every rule here outranks the
   room's by carrying the theme class. */
.lock.theme-normal {
  background: rgba(10, 10, 12, .55);
  -webkit-backdrop-filter: blur(26px) saturate(1.6); backdrop-filter: blur(26px) saturate(1.6);
  transition: opacity .6s cubic-bezier(.2, .8, .2, 1), -webkit-backdrop-filter .6s ease, backdrop-filter .6s ease;
}
.lock.theme-normal > :not(.lock-box), .lock.theme-normal::before, .lock.theme-normal::after { display: none; }
.lock.theme-normal .lock-box { transform: translateY(16px) scale(.96); filter: none; transition: opacity .5s cubic-bezier(.2, .8, .2, 1), transform .5s cubic-bezier(.2, .8, .2, 1); }
.lock.theme-normal.show .lock-box { transform: none; }
.lock.theme-normal .lock-brand, .lock.theme-normal .lock-hint, .lock.theme-normal .lock-whisper { font-family: inherit; }
.lock.theme-normal .lock-brand { font-size: 13px; font-weight: 650; letter-spacing: .18em; color: var(--muted); text-shadow: none; }
.lock.theme-normal .lock-hint { font-style: normal; color: var(--muted); }
.lock.theme-normal .lock-whisper { display: none; }
.lock.theme-normal .lock-fields { animation: none; }
.lock.theme-normal .lock-in { background: var(--surface); border: 1px solid var(--line); box-shadow: none; color: var(--text); caret-color: auto; }
.lock.theme-normal .lock-in::placeholder { color: var(--muted); font-style: normal; font-family: inherit; }
.lock.theme-normal .lock-in:focus { outline: 0; border-color: rgba(255, 255, 255, .45); box-shadow: 0 0 0 4px rgba(255, 255, 255, .06); }
.lock.theme-normal.show .lock-in, .lock.theme-normal.show .lock-go { animation: rise .5s cubic-bezier(.2, .8, .2, 1) both; }
.lock.theme-normal.show .lock-in:nth-child(2) { animation-delay: .05s } .lock.theme-normal.show .lock-in:nth-child(3) { animation-delay: .1s }
.lock.theme-normal.show .lock-in:nth-child(4) { animation-delay: .15s } .lock.theme-normal.show .lock-in:nth-child(5) { animation-delay: .2s }
.lock.theme-normal.show .lock-go { animation-delay: .22s }
.lock.theme-normal .lock-go { font-family: inherit; font-size: 15px; font-weight: 600; letter-spacing: 0; text-transform: none; color: #0a0a0c; background: #f5f5f7; border: 0; box-shadow: none; }
.lock.theme-normal .lock-go:hover, .lock.theme-normal .lock-go:focus-visible { background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .12); }
.lock.theme-normal .lock-alt { font-family: inherit; font-size: 14px; font-style: normal; font-weight: 500; color: var(--muted); }
.lock.theme-normal .lock-alt:hover, .lock.theme-normal .lock-alt:focus-visible { color: var(--text); }
.lock.theme-normal.wrong .lock-fields { animation: shake .45s cubic-bezier(.36, .07, .19, .97); }
.lock.theme-normal.wrong .lock-in { border-color: var(--down); }
.lock.theme-normal.wrong .lock-hint { color: var(--down); animation: none; }
@keyframes shake {
  10%, 90% { transform: translateX(-2px) } 20%, 80% { transform: translateX(4px) }
  30%, 50%, 70% { transform: translateX(-7px) } 40%, 60% { transform: translateX(7px) }
}
.lock.theme-normal.ok .lock-in { animation: none; background: #f5f5f7; color: #0a0a0c; border-color: #f5f5f7; transform: translateY(-3px); box-shadow: 0 10px 30px rgba(255, 255, 255, .18); }
.lock.theme-normal.ok .lock-go { animation: none; box-shadow: 0 10px 30px rgba(255, 255, 255, .25); }
.lock.theme-normal.open { -webkit-backdrop-filter: blur(0) saturate(1); backdrop-filter: blur(0) saturate(1); }
.lock.theme-normal.open .lock-box { opacity: 0; transform: translateY(-10px) scale(1.06); transition-duration: .45s; }
.lock.theme-normal.dark { background: #0a0a0c; }
.lock.theme-normal.quick { transition-duration: .25s; }

@media (max-width: 400px) { .lock-spider { left: 84%; } }
@media (max-height: 600px) { .lock { align-items: flex-start; } }       /* a phone's keyboard up: the fields stay in sight */
@supports not (backdrop-filter: blur(1px)) { .lock { background: rgba(2, 2, 4, .95); } }
@media (prefers-reduced-motion: reduce) {
  .lock *, .lock::before, .lock::after, .lock.show * { animation: none !important; }
  .lock, .lock-box, .lock-in, .lock-go, .lock-flash { transition: none; }
  .lock-box { opacity: 1; transform: none; filter: none; }
}

/* ------------------------------------------------------------------ files */
/* The browser for the three shares (ADR-090, ADR-092). A folder is a list or a
   grid of the same elements -- the container's class decides which. Blur only
   on what floats over a page that holds still (the menu, the dialog), never on
   a row and never over a playing film (ADR-091). */
.crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; min-width: 0; }
.crumbs .crumb { border: 0; background: none; box-shadow: none; padding: 2px 6px; border-radius: 8px; color: var(--muted);
  font: inherit; font-size: 15px; font-weight: 600; letter-spacing: -.01em; transition: color .2s, background .2s; }
.crumbs button.crumb:hover:not(:disabled) { color: var(--text); background: rgba(255, 255, 255, .08); }
.crumbs button.crumb:active:not(:disabled) { transform: none; }
.crumbs .crumb:last-child, .crumbs .crumb.here { color: var(--text); }
.crumbs .crumb.drop { color: var(--text); background: rgba(100, 210, 255, .16); box-shadow: inset 0 0 0 1.5px rgba(100, 210, 255, .6); }
.crumbs .sep { color: var(--muted); opacity: .5; }

.fb-tools { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.fb-tools input[type="search"] { width: 200px; padding: 7px 12px; border-radius: 999px; border: var(--edge);
  background: rgba(255, 255, 255, .06); color: var(--text); font: inherit; font-size: 13px; }
.fb-tools input[type="search"]:focus { outline: none; border-color: rgba(255, 255, 255, .3); }
.fb-tools .iconbtn { width: 34px; height: 34px; cursor: pointer; }
.fb-tools .iconbtn svg.i { width: 17px; height: 17px; }
.fb-star.on { color: var(--warn); }
.fb-star.on svg.i { fill: currentColor; }
#fb-sub { margin: -4px 0 10px; }
#fb-more { margin-top: 12px; display: flex; justify-content: center; }
#fb-more:empty { display: none; }

/* the pill button (T2W's shape) */
.pillbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 14px;
  border-radius: 999px; border: var(--edge); background: var(--btn); box-shadow: var(--rim);
  color: var(--text); font: inherit; font-size: 13px; font-weight: 550; white-space: nowrap; text-decoration: none;
  transition: transform .3s var(--spring), background .2s; }
.pillbtn:hover { background: linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .08)); }
.pillbtn:active { transform: scale(.94); }
.pillbtn:disabled { opacity: .4; }
.pillbtn.wide { width: 100%; }
.pillbtn.danger { color: var(--down); }
.pillbtn.primary, .pillbtn.primary:hover:not(:disabled), .pillbtn.on, .pillbtn.on:hover:not(:disabled) { background: #f5f5f7; color: #0a0a0c; border-color: #f5f5f7; }
.pillbtn.danger.primary, .pillbtn.danger.primary:hover:not(:disabled) { background: var(--down); border-color: var(--down); color: #fff; }

/* what is selected, and what can be done with it: stays in sight under the header */
.fb-selbar { position: sticky; top: 64px; z-index: 8; display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  margin: 0 0 10px; padding: 6px 8px 6px 6px; border-radius: 18px; background: rgba(40, 40, 46, .97); border: var(--edge);
  box-shadow: var(--rim), 0 14px 40px rgba(0, 0, 0, .5); animation: fbsel .3s var(--spring) both; }
@keyframes fbsel { from { opacity: 0; transform: translateY(-6px) } }
.fb-selbar b { font-size: 13.5px; font-weight: 620; margin: 0 6px 0 2px; }
.fb-selbar .iconbtn { width: 32px; height: 32px; }
.fb-selbar .pillbtn { padding: 6px 12px; }
.fb-sp { flex: 1; }

/* favourites and recent files, on the Files root */
.fb-quick { margin: 0 0 16px; }
.fb-quick h3:first-child { margin-top: 2px; }
.fb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fb-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 7px 14px 7px 11px; font-size: 13px; font-weight: 550; }
.fb-chip svg.i { width: 16px; height: 16px; color: var(--muted); }
.fb-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-recent { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; overscroll-behavior-x: contain; }
.fb-recent::-webkit-scrollbar { display: none; }
.fb-rc { flex: none; width: 118px; display: flex; flex-direction: column; gap: 7px; padding: 0; border: 0; border-radius: 12px;
  background: none; box-shadow: none; text-align: left; color: inherit; }
.fb-rc:hover:not(:disabled) { background: none; }
.fb-rc .fb-ic { width: 118px; height: 88px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); transition: transform .35s var(--spring); }
.fb-rc:hover .fb-ic { transform: translateY(-3px); }
.fb-rc .fb-ic svg.i { width: 26px; height: 26px; }
.fb-rc .name { font-size: 12px; font-weight: 550; line-height: 1.3; overflow: hidden; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* ---- a row of the list */
.fb { grid-template-columns: 22px 40px minmax(0, 1fr) 92px 112px 32px; gap: 12px; padding: 7px 8px; border-top: 0; border-radius: 12px;
  cursor: pointer; position: relative; outline: none; -webkit-tap-highlight-color: transparent; transition: background .15s ease, opacity .2s ease; }
.fb > * { grid-row: 1; }
.fb-ck { grid-column: 1; } .fb-ic { grid-column: 2; } .fb-mid { grid-column: 3; min-width: 0; }
.fb .size { grid-column: 4; font-size: 12.5px; } .fb .date { grid-column: 5; } .fb-more-b { grid-column: 6; }
@media (hover: hover) { .fb:hover { background: rgba(255, 255, 255, .05); } .fb.sel:hover { background: rgba(255, 255, 255, .13); } }
.fb.sel { background: rgba(255, 255, 255, .1); }
.fb.focus { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .32); }
.fb.drop { background: rgba(100, 210, 255, .14); box-shadow: inset 0 0 0 1.5px rgba(100, 210, 255, .65); }
.fb.dragging { opacity: .4; }
.fb.bad { opacity: .45; cursor: default; }

.fb-ic { position: relative; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; overflow: hidden; flex: none;
  background: rgba(255, 255, 255, .06); color: var(--muted); }
.fb-ic svg.i { width: 19px; height: 19px; }
.fb-ic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .25s ease, transform .4s ease; }
.fb-ic img.on { opacity: 1; }
.fb.dir .fb-ic { color: rgba(255, 255, 255, .8); background: rgba(255, 255, 255, .09); }
.fb.dir .fb-ic svg.i { fill: rgba(255, 255, 255, .1); }
.fb-seen { position: absolute; left: 0; bottom: 0; height: 3px; background: #f5f5f7; box-shadow: 0 -1px 0 rgba(0, 0, 0, .35); z-index: 1; }

/* the checkbox and the ⋯: there when you point at the row, or once anything is selected */
.fb-ck, .fb-more-b { display: grid; place-items: center; padding: 0; border: 0; box-shadow: none; background: transparent; }
.fb-ck { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .38); color: #0a0a0c; opacity: 0;
  transition: opacity .15s ease, background .15s ease, border-color .15s ease; }
.fb-ck svg.i { width: 13px; height: 13px; stroke-width: 3; opacity: 0; transform: scale(.6); transition: opacity .15s, transform .25s var(--spring); }
@media (hover: hover) { .fb:hover .fb-ck, .fb:hover .fb-more-b { opacity: 1; } }
.fb.focus .fb-ck, .fb-ck:focus-visible, #fb-rows:has(.fb.sel) .fb-ck { opacity: 1; }
.fb.sel .fb-ck { background: #f5f5f7; border-color: #f5f5f7; }
.fb.sel .fb-ck svg.i { opacity: 1; transform: none; }
.fb-ck:hover:not(:disabled) { background: rgba(255, 255, 255, .14); }
.fb.sel .fb-ck:hover:not(:disabled) { background: #fff; }
.fb-ck:active:not(:disabled), .fb-more-b:active:not(:disabled) { transform: scale(.88); }
.fb.share .fb-ck, .fb.bad .fb-ck { visibility: hidden; }
.fb-more-b { width: 32px; height: 32px; border-radius: 50%; color: var(--muted); opacity: 0; transition: opacity .15s, background .15s, color .15s; }
.fb-more-b svg.i { width: 18px; height: 18px; }
.fb.focus .fb-more-b, .fb.sel .fb-more-b, .fb-more-b:focus-visible { opacity: 1; }
@media (hover: none) { .fb-more-b { opacity: 1; } }
.fb-more-b:hover:not(:disabled) { background: rgba(255, 255, 255, .1); color: var(--text); }

/* ---- the grid: the same element as a tile */
#fb-rows.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; }
#fb-rows.grid .fb { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 6px 6px 8px; border-radius: 16px; }
#fb-rows.grid .fb-ic { width: 100%; height: auto; aspect-ratio: 1; border-radius: 12px; }
#fb-rows.grid .fb-ic svg.i { width: 38px; height: 38px; stroke-width: 1.5; }
/* a tile shows the whole picture, in its own shape, on a dark ground -- never a square cut
   from its middle (a portrait lost its top, a film frame its sides; ADR-103) */
#fb-rows.grid .fb-ic img, #fb-rows.photos .fb-ic img { object-fit: contain; }
/* Finder's colours (T2W ADR-137): a folder in its colour, its emoji in place of the glyph; tags as dots */
.fb.dir .fb-ic.tinted, .fbl-prev.tinted { color: var(--fc); background: color-mix(in srgb, var(--fc) 24%, transparent); }
.fb.dir .fb-ic.tinted svg.i, .fbl-prev.tinted svg.i { fill: color-mix(in srgb, var(--fc) 34%, transparent); }
.fb-ic .fb-emoji { font-size: 20px; line-height: 1; }
#fb-rows.grid .fb-ic .fb-emoji { font-size: 46px; }
.fb-tags { display: inline-flex; gap: 3px; margin-right: 6px; vertical-align: 0; }
.fb-tags i { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); }
.fb-tagbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; }
.fb-tagchip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 0; border-radius: 999px; font: inherit; font-size: 12.5px;
  color: var(--muted); background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.fb-tagchip i { width: 9px; height: 9px; border-radius: 50%; }
.fb-tagchip.on { color: #0a0a0c; background: #f5f5f7; box-shadow: none; }
.fb-tagplace .fb-ic { background: linear-gradient(135deg, #bf5af2, #ff375f) !important; color: #fff; }
.fb-tagdots { display: flex; gap: 7px; margin-top: 5px; }
.fb-tagdot { width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2); transition: transform .3s var(--spring); }
.fb-tagdot:hover { transform: scale(1.18); }
/* the sheet: the folder as it will look, the colours, the emoji, the tags */
.fb-look h4 { margin: 16px 0 8px; font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.fbl-head { display: flex; align-items: center; gap: 12px; }
.fbl-prev { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: rgba(255, 255, 255, .8); background: rgba(255, 255, 255, .09); }
.fbl-prev svg.i { width: 26px; height: 26px; fill: rgba(255, 255, 255, .1); }
.fbl-prev .fb-emoji { font-size: 28px; }
.fbl-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fbl-colors { display: flex; flex-wrap: wrap; gap: 10px; }
.fbl-dot { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; transition: transform .3s var(--spring), box-shadow .2s; }
.fbl-dot.none { background: transparent; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .28); }
.fbl-dot.on { box-shadow: 0 0 0 2px #1c1c21, 0 0 0 4px #f5f5f7; transform: scale(1.06); }
.fbl-dot.none.on { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .28), 0 0 0 2px #1c1c21, 0 0 0 4px #f5f5f7; }
.fbl-emoji { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 4px; max-height: 172px; overflow-y: auto; }
.fbl-e { height: 38px; padding: 0; border: 0; border-radius: 10px; background: none; box-shadow: none; font-size: 21px; line-height: 1; }
.fbl-e:hover { background: rgba(255, 255, 255, .08); }
.fbl-e.on { background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.fbl-any { width: 100%; margin-top: 8px; box-sizing: border-box; }
.fbl-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.fbl-tag { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border: 0; border-radius: 999px; font: inherit; font-size: 13px;
  color: var(--muted); background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); text-transform: capitalize; }
.fbl-tag i { width: 10px; height: 10px; border-radius: 50%; }
.fbl-tag.on { color: var(--text); background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
#fb-rows.grid .fb-ic:has(img.on), #fb-rows.photos .fb-ic:has(img.on) { background: #0e0e11; }
@media (hover: hover) { #fb-rows.grid .fb:hover .fb-ic img.on { transform: scale(1.04); } }
#fb-rows.grid .fb-mid { padding: 0 4px; }
#fb-rows.grid .fb .name { white-space: normal; overflow-wrap: anywhere; line-height: 1.3; font-size: 12.5px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
#fb-rows.grid .fb .sub { font-size: 11px; margin-top: 1px; }
#fb-rows.grid .fb .size, #fb-rows.grid .fb .date { display: none; }
#fb-rows.grid .fb-ck { position: absolute; top: 12px; left: 12px; z-index: 2; background: rgba(10, 10, 12, .4); border-color: rgba(255, 255, 255, .75); }
#fb-rows.grid .fb.sel .fb-ck { background: #f5f5f7; border-color: #f5f5f7; }
#fb-rows.grid .fb-more-b { position: absolute; top: 10px; right: 10px; z-index: 2; background: rgba(10, 10, 12, .5); color: #fff; }
#fb-rows.grid .fb.sel .fb-ic { box-shadow: 0 0 0 2px #f5f5f7; }
#fb-rows.grid .fb-seen { height: 4px; }
#fb-rows.grid .empty { grid-column: 1 / -1; }

@media (max-width: 720px) {
  .fb { grid-template-columns: 40px minmax(0, 1fr) auto 32px; gap: 10px; padding: 7px 4px; }
  .fb-ic { grid-column: 1; } .fb-mid { grid-column: 2; } .fb .size { grid-column: 3; } .fb .date { display: none; } .fb-more-b { grid-column: 4; }
  #fb-rows:not(.grid) .fb-ck { grid-column: 1; align-self: start; justify-self: start; margin: -6px 0 0 -6px; z-index: 2; }
  #fb-rows.grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
  #fb-rows.grid .fb { padding: 4px 4px 6px; }
  .fb-tools { width: 100%; margin-bottom: 12px; }
  .fb-tools input[type="search"] { flex: 1 1 140px; width: auto; font-size: 16px; }   /* 16px: iOS zooms into anything smaller */
}

/* ---- uploads and background jobs */
#fb-uploads { display: flex; flex-direction: column; gap: 6px; }
#fb-uploads:not(:empty) { margin: 0 0 12px; }
.fb-task { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 5px 10px; padding: 8px 8px 8px 12px;
  border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); font-size: 12.5px; animation: rise .3s ease both; }
.fb-tl { grid-column: 1; display: flex; justify-content: space-between; gap: 10px; min-width: 0; }
.fb-tl span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-tl b { flex: none; font-weight: 500; color: var(--muted); }
.fb-task .track { grid-column: 1; margin: 0; }
.fb-task .fb-tx { grid-column: 2; grid-row: 1 / span 2; width: 28px; height: 28px; }
.fb-task .fb-tx svg.i { width: 14px; height: 14px; }

/* files dragged in from the desktop */
.fb-drop { display: none; }
#card-files.dropping .fb-drop { position: fixed; inset: 70px 12px 12px; z-index: 25; display: grid; place-items: center; pointer-events: none;
  border: 2px dashed rgba(255, 255, 255, .4); border-radius: 24px; background: rgba(10, 10, 12, .72); font-size: 17px; font-weight: 620; }

/* ---- the menu, the dialog, the toast: one of each */
.fb-pop { position: fixed; z-index: 55; min-width: 214px; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); overflow: auto; padding: 6px;
  border-radius: 16px; border: var(--edge); box-shadow: var(--rim), 0 20px 60px rgba(0, 0, 0, .55);
  background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .025)), rgba(28, 28, 32, .9);   /* not var(--glass): it already ends in a colour, and a second one voids the rule */
  -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6); }
.fb-pop.in { animation: fbpop .16s cubic-bezier(.2, .8, .2, 1) both; transform-origin: top right; }
@keyframes fbpop { from { opacity: 0; transform: scale(.96) translateY(-4px) } }
.fb-pop.out { animation: fbpop-out .14s ease forwards; pointer-events: none; }     /* gone right after (files.js) */
@keyframes fbpop-out { to { opacity: 0; transform: scale(.97) translateY(-3px) } }
.fb-pi { display: flex; align-items: center; gap: 11px; width: 100%; padding: 8px 12px 8px 10px; border: 0; border-radius: 10px;
  background: transparent; box-shadow: none; font-size: 14px; text-align: left; white-space: nowrap; }
.fb-pi svg.i { width: 17px; height: 17px; color: var(--muted); }
.fb-pi:hover:not(:disabled), .fb-pi:focus-visible { background: rgba(255, 255, 255, .09); outline: none; }
.fb-pi:active:not(:disabled) { transform: none; background: rgba(255, 255, 255, .14); }
.fb-pi.danger, .fb-pi.danger svg.i { color: var(--down); }
.fb-pi .fb-pchev { margin-left: auto; display: flex; }                  /* a sub-menu's arrow (T2W ADR-157) */
.fb-pi .fb-pchev svg.i { width: 14px; height: 14px; }
.fb-pi.fb-pback { color: var(--muted); border-bottom: 1px solid rgba(255, 255, 255, .08); border-radius: 10px 10px 0 0; margin-bottom: 2px; }

.fb-modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(4, 4, 6, .55);
  -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2); animation: fbin .2s ease both; }
.fb-card { width: min(440px, 100%); max-height: min(86vh, 720px); overflow: auto; padding: 20px 20px 16px; border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .025)), rgba(24, 24, 28, .95); border: var(--edge); box-shadow: var(--rim), 0 30px 90px rgba(0, 0, 0, .6);
  animation: fbcard .3s var(--spring) both; }
.fb-card.wide { width: min(620px, 100%); }
.fb-card h2 { margin: 0 0 14px; overflow-wrap: anywhere; }
@keyframes fbcard { from { opacity: 0; transform: translateY(10px) scale(.97) } }
.fb-modal.out { animation: fbout .18s ease forwards; pointer-events: none; }
.fb-modal.out .fb-card { animation: fbcard-out .18s ease forwards; }
@keyframes fbout { to { opacity: 0 } }
@keyframes fbcard-out { to { opacity: 0; transform: translateY(8px) scale(.97) } }
.fb-input { width: 100%; padding: 10px 14px; border-radius: 12px; border: var(--edge); background: rgba(255, 255, 255, .07);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .3); color: var(--text); font: inherit; font-size: 16px; }
.fb-input:focus { outline: none; border-color: rgba(255, 255, 255, .4); }
.fb-mact { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.fb-mtext { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.fb-picker .crumbs { margin-bottom: 8px; }
.fb-plist { display: flex; flex-direction: column; gap: 2px; height: min(44vh, 360px); overflow: auto; padding: 4px;
  border-radius: 14px; background: rgba(0, 0, 0, .22); border: 1px solid var(--line); overscroll-behavior: contain; }
.fb-prow { display: flex; align-items: center; gap: 10px; width: 100%; flex: none; padding: 8px 10px; border: 0; border-radius: 10px;
  background: transparent; box-shadow: none; text-align: left; font-size: 14px; }
.fb-prow svg.i { width: 18px; height: 18px; color: var(--muted); }
.fb-prow span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-prow:hover:not(:disabled) { background: rgba(255, 255, 255, .08); }
.fb-prow:active:not(:disabled) { transform: none; background: rgba(255, 255, 255, .12); }
.fb-picker > .muted { margin-top: 8px; }
.fb-info { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 16px; font-size: 13.5px; }
.fb-info .k { color: var(--muted); }
.fb-info .v { overflow-wrap: anywhere; }
/* Find faster (T2W ADR-153) */
.fb-filt { display: flex; flex-direction: column; gap: 12px; }
.fb-filt-row { display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: center; gap: 10px; }
.fb-filt-row .k { color: var(--muted); font-size: 13px; }
.fb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fb-chips .pillbtn.on, #fb-filtbtn.on { background: #0a84ff; border-color: transparent; color: #fff; }
.fb-filt-below { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.fb-ren { display: flex; flex-direction: column; gap: 10px; }
.fb-ren-list { max-height: 280px; overflow: auto; border-radius: 12px; background: rgba(255, 255, 255, .035); padding: 6px 10px; }
.fb-ren-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; padding: 5px 0; font-size: 13px; }
.fb-ren-row span, .fb-ren-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-ren-row span { color: var(--muted); }
.fb-ren-row.bad b { color: #ff6961; }
.fb-ren-to, .fb-ren-more { color: var(--muted); }
.fb-dupes { display: flex; flex-direction: column; gap: 10px; }
.fb-dupe { border-radius: 14px; background: rgba(255, 255, 255, .04); padding: 8px 12px; }
.fb-dupe-h { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.fb-dupe-row { display: flex; gap: 10px; align-items: center; padding: 5px 0; cursor: pointer; }
.fb-dupe-row input { accent-color: #ff453a; }
.fb-dupe-t, .fb-big-t { display: flex; flex-direction: column; min-width: 0; }
.fb-dupe-t span, .fb-big-t span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-big { display: flex; flex-direction: column; gap: 4px; }
.fb-big-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 8px 10px;
  border: 0; border-radius: 10px; background: rgba(255, 255, 255, .035); color: inherit; text-align: left; cursor: pointer; overflow: hidden; }
.fb-big-row:hover { background: rgba(255, 255, 255, .07); }
.fb-big-row i { position: absolute; left: 0; bottom: 0; height: 2px; background: #0a84ff; }
/* Trim (T2W ADR-152): over the film, above the viewer's bar */
.fb-trimbar { position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%); z-index: 7; display: flex; flex-wrap: wrap;
  align-items: center; justify-content: center; gap: 8px; width: max-content; max-width: calc(100% - 24px); padding: 10px 12px; border-radius: 18px;
  background: rgba(24, 24, 28, .94); border: var(--edge); box-shadow: var(--rim), 0 20px 60px rgba(0, 0, 0, .55); }
.fb-trimbar[hidden] { display: none; }
.fb-trim-x { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.fb-trim-note { flex-basis: 100%; text-align: center; color: var(--muted); font-size: 12px; }
/* Convert (T2W ADR-151): one row per thing it can become */
.fb-conv { display: flex; flex-direction: column; gap: 6px; }
.fb-conv-row { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .045);
  cursor: pointer; transition: background .15s; }
.fb-conv-row:hover { background: rgba(255, 255, 255, .08); }
.fb-conv-row:has(input:checked) { background: rgba(10, 132, 255, .18); box-shadow: inset 0 0 0 1px rgba(10, 132, 255, .5); }
.fb-conv-row input { accent-color: #0a84ff; margin: 0; }
.fb-conv-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fb-conv-t span { color: var(--muted); font-size: 12.5px; }
.fb-conv-h { margin: 8px 2px 0; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.fb-conv-h:first-child { margin-top: 0; }
.fb-conv-row.off { cursor: default; opacity: .55; }                       /* refused for these files, with why (T2W ADR-157) */
.fb-conv-row.off:hover { background: rgba(255, 255, 255, .045); }
.fb-conv-t span.why { color: #ff9f0a; }
.fb-conv { max-height: min(60vh, 560px); overflow-y: auto; }
.fb-conv-where { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 2px 0; color: var(--muted); font-size: 13px; }
.fb-info .v a { color: #64d2ff; text-decoration: none; }
.fb-info .v a:hover { text-decoration: underline; }

.fb-toast { position: fixed; left: 50%; bottom: 22px; z-index: 70; transform: translateX(-50%); display: flex; align-items: center; gap: 12px;
  max-width: calc(100% - 32px); padding: 10px 18px; border-radius: 999px; background: rgba(36, 36, 40, .97); border: var(--edge);
  box-shadow: var(--rim), 0 18px 50px rgba(0, 0, 0, .55); font-size: 13.5px; }
.fb-toast:has(button) { padding-right: 7px; }
.fb-toast span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-toast.in { animation: fbtoast .35s var(--spring) both; }
@keyframes fbtoast { from { opacity: 0; transform: translate(-50%, 14px) scale(.96) } }
.fb-toast.out { animation: fbtoast-out .2s ease forwards; }
@keyframes fbtoast-out { to { opacity: 0; transform: translate(-50%, 10px) scale(.97) } }
@media (max-width: 640px) { .fb-toast { bottom: calc(84px + var(--hc-lift, 0px) + env(safe-area-inset-bottom)); } }   /* over the chat bubble */

/* ---- the viewer: over the nav (30), under the dialogs */
.fbview { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 64px 16px 72px;
  background: rgba(6, 6, 8, .94); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  animation: fbin .25s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes fbin { from { opacity: 0 } to { opacity: 1 } }
.fbview-in { max-width: 100%; max-height: 100%; min-width: 0; min-height: 0; display: grid; place-items: center; }
.fbview iframe { width: min(1100px, 92vw); height: calc(100vh - 160px); border: 0; border-radius: 14px; background: #fff; }
.fbview pre { max-width: min(1000px, 92vw); max-height: calc(100vh - 170px); overflow: auto; margin: 0;
  padding: 18px 20px; border-radius: 16px; background: var(--glass2); border: var(--edge);
  font: 12.5px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text); white-space: pre-wrap; word-break: break-word; }
/* The stage's content is positioned now (the photo box, the player): the
   buttons around it must sit above it, or a click on an arrow lands on it. */
.fbview .close, .fbview .step, .fbview-bar { z-index: 6; }
.fbview .close { position: fixed; top: 14px; right: 14px; background: var(--btn); border: var(--edge); transition: opacity .3s ease; }
.fbview .step { position: fixed; top: 50%; transform: translateY(-50%); width: 44px; height: 44px;
  background: var(--btn); border: var(--edge); box-shadow: var(--rim); }
/* the button is 44 px; what you may hit is 44 + 18 on every side, so a near-miss
   still steps instead of dropping you back to the list */
.fbview .step::before { content: ""; position: absolute; inset: -18px; border-radius: 50%; }
.fbview .step.prev { left: 14px; } .fbview .step.next { right: 14px; }
.fbview .close::before { content: ""; position: absolute; inset: -14px; border-radius: 50%; }
.fbview-bar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px;
  max-width: calc(100% - 32px); padding: 8px 10px 8px 16px; border-radius: 999px; background: var(--glass); border: var(--edge);
  box-shadow: var(--rim); font-size: 13px; }
.fbview-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-note { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; max-width: 620px;
  margin: 18px 0 0; padding: 14px 18px; border-radius: 16px; background: var(--glass2); border: var(--edge); color: var(--muted); font-size: 13px; }

/* a film owns the whole screen, its own title and arrows; a song gets a card */
.fbview[data-kind="video"] { display: block; padding: 0; background: #000; -webkit-backdrop-filter: none; backdrop-filter: none; }
.fbview[data-kind="video"] .fbview-in { position: absolute; inset: 0; max-width: none; max-height: none; display: block; }
.fbview[data-kind="video"] .step, .fbview[data-kind="audio"] .step,
.fbview[data-kind="video"] .fbview-bar, .fbview[data-kind="audio"] .fbview-bar { display: none; }
.fbview[data-kind="audio"] .fbview-in { width: min(760px, 100%); height: min(430px, 100%); }
.fbview[data-kind="video"]:has(.pl.idle) .close { opacity: 0; pointer-events: none; }

/* photos: a box the size of the stage; the picture zooms and pans inside it */
.iv { position: relative; width: calc(100vw - 32px); height: calc(100vh - 136px); height: calc(100dvh - 136px); overflow: hidden;
  display: grid; place-items: center; touch-action: none; user-select: none; -webkit-user-select: none; }
/* The limits are the box's own size, in viewport units: a percentage max-height inside a grid is
   ignored while the grid sizes its row, so a picture taller than the screen kept its full height
   and was cut top and bottom -- it looked zoomed in (ADR-103). */
.iv img { max-width: calc(100vw - 32px); max-height: calc(100vh - 136px); max-height: calc(100dvh - 136px);
  border-radius: 12px; background: #111; box-shadow: 0 30px 90px rgba(0, 0, 0, .7);
  transform-origin: 50% 50%; will-change: transform; -webkit-user-drag: none; cursor: zoom-in; }

/* ------------------------------------------------------------ the player */
/* Black, the picture contained, the controls on a gradient -- not glass: a
   blur over a playing film is re-blurred every frame. They leave after 2.6 s
   of a still mouse while it plays, and take the cursor with them. */
.pl { position: relative; width: 100%; height: 100%; overflow: hidden; background: #000; color: #fff;
  container: pl / inline-size; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.fbview[data-kind="audio"] .pl { border-radius: 20px; border: var(--edge); box-shadow: 0 30px 90px rgba(0, 0, 0, .7); }
.pl video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.pl.idle { cursor: none; }
.pl-top, .pl-bar { position: absolute; left: 0; right: 0; transition: opacity .3s ease, transform .3s ease; }
.pl-top { top: 0; padding: 16px 72px 48px 20px; background: linear-gradient(to bottom, rgba(0, 0, 0, .72), rgba(0, 0, 0, 0)); pointer-events: none; }
.pl-title { font-size: 16px; font-weight: 640; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.pl-meta { margin-top: 2px; font-size: 12px; color: rgba(255, 255, 255, .72); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-bar { bottom: 0; padding: 56px 14px 12px; pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, .82), rgba(0, 0, 0, .4) 55%, rgba(0, 0, 0, 0)); }
.pl-bar > * { pointer-events: auto; }
.pl.idle .pl-top, .pl.idle .pl-bar, .pl.idle .pl-bar > * { opacity: 0; pointer-events: none; }
.pl.idle .pl-top { transform: translateY(-10px); }
.pl.idle .pl-bar { transform: translateY(10px); }
.fbview[data-kind="audio"] .pl.idle { cursor: auto; }
.fbview[data-kind="audio"] .pl.idle .pl-top, .fbview[data-kind="audio"] .pl.idle .pl-bar { opacity: 1; transform: none; }
.fbview[data-kind="audio"] .pl.idle .pl-bar > * { opacity: 1; pointer-events: auto; }

/* the scrubber: what is buffered, what is played, the chapters; a knob and a
   time tip while you point at it */
.pl-scrub { position: relative; height: 20px; margin: 0 6px 2px; cursor: pointer; touch-action: none; }
.pl-track { position: absolute; left: 0; right: 0; top: 8px; height: 4px; border-radius: 999px; background: rgba(255, 255, 255, .22);
  overflow: hidden; transition: transform .15s ease; }
.pl-scrub.hover .pl-track, .pl-scrub.drag .pl-track { transform: scaleY(1.5); }
.pl-bufs, .pl-marks { position: absolute; inset: 0; }
.pl-bufs i { position: absolute; top: 0; bottom: 0; background: rgba(255, 255, 255, .3); }
.pl-played { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #fff; }
.pl-marks i { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1px; background: rgba(0, 0, 0, .6); }
.pl-knob { position: absolute; top: 10px; left: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .55); transform: scale(0); transition: transform .15s ease; pointer-events: none; }
.pl-scrub.hover .pl-knob { transform: scale(1); }
.pl-scrub.drag .pl-knob { transform: scale(1.2); }
@media (hover: none) { .pl-knob { transform: scale(.8); } }
.pl-tip { position: absolute; bottom: 24px; left: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center;
  padding: 4px 9px; border-radius: 9px; background: rgba(18, 18, 22, .94); border: var(--edge); font-size: 12px; line-height: 1.35;
  white-space: nowrap; opacity: 0; transition: opacity .12s ease; pointer-events: none; }
.pl-tip b { font-weight: 640; font-variant-numeric: tabular-nums; }
.pl-tip span { max-width: 220px; overflow: hidden; text-overflow: ellipsis; font-size: 11px; color: rgba(255, 255, 255, .7); }
.pl-tip span:empty { display: none; }
.pl-scrub.hover .pl-tip, .pl-scrub.drag .pl-tip { opacity: 1; }

.pl-row { display: flex; align-items: center; gap: 2px; }
.pl-b { width: 40px; height: 40px; flex: none; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%;
  background: transparent; box-shadow: none; color: #fff; }
.pl-b svg.i { width: 22px; height: 22px; }
.pl-b.big svg.i { width: 26px; height: 26px; }
.pl-b:hover:not(:disabled) { background: rgba(255, 255, 255, .14); }
.pl-volw { display: inline-flex; align-items: center; }
.pl-vol { width: 0; margin: 0; opacity: 0; height: 4px; border-radius: 999px; cursor: pointer; -webkit-appearance: none; appearance: none;
  background: linear-gradient(to right, #fff var(--v, 80%), rgba(255, 255, 255, .28) var(--v, 80%));
  transition: width .2s ease, opacity .2s ease, margin .2s ease; }
.pl-vol:focus { outline: none; }
.pl-vol::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.pl-vol::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; }
.pl-vol::-moz-range-track { background: transparent; }
.pl-volw:hover .pl-vol, .pl-volw:focus-within .pl-vol { width: 84px; opacity: 1; margin: 0 8px 0 2px; }
@media (hover: none) { .pl-vol { display: none; } }
.pl-time { margin-left: 8px; font-size: 13px; color: rgba(255, 255, 255, .88); white-space: nowrap; }
.pl-sp { flex: 1; min-width: 0; }

/* the subtitles: above the controls while they show, low when they go */
.pl-subs { position: absolute; left: 6%; right: 6%; bottom: 7%; text-align: center; pointer-events: none; line-height: 1.35;
  font-size: 26px; font-size: clamp(16px, 3cqw, 40px); transition: bottom .3s ease; }
.pl:not(.idle) .pl-subs { bottom: max(7%, 112px); }
.pl-subs.s { font-size: clamp(13px, 2.3cqw, 30px); }
.pl-subs.l { font-size: clamp(19px, 3.8cqw, 50px); }
.pl-subs.xl { font-size: clamp(22px, 4.8cqw, 62px); }
.pl-subs span { white-space: pre-line; padding: .1em .4em; border-radius: .25em; background: rgba(0, 0, 0, .62); color: #fff; font-weight: 540;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .8); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.pl-subs.loading span { font-size: 13px; font-style: italic; color: rgba(255, 255, 255, .75); background: rgba(0, 0, 0, .45); }

/* what a key or a tap just did, the wait, and what went wrong */
.pl-flash { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.9); padding: 12px 20px; border-radius: 16px;
  background: rgba(0, 0, 0, .55); font-size: 20px; font-weight: 640; white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity .3s ease, transform .3s ease; }
.pl-flash.on { opacity: 1; transform: translate(-50%, -50%) scale(1); transition-duration: .08s; }
.pl-spin { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .2); border-top-color: #fff; pointer-events: none; opacity: 0;
  animation: spin .8s linear infinite, plshow .2s ease .35s forwards; }      /* a quick seek never shows it */
@keyframes plshow { to { opacity: 1 } }
.pl-msg { position: absolute; left: 50%; top: 50%; z-index: 3; transform: translate(-50%, -50%); width: min(460px, calc(100% - 32px));
  display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 18px; text-align: center; font-size: 14px;
  background: rgba(24, 24, 28, .95); border: var(--edge); box-shadow: var(--rim), 0 24px 60px rgba(0, 0, 0, .6); }
.pl-msg .acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

/* up next, with its countdown */
.pl-next { position: absolute; right: 18px; bottom: 116px; z-index: 3; width: min(420px, calc(100% - 36px));
  display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: 10px 12px; padding: 12px; border-radius: 18px;
  background: rgba(24, 24, 28, .95); border: var(--edge); box-shadow: var(--rim), 0 24px 60px rgba(0, 0, 0, .6); animation: rise .4s var(--spring) both; }
.pl-next img { grid-row: 1 / span 2; width: 96px; height: 64px; object-fit: cover; border-radius: 10px; background: #1c1c20; }
.pl-next small { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pl-next b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-count { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .5);
  font-weight: 700; font-variant-numeric: tabular-nums; }
.pl-next .acts { grid-column: 2 / span 2; display: flex; gap: 8px; }

/* subtitles, audio, speed: a panel over the bottom right */
.pl-menu { position: absolute; right: 16px; bottom: 100px; z-index: 4; width: min(320px, calc(100% - 32px)); max-height: calc(100% - 150px);
  overflow: auto; overscroll-behavior: contain; padding: 6px; border-radius: 16px; background: rgba(24, 24, 28, .96); border: var(--edge);
  box-shadow: var(--rim), 0 24px 60px rgba(0, 0, 0, .6); }
.pl-menu.in { animation: plmenu .18s cubic-bezier(.2, .8, .2, 1) both; transform-origin: bottom right; }
@keyframes plmenu { from { opacity: 0; transform: translateY(6px) scale(.98) } }
.pl-mh { padding: 8px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pl-mi { display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px;
  background: transparent; box-shadow: none; text-align: left; font-size: 14px; color: #fff; }
.pl-mi svg.i { grid-row: 1 / span 2; align-self: center; width: 16px; height: 16px; opacity: 0; }
.pl-mi.on svg.i { opacity: 1; }
.pl-mi span { overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pl-mi small { grid-column: 2; font-size: 11.5px; color: var(--muted); }
.pl-mi:hover:not(:disabled) { background: rgba(255, 255, 255, .08); }
.pl-mi:active:not(:disabled) { transform: none; background: rgba(255, 255, 255, .12); }
.pl-seg { display: flex; gap: 2px; margin: 2px 6px 8px; padding: 2px; border-radius: 10px; background: rgba(255, 255, 255, .07); }
.pl-seg button { flex: 1; padding: 6px 0; border: 0; border-radius: 8px; background: transparent; box-shadow: none; font-size: 12.5px; color: var(--muted); }
.pl-seg button.on { background: rgba(255, 255, 255, .18); color: #fff; }
.pl-seg button:active:not(:disabled) { transform: none; }
.pl-mnote { padding: 6px 10px 8px; font-size: 12px; line-height: 1.4; color: var(--muted); }

/* a phone: smaller buttons, and the ones a tap can do without are gone */
@container pl (max-width: 560px) {
  .pl-b { width: 36px; height: 36px; }
  .pl-b svg.i { width: 20px; height: 20px; }
  .pl-b.opt { display: none; }
  .pl-time { margin-left: 4px; font-size: 12px; }
  .pl-top { padding: 12px 60px 40px 14px; }
  .pl-bar { padding: 48px 8px 8px; }
  .pl-next { left: 10px; right: 10px; width: auto; bottom: 100px; }
  .pl-menu { right: 8px; bottom: 92px; }
}

@media (prefers-reduced-motion: reduce) {
  .fbview, .fb-modal, .fb-card, .fb-pop.in, .fb-toast.in, .fb-selbar, .fb-task, .pl-menu.in, .pl-next { animation: none; }
  .fb-pop.out, .fb-modal.out, .fb-modal.out .fb-card, .fb-toast.out { animation: none; opacity: 0; }
  .pl-top, .pl-bar, .pl-subs, .fb-ic img, .fb-rc .fb-ic { transition: none; }
}

.pl-stats { font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, .72); }

/* Browse as: a strip that says whose eyes these are */
.asbar { position: sticky; top: 0; z-index: 25; display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center;
  padding: 8px 16px; background: #3a2f05; color: #ffd60a; font-size: 13px; }
.asbar a { color: #f5f5f7; }


/* ---- Settings' four tabs (T2W ADR-132): the nav's white pill, sliding under the tab you are on. A tab
   shows only its own cards; shown again, they rise again (display none -> shown restarts it). */
.st-tabs { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; justify-self: center; width: min(520px, 100%);
  padding: 4px; margin: 2px 0 6px; border-radius: 999px; background: var(--glass); border: var(--edge); box-shadow: var(--rim), 0 12px 36px rgba(0, 0, 0, .35); }
.st-tabs-pill { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--n, 4)); border-radius: 999px; background: #f5f5f7;
  box-shadow: 0 6px 18px rgba(255, 255, 255, .15), -1px 0 0 rgba(255, 90, 140, .32), 1px 0 0 rgba(90, 200, 255, .32);
  transform: translateX(calc(var(--i, 0) * 100%)); transition: transform .5s var(--spring); }
.st-tabs button, .st-tabs button:hover:not(:disabled), .st-tabs button:active:not(:disabled) {
  position: relative; z-index: 1; padding: 9px 6px; border: 0; border-radius: 999px; background: none; box-shadow: none; transform: none;
  color: var(--muted); font-size: 14px; font-weight: 600; transition: color .35s ease; }
.st-tabs button:hover:not(:disabled) { color: var(--text); }
.st-tabs button.on, .st-tabs button.on:hover:not(:disabled) { color: #0a0a0c; }
#view-settings > [data-seg]:not(.seg-on) { display: none; }
#view-settings > .card { animation-delay: calc(var(--i, 0) * 60ms); }   /* by its place in its tab: sibling-index() counts the hidden */
@media (prefers-reduced-motion: reduce) { .st-tabs-pill, .st-tabs button { transition: none; } }

/* ---- Settings (ADR-102): iOS's Settings in the house's dark -- grouped lists,
   switches, a sheet that slides in. Opaque surfaces (no blur behind the lists:
   ADR-091), the page's global button/field dressing undone inside. */
.st-add { width: 32px; height: 32px; padding: 0; display: grid; place-items: center; border-radius: 50%; }
.card-head .st-add { margin-top: -4px; }
.row-head .st-add { width: 28px; height: 28px; }
.st-add svg.i { width: 16px; height: 16px; stroke-width: 2.4; }
.st-gh { margin: 0 0 7px 14px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.smb .st-gh { display: flex; align-items: center; min-height: 28px; margin: 0 0 6px 14px; }
.smb .row-head .st-add { margin-right: 4px; }
.st-list { border-radius: 14px; overflow: hidden; background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .06); }
.st-row, button.st-row { position: relative; width: 100%; display: flex; align-items: center; gap: 12px; min-height: 50px; margin: 0;
  padding: 8px 14px; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--text); font: inherit;
  text-align: left; text-decoration: none; cursor: pointer; transition: background .15s; }
.st-row.still { cursor: default; }
.st-row + .st-row::before { content: ""; position: absolute; top: 0; right: 0; left: 14px; border-top: 1px solid rgba(255, 255, 255, .07); }
.st-list.faces .st-row + .st-row::before { left: 66px; }
button.st-row:hover:not(:disabled), a.st-row:hover { background: rgba(255, 255, 255, .045); }
button.st-row:active:not(:disabled), a.st-row:active { background: rgba(255, 255, 255, .09); transform: none; }
.st-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.st-name { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 15px; font-weight: 560; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.st-sub { color: var(--muted); font-size: 12.5px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-sub.wrap { white-space: normal; }
.st-badge { flex: none; padding: 1px 7px; border-radius: 999px; background: rgba(10, 132, 255, .18); color: #64d2ff; font-size: 11px; font-weight: 700; letter-spacing: .01em; }
.st-when { flex: none; color: var(--muted); font-size: 12.5px; }
.st-chev { flex: none; display: grid; color: rgba(255, 255, 255, .28); }
.st-chev svg.i { width: 15px; height: 15px; stroke-width: 2.6; }
.st-ic { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: rgba(10, 132, 255, .16); color: #64d2ff; }
.st-ic svg.i { width: 16px; height: 16px; }
.st-grow { flex: 1; }
.st-av { --s: 40px; position: relative; flex: none; width: var(--s); height: var(--s); border-radius: 50%; display: grid; place-items: center;
  overflow: hidden; color: #fff; font-weight: 650; font-size: calc(var(--s) * .42); line-height: 1; user-select: none; }
.st-av.emoji { font-size: calc(var(--s) * .55); }
.st-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.st-av.new { background: rgba(10, 132, 255, .16); color: #64d2ff; }
.st-av.new svg.i { width: 40%; height: 40%; stroke-width: 1.8; }
.st-chips { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.st-chip { padding: 2px 9px; border-radius: 999px; font-size: 11.5px; background: rgba(255, 255, 255, .08); color: var(--muted); }
.st-chip.rw { color: var(--text); background: rgba(255, 255, 255, .15); }
/* switches, iOS's */
.st-switch { position: relative; flex: none; width: 51px; height: 31px; border-radius: 16px; background: rgba(120, 120, 128, .32); transition: background .25s ease; }
.st-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .25), 0 1px 1px rgba(0, 0, 0, .16); transition: transform .32s var(--spring); }
.st-toggle.on .st-switch { background: #30d158; }
.st-toggle.on .st-switch::after { transform: translateX(20px); }
button.st-toggle[aria-disabled="true"] { cursor: default; }
button.st-toggle[aria-disabled="true"]:hover { background: none; }
.st-toggle[aria-disabled="true"] > * { opacity: .38; }
/* segmented, SMB's None / Read / Write */
.st-seg { flex: none; display: inline-flex; padding: 2px; border-radius: 9px; background: rgba(118, 118, 128, .24); }
.st-seg button { min-width: 0; padding: 5px 11px; border: 0; border-radius: 7px; background: none; box-shadow: none; color: #d1d1d6; font-size: 13px; font-weight: 560; }
.st-seg button.on { background: #636366; color: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .25); }
.st-seg button:hover:not(:disabled):not(.on) { background: rgba(255, 255, 255, .06); }
.st-seg button:active:not(:disabled) { transform: none; }
/* fields in a row: the label left, the value right */
.st-field { cursor: text; }
.st-label { flex: none; min-width: 84px; font-weight: 500; }
.st-row input[type="text"], .st-row input[type="password"], .st-row input:not([type]) { flex: 1; min-width: 0; padding: 4px 0; border: 0; border-radius: 0;
  background: none; box-shadow: none; color: var(--text); font: inherit; text-align: right; outline: none; }
.st-row input::placeholder { color: rgba(235, 235, 245, .3); }
.st-row input:focus { outline: none; }
.st-addf input[type="text"] { text-align: left; }
.st-pin { font: 600 15px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .22em; }
.st-row input.st-pin-in { flex: 0 1 84px; text-align: left; }
.st-mini, button.st-mini { flex: none; min-height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .1);
  box-shadow: none; color: var(--text); font-size: 13px; font-weight: 600; transition: background .2s, transform .25s var(--spring); }
button.st-mini:hover:not(:disabled) { background: rgba(255, 255, 255, .16); }
button.st-mini.blue { background: #0a84ff; color: #fff; }
button.st-mini.blue:hover:not(:disabled) { background: #2a95ff; }
button.st-mini.red { background: rgba(255, 69, 58, .16); color: #ff6961; }
button.st-mini.red:hover:not(:disabled) { background: rgba(255, 69, 58, .26); }
.st-code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .08em; user-select: all; -webkit-user-select: all; }
.st-temp { background: rgba(48, 209, 88, .08); }
.st-select, select.st-select { flex: none; padding: 6px 28px 6px 12px; border: 0; border-radius: 999px; box-shadow: none; font-size: 13px; font-weight: 560;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d1d1d6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 11px, rgba(255, 255, 255, .1); }
.st-select option { background: #1c1c1e; color: var(--text); }
.st-minus, button.st-minus { flex: none; position: relative; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: #ff453a; box-shadow: none; }
.st-minus::after { content: ""; position: absolute; left: 6px; right: 6px; top: 10px; height: 2px; border-radius: 1px; background: #fff; }
.st-folder.gone .st-name { color: var(--down); text-decoration: line-through; }
.st-link { color: #0a84ff; }
.st-link .st-t { font-weight: 560; }
button.st-danger { justify-content: center; color: #ff453a; font-weight: 600; }
button.st-danger.sure { background: rgba(255, 69, 58, .14); }
.st-cta, button.st-cta { width: 100%; min-height: 50px; margin-top: 24px; border: 0; border-radius: 14px; background: #0a84ff; box-shadow: none;
  color: #fff; font-size: 16px; font-weight: 650; }
button.st-cta:hover:not(:disabled) { background: #2a95ff; }
button.st-cta:active:not(:disabled) { transform: scale(.98); }
/* the sheet */
.st-veil { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; background: rgba(0, 0, 0, 0); transition: background .3s ease; }
.st-veil.on { background: rgba(0, 0, 0, .56); }
.st-panel { width: min(560px, 100%); max-height: min(88vh, 920px); display: flex; flex-direction: column; overflow: hidden; border-radius: 22px;
  background: #141417; border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 40px 110px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .06);
  transform: translateY(28px) scale(.97); opacity: 0; transition: transform .5s cubic-bezier(.32, .72, 0, 1), opacity .25s ease; }
.st-veil.on .st-panel { transform: none; opacity: 1; }
.st-top { flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 56px; padding: 0 8px 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .07); }
.st-title { max-width: 60vw; font-size: 16px; font-weight: 650; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.st-done { justify-self: end; padding: 8px 10px; border: 0; border-radius: 10px; background: none; box-shadow: none; color: #0a84ff; font-size: 16px; font-weight: 650; }
button.st-done:hover:not(:disabled) { background: rgba(10, 132, 255, .12); }
.st-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 18px 30px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent; }
.st-hero { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px 0 4px; text-align: center; }
.st-hero .st-av { box-shadow: 0 14px 36px rgba(0, 0, 0, .45); }
.st-hero-name { margin-top: 6px; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.st-hero-sub { color: var(--muted); font-size: 13px; }
.st-group { margin-top: 24px; }
/* the buddy's AI lines (T2W ADR-118): what it costs left, the key and limits right */
.brain { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 28px; }
.brain > div > .st-group:first-child { margin-top: 4px; }
.br-chart { display: flex; align-items: flex-end; gap: 4px; height: 56px; margin: 0 4px 10px; }
.br-chart i { flex: 1; min-height: 4px; border-radius: 3px 3px 1px 1px; background: rgba(10, 132, 255, .38); }
.br-chart i.today { background: #0a84ff; }
.st-row input.br-key { text-align: left; font: 13px/1.2 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.br-try { display: flex; flex-direction: column; gap: 4px; margin: 10px 14px 0; font-size: 13px; color: var(--muted); }
.br-try strong { color: var(--live); font-weight: 600; }
.br-try.bad strong { color: var(--down); }
@media (max-width: 640px) { .brain { grid-template-columns: 1fr; } .brain .st-when { display: block; } }
.st-foot { margin: 7px 14px 0; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.st-err { margin: 14px 0 0; padding: 10px 14px; border-radius: 12px; background: rgba(255, 69, 58, .14); color: #ff6961; font-size: 13.5px; }
html.st-lock, html.st-lock body { overflow: hidden; }
@media (max-width: 640px) {
  .st-veil { padding: 0; place-items: end stretch; }
  .st-panel { width: 100%; max-height: calc(100% - 24px); border-radius: 18px 18px 0 0; border-bottom: 0; opacity: 1; transform: translateY(105%);
    padding-bottom: env(safe-area-inset-bottom); }
  .st-addf { flex-wrap: wrap; }
  .st-addf input[type="text"] { flex: 1 1 calc(100% - 60px); }
  .st-addf .st-select { margin-left: 42px; }
  .st-when { display: none; }
}
/* the login theme: the picked one carries a check */
.theme-tile { position: relative; }
.theme-tile:has(input:checked)::after { content: ""; position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; border-radius: 50%;
  background: #0a84ff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") no-repeat center / 12px;
  box-shadow: 0 0 0 2px #141417; }
@media (prefers-reduced-motion: reduce) { .st-panel, .st-veil, .st-switch, .st-switch::after { transition: none; } }

/* ---- Files V3, phase D: places, the photos timeline, text, music (ADR-103) */
/* A share (or a row in Recents) cannot be selected, so its row has no check column (it sat 34 px in from everything else) */
.fb.share .fb-ck, #fb-rows.nosel .fb-ck { display: none; }
@media (min-width: 721px) {              /* at 720 and below the rows have no check column anyway */
  .fb.share, #fb-rows.nosel .fb { grid-template-columns: 40px minmax(0, 1fr) 92px 112px 32px; }
  .fb.share .fb-ic, #fb-rows.nosel .fb-ic { grid-column: 1; } .fb.share .fb-mid, #fb-rows.nosel .fb-mid { grid-column: 2; }
  .fb.share .size, #fb-rows.nosel .size { grid-column: 3; } .fb.share .date, #fb-rows.nosel .date { grid-column: 4; }
  .fb.share .fb-more-b, #fb-rows.nosel .fb-more-b { grid-column: 5; }
}
/* under the shares: Photos and Recents, then what you were watching, then favourites */
.fb-quick { margin: 18px 0 4px; }
/* Storage (T2W ADR-136): iCloud's bar -- what the server holds, a colour for each kind of thing, what the snapshots
   keep in grey stripes, the free part the track itself -- and your own folder against its cap */
.fb-space { margin: 14px 0 4px; padding: 14px 16px; border-radius: 18px; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); }
.fbs-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.fbs-head b { font-size: 15px; font-weight: 650; }
.fbs-head span { color: var(--muted); font-size: 13px; }
.fbs-bar { display: flex; gap: 2px; height: 12px; margin: 10px 0 10px; border-radius: 6px; overflow: hidden; background: rgba(255, 255, 255, .1); }
.fbs-seg { display: block; height: 100%; min-width: 3px; }
.fbs-seg.kept, .fbs-key i.kept { background: repeating-linear-gradient(135deg, #8e8e93 0 3px, #5a5a60 3px 6px); }
.fbs-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); }
.fbs-key { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.fbs-key i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.fbs-key i.free { background: rgba(255, 255, 255, .18); }
.fbs-key b { color: var(--text); font-weight: 560; }
.fbs-mine { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 10px; width: 100%; margin-top: 12px; padding: 10px 0 0;
  border: 0; border-top: 1px solid rgba(255, 255, 255, .07); border-radius: 0; background: none; box-shadow: none; color: var(--text); font: inherit; text-align: left; }
.fbs-mine:active { transform: none; }
.fbs-mine-t { font-weight: 560; font-size: 14px; }
.fbs-mine-n { color: var(--muted); font-size: 13px; }
.fbs-mine-bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.fbs-mine-bar i { display: block; height: 100%; border-radius: 3px; background: #0a84ff; }
.fbs-mine-bar.amber i { background: var(--warn); } .fbs-mine-bar.red i { background: var(--down); }
.fb-places { display: grid; gap: 2px; margin-bottom: 8px; }
.fb-place { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; padding: 7px 8px; border: 0; border-radius: 12px; background: none;
  box-shadow: none; color: var(--text); text-align: left; font: inherit; }
.fb-place:hover:not(:disabled) { background: rgba(255, 255, 255, .05); }
.fb-place:active:not(:disabled) { transform: none; background: rgba(255, 255, 255, .08); }
.fb-place .fb-ic { background: linear-gradient(135deg, #5e5ce6, #0a84ff); color: #fff; }
.fb-place.fb-photos .fb-ic { background: linear-gradient(135deg, #ff9f0a, #ff375f); }
.fb-place.fb-mine .fb-ic { background: linear-gradient(135deg, #30d158, #00b4a0); }    /* My files (T2W ADR-155) */
.fb-pt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fb-pt b { font-weight: 560; }
.fb-pt span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-chev { display: grid; color: rgba(255, 255, 255, .3); }
.fb-chev svg.i { width: 15px; height: 15px; stroke-width: 2.6; }
/* the timeline: square tiles, edge to edge, a month over each run */
#fb-rows.photos { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 3px; }
#fb-rows.photos .fb { padding: 0; gap: 0; border-radius: 4px; }
#fb-rows.photos .fb-ic { border-radius: 4px; }
#fb-rows.photos .fb-mid, #fb-rows.photos .fb-more-b { display: none; }
#fb-rows.photos .fb:hover .fb-more-b, #fb-rows.photos .fb.focus .fb-more-b { display: grid; }
#fb-rows.photos .fb-ck { top: 6px; left: 6px; }
.fb-month { grid-column: 1 / -1; margin: 16px 0 6px; padding: 0 2px; font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.fb-month:first-child { margin-top: 0; }
@media (max-width: 640px) { #fb-rows.photos { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 2px; } }
/* the song the mini player holds */
.fb.playing .name { color: #0a84ff; }
.fb.playing .fb-ic::after { content: ""; position: absolute; inset: 0; background: rgba(10, 132, 255, .28); }
/* text: read (Markdown as a page) and edit */
.fb-textv { position: relative; display: flex; flex-direction: column; gap: 10px; width: min(900px, 94vw); max-height: calc(100vh - 170px); }
.fb-textv > pre { max-width: none; width: 100%; }
.fb-srcbtn { align-self: flex-end; }
.fb-md { overflow: auto; padding: 22px 26px; border-radius: 16px; background: #141418; border: var(--edge);
  line-height: 1.6; font-size: 15px; overflow-wrap: anywhere; }
.fb-md > :first-child { margin-top: 0; }
.fb-md h2, .fb-md h3, .fb-md h4, .fb-md h5, .fb-md h6, .fb-md h7 { margin: 1.2em 0 .4em; letter-spacing: -.01em; text-transform: none; color: var(--text); }
.fb-md h2 { font-size: 24px; } .fb-md h3 { font-size: 19px; } .fb-md h4 { font-size: 16px; }
.fb-md p, .fb-md ul, .fb-md ol, .fb-md blockquote, .fb-md pre { margin: 0 0 .9em; }
.fb-md code { padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, .08); font: 13.5px/1.5 ui-monospace, "SF Mono", Menlo, monospace; }
.fb-md pre { padding: 12px 14px; border-radius: 12px; background: rgba(0, 0, 0, .35); overflow: auto; max-height: none; max-width: none; }
.fb-md pre code { padding: 0; background: none; }
.fb-md blockquote { padding: 2px 0 2px 14px; border-left: 3px solid rgba(255, 255, 255, .25); color: #d1d1d6; }
.fb-md a { color: #64d2ff; }
.fb-md hr { border: 0; border-top: 1px solid rgba(255, 255, 255, .15); margin: 1.4em 0; }
.fb-md li input { margin: 0 4px 0 0; vertical-align: -1px; accent-color: #30d158; }
.fb-editbar { display: flex; align-items: center; gap: 8px; }
.fb-editstate { flex: 1; color: var(--muted); font-size: 13px; }
.fb-edit { width: 100%; height: calc(100vh - 240px); min-height: 240px; padding: 16px 18px; resize: none; border-radius: 16px;
  border: var(--edge); background: rgba(14, 14, 18, .96); color: var(--text); font: 14px/1.6 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  tab-size: 4; outline: none; }
.fb-edit:focus { border-color: rgba(255, 255, 255, .3); }
.fbview.editing .step { display: none; }
/* an album: its picture, its name, Play and Shuffle */
.fb-album { display: flex; align-items: center; gap: 18px; margin: 4px 0 14px; padding: 14px; border-radius: 18px; background: rgba(255, 255, 255, .04); }
.fb-album .fb-art { width: 112px; height: 112px; border-radius: 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, .45); }
.fb-album .fb-art svg.i { width: 34px; height: 34px; stroke-width: 1.6; }
.fb-at { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fb-at b { font-size: 21px; font-weight: 700; letter-spacing: -.015em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-at span { color: var(--muted); font-size: 13px; }
.fb-at .fb-kicker { font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.fb-aacts { display: flex; gap: 8px; }
.fb-aacts .pillbtn { min-width: 92px; padding: 9px 16px; }
@media (max-width: 640px) {
  .fb-album { flex-wrap: wrap; }
  .fb-album .fb-art { width: 84px; height: 84px; }
  .fb-aacts { width: 100%; } .fb-aacts .pillbtn { flex: 1; }
}
/* the mini player: floating chrome over a scrolling list -- the one blur here (ADR-091) */
.mu { position: fixed; left: 50%; bottom: 14px; z-index: 35; transform: translateX(-50%); width: min(760px, calc(100vw - 24px));
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 32px; grid-template-areas: "art t ctl x" "seek seek seek seek";
  align-items: center; gap: 4px 12px; padding: 10px 12px 8px; border-radius: 20px; border: var(--edge);
  background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03)), rgba(24, 24, 28, .78);
  -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8);
  box-shadow: var(--rim), 0 20px 60px rgba(0, 0, 0, .55); animation: mu-in .45s cubic-bezier(.32, .72, 0, 1); }
.mu[hidden] { display: none; }
@keyframes mu-in { from { transform: translate(-50%, 30px); opacity: 0; } }
body:has(#fb-view:not([hidden])) .mu { display: none; }             /* never over a film or a photo */
body:has(.mu:not([hidden])) #card-files { margin-bottom: 110px; }
.mu-art { grid-area: art; position: relative; width: 44px; height: 44px; border-radius: 10px; overflow: hidden; display: grid; place-items: center;
  background: rgba(255, 255, 255, .08); color: var(--muted); }
.mu-art svg.i { width: 20px; height: 20px; }
.mu-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.mu-art img.on { opacity: 1; }
.mu-t { grid-area: t; min-width: 0; display: flex; flex-direction: column; }
.mu-t b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mu-t span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mu-ctl { grid-area: ctl; display: flex; align-items: center; gap: 2px; }
.mu-b, button.mu-b { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: none;
  box-shadow: none; color: var(--text); }
button.mu-b:hover:not(:disabled) { background: rgba(255, 255, 255, .1); }
.mu-b svg.i { width: 18px; height: 18px; }
.mu-b.big { width: 44px; height: 44px; }
.mu-b.big svg.i { width: 22px; height: 22px; }
.mu-shuf { color: var(--muted); }
.mu-shuf.on { color: #0a84ff; }
.mu-x { grid-area: x; color: var(--muted); width: 32px; height: 32px; }
.mu-seek { grid-area: seek; display: flex; align-items: center; gap: 10px; }
.mu-time { flex: none; min-width: 34px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.mu-len { text-align: right; }
.mu-seek input { flex: 1; min-width: 0; height: 18px; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; appearance: none; -webkit-appearance: none; cursor: pointer; }
.mu-seek input::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, #f5f5f7 var(--p, 0%), rgba(255, 255, 255, .18) var(--p, 0%)); }
.mu-seek input::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .18); }
.mu-seek input::-moz-range-progress { height: 4px; border-radius: 2px; background: #f5f5f7; }
.mu-seek input::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.mu-seek input::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; }
@media (max-width: 640px) {
  .mu { grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: "art t x" "ctl ctl ctl" "seek seek seek"; bottom: 8px; }
  .mu-ctl { justify-content: center; gap: 14px; }
  .mu-art { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) { .mu { animation: none; } }

/* ---- Files, phase C (T2W ADR-104): share links, the past, uploads in pieces, a guest's page.
   No blur anywhere here: plain surfaces on the page's own dark. */
.fb-snapbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin: -2px 0 12px;
  padding: 8px 8px 8px 14px; border-radius: 12px; background: rgba(255, 214, 10, .09); border: 1px solid rgba(255, 214, 10, .26);
  color: #ffe27a; font-size: 13px; }
.fb-snapbar .pillbtn { padding: 5px 12px; }
.fb-form { display: flex; flex-direction: column; gap: 10px; }
.fb-seg { margin: 0; }
.fb-seg button { padding: 8px 0; font-size: 13px; }
.fb-seg button:disabled { opacity: .35; }
.fb-field { display: grid; grid-template-columns: 60px minmax(0, 1fr); align-items: center; gap: 10px; color: var(--muted); font-size: 13.5px; }
.fb-field .fb-input { padding: 8px 12px; font-size: 15px; }
select.fb-input { appearance: none; -webkit-appearance: none; padding-right: 34px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d1d1d6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 12px, rgba(255, 255, 255, .07); }
select.fb-input option { background: #1c1c1e; }
.fb-err { color: #ff6961; }
.fb-mtext.small { font-size: 12.5px; }
.fb-k { margin-top: 4px; color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.fb-urlrow { display: flex; gap: 8px; }
.fb-url { flex: 1; min-width: 0; padding: 8px 12px; font: 13px/1.3 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.fb-lnk, .fb-vers { display: flex; flex-direction: column; gap: 6px; }
.fb-lrow { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 14px; border-radius: 12px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.fb-lrow.ended { opacity: .55; }
.fb-lt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fb-lt b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-lt span { color: var(--muted); font-size: 12.5px; }
.fb-lrow .pillbtn { flex: none; padding: 6px 12px; }
@media (max-width: 560px) { .fb-lrow { flex-wrap: wrap; } .fb-lt { flex-basis: 100%; } }
.fb-task .fb-tp { grid-column: 2; grid-row: 1 / span 2; padding: 5px 11px; font-size: 12px; }
.fb-task:has(.fb-tp:not([hidden])) { grid-template-columns: minmax(0, 1fr) auto auto; }
.fb-task:has(.fb-tp:not([hidden])) .fb-tx { grid-column: 3; }
#fb-sort.gone { display: none; }
.fb-dropbox { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 48px 16px; border: 2px dashed rgba(255, 255, 255, .2);
  border-radius: 20px; color: var(--muted); text-align: center; }
.fb-dropbox b { color: var(--text); font-size: 19px; font-weight: 650; }
/* Settings: a person's folders as a tree */
.st-tree .st-list { max-height: 460px; overflow-y: auto; }
.st-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; margin: 0 6px 8px; }
button.st-crumb { padding: 3px 8px; border: 0; border-radius: 8px; background: none; box-shadow: none; color: #0a84ff; font-size: 13.5px; font-weight: 560; }
button.st-crumb:last-child { color: var(--text); }
button.st-crumb:hover:not(:disabled) { background: rgba(10, 132, 255, .12); }
button.st-crumb:active:not(:disabled) { transform: none; }
.st-sep { color: var(--muted); opacity: .5; }
button.st-name, button.st-jump { width: auto; max-width: 100%; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
  color: var(--text); text-align: left; cursor: pointer; }
button.st-name:hover:not(:disabled) { background: none; color: #64d2ff; }
button.st-name:active:not(:disabled) { transform: none; }
.st-tfolder.off .st-ic { background: rgba(255, 255, 255, .07); color: var(--muted); }
.st-tfolder.here { background: rgba(10, 132, 255, .06); }
button.st-go { flex: none; display: grid; place-items: center; width: 30px; height: 30px; margin-right: -6px; padding: 0; border: 0; border-radius: 50%;
  background: none; box-shadow: none; color: rgba(255, 255, 255, .35); }
button.st-go:hover:not(:disabled) { background: rgba(255, 255, 255, .08); color: var(--text); }
.st-go svg.i { width: 15px; height: 15px; stroke-width: 2.6; }
.st-none { justify-content: center; color: var(--muted); font-size: 13.5px; }
@media (max-width: 640px) {
  .st-tfolder { flex-wrap: wrap; }
  .st-tfolder .st-t { flex: 1 1 calc(100% - 90px); }
  .st-tfolder .st-select { margin-left: 42px; }
}
/* Settings: what happened */
#card-activity .card-head { align-items: center; }
.act-chips { flex: 1; justify-content: flex-start; gap: 6px; margin: 0 4px 12px; }
.act-chips .fb-chip { padding: 5px 12px; font-size: 12.5px; }
.fb-chip.on, .fb-chip.on:hover:not(:disabled) { background: #f5f5f7; color: #0a0a0c; border-color: #f5f5f7; }
.act-list { max-height: 560px; overflow-y: auto; }
.act-row { align-items: flex-start; }
.act-face { flex: none; display: grid; padding-top: 1px; }
.act-guest { background: rgba(255, 255, 255, .1); color: var(--muted); }
.act-guest svg.i { width: 15px; height: 15px; }
.act-row .st-when { padding-top: 2px; font-size: 12px; }
#act-more:not(:empty) { margin-top: 10px; }
@media (max-width: 640px) {
  .act-row .st-when { display: block; }
  .act-chips { order: 3; flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; margin: 0 0 12px; scrollbar-width: none; }
  .act-chips .fb-chip { flex: none; }
}

/* Dropdowns of our own (T2W ADR-159, ui/dropdown.js): the <select> hidden, a button drawn like it, this list -- the same
   in Chromium and Firefox (Chromium on Linux drew the native list grey on white). */
.dd-native { display: none !important; }
.dd-btn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.dd-btn[aria-expanded="true"] { box-shadow: 0 0 0 2px rgba(255, 255, 255, .22); }
.dd-list { position: fixed; z-index: 2147483000; min-width: 140px; max-width: min(380px, calc(100vw - 16px)); overflow-y: auto;
  overscroll-behavior: contain; padding: 5px; border-radius: 14px; background: #1c1c1f; border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55); color: var(--text); font-size: 14px;
  opacity: 0; transform: translateY(-4px); transition: opacity .14s ease, transform .2s cubic-bezier(.2, .8, .2, 1); }
.dd-list.up { transform: translateY(4px); }
.dd-list.in { opacity: 1; transform: none; }
.dd-head { padding: 9px 10px 4px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.dd-opt { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 36px; padding: 7px 12px 7px 8px; border: 0; border-radius: 9px;
  background: none; box-shadow: none; color: var(--text); font: inherit; text-align: left; white-space: nowrap; cursor: pointer; transform: none; }
.dd-opt span { overflow: hidden; text-overflow: ellipsis; }
.dd-opt:hover:not(:disabled), .dd-opt:focus-visible { background: rgba(255, 255, 255, .09); outline: none; }
.dd-opt:active:not(:disabled) { transform: none; background: rgba(255, 255, 255, .13); }
.dd-opt:disabled { opacity: .4; cursor: default; }
.dd-opt.on { font-weight: 600; }
.dd-tick { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.dd-opt.on .dd-tick { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .dd-list { transition: none; transform: none; } }
.dd-btn.fb-input { padding-right: 34px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d1d1d6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 12px, rgba(255, 255, 255, .07); }
.dd-btn:hover:not(:disabled) { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d1d1d6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center / 12px, rgba(255, 255, 255, .15); }   /* not button:hover's: it would drop the arrow */
.dd-btn:active:not(:disabled) { transform: scale(.97); }
