/* Tarboosh: the wixct layout (Collections+ / SubSyncer: brand | divider | name,
   round tools, big centred headline, rounded cards with wells inside, pill
   buttons) in two colours: white (or near-black) and Turkish red. */
:root,
:root[data-theme="light"]{
  color-scheme:light;
  /* 2.21.4 (owner: "two colours like Collections+"): white and red; the surfaces are neutral, red is the one accent */
  --bg:#ffffff; --surface:#ffffff; --well:#f4f4f5; --raised:#ffffff;
  --border:#e6e6e8; --line:#d3d3d7; --hover:rgba(0,0,0,.05);
  --text:#151515; --dim:#48484d; --faint:#6b6b70;
  --accent:#c8102e; --accent-ink:#a10c25; --accent-soft:rgba(200,16,46,.09); --on-accent:#fff;
  --fez:#c8102e; --fez-dark:#a10c25; --tassel:#151515;
  --ok:#247b50; --header-frost:rgba(255,255,255,.86);
  --glow-a:rgba(200,16,46,.30); --glow-b:rgba(200,16,46,.30); --glow-c:rgba(200,16,46,.08);
}
:root[data-theme="dark"]{
  color-scheme:dark;
  /* 2.21.6 (owner): the old dark red back, with a red glow as on Collections+ */
  --bg:#1b0c0e; --surface:#241315; --well:#2f181b; --raised:#2a1518;
  --border:#3a1f23; --line:#57323a; --hover:rgba(255,200,205,.07);
  --text:#fbeceb; --dim:#d6b0b4; --faint:#bb9195;
  --accent:#d61f3a; --accent-ink:#ff8193; --accent-soft:rgba(214,31,58,.16); --on-accent:#fff;
  --fez:#d61f3a; --fez-dark:#a8122b; --tassel:#f1d3d6;
  --ok:#3fc07a; --header-frost:rgba(27,12,14,.86);
  --glow-a:rgba(214,31,58,.20); --glow-b:rgba(214,31,58,.20); --glow-c:rgba(214,31,58,.05);
}
:root{
  --font:'Space Grotesk','Helvetica Neue',Arial,sans-serif;
  --font-ar:'IBM Plex Sans Arabic','Space Grotesk',Tahoma,sans-serif;
  --ease-out:cubic-bezier(.22,1,.36,1);
  --radius:clamp(14px,1.8vmin,22px);
  --gutter:clamp(16px,3.4vmin,56px);
}
:root[lang="ar"]{ --font:var(--font-ar); }

*{ box-sizing:border-box; }
html,body{ margin:0; background:var(--bg); color:var(--text); font-family:var(--font); -webkit-font-smoothing:antialiased; }
body{ min-height:100vh; min-height:100dvh; overflow-x:hidden; background:transparent; }
/* 2.21.6: the page's glow, as on Collections+ (red where it is orange) */
.glow{ position:fixed; inset:0; z-index:-1; pointer-events:none;
  background:radial-gradient(60vmax 45vmax at 12% 16%, var(--glow-a), transparent 60%),
    radial-gradient(55vmax 45vmax at 90% 88%, var(--glow-b), transparent 60%),
    radial-gradient(40vmax 30vmax at 55% 55%, var(--glow-c), transparent 60%); }
