:root {
  --shirt: #eadbc6;
  --print: #f6ecdb;
  --ink: #15130f;
  --green: #3f7d3a;
  --navy: #1f2a5c;
  --red: #d8263c;
  --olive: #8a9a3a;
  --orange: #ef8a3c;
  --pink: #e23a7a;
  --round: 'Fredoka', 'Comic Sans MS', 'Chalkboard SE', 'Trebuchet MS', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(255,255,255,.35), transparent 50%),
    radial-gradient(ellipse at 90% 80%, rgba(120,90,50,.18), transparent 55%),
    var(--shirt);
  color: var(--ink);
  font-family: var(--round);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.45;
  overflow-x: hidden;
  min-height: 100vh;
}

.c-green { color: var(--green); } .c-navy { color: var(--navy); } .c-red { color: var(--red); }
.c-olive { color: var(--olive); } .c-orange { color: var(--orange); } .c-pink { color: var(--pink); }

/* ---------- loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 50; background: var(--print);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 24px; text-align: center; cursor: pointer; transition: opacity .35s;
}
#loader.gone { opacity: 0; pointer-events: none; }
.loader-shark { font-size: 72px; animation: bob 1s ease-in-out infinite; }
.loader-msg { font-size: 22px; font-weight: 700; color: var(--navy); min-height: 1.5em; }
.loader-bar { width: min(320px, 80vw); height: 22px; border: 3px solid var(--ink); background: #fff; }
#loader-fill { height: 100%; width: 0; background: repeating-linear-gradient(45deg, var(--pink) 0 12px, var(--orange) 12px 24px); transition: width .25s; }
.loader-pct { font-weight: 700; font-size: 20px; }
.loader-skip { font-size: 13px; opacity: .6; }

/* ---------- marquee ---------- */
.marquee { background: var(--ink); color: var(--print); overflow: hidden; white-space: nowrap; font-weight: 700; font-size: 15px; letter-spacing: .06em; }
.marquee-in { display: inline-block; padding: 6px 0; animation: marquee 28s linear infinite; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- potisk dresu ---------- */
.print {
  width: min(600px, calc(100% - 24px));
  margin: 22px auto 0;
  background: var(--print);
  padding: 22px 18px 26px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.05), 0 10px 30px rgba(90,60,20,.15);
  transform: rotate(-.6deg);
}
.crest { display: flex; align-items: center; justify-content: center; gap: 4px; margin-bottom: 14px; }
.crest-box { border-left: 5px solid var(--ink); border-right: 5px solid var(--ink); padding: 2px 14px; text-align: center; }
.team { font-weight: 700; color: var(--pink); font-size: clamp(22px, 7vw, 38px); transform: rotate(-32deg) translateY(-8px); letter-spacing: .04em; animation: wiggle 2.4s ease-in-out infinite; }
.multi { font-weight: 700; line-height: 1; letter-spacing: .03em; text-transform: uppercase; overflow-wrap: anywhere; }
.multi.big { font-size: clamp(34px, 11.5vw, 68px); }
.multi.huge { font-size: clamp(54px, 17vw, 104px); }
.word { display: inline-block; white-space: nowrap; }
.ltr { display: inline-block; transition: transform .2s, opacity .2s; }
.ltr.eaten { opacity: 0; transform: scale(.2) rotate(40deg); }

