/* One More Try – web: styl „nálepek“ z herní show (navazuje na fyzikální hru) */
@font-face { font-family: 'Rubik'; font-weight: 300 900; font-display: swap; src: url(fonts/rubik-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Rubik'; font-weight: 300 900; font-display: swap; src: url(fonts/rubik-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
  --bg: #f4e9da; --card: #fffaf2; --ink: #1d1b2b; --muted: #6d6680; --yellow: #ffcf3a; --pink: #ff6fa1; --green: #3ddc84; --red: #ff5d6c; --blue: #5b8cff;
  --line: 3px solid var(--ink); --shadow: 0 5px 0 var(--ink); --r: 18px;
  color-scheme: light;
}
:root[data-theme="dark"] { --bg: #17142a; --card: #241f3d; --ink: #f4e9da; --muted: #b3abcd; color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #17142a; --card: #241f3d; --ink: #f4e9da; --muted: #b3abcd; color-scheme: dark; } }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.4 Rubik, system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
.wrap { max-width: 520px; margin: 0 auto; padding: 12px 16px 80px; }
.card { background: var(--card); border: var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border: var(--line); border-radius: 14px; background: var(--card);
  box-shadow: 0 4px 0 var(--ink); font-weight: 800; cursor: pointer; text-decoration: none; transition: transform .08s, box-shadow .08s; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn.primary { background: var(--yellow); color: #1d1b2b; }
.btn.pink { background: var(--pink); color: #1d1b2b; }
.btn.green { background: var(--green); color: #1d1b2b; }
.btn.small { padding: 7px 12px; font-size: 14px; border-radius: 11px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; pointer-events: none; }
.label { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrapit { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
input.field { width: 100%; padding: 13px 14px; border: var(--line); border-radius: 14px; background: var(--card); font-weight: 600; outline: none; }
input.field:focus { box-shadow: 0 0 0 4px var(--yellow); }

/* hlavička */
header.top { display: flex; align-items: center; gap: 10px; padding: 6px 0 14px; }
.logo { font-weight: 900; font-size: clamp(17px, 5.4vw, 22px); letter-spacing: -.01em; line-height: 1; cursor: pointer; white-space: nowrap; }
#userBtn { max-width: 38vw; overflow: hidden; text-overflow: ellipsis; }
.logo b { display: inline-block; background: var(--yellow); color: #1d1b2b; padding: 2px 7px; border: var(--line); border-radius: 9px; transform: rotate(-3deg); margin-left: 3px; }
.chip { padding: 6px 10px; border: var(--line); border-radius: 999px; background: var(--card); font-weight: 800; font-size: 14px; white-space: nowrap; }
.chip.fire { background: #ffe1c4; color: #1d1b2b; }

/* přehled dne */
.hero { text-align: center; margin-bottom: 14px; }
.hero h1 { margin: 2px 0 0; font-size: 30px; font-weight: 900; line-height: 1.05; }
.hero .pts { font-size: 15px; font-weight: 700; color: var(--muted); margin-top: 6px; }
.parts { display: grid; gap: 12px; }
.part { display: flex; align-items: center; gap: 14px; cursor: pointer; text-align: left; width: 100%; }
.part .ico { flex: none; width: 56px; height: 56px; border: var(--line); border-radius: 16px; display: grid; place-items: center; font-size: 30px; background: var(--yellow); transform: rotate(-3deg); }
.part:nth-child(2) .ico { background: var(--pink); transform: rotate(3deg); }
.part:nth-child(3) .ico { background: var(--blue); }
.part:nth-child(4) .ico { background: var(--green); transform: rotate(2deg); }
.part:nth-child(5) .ico { background: #ffb36b; transform: rotate(-2deg); }
.part h3 { margin: 0; font-size: 18px; font-weight: 900; }
.part p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.part .state { flex: none; font-weight: 900; font-size: 15px; }
.part.done { opacity: .85; }
.part.done .state { color: #1f9d5a; }
.banner { margin-top: 14px; background: var(--yellow); color: #1d1b2b; }
.bottom-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }

/* obrazovka části */
.screen-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.back { padding: 8px 12px; }
.qcard { font-size: 22px; font-weight: 900; text-align: center; line-height: 1.2; padding: 20px 16px; }
.qcard .emoji { font-size: 56px; letter-spacing: .05em; }
.lives { font-size: 22px; letter-spacing: 2px; }
.board { display: grid; gap: 8px; margin: 14px 0; }
.slot { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: var(--line); border-radius: 14px; background: var(--card); min-height: 54px; }
.slot .n { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--yellow); color: #1d1b2b; border: 2px solid var(--ink); font-weight: 900; }
.slot .w { flex: 1; font-weight: 900; font-size: 18px; text-transform: uppercase; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot .pct { font-weight: 900; font-size: 18px; }
.slot.found { background: var(--green); color: #1d1b2b; animation: flip .5s ease; }
.slot.missed { background: #ffd6dc; color: #1d1b2b; }
.dots { display: flex; gap: 4px; flex-wrap: wrap; }
.dots i { width: 14px; height: 18px; border-radius: 4px; background: var(--muted); opacity: .35; }
.guess { display: flex; gap: 8px; margin-top: 12px; }
.wrong { margin-top: 10px; font-size: 14px; color: var(--muted); }
.wrong s { margin-right: 8px; }
.result { text-align: center; margin-top: 14px; }
.result .big { font-size: 40px; font-weight: 900; }
.answer { display: inline-block; margin-top: 8px; padding: 10px 18px; border: var(--line); border-radius: 14px; background: var(--green); color: #1d1b2b; font-weight: 900; font-size: 22px; box-shadow: var(--shadow); }
.note { margin-top: 10px; font-size: 15px; color: var(--muted); }
.tf { display: grid; gap: 10px; }
.tf .item { padding: 14px; }
.tf .item .s { font-weight: 800; font-size: 17px; }
.tf .item .btns { display: flex; gap: 8px; margin-top: 10px; }
.tf .item.ok { background: #d8f8e6; } .tf .item.bad { background: #ffe0e4; }
:root[data-theme="dark"] .tf .item.ok, :root[data-theme="dark"] .tf .item.bad { color: #1d1b2b; }
.opts { display: grid; gap: 8px; margin-top: 10px; }
.opts .btn { justify-content: flex-start; text-align: left; }
.opts .btn.right { background: var(--green); color: #1d1b2b; } .opts .btn.badpick { background: var(--red); color: #1d1b2b; }
.cw { display: grid; gap: 4px; justify-content: center; margin: 12px 0; }
.cw-row { display: flex; gap: 4px; align-items: center; }
.cw-n { width: 18px; font-size: 12px; font-weight: 800; color: var(--muted); text-align: right; margin-right: 2px; }
.cw-c { width: min(9vw, 34px); height: min(9vw, 34px); border: 2px solid var(--ink); border-radius: 7px; background: #fff; color: #1d1b2b; display: grid; place-items: center; font-weight: 900; font-size: min(5vw, 19px); }
.cw-c.e { border: 0; background: none; }
.cw-c.t { background: var(--yellow); }
.clues { margin: 0; padding-left: 0; list-style: none; font-size: 14px; display: grid; gap: 3px; }
.clues b { color: var(--pink); }
.aso-words { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.aso-words .slot { min-height: 46px; }
.aso-words .slot .w { font-size: 16px; }

/* One More Try (fyzikální hra) přes celou obrazovku */
#omt-layer { position: fixed; inset: 0; z-index: 50; background: #f4e9da; }
#omt-layer iframe { width: 100%; height: 100%; border: 0; }
#omt-close { position: absolute; left: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 2; }

/* okna */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(20, 16, 40, .55); display: grid; place-items: center; padding: 16px; }
.modal .card { width: 100%; max-width: 420px; max-height: 90vh; overflow: auto; }
.modal h2 { margin: 0 0 6px; font-weight: 900; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.tabs .btn.on { background: var(--yellow); color: #1d1b2b; }
.form { display: grid; gap: 10px; }
.err { color: var(--red); font-weight: 800; min-height: 1.2em; }
.okmsg { color: #1f9d5a; font-weight: 800; }
.lb { width: 100%; border-collapse: collapse; }
.lb td { padding: 8px 4px; border-bottom: 2px dashed rgba(127, 120, 150, .3); }
.lb td:first-child { width: 36px; font-weight: 900; }
.lb td:last-child { text-align: right; font-weight: 900; }
.lb tr.me { background: rgba(255, 207, 58, .35); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 800; }
@keyframes flip { 0% { transform: rotateX(90deg); } 70% { transform: rotateX(-10deg); } 100% { transform: rotateX(0); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.shake { animation: shake .3s; }
