:root {
  --bg: #07070b;
  --panel: #121218;
  --panel-2: #1a1a24;
  --line: #2c2c38;
  --text: #f4f4f8;
  --muted: #9b9baf;
  --ice: #ff4d8d;
  --ice-2: #ff2d6a;
  --ok: #34d399;
  --bad: #fb7185;
  --warn: #ffd166;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html {
  color-scheme: only dark;
}
html, body { margin: 0; min-height: 100%; }
body.modal-open {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
}
body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 420px at 8% -12%, rgba(255, 45, 106, 0.22), transparent 58%),
    radial-gradient(700px 340px at 100% 0%, rgba(255, 77, 141, 0.10), transparent 52%);
  pointer-events: none;
}

.top, main { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; }
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 24px 0;
  position: relative;
}
.header-actions { display: flex; gap: 8px; align-items: center; }
.jobs-btn { position: relative; padding-right: 18px; }
.jobs-btn.busy { border-color: var(--ice-2); }
.jobs-dot {
  position: absolute;
  top: -5px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--ice-2);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
  line-height: 1;
  animation: jobPulse 1.15s ease-in-out infinite;
}
.jobs-dot.hidden { display: none !important; animation: none; }
.jobs-pop {
  position: fixed;
  inset: auto;
  margin: 0;
  width: min(360px, calc(100vw - 32px));
  max-height: min(420px, 60vh);
  overflow: auto;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 16px;
  z-index: 80;
  box-shadow: var(--shadow);
  padding: 0;
  display: none;
}
.jobs-pop.open { display: block; }
.jobs-pop[hidden] { display: none !important; }
.toast {
  position: fixed;
  left: 50%;
  right: auto;
  top: auto;
  bottom: 28px;
  transform: translateX(-50%) translateY(16px);
  z-index: 200;
  max-width: min(440px, calc(100vw - 32px));
  padding: 11px 18px;
  border-radius: 999px;
  background: #1a1a24;
  color: var(--text);
  border: 1px solid rgba(255, 45, 106, 0.45);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.jobs-pop > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.jobs-list { padding: 8px 12px 12px; display: grid; gap: 8px; color: var(--muted); font-size: 13px; }
.job-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}
.job-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.job-state {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ice);
}
.job-card.run .job-state::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--ice-2);
  animation: jobPulse 1s ease-in-out infinite;
}
.job-pct {
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ice);
}
.job-card b { display: block; font-size: 13px; color: var(--text); }
.job-card small { display: block; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.job-card .progress { margin-top: 8px; }
.job-card.run { border-color: rgba(255, 45, 106, 0.5); }
.job-card.ok {
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(52, 211, 153, 0.06);
}
.job-card.ok .job-state { color: var(--ok); }
.job-card.bad {
  border-color: rgba(251, 113, 133, 0.5);
  background: rgba(251, 113, 133, 0.07);
}
.job-card.bad .job-state { color: var(--bad); }
@keyframes jobPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.86); }
}
.brand { display: flex; gap: 10px; align-items: center; min-width: 0; }
.brand strong { display: block; font-size: 20px; letter-spacing: 0.04em; }
.brand small { color: var(--muted); }
.flake {
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 11px;
  background: none;
  flex: 0 0 auto;
  overflow: hidden;
}
.flake img { width: 36px; height: 36px; display: block; }

main { padding: 4px 24px 80px; }
.search-hero {
  text-align: center;
  padding: 16px 0 14px;
}
.search-hero .eyebrow {
  margin: 0 0 4px;
  color: var(--ice);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
}
.search-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(22px, 3.4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 720px;
  margin: 0 auto;
  padding: 6px 6px 6px 16px;
  background: rgba(18, 18, 24, 0.88);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}
