/* Verbmon – tmavé herní rozhraní.
   Layout: jeden sloupec max 480 px, karty na tmavém pozadí, akcenty podle typu Verbmona. */
:root {
  color-scheme: dark;
  --bg: #0c1020;
  --bg2: #141a30;
  --card: #171e36;
  --card2: #1f2846;
  --line: rgba(160, 180, 255, .14);
  --line2: rgba(160, 180, 255, .26);
  --ink: #eef1ff;
  --muted: #8f98c2;
  --accent: #ffd23f;
  --accent-ink: #1a1400;
  --cyan: #4fd8ff;
  --red: #ff5470;
  --green: #3ddc97;
  --orange: #ff9a3c;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --display: 'Chakra Petch', 'Segoe UI', system-ui, sans-serif;
  --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --pix: var(--display);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 40% at 50% -10%, rgba(79, 216, 255, .14), transparent 70%),
    linear-gradient(rgba(160, 180, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(160, 180, 255, .035) 1px, transparent 1px);
  background-size: auto, 28px 28px, 28px 28px;
  background-attachment: fixed;
  color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.45;
  overscroll-behavior: none;
}
#app { max-width: 480px; margin: 0 auto; min-height: 100dvh; position: relative; padding-bottom: 84px; }
h1, h2, h3 { margin: .3em 0; line-height: 1.15; font-family: var(--display); font-weight: 700; letter-spacing: .01em; text-wrap: balance; }
h2 { font-size: 1.45rem; }
h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
small { font-size: .8em; }
.muted { color: var(--muted); }
.center { text-align: center; }
.en { font-weight: 700; letter-spacing: .01em; }
.big { font-size: 1.5rem; font-family: var(--display); }
.hl { color: var(--accent); }
s { opacity: .6; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ------------ tlačítka ------------ */
.btn {
  font: inherit; font-family: var(--display); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .9rem;
  color: var(--ink); background: var(--card2); border: 1px solid var(--line2); border-radius: 10px; padding: 11px 16px;
  cursor: pointer; transition: transform .08s, filter .15s; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: linear-gradient(135deg, #ffe066, var(--accent)); color: var(--accent-ink); border-color: transparent; box-shadow: 0 6px 22px rgba(255, 210, 63, .25); }
.btn.danger { background: var(--red); color: #fff; border-color: transparent; }
.btn.gym { background: linear-gradient(135deg, #ff6a3d, #ff3d71); color: #fff; border-color: transparent; box-shadow: 0 6px 22px rgba(255, 61, 113, .3); }
.btn.big { width: 100%; padding: 14px 16px; font-size: 1rem; flex-direction: column; gap: 2px; margin: 8px 0; }
.btn.big small { font-family: var(--font); font-weight: 500; text-transform: none; letter-spacing: 0; opacity: .85; }
.btn.catch { background: linear-gradient(135deg, #6a3df0, #b04dff); color: #fff; flex-direction: row; font-size: 1.05rem; border-color: transparent; box-shadow: 0 6px 24px rgba(160, 80, 255, .4); }
.btn.catch .ball { width: 32px; height: 32px; }
.icon-btn {
  font: inherit; font-size: 1.1rem; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line2);
  background: rgba(12, 16, 32, .7); color: var(--ink); cursor: pointer; position: relative; padding: 0; backdrop-filter: blur(6px);
}
.icon-btn small { position: absolute; right: -6px; bottom: -6px; background: var(--accent); color: var(--accent-ink); font-size: .65rem; font-weight: 800; border-radius: 8px; padding: 1px 5px; }
.say { border: none; background: none; font-size: 1em; cursor: pointer; padding: 0 2px; vertical-align: middle; filter: grayscale(.3); }
.row { display: flex; gap: 10px; justify-content: space-between; align-items: center; }
.row .btn.big { flex: 1; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 14px 0; }
.chip { display: inline-block; font-family: var(--display); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 2px 8px; border-radius: 6px; color: #0c1020; }
.t-pres { background: #ffd23f; } .t-reg { background: #3ddc97; } .t-AAA { background: #c9a97c; }
.t-ABB { background: #4fb5ff; } .t-IAU { background: #b98bff; } .t-ABC { background: #ff6a4d; }
.t-bg-pres { --tc: 255, 210, 63; } .t-bg-reg { --tc: 61, 220, 151; } .t-bg-AAA { --tc: 201, 169, 124; }
.t-bg-ABB { --tc: 79, 181, 255; } .t-bg-IAU { --tc: 185, 139, 255; } .t-bg-ABC { --tc: 255, 106, 77; }
[class*="t-bg-"] { background: radial-gradient(circle at 50% 30%, rgba(var(--tc), .28), transparent 70%), var(--card); border-color: rgba(var(--tc), .45) !important; color: var(--ink); }

/* ------------ intro ------------ */
.intro { padding: 24px 16px; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.logo { font-family: var(--display); font-weight: 700; font-style: italic; font-size: clamp(2.6rem, 14vw, 3.6rem); text-align: center; margin: 16px 0 4px; letter-spacing: .02em; text-transform: uppercase;
  background: linear-gradient(180deg, #fff 10%, var(--accent) 60%, #ff9a3c); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 18px rgba(255, 210, 63, .35)); }
.logo span { background: linear-gradient(180deg, #fff 10%, var(--cyan) 70%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tag { text-align: center; color: var(--muted); margin: 0 0 18px; }
.intro-card { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 10px; }
.intro-card label { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; color: var(--muted); }
input#nm, .typebox input {
  font: inherit; font-size: 1.15rem; font-weight: 600; padding: 12px 14px; border: 1px solid var(--line2); border-radius: 10px;
  background: #0b0f1e; color: var(--ink); width: 100%; outline: none;
}
input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(79, 216, 255, .2); }
.floaters { position: relative; height: 150px; }
.float { position: absolute; width: 90px; animation: floaty 4s ease-in-out infinite; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .5)); }
.float.f0 { left: 4%; top: 10px; } .float.f1 { left: 36%; top: 40px; width: 110px; animation-delay: -1s; }
.float.f2 { right: 4%; top: 0; animation-delay: -2s; } .float.f3 { left: 20%; top: 80px; width: 64px; animation-delay: -.5s; }
.float.f4 { right: 22%; top: 84px; width: 60px; animation-delay: -1.6s; }
@keyframes floaty { 50% { transform: translateY(-10px); } }
.edition { text-align: center; font-family: var(--display); font-weight: 700; letter-spacing: .22em; text-transform: uppercase; font-size: .78rem; color: var(--cyan); border: 1px solid rgba(79, 216, 255, .4); border-radius: 6px; padding: 5px 12px; margin: 0 auto 10px; width: fit-content; background: rgba(79, 216, 255, .08); }
.prof { display: flex; gap: 10px; align-items: flex-end; margin: 10px 0; }
.prof-av { font-size: 2.6rem; line-height: 1; }
.bubble { background: var(--card); border: 1px solid var(--line2); border-radius: 14px 14px 14px 4px; padding: 12px 14px; }
.starters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.starter { border: 1px solid var(--line2); border-radius: 14px; padding: 8px 4px 12px; cursor: pointer; display: flex; flex-direction: column; align-items: center; font: inherit; gap: 2px; transition: transform .15s; }
.starter:hover { transform: translateY(-3px); }
.starter .mon { width: 100%; max-width: 110px; }
.starter b { font-family: var(--display); font-size: 1rem; } .starter small { color: var(--muted); }
.big-mon { width: 170px; max-width: 60vw; }

/* ------------ status + nav ------------ */
.status { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: rgba(12, 16, 32, .85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.avatar { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, var(--cyan), #6a3df0); color: #fff; font-family: var(--display); font-weight: 700; display: grid; place-items: center; font-size: 1.1rem; flex: none; }
.st-main { flex: 1; min-width: 0; }
.st-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv { font-family: var(--display); font-size: .7rem; font-weight: 700; background: var(--card2); color: var(--accent); padding: 1px 6px; border-radius: 5px; vertical-align: middle; border: 1px solid var(--line2); }
.xpbar, .rbar, .qbar { height: 6px; background: rgba(160, 180, 255, .12); border-radius: 99px; overflow: hidden; margin-top: 5px; }
.xpbar i, .rbar i, .qbar i { display: block; height: 100%; background: linear-gradient(90deg, #6a3df0, var(--cyan)); border-radius: 99px; transition: width .6s; box-shadow: 0 0 10px rgba(79, 216, 255, .6); }
.rbar i { background: linear-gradient(90deg, #1fb57a, var(--green)); box-shadow: 0 0 10px rgba(61, 220, 151, .5); }
.rbar.big { height: 8px; margin: 6px 0 12px; }
.pill { font-family: var(--display); font-weight: 700; background: var(--card); border: 1px solid var(--line2); border-radius: 8px; padding: 4px 9px; font-size: .9rem; flex: none; font-variant-numeric: tabular-nums; }
.pill.hot { border-color: rgba(255, 154, 60, .6); color: var(--orange); }
.bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(12, 16, 32, .92); backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)); }
.nav-btn { font: inherit; font-family: var(--display); font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; border: none; background: none; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px; border-radius: 10px; cursor: pointer; }
.nav-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-btn.on { color: var(--accent); background: rgba(255, 210, 63, .08); }

/* ------------ home ------------ */
.home, .dex, .shop, .profile, .region { padding: 4px 16px 20px; }
.partner-card { display: flex; gap: 10px; align-items: center; border: 1px solid; border-radius: 18px; padding: 12px; margin-top: 14px; }
.pc-mon { width: 46%; flex: none; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .5)); }
.pc-tx { min-width: 0; }
.pc-tx small { font-family: var(--display); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-size: .68rem; }
.pc-tx h2 { margin: 0 0 2px; font-size: 1.6rem; }
.pc-tx .btn { margin-top: 10px; }
.pc-tx .muted { font-size: .9rem; }
.bob { animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-5px); } }
.quest { display: grid; grid-template-columns: 1fr 70px 44px; align-items: center; gap: 8px; font-size: .92rem; margin: 8px 0; }
.quest small { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.quest.done span { color: var(--green); }
.quest .qbar i { background: linear-gradient(90deg, var(--orange), var(--accent)); box-shadow: none; }
.map-title { margin-top: 22px; }
.map { display: flex; flex-direction: column; align-items: stretch; }
.node { display: flex; gap: 12px; align-items: center; text-align: left; font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; width: 90%; cursor: pointer; position: relative; overflow: hidden; transition: transform .15s, border-color .15s; }
.node::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--rc); }
.node.left { align-self: flex-start; } .node.right { align-self: flex-end; }
.node:hover:not(:disabled) { border-color: var(--line2); transform: translateY(-2px); }
.node-ic { position: relative; width: 52px; height: 52px; flex: none; border-radius: 12px; background: color-mix(in srgb, var(--rc) 22%, transparent); border: 1px solid color-mix(in srgb, var(--rc) 60%, transparent); display: grid; place-items: center; font-size: 1.6rem; }
.node .nb { position: absolute; right: -6px; bottom: -6px; font-size: .9rem; background: var(--bg); border-radius: 6px; border: 1px solid var(--accent); width: 24px; height: 24px; display: grid; place-items: center; }
.node-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.node-tx b { font-family: var(--display); font-size: 1.02rem; }
.node-tx small { color: var(--muted); }
.node.locked { opacity: .45; filter: grayscale(.9); cursor: not-allowed; }
.node.won { border-color: rgba(255, 210, 63, .45); }
.path { width: 2px; height: 18px; margin: 0 auto; background: repeating-linear-gradient(to bottom, var(--line2) 0 4px, transparent 4px 8px); }

/* ------------ region ------------ */
.region-head { position: relative; padding: 14px 16px 20px; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; text-align: center; border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--rc) 40%, transparent), transparent 70%), var(--bg2); }
.region-head h2 { margin: 2px 0; font-size: 1.7rem; } .region-head p { margin: 0; color: var(--muted); }
.rh-emoji { font-size: 2.4rem; }
.trainer { display: grid; grid-template-columns: 40px 1fr auto 30px; gap: 8px; align-items: center; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.trainer:last-child { border-bottom: none; }
.trainer b { font-family: var(--display); }
.trainer .tav { font-size: 1.8rem; } .trainer small { color: var(--muted); }
.trainer.beaten { opacity: .5; } .trainer.next { background: rgba(255, 210, 63, .08); border-radius: 10px; }

/* ------------ lesson ------------ */
.lesson { padding: 14px 16px 24px; min-height: 100dvh; }
.lesson-top { display: flex; justify-content: space-between; align-items: center; font-family: var(--display); font-weight: 700; }
.brief-tag { margin: 18px 0 4px; font-family: var(--display); font-size: .72rem; text-transform: uppercase; letter-spacing: .24em; color: var(--rc); }
.lesson-card { border-top: 3px solid var(--rc); }
.lesson-card h3 { font-size: 1.35rem; text-transform: none; letter-spacing: .01em; color: var(--ink); }
.lesson-card p { margin: .6em 0; }
.tbl { border-collapse: collapse; width: 100%; margin: 8px 0; font-size: 1.02rem; }
.tbl td, .tbl th { border: 1px solid var(--line2); padding: 7px 8px; text-align: center; }
.tbl th { background: var(--card2); font-family: var(--display); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tbl td:first-child { color: var(--muted); }
.tip { background: rgba(79, 216, 255, .08); border-left: 3px solid var(--cyan); padding: 8px 10px; border-radius: 6px; }
.dots { display: flex; gap: 6px; justify-content: center; margin: 10px 0 14px; }
.dots i { width: 8px; height: 8px; border-radius: 2px; background: var(--line2); }
.dots i.on { background: var(--accent); width: 22px; }

/* ------------ dex ------------ */
.dex h2 small { color: var(--muted); font-size: .9rem; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; }
.tab { font: inherit; font-family: var(--display); font-weight: 600; letter-spacing: .04em; border: 1px solid var(--line2); border-radius: 8px; padding: 5px 12px; background: var(--card); color: var(--ink); cursor: pointer; flex: none; font-size: .95rem; }
.tab.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.dex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.dex-cell { font: inherit; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 4px 4px 8px; display: flex; flex-direction: column; align-items: center; cursor: pointer; transition: transform .12s; }
.dex-cell:hover { transform: translateY(-2px); }
.dex-cell.unk { background: var(--bg2); color: var(--muted); }
.dex-cell .mon { width: 100%; max-width: 84px; }
.dex-cell small { font-family: var(--display); font-size: .62rem; opacity: .6; }
.dex-cell b { font-family: var(--display); font-size: .82rem; letter-spacing: .04em; }
.stars { color: var(--accent); font-size: .78rem; letter-spacing: 1px; }
.forms { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 10px 0; }
.forms.three { grid-template-columns: 1fr 1fr 1fr; }
.forms > div { background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 7px 4px; text-align: center; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.forms small { color: var(--muted); font-family: var(--display); font-size: .62rem; text-transform: uppercase; letter-spacing: .06em; }
.forms b { font-size: 1.15rem; word-break: break-word; }
.rule { background: var(--card2); border-radius: 10px; padding: 9px 11px; font-size: .93rem; }
.example { font-size: .95rem; border-left: 3px solid var(--cyan); padding-left: 9px; }
.example small { color: var(--muted); }
.ex-head { display: flex; gap: 10px; align-items: center; }
.ex-head .mon { width: 92px; flex: none; }
.ex-head small { color: var(--muted); display: block; }
.cheat-wrap { overflow-x: auto; margin-bottom: 14px; }
.cheat { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 12px; font-size: .95rem; }
.cheat th { background: var(--card2); font-family: var(--display); font-size: .66rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); text-align: left; padding: 7px 6px; }
.cheat td { padding: 7px 6px; border-top: 1px solid var(--line); cursor: pointer; }
.cheat td.cz { color: var(--muted); font-size: .82rem; }
.cheat td:last-child { color: var(--accent); font-size: .7rem; white-space: nowrap; }
.cheat tr.got td:first-child b { color: var(--green); }
.cheat tr:hover td { background: rgba(160, 180, 255, .05); }

/* ------------ shop/profile ------------ */
.shop-item { display: flex; align-items: center; gap: 12px; }
.si-ic { font-size: 2rem; } .si-tx { flex: 1; display: flex; flex-direction: column; min-width: 0; } .si-tx b { font-family: var(--display); } .si-tx small { color: var(--muted); }
.tcard { margin-top: 14px; border: 1px solid rgba(255, 210, 63, .35); border-radius: 16px; overflow: hidden; background: linear-gradient(145deg, #23204a, #121833 60%); box-shadow: var(--shadow); }
.tc-top { display: flex; justify-content: space-between; padding: 9px 14px; background: rgba(255, 210, 63, .1); color: var(--accent); font-family: var(--display); font-size: .74rem; text-transform: uppercase; letter-spacing: .16em; }
.tc-body { display: flex; gap: 12px; align-items: center; padding: 12px 14px; }
.tc-body p { margin: 2px 0; color: var(--muted); }
.tc-body p b { color: var(--ink); }
.tc-mon { width: 104px; flex: none; background: rgba(160, 180, 255, .06); border-radius: 12px; border: 1px solid var(--line); }
.badges { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 10px 14px 14px; }
.badge { aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center; font-size: 1.15rem; background: rgba(160, 180, 255, .06); border: 1px dashed var(--line2); color: var(--muted); font-family: var(--display); }
.badge small { display: none; }
.badge.on { background: rgba(255, 210, 63, .12); border: 1px solid var(--accent); box-shadow: 0 0 14px rgba(255, 210, 63, .35); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; text-align: center; }
.stats b { font-family: var(--display); font-size: 1.5rem; display: block; font-variant-numeric: tabular-nums; }
.stats small { color: var(--muted); }
.settings { display: flex; flex-direction: column; gap: 12px; }
.toggle { display: flex; gap: 10px; align-items: center; }
.toggle input { width: 20px; height: 20px; accent-color: var(--accent); }

/* ------------ souboj ------------ */
.battle { min-height: 100dvh; display: flex; flex-direction: column; margin-bottom: -84px; }
.btop { display: flex; align-items: center; gap: 8px; padding: 10px 12px; position: relative; z-index: 3; }
.bprog { flex: 1; display: flex; justify-content: center; gap: 6px; font-family: var(--display); font-weight: 700; }
.bprog span { background: rgba(12, 16, 32, .7); border: 1px solid var(--line2); border-radius: 8px; padding: 2px 10px; font-variant-numeric: tabular-nums; }
.bprog i { width: 22px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .2); }
.bprog i.cur { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.bprog i.ok { background: var(--green); } .bprog i.miss { background: rgba(255, 255, 255, .35); }
.scene { position: relative; flex: none; height: clamp(250px, 40dvh, 340px); overflow: hidden; }
.scene::after { content: ''; position: absolute; left: 0; right: 0; top: 52%; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .25), transparent); }
.battle { --sky1: #1a2350; --sky2: #2b3a7a; --gnd1: #17213f; --gnd2: #0f1630; --glow: 79, 216, 255; }
.battle .scene { background:
  radial-gradient(ellipse 70% 50% at 70% 30%, rgba(var(--glow), .25), transparent 70%),
  linear-gradient(180deg, var(--sky1) 0%, var(--sky2) 52%, var(--gnd1) 52%, var(--gnd2) 100%); }
.bg-pres { --sky1: #2a1f4f; --sky2: #8a4d3a; --gnd1: #3a3418; --gnd2: #17150b; --glow: 255, 210, 63; }
.bg-reg { --sky1: #0f2a3a; --sky2: #1f5a55; --gnd1: #133b2a; --gnd2: #081a12; --glow: 61, 220, 151; }
.bg-AAA { --sky1: #1d1a1a; --sky2: #4a3c30; --gnd1: #2e261e; --gnd2: #14100c; --glow: 201, 169, 124; }
.bg-ABB { --sky1: #0b1a3a; --sky2: #14427a; --gnd1: #0d2f5a; --gnd2: #061428; --glow: 79, 181, 255; }
.bg-IAU { --sky1: #170f33; --sky2: #3f2475; --gnd1: #2a1850; --gnd2: #120a24; --glow: 185, 139, 255; }
.bg-ABC { --sky1: #1f0a12; --sky2: #6e1f1a; --gnd1: #3a1210; --gnd2: #160606; --glow: 255, 106, 77; }
.bg-did, .bg-mix { --sky1: #0d1230; --sky2: #2d2b6e; --gnd1: #1b1d4a; --gnd2: #0a0b20; --glow: 255, 210, 63; }
.espot { position: absolute; right: 4%; top: 12%; width: 44%; }
.pspot { position: absolute; left: 4%; bottom: 4%; width: 44%; }
.plat { position: absolute; left: 4%; right: 4%; bottom: 3%; height: 22%; border-radius: 50%; background: radial-gradient(ellipse, rgba(var(--glow), .35), rgba(var(--glow), .05) 60%, transparent 72%); border: 1px solid rgba(var(--glow), .35); }
.sprite { position: relative; z-index: 1; }
.sprite .mon { width: 100%; display: block; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .55)); }
.sprite .mon.back { transform: scaleX(-1); }
.leader { font-size: 5rem; text-align: center; animation: enter .5s ease-out; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .6)); }
.hud { position: absolute; z-index: 2; background: rgba(12, 16, 32, .78); backdrop-filter: blur(8px); color: var(--ink); border: 1px solid var(--line2); border-radius: 10px; padding: 7px 10px; min-width: 46%; max-width: 52%; }
.ehud { left: 3%; top: 4%; border-left: 3px solid var(--red); }
.phud { right: 3%; bottom: 8%; border-left: 3px solid var(--cyan); }
.ehud:empty { display: none; }
.hn { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-family: var(--display); font-size: .92rem; font-weight: 700; letter-spacing: .04em; }
.hn span { font-size: .78rem; color: var(--muted); }
.tico { font-size: .9rem; }
.shinytx { color: var(--accent); }
.owner { font-family: var(--display); font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.czname { color: var(--muted); display: block; font-size: .72rem; margin-top: 2px; }
.hpbar { display: flex; align-items: center; gap: 5px; margin-top: 5px; }
.hpbar span { font-family: var(--display); font-size: .6rem; font-weight: 700; color: var(--accent); }
.hpbar div { flex: 1; height: 6px; background: rgba(255, 255, 255, .12); border-radius: 99px; overflow: hidden; }
.hpbar i { display: block; height: 100%; background: var(--green); transition: width .5s; box-shadow: 0 0 8px rgba(61, 220, 151, .7); }
.hpbar i.mid { background: var(--accent); box-shadow: 0 0 8px rgba(255, 210, 63, .7); } .hpbar i.low { background: var(--red); box-shadow: 0 0 8px rgba(255, 84, 112, .7); }
.combo { font-family: var(--display); font-size: .74rem; font-weight: 700; color: var(--muted); margin-top: 3px; letter-spacing: .06em; text-transform: uppercase; }
.combo.on { color: var(--orange); text-shadow: 0 0 10px rgba(255, 154, 60, .7); }
.hearts { font-size: .78rem; margin-top: 2px; }
@keyframes pulse { 50% { transform: scale(1.06); } }

.panel { flex: 1; background: var(--card); color: var(--ink); border-top: 1px solid var(--line2); padding: 14px 16px calc(16px + env(safe-area-inset-bottom, 0px)); position: relative; z-index: 4; box-shadow: 0 -12px 30px rgba(0, 0, 0, .35); }
.panel::before { content: ''; position: absolute; left: 16px; right: 16px; top: -1px; height: 2px; background: linear-gradient(90deg, transparent, rgba(var(--glow), .9), transparent); }
.msg { font-size: 1.12rem; padding: 10px 4px 24px; min-height: 100px; cursor: pointer; position: relative; }
.tapnext { position: absolute; right: 4px; bottom: 0; animation: blink 1.1s infinite; color: var(--accent); font-size: .8rem; }
@keyframes blink { 50% { opacity: 0; } }
.question { display: flex; flex-direction: column; gap: 10px; }
.qprompt { font-size: 1.18rem; font-weight: 500; }
.qprompt .en { font-size: 1.22rem; }
.blank { display: inline-block; min-width: 70px; border-bottom: 2px solid var(--cyan); color: transparent; }
.hintv { color: var(--cyan); font-weight: 600; }
.qsub { color: var(--muted); font-size: .92rem; }
.qhint { font-family: var(--display); font-size: .95rem; color: var(--cyan); letter-spacing: 2px; }
.qhint:empty { display: none; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opt { font: inherit; font-size: 1.05rem; font-weight: 600; padding: 14px 8px; border: 1px solid var(--line2); background: var(--card2); color: var(--ink); border-radius: 10px; cursor: pointer; word-break: break-word; transition: border-color .12s, transform .08s; }
.opt:hover { border-color: rgba(79, 216, 255, .6); }
.opt:active { transform: scale(.98); }
.opt.right { background: rgba(61, 220, 151, .2); border-color: var(--green); color: #fff; box-shadow: 0 0 16px rgba(61, 220, 151, .35); }
.opt.bad { background: rgba(255, 84, 112, .2); border-color: var(--red); color: #fff; animation: shake .4s; }
.opt.gone { opacity: .2; }
.typebox { display: flex; gap: 8px; }
.typebox input { flex: 1; min-width: 0; }
.typebox.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.typebox.two .tf.base { grid-column: 1 / -1; display: flex; gap: 8px; align-items: baseline; }
.typebox.two .btn { grid-column: 1 / -1; padding: 12px; }
.tlab { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tlab small, .tf small { color: var(--muted); font-family: var(--display); text-transform: uppercase; letter-spacing: .06em; font-size: .68rem; }
.tlab input { width: 100%; }
.idk { font: inherit; font-size: .88rem; background: none; border: none; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; align-self: center; padding: 4px; }
.okbar { background: rgba(61, 220, 151, .15); border: 1px solid var(--green); color: var(--green); font-family: var(--display); font-weight: 700; font-size: 1.05rem; border-radius: 10px; padding: 10px; text-align: center; animation: pop .25s; }
.okbar b { color: #fff; }
.feedback { display: flex; flex-direction: column; gap: 8px; max-height: 58dvh; overflow-y: auto; }
.fb-head { font-family: var(--display); font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; }
.fb-correct { font-size: 1.15rem; background: rgba(61, 220, 151, .1); border: 1px solid rgba(61, 220, 151, .5); border-radius: 10px; padding: 7px 10px; }
.diag { background: rgba(255, 154, 60, .1); border: 1px solid rgba(255, 154, 60, .5); border-radius: 10px; padding: 8px 10px; }
.explain .ex-head .mon { width: 66px; }
.catchbox { text-align: center; font-size: 1.1rem; }

/* animace souboje */
.mon.enter { animation: enter .55s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes enter { from { transform: translateX(50%) scale(.5); opacity: 0; } }
.attack { animation: attack .45s; }
@keyframes attack { 40% { transform: translate(26%, -16%); } }
.lunge { animation: lunge .45s; }
@keyframes lunge { 40% { transform: translate(-22%, 14%); } }
.hurt { animation: hurt .5s; }
@keyframes hurt { 0%, 40%, 80% { filter: brightness(2.6) saturate(0); transform: translateX(-6px); } 20%, 60%, 100% { filter: none; transform: translateX(6px); } }
.mon.absorb { animation: absorb .5s forwards; }
@keyframes absorb { to { transform: scale(0); opacity: 0; filter: brightness(4); } }
.mon.faint { animation: faint .6s forwards; }
@keyframes faint { to { transform: translateY(40%); opacity: 0; } }
.mon.flee { animation: flee .6s forwards; }
@keyframes flee { to { transform: translateX(120%); opacity: 0; } }
.thrown { position: absolute; z-index: 5; width: 40px; height: 40px; left: 18%; bottom: 30%; animation: throw .9s cubic-bezier(.2, .7, .5, 1) forwards; }
.thrown .ball { width: 100%; height: 100%; filter: drop-shadow(0 0 10px rgba(176, 77, 255, .8)); }
@keyframes throw { 0% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(36vw, -150px) rotate(540deg); } 100% { transform: translate(min(52vw, 250px), -96px) rotate(720deg); } }
.thrown.land { animation: none; transform: translate(min(52vw, 250px), -60px); transition: transform .25s ease-in; }
.thrown.wobble .ball { animation: wobble .4s; }
@keyframes wobble { 25% { transform: rotate(-25deg); } 75% { transform: rotate(25deg); } }
.thrown.sparkle { filter: drop-shadow(0 0 16px var(--accent)) brightness(1.3); }
#fx { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.fxt { position: absolute; font-family: var(--display); font-weight: 700; text-align: center; animation: rise 1.2s forwards; white-space: nowrap; letter-spacing: .04em; }
.fxt.at-enemy { right: 18%; top: 22%; } .fxt.at-player { left: 14%; bottom: 40%; } .fxt.at-center { left: 0; right: 0; top: 36%; }
.fxt.dmg { color: var(--cyan); font-size: 1.2rem; text-shadow: 0 0 12px rgba(79, 216, 255, .8); }
.fxt.pdmg { color: var(--red); font-size: 1.3rem; text-shadow: 0 0 12px rgba(255, 84, 112, .8); }
.fxt.heal { color: var(--green); font-size: 1.3rem; text-shadow: 0 0 12px rgba(61, 220, 151, .8); }
.fxt.crit, .fxt.super { font-size: 1.35rem; font-style: italic; text-transform: uppercase; color: var(--accent); text-shadow: 0 0 18px rgba(255, 210, 63, .9), 2px 2px 0 #b3261e; line-height: 1.3; }
@keyframes rise { 0% { transform: translateY(10px) scale(.7); opacity: 0; } 20% { transform: translateY(0) scale(1.1); opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(-36px) scale(1); opacity: 0; } }

/* ------------ výsledky ------------ */
.result { padding: 34px 16px; text-align: center; min-height: 100dvh; }
.result h1 { font-size: 2rem; text-transform: uppercase; font-style: italic; letter-spacing: .03em; }
.result.won h1 { background: linear-gradient(180deg, #fff, var(--accent) 60%, var(--orange)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 16px rgba(255, 210, 63, .4)); }
.result .sub { font-size: 1.05rem; color: var(--muted); }
.result .sub b { color: var(--ink); }
.bigstars { font-size: 3.2rem; display: flex; justify-content: center; gap: 8px; }
.bigstars span { color: rgba(160, 180, 255, .18); animation: starpop .5s backwards; }
.bigstars span.on { color: var(--accent); text-shadow: 0 0 22px rgba(255, 210, 63, .7); }
@keyframes starpop { from { transform: scale(0) rotate(-90deg); } }
.res-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.res-stats b { display: block; font-family: var(--display); font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.res-stats small { color: var(--muted); }
.res-stats .xp { color: var(--cyan); } .res-stats .coin { color: var(--accent); }
.minis { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.mini { width: 72px; display: flex; flex-direction: column; align-items: center; font-family: var(--display); font-weight: 700; }
.mini .mon { width: 100%; }

/* ------------ modal, toast, confetti ------------ */
#modal { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; padding: 16px; }
#modal.open { display: flex; }
.modal-back { position: absolute; inset: 0; background: rgba(4, 6, 16, .75); backdrop-filter: blur(4px); }
.modal-card { position: relative; width: 100%; max-width: 440px; max-height: 92dvh; overflow-y: auto; background: var(--card); border: 1px solid var(--line2); border-radius: 18px; box-shadow: var(--shadow); padding: 18px; animation: pop .25s; }
.scan-title { font-family: var(--display); font-size: .72rem; text-transform: uppercase; letter-spacing: .2em; color: var(--cyan); margin-bottom: 8px; }
.big-q { font-size: 1.15rem; font-weight: 600; }
.lvup { font-family: var(--display); font-weight: 700; font-style: italic; font-size: 2.2rem; text-transform: uppercase; color: var(--accent); text-shadow: 0 0 22px rgba(255, 210, 63, .7); margin: 6px 0; }
.evo-label { font-family: var(--display); text-transform: uppercase; letter-spacing: .2em; font-size: .8rem; color: var(--cyan); }
.evo-stage { position: relative; width: 180px; height: 180px; margin: 0 auto; }
.evo-stage > div { position: absolute; inset: 0; }
.evo-a { animation: evoA 2.2s forwards; }
.evo-b { opacity: 0; animation: evoB 2.2s forwards; }
@keyframes evoA { 0%, 10%, 30%, 50%, 70% { opacity: 1; filter: brightness(1); } 20%, 40%, 60%, 80% { opacity: 1; filter: brightness(0) invert(1); } 90%, 100% { opacity: 0; } }
@keyframes evoB { 0%, 85% { opacity: 0; } 86% { opacity: 1; filter: brightness(0) invert(1); } 100% { opacity: 1; filter: none; } }
.evo-done { animation: fadeIn .4s 2.2s backwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } }
#toast { position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 6px; width: min(92vw, 420px); pointer-events: none; }
.toast-item { background: rgba(23, 30, 54, .96); color: var(--ink); border: 1px solid var(--line2); border-left: 3px solid var(--accent); border-radius: 10px; padding: 10px 14px; animation: drop .35s; transition: opacity .4s, transform .4s; box-shadow: var(--shadow); }
.toast-item.out { opacity: 0; transform: translateY(-10px); }
@keyframes drop { from { transform: translateY(-30px); opacity: 0; } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 4px; height: 14px; border-radius: 1px; animation: fall linear forwards; box-shadow: 0 0 6px currentColor; }
@keyframes fall { to { top: 105%; transform: translateX(40px) rotate(540deg); } }
.pop { animation: pop .25s; }
@keyframes pop { from { transform: scale(.96); opacity: .4; } }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .evo-b { opacity: 1; } .evo-a { opacity: 0; }
}
@media (max-height: 700px) {
  .scene { height: 220px; }
}
