/* LHC.institute – úvodní obrazovka (menu) a dokumentace. Barvy jako HUD hry: azurová + zlatá na tmavé. */
:root {
  --bg: #04070D; --shell: #070B13; --panel: #0A101B; --card: #0D1422; --line: #1A2438; --line2: #24314D;
  --text: #DCE4F0; --muted: #7C88A3; --cyan: #7DF9FF; --gold: #FFD66B; --green: #7CFFB2;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace; --body: 'IBM Plex Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 400 14px/1.55 var(--body); }
a { color: var(--cyan); }
.shell { max-width: 1180px; margin: 18px auto; padding: 22px 28px 18px; background: linear-gradient(180deg, #08101A, var(--shell));
  border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 0 0 1px #02040A, 0 30px 80px rgba(0, 0, 0, .5); }
.kicker { margin: 0; text-align: center; font: 500 11px var(--mono); letter-spacing: .32em; color: var(--muted); }
.title { margin: 18px 0 26px; text-align: center; font: 500 clamp(28px, 5.4vw, 64px)/1.05 var(--mono); letter-spacing: .14em; color: #EAF6FA;
  text-shadow: 0 0 18px rgba(125, 249, 255, .35), 0 0 2px rgba(255, 255, 255, .6); }
.tld { font-size: .32em; letter-spacing: .04em; color: var(--cyan); margin-left: .4em; vertical-align: -.1em; text-shadow: 0 0 10px rgba(125, 249, 255, .8); }
.cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 22px; }
.panel { background: radial-gradient(ellipse at 30% 0%, rgba(125, 249, 255, .04), transparent 60%), var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.card { background: linear-gradient(180deg, #0F1726, var(--card)); border: 1px solid var(--line2); border-radius: 14px; padding: 16px 18px; }
.eyebrow { margin: 0 0 6px; font: 700 10px var(--mono); letter-spacing: .16em; color: var(--cyan); }
.about h2 { margin: 0 0 8px; font: 500 italic 22px var(--mono); color: #FFF; }
.about p { margin: 0 0 8px; font: 400 12.5px/1.65 var(--mono); color: #A9B4CC; }
.about b { color: var(--gold); font-weight: 500; }
.facts { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 0; padding: 0; }
.facts li { border-top: 1px solid var(--line2); padding-top: 6px; }
.facts span { display: block; font: 700 9.5px var(--mono); letter-spacing: .14em; color: var(--muted); }
.facts b { font: 500 13px var(--mono); color: var(--cyan); }
/* živá scéna */
.scene { position: relative; margin: 18px 0 0; aspect-ratio: 16 / 11; border-radius: 16px; overflow: hidden; border: 1px solid var(--line2);
  background: radial-gradient(ellipse at 50% 40%, #0B1630, #03050A 70%); box-shadow: inset 0 0 60px rgba(0, 0, 0, .6); }
.scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scene-cta { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); padding: 9px 20px; border-radius: 999px; text-decoration: none;
  font: 700 12px var(--mono); letter-spacing: .14em; color: #05080F; background: linear-gradient(180deg, #CFFBFF, var(--cyan)); box-shadow: 0 0 18px rgba(125, 249, 255, .5); }
.scene-cta:hover { background: #FFF; }
.scene figcaption { position: absolute; left: 14px; bottom: 10px; font: 500 10px var(--mono); letter-spacing: .14em; color: rgba(125, 249, 255, .7); text-transform: uppercase; }
/* navigace */
.nav-head { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.nav-head h2 { margin: 0; font: 700 13px var(--mono); letter-spacing: .14em; color: #FFF; }
.nav-head p { margin: 4px 0 0; font: 500 10px var(--mono); letter-spacing: .14em; color: var(--muted); }
.badge { font: 700 10px var(--mono); letter-spacing: .1em; color: var(--cyan); padding: 5px 10px; border: 1px solid rgba(125, 249, 255, .45); border-radius: 999px; }
.item { display: block; margin: 0 0 10px; padding: 14px 16px; border: 1px solid var(--line2); border-radius: 14px; background: var(--card); color: var(--text); text-decoration: none; }
a.item:hover, .item:focus-within { border-color: rgba(125, 249, 255, .55); background: #101A2B; }
.item b { display: block; font: 500 18px var(--body); letter-spacing: .04em; color: #FFF; }
.item b i { font: 700 9.5px var(--mono); font-style: normal; letter-spacing: .1em; color: var(--green); border: 1px solid rgba(124, 255, 178, .5); padding: 2px 6px; margin-left: 6px; vertical-align: 3px; }
.item span { display: block; margin-top: 4px; font: 400 12.5px/1.5 var(--body); color: #A9B4CC; }
.item .row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.item button, .item .btn, .file { font: 700 11px var(--mono); letter-spacing: .08em; padding: 8px 12px; border-radius: 8px; cursor: pointer; text-decoration: none;
  color: #05080F; background: linear-gradient(180deg, #CFFBFF, var(--cyan)); border: 0; }
.file, .item button#b-wallet-off { color: var(--cyan); background: transparent; box-shadow: inset 0 0 0 1px rgba(125, 249, 255, .5); }
.wallet button#b-wallet { background: linear-gradient(180deg, #FFE7A8, #FF9A2E); }
.item button:disabled { opacity: .4; cursor: not-allowed; }
.file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file:focus-within, .item button:focus-visible, .item .btn:focus-visible, a.item:focus-visible, .scene-cta:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.note { margin: 14px 0 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font: 400 12px/1.6 var(--mono); color: #A9B4CC; }
.note p { margin: 0; }
.note .eyebrow { margin-bottom: 6px; color: var(--muted); }
.status { margin: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; font: 700 11.5px var(--mono); color: #FFF; }
.status.err { color: #FFB86B; }
.foot { margin-top: 16px; text-align: center; font: 500 11px var(--mono); color: var(--muted); letter-spacing: .08em; }
@media (max-width: 860px) {
  .shell { margin: 0; border-radius: 0; padding: 18px 14px; border: 0; }
  .cols { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .about h2 { font-size: 18px; }
  .panel { padding: 14px; }
  .title { letter-spacing: .06em; }
}

/* ---------- dokumentace ---------- */
.doc { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 22px; }
.doc-nav { position: sticky; top: 16px; align-self: start; display: flex; flex-direction: column; gap: 4px; font: 500 12px var(--mono); }
.doc-nav a { color: #A9B4CC; text-decoration: none; padding: 5px 8px; border-radius: 6px; }
.doc-nav a:hover { color: var(--cyan); background: var(--card); }
.doc-body section { margin-bottom: 18px; }
.doc-body h2 { margin: 0 0 8px; font: 700 13px var(--mono); letter-spacing: .14em; color: var(--cyan); text-transform: uppercase; }
.doc-body h3 { margin: 14px 0 4px; font: 600 15px var(--body); color: #FFF; }
.doc-body p, .doc-body li { color: #B8C2D6; }
.doc-body b { color: #FFF; font-weight: 600; }
.doc-body code { font: 500 12px var(--mono); color: var(--gold); }
.doc-body table { width: 100%; border-collapse: collapse; font: 400 13px var(--mono); }
.doc-body th, .doc-body td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.doc-body th { color: var(--muted); font-weight: 700; font-size: 11px; letter-spacing: .1em; }
.formula { font: 500 14px var(--mono); color: var(--green); padding: 10px 12px; border: 1px solid var(--line2); border-radius: 10px; background: #08101A; }
@media (max-width: 860px) { .doc { grid-template-columns: 1fr; } .doc-nav { position: static; flex-direction: row; flex-wrap: wrap; } }
/* levý sloupec: scéna vyplní zbytek výšky */
.panel.left { display: flex; flex-direction: column; }
.panel.left .scene { flex: 1 1 auto; min-height: 300px; aspect-ratio: auto; }
@media (max-width: 860px) { .panel.left .scene { aspect-ratio: 16 / 12; flex: none; } }
/* nová hra: výběr obtížnosti */
.modes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.mode { --mc: var(--cyan); display: flex; flex-direction: column; gap: 3px; padding: 10px 10px 9px; border-radius: 10px; text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--mc) 45%, transparent); background: color-mix(in srgb, var(--mc) 7%, #0B1220); }
.mode b { font: 700 13px var(--mono); letter-spacing: .12em; color: var(--mc); }
.mode small { font: 400 10.5px/1.35 var(--mono); color: #8C98B3; }
.mode:hover, .mode:focus-visible { background: color-mix(in srgb, var(--mc) 18%, #0B1220); border-color: var(--mc); box-shadow: 0 0 14px color-mix(in srgb, var(--mc) 30%, transparent); }
.mode:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.m-easy { --mc: var(--green); } .m-medium { --mc: var(--cyan); } .m-hard { --mc: #FF9A6E; } .m-custom { --mc: var(--gold); }
.m-custom { border-style: dashed; }
@media (max-width: 520px) { .modes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mode.last::after { content: 'naposledy'; font: 700 8.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mc); opacity: .75; }

/* ---------- CUSTOM ---------- */
.custom-page { --mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace; }
.title-sm { font-size: clamp(26px, 4.4vw, 48px); margin: 12px 0 20px; }
.custom-page .panel.left .scene { flex: none; aspect-ratio: 16 / 10; min-height: 0; margin: 0 0 14px; }
.cz-editor { padding: 14px; }
.cz-help { margin: 0 0 10px; font: 400 12px/1.6 var(--mono); color: #A9B4CC; }
.cz-help b { color: var(--gold); font-weight: 500; }
.cz-editor .row { display: flex; gap: 8px; margin-top: 10px; }
.ghost, .cz-actions .file { position: relative; font: 700 11px var(--mono); letter-spacing: .08em; padding: 9px 12px; border-radius: 8px; cursor: pointer;
  color: var(--cyan); background: transparent; border: 0; box-shadow: inset 0 0 0 1px rgba(125, 249, 255, .5); text-decoration: none; }
.ghost:hover { background: rgba(125, 249, 255, .08); }
.ghost:focus-visible, .cz-actions .file:focus-within, .cz-play:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.cz-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; font: 500 11px var(--mono); letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.cz-presets .mode { cursor: pointer; padding: 7px 12px; font: inherit; }
.cz-settings { display: flex; flex-direction: column; }
.cz-settings .st-group { padding: 4px 0; }
.cz-settings .st-reset { color: var(--cyan); background: transparent; border: 0; box-shadow: inset 0 0 0 1px rgba(125, 249, 255, .4); border-radius: 8px; padding: 8px 12px; font: 700 11px var(--mono); cursor: pointer; }
.cz-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0 10px; }
.cz-play { padding: 11px 22px; border-radius: 999px; text-decoration: none; font: 700 13px var(--mono); letter-spacing: .14em; color: #05080F;
  background: linear-gradient(180deg, #FFE7A8, var(--gold)); box-shadow: 0 0 18px rgba(255, 214, 107, .45); margin-right: auto; }
.cz-play:hover { background: #FFF2C8; }
@media (min-width: 861px) { .custom-page .panel.left { position: sticky; top: 12px; align-self: start; } }
/* logo v nadpisu: rotující zelený dvacetistěn před L */
.title-ico { display: inline-block; width: 1em; height: 1em; margin-right: .22em; vertical-align: -.12em; filter: drop-shadow(0 0 10px rgba(124, 255, 178, .45)); }

/* ---------- AI ARÉNA ---------- */
.ar-diff { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: -6px 0 18px; font: 500 11px var(--mono); letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.ar-diff .mode { cursor: pointer; padding: 7px 14px; font: inherit; }
.ar-diff .mode.on { background: color-mix(in srgb, var(--mc) 22%, #0B1220); border-color: var(--mc); box-shadow: 0 0 14px color-mix(in srgb, var(--mc) 35%, transparent); }
.ar-steps { margin: 0 0 14px; padding-left: 20px; font: 400 12.5px/1.6 var(--mono); color: #A9B4CC; }
.ar-steps b { color: #FFF; font-weight: 500; }
.ar-steps code, .ar-small code { color: var(--gold); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.arena-page button:not(.mode):not(.ghost) { font: 700 11px var(--mono); letter-spacing: .08em; padding: 9px 12px; border-radius: 8px; cursor: pointer; color: #05080F; background: linear-gradient(180deg, #CFFBFF, var(--cyan)); border: 0; }
.arena-page button:disabled { opacity: .35; cursor: not-allowed; }
.arena-page button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.ar-check { display: inline-flex; align-items: center; gap: 6px; font: 400 11.5px var(--mono); color: #A9B4CC; cursor: pointer; }
.ar-check span { color: var(--muted); }
.ar-prompt { margin: 12px 0 6px; max-height: 520px; overflow: auto; padding: 12px 14px; border: 1px solid var(--line2); border-radius: 12px; background: #060A12;
  font: 400 11.5px/1.55 var(--mono); color: #B8C2D6; white-space: pre-wrap; word-break: break-word; }
.ar-prompt:focus-visible { outline: 2px solid var(--cyan); }
.ar-small { margin: 0; font: 400 11px/1.5 var(--mono); color: var(--muted); }
.ar-board { width: 100%; border-collapse: collapse; font: 400 12.5px var(--mono); margin-bottom: 6px; }
.ar-board th { text-align: left; font: 700 10px var(--mono); letter-spacing: .1em; color: var(--muted); padding: 4px 6px; border-bottom: 1px solid var(--line2); }
.ar-board td { padding: 8px 6px; border-bottom: 1px solid var(--line); color: #CBD5E1; vertical-align: middle; }
.ar-board td i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: 0; }
.ar-board td small { display: block; margin-left: 17px; font-size: 10.5px; color: var(--muted); }
.ar-board td b { color: var(--gold); font-weight: 700; }
.ar-board tr.lead td { color: #FFF; }
.ar-board .empty { color: var(--muted); padding: 14px 6px; }
.ar-h3 { margin: 18px 0 10px; font: 700 11px var(--mono); letter-spacing: .14em; color: var(--muted); }
.ar-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ar-card { --ac: var(--cyan); padding: 12px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card); border-top: 2px solid color-mix(in srgb, var(--ac) 55%, transparent); }
.ar-card.has { border-color: color-mix(in srgb, var(--ac) 40%, var(--line2)); }
.ar-card header { display: flex; align-items: baseline; gap: 8px; }
.ar-card header i { width: 9px; height: 9px; border-radius: 50%; background: var(--ac); box-shadow: 0 0 8px var(--ac); align-self: center; }
.ar-card header b { font: 600 15px var(--body); color: #FFF; }
.ar-card header span { margin-left: auto; font: 400 10.5px var(--mono); color: var(--muted); }
.ar-meta, .ar-res { margin: 6px 0 0; font: 400 11.5px/1.4 var(--mono); color: #8C98B3; }
.ar-res b { color: var(--gold); }
.ar-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ar-actions button { padding: 7px 10px !important; }
.ar-more { min-width: 30px; }
.ar-tools { margin: 14px 0 10px; }
.ar-dialog { width: min(760px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line2); border-radius: 16px; background: #0A101B; color: var(--text); }
.ar-dialog::backdrop { background: rgba(2, 4, 10, .75); backdrop-filter: blur(2px); }
.ar-dialog form { display: flex; flex-direction: column; gap: 10px; padding: 18px; }
.ar-dialog h2 { margin: 0; font: 700 14px var(--mono); letter-spacing: .1em; color: #FFF; }
.ar-field { display: flex; flex-direction: column; gap: 4px; font: 500 10.5px var(--mono); letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.ar-field input, .ar-dialog textarea { font: 400 13px var(--mono); color: #E6E9F2; background: #060A12; border: 1px solid var(--line2); border-radius: 8px; padding: 8px 10px; text-transform: none; letter-spacing: 0; }
.ar-dialog textarea { min-height: 300px; resize: vertical; font-size: 12px; line-height: 1.5; }
.ar-dialog input:focus-visible, .ar-dialog textarea:focus-visible { outline: 2px solid var(--cyan); outline-offset: 1px; }
.ar-dlg-btns { justify-content: flex-end; }
.ar-check-msg { font: 500 11.5px var(--mono); color: var(--green); }
.ar-check-msg.err { color: #FFB86B; }
@media (max-width: 860px) { .ar-cards { grid-template-columns: minmax(0, 1fr); } .ar-prompt { max-height: 340px; } }
@media (min-width: 861px) { .arena-page .panel.left { position: sticky; top: 12px; align-self: start; } }
.ar-web { margin: 12px 0 0; padding: 10px 12px; border: 1px dashed var(--line2); border-radius: 12px; }
.ar-web p { margin: 0 0 8px; font: 400 12px/1.55 var(--mono); color: #A9B4CC; }
.ar-web b { color: #FFF; font-weight: 500; }
.ar-web a.ghost { display: inline-block; }
/* stránka bot/ (statická) */
.doc-body ul { padding-left: 18px; }
.doc-body li { margin: 4px 0; font: 400 13px/1.5 var(--mono); }
/* živá hra v náhledu (iframe s botem) */
.scene-live { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity .9s; pointer-events: none; background: transparent; }
.scene.live .scene-live { opacity: 1; }
.scene.live #scene { opacity: 0; transition: opacity .9s; }
.scene .scene-cta, .scene figcaption { z-index: 2; }
.scene figcaption { right: 14px; text-shadow: 0 1px 6px #000; }
.scene figcaption b { color: #FFF; font-weight: 700; }
.scene figcaption a { color: var(--gold); }
.scene.live figcaption { left: 0; right: 0; bottom: 0; padding: 22px 14px 10px; background: linear-gradient(180deg, transparent, rgba(3, 5, 10, .88) 60%); }
.kicker a { text-decoration: none; }
.kicker a:hover, .kicker a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- hlavička úvodní obrazovky: rámeček, znak s dvacetistěnem, nadpis ---------- */
.hero { --hb: rgba(125, 249, 255, .75); position: relative; display: flex; align-items: center; gap: clamp(14px, 2.4vw, 28px);
  width: fit-content; max-width: 100%; margin: 6px auto 26px; padding: clamp(14px, 2vw, 20px) clamp(18px, 3vw, 34px) clamp(14px, 2vw, 18px) clamp(14px, 2.2vw, 24px);
  border: 1px solid rgba(125, 249, 255, .13); border-radius: 16px;
  background: radial-gradient(ellipse 60% 120% at 8% 50%, rgba(124, 255, 178, .09), transparent 70%), linear-gradient(180deg, rgba(14, 22, 38, .7), rgba(6, 10, 18, .7));
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .03); }
/* rohové značky HUD */
.hero::before { content: ''; position: absolute; inset: -1px; border-radius: 16px; pointer-events: none;
  background:
    linear-gradient(var(--hb), var(--hb)) left top / 22px 2px no-repeat, linear-gradient(var(--hb), var(--hb)) left top / 2px 22px no-repeat,
    linear-gradient(var(--hb), var(--hb)) right top / 22px 2px no-repeat, linear-gradient(var(--hb), var(--hb)) right top / 2px 22px no-repeat,
    linear-gradient(var(--hb), var(--hb)) left bottom / 22px 2px no-repeat, linear-gradient(var(--hb), var(--hb)) left bottom / 2px 22px no-repeat,
    linear-gradient(var(--hb), var(--hb)) right bottom / 22px 2px no-repeat, linear-gradient(var(--hb), var(--hb)) right bottom / 2px 22px no-repeat; }
.hero-emblem { position: relative; flex: none; width: clamp(64px, 8.6vw, 104px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(124, 255, 178, .35); background: radial-gradient(circle, rgba(124, 255, 178, .12), rgba(5, 8, 15, .2) 70%);
  box-shadow: 0 0 22px rgba(124, 255, 178, .16), inset 0 0 18px rgba(124, 255, 178, .12); }
.hero-emblem::after { content: ''; position: absolute; inset: -7px; border-radius: 50%; border: 1px dashed rgba(124, 255, 178, .35); animation: hero-orbit 40s linear infinite; }
@keyframes hero-orbit { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hero-emblem::after { animation: none; } }
.hero-ico { width: 78%; height: 78%; display: block; filter: drop-shadow(0 0 8px rgba(124, 255, 178, .55)); }
.hero-text { min-width: 0; text-align: left; }
.hero-kicker { margin: 0 0 6px; font: 500 11px var(--mono); letter-spacing: .24em; color: var(--muted); }
.hero-kicker a { color: var(--cyan); text-decoration: none; }
.hero-kicker a:hover, .hero-kicker a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.hero-title { margin: 0; font: 500 clamp(26px, 4.6vw, 58px)/1.02 var(--mono); letter-spacing: .12em; color: #EAF6FA; white-space: nowrap;
  text-shadow: 0 0 18px rgba(125, 249, 255, .35), 0 0 2px rgba(255, 255, 255, .6); }
.hero-sub { display: flex; align-items: center; gap: 10px; margin: 10px 0 0; font: 500 10.5px var(--mono); letter-spacing: .22em; text-transform: uppercase; color: rgba(124, 255, 178, .75); }
.hero-sub::before { content: ''; width: 34px; height: 1px; background: linear-gradient(90deg, transparent, rgba(124, 255, 178, .8)); flex: none; }
@media (max-width: 700px) {
  .hero { width: 100%; margin-bottom: 18px; }
  .hero-title { white-space: normal; letter-spacing: .08em; }
  .hero-kicker { letter-spacing: .16em; font-size: 10px; }
  .hero-sub { letter-spacing: .12em; font-size: 9.5px; }
  .hero-sub::before { width: 18px; }
}

/* ---------- jazyk: bloky jen pro jeden jazyk, přepínač CZ | EN ---------- */
html[lang="en"] [data-lang="cs"], html:not([lang="en"]) [data-lang="en"] { display: none !important; }
.lang-switch { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid rgba(125, 249, 255, .3); border-radius: 999px; background: rgba(5, 8, 15, .6); }
.lang-switch button { font: 700 10px var(--mono, monospace); letter-spacing: .1em; padding: 4px 9px; border: 0; border-radius: 999px; cursor: pointer; color: #8C98B3; background: transparent; }
.lang-switch button[aria-pressed="true"] { color: #05080F; background: #7DF9FF; }
.lang-switch button:hover:not([aria-pressed="true"]) { color: #E6F9FF; }
.lang-switch button:focus-visible { outline: 2px solid #FFD66B; outline-offset: 1px; }
.shell { position: relative; }
.shell > .lang-switch { position: absolute; top: 14px; right: 16px; z-index: 5; }
@media (max-width: 860px) { .shell > .lang-switch { top: 8px; right: 10px; } }
/* úvodní stránka: přepínač nad rámečkem hlavičky, ať nepřekrývá rohové značky */
.shell > .lang-switch:has(+ .hero) { position: static; display: flex; width: fit-content; margin: -4px 0 6px auto; }
/* aréna má obecný styl tlačítek: přepínač jazyka ho nepřebírá */
.arena-page .lang-switch button:not(.mode):not(.ghost) { font: 700 10px var(--mono, monospace); letter-spacing: .1em; padding: 4px 9px; border: 0; border-radius: 999px; color: #8C98B3; background: transparent; }
.arena-page .lang-switch button:not(.mode):not(.ghost)[aria-pressed="true"] { color: #05080F; background: #7DF9FF; }
.arena-page .lang-switch button:not(.mode):not(.ghost):hover:not([aria-pressed="true"]) { color: #E6F9FF; }
html[lang="en"] .mode.last::after { content: 'last played'; }
.hero-sub a { color: #B6FFD6; text-decoration: none; text-transform: none; letter-spacing: .08em; font-weight: 700; }
.hero-sub a:hover, .hero-sub a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.hero-sub { display: block; line-height: 1.6; }
.hero-sub::before { display: inline-block; vertical-align: middle; margin-right: 10px; }
.foot-tm { display: inline-block; margin-top: 4px; font-size: 10px; opacity: .7; }
/* infografika „Jak se hraje“, než se rozběhne živá hra */
.scene-poster { position: absolute; inset: 0; z-index: 1; transition: opacity .9s; background: #04070D; }
.scene-poster img { width: 100%; height: 100%; object-fit: contain; object-position: 50% 0; display: block; }
.scene.live .scene-poster { opacity: 0; pointer-events: none; }
.scene.has-poster #scene { opacity: 0; }
.scene-loading { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); padding: 6px 14px; border-radius: 999px; white-space: nowrap;
  font: 700 10.5px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: #05080F; background: rgba(125, 249, 255, .85);
  box-shadow: 0 0 16px rgba(125, 249, 255, .45); animation: scene-pulse 1.4s ease-in-out infinite; }
@keyframes scene-pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .scene-loading { animation: none; } }
.scene.has-poster:not(.live) figcaption { opacity: 0; }

/* ==========================================================================
   Styl „HUD stanice“ (podle nového praku ve hře): zkosené rohy vlevo nahoře a vpravo dole,
   tenká svítící azurová hrana (i na zkosení), tmavý podklad, oranžové značky.
   Proměnné: --c zkosení, --bc barva hrany, --bg podklad.
   ========================================================================== */
.shell, .panel, .card, .item, .note, .status, .scene, .hero, .mode, .badge, .ar-card, .ar-prompt, .ar-web, .ar-dialog, .ar-slot, .ar-buy-wallet, .ar-logo-prev,
.item button, .item .btn, .file, .ghost, .cz-play, .scene-cta, .arena-page button:not(.mode):not(.ghost), .lang-switch, .lang-switch button,
.scene-loading, .doc-nav a {
  --c: 10px; --bc: rgba(125, 249, 255, .55); --bg: rgba(3, 7, 13, .8);
  border: 1px solid var(--bc); border-radius: 0; background-origin: border-box;
  background:
    linear-gradient(135deg, transparent calc(var(--c) * .7071 - .8px), var(--bc) 0 calc(var(--c) * .7071 + .6px), transparent 0),
    linear-gradient(315deg, transparent calc(var(--c) * .7071 - .8px), var(--bc) 0 calc(var(--c) * .7071 + .6px), transparent 0),
    var(--bg);
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}
/* velké plochy */
.shell { --c: 28px; --bc: rgba(125, 249, 255, .35); --bg: linear-gradient(180deg, #060C15, #04080E); box-shadow: none; position: relative; }
.shell::before { content: ''; position: absolute; left: 40px; top: 0; width: 56px; height: 2px; background: var(--gold); }
.shell::after { content: ''; position: absolute; right: 40px; bottom: 0; width: 70px; height: 3px; background: var(--cyan); opacity: .8; }
.panel { --c: 20px; --bc: rgba(125, 249, 255, .45); --bg: radial-gradient(ellipse at 30% 0%, rgba(125, 249, 255, .05), transparent 60%), rgba(4, 9, 16, .92);
  box-shadow: inset 0 0 30px rgba(125, 249, 255, .04); position: relative; }
.panel::before { content: ''; position: absolute; left: 28px; top: 0; width: 36px; height: 2px; background: var(--gold); }
.card { --c: 14px; --bg: linear-gradient(180deg, rgba(10, 22, 34, .92), rgba(4, 9, 16, .92)); }
.item { --c: 12px; --bc: rgba(125, 249, 255, .35); --bg: rgba(5, 12, 20, .92); position: relative; }
a.item:hover, .item:focus-within { --bc: rgba(207, 251, 255, .9); --bg: rgba(10, 34, 48, .85); }
.item::after { content: ''; position: absolute; left: 0; top: 18px; bottom: 18px; width: 2px; background: var(--cyan); opacity: .0; transition: opacity .15s; }
a.item:hover::after, .item:focus-within::after { opacity: .9; }
.item b { font-family: var(--mono); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; font-size: 15px; }
.note { --c: 10px; --bc: rgba(125, 249, 255, .25); }
.status { --c: 8px; --bc: rgba(125, 249, 255, .35); }
.scene { --c: 18px; --bc: rgba(125, 249, 255, .6); --bg: radial-gradient(ellipse at 50% 40%, #0B1630, #03050A 70%); }
.nav-head { border-bottom-color: rgba(125, 249, 255, .3); position: relative; }
.nav-head::after { content: ''; position: absolute; left: 0; bottom: -1px; width: 34px; height: 2px; background: var(--gold); }
.nav-head h2 { color: var(--gold); text-shadow: 0 0 10px rgba(255, 214, 107, .35); }
.eyebrow { color: var(--gold); }
.facts li { border-top-color: rgba(125, 249, 255, .25); }
/* hlavička */
.hero { --c: 22px; --bc: rgba(125, 249, 255, .55); box-shadow: none;
  --bg: radial-gradient(ellipse 60% 120% at 8% 50%, rgba(124, 255, 178, .09), transparent 70%), linear-gradient(180deg, rgba(8, 16, 28, .9), rgba(4, 8, 14, .9)); }
.hero::before { inset: 0; border-radius: 0;
  background: linear-gradient(var(--gold), var(--gold)) 32px 0 / 48px 2px no-repeat, linear-gradient(var(--cyan), var(--cyan)) calc(100% - 34px) 100% / 64px 3px no-repeat; }
/* štítky a obtížnosti */
.badge { --c: 6px; --bc: rgba(125, 249, 255, .6); --bg: rgba(3, 7, 13, .8); }
.mode { --c: 10px; --bc: color-mix(in srgb, var(--mc) 60%, transparent); --bg: color-mix(in srgb, var(--mc) 8%, #050B14); }
.mode:hover, .mode:focus-visible, .ar-diff .mode.on { --bc: var(--mc); --bg: color-mix(in srgb, var(--mc) 20%, #050B14); box-shadow: inset 0 -2px 0 var(--mc); }
.m-custom { border-style: dashed; }
/* tlačítka: plná azurová, obrysová a zlatá hlavní akce */
.item button, .item .btn, .arena-page button:not(.mode):not(.ghost), .scene-cta { --c: 8px; --bc: #CFFBFF; --bg: linear-gradient(180deg, #CFFBFF, var(--cyan)); color: #05080F; box-shadow: none; }
.item button:hover:not(:disabled), .item .btn:hover, .arena-page button:not(.mode):not(.ghost):hover:not(:disabled), .scene-cta:hover { --bg: linear-gradient(180deg, #FFFFFF, #B5FCFF); }
.file, .item button#b-wallet-off, .ghost, .cz-actions .file { --c: 8px; --bc: rgba(125, 249, 255, .6); --bg: rgba(3, 7, 13, .6); color: var(--cyan); box-shadow: none; }
.ghost:hover, .file:hover { --bg: rgba(10, 34, 48, .85); --bc: #CFFBFF; }
.wallet button#b-wallet, .cz-play { --c: 8px; --bc: #FFE7A8; --bg: linear-gradient(180deg, #FFE7A8, #FFB03A); color: #05080F; box-shadow: none; }
.cz-play { --c: 10px; }
.scene-cta { --c: 9px; padding: 9px 22px; }
.scene-loading { --c: 7px; --bc: #CFFBFF; --bg: rgba(125, 249, 255, .85); box-shadow: none; }
/* přepínač jazyka */
.lang-switch { --c: 6px; --bc: rgba(125, 249, 255, .45); padding: 2px; }
.lang-switch button { --c: 4px; --bc: transparent; --bg: transparent; border: 0; }
.lang-switch button[aria-pressed="true"] { --bg: var(--cyan); }
/* AI aréna a dokumentace */
.ar-card { --c: 12px; --bc: color-mix(in srgb, var(--ac) 45%, rgba(125, 249, 255, .3)); --bg: rgba(5, 12, 20, .92); border-top-width: 1px; position: relative; }
.ar-card::before { content: ''; position: absolute; left: 16px; top: 0; width: 30px; height: 2px; background: var(--ac); }
.ar-prompt { --c: 12px; --bc: rgba(125, 249, 255, .35); --bg: #03070D; }
.ar-web { --c: 10px; --bc: rgba(125, 249, 255, .35); border-style: dashed; }
.ar-dialog { --c: 18px; --bc: rgba(125, 249, 255, .6); --bg: rgba(4, 9, 16, .98); }
.ar-board th { color: var(--gold); }
.doc-nav a { --c: 6px; --bc: transparent; --bg: transparent; border-width: 1px; }
.doc-nav a:hover { --bc: rgba(125, 249, 255, .5); --bg: rgba(10, 34, 48, .7); }
/* zkosení ořízne obrys fokusu: fokus se ukazuje zlatou hranou uvnitř */
.item button:focus-visible, .item .btn:focus-visible, .ghost:focus-visible, .file:focus-within, .cz-play:focus-visible, .scene-cta:focus-visible,
.mode:focus-visible, a.item:focus-visible, .arena-page button:focus-visible, .lang-switch button:focus-visible, .doc-nav a:focus-visible {
  outline: none; --bc: var(--gold); box-shadow: inset 0 0 0 2px var(--gold); }
@media (max-width: 860px) {
  .shell { --c: 0px; border: 0; }
  .shell::before, .shell::after { display: none; }
}
.item .file, .item .file span { font: 700 11px var(--mono); letter-spacing: .08em; }

/* ---------- dokumentace: záložky stránek, štítky stavu, tok vrstev, kód ---------- */
.doc-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: -8px 0 22px; }
.doc-tabs a { --c: 8px; --bc: rgba(125, 249, 255, .45); --bg: rgba(3, 7, 13, .7);
  border: 1px solid var(--bc); background-origin: border-box;
  background: linear-gradient(135deg, transparent calc(var(--c) * .7071 - .8px), var(--bc) 0 calc(var(--c) * .7071 + .6px), transparent 0),
    linear-gradient(315deg, transparent calc(var(--c) * .7071 - .8px), var(--bc) 0 calc(var(--c) * .7071 + .6px), transparent 0), var(--bg);
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
  padding: 8px 14px; font: 700 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); text-decoration: none; }
.doc-tabs a:hover { --bc: #CFFBFF; --bg: rgba(10, 34, 48, .85); color: #FFF; }
.doc-tabs a[aria-current="page"] { --bc: var(--gold); --bg: rgba(255, 214, 107, .1); color: var(--gold); }
.doc-tabs a:focus-visible { outline: none; --bc: var(--gold); box-shadow: inset 0 0 0 2px var(--gold); }
.doc-lang-note { margin: 0 0 18px; }
.tag { display: inline-block; padding: 1px 6px; font: 700 9.5px/1.6 var(--mono); letter-spacing: .1em; white-space: nowrap; vertical-align: 1px;
  border: 1px solid currentColor; clip-path: polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px); }
.tag.live { color: var(--green); background: rgba(124, 255, 178, .08); }
.tag.proto { color: var(--gold); background: rgba(255, 214, 107, .08); }
.tag.plan { color: #9DB4FF; background: rgba(157, 180, 255, .08); }
.doc-body ol { padding-left: 20px; }
.doc-body ol li { margin: 6px 0; }
.doc-body i { color: #DCE4F0; }
.doc-body pre { margin: 10px 0 12px; padding: 12px 14px; overflow-x: auto; background: #03070D; border: 1px solid rgba(125, 249, 255, .25);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
.doc-body pre code { font: 400 12px/1.6 var(--mono); color: #CFE7EE; white-space: pre; }
.doc-body td { vertical-align: top; }
.docs-page .doc-body table { display: block; overflow-x: auto; }
.docs-page .doc-body table tbody { display: table; width: 100%; border-collapse: collapse; }
.doc-body td:last-child .tag { margin-top: 1px; }
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0; counter-reset: flow; }
.flow-step { --c: 10px; --bc: rgba(125, 249, 255, .5); position: relative; display: flex; flex-direction: column; gap: 3px; padding: 12px 12px 14px; border: 1px solid var(--bc);
  background-origin: border-box; background: linear-gradient(135deg, transparent calc(var(--c) * .7071 - .8px), var(--bc) 0 calc(var(--c) * .7071 + .6px), transparent 0),
    linear-gradient(315deg, transparent calc(var(--c) * .7071 - .8px), var(--bc) 0 calc(var(--c) * .7071 + .6px), transparent 0), rgba(5, 12, 20, .92); clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.flow-step b { font: 700 14px var(--mono); letter-spacing: .12em; color: var(--cyan); text-transform: uppercase; }
.flow-step span { font: 700 10px var(--mono); letter-spacing: .12em; color: var(--gold); text-transform: uppercase; }
.flow-step small { margin-top: 4px; font: 400 12px/1.5 var(--mono); color: #A9B4CC; }
.flow-step b::before { counter-increment: flow; content: counter(flow) ' · '; color: var(--gold); }
@media (max-width: 860px) { .flow { grid-template-columns: minmax(0, 1fr); gap: 10px; } }
@media (max-width: 860px) { .doc { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) { .docs-page .kicker { padding: 0 92px 0 0; text-align: left; } }

/* ==========================================================================
   AI aréna: sloty (12, cena 2^n NEAR) a okno nákupu
   ========================================================================== */
.ar-slots-panel { margin: 0 0 18px; padding: 16px 18px 14px; }
a.badge { text-decoration: none; color: var(--cyan); }
.ar-slots { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.ar-slot { --ac: var(--cyan); --c: 10px; --bc: color-mix(in srgb, var(--ac) 45%, rgba(125, 249, 255, .25)); --bg: rgba(5, 12, 20, .92);
  position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 118px; padding: 10px 10px 9px; }
.ar-slot::before { content: ''; position: absolute; left: 14px; top: 0; width: 24px; height: 2px; background: var(--ac); }
.ar-slot header { display: flex; align-items: center; justify-content: space-between; font: 700 10px var(--mono); letter-spacing: .12em; color: var(--muted); }
.ar-slot header span { color: #E6F9FF; }
.ar-slot header em { font-style: normal; font-size: 9px; padding: 2px 5px; border: 1px solid currentColor; }
.ar-slot.house header em { color: #7DF9FF; opacity: .75; }
.ar-slot.sold header em { color: var(--ac); }
.ar-slot.demo header em { color: #FFB86B; border-style: dashed; }
.ar-slot-id { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ar-slot-id > div { min-width: 0; }
.ar-slot-id b { display: block; font: 600 14px var(--body); color: #FFF; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-slot-id small { display: block; font: 400 10px var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-logo { width: 30px; height: 30px; flex: none; object-fit: contain; border-radius: 4px; background: rgba(255, 255, 255, .04); }
.ar-logo.dot { width: 12px; height: 12px; margin: 0 9px; border-radius: 50%; background: var(--ac); box-shadow: 0 0 10px var(--ac); }
.ar-slot-foot { margin: auto 0 0; display: flex; justify-content: space-between; gap: 6px; font: 400 10px var(--mono); color: var(--muted); }
.ar-slot-foot span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-slot-foot span:last-child { color: #8C98B3; flex: none; }
.ar-slot-foot a { color: var(--cyan); }
.ar-slot.house .ar-slot-foot span:last-child { text-decoration: line-through; text-decoration-color: rgba(255, 214, 107, .5); }
.ar-slot.sale { --ac: var(--gold); --bc: rgba(255, 214, 107, .55); --bg: repeating-linear-gradient(135deg, rgba(255, 214, 107, .05) 0 6px, transparent 6px 12px), rgba(20, 15, 4, .85); }
.ar-slot-price { font: 400 11px var(--mono); color: #C9B57A; letter-spacing: .08em; }
.ar-slot-price b { display: block; font: 700 22px var(--mono); color: var(--gold); letter-spacing: 0; text-shadow: 0 0 14px rgba(255, 214, 107, .35); }
.arena-page .ar-slot button.ar-buy:not(.ghost) { margin-top: auto; padding: 7px 8px !important; --bc: #FFE7A8; --bg: linear-gradient(180deg, #FFE7A8, #FFB03A); color: #05080F; font-size: 11px; }
.arena-page .ar-slot button.ar-buy:not(.ghost):hover { --bg: linear-gradient(180deg, #FFF3CF, #FFC566); }
.ar-slot-act { margin-top: auto; display: flex; gap: 5px; flex-wrap: wrap; }
.ar-slot-act button { padding: 6px 8px !important; font-size: 10.5px !important; }
.ar-slots-note { margin-top: 10px; }
.ar-slots-note b { color: var(--gold); }
.ar-slot-tag { font: 700 9.5px var(--mono); font-style: normal; color: var(--gold); margin-left: 6px; }
.ar-board td img.ar-logo { width: 18px; height: 18px; margin-right: 6px; vertical-align: -4px; }
.ar-board td small { margin-left: 17px; }
.ar-card header img.ar-logo { width: 22px; height: 22px; align-self: center; }
/* okno nákupu */
.ar-buy-dlg { width: min(640px, calc(100vw - 32px)); }
.ar-buy-wallet { --c: 8px; --bc: rgba(125, 249, 255, .45); display: flex; align-items: center; gap: 12px; padding: 10px 12px; flex-wrap: wrap; }
.ar-buy-wallet.ok { --bc: rgba(124, 255, 178, .7); }
.ar-buy-wallet > div { flex: 1; min-width: 160px; }
.ar-buy-wallet b { font: 700 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #FFF; }
.ar-buy-wallet a { color: var(--green); }
.ar-buy-step { width: 22px; height: 22px; display: grid; place-items: center; font: 700 11px var(--mono); color: #05080F; background: var(--cyan); }
.ar-buy-wallet.ok .ar-buy-step { background: var(--green); }
.ar-buy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ar-buy-name, .ar-buy-logo { grid-column: 1 / -1; }
.ar-buy-name input { font-size: 16px !important; padding: 11px 12px !important; border-color: rgba(255, 214, 107, .6) !important; }
.ar-buy-name > span { color: var(--gold); }
.ar-logo-prev { --c: 8px; --bc: rgba(125, 249, 255, .35); width: 64px; height: 64px; display: grid; place-items: center; text-align: center; font: 500 9px/1.3 var(--mono); color: var(--muted); }
.ar-logo-prev img { width: 60px; height: 60px; object-fit: contain; }
.ar-buy-logo .row { align-items: center; gap: 10px; }
.ar-color { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.ar-color input { width: 38px; height: 28px; padding: 0; border: 1px solid var(--line2); background: transparent; }
.ar-buy-dlg #buy-pay-info code { color: var(--gold); }
.ar-buy-dlg .ar-dlg-btns { align-items: center; }
.ar-buy-dlg .ar-dlg-btns .ar-check-msg { margin-right: auto; }
@media (max-width: 1100px) { .ar-slots { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 700px) { .ar-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ar-buy-grid { grid-template-columns: minmax(0, 1fr); } .ar-slots-panel { padding: 14px 12px 12px; } }

/* logo Quansistor (písmo z loga) jako maska: barva zůstává jako u odkazu, „.games“ je obyčejný text */
.qs-mark { display: inline-block; height: 15px; aspect-ratio: 421 / 60; vertical-align: -3px; margin-right: 1px;
  background: currentColor; -webkit-mask: url(../img/quansistor-wordmark.png) left center / contain no-repeat; mask: url(../img/quansistor-wordmark.png) left center / contain no-repeat; }
@media (max-width: 600px) { .qs-mark { height: 13px; vertical-align: -2px; } }