body, .site-header, .card, .box, .btn{ transition:background-color .35s ease, color .35s ease, border-color .35s ease; }
a{ color:inherit; }
svg{ fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
.sr{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

/* ---------- header (as Collections+) ---------- */
.site-header{
  position:fixed; top:0; left:0; right:0; z-index:20;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding-top:calc(clamp(12px,2.6vmin,34px) + env(safe-area-inset-top,0px));
  padding-bottom:clamp(10px,1.6vmin,18px);
  padding-inline:var(--gutter);
  transition:background-color .25s ease;
}
.site-header.scrolled{ background:var(--bg); box-shadow:0 1px 0 var(--border); }
.brand{ display:inline-flex; align-items:center; gap:clamp(10px,1.8vmin,20px); color:var(--text); text-decoration:none; min-width:0; }
.brand .mark{ width:clamp(30px,4.2vmin,46px); height:clamp(30px,4.2vmin,46px); flex-shrink:0; display:block; transition:transform .35s var(--ease-out); }
@media (hover:hover){ .brand:hover .mark{ transform:rotate(-8deg); } }
.brand .div{ width:1px; height:clamp(22px,3.4vmin,40px); background:var(--line); }
.brand .name{ font-family:'Space Grotesk',sans-serif; font-size:clamp(17px,2.6vmin,30px); font-weight:600; letter-spacing:.01em; white-space:nowrap; }

.tools{ display:flex; align-items:center; gap:4px; }
.tool{ position:relative; display:inline-grid; place-items:center; width:44px; height:44px; padding:0; border:0; border-radius:999px;
  background:transparent; color:var(--text); cursor:pointer; overflow:hidden; text-decoration:none;
  transition:background-color .2s ease, transform 160ms var(--ease-out); -webkit-tap-highlight-color:transparent; }
.tool:active{ transform:scale(.94); }
@media (hover:hover) and (pointer:fine){ .tool:hover{ background:var(--hover); } }
.tool .ic{ grid-area:1/1; display:grid; place-items:center; transition:transform 300ms var(--ease-out), opacity 200ms ease; }
.tool svg{ width:20px; height:20px; }
:root[data-theme="dark"] #theme .moon{ opacity:0; transform:rotate(-90deg) scale(.6); }
:root[data-theme="light"] #theme .sun{ opacity:0; transform:rotate(90deg) scale(.6); }
.kofi-link svg{ width:24px; height:24px; stroke-width:2; overflow:visible; }
.kofi-link .heart{ fill:currentColor; stroke:none; transform-box:fill-box; transform-origin:center; }
.kofi-link .steam{ opacity:0; transform:translateY(3px); transition:opacity 200ms ease, transform 300ms var(--ease-out); }
@media (hover:hover) and (pointer:fine){
  .kofi-link:hover .steam{ opacity:1; transform:none; }
  .kofi-link:hover .heart{ animation:beat 600ms var(--ease-out); color:var(--accent); }
}
@keyframes beat{ 30%{ transform:scale(1.25); } 60%{ transform:scale(.95); } }
#locale{ width:auto; padding:0 12px; font:700 17px/1 'IBM Plex Sans Arabic',system-ui,sans-serif; }
#locale .glyph{ grid-area:1/1; display:inline-flex; align-items:center; gap:7px; transition:transform 240ms var(--ease-out), opacity 180ms ease; }
#locale img{ width:21px; height:14px; border-radius:3px; object-fit:cover; box-shadow:0 0 0 1px var(--line); }
#locale .en{ font-family:'Space Grotesk',system-ui,sans-serif; font-size:14px; letter-spacing:.02em; }
:root:not([lang="ar"]) #locale .en{ opacity:0; transform:translateY(110%); }
:root[lang="ar"] #locale .ar{ opacity:0; transform:translateY(-110%); }
.tools .sep{ width:1px; height:24px; background:var(--line); margin:0 8px; }
.me{ display:inline-flex; align-items:center; gap:10px; height:44px; padding:0 14px 0 4px; border-radius:999px; color:var(--text); text-decoration:none;
  font-family:'Space Grotesk',sans-serif; font-weight:600; font-size:16px; transition:background-color .2s ease, transform 160ms var(--ease-out); }
:root[dir="rtl"] .me{ padding:0 4px 0 14px; }
.me img{ width:34px; height:34px; border-radius:999px; object-fit:cover; display:block; box-shadow:0 0 0 2px var(--bg), 0 0 0 3.5px var(--line); transition:box-shadow .25s ease, transform .35s var(--ease-out); }
.me:active{ transform:scale(.97); }
@media (hover:hover) and (pointer:fine){
  .me:hover{ background:var(--hover); }
  .me:hover img{ box-shadow:0 0 0 2px var(--bg), 0 0 0 3.5px var(--accent); transform:rotate(-6deg); }
}

/* ---------- page ---------- */
main{ display:flex; flex-direction:column; align-items:center; text-align:center;
  padding:calc(clamp(96px,14vmin,170px) + env(safe-area-inset-top,0px)) var(--gutter) calc(clamp(28px,5vmin,64px) + env(safe-area-inset-bottom,0px)); }

.hero{ display:flex; flex-direction:column; align-items:center; }
.fez-mark{ width:clamp(96px,14vmin,150px); height:auto; overflow:visible; stroke:none; margin-bottom:clamp(14px,2.4vmin,28px); }
/* both fez drawings take the theme's colours (the tassel turns light on the dark page) */
.fez-art{ stroke:none; overflow:visible; }
.fez-art .fez{ fill:var(--fez); } .fez-art .fez-dark{ fill:var(--fez-dark); } .fez-art .tassel{ fill:var(--tassel); }
.fez-art .cord{ fill:none; stroke:var(--tassel); stroke-width:1.6; stroke-linecap:round; }
.fez-art .white{ fill:#fff; } .fez-art .play{ fill:#fff; stroke:#fff; stroke-width:1; stroke-linejoin:round; }
.fez-mark .swing{ transform-origin:32px 14.6px; transform-box:view-box; }
@media (prefers-reduced-motion:no-preference){
  .fez-mark .swing{ animation:sway 2.6s var(--ease-out) .4s 1 both; }
  @media (hover:hover){ .hero:hover .fez-mark .swing{ animation:sway 1.8s var(--ease-out) 1 both; } }
}
@keyframes sway{ 0%{ transform:rotate(0); } 25%{ transform:rotate(9deg); } 55%{ transform:rotate(-4deg); } 80%{ transform:rotate(1.5deg); } 100%{ transform:rotate(0); } }

.headline{ margin:0; font-weight:700; letter-spacing:-.03em; line-height:1; font-size:clamp(34px,7vmin,96px); text-wrap:balance; max-width:16ch; }
:root[lang="ar"] .headline{ letter-spacing:0; line-height:1.2; font-size:clamp(32px,6.4vmin,84px); }
.sub{ margin:clamp(14px,2.2vmin,26px) 0 0; color:var(--dim); font-size:clamp(15px,1.9vmin,22px); line-height:1.55; max-width:46ch; text-wrap:balance; }

.card{ margin-top:clamp(28px,4.8vmin,60px); width:min(100%,760px); text-align:start;
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:clamp(16px,2.6vmin,28px); }
.actions{ display:flex; flex-wrap:wrap; gap:10px; justify-content:center; }
.btn{ display:inline-flex; align-items:center; justify-content:center; gap:9px; height:48px; padding:0 22px; border-radius:999px; border:1px solid var(--line);
  background:var(--raised); color:var(--text); font:inherit; font-weight:600; font-size:15px; text-decoration:none; cursor:pointer;
  transition:transform .25s var(--ease-out), background-color .2s ease, border-color .2s ease; }
.btn:active{ transform:scale(.97); }
@media (hover:hover){ .btn:hover{ transform:translateY(-2px); border-color:var(--faint); } }
.btn.primary{ background:var(--accent); border-color:transparent; color:var(--on-accent); }
@media (hover:hover){ .btn.primary:hover{ background:var(--accent-ink); border-color:transparent; } :root[data-theme="dark"] .btn.primary:hover{ background:#b8172f; } }
.btn svg{ width:19px; height:19px; }
.btn.ok{ border-color:var(--ok); color:var(--ok); }
.btn.small{ height:38px; padding:0 16px; font-size:14px; margin-top:14px; }
/* the link box, with its copy button inside at the right end */
.url-row{ position:relative; margin:16px 0 0; }
.url-row .url{ margin:0; padding-right:56px; min-height:46px; display:flex; align-items:center; }
.copy-in{ position:absolute; right:6px; top:50%; transform:translateY(-50%); width:38px; height:38px; display:grid; place-items:center;
  border-radius:10px; border:1px solid var(--line); background:transparent; color:var(--dim); cursor:pointer; transition:color .2s, border-color .2s, background-color .2s; }
.copy-in svg{ width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
@media (hover:hover){ .copy-in:hover{ color:var(--accent); border-color:var(--accent); } }
.copy-in:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
.copy-in.ok{ color:var(--ok); border-color:var(--ok); }
.btn .app-logo{ width:24px; height:24px; border-radius:6px; flex:none; }
.url{ display:block; margin:16px 0 0; padding:11px 16px; border-radius:14px; background:var(--well); border:1px solid var(--border);
  font-family:'Space Grotesk',sans-serif; font-size:13.5px; color:var(--dim); overflow-wrap:anywhere; text-align:left; }
.hint{ margin:10px 0 0; color:var(--faint); font-size:13.5px; line-height:1.6; }

/* ---------- the two dropdowns ---------- */
.drop{ margin-top:12px; border:1px solid var(--border); border-radius:16px; background:var(--well); overflow:hidden; }
.drop:first-of-type{ margin-top:20px; }
.drop summary{ list-style:none; cursor:pointer; display:flex; align-items:center; gap:12px; min-height:56px; padding:0 16px; font-weight:600; font-size:16px;
  -webkit-tap-highlight-color:transparent; transition:background-color .2s ease; }
.drop summary::-webkit-details-marker{ display:none; }
@media (hover:hover){ .drop summary:hover{ background:var(--hover); } }
.drop summary svg{ width:20px; height:20px; flex:none; }
.drop .t{ flex:none; }
.drop .count{ margin-inline-start:auto; color:var(--dim); font-size:13.5px; font-weight:500; font-variant-numeric:tabular-nums; }
.drop .chev{ width:18px; height:18px; color:var(--dim); transition:transform .3s var(--ease-out); }
.drop[open] .chev{ transform:rotate(180deg); }
.drop-body{ padding:0 16px 16px; border-top:1px solid var(--border); }
.drop-body > .hint:first-child{ margin-top:12px; }
/* long lists scroll inside a short box instead of stretching the page */
.list{ list-style:none; margin:10px 0 0; padding:4px; max-height:min(300px,46vh); overflow-y:auto; overscroll-behavior:contain;
  border-radius:12px; background:var(--surface); border:1px solid var(--border); scrollbar-width:thin; scrollbar-color:var(--line) transparent; }
.list li{ display:flex; align-items:center; gap:10px; min-height:44px; padding:4px 10px; border-radius:10px; }
@media (hover:hover){ .list li:hover{ background:var(--hover); } }
.list label{ display:flex; align-items:center; gap:12px; flex:1; min-width:0; cursor:pointer; }
.list .name{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:500; font-size:15px; }
.list li.off .name{ color:var(--faint); }
.list .site{ display:flex; flex-direction:column; min-width:0; line-height:1.3; }
.list .meta{ color:var(--faint); font-size:12.5px; font-family:'Space Grotesk',sans-serif; }
.list .series{ flex:none; color:var(--dim); font-size:13px; font-variant-numeric:tabular-nums; }
.tag{ flex:none; font-size:12px; line-height:1; padding:5px 9px; border-radius:999px; background:var(--well); color:var(--dim); }
/* movies tag = the series one (dark brown on the well colour), owner's choice 2026-11-19 */
.sw{ appearance:none; -webkit-appearance:none; flex:none; position:relative; width:38px; height:22px; margin:0; border-radius:999px; background:var(--line); cursor:pointer; transition:background-color .2s ease; }
.sw::after{ content:''; position:absolute; top:3px; inset-inline-start:3px; width:16px; height:16px; border-radius:50%; background:#fff; transition:transform .25s var(--ease-out); }
.sw:checked{ background:var(--accent); }
.sw:checked::after{ transform:translateX(16px); }
:root[dir="rtl"] .sw:checked::after{ transform:translateX(-16px); }
.mv{ display:flex; gap:2px; flex:none; }
.mv button{ width:30px; height:30px; border-radius:50%; border:0; background:transparent; color:var(--text); cursor:pointer; display:grid; place-items:center; transition:background-color .2s ease; }
@media (hover:hover){ .mv button:hover:not(:disabled){ background:var(--well); } }
.mv button:disabled{ color:var(--line); cursor:default; }
.mv svg{ width:16px; height:16px; stroke-width:2; }
.opts{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-top:14px; }
.opts label{ display:flex; flex-direction:column; gap:6px; font-size:13px; font-weight:500; color:var(--dim); }
.opts select{ height:40px; border-radius:12px; border:1px solid var(--line); background:var(--surface); color:var(--text); font:inherit; font-size:14px; padding:0 10px; }
.servers span{ color:var(--text); font-weight:600; }

/* ---------- stats + facts ---------- */
.stats{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; width:min(100%,760px); margin:14px 0 0; padding:0; }
.stats div{ padding:14px 10px; border-radius:16px; border:1px solid var(--border); background:var(--surface); }
.stats dt{ color:var(--faint); font-size:13px; }
.stats dd{ margin:4px 0 0; font-family:'Space Grotesk',var(--font); font-weight:700; font-size:clamp(18px,2.6vmin,24px); font-variant-numeric:tabular-nums; }
:root[lang="ar"] .stats dd{ font-family:var(--font-ar); }

.facts{ margin-top:clamp(36px,6vmin,72px); width:min(100%,1040px); display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:clamp(12px,2vmin,24px); }
.box{ text-align:start; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:clamp(16px,2.2vmin,24px);
  transition:transform .3s var(--ease-out), border-color .25s ease; }
@media (hover:hover){ .box:hover{ transform:translateY(-3px); border-color:var(--line); } }
.box h2{ margin:0 0 6px; font-size:clamp(16px,2vmin,20px); font-weight:600; letter-spacing:-.01em; }
.box p{ margin:0; color:var(--dim); font-size:15px; line-height:1.6; }

.foot{ margin:clamp(22px,4vmin,48px) 0 0; color:var(--faint); font-size:14px; }
.toast{ position:fixed; left:50%; bottom:24px; z-index:30; transform:translate(-50%,16px); opacity:0; pointer-events:none; padding:11px 18px; border-radius:999px;
  background:var(--text); color:var(--bg); font-weight:600; font-size:14px; box-shadow:0 10px 30px rgba(0,0,0,.2); transition:opacity .25s var(--ease-out), transform .25s var(--ease-out); }
.toast.show{ opacity:1; transform:translate(-50%,0); }

/* ---------- small screens ---------- */
@media (max-width:760px){
  .facts{ grid-template-columns:minmax(0,1fr); }
  .opts{ grid-template-columns:minmax(0,1fr); }
  .stats{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .actions .btn{ flex:1 1 100%; }
}
@media (max-width:520px){
  .brand{ gap:8px; }
  .brand .name{ font-size:17px; }
  .brand .div{ display:none; }
  .me span{ display:none; }
  .me{ padding:0 4px; }
  .tools .sep{ margin:0 4px; }
  .tools{ gap:2px; }
  .tool{ width:38px; }
  .list{ max-height:min(280px,52vh); }
}
@media (max-width:380px){ .brand .name{ display:none; } }
@media (prefers-reduced-motion:reduce){ *{ transition:none !important; animation:none !important; } }

/* ---------- save (saved personal link): green = works now, red = reinstall ---------- */
.btn.save:disabled{ opacity:.6; cursor:progress; }
/* red like the install buttons; green after a save that needs no reinstall, a ring when one is needed */
.btn.primary.save.ok, .btn.primary.save.ok:hover, :root[data-theme] .btn.primary.save.ok:hover{ background:var(--ok); color:#fff; }
.btn.primary.save.warn{ box-shadow:0 0 0 3px var(--surface), 0 0 0 5px var(--accent); }
.save-msg{ margin:10px 0 0; min-height:0; font-size:14px; font-weight:500; text-align:center; }
.save-msg:empty{ display:none; }
.save-msg.ok{ color:var(--ok); }
.save-msg.warn{ color:var(--accent-ink); }
.url.pending{ font-family:var(--font-ar); font-style:normal; color:var(--faint); justify-content:center; text-align:center; direction:rtl; }
:root[lang="en"] .url.pending{ direction:ltr; }

/* rows: "turn all off" next to the hint */
.row-hint{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.link-btn{ border:1px solid var(--line); background:transparent; color:var(--dim); font:inherit; font-size:13px; font-weight:500; padding:5px 12px; border-radius:999px; cursor:pointer; transition:color .2s, border-color .2s; }
@media (hover:hover){ .link-btn:hover{ color:var(--accent-ink); border-color:var(--accent); } }
.link-btn:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }

/* posters: three cards with a live preview */
.pos-cards{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-top:12px; }
.pos-card{ display:flex; flex-direction:column; align-items:center; gap:8px; padding:10px; border-radius:14px; border:2px solid var(--border);
  background:var(--well); color:var(--text); font:inherit; cursor:pointer; transition:border-color .2s, transform .2s var(--ease-out); }
.pos-card b{ font-size:14px; font-weight:600; }
.pos-card .pv{ position:relative; width:100%; aspect-ratio:2/3; border-radius:10px; overflow:hidden; background:var(--border); }
.pos-card .pv img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; transition:opacity .25s; }
.pos-card.loading .pv img{ opacity:.35; }
.pos-card.on{ border-color:var(--accent); }
.pos-card.on b{ color:var(--accent-ink); }
@media (hover:hover){ .pos-card:hover{ transform:translateY(-2px); } }
.pos-card:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
.pos-panel{ margin-top:12px;  padding:12px; border-radius:12px; background:var(--well); border:1px solid var(--border); }
.pos-panel > .hint:first-child{ margin-top:0; }
.list.toggles{ margin-top:8px; }
.opts.two{ grid-template-columns:repeat(2,minmax(0,1fr)); }
.key-help{ display:inline-block; margin-top:10px; font-size:13px; color:var(--accent-ink); text-decoration:none; }
@media (hover:hover){ .key-help:hover{ text-decoration:underline; } }
@media (max-width:620px){ .opts.two{ grid-template-columns:1fr; } }
.opts.one{ grid-template-columns:minmax(0,360px); }
@media (max-width:620px){
  .pos-cards{ gap:8px; }
  .pos-card{ padding:6px; gap:6px; }
  .pos-card b{ font-size:11px; line-height:1.25; text-align:center; letter-spacing:-.2px; white-space:nowrap; }
  .list.toggles .tag{ display:none; }
}

/* content groups (2.0.0): four switches above the rows */
.groups{ list-style:none; margin:8px 0 14px; padding:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.groups li label{ display:flex; align-items:center; gap:10px; padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:var(--surface); cursor:pointer; }
.groups li.off label{ opacity:.6; }
.groups .gname{ font-weight:600; font-size:14px; }
.groups .gmeta{ font-size:12px; color:var(--dim); margin-inline-start:auto; white-space:nowrap; }
@media (max-width:520px){ .groups{ grid-template-columns:minmax(0,1fr); } }


/* ======================================================================
   2.3.0 setup wizard — SubSyncer's layout and type (Rethink Sans / IBM Plex
   Sans Arabic, heavy bold titles, pill step tabs over a progress line, big
   selectable cards, Back / Continue in the footer row) in Tarboosh's colours.
   ====================================================================== */
@font-face{ font-family:'Rethink Sans'; font-weight:500; font-display:swap; src:url(/fonts/wiki-font-4.ttf) format('truetype'); }
@font-face{ font-family:'Rethink Sans'; font-weight:600; font-display:swap; src:url(/fonts/wiki-font-5.ttf) format('truetype'); }
@font-face{ font-family:'Rethink Sans'; font-weight:700; font-display:swap; src:url(/fonts/wiki-font-6.ttf) format('truetype'); }
@font-face{ font-family:'Rethink Sans'; font-weight:800; font-display:swap; src:url(/fonts/wiki-font-7.ttf) format('truetype'); }
@font-face{ font-family:'IBM Plex Sans Arabic'; font-weight:400; font-display:swap; src:url(/fonts/wiki-font-0.ttf) format('truetype'); }
@font-face{ font-family:'IBM Plex Sans Arabic'; font-weight:500; font-display:swap; src:url(/fonts/wiki-font-1.ttf) format('truetype'); }
@font-face{ font-family:'IBM Plex Sans Arabic'; font-weight:600; font-display:swap; src:url(/fonts/wiki-font-2.ttf) format('truetype'); }
@font-face{ font-family:'IBM Plex Sans Arabic'; font-weight:700; font-display:swap; src:url(/fonts/wiki-font-3.ttf) format('truetype'); }
/* 2.21.8 (owner): Thmanyah Sans (github.com/EngDawood/thmanyah-font-web, Thmanyah's font licence) for Arabic and Latin */
@font-face{ font-family:'Thmanyah Sans'; font-weight:300; font-display:swap; src:url(/fonts/thmanyah-sans-Light.woff2) format('woff2'); }
@font-face{ font-family:'Thmanyah Sans'; font-weight:400; font-display:swap; src:url(/fonts/thmanyah-sans-Regular.woff2) format('woff2'); }
@font-face{ font-family:'Thmanyah Sans'; font-weight:500; font-display:swap; src:url(/fonts/thmanyah-sans-Medium.woff2) format('woff2'); }
@font-face{ font-family:'Thmanyah Sans'; font-weight:700; font-display:swap; src:url(/fonts/thmanyah-sans-Bold.woff2) format('woff2'); }
@font-face{ font-family:'Thmanyah Sans'; font-weight:900; font-display:swap; src:url(/fonts/thmanyah-sans-Black.woff2) format('woff2'); }
:root{ --font:'Thmanyah Sans','Rethink Sans','IBM Plex Sans Arabic',system-ui,sans-serif; --font-ar:'Thmanyah Sans','IBM Plex Sans Arabic','Rethink Sans',system-ui,sans-serif; }
:root[lang="ar"]{ --font:var(--font-ar); }
html,body{ font-weight:500; }
.brand .name{ font-family:'Rethink Sans',sans-serif; font-weight:800; letter-spacing:-.02em; }
.brand .div{ display:none; }

.wiz{ width:min(1180px,100%); margin:0 auto; padding:calc(clamp(96px,14vmin,150px) + env(safe-area-inset-top,0px)) var(--gutter) calc(110px + env(safe-area-inset-bottom,0px)); display:flex; flex-direction:column; min-height:100dvh; }
.wiz-head{ display:flex; align-items:center; gap:16px; flex-wrap:wrap; margin-bottom:clamp(24px,4vmin,44px); }
.wiz-title{ margin:0; font-size:clamp(38px,6.2vw,60px); font-weight:800; letter-spacing:-.035em; line-height:1.05; }
:root[lang="ar"] .wiz-title{ letter-spacing:0; font-weight:700; }

/* step tabs: the current one is a pill, the line below fills up to it */
.steps{ margin-bottom:clamp(26px,4.4vmin,46px); }
.steps ol{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(8,minmax(0,1fr)); gap:6px; }
.steps button{ width:100%; height:44px; border:0; border-radius:999px; background:transparent; color:var(--faint); font:inherit; font-size:15px; font-weight:600;
  cursor:pointer; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; padding:0 12px; transition:background-color .25s ease, color .25s ease; }
.steps button:disabled{ cursor:default; opacity:.55; }
.steps li.done button{ color:var(--text); }
.steps li.on button{ background:var(--text); color:var(--bg); }
.steps-bar{ height:3px; margin-top:14px; border-radius:3px; background:var(--border); overflow:hidden; }
.steps-bar span{ display:block; height:100%; width:16.7%; background:var(--accent); border-radius:3px; transition:width .45s var(--ease-out); }
:root[dir="rtl"] .steps-bar{ display:flex; justify-content:flex-start; }

.step{ flex:1; animation:stepIn .35s var(--ease-out); }
@keyframes stepIn{ from{ opacity:0; transform:translateY(8px); } to{ opacity:1; transform:none; } }
@media (prefers-reduced-motion:reduce){ .step{ animation:none; } .steps-bar span{ transition:none; } }
.step-head{ display:flex; align-items:baseline; justify-content:space-between; gap:12px; }
.step-title{ margin:0 0 10px; font-size:clamp(30px,4.4vw,46px); font-weight:800; letter-spacing:-.03em; line-height:1.1; }
:root[lang="ar"] .step-title{ letter-spacing:0; font-weight:700; }
.step-sub{ margin:0 0 clamp(20px,3vmin,30px); font-size:16px; line-height:1.6; color:var(--text); max-width:72ch; display:flex; flex-wrap:wrap; gap:8px 16px; align-items:baseline; }
.step-note{ margin:0 0 16px; font-size:15px; line-height:1.6; max-width:80ch; }
.group-title{ margin:clamp(26px,4vmin,40px) 0 8px; font-size:22px; font-weight:700; letter-spacing:-.01em; }
.step-error{ margin:16px 0 0; color:var(--accent-ink); font-weight:700; }

/* big selectable cards */
.choice-grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.choice-grid.three{ grid-template-columns:repeat(3,minmax(0,1fr)); }
.choice{ position:relative; display:flex; flex-direction:column; align-items:flex-start; gap:12px; text-align:start; min-height:150px; padding:24px 26px;
  border:1px solid var(--border); border-radius:20px; background:var(--surface); color:var(--text); font:inherit; cursor:pointer;
  transition:border-color .2s ease, background-color .2s ease, transform .16s var(--ease-out); }
.choice:active{ transform:scale(.99); }
.choice[aria-pressed="true"]{ border-color:var(--accent); background:var(--accent-soft); box-shadow:0 0 0 1px var(--accent) inset; }
.choice-top{ display:flex; align-items:center; gap:12px; width:100%; }
.choice b{ font-size:24px; font-weight:800; letter-spacing:-.02em; }
:root[lang="ar"] .choice b{ letter-spacing:0; font-weight:700; }
.choice-text{ font-size:15px; line-height:1.6; }
.choice .counts{ margin-top:auto; font-size:13px; font-weight:700; color:var(--accent-ink); }
.choice .counts:empty{ display:none; }
.tick{ margin-inline-start:auto; width:24px; height:24px; border-radius:50%; border:2px solid var(--line); flex:none; position:relative; }
.choice[aria-pressed="true"] .tick{ background:var(--accent); border-color:var(--accent); }
.choice[aria-pressed="true"] .tick::after{ content:''; position:absolute; inset:5px 7px 7px 6px; border:solid var(--on-accent); border-width:0 2.4px 2.4px 0; transform:rotate(45deg) translate(-1px,-1px); width:5px; height:9px; inset:auto; left:7px; top:3px; }
.svc-icon{ width:40px; height:40px; border-radius:12px; display:grid; place-items:center; flex:none; background:var(--well); overflow:hidden; }
.svc-icon img{ width:30px; height:30px; object-fit:contain; }
.svc-icon.wide img{ width:36px; height:auto; }
.http-icon svg{ width:24px; height:24px; color:var(--accent); }

/* debrid cards: icon + name, key box, key link, live check */
.debrid-grid{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
@media (max-width:1000px){ .debrid-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
.dcard{ display:flex; flex-direction:column; gap:8px; padding:14px 16px; border:1px solid var(--border); border-radius:16px; background:var(--surface); }
.dcard.ok{ border-color:var(--ok); box-shadow:0 0 0 1px var(--ok) inset; }
.dcard.bad{ border-color:var(--accent); }
.dcard .dtop{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.dcard .svc-icon{ width:30px; height:30px; border-radius:9px; }
.dcard .svc-icon img{ width:22px; height:22px; }
.dcard .dtop b{ font-size:16px; font-weight:800; letter-spacing:-.01em; }
:root[lang="ar"] .dcard .dtop b{ font-weight:700; letter-spacing:0; }
.dcard .state{ margin-inline-start:auto; font-size:12px; font-weight:700; }
.dcard.ok .state{ color:var(--ok); }
.dcard.bad .state{ color:var(--accent-ink); }
.dcard label{ font-size:12px; font-weight:600; }
.keybox{ position:relative; }
.keybox input{ width:100%; height:38px; border-radius:10px; border:1px solid var(--line); background:var(--well); color:var(--text); font:inherit; font-size:14px; padding:0 38px 0 10px; direction:ltr; }
:root[dir="rtl"] .keybox input{ padding:0 10px 0 38px; }
.keybox .eye{ position:absolute; top:4px; inset-inline-end:4px; width:30px; height:30px; border:0; border-radius:8px; background:transparent; color:var(--dim); cursor:pointer; display:grid; place-items:center; }
:root[dir="rtl"] .keybox .eye{ inset-inline-end:auto; left:4px; }
:root[dir="ltr"] .keybox .eye{ right:4px; }
.keybox .eye svg{ width:17px; height:17px; }
.getkey{ font-size:12px; font-weight:700; color:var(--accent-ink); text-decoration:none; }
.getkey:hover{ text-decoration:underline; }

.install-card{ padding:clamp(20px,3vmin,30px); border:1px solid var(--border); border-radius:22px; background:var(--surface); display:flex; flex-direction:column; gap:14px; }

/* footer row: X | avatar, then Back / Continue */
/* Next/Back bar fixed at the bottom, as Collections+ (.wizard-nav): Back | step N of M | Next */
.wiz-foot{
  position:fixed; left:50%; bottom:calc(16px + env(safe-area-inset-bottom,0px)); z-index:15; translate:-50% 0;
  display:flex; align-items:center; gap:12px; width:min(calc(100% - 2 * var(--gutter)), 1180px);
  padding:10px; border-radius:999px; border:1px solid var(--border);
  background:var(--header-frost); -webkit-backdrop-filter:blur(16px); backdrop-filter:blur(16px); box-shadow:0 10px 30px rgba(0,0,0,.12); }
.wiz > .wiz-foot{ width:min(calc(100% - 2 * var(--gutter)), 1180px); }
.wiz-foot .btn.cta, .wiz-foot .btn.ghost{ height:46px; padding:0 22px; }
.wiz-foot svg{ width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
:root[dir="rtl"] .wiz-foot svg{ transform:scaleX(-1); }
.wiz-foot .nav-status{ flex:1; text-align:center; color:var(--dim, var(--muted)); font-size:14px; }
.wiz-foot #back[hidden], .wiz-foot #next[hidden]{ display:inline-flex !important; visibility:hidden; }
.nav-btns{ display:flex; gap:10px; }
.btn.cta{ height:52px; padding:0 34px; border-radius:999px; background:var(--text); color:var(--bg); border:0; font:inherit; font-size:16px; font-weight:700; cursor:pointer; }
.btn.ghost{ height:52px; padding:0 26px; border-radius:999px; background:transparent; color:var(--text); border:1px solid var(--line); font:inherit; font-size:16px; font-weight:700; cursor:pointer; }
.btn.cta:active, .btn.ghost:active{ transform:scale(.98); }

@media (max-width:860px){
  .choice-grid.three{ grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:640px){
  .steps ol{ grid-template-columns:repeat(8,auto); overflow-x:auto; scrollbar-width:none; }
  .steps button{ font-size:14px; padding:0 14px; }
  .choice-grid, .choice-grid.three{ grid-template-columns:minmax(0,1fr); }
  .debrid-grid{ gap:8px; } .dcard{ padding:12px; } .dcard label{ display:none; }
  .choice{ min-height:0; }
  .btn.cta{ padding:0 26px; }
}
/* the wizard is left-aligned (start-aligned) like SubSyncer's, not the old centred column */
[hidden]{ display:none !important; }
main.wiz{ align-items:stretch; text-align:start; max-width:none; }
.wiz > *{ width:100%; }
.wiz .install-card .actions{ justify-content:flex-start; flex-wrap:wrap; }
.wiz .save-msg{ text-align:start; }
.wiz .stats{ margin-top:22px; }
.wiz .foot{ text-align:start; }

/* poster step: three small previews side by side, not full-width */
.wiz .pos-cards{ grid-template-columns:repeat(3,minmax(0,200px)); justify-content:center; gap:14px; }
.wiz .pos-card b{ font-size:14px; font-weight:700; }
@media (max-width:640px){ .wiz .pos-cards{ grid-template-columns:repeat(3,minmax(0,1fr)); } }

/* Ko-fi panel (as on SubSyncer) */
dialog.kofi-dialog{ width:min(480px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); padding:20px; border:1px solid var(--border); border-radius:20px;
  background:var(--surface); color:var(--text); box-shadow:0 18px 50px rgba(0,0,0,.35); overflow:auto; transform-origin:center; font-family:var(--font); }
dialog.kofi-dialog::backdrop{ background:rgba(0,0,0,.55); -webkit-backdrop-filter:blur(3px); backdrop-filter:blur(3px); }
dialog.kofi-dialog[open]{ animation:kofiIn 250ms var(--ease-out); }
dialog.kofi-dialog[open]::backdrop{ animation:kofiFade 250ms var(--ease-out); }
dialog.kofi-dialog[data-state=closing]{ opacity:0; transform:scale(.96); transition:opacity 200ms var(--ease-out), transform 200ms var(--ease-out); }
@keyframes kofiIn{ from{ opacity:0; transform:scale(.96); } to{ opacity:1; transform:none; } }
@keyframes kofiFade{ from{ opacity:0; } to{ opacity:1; } }
.kofi-head{ display:flex; align-items:center; gap:12px; }
.kofi-head h2{ flex:1; margin:0; font-size:22px; font-weight:800; letter-spacing:-.02em; line-height:1.2; }
:root[lang="ar"] .kofi-head h2{ font-weight:700; letter-spacing:0; }
.kofi-close{ display:grid; place-items:center; width:40px; height:40px; min-width:40px; padding:0; flex:none; border:0; border-radius:999px; background:var(--hover); color:var(--text); cursor:pointer; }
.kofi-close svg{ width:18px; height:18px; stroke-width:2; display:block; }
.kofi-body{ margin:8px 0 16px; font-size:16px; line-height:1.55; }
.kofi-frame{ display:block; width:100%; height:585px; border:0; border-radius:14px; background:#fff; transition:height 300ms var(--ease-out); }
.kofi-frame.is-open{ height:712px; }
.kofi-open{ display:inline-flex; align-items:center; gap:8px; min-height:40px; margin-top:14px; padding:0 16px; border-radius:999px; background:var(--hover); color:var(--text); font-size:15px; font-weight:700; text-decoration:none; }
.kofi-open svg{ width:16px; height:16px; stroke-width:2; }
@media (prefers-reduced-motion:reduce){ dialog.kofi-dialog[open], dialog.kofi-dialog[open]::backdrop{ animation:kofiFade 150ms ease; } .kofi-frame{ transition:none; } }

/* poster options as button rows (2.5.0): language, look */
.seg-rows{ display:flex; flex-direction:column; gap:14px; margin:6px 0 4px; }
.seg-row{ display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.seg-label{ min-width:64px; font-size:14px; font-weight:700; }
.seg{ display:inline-flex; gap:4px; padding:4px; border-radius:999px; background:var(--well); border:1px solid var(--border); }
.seg button{ height:40px; min-width:96px; padding:0 18px; border:0; border-radius:999px; background:transparent; color:var(--text); font:inherit; font-size:15px; font-weight:700; cursor:pointer; transition:background-color .2s ease, color .2s ease; }
.seg button[aria-pressed="true"]{ background:var(--text); color:var(--bg); }
.seg button:active{ transform:scale(.97); }

/* 2.5.1: every option row in the posters step centred; BetterPosters as short toggle chips */
.wiz .pos-panel{ text-align:center; }
.wiz .pos-panel .hint{ text-align:center; }
.seg-rows{ align-items:center; }
.seg-row{ justify-content:center; }
.seg-label{ min-width:0; }
.chips{ display:flex; flex-wrap:wrap; justify-content:center; gap:6px; max-width:640px; }
.chips button{ height:36px; padding:0 14px; border-radius:999px; border:1px solid var(--line); background:transparent; color:var(--text); font:inherit; font-size:14px; font-weight:700; cursor:pointer; transition:background-color .2s ease, color .2s ease, border-color .2s ease; }
.chips button[aria-pressed="true"]{ background:var(--text); color:var(--bg); border-color:var(--text); }
.chips button:active{ transform:scale(.97); }
.seg button{ min-width:84px; height:36px; font-size:14px; }
.wiz .pos-panel .key-help{ display:inline-block; margin-top:6px; }

/* 2.6.0: catalogs as Collections+ rows: switch, grip, poster fan, name, Home button, arrows */
.row-bar{ display:flex; flex-direction:column; align-items:center; gap:10px; margin:4px 0 12px; }
.row-acts{ display:flex; gap:8px; flex-wrap:wrap; justify-content:center; }
.row-acts .link-btn[hidden]{ display:none; }
.order{ list-style:none; margin:0; padding:0; display:grid; gap:8px; }
.order li{ display:grid; grid-template-columns:auto 28px 128px minmax(0,1fr) auto auto auto; align-items:center; gap:10px;
  padding:8px 12px 8px 8px; border-radius:14px; border:1px solid var(--border); background:var(--surface);
  transition:opacity .2s ease, box-shadow .2s ease, background-color .2s ease; }
:root[dir="rtl"] .order li{ padding:8px 8px 8px 12px; }
.order li.off{ background:transparent; border-style:dashed; }
.order li.off .thumb{ opacity:.45; }
.order li.off .name b{ color:var(--faint); }
.order .sw-wrap{ display:flex; align-items:center; cursor:pointer; }
.order .grip{ display:grid; place-items:center; width:28px; height:40px; color:var(--faint); cursor:grab; }
.order li.off .grip{ opacity:.35; cursor:default; }
.order .grip svg{ width:18px; height:18px; fill:currentColor; stroke:none; }
@media (hover:hover){ .order li:not(.off) .grip:hover{ color:var(--text); } }
.order .thumb{ position:relative; width:128px; aspect-ratio:16/9; border-radius:9px; overflow:hidden; background:linear-gradient(135deg, #3a1a1f, #1b0c0e); }
.order .thumb.empty{ display:grid; place-items:center; color:rgba(255,255,255,.6); font-size:11px; font-weight:600; text-align:center; padding:6px; }
.order .fan3{ position:absolute; inset:0; display:grid; place-items:center; perspective:400px; }
.order .fan3 img{ position:absolute; width:auto; height:84%; aspect-ratio:2/3; object-fit:cover; border-radius:3px; box-shadow:0 3px 8px rgba(0,0,0,.5); }
.order .fan3 .c{ z-index:2; }
.order .fan3 .l{ z-index:1; transform:translateX(-46%) rotateY(28deg) scale(.86); filter:brightness(.6); }
.order .fan3 .r{ z-index:1; transform:translateX(46%) rotateY(-28deg) scale(.86); filter:brightness(.6); }
.order .name{ display:grid; gap:2px; min-width:0; }
.order .name b{ font-size:15px; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.order .name small{ color:var(--faint); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.order .pos-n{ min-width:22px; text-align:center; font-size:13px; font-weight:800; color:var(--accent-ink); font-variant-numeric:tabular-nums; }
.order .home{ min-height:34px; padding:0 12px; border-radius:999px; border:1px solid var(--line); background:transparent; color:var(--dim);
  font:inherit; font-size:13px; font-weight:700; cursor:pointer; white-space:nowrap; transition:background-color .2s ease, color .2s ease, border-color .2s ease; }
.order .home[aria-pressed="true"]{ background:var(--accent-soft); border-color:var(--accent); color:var(--accent-ink); }
.order .home:disabled{ opacity:.4; cursor:default; }
.order .home:active:not(:disabled){ transform:scale(.97); }
@media (hover:hover){ .order li:not(.off):hover{ border-color:var(--line); } }
@media (min-width:641px) and (max-width:900px){ .order li{ grid-template-columns:auto 28px 96px minmax(0,1fr) auto auto auto; } .order .thumb{ width:96px; } }
/* phones: picture on the side, name over the Home button and arrows */
@media (max-width:640px){
  .order li{ grid-template-columns:auto 92px minmax(0,1fr) auto; grid-template-areas:"sw thumb name pos" "sw thumb acts acts"; gap:4px 10px; }
  .order .sw-wrap{ grid-area:sw; } .order .grip{ display:none; } .order .thumb{ grid-area:thumb; width:92px; aspect-ratio:3/2; }
  .order .name{ grid-area:name; } .order .pos-n{ grid-area:pos; }
  .order .home{ grid-area:acts; justify-self:start; min-height:30px; padding:0 10px; font-size:12px; }
  .order .mv{ grid-area:acts; justify-self:end; }
}

.cfg-opts{ margin:22px 0 14px; }
.cfg-opts .seg button{ min-width:0; white-space:nowrap; }
@media (max-width:640px){ .cfg-opts .seg-row{ flex-direction:column; gap:8px; } }
.wiz #reset{ display:block; margin:6px auto 0; }

/* customize step (2.8.0): link-order ranking, one criterion per line */
.rank{ list-style:none; margin:4px auto 0; padding:0; display:grid; gap:8px; max-width:640px; counter-reset:none; }
.rank li{ display:grid; grid-template-columns:28px 18px minmax(0,1fr) auto; align-items:center; gap:10px;
  padding:10px 12px; border-radius:14px; border:1px solid var(--border); background:var(--surface);
  transition:opacity .2s ease, box-shadow .2s ease, border-color .2s ease; }
.rank li:first-child{ border-color:var(--accent); }
.rank .pos-n{ display:grid; place-items:center; width:28px; height:28px; border-radius:999px; background:var(--accent-soft); color:var(--accent-ink);
  font-size:13px; font-weight:800; font-variant-numeric:tabular-nums; }
.rank .grip{ display:grid; place-items:center; color:var(--faint); cursor:grab; }
.rank .grip svg{ width:16px; height:16px; fill:currentColor; stroke:none; }
.rank .name{ display:grid; gap:2px; min-width:0; }
.rank .name b{ font-size:15px; font-weight:700; }
.rank .name small{ color:var(--faint); font-size:12px; line-height:1.5; }
@media (hover:hover){ .rank li:hover{ border-color:var(--line); } .rank li:first-child:hover{ border-color:var(--accent); } }
@media (max-width:640px){ .rank li{ grid-template-columns:28px minmax(0,1fr) auto; } .rank .grip{ display:none; } }
.step-note.center{ margin:4px auto 0; text-align:center; color:var(--faint); font-size:13px; }
.wiz .btn.reset{ display:block; margin:18px auto 0; }
/* sources (2.8.0): "Nothing" card reads as the opt-out */
.choice.none:not([aria-pressed="true"]){ border-style:dashed; background:transparent; }
/* BetterPosters rating sources as logos (icons from 0-nj/Rating-Icons) */
.chips button.logo{ display:inline-grid; place-items:center; padding:0 12px; min-width:52px; }
.chips button.logo img{ display:block; height:22px; width:auto; max-width:56px; object-fit:contain; }

/* customize step (2.8.3): option cards like the Services / Posters steps */
.opt-grid{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.opt-grid.two{ grid-template-columns:repeat(2,minmax(0,1fr)); }
.opt-card{ display:flex; flex-direction:column; align-items:stretch; gap:8px; padding:20px 22px; border:1px solid var(--border); border-radius:20px; background:var(--surface); }
.opt-card > b{ font-size:18px; font-weight:700; }
.opt-card > p{ margin:0 0 6px; color:var(--dim); font-size:14px; line-height:1.6; }
.opt-card .seg{ display:flex; width:100%; margin-top:auto; }
.opt-card .seg button{ flex:1 1 0; min-width:0; padding:0 8px; white-space:nowrap; }
.opt-panel{ padding:12px; border-radius:20px; border:1px solid var(--border); background:var(--well); }
.opt-panel .rank{ max-width:none; margin:0; }
.opt-panel .rank li{ background:var(--surface); }
[data-panel="3"] .step-note{ color:var(--dim); }
[data-panel="3"] .opt-grid + .step-note{ margin-top:12px; font-size:13px; }
@media (max-width:900px){ .opt-grid{ grid-template-columns:minmax(0,1fr); } }
@media (max-width:640px){ .opt-grid.two{ grid-template-columns:minmax(0,1fr); } .opt-card{ padding:16px; } }

/* link format (2.12.0): choice + a live preview of one link as the app shows it */
.fmt-box { display: grid; gap: 14px; }
.fmt-seg { flex-wrap: wrap; }
.fmt-box .seg.fmt-seg { display: inline-flex; width: auto; justify-self: center; }
/* 2.12.4: link format | link order side by side */
/* 2.12.5: the two columns share rows (title | note | box), so both boxes start and end on the same lines */
.cus-pair { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: clamp(18px, 3vw, 36px); }
.cus-col { display: contents; }
.cus-col > * { grid-column: 1; }
.cus-col + .cus-col > * { grid-column: 2; }
.cus-col > .group-title { grid-row: 1; }
.cus-col > .step-note { grid-row: 2; }
.cus-col > .opt-panel { grid-row: 3; }
.cus-pair .rank { max-width: none; gap: 6px; }
.cus-pair .rank li { padding: 6px 10px; }
.cus-pair .fmt-box { grid-template-rows: auto 1fr; }
.cus-pair .fmt-preview { display: flex; flex-direction: column; justify-content: center; }
/* lines between the three customize groups */
.cus-sep { border: 0; border-top: 1px solid var(--line); margin: clamp(26px, 4vmin, 40px) 0 0; }
@media (max-width: 900px) { .cus-pair { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; } .cus-col > *, .cus-col + .cus-col > * { grid-column: 1; grid-row: auto; } }
.fmt-preview { border-radius: 12px; padding: 12px 14px; background: color-mix(in srgb, currentColor 6%, transparent); min-height: 4em; }
.fmt-preview { text-align: start; }
.fmt-preview b { display: block; white-space: pre-wrap; margin-bottom: 6px; unicode-bidi: plaintext; }
.fmt-preview pre { margin: 0; white-space: pre-wrap; word-break: break-word; font: inherit; font-size: .92em; line-height: 1.55; unicode-bidi: plaintext; }

/* 2.14.0: metadata step badge; collections step = section tabs + cover cards (as on Collections+) */
.choice .badge{ padding:3px 11px; border-radius:999px; background:var(--accent); color:var(--on-accent); font-size:13px; font-weight:800; white-space:nowrap; }
.choice-top .badge + .tick{ margin-inline-start:auto; }
.choice-top b + .badge{ margin-inline-start:auto; }
.choice-top b + .badge ~ .tick{ margin-inline-start:0; }
.md-logo{ background:transparent !important; }
.md-logo img{ width:100%; height:100%; object-fit:contain; border-radius:10px; }

.tabs{ display:flex; gap:8px; overflow-x:auto; scrollbar-width:none; padding:2px 2px 6px; margin:4px 0 8px; justify-content:center; flex-wrap:wrap; }
.tabs::-webkit-scrollbar{ display:none; }
.tabs[hidden]{ display:none; }
.tabs button{ display:inline-flex; align-items:center; gap:8px; height:40px; padding:0 16px; border-radius:999px; border:1px solid var(--border); background:var(--well);
  color:var(--text); font:inherit; font-size:15px; font-weight:700; cursor:pointer; white-space:nowrap; transition:background-color .2s ease, color .2s ease, border-color .2s ease; }
.tabs button[aria-selected="true"]{ background:var(--text); color:var(--bg); border-color:var(--text); }
.tabs .tab-n{ min-width:22px; height:22px; padding:0 6px; display:inline-grid; place-items:center; border-radius:999px; font-size:12px; font-weight:800; background:var(--border); color:var(--dim); font-variant-numeric:tabular-nums; }
.tabs .tab-n.on{ background:var(--accent); color:var(--on-accent); }
.tabs button:active{ transform:scale(.97); }
.coll-acts{ display:flex; justify-content:center; margin:0 0 12px; }
.coll-acts[hidden]{ display:none; }
.coll-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:14px; }
.coll-grid[hidden]{ display:none; }
.ccard{ position:relative; border-radius:16px; border:1px solid var(--border); background:var(--surface); overflow:hidden; cursor:pointer;
  transition:transform .2s var(--ease-out, ease), border-color .2s ease, box-shadow .2s ease; -webkit-tap-highlight-color:transparent; }
@media (hover:hover){ .ccard:hover{ transform:translateY(-3px); border-color:var(--line); } }
.ccard:active{ transform:scale(.98); }
.ccard[aria-pressed="true"]{ border-color:var(--accent); box-shadow:0 0 0 1px var(--accent); }
.ccard .art{ position:relative; aspect-ratio:16/9; background:#1b0c0e; }
.ccard .art img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block; }
.ccard[aria-pressed="false"] .art img{ filter:saturate(.75) brightness(.85); }
.ccard .check{ position:absolute; top:10px; inset-inline-end:10px; width:28px; height:28px; border-radius:999px; display:grid; place-items:center;
  background:rgba(0,0,0,.45); border:2px solid #fff; color:transparent; transition:background-color .2s ease; }
.ccard .check svg{ width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }
.ccard[aria-pressed="true"] .check{ background:var(--accent); border-color:var(--accent); color:var(--on-accent); }
.ccard .sec{ position:absolute; top:10px; inset-inline-start:10px; padding:3px 9px; border-radius:999px; background:rgba(0,0,0,.62); color:#fff; font-size:12px; font-weight:700; backdrop-filter:blur(6px); }
.ccard .meta{ display:grid; gap:2px; padding:10px 12px 12px; }
.ccard .meta b{ font-size:15px; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* 2.22.3: one-line names that cut off with "…" also cut what hangs below the line (the dots of a final ي): room for it */
.ccard .meta b, .order .name b, .order .name small, .list .name{ line-height:1.6; padding-block:1px; }
.ccard .meta small{ color:var(--faint); font-size:12px; }
@media (max-width:640px){ .coll-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; } .ccard .meta b{ font-size:14px; } .tabs{ flex-wrap:nowrap; justify-content:flex-start; } }

/* layout step: position, grip, cover, own name, Home, arrows + remove */
#rows li{ grid-template-columns:28px 28px 128px minmax(0,1fr) auto auto; }
#rows .thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
#rows .rn{ width:100%; min-width:0; height:34px; padding:0 10px; border-radius:9px; border:1px solid transparent; background:transparent; color:var(--text);
  font:inherit; font-size:15px; font-weight:700; transition:border-color .2s ease, background-color .2s ease; }
#rows .rn::placeholder{ color:var(--text); opacity:1; }
#rows .rn:hover{ border-color:var(--border); }
#rows .rn:focus{ border-color:var(--accent); background:var(--well); outline:none; }
#rows .rn:focus::placeholder{ color:var(--faint); }
#rows .name small{ padding:0 10px; }
#rows .rm:hover{ color:var(--accent-ink); }
@media (min-width:641px) and (max-width:900px){ #rows li{ grid-template-columns:28px 28px 96px minmax(0,1fr) auto auto; } }
@media (max-width:640px){
  #rows li{ grid-template-columns:92px minmax(0,1fr) auto; grid-template-areas:"thumb name pos" "thumb acts acts"; }
  #rows .grip{ display:none; }
}

/* 2.16.0: debrid key boxes under the debrid card (no heading / note), one per line inside its width */
.svc-grid{ align-items:start; }
.svc-col{ display:grid; gap:10px; min-width:0; }
.svc-col .choice{ width:100%; }
.svc-col #debrid-wrap{ margin:0; }
.svc-col .debrid-grid{ grid-template-columns:minmax(0,1fr); gap:8px; }
.svc-col .dcard{ display:grid; grid-template-columns:auto minmax(0,1fr) auto; grid-template-areas:"top key get"; align-items:center; gap:10px; padding:10px 12px; }
.svc-col .dcard .dtop{ grid-area:top; flex-wrap:nowrap; width:150px; }
.svc-col .dcard label{ display:none; }
.svc-col .dcard .keybox{ grid-area:key; min-width:0; }
.svc-col .dcard .getkey{ grid-area:get; white-space:nowrap; font-size:12px; }
@media (max-width:640px){ .svc-col .dcard{ grid-template-columns:minmax(0,1fr) auto; grid-template-areas:"top get" "key key"; } }

/* collections switch next to the step title */
.step-head .coll-switch{ display:inline-flex; align-items:center; margin-inline-end:auto; margin-inline-start:14px; cursor:pointer; transform:translateY(-2px); }
.step-head .coll-switch[hidden]{ display:none; }
#coll-body[hidden]{ display:none; }
.ccard .art img.none{ display:none; }

/* link format preview over Kira & El Gen's TMDB backdrop, a black layer on top so the text reads */
.fmt-preview{ position:relative; isolation:isolate; overflow:hidden; color:#fff;
  background:#000 url(https://image.tmdb.org/t/p/w1280/138MfiMnLE2RjlFs6lQqnDPrxbX.jpg) center/cover no-repeat; }
.fmt-preview::before{ content:''; position:absolute; inset:0; z-index:-1; background:linear-gradient(180deg, rgba(0,0,0,.62), rgba(0,0,0,.8)); }
.fmt-preview b, .fmt-preview pre{ color:#fff; text-shadow:0 1px 2px rgba(0,0,0,.6); }

/* 2.17.0: catalogs + collections (as on Collections+) */
.coll-head{ align-items:center; flex-wrap:wrap; }
.kind-switches{ display:flex; gap:10px; margin-inline-end:auto; margin-inline-start:16px; }
.kind-switches[hidden]{ display:none; }
.kind-sw{ display:inline-flex; align-items:center; gap:8px; height:38px; padding:0 14px; border-radius:999px; border:1px solid var(--border); background:var(--well); font-size:14px; font-weight:700; cursor:pointer; }
.kind-sw:has(.sw:checked){ border-color:var(--accent); background:var(--accent-soft); }
.kind-line{ margin-top:18px; }
.kind-line[hidden]{ display:none; }
.line-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px; }
.line-head .group-title{ margin:0; }
.ccard .art .fan3{ position:absolute; inset:0; display:grid; place-items:center; perspective:500px; background:radial-gradient(ellipse at center, #3a1a1f, #120708); }
.ccard .art .fan3 img{ position:absolute; inset:auto; width:auto; height:86%; aspect-ratio:2/3; object-fit:cover; border-radius:5px; box-shadow:0 4px 12px rgba(0,0,0,.6); }
.ccard .art .fan3 .c{ z-index:2; }
.ccard .art .fan3 .l{ z-index:1; transform:translateX(-50%) rotateY(26deg) scale(.86); filter:brightness(.6); }
.ccard .art .fan3 .r{ z-index:1; transform:translateX(50%) rotateY(-26deg) scale(.86); filter:brightness(.6); }
.ccard .art.empty{ display:grid; place-items:center; color:rgba(255,255,255,.6); font-size:13px; }
.ccard .art .check, .ccard .art .sec{ z-index:3; }
.ccard.other{ opacity:.55; }
.ccard.other .meta small{ color:var(--accent-ink); font-weight:700; }
.ccard .meta.with-nav{ display:flex; align-items:center; gap:8px; }
.ccard .meta .mt{ display:grid; gap:2px; min-width:0; flex:1; }
.ccard .cv-nav{ flex:none; display:flex; align-items:center; gap:2px; padding:2px; border-radius:999px; border:1px solid var(--border); background:var(--well); color:var(--text); }
.ccard .cv-nav button{ width:30px; height:30px; border:0; border-radius:50%; background:transparent; color:var(--text); display:grid; place-items:center; cursor:pointer; }
.ccard .cv-nav button:hover{ background:var(--hover); }
.ccard .cv-nav svg{ width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2.4; stroke-linecap:round; stroke-linejoin:round; }
.ccard .cv-n{ min-width:30px; text-align:center; font-size:12px; font-weight:700; font-variant-numeric:tabular-nums; }
#rows .thumb .fan3{ position:absolute; inset:0; display:grid; place-items:center; perspective:400px; }
.order .home[hidden]{ display:none; }

/* setup ID + password, login window */
.acct{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 16px; margin-bottom:18px; text-align:start; }
.acct-f{ display:grid; gap:6px; font-size:13px; font-weight:700; color:var(--dim); }
.acct-in{ display:flex; align-items:center; gap:6px; height:44px; padding:0 6px 0 12px; border:1px solid var(--border); border-radius:12px; background:var(--well); }
.acct-in output{ flex:1; min-width:0; font:600 15px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color:var(--text); overflow:hidden; text-overflow:ellipsis; }
.acct-in output.pending{ font-family:inherit; color:var(--faint); }
.acct-f input{ height:44px; padding:0 12px; border:1px solid var(--border); border-radius:12px; background:var(--well); color:var(--text); font:inherit; font-size:15px; }
.acct-f input:focus{ outline:none; border-color:var(--accent); }
.acct-f input.bad{ border-color:var(--accent); box-shadow:0 0 0 2px var(--accent-soft); }
.acct-hint{ grid-column:1 / -1; margin:0; }
@media (max-width:640px){ .acct{ grid-template-columns:minmax(0,1fr); } }
.nuvio-file{ display:inline-flex; align-items:center; gap:8px; margin:14px auto 0; }
.nuvio-file[hidden], #nuvio-file-hint[hidden]{ display:none; }
.text-tool{ width:auto !important; padding:0 12px; font:inherit; font-size:13px; font-weight:700; white-space:nowrap; }
.login-dlg{ width:min(92vw,420px); padding:0; border:1px solid var(--border); border-radius:20px; background:var(--surface); color:var(--text); box-shadow:0 20px 60px rgba(0,0,0,.4); }
.login-dlg::backdrop{ background:rgba(0,0,0,.55); backdrop-filter:blur(3px); }
.login-dlg form{ display:grid; gap:14px; padding:24px; text-align:start; }
.login-dlg h2{ margin:0; font-size:22px; }
.login-dlg .hint{ margin:0; }
.login-acts{ display:flex; justify-content:flex-end; gap:8px; }

/* 2.17.1: Layout thumbs — catalogs = fan of 3 posters (not stretched), collections = their cover; the name never runs under the picture */
#rows .thumb .fan3 img{ position:absolute; inset:auto; width:auto; height:84%; aspect-ratio:2/3; object-fit:cover; border-radius:3px; box-shadow:0 3px 8px rgba(0,0,0,.5); }
#rows .thumb .fan3 .l{ transform:translateX(-46%) rotateY(28deg) scale(.86); filter:brightness(.6); }
#rows .thumb .fan3 .r{ transform:translateX(46%) rotateY(-28deg) scale(.86); filter:brightness(.6); }
#rows .thumb .fan3 .c{ z-index:2; }
#rows .thumb{ background:radial-gradient(ellipse at center, #3a1a1f, #120708); }
#rows .name{ min-width:0; overflow:hidden; }
#rows .rn{ box-sizing:border-box; max-width:100%; }

/* install, laid out as on Collections+ (2.21.3): account row, summary, password + save, then one icon per app */
.install-card .account-row{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; font-size:14px; color:var(--dim); }
.install-card .account-row span{ margin-inline-end:auto; overflow-wrap:anywhere; }
.install-card .btn.small{ margin-top:0; }
.install-card .lead{ margin:0 0 6px; color:var(--dim); font-size:16px; line-height:1.5; }
.install-box{ display:grid; justify-items:start; gap:10px; }
.owner-pass{ max-width:420px; width:100%; display:grid; gap:8px; }
.owner-pass .hint{ margin:0; }
.install-card .field{ display:grid; gap:8px; width:100%; }
.install-card .field > span{ font-size:14px; font-weight:500; color:var(--dim); }
.install-card .field input{ height:48px; padding:0 14px; border-radius:12px; border:1px solid var(--border); background:var(--well); color:var(--text);
  font:inherit; font-size:16px; outline:0; min-width:0; width:100%; transition:border-color .2s ease, box-shadow .2s ease; }
.install-card .field input:focus{ border-color:var(--accent); }
.install-card .field input.bad{ border-color:var(--accent); box-shadow:0 0 0 2px var(--accent-soft); }
.btn.big{ height:56px; padding:0 30px; font-size:17px; }
.install-card .err{ margin:0; color:var(--accent-ink); font-size:14px; min-height:1.2em; }
.install-card .err:empty{ display:none; }
.install-card .done{ display:grid; gap:18px; margin-top:8px; padding-top:20px; border-top:1px solid var(--border); }
.install-card .done[hidden]{ display:none; }
.install-card .done .hint{ margin:0; }
.apps-label{ margin:0; font-size:14px; font-weight:600; color:var(--dim); }
.reinstall-note{ margin:0; color:var(--accent-ink); font-size:14px; }
.done-actions{ display:flex; flex-wrap:wrap; gap:14px; }
.app-icon{ display:grid; justify-items:center; gap:8px; width:112px; padding:16px 8px 12px; border-radius:20px; text-decoration:none;
  border:1px solid var(--line); background:var(--well); color:var(--text); transition:transform .2s var(--ease-out), border-color .2s ease, box-shadow .2s ease; }
.app-icon img{ width:64px; height:64px; border-radius:16px; object-fit:contain; display:block; }
.app-icon b{ font-size:14px; font-weight:600; }
@media (hover:hover){ .app-icon:hover{ transform:translateY(-3px); border-color:var(--accent); } }
.app-icon:active{ transform:scale(.96); }
.install-card .nuvio-file{ margin:0; justify-self:start; }
.copy-row{ display:flex; gap:8px; }
.copy-row input{ flex:1; font-family:ui-monospace, SFMono-Regular, Menlo, monospace; font-size:14px !important; direction:ltr; }
.copy-row .btn{ height:48px; flex:none; }
@media (max-width:640px){ .app-icon{ flex:1 1 0; width:auto; } }
.install-card .btn.ghost.small{ height:38px; padding:0 16px; font-size:14px; }
.install-card .copy-row .btn.ghost.small{ height:48px; padding:0 20px; }

/* 2.21.4: a full-size copy button for the manifest link; delete the setup, as on Collections+ */
.install-card .copy-row input{ height:56px; font-family:inherit; font-size:17px !important; font-weight:600; }
.install-card .copy-row .copy-btn{ height:52px; padding:0 22px; font-size:15px; flex:none; }
.copy-btn svg{ fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
@media (max-width:640px){ .install-card .copy-row{ flex-direction:column; } .install-card .copy-row .copy-btn{ width:100%; } }
.danger-zone{ margin-top:8px; padding-top:20px; border-top:1px solid var(--border); display:grid; grid-template-columns:minmax(0,1fr); gap:10px; }
.danger-zone[hidden]{ display:none; }
.danger-zone h3{ margin:0; font-size:16px; }
.danger-zone .hint{ margin:0; }
.del-row{ display:flex; gap:8px; max-width:420px; }
.del-row input{ flex:1; min-width:0; height:44px; padding:0 12px; border:1px solid var(--border); border-radius:12px; background:var(--well); color:var(--text); font:inherit; font-size:15px; outline:0; }
.del-row input:focus{ border-color:var(--accent); }
.del-btn{ height:44px; background:var(--accent); color:var(--on-accent); border-color:transparent; flex:none; }
@media (hover:hover){ .del-btn:hover{ background:var(--accent-ink); border-color:transparent; } }
.install-card .err:empty{ display:none; }

/* 2.21.10: live drag (liveSort): the held row floats above the others, which slide out of its way */
.order, .rank{ position:relative; }
.order li, .rank li{ position:relative; }
@media (pointer:fine){ .order li, .rank li{ cursor:grab; } .order li .rn, .order li button, .rank li button{ cursor:pointer; } .order li .rn{ cursor:text; } }
.order .grip, .rank .grip{ touch-action:none; }
.order li.lifted, .rank li.lifted{ z-index:5; cursor:grabbing; border-color:var(--accent); box-shadow:0 14px 34px rgba(0,0,0,.35); background:var(--raised); }
body.sorting, body.sorting *{ user-select:none; -webkit-user-select:none; cursor:grabbing !important; }

/* 2.26.2: HTTP / Debrid above the section tabs */
.src-line{ display:flex; justify-content:center; margin:4px 0 6px; }
.src-seg[hidden]{ display:none; }
.src-seg button{ display:inline-flex; align-items:center; justify-content:center; gap:8px; }
.src-seg .tab-n{ min-width:22px; height:22px; padding:0 6px; display:inline-grid; place-items:center; border-radius:999px; font-size:12px; font-weight:800; background:var(--border); color:var(--dim); font-variant-numeric:tabular-nums; }
.src-seg .tab-n.on{ background:var(--accent); color:var(--on-accent); }

/* 2.50.0 (owner, as AIOStreams): debrid accounts on / off and in order; HTTP sections on / off (on = red) */
.dcard .dnum{ display:inline-grid; place-items:center; width:22px; height:22px; border-radius:50%; background:var(--accent); color:var(--on-accent); font:700 12px/1 'Space Grotesk',sans-serif; flex:none; }
.dcard .dctl{ display:flex; align-items:center; gap:4px; margin-inline-start:auto; }
.dcard .mvb{ width:28px; height:28px; border-radius:8px; border:1px solid var(--border); background:var(--surface); color:var(--dim); cursor:pointer; font-size:14px; line-height:1; }
.dcard .mvb:disabled{ opacity:.35; cursor:default; }
@media (hover:hover){ .dcard .mvb:not(:disabled):hover{ color:var(--accent); border-color:var(--accent); } }
.dcard .mvb:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
.dcard.off{ opacity:.55; }
.dcard.off .dnum{ background:var(--line); color:var(--dim); }
.dcard .state:empty{ display:none; }
.dorder{ margin:0 0 10px; font-size:13px; color:var(--dim); }
.hx-wrap{ margin-top:12px; padding:14px 16px; border:1px solid var(--border); border-radius:16px; background:var(--surface); }
.hx-wrap[hidden]{ display:none; }
.hx-title{ display:block; font-size:15px; font-weight:800; }
.hx-note{ margin:4px 0 10px; font-size:13px; color:var(--dim); }
.hx-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:8px; }
.hx-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 12px; border:1px solid var(--border); border-radius:12px; cursor:pointer; }
.hx-row:has(.sw:checked){ border-color:var(--accent); background:var(--accent-soft); }
.hx-row .name{ font-weight:700; font-size:14px; }
.svc-col .hx-wrap{ margin:0; }
.svc-col .dcard{ grid-template-columns:minmax(0,1fr) auto; grid-template-areas:"top top" "key get" "state state"; }
.svc-col .dcard .dtop{ width:auto; }
.svc-col .dcard .state{ grid-area:state; font-size:12.5px; }
@media (max-width:640px){ .svc-col .dcard{ grid-template-areas:"top top" "key key" "get state"; } }
/* 2.50.3 (owner): the debrid box like the sections box: three account tiles on top, one full-width line per account on;
   both boxes the same height */
.svc-grid{ align-items:stretch; }
.svc-col{ display:flex; flex-direction:column; }
.svc-col > .choice{ flex:none; }
.svc-col > .hx-wrap{ flex:1; }
.dsel{ grid-template-columns:repeat(3,minmax(0,1fr)); }
.dtile .tname{ display:flex; align-items:center; gap:8px; min-width:0; }
.dtile .svc-icon{ width:26px; height:26px; border-radius:8px; }
.dtile .svc-icon img{ width:18px; height:18px; }
.dtile .name{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dlines{ display:grid; gap:8px; margin-top:10px; }
.dlines[hidden]{ display:none; }
.svc-col .dlines .dcard{ grid-template-columns:minmax(0,1fr) auto; grid-template-areas:"top top" "key get"; }
.dcard .dtop b{ flex:1; min-width:0; }
.dcard .dtop .state{ margin-inline-start:0; }
.dcard .dtop .dctl{ margin-inline-start:0; }
.dcard[hidden]{ display:none !important; }
@media (max-width:640px){ .dsel{ grid-template-columns:minmax(0,1fr); } .svc-col .dlines .dcard{ grid-template-areas:"top top" "key key" "get get"; } }
.dtile{ padding:9px 10px; gap:8px; }
.dtile .name{ font-size:14px; }
/* 2.52.0 (owner): report a problem */
.rp{ display:grid; gap:18px; max-width:760px; }
.rp-row{ display:flex; flex-wrap:wrap; gap:12px; }
.rp-seg{ display:inline-flex; gap:4px; padding:4px; border:1px solid var(--border); border-radius:12px; background:var(--surface); }
.rp-seg button{ border:0; background:transparent; color:var(--dim); padding:8px 16px; border-radius:9px; font:inherit; font-weight:700; cursor:pointer; }
.rp-seg button[aria-pressed="true"]{ background:var(--accent); color:var(--on-accent); }
.rp-grid{ display:grid; grid-template-columns:minmax(0,1fr) 120px 120px; gap:12px; align-items:end; }
@media (max-width:640px){ .rp-grid{ grid-template-columns:1fr 1fr; } .rp-grid .rp-name{ grid-column:1 / -1; } }
.rp input[type=text], .rp input[type=number], .rp textarea{ width:100%; padding:11px 13px; border:1px solid var(--border); border-radius:12px; background:var(--surface); color:var(--text, inherit); font:inherit; }
.rp textarea{ resize:vertical; min-height:110px; }
.rp input:focus-visible, .rp textarea:focus-visible{ outline:2px solid var(--accent); outline-offset:1px; }
.rp-label{ display:block; font-weight:700; margin-bottom:8px; }
.rp-tags{ display:flex; flex-wrap:wrap; gap:8px; }
.rp-tags button{ border:1px solid var(--border); background:var(--surface); color:inherit; padding:7px 13px; border-radius:999px; font:inherit; font-size:14px; cursor:pointer; }
.rp-tags button[aria-pressed="true"]{ border-color:var(--accent); background:var(--accent-soft); color:var(--accent-ink); font-weight:700; }
@media (hover:hover){ .rp-tags button:hover, .rp-seg button:not([aria-pressed="true"]):hover{ color:var(--accent-ink); } }
.rp-send{ display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
.rp-msg.ok{ color:var(--ok); font-weight:700; }
.rp-msg.warn{ color:var(--accent-ink); font-weight:700; }
.rp .field{ display:grid; gap:8px; width:100%; font-weight:700; }
.rp .field input, .rp .field textarea{ font-weight:400; }
/* 2.57.0 (owner): the direct-links box also holds debrid accounts for file hosts, under a line, same design as the
   debrid box, without growing: the sections in four columns, slimmer tiles and switches, the accounts in one row */
#http-wrap .hx-grid#hx{ grid-template-columns:repeat(auto-fill,minmax(122px,1fr)); gap:6px; }
#http-wrap .hx-row{ padding:6px 5px 6px 7px; gap:5px; }
#http-wrap .hx-row .name{ font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#http-wrap .sw{ width:30px; height:18px; }
#http-wrap .sw::after{ top:2px; inset-inline-start:2px; width:14px; height:14px; }
#http-wrap .sw:checked::after{ transform:translateX(12px); }
:root[dir="rtl"] #http-wrap .sw:checked::after{ transform:translateX(-12px); }
#http-wrap .hx-note{ margin:2px 0 8px; }
.hx-sep{ border:0; border-top:1px solid var(--border); margin:10px 0 8px; }
#http-wrap .hdx > .hx-title{ display:inline; font-size:14px; }
#http-wrap .hdx > .hx-note{ display:inline; margin:0 6px; font-size:12px; }
#http-wrap .hdx .dsel{ grid-template-columns:repeat(auto-fill,minmax(122px,1fr)); gap:6px; margin-top:7px; }
@media (max-width:640px){ #http-wrap .hdx > .hx-note{ display:block; margin:2px 0 0; } }
