/* ÉREMKERESŐ (és A PALÁNKVÁR TITKA) – kezelőfelület. Ez a fájl az Éremkereső main.css változatlan másolata; a palánkváras eltérések a palankvar.css-ben vannak. Minden méret az 1920×1080-as logikai vászonhoz igazodik,
   a #ui réteget a main.js méretezi a játékvászonnal együtt. */
:root {
  --parch: #ead9b0;
  --parch-dark: #d3b97f;
  --ink: #2c1e10;
  --ink-soft: #5a4326;
  --gold: #d9b45a;
  --gold-bright: #f4dc97;
  --bronze: #6b4a22;
  --iron: #1f1711;
  --moss: #5d6b3a;
  --ok: #4f7a34;
  --bad: #9b3a26;
  --font: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --boost: 1;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #0d0906; overflow: hidden; font-family: var(--font); color: var(--ink);
  user-select: none; -webkit-user-select: none; touch-action: none; overscroll-behavior: none; }
#game { position: fixed; inset: 0; }
#game canvas { display: block; }
#ui { position: fixed; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; pointer-events: none; overflow: hidden; }
#ui > * { pointer-events: none; }
#ui .live, #ui button, #ui .panel, #ui .modal-back { pointer-events: auto; }

/* ---------- betöltő ---------- */
#boot { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 50;
  background: radial-gradient(ellipse at center, #2a1d11 0%, #0d0906 75%); transition: opacity .6s; }
#boot.hide { opacity: 0; pointer-events: none; }
.boot-box { text-align: center; color: var(--gold); width: min(80vw, 520px); }
.boot-title { font-size: clamp(32px, 6vw, 64px); letter-spacing: .18em; text-shadow: 0 2px 12px #000; }
.boot-sub { font-style: italic; color: #c9b78d; margin: 6px 0 26px; font-size: clamp(14px, 2vw, 22px); }
.boot-bar { height: 12px; border: 1px solid var(--gold); border-radius: 8px; padding: 2px; }
#boot-fill { height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, #8a6a2a, var(--gold-bright)); transition: width .2s; }
#boot-msg { margin-top: 12px; color: #a8966c; font-size: 15px; }

/* ---------- pergamen ---------- */
.parch {
  background-color: var(--parch);
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='320' height='320'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.035' numOctaves='5' seed='7'/><feColorMatrix values='0 0 0 0 .42  0 0 0 0 .27  0 0 0 0 .10  0 0 0 .55 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"),
    radial-gradient(ellipse at 50% 40%, #f3e6c3 0%, #e6d2a2 55%, #c9a96a 100%);
  border: 3px solid #7a5a2c;
  outline: 1px solid rgba(60, 38, 14, .55); outline-offset: -11px;
  border-radius: 10px;
  box-shadow: 0 0 0 2px #2a1b0c, 0 18px 50px rgba(0, 0, 0, .65), inset 0 0 60px rgba(110, 70, 20, .35);
  color: var(--ink);
}
.iron {
  background: linear-gradient(180deg, rgba(48, 36, 24, .94), rgba(22, 16, 10, .96));
  border: 2px solid #86683a; border-radius: 12px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 230, 170, .18);
  color: var(--gold-bright);
}

/* ---------- gombok ---------- */
button { font-family: var(--font); cursor: pointer; }
.btn {
  min-height: calc(84px * var(--boost)); padding: 0 44px; font-size: calc(32px * var(--boost)); letter-spacing: .04em;
  color: var(--gold-bright); border-radius: 12px; border: 2px solid #a5823f;
  background: linear-gradient(180deg, #4a3520 0%, #2a1c0f 100%);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 225, 160, .25), inset 0 -3px 8px rgba(0, 0, 0, .4);
  text-shadow: 0 2px 3px #000; transition: transform .12s, filter .12s, box-shadow .12s;
}
.btn:hover, .btn:focus-visible { filter: brightness(1.2); transform: translateY(-2px); outline: none; box-shadow: 0 0 0 3px rgba(244, 220, 151, .55), 0 8px 20px rgba(0, 0, 0, .6); }
.btn:active { transform: translateY(2px) scale(.98); }
.btn.primary {
  color: #2a1a08; border-color: #f6e2a4; text-shadow: 0 1px 0 rgba(255, 245, 210, .6);
  background: linear-gradient(180deg, #f4dc97 0%, #d2a84c 55%, #a97a2a 100%);
}
.btn.small { min-height: calc(64px * var(--boost)); font-size: calc(25px * var(--boost)); padding: 0 26px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn svg { width: 1.1em; height: 1.1em; vertical-align: -0.18em; margin-right: .35em; fill: currentColor; }

/* ---------- HUD ---------- */
.hud { position: absolute; left: 0; top: 0; right: 0; height: 120px; display: flex; align-items: flex-start; justify-content: flex-end; padding: 22px 28px; }
.hud-left { margin-right: auto; display: flex; align-items: center; gap: 18px; padding: 12px 24px 12px 18px; }
.hud-steps { display: flex; gap: 9px; }
.hud-steps i { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #a5823f; background: #20170e; display: block; transition: all .4s; }
.hud-steps i.done { background: radial-gradient(circle at 35% 30%, #fff3c4, #c9993d 60%, #7a5518); }
.hud-steps i.now { background: radial-gradient(circle at 35% 30%, #fff, #e9d18e 55%, #b98a32); box-shadow: 0 0 14px #f4dc97; transform: scale(1.2); }
.hud-title { font-size: 30px; letter-spacing: .05em; white-space: nowrap; }
.hud-right { display: flex; align-items: center; gap: 12px; }
.hud-score { padding: 10px 26px; font-size: 34px; min-width: 210px; text-align: center; display: flex; align-items: center; gap: 12px; justify-content: center; }
.hud-score small { font-size: 20px; color: #c9b78d; letter-spacing: .08em; }
.hud-score.bump { animation: bump .5s; }
@keyframes bump { 30% { transform: scale(1.18); filter: brightness(1.5); } }
.icon-btn { width: calc(84px * var(--boost)); height: calc(84px * var(--boost)); border-radius: 50%; padding: 0; display: grid; place-items: center;
  color: var(--gold-bright); border: 2px solid #a5823f; background: radial-gradient(circle at 35% 30%, #5a4226, #23170c 75%);
  box-shadow: 0 5px 14px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 225, 160, .3); transition: transform .12s, filter .12s; }
.icon-btn:hover, .icon-btn:focus-visible { filter: brightness(1.3); transform: scale(1.07); outline: none; }
.icon-btn svg { width: 54%; height: 54%; fill: currentColor; }
.icon-btn.off { color: #7d6a48; }
.hidden { display: none !important; }

/* ---------- párbeszéd ---------- */
.modal-back { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(15, 10, 5, .3), rgba(8, 5, 2, .7)); display: flex; align-items: center; justify-content: center; animation: fade .3s; z-index: 20; }
@keyframes fade { from { opacity: 0; } }
.dialog { width: 1080px; max-height: 1010px; padding: 46px 60px 42px; position: relative; animation: unroll .55s cubic-bezier(.2, .9, .3, 1.1); transform-origin: 50% 0; }
.dialog.wide { width: 1420px; }
.dialog.narrow { width: 820px; }
@keyframes unroll { 0% { clip-path: inset(0 0 100% 0); transform: translateY(-40px); opacity: .3; } 100% { clip-path: inset(-60px -60px -80px -60px); transform: none; opacity: 1; } }
.dialog h2 { margin: 0 0 16px; font-size: calc(46px * var(--boost)); font-weight: normal; letter-spacing: .06em; text-align: center; color: #3b2409; }
.dialog h2::after { content: ""; display: block; height: 14px; margin: 12px auto 0; width: 360px;
  background: radial-gradient(circle, #7a5a2c 0 4px, transparent 5px) center / 100% 100% no-repeat, linear-gradient(90deg, transparent, #7a5a2c 20%, #7a5a2c 80%, transparent) center / 100% 2px no-repeat; }
.dialog p { font-size: calc(30px * var(--boost)); line-height: 1.45; margin: 12px 0; text-align: center; }
.dialog p.small { font-size: calc(24px * var(--boost)); color: var(--ink-soft); font-style: italic; }
.dialog .row { display: flex; gap: 40px; align-items: center; }
.dialog .row > .col { flex: 1; }
.dialog .row p { text-align: left; }
.dlg-img { display: block; margin: 6px auto 12px; max-height: 330px; max-width: 100%; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .45)); }
.dlg-img.photo { border: 6px solid #f6efdc; outline: 1px solid #7a5a2c; filter: none; box-shadow: 0 10px 24px rgba(0, 0, 0, .45); border-radius: 4px; }
.linen { background: radial-gradient(ellipse at 50% 45%, #fbf7ec, #e4dccb); border: 6px solid #f6efdc; outline: 1px solid #7a5a2c; box-shadow: 0 10px 24px rgba(0, 0, 0, .4); border-radius: 6px; display: grid; place-items: center; padding: 14px; }
.linen img { max-width: 100%; max-height: 100%; filter: drop-shadow(0 8px 8px rgba(40, 25, 10, .4)); }
.dlg-buttons { display: flex; gap: 22px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.faces { display: flex; gap: 26px; justify-content: center; margin: 8px 0; }
.faces img { width: 250px; height: 250px; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .5)); }
.faces figure { margin: 0; text-align: center; font-size: 22px; color: var(--ink-soft); font-style: italic; }
.exhibit { margin-top: 14px; padding: 12px 20px; border: 2px dashed #7a5a2c; border-radius: 10px; background: rgba(255, 245, 210, .5); font-size: calc(27px * var(--boost)); text-align: center; color: #4a2f0c; }
.exhibit b { color: #7a3d0a; }

/* kvíz */
.options { display: grid; gap: 16px; margin-top: 18px; }
.options.images { grid-template-columns: 1fr 1fr; gap: 30px; }
.opt { min-height: calc(86px * var(--boost)); padding: 12px 26px; font-size: calc(30px * var(--boost)); text-align: left; display: flex; align-items: center; gap: 20px;
  color: var(--ink); border: 2px solid #7a5a2c; border-radius: 12px; background: linear-gradient(180deg, rgba(255, 250, 230, .85), rgba(230, 208, 160, .85));
  box-shadow: 0 4px 10px rgba(60, 35, 10, .3); transition: transform .12s, box-shadow .12s, background .2s; }
.opt:hover, .opt:focus-visible { transform: translateY(-2px); box-shadow: 0 0 0 3px rgba(122, 90, 44, .5), 0 8px 16px rgba(60, 35, 10, .35); outline: none; }
.opt.wrong { background: linear-gradient(180deg, #e3b9a6, #cf9a82); border-color: var(--bad); color: #5c1e10; animation: shake .4s; opacity: .75; pointer-events: none; }
.opt.correct { background: linear-gradient(180deg, #d5e6b4, #a9c97c); border-color: var(--ok); color: #1f3a0e; box-shadow: 0 0 0 4px rgba(79, 122, 52, .45); pointer-events: none; }
.opt.locked { pointer-events: none; }
.opt.imgopt { flex-direction: column; text-align: center; padding: 18px; justify-content: center; }
.opt.imgopt img { width: 380px; height: 380px; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .45)); }
@keyframes shake { 20% { transform: translateX(-10px); } 40% { transform: translateX(9px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(4px); } }
.swatch { width: 58px; height: 58px; border-radius: 50%; flex: none; border: 2px solid rgba(40, 25, 10, .6); box-shadow: inset -6px -8px 12px rgba(0, 0, 0, .35), inset 5px 6px 10px rgba(255, 255, 255, .5); }
.swatch.ezust { background: radial-gradient(circle at 35% 30%, #fff, #c9ccd1 45%, #7e838b); }
.swatch.arany { background: radial-gradient(circle at 35% 30%, #fff6c9, #e8c043 45%, #9a7414); }
.swatch.bronz { background: radial-gradient(circle at 35% 30%, #e9c9a0, #a8713a 45%, #5e3a17); }
.swatch.fa { background: repeating-linear-gradient(100deg, #8a5a2c 0 7px, #6e431d 7px 12px); border-radius: 10px; }
.swatch.ko { background: radial-gradient(circle at 35% 30%, #cfcabf, #8d877a 50%, #55514a); border-radius: 38% 55% 45% 60%; }
.feedback { min-height: 44px; margin-top: 16px; font-size: calc(28px * var(--boost)); text-align: center; }
.feedback.bad { color: var(--bad); font-style: italic; }
.feedback.good { color: #2e4d17; }
.points-fly { position: absolute; font-size: 54px; color: var(--gold-bright); text-shadow: 0 0 12px #000, 0 3px 4px #000; pointer-events: none; animation: fly 1.5s ease-out forwards; z-index: 40; font-weight: bold; }
@keyframes fly { 0% { transform: translateY(0) scale(.6); opacity: 0; } 20% { opacity: 1; transform: translateY(-30px) scale(1.15); } 100% { transform: translateY(-160px) scale(1); opacity: 0; } }

/* beállítások */
.setting { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 14px 6px; font-size: calc(32px * var(--boost)); border-bottom: 1px solid rgba(122, 90, 44, .4); }
.toggle { width: 150px; min-height: calc(70px * var(--boost)); border-radius: 40px; border: 2px solid #7a5a2c; font-size: 24px; background: #b9a57a; color: #3b2409; position: relative; transition: background .2s; }
.toggle.on { background: linear-gradient(180deg, #a9c97c, #6f9a45); color: #14280a; }

/* toast */
.toast { position: absolute; left: 50%; bottom: 210px; transform: translateX(-50%); padding: 18px 38px; font-size: calc(30px * var(--boost)); max-width: 1200px; text-align: center; animation: toastIn .55s ease-out; z-index: 15; }
@keyframes toastIn { from { opacity: 0; } }

/* alsó műveletsáv */
.actions { position: absolute; right: 36px; bottom: 34px; display: flex; gap: 18px; align-items: flex-end; z-index: 5; }
.actions.center { right: auto; left: 50%; transform: translateX(-50%); }
.actions.top { bottom: auto; top: 132px; right: 28px; align-items: flex-start; }
.btn.pulse { animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 12px rgba(244, 220, 151, 0), 0 0 34px rgba(244, 220, 151, .9); filter: brightness(1.15); } }

/* ---------- főmenü ---------- */
.menu-title { position: absolute; top: 70px; left: 0; right: 0; text-align: center; color: var(--gold-bright); animation: titleIn 1.4s ease-out; }
@keyframes titleIn { from { opacity: 0; transform: translateY(-30px); letter-spacing: .5em; } }
.menu-title .mus { font-size: 26px; letter-spacing: .32em; color: #e9dcb8; text-shadow: 0 2px 8px #000; }
.menu-title h1 { margin: 6px 0 0; font-size: 122px; font-weight: normal; letter-spacing: .14em; line-height: 1;
  /* két háttérréteg a betűkbe vágva: felül a 45 fokban dőlt fénycsík, amely kb. 18 másodpercenként átlósan, fentről lefelé suhan át a feliraton, alatta az arany színátmenet */
  background: linear-gradient(135deg, rgba(255,255,255,0) 36%, rgba(255,252,235,.5) 45%, rgba(255,255,255,.98) 50%, rgba(255,252,235,.5) 55%, rgba(255,255,255,0) 64%) no-repeat -82% 0 / 45% 100%,
    linear-gradient(180deg, #fff3c4 10%, #e3bd5c 50%, #9a6f22 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: titleShine 18s linear 3s infinite;
  filter: drop-shadow(0 6px 4px rgba(0, 0, 0, .85)) drop-shadow(0 0 30px rgba(0, 0, 0, .6)); }
.menu-title .sub { font-size: 38px; font-style: italic; color: #f1e6c8; text-shadow: 0 3px 10px #000, 0 0 30px #000; margin-top: 72px; }   /* a templom keresztje a főcím és az alcím között látszik */
.menu-buttons { position: absolute; bottom: 62px; left: 0; right: 0; display: flex; gap: 20px; justify-content: center; align-items: center; animation: fade 1.2s .4s both; }
.menu-buttons .btn { min-height: calc(62px * var(--boost)); font-size: calc(25px * var(--boost)); padding: 0 26px; }
.menu-buttons .btn.primary { min-height: calc(82px * var(--boost)); font-size: calc(33px * var(--boost)); padding: 0 58px; }
.menu-best { position: absolute; left: 36px; bottom: 30px; padding: 12px 22px; font-size: 22px; color: #e9dcb8; }
.levels { position: absolute; left: 0; right: 0; bottom: 60px; display: flex; gap: 34px; justify-content: center; align-items: stretch; }
.level-card { width: 460px; padding: 28px 30px 30px; text-align: center; cursor: pointer; font-family: var(--font); transition: transform .15s, box-shadow .15s; animation: unroll .5s both; }
.level-card:nth-child(2) { animation-delay: .1s; } .level-card:nth-child(3) { animation-delay: .2s; }
.level-card:hover, .level-card:focus-visible { transform: translateY(-10px) scale(1.03); outline: none; box-shadow: 0 0 0 4px var(--gold-bright), 0 24px 50px rgba(0, 0, 0, .7); }
.level-card .medal { width: 110px; height: 110px; margin: 0 auto 10px; border-radius: 50%; border: 3px solid rgba(40, 25, 10, .6); box-shadow: inset -10px -14px 20px rgba(0, 0, 0, .35), inset 8px 10px 16px rgba(255, 255, 255, .55), 0 6px 12px rgba(0, 0, 0, .4); display: grid; place-items: center; font-size: 46px; color: rgba(40, 25, 10, .75); }
.medal.bronz { background: radial-gradient(circle at 35% 30%, #f0cfa4, #b0763c 50%, #643d18); }
.medal.ezust { background: radial-gradient(circle at 35% 30%, #fff, #c5c9cf 50%, #7b8088); }
.medal.arany { background: radial-gradient(circle at 35% 30%, #fff6c9, #e6bd3f 50%, #96700f); }
.level-card h3 { margin: 0; font-size: 46px; font-weight: normal; letter-spacing: .1em; color: #3b2409; }
.level-card .age { font-size: 30px; color: #7a3d0a; margin: 2px 0 10px; }
.level-card p { font-size: 25px; margin: 0; line-height: 1.35; color: var(--ink-soft); }
.level-card .best { margin-top: 12px; font-size: 22px; color: #5d6b3a; }
.levels-back { position: absolute; left: 36px; bottom: 34px; }

/* ---------- történet ---------- */
.story { position: absolute; left: 50%; bottom: 60px; transform: translateX(-50%); width: 1300px; padding: 34px 56px 30px; animation: unroll .6s; }
.story h2 { margin: 0 0 6px; font-weight: normal; font-size: 46px; color: #3b2409; letter-spacing: .04em; }
.story p { font-size: 33px; line-height: 1.45; margin: 8px 0 20px; }
.story .dlg-buttons { justify-content: space-between; margin-top: 6px; }
.story .dots { display: flex; gap: 10px; align-items: center; }
.story .dots i { width: 14px; height: 14px; border-radius: 50%; background: #b9a57a; display: block; }
.story .dots i.on { background: #7a3d0a; transform: scale(1.3); }

/* ---------- detektor kijelző ---------- */
.meter { position: absolute; left: 28px; top: 132px; width: 500px; padding: 16px 22px 18px; }
.meter .cap { display: flex; justify-content: space-between; font-size: 24px; letter-spacing: .1em; color: #c9b78d; margin-bottom: 8px; }
.meter .cap b { color: var(--gold-bright); font-weight: normal; font-size: 30px; }
.meter .bar { display: flex; gap: 6px; height: 54px; align-items: flex-end; }
.meter .bar i { flex: 1; border-radius: 4px; background: #2e2418; border: 1px solid #5a4326; height: 30%; transition: background .08s, box-shadow .08s; }
.meter .bar i.on { box-shadow: 0 0 12px currentColor; background: currentColor; }
.taskline { position: absolute; top: 132px; left: 50%; transform: translateX(-50%); padding: 14px 34px; font-size: calc(30px * var(--boost)); max-width: 1300px; text-align: center; animation: toastIn .55s ease-out; }

/* ---------- talajmetszet ---------- */
.layer-labels { position: absolute; left: 96px; top: 0; }
.layer-labels span { position: absolute; left: 0; white-space: nowrap; font-size: 24px; font-style: italic; color: #f1e6c8; text-shadow: 0 2px 4px #000; letter-spacing: .04em; opacity: .85; }
.find-count { position: absolute; left: 36px; bottom: 34px; padding: 14px 26px; font-size: 28px; }

/* ---------- érmevizsgálat ---------- */
.coin-panel { position: absolute; right: 60px; top: 160px; width: 640px; padding: 34px 40px 30px; animation: unroll .6s; }
.coin-panel h2 { margin: 0 0 10px; font-size: 40px; font-weight: normal; text-align: center; color: #3b2409; letter-spacing: .04em; }
.coin-panel .task { font-size: calc(30px * var(--boost)); line-height: 1.4; min-height: 170px; margin: 14px 0; }
.coin-panel .task b { color: #7a3d0a; }
.checklist { list-style: none; margin: 0; padding: 0; font-size: 26px; }
.checklist li { padding: 7px 0 7px 46px; position: relative; color: var(--ink-soft); border-top: 1px solid rgba(122, 90, 44, .35); }
.checklist li::before { content: ""; position: absolute; left: 4px; top: 9px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #7a5a2c; }
.checklist li.now { color: var(--ink); font-weight: bold; }
.checklist li.done { color: #4f7a34; }
.checklist li.done::before { background: #4f7a34; border-color: #2e4d17; box-shadow: inset 0 0 0 5px #d5e6b4; }
.coin-buttons { display: flex; gap: 14px; margin-top: 18px; justify-content: center; }
.side-tag { position: absolute; left: 640px; top: 965px; transform: translateX(-50%); padding: 10px 30px; font-size: 28px; letter-spacing: .12em; }

/* ---------- rejtvények ---------- */
.puzzle { position: absolute; left: 50%; top: 150px; transform: translateX(-50%); width: 1760px; padding: 30px 50px 34px; animation: unroll .6s; }
.puzzle h2 { margin: 0; font-size: 44px; font-weight: normal; text-align: center; color: #3b2409; letter-spacing: .05em; }
.puzzle .lead { font-size: calc(28px * var(--boost)); text-align: center; margin: 8px 0 18px; line-height: 1.35; }
.order-row { display: flex; justify-content: center; align-items: stretch; gap: 26px; position: relative; padding: 10px 0 0; }
.order-arrow { height: 50px; margin: 0 80px 0; position: relative; font-size: 24px; font-style: italic; color: var(--ink-soft); display: flex; justify-content: space-between; align-items: center; }
.order-arrow::before { content: ""; position: absolute; left: 180px; right: 180px; top: 50%; height: 3px; background: linear-gradient(90deg, #7a5a2c, #7a5a2c) ; }
.order-arrow::after { content: ""; position: absolute; right: 172px; top: 50%; margin-top: -10px; border: 10px solid transparent; border-left: 18px solid #7a5a2c; }
.slot { width: 330px; padding: 14px 10px 12px; text-align: center; border: 3px dashed rgba(122, 90, 44, .7); border-radius: 16px; background: rgba(255, 248, 225, .45); cursor: pointer; font-family: var(--font); color: var(--ink); transition: transform .15s, box-shadow .15s, background .2s; position: relative; }
.slot img { width: 270px; height: 270px; display: block; margin: 0 auto; filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .45)); transition: transform .2s; pointer-events: none; }
.slot:hover img, .slot:focus-visible img { transform: scale(1.04); }
.slot:focus-visible { outline: 3px solid #7a3d0a; }
.slot.sel { background: rgba(244, 220, 151, .8); border-style: solid; border-color: #7a3d0a; transform: translateY(-12px); box-shadow: 0 16px 26px rgba(60, 35, 10, .4); }
.slot.bad { border-color: var(--bad); background: rgba(207, 154, 130, .5); animation: shake .4s; }
.slot.good { border-color: var(--ok); border-style: solid; background: rgba(169, 201, 124, .5); }
.slot .lbl { font-size: 26px; min-height: 36px; margin-top: 6px; color: #4a2f0c; }
.slot .zoom { position: absolute; right: 8px; top: 8px; width: 60px; height: 60px; border-radius: 50%; border: 2px solid #7a5a2c; background: rgba(255, 248, 225, .9); display: grid; place-items: center; color: #4a2f0c; }
.slot .zoom svg { width: 30px; height: 30px; fill: currentColor; }
.pair-grid { display: grid; gap: 18px 22px; justify-content: center; }
.pair-coin { width: var(--pw, 250px); padding: 10px; border: 3px solid transparent; border-radius: 16px; background: none; cursor: pointer; position: relative; transition: transform .15s, background .2s; }
.pair-coin img { width: calc(var(--pw, 250px) - 40px); height: calc(var(--pw, 250px) - 40px); display: block; margin: auto; filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .45)); pointer-events: none; }
.pair-coin.sel { background: rgba(244, 220, 151, .8); border-color: #7a3d0a; transform: translateY(-8px); }
.pair-coin.done, .pair-label.done { pointer-events: none; }
.pair-coin.done img { filter: drop-shadow(0 0 10px #4f7a34) saturate(.8); }
.pair-coin .badge, .pair-label .badge { position: absolute; left: 6px; top: 6px; width: 50px; height: 50px; border-radius: 50%; background: #4f7a34; color: #fff; font-size: 28px; display: grid; place-items: center; border: 2px solid #d5e6b4; }
.pair-label { min-height: 110px; width: var(--pw, 250px); padding: 10px 14px; font-family: var(--font); font-size: calc(26px * var(--boost)); line-height: 1.2; color: var(--ink); border: 2px solid #7a5a2c; border-radius: 12px; cursor: pointer; position: relative;
  background: linear-gradient(180deg, rgba(255, 250, 230, .9), rgba(230, 208, 160, .9)); box-shadow: 0 4px 10px rgba(60, 35, 10, .3); transition: transform .12s; }
.pair-label:hover, .pair-label:focus-visible { transform: translateY(-3px); outline: none; box-shadow: 0 0 0 3px rgba(122, 90, 44, .5); }
.pair-label.done { background: linear-gradient(180deg, #d5e6b4, #a9c97c); border-color: var(--ok); padding-left: 60px; }
.pair-label.bad { animation: shake .4s; border-color: var(--bad); }
.pair-label.hint { box-shadow: 0 0 0 5px rgba(244, 220, 151, 1), 0 0 30px #f4dc97; }
.pair-label.legend { letter-spacing: .06em; font-size: calc(23px * var(--boost)); }
.zoom-view { display: flex; gap: 40px; justify-content: center; }
.zoom-view img { width: 560px; height: 560px; filter: drop-shadow(0 14px 16px rgba(0, 0, 0, .5)); }

/* ---------- bizonyítvány ---------- */
.cert-wrap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding-top: 70px; }
.cert { position: relative; width: 1280px; padding: 56px 90px 44px; text-align: center; animation: unroll .9s cubic-bezier(.2, .9, .3, 1.05); }
.cert::before { content: ""; position: absolute; inset: 22px; border: 2px solid #7a5a2c; border-radius: 6px; pointer-events: none;
  background:
    radial-gradient(circle at 0 0, transparent 26px, #7a5a2c 27px 29px, transparent 30px) 0 0 / 60px 60px no-repeat,
    radial-gradient(circle at 100% 0, transparent 26px, #7a5a2c 27px 29px, transparent 30px) 100% 0 / 60px 60px no-repeat,
    radial-gradient(circle at 0 100%, transparent 26px, #7a5a2c 27px 29px, transparent 30px) 0 100% / 60px 60px no-repeat,
    radial-gradient(circle at 100% 100%, transparent 26px, #7a5a2c 27px 29px, transparent 30px) 100% 100% / 60px 60px no-repeat; }
.cert .mus { font-size: 30px; letter-spacing: .3em; color: #5a3a12; }
.cert h1 { font-size: 80px; font-weight: normal; margin: 6px 0 2px; letter-spacing: .1em; color: #3b2409; text-shadow: 0 2px 0 rgba(255, 245, 210, .7); }
.cert .line { font-size: 30px; font-style: italic; margin: 0 0 12px; }
.cert-mid { display: flex; align-items: center; justify-content: center; gap: 60px; margin: 14px 0 10px; }
.seal { width: 250px; height: 250px; position: relative; flex: none; animation: stamp .8s 1s both cubic-bezier(.3, 1.6, .5, 1); }
@keyframes stamp { 0% { transform: scale(3) rotate(-25deg); opacity: 0; } 100% { transform: scale(1) rotate(-6deg); opacity: 1; } }
.seal .disc { position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; text-align: center; color: rgba(40, 25, 10, .8);
  box-shadow: inset -16px -20px 30px rgba(0, 0, 0, .35), inset 12px 14px 24px rgba(255, 255, 255, .55), 0 10px 20px rgba(0, 0, 0, .45);
  border: 6px double rgba(40, 25, 10, .55); font-size: 30px; line-height: 1.15; letter-spacing: .06em; }
.seal .disc b { display: block; font-size: 22px; letter-spacing: .2em; font-weight: normal; margin-bottom: 4px; }
.seal .rib { position: absolute; bottom: -70px; left: 50%; width: 60px; height: 120px; margin-left: -64px; background: #7a2218; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%); transform: rotate(14deg); z-index: -1; }
.seal .rib + .rib { margin-left: 4px; transform: rotate(-14deg); background: #93301f; }
.cert-stats { text-align: left; font-size: 30px; line-height: 1.6; }
.cert-stats b { color: #7a3d0a; font-size: 36px; font-weight: normal; }
.cert-stats .big { font-size: 64px; color: #3b2409; line-height: 1.1; }
.cert .rank { font-size: 46px; letter-spacing: .08em; color: #7a3d0a; margin: 4px 0; }
.cert .date { font-size: 22px; color: var(--ink-soft); margin-top: 4px; }
.record { display: inline-block; padding: 4px 18px; border-radius: 20px; background: #7a2218; color: #fff3c4; font-size: 24px; letter-spacing: .1em; margin-left: 10px; animation: pulse 1.6s infinite; }
.dialog .row.top { align-items: flex-start; }
.dialog .row .side { flex: none; }
.dialog .row.top .col p:first-child { margin-top: 0; }
.dialog .feedback { text-align: left; }
.dialog .row.top .feedback, .dialog .options + .feedback { line-height: 1.35; }

/* éremtisztítás – haladási sáv */
.clean-bar { display: flex; align-items: center; gap: 16px; margin: 14px 0 6px; }
.clean-bar .track { flex: 1; height: 30px; border-radius: 16px; background: rgba(60, 40, 18, .28); border: 2px solid rgba(60, 40, 18, .65); overflow: hidden; box-shadow: inset 0 2px 6px rgba(0, 0, 0, .35); }
.clean-bar i { display: block; height: 100%; width: 0; background: linear-gradient(180deg, #f6e3a0, #d9a93a 55%, #a87a1c); transition: width .15s linear; }
.clean-bar b { min-width: 86px; text-align: right; font-size: 34px; color: #4a2d0e; }

/* ---------- áttetsző pergamen ----------
   A táblák hátterének átlátszatlansága: 1 = teljesen fedő, 0.6 = 40%-ban áttetsző. A bizonyítvány tömör marad. */
:root { --parch-alpha: .6; }
.parch:not(.cert) {
  background-color: transparent;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='320' height='320'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.035' numOctaves='5' seed='7'/><feColorMatrix values='0 0 0 0 .42  0 0 0 0 .27  0 0 0 0 .10  0 0 0 .28 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"),
    radial-gradient(ellipse at 50% 40%, rgba(243, 230, 195, var(--parch-alpha)) 0%, rgba(230, 210, 162, var(--parch-alpha)) 55%, rgba(201, 169, 106, var(--parch-alpha)) 100%);
  -webkit-backdrop-filter: contrast(.42) brightness(1.4) blur(3px);
  backdrop-filter: contrast(.42) brightness(1.4) blur(3px);
  box-shadow: 0 0 0 2px #2a1b0c, 0 18px 50px rgba(0, 0, 0, .65), inset 0 0 60px rgba(110, 70, 20, .22);
  text-shadow: none;
}
.parch:not(.cert) button, .parch:not(.cert) .btn { text-shadow: none; }
.parch:not(.cert) p, .parch:not(.cert) li, .parch:not(.cert) h2, .parch:not(.cert) .task, .parch:not(.cert) .lead, .parch:not(.cert) p.small { color: #140a02; }

/* ---------- oklevél: antikolt papír és viaszpecsét ---------- */
.cert.parch { background: none; border: 0; outline: 0; box-shadow: none; isolation: isolate; }
.cert-paper { position: absolute; inset: 0; z-index: -1; border-radius: 4px;
  filter: url(#cert-rough) drop-shadow(0 20px 28px rgba(0, 0, 0, .7));
  background-color: #d9bf85;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='640' height='640'><filter id='s'><feTurbulence type='fractalNoise' baseFrequency='.009' numOctaves='3' seed='23'/><feColorMatrix values='0 0 0 0 .36  0 0 0 0 .2  0 0 0 0 .06  0 0 0 1.7 -.62'/></filter><rect width='100%25' height='100%25' filter='url(%23s)'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='320' height='320'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.06' numOctaves='5' seed='7'/><feColorMatrix values='0 0 0 0 .36  0 0 0 0 .22  0 0 0 0 .08  0 0 0 .7 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"),
    radial-gradient(circle at 12% 18%, rgba(110, 62, 18, .35) 0 14px, transparent 60px),
    radial-gradient(circle at 86% 70%, rgba(110, 62, 18, .3) 0 10px, transparent 70px),
    radial-gradient(circle at 70% 12%, rgba(96, 54, 14, .22) 0 8px, transparent 46px),
    radial-gradient(circle at 24% 86%, rgba(96, 54, 14, .28) 0 12px, transparent 80px),
    radial-gradient(ellipse at 50% 45%, #efdcab 0%, #dfc38a 48%, #bf9655 78%, #8a5f2b 100%);
  box-shadow: inset 0 0 110px rgba(84, 44, 10, .6), inset 0 0 26px rgba(45, 20, 4, .75); }
.cert::before { border-color: rgba(92, 58, 20, .8); }
.cert .seal { width: 220px; height: 220px; }
.cert .seal .disc { font-size: 27px; }
.cert .exhibit { background: rgba(255, 240, 200, .32); margin-right: 250px; }
.cert .date { margin-right: 250px; margin-top: 60px; }
.cert .rank { margin: 40px 250px 0 0; }
.wax { position: absolute; right: 70px; bottom: 26px; width: 210px; height: 210px; animation: stamp .8s 1.5s both cubic-bezier(.3, 1.6, .5, 1); }
.wax .cord { position: absolute; top: 150px; left: 50%; width: 10px; height: 150px; margin-left: -18px; border-radius: 5px; transform-origin: 50% 0; transform: rotate(10deg);
  background: repeating-linear-gradient(52deg, #8e2a1b 0 5px, #d8b25a 5px 10px);
  box-shadow: inset -3px 0 3px rgba(0, 0, 0, .45), inset 2px 0 2px rgba(255, 235, 190, .3), 2px 4px 5px rgba(0, 0, 0, .45); }
.wax .cord + .cord { margin-left: 8px; height: 132px; transform: rotate(-9deg); background: repeating-linear-gradient(-52deg, #8e2a1b 0 5px, #d8b25a 5px 10px); }
.wax .cord::before { content: ""; position: absolute; left: -3px; bottom: -4px; width: 16px; height: 9px; border-radius: 4px; background: linear-gradient(180deg, #f0d48a, #a97a2a); box-shadow: 0 1px 2px rgba(0, 0, 0, .5); z-index: 1; }
.wax .cord::after { content: ""; position: absolute; left: -6px; bottom: -34px; width: 22px; height: 34px; clip-path: polygon(30% 0, 70% 0, 100% 100%, 0 100%);
  background: repeating-linear-gradient(90deg, #7a2114 0 2px, #b8452f 2px 4px, #d8b25a 4px 5px); }
.wax .blob { position: absolute; inset: -6px; filter: url(#wax-rough); border-radius: 47% 53% 51% 49% / 52% 47% 55% 46%;
  background: radial-gradient(circle at 34% 28%, #d1503c 0%, #a52418 34%, #7d150e 68%, #54090a 100%);
  box-shadow: 0 10px 18px rgba(0, 0, 0, .55), inset -10px -14px 22px rgba(40, 0, 0, .55), inset 8px 10px 16px rgba(255, 170, 140, .35); }
.wax .ring { position: absolute; inset: 21px; border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, #b83a29, #8c1a11 60%, #6b100b);
  box-shadow: inset 5px 7px 10px rgba(30, 0, 0, .6), inset -4px -5px 8px rgba(255, 160, 130, .3), 0 0 0 3px rgba(60, 4, 4, .35), 0 0 0 5px rgba(255, 150, 120, .14); }
.wax .logo { position: absolute; inset: 21px; border-radius: 50%;
  -webkit-mask: url("/assets/ui/tsm_logo_maszk.webp") center / 112% no-repeat; mask: url("/assets/ui/tsm_logo_maszk.webp") center / 112% no-repeat; }
.wax .logo.lo { background: #3d0505; transform: translate(-1.5px, -1.5px); opacity: .9; }
.wax .logo.hi { background: #f09a84; transform: translate(1.5px, 1.5px); opacity: .55; }
.wax .logo.mid { background: #6a0d0a; }
/* kezdőlap: az Új játék gomb lassú, zöldes ragyogása */
.btn.pulse-green { position: relative; }
.btn.pulse-green::after { content: ""; position: absolute; inset: -2px; border-radius: inherit; pointer-events: none; opacity: 0;
  box-shadow: 0 0 22px rgba(170, 230, 120, .95), 0 0 54px rgba(110, 190, 80, .75), inset 0 0 18px rgba(190, 240, 140, .35);
  animation: pulse-green 1.6s ease-in-out infinite alternate; }
@keyframes pulse-green { from { opacity: 0; } to { opacity: 1; } }
/* ---------- táblák megjelenése: beúszás helyett lágy be- és kitűnés ---------- */
@keyframes panelIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes panelOut { from { opacity: 1; } to { opacity: 0; } }
.dialog, .level-card, .story, .coin-panel, .puzzle, .cert { animation: panelIn .55s ease-out both; }
.modal-back { animation: panelIn .45s ease-out both; }
.modal-back.closing, .story.closing { animation: panelOut .35s ease-in forwards; pointer-events: none; }
.modal-back.closing * { pointer-events: none; }
.puzzle.closing { animation: panelOut .35s ease-in forwards; pointer-events: none; }
.scene-layer { transition: none; }
.scene-layer.leaving { opacity: 0; transition: opacity .45s ease-in; pointer-events: none; }
.scene-layer.leaving * { pointer-events: none !important; }

/* vásári kvíz: az árucikk képe a kérdés mellett */
.market-img { width: 460px; height: 460px; object-fit: contain; filter: drop-shadow(0 14px 14px rgba(40, 22, 6, .55)); }

/* ---------- pénzverő műhely: verőtő, lapka, erőmérő ---------- */
.mint-row { display: grid; grid-template-columns: 360px 1fr 200px; gap: 30px; align-items: center; margin-top: 4px; }
.mint-row .cap { text-align: center; font-size: 24px; letter-spacing: .08em; text-transform: uppercase; color: #3b2409; margin-bottom: 10px; }
.mint-slots { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.mint-slot { width: 104px; height: 104px; border-radius: 50%; border: 3px dashed rgba(90, 60, 25, .7); background: rgba(255, 248, 225, .35); display: grid; place-items: center; }
.mint-slot.full { border-color: transparent; background: none; }
.mint-slot img { width: 100%; height: 100%; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .5)); animation: coin-drop .3s ease-out; --rot: 0deg; }
/* a tönk felülről, közepén az alsó verőtő */
.mint-stage { position: relative; height: 400px; border-radius: 22px; overflow: hidden; cursor: pointer; border: 4px solid #3d2410; box-shadow: inset 0 0 70px rgba(15, 7, 2, .85), 0 10px 18px rgba(40, 22, 6, .45);
  background: #1d120a url("/assets/ui/tusko.jpg") 50% 47% / 100% auto no-repeat; }
.mint-die { position: absolute; left: 50%; top: 50%; width: 270px; height: 270px; margin: -135px 0 0 -135px; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #8b8f96, #4a4d54 55%, #26282d); box-shadow: 0 0 0 7px #1c1d21, 0 12px 20px rgba(0, 0, 0, .7), inset 0 0 0 16px rgba(20, 20, 24, .45), inset 0 0 0 19px rgba(190, 195, 205, .28); }
.mint-blank { position: absolute; left: 50%; top: 50%; width: 236px; height: 236px; margin: -118px 0 0 -118px; border-radius: 50%; overflow: hidden;
  background: url("/assets/ui/lapka.webp") center / 100% 100% no-repeat; filter: drop-shadow(0 8px 8px rgba(0, 0, 0, .6)); transition: opacity .4s; }
.mint-blank img { position: absolute; inset: -2px; width: calc(100% + 4px); height: calc(100% + 4px); opacity: 0; }
.mint-blank.struck img { opacity: 1; animation: panelIn .25s; }
.mint-blank.struck.weak img { opacity: .2; filter: blur(3px) contrast(.7); }
.mint-blank.gone { opacity: 0; }
.mint-blank .crack { display: none; position: absolute; left: 54%; top: -4%; width: 5px; height: 62%; background: #17110c; transform: rotate(14deg); transform-origin: 50% 0;
  clip-path: polygon(0 0, 100% 0, 70% 22%, 100% 40%, 40% 62%, 80% 80%, 50% 100%, 20% 78%, 45% 60%, 0 42%, 30% 20%); box-shadow: 0 0 3px #000; }
.mint-blank.struck.strong .crack { display: block; }
/* a felső verőtő lecsap, majd felemelkedik */
.mint-punch { position: absolute; left: 50%; top: 50%; width: 270px; height: 270px; margin: -135px 0 0 -135px; border-radius: 50%; opacity: 0; pointer-events: none;
  background: radial-gradient(circle at 40% 34%, #6b6e75, #33353a 60%, #17181b); box-shadow: 0 0 0 6px #111, 0 30px 40px rgba(0, 0, 0, .7); }
.mint-punch.hit { animation: punch-hit .42s ease-in; }
/* a nagy kalapács: a feje a felső verőtőre sújt, a nyele jobbra lefelé lóg ki a képből */
.mint-hammer { position: absolute; left: 50%; top: 50%; width: 900px; height: 300px; margin: -150px 0 0 -131px; transform-origin: 131px 150px; rotate: 34deg; opacity: 0; pointer-events: none; filter: drop-shadow(0 26px 22px rgba(0, 0, 0, .7)); }
.mint-hammer.hit { animation: hammer-hit .62s ease-in; }
@keyframes hammer-hit { 0% { opacity: 0; scale: 1.9; rotate: 18deg; } 12% { opacity: 1; } 28% { opacity: 1; scale: 1; rotate: 34deg; } 48% { opacity: 1; scale: 1; rotate: 34deg; } 100% { opacity: 0; scale: 1.7; rotate: 20deg; } }
@keyframes punch-hit { 0% { opacity: 0; scale: 2.2; } 40% { opacity: 1; scale: 1; } 55% { opacity: 1; scale: 1; } 100% { opacity: 0; scale: 1.7; } }
/* erőmérő */
.mint-gauge { opacity: .25; transition: opacity .3s; }
.mint-gauge.on { opacity: 1; }
.mint-gauge .bar { position: relative; width: 84px; height: 340px; margin: 0 auto; border-radius: 14px; border: 4px solid #3d2410; box-shadow: inset 0 0 14px rgba(0, 0, 0, .6);
  background: linear-gradient(0deg, #8f8a7d 0%, #b9b29f 100%); }
.mint-gauge .bar::before { content: 'erős'; position: absolute; top: 6px; left: 0; right: 0; text-align: center; font-size: 22px; color: #5c1e10; }
.mint-gauge .bar::after { content: 'gyenge'; position: absolute; bottom: 6px; left: 0; right: 0; text-align: center; font-size: 22px; color: #3b3a36; }
.mint-gauge .zone { position: absolute; left: 0; right: 0; background: linear-gradient(0deg, #8fc45c, #5c9a36); box-shadow: 0 0 0 2px rgba(31, 58, 14, .8); }
.mint-gauge .mark { position: absolute; left: -16px; right: -16px; height: 10px; margin-bottom: -5px; border-radius: 5px; background: #f4dc97; box-shadow: 0 0 0 2px #3d2410, 0 0 12px #f4dc97; }

/* ---------- fizess a vásárban: áru, pult, erszény ---------- */
.pay-row { display: grid; grid-template-columns: 280px 1fr 580px; gap: 22px; align-items: stretch; margin-top: 6px; }
.pay-item { display: grid; place-items: center; }
.pay-item img { width: 280px; height: 280px; object-fit: contain; filter: drop-shadow(0 12px 12px rgba(40, 22, 6, .55)); }
.pay-counter, .pay-purse { position: relative; min-height: 420px; }
.pay-row .cap { position: absolute; left: 0; right: 0; top: 34px; text-align: center; font-size: 24px; letter-spacing: .08em; text-transform: uppercase; color: #f6e7bf; text-shadow: 0 2px 4px #000, 0 0 8px rgba(0, 0, 0, .8); z-index: 1; }
/* a pult: festett deszkalap */
.pay-counter { padding: 74px 70px 30px; background: url("/assets/ui/pult.webp") center / 100% 100% no-repeat; filter: drop-shadow(0 12px 12px rgba(30, 15, 4, .55)); transition: filter .2s; }
.pay-counter.target { filter: drop-shadow(0 0 14px #f4dc97) drop-shadow(0 0 6px #f4dc97); }
.pay-counter.bad { animation: shake .4s; filter: drop-shadow(0 0 10px #c2432a); }
.pay-counter.paid { filter: drop-shadow(0 0 12px #7fc04f) drop-shadow(0 0 5px #7fc04f); }
.pay-coins { display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 6px 10px; min-height: 260px; }
.pay-empty { align-self: center; font-size: 30px; font-style: italic; color: rgba(246, 231, 191, .85); text-shadow: 0 2px 4px #000; }
.pay-coin { width: var(--cs); height: var(--cs); padding: 0; border: 0; background: none; cursor: pointer; transform: rotate(var(--rot)); transition: transform .12s; animation: coin-drop .22s ease-out; }
.pay-coin:hover { transform: rotate(var(--rot)) scale(1.1); }
.pay-coin img, .pay-stack img { display: block; width: 100%; height: 100%; filter: drop-shadow(0 5px 5px rgba(0, 0, 0, .6)); pointer-events: none; }
@keyframes coin-drop { from { transform: rotate(var(--rot)) translateY(-30px) scale(1.25); opacity: 0; } }
.pay-total { text-align: center; font-size: 30px; color: #f6e7bf; text-shadow: 0 2px 4px #000, 0 0 8px rgba(0, 0, 0, .8); min-height: 38px; margin-top: 4px; }
/* az erszény: festett bőrerszény, az érmék az elején sorakoznak */
.pay-purse { background: url("/assets/ui/erszeny.webp") center bottom / contain no-repeat; filter: drop-shadow(0 12px 12px rgba(30, 15, 4, .55)); }
.pay-purse .cap { top: 0; }
.pay-stacks { position: absolute; left: 0; right: 0; bottom: 4px; display: flex; justify-content: center; align-items: flex-end; gap: 6px; }
.pay-stack { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 6px; min-width: 108px; border: 0; border-radius: 14px; background: rgba(20, 10, 3, .38);
  font-family: var(--font); color: #f6e7bf; text-shadow: 0 2px 3px #000; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; transition: transform .12s, background .2s, opacity .2s; }
.pay-stack:hover { transform: translateY(-5px); background: rgba(20, 10, 3, .6); }
.pay-stack .nm { font-size: 25px; }
.pay-stack .cnt { font-size: 30px; font-weight: bold; }
.pay-stack.none { opacity: .3; cursor: default; pointer-events: none; }
.pay-ghost { position: fixed; z-index: 9999; transform: translate(-50%, -50%) scale(1.12); pointer-events: none; filter: drop-shadow(0 14px 12px rgba(0, 0, 0, .6)); }
.pay-rates { text-align: center; font-size: 26px; margin: 12px 0 0; }

/* ---------- a hamis pénz: érmék sora és a tőr ---------- */
.dialog ul.signs { text-align: left; margin: 6px 40px 14px; padding-left: 34px; font-size: calc(29px * var(--boost)); line-height: 1.4; }
.dialog ul.signs li { margin: 6px 0; }
.forgery { cursor: default; }
.fake-row { display: flex; justify-content: center; gap: 26px; margin: 18px 0 6px; }
.fake-card { position: relative; display: flex; gap: 10px; padding: 16px 16px 14px; border: 3px dashed rgba(122, 90, 44, .7); border-radius: 16px; background: rgba(255, 248, 225, .45);
  cursor: none; font-family: var(--font); transition: transform .15s, box-shadow .15s, background .2s, opacity .4s; }
.fake-card:hover { transform: translateY(-6px); box-shadow: 0 14px 24px rgba(60, 35, 10, .4); background: rgba(255, 248, 225, .7); }
.fake-card .side { position: relative; display: block; width: var(--fw, 180px); height: var(--fw, 180px); }
.fake-card .side img { width: 100%; height: 100%; display: block; filter: drop-shadow(0 8px 8px rgba(0, 0, 0, .45)); pointer-events: none; }
.fake-card .zoom { position: absolute; right: 6px; top: 6px; width: 56px; height: 56px; border-radius: 50%; border: 2px solid #7a5a2c; background: rgba(255, 248, 225, .92); display: grid; place-items: center; color: #4a2f0c; cursor: pointer; z-index: 2; }
.fake-card .zoom svg { width: 30px; height: 30px; fill: currentColor; }
.fake-card.bad { animation: shake .4s; border-color: var(--bad); background: rgba(207, 154, 130, .5); }
.fake-card.hint { box-shadow: 0 0 0 5px rgba(244, 220, 151, 1), 0 0 30px #f4dc97; }
.fake-card.pierced { border-style: solid; border-color: var(--ok); background: rgba(169, 201, 124, .5); box-shadow: 0 0 0 4px rgba(79, 122, 52, .45); cursor: default; }
.fake-card.real { opacity: .55; cursor: default; }
/* a tőr ütötte rés az érmén */
.fake-card .slit { position: absolute; left: 50%; top: 50%; width: 6%; height: 30%; transform: translate(-50%, -50%) rotate(24deg); border-radius: 50%;
  background: radial-gradient(ellipse at center, #050302 0 45%, #1c0f08 70%, #3a2414 100%);
  box-shadow: 0 0 0 1px rgba(20, 10, 4, .85), 1.5px 1.5px 0 1.5px rgba(255, 255, 255, .35), -1.5px -1.5px 0 1.5px rgba(0, 0, 0, .4); animation: panelIn .15s; }
/* a tőr: a hegye (az alja) mutat a kijelölt pontra */
.dagger { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; opacity: 0; transition: opacity .2s; z-index: 15; }
/* amíg a tőr a mutató, a rendes egérmutató az egész oldalon rejtve van */
body.dagger-cur, body.dagger-cur * { cursor: none !important; }
.dagger.on { opacity: 1; }
.dagger-in { position: absolute; left: -62px; bottom: 0; width: 124px; transform-origin: 50% 100%; transform: rotate(24deg) translateY(-14px); filter: drop-shadow(8px 12px 8px rgba(0, 0, 0, .5)); }
.dagger-in img { display: block; width: 100%; height: auto; }
.dagger.stab .dagger-in { animation: stab-in .33s cubic-bezier(.5, 0, .9, .4) forwards; }
@keyframes stab-in { 0% { transform: rotate(24deg) translateY(-14px); } 45% { transform: rotate(24deg) translateY(-90px); } 100% { transform: rotate(24deg) translateY(26px); } }

/* ---------- játékmód választása (rövid / teljes) ---------- */
.levels.modes { flex-wrap: wrap; bottom: 90px; }
.modes-cap { flex: 0 0 100%; text-align: center; font-size: 40px; letter-spacing: .06em; color: #f6e7bf; text-shadow: 0 3px 6px #000, 0 0 14px rgba(0, 0, 0, .9); margin-bottom: -8px; animation: fade .6s both; }
.mode-card { width: 600px; padding: 34px 36px 36px; }
.mode-card h3 { font-size: 50px; }
.mode-card .age { font-size: 36px; margin: 6px 0 12px; }
.mode-card p { font-size: 28px; }
.mode-card.first { box-shadow: 0 0 0 4px var(--gold-bright), 0 18px 40px rgba(0, 0, 0, .6); }

/* ---------- érmés memória ---------- */
.puzzle.memory { padding-top: 22px; padding-bottom: 22px; }
.puzzle.memory .lead { margin: 4px 0 12px; }
.mem-row { display: grid; grid-template-columns: 1fr 590px; gap: 24px; align-items: start; }
.mem-grid { display: grid; gap: 12px; justify-content: center; perspective: 1600px; }
.mem-card { width: var(--mc); height: var(--mc); padding: 0; border: 0; background: none; cursor: pointer; touch-action: manipulation; transition: opacity .45s, transform .45s; }
.mem-card .in { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .42s ease; }
.mem-card.up .in { transform: rotateY(180deg); }
.mem-card .back, .mem-card .face { position: absolute; inset: 0; border-radius: 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 6px 10px rgba(30, 15, 4, .5); }
/* a lap hátoldala: festett, kopott kártyakép */.mem-card .back { background: url("/assets/ui/kartya.webp") center / 100% 100% no-repeat; box-shadow: none; border-radius: 0; filter: drop-shadow(0 5px 6px rgba(30, 15, 4, .55)); transition: filter .15s; }.mem-card:not(.up):hover .back, .mem-card:not(.up):focus-visible .back { filter: drop-shadow(0 0 7px rgba(244, 220, 151, .95)) brightness(1.12); }
.mem-card:focus-visible { outline: none; }
.mem-card .face { transform: rotateY(180deg); border: 3px solid #7a5a2c; background: radial-gradient(circle at 50% 40%, #fbf3da, #e3cf9d); display: grid; place-items: center; }
.mem-card .face img { width: 86%; height: 86%; object-fit: contain; filter: drop-shadow(0 5px 5px rgba(0, 0, 0, .45)); pointer-events: none; }
.mem-card .mark { position: absolute; left: 7px; top: 2px; font-style: normal; font-size: 34px; line-height: 1; text-shadow: 0 0 3px #fff, 0 0 3px #fff; }
.mem-card.match .face { border-color: var(--ok); background: radial-gradient(circle at 50% 40%, #e6f1cd, #a9c97c); box-shadow: 0 0 0 4px rgba(79, 122, 52, .45); }
.mem-card.gone { opacity: 0; transform: scale(.6); pointer-events: none; }
.mem-side .cap { font-size: 24px; letter-spacing: .08em; text-transform: uppercase; color: #3b2409; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: baseline; }
.mem-side .cap b { font-weight: normal; font-size: 32px; letter-spacing: 0; }
.mem-timer { margin-bottom: 22px; }
.mem-timer .bar { height: 22px; border-radius: 11px; border: 2px solid #5a3c19; background: rgba(40, 22, 6, .3); overflow: hidden; }
.mem-timer .bar i { display: block; height: 100%; width: 100%; background: linear-gradient(180deg, #a9c97c, #4f7a34); }
.mem-timer.low .bar i { background: linear-gradient(180deg, #f0c36a, #c07a1c); }
.mem-timer.over { opacity: .55; }
.mem-tray { display: grid; grid-template-columns: repeat(var(--tc, 3), 1fr); gap: 8px 6px; min-height: 120px; padding: 10px; border-radius: 16px; border: 3px dashed rgba(90, 60, 25, .6); background: rgba(255, 248, 225, .3); }
.mem-pair { display: flex; justify-content: center; padding: 2px; border: 0; background: none; border-radius: 12px; cursor: zoom-in; animation: coin-drop .3s ease-out; --rot: 0deg; }
.mem-pair:hover, .mem-pair:focus-visible { background: rgba(244, 220, 151, .55); outline: none; }
.mem-pair img { width: var(--mp, 88px); height: var(--mp, 88px); object-fit: contain; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .45)); }
.mem-pair img + img { margin-left: calc(var(--mp, 88px) * -.27); }
.mem-done { align-self: center; padding: 30px 60px; text-align: center; font-size: calc(30px * var(--boost)); line-height: 1.4; color: #2e4d17; animation: fade .6s both; }
.mem-done .big { font-size: calc(40px * var(--boost)); margin: 0 0 14px; }
.mem-done p { margin: 0; }
.mem-timer { margin-bottom: 12px; }
/* felhívás a záróképernyőn: a nyíl a megtalált párok felé mutat */
.mem-call { display: inline-flex; align-items: center; gap: 22px; margin-top: 34px; padding: 16px 30px 16px 34px; border-radius: 60px; border: 3px solid #7a5a2c; background: linear-gradient(180deg, #f6e4a6, #e0b955); color: #3b2409; font-size: calc(32px * var(--boost)); box-shadow: 0 8px 16px rgba(40, 22, 6, .4); animation: call-pop .5s .5s both, call-glow 1.6s 1s ease-in-out infinite; }
.mem-call .arrow { font-style: normal; font-size: 54px; line-height: 1; color: #7a3d0a; animation: call-arrow .8s ease-in-out infinite; }
@keyframes call-pop { from { opacity: 0; scale: .7; } to { opacity: 1; scale: 1; } }
@keyframes call-glow { 0%, 100% { box-shadow: 0 8px 16px rgba(40, 22, 6, .4), 0 0 0 0 rgba(244, 220, 151, .9); } 50% { box-shadow: 0 8px 16px rgba(40, 22, 6, .4), 0 0 0 14px rgba(244, 220, 151, 0); } }
@keyframes call-arrow { 0%, 100% { translate: 0 0; } 50% { translate: 22px 0; } }

/* Játékidő a felső sávban – szándékosan visszafogott */
.hud-time { padding: 10px 18px; font-size: 26px; min-width: 150px; display: flex; align-items: center; gap: 10px; justify-content: center; opacity: .78; font-variant-numeric: tabular-nums; }
.hud-time small { font-size: 17px; color: #c9b78d; letter-spacing: .08em; }

/* Hangerő-csúszka a beállításokban */
.vol { display: flex; align-items: center; gap: 16px; }
.vol-num { width: 84px; text-align: right; font-weight: normal; font-size: calc(26px * var(--boost)); color: #5a3a12; }
.vol-range { -webkit-appearance: none; appearance: none; width: 300px; height: calc(70px * var(--boost)); background: transparent; cursor: pointer; margin: 0; --v: 100%; touch-action: none; }
.vol-range::-webkit-slider-runnable-track { height: 16px; border-radius: 10px; border: 2px solid #7a5a2c; background: linear-gradient(90deg, #8fb35c var(--v), #b9a57a var(--v)); }
.vol-range::-moz-range-track { height: 16px; border-radius: 10px; border: 2px solid #7a5a2c; background: linear-gradient(90deg, #8fb35c var(--v), #b9a57a var(--v)); }
.vol-range::-webkit-slider-thumb { -webkit-appearance: none; width: 44px; height: 44px; margin-top: -16px; border-radius: 50%; border: 2px solid #5a3a12; background: radial-gradient(circle at 35% 30%, #fff3c4, #c9993d 60%, #7a5518); box-shadow: 0 3px 8px rgba(0,0,0,.45); }
.vol-range::-moz-range-thumb { width: 40px; height: 40px; border-radius: 50%; border: 2px solid #5a3a12; background: radial-gradient(circle at 35% 30%, #fff3c4, #c9993d 60%, #7a5518); box-shadow: 0 3px 8px rgba(0,0,0,.45); }

/* Nagyító az érmepárosítás érméin */
.pair-coin .zoom { position: absolute; right: 4px; top: 4px; width: 58px; height: 58px; border-radius: 50%; border: 2px solid #7a5a2c; background: rgba(255, 248, 225, .92); display: grid; place-items: center; color: #4a2f0c; cursor: pointer; z-index: 2; pointer-events: auto; transition: transform .15s; }
.pair-coin .zoom:hover { transform: scale(1.12); }
.pair-coin .zoom svg { width: 30px; height: 30px; fill: currentColor; }
.zoom-view.one img { width: 700px; height: 700px; }

/* ---------- A verdejegy titka: térképes küldetés ---------- */
.verde { position: absolute; inset: 0; animation: v-fade .6s; }
.verde.closing { opacity: 0; transition: opacity .6s; }
@keyframes v-fade { from { opacity: 0; } to { opacity: 1; } }
.v-city { position: absolute; width: 0; height: 0; padding: 0; border: 0; background: none; cursor: pointer; font-family: var(--font); }
.v-city .dot { position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%; border: 3px solid #4a2f0c; background: radial-gradient(circle at 35% 30%, #fff3c4, #d8a53f 55%, #8a5a14); box-shadow: 0 0 0 5px rgba(255, 243, 196, .55), 0 4px 10px rgba(0, 0, 0, .55); animation: v-pulse 2.2s infinite; }
.v-city::before { content: ""; position: absolute; left: -46px; top: -46px; width: 92px; height: 92px; border-radius: 50%; }
@keyframes v-pulse { 0%, 100% { box-shadow: 0 0 0 5px rgba(255, 243, 196, .55), 0 4px 10px rgba(0, 0, 0, .55); } 50% { box-shadow: 0 0 0 12px rgba(255, 243, 196, .18), 0 4px 10px rgba(0, 0, 0, .55); } }
.v-city .name { position: absolute; top: -27px; left: 34px; white-space: nowrap; padding: 6px 18px 7px; font-size: calc(30px * var(--boost)); line-height: 1.1; color: #2c1a06; background: linear-gradient(180deg, #f6e7c1, #e2c98f); border: 2px solid #7a5a2c; border-radius: 10px; box-shadow: 0 4px 10px rgba(0, 0, 0, .45); letter-spacing: .03em; transition: transform .15s; }
.v-city .name small { display: block; font-size: 19px; font-style: italic; color: #6b4a1c; letter-spacing: 0; }
.v-city.lab-l .name { left: auto; right: 34px; }
.v-city:hover .name, .v-city:focus-visible .name { transform: scale(1.07); }
.v-city:focus-visible { outline: none; }
.v-city.bad .name { animation: shake .4s; border-color: var(--bad); }
.v-city.hint .dot { animation: none; box-shadow: 0 0 0 8px #f4dc97, 0 0 38px 14px #ffe9a8; }
.v-city.hint .name { box-shadow: 0 0 0 5px #f4dc97, 0 0 30px #f4dc97; }
.v-city.won .dot { animation: none; background: radial-gradient(circle at 35% 30%, #e6f4c9, #7fae4d 55%, #3f6b22); box-shadow: 0 0 0 6px rgba(213, 230, 180, .8), 0 0 30px 8px rgba(190, 230, 140, .8); }
.v-city.won .name { background: linear-gradient(180deg, #e3efc6, #b9d58e); border-color: var(--ok); }
.v-city.far .dot { border-radius: 8px; transform: rotate(45deg); }
.v-city.far .name::before { content: "\2191"; margin-right: 8px; display: inline-block; }
.v-city.far.arrow-nw .name::before { content: "\2196"; }

.v-panel { position: absolute; left: 34px; bottom: 34px; width: 470px; padding: 20px 26px 22px; text-align: center; animation: unroll .6s; }
.v-panel h3 { margin: 0 0 8px; font-size: calc(32px * var(--boost)); font-weight: normal; letter-spacing: .04em; }
.v-panel h3 small { font-size: 24px; color: #7a5a2c; margin-left: 8px; }
.v-coin { position: relative; width: 300px; height: 300px; margin: 0 auto; opacity: 0; transform: scale(.6) rotate(-20deg); }
.v-coin.in { opacity: 1; transform: none; transition: opacity .35s, transform .5s cubic-bezier(.2, 1.4, .4, 1); }
.v-coin img { width: 100%; height: 100%; display: block; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .5)); }
.v-coin .zoom { position: absolute; right: -44px; top: -4px; width: 58px; height: 58px; border-radius: 50%; border: 2px solid #7a5a2c; background: rgba(255, 248, 225, .92); display: grid; place-items: center; color: #4a2f0c; cursor: pointer; }
.v-coin .zoom svg { width: 30px; height: 30px; fill: currentColor; }
.v-ring { position: absolute; width: 21%; height: 21%; margin: -10.5% 0 0 -10.5%; border-radius: 50%; border: 4px solid #c8102e; box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 0 16px 4px rgba(255, 90, 90, .75), inset 0 0 0 2px rgba(255, 255, 255, .6); pointer-events: none; animation: v-ring 1.4s infinite; }
@keyframes v-ring { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.14); opacity: .75; } }
.v-mark { margin-top: 10px; font-size: calc(28px * var(--boost)); color: #5a3a12; }
.v-mark b { font-size: calc(40px * var(--boost)); font-weight: normal; color: #7a2218; letter-spacing: .06em; margin-left: 6px; }
.v-lead { margin: 4px 0 0; font-size: calc(28px * var(--boost)); font-style: italic; }
.v-panel .feedback { min-height: 0; margin-top: 8px; font-size: calc(25px * var(--boost)); line-height: 1.3; text-align: center; }
.v-panel.end .v-coin, .v-panel.end .v-mark, .v-panel.end .v-lead { display: none; }
.v-panel.end .feedback { font-size: calc(27px * var(--boost)); }
.v-fly { position: absolute; z-index: 5; pointer-events: none; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .6)); transition: left .9s cubic-bezier(.4, 0, .2, 1), top .9s cubic-bezier(.4, 0, .2, 1), width .9s, height .9s; }

.v-key { position: absolute; right: 34px; bottom: 150px; width: 430px; padding: 16px 24px 18px; }
.v-key h3, .v-key-h { margin: 6px 0 8px; font-size: calc(28px * var(--boost)); font-weight: normal; text-align: center; letter-spacing: .04em; }
.v-key-list { display: grid; gap: 4px; font-size: calc(25px * var(--boost)); }
.v-key-list div { display: flex; justify-content: space-between; gap: 22px; padding: 4px 6px; border-bottom: 1px solid rgba(122, 90, 44, .35); }
.v-key-list b { font-weight: normal; }
.v-key-list span { color: #7a2218; letter-spacing: .04em; text-align: right; }
.dialog .v-key-list { max-width: 760px; margin: 0 auto; grid-template-columns: 1fr 1fr; column-gap: 40px; }
.v-fly.home { border-radius: 50%; box-shadow: 0 0 0 5px rgba(213, 230, 180, .9), 0 0 26px 8px rgba(190, 230, 140, .85); transition: left .9s cubic-bezier(.4, 0, .2, 1), top .9s cubic-bezier(.4, 0, .2, 1), width .9s, height .9s, box-shadow .6s .8s; }
.dialog .v-key-list { max-width: 1100px; font-size: calc(28px * var(--boost)); }
.dialog .v-key-list span { white-space: nowrap; }
.v-city.hint .name { background: linear-gradient(180deg, #fff6cf, #ffd75e); border-color: #b3261e; animation: v-hint .8s infinite; }
.v-city.hint .dot { border-color: #b3261e; box-shadow: 0 0 0 8px rgba(255, 255, 255, .9), 0 0 40px 16px #ffd75e; }
@keyframes v-hint { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.14); } }

/* ---------- A titkos jelek: sziglakereső küldetés ---------- */
.sigla { position: absolute; inset: 0; animation: fade-in .6s; }
.sigla.closing { opacity: 0; transition: opacity .6s; }
.s-coin { position: absolute; left: 640px; top: 190px; width: 640px; height: 640px; cursor: crosshair; opacity: 0; transform: scale(.6) rotate(-20deg); -webkit-tap-highlight-color: transparent; }
.s-coin.in { opacity: 1; transform: none; transition: opacity .35s, transform .5s cubic-bezier(.2, 1.4, .4, 1); }
.s-coin img { width: 100%; height: 100%; display: block; pointer-events: none; filter: drop-shadow(0 16px 20px rgba(0, 0, 0, .65)); }
.s-ring { position: absolute; width: 15%; height: 15%; margin: -7.5% 0 0 -7.5%; border-radius: 50%; border: 5px solid #ffd76a; box-shadow: 0 0 0 2px rgba(60, 30, 0, .8), 0 0 22px 8px rgba(255, 215, 106, .85), inset 0 0 0 2px rgba(60, 30, 0, .6); pointer-events: none; animation: s-pop .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes s-pop { from { transform: scale(2.4); opacity: 0; } to { transform: none; opacity: 1; } }
.s-zone { position: absolute; width: 36%; height: 36%; margin: -18% 0 0 -18%; border-radius: 50%; border: 4px dashed rgba(255, 233, 168, .95); background: rgba(255, 233, 168, .1); box-shadow: 0 0 26px 6px rgba(255, 233, 168, .45); pointer-events: none; animation: s-zone 1.6s infinite; }
.s-zone.exact { width: 17%; height: 17%; margin: -8.5% 0 0 -8.5%; border-style: solid; }
@keyframes s-zone { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
.s-miss { position: absolute; width: 0; height: 0; pointer-events: none; font-size: 64px; line-height: 0; color: #ff5a4a; text-shadow: 0 0 6px #000, 0 0 2px #000; animation: s-miss .9s forwards; }
.s-miss { display: grid; place-items: center; }
@keyframes s-miss { 0% { opacity: 1; transform: scale(1.5); } 30% { transform: scale(1); } 100% { opacity: 0; } }
.s-panel { position: absolute; right: 34px; top: 170px; width: 500px; padding: 20px 28px 24px; text-align: center; animation: unroll .6s; }
.s-panel h3 { margin: 0 0 8px; font-size: calc(32px * var(--boost)); font-weight: normal; letter-spacing: .04em; }
.s-panel h3 small { font-size: 24px; color: #7a5a2c; margin-left: 8px; }
.s-panel .v-lead { font-style: normal; line-height: 1.3; }
.s-found { display: flex; justify-content: center; gap: 14px; margin-top: 12px; }
.s-found i { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #7a5a2c; background: rgba(122, 90, 44, .15); }
.s-found i.on { background: radial-gradient(circle at 35% 30%, #fff3c4, #e0ac3c 60%, #8a5a14); box-shadow: 0 0 12px 3px rgba(255, 215, 106, .8); }
.s-panel .feedback { min-height: 0; margin-top: 12px; font-size: calc(26px * var(--boost)); line-height: 1.3; text-align: center; }
.s-panel.end .v-lead, .s-panel.end .s-found { display: none; }
.s-intro { display: grid; grid-template-columns: 300px 1fr; gap: 34px; align-items: center; text-align: left; }
.dialog .s-intro p { margin: 0 0 14px; text-align: left; }
.dialog .s-intro p:last-child { margin-bottom: 0; }
.s-ex { position: relative; width: 300px; height: 300px; margin-bottom: 34px; }
.s-ex img { width: 100%; height: 100%; display: block; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .5)); }
.s-ex small { position: absolute; left: 0; right: 0; top: 100%; text-align: center; font-size: 22px; font-style: italic; color: #5a3a12; }

/* ---------- Záró blokk: a múzeum ritka kincse ---------- */
.rare { position: absolute; inset: 0; animation: fade-in .6s; background: radial-gradient(ellipse at 38% 52%, rgba(0, 0, 0, .05), rgba(0, 0, 0, .55)); }
.rare.closing { opacity: 0; transition: opacity .6s; }
.r-coin { position: absolute; }
.r-coin img { width: 100%; height: 100%; display: block; filter: drop-shadow(0 16px 20px rgba(0, 0, 0, .7)); }
.r-coin small { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; text-align: center; font-size: 24px; font-style: italic; color: #f1dfb4; text-shadow: 0 2px 4px #000; }
.r-obv { left: 60px; top: 330px; width: 400px; height: 400px; animation: r-in .7s backwards; }
.r-rev { left: 490px; top: 220px; width: 620px; height: 620px; animation: r-in .7s .25s backwards; }
@keyframes r-in { from { opacity: 0; transform: scale(.6) rotate(-25deg); } }
.r-rev .zoom { position: absolute; right: -6px; top: 6px; width: 62px; height: 62px; border-radius: 50%; border: 2px solid #7a5a2c; background: rgba(255, 248, 225, .92); display: grid; place-items: center; color: #4a2f0c; cursor: pointer; }
.r-rev .zoom svg { width: 32px; height: 32px; fill: currentColor; }
.r-rev .v-ring { width: 19%; height: 19%; margin: -9.5% 0 0 -9.5%; }
.v-ring.green { border-color: #1f9d3a; box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 0 16px 4px rgba(90, 230, 120, .8), inset 0 0 0 2px rgba(255, 255, 255, .6); }
.r-panel { position: absolute; right: 40px; top: 170px; width: 700px; min-height: 520px; padding: 24px 34px 30px; animation: unroll .6s; }
.r-panel h3 { margin: 0; font-size: calc(36px * var(--boost)); font-weight: normal; letter-spacing: .04em; text-align: center; }
.r-panel .r-name { margin: 4px 0 0; text-align: center; font-style: italic; font-size: calc(26px * var(--boost)); color: #6b4a1c; }
.r-dots { display: flex; justify-content: center; gap: 12px; margin: 16px 0 8px; }
.r-dots i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #7a5a2c; }
.r-dots i.on { background: #a8792a; }
.r-panel h4 { margin: 14px 0 8px; font-size: calc(32px * var(--boost)); font-weight: normal; color: #7a2218; }
.r-panel .r-text { margin: 0; font-size: calc(29px * var(--boost)); line-height: 1.4; }
.r-panel .r-text.in { animation: fade-in .5s; }

/* ---------- Rejtett tesztmenü (Ctrl+Alt+T) ---------- */
.test-menu h4 { margin: 14px 0 6px; font-size: 24px; font-weight: normal; color: #7a2218; text-align: left; }
.test-menu .tm-row, .test-menu .tm-levels { display: flex; flex-wrap: wrap; gap: 10px; }
.test-menu .tm-levels { justify-content: center; }
.test-menu .tm-levels .btn { opacity: .55; }
.test-menu .tm-levels .btn.on { opacity: 1; outline: 4px solid #7a2218; }
.test-menu .btn { text-transform: none; }
/* a fejezetek és feladatok gombjai jóval kisebbek, hogy az Admin sorral együtt is kényelmesen elférjen minden; az Admin sor gombjai rendes méretűek */
.test-menu .btn[data-go] { min-height: calc(44px * var(--boost)); font-size: calc(19px * var(--boost)); padding: 0 16px; }
.test-menu .tm-levels .btn { min-height: calc(50px * var(--boost)); font-size: calc(21px * var(--boost)); }
.test-menu h4 { margin: 9px 0 4px; font-size: 21px; }
.test-menu .tm-row { gap: 8px; }
.test-menu p.small { margin: 8px 0 0; }

/* ---------- Az oklevél festett antik jelvénye (public/assets/ui/jelveny_arany / _ezust / _bronz.webp) ---------- */
.cert .seal.pic { width: 262px; height: 383px; margin: -18px 0 -72px; background: center / contain no-repeat; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .45)); }
.seal.pic.arany { background-image: url("../../assets/ui/jelveny_arany.webp"); }
.seal.pic.ezust { background-image: url("../../assets/ui/jelveny_ezust.webp"); }
.seal.pic.bronz { background-image: url("../../assets/ui/jelveny_bronz.webp"); }
.seal.pic span { position: absolute; left: 19%; right: 19%; top: 48%; transform: translateY(-50%); text-align: center; font-size: 25px; line-height: 1.15; letter-spacing: .02em; color: rgba(38, 22, 4, .92); text-shadow: 0 1px 0 rgba(255, 236, 180, .45); }
.seal.pic span b { display: block; font-size: 16px; letter-spacing: .16em; font-weight: normal; margin-bottom: 5px; }
.seal.pic.bronz span { color: #f6dfb8; text-shadow: 0 2px 2px rgba(20, 8, 0, .9), 0 0 6px rgba(20, 8, 0, .6); }

/* ---------- Főmenü: Info gomb és ablak ---------- */
.menu-info { position: absolute; right: 36px; bottom: 34px; animation: fade 1.2s .8s both; }
.info-box { text-align: center; }
.info-box h4 { text-align: center; margin: 12px 0 4px; font-size: calc(28px * var(--boost)); font-weight: normal; color: #7a2218; letter-spacing: .03em; }
.info-box h4:first-child { margin-top: 0; }
.info-box p { margin: 0 0 6px; font-size: calc(24px * var(--boost)); line-height: 1.32; }
.info-box .mail { user-select: text; white-space: nowrap; font-style: italic; }
/* az alsó verőtőbe vésett éremkép: halvány, tükrözött negatív (a lapka alsó oldalát ez veri) */
.mint-die img { position: absolute; left: 50%; top: 50%; width: 232px; height: 232px; margin: -116px 0 0 -116px; border-radius: 50%; pointer-events: none;
  transform: scaleX(-1); filter: grayscale(1) invert(1) contrast(1.25) brightness(.95); mix-blend-mode: soft-light; opacity: .55; }

/* a főcímen átsuhanó fénycsík: a ciklus nagy részében a feliraton kívül vár, a végén kb. 2,4 másodperc alatt halad át – lassan indul, felgyorsul, majd újra lelassul */
@keyframes titleShine {
  0% { background-position: -82% 0, 0 0; }
  86.7% { background-position: -82% 0, 0 0; animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  100% { background-position: 182% 0, 0 0; }
}

/* a főmenü „Új játék" gombjának lüktető ragyogása fehéres (a játék többi zöld jelzése változatlan) */
.menu-buttons .btn.pulse-green::after { box-shadow: 0 0 0 1px rgba(255, 236, 178, .16), 0 0 18px 4px rgba(255, 228, 160, .3), 0 0 40px 10px rgba(255, 220, 140, .14); }
/* a gomb saját világos kerete és a fókuszkeret is halványabb a főmenüben */
.menu-buttons .btn.primary { border-color: rgba(255, 240, 200, .28); }
.menu-buttons .btn:hover, .menu-buttons .btn:focus-visible { box-shadow: 0 0 0 2px rgba(244, 220, 151, .16), 0 8px 20px rgba(0, 0, 0, .6); }

/* ---------- Becenév, oklevél neve, helyi toplista ---------- */
.name-input { display: block; width: 100%; box-sizing: border-box; margin: 14px 0 6px; padding: 14px 18px; font: inherit; font-size: calc(36px * var(--boost)); text-align: center; color: #2a1a08;
  background: rgba(255, 250, 232, .85); border: 2px solid #7a5a2c; border-radius: 10px; outline: none; user-select: text; -webkit-user-select: text; }
.name-input:focus { border-color: #a8792a; box-shadow: 0 0 0 3px rgba(168, 121, 42, .3); }
.cert .cert-name { font-size: 54px; font-style: italic; color: #7a2218; margin: 2px 250px 2px 0; padding-left: 250px; line-height: 1.1; }
.menu-top { position: absolute; left: 36px; bottom: 34px; animation: fade 1.2s .8s both; }
.top-tabs { display: flex; justify-content: center; gap: 14px; margin-bottom: 14px; }
.top-tabs .btn.on { background: linear-gradient(180deg, #f4dc97 0%, #d2a84c 55%, #a97a2a 100%); color: #2a1a08; border-color: #f6e2a4; }
.top-list { columns: 2; column-gap: 46px; text-align: left; }
.top-row { display: grid; grid-template-columns: 52px 1fr 78px 150px; align-items: baseline; gap: 8px; padding: 5px 8px; font-size: calc(25px * var(--boost)); border-bottom: 1px solid rgba(122, 90, 44, .28); break-inside: avoid; }
.top-row .n { color: #7a5a2c; text-align: right; }
.top-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-row .tm { color: #7a5a2c; font-size: .82em; text-align: right; }
.top-row .pt { text-align: right; font-weight: bold; color: #4a2f0c; }
.top-row.medal .nm { font-weight: bold; }
.top-row.m1 { background: rgba(232, 192, 67, .32); } .top-row.m2 { background: rgba(190, 195, 205, .34); } .top-row.m3 { background: rgba(176, 120, 70, .26); }
.top-empty { font-style: italic; padding: 30px 0; }
/* az Admin menü alján: a játék összes billentyűparancsa, két hasábban */
.test-menu .tm-keys { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 30px; text-align: left; font-size: 18px; line-height: 1.25; }
.test-menu .tm-keys div { display: flex; gap: 12px; }
.test-menu .tm-keys b { flex: 0 0 236px; color: #7a2218; font-weight: normal; white-space: pre; }
.test-menu h4 i { font-size: 18px; color: #5a4630; }
/* kezdő szinten egyes bekezdések üresek (data/kezdo.json: ""): ezek ne foglaljanak helyet */
.dialog p:empty, .dialog p:has(> b:only-child:empty), .story p:empty { display: none; }
/* a ritka érme: a jeleket a játékos keresi meg a hátlapon (seek), a segítség szaggatott karika (hint), tévesztésnél az érme megrázkódik (miss) */
.r-rev.seek { cursor: pointer; }
.r-rev.seek img { pointer-events: none; }
.r-rev.miss { animation: shake .35s; }
.v-ring.hint { border-style: dashed; border-color: #f4dc97; box-shadow: 0 0 14px 4px rgba(244, 220, 151, .85); }
.r-panel .r-find { display: block; font-weight: normal; color: #7a2218; }
.r-panel .r-note { display: block; margin-top: 16px; font-style: italic; color: #1f6b2c; }

/* Képernyő-billentyűzet a becenévhez (ui/Keyboard.js) – érintőképernyős terminálra */
.osk { margin: 10px 0 4px; display: flex; flex-direction: column; gap: 6px; user-select: none; }
.osk-row { display: flex; gap: 6px; justify-content: center; }
.osk-key { flex: 1 1 0; min-width: 0; height: 64px; font: bold 28px Georgia, serif; color: #2c1e10; border-radius: 10px; border: 2px solid #5a3c18; background: linear-gradient(#f6e8c0, #d8bd88); cursor: pointer; padding: 0; touch-action: manipulation; }
.osk-key.fn { background: linear-gradient(#e2cd98, #c2a262); }
.osk-key.on { background: linear-gradient(#f4dc97, #c99a3c); box-shadow: inset 0 0 0 2px #7a5428; }
.osk-key.space { flex: 0 0 60%; font-size: 22px; font-weight: normal; }
.osk-key:active { transform: translateY(2px); filter: brightness(.92); }
