/* Pokédex – vzhled „TCG karta“: tmavě modrá, žlutý rámeček jako u karet, modrá a červená z loga a Pokéballu */
:root {
  --bg: #0b1330;
  --surface: #131f4a;
  --surface-2: #1a2a5e;
  --border: #283b7d;
  --text: #eef2ff;
  --muted: #a3afd6;
  --accent: #ffcb05;          /* Pikachu žlutá */
  --accent-ink: #13214f;      /* text na žluté */
  --accent-soft: rgb(255 203 5 / .14);
  --blue: #2a75bb;            /* modrá z loga */
  --blue-hi: #3d8ddb;
  --red: #ee1515;             /* Pokéball */
  --good: #5fd49a;
  --good-soft: rgb(95 212 154 / .14);
  --warn: #ffd84d;
  --warn-soft: rgb(255 216 77 / .12);
  --bad: #ff6b81;
  --bad-soft: rgb(255 107 129 / .14);
  --frame: #ffcb05;
  --frame-dark: #c99a00;
  --shadow: 0 6px 18px rgb(0 0 0 / .35);
  --radius: 12px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font: 500 14px/1.45 Nunito, "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  /* jemný Pokéball v rohu pozadí */
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='none' stroke='%23ffffff' stroke-opacity='.035' stroke-width='5'%3E%3Ccircle cx='50' cy='50' r='46'/%3E%3Cpath d='M4 50h30M66 50h30'/%3E%3Ccircle cx='50' cy='50' r='15'/%3E%3C/svg%3E") no-repeat fixed right -160px bottom -160px / 620px;
}
a { color: var(--accent); text-decoration: none; }
code { font-size: .92em; background: var(--surface-2); padding: 0 .3em; border-radius: 4px; }
small { color: var(--muted); font-weight: 400; }

/* --- top bar --- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 16px;
  padding: 10px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; color: var(--accent); }
.status { flex: 1; color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; min-width: 0; }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); flex: none; }
.status.running .dot { background: var(--accent); animation: pulse 1s infinite alternate; }
.status span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes pulse { to { opacity: .3; } }
.top-actions { display: flex; gap: 8px; }

/* --- buttons & inputs --- */
.btn {
  appearance: none; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font: inherit; font-weight: 500;
  padding: 7px 14px; border-radius: 8px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { color: var(--bad); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.icon { padding: 7px; }

input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 500; font-size: 13px; }
label.toggle, .checks label { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; cursor: pointer; }
label.toggle input, .checks input { width: auto; accent-color: var(--accent); }
label.inline { flex-direction: row; align-items: center; gap: 10px; font-weight: 400; }

/* --- layout --- */
.layout { display: grid; grid-template-columns: 300px 1fr; min-height: calc(100vh - 53px); }
.sidebar { border-right: 1px solid var(--border); background: var(--surface); padding: 16px; min-width: 0; }
.side-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.side-head h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0; }
.watches { display: flex; flex-direction: column; gap: 8px; }
.main { padding: 16px 20px 40px; min-width: 0; }

