/* «Город открытий»: маленькие действия в местах (gorod-fun.js) — тарелка, чай, мытьё рук, самолётики, радуга, ксилофон, кот,
   экспонат музея, баночка для пробы, градусник, копилка, доклад, собеседование, заявление. Все классы — с приставкой fn-. */
/* карточка игры не «приподнимается» при наведении (общее правило .card:hover из style.css): transform у #gg делает его
   рамкой для position:fixed — и окно .gg-modal прыгает вверх-вниз каждый кадр, когда страница прокручена */
.fn { color: var(--ink); }
/* Отступы задают контейнеры (gap), а не поля отдельных элементов: окно игры лежит в карточке #gg, и правило .card p { margin: 0 }
   из style.css обнуляло поля у <p> (кнопки, подсказка, вопрос) — кнопки поля прилипали к «Пропустить».
   Окно: шапка → поле → подсказка → кнопки, между ними 16 px; внутри поля и в рядах кнопок — --fn-gap (12 px).
   У .btn и .fn-big снизу резкая тень 4 px — между рядами на глаз остаётся 8 px. Нажимаемые элементы не налезают друг на друга. */
.fn { --fn-gap: 12px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.fn-play { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--fn-gap); }
.fn-head { display: flex; gap: 12px; align-items: center; margin: 0; padding-right: 4px; }
.fn-e { flex: none; font-size: 42px; line-height: 1; }
.fn-head b { display: block; font-size: 21px; line-height: 1.2; }
.fn-head small { display: block; color: var(--ink-soft); font-size: 15px; line-height: 1.35; }
.fn-head small b { display: inline; font-size: inherit; color: var(--ink); }
.fn-note { min-height: 1.5em; margin: 0; padding: 9px 12px; border-radius: 14px; background: var(--sky-2); font-size: 16px; line-height: 1.4; }
.fn-note:empty { display: none; }
.fn-note.ok { background: var(--leaf-soft); color: #24502a; }
.fn-note.warn { background: var(--sun-soft); color: #6a4a00; }
.fn-note .fn-say { margin: 0; }
.fn-btns { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--fn-gap); margin: 0; }
.fn-extra { display: contents; }
.fn-skip { min-height: 48px; }
.fn-row { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--fn-gap); margin: 0; }

/* большие кнопки-картинки */
.fn-big { display: inline-grid; justify-items: center; align-content: center; gap: 2px; min-width: 96px; min-height: 76px; padding: 8px 14px;
  border: 2px solid var(--line); border-radius: 18px; background: #fff; color: var(--ink); font: 800 15px/1.2 var(--text); cursor: pointer;
  box-shadow: 0 4px 0 var(--line); transition: transform .12s ease, box-shadow .12s ease; -webkit-tap-highlight-color: transparent; }
