/* Мурко і Ніч у музеї: пергаментна тема поверх рушія, квиток, сліди, план, мініігри першої версії (.mus). */
@font-face{font-family:Nunito;font-weight:600 700;font-display:swap;src:url(fonts/nunito-cyrillic-600-normal.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Nunito;font-weight:600 700;font-display:swap;src:url(fonts/nunito-latin-600-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+2000-206F,U+2190-21FF,U+2212}
@font-face{font-family:Nunito;font-weight:800 900;font-display:swap;src:url(fonts/nunito-cyrillic-800-normal.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Nunito;font-weight:800 900;font-display:swap;src:url(fonts/nunito-latin-800-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+2000-206F,U+2190-21FF,U+2212}
body, #stage { font-family: "Nunito", "Segoe UI", Arial, sans-serif; }
#stage { background: #1c1838; }

/* шари сцени */
#bgover, #props { position: absolute; inset: 0; pointer-events: none; }
#bgover svg, .bg > svg { position: absolute; inset: 0; width: 1600px; height: 900px; display: block; pointer-events: none; }
#props > * { pointer-events: auto; }
#chars { pointer-events: none; }
.char::after { content: ""; position: absolute; left: 50%; bottom: -20px; width: 78%; height: 40px; transform: translateX(-50%); border-radius: 50%; z-index: -1;
  background: radial-gradient(ellipse at center, rgba(20,10,5,.55) 0%, rgba(20,10,5,.28) 45%, rgba(20,10,5,0) 72%); }
.char.dim { filter: brightness(.78) saturate(.9); }

/* діалог — пергамент */
#dialog { background: #fdf6e8; border: 5px solid #c8a165; color: #2b1d12; font-weight: 700; font-size: 31px; line-height: 1.32; padding: 24px 150px 20px 34px; bottom: 16px; }
#dialog .name { color: #fff; font-weight: 900; font-size: 26px; padding: 6px 22px; }
#dialog.narr .text { color: #5b4632; }
#dialog .next { background: #3d7a3a; color: #fff; box-shadow: 0 5px 0 #24521f; width: 84px; height: 84px; font-size: 38px; }

/* картка завдання — пергамент */
.overlay { background: rgba(13, 11, 24, .6); }
#task .panel, #plan .panel, #ask .panel, #diploma .panel { background: #fdf6e8; border: 6px solid #c8a165; color: #2b1d12; }
#task .title { color: #5a2a14; }
#task .subject { color: #fff; background: #8a5a2b; }
#task .subject.math { background: #a8642a; } #task .subject.mova { background: #b0476a; } #task .subject.yds { background: #3d7a3a; } #task .subject.inf { background: #5c4a9c; }
#task .partno { color: #8a5a2b; }
#task .prompt { color: #2b1d12; font-weight: 700; }
#task .fb.good { color: #2d6a22; } #task .fb.bad { color: #b23a2f; } #task .fb.tip { color: #6b4206; }
#task .foot .btn { background: #3d7a3a; color: #fff; box-shadow: 0 5px 0 #24521f; }
#task .foot .btn.ghost, #ask .btn.ghost, #diploma .btn.ghost { background: #efe4cc; color: #5a3a1e; border: 3px solid #c8a165; box-shadow: none; }
.opt { background: #fff; border: 4px solid #c8a165; color: #3a2614; font-weight: 700; box-shadow: 0 4px 0 #a8834b; }
.opt:hover { background: #fff8e6; }
.opt.sel { background: #fff1b8; border-color: #e8a530; }
.opt.ok { background: #dff3d6; border-color: #4caf50; }
.opt.no { background: #fde0dc; border-color: #e0574a; }
.nrow { background: #f3e4c4; color: #2b1d12; font-weight: 700; }
.nrow input { border: 4px solid #c8a165; color: #2b1d12; }
.nrow .unit { color: #6b4a2a; }
.card { background: #fff; border: 4px solid #c8a165; color: #3a2614; }
.card.ok { background: #dff3d6; border-color: #4caf50; } .card.no { background: #fde0dc; border-color: #e0574a; }
.arrowhint { color: #8a5a2b; }
.pool { background: rgba(156,122,69,.14); }
.zone { border-color: #b8743e; background: rgba(255,255,255,.4); }
.zone .zt { color: #7b2335; }
.chip { background: #f1d9a7; color: #3a2614; border-color: #c8a165; }
.chip.ok { background: #dff3d6; } .chip.no { background: #fde0dc; }
.frow { background: #f3e4c4; color: #2b1d12; font-weight: 700; }
.frow .blank { border-color: #b8743e; color: #7b2335; }
.frow.done .blank { border-color: #4caf50; color: #2e7d32; }
.bgrid { background: rgba(90, 58, 30, .35); }
.blabel { color: #5a2a14; font-weight: 800; } .blabel small { color: #8a5a2b; }
.bprog { background: rgba(156,122,69,.14); }
.bprog .blk { background: #fff; color: #3a2614; box-shadow: inset 0 0 0 3px #c8a165; }
.bprog .rempty, .bcnt { color: #8a5a2b; }
.bprog .rdel { color: #7b2335; }
.blocks .btn.ghost { color: #5a3a1e; border-color: #c8a165; }
.bgrid.w-case .cell { background: #efdcb2; color: rgba(90,58,30,.5); }
.bgrid.w-case .cell.wall::after { width: 74%; height: 62%; border-radius: 8px; background: linear-gradient(160deg, #e6f4f8, #9cc3d2); border: 4px solid #8a5a2b; box-shadow: 0 4px 0 #6b431f; }
.clocks { display: flex; justify-content: center; gap: 60px; margin: 14px 0 6px; }
.clk { text-align: center; font-size: 24px; font-weight: 800; color: #6b4a2a; }
.clk b { display: block; margin-top: 8px; font: 900 64px "Nunito", monospace; color: #7ef0a0; background: #1d2b22; border: 5px solid #3b5244; border-radius: 18px; padding: 6px 26px; letter-spacing: 2px; text-shadow: 0 0 14px rgba(126,240,160,.6); }
.pic { display: flex; justify-content: center; margin: 0 0 10px; }
.pic svg { display: block; }

/* квиток, сліди, місце */
#mhud { position: absolute; inset: 0; pointer-events: none; z-index: 9; opacity: 0; transition: opacity .4s; }
#mhud.on { opacity: 1; }
#ticket { position: absolute; right: 100px; top: 12px; width: 352px; padding: 8px 14px 10px; border-radius: 16px; background: #f3e6c6; border: 3px dashed #9c7a45; box-shadow: 0 6px 18px rgba(0,0,0,.4); }
#ticket .tt { font-size: 17px; font-weight: 900; color: #7b2335; letter-spacing: .5px; text-transform: uppercase; margin-bottom: 4px; }
#ticket .slots { display: flex; gap: 6px; }
.slot { width: 46px; height: 46px; border-radius: 50%; border: 3px dashed #b99a66; display: flex; align-items: center; justify-content: center; }
.slot svg { width: 32px; height: 32px; opacity: .18; }
.slot.done { border: 3px solid #a82a2a; background: rgba(168,42,42,.08); }
.slot.done svg { opacity: 1; }
.slot.done.anim { animation: stampIn .7s cubic-bezier(.2,1.6,.4,1); }
@keyframes stampIn { 0% { transform: scale(3) rotate(-30deg); opacity: 0; } 60% { opacity: 1; } 100% { transform: scale(1) rotate(-8deg); } }
#mprints { position: absolute; left: 20px; top: 18px; height: 58px; padding: 0 22px 0 14px; border-radius: 29px; background: rgba(253,246,232,.95); border: 4px solid #c8a165; display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 26px; color: #4a3320; }
#mprints svg { width: 38px; height: 38px; }
#mloc { position: absolute; left: 20px; top: 92px; padding: 6px 20px; border-radius: 20px; background: rgba(20,16,40,.72); color: #f4e2bf; font-weight: 800; font-size: 26px; white-space: nowrap; }
#mloc:empty { display: none; }
#toast { position: absolute; left: 50%; top: 96px; transform: translate(-50%,-20px); background: #fdf6e8; border: 4px solid #c8a165; border-radius: 20px; padding: 10px 26px; font-size: 26px; font-weight: 900; color: #5a2a14; opacity: 0; transition: opacity .3s, transform .3s; white-space: nowrap; }
#toast.on { opacity: 1; transform: translate(-50%,0); }

/* сліди Шустрика */
.paw { position: absolute; width: 54px; height: 54px; cursor: pointer; opacity: .55; transition: opacity .3s, transform .3s; z-index: 2; }
.paw:hover { opacity: .8; }
.paw svg { width: 100%; height: 100%; display: block; }
.paw.clue { opacity: 1; height: auto; }
.paw.clue img { width: 100%; display: block; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 28%); mask-image: linear-gradient(to right, transparent 0, #000 28%); }
.paw.pulse { animation: pawPulse 1s infinite; opacity: .95; }
@keyframes pawPulse { 0%,100% { transform: scale(1); filter: drop-shadow(0 0 0 #ffd76a); } 50% { transform: scale(1.35); filter: drop-shadow(0 0 18px #ffd76a); } }
.paw.found { animation: pawFound .9s forwards; pointer-events: none; }
@keyframes pawFound { 0% { transform: scale(1); opacity: 1; filter: drop-shadow(0 0 20px #ffe58a); } 60% { transform: scale(1.8); opacity: 1; filter: drop-shadow(0 0 30px #ffe58a); } 100% { transform: scale(.4) translate(-1600px,-1400px); opacity: 0; } }
.eyes svg { width: 100%; display: block; filter: drop-shadow(0 0 6px #dcff8c); animation: blink 3.4s infinite; transform-origin: 50% 50%; }

/* план музею */
#plan .panel { width: 820px; padding: 22px 40px 26px; text-align: center; }
#plan h2, #ask h2 { margin: 0 0 10px; font-size: 38px; font-weight: 900; color: #5a2a14; }
#plan .pbody svg { width: 732px; height: 600px; display: block; margin: 0 auto; }
#plan .phint { margin-top: 10px; font-size: 26px; font-weight: 800; color: #6b4206; min-height: 36px; }
.room { cursor: pointer; } .room.locked { cursor: default; }
.room.avail .box { animation: roomPulse 1.3s infinite; }
@keyframes roomPulse { 0%,100% { stroke: #e8a530; stroke-width: 6; } 50% { stroke: #ffe08a; stroke-width: 10; } }

/* бонус: розв'язати чи пропустити */
#ask .panel { width: 860px; padding: 36px 50px 40px; text-align: center; }
#ask .aq { font-size: 30px; font-weight: 700; margin: 10px 0 30px; line-height: 1.3; }
#ask .row, #diploma .row { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; }
#ask .btn, #diploma .btn { background: #3d7a3a; color: #fff; box-shadow: 0 5px 0 #24521f; }

/* диплом */
#diploma .panel { padding: 26px 36px 24px; text-align: center; }
.dipl svg { width: 900px; height: 600px; display: block; margin: 0 auto 20px; border-radius: 12px; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
#diploma .dmsg { margin-top: 12px; font-size: 22px; font-weight: 700; color: #6b4206; min-height: 28px; }
.mus .q{font-size:28px;font-weight:700;color:#2b1d12;line-height:1.3;margin-bottom:14px}
.mus #hint{min-height:64px;margin-top:10px;padding:12px 18px;border-radius:16px;background:#fff1d6;border:3px solid #e8b04a;font-size:24px;font-weight:700;color:#6b4206;line-height:1.25;opacity:0;transition:opacity .25s}
.mus #hint.on{opacity:1}
.mus #hint.good{background:#e6f6df;border-color:#5cae4f;color:#2d6a22}
.mus .opts{display:flex;flex-wrap:wrap;gap:18px;justify-content:center;margin-top:10px}
.mus .btn{background:#fff;border:4px solid #c8a165;border-radius:20px;font:900 34px "Nunito",sans-serif;color:#3a2614;padding:14px 34px;cursor:pointer;box-shadow:0 5px 0 #a8834b;transition:background .2s,border-color .2s}
.mus .btn:hover{background:#fff8e6}
.mus .btn:active{transform:translateY(3px);box-shadow:0 2px 0 #a8834b}
.mus .btn.ok{background:#dff3d6;border-color:#4caf50;box-shadow:0 5px 0 #2e7d32}
.mus .btn.bad{background:#fde0dc;border-color:#e0574a;box-shadow:0 5px 0 #b23a2f;animation:mshake .4s}
.mus .btn.primary{background:#3d7a3a;color:#fff;border-color:#2c5c29;box-shadow:0 5px 0 #24521f}
.mus .btn.ghost{background:#efe4cc}
@keyframes mshake{0%,100%{transform:translateX(0)}20%{transform:translateX(-10px)}40%{transform:translateX(10px)}60%{transform:translateX(-7px)}80%{transform:translateX(7px)}}
/* pot puzzle */
.mus #puz{position:relative;width:732px;height:520px;margin:0 auto}
.mus #puzTarget{position:absolute;left:206px;top:84px;width:320px;height:352px}
.mus .shard{position:absolute;left:206px;top:84px;width:320px;height:352px;pointer-events:none;filter:drop-shadow(0 6px 6px rgba(0,0,0,.35));transition:filter .2s}
.mus .shard.drag{filter:drop-shadow(0 16px 14px rgba(0,0,0,.45));z-index:5}
.mus .shard.back{transition:transform .45s ease}
.mus .shard .in{width:100%;height:100%;pointer-events:auto;cursor:grab;touch-action:none}
.mus .shard.placed{filter:none;z-index:0}
.mus .shard.placed .in{pointer-events:none;cursor:default}
.mus #puz.full #puzTarget{animation:glowPot 1.2s ease}
@keyframes glowPot{0%{filter:none}50%{filter:drop-shadow(0 0 30px #ffd76a)}100%{filter:none}}
/* ornament */
.mus .orow{display:flex;gap:10px;justify-content:center;padding:18px;background:#7a3b22;border-radius:18px;border:4px solid #3d1c10;margin:6px auto 18px}
.mus .tile{width:104px;height:104px;border-radius:14px;background:#d58a55;display:flex;align-items:center;justify-content:center;box-shadow:inset 0 0 0 3px rgba(0,0,0,.15)}
.mus .tile.q{background:#fff3df;border:4px dashed #b8743e;font-size:60px;font-weight:900;color:#b8743e}
.mus .tile.q.ok{background:#dff3d6;border:4px solid #4caf50}
.mus .tile svg{width:86px;height:86px}
.mus .obtn{width:126px;height:126px;padding:0;display:flex;align-items:center;justify-content:center;background:#d58a55}
.mus .obtn svg{width:100px;height:100px}
.mus .obtn:hover{background:#e39a66}
.mus .prog{font-size:22px;font-weight:800;color:#8a5a2b;text-align:center}
/* egypt */
.mus .egkey{display:flex;justify-content:center;gap:16px;margin-bottom:10px;flex-wrap:wrap}
.mus .egkey span{display:flex;align-items:center;gap:4px;background:#f1dfb8;border-radius:12px;padding:2px 12px 2px 4px;font-size:22px;font-weight:900;color:#5a3a14}
.mus .egwall{min-height:150px;display:flex;align-items:flex-end;justify-content:center;gap:18px;padding:16px;margin:6px auto 12px;background:#e2c48a;border:5px solid #9c7a45;border-radius:14px;box-shadow:inset 0 0 0 3px rgba(255,255,255,.25)}
.mus .egwall.ok{border-color:#4caf50;background:#e8f2cf}
.mus .egg{display:flex;flex-wrap:wrap;max-width:170px;justify-content:center;align-items:flex-end}
.mus .egph{font-size:22px;font-weight:700;color:#7a5a2e;align-self:center}
.mus .egbtns{display:flex;justify-content:center;gap:14px;margin-bottom:6px}
.mus .egb{display:flex;flex-direction:column;align-items:center;gap:6px}
.mus .eadd{display:flex;flex-direction:column;align-items:center;padding:6px 14px;font-size:20px;background:#f1dfb8}
.mus .edel{font-size:26px;padding:0 22px;line-height:1.3}
/* mesopotamia */
.mus .cutab{min-height:170px;display:flex;align-items:center;justify-content:center;gap:26px;padding:16px 30px;margin:6px auto 12px;width:max-content;min-width:360px;background:#c9a77a;border:6px solid #7a5a35;border-radius:30px;box-shadow:inset 0 0 0 4px rgba(255,255,255,.18),inset 0 -10px 20px rgba(90,58,30,.25)}
.mus .cutab.ok{border-color:#4caf50}
.mus .cugrp{display:flex;gap:4px;align-items:center}
.mus .cucol{display:flex;flex-direction:column}
.mus .cuones{display:grid;grid-template-columns:repeat(3,auto);gap:0 2px}
.mus .lawline{min-height:76px;display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:center;padding:12px;margin:8px 0 16px;background:#c9a77a;border:5px solid #7a5a35;border-radius:18px;font-size:30px;font-weight:800;color:#3a2614}
.mus .lawline.ok{border-color:#4caf50;background:#e3d3a8}
.mus .chips{display:flex;flex-wrap:wrap;gap:12px;justify-content:center}
.mus .chip{font-size:28px;padding:10px 22px}
/* china */
.mus .algo{display:flex;flex-direction:column;gap:8px;margin:6px 0 14px}
.mus .aslot{display:flex;align-items:center;gap:14px;min-height:52px;padding:6px 14px;border-radius:14px;border:3px dashed #b8743e;background:#fff8ea;font-size:23px;font-weight:700;color:#9a8466;transition:background .2s,border-color .2s}
.mus .aslot b{width:36px;height:36px;border-radius:50%;background:#8a3a22;color:#fff;display:flex;align-items:center;justify-content:center;font-size:20px;flex:0 0 auto}
.mus .aslot.full{border-style:solid;color:#3a2614;background:#f6e7c8;cursor:pointer}
.mus .aslot.go{background:#fff1b8;border-color:#e8a530}
.mus .aslot.done{background:#e3f2d6;border-color:#4caf50}
.mus .aslot.err{background:#fde0dc;border-color:#e0574a;animation:mshake .4s}
/* greece */
.mus .chip.pick{background:#fff1b8;border-color:#e8a530;box-shadow:0 5px 0 #b8862a}
.eyes svg{width:100%;display:block;filter:drop-shadow(0 0 6px #dcff8c);animation:blink 3.4s infinite;transform-origin:50% 50%}
@keyframes blink{0%,86%,100%{transform:scaleY(1)}90%{transform:scaleY(.08)}94%{transform:scaleY(1)}}
.mus .podium{display:flex;justify-content:center;align-items:flex-end;gap:14px;margin:10px 0 18px;height:230px}
.mus .pslot{width:140px;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:6px;position:relative}
.mus .pslot span{font-size:26px;font-weight:900;color:#3a2614;min-height:36px}
.mus .pslot b{width:100%;display:flex;align-items:center;justify-content:center;font-size:40px;color:#fff;background:#b9b2a2;border-radius:10px 10px 0 0;border:3px solid #8a7e68}
.mus .pslot.p1 b{height:130px;background:#d9b44a}
.mus .pslot.p2 b{height:100px;background:#b8bcc6}
.mus .pslot.p3 b{height:76px;background:#c98a52}
.mus .pslot.p4 b{height:54px}
.mus .pslot.full{cursor:pointer}
.mus .wreath{position:absolute;top:-62px;width:64px;height:64px}
.mus .wreath svg{width:64px;height:64px}
/* rome + finale */
.keyglow{position:absolute;left:722px;top:0;width:170px;height:140px;border-radius:50%;background:radial-gradient(ellipse at center,rgba(255,246,190,1) 0%,rgba(255,220,110,.85) 35%,rgba(255,220,110,0) 70%);mix-blend-mode:screen;animation:kg 1.3s ease-in-out 4;pointer-events:none}
@keyframes kg{0%,100%{opacity:.45;transform:scale(.9)}50%{opacity:1;transform:scale(1.12)}}
.mus .match{display:flex;gap:26px;justify-content:center;margin-top:6px}
.mus .mcol{display:flex;flex-direction:column;gap:10px;width:340px}
.mus .mh{text-align:center;font-size:22px;font-weight:900;color:#8a5a2b;text-transform:uppercase;letter-spacing:1px}
.mus .mi{font-size:21px;padding:10px 14px;line-height:1.2;position:relative}
.mus .mi.pick{background:#fff1b8;border-color:#e8a530;box-shadow:0 5px 0 #b8862a}
.mus .mi.ok::after{content:attr(data-n);position:absolute;right:-12px;top:-12px;width:28px;height:28px;border-radius:50%;background:#4caf50;color:#fff;font-size:17px;display:flex;align-items:center;justify-content:center}
.dipl svg{width:720px;height:480px;display:block;margin:0 auto;border-radius:12px;box-shadow:0 6px 18px rgba(0,0,0,.25)}
.glint{animation:gl 1.6s ease-in-out infinite;transform-box:fill-box;transform-origin:center}
@keyframes gl{0%,100%{opacity:.35}50%{opacity:1}}
.endscr{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:40px;background:radial-gradient(ellipse at 50% 40%,#3a2d6b 0%,#0d0b18 75%)}
.endscr p{font-size:56px;font-weight:900;color:#ffe3a3;font-style:italic;text-shadow:0 0 30px rgba(255,200,120,.4)}
/* labels */
.mus .labels{display:flex;flex-direction:column;gap:16px;align-items:center;margin-top:8px}
.mus .plank{width:600px;font-size:28px;padding:16px 20px;background:#f1d9a7;border-color:#8a5a2b;box-shadow:0 5px 0 #6b431f;color:#3a2614}