.watch {
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; cursor: pointer;
  background: var(--surface);
}
.watch:hover { border-color: var(--accent); }
.watch.active { border-color: var(--accent); background: var(--accent-soft); }
.watch.disabled { opacity: .6; }
.watch-top { display: flex; align-items: center; gap: 6px; }
.watch-name { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.watch-sum { color: var(--muted); font-size: 12px; margin: 2px 0 6px; }
.watch-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; }
.watch-actions { display: flex; gap: 2px; margin-top: 6px; }
.watch-actions .btn { padding: 2px 8px; font-size: 12px; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 500; }
.pill.new { background: var(--accent); color: #fff; }
.pill.good { background: var(--good-soft); color: var(--good); }
.srcdots { display: inline-flex; gap: 3px; margin-left: auto; }
.srcdot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.srcdot.warn { background: var(--warn); }
.srcdot.err { background: var(--bad); }
.srcdot.idle { background: var(--border); }

.all-watches { font-weight: 600; }
.view-user { margin: -4px 0 10px; font-size: 13px; padding: 6px 8px; }
.watch-owner { font-size: 12px; color: var(--muted); margin: -2px 0 4px; }
form.readonly .dlg-body { pointer-events: none; }
form.readonly .dlg-body details summary { pointer-events: auto; }

/* --- toolbar --- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs { display: flex; flex-wrap: wrap; gap: 2px; background: var(--surface-2); padding: 3px; border-radius: 9px; }
.tab { border: 0; background: transparent; font: inherit; color: var(--muted); padding: 5px 12px; border-radius: 7px; cursor: pointer; font-weight: 500; }
.tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.tab .n { color: var(--muted); font-weight: 400; margin-left: 2px; }
.list-menu { position: absolute; z-index: 50; min-width: 200px; max-width: 280px; display: flex; flex-direction: column; gap: 2px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); padding: 8px; }
.list-menu label { display: flex; flex-direction: row; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px;
  cursor: pointer; font-size: 13.5px; font-weight: 400; }
.list-menu label:hover { background: var(--surface-2); }
.list-menu input { width: auto; accent-color: var(--accent); }
.list-menu .btn { margin-top: 4px; justify-content: flex-start; }
.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filters select { width: auto; padding: 5px 8px; font-size: 13px; }

/* --- filtry nabídek --- */
.filterbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -4px 0 10px; }
.filterbar input, .filterbar select { width: auto; padding: 5px 8px; font-size: 13px; }
.filterbar .fb-search { flex: 1 1 220px; min-width: 180px; }
.fb-range { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.fb-range input { width: 96px; }
#f-km { width: 132px; }
.fb-battery input { width: 136px; }
textarea { resize: vertical; font: inherit; line-height: 1.45; }
.fb-vat { font-size: 13px; white-space: nowrap; }
.engine-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.chip.toggle { border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 12.5px; padding: 3px 10px; border-radius: 999px; cursor: pointer; }
.chip.toggle:hover { border-color: var(--accent); }
.chip.toggle .n { color: var(--muted); margin-left: 3px; }
.chip.toggle.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip.toggle.on .n { color: rgb(255 255 255 / .8); }
.fb-count { margin: -2px 0 10px; }

/* --- formulář hlídače: štítky a rychlé volby --- */
.presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.presets .hint { min-width: 72px; }
.preset-rows { display: flex; flex-direction: column; gap: 6px; }
.kchip { border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 12.5px;
  padding: 4px 11px; border-radius: 999px; cursor: pointer; transition: transform .12s, background .15s; white-space: nowrap; }
.kchip:hover { border-color: var(--accent); }
.kchip:active { transform: scale(.94); }
.kchip.plus { background: var(--good-soft); border-color: var(--good); color: var(--good); font-weight: 600; }
.kchip.must { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.kchip.demo { cursor: default; padding: 1px 8px; font-size: 11.5px; }
.kgroup { display: flex; flex-direction: column; gap: 6px; }
.kg-label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.kchips { display: flex; flex-wrap: wrap; gap: 6px; }
.kchips:empty { display: none; }
.kchip-add { width: 160px; padding: 4px 10px; font-size: 12.5px; border-radius: 999px; }
.watch-summary { position: sticky; bottom: -16px; margin: 16px -20px -16px; padding: 10px 20px; font-size: 13px; line-height: 1.5;
  background: var(--accent-soft); border-top: 1px solid var(--border); color: var(--text); }

/* --- banner --- */
.banner { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; display: flex; gap: 12px; align-items: flex-start; }
.banner.warn { background: var(--warn-soft); border-color: transparent; }
.banner h4 { margin: 0 0 2px; font-size: 14px; }
.banner p { margin: 0; color: var(--muted); }
.banner ul { margin: 4px 0 0; padding-left: 18px; color: var(--muted); }

/* --- cards --- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow);
  position: relative;
}
.card.hidden-hit { opacity: .55; }
.card-img { aspect-ratio: 4 / 3; background: var(--surface-2); position: relative; display: block; overflow: hidden; }
.card-img img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block; }
.card-img .noimg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.score {
  position: absolute; top: 8px; left: 8px;
  min-width: 38px; padding: 3px 7px; border-radius: 8px; text-align: center;
  font-weight: 700; font-size: 13px; color: #fff; background: #5d6878;
  box-shadow: 0 1px 4px rgb(0 0 0 / .25);
  z-index: 2;
}
.score.s-hi { background: #1f9d55; }
.score.s-mid { background: #d18a00; }
.srcbadge { position: absolute; top: 8px; right: 8px; padding: 2px 7px; border-radius: 6px; background: rgb(0 0 0 / .62); color: #fff; font-size: 11px; font-weight: 600; z-index: 2; }
.newdot { position: absolute; bottom: 8px; left: 8px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 6px; z-index: 2; }
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text); }
.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price { font-size: 18px; font-weight: 700; }
.price-alt { color: var(--muted); font-size: 12px; }
.drop { color: var(--good); font-size: 12px; font-weight: 600; }
.deal { font-size: 12.5px; font-weight: 600; }
.deal.good { color: var(--good); }
.deal.bad { color: var(--muted); font-weight: 500; }
.specs { color: var(--muted); font-size: 12.5px; }
.specs .engine { color: var(--text); font-weight: 600; }
.specs .engine.muted { color: var(--muted); font-weight: 400; font-style: italic; }
.chips { display: flex; gap: 4px; flex-wrap: wrap; }
.also { display: flex; gap: 4px 6px; flex-wrap: wrap; align-items: baseline; font-size: 12px; color: var(--muted); }
.also-link { color: var(--accent); text-decoration: none; padding: 1px 7px; border: 1px solid var(--border); border-radius: 6px; }
.also-link:hover { border-color: var(--accent); }
.also-link small { color: var(--muted); }
.chip { font-size: 11.5px; padding: 1px 7px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.chip.bonus { background: var(--good-soft); color: var(--good); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.card-foot { display: flex; align-items: center; gap: 4px; margin-top: auto; padding-top: 4px; color: var(--muted); font-size: 12px; }
.card-foot .loc { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-foot .btn { padding: 3px 7px; font-size: 13px; }
.card-foot .btn.on { color: #e0a100; }

.empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 60px 20px; }
.empty h3 { color: var(--text); margin: 0 0 6px; }
.empty .btn { margin-top: 14px; }

/* --- dialogs --- */
.dialog { border: 0; border-radius: 14px; padding: 0; width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 40px); background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgb(0 0 0 / .3); }
.dialog::backdrop { background: rgb(10 14 20 / .45); }
.dialog form { display: flex; flex-direction: column; max-height: calc(100vh - 40px); }
.dlg-head, .dlg-foot { display: flex; align-items: center; gap: 8px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.dlg-foot { border-bottom: 0; border-top: 1px solid var(--border); }
.dlg-head h3 { margin: 0; flex: 1; font-size: 16px; }
.dlg-body { padding: 4px 20px 16px; overflow-y: auto; flex: 1; min-height: 0; }
fieldset { border: 0; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 10px; }
legend { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 8px; padding: 0; }
.row2, .row3, .row4 { display: grid; gap: 10px; }
.row2 { grid-template-columns: repeat(2, 1fr); }
.row3 { grid-template-columns: repeat(3, 1fr); }
.row4 { grid-template-columns: repeat(4, 1fr); }
.row-btn { display: flex; align-items: center; gap: 10px; }
.hint { color: var(--muted); font-size: 12px; margin: 0; font-weight: 400; }
.hint.ok { color: var(--good); }
.hint.err { color: var(--bad); }
.checks { display: flex; flex-wrap: wrap; gap: 6px 18px; }
#src-checks { display: flex; flex-direction: column; gap: 10px; }
.src-group { display: flex; flex-direction: column; gap: 6px; }
.advanced { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.advanced[open] { gap: 10px; }
.advanced > * + * { margin-top: 10px; }
.advanced summary { cursor: pointer; color: var(--muted); font-weight: 500; }
.spacer { flex: 1; }
.howto { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
details.sub summary { cursor: pointer; color: var(--muted); font-size: 13px; }
details.sub[open] { display: flex; flex-direction: column; gap: 8px; }
.row-btn input { flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.login { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; overflow-y: auto;
  background: radial-gradient(120% 90% at 70% 10%, #1d3a8f 0%, #0b1020 60%); }
.login > :not(canvas) { position: relative; z-index: 1; }
.login-box { width: min(360px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 24px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.login-box .brand { font-size: 18px; }

/* --- účet, správa --- */
.who { color: var(--muted); font-size: 13px; align-self: center; white-space: nowrap; }
.dc-status { flex: 1; font-size: 13px; }
.dc-status.ok { color: var(--good); font-weight: 600; }
.admin-zone { margin-top: 22px; padding-top: 4px; border-top: 2px dashed var(--border); }
.admin-title { margin: 12px 0 0; font-weight: 700; }
.people { display: flex; flex-direction: column; gap: 6px; }
.person { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; }
.person .name { font-weight: 600; }
.person .meta { color: var(--muted); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .btn { padding: 2px 8px; font-size: 12px; }
.btn.big { padding: 11px 18px; font-size: 15px; justify-content: center; }
.btn.discord { background: #5865f2; border-color: #5865f2; color: #fff; justify-content: center; }
.btn.discord:hover { background: #4752c4; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.hint.center { text-align: center; margin-top: -6px; }

/* --- registrace --- */
.login-box.reg { width: min(440px, 100%); }
.reg-hero { text-align: center; }
.reg-hero h2 { margin: 4px 0 6px; font-size: 22px; }
.reg-hero p { margin: 0; color: var(--muted); }
.reg-emoji { font-size: 44px; line-height: 1; animation: bounce 1.6s ease-in-out infinite; }
@keyframes bounce { 50% { transform: translateY(-6px) rotate(-4deg); } }
.steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0; }
.steps li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; color: var(--muted); }
.steps li span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--surface-2); border: 2px solid var(--border); }
.steps li.on { color: var(--accent); font-weight: 600; }
.steps li.on span { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 4px var(--accent-soft); }
.pw-meter { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: -6px; }
.pw-meter i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--bad); transition: width .3s, background .3s; }

/* --- průvodce (mise) --- */
.dialog.onb { width: min(640px, calc(100vw - 32px)); }
.onb-wrap { display: flex; flex-direction: column; max-height: calc(100vh - 40px); }
.onb-head { flex: none; padding: 18px 20px 14px; color: #fff; background: linear-gradient(135deg, #2557d6, #1a3a9e 60%, #13296f); }
.onb-top { display: flex; align-items: flex-start; gap: 8px; }
.onb-top > div { flex: 1; }
.onb-kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; opacity: .75; }
.onb-head h3 { margin: 2px 0 10px; font-size: 22px; }
.onb-x { color: #fff; }
#onb-rank.levelup { animation: levelup .9s ease; }
@keyframes levelup { 30% { transform: scale(1.18); color: #ffd166; text-shadow: 0 0 18px rgb(255 209 102 / .8); } }
.onb-x:hover { background: rgb(255 255 255 / .12); }
.xp { height: 12px; border-radius: 99px; background: rgb(255 255 255 / .18); overflow: hidden; }
.xp i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #ffd166, #2ecc71); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.onb-meta { display: flex; justify-content: space-between; font-size: 12.5px; margin-top: 6px; opacity: .9; }
.badges { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.badge { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: rgb(255 255 255 / .1); filter: grayscale(1); opacity: .45; transition: .4s; }
.badge.done { filter: none; opacity: 1; background: rgb(255 255 255 / .2); box-shadow: 0 0 0 2px #ffd166, 0 4px 14px rgb(0 0 0 / .25); }
.badge.pop { animation: pop .6s ease; }
@keyframes pop { 40% { transform: scale(1.35) rotate(-8deg); } }
.onb-body { flex: 1; min-height: 0; padding: 14px 20px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.mission { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: flex; gap: 12px; align-items: flex-start; background: var(--surface); }
.mission .m-icon { font-size: 22px; width: 38px; height: 38px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); }
.mission .m-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.mission .m-title { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.mission .m-xp { margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 1px 8px; border-radius: 99px; white-space: nowrap; }
.mission .m-text { color: var(--muted); font-size: 13px; margin: 0; }
.mission .m-steps { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.mission .m-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mission .m-actions input { flex: 1 1 200px; width: auto; }
.mission.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.mission.done { background: var(--good-soft); border-color: transparent; }
.mission.done .m-icon { background: var(--good); color: #fff; }
.mission.done .m-xp { color: var(--good); background: transparent; }
.mission.bonus .m-xp { color: #b7791f; background: #fdf1dc; }
.m-state { font-size: 12.5px; font-weight: 600; }
.m-state.ok { color: var(--good); }
.m-state.err { color: var(--bad); font-weight: 500; }
.onb-finish { text-align: center; padding: 8px 4px 2px; }
.onb-finish .trophy { font-size: 52px; animation: bounce 1.4s ease-in-out infinite; }
.onb-finish h4 { margin: 4px 0; font-size: 18px; }
.onb-finish p { margin: 0; color: var(--muted); }

/* --- 3D scéna (three.js) --- */
canvas.scene3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
canvas.scene3d.small { left: auto; width: 62%; opacity: .95;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 35%); mask-image: linear-gradient(90deg, transparent, #000 35%); }
.onb-head { position: relative; overflow: hidden; }
.onb-head > :not(canvas) { position: relative; z-index: 1; }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 100; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translate3d(var(--dx), 105vh, 0) rotate(var(--rot)); } }
@media (prefers-reduced-motion: reduce) {
  .reg-emoji, .onb-finish .trophy, .badge.pop { animation: none; }
  .confetti { display: none; }
}

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px;
  opacity: 0; pointer-events: none; transition: .2s; font-weight: 500; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%); }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--border); }
  .watches { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .watch { min-width: 240px; }
  .row3, .row4 { grid-template-columns: repeat(2, 1fr); }
  .topbar { padding: 10px 16px; flex-wrap: wrap; }
  .status { order: 3; flex-basis: 100%; }
  .main { padding: 16px; }
}
@media (max-width: 480px) {
  .row2, .row3, .row4 { grid-template-columns: 1fr; }
  .fb-range { flex: 1 1 100%; }
  .fb-range input { flex: 1; width: auto; min-width: 0; }
  .filterbar select, #f-km { flex: 1 1 calc(50% - 8px); }
  #btn-run { padding: 6px 10px; }
}

/* --- Pokéhlídač: druhy hlídače, katalog karet, stav skladu --- */
.kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.kind { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.kind:hover:not(:disabled) { border-color: var(--accent); }
.kind:disabled { cursor: default; opacity: .55; }
.kind.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); opacity: 1; }
.kind-ico { font-size: 22px; line-height: 1; margin-bottom: 4px; }
.kind small { font-size: 12px; line-height: 1.35; }
#form-watch .kind-card { display: none; }
#form-watch.is-card .kind-card { display: block; }
#form-watch.is-card .kind-sealed { display: none; }

.cat-search { position: relative; }
.cat-search input { width: 100%; }
.cat-results { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 5; max-height: 340px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px rgb(0 0 0 / .18); padding: 4px; }
.cat-results > .hint { padding: 10px; }
.cat-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: 0; border-radius: 8px;
  background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.cat-item:hover, .cat-item:focus-visible { background: var(--surface-2); }
.cat-item img, .cat-noimg { width: 38px; height: 53px; object-fit: contain; flex: none; border-radius: 3px; display: grid; place-items: center; }
.cat-main { flex: 1; min-width: 0; line-height: 1.35; }
.cat-price { font-weight: 600; white-space: nowrap; font-size: 13px; }
.cat-picked { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.cat-picked img { width: 84px; border-radius: 5px; flex: none; }
.cat-picked > div { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.cat-market { font-size: 13px; }

.card-img img { object-fit: contain; padding: 6px; }
.card-img.tcg img { padding: 4px; }
.card.soldout .card-img img { filter: grayscale(.85); opacity: .7; }
.stockbadge { position: absolute; bottom: 8px; right: 8px; padding: 1px 7px; border-radius: 6px; font-size: 11px; font-weight: 700; z-index: 2; color: #fff; background: #5d6878; }
.stockbadge.st-instock { background: #1f9d55; }
.stockbadge.st-order { background: #b7791f; }
.stockbadge.st-preorder { background: #2557d6; }
.stockbadge.st-soldout { background: #8a3a3a; }
.gradebadge { position: absolute; top: 36px; right: 8px; padding: 1px 7px; border-radius: 6px; font-size: 11px; font-weight: 700; z-index: 2; color: #16191f; background: #ffd166; }
.also-link.out { opacity: .55; text-decoration: line-through; }
.watch-thumb { width: 22px; height: 30px; object-fit: contain; border-radius: 2px; flex: none; }
.watch-kind { flex: none; font-size: 15px; line-height: 1; }
@media (max-width: 640px) { .kinds { grid-template-columns: 1fr; } }

/* --- Pokédex: téma „TCG karta“ ----------------------------------------------------- */
.topbar { background: #0a1029; border-bottom: 2px solid var(--blue); }
.brand { font-weight: 900; font-size: 21px; letter-spacing: .01em; color: var(--accent);
  text-shadow: 0 2px 0 #1d4f9a, 0 0 1px #1d4f9a; gap: 10px; }
.ball { width: 22px; height: 22px; border-radius: 50%; flex: none; position: relative; border: 2px solid #111;
  background: linear-gradient(#ee1515 0 44%, #111 44% 56%, #fff 56%); box-shadow: 0 1px 0 rgb(0 0 0 / .4); }
.ball::after { content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; transform: translate(-50%, -50%);
  border-radius: 50%; background: #fff; border: 2px solid #111; }
.status.running .dot { background: var(--red); }
h1, h2, h3, h4, .watch-name, .card-title, .price, legend, .tab, .btn { font-family: Nunito, "Segoe UI", sans-serif; }

.btn { border-radius: 10px; font-weight: 700; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 800; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.hunt { background: var(--blue); border-color: var(--blue); color: #fff; border-radius: 999px; padding: 7px 16px; font-weight: 800; }
.btn.hunt:hover { background: var(--blue-hi); }
.btn.ghost:hover { background: var(--surface-2); }
input, select, textarea { background: #0e1940; border-color: var(--border); border-radius: 10px; }
input::placeholder, textarea::placeholder { color: #7684b3; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
select option { background: var(--surface); }

.sidebar { background: #0f1940; }
.side-head h2 { color: var(--accent); font-weight: 900; font-size: 14px; }
/* album = hlídač: hřbet alba vlevo */
.watch { position: relative; background: var(--surface); border-color: var(--border); border-radius: 12px;
  padding-left: 18px; box-shadow: inset 7px 0 0 var(--blue); }
.watch.all-watches { box-shadow: inset 7px 0 0 var(--accent); }
.watch:hover { border-color: var(--blue-hi); }
.watch.active { border-color: var(--accent); background: var(--surface-2); box-shadow: inset 7px 0 0 var(--accent), 0 0 0 1px var(--accent); }
.watch-name { font-weight: 800; }
.pill.new { background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.tabs { background: #0e1940; }
.tab.active { background: var(--accent); color: var(--accent-ink); box-shadow: none; font-weight: 800; }
.tab.active .n { color: var(--accent-ink); opacity: .75; }
.chip.toggle.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip.toggle.on .n { color: var(--accent-ink); }
.kchip.must { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.kind.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }

/* nabídka = karta se žlutým rámečkem */
.grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.card { background: var(--frame); border: 0; padding: 7px; border-radius: 16px; gap: 6px; overflow: visible;
  box-shadow: 0 8px 22px rgb(0 0 0 / .4); transition: transform .18s ease, box-shadow .18s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgb(0 0 0 / .5); }
.card.soldout { background: #8d93a8; }
.card-img { aspect-ratio: 4 / 3; border-radius: 10px 10px 4px 4px; background: #eef2ff; box-shadow: inset 0 0 0 2px var(--frame-dark); }
.card.soldout .card-img { box-shadow: inset 0 0 0 2px #6d7388; }
.card-img .noimg { color: #6b76a3; }
.card-body { background: var(--surface); border-radius: 4px 4px 10px 10px; padding: 10px 11px 10px; }
.card-title { color: var(--text); font-weight: 800; }
.price { color: var(--accent); font-weight: 900; font-size: 19px; }
.deal.good { color: var(--good); }
/* skóre jako HP vpravo nahoře, obchod vlevo */
.score { left: auto; right: 8px; background: #fff; color: #d11a1a; font-weight: 900; font-size: 14px; border-radius: 999px;
  padding: 2px 9px; min-width: 0; box-shadow: 0 1px 3px rgb(0 0 0 / .35); }
.score::after { content: " HP"; font-size: 10px; font-weight: 800; }
.score.s-hi { background: var(--red); color: #fff; }
.score.s-mid { background: var(--accent); color: var(--accent-ink); }
.srcbadge { right: auto; left: 8px; background: rgb(19 33 79 / .88); border-radius: 999px; padding: 2px 9px; }
.gradebadge { top: 38px; }
.newdot { background: var(--red); border-radius: 999px; padding: 1px 8px; }
.stockbadge { border-radius: 999px; padding: 1px 8px; }
.stockbadge.st-instock { background: #1f9d55; }
.stockbadge.st-order { background: #9a7b00; }
.stockbadge.st-preorder { background: var(--blue); }
.stockbadge.st-soldout { background: #9a3344; }
.card-foot .btn.on { color: var(--accent); }
.also-link { border-color: var(--border); }
.also-link:hover { border-color: var(--accent); }
/* holo lesk při najetí – jako u foil karty */
.card-img::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0;
  background: linear-gradient(115deg, transparent 25%, rgb(255 255 255 / .35) 42%, rgb(140 210 255 / .25) 50%,
    rgb(255 150 230 / .2) 58%, transparent 75%) 120% 0 / 250% 100% no-repeat; mix-blend-mode: screen; transition: opacity .2s; }
.card:hover .card-img::after { opacity: 1; animation: holo 1.1s ease forwards; }
@keyframes holo { from { background-position: 120% 0; } to { background-position: -20% 0; } }
@media (prefers-reduced-motion: reduce) { .card, .card:hover { transform: none; } .card:hover .card-img::after { animation: none; } }

.banner { background: var(--surface); border-color: var(--border); }
.banner.warn { background: #3a2f0c; }
.banner h4 { color: var(--accent); }
.dialog { background: var(--surface); border: 2px solid var(--frame); border-radius: 18px; }
.dialog::backdrop { background: rgb(5 9 25 / .7); }
.dlg-head { border-bottom: 1px solid var(--border); }
.dlg-head h3 { font-weight: 900; color: var(--accent); }
legend { color: var(--accent); font-weight: 900; }
.watch-summary { background: #0e1940; }
.kg-label { color: var(--muted); }
.cat-results { background: var(--surface-2); }
.cat-picked { background: #0e1940; }

.login { background: radial-gradient(110% 80% at 70% 10%, #1d3f8a 0%, #0b1330 62%); }
.login::before { content: ""; position: absolute; width: min(90vmin, 760px); aspect-ratio: 1; right: -18vmin; bottom: -22vmin; opacity: .07;
  border-radius: 50%; border: 5vmin solid #fff; background: linear-gradient(transparent 46%, #fff 46% 54%, transparent 54%); }
.login-box { border: 6px solid var(--frame); border-radius: 20px; box-shadow: 0 20px 50px rgb(0 0 0 / .5); }
.login-box .brand { font-size: 24px; }
.onb-head { background: linear-gradient(135deg, #2a75bb, #1d3f8a 60%, #13214f); }
.mission.bonus .m-xp { color: var(--accent-ink); background: var(--accent); }
.toast { background: var(--accent); color: var(--accent-ink); font-weight: 800; }

.cat-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cat-suggest .kchip { font-weight: 700; }
.cat-suggest .kchip:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.stockbadge.st-store { background: #6d5a1f; }
.login { overflow-x: hidden; }


/* --- běžící Pikachu na přihlášení a evoluce v průvodci --- */
.login > .runner { position: absolute; inset: auto 0 5vh 0; height: 170px; z-index: 0; pointer-events: none; overflow: hidden; }
.runner-path { position: absolute; left: 0; bottom: 0; width: 150px; animation: run-x 18s linear infinite; }
.runner-img { display: block; width: 150px; height: 150px; object-fit: contain; animation: hop .38s ease-in-out infinite alternate;
  filter: drop-shadow(0 6px 12px rgb(0 0 0 / .35)); }
.runner-shadow { position: absolute; left: 30px; right: 30px; bottom: 4px; height: 12px; border-radius: 50%;
  background: rgb(0 0 0 / .35); animation: hop-shadow .38s ease-in-out infinite alternate; z-index: -1; }
/* rendery koukají doleva: doprava běží zrcadlově, na kraji se otočí */
@keyframes run-x {
  0% { transform: translateX(-170px) scaleX(-1); }
  48% { transform: translateX(calc(100vw + 20px)) scaleX(-1); }
  52% { transform: translateX(calc(100vw + 20px)) scaleX(1); }
  100% { transform: translateX(-170px) scaleX(1); }
}
@keyframes hop { from { transform: translateY(0) rotate(-3deg); } to { transform: translateY(-22px) rotate(3deg); } }
@keyframes hop-shadow { from { transform: scaleX(1); opacity: .45; } to { transform: scaleX(.7); opacity: .25; } }

.onb-mon { position: absolute; right: 56px; top: 8px; width: 120px; height: 120px; z-index: 1; pointer-events: none; }
.onb-mon img { width: 100%; height: 100%; object-fit: contain; animation: hop .55s ease-in-out infinite alternate;
  filter: drop-shadow(0 6px 10px rgb(0 0 0 / .35)); transition: filter .15s; }
.onb-mon[data-stage="0"] img { transform-origin: bottom; scale: .7; }
.onb-mon[data-stage="1"] img { scale: .85; }
.onb-mon-shadow { position: absolute; left: 30px; right: 30px; bottom: 2px; height: 10px; border-radius: 50%; background: rgb(0 0 0 / .3);
  animation: hop-shadow .55s ease-in-out infinite alternate; }
.onb-mon.evolving img { filter: brightness(0) invert(1) drop-shadow(0 0 14px #fff); animation: none; }
.onb-mon.evolved img { animation: evolved 1.1s ease-out, hop .55s ease-in-out 1.1s infinite alternate; }
@keyframes evolved { 0% { filter: brightness(3) drop-shadow(0 0 30px #fff); transform: scale(1.25); } 100% { filter: none; transform: scale(1); } }
.onb-head .onb-top > div, .onb-head .xp, .onb-head .onb-meta, .onb-head .badges { position: relative; z-index: 2; }
.onb-head .xp, .onb-head .onb-meta { margin-right: 140px; }
@media (max-width: 520px) { .onb-mon { width: 84px; height: 84px; right: 46px; } .onb-head .xp, .onb-head .onb-meta { margin-right: 96px; } }
@media (prefers-reduced-motion: reduce) {
  .runner-path, .runner-img, .runner-shadow, .onb-mon img, .onb-mon-shadow { animation: none; }
  .runner-path { left: 8vw; transform: scaleX(-1); }
}
.login::before { position: fixed; }
.onb-head > .onb-mon { position: absolute; z-index: 1; }

/* znělka: tlačítko v rohu přihlášení */
.login > .radio { position: absolute; left: 16px; bottom: 16px; z-index: 2; }
.radio-btn { background: var(--surface); border: 2px solid var(--frame); color: var(--accent); border-radius: 999px; padding: 8px 16px;
  box-shadow: 0 8px 20px rgb(0 0 0 / .4); }
.radio-btn.on { background: var(--accent); color: var(--accent-ink); }

.onb-finish .trophy { animation: none; }  /* pohár stojí, neskáče */
.onb-x.music-toggle { position: relative; z-index: 3; }
.onb-head > .onb-mon { right: 96px; }
.onb-head .xp, .onb-head .onb-meta { margin-right: 190px; }
@media (max-width: 520px) { .onb-head > .onb-mon { right: 84px; } .onb-head .xp, .onb-head .onb-meta { margin-right: 150px; } }

.login > .radio { display: flex; gap: 8px; align-items: center; }
.music-pick { width: auto; padding: 6px 8px; font-size: 13px; font-weight: 700; border-radius: 999px; cursor: pointer; }
.radio-pick { border: 2px solid var(--frame); background: var(--surface); color: var(--accent); box-shadow: 0 8px 20px rgb(0 0 0 / .4); }
.top-pick { padding: 4px 8px; }
@media (max-width: 480px) { .top-pick { display: none; } }

.music-vol { width: 90px; padding: 0; border: 0; background: none; accent-color: var(--accent); cursor: pointer; }
.top-vol { width: 70px; align-self: center; }
.radio-vol { width: 100px; }
@media (max-width: 640px) { .top-vol { display: none; } }

.imgnote { position: absolute; left: 8px; bottom: 8px; z-index: 2; padding: 1px 7px; border-radius: 999px; font-size: 10.5px;
  font-weight: 700; background: rgb(19 33 79 / .85); color: #cfd8ff; }
.card-img .imgnote ~ .newdot { bottom: 30px; }

.chip.auction { background: rgb(42 117 187 / .25); color: #9fd0ff; font-weight: 700; }