.fn-big > span { font-size: 34px; line-height: 1.1; }
.fn-big small { font-size: 14px; font-weight: 800; color: var(--ink-soft); }
.fn-big:hover { transform: translateY(-1px); }
.fn-big:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.fn-big:disabled { opacity: .45; cursor: default; transform: none; box-shadow: 0 2px 0 var(--line); }
.fn-big.fn-small { display: inline-flex; align-items: center; gap: 8px; min-width: 0; min-height: 50px; padding: 6px 18px; border-radius: 999px; }
.fn-big.fn-small > span { font-size: 26px; }
.fn-big.fn-small small { font-size: 16px; color: inherit; }
.fn-big.fn-main { background: var(--water); border-color: var(--water); color: #fff; box-shadow: 0 4px 0 var(--water-deep); }
.fn-big.fn-main small { color: #fff; }
.fn-choose { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--fn-gap); }
.fn-big.fn-ch { min-height: 150px; padding: 14px; }
.fn-big.fn-ch > span { font-size: 54px; }
.fn-big.fn-ch small { font-size: 15px; }
.fn-big.fn-ch small b { display: block; font-size: 18px; color: var(--ink); }

/* реплика хозяина места */
.fn-say { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 10px; }
.fn-npc { flex: none; font-size: 44px; line-height: 1; }
.fn-bub { position: relative; margin: 0; padding: 10px 14px; border-radius: 4px 18px 18px 18px; background: var(--sky-2); font-size: 16px; line-height: 1.4; }
.fn-bub b { display: block; color: var(--water-deep); font-size: 15px; }

/* вопрос с вариантами */
.fn-q { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.35; }
.fn-opts { display: grid; gap: var(--fn-gap); }
.fn-op { min-height: 48px; padding: 10px 14px; border-radius: 14px; border: 2px solid var(--line); background: #fff; color: var(--ink);
  font: 700 16px/1.3 var(--text); text-align: left; cursor: pointer; }
.fn-op:hover:not(:disabled) { border-color: var(--water); }
.fn-op:disabled { cursor: default; }
.fn-op.right { border-color: var(--leaf); background: var(--leaf-soft); }
.fn-op.wrong { border-color: var(--coral); background: var(--coral-soft); }

/* всплывающие надписи и общие движения */
.fn-float { position: absolute; z-index: 3; transform: translate(-50%, -50%); pointer-events: none; font: 900 18px var(--hand); color: var(--water-deep);
  white-space: nowrap; animation: fn-up 1.1s ease-out forwards; }
.fn-bigf { font-size: 56px; }
.fn { position: relative; }
@keyframes fn-up { from { opacity: 0; translate: 0 10px; } 20% { opacity: 1; } to { opacity: 0; translate: 0 -46px; } }
.fn-shake { animation: fn-shake .4s ease; }
@keyframes fn-shake { 20%, 60% { translate: -5px 0; } 40%, 80% { translate: 5px 0; } }
.fn-in { animation: fn-pop .45s ease; }
@keyframes fn-pop { 0% { scale: .2; opacity: 0; } 70% { scale: 1.2; opacity: 1; } 100% { scale: 1; } }
.fn-wob { animation: fn-wob .35s ease; }
@keyframes fn-wob { 30% { rotate: -5deg; } 70% { rotate: 5deg; } }
@keyframes fn-blink { 50% { opacity: .35; } }

/* кафе: тарелка */
.fn-table { display: flex; justify-content: center; align-items: center; gap: 14px; }
.fn-plate { position: relative; flex: none; width: min(230px, 60vw); aspect-ratio: 1; border-radius: 50%; border: 10px solid #fff;
  background: conic-gradient(#fff3d1 0 90deg, #fde2e2 90deg 180deg, #e4f3e0 180deg 360deg);
  box-shadow: 0 0 0 3px var(--line), 0 8px 18px rgba(29, 58, 85, .14); }
.fn-lbl { position: absolute; transform: translate(-50%, -50%); font-size: 11px; font-weight: 900; color: var(--ink-soft); white-space: nowrap; text-transform: uppercase; letter-spacing: .02em; }
.fn-on { position: absolute; transform: translate(-50%, -50%); font-size: clamp(30px, 9vw, 40px); line-height: 1; }
.fn-cutlet { position: absolute; width: 50px; height: 32px; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #b77a45, #7a4a26 70%); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); }
.fn-drink { flex: none; display: grid; place-items: center; width: 54px; height: 72px; border: 3px solid #cfe3f2; border-top: 0; border-radius: 0 0 14px 14px;
  background: rgba(217, 238, 251, .4); font-size: 34px; }
.fn-pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--fn-gap); }
.fn-pick.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fn-food { display: grid; justify-items: center; gap: 2px; min-height: 64px; padding: 6px 2px; border-radius: 16px; border: 2px solid var(--line); background: #fff;
  color: var(--ink); font: 800 13px/1.15 var(--text); cursor: pointer; }
.fn-food span { font-size: 32px; line-height: 1.1; }
.fn-food small { font-size: 13px; color: var(--ink-soft); }
.fn-food:disabled { opacity: .35; cursor: default; }
.fn-food.on { opacity: 1; border-color: var(--leaf); background: var(--leaf-soft); }

/* кафе: чай с лимоном */
.fn-teat { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 18px; min-height: 190px; padding-top: 10px; }
.fn-cupw { position: relative; }
.fn-steam { display: flex; justify-content: center; gap: 14px; height: 54px; transition: opacity .4s ease; }
.fn-steam i { width: 8px; height: 46px; border-radius: 8px; background: linear-gradient(transparent, rgba(160, 180, 200, .55)); animation: fn-steam 1.6s ease-in-out infinite; }
.fn-steam i:nth-child(2) { animation-delay: -.5s; }
.fn-steam i:nth-child(3) { animation-delay: -1s; }
@keyframes fn-steam { 0% { translate: 0 10px; opacity: 0; } 40% { opacity: 1; } 100% { translate: 4px -14px; opacity: 0; } }
.fn-cup { position: relative; width: 130px; height: 104px; border: 6px solid #fff; border-top-width: 4px; border-radius: 0 0 56px 56px; background: #fff; overflow: hidden;
  box-shadow: 0 0 0 3px var(--line), 0 8px 16px rgba(29, 58, 85, .14); }
.fn-cupw::after { content: ""; position: absolute; right: -26px; bottom: 26px; width: 26px; height: 38px; border: 7px solid #fff; border-left: 0; border-radius: 0 22px 22px 0;
  box-shadow: 3px 0 0 var(--line); }
.fn-liq { position: absolute; inset: 10px 0 0; background: #8a4a17; transition: background-color 1.6s ease; }
.fn-liq.light { background: #d9a43f; }
.fn-slice { position: absolute; left: 50%; top: 2px; transform: translateX(-50%); font-size: 32px; animation: fn-pop .5s ease; }
.fn-bun { font-size: 64px; line-height: 1; margin-bottom: 6px; }

/* дом: мытьё рук и стол */
.fn-sink { position: relative; display: grid; justify-items: center; min-height: 170px; padding-top: 4px; border-radius: 22px; background: linear-gradient(#eef7fd, #d9eefb); }
.fn-faucet { display: block; width: 136px; height: auto; margin-top: 6px; }
.fn-drip { width: 8px; height: 24px; margin-top: -2px; border-radius: 8px; background: #7cc0ea; opacity: .8; animation: fn-blink 1s ease-in-out infinite; }
.fn-sink.wet .fn-drip { height: 40px; }
.fn-hands { position: relative; font-size: 74px; line-height: 1; }
.fn-foam { position: absolute; inset: 0; display: none; }
.fn-foam.on { display: block; }
.fn-foam b { position: absolute; width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, .92); box-shadow: inset -3px -3px 0 rgba(124, 192, 234, .4); }
.fn-foam b:nth-child(1) { left: 6%; top: 22%; }
.fn-foam b:nth-child(2) { left: 32%; top: 8%; width: 28px; height: 28px; }
.fn-foam b:nth-child(3) { left: 60%; top: 26%; }
.fn-foam b:nth-child(4) { left: 20%; top: 56%; width: 18px; height: 18px; }
.fn-foam b:nth-child(5) { left: 70%; top: 60%; width: 26px; height: 26px; }
.fn-bar { position: relative; height: 30px; margin: 0 auto; width: 100%; max-width: 420px; border-radius: 999px; background: var(--sky-2); box-shadow: inset 0 0 0 2px var(--line); overflow: hidden; }
.fn-bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, #9ad1f2, var(--water)); border-radius: 999px; transition: width .3s ease; }
.fn-bar span { position: relative; display: block; text-align: center; font-weight: 900; font-size: 15px; line-height: 30px; }
.fn-board { padding: 16px 10px 8px; }
.fn-tbl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 420px; margin: 0 auto; padding: 18px 14px; border-radius: 18px;
  background: #e9c79c; box-shadow: inset 0 -10px 0 #c99e6c, 0 6px 14px rgba(29, 58, 85, .12); }
.fn-spot { display: grid; place-items: center; aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, .7); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .9);
  font-size: clamp(28px, 8vw, 40px); }

/* парк: самолётики */
.fn-hud { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; font-size: 18px; }
.fn-sky { position: relative; height: 250px; border-radius: 18px; overflow: hidden; background: linear-gradient(#bfe3f7, #e7f5fd 70%, #a9d98f 70.5%); touch-action: manipulation; }
.fn-cl { position: absolute; font-size: 44px; opacity: .9; pointer-events: none; }
.fn-kids { position: absolute; left: 6px; bottom: 6px; font-size: 32px; pointer-events: none; }
.fn-plane { position: absolute; left: -96px; z-index: 2; width: 84px; height: 56px; padding: 4px 8px; border: 0; background: none; cursor: pointer;
  animation: fn-fly 3.5s linear forwards; -webkit-tap-highlight-color: transparent; }
.fn-plane svg { display: block; width: 100%; height: 100%; animation: fn-bob .7s ease-in-out infinite alternate; filter: drop-shadow(0 3px 2px rgba(29, 58, 85, .2)); }
.fn-pw { fill: #fff; stroke: #5b86ad; stroke-width: 2; stroke-linejoin: round; }
.fn-pb { fill: var(--c, #d9eefb); stroke: #5b86ad; stroke-width: 2; stroke-linejoin: round; }
@keyframes fn-fly { from { transform: translate(0, 0); } to { transform: translate(var(--dx, 500px), var(--dy, 0px)); } }
@keyframes fn-bob { from { translate: 0 -4px; rotate: -4deg; } to { translate: 0 4px; rotate: 3deg; } }
.fn-plane.caught { pointer-events: none; }
.fn-plane.caught svg { animation: fn-catch .45s ease forwards; }
@keyframes fn-catch { 40% { scale: 1.4; opacity: 1; } 100% { scale: .2; opacity: 0; } }
.fn-plane.away { opacity: .3; pointer-events: none; }

/* дом: радуга */
.fn-rain { display: block; width: min(440px, 100%); height: auto; margin: 0 auto; }
.fn-arc { fill: none; stroke: #eef2f6; stroke-width: 13; stroke-linecap: round; transition: stroke .4s ease; }
.fn-arc.next { stroke: #c9d6e2; animation: fn-blink .9s ease-in-out infinite; }
.fn-words { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; min-height: 30px; margin: 0; }
.fn-words span { padding: 3px 9px; border-radius: 999px; background: var(--c); color: #fff; font-weight: 900; font-size: 15px; animation: fn-pop .4s ease; }
.fn-words span.dark { color: #5a4300; }
.fn-pal { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }   /* у кружка рамка 2 px и тень 3 px снизу — на глаз 9 px */
.fn-col { width: 46px; height: 46px; border-radius: 50%; border: 4px solid #fff; background: var(--c); box-shadow: 0 0 0 2px var(--line), 0 3px 0 rgba(29, 58, 85, .15); cursor: pointer; }
.fn-col.used { opacity: .3; cursor: default; }

/* дом: ксилофон */
.fn-xylo { display: flex; justify-content: center; align-items: center; gap: var(--fn-gap); height: 190px; padding: 10px; border-radius: 18px; background: #f3ead9; }
.fn-key { flex: 1 1 0; min-width: 40px; max-width: 66px; height: var(--h); display: grid; align-content: end; justify-items: center; padding: 0 0 10px; border: 0;
  border-radius: 10px; background: var(--c); color: #fff; font: 900 15px var(--text); text-shadow: 0 1px 2px rgba(0, 0, 0, .35); cursor: pointer;
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .15), 0 4px 0 #c9a77a; }
.fn-key.next { outline: 4px solid var(--sun); outline-offset: 2px; animation: fn-blink .9s ease-in-out infinite; }
.fn-hit { animation: fn-hit .3s ease; }
@keyframes fn-hit { 40% { translate: 0 5px; filter: brightness(1.25); } }

/* дом: кот */
.fn-room { position: relative; height: 240px; border-radius: 18px; overflow: hidden; background: linear-gradient(#fde7e2 0 62%, #e9c79c 62%); }
.fn-rug { position: absolute; left: 50%; top: 74%; width: 70%; height: 30%; transform: translate(-50%, -50%); border-radius: 50%; background: #f3b7a8; box-shadow: inset 0 0 0 6px #f6cfc5; }
.fn-cat { position: absolute; transform: translate(-50%, -50%); padding: 6px; border: 0; background: none; cursor: grab; touch-action: none; user-select: none;
  transition: left .35s ease, top .35s ease; -webkit-tap-highlight-color: transparent; }
.fn-cat span { display: block; font-size: 96px; line-height: 1; }
.fn-cat.purr span { animation: fn-purr .12s linear infinite; }
@keyframes fn-purr { 50% { translate: 1px 0; } }
.fn-cat.fn-leap span { animation: fn-leap .4s ease; }
@keyframes fn-leap { 50% { translate: 0 -30px; rotate: -10deg; } }
.fn-bow { position: absolute; transform: translate(-50%, -50%); width: 56px; height: 56px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .75);
  font-size: 34px; cursor: pointer; box-shadow: 0 0 0 4px var(--sun); }
.fn-purr { max-width: none; }

/* музей: экспонат */
.fn-exh { position: relative; height: 240px; border-radius: 18px; background: radial-gradient(circle at 50% 35%, #fffaf2, #f7e6d4 70%); overflow: hidden; }
.fn-ped { position: absolute; left: 50%; bottom: 0; width: 46%; height: 52px; transform: translateX(-50%); border-radius: 10px 10px 0 0; background: #e5d4bb;
  box-shadow: inset 0 8px 0 #efe2cf; }
.fn-ex { position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%); font-size: 130px; line-height: 1; filter: drop-shadow(0 6px 6px rgba(29, 58, 85, .2)); }
.fn-det { position: absolute; transform: translate(-50%, -50%); display: grid; place-items: center; width: 62px; height: 62px; padding: 0; border: 0; border-radius: 50%;
  background: #fff; color: var(--ink); font: 900 18px var(--text); cursor: pointer; box-shadow: 0 0 0 4px var(--sun), 0 4px 10px rgba(29, 58, 85, .2); animation: fn-glow 1.6s ease-in-out infinite; }
.fn-det span { font-size: 28px; line-height: 1; }
.fn-det span:not(:only-child) { font-size: 22px; }
.fn-det i { position: absolute; right: 0; bottom: 0; font-style: normal; font-size: 22px; line-height: 1; }   /* лупа — в углу кнопки, не за её краем */
.fn-det.seen { animation: none; box-shadow: 0 0 0 4px var(--leaf); }
.fn-det.seen i { display: none; }
@keyframes fn-glow { 50% { box-shadow: 0 0 0 8px rgba(246, 191, 60, .5), 0 4px 10px rgba(29, 58, 85, .2); } }
.fn-facts { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.fn-facts:empty { display: none; }
.fn-facts li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: #fff8ee; box-shadow: inset 0 0 0 2px #f1e2cb; animation: fn-fade .35s ease; }
@keyframes fn-fade { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
.fn-facts li > span { flex: none; min-width: 32px; font-size: 26px; font-weight: 900; line-height: 1.1; text-align: center; }
.fn-facts p { margin: 0; font-size: 16px; line-height: 1.4; }

/* река и родник: баночка */
.fn-src { position: relative; height: 270px; border-radius: 18px; overflow: hidden; background: linear-gradient(#bfe3f7 0 55%, #a9d98f 55%); }
.fn-src.river { background: linear-gradient(#bfe3f7 0 40%, #7cc0ea 40% 70%, #cfe9c0 70%); }
.fn-src.spring { background: linear-gradient(#dcebd8 0 45%, #bcdca6 45%); }
.fn-spout { position: absolute; left: 50%; top: 6px; width: 200px; height: auto; transform: translateX(-50%); }
.fn-src.river .fn-spout { width: 172px; }
.fn-stream { position: absolute; left: 50%; top: 50px; width: 10px; height: 64px; transform: translateX(-50%) scaleY(0); transform-origin: top; border-radius: 6px;
  background: linear-gradient(#9fd3f2, #5aaee0); transition: transform .15s ease; }
.fn-src.pouring .fn-stream { transform: translateX(-50%) scaleY(1); }
.fn-jar { position: absolute; left: 50%; bottom: 14px; width: 120px; height: 150px; transform: translateX(-50%); padding: 0; border: 5px solid #9cc3df; border-top-width: 3px;
  border-radius: 14px 14px 24px 24px; background: rgba(255, 255, 255, .85); overflow: hidden; cursor: default; }
.fn-lid { position: absolute; inset: 0 0 auto; height: 8px; background: rgba(156, 195, 223, .5); }
.fn-w { position: absolute; inset: auto 0 0; height: 0; background: linear-gradient(rgba(124, 192, 234, .75), rgba(43, 143, 214, .75)); }
.fn-src.spring .fn-w { background: linear-gradient(rgba(190, 228, 248, .8), rgba(124, 192, 234, .8)); }
.fn-mark { position: absolute; left: 0; right: 0; bottom: 75%; border-top: 3px dashed #e8504a; }
.fn-mark b { position: absolute; right: 4px; top: -20px; font-size: 12px; font-weight: 900; color: #c0392b; }
.fn-tag { position: absolute; left: 10px; right: 10px; top: 46%; transform: translateY(-50%); padding: 6px 4px; border-radius: 6px; background: #fffbe6;
  box-shadow: 0 2px 4px rgba(29, 58, 85, .2); font: 700 14px/1.25 var(--hand); color: var(--ink); }
.fn-jar.ready { cursor: pointer; box-shadow: 0 0 0 6px var(--sun); animation: fn-glowj 1.2s ease-in-out infinite; }
@keyframes fn-glowj { 50% { box-shadow: 0 0 0 10px rgba(246, 191, 60, .45); } }
.fn-jar.spill { animation: fn-shake .4s ease 2; }
.fn-hold { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; min-width: 180px; }
.fn-hold:active:not(:disabled) { background: var(--sky); }
.fn-big[hidden] { display: none; }

/* медпункт: градусник */
.fn-med { display: flex; justify-content: center; align-items: center; gap: 16px; }
.fn-th { flex: none; width: 88px; height: auto; }
.fn-th-col { transform-box: fill-box; transform-origin: 50% 100%; transition: transform 2s ease-out; }
.fn-medr { position: relative; flex: 1 1 auto; max-width: 380px; display: grid; gap: 8px; justify-items: stretch; }
.fn-tval { font: 900 38px var(--text); color: #c0392b; text-align: center; }
.fn-medq { display: grid; gap: var(--fn-gap); justify-items: center; }
.fn-medq .fn-opts { width: 100%; }
.fn-medq .fn-q { font-size: 17px; }
.fn-medq .fn-row { position: relative; }
.fn-beat { animation: fn-beat .35s ease; }
@keyframes fn-beat { 30% { scale: 1.15; } 60% { scale: .95; } }
.fn-cure { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--fn-gap); }
.fn-cure .fn-food { min-height: 92px; padding: 8px 4px; }

/* банк: копилка */
.fn-bank { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px; }
.fn-pocket { flex: 1 1 240px; max-width: 380px; padding: 10px; border-radius: 18px; background: #e8eef7; box-shadow: inset 0 0 0 3px #cfd9e8; }
.fn-pocket > b { display: block; margin-bottom: 6px; font-size: 16px; }
.fn-coins { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--fn-gap); min-height: 108px; align-content: start; }
.fn-coin { position: relative; display: grid; place-items: center; height: 48px; padding: 0; border: 0; border-radius: 50%; background: none; font-size: 34px; line-height: 1; cursor: pointer;
  transition: transform .45s ease-in, opacity .3s ease .25s; }
.fn-coin small { position: absolute; right: 0; bottom: 0; min-width: 20px; padding: 1px 4px; border-radius: 999px; background: var(--ink); color: #fff; font: 900 11px var(--text); }
.fn-coin.fly { transform: translate(var(--tx, 0), var(--ty, 0)) scale(.4); opacity: 0; cursor: default; }
.fn-coin.gone { visibility: hidden; }   /* монетка улетела: клетка в кармане остаётся пустой, ряд не сдвигается */
.fn-coinfly { position: absolute; z-index: 3; pointer-events: none; }   /* летящая картинка монетки — не кнопка, над окном */
.fn-coin.got { cursor: default; transition: transform .45s cubic-bezier(.3, 1.4, .6, 1); }
.fn-pig { position: relative; display: grid; justify-items: center; width: 130px; padding: 6px; border: 0; border-radius: 22px; background: #fbe3ef; cursor: pointer; }
.fn-pig span { font-size: 82px; line-height: 1; }
.fn-pign { font-size: 15px; }
.fn-pig.fn-tapme { animation: fn-glowp 1.2s ease-in-out infinite; }
@keyframes fn-glowp { 50% { box-shadow: 0 0 0 7px rgba(246, 191, 60, .6); } }
.fn-jig { animation: fn-jig .4s ease; }
@keyframes fn-jig { 25% { rotate: -8deg; } 50% { rotate: 6deg; scale: 1.06; } 75% { rotate: -3deg; } }

/* Дворец науки: доклад */
.fn-poster { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 64px; margin: 0; padding: 8px 12px; border-radius: 14px;
  background: #fff; box-shadow: inset 0 0 0 3px #f1c6db; }
.fn-poster > b { font-size: 15px; color: #a0457a; }
.fn-pins { display: flex; flex-wrap: wrap; gap: 6px; font-size: 32px; line-height: 1; }
.fn-pins small { font-size: 14px; color: var(--ink-soft); }
.fn-diary { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--fn-gap); }
.fn-dc { position: relative; display: grid; justify-items: center; gap: 2px; min-height: 96px; padding: 8px 6px; border-radius: 16px; border: 2px solid var(--line);
  background: #fff; color: var(--ink); font: 800 14px/1.2 var(--text); cursor: pointer; }
.fn-dc span { font-size: 32px; line-height: 1.1; }
.fn-dc small { font-size: 12px; font-weight: 900; }
.fn-dc.new { border-color: #f1c6db; background: #fff7fb; }
.fn-dc.new small { color: #a0457a; }
.fn-dc.old { opacity: .55; }
.fn-dc.on { opacity: .35; border-color: var(--leaf); cursor: default; }
.fn-stage { position: relative; height: 270px; border-radius: 18px; overflow: hidden; background: linear-gradient(#fbe3ef 0 72%, #c98a4b 72%); }
.fn-hero { position: absolute; left: 6%; bottom: 52px; height: 170px; width: auto; transform-origin: 50% 100%; }
.fn-hero.fn-bowing { animation: fn-bow .9s ease; }
@keyframes fn-bow { 40%, 60% { rotate: 14deg; } }
.fn-easel { position: absolute; right: 6%; top: 18px; display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 4px; width: 38%; min-height: 96px;
  padding: 8px; border-radius: 8px; background: #fff; box-shadow: 0 0 0 4px #b8875a; font-size: 30px; line-height: 1; }
.fn-speech { position: absolute; left: 36%; right: 4%; top: 128px; margin: 0; padding: 8px 12px; border-radius: 16px 16px 16px 4px; background: #fff;
  box-shadow: 0 3px 10px rgba(29, 58, 85, .15); font-size: 16px; line-height: 1.3; }
.fn-speech:empty { display: none; }
.fn-hall { position: absolute; left: 0; right: 0; bottom: 6px; display: flex; justify-content: center; gap: 4px; font-size: 32px; line-height: 1; }
.fn-stage .fn-float { color: #fff; text-shadow: 0 1px 3px rgba(29, 58, 85, .6); }
.fn-stage.clap .fn-hall span { animation: fn-clap .5s ease-in-out infinite alternate; }
.fn-stage.clap .fn-hall span:nth-child(2n) { animation-delay: -.25s; }
@keyframes fn-clap { to { translate: 0 -8px; } }

/* собеседование и заявление */
.fn-iv { display: grid; gap: var(--fn-gap); }
.fn-paper { position: relative; width: 100%; max-width: 470px; margin: 0 auto; padding: 18px 18px 14px; border-radius: 6px; background: #fffdf6;
  box-shadow: 0 0 0 2px #efe5d5, 0 8px 18px rgba(29, 58, 85, .12); font-size: 16px; line-height: 1.45; }
.fn-paper p { margin: 0 0 8px; }
.fn-pt { display: block; margin-bottom: 8px; text-align: center; letter-spacing: .16em; font-size: 18px; }
.fn-fine { color: var(--ink-soft); font-size: 14px; }
.fn-sign { position: relative; display: block; width: 100%; min-height: 64px; margin-top: 6px; padding: 0 8px; border: 0; border-bottom: 3px dashed var(--ink-soft);
  background: var(--sky-2); color: var(--water-deep); font: 800 16px var(--text); cursor: pointer; border-radius: 10px 10px 0 0; animation: fn-blink 1.4s ease-in-out infinite; }
.fn-sign.on { animation: none; background: none; cursor: default; }
.fn-sign .fn-sig { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; font: 400 36px/1 var(--hand); color: #1f4e9c; }
.fn-sign.on .fn-sl { visibility: hidden; }
.fn-sign.on .fn-sig { display: flex; animation: fn-write 1s steps(12, end) both; }
.fn-sig::after { content: ""; width: 34px; height: 14px; margin-left: 4px; border-bottom: 3px solid #1f4e9c; border-radius: 0 0 30px 6px; rotate: -12deg; }
@keyframes fn-write { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.fn-stamp { position: absolute; right: 12px; bottom: 22px; padding: 6px 12px; border: 4px solid #d23b3b; border-radius: 12px; color: #d23b3b; font: 900 20px var(--text);
  letter-spacing: .08em; rotate: -14deg; opacity: .85; }
.fn-stamped { animation: fn-stamp .35s ease-out; }
@keyframes fn-stamp { from { scale: 2.4; opacity: 0; } to { scale: 1; opacity: .85; } }

@media (max-width: 600px) {
  .fn-head { gap: 10px; }
  .fn-e { font-size: 36px; }
  .fn-head b { font-size: 19px; }
  .fn-big { min-width: 84px; padding: 8px 10px; }
  .fn-big.fn-ch { min-height: 130px; }
  .fn-sky { height: 220px; }
  .fn-room, .fn-exh { height: 220px; }
  .fn-ex { font-size: 110px; }
  .fn-det { width: 56px; height: 56px; }
  .fn-cat span { font-size: 84px; }
  .fn-table { gap: 8px; }
  .fn-drink { width: 46px; height: 62px; font-size: 28px; }
  .fn-xylo { gap: 8px; padding: 8px 0; height: 170px; }   /* 7 пластинок в ряд — самое тесное место: 8 px, пластинки во всю ширину (на 390 px — 40 px) */
  .fn-key { min-width: 0; font-size: 14px; }
  .fn-key.next { outline-offset: -4px; }   /* жёлтая рамка — внутри пластинки, не за краем ксилофона */
  .fn-food { padding: 6px 0; }
  .fn-food small { font-size: 12px; }   /* «картошка», «брокколи» в четыре столбца на 360 px */
  .fn-med { gap: 8px; }
  .fn-th { width: 72px; }
  .fn-tval { font-size: 30px; }
  .fn-cure { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fn-col { width: 42px; height: 42px; border-width: 3px; }
  .fn-lbl { font-size: 10px; }
  .fn-diary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fn-hero { height: 140px; bottom: 50px; left: 3%; }
  .fn-speech { left: 30%; top: 124px; font-size: 15px; }
  .fn-hall { font-size: 26px; }
  .fn-pig { width: 116px; }
  .fn-pig span { font-size: 70px; }
}
