/* =====================================================================
   Star Wars Canon Tijdlijn — Holocron-thema (ontwerp A)
   ===================================================================== */
:root {
  --gold:#FFE81F; --gold-dim:#caa800;
  --bg:#04050a; --panel:#0c1019; --panel2:#10141f; --panel3:#0a0e16;
  --line:#1d2436; --line2:#2a3450;
  --txt:#e9eef6; --mut:#8d9bb2; --mut2:#5f6c82;
}
* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  margin:0; font-family:"Segoe UI",system-ui,-apple-system,sans-serif;
  background:var(--bg); color:var(--txt); line-height:1.5;
}
/* ---- Ship silhouettes background ---- */
.ships-bg { position:fixed; inset:0; z-index:-1; pointer-events:none; overflow:hidden; }
.ship { position:absolute; color:var(--gold); }

@keyframes drift1 { 0%,100% { transform:rotate(-18deg) translateY(0); } 50% { transform:rotate(-18deg) translateY(-18px); } }
@keyframes drift2 { 0%,100% { transform:rotate(12deg) translateY(0); } 50% { transform:rotate(12deg) translateY(14px); } }
@keyframes drift3 { 0%,100% { transform:rotate(22deg) translateY(0); } 50% { transform:rotate(22deg) translateY(-10px); } }
@keyframes drift4 { 0%,100% { transform:rotate(-8deg) translateY(0); } 50% { transform:rotate(-8deg) translateY(12px); } }
@keyframes drift5 { 0%,100% { transform:rotate(5deg) translateY(0); } 50% { transform:rotate(5deg) translateY(-14px); } }
@keyframes drift6 { 0%,100% { transform:rotate(-30deg) translateY(0); } 50% { transform:rotate(-30deg) translateY(10px); } }

.ship-isd    { width:480px; bottom:-60px; right:-80px; opacity:.06; animation:drift1 28s ease-in-out infinite; }
.ship-venator{ width:240px; top:5%; left:-40px; opacity:.05; animation:drift2 34s ease-in-out infinite; }
.ship-falcon { width:280px; top:30%; right:4%; opacity:.055; animation:drift3 22s ease-in-out infinite; }
.ship-slave1 { width:140px; top:58%; left:3%; opacity:.05; animation:drift4 26s ease-in-out infinite; }
.ship-tie    { width:200px; top:18%; left:38%; opacity:.04; animation:drift5 30s ease-in-out infinite; }
.ship-xwing  { width:130px; bottom:12%; right:28%; opacity:.05; animation:drift6 20s ease-in-out infinite; }

@media (max-width:620px) {
  .ship-isd     { width:280px; }
  .ship-venator { display:none; }
  .ship-tie     { display:none; }
  .ship-falcon  { width:180px; opacity:.04; }
}

@media (prefers-reduced-motion: reduce) {
  .ship { animation:none !important; }
}

