/* Encore Cards — Mod Panel (light manga control surface) */
:root{
  --ink:#0e0e10; --paper:#f4ecd8; --paper-2:#ece0c4; --card:#fbf6ea;
  --accent:#e03131; --gold:#e0a116; --line:#0e0e10;
  --hit:#e03131; --mini:#1c7ed6; --normal:#7a7263;
}
*{box-sizing:border-box;}
html,body{margin:0;min-height:100%;
  background:
    radial-gradient(circle at 1px 1px, rgba(0,0,0,.05) 1.4px, transparent 1.8px) 0 0/10px 10px,
    linear-gradient(180deg,var(--paper),var(--paper-2));
  color:var(--ink); font-family:"Barlow Condensed",system-ui,sans-serif; font-size:17px;}
.hidden{display:none !important;}
.muted{color:#7a6f54;} .small{font-size:13px;} .mono{font-family:ui-monospace,Consolas,monospace;font-size:14px;}

.topbar{display:flex;justify-content:space-between;align-items:center;
  background:var(--ink); color:var(--paper); padding:10px 20px; border-bottom:4px solid var(--gold);}
.brand{font-family:"Bungee",sans-serif; font-size:22px; letter-spacing:1px;}
.brand span{color:var(--gold);}
.who{font-weight:700;}

.wrap{max-width:1100px; margin:22px auto; padding:0 16px;}
.grid{display:grid; grid-template-columns:1fr 1fr; gap:16px;}
.span2{grid-column:1 / -1;}
@media (max-width:760px){ .grid{grid-template-columns:1fr;} }

.card{background:var(--card); border:3px solid var(--line); border-radius:6px;
  box-shadow:6px 6px 0 rgba(0,0,0,.15); padding:16px 18px;}
.card h2{font-family:"Anton",sans-serif; font-weight:400; text-transform:uppercase;
  letter-spacing:.5px; margin:0 0 12px; font-size:24px;}

.btn{font-family:"Bungee",sans-serif; font-size:13px; cursor:pointer; color:var(--paper);
  background:var(--ink); border:2px solid var(--ink); border-radius:4px; padding:8px 14px;
  box-shadow:2px 2px 0 rgba(0,0,0,.35);}
.btn:hover{transform:translate(1px,1px); box-shadow:1px 1px 0 rgba(0,0,0,.35);}
.btn-accent{background:var(--accent); border-color:var(--ink);}
.btn-twitch{background:#9146ff; display:inline-block; text-decoration:none; margin:6px 0;}

.in{font-family:"Barlow Condensed",sans-serif; font-size:16px; padding:8px 10px;
  border:2px solid var(--line); border-radius:4px; background:#fff; width:100%;}
.row{display:flex; gap:8px; align-items:center; margin-top:6px;}
.row .in{flex:1;}
.lbl{display:block; margin-top:12px; font-weight:700; font-size:14px;}

.dev{margin-top:16px; padding-top:12px; border-top:1px dashed #b8a878;}

/* search results */
.results{list-style:none; margin:12px 0 0; padding:0; max-height:360px; overflow:auto;}
.results li{display:flex; gap:10px; align-items:center; padding:6px; border:2px solid transparent;
  border-radius:5px; cursor:pointer;}
.results li:hover{border-color:var(--ink); background:#fff;}
.results img{width:40px; height:56px; object-fit:cover; border:2px solid var(--ink); border-radius:3px; background:#222;}
.results .nm{font-weight:700; line-height:1;}
.results .cd{font-size:13px; color:#7a6f54;}
.badge{font-family:"Bungee",sans-serif; font-size:10px; color:var(--paper); background:var(--ink);
  padding:2px 6px; border-radius:3px; margin-left:auto; white-space:nowrap;}

/* pull feed */
.pulls{list-style:none; margin:0; padding:0; max-height:360px; overflow:auto;}
.pulls li{display:flex; align-items:center; gap:8px; padding:6px 4px; border-bottom:1px solid #e3d7b8;}
.dot{width:10px; height:10px; border-radius:50%; flex:0 0 auto; background:var(--normal);}
.dot.Hit{background:var(--hit);} .dot.MiniHit{background:var(--mini);}
.pulls .pn{font-weight:700;} .pulls .pp{margin-left:auto; font-weight:700;}
.pulls .pt{font-size:12px; color:#7a6f54;}

/* session stats */
.stats-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:10px;}
@media (max-width:760px){ .stats-grid{grid-template-columns:repeat(2,1fr);} }
.stat{display:flex; flex-direction:column; align-items:center; gap:2px;
  padding:10px 6px; background:#fbf4df; border:2px solid var(--line); border-radius:6px;}
.stat-num{font-family:"Anton",sans-serif; font-size:26px; line-height:1;}
.stat-lbl{font-size:12px; color:#7a6f54; text-transform:uppercase; letter-spacing:.5px;}
.stat-biggest{margin-top:10px;}

/* "Was öffnest du gerade?" — sealed product figures left, picker right */
.sealed-cols{display:grid; grid-template-columns:1fr 1fr; gap:18px; align-items:start;}
@media (max-width:760px){ .sealed-cols{grid-template-columns:1fr;} }
.sealed-stats{margin-top:12px;}
.sealed-intro{margin:0 0 6px;}
.sealed-hint{margin-top:8px;}
.sealed-hint:empty{display:none;}
.sealed-results{max-height:240px;}
.sealed-results .sp-price{margin-left:auto; font-weight:700; white-space:nowrap;}
.sealed-results li.sel{border-color:var(--gold); background:#fff;}
#sp-current .badge{vertical-align:1px; margin-left:4px;}
#sp-category{flex:1;}

/* pack controls */
.pack-status{font-family:"Anton",sans-serif; font-size:28px; letter-spacing:.5px;
  margin-bottom:12px; color:var(--ink);}
.pack-btns{margin-top:4px;}

/* voting */
.vote-status{font-family:"Anton",sans-serif; font-size:20px; letter-spacing:.5px;
  margin-bottom:10px; color:var(--ink);}
.vote-status.open{color:var(--accent);}
.vote-open-btns{flex-wrap:wrap; gap:8px;}
.vote-board-title{font-weight:700; font-size:14px; margin-bottom:6px; text-transform:uppercase;}
.vote-board{list-style:decimal; margin:0; padding-left:20px;}
.vote-board li{display:flex; gap:8px; align-items:center; padding:4px 0;
  border-bottom:1px solid #e3d7b8; font-size:16px;}
.vote-board .vb-voter{font-weight:700; flex:1;}
.vote-board .vb-pts{font-family:"Bungee",sans-serif; font-size:14px; color:var(--gold);}

/* config */
.form{display:flex; flex-wrap:wrap; gap:14px; align-items:flex-end;}
.form label{display:flex; flex-direction:column; gap:4px; font-weight:700; font-size:14px;}
.form .in{width:150px;}
.cfg-msg{margin-top:10px; font-weight:700;}
.cfg-msg.ok{color:#2f9e44;} .cfg-msg.err{color:var(--accent);}

/* "N Treffer — die ersten M werden angezeigt": not a result row, so it must not look clickable. */
.results-hint{
  padding:8px 2px 0; color:#7a6f54; font-size:12px; font-style:italic;
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
}
.results-hint:empty{ display:none; }
/* The way out of a long list: filtering beats scrolling past a screenful. Upright, so it reads as
   an action next to the italic status text rather than as more of the same sentence. */
.hint-jump{ font-style:normal; }

/* Overlay component switches */
.comp-h{ margin:18px 0 2px; font-size:15px; }
.comp-hint{ margin:0 0 10px; color:#7a6f54; font-size:13px; }
.comp-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:8px 16px; }
.comp{ display:flex; align-items:center; gap:8px; font-weight:700; font-size:14px; cursor:pointer; }
.comp input{ width:16px; height:16px; cursor:pointer; }
.comp em{ font-style:normal; font-weight:400; color:#7a6f54; font-size:12px; }

/* Encore-suite tagline footer */
.suite-note{ text-align:center; padding:18px 12px 28px; color:#7a6f54; font-size:13px; }
.suite-note a{ color:#7a6f54; text-decoration:underline; }

/* Build identity, bottom right. Small and low-contrast on purpose: it must be readable when you go
   looking for it and invisible when you are not. Fixed so it stays put while the panel scrolls. */
.build-version{
  position:fixed; right:8px; bottom:6px; z-index:5;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:11px;
  color:#a89b7c; letter-spacing:.5px; pointer-events:none; user-select:text;
}

/* Small button variant for inline tile-header actions — secondary controls must not shout. */
.btn-sm{font-size:11px; padding:5px 10px;}
.btn:disabled{opacity:.45; cursor:not-allowed; box-shadow:none; transform:none;}
.in:disabled{opacity:.45; cursor:not-allowed;}

/* Tile header with an action beside the title (e.g. "Neue Session"). */
.card-head{display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px;}
.card-head h2{margin:0;}

/* Reveal tile spans the full row: quick search left, catalog entry right. */
.reveal-cols{display:grid; grid-template-columns:minmax(0,1fr) 260px; gap:18px; align-items:start;}
@media (max-width:760px){ .reveal-cols{grid-template-columns:1fr;} }
.catalog-teaser{border:2px dashed var(--line); border-radius:6px; background:#fbf4df;
  padding:12px 14px; display:flex; flex-direction:column; gap:8px;}
.catalog-teaser .teaser-h{font-family:"Anton",sans-serif; font-size:17px; text-transform:uppercase; letter-spacing:.5px;}
.catalog-teaser p{margin:0;}
.catalog-teaser .btn{align-self:flex-start;}

/* Bot-gated features (voting, leaderboard) while the chat bot is not connected: visible, honestly
   labelled, visibly inert. Reuses the palette — gold is already the "look here" colour. */
.pending-note{margin:0 0 12px; padding:10px 12px; border:2px dashed var(--line); border-radius:6px;
  background:#fbf4df; font-size:15px; font-weight:600; line-height:1.35;}
.soon-tag{font-family:"Bungee",sans-serif; font-size:9px; color:var(--ink); background:var(--gold);
  border:2px solid var(--line); border-radius:3px; padding:1px 5px; white-space:nowrap; vertical-align:2px;}
#voting-card.pending .vote-status{color:#7a6f54;}

/* ---- catalog modal ---- */
.modal-backdrop{position:fixed; inset:0; z-index:40; background:rgba(14,14,16,.55);
  display:flex; align-items:center; justify-content:center; padding:24px;}
.modal{background:var(--card); border:3px solid var(--line); border-radius:8px;
  box-shadow:10px 10px 0 rgba(0,0,0,.35); width:min(1060px,100%); max-height:calc(100vh - 48px);
  display:flex; flex-direction:column; gap:10px; padding:16px 18px;}
.modal-head{display:flex; align-items:center; justify-content:space-between; gap:10px;}
.modal-head h2{font-family:"Anton",sans-serif; font-weight:400; text-transform:uppercase;
  letter-spacing:.5px; margin:0; font-size:24px;}

/* facet bars: one row per dimension, chips carry the hit count; "alle" clears the dimension */
.cat-facets{display:flex; flex-direction:column; gap:6px;}
.facet-row{display:flex; gap:10px; align-items:flex-start;}
.facet-lbl{flex:0 0 52px; font-family:"Bungee",sans-serif; font-size:11px; padding-top:5px; text-transform:uppercase;}
.facet-bar{display:flex; flex-wrap:wrap; gap:6px; min-height:26px;}
.fchip{font-family:"Barlow Condensed",sans-serif; font-weight:700; font-size:14px; cursor:pointer;
  border:2px solid var(--line); border-radius:4px; background:#fff; color:var(--ink);
  padding:2px 8px; box-shadow:2px 2px 0 rgba(0,0,0,.2);}
.fchip:hover{transform:translate(1px,1px); box-shadow:1px 1px 0 rgba(0,0,0,.2);}
.fchip[aria-pressed="true"]{background:var(--ink); color:var(--paper);}
.fchip .fc{margin-left:5px; font-size:12px; font-weight:600; color:#7a6f54;}
.fchip[aria-pressed="true"] .fc{color:var(--gold);}
.fchip-all{font-style:italic;}

/* result meta + grid */
.cat-meta{display:flex; align-items:baseline; justify-content:space-between; gap:10px;
  border-top:2px solid #e3d7b8; padding-top:8px;}
#cat-total{font-family:"Anton",sans-serif; font-size:18px; letter-spacing:.5px;}
.cat-status{font-weight:700; font-size:14px;}
.cat-status.ok{color:#2f9e44;} .cat-status.err{color:var(--accent);}
.cat-scroll{flex:1; min-height:220px; overflow:auto; padding:2px;}
.cat-hint{color:#7a6f54; font-style:italic; padding:6px 2px;}
.cat-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(132px,1fr)); gap:10px;}
.cat-tile{display:flex; flex-direction:column; gap:6px; text-align:left; cursor:pointer;
  font-family:inherit; font-size:inherit; color:inherit;
  background:#fff; border:2px solid var(--line); border-radius:6px; padding:6px;
  box-shadow:3px 3px 0 rgba(0,0,0,.15);}
.cat-tile:hover{border-color:var(--accent); box-shadow:3px 3px 0 var(--accent);}
.cat-tile:hover .ct-name{color:var(--accent);}
.cat-tile:focus-visible, .fchip:focus-visible{outline:3px solid var(--gold); outline-offset:1px;}
.cat-tile img{width:100%; aspect-ratio:5/7; object-fit:cover; border:2px solid var(--line);
  border-radius:4px; background:#222;}
.ct-meta{display:flex; flex-direction:column; gap:2px;}
.ct-name{font-weight:700; font-size:14px; line-height:1.15;}
.ct-code{font-family:ui-monospace,Consolas,monospace; font-size:11px; color:#7a6f54;}
.ct-badge{font-family:"Bungee",sans-serif; font-size:9px; color:var(--paper); background:var(--ink);
  border-radius:3px; padding:2px 5px; align-self:flex-start; white-space:nowrap;}
.cat-sentinel{display:block; margin:14px auto 6px;}
@media (max-width:760px){ .modal-backdrop{padding:10px;} .facet-lbl{flex-basis:44px;} }

/* Which language a card row actually resolved to. Print codes are identical across languages, so
   without this a French catalog silently mixes in English cards wherever a translation is missing —
   same code, same layout, different printing. Quiet by default; .alt marks the fallback, which is
   the case worth noticing. */
.lang-tag{ margin-left:6px; font-family:"Bungee",sans-serif; font-size:9px; letter-spacing:.5px;
  color:#7a6f54; border:1px solid #c9bb99; border-radius:3px; padding:1px 4px; vertical-align:1px; }
.lang-tag.alt{ color:#8a5a00; border-color:#d8a13a; background:#fdf3dd; }
.ct-code .lang-tag{ margin-left:5px; }

/* Language picker beside the print-code field. Narrow on purpose: it is a qualifier on the number,
   not a field of its own, and must not compete with the Reveal button for attention. */
.reveal-lang{ width:auto; flex:0 0 auto; font-family:"Bungee",sans-serif; font-size:11px;
  padding:8px 6px; cursor:pointer; }

/* Catalog freshness. Two states on purpose. Current: the same low-contrast register as the rest of
   the footer, present for whoever goes looking and ignorable otherwise. Stale: pulled out of that
   register, because at that point it is the explanation for a search that found nothing. */
.freshness{
  text-align:center; padding:0 12px 4px;
  color:#7a6f54; font-size:13px;
}
.freshness .fresh-sep{ opacity:.5; padding:0 6px; }
.freshness.is-stale{
  color:#8a4b2a; font-weight:600;
  background:#fdf3e7; border-top:2px solid #e0a878;
  padding:8px 12px; margin-top:4px;
}
