:root {
  --night: #0f1630;
  --night2: #1b2550;
  --paper: #fffaf0;
  --ink: #1d1d2b;
  --gold: #ffcc33;
  --red: #e63946;
  --green: #2a9d8f;
  --snow: #eef6ff;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
html { background: var(--night); } /* inak biely pruh hore v aplikácii z plochy (iPhone 11. 11.) */
body {
  background: radial-gradient(ellipse at top, var(--night2), var(--night) 70%);
  color: var(--snow);
  font: 800 19px/1.4 Nunito, system-ui, sans-serif;
  overflow-x: hidden;
}
#snow { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.app { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; padding: 0 16px calc(24px + env(safe-area-inset-bottom)); }
.bar { display: flex; justify-content: space-between; align-items: center; padding: calc(12px + env(safe-area-inset-top)) 0 8px; font-size: 14px; opacity: .9; }
.dots { display: flex; gap: 6px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.2); }
.dots i.done { background: var(--gold); box-shadow: 0 0 8px var(--gold); }

h1, h2 { font-family: Bangers, Impact, sans-serif; letter-spacing: .04em; font-weight: 400; margin: 6px 0 10px; }
h1 { font-size: 46px; line-height: 1; color: var(--gold); text-shadow: 3px 3px 0 var(--red); }
h2 { font-size: 34px; color: var(--gold); }
.who { display: inline-block; background: var(--red); color: #fff; border-radius: 999px; padding: 3px 12px; font-size: 15px; margin-bottom: 4px; }

.panel {
  background: var(--paper); color: var(--ink); border: 4px solid var(--ink); border-radius: 18px;
  box-shadow: 6px 6px 0 rgba(0,0,0,.45); padding: 16px; margin: 14px 0; position: relative;
  animation: pop .45s cubic-bezier(.2,1.6,.4,1) both;
}
.panel p { margin: 0 0 10px; }
.panel p:last-child { margin-bottom: 0; }
.bubble { position: relative; background: #fff; color: var(--ink); border: 3px solid var(--ink); border-radius: 18px; padding: 10px 14px; margin: 10px 0; }
.bubble::after { content: ""; position: absolute; left: 26px; bottom: -14px; border: 12px solid transparent; border-top-color: var(--ink); border-bottom: 0; }
@keyframes pop { from { transform: scale(.85) rotate(-1deg); opacity: 0; } }

.art { width: 100%; border: 4px solid var(--ink); border-radius: 18px; overflow: hidden; background: #22305f; position: relative; box-shadow: 6px 6px 0 rgba(0,0,0,.45); }
.art svg, .art img { display: block; width: 100%; height: auto; }

.btn {
  display: block; width: 100%; min-height: 60px; margin-top: 12px; border: 4px solid var(--ink); border-radius: 16px;
  background: var(--gold); color: var(--ink); font: inherit; font-size: 22px; cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink); transition: transform .08s;
}
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn.alt { background: #fff; font-size: 18px; min-height: 52px; }
.row { display: flex; gap: 10px; }
.row .btn { flex: 1; }

.answer { display: flex; gap: 10px; margin-top: 12px; }
.answer input {
  flex: 1; min-width: 0; min-height: 60px; border: 4px solid var(--ink); border-radius: 16px; padding: 0 14px;
  font: inherit; font-size: 26px; text-transform: uppercase; letter-spacing: .15em; text-align: center; background: #fff; color: var(--ink);
}
.answer .btn { width: auto; margin: 0; padding: 0 18px; }

.note {
  background: #fdf6d8; color: var(--ink); border: 3px dashed #b88a00; border-radius: 6px; padding: 18px 8px; text-align: center;
  font-family: "Courier New", monospace; font-size: clamp(20px, 6.4vw, 30px); letter-spacing: .04em; white-space: nowrap; transform: rotate(-2deg); margin: 14px 8px;
  box-shadow: 4px 6px 0 rgba(0,0,0,.35);
}
.note.poem { white-space: normal; text-align: left; font-size: clamp(17px, 4.8vw, 22px); line-height: 1.6; padding: 16px 18px; letter-spacing: 0; }
.cap.hi { color: #c1121f; font-weight: bold; }
.abc { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; font-size: 14px; text-align: center; margin-top: 10px; }
.abc span { background: #eef; border-radius: 6px; padding: 4px 0; }
.abc b { display: block; font-size: 18px; }

.houses { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.house { border: 4px solid var(--ink); border-radius: 16px; background: #fff; color: var(--ink); padding: 10px; text-align: center; font: inherit; font-size: 15px; cursor: pointer; box-shadow: 4px 4px 0 var(--ink); }
.house .h { font-size: 44px; line-height: 1.1; }
.house small { display: block; margin-top: 4px; font-weight: 600; }
.house.wrong { animation: shake .4s; background: #ffe1e1; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { border-bottom: 2px solid #e3dccb; padding: 6px 4px; text-align: center; }
.table th:first-child, .table td:first-child { text-align: left; }

.hit, .decoy { cursor: pointer; }
.glow { animation: glow 1s infinite alternate; }
@keyframes glow { to { filter: drop-shadow(0 0 10px #ffcc33) drop-shadow(0 0 4px #fff); } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.shake { animation: shake .4s; }

.bell-wrap { height: 220px; position: relative; overflow: hidden; }
.bell { position: absolute; left: 50%; top: 0; width: 4px; height: 150px; background: #6b4b2a; transform-origin: top center; }
.bell span { position: absolute; bottom: -36px; left: -26px; font-size: 54px; }
.target { position: absolute; left: 50%; top: 168px; transform: translateX(-50%); width: 92px; height: 50px; border: 3px dashed var(--gold); border-radius: 50%; }
.ball { position: absolute; left: 50%; bottom: -40px; font-size: 40px; transform: translateX(-50%); transition: bottom .45s ease-out, opacity .3s; }

.flash { position: fixed; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.flash[hidden] { display: none; } /* inak display:flex prebije hidden a nápis ostane v strome stránky */
.flash span {
  font-family: Bangers, Impact, sans-serif; font-size: 64px; color: var(--gold); text-shadow: 4px 4px 0 var(--red), -2px -2px 0 var(--ink);
  animation: boom 1.1s ease-out both; text-align: center; padding: 0 20px;
}
.flash .gold { position: absolute; left: 50%; top: 50%; color: var(--gold); font-style: normal; text-shadow: 0 0 8px #fff3b0; animation: gold 1s ease-out both; }
@keyframes gold { 0% { transform: translate(-50%, -50%) scale(.3); opacity: 1; } 100% { transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y) + 60px)) scale(1) rotate(160deg); opacity: 0; } }
@keyframes boom { 0% { transform: scale(.2) rotate(-12deg); opacity: 0; } 30% { transform: scale(1.15) rotate(3deg); opacity: 1; } 80% { opacity: 1; } 100% { transform: scale(1); opacity: 0; } }

.gift { display: inline-block; animation: float 2.4s ease-in-out infinite; }
.gift.gone { animation: vanish 1.2s ease-in forwards; }
@keyframes float { 50% { transform: translateY(-6px); } }
@keyframes vanish { to { transform: translateY(-80px) scale(.2) rotate(40deg); opacity: 0; } }
.twinkle { animation: tw 1.6s infinite; }
@keyframes tw { 50% { opacity: .25; } }
.door { transform-origin: left center; transition: transform 1.6s ease; }
.door.open { transform: perspective(600px) rotateY(-75deg); }

.stamp {
  display: inline-block; border: 5px solid var(--red); color: var(--red); font-family: Bangers, Impact, sans-serif; font-size: 34px;
  padding: 4px 16px; border-radius: 10px; transform: rotate(-8deg); margin: 10px 0; animation: pop .5s .2s both;
}
.small { font-size: 15px; font-weight: 600; opacity: .85; }

/* Autorské práva (Katka 13. 11.) */
.copy { position: relative; z-index: 1; text-align: center; font: 600 12px/1.4 Nunito, system-ui, sans-serif; opacity: .55; padding: 18px 16px calc(14px + env(safe-area-inset-bottom)); }