/* starfield: kleine sterren */
body::before {
  content:""; position:fixed; inset:0; z-index:-1; pointer-events:none; background:
    radial-gradient(1.5px 1.5px at  5%  8%, #fffce0cc, transparent),
    radial-gradient(1px   1px   at 14% 22%, #ffffffaa, transparent),
    radial-gradient(2px   2px   at  9% 44%, #fff8e0bb, transparent),
    radial-gradient(1px   1px   at 21%  3%, #ffffffaa, transparent),
    radial-gradient(1.5px 1.5px at 28% 67%, #fffce0cc, transparent),
    radial-gradient(1px   1px   at 35% 14%, #ffffff99, transparent),
    radial-gradient(1px   1px   at 42% 89%, #ffffffaa, transparent),
    radial-gradient(2px   2px   at 47% 31%, #fff8e0bb, transparent),
    radial-gradient(1px   1px   at 52%  6%, #ffffff99, transparent),
    radial-gradient(1.5px 1.5px at 58% 52%, #fffce0cc, transparent),
    radial-gradient(1px   1px   at 63% 78%, #ffffffaa, transparent),
    radial-gradient(1px   1px   at 69% 19%, #ffffff99, transparent),
    radial-gradient(2px   2px   at 74% 43%, #fff8e0bb, transparent),
    radial-gradient(1px   1px   at 79% 71%, #ffffffaa, transparent),
    radial-gradient(1.5px 1.5px at 83% 28%, #fffce0cc, transparent),
    radial-gradient(1px   1px   at 88% 55%, #ffffff99, transparent),
    radial-gradient(1px   1px   at 93% 12%, #ffffffaa, transparent),
    radial-gradient(2px   2px   at 97% 84%, #fff8e0bb, transparent),
    radial-gradient(1px   1px   at 17% 91%, #ffffff99, transparent),
    radial-gradient(1px   1px   at 31% 38%, #ffffffaa, transparent),
    radial-gradient(1.5px 1.5px at 56% 96%, #fffce0cc, transparent),
    radial-gradient(1px   1px   at 72% 62%, #ffffff99, transparent),
    radial-gradient(1px   1px   at 86%  7%, #ffffffaa, transparent),
    radial-gradient(2px   2px   at 11% 73%, #fff8e0bb, transparent),
    radial-gradient(1px   1px   at 44% 47%, #ffffff99, transparent),
    radial-gradient(1px   1px   at 67% 33%, #ffffffaa, transparent),
    radial-gradient(1.5px 1.5px at 91% 68%, #fffce0cc, transparent),
    radial-gradient(1px   1px   at 38% 57%, #ffffff99, transparent),
    radial-gradient(1px   1px   at 24% 82%, #ffffffaa, transparent),
    radial-gradient(2px   2px   at 76% 17%, #fff8e0bb, transparent);
}

/* nevel/galaxy glow lagen */
body::after {
  content:""; position:fixed; inset:0; z-index:-1; pointer-events:none; background:
    radial-gradient(ellipse 55% 35% at 80%  5%, #1a2a5518, transparent),
    radial-gradient(ellipse 40% 50% at 10% 80%, #2d1a4418, transparent),
    radial-gradient(ellipse 30% 25% at 50% 50%, #0d1a3310, transparent);
}
a { color:var(--gold); }

/* ---- Kop ---- */
.site-head { padding:34px 18px 18px; text-align:center; }
.head-inner { max-width:900px; margin:0 auto; position:relative; }

.auth-btn {
  position:absolute; top:0; right:0;
  background:var(--panel2); color:var(--mut); border:1px solid var(--line2);
  border-radius:9px; padding:7px 13px; font-size:12.5px; cursor:pointer;
  transition:.15s; max-width:180px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.auth-btn:hover { border-color:var(--gold); color:var(--gold); }
.auth-btn.signed-in { color:var(--gold-dim); border-color:var(--gold-dim); }
.auth-btn.signed-in:hover { color:#ff6b6b; border-color:#ff6b6b; }
.kicker { letter-spacing:.45em; color:var(--gold); font-size:12px; text-transform:uppercase; }
h1 { margin:.18em 0 .15em; font-size:clamp(28px,6vw,46px); letter-spacing:.05em; font-weight:700; }
h1 .sw { color:var(--gold); text-shadow:0 0 24px #ffe81f55; }
.lead { color:var(--mut); margin:6px auto 0; max-width:640px; }

.overall { max-width:560px; margin:20px auto 0; }
.overall-track { height:12px; border-radius:999px; background:#12182680; border:1px solid var(--line); overflow:hidden; }
.overall-fill { height:100%; width:0; border-radius:999px; background:linear-gradient(90deg,var(--gold-dim),var(--gold)); box-shadow:0 0 16px #ffe81f88; transition:width .3s; }
.overall-label { margin-top:8px; font-size:13.5px; color:var(--mut); }

/* uitlegblok */
.about { max-width:640px; margin:18px auto 0; text-align:left; background:var(--panel); border:1px solid var(--line); border-radius:12px; }
.about summary { cursor:pointer; padding:11px 16px; font-size:14px; color:var(--txt); list-style:none; display:flex; align-items:center; gap:10px; }
.about summary::-webkit-details-marker { display:none; }
.about summary::before { content:"▸"; color:var(--gold); transition:transform .2s; }
.about[open] summary::before { transform:rotate(90deg); }
.dots-legend { margin-left:auto; display:inline-flex; gap:4px; }
.about-body { padding:0 16px 14px; font-size:13.5px; color:var(--mut); }
.about-body ul { margin:8px 0; padding-left:18px; }
.about-body li { margin:5px 0; }
.about-body b { color:#cdd6e5; }
.muted { color:var(--mut2); }

/* ---- Toolbar ---- */
.toolbar { position:sticky; top:0; z-index:10; background:#06080edd; backdrop-filter:blur(8px); border-bottom:1px solid var(--line); }
.toolbar-inner { max-width:960px; margin:0 auto; padding:11px 18px; display:flex; flex-wrap:wrap; gap:9px; align-items:center; }
.toolbar input[type=search], .toolbar select {
  background:var(--panel3); color:var(--txt); border:1px solid var(--line); border-radius:9px; padding:8px 11px; font-size:13.5px;
}
.toolbar input[type=search]::placeholder { color:var(--mut2); }
.t-search { flex:1 1 220px; min-width:170px; }
.toolbar select { cursor:pointer; }
/* ---- Multi-select type filter (checkbox dropdown) ---- */
.t-multi { position:relative; }
.t-multi-btn {
  background:var(--panel3); color:var(--txt); border:1px solid var(--line);
  border-radius:9px; padding:8px 30px 8px 11px; font-size:13.5px; cursor:pointer;
  font-family:inherit; text-align:left; white-space:nowrap; transition:.15s;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%238d9bb2' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 10px center; background-size:11px;
}
.t-multi-btn:hover { border-color:var(--line2); }
.t-multi-btn.active { color:var(--gold); border-color:var(--gold-dim); }
.t-multi-menu {
  position:absolute; top:calc(100% + 6px); left:0; z-index:20;
  background:var(--panel); border:1px solid var(--line2); border-radius:10px;
  padding:6px; min-width:200px; box-shadow:0 12px 34px #000b;
  display:flex; flex-direction:column; gap:1px; max-height:360px; overflow-y:auto;
}
.t-multi-menu[hidden] { display:none; }
.t-multi-opt {
  display:flex; align-items:center; gap:9px; padding:7px 9px; border-radius:7px;
  font-size:13.5px; color:var(--txt); cursor:pointer; user-select:none;
}
.t-multi-opt:hover { background:#ffffff09; }
.t-multi-opt input { accent-color:var(--gold); width:15px; height:15px; cursor:pointer; flex:none; margin:0; }
.t-multi-dot { width:9px; height:9px; border-radius:50%; flex:none; }
.t-multi-sep { height:1px; background:var(--line); margin:5px 2px; }
.t-multi-clear {
  background:none; border:none; color:var(--mut); font-size:12.5px; cursor:pointer;
  padding:6px 9px; text-align:left; border-radius:7px; font-family:inherit;
}
.t-multi-clear:hover { color:var(--gold); background:#ffffff09; }

.t-toggle { font-size:13px; color:var(--mut); display:inline-flex; align-items:center; gap:6px; cursor:pointer; white-space:nowrap; }
.t-toggle input { accent-color:var(--gold); }
.t-spacer { flex:1 1 0; }
.t-actions { display:flex; gap:7px; }
.toolbar button { background:var(--panel2); color:var(--txt); border:1px solid var(--line2); border-radius:9px; padding:8px 12px; font-size:13px; cursor:pointer; transition:.15s; }
.toolbar button:hover { border-color:var(--gold); color:var(--gold); }
.toolbar button.danger:hover { border-color:#ff6b6b; color:#ff6b6b; }

/* ---- Lijst ---- */
.list { max-width:960px; margin:0 auto; padding:14px 18px 70px; }

.era-section { margin-top:30px; }
.era-head { display:flex; align-items:center; gap:14px; margin-bottom:10px; }
.era-icon { color:var(--gold); filter:drop-shadow(0 0 10px #ffe81f66); flex:none; transition:filter .2s, transform .2s; }
.era-icon svg, .era-icon img { width:40px; height:40px; display:block; object-fit:contain; }
.era-head:hover .era-icon { filter:drop-shadow(0 0 16px #ffe81fbb); transform:scale(1.08); }
.era-titles { min-width:0; }
.era-name { font-size:17px; letter-spacing:.15em; text-transform:uppercase; color:var(--gold); text-shadow:0 0 14px #ffe81f33; }
.era-years { font-size:12px; color:var(--mut); }
.era-prog { margin-left:auto; display:flex; align-items:center; gap:9px; flex:none; }
.era-prog-bar { width:90px; height:6px; border-radius:999px; background:#141a28; border:1px solid var(--line); overflow:hidden; }
.era-prog-bar span { display:block; height:100%; background:linear-gradient(90deg,var(--gold-dim),var(--gold)); }
.era-prog-lbl { font-size:12px; color:var(--mut); font-variant-numeric:tabular-nums; white-space:nowrap; }

/* ---- Item ---- */
.item { border:1px solid var(--line); border-left:4px solid var(--c,#445); border-radius:12px; background:linear-gradient(180deg,var(--panel2),var(--panel)); margin:8px 0; overflow:hidden; transition:border-color .15s; }
.item:hover { border-color:#ffe81f44; }
.item.done { opacity:.6; }
.item.done .title { text-decoration:line-through; text-decoration-color:#ffe81f88; }

.row { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:14px; padding:12px 15px; cursor:pointer; }

.cb { width:26px; height:26px; flex:none; padding:0; border-radius:7px; border:2px solid var(--c,#556); background:var(--panel3); cursor:pointer; position:relative; transition:.15s; }
.cb::after { content:"✓"; position:absolute; inset:0; display:grid; place-items:center; color:#05060a; font-weight:900; font-size:16px; opacity:0; }
.item.done .cb { background:var(--gold); border-color:var(--gold); box-shadow:0 0 12px #ffe81f88; }
.item.done .cb::after { opacity:1; }

.main { min-width:0; }
.title { font-size:15.5px; font-weight:600; }
.watch-link { font-size:12px; font-weight:700; color:var(--gold); opacity:.55; text-decoration:none; margin-left:4px; vertical-align:middle; transition:opacity .15s; }
.watch-link:hover { opacity:1; text-shadow:0 0 8px #ffe81f88; }
.meta { margin-top:3px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.badge { font-size:11px; font-weight:700; letter-spacing:.03em; color:var(--c); border:1px solid var(--c); border-radius:999px; padding:1px 9px; }
.tag { font-size:10.5px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:#0a0a0a; background:var(--gold); border-radius:999px; padding:2px 8px; }

.right { display:flex; align-items:center; gap:12px; flex:none; }
.date { font-size:12.5px; color:var(--mut); font-variant-numeric:tabular-nums; white-space:nowrap; }
.dots { display:inline-flex; gap:4px; }
.dot { width:9px; height:9px; border-radius:50%; }
.dot.on { background:var(--gold); box-shadow:0 0 6px #ffe81f99; }
.dot.off { background:#2b3346; }
.caret { color:var(--mut); transition:transform .2s; font-size:12px; }
.item.open .caret { transform:rotate(180deg); color:var(--gold); }

.details { max-height:0; opacity:0; overflow:hidden; padding:0 15px 0 55px; transition:max-height .25s, opacity .2s, padding .25s; }
.item.open .details { max-height:200px; opacity:1; padding:0 15px 14px 55px; }
.details p { margin:0 0 8px; color:var(--mut); font-size:13.5px; }
.details a { font-size:13px; font-weight:600; text-decoration:none; }
.details a:hover { text-decoration:underline; }

.empty { text-align:center; color:var(--mut); padding:50px 20px; }

/* ---- Back link & char toolbar ---- */
.back-link { display:inline-block; font-size:.8rem; color:var(--gold); opacity:.6; text-decoration:none; margin-bottom:.5rem; transition:opacity .15s; }
.back-link:hover { opacity:1; }
.lead-link { color:var(--gold); opacity:.7; text-decoration:none; white-space:nowrap; }
.lead-link:hover { opacity:1; }
.char-toolbar { position:sticky; top:0; z-index:10; background:rgba(4,5,10,.92); backdrop-filter:blur(12px); border-bottom:1px solid var(--line); }

/* ---- Polished toolbar controls (characters + planets/factions/ships) ---- */
.char-toolbar .toolbar-inner { max-width:1100px; padding:13px 1rem; gap:10px; }
.char-toolbar input[type=search],
.char-toolbar select {
  background:var(--panel2); color:var(--txt);
  border:1px solid var(--line); border-radius:10px;
  padding:10px 14px; font-size:14px; font-family:inherit;
  outline:none; transition:border-color .15s, box-shadow .15s, background-color .15s;
}
.char-toolbar input[type=search] {
  flex:1 1 240px; min-width:180px; padding-left:40px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f6c82' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.2-4.2'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:left 13px center; background-size:16px;
}
.char-toolbar input[type=search]::placeholder { color:var(--mut2); }
.char-toolbar input[type=search]::-webkit-search-cancel-button { -webkit-appearance:none; appearance:none; height:14px; width:14px; cursor:pointer;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' stroke='%238d9bb2' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M3 3l10 10M13 3L3 13'/%3E%3C/svg%3E") center/contain no-repeat; }
.char-toolbar select {
  flex:0 0 auto; min-width:172px; cursor:pointer;
  -webkit-appearance:none; -moz-appearance:none; appearance:none; padding-right:38px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%238d9bb2' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 14px center; background-size:12px;
}
.char-toolbar input[type=search]:hover,
.char-toolbar select:hover { border-color:var(--line2); background-color:var(--panel); }
.char-toolbar input[type=search]:focus,
.char-toolbar select:focus { border-color:var(--gold-dim); box-shadow:0 0 0 3px rgba(255,232,31,.14); }
.char-toolbar select option { background:var(--panel); color:var(--txt); }
@media (max-width:520px) { .char-toolbar select { flex:1 1 100%; } }

.char-list { max-width:1100px; margin:0 auto; padding:0 1rem 3rem; }

/* ---- Character cards ---- */
.char-era-section { margin-bottom:2.5rem; }
.char-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(200px,1fr)); gap:1rem; margin-top:1rem; }
.char-card {
  background:var(--panel); border:1px solid var(--line); border-radius:12px;
  overflow:hidden; display:flex; flex-direction:column;
  transition:border-color .2s, transform .15s;
}
.char-card:hover { border-color:var(--line2); transform:translateY(-2px); }
.char-photo {
  width:100%; aspect-ratio:3/4; object-fit:cover; object-position:top center;
  display:block; background:var(--panel2);
}
.char-photo-placeholder {
  width:100%; aspect-ratio:3/4; display:flex; align-items:center; justify-content:center;
  background:var(--panel2);
}
.char-photo-placeholder svg { width:60%; height:60%; opacity:.25; }
/* Catalog pages (factions / planets / ships): show the whole logo, globe or ship
   instead of cropping the sides — symbols are square/wide, the card frame is 3/4 portrait. */
#cat-list .char-photo { object-fit:contain; padding:16px; background:var(--panel2); }
/* ---- Photo slideshow (multiple images per character) ---- */
.char-photo-wrap { position:relative; }
.ph-nav {
  position:absolute; top:50%; transform:translateY(-50%); width:27px; height:27px; padding:0;
  border:none; border-radius:50%; background:rgba(4,5,10,.55); color:#fff;
  font-size:18px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center;
  opacity:0; transition:opacity .15s, background .15s, color .15s;
}
.char-photo-wrap:hover .ph-nav { opacity:.9; }
.ph-nav:hover { background:var(--gold); color:#04050a; opacity:1; }
.ph-prev { left:7px; }
.ph-next { right:7px; }
.ph-count {
  position:absolute; bottom:7px; right:8px; font-size:10.5px; font-weight:600; color:#fff;
  background:rgba(4,5,10,.6); padding:1px 7px; border-radius:999px;
  opacity:0; transition:opacity .15s; pointer-events:none;
}
.char-photo-wrap:hover .ph-count { opacity:.95; }
@media (hover:none) { .ph-nav, .ph-count { opacity:.8; } }
.char-faction-bar { height:3px; width:100%; }
.char-body { padding:.75rem .85rem .9rem; display:flex; flex-direction:column; gap:.35rem; flex:1; }
.char-name { font-size:.92rem; font-weight:700; color:var(--txt); line-height:1.3; }
.char-meta { display:flex; flex-direction:column; gap:.2rem; }
.char-meta-row { font-size:.7rem; color:var(--mut); }
.char-meta-row b { color:var(--mut2); font-weight:600; }
.char-faction-tag { display:inline-block; font-size:.68rem; font-weight:700; border-radius:999px; padding:2px 8px; border:1px solid; margin-top:.1rem; }
.char-desc { font-size:.75rem; color:var(--mut); line-height:1.5; flex:1; margin-top:.2rem; }
.char-wiki { font-size:.7rem; color:var(--gold); opacity:.4; text-decoration:none; transition:opacity .15s; margin-top:.4rem; display:inline-block; }
.char-wiki:hover { opacity:1; }
@media (max-width:520px) { .char-grid { grid-template-columns:repeat(2,1fr); } }

@media (max-width:620px) {
  .char-grid { grid-template-columns:1fr; }
  .char-card { flex-direction:row; }
}

/* ---- Aankomend ---- */
.upcoming-section { max-width:860px; margin:0 auto; padding:2rem 1rem 1.5rem; }
.upcoming-head { display:flex; align-items:center; gap:.75rem; margin-bottom:1.25rem; }
.upcoming-label { font-size:.7rem; font-weight:700; letter-spacing:.14em; text-transform:uppercase; color:var(--gold); opacity:.55; white-space:nowrap; }
.upcoming-line { flex:1; height:1px; background:var(--line); }
.upcoming-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(210px,1fr)); gap:.75rem; }
.upcoming-card { background:rgba(255,232,31,.025); border:1px dashed rgba(255,232,31,.15); border-radius:10px; padding:.85rem 1rem; display:flex; flex-direction:column; gap:.3rem; }
.uc-title { font-size:.88rem; font-weight:600; color:var(--txt); }
.uc-note { font-size:.74rem; color:var(--mut); line-height:1.45; flex:1; }
.uc-footer { display:flex; align-items:center; gap:.5rem; margin-top:.6rem; flex-wrap:wrap; }
.uc-date { font-size:.7rem; color:var(--gold); opacity:.55; margin-left:auto; }
.uc-link { font-size:.7rem; font-weight:700; color:var(--gold); opacity:.45; text-decoration:none; transition:opacity .15s; }
.uc-link:hover { opacity:1; text-shadow:0 0 8px #ffe81f88; }

/* ---- Footer ---- */
.site-foot { max-width:760px; margin:0 auto; padding:24px 18px 48px; text-align:center; color:var(--mut); font-size:13px; border-top:1px solid var(--line); }
.site-foot p { margin:6px 0; }

/* ---- Responsief ---- */
@media (max-width:620px) {
  .row { grid-template-columns:auto 1fr; gap:10px; }
  .right { grid-column:1 / -1; justify-content:flex-end; padding-left:40px; }
  .era-prog-bar { width:60px; }
  .t-spacer { display:none; }
  .t-actions { flex:1 1 100%; }
  .details, .item.open .details { padding-left:15px; }
}

/* ---- Sub-items (afleveringen / volumes) + half-afgevinkt ---- */
.item.partial .cb { border-color:var(--gold); }
.item.partial .cb::after { content:""; inset:6px; background:var(--gold); border-radius:2px; opacity:1; box-shadow:0 0 8px #ffe81f88; }
.kids { font-size:11px; color:var(--mut); border:1px solid var(--line2); border-radius:999px; padding:1px 8px; font-variant-numeric:tabular-nums; }
.tag.tag-demo { background:transparent; color:var(--gold); border:1px solid var(--gold); }
.tag.tag-new  { background:transparent; color:#3ecf8e; border:1px solid rgba(62,207,142,.35); }
.has-children .title::after { content:"›"; margin-left:7px; color:var(--mut); }
.item.open.has-children .title::after { color:var(--gold); }

.item.open .details { max-height:9999px; transition:max-height .4s ease, opacity .2s, padding .25s; }
.children { display:flex; flex-direction:column; }
.child { display:flex; align-items:center; gap:10px; padding:7px 2px; border-top:1px solid var(--line); cursor:pointer; }
.child:first-child { border-top:none; }
.child:hover { background:#ffffff06; }
.ccb { width:19px; height:19px; flex:none; border-radius:5px; border:2px solid #46516a; background:var(--panel3); position:relative; }
.ccb::after { content:"✓"; position:absolute; inset:0; display:grid; place-items:center; color:#05060a; font-weight:900; font-size:12px; opacity:0; }
.child.done .ccb { background:var(--gold); border-color:var(--gold); box-shadow:0 0 8px #ffe81f66; }
.child.done .ccb::after { opacity:1; }
.ctitle { font-size:14px; }
.child.done .ctitle { text-decoration:line-through; text-decoration-color:#ffe81f88; opacity:.75; }
.csub { margin-left:auto; font-size:12px; color:var(--mut); font-variant-numeric:tabular-nums; white-space:nowrap; }

/* ---- Profile panel ---- */
.profile-backdrop {
  position:fixed; inset:0; z-index:50; background:#00000088; backdrop-filter:blur(2px);
}
.profile-panel {
  position:fixed; top:0; right:0; bottom:0; z-index:51;
  width:min(420px,100vw); background:var(--panel); border-left:1px solid var(--line2);
  overflow-y:auto; box-shadow:-8px 0 40px #000a;
  transform:translateX(100%); transition:transform .28s cubic-bezier(.4,0,.2,1);
}
.profile-panel:not([hidden]) { transform:translateX(0); }
.profile-panel[hidden] { display:block !important; } /* keep in DOM for animation */
.profile-backdrop[hidden] { display:block !important; pointer-events:none; opacity:0; }
.profile-backdrop:not([hidden]) { pointer-events:auto; opacity:1; transition:opacity .28s; }

.profile-inner { padding:28px 24px 48px; }
.profile-close {
  position:absolute; top:18px; right:18px; background:none; border:none;
  color:var(--mut); font-size:18px; cursor:pointer; padding:6px; line-height:1;
}
.profile-close:hover { color:var(--txt); }

.profile-header { display:flex; align-items:center; gap:16px; margin-bottom:28px; margin-top:12px; }
.profile-avatar { border-radius:50%; border:2px solid var(--line2); flex:none; }
.profile-name  { font-size:17px; font-weight:700; color:var(--txt); }
.profile-email { font-size:13px; color:var(--mut); margin-top:3px; }

.profile-stats { margin-bottom:28px; }
.profile-stat-main { margin-bottom:18px; }
.profile-overall-fill {
  height:10px; border-radius:999px;
  background:linear-gradient(90deg,var(--gold-dim),var(--gold));
  box-shadow:0 0 14px #ffe81f55; transition:width .4s;
  margin-bottom:7px;
  min-width:2px;
}
.profile-overall-label { font-size:14px; color:var(--mut); font-variant-numeric:tabular-nums; }

.profile-section-title { font-size:11px; letter-spacing:.1em; text-transform:uppercase; color:var(--mut2); margin-bottom:10px; }

.era-row { display:flex; align-items:center; gap:10px; margin:8px 0; }
.era-row-name { font-size:12px; color:var(--mut); flex:0 0 150px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.era-row-bar  { flex:1; height:5px; border-radius:999px; background:#141a28; overflow:hidden; }
.era-row-bar div { height:100%; background:linear-gradient(90deg,var(--gold-dim),var(--gold)); transition:width .4s; }
.era-row-num  { font-size:11px; color:var(--mut2); flex:0 0 48px; text-align:right; font-variant-numeric:tabular-nums; }

.profile-recent { border-top:1px solid var(--line); padding-top:20px; }
.profile-loading, .profile-empty { font-size:13px; color:var(--mut2); padding:10px 0; }
.activity-row { display:flex; align-items:baseline; justify-content:space-between; gap:12px; padding:7px 0; border-bottom:1px solid var(--line); }
.activity-row:last-child { border-bottom:none; }
.activity-title { font-size:13px; color:var(--txt); min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.activity-date  { font-size:12px; color:var(--mut2); flex:none; }

/* sign-out button inside profile */
.profile-signout {
  display:block; width:100%; margin-top:28px;
  background:var(--panel2); color:var(--mut); border:1px solid var(--line2);
  border-radius:9px; padding:10px; font-size:13px; cursor:pointer; transition:.15s;
}
.profile-signout:hover { border-color:#ff6b6b; color:#ff6b6b; }

/* body lock when panel open */
.profile-open { overflow:hidden; }