.search-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: var(--muted);
  display: block;
}
.search-bar input {
  flex: 1;
  min-width: 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 12px 8px;
  border-radius: 0;
}
.search-bar .primary {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 10px 18px;
}
.hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  padding: 0;
  background: none;
  border: 0;
}
.hud-tabs, .hud-tools { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.channels-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}
.channels-bar-copy {
  flex: 1;
  min-width: 220px;
  display: grid;
  gap: 8px;
}
.channels-url {
  display: grid;
  gap: 4px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.channels-bar p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.channels-bar p strong { color: var(--text); font-weight: 700; }
.channels-bar .path-row { margin: 0; }
.channels-bar .primary {
  flex: none;
  padding: 10px 16px;
  border-radius: 12px;
}
.hud-tabs .chip { padding: 5px 11px; }
.menu { position: relative; }
.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 168px;
  padding: 5px 10px 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
}
.menu-btn:hover { border-color: #4a4a5c; }
.menu.open .menu-btn {
  border-color: var(--ice-2);
  color: var(--ice);
}
.menu-btn svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  opacity: 0.7;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.menu.open .menu-btn svg { transform: rotate(180deg); }
.menu-btn > span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.menu-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 40;
  min-width: 188px;
  max-height: min(320px, 60vh);
  overflow: auto;
  padding: 6px;
  background: #16161f;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  scrollbar-width: thin;
}
.menu:nth-last-child(-n+2) .menu-list {
  left: auto;
  right: 0;
}
.menu-list button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 13px;
  color: var(--text);
}
.menu-list button:hover { background: rgba(255, 255, 255, 0.05); }
.menu-list button.active {
  background: rgba(255, 45, 106, 0.16);
  color: var(--ice);
}
.search-row { display: flex; gap: 10px; align-items: stretch; }
.search-row input { flex: 1; min-width: 0; }
.search-row .primary { white-space: nowrap; flex: 0 0 auto; }
.path-row { display: flex; gap: 8px; align-items: stretch; }
.path-row input { flex: 1; min-width: 0; }
.path-row .ghost {
  flex: 0 0 auto;
  border-radius: 12px;
  white-space: nowrap;
  height: auto;
}
.search-box > span { display: block; color: var(--muted); margin-bottom: 8px; font-size: 13px; }

input[type="search"],
input[type="text"],
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 16px;
  outline: none;
  font-family: inherit;
}
textarea { min-height: 72px; resize: vertical; font-size: 13px; line-height: 1.4; word-break: break-all; }
input:focus, textarea:focus, select:focus {
  border-color: var(--ice-2);
  box-shadow: 0 0 0 3px rgba(255, 45, 106, 0.22);
}

.filters { display: flex; gap: 8px; flex-wrap: wrap; }
button:disabled { opacity: .45; cursor: not-allowed; }
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--ice-2);
}
.chip, .ghost {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 13px;
}
.chip.active { background: rgba(255, 45, 106, 0.18); border-color: var(--ice-2); color: var(--ice); }
.primary {
  background: linear-gradient(180deg, #ff6b9d, #ff2d6a);
  color: #1a0710;
  font-weight: 700;
  border-radius: 12px;
  padding: 12px 18px;
}
.hint { color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.card {
  position: relative;
  background: var(--panel);
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  color: inherit;
  padding: 0;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 18px 36px rgba(0,0,0,.5); }
.card .poster { border-radius: 0; }
.card.square .poster { aspect-ratio: 1; }
.card .meta {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 1;
  padding: 32px 10px 10px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.92));
}
.card b { display: block; font-size: 13px; overflow-wrap: anywhere; line-height: 1.25; }
.card small { color: #c9c9d6; }
.card .rating {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.72);
  color: var(--warn);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
}
.card .kind-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  background: rgba(255, 45, 106, 0.9);
  color: #fff;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.card .lib-tag {
  position: absolute;
  top: 32px;
  left: 8px;
  z-index: 2;
  background: rgba(52, 211, 153, 0.92);
  color: #04110c;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
}
.card-queue {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 4;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(12, 12, 18, 0.72);
  color: #ececf4;
  display: grid;
  place-items: center;
  backdrop-filter: blur(8px);
  line-height: 0;
  opacity: 0.88;
}
.card-queue:hover {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(22, 22, 30, 0.9);
}
.card-queue svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}
.card-queue-spin {
  display: none;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(236, 236, 244, 0.25);
  border-top-color: #ececf4;
  border-radius: 50%;
}
.card-queue.busy {
  pointer-events: none;
}
.card-queue.busy svg { display: none; }
.card-queue.busy .card-queue-spin {
  display: block;
  animation: spin .7s linear infinite;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.lib-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(52, 211, 153, 0.16);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}