.frame { position: relative; border: 2px solid var(--ink); aspect-ratio: 4 / 3; overflow: hidden; background: #9cc; }
.frame.has-gallery { aspect-ratio: 3 / 2; background: var(--ink); }
.gallery { position: absolute; inset: 0; }
.stage { position: absolute; inset: 0; perspective: 800px; }
.slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--ink); }
.cap {
  position: absolute; left: 8px; top: 8px; max-width: 72%; background: #fff46b; color: var(--ink); border: 2px solid var(--ink);
  font-weight: 700; font-size: clamp(12px, 3.4vw, 16px); line-height: 1.15; padding: 4px 8px; pointer-events: none;
}
.count { position: absolute; right: 8px; top: 8px; background: var(--ink); color: #fff; font: 700 13px 'Courier New', monospace; padding: 3px 6px; pointer-events: none; }
.nav {
  position: absolute; top: 50%; translate: 0 -50%; width: 44px; height: 44px; font: inherit; font-weight: 700; font-size: 18px;
  cursor: pointer; color: #fff; background: var(--pink); border: 2px solid var(--ink); border-radius: 50%; padding: 0;
}
.nav.prev { left: 6px; } .nav.next { right: 6px; background: var(--orange); }
.nav.dice { top: auto; bottom: 46px; right: 6px; translate: none; width: auto; height: auto; border-radius: 0; font-size: 13px; padding: 4px 8px; background: var(--green); rotate: -4deg; }
.fx-spin { animation: fx-spin .7s ease-out; }
.fx-flip { animation: fx-flip .6s ease-out; }
.fx-drop { animation: fx-drop .6s cubic-bezier(.3, 1.6, .5, 1); }
.fx-zoom { animation: fx-zoom .6s ease-out; }
.fx-slide { animation: fx-slide .5s ease-out; }
@keyframes fx-spin { from { rotate: -540deg; scale: .1; opacity: 0; } }
@keyframes fx-flip { from { transform: rotateY(180deg); opacity: 0; } }
@keyframes fx-drop { from { translate: 0 -110%; rotate: 12deg; } }
@keyframes fx-zoom { from { scale: 4; opacity: 0; filter: blur(8px); } }
@keyframes fx-slide { from { translate: 110% 0; skew: -20deg; } }
.scene { position: absolute; inset: 0; background: linear-gradient(#bfd9e4, #dfeef0 30%); }
.forest {
  position: absolute; left: 0; right: 0; top: 14%; height: 40%;
  background:
    radial-gradient(circle at 10% 60%, #5d8f3f 0 18%, transparent 19%),
    radial-gradient(circle at 30% 40%, #4c7d36 0 22%, transparent 23%),
    radial-gradient(circle at 52% 55%, #6a9a45 0 20%, transparent 21%),
    radial-gradient(circle at 74% 38%, #4c7d36 0 24%, transparent 25%),
    radial-gradient(circle at 92% 58%, #5d8f3f 0 18%, transparent 19%),
    linear-gradient(transparent 45%, #426e31 46%);
}
.water {
  position: absolute; left: 0; right: 0; bottom: 0; height: 52%;
  background:
    repeating-linear-gradient(175deg, rgba(255,255,255,.14) 0 3px, transparent 3px 16px),
    linear-gradient(#4f8fa3, #1f5a72);
}
.shark-big { position: absolute; left: 2%; bottom: 4%; font-size: clamp(110px, 40vw, 230px); line-height: 1; transform: scaleX(-1) rotate(18deg); animation: lunge 3.2s ease-in-out infinite; }
.cutout {
  position: absolute; right: 12%; top: 34%; width: 19%; aspect-ratio: 5 / 4; background: #3d8b4a;
  display: grid; place-items: center; font-size: clamp(26px, 9vw, 54px); transform: rotate(-5deg);
  outline: 1px solid rgba(0,0,0,.2); animation: bob 1.7s ease-in-out infinite;
}
.disc { position: absolute; left: 44%; top: 44%; font-size: clamp(22px, 7vw, 40px); animation: disc 3.2s ease-in-out infinite; }
.sign {
  position: absolute; right: 4%; top: 5%; background: #fff46b; color: var(--ink); border: 3px solid var(--ink);
  font-weight: 700; font-size: clamp(16px, 5vw, 28px); line-height: 1.05; padding: 8px 12px; text-align: center;
  transform: rotate(7deg); animation: blink 1.1s steps(2) infinite;
}

.base { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.base-left { min-width: 0; }
.base-right { border-top: 5px solid var(--ink); border-bottom: 5px solid var(--ink); padding: 8px 6px; margin-top: 10px; min-width: 0; max-width: 100%; }
.jumpy { font-family: Georgia, 'Times New Roman', serif; font-weight: 700; font-size: clamp(22px, 7vw, 40px); line-height: 1; margin-top: 2px; }
.jumpy .ltr:nth-child(odd) { font-size: 1.35em; }
.jumpy .ltr:nth-child(3n) { transform: translateY(-.18em); }

/* ---------- obsah ---------- */
.view { margin-top: 22px; }
.view h1 { font-size: clamp(26px, 8vw, 40px); line-height: 1.05; margin: 0 0 10px; color: var(--navy); }
.view p { margin: 0 0 12px; white-space: pre-line; }
.hello { font-weight: 700; color: var(--pink); font-size: 20px; margin-bottom: 6px; }

.codeform { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; padding: 14px; border: 3px dashed var(--ink); background: #fffbe9; transform: rotate(.8deg); }
.codeform label { font-weight: 700; }
.codeform input {
  font: inherit; font-weight: 700; font-size: 22px; letter-spacing: .08em; text-transform: uppercase; text-align: center;
  padding: 12px 10px; border: 3px solid var(--ink); border-radius: 0; background: #fff; color: var(--ink); width: 100%;
}
.codeform input:focus { outline: 4px solid var(--orange); }
.btn {
  font: inherit; font-weight: 700; font-size: 20px; cursor: pointer; color: #fff; background: var(--green);
  border: 3px solid var(--ink); border-radius: 0; padding: 12px 16px; box-shadow: 5px 5px 0 var(--ink);
  transition: transform .18s; text-decoration: none; display: inline-block; text-align: center;
}
.btn:active { box-shadow: 2px 2px 0 var(--ink); }
.btn.wa { background: #1faa59; font-size: clamp(20px, 6vw, 26px); width: 100%; animation: pulse 1.6s ease-in-out infinite; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: none; border-width: 2px; font-size: 15px; padding: 6px 10px; }
.msg { min-height: 1.5em; font-weight: 700; color: var(--red); }
.hint { font-size: 14px; opacity: .7; }
.shake { animation: shake .4s; }

/* ---------- harampádí pod dresem ---------- */
.junk { width: min(600px, calc(100% - 24px)); margin: 30px auto 90px; text-align: center; }
.countdown { background: var(--ink); color: #7CFC6A; font-family: 'Courier New', monospace; padding: 12px; transform: rotate(1.2deg); }
.countdown-label { font-size: 13px; letter-spacing: .15em; }
.countdown-num { font-size: clamp(20px, 6.5vw, 32px); font-weight: 700; }
.countdown-sub { font-size: 13px; color: #fff46b; }
.counter { margin-top: 20px; font-size: 15px; }
.odo { font-family: 'Courier New', monospace; font-weight: 700; background: var(--ink); color: #fff; padding: 2px 6px; letter-spacing: .2em; }
.fine { font-size: 13px; opacity: .65; margin-top: 18px; }

#shark { position: fixed; left: 0; top: 0; z-index: 30; font-size: 44px; line-height: 1; pointer-events: none; will-change: transform; }
#shark.chomp { filter: drop-shadow(0 0 6px var(--red)); }

#cookies {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; max-width: 480px; margin: 0 auto;
  background: #fff; border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--pink); padding: 12px 14px; font-size: 15px;
}
#cookies p { margin: 0 0 8px; }
#cookies button { font: inherit; font-weight: 700; border: 2px solid var(--ink); background: var(--orange); padding: 6px 12px; margin-right: 8px; cursor: pointer; }

@keyframes bob { 50% { translate: 0 -8px; } }
@keyframes wiggle { 50% { rotate: 6deg; } }
@keyframes blink { 50% { background: var(--pink); color: #fff; } }
@keyframes lunge { 0%, 100% { translate: 0 6%; } 50% { translate: 7% -4%; } }
@keyframes disc { 0%, 100% { translate: 60% -20%; rotate: 0deg; } 50% { translate: -90% 30%; rotate: 540deg; } }
@keyframes pulse { 50% { scale: 1.03; } }
@keyframes shake { 20% { translate: -8px 0; } 40% { translate: 8px 0; } 60% { translate: -6px 0; } 80% { translate: 6px 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  #shark { display: none; }
}

/* ---------- admin ---------- */
.admin { width: min(820px, calc(100% - 24px)); margin: 20px auto 80px; }
.admin h1 { font-size: 30px; margin: 0 0 4px; }
.admin h2 { font-size: 22px; margin: 28px 0 10px; border-bottom: 4px solid var(--ink); padding-bottom: 4px; }
.card { background: var(--print); border: 2px solid var(--ink); padding: 12px; margin-bottom: 10px; }
.card-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.card-name { font-weight: 700; font-size: 20px; }
.card-code { font-family: 'Courier New', monospace; font-weight: 700; background: #fff; border: 1px solid var(--ink); padding: 1px 6px; }
.status-yes { color: var(--green); font-weight: 700; }
.status-no { color: var(--red); font-weight: 700; }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.admin .btn { font-size: 15px; padding: 7px 11px; box-shadow: 3px 3px 0 var(--ink); }
.admin .btn.alt { background: var(--navy); }
.admin .btn.warn { background: var(--red); }
.admin input[type=text], .admin input[type=password], .admin input[type=url], .admin textarea {
  font: inherit; font-size: 16px; width: 100%; padding: 8px; border: 2px solid var(--ink); border-radius: 0; background: #fff; color: var(--ink);
}
.admin textarea { min-height: 110px; resize: vertical; font-family: system-ui, sans-serif; }
.admin label { display: block; font-weight: 700; margin: 12px 0 4px; }
.admin pre.preview { white-space: pre-wrap; overflow-wrap: anywhere; background: #fff; border: 1px dashed var(--ink); padding: 8px; margin: 8px 0 0; font: 14px/1.4 system-ui, sans-serif; }
.admin .thumb { width: 150px; height: 100px; object-fit: cover; border: 2px solid var(--ink); background: var(--ink); flex: none; }
.media-item { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; }
.media-item .media-body { flex: 1 1 240px; min-width: 0; }
.note { font-size: 14px; opacity: .75; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 8px 14px; font-weight: 700; z-index: 60; }
