:root {
  /* The background takes the player's tone (sage for the sloth, apricot for the rabbit, ink blue for others); surfaces are a
     shade lighter and stand apart by tone and their own border, not by shadow. “Key” shape: flat on top, rounded below. */
  --pozadi: #CFE2F2;
  --akcent: #1F4C78;               /* muted, dark player colour: main button, selection */
  --akcent-svetla: #B5CFE6;        /* tonal surface: secondary buttons, selected items */
  --hrana: rgba(20, 52, 86, .16);  /* surface border in the background tone */
  --text: #1B2130;
  --slaby: #4F5A6B;
  /* note colours in the game (active, correct, wrong) – the same for all players */
  --modra: #2457C5;
  --modra-svetla: #E3EBFB;
  --zelena: #2E9E4F;
  --oranzova: #E08A1E;
  --cervena: #D64545;
  --klavesa: 4px 4px 14px 14px;
  --klavesa-mala: 3px 3px 10px 10px;
  --radius: 14px;
}
/* surfaces are derived from the player's tone (hence on body, where the tone is set) */
body { --karta: color-mix(in srgb, var(--pozadi) 22%, #fff); --plocha: color-mix(in srgb, var(--pozadi) 70%, var(--akcent-svetla));
  --linka: var(--hrana); --stin: 0 1px 0 var(--hrana); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--pozadi); color: var(--text);
  font: 17px/1.45 "Atkinson Hyperlegible Next", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent; overscroll-behavior: none;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.skryta { display: none !important; }
:focus-visible { outline: 3px solid var(--akcent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------------- home screen */
#domu { max-width: 980px; margin: 0 auto; padding: max(20px, env(safe-area-inset-top)) 20px 40px; }
.hlavicka { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
h1 { font-size: 34px; font-weight: 800; margin: 8px 0; letter-spacing: -.4px; }
h2 { font-size: 22px; font-weight: 800; margin: 28px 0 12px; }
.napoveda { color: var(--slaby); font-size: 15px; }

.profily { display: flex; gap: 14px; flex-wrap: wrap; }
.profil {
  display: flex; flex-direction: column; align-items: center; gap: 8px; width: 132px; padding: 14px 10px 12px;
  background: var(--karta); border: 2px solid var(--hrana); border-radius: var(--klavesa);
}
.profil.zvoleno { border-color: var(--akcent); background: var(--akcent-svetla); box-shadow: inset 0 -4px 0 var(--akcent); }
.profil .jmeno { font-weight: 700; font-size: 18px; }
.profil.pridat { justify-content: center; color: var(--slaby); border: 2px dashed var(--hrana); background: transparent; }

.avatar { width: 84px; height: 84px; flex: none; }
.avatar svg, .avatar .zvire { width: 100%; height: 100%; display: block; overflow: visible; }
.avatar.maly { width: 44px; height: 44px; }
.avatar.velky { width: 130px; height: 130px; margin: 0 auto; }
.avatar.hop { animation: hop .4s ease; }
@keyframes hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-10px) rotate(-6deg); } }
.hledat { max-width: 320px; margin-top: 0; }
.pisen { position: relative; }
.pisen .oblibena { position: absolute; top: 10px; right: 10px; border: 0; background: transparent; font-size: 24px;
  color: var(--hrana); line-height: 1; padding: 4px; }
.pisen .oblibena.zap { color: #D99A00; }
/* difficulty: 1–3 black keys */
.obtiznost { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--text); }
.obtiznost svg { width: 22px; height: 14px; display: block; }
.pisne { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.pisen {
  text-align: left; padding: 16px 18px; background: var(--karta); border: 1px solid var(--hrana);
  border-radius: var(--klavesa); box-shadow: inset 0 -3px 0 var(--hrana); display: flex; flex-direction: column; gap: 8px;
  min-height: 100px; cursor: pointer;
}
.pisen:hover { background: #fff; }
.pisen .chyba { color: var(--cervena); font-size: 14px; }

/* buttons press like keys: the bottom edge shrinks when pressed */
.tlacitko {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 18px 10px;
  border: 0; border-radius: var(--klavesa-mala); background: var(--akcent); color: #fff; font-weight: 700;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .25);
}
.tlacitko:hover { background: color-mix(in srgb, var(--akcent) 88%, #000); }
.tlacitko:active { box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); padding-top: 10px; padding-bottom: 8px; }
.tlacitko.sekundarni { background: var(--akcent-svetla); color: var(--akcent); box-shadow: inset 0 -4px 0 var(--hrana); }
.tlacitko.sekundarni:hover { background: color-mix(in srgb, var(--akcent-svetla) 85%, var(--akcent)); }
.tlacitko.sekundarni:active { box-shadow: inset 0 -1px 0 var(--hrana); }

.midi-stav { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--slaby); padding: 8px 4px; }
.midi-stav .tecka { width: 12px; height: 12px; border-radius: 50%; background: transparent; border: 2px solid var(--slaby); flex: none; }
.midi-stav.ok .tecka { background: var(--zelena); border-color: var(--zelena); }
.midi-stav.ok { color: var(--text); }
.midi-stav.mini { padding: 10px; }
.midi-stav.obrazovka .tecka { border-style: dashed; }
/* how this device plays: the status on Home is a button with a small menu (MIDI, microphone, on-screen keys) */
.vstup-obal { position: relative; }
.vstup-tlacitko { border: 2px solid var(--hrana); background: none; font: inherit; font-size: 15px; font-weight: 700; color: var(--slaby2);
  min-height: 44px; padding: 6px 12px; border-radius: 12px; cursor: pointer; }
.vstup-tlacitko:hover, .vstup-tlacitko[aria-expanded="true"] { background: var(--sv); }
.vstup-tlacitko .sipka { width: 14px; height: 14px; flex: none; transition: transform .15s; }
.vstup-tlacitko[aria-expanded="true"] .sipka { transform: rotate(180deg); }
/* Before playing without a piano: what you play on and the microphone, right under Play */
.pred-vstup { margin: 10px 0 0; font-size: 15px; line-height: 1.45; color: var(--slaby2); }
/* Settings → Piano: the same three ways as radio rows */
.vstup-volby { display: grid; gap: 6px; margin: 10px 0 12px; }
.vstup-volby button { display: grid; gap: 2px; text-align: left; font: inherit; color: var(--text); background: none; cursor: pointer;
  border: 2px solid var(--hrana); border-radius: 14px; padding: 10px 14px 10px 42px; min-height: 48px; position: relative; }
.vstup-volby button::before { content: ''; position: absolute; left: 14px; top: 14px; width: 16px; height: 16px; box-sizing: border-box;
  border-radius: 50%; border: 2px solid var(--slaby); }
.vstup-volby button[aria-checked="true"] { border-color: var(--hl); background: var(--sv); }
.vstup-volby button[aria-checked="true"]::before { border: 5px solid var(--hl); }
.vstup-volby small { font-size: 14px; color: var(--slaby2); line-height: 1.35; }
.vstup-volby button:disabled { cursor: default; }
.vstup-volby button:disabled b { color: var(--slaby); }
/* in Settings the display toggles are per player; the accompaniment sits in Piano and calibration belongs to the game */
/* Fingering belongs to a song and Loop to one game: they stay in Pause → Display */
#nastaveniZobrazeni :is(#prepDoprovod, #kalibrace, #prepPrstoklad, #prepSmycka) { display: none; }
#vstupMenu { left: auto; right: 0; width: min(340px, calc(100vw - 32px)); }
#vstupMenu button { display: grid; gap: 2px; padding: 10px 14px 10px 40px; position: relative; }
#vstupMenu button::before { content: ''; position: absolute; left: 14px; top: 14px; width: 16px; height: 16px; box-sizing: border-box; border-radius: 50%; border: 2px solid var(--slaby); }
#vstupMenu button[aria-checked="true"]::before { border: 5px solid var(--hl); }
#vstupMenu small { font-size: 14px; font-weight: 400; color: var(--slaby2); line-height: 1.35; }
#vstupMenu button:disabled { opacity: 1; cursor: default; }
#vstupMenu button:disabled b { color: var(--slaby); }

/* ---------------- game */
#hra { height: 100vh; height: 100dvh; display: flex; flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.kulate { width: 44px; height: 44px; border-radius: var(--klavesa-mala); border: 0; background: var(--akcent-svetla); color: var(--akcent);
  box-shadow: inset 0 -4px 0 var(--hrana); font-size: 30px; line-height: 1; padding: 0 0 6px; }
.kulate:active { box-shadow: inset 0 -1px 0 var(--hrana); }
/* toggle: a row with a switch on the right – a track with a round knob, on = the player's colour, knob on the right */
.prepinac { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 46px;
  padding: 8px 12px; border: 0; border-radius: 8px; background: transparent; font-size: 17px; color: var(--text); text-align: left; }
.prepinac:hover { background: var(--akcent-svetla); }
.prepinac::after { content: ''; flex: none; width: 46px; height: 28px; border-radius: 14px;
  background: radial-gradient(circle, #fff 10px, transparent 10.5px) no-repeat 0 50% / 28px 28px, #BDB8B0; transition: background-position .15s; }
.prepinac.zap::after { background: radial-gradient(circle, #fff 10px, transparent 10.5px) no-repeat 100% 50% / 28px 28px, var(--akcent); }
.prepinac:focus-visible { outline: 3px solid var(--akcent); outline-offset: 2px; }
#kalibrace::after { content: none; }                  /* calibration is an action, not a switch */
@media (prefers-reduced-motion: reduce) { .prepinac::after { transition: none; } }
.vyber { min-height: 40px; border-radius: 8px; border: 1px solid var(--hrana); background: var(--karta); padding: 4px 10px; }

.prubeh { height: 6px; margin: 4px 14px; background: var(--plocha); border-radius: 3px; overflow: hidden; }
#prubeh { height: 100%; width: 0; background: var(--zelena); transition: width .3s; }

.noty { position: relative; flex: 1 1 40%; min-height: 200px; margin: 8px 14px; background: #fff;
  border: 1px solid var(--hrana); border-radius: 10px; overflow: hidden; }
#pas { position: absolute; top: 0; left: 0; height: 100%; will-change: transform; }
#pas svg { display: block; }
.kurzor { position: absolute; top: 10px; bottom: 10px; left: 30%; width: 3px; margin-left: -1.5px; border-radius: 2px;
  background: rgba(36, 87, 197, .18); pointer-events: none; }
/* whole page: lines stacked, scrolls down; the time cursor moves along the line */
.noty.stranka { overflow-y: auto; }
/* without the keyboard (advanced players with a MIDI piano): notes at full height */
#hra.bez-klaviatury .klavesy { display: none; }
#hra.bez-klaviatury .noty { flex: 1 1 auto; margin-bottom: 14px; }
.noty.stranka #pas { position: relative; height: auto; transform: none !important; }
.noty.stranka .kurzor { bottom: auto; width: 4px; background: rgba(36, 87, 197, .35); }
.nacitam { padding: 30px; color: var(--slaby); }

#pas g.note.aktivni, #pas g.note.aktivni * { fill: var(--modra); stroke: var(--modra); }
#pas g.note.ok, #pas g.note.ok * { fill: var(--zelena); stroke: var(--zelena); }
#pas g.note.vedle, #pas g.note.vedle * { fill: var(--oranzova); stroke: var(--oranzova); }
#pas g.note.minul, #pas g.note.minul * { fill: var(--cervena); stroke: var(--cervena); }
#pas g.note.cizi { opacity: .35; }
#pas .ovl .halo { opacity: 0; }
#pas .ovl.aktivni .halo { opacity: .28; animation: dech 1.1s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
#pas .ovl.aktivni .kruh { stroke: #1F2533; stroke-width: 30; }
#pas .ovl.ok .kruh { opacity: .45; }
#pas .ovl.vedle .kruh { fill: var(--oranzova); stroke: #1F2533; stroke-width: 30; stroke-dasharray: 90 60; }
#pas .ovl.minul .kruh { fill: var(--cervena); }
#pas .ovl .pismeno { fill: #fff; font-weight: 700; font-family: "Atkinson Hyperlegible Next", -apple-system, Arial, sans-serif; pointer-events: none; }
#pas .ovl .pismeno.tmave { fill: #3A2E00; }
/* Show mistakes: wrong keys as red hollow noteheads left of their note; the current one at full strength */
#pas g.duchove { opacity: .42; transition: opacity .2s; pointer-events: none; }
#pas g.duchove.ted { opacity: 1; }
#pas g.duch ellipse { fill: none; stroke: var(--cervena); }
#pas g.duch ellipse.halo { stroke: #fff; }             /* the score card's colour: clear of clefs, stems and staff lines */
#pas g.duch line { stroke: var(--cervena); }
#pas g.duch text { fill: var(--cervena); font-family: "Atkinson Hyperlegible Next", -apple-system, Arial, sans-serif; font-weight: 700;
  stroke: #fff; paint-order: stroke; stroke-linejoin: round; }
.bez-pismen #pas .ovl .kruh, .bez-pismen #pas .ovl .pismeno { display: none; }
/* without letters an orange note keeps its non-colour mark: the dark dashed ring of the overlay, hollow */
.bez-pismen #pas .ovl.vedle .kruh { display: inline; fill: none; }
.bez-barev #pas .ovl .kruh { fill: #2B2B2B; }
.bez-barev #pas .ovl .pismeno.tmave { fill: #fff; }
@keyframes dech { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }

.start { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 26px; font-weight: 700;
  padding: 16px 36px 20px; border: 0; border-radius: var(--klavesa); background: var(--akcent); color: #fff;
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .25); }
.odpocet { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 120px; font-weight: 800; color: var(--akcent); background: rgba(255, 255, 255, .6); pointer-events: none; }

.hlaska { min-height: 40px; text-align: center; font-size: 22px; padding: 2px 14px; }
.prehled-chyb { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 0 14px 6px; }
.prehled-chyb .chyba-pocet { min-width: 9ch; text-align: center; font-size: 20px; font-weight: 700; color: var(--cervena); }
.prehled-chyb .kulate { font-size: 18px; padding: 0 0 4px; }
.prehled-chyb .tlacitko { margin-left: 8px; }
#hra.prehled .hlaska { display: none; }
.hlaska b { font-size: 30px; padding: 0 4px; }

/* ---------------- keyboard */
.klavesy { position: relative; flex: 0 0 auto; height: 30vh; min-height: 160px; max-height: 300px; margin: 0 14px 14px;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.klavesa { position: absolute; top: 0; }
.klavesa.bila { bottom: 0; background: linear-gradient(#fff, #F4F1EC); border: 1px solid #B8B0A5; border-radius: 0 0 10px 10px;
  box-shadow: inset 0 -6px 0 #E4DED5; }
.klavesa.cerna { height: 60%; z-index: 2; background: linear-gradient(#3A3A3A, #151515); border-radius: 0 0 6px 6px;
  box-shadow: inset 0 -5px 0 #000, 0 2px 3px rgba(0, 0, 0, .3); }
.klavesa .jm { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); width: 34px; height: 34px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 17px;
  background: var(--barva); color: #fff; }
.klavesa .jm.tmave { color: #3A2E00; }
.klavesa.nepouzita .jm { background: transparent; color: #B8B0A5; font-weight: 500; }
.klavesa.cerna .jm { width: auto; height: auto; padding: 2px 4px; bottom: 8px; font-size: 13px; border-radius: 6px; }
.bez-barev .klavesa .jm { background: #2B2B2B; }
.bez-barev .klavesa .jm.tmave { color: #fff; }
.bez-barev .klavesa.nepouzita .jm { background: transparent; }
.klavesa .stred { position: absolute; top: 8px; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: #C9C2B8; }

.klavesa.cil.bila { background: var(--svetla); box-shadow: inset 0 0 0 4px var(--barva); animation: pulz 1s ease-in-out infinite; }
.klavesa.cil.cerna { background: var(--barva); animation: pulz 1s ease-in-out infinite; }
.bez-barev .klavesa.cil.bila { background: var(--modra-svetla); box-shadow: inset 0 0 0 4px var(--modra); }
.bez-barev .klavesa.cil.cerna { background: var(--modra); }
/* as a pair: the target key in the colour of the child who should play it (melody a, bass b) */
.klavesy.dvojice .klavesa.cil.bila { background: var(--a-svetla); box-shadow: inset 0 0 0 4px var(--a-barva); }
.klavesy.dvojice .klavesa.cil.cerna { background: var(--a-barva); }
.klavesy.dvojice .klavesa.cil.hrac-b.bila { background: var(--b-svetla); box-shadow: inset 0 0 0 4px var(--b-barva); }
.klavesy.dvojice .klavesa.cil.hrac-b.cerna { background: var(--b-barva); }
.klavesa.stisk.bila { background: #E7E1D8; box-shadow: inset 0 -2px 0 #D5CEC3; }
.klavesa.stisk.cerna { background: #444; }
.klavesa.dobre.bila { background: #C8F0D2; }
.klavesa.spatne.bila { background: #F8D0D0; animation: trh .3s; }
.klavesa.spatne.cerna { background: var(--cervena); animation: trh .3s; }
@keyframes pulz { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.12); } }
@keyframes trh { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

/* ---------------- modal dialogs */
.zdroje { padding-left: 18px; line-height: 1.7; }
.odkaz { border: 0; background: none; padding: 0; color: var(--akcent); font: inherit; font-weight: 700;
  text-decoration: underline; cursor: pointer; }
.modal { position: fixed; inset: 0; background: rgba(20, 26, 40, .4); display: flex; align-items: center; justify-content: center; z-index: 10;
  padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom)); }
.karta { background: var(--karta); border-radius: 6px 6px 22px 22px; padding: 26px 30px; max-width: 460px; width: 100%;
  text-align: center; border: 1px solid var(--hrana); box-shadow: 0 2px 4px rgba(20, 26, 40, .12); }
.karta h2 { margin: 10px 0 6px; font-size: 26px; }
.karta .tlacitka { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.hvezdy { font-size: 50px; letter-spacing: 6px; color: var(--hrana); line-height: 1.1; }
.hvezdy .plna { color: #F2B705; }
.zvire-veta { color: var(--slaby); font-style: italic; }
.pole { width: 100%; min-height: 48px; border: 1px solid var(--hrana); border-radius: 8px; padding: 8px 14px; font-size: 20px; margin-top: 8px;
  background: #fff; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: #fff;
  padding: 12px 20px; border-radius: 6px 6px 12px 12px; z-index: 20; font-size: 16px; max-width: 90vw; }

@media (max-width: 760px) {
  .rychlost input { width: 90px; }
  #rychlostText { min-width: 0; }
}

/* ---------------- wider dialogs (MIDI, sheet music sources, extras) */
.karta.siroka { max-width: 720px; text-align: left; max-height: 92vh; max-height: calc(100dvh - 40px); overflow: auto; }
/* a long window scrolls under its last row of buttons (Close…): they stay at the bottom edge, also on a phone where
   Safari's bars cover the bottom of the screen (dvh above counts only the visible part) */
.karta.siroka > .tlacitka:last-child { position: sticky; bottom: -26px; margin: 18px -30px -26px; padding: 12px 30px 16px;
  background: var(--karta); border-top: 1px solid var(--hrana); }
.doplnek .karta.siroka { max-width: 600px; }
.karta.siroka h2 { margin-top: 0; }
.popis-pole { display: block; font-weight: 600; margin-top: 14px; }

/* ---------------- notes editor */
.editor { position: fixed; inset: 0; z-index: 30; background: var(--pozadi); display: flex; flex-direction: column; }
.editor-lista { display: flex; gap: 10px; align-items: center; padding: 10px 14px; flex-wrap: wrap; }
.editor-nazev { flex: 1; min-width: 200px; font-size: 20px; font-weight: 700; border: 2px solid transparent; border-radius: 10px;
  padding: 6px 10px; background: transparent; }
.editor-nazev:focus, .editor-nazev:hover { border-color: var(--linka); background: #fff; }
.editor-stav { color: var(--slaby); font-size: 15px; }
.editor-telo { flex: 1; display: grid; grid-template-columns: 1fr; gap: 12px; padding: 0 14px; min-height: 0; }
.editor-telo.s-originalem { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
.editor-original, .editor-noty { background: #fff; border: 1px solid var(--hrana); border-radius: 10px; overflow: auto; min-height: 0; }
.editor-original img { display: block; width: 100%; }
.editor-noty svg { display: block; width: 100%; height: auto; }
.editor-noty g.note, .editor-noty g.rest, .editor-noty g.chord { cursor: pointer; }
.editor-noty .nejisty, .editor-noty .nejisty * { fill: #D9822B; stroke: #D9822B; }
.editor-noty .spatny, .editor-noty .spatny * { fill: var(--cervena); stroke: var(--cervena); }
.editor-noty .vybrana, .editor-noty .vybrana * { fill: var(--modra); stroke: var(--modra); }
.editor-info { padding: 6px 16px; min-height: 30px; font-size: 15px; }
.editor-info .chyba { color: var(--cervena); }
.editor-info .nejisty-text { color: #B5651D; }
.editor-info .porovnani { color: var(--zelena); }
.editor-nastroje { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 14px 14px; background: var(--plocha); }
.editor-nastroje .skupina { display: inline-flex; gap: 4px; align-items: center; background: var(--karta); border: 1px solid var(--hrana); border-radius: 10px; padding: 4px; font-size: 14px; }
.editor-nastroje button { min-width: 38px; min-height: 36px; border: 0; border-radius: 8px; background: var(--plocha); font-size: 17px; }
.editor-nastroje button:hover { background: var(--modra-svetla); }
.editor-nastroje input { border: 1px solid var(--linka); border-radius: 8px; padding: 6px 8px; font-size: 15px; }
.editor-nastroje .hlavicka label { display: inline-flex; gap: 4px; align-items: center; padding: 0 4px; }
.editor-nastroje .hlavicka input { width: 64px; }
.editor-nastroje .napoveda { flex-basis: 100%; margin: 0; font-size: 13px; }
.kulate:disabled { opacity: .35; }
@media (max-width: 900px) { .editor-telo.s-originalem { grid-template-columns: 1fr; grid-template-rows: 1fr 1.4fr; } }

/* ---------------- coach */
.trener { background: var(--akcent-svetla); border-radius: 8px; padding: 10px 14px; font-size: 17px; text-align: left; }
.trener:empty { display: none; }
#vysUkol { margin-top: 6px; }
.pruvodce { margin: 4px 14px 0; padding: 8px 14px; border-radius: 8px; background: var(--akcent-svetla); font-size: 17px; text-align: center; }

/* ---------------- extras */
.doplnek .obsah p { text-align: left; }
.doplnek .obsah ul { text-align: left; }
.doplnek .otazky { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
@keyframes vysun { from { transform: translateX(40px); opacity: 0; } }

/* as a pair: bar with players (bass on the left, melody on the right – as they sit at the piano) and results side by side */
.dvojice-lista { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hrac-part { display: inline-flex; align-items: center; gap: 8px; padding: 3px 12px 3px 4px; border-radius: var(--klavesa); font-size: 16px; }
.hrac-part .avatar.maly { width: 34px; height: 34px; }
.hrac-part.a { background: var(--a-svetla); color: var(--a-barva); }
.hrac-part.b { background: var(--b-svetla); color: var(--b-barva); }
.dvojice-hraci { justify-content: center; margin-top: 14px; }
#vysledek:not(.ve-dvou) #vysDvojice, #vysledek:not(.ve-dvou) #vysVymenit { display: none; }
#vysledek.ve-dvou #vysAvatar, #vysledek.ve-dvou #vysHvezdy, #vysledek.ve-dvou #vysText,
#vysledek.ve-dvou #vysZvire, #vysledek.ve-dvou #vysTrener { display: none; }
#vysledek.ve-dvou .karta { max-width: 640px; }
.vys-dvojice { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.vys-hrac { padding: 16px 12px 10px; border-radius: var(--klavesa); text-align: center; }
.vys-hrac.a { background: var(--a-svetla); }
.vys-hrac.b { background: var(--b-svetla); }
.vys-hrac .avatar { margin: 0 auto; }
.vys-hrac .jmeno { font-weight: 700; font-size: 20px; margin-top: 4px; }
.vys-hrac .hvezdy { font-size: 34px; letter-spacing: 3px; }
.vys-hrac p { margin: 6px 0; }
@media (max-width: 560px) { .vys-dvojice { grid-template-columns: 1fr; } }
.tlacitko:disabled { opacity: .45; cursor: default; }

/* data storage below the players: one quiet line of links */
.uloziste { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 14px; color: var(--slaby); font-size: 15px; }
.uloziste .odkaz { background: none; border: 0; padding: 0; color: var(--akcent); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ================================================================ new look (design 2026-11-15)
   White screens, the player's colour in three shades (--hl dark, --sv light, --sv-2 medium), no shadows,
   one main action per screen; other actions are text. */
body { --hl: #24476B; --sv: #E4ECF5; --sv-2: #C9D8EA; --ink: #1D1A18; --slaby2: #6B625C; }
.obrazovka.nova { background: #fff; min-height: 100vh; color: var(--ink); }
.text-tl { background: none; border: 0; color: var(--slaby2); font-weight: 700; padding: 10px 14px; border-radius: 12px; min-height: 44px; }
.text-tl:hover { background: var(--sv); }
.zpet { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; font-weight: 700; color: var(--slaby2);
  padding: 8px 12px; border-radius: 12px; min-height: 44px; }
.zpet:hover { background: var(--sv); }
.zpet svg { width: 20px; height: 20px; }
.horni { display: flex; align-items: center; gap: 14px; padding: 18px 40px; max-width: 1280px; margin: 0 auto; }
.hrat-velke { display: inline-flex; align-items: center; justify-content: center; gap: 12px; background: var(--hl); color: #fff; border: 0;
  border-radius: 22px; padding: 20px 46px; font-size: 24px; font-weight: 800; min-height: 64px; }
.hrat-velke svg { width: 26px; height: 26px; }

/* Who is playing? */
#kdo.ted, #kdo:not(.skryta) { display: grid; place-items: center; }
.kdo-in { text-align: center; padding: 40px 20px; }
.kdo-in h1 { font-size: 52px; font-weight: 800; letter-spacing: -1px; margin: 0 0 44px; }
.hraci { display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; }
.dlazdice-hrace { width: 250px; padding: 30px 0 26px; border: 0; border-radius: 34px; display: flex; flex-direction: column;
  align-items: center; gap: 14px; background: var(--sv); color: var(--ink); transition: transform .15s; }
.dlazdice-hrace:hover { transform: translateY(-4px); }
.dlazdice-hrace svg, .dlazdice-hrace .zvire { width: 150px; height: 150px; }
.dlazdice-hrace b { font-size: 30px; }
.kdo-pod { margin-top: 36px; display: flex; gap: 22px; justify-content: center; }

/* New player / My profile */
.novy { max-width: 1180px; margin: 0 auto; padding: 0 40px 50px; display: grid; grid-template-columns: 1fr 340px; gap: 56px; }
.novy h1 { font-size: 46px; letter-spacing: -1px; margin: 4px 0 26px; }
.novy h2 { font-size: 21px; margin: 28px 0 12px; }
.jmeno-vstup { width: 100%; border: 3px solid var(--sv-2); border-radius: 18px; padding: 14px 18px; font-size: 26px; font-weight: 700; outline: none; background: #fff; }
.jmeno-vstup:focus { border-color: var(--hl); }
.kdo-jsi { display: inline-flex; background: var(--sv); border-radius: 16px; padding: 5px; gap: 4px; }
.kdo-jsi button { padding: 10px 22px; border: 0; border-radius: 12px; font-weight: 700; color: var(--slaby2); background: none; min-height: 44px; }
.kdo-jsi button.ted { background: #fff; color: var(--ink); }
.obrazky { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.obrazek { aspect-ratio: 1; border-radius: 20px; background: #F6F3F1; display: grid; place-items: center; border: 3px solid transparent; padding: 0; }
.obrazek svg, .obrazek .zvire { width: 74%; height: 74%; }
.obrazek.ted { border-color: var(--hl); background: var(--sv); }
.barvy { display: flex; gap: 12px; flex-wrap: wrap; }
.barva { width: 58px; height: 58px; border-radius: 50%; border: 0; position: relative; }
.barva.ted::after { content: ''; position: absolute; inset: -7px; border-radius: 50%; border: 3px solid var(--ink); }
.nahled-hrace { position: sticky; top: 30px; align-self: start; margin-top: 74px; text-align: center; }
.nahled-hrace .dlazdice-hrace { width: 100%; padding: 40px 0 34px; cursor: default; }
.nahled-hrace .dlazdice-hrace:hover { transform: none; }
.nahled-hrace .dlazdice-hrace svg, .nahled-hrace .dlazdice-hrace .zvire { width: 170px; height: 170px; }
.nahled-hrace p { color: var(--slaby2); font-size: 15px; margin: 12px 0 24px; }
.nahled-hrace .hrat-velke { width: 100%; }
@media (max-width: 1100px) { .novy { grid-template-columns: 1fr 280px; gap: 32px; } .dlazdice-hrace { width: 210px; } }

/* Player's home */
#domu.nova { max-width: none; margin: 0; padding: 0; }
.ja { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 6px 14px 6px 6px; border-radius: 16px; font-weight: 800; font-size: 22px; color: var(--ink); min-height: 44px; }
.ja:hover { background: var(--sv); }
.ja svg, .ja .zvire { width: 46px; height: 46px; }
/* the player's menu on Home: Edit, Change player */
.ja-obal { position: relative; }
.ja svg.sipka { width: 14px; height: 14px; color: var(--slaby); transition: transform .15s; }
.ja[aria-expanded="true"] .sipka { transform: rotate(180deg); }
.ja-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 200px; padding: 6px; display: grid;
  background: var(--karta); border: 1px solid var(--linka); border-radius: var(--radius); }
.ja-menu button { background: none; border: 0; text-align: left; font: inherit; font-size: 17px; font-weight: 600; color: var(--text);
  padding: 10px 14px; min-height: 44px; border-radius: 10px; }
.ja-menu button:hover, .ja-menu button:focus-visible { background: var(--sv); }
.text-tl.maly { font-size: 15px; font-weight: 400; }
.horni .vpravo { margin-left: auto; display: flex; gap: 18px; align-items: center; color: var(--slaby2); font-size: 15px; }
.obsah { max-width: 1280px; margin: 0 auto; padding: 6px 40px 60px; }
.pokracuj { background: var(--hl); color: #fff; border-radius: 30px; padding: 34px 40px; display: grid; grid-template-columns: 1fr auto; gap: 8px 40px; align-items: center; }
.pokracuj .maly { color: var(--sv-2); font-weight: 700; }
.pokracuj h2 { margin: 0; font-size: 46px; line-height: 1.1; letter-spacing: -1px; font-weight: 800; }
.cesta { display: flex; gap: 8px; margin-top: 14px; }
.cesta div { flex: 1; max-width: 190px; }
.cesta i { display: block; height: 10px; border-radius: 5px; background: color-mix(in srgb, var(--hl) 70%, #fff); }
.cesta .hotovo i { background: var(--sv-2); }
.cesta .ted i { background: #fff; }
.cesta span { display: block; font-size: 15px; margin-top: 6px; color: var(--sv-2); }
.cesta .ted span { color: #fff; }
.velke-hrat { grid-row: 1 / span 3; grid-column: 2; background: #fff; color: var(--hl); font-weight: 800; font-size: 30px; border: 0; border-radius: 24px;
  padding: 26px 54px; display: inline-flex; align-items: center; gap: 14px; min-height: 64px; }
.velke-hrat svg { width: 30px; height: 30px; }
.vyber-pisne { display: flex; align-items: center; gap: 10px; margin: 44px 0 18px; flex-wrap: wrap; }
.vyber-pisne h3 { margin: 0 18px 0 0; font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.zalozky { display: flex; gap: 4px; flex-wrap: wrap; }
.zalozky button { padding: 10px 18px; border: 0; background: none; border-radius: 14px; font-weight: 700; color: var(--slaby2); min-height: 44px; }
.zalozky button.ted { background: var(--sv); color: var(--ink); }
.hledat { margin-left: auto; border: 0; background: var(--sv); border-radius: 14px; padding: 12px 18px; font-size: 17px; width: 260px; min-height: 44px; }
.hledat::placeholder { color: var(--slaby2); }
.dlazdice { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.dl { background: var(--sv); border: 0; border-radius: 22px; padding: 20px 20px 18px; text-align: left; display: flex; flex-direction: column; min-height: 150px; color: var(--ink); }
.dl:hover { background: var(--sv-2); }
.dl b { font-size: 21px; line-height: 1.2; }
.dl small { color: var(--slaby2); font-size: 14px; margin-top: 4px; }
.dl .kroky3 { margin-top: auto; padding-top: 14px; display: flex; gap: 5px; }
.dl .kroky3 i { flex: 1; height: 7px; border-radius: 4px; background: #fff; }
.dl .kroky3 i.ano { background: var(--hl); }
.stitek-nova, .stitek-umim { font-size: 13px; color: var(--hl); font-weight: 700; vertical-align: 3px; }
.dl-vymysli { background: #fff; border: 3px dashed var(--sv-2); }
.dl-vymysli:hover { background: var(--sv); }
.prazdne { grid-column: 1 / -1; }
@media (max-width: 1150px) { .dlazdice { grid-template-columns: repeat(3, 1fr); } .pokracuj h2 { font-size: 36px; } }
@media (max-width: 700px) {
  .dlazdice { grid-template-columns: minmax(0, 1fr); }
  .pokracuj { grid-template-columns: minmax(0, 1fr); padding: 24px; gap: 16px; }
  .pokracuj h2 { overflow-wrap: anywhere; }
  .pokracuj .velke-hrat { grid-column: auto; grid-row: auto; justify-self: start; max-width: 100%; padding: 20px 32px; }
}

/* Before playing */
.pred { max-width: 1280px; margin: 0 auto; padding: 0 40px 40px; display: grid; grid-template-columns: minmax(420px, 520px) 1fr; gap: 40px; }
.pred h1 { font-size: 44px; letter-spacing: -1px; margin: 4px 0 2px; line-height: 1.05; }
.pred .autor { color: var(--slaby2); margin-bottom: 20px; }
.pred h2 { font-size: 22px; margin: 22px 0 12px; }
.volba { width: 100%; text-align: left; display: grid; grid-template-columns: 54px 1fr auto; gap: 0 14px; align-items: center; padding: 12px 18px;
  border-radius: 20px; border: 3px solid transparent; background: none; color: var(--ink); }
.volba + .volba { margin-top: 8px; }
.volba .c { grid-column: 1; grid-row: 1 / span 2; font-size: 40px; font-weight: 800; color: var(--hl); text-align: center; }
.volba b { grid-column: 2; grid-row: 1; font-size: 21px; }
.volba .popis { grid-column: 2; grid-row: 2; color: var(--slaby2); font-size: 16px; }
.volba .hv { grid-column: 3; grid-row: 1 / span 2; display: flex; gap: 3px; }
.volba .hv i, .hvezdicky i { width: 18px; height: 18px; display: block; background: #E6DDD6;
  clip-path: polygon(50% 4%, 63% 36%, 97% 38%, 70% 59%, 80% 93%, 50% 74%, 20% 93%, 30% 59%, 3% 38%, 37% 36%); }
.volba .hv i.ano, .hvezdicky i.ano { background: #E3A21A; }
.volba.ted { background: var(--sv); border-color: var(--hl); }
.volba .tip { font-size: 13px; font-weight: 700; color: var(--hl); margin-left: 8px; }
.rychlosti { display: flex; gap: 8px; }
.rychlosti button { flex: 1; padding: 14px 10px; border-radius: 18px; background: var(--sv); font-weight: 700; display: flex; flex-direction: column;
  align-items: center; gap: 4px; border: 3px solid transparent; color: var(--ink); min-height: 64px; }
.rychlosti button small { font-weight: 400; color: var(--slaby2); font-size: 14px; }
.rychlosti button.ted { border-color: var(--hl); }
.prava { align-self: start; margin-top: 58px; min-width: 0; }
.pred > div { min-width: 0; }
.nahled-not { background: #fff; border: 3px solid var(--sv); border-radius: 26px; overflow: hidden; min-height: 120px; }
.nahled-noty { overflow: hidden; }
.nahled-noty svg { height: 200px !important; width: auto !important; max-width: none; display: block; }
.prava .akce { display: flex; align-items: center; gap: 24px; margin-top: 26px; justify-content: flex-end; }
.prava .velke-hrat { background: var(--hl); color: #fff; padding: 22px 60px; }

/* side panel (Display) and list items (also in the menu windows) */
.prekryv { position: fixed; inset: 0; z-index: 40; background: color-mix(in srgb, var(--hl) 45%, transparent); }
.rodice-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: #fff; padding: 28px 30px; overflow: auto; border-radius: 26px 0 0 26px; color: var(--ink); }
.rodice-panel h2 { margin: 0 0 8px; font-size: 28px; font-weight: 800; }
.rodice-panel h3 { margin: 24px 0 6px; font-size: 15px; color: var(--slaby2); }
.rodice-panel .zavrit { position: absolute; top: 18px; right: 18px; font-size: 28px; width: 48px; }
.polozka { display: block; width: 100%; text-align: left; padding: 12px 14px; border: 0; background: none; border-radius: 14px; font-weight: 700; color: var(--ink); cursor: pointer; }
.polozka small { display: block; font-weight: 400; color: var(--slaby2); font-size: 14px; }
.polozka:hover { background: var(--sv); }

/* AI helper window: plain text and items like the other windows */
.pomocnik-pozor { margin: 6px 14px 10px; padding: 10px 12px; background: var(--sv); border-radius: 12px; font-size: 14px; display: grid; gap: 8px; justify-items: start; }
#pomocnikPrikazy { margin: 0 14px 8px; display: grid; gap: 10px; }
.prikaz { display: grid; gap: 4px; font-size: 14px; }
.prikaz code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; background: #F4F2EF; padding: 8px 10px; border-radius: 10px; word-break: break-all; user-select: all; }
.prikaz .text-tl { justify-self: start; }
.pomocnik-kopie { margin: 6px 14px; display: grid; gap: 4px; font-size: 14px; }
.pomocnik-kopie textarea { font: inherit; padding: 8px; border-radius: 10px; border: 2px solid var(--sv); resize: vertical; }

/* Game: one row at the top, otherwise notes and keys */
#hra { background: #fff; }
.hra-hlava { display: flex; align-items: center; gap: 14px; padding: 10px 20px; }
.hra-hlava .nazev { font-weight: 800; font-size: 20px; white-space: nowrap; }
.hra-jak { color: var(--slaby2); font-size: 16px; white-space: nowrap; }
.hra-hlava .prubeh { flex: 1; height: 10px; border-radius: 5px; background: var(--sv); margin: 0 10px; overflow: hidden; }
.hra-hlava .prubeh #prubeh { height: 100%; border-radius: 5px; background: var(--hl); }
.ikonka { display: inline-flex; align-items: center; gap: 8px; }
.ikonka svg { width: 18px; height: 18px; }
.prekryv.stred { display: grid; place-items: center; }
.prekryv.stred.skryta { display: none; }
.pauza-karta { background: #fff; border-radius: 30px; padding: 30px 34px; width: min(380px, 92vw); display: flex; flex-direction: column; gap: 6px; color: var(--ink); }
.pauza-karta h2 { margin: 0 0 12px; font-size: 30px; }
.pauza-karta .hrat-velke { margin-bottom: 8px; }
#zobrazeni .prepinace { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }

/* More options */
.vic-panel { margin-top: 18px; padding: 18px 20px; background: #FAF8F6; border-radius: 20px; display: grid; gap: 12px; }
.vic-panel label { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 12px; color: var(--slaby2); font-size: 16px; }
.vic-panel select { min-height: 44px; }
.vic-panel h3 { margin: 0; font-size: 18px; }
/* What will you play: version cards like the steps, the hand choice as three buttons, the summary line */
.verze-karty { display: grid; gap: 6px; }
.verze-karta { display: grid; gap: 2px; text-align: left; padding: 10px 14px; border: 2px solid transparent; border-radius: var(--radius);
  background: none; color: var(--ink); cursor: pointer; min-height: 44px; font: inherit; }
.verze-karta b { font-size: 17px; }
.verze-karta small { color: var(--slaby2); font-size: 14px; line-height: 1.4; }
.verze-karta:hover { background: var(--sv); }
.verze-karta[aria-pressed="true"] { background: var(--sv); border-color: var(--hl); }
.verze-karta:disabled { opacity: .5; cursor: default; }
.ruce { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 6px 12px; color: var(--slaby2); font-size: 16px; }
.ruce-volby { display: inline-flex; border-radius: 12px; background: var(--sv); padding: 3px; gap: 3px; justify-self: start; }
.ruce-volby button { border: 0; background: none; padding: 8px 16px; min-height: 44px; border-radius: 10px; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; }
.ruce-volby button[aria-pressed="true"] { background: var(--karta); color: var(--hl); }
.ruce small { grid-column: 2; font-size: 14px; }
#vzorPole > span { display: grid; }
#vzorPole small { font-size: 13px; color: var(--slaby); }
.presne { margin: 10px 0 0; }
#presnePole { display: flex; align-items: center; gap: 10px; margin-top: 8px; color: var(--ink); }
.pred-titul { display: flex; align-items: flex-start; gap: 8px; }
.hvezda-tl { flex: none; width: 44px; height: 44px; margin-top: 4px; border: 0; background: none; border-radius: 12px; cursor: pointer; color: var(--slaby); }
.hvezda-tl:hover { background: var(--sv); }
.hvezda-tl svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.hvezda-tl[aria-pressed="true"] { color: #E3A21A; }
.hvezda-tl[aria-pressed="true"] svg { fill: currentColor; }
.autor-radek { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 20px; }
.pred .autor-radek .autor { margin-bottom: 0; }
.vic-dalsi { margin-top: 4px; }
.pred-souhrn { margin: 12px 0 0; font-size: 16px; color: var(--slaby2); }
.pred-souhrn b { color: var(--ink); }
.pred-souhrn .odkaz { margin-left: 6px; }
/* the text links on Before playing are 44 px touch targets */
.pred-souhrn .odkaz, .presne .odkaz, .autor-radek .odkaz { min-height: 44px; display: inline-flex; align-items: center; padding: 0 4px; }
@media (max-width: 600px) {
  .ruce { grid-template-columns: 1fr; }
  .ruce small { grid-column: 1; }
}
.vic-panel .rychlost-presna { display: flex; align-items: center; gap: 10px; color: var(--ink); }
#rukaPole:has(select[hidden]) { display: none; }
.vic-akce { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.prava .akce .text-tl { color: var(--hl); }

/* Result: the whole screen in the player's dark colour, one main action */
#vysledek.modal { background: var(--hl); padding: 30px; z-index: 30; }
#vysledek .karta { background: none; border: 0; box-shadow: none; color: #fff; max-width: 680px; border-radius: 0; }
#vysledek .avatar.velky { width: 170px; height: 170px; margin: 0 auto; background: #fff; border-radius: 50%; display: grid; place-items: center; }
#vysledek .avatar.velky svg, #vysledek .avatar.velky .zvire { width: 140px; height: 140px; }
#vysledek .hvezdicky { display: flex; gap: 14px; justify-content: center; margin: 26px 0 8px; }
#vysledek .hvezdicky i { width: 64px; height: 64px; background: color-mix(in srgb, #fff 25%, var(--hl)); }
#vysledek .hvezdicky i.ano { background: #E3A21A; }
#vysledek h2 { font-size: 50px; letter-spacing: -1px; margin: 8px 0 6px; color: #fff; }
#vysledek p { font-size: 20px; color: var(--sv-2); }
#vysledek .zvire-veta { color: #fff; font-style: normal; }
#vysledek .trener { font-size: 17px; background: color-mix(in srgb, #fff 12%, var(--hl)); color: #fff; text-align: center; border-radius: 16px; }
#vysledek .velke-hrat { margin-top: 18px; font-size: 26px; padding: 24px 46px; }
#vysledek .vedlejsi { margin-top: 18px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
#vysledek .vedlejsi .text-tl { color: var(--sv-2); }
#vysledek .vedlejsi .text-tl:hover { background: color-mix(in srgb, #fff 12%, var(--hl)); }
.rodic-hrac { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.rodic-hrac svg, .rodic-hrac .zvire { width: 40px; height: 40px; }
.rodic-hrac b { flex: 1; }
#rodiceTyden p { margin: 4px 0; }
.potvrzeni-text { font-size: 19px; margin: 0 0 16px; color: var(--ink); }
#potvrzeni { z-index: 60; }
.prava .akce .text-tl { white-space: nowrap; }
@media (max-width: 1150px) {
  .pred { grid-template-columns: minmax(380px, 1fr) minmax(0, 1fr); gap: 28px; }
  .prava .akce { flex-wrap: wrap; justify-content: flex-start; gap: 8px 12px; }
  .prava .velke-hrat { order: -1; width: 100%; justify-content: center; }
  .hledat { margin-left: 0; }
}
#kdo { position: relative; }
.logo-kdo { position: absolute; top: 28px; left: 40px; height: 54px; width: auto; }
.logo-novy { height: 44px; width: auto; }
#profilZobrazeni { margin-top: 22px; }
.volba-radek { display: grid; grid-template-columns: 130px minmax(0, 1fr); align-items: center; gap: 10px; margin: 6px 0; color: var(--slaby2); }
.volba-radek select { min-height: 44px; min-width: 0; width: 100%; }
/* favourite: a star in the tile corner (children like to click it right in the menu) */
.dl { position: relative; cursor: pointer; }
.dl > b { padding-right: 40px; }
.dl .oblibena { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; background: none; border-radius: 12px; display: grid; place-items: center; padding: 0; }
.dl .oblibena svg { width: 26px; height: 26px; fill: none; stroke: var(--hl); stroke-width: 1.8; stroke-linejoin: round; opacity: .45; }
.dl .oblibena:hover svg { opacity: .8; }
.dl .oblibena.ano svg { fill: #E3A21A; stroke: #C88B10; opacity: 1; }
.dl:focus-visible { outline: 3px solid var(--hl); outline-offset: 2px; }

/* Animals (set C): 2×2 atlas of expressions, data-vyraz switches the expression (blink, joy, greeting); only the whole picture moves */
.zvire { display: inline-block; width: 100%; height: 100%; flex: none; background-repeat: no-repeat; background-size: 200% 200%; background-position: 0% 0%; }
.zvire[data-vyraz="blink"] { background-position: 100% 0%; }
.zvire[data-vyraz="happy"] { background-position: 0% 100%; }
.zvire[data-vyraz="wink"] { background-position: 100% 100%; }
.zvire[data-zvire="lenochod"] { background-image: url("animals/lenochod.webp"); }
.zvire[data-zvire="kralik"] { background-image: url("animals/kralik.webp"); }
.zvire[data-zvire="liska"] { background-image: url("animals/liska.webp"); }
.zvire[data-zvire="sova"] { background-image: url("animals/sova.webp"); }
.zvire[data-zvire="jezek"] { background-image: url("animals/jezek.webp"); }
.zvire[data-zvire="kocka"] { background-image: url("animals/kocka.webp"); }
.zvire[data-zvire="pejsek"] { background-image: url("animals/pejsek.webp"); }
.zvire[data-zvire="panda-cervena"] { background-image: url("animals/panda-cervena.webp"); }
.zvire[data-zvire="vydra"] { background-image: url("animals/vydra.webp"); }
.zvire[data-zvire="tucnak"] { background-image: url("animals/tucnak.webp"); }
.zvire[data-zvire="kapybara"] { background-image: url("animals/kapybara.webp"); }
.zvire[data-zvire="axolotl"] { background-image: url("animals/axolotl.webp"); }
.zvire[data-zvire="veverka"] { background-image: url("animals/veverka.webp"); }
.zvire[data-zvire="myval"] { background-image: url("animals/myval.webp"); }
.zvire[data-zvire="medvidek"] { background-image: url("animals/medvidek.webp"); }
.zvire[data-zvire="koala"] { background-image: url("animals/koala.webp"); }
.zvire[data-zvire="zabka"] { background-image: url("animals/zabka.webp"); }
.zvire[data-zvire="ovecka"] { background-image: url("animals/ovecka.webp"); }
.zvire { transform-origin: 50% 90%; }        /* the motion (static/ui/animals.js) pivots at the feet */
/* the drawing in motion (V13): a canvas over the picture, larger by the margin (OKRAJ in lib/natural.js) so turned ears aren't cut off */
.zvire { position: relative; }
.zvire.s-loutkou { background: none; }
.zvire > canvas.loutka { position: absolute; inset: -8%; width: 116%; height: 116%; pointer-events: none; }

/* Helper: the optional skill and the window for pasting notes from the helper */
.pomocnik-skill { margin: 10px 14px 4px; font-size: 14px; line-height: 1.45; }
.pomocnik-skill p { margin: 4px 0; }
#vlozitOkno { z-index: 50; }                                  /* above the menu windows (45) */
.vlozit-karta { width: min(720px, 94vw); }
#vlozitText { width: 100%; box-sizing: border-box; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; padding: 10px 12px;
  border-radius: 12px; border: 2px solid var(--sv); resize: vertical; margin: 8px 0; }
.vlozit-chyby { background: #FBE4E8; color: #5A1726; border-radius: 12px; padding: 8px 14px; font-size: 14px; max-height: 200px; overflow: auto; }
.vlozit-chyby p { margin: 4px 0; font-weight: 700; }
.vlozit-chyby ul { margin: 4px 0; padding-left: 18px; }
.pomocnik-skill a { color: var(--ink); font-weight: 700; text-underline-offset: 3px; }
.vlozit-chyby { text-align: left; }

/* About Rusalka: the link top right on Who is playing / New player and the window (readable line length) */
/* top menu: Songs, Players, AI, Data and backups, Settings, About (Who is playing, Home, New player) */
.horni-menu { display: flex; align-items: center; gap: 22px; margin-left: auto; }
#kdo .horni-menu { position: absolute; top: 36px; right: 40px; }
#kdo:not(.skryta) { padding-top: 90px; box-sizing: border-box; }   /* room for the logo and the menu above the content */
#oRusalceOkno { z-index: 50; }
#aiOkno { z-index: 45; }                                   /* like the other menu windows, below the paste window (50) */
.ai-okno { max-width: 640px; }
.ai-okno:focus { outline: none; }
.ai-okno .pomocnik-skill { margin-left: 0; margin-right: 0; }
/* AI tools: one block per task, the button and what to do with it side by side */
.ai-uvod { margin: 4px 0 4px; font-size: 15px; line-height: 1.5; color: var(--slaby); }
/* windows (Songs, Settings, AI tools): blocks with a heading; an option is a button and one line on what it does */
.okno-blok { border-top: 1px solid var(--linka); padding: 14px 0 6px; margin-top: 12px; }
.menu-okno h2 + .okno-blok { border-top: 0; padding-top: 4px; margin-top: 4px; }
.okno-blok h3, .menu-okno .okno-blok h3 { font-size: 17px; margin: 0 0 10px; }
.okno-krok { display: grid; grid-template-columns: 250px 1fr; gap: 14px; align-items: center; margin: 0 0 10px; }
.okno-krok:has(> .skryta) { display: none; }
.okno-krok .tlacitko { width: 100%; text-align: center; cursor: pointer; }
.okno-krok p { margin: 0; font-size: 15px; line-height: 1.45; }
.okno-stav { margin: 0 0 10px; font-size: 15px; color: var(--slaby); }
.ai-okno .pomocnik-kopie { margin: 0 0 10px; }
.pomocnik-skill { border-top: 1px solid var(--linka); padding-top: 12px; }
.pomocnik-skill summary { cursor: pointer; font-weight: 700; color: var(--slaby2); min-height: 32px; }
@media (max-width: 600px) {
  .okno-krok { grid-template-columns: 1fr; gap: 6px; margin-bottom: 14px; }
}
.o-rusalce { max-width: 640px; line-height: 1.55; }
.o-rusalce:focus { outline: none; }
.o-rusalce h3 { font-size: 17px; margin: 22px 0 6px; }
.o-rusalce p { margin: 0 0 10px; }
.o-rusalce .o-rusalce-zvuk { font-size: 14px; color: var(--slaby2); }
/* narrow screens: the top menu flows under the logo instead of over it; headers may wrap */
.horni-menu button { white-space: nowrap; }
/* the language right on the first screens: a small select before the menu (stays when the menu collapses) */
.jazyk-pole { display: inline-flex; align-items: center; }
.skryty-popis { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.vyber-maly { min-height: 44px; max-width: 150px; padding: 6px 28px 6px 10px; border-radius: 12px; border: 2px solid var(--hrana);
  background-color: transparent; font: inherit; font-weight: 700; color: var(--slaby2); cursor: pointer; }
@media (max-width: 700px) {
  .horni { flex-wrap: wrap; padding: 14px 16px; row-gap: 8px; }
  .horni .vpravo { flex-wrap: wrap; justify-content: flex-end; gap: 6px 16px; }
  .horni-menu { gap: 16px; }
  /* the input menu spans the screen under the header instead of sticking out on the right */
  #domu .horni { position: relative; }
  #domu .vstup-obal { position: static; }
  #vstupMenu { left: 16px; right: 16px; width: auto; top: 100%; }
  #kdo .logo-kdo { position: static; display: block; height: 40px; margin: 16px 16px 0; }
  #kdo .horni-menu { position: static; justify-content: center; margin: 12px 16px 0; }
  #kdo:not(.skryta) { padding-top: 0; }
  .kdo-in { padding-top: 24px; }
}

/* the line on the start screens: what Rusalka is, data stay on the device, and a link to About */
.pata { display: block; margin: 36px auto 28px; padding: 6px 16px; max-width: 100%; font-size: 14px; line-height: 1.5;
  color: var(--slaby); text-align: center; }
.pata .odkaz, .novy-uvod .odkaz { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
/* the same promise on the first visit, prominently under the New player heading */
.novy-uvod { margin: -12px 0 24px; padding: 12px 16px; border-radius: var(--radius); font-size: 17px; line-height: 1.45; color: var(--text);
  background: var(--sv); }
/* menu windows (Songs, Players, Data and backups, Settings) */
#pisnickyOkno, #hraciOkno, #nastaveniOkno { z-index: 45; }
.menu-okno { max-width: 640px; }
.menu-okno:focus { outline: none; }
.menu-okno h3 { font-size: 16px; margin: 20px 0 6px; }
.menu-okno .uloziste { flex-wrap: wrap; }
/* Manage songs */
.sprava-hledat { width: 100%; max-width: none; margin: 4px 0 8px; }
.sprava-seznam { display: grid; gap: 2px; }
.sprava-polozka { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 12px; }
.sprava-polozka small { color: var(--slaby); font-weight: 400; }
.sprava-polozka.ted { background: var(--sv); }
.sprava-akce { margin: 6px 0 12px; padding: 12px 14px 4px; border-radius: var(--radius); background: var(--sv); }
.sprava-akce h4 { margin: 0 0 10px; font-size: 17px; }
/* narrow screens: the bar keeps AI and Menu (static/app.js prizpusobMenu), Menu opens the list of the rest */
.menu-vse { display: none; }
.horni-menu.sbalene > button:not(.menu-ai):not(.menu-vse) { display: none; }
.horni-menu.sbalene > .menu-vse { display: inline-block; }
#menuOkno { z-index: 45; }
.menu-seznam { max-width: 420px; }
.menu-seznam:focus { outline: none; }
.menu-seznam .polozka { min-height: 48px; font-size: 18px; }
@media (max-width: 700px) {
  #menuOkno { padding: 0; align-items: stretch; }
  #menuOkno .menu-seznam { max-width: none; min-height: 100%; border-radius: 0; }
}

/* Arabic interface: music and machine-readable notation keep their natural left-to-right order. */
html[dir="rtl"] :is(#noty, #predNoty, #klavesy, .editor-noty, #vlozitText) { direction: ltr; }
html[dir="rtl"] :is(.pisen, .karta.siroka, .trener, .doplnek .obsah p, .doplnek .obsah ul,
  .ja-menu button, .dl, .volba, .polozka, .verze-karta, .vlozit-chyby) { text-align: right; }
html[dir="rtl"] .zdroje, html[dir="rtl"] .vlozit-chyby ul { padding-left: 0; padding-right: 18px; }
/* phone: the notes, Play and the summary under the steps, one column */
@media (max-width: 760px) {
  .pred { grid-template-columns: minmax(0, 1fr); padding: 0 16px 32px; gap: 8px; }
  .pred h1 { font-size: 34px; }
  .vic-panel { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .vic-panel label { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .vic-panel select { min-width: 0; width: 100%; }
  /* New player / My profile: the form, then the preview and Done under it */
  .novy { grid-template-columns: minmax(0, 1fr); padding: 0 16px 32px; gap: 8px; }
  .novy h1 { font-size: 34px; margin-bottom: 20px; }
  .barvy { gap: 10px; }
  .barva { width: 48px; height: 48px; }
  .nahled-hrace { position: static; margin-top: 16px; }
  .nahled-hrace .dlazdice-hrace { padding: 24px 0 20px; }
  .nahled-hrace .dlazdice-hrace svg, .nahled-hrace .dlazdice-hrace .zvire { width: 110px; height: 110px; }
}
/* Keep the bass player physically left of the melody player. */
html[dir="rtl"] .dvojice-lista { direction: ltr; }
html[dir="rtl"] .dvojice-lista .hrac-part { direction: rtl; }
html[dir="rtl"] .prepinac { text-align: right; }

/* Statistics (menu): practising, improving, songs, where it gets stuck – drawn in the player's colour */
.stat-hraci { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 6px; }
.stat-hraci button { display: flex; align-items: center; gap: 8px; border: 2px solid var(--hrana); background: none; border-radius: 14px;
  padding: 4px 14px 4px 4px; font: inherit; font-weight: 700; font-size: 16px; color: var(--slaby2); cursor: pointer; min-height: 48px; }
.stat-hraci button[aria-pressed="true"] { border-color: var(--hl); background: var(--sv); color: var(--ink); }
.stat-hraci svg, .stat-hraci .zvire { width: 38px; height: 38px; }
.stat-hlava { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 12px; flex-wrap: wrap; margin-bottom: 10px; }
.stat-hlava h3 { margin: 0; }
.stat-hlava small { color: var(--slaby2); font-size: 15px; }
.stat-kalendar { display: grid; grid-template-columns: 28px repeat(12, minmax(0, 1fr)); gap: 3px; max-width: 420px; }
.stat-kalendar .den { font-size: 11px; color: var(--slaby); line-height: 1; align-self: center; }
.stat-kalendar .c, .stat-legenda i { aspect-ratio: 1; border-radius: 3px; background: #ECE9E3; }
.stat-kalendar [data-n="1"], .stat-legenda [data-n="1"] { background: var(--sv-2); }
.stat-kalendar [data-n="2"], .stat-legenda [data-n="2"] { background: color-mix(in srgb, var(--sv-2), var(--hl) 50%); }
.stat-kalendar [data-n="3"], .stat-legenda [data-n="3"] { background: var(--hl); }
.stat-kalendar .c.budouci { background: none; }
.stat-kalendar .c.dnes { outline: 2px solid var(--ink); outline-offset: 1px; }
.stat-legenda { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--slaby); margin-top: 8px; }
.stat-legenda i { width: 12px; display: inline-block; }
.stat-graf { position: relative; }
.stat-graf svg { width: 100%; height: auto; display: block; overflow: visible; }
.stat-graf .osa { font-size: 11px; fill: var(--slaby); }
.stat-graf .mrizka { stroke: var(--linka); stroke-width: 1; }
.stat-graf .cara { fill: none; stroke: var(--hl); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.stat-graf .bod { fill: var(--hl); stroke: var(--karta); stroke-width: 2; }
.stat-graf .kriz { stroke: var(--slaby); stroke-width: 1; stroke-dasharray: 3 3; }
.stat-graf .tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; font-size: 13px; padding: 6px 9px; border-radius: 8px;
  white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); }
#hraciOkno .prazdne { color: var(--slaby2); font-size: 15px; margin: 4px 0 8px; }
.stat-pisen { display: grid; grid-template-columns: minmax(0, 1fr) 150px minmax(0, 190px); gap: 14px; align-items: center; padding: 8px 0;
  border-bottom: 1px solid var(--linka); }
.stat-pisen:last-child { border-bottom: 0; }
.stat-pisen b { color: var(--ink); overflow-wrap: anywhere; }
.stat-pisen .kroky3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.stat-pisen .kroky3 i { height: 8px; border-radius: 4px; background: #ECE9E3; position: relative; overflow: hidden; }
.stat-pisen .kroky3 i span { position: absolute; inset: 0 auto 0 0; background: var(--hl); border-radius: 4px; }
.stat-pisen small { font-size: 14px; color: var(--slaby2); }
#statVic { margin-top: 8px; min-height: 44px; }
.stat-mista { display: grid; gap: 8px; }
.stat-misto { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: var(--sv); }
.stat-misto div { min-width: 0; }
.stat-misto b { display: block; color: var(--ink); }
.stat-misto small { color: var(--slaby2); font-size: 14px; }
.stat-misto .tlacitko { flex: none; }
/* Who is playing: Edit and Delete under each tile while editing */
.hrac-obal { display: grid; gap: 6px; justify-items: center; }
.hrac-akce { display: flex; gap: 14px; }
.hrac-akce button { min-height: 44px; }
@media (max-width: 600px) {
  .stat-pisen { grid-template-columns: minmax(0, 1fr) 110px; }
  .stat-pisen small { grid-column: 1 / -1; margin-top: -6px; }
  .stat-misto { flex-wrap: wrap; }
}
/* song tiles: difficulty (1–3 keys) next to the step bars; on a shelf the songs above the player's level are lighter */
.dl .dl-spodek { margin-top: auto; padding-top: 14px; display: flex; align-items: center; gap: 12px; }
.dl .dl-spodek .kroky3 { flex: 1; margin-top: 0; padding-top: 0; }
.dl .obtiznost { color: var(--hl); line-height: 0; flex: none; }
.dl .obtiznost svg { width: 33px; height: 21px; }
.vic-pisni { grid-column: 1 / -1; justify-self: start; min-height: 44px; font-size: 17px; }
.dl.tezsi { background: color-mix(in srgb, var(--sv) 45%, #fff); }
.dl.tezsi:hover { background: var(--sv); }
/* harder songs: lighter tile and title; the translation line keeps its full colour (contrast ≥ 4.5:1) */
.dl.tezsi > b, .dl.tezsi .obtiznost { opacity: .6; }

/* difficulty filter under the song tabs: a quiet second row, for the chosen tab and the search */
.obtiznost-filtr { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 4px; flex: 1 1 320px; font-size: 15px; color: var(--slaby2); }
.obtiznost-filtr span { margin-right: 6px; }
.obtiznost-filtr button { border: 0; background: none; font: inherit; font-weight: 700; color: var(--slaby2); padding: 6px 12px; min-height: 40px; border-radius: 12px; cursor: pointer; }
.obtiznost-filtr button[aria-pressed="true"] { background: var(--sv); color: var(--ink); }

/* without Web MIDI (Safari, iPad, iPhone): the app that brings MIDI to an iPad, on the App Store */
.vstup-appstore { display: block; padding: 10px 14px; font-weight: 700; color: var(--hl); text-decoration: underline; text-underline-offset: 3px; }
.odkaz-ven { color: var(--hl); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
