/* Мурко і Сніжок. Знайомство: передній план, написи на табличках, спека, бризки, «Ш-ш-ш!», лист і оголошення.
   Загальні стилі — у engine/engine.css. */
@font-face { font-family: "Nunito"; font-weight: 600; 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: 800; 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: 600; src: url(fonts/nunito-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2190-21FF, U+2212, U+25B6; }
@font-face { font-family: "Nunito"; font-weight: 800; src: url(fonts/nunito-latin-800-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2190-21FF, U+2212, U+25B6; }
html, body { font-weight: 600; background: #1a1208; }
b, strong, h1, h2, h3 { font-weight: 800; }
#stage { background: #2a1d10; }

#start { background: radial-gradient(ellipse at center, rgba(30,20,8,.15), rgba(20,12,4,.72)); }
#start h1 small { display: block; font-size: 60px; margin-top: 6px; color: #fff; }
#start h2 { text-shadow: 0 2px 10px rgba(0,0,0,.8); }
#dialog .text b { color: #ffe39a; }

/* ---------- шари сцени ---------- */
#deco { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
#front { position: absolute; inset: 0; pointer-events: none; z-index: 4; background-size: cover; background-position: center; display: none; }
#front.on { display: block; }
.char.prop { transition: opacity .35s ease; }

/* написи на табличках: розмір і нахил задає setDeco в app.js (перспектива під кути таблички) */
#deco .kiosk, #deco .rules { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
#deco .kiosk { display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 25px; font-weight: 800; line-height: 1; color: #b4322a; }
#deco .kiosk small { font-size: 15px; color: #6b4a2a; margin-top: 2px; }
/* верхня дошка — заголовок, нижче шва — правила */
#deco .rules { color: #4a2a10; font-size: 17px; line-height: 1.45; }
#deco .rules b { display: block; height: 52px; line-height: 50px; text-align: center; font-size: 21px; color: #7a2410; }
#deco .rules ol { margin: 8px 0 0; padding-left: 28px; }

/* спекотне марево */
#heat { position: absolute; inset: 0; z-index: 6; pointer-events: none; opacity: 0; transition: opacity 1.2s;
  background: radial-gradient(ellipse at 50% -10%, rgba(255,200,80,.42), rgba(255,150,40,.16) 55%, rgba(255,120,20,.05)); mix-blend-mode: multiply; }
#heat.on { opacity: 1; animation: shimmer 2.4s ease-in-out infinite; }
@keyframes shimmer { 50% { filter: brightness(1.08) saturate(1.2); } }

/* бризки */
#fx .drop { position: absolute; width: 16px; height: 22px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 35% 35%, #fff, #8fd0ff 45%, #3d8fd6); animation: drop 1.2s ease-in forwards; }
@keyframes drop { 0% { transform: translateY(-40px) scale(.4); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(170px) scale(1); opacity: 0; } }

/* «Ш-Ш-Ш!» */
#fx .shush { position: absolute; font-size: 74px; font-weight: 900; color: #fff4c8; -webkit-text-stroke: 3px #7a3b10; text-shadow: 0 6px 0 rgba(0,0,0,.3);
  transform: rotate(-8deg); animation: shush 1.3s ease-out forwards; white-space: nowrap; }
@keyframes shush { 0% { transform: rotate(-8deg) scale(.3); opacity: 0; } 25% { transform: rotate(-8deg) scale(1.15); opacity: 1; } 80% { opacity: 1; } 100% { transform: rotate(-8deg) scale(1.05); opacity: 0; } }
.char.wobble img { animation: wobble .6s ease-in-out 2; }
@keyframes wobble { 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }

/* ---------- лист і оголошення ---------- */
#letter { z-index: 45; }
#letter .paper { width: 1040px; max-height: 860px; padding: 48px 76px 34px; position: relative; color: #4a2c10; animation: unroll .6s ease;
  background: radial-gradient(ellipse at 50% 40%, #fbf1d8, #f0dcae 70%, #dcbf85); border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6), inset 0 0 60px rgba(150,100,40,.35); }
@keyframes unroll { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
#letter .ltext { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 32px; line-height: 1.42; }
#letter .ltext p { margin: 0 0 12px; }
#letter .lsign { font-family: Georgia, serif; font-style: italic; font-size: 32px; text-align: right; margin-top: 4px; }
#letter .lnext { display: block; margin: 20px auto 0; }
#letter.note .paper { width: 820px; background: linear-gradient(170deg, #fffbe6, #fff1b8); border-radius: 4px; transform: rotate(-1.5deg); animation: none;
  box-shadow: 0 16px 40px rgba(0,0,0,.55); }
#letter.note .paper::before { content: ''; position: absolute; top: -14px; left: 50%; width: 34px; height: 34px; margin-left: -17px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ff9a8a, #c0392b); box-shadow: 0 4px 6px rgba(0,0,0,.4); }
#letter.note .ltext { font-family: "Comic Sans MS", "Segoe Print", cursive; font-style: normal; font-size: 32px; }
#letter .ltext s { color: #b4322a; text-decoration-thickness: 4px; }
#letter .ltext .ps { font-size: 28px; margin-top: 10px; }

/* грамота на кінцевій картці */
#endcard .cert { width: 900px; margin: 0 auto 30px; padding: 26px 40px; border-radius: 20px; text-align: center; color: #4a2c10;
  background: radial-gradient(ellipse at 50% 40%, #fbf1d8, #f0dcae 75%); box-shadow: 0 16px 40px rgba(0,0,0,.5); border: 6px double #c9933a; }
#endcard .cert .c1 { font-size: 56px; font-weight: 900; color: #b4322a; letter-spacing: 3px; text-transform: uppercase; }
#endcard .cert .c2 { font-size: 34px; margin-top: 6px; }
#endcard .cert .c3 { font-size: 26px; margin-top: 10px; color: #6b4a2a; }
#endcard .cert img { height: 150px; margin: 8px 10px 0; vertical-align: bottom; }
#endcard .t1:empty, #endcard .t2:empty { display: none; }
#letter .ltext .lpic { float: right; height: 210px; margin: -10px -20px 6px 20px; }
/* відступ між завданням і кнопками «Перевірити» / «Показати відповідь» */
#task .body { margin-bottom: 18px; }
#task .order:not(.col) .card { font-size: 32px; padding: 16px 22px; min-width: 150px; }
/* коли всі картки розкладено, порожній лоток не забирає місце в кошиків */
#task .sort .pool:empty { min-height: 0; padding: 0; }
