/* ============================================================================
   styles.css — Sistema visual "Marvel Vault"
   Paleta: void negro · rojo Marvel · detalles dorados · vidrio esmerilado
   Tipografía: Archivo (display) · Inter (texto) · Space Mono (datos)
   ========================================================================== */

:root {
  /* Color */
  --void: #08080b;
  --void-2: #0d0d12;
  --panel: rgba(22, 22, 29, 0.55);
  --panel-solid: #16161d;
  --stroke: rgba(255, 255, 255, 0.08);
  --stroke-strong: rgba(255, 255, 255, 0.16);
  --red: #e62429;
  --red-bright: #ff3b3f;
  --red-deep: #9d0f13;
  --gold: #e5b567;
  --gold-soft: rgba(229, 181, 103, 0.85);
  --ink: #f4f4f7;
  --muted: #9a9aa6;
  --muted-2: #6c6c78;
  --ok: #46d19e;

  /* Type */
  --font-display: 'Archivo', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, monospace;

  /* Space + shape */
  --radius: 20px;
  --radius-sm: 13px;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
  --shadow-soft: 0 12px 40px -18px rgba(0, 0, 0, 0.65);
  --blur: saturate(150%) blur(26px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --maxw: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--void);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient background aura */
.bg-aura {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 45% at 80% -5%, rgba(230, 36, 41, 0.22), transparent 60%),
    radial-gradient(55% 40% at 8% 0%, rgba(229, 181, 103, 0.10), transparent 55%),
    radial-gradient(80% 60% at 50% 120%, rgba(60, 20, 90, 0.20), transparent 70%),
    linear-gradient(180deg, var(--void), var(--void-2));
}
.bg-aura::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity: 0.5;
  mix-blend-mode: screen;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- Top bar ---------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  background: rgba(8, 8, 11, 0.62);
  border-bottom: 1px solid var(--stroke);
}
.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 13px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 11px; margin-right: auto; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(145deg, var(--red), var(--red-deep));
  display: grid; place-items: center;
  box-shadow: 0 6px 18px -6px rgba(230, 36, 41, 0.7), inset 0 1px 0 rgba(255,255,255,0.25);
  position: relative;
}
.brand-mark::before {
  content: ''; position: absolute; inset: 6px;
  border: 2px solid rgba(255,255,255,0.85); border-radius: 4px;
  clip-path: polygon(0 0, 32% 0, 50% 42%, 68% 0, 100% 0, 100% 100%, 68% 100%, 50% 58%, 32% 100%, 0 100%);
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.brand-name span { color: var(--gold); }

.tabs { display: flex; gap: 4px; background: rgba(255,255,255,0.04); padding: 4px; border-radius: 12px; border: 1px solid var(--stroke); }
.tab {
  font-family: var(--font-display);
  font-weight: 700; font-size: 0.8rem; letter-spacing: 0.05em;
  color: var(--muted); background: transparent; border: 0; cursor: pointer;
  padding: 8px 15px; border-radius: 9px; transition: color 0.25s, background 0.25s;
  text-transform: uppercase;
}
.tab.active { color: var(--ink); background: linear-gradient(145deg, rgba(230,36,41,0.9), rgba(157,15,19,0.9)); box-shadow: 0 6px 16px -8px rgba(230,36,41,0.8); }
.tab:hover:not(.active) { color: var(--ink); }

.tools { display: flex; align-items: center; gap: 9px; }
.search {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--stroke);
  border-radius: 11px; padding: 8px 12px; transition: border-color 0.25s, background 0.25s;
}
.search:focus-within { border-color: var(--gold-soft); background: rgba(255,255,255,0.08); }
.search svg { flex: none; opacity: 0.6; }
.search input {
  background: transparent; border: 0; outline: 0; color: var(--ink);
  font-family: var(--font-body); font-size: 0.88rem; width: 150px;
}
.search input::placeholder { color: var(--muted-2); }

