:root {
  --bg: #0B0F17;
  --card: #151B27;
  --line: rgba(255, 255, 255, 0.08);
  --text: #FFFFFF;
  --dim: rgba(255, 255, 255, 0.6);
  --faint: rgba(255, 255, 255, 0.35);
  --accent: #34C759;
  --warn: #FFB4A8;
  /* Chart series (the data-viz palette's dark steps, validated against --card) and status colours. */
  --series-1: #3987e5;
  --series-2: #d95926;
  --good: #0ca30c;
  --bad: #d03b3b;
  --busy: #fab219;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
  min-height: 100dvh;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* Linking */
.link-box { max-width: 420px; margin: 12vh auto 0; text-align: center; }
.logo { width: 72px; height: 72px; margin: 0 auto 16px; display: block; }
.link-box h1 { margin: 0 0 8px; font-size: 28px; }
.lead { margin: 0 0 6px; font-size: 18px; }
.hint { margin: 0 0 24px; color: var(--dim); font-size: 15px; }
#link-form { display: flex; gap: 10px; }
#code { flex: 1; min-width: 0; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card);
  font-size: 26px; letter-spacing: 6px; text-align: center; }
.primary { padding: 0 20px; border-radius: 14px; background: var(--text); color: var(--bg); font-weight: 600; }
.primary:disabled { opacity: 0.5; }
.error { color: var(--warn); min-height: 1.4em; }
#login-form, #invite-form { display: flex; flex-direction: column; gap: 10px; text-align: left; }
#login-email, #invite-email { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
#login-go, #invite-go { min-height: 48px; }
.login-state { color: var(--dim); font-size: 15px; margin: 12px 0 0; }
.login-state strong { color: var(--text); }
.login-code { letter-spacing: 3px; font-size: 18px; }
.or { margin: 24px 0 6px; font-size: 15px; font-weight: 600; }
.google { display: flex; justify-content: center; min-height: 44px; margin: 4px 0 6px; }
.fb { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; max-width: 360px; height: 40px; border-radius: 20px;
  background: #1877F2; color: #fff; font-weight: 600; font-size: 15px; }
.fb:disabled { opacity: .6; }
.or-email { color: var(--dim); font-size: 14px; margin: 10px 0 10px; }
.pair-code { font-size: 44px; font-weight: 700; letter-spacing: 6px; text-align: center; margin: 8px 0 12px; }
.invite { display: flex; align-items: flex-start; gap: 8px; padding: 12px 2px; border-top: 1px solid var(--line); }
.invite .what { flex: 1; min-width: 0; }
.invite.gone .who { color: var(--dim); font-weight: 400; }
.invite .when.warn { color: var(--warn); }
.device { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-top: 1px solid var(--line); }
.device .icon { font-size: 22px; }
.device .what { flex: 1; min-width: 0; }
.device .who { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device .me { color: var(--dim); font-weight: 400; }
.device .when { color: var(--dim); font-size: 13px; margin-top: 2px; }
.device button { padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,0.08); font-size: 14px; font-weight: 600; }
.invite .who { font-weight: 600; overflow-wrap: anywhere; }
#invite-form label { font-size: 14px; font-weight: 600; margin-bottom: -4px; }
.invite .when { color: var(--dim); font-size: 13px; margin-top: 2px; }
.invite .row { display: flex; gap: 18px; margin-top: 4px; flex-wrap: wrap; }
/* Text actions, not buttons: the invite is sent already, these are only for when it needs another push. 44 px to tap. */
.invite .row button { padding: 12px 0; margin: -6px 0; min-height: 44px; color: var(--accent, var(--text)); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.invite .row button:disabled { color: var(--dim); text-decoration: none; }
.invite .x { width: 44px; height: 44px; margin: -8px -8px 0 0; color: var(--dim); font-size: 16px; flex: none; }

/* Main */
header { display: flex; align-items: center; gap: 10px; padding: 14px 0 12px; }
header h1 { flex: 1 0 auto; margin: 0; font-size: 22px; white-space: nowrap; }
/* The TV's name gives way first on a narrow phone. */
header .chip { flex: 0 1 auto; min-width: 0; }
.chip { padding: 6px 12px; border-radius: 16px; background: var(--card); color: var(--dim); font-size: 14px; max-width: 40vw;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 36px; height: 36px; border-radius: 50%; font-weight: 700; display: grid; place-items: center; flex: none; }
.round { width: 36px; height: 36px; border-radius: 50%; background: var(--card); color: var(--dim); display: grid; place-items: center; flex: none; }
.volume { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.volume button { height: 76px; border-radius: 16px; background: rgba(255,255,255,0.08); font-size: 34px; font-weight: 300;
  display: grid; place-items: center; touch-action: manipulation; }
.volume button:active { background: rgba(255,255,255,0.22); }
/* The remote: a round pad (arrows around OK), then Back, Home and Play/Pause, then the volume. */
.dpad { position: relative; width: 248px; height: 248px; margin: 6px auto 18px; border-radius: 50%; background: rgba(255,255,255,0.06); }
.dpad button { position: absolute; display: grid; place-items: center; touch-action: manipulation; border-radius: 50%; }
.dpad button:active { background: rgba(255,255,255,0.18); }
.dpad .up, .dpad .down { left: 84px; width: 80px; height: 80px; }
.dpad .up { top: 2px; } .dpad .down { bottom: 2px; }
.dpad .left, .dpad .right { top: 84px; width: 80px; height: 80px; }
.dpad .left { left: 2px; } .dpad .right { right: 2px; }
.dpad .ok { left: 79px; top: 79px; width: 90px; height: 90px; background: rgba(255,255,255,0.14); font-size: 20px; font-weight: 700; }
.dpad .ok:active { background: rgba(255,255,255,0.3); }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 12px; }
.keys button { height: 56px; border-radius: 16px; background: rgba(255,255,255,0.08); display: grid; place-items: center; touch-action: manipulation; }
.keys button:active { background: rgba(255,255,255,0.22); }
.avatar.emoji { font-size: 21px; font-weight: 400; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
#search-form { display: flex; gap: 8px; position: sticky; top: 0; padding: 4px 0 10px; background: var(--bg); z-index: 2; }
#q { flex: 1; min-width: 0; padding: 12px 16px; border-radius: 22px; border: 1px solid var(--line); background: var(--card); font-size: 17px; }
.mic { width: 46px; height: 46px; border-radius: 50%; background: var(--card); display: grid; place-items: center; flex: none; }
.lang { width: 46px; height: 46px; border-radius: 50%; background: var(--card); font-size: 14px; font-weight: 700; flex: none; }
.mic.on { background: #E5484D; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: 0.6; } }
.status { color: var(--dim); font-size: 14px; margin: 2px 0 10px; min-height: 1.2em; }

h2.row { font-size: 17px; margin: 18px 0 8px; }
.item { display: flex; gap: 12px; align-items: center; width: 100%; padding: 8px 0; text-align: left; border-bottom: 1px solid var(--line); }
.item img, .item .noimg { width: 56px; height: 84px; border-radius: 8px; object-fit: cover; background: var(--card); flex: none; }
.item .meta { min-width: 0; }
.item .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .sub { color: var(--dim); font-size: 14px; }
.dots { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.dot { font-size: 12px; color: var(--dim); display: inline-flex; align-items: center; gap: 4px; }
.dot i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.strip { display: flex; gap: 10px; overflow-x: auto; padding: 2px 0 8px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
/* Tiles are buttons, which centre their content: stretched to a taller neighbour (a title on 2 lines), the poster would drop. */
.tile { flex: none; width: 104px; text-align: left; scroll-snap-align: start; align-self: flex-start; }
.tile img, .tile .noimg { width: 104px; height: 156px; border-radius: 8px; object-fit: cover; background: var(--card); display: block; }
.tile span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; color: var(--dim); margin-top: 5px; }
.hint { color: var(--faint); font-size: 13px; margin: 10px 2px; }
.hint.history { margin: 2px 2px 8px; }
.hint.history:empty { display: none; }
h4.similar { margin: 20px 0 8px; font-size: 15px; }
/* Every state of the similar strip is the same height (see similarHtml): the sheet must not grow under the finger. */
#similar .strip { height: 214px; box-sizing: border-box; }
#similar .tile span { height: 2.6em; }
#similar .strip.none { align-items: center; }
.tile.ghost .noimg { animation: ghost 1.2s ease-in-out infinite alternate; }
@keyframes ghost { from { opacity: 0.5; } to { opacity: 1; } }
.why { color: #F5C26B !important; font-weight: 600; }
.empty { color: var(--dim); padding: 24px 0; text-align: center; }

/* Sheets */
.sheet { position: fixed; inset: 0; z-index: 10; display: flex; align-items: flex-end; justify-content: center; }
.sheet-back { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); }
.sheet-card { position: relative; width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; background: var(--card);
  border-radius: 20px 20px 0 0; padding: 0 0 calc(20px + env(safe-area-inset-bottom)); }
.sheet-card.small { padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
.sheet-card h2 { margin: 0 0 12px; font-size: 18px; }
.close { position: absolute; top: 10px; right: 10px; z-index: 1; width: 34px; height: 34px; border-radius: 50%; background: rgba(0,0,0,0.5); }
.hero { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--bg); }
.sheet-inner { padding: 14px 16px 0; }
.sheet-inner h3 { margin: 0 0 4px; font-size: 22px; }
.sheet-inner .sub { color: var(--dim); font-size: 14px; margin-bottom: 10px; }
.sheet-inner p { margin: 0 0 14px; color: rgba(255,255,255,0.85); font-size: 15px; }

/* The title sheet's actions (showSheet): what to watch on first, then one strip of equal cells, then the synopsis. */
/* The primary button: 52 px, full width. Filled in the service's colour, darkened so white text reads on all five (Prime's light
   blue and Apple's grey fail it as they are); the first background is for a browser without color-mix. */
.sheet .go { display: flex; align-items: center; gap: 10px; width: 100%; height: 52px; padding: 0 16px; margin: 0 0 8px; border-radius: 14px;
  font-size: 16px; font-weight: 700; text-align: left; color: #fff; background: var(--svc, #3a4256);
  background: color-mix(in srgb, var(--svc, #3a4256) 62%, #000); }
.sheet .go-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet .go small { flex: none; font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.82); }
.sheet .go small.leaves { color: #FFD98A; }
/* The stores, quiet: an outline and the service's colour as a dot, so the filled colour only ever means « watch it now ». */
.sheet .go.quiet { height: 46px; font-size: 15px; font-weight: 600; color: var(--text); background: none; border: 1px solid rgba(255,255,255,0.22); }
.sheet .svc-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--svc); }
/* « M'avertir »: the accent's own fill (dark text: white fails on this green); once followed, a tint with the accent's edge. */
.sheet .go.follow { justify-content: center; color: var(--bg); background: var(--accent); }
.sheet .go.follow.on { color: var(--accent); background: rgba(52,199,89,0.16); box-shadow: inset 0 0 0 1.5px var(--accent); }
.sheet .none { margin: 0 0 10px; color: var(--dim); font-size: 15px; }
.sheet .follow-note { margin: -2px 2px 12px; }
/* The action strip: equal cells (flex 1 1 0, min-width 0), 44 px, the icon over one word. Not .strip: that's the posters' row. */
.sheet .actbar { display: flex; gap: 5px; margin: 4px 0 16px; }
.sheet .cell { flex: 1 1 0; min-width: 0; height: 44px; padding: 0; border-radius: 12px; background: rgba(255,255,255,0.07);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--dim); }
.sheet .cell svg { display: block; flex: none; }
.sheet .cell span { max-width: 100%; font-size: 11px; line-height: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* On (liked, disliked, in the list): the accent's tint and a filled icon, never a white button. */
/* Seven cells (with Quiz, Suggest and TV): « Pas aimé » and « Suggérer » were cut by 2–3 px at 390 px. */
.sheet .actbar:has(> .cell:nth-child(7 of .cell)) { gap: 4px; }
.sheet .actbar:has(> .cell:nth-child(7 of .cell)) .cell span { font-size: 10.5px; letter-spacing: -0.1px; }
.sheet .cell.on { color: var(--accent); background: rgba(52,199,89,0.16); box-shadow: inset 0 0 0 1px rgba(52,199,89,0.55); }
/* The synopsis comes after the actions: three lines, the rest when opened (the bio's pattern, on the person page). */
.sheet .synopsis { margin: 0 0 12px; }
.sheet .syn-text { margin: 0; font-size: 15px; line-height: 1.5; color: rgba(255,255,255,0.88); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sheet .synopsis.open .syn-text { display: block; }
.sheet .syn-more { margin-top: 4px; padding: 4px 0; font-size: 14px; font-weight: 600; color: var(--dim); background: none; }
.choice { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 4px; border-radius: 10px; text-align: left; }
.choice.on { background: rgba(255,255,255,0.08); }
.choice small { color: var(--dim); margin-left: auto; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); opacity: 0;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 20px; font-weight: 600; transition: 0.2s; z-index: 20;
  /* max-content: with left: 50% the box would otherwise only get half the width and wrap a short sentence over three lines. */
  width: max-content; max-width: calc(100vw - 32px); text-align: center; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%); }

.why { color: rgba(255,255,255,0.85); font-size: 14px; margin-top: 2px; }
.spinner { width: 34px; height: 34px; margin: 40px auto; border-radius: 50%; border: 3px solid rgba(255,255,255,0.15);
  border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* "Quitte bientôt": a warm band, on list items and on posters. */
.leave { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 6px; background: #C2410C; color: #fff; font-size: 12px; font-weight: 700; }
.tile .pic { position: relative; }
/* A person's titles not on the household's services (TMDB): under their own heading, not to open. */
.rest-head { margin-top: 18px; }
.not-offered { color: #D4D4D8; font-weight: 600; }
.rest-note { color: var(--dim); font-size: 13px; margin: -4px 0 10px; }
.tile.rest small { display: block; color: var(--dim); font-size: 11px; opacity: 0.8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leave.on { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; border-radius: 0 0 8px 8px; text-align: center; font-size: 11px; padding: 3px 2px; }
.leave-note { display: block; color: #FDBA74; font-weight: 700; font-size: 12px; }

/* The cast: one line of names that scrolls sideways. Its height holds a chip of two lines (name + role, ~46 px). */
.cast { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; height: 62px; box-sizing: border-box; -webkit-overflow-scrolling: touch; }
.person-chip { flex: none; display: flex; flex-direction: column; justify-content: center; padding: 6px 12px; border-radius: 12px; background: rgba(255,255,255,0.08); font-weight: 600; font-size: 14px; text-align: left; white-space: nowrap; line-height: 1.3; }
.person-chip small { color: var(--dim); font-weight: 400; font-size: 12px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
/* People a search names, above its titles: a round portrait beside each name. */
.faces { margin-bottom: 4px; }
.face-chip { flex-direction: row; align-items: center; gap: 9px; padding: 4px 14px 4px 4px; border-radius: 26px; }
.face-chip img, .face-chip .initial { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: top; background: #1B2232; }
.face-chip .initial { display: flex; align-items: center; justify-content: center; color: var(--dim); font-weight: 700; }
.person-chip.ghost { width: 96px; animation: ghost 1.2s ease-in-out infinite alternate; }

/* A person's page. */
.person { padding-top: 18px; padding-bottom: 20px; }
.person-head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.portrait { width: 96px; height: 136px; border-radius: 12px; object-fit: cover; flex: none; background: var(--card); }
.portrait.none { display: flex; align-items: center; justify-content: center; font-size: 40px; font-weight: 700; background: rgba(255,255,255,0.08); }
.person .grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px; }   /* minmax(0, …): a long role line must not stretch a column */
.rest-more { display: block; width: 100%; margin: 14px 0 4px; padding: 11px; border-radius: 12px; background: var(--card); color: var(--text); font-size: 14px; font-weight: 600; }
/* The bio: four lines, the rest (and its source) when opened. */
.bio { margin: -4px 0 16px; }
.bio-text { font-size: 15px; line-height: 1.5; color: rgba(255,255,255,0.88); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.bio-text p { margin: 0 0 10px; }
.bio.open .bio-text { display: block; }
.bio-source { display: none; margin: 4px 0 0; font-size: 12px; color: var(--dim); }
.bio.open .bio-source { display: block; }
.bio-more { margin-top: 6px; padding: 0; font-size: 14px; font-weight: 600; color: var(--dim); background: none; }
/* Movies or shows, and the order, over the posters. */
.view-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-items: center; }
.view-chip { padding: 6px 12px; border-radius: 16px; background: var(--card); color: var(--dim); font-size: 14px; font-weight: 600; border: 1px solid transparent; }
.view-chip.on { color: #fff; border-color: rgba(255,255,255,0.6); }
.view-gap { width: 6px; }
.person .grid .tile { width: auto; }
.person .grid .tile img, .person .grid .tile .noimg { width: 100%; height: auto; aspect-ratio: 2 / 3; }

/* Trailers: playing, the video takes the picture's place, with a text link under it to send it to the TV instead. */
.sheet .trailer-tv { display: block; padding: 10px 16px 0; font-size: 14px; font-weight: 600; color: var(--dim); text-decoration: underline; text-underline-offset: 3px; }
.hero.video { position: relative; margin-top: 50px; }   /* a strip above the player for the sheet's ✕: on the video it covered YouTube's gear */
.hero.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Alerts: a followed title became included or cheaper. */
.alert-why, .alert-line { color: #86EFAC !important; font-weight: 600; font-size: 14px; margin-top: 2px; }
.follow-note { margin: 6px 2px 0; min-height: 2.6em; }

/* Recovery email */
.email-state { color: var(--dim); font-size: 15px; margin: 4px 2px 14px; }
.email-state strong { color: var(--text); font-weight: 600; }
#email-form { display: flex; flex-direction: column; gap: 10px; }
#email { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
#email-send { min-height: 48px; }
.plain { background: none; border: 0; color: var(--dim); font: inherit; font-size: 14px; padding: 8px 2px; text-decoration: underline; }

/* A person's photos: a wall over their page, then one over the whole screen. */
.pill { margin-top: 2px; padding: 8px 14px; border-radius: 18px; background: rgba(255,255,255,0.1); font-weight: 600; font-size: 14px; }
.photos { position: fixed; inset: 0; z-index: 12; overflow-y: auto; background: var(--bg); padding: 0 12px calc(20px + env(safe-area-inset-bottom)); }
.photos header { display: block; position: sticky; top: 0; z-index: 1; background: var(--bg); padding: calc(16px + env(safe-area-inset-top)) 44px 10px 4px; }
.photos header h2 { margin: 0; font-size: 20px; }
.photos header .sub { margin: 4px 0 0; color: var(--dim); font-size: 13px; }
.photos header .close { top: calc(12px + env(safe-area-inset-top)); right: 0; }
.wall { display: flex; flex-wrap: wrap; gap: 6px; }
.wall button { height: 120px; padding: 0; border-radius: 8px; overflow: hidden; background: var(--card); }
.wall img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Keeps the last row from stretching its few photos across the whole width. */
.wall i { flex-grow: 10; }
.viewer { position: fixed; inset: 0; z-index: 14; background: #000; display: flex; align-items: center; justify-content: center; touch-action: pan-y; }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer .close { top: calc(12px + env(safe-area-inset-top)); right: 12px; }
.viewer .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 64px; font-size: 32px; color: rgba(255,255,255,0.8); background: rgba(0,0,0,0.3); border-radius: 10px; }
.viewer .prev { left: 6px; } .viewer .next { right: 6px; }
.viewer p { position: absolute; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); margin: 0; text-align: center;
  font-size: 12px; color: rgba(255,255,255,0.7); text-shadow: 0 0 6px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Server status */
.server .st-ranges { display: inline-flex; gap: 4px; margin-top: 10px; padding: 3px; border-radius: 12px; background: var(--card); }
.st-ranges button { padding: 6px 14px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--dim); }
.st-ranges button.on { background: rgba(255,255,255,0.12); color: var(--text); }
.server .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.server .dot.good { background: var(--good); } .server .dot.bad { background: var(--bad); }
.st-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 12px; }
.st-tile { padding: 12px; border-radius: 14px; background: var(--card); min-width: 0; }
.st-label { font-size: 12px; color: var(--dim); }
.st-value { font-size: 18px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-sub { font-size: 12px; color: var(--dim); margin-top: 4px; overflow-wrap: anywhere; }   /* wraps: « serveur relancé il y a 17 h 3 min » was cut at 390 px */
.st-bar { height: 4px; border-radius: 2px; background: rgba(255,255,255,0.1); margin-top: 8px; overflow: hidden; }
.st-bar i { display: block; height: 100%; border-radius: 2px; background: var(--series-1); }
.st-card { position: relative; padding: 12px 12px 6px; border-radius: 14px; background: var(--card); margin-bottom: 8px; }
.st-card h3 { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.st-chart { position: relative; }
.st-chart svg { display: block; touch-action: pan-y; overflow: visible; }
.st-grid { stroke: rgba(255,255,255,0.08); stroke-width: 1; }
.st-axis { fill: var(--faint); font-size: 10px; font-variant-numeric: tabular-nums; }
.st-cross line { stroke: rgba(255,255,255,0.4); stroke-width: 1; }
.st-cross circle { stroke: var(--card); stroke-width: 2; }
.st-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--dim); margin-bottom: 4px; }
.st-legend i, .st-tip i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: 3px; }
.st-legend b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.st-tip { position: absolute; top: -6px; padding: 6px 9px; border-radius: 9px; background: #222a3a; font-size: 12px; pointer-events: none;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4); white-space: nowrap; font-variant-numeric: tabular-nums; }
.st-tip-t { color: var(--dim); margin-bottom: 2px; }
.st-h { font-size: 16px; margin: 20px 0 8px; }
.st-list { display: grid; gap: 6px; }
.st-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--card); }
.st-main { display: flex; flex-direction: column; min-width: 0; }
.st-main b { font-size: 14px; }
.st-main small { font-size: 12px; color: var(--dim); }
.st-main small.err { color: var(--warn); overflow-wrap: anywhere; }
.st-alerts .st-row { box-shadow: inset 0 0 0 1px var(--bad); }
.st-badge { flex: none; width: 92px; font-size: 12px; font-weight: 600; padding-top: 1px; }
.st-badge.good { color: var(--good); } .st-badge.bad { color: var(--bad); } .st-badge.run { color: var(--busy); } .st-badge.idle { color: var(--faint); }
.st-note { margin: -4px 2px 8px; color: var(--dim); font-size: 12px; }
.server .cat-row .st-add { color: var(--good); } .server .cat-row .st-gone { color: var(--warn); }
.st-counts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.st-counts div { display: flex; flex-direction: column; padding: 9px 12px; border-radius: 12px; background: var(--card); min-width: 0; }
.st-counts span { font-size: 12px; color: var(--dim); }
.st-counts b { font-size: 15px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.st-counts.host { grid-template-columns: 1fr; }
.st-counts.host div { flex-direction: row; justify-content: space-between; gap: 12px; }
.st-counts.host b { text-align: right; font-size: 13px; font-weight: 500; }
.st-paths { display: grid; gap: 4px; }
.st-path { position: relative; display: flex; align-items: baseline; gap: 10px; padding: 7px 10px; border-radius: 9px; background: var(--card); overflow: hidden; font-size: 13px; }
.st-path span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-path b { font-variant-numeric: tabular-nums; }
.st-path small { width: 56px; text-align: right; color: var(--dim); font-variant-numeric: tabular-nums; }
.st-path i { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--series-1); opacity: 0.7; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; }

/* Credits and licences (status.js): TMDB's logo leads its row; licences on the right. */
.server .cr-tmdb img { height: 14px; display: block; margin: 2px 0 6px; }
.server .cr-sub { color: var(--dim); font-size: 13px; font-weight: 600; margin: 12px 4px 6px; }
.server .cr-licence { flex: none; color: var(--dim); font-size: 12px; margin-left: 10px; text-align: right; }

/* "Votre 2026" (year.js): over the page, under the title sheet (10) so a title opens above it. */
.photos.year { z-index: 9; }
.year .yr-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 4px; }
.year .yr-card { padding: 14px 14px 12px; border-radius: 16px; background: var(--card); min-width: 0; }
.year .yr-card.wide { padding: 10px 8px 6px; }
.year .yr-n { font-size: 34px; font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; white-space: nowrap; }
.year .yr-l { font-size: 13px; color: var(--dim); margin-top: 4px; }
.year .yr-s { font-size: 11px; color: var(--faint); margin-top: 6px; line-height: 1.3; }
.year .yr-block { margin-top: 20px; }
.year .yr-block h3 { margin: 0 0 8px 2px; font-size: 16px; }
.year .yr-chart svg { display: block; touch-action: pan-y; }
.year .yr-caption { margin: 2px 6px 4px; font-size: 13px; color: var(--dim); min-height: 1.3em; }
.year .yr-stack { display: flex; height: 18px; border-radius: 9px; overflow: hidden; gap: 2px; background: var(--card); }
.year .yr-stack i { display: block; min-width: 4px; }
.year .yr-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 13px; color: var(--dim); }
.year .yr-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.year .yr-legend b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.year .yr-note { margin: 8px 2px 0; font-size: 12px; color: var(--faint); }
.year .tile em { display: block; font-style: normal; font-size: 11px; font-weight: 600; color: #F5C26B; margin-top: 6px; line-height: 1.25; }
.year .tile em + span { margin-top: 2px; }
.year .yr-row { display: flex; gap: 10px; align-items: baseline; padding: 8px 2px; border-top: 1px solid var(--line); }
.year .yr-row > span { flex: none; width: 92px; font-size: 13px; color: var(--dim); }
.year .yr-row > div { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.year .yr-chip { padding: 5px 11px; border-radius: 16px; background: rgba(255,255,255,0.09); font-size: 14px; }
.year .yr-chip b { color: var(--dim); font-weight: 600; margin-left: 3px; }
.year button.yr-chip { font-weight: 500; }
.year .yr-kinds { font-size: 14px; color: var(--dim); }
.year .yr-line { margin: 0 2px 8px; font-size: 14px; color: var(--dim); }
.year .yr-share { display: block; width: 100%; min-height: 48px; margin-top: 24px; }
.year .yr-empty { text-align: center; padding: 18vh 12px 0; }
.year .yr-big { font-size: 64px; }
/* Friday email and calendar, under the recovery email (app.js: extrasBuild) */
.account-extra { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.account-extra h3 { margin: 0 0 4px; font-size: 17px; }
.digest-switch { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.digest-switch input { width: 22px; height: 22px; flex: none; accent-color: var(--accent); }
#cal-create, #cal-copy, #cal-open { min-height: 48px; display: flex; align-items: center; justify-content: center; width: 100%; text-decoration: none; }
#cal-url { width: 100%; padding: 12px 14px; margin: 0 0 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); font-size: 13px; }
.cal-actions { display: flex; flex-direction: column; gap: 10px; }

/* An invite's ✕ asks before it acts: the first tap turns it into a word, the second cancels the invite. */
button.x.armed { width: auto; padding: 0 10px; font-size: 13px; font-weight: 600; color: #ff6b6b; border-radius: 14px; }
