/* Pinosaurus – vzhled: telefon na prvním místě, zelený maskot, oranžové akcenty */
:root {
  --green: #2b8a3e; --green2: #37b24d; --green-l: #ebfbee; --ink: #1b2b20; --muted: #66736a;
  --line: #dfe8dc; --bg: #f4f8f2; --orange: #e8590c; --red: #c92a2a; --card: #fff;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; padding-bottom: env(safe-area-inset-bottom); }
a { color: var(--green); }
/* rychlé ťukání na tlačítka nesmí telefon brát jako dvojklik pro přiblížení */
a, button, label, .key, .btn { touch-action: manipulation; }
h1 { font-size: 26px; line-height: 1.15; margin: 8px 0 10px; }
h2 { font-size: 19px; margin: 22px 0 6px; }
p { margin: 6px 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.wrap { max-width: 560px; margin: 0 auto; padding: 12px 14px 40px; }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #fff; border-bottom: 1px solid var(--line); padding: 8px 14px; padding-top: max(8px, env(safe-area-inset-top)); }
.brand { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 19px; color: var(--green); text-decoration: none; }
.brand-ic { display: inline-flex; }
.tabs { display: flex; gap: 4px; }
.tabs a { text-decoration: none; color: var(--muted); font-weight: 600; padding: 7px 12px; border-radius: 999px; }
.tabs a.on { background: var(--green-l); color: var(--green); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; margin: 10px 0; }
.hero { display: flex; gap: 12px; align-items: center; }
.hero-dino { flex: none; }
.hero-txt { flex: 1; min-width: 0; }
.stage { font-weight: 800; font-size: 21px; }
.xp { font-weight: 700; margin: 2px 0 6px; }
.xp .muted { font-weight: 400; font-size: 14px; }
.bar { width: 100%; height: 10px; display: block; }
.streak { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-weight: 600; flex-wrap: wrap; }
.flame { color: #ced4da; flex: none; }
.flame.on { color: var(--orange); }

.draft { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); background: #fff4e6; border-color: #ffd8a8; }
.draft span { color: var(--orange); font-weight: 700; white-space: nowrap; }

.topic-h { display: flex; align-items: baseline; justify-content: space-between; }
.topic-h h2 { margin-bottom: 0; }
.drills { display: grid; gap: 8px; }
.drill { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); margin: 0; padding: 10px 14px; }
.drill .dm { flex: none; width: 36px; display: flex; justify-content: center; color: var(--muted); }
.drill .dt { display: flex; flex-direction: column; min-width: 0; }
.drill .dt .muted { font-size: 14px; }
.drill.locked { opacity: .6; }
.tag { display: inline-block; align-self: flex-start; font-size: 12px; font-weight: 700; color: var(--orange); background: #fff4e6; border-radius: 999px; padding: 2px 9px; margin-top: 4px; }
.tag.pb { color: var(--green); background: var(--green-l); font-size: 14px; }

.back { display: inline-block; text-decoration: none; font-weight: 600; margin: 4px 0; }
.medals { display: flex; justify-content: space-between; gap: 6px; }
.mt { display: flex; gap: 6px; align-items: center; font-size: 14px; line-height: 1.25; }
.note { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.setup { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 600; margin: 12px 0; }
.setup input { width: 96px; font: inherit; font-size: 20px; text-align: center; padding: 8px; border: 2px solid var(--line); border-radius: 12px; }

.btn { display: inline-flex; justify-content: center; align-items: center; font: inherit; font-weight: 800; font-size: 17px; border: 0; border-radius: 14px;
  padding: 13px 16px; background: var(--green); color: #fff; cursor: pointer; text-decoration: none; text-align: center; box-shadow: 0 3px 0 #1f6b2f; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #1f6b2f; }
.btn.big { width: 100%; font-size: 20px; padding: 16px; margin: 6px 0 4px; }
.btn.ghost { background: #fff; color: var(--green); border: 2px solid var(--line); box-shadow: none; }
.btn.hit { background: var(--green); }
.btn.miss { background: #fff; color: var(--red); border: 2px solid #ffc9c9; box-shadow: none; }
.link { background: none; border: 0; color: var(--green); font: inherit; font-weight: 600; padding: 10px 4px; cursor: pointer; }
.link:disabled { color: #b9c2bb; }
.link.danger { color: var(--red); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 4px; }
.grid4 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 4px; }
.two .btn, .grid4 .btn { min-height: 64px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; gap: 4px; }
.stats span { display: block; font-size: 12px; }
.stats b { font-size: 20px; }
.chart { width: 100%; height: auto; display: block; }
.chart .ct { font-size: 11px; fill: #66736a; }
.hist { list-style: none; padding: 0; margin: 0; }
.hist li { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.hist li span { flex: 1; color: var(--muted); }

.play-h { display: flex; justify-content: space-between; align-items: center; }
.shot { text-align: center; }
.target { font-size: 30px; font-weight: 800; margin: 6px 0 10px; }
.dots { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.dot { width: 16px; height: 16px; border-radius: 50%; background: #e9ecef; }
.dot.cur { background: #fff; border: 3px solid var(--green); }
.dot.hit { background: var(--green2); }
.dot.miss { background: #ffa8a8; }
.tally { font-weight: 700; color: var(--muted); }

.board { display: grid; grid-template-columns: repeat(9, 1fr) 1.45fr; border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; margin: 8px 0; }
.fr { border-right: 1px solid #adb5bd; text-align: center; min-width: 0; }
.fr:last-child { border-right: 0; }
.fn { font-size: 10px; color: var(--muted); border-bottom: 1px solid #dee2e6; }
.mk { display: flex; justify-content: flex-end; height: 20px; }
.mk span { width: 50%; font-size: 13px; font-weight: 700; line-height: 20px; border-left: 1px solid #dee2e6; }
.f10 .mk span { width: 33.3%; }
.mk span:first-child { border-left: 0; }
.fs { font-size: 13px; font-weight: 700; height: 20px; }
.pad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0; }
.key { font: inherit; font-size: 22px; font-weight: 800; padding: 14px 0; border-radius: 14px; border: 2px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.key.strong { background: var(--green); border-color: var(--green); color: #fff; }
.key:active { transform: translateY(1px); }

.result { text-align: center; }
.result h1 { font-size: 44px; margin: 6px 0 0; }
.result h1 small { font-size: 17px; font-weight: 600; color: var(--muted); }
.win { font-weight: 800; font-size: 19px; color: var(--green); }
.grew { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--green); }
.xp-list { list-style: none; padding: 0; margin: 12px auto; max-width: 320px; text-align: left; }
.xp-list li { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.xp-list b { color: var(--orange); }

.prof { display: flex; gap: 12px; align-items: center; }
.mrow { display: flex; gap: 14px; margin-top: 6px; }
.mrow span { display: flex; align-items: center; gap: 4px; font-weight: 700; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: #e9ecef; border-radius: 14px; padding: 4px; }
.seg button { font: inherit; font-weight: 700; border: 0; background: none; padding: 10px; border-radius: 11px; cursor: pointer; color: var(--muted); }
.seg button.on { background: #fff; color: var(--green); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; transition: .25s;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 600; pointer-events: none; max-width: 90vw; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.result .unit { font-weight: 600; color: var(--muted); margin-bottom: 4px; }