.icon-btn {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center;
  background: rgba(255,255,255,0.05); border: 1px solid var(--stroke);
  border-radius: 11px; color: var(--ink); cursor: pointer; transition: 0.22s;
}
.icon-btn:hover { background: rgba(255,255,255,0.1); border-color: var(--stroke-strong); transform: translateY(-1px); }

/* Menu (export/import) */
.menu { position: relative; }
.menu-pop {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--panel-solid); border: 1px solid var(--stroke-strong);
  border-radius: 14px; padding: 6px; min-width: 208px; box-shadow: var(--shadow);
  display: none; flex-direction: column; gap: 2px; z-index: 60;
}
.menu-pop.open { display: flex; animation: pop 0.2s var(--ease); }
.menu-pop button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: transparent; border: 0; color: var(--ink); cursor: pointer;
  padding: 10px 12px; border-radius: 9px; font-size: 0.86rem; text-align: left;
  font-family: var(--font-body);
}
.menu-pop button:hover { background: rgba(255,255,255,0.07); }
.menu-pop button.danger:hover { background: rgba(230,36,41,0.16); color: var(--red-bright); }
.menu-pop hr { border: 0; border-top: 1px solid var(--stroke); margin: 4px 2px; }

/* ---------- Universe header ------------------------------------------- */
.uni-head { padding: 40px 0 8px; }
.eyebrow {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.32em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ''; width: 26px; height: 1px; background: var(--gold-soft); }
.uni-title {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(2rem, 5.2vw, 3.5rem); line-height: 0.98; letter-spacing: -0.02em;
}
.uni-sub { color: var(--muted); margin-top: 10px; font-size: 0.96rem; max-width: 42ch; }