.trailer-box {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 48px 20px 20px;
  background: rgba(7, 7, 11, 0.92);
}
.trailer-box.hidden { display: none !important; }
.trailer-box .close {
  z-index: 41;
  position: absolute;
  top: 10px;
  right: 10px;
}
.trailer-frame {
  width: min(100%, 720px);
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.trailer-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
.shelf { margin: 18px 0 28px; }
.shelf-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}
.shelf-head h2 { margin: 0; font-size: 22px; letter-spacing: -0.02em; }
.shelf-head button { color: var(--ice); font-weight: 700; }
.card.skel { pointer-events: none; }
.card.skel .poster {
  background: linear-gradient(90deg, #16161e, #242432, #16161e);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}
.sentinel {
  height: 80px;
  width: 100%;
  pointer-events: none;
}
.pager {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 8px 0 24px;
}
.pager .ghost { min-width: 180px; }

.poster {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  background: linear-gradient(160deg, #1c1420, #0c0c12);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.poster img.is-hidden { display: none; }
.poster-fallback {
  font-size: 42px;
  font-weight: 700;
  color: #6b5a72;
  user-select: none;
}

dialog {
  border: 0;
  padding: 0;
  background: var(--panel);
  color: var(--text);
  color-scheme: only dark;
  max-width: 620px;
  width: min(620px, calc(100vw - 40px));
  height: fit-content;
  max-height: min(78vh, 700px);
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: none;
  flex-direction: column;
  position: fixed;
  inset: 0;
  margin: auto;
}
dialog[open] { display: flex; }
dialog::backdrop {
  background: rgba(2, 8, 14, 0.72);
  color-scheme: only dark;
}
.sheet {
  background: transparent;
  color: var(--text);
  color-scheme: only dark;
  border: 0;
  border-radius: 0;
  padding: 48px 20px 20px;
  position: relative;
  box-shadow: none;
  max-height: none;
  overflow: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  min-height: 0;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #3a3a48 transparent;
}
.sheet::-webkit-scrollbar { width: 8px; }
.sheet::-webkit-scrollbar-thumb {
  background: #3a3a48;
  border-radius: 8px;
}
.sheet.slim { max-width: none; }
.dock {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 14px;
  border-top: 1px solid var(--line);
  background: #14141c;
}
.dock.hidden { display: none !important; }
.dock .check { margin: 0 auto 0 0; color: var(--muted); font-size: 13px; }
.close {
  position: absolute;
  right: 10px; top: 10px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--panel-2);
  color: var(--text);
  z-index: 30;
  flex: none;
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 0;
}
.close svg {
  width: 14px;
  height: 14px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.hero {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.hero .poster { border-radius: 14px; }
.hero-text { min-width: 0; }
.hero-text h2 { margin: 0 0 6px; overflow-wrap: anywhere; color: var(--text); }
.stream-head h3, .sheet h2, .sheet h3, .season strong {
  color: var(--text);
}
.kicker { color: var(--ice); text-transform: uppercase; letter-spacing: 0.12em; font-size: 12px; margin: 0 0 6px; }
.meta-line { color: var(--muted); margin: 0 0 8px; overflow-wrap: anywhere; }
.plot { color: #c5d4e0; line-height: 1.45; margin: 0; }
.hidden { display: none !important; }

.stream-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 14px 0 8px;
}
.stream-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.stream-head h3 { margin: 0; font-size: 15px; }
.src-refresh {
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: #9a9aaa;
  display: grid;
  place-items: center;
  line-height: 0;
  opacity: 0.72;
}
.src-refresh:hover {
  opacity: 1;
  color: #ececf4;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.22);
}
.src-refresh svg {
  width: 13px;
  height: 13px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.src-refresh.busy {
  pointer-events: none;
  opacity: 0.9;
}
.src-refresh.busy svg { animation: spin .8s linear infinite; }
#movieBox {
  overflow: hidden;
  min-width: 0;
  margin-bottom: 12px;
}
.streams {
  display: grid;
  gap: 4px;
  margin: 0;
  max-height: 128px;
  overflow-x: hidden;
  overflow-y: auto;
  contain: paint;
  isolation: isolate;
  background: var(--panel);
  border-radius: 10px;
  padding: 2px;
  scrollbar-width: thin;
  scrollbar-color: #3a3a48 transparent;
}
.stream {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 5px 8px;
  margin: 0;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  min-width: 0;
}
.stream input[type="radio"] {
  width: 14px;
  height: 14px;
  margin: 0;
  flex: none;
  accent-color: var(--ice-2);
}
.stream-body { min-width: 0; }
.stream-top {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  align-items: center;
  min-width: 0;
}
.stream-top .badge { flex: 0 0 auto; }
.stream-sub { display: none; }
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 700;
  background: #3a1830;
  color: var(--ice);
}
.badge.q { background: #12352c; color: var(--ok); }
.badge.lang { background: #2a2440; color: #c4b5fd; }
.probe {
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--muted);
}
.probe.ok { color: var(--ok); }
.probe.bad { color: var(--bad); }
.probe.wait {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.probe.wait::before {
  content: "";
  width: 10px;
  height: 10px;
  border: 2px solid var(--line);
  border-top-color: var(--ice);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.series-tools { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin: 8px 0 16px; flex-wrap: wrap; }
.season {
  position: relative;
  z-index: 1;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
}
.season header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.season strong { font-size: 15px; }
.eps { color: var(--muted); font-size: 13px; margin-top: 8px; overflow-wrap: anywhere; }
.ep-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ep-pills span {
  background: #0c0c12;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
}

#work { display: none !important; }
.work.hidden { display: none !important; }
.work-card {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  width: min(100%, 460px);
  background: #16161f;
  border: 1px solid rgba(255, 45, 106, 0.28);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  color: var(--text);
}
.work.ok .work-card { border-color: rgba(52, 211, 153, 0.4); }
.work.bad .work-card { border-color: rgba(251, 113, 133, 0.45); }
.work-visual {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}
.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--line);
  border-top-color: var(--ice-2);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.work-mark {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  place-items: center;
  font-size: 18px;
  font-weight: 700;
}
.work.ok .spinner, .work.bad .spinner { display: none; }
.work.ok .work-mark, .work.bad .work-mark { display: grid; }
.work.ok .work-mark {
  background: rgba(52, 211, 153, 0.16);
  color: var(--ok);
}
.work.ok .work-mark::before { content: "✓"; }
.work.bad .work-mark {
  background: rgba(251, 113, 133, 0.16);
  color: var(--bad);
}
.work.bad .work-mark::before { content: "!"; }
.work-copy { min-width: 0; flex: 1 1 220px; }
.work-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.work-copy b { display: block; color: var(--text); font-size: 15px; }
.work-pct { color: var(--ice); font-weight: 700; font-variant-numeric: tabular-nums; }
.work-copy small { display: block; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.work-actions {
  flex: 1 0 auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.work-actions:empty { display: none; }
.work-actions .primary { padding: 8px 14px; }
.progress {
  height: 7px;
  background: #241018;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 10px;
}
.progress > i {
  display: block;
  height: 100%;
  width: 18%;
  background: linear-gradient(90deg, #ff2d6a, #ffd166);
  border-radius: 999px;
  transition: width .25s ease;
}
.progress.indeterminate > i {
  width: 38%;
  animation: indeterminate 1.1s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes indeterminate {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(270%); }
}

.skeleton {
  display: grid;
  gap: 8px;
}
.skeleton i {
  display: block;
  height: 58px;
  border-radius: 12px;
  background: linear-gradient(90deg, #16161e, #242432, #16161e);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.result-msg { min-height: 0; overflow-wrap: anywhere; color: var(--text); }
.result-msg.ok { color: var(--ok); }
.result-msg.bad { color: var(--bad); }

.sheet.slim label { display: grid; gap: 6px; margin: 12px 0; color: var(--muted); }
.addons-title { margin: 20px 0 8px; }
.addon-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  margin: 10px 0;
}
.example {
  background: #0c0c12;
  color: #9fb4c6;
  padding: 12px;
  border-radius: 12px;
  overflow: auto;
  font-size: 12px;
  white-space: pre-wrap;
}
.help { color: var(--muted); overflow-wrap: anywhere; }
.help a {
  color: var(--ice);
}
.help code, .sheet code {
  color: var(--ice);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.check { display: flex; align-items: center; gap: 8px; color: var(--text); }

@media (max-width: 700px) {
  .hero { grid-template-columns: 110px minmax(0, 1fr); }
  .top, main { padding-left: 16px; padding-right: 16px; }
  .search-hero { padding: 18px 0 12px; }
  .search-bar {
    border-radius: 22px;
    flex-wrap: wrap;
    padding: 10px;
  }
  .search-bar .primary { width: 100%; }
  .browse-nav { flex-direction: column; align-items: stretch; }
}