/* ---------- Hero "next up" -------------------------------------------- */
.hero {
  margin-top: 26px;
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid var(--stroke);
  background: var(--panel);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid; grid-template-columns: 300px 1fr;
  min-height: 380px;
}
.hero-poster { position: relative; overflow: hidden; }
.hero-body { padding: 34px 38px; display: flex; flex-direction: column; justify-content: center; gap: 16px; position: relative; }
.hero-flag {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--gold); display: flex; align-items: center; gap: 9px;
}
.hero-flag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px var(--gold); animation: pulse 2s infinite; }
.hero-title {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(1.7rem, 4vw, 2.9rem); line-height: 1; letter-spacing: -0.02em;
}
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hero-synopsis { color: var(--muted); font-size: 0.98rem; max-width: 56ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

.hero-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; padding: 60px 30px; }
.hero-empty .big { font-family: var(--font-display); font-weight: 900; font-size: 2rem; }
.hero-empty .trophy { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(145deg, var(--gold), #b8863f); box-shadow: 0 12px 30px -10px rgba(229,181,103,0.6); }

/* Pills / meta chips */
.pill {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em;
  padding: 5px 10px; border-radius: 8px; border: 1px solid var(--stroke-strong);
  background: rgba(255,255,255,0.05); color: var(--ink); white-space: nowrap;
}
.pill.type-movie { color: #ffd9a8; border-color: rgba(229,181,103,0.4); }
.pill.type-series { color: #a8d8ff; border-color: rgba(120,180,255,0.35); }
.pill.type-special { color: #d8b0ff; border-color: rgba(190,140,255,0.35); }
.pill.gold { color: var(--void); background: var(--gold); border-color: transparent; font-weight: 700; }

/* Buttons */
.btn {
  font-family: var(--font-display); font-weight: 700; font-size: 0.86rem; letter-spacing: 0.04em;
  border: 1px solid var(--stroke-strong); background: rgba(255,255,255,0.06); color: var(--ink);
  padding: 13px 20px; border-radius: 13px; cursor: pointer; transition: 0.22s var(--ease);
  display: inline-flex; align-items: center; gap: 9px; text-transform: uppercase;
}
.btn:hover { background: rgba(255,255,255,0.12); transform: translateY(-2px); border-color: var(--stroke-strong); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(145deg, var(--red), var(--red-deep)); border-color: transparent;
  box-shadow: 0 14px 30px -12px rgba(230,36,41,0.8), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-primary:hover { background: linear-gradient(145deg, var(--red-bright), var(--red)); box-shadow: 0 18px 38px -12px rgba(230,36,41,0.9); }
.btn-ghost { background: transparent; }
.btn-done { background: linear-gradient(145deg, rgba(70,209,158,0.2), rgba(70,209,158,0.08)); border-color: rgba(70,209,158,0.4); color: var(--ok); }

/* ---------- Progress panel -------------------------------------------- */
.panel-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; margin-top: 18px; }
.glass {
  border: 1px solid var(--stroke); background: var(--panel);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border-radius: var(--radius); box-shadow: var(--shadow-soft);
}
.progress-card { padding: 26px 28px; display: flex; flex-direction: column; gap: 18px; }
.progress-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.progress-label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--muted); }
.ring-wrap { display: flex; align-items: center; gap: 22px; }
.ring { --p: 0; width: 108px; height: 108px; flex: none; position: relative; display: grid; place-items: center; }
.ring svg { transform: rotate(-90deg); }
.ring .track { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 9; }
.ring .fill { fill: none; stroke: url(#ringgrad); stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset 0.9s var(--ease); }
.ring-num { position: absolute; text-align: center; }
.ring-num b { font-family: var(--font-display); font-weight: 900; font-size: 1.5rem; display: block; line-height: 1; }
.ring-num small { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.1em; color: var(--muted); }
.ring-info { display: flex; flex-direction: column; gap: 4px; }
.ring-info .n { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; }
.ring-info .l { color: var(--muted); font-size: 0.82rem; }

/* Film-reel segmented bar (signature) */
.reel { display: flex; gap: 4px; }
.reel .seg {
  flex: 1; height: 12px; border-radius: 4px; background: rgba(255,255,255,0.08);
  position: relative; overflow: hidden; transition: 0.4s var(--ease);
}
.reel .seg.done { background: linear-gradient(145deg, var(--gold), #c68f3c); box-shadow: 0 0 10px -2px rgba(229,181,103,0.6); }
.reel .seg.partial { background: linear-gradient(145deg, rgba(229,181,103,0.5), rgba(229,181,103,0.2)); }
.reel-legend { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 0.68rem; color: var(--muted); letter-spacing: 0.06em; }

.time-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.time-box { border: 1px solid var(--stroke); border-radius: var(--radius-sm); padding: 15px 16px; background: rgba(255,255,255,0.03); }
.time-box .k { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.time-box .v { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; margin-top: 5px; }
.time-box .v small { font-size: 0.75rem; color: var(--muted); font-weight: 500; font-family: var(--font-body); }
.time-box.accent .v { color: var(--gold); }

/* ---------- Global stats strip ---------------------------------------- */
.stats-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-top: 18px; }
.stat { padding: 18px 16px; text-align: left; }
.stat .v { font-family: var(--font-display); font-weight: 900; font-size: 1.6rem; line-height: 1; }
.stat .v.red { color: var(--red-bright); }
.stat .k { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }

/* ---------- Filters ---------------------------------------------------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 34px 0 18px; align-items: center; }
.filters .label { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted-2); margin-right: 4px; }
.chip {
  font-family: var(--font-body); font-weight: 600; font-size: 0.82rem;
  color: var(--muted); background: rgba(255,255,255,0.04); border: 1px solid var(--stroke);
  padding: 8px 15px; border-radius: 999px; cursor: pointer; transition: 0.2s;
}
.chip:hover { color: var(--ink); border-color: var(--stroke-strong); }
.chip.active { color: var(--void); background: var(--ink); border-color: transparent; font-weight: 700; }
.count-note { margin-left: auto; font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); }

/* ---------- Card grid -------------------------------------------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 18px; padding-bottom: 60px; }
.card {
  border: 1px solid var(--stroke); border-radius: var(--radius);
  background: var(--panel); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  overflow: hidden; transition: transform 0.35s var(--ease), border-color 0.3s, box-shadow 0.35s;
  display: flex; flex-direction: column; position: relative;
}
.card:hover { transform: translateY(-4px); border-color: var(--stroke-strong); box-shadow: var(--shadow); }
.card.done { border-color: rgba(70,209,158,0.35); }
.card.done::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(70,209,158,0.08));
}

/* Poster (designed, gradient-based) */
.poster {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  background: linear-gradient(150deg, var(--g1, #333), var(--g2, #111));
  display: flex; align-items: flex-end; padding: 15px 16px;
}
.poster::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(80% 60% at 78% 12%, rgba(255,255,255,0.22), transparent 55%),
    linear-gradient(180deg, transparent 35%, rgba(0,0,0,0.55));
}
.poster::after {
  content: ''; position: absolute; inset: 0; opacity: 0.4; mix-blend-mode: overlay;
  background-image: radial-gradient(rgba(255,255,255,0.4) 0.5px, transparent 0.5px);
  background-size: 4px 4px;
}
.poster .ord {
  position: absolute; top: 12px; left: 14px; z-index: 2;
  font-family: var(--font-display); font-weight: 900; font-size: 2.4rem;
  color: rgba(255,255,255,0.16); line-height: 1;
}
.poster .studio {
  position: absolute; top: 15px; right: 14px; z-index: 2;
  font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}
.poster .ptitle {
  position: relative; z-index: 2;
  font-family: var(--font-display); font-weight: 900; font-size: 1.28rem; line-height: 1.02;
  letter-spacing: -0.01em; text-shadow: 0 2px 14px rgba(0,0,0,0.6); text-wrap: balance;
}
.poster.hero-p { aspect-ratio: auto; height: 100%; padding: 26px; }
.poster.hero-p .ptitle { display: none; }
.poster.hero-p .ord { font-size: 6rem; top: auto; bottom: 18px; left: 22px; }

.card-body { padding: 15px 17px 17px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-title { font-family: var(--font-display); font-weight: 800; font-size: 1.04rem; line-height: 1.08; }
.card-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dur { font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; }
.status.pending { color: var(--muted); }
.status.done { color: var(--ok); }
.status .s-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.card-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 6px; }
.mini-btn {
  flex: 1; font-family: var(--font-body); font-weight: 600; font-size: 0.8rem;
  padding: 10px; border-radius: 10px; border: 1px solid var(--stroke); cursor: pointer;
  background: rgba(255,255,255,0.05); color: var(--ink); transition: 0.2s; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.mini-btn:hover { background: rgba(255,255,255,0.1); }
.mini-btn.primary { background: linear-gradient(145deg, var(--red), var(--red-deep)); border-color: transparent; }
.mini-btn.primary:hover { background: linear-gradient(145deg, var(--red-bright), var(--red)); }
.mini-btn.undo { background: rgba(70,209,158,0.14); border-color: rgba(70,209,158,0.35); color: var(--ok); }
.mini-btn.expander { flex: 0 0 44px; }

/* Details */
.details { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.4s var(--ease); }
.card.expanded .details { grid-template-rows: 1fr; }
.details-inner { overflow: hidden; }
.details-pad { padding: 4px 17px 18px; border-top: 1px solid var(--stroke); margin-top: 4px; display: flex; flex-direction: column; gap: 14px; }
.meta-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 0.84rem; }
.meta-list dt { color: var(--muted-2); font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; padding-top: 2px; }
.meta-list dd { color: var(--ink); }
.syn { font-size: 0.88rem; color: var(--muted); line-height: 1.6; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 0.72rem; padding: 4px 9px; border-radius: 7px; background: rgba(255,255,255,0.05); border: 1px solid var(--stroke); color: var(--ink); }

/* Episodes */
.eps { display: flex; flex-direction: column; gap: 6px; }
.eps-head { display: flex; justify-content: space-between; align-items: center; }
.eps-head .h { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.eps-head button { background: transparent; border: 0; color: var(--gold); font-size: 0.76rem; cursor: pointer; font-family: var(--font-body); }
.eps-head button:hover { text-decoration: underline; }
.ep {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 10px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--stroke); cursor: pointer; transition: 0.18s;
}
.ep:hover { background: rgba(255,255,255,0.06); }
.ep .box {
  width: 20px; height: 20px; flex: none; border-radius: 6px; border: 1.5px solid var(--stroke-strong);
  display: grid; place-items: center; transition: 0.2s;
}
.ep.on .box { background: var(--ok); border-color: var(--ok); }
.ep.on .box svg { opacity: 1; }
.ep .box svg { opacity: 0; transition: 0.15s; }
.ep .n { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); width: 26px; flex: none; }
.ep .t { font-size: 0.84rem; flex: 1; }
.ep.on .t { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(255,255,255,0.25); }
.ep .len { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted-2); }

/* ---------- Toast ------------------------------------------------------ */
.toast-zone { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 10px; align-items: center; width: min(94vw, 460px); }
.toast {
  display: flex; align-items: center; gap: 14px; width: 100%;
  background: rgba(20,20,27,0.9); border: 1px solid var(--stroke-strong);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border-radius: 14px; padding: 13px 16px; box-shadow: var(--shadow);
  animation: toastIn 0.4s var(--ease);
}
.toast .t-icon { width: 32px; height: 32px; border-radius: 9px; flex: none; display: grid; place-items: center; background: rgba(70,209,158,0.16); color: var(--ok); }
.toast .t-body { flex: 1; }
.toast .t-title { font-weight: 700; font-size: 0.9rem; }
.toast .t-sub { font-size: 0.78rem; color: var(--muted); }
.toast .t-undo { font-family: var(--font-display); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--gold); background: rgba(229,181,103,0.12); border: 1px solid rgba(229,181,103,0.35); padding: 8px 14px; border-radius: 10px; cursor: pointer; }
.toast .t-undo:hover { background: rgba(229,181,103,0.22); }
.toast.out { animation: toastOut 0.35s var(--ease) forwards; }

/* Badge celebration */
.badge-toast { text-align: center; padding: 18px; flex-direction: column; gap: 8px; }
.badge-toast .b-emoji { font-size: 2rem; }

/* Stamp burst on completion */
.burst { position: fixed; z-index: 90; pointer-events: none; width: 10px; height: 10px; }
.burst i { position: absolute; width: 8px; height: 8px; border-radius: 2px; left: 0; top: 0; animation: shard 0.8s var(--ease) forwards; }

/* ---------- Empty state ------------------------------------------------ */
.empty {
  grid-column: 1 / -1; text-align: center; padding: 70px 20px; color: var(--muted);
  border: 1px dashed var(--stroke-strong); border-radius: var(--radius); background: rgba(255,255,255,0.02);
}
.empty .e-title { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: var(--ink); margin-bottom: 8px; }
.empty button { margin-top: 14px; }

/* ---------- Footer ----------------------------------------------------- */
.foot { border-top: 1px solid var(--stroke); padding: 26px 0 40px; color: var(--muted-2); font-size: 0.78rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.foot .kbd { font-family: var(--font-mono); background: rgba(255,255,255,0.06); border: 1px solid var(--stroke); border-radius: 6px; padding: 2px 7px; font-size: 0.72rem; color: var(--ink); }

/* ---------- Animations ------------------------------------------------- */
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(18px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(18px) scale(0.96); } }
@keyframes shard { to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.rise { animation: rise 0.5s var(--ease) both; }

/* ---------- Responsive ------------------------------------------------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-poster { height: 190px; }
  .poster.hero-p { aspect-ratio: 16/7; height: 190px; }
  .poster.hero-p .ord { font-size: 4rem; }
  .panel-grid { grid-template-columns: 1fr; }
  .stats-strip { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 620px) {
  .wrap, .topbar-inner { padding-left: 16px; padding-right: 16px; }
  .brand { width: 100%; margin-right: 0; }
  .tabs { flex: 1; }
  .tab { flex: 1; text-align: center; }
  .tools { width: 100%; }
  .search { flex: 1; }
  .search input { width: 100%; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: 1fr; }
  .hero-body { padding: 24px; }
  .count-note { width: 100%; margin-left: 0; }
}

/* ---------- A11y ------------------------------------------------------- */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
