/* Tételvár – a Magyar, Angol és Matek negyed minijátékai (js/jatekok/: olvaso, koltok, javito, elemzo, szinpad, piac, fogado, mondat, posta, szamolo, grafikon, labirintus).
   Fekvő képernyőn a játék a terem közepén, a házigazda buboréka alatt; álló telefonon a háttér alatt, görgethetően. */

/* ---------- közös keret ---------- */
:is(.ol-wrap, .kc-col, .vs-col, .jv-col, .el-col, .sz-col, .pc-col, .fg-col, .mt-col, .pt-col, .sm-col, .vn-col) { display: flex; flex-direction: column; align-items: center; gap: 10px; }
#belso.land :is(.ol-wrap, .kc-col, .vs-col, .jv-col, .el-col, .sz-col, .pc-col, .fg-col, .mt-col, .pt-col, .sm-col, .vn-col) {
  position: absolute; left: 50%; transform: translateX(-50%); top: calc(max(10px, env(safe-area-inset-top)) + 150px); bottom: 12px; width: min(860px, 66vw); overflow-y: auto; overflow-x: hidden; padding: 2px 8px 4px; scrollbar-width: thin; }
:is(.ol-wrap, .ol-side, .kc-col, .vs-col, .jv-col, .el-col, .sz-col, .pc-col, .fg-col, .mt-col, .pt-col, .sm-col, .vn-col, .gr-ctl, .lb-col) .io-act { position: static !important; transform: none !important; margin-top: auto; padding-top: 4px; flex-wrap: wrap; }
#belso.land :is(.kc-col, .vs-col, .jv-col, .el-col, .sz-col, .pc-col, .fg-col, .mt-col, .pt-col, .sm-col, .vn-col) .io-tip { color: #fff4d8; text-shadow: 2px 0 0 #1c140c, -2px 0 0 #1c140c, 0 2px 0 #1c140c, 0 -2px 0 #1c140c; margin: 0; }
/* fekvő képernyőn szélesebb buborék: kevesebb sor, nem lóg rá a játékra */
#belso.land .bl-say { width: min(880px, 70vw); }
.bl-lvl { font-style: normal; font-size: 15px; line-height: 1; padding: 3px 7px 4px; border-radius: 4px; border: 2px solid #4a2e18; background: #e8dcc0; color: #4a2e18; text-transform: uppercase; letter-spacing: .04em; }
.bl-lvl.emelt { background: #7a1a2a; color: #f8e4b0; border-color: #3a0a12; }
.kc-note { margin: 0; max-width: 100%; background: #fff8e4; color: #3a2a1a; border: 2px solid #c9a66c; border-left-width: 6px; border-radius: 4px; padding: 5px 10px 6px; font-size: 18px; line-height: 1.2; }
.kc-ask { margin: 0; font-weight: 400; font-size: 22px; color: #fff4d8; text-shadow: 2px 0 0 #1c140c, -2px 0 0 #1c140c, 0 2px 0 #1c140c, 0 -2px 0 #1c140c; text-align: center; }
#belso:not(.land) .kc-ask { color: #7a4a20; text-shadow: none; font-size: 19px; }
/* válaszgombok (több játékban) */
:is(.ol-opt, .kc-opt, .sz-mask, .fg-opt, .pt-opt, .gr-opt, .jv-ch) { width: auto; min-height: 46px; flex-direction: row; gap: 8px; cursor: pointer; text-align: left; justify-content: flex-start; font-size: 18px; }
:is(.ol-opt, .kc-opt, .sz-mask, .fg-opt, .pt-opt, .gr-opt, .jv-ch, .sz-card, .el-tag, .mt-t, .lb-door) kbd { font-family: inherit; font-size: 14px; color: #7a4a20; border: 2px solid #c9a66c; border-radius: 4px; padding: 0 5px; background: #fff8e4; flex: none; }
:is(.ol-opt, .kc-opt, .sz-mask, .fg-opt, .pt-opt, .gr-opt, .jv-ch).right { background: #d8f0c0; border-color: #2f7a2a; }
:is(.ol-opt, .kc-opt, .sz-mask, .fg-opt, .pt-opt, .gr-opt).wrong { background: #f6d0c8; border-color: #a8302a; }
:is(.ol-opt, .kc-opt, .sz-mask, .fg-opt, .pt-opt, .gr-opt, .jv-ch, .sz-card, .mt-t)[disabled] { cursor: default; }
ins { text-decoration: none; }
.read { font-family: 'Atkinson Hyperlegible', system-ui, sans-serif; }

/* ---------- Nagy Könyvtár / Követek Háza: nyitott könyv + kérdések ---------- */
#belso.land .ol-wrap { flex-direction: row; align-items: stretch; width: min(1060px, 68vw); gap: 14px; }
.ol-book { position: relative; flex: 1.35; min-height: 0; overflow-y: auto; background: linear-gradient(90deg, #efe2c0, #fbf4e2 6%, #fbf4e2 94%, #efe2c0); color: #2a1e12;
  border: 3px solid #5a3a1e; border-radius: 6px; box-shadow: inset 0 0 0 5px #f1e4c2, inset 0 0 0 6px #c8a868, 0 6px 0 #0007; padding: 12px 20px 14px; }
.ol-book h4 { margin: 0 0 6px; font-weight: 400; font-size: 23px; text-align: center; color: #7a1a1e; }
.ol-book p { margin: 0 0 9px; font-family: 'Atkinson Hyperlegible', system-ui, sans-serif; font-size: 17px; line-height: 1.5; text-indent: 1.2em; }
.ol-s { border-radius: 3px; transition: background .12s; }
.ol-book.find .ol-s { cursor: pointer; background: rgba(200,168,104,.14); box-shadow: 0 1px 0 #c8a868; }
.ol-book.find .ol-s:hover, .ol-book.find .ol-s:focus-visible { background: #fff0a8; outline: none; }
.ol-s.sel { background: #fff0a8 !important; box-shadow: 0 0 0 2px #e8c050; }
.ol-s.right { background: #d8f0c0; box-shadow: 0 0 0 2px #2f7a2a; } .ol-s.wrong { background: #f6d0c8; text-decoration: line-through; }
.ol-side { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ol-q { background: #f6ecd0; border: 3px solid #4a2e18; border-radius: 8px; box-shadow: 0 5px 0 #0006; padding: 8px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.ol-q header { font-size: 16px; color: #7a4a20; text-transform: uppercase; letter-spacing: .04em; border-bottom: 2px solid #c9a66c; }
.ol-qt { margin: 0; font-size: 21px; line-height: 1.15; }
.ol-opts { display: flex; flex-direction: column; gap: 7px; } .ol-tf { flex-direction: row; } .ol-tf .ol-opt { flex: 1; justify-content: center; }
.ol-hint { margin: 0; font-size: 18px; color: #2a5a9a; }
#belso:not(.land) .ol-book { max-height: 42vh; flex: none; width: 100%; box-sizing: border-box; } #belso:not(.land) .ol-book p { font-size: 15px; }
#belso:not(.land) .ol-side { width: 100%; } #belso:not(.land) .ol-qt { font-size: 18px; } #belso:not(.land) .ol-tf { flex-wrap: wrap; }

/* ---------- Költők Csarnoka: márványtábla ---------- */
.kc-plaque { margin: 0; width: min(640px, 100%); box-sizing: border-box; text-align: center; background: linear-gradient(135deg, #f4f2ee, #dcd8d0 60%, #eceae4); color: #2a2620;
  border: 4px solid #8a8478; outline: 3px solid #c8a040; outline-offset: 3px; border-radius: 6px; box-shadow: 0 8px 0 #0007; padding: 14px 18px 10px; }
.kc-plaque blockquote { margin: 0; font-size: 27px; line-height: 1.2; font-style: italic; }
.kc-plaque figcaption { margin-top: 8px; font-size: 19px; color: #6a5e48; }
.kc-plaque figcaption b { font-weight: 400; } .kc-plaque b.ok { color: #2f7a2a; } .kc-plaque b.no { color: #5a4630; }
.kc-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: min(640px, 100%); }
#belso:not(.land) .kc-plaque blockquote { font-size: 21px; } #belso:not(.land) .kc-opts { grid-template-columns: 1fr; } #belso:not(.land) .kc-opt { font-size: 16px; min-height: 40px; }
/* verstan: jelek a magánhangzók fölött */
.vs-plaque { padding: 16px 14px 10px; }
.vs-line { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 18px; row-gap: 40px; padding-top: 34px; }
.vs-word { display: inline-flex; align-items: flex-end; }
.vs-c { position: relative; display: inline-block; }
.vs-c b { font-weight: 400; font-size: 34px; line-height: 1; letter-spacing: .02em; }
.vs-c i { display: none; }
.vs-v b { color: #7a1a2a; }
.vs-m { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); font: inherit; font-size: 20px; line-height: 1; width: 22px; height: 26px; padding: 0; margin-bottom: 3px; border: 2px solid #8a6a3a; border-radius: 4px; background: #fff8e4; color: #3a2a1a; cursor: pointer; }
.vs-m.empty { color: #b8a888; border-style: dashed; } .vs-m:hover { background: #fff0a8; }
.vs-m.right { background: #d8f0c0; border-color: #2f7a2a; } .vs-m.wrong { background: #f6d0c8; border-color: #a8302a; }
.vs-m ins { position: absolute; left: 50%; top: -24px; transform: translateX(-50%); background: #2f7a2a; color: #fff; border-radius: 3px; padding: 0 4px; font-size: 18px; }
#belso:not(.land) .vs-c b { font-size: 26px; } #belso:not(.land) .vs-m { width: 19px; height: 23px; font-size: 17px; } #belso:not(.land) .vs-line { column-gap: 12px; padding-top: 30px; row-gap: 34px; }

/* ---------- Írnokok Műhelye / hibakereső: kézirat ---------- */
.jv-page { width: min(720px, 100%); box-sizing: border-box; background: repeating-linear-gradient(#fbf4e2 0 31px, #d8c8a8 31px 32px); background-position: 0 10px; color: #2a1e12;
  border: 3px solid #5a3a1e; border-radius: 3px; box-shadow: 0 6px 0 #0007; padding: 10px 20px 14px; }
.jv-page h4 { margin: 0 0 4px; font-weight: 400; font-size: 22px; color: #7a1a1e; text-align: center; }
.jv-page p { margin: 0; font-family: 'Atkinson Hyperlegible', system-ui, sans-serif; font-size: 19px; line-height: 2; }
.jv-w { font: inherit; font-size: inherit; line-height: 1.3; color: inherit; background: none; border: none; border-radius: 3px; padding: 0 2px; margin: 0; cursor: pointer; position: relative; }
.jv-w:hover:not([disabled]) { background: #fff0a8; }
.jv-w.mk { background: #f8d8c8; box-shadow: 0 0 0 2px #c8303a; border-radius: 40%; }
.jv-w.found { background: #fff0a8; box-shadow: 0 0 0 2px #c08a1a; } .jv-w.cur { background: #fff0a8; box-shadow: 0 0 0 3px #e8c050; animation: jvPulse 1s ease-in-out infinite; }
.jv-w.fixed { background: #d8f0c0; box-shadow: 0 0 0 2px #2f7a2a; } .jv-w.badfix, .jv-w.missed { background: #fde4c8; box-shadow: 0 0 0 2px #c08a1a; }
.jv-w.false { background: #f6d0c8; box-shadow: 0 0 0 2px #a8302a; text-decoration: line-through wavy #a8302a; }
.jv-w s { color: #a8302a; } .jv-w ins { color: #fff; background: #2f7a2a; border-radius: 3px; padding: 0 4px; margin-left: 3px; }
.jv-w[disabled] { cursor: default; }
@keyframes jvPulse { 50% { box-shadow: 0 0 0 5px #e8c05080; } }
.jv-fix { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.jv-fix h5 { margin: 0; font-weight: 400; font-size: 20px; color: #fff4d8; text-shadow: 2px 0 0 #1c140c, -2px 0 0 #1c140c, 0 2px 0 #1c140c, 0 -2px 0 #1c140c; }
#belso:not(.land) .jv-fix h5 { color: #7a4a20; text-shadow: none; }
.jv-choices { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; } .jv-ch { font-family: 'Atkinson Hyperlegible', system-ui, sans-serif; font-size: 18px; }
#belso:not(.land) .jv-page p { font-size: 16px; line-height: 1.9; }

/* ---------- Nyelvtan Csarnoka: a mondat a fatáblán, címke-ecsetek ---------- */
.el-board { width: min(780px, 100%); box-sizing: border-box; background: linear-gradient(#3a5a3a, #2c4a2e); border: 8px solid #8a5a2a; outline: 3px solid #3a2410; border-radius: 4px; box-shadow: 0 8px 0 #0007; padding: 10px 14px 14px; }
.el-board h5 { margin: 0 0 8px; font-weight: 400; font-size: 20px; color: #f0e8c8; text-align: center; }
.el-sent { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 6px; }
.el-w { font: inherit; font-size: 25px; line-height: 1; color: #fffbe8; background: rgba(255,255,255,.06); border: 2px dashed #9ab89a; border-radius: 6px; padding: 5px 9px 3px; cursor: pointer;
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px; position: relative; }
.el-w small { font-size: 14px; color: #c8d8c0; min-height: 14px; }
.el-w.on { border-style: solid; border-color: var(--el); background: color-mix(in srgb, var(--el) 35%, #2c4a2e); }
.el-w.on small { color: #fff; background: var(--el); border-radius: 3px; padding: 0 5px; }
.el-w.right { box-shadow: 0 0 0 3px #8ae070; } .el-w.wrong { box-shadow: 0 0 0 3px #ff7a6a; }
.el-w ins { font-size: 14px; color: #fff; background: #2f7a2a; border-radius: 3px; padding: 0 5px; }
.el-off { font-size: 25px; color: #b8c8b0; padding: 5px 4px 19px; }
.el-w[disabled] { cursor: default; }
.el-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.el-tag { width: auto; min-height: 42px; flex-direction: row; gap: 7px; cursor: pointer; padding: 3px 12px 5px; border-color: var(--el); box-shadow: inset 0 -6px 0 var(--el), 0 3px 0 #0006; }
.el-tag.sel { background: var(--el); color: #fff; transform: translateY(-3px); box-shadow: 0 0 0 3px #f8d860, 0 5px 0 #0006; }
#belso:not(.land) .el-w, #belso:not(.land) .el-off { font-size: 19px; } #belso:not(.land) .el-tag { min-height: 38px; font-size: 16px; }

/* ---------- Drámák Színháza: színlap, jelenetkártyák, színpad ---------- */
.sz-bill { width: min(620px, 100%); box-sizing: border-box; background: #f4e4c0; color: #2a1408; border: 4px double #7a1a1e; outline: 3px solid #2a1408; border-radius: 3px; box-shadow: 0 6px 0 #0007; padding: 8px 14px 10px; }
.sz-bill h4 { margin: 0 0 6px; font-weight: 400; font-size: 20px; text-align: center; color: #7a1a1e; line-height: 1.1; }
.sz-bill ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.sz-row { font: inherit; width: 100%; display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 2px 10px; text-align: left; font-size: 19px; color: inherit; background: #fff8e4; border: 2px solid #c8a868; border-radius: 4px; cursor: pointer; }
.sz-row em { font-style: normal; color: #7a1a1e; min-width: 22px; } .sz-row span { display: flex; flex-direction: column; } .sz-row small { font-size: 15px; color: #7a4a20; }
.sz-row.empty { border-style: dashed; background: rgba(255,248,228,.5); cursor: default; }
.sz-row.right { background: #d8f0c0; border-color: #2f7a2a; } .sz-row.wrong { background: #f6d0c8; border-color: #a8302a; } .sz-row[disabled] { cursor: default; }
.sz-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.sz-card { width: auto; min-height: 44px; flex-direction: row; gap: 8px; cursor: pointer; font-size: 17px; max-width: 360px; text-align: left; background: #2a1408; color: #f4e4c0; border-color: #c8a040; }
.sz-card:hover { background: #4a2414; } .sz-card.used { display: none; }
.sz-stage { margin: 0; width: min(680px, 100%); box-sizing: border-box; text-align: center; background: radial-gradient(ellipse at 50% 30%, #fff4c8 0%, #f0d890 55%, #c89a40 100%); color: #2a1408;
  border: 6px solid #8a1a1e; border-radius: 10px 10px 4px 4px; box-shadow: 0 8px 0 #0007; padding: 14px 18px 10px; }
.sz-stage blockquote { margin: 0; font-size: 26px; line-height: 1.2; }
.sz-stage figcaption { margin-top: 6px; font-size: 17px; color: #6a2a10; }
.sz-masks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: min(620px, 100%); }
.sz-mask i { font-style: normal; font-size: 20px; }
#belso:not(.land) .sz-stage blockquote { font-size: 20px; } #belso:not(.land) .sz-row { font-size: 16px; } #belso:not(.land) .sz-card { font-size: 15px; }

/* ---------- Kereskedők Piaca: standok és kosár ---------- */
.pc-q { margin: 0; font-weight: 400; font-size: 23px; color: #fff4d8; text-shadow: 2px 0 0 #1c140c, -2px 0 0 #1c140c, 0 2px 0 #1c140c, 0 -2px 0 #1c140c; }
#belso:not(.land) .pc-q { color: #7a4a20; text-shadow: none; font-size: 19px; }
.pc-stalls { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 12px; width: 100%; }
.pc-stall { display: flex; flex-direction: column; min-height: 120px; background: #f6ead0; border: 3px solid #4a2e18; border-radius: 4px 4px 8px 8px; box-shadow: 0 5px 0 #0006; cursor: pointer; overflow: hidden; }
.pc-stall header { text-align: center; font-size: 21px; color: #fff; padding: 6px 4px 12px; background: repeating-linear-gradient(90deg, var(--aw) 0 18px, var(--aw2) 18px 36px);
  text-shadow: 2px 0 0 #1c140c, -2px 0 0 #1c140c, 0 2px 0 #1c140c, 0 -2px 0 #1c140c; clip-path: polygon(0 0, 100% 0, 100% 78%, 94% 100%, 88% 78%, 82% 100%, 76% 78%, 70% 100%, 64% 78%, 58% 100%, 52% 78%, 46% 100%, 40% 78%, 34% 100%, 28% 78%, 22% 100%, 16% 78%, 10% 100%, 4% 78%, 0 100%); }
.pc-stall header kbd { font-family: inherit; font-size: 14px; background: #fff8e4; color: #4a2e18; border-radius: 3px; padding: 0 4px; margin-right: 6px; text-shadow: none; }
.pc-stall.drop { box-shadow: 0 0 0 3px #f8d860, 0 5px 0 #0006; } .pc-stall.drop:hover { background: #fff6dc; }
.pc-goods { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 5px; padding: 6px; flex: 1; }
.pc-basket { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; width: 100%; min-height: 50px; box-sizing: border-box; background: repeating-linear-gradient(45deg, #9a6a3a 0 8px, #8a5a2e 8px 16px); border: 3px solid #4a2e18; border-radius: 0 0 30px 30px; padding: 8px 10px 14px; }
.pc-item { font: inherit; font-size: 19px; line-height: 1; color: #2a1e12; background: #fff8e4; border: 2px solid #4a2e18; border-radius: 14px; box-shadow: 0 3px 0 #0005; padding: 4px 11px 6px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.pc-item kbd { font-family: inherit; font-size: 13px; color: #7a4a20; border: 1px solid #c9a66c; border-radius: 3px; padding: 0 3px; }
.pc-item.sel { background: #fff0a8; transform: translateY(-4px); box-shadow: 0 0 0 3px #f8d860, 0 6px 0 #0005; }
.pc-item.right { background: #d8f0c0; border-color: #2f7a2a; } .pc-item.wrong { background: #f6d0c8; border-color: #a8302a; }
.pc-item ins { font-size: 14px; color: #fff; background: #2f7a2a; border-radius: 3px; padding: 0 4px; } .pc-item[disabled] { cursor: default; }
.pc-empty { color: #f4e4c4; font-size: 17px; }
#belso:not(.land) .pc-stalls { gap: 6px; } #belso:not(.land) .pc-stall header { font-size: 16px; } #belso:not(.land) .pc-stall { min-height: 90px; } #belso:not(.land) .pc-item { font-size: 16px; }

/* ---------- Nyelvek Fogadója: beszélgetés ---------- */
.fg-chat { width: min(640px, 100%); box-sizing: border-box; flex: 1 1 auto; min-height: 120px; max-height: 100%; overflow-y: auto; display: flex; flex-direction: column; gap: 7px;
  background: rgba(40,24,12,.72); border: 3px solid #2a160c; border-radius: 10px; padding: 10px 12px; }
.fg-chat h5 { margin: 0 0 2px; font-weight: 400; font-size: 18px; color: #e8c050; text-align: center; }
.fg-b { max-width: 82%; font-family: 'Atkinson Hyperlegible', system-ui, sans-serif; font-size: 17px; line-height: 1.25; padding: 5px 11px 7px; border-radius: 12px; border: 2px solid #2a160c; position: relative; animation: fgIn .25s ease-out both; }
.fg-b b { display: block; font-family: 'Jersey 10', system-ui, sans-serif; font-weight: 400; font-size: 15px; color: #7a4a20; }
.fg-a { align-self: flex-start; background: #f6ecd0; border-bottom-left-radius: 2px; }
.fg-b.fg-b { } .fg-b:not(.fg-a) { align-self: flex-end; background: #dfeef8; border-bottom-right-radius: 2px; }
.fg-b.ok { background: #d8f0c0; } .fg-b.fix { background: #fde8c8; }
.fg-wait { opacity: .7; } .fg-wait b + * { }
@keyframes fgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.fg-opts { display: flex; flex-direction: column; gap: 7px; width: min(640px, 100%); }
.fg-opt { font-family: 'Atkinson Hyperlegible', system-ui, sans-serif; font-size: 17px; }
.fg-opts.shake { animation: fgShake .35s; }
@keyframes fgShake { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
#belso:not(.land) .fg-chat { max-height: 34vh; } #belso:not(.land) .fg-b, #belso:not(.land) .fg-opt { font-size: 15px; }

/* ---------- Fordítók Tornya: tekercs, mondatsor, szókártyák ---------- */
.mt-scroll { margin: 0; width: min(640px, 100%); box-sizing: border-box; text-align: center; background: #f4e8c8; color: #2a1e12; border-top: 10px solid #8a5a2a; border-bottom: 10px solid #8a5a2a; border-radius: 4px; box-shadow: 0 6px 0 #0007; padding: 8px 18px 10px; }
.mt-scroll figcaption { font-size: 18px; color: #7a4a20; } .mt-scroll blockquote { margin: 4px 0 0; font-family: 'Atkinson Hyperlegible', system-ui, sans-serif; font-size: 21px; line-height: 1.25; }
.mt-line { width: min(720px, 100%); box-sizing: border-box; min-height: 56px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 7px 10px; background: rgba(251,244,226,.92); border: 3px dashed #6b4526; border-radius: 8px; }
.mt-line.right { border: 3px solid #2f7a2a; background: #e4f6d4; } .mt-line.wrong { border: 3px solid #a8302a; background: #fae2dc; }
.mt-ph { color: #8a7a5a; font-size: 18px; } .mt-end { font-size: 24px; }
.mt-pool { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; width: min(720px, 100%); }
.mt-t { width: auto; min-height: 40px; flex-direction: row; gap: 6px; cursor: pointer; padding: 3px 12px 5px; font-size: 20px; }
.mt-t.in { background: #fff8e4; box-shadow: 0 2px 0 #0005; } .mt-t.used { opacity: .25; }
.mt-sol { margin: 0; font-size: 19px; color: #fff4d8; text-shadow: 2px 0 0 #1c140c, -2px 0 0 #1c140c, 0 2px 0 #1c140c, 0 -2px 0 #1c140c; } .mt-sol b { font-weight: 400; color: #b8f0a0; }
#belso:not(.land) .mt-sol { color: #2f7a2a; text-shadow: none; } #belso:not(.land) .mt-t { font-size: 17px; min-height: 36px; }

/* ---------- Királyi Posta: levél ---------- */
.pt-letter { position: relative; width: min(680px, 100%); box-sizing: border-box; background: #fffaf0; color: #22262e; border: 2px solid #8a8070; box-shadow: 0 6px 0 #0007, inset 0 0 0 6px #fffaf0, inset 0 0 0 7px #e0d8c8; padding: 12px 22px 14px; }
.pt-letter h4 { margin: 0 0 4px; font-weight: 400; font-size: 18px; color: #6a6e78; text-transform: uppercase; letter-spacing: .05em; }
.pt-letter p { margin: 0; font-family: 'Atkinson Hyperlegible', system-ui, sans-serif; font-size: 17px; line-height: 1.85; }
.pt-stamp { position: absolute; right: 12px; top: 8px; font-size: 16px; color: #a8202a; border: 2px solid #a8202a; border-radius: 4px; padding: 0 7px 1px; transform: rotate(6deg); text-transform: uppercase; }
.pt-stamp.friendly { color: #2a6a3a; border-color: #2a6a3a; }
.pt-gap { font: inherit; font-size: inherit; line-height: 1.2; color: #1a2a5a; background: #f6efe0; border: none; border-bottom: 2px solid #6b4526; border-radius: 3px 3px 0 0; padding: 0 6px; min-width: 70px; cursor: pointer; }
.pt-gap.empty { background: rgba(200,168,104,.22); border-bottom-style: dashed; } .pt-gap.sel { background: #fff0a8; box-shadow: 0 0 0 2px #e8c050; }
.pt-gap.right { background: #d8f0c0; border-bottom-color: #2f7a2a; } .pt-gap.wrong { background: #f6d0c8; border-bottom-color: #a8302a; text-decoration: line-through; }
.pt-gap ins { display: inline-block; color: #fff; background: #2f7a2a; border-radius: 3px; padding: 0 5px; margin-left: 4px; text-decoration: none; } .pt-gap[disabled] { cursor: default; }
.pt-opts { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; width: min(680px, 100%); }
.pt-opt { font-family: 'Atkinson Hyperlegible', system-ui, sans-serif; font-size: 17px; } .pt-opt.on { background: #fff0a8; border-color: #c08a1a; }
.pt-post { position: absolute; right: 18px; bottom: 6px; font-style: normal; font-size: 38px; color: #a8202a; transform: rotate(-10deg); animation: dpStamp .35s ease-out both; }
#belso:not(.land) .pt-letter { padding: 10px 12px 12px; } #belso:not(.land) .pt-letter p { font-size: 15px; }

/* ---------- Számok Tornya / Geometria Műhelye / Esélyek Csarnoka: feladatlap, válaszmezők, billentyűzet ---------- */
.sm-card { width: min(640px, 100%); box-sizing: border-box; display: flex; align-items: center; gap: 14px; background: #f6ecd0; color: #2a1e12; border: 3px solid #4a2e18; border-radius: 8px; box-shadow: 0 6px 0 #0007; padding: 10px 14px; }
.sm-q { margin: 0; flex: 1; font-size: 23px; line-height: 1.2; }
.sm-col.torony .sm-card { background: linear-gradient(#1e2a4a, #16203a); color: #e8f4ff; border-color: #c8a040; box-shadow: 0 0 18px #58d0e860, 0 6px 0 #0007; }
.sm-col.esely .sm-card { background: #f4ead0; border-color: #6a3a1a; }
.ab-svg { width: 190px; flex: none; height: auto; } .ab-t { font-family: 'Jersey 10', system-ui, sans-serif; font-size: 17px; fill: #3a2614; } .ab-q .ab-t { fill: #b8282e; font-size: 20px; }
.sm-ans { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.sm-f { display: flex; align-items: center; gap: 6px; background: #fff8e4; border: 3px solid #4a2e18; border-radius: 6px; padding: 3px 10px; font-size: 24px; cursor: text; box-shadow: 0 3px 0 #0005; }
.sm-f.cur { box-shadow: 0 0 0 3px #e8c050, 0 3px 0 #0005; } .sm-f.right { background: #d8f0c0; border-color: #2f7a2a; } .sm-f.wrong { background: #f6d0c8; border-color: #a8302a; }
.sm-f output { min-width: 80px; font-size: 26px; text-align: right; color: #1a2a5a; } .sm-f em { font-style: normal; color: #6a5236; font-size: 19px; }
.sm-f ins { color: #fff; background: #2f7a2a; border-radius: 4px; padding: 0 6px; font-size: 20px; }
.sm-caret { display: inline-block; width: 2px; height: 22px; background: #1a2a5a; margin-left: 2px; vertical-align: -3px; animation: smBlink 1s steps(2) infinite; }
@keyframes smBlink { 50% { opacity: 0; } }
.sm-keys { display: grid; grid-template-columns: repeat(5, 54px); gap: 6px; }
.sm-k { font: inherit; font-size: 24px; height: 46px; border: 3px solid #4a2e18; border-radius: 6px; background: #f6ead0; color: #2a1e12; box-shadow: 0 3px 0 #0006; cursor: pointer; }
.sm-k:hover { background: #fff6dc; } .sm-k:active { transform: translateY(2px); box-shadow: 0 1px 0 #0006; } .sm-k.del { background: #e8c8b8; } .sm-k.wide { padding: 0 12px; font-size: 18px; }
.sm-steps { margin: 0; width: min(640px, 100%); box-sizing: border-box; background: #fff8e4; border: 2px solid #c9a66c; border-left-width: 6px; border-radius: 4px; padding: 6px 12px 6px 34px; font-size: 19px; line-height: 1.45; }
.sm-sim p { margin: 0; background: #2a1a10; color: #f8ecd0; border-radius: 6px; padding: 5px 10px; font-size: 17px; } .sm-sim b { font-weight: 400; color: #f8d860; }
#belso:not(.land) .sm-card { flex-direction: column; } #belso:not(.land) .sm-q { font-size: 19px; } #belso:not(.land) .sm-keys { grid-template-columns: repeat(5, 1fr); width: 100%; }
/* képletek */
.mf { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; margin: 0 2px; line-height: 1; }
.mf > span:first-child { border-bottom: 2px solid currentColor; padding: 0 3px 1px; } .mf > span:last-child { padding: 1px 3px 0; }
.ms > span { border-top: 2px solid currentColor; padding: 0 2px; }
sup, sub { font-size: .7em; line-height: 0; }

/* ---------- Függvények Obszervatóriuma: a rács a nagy ablakon ---------- */
.gr-col { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.gr-board { width: 100%; max-width: 520px; }
#belso.land .gr-board { position: absolute; left: var(--bl-gw0-x); top: var(--bl-gw0-y); width: calc(var(--bl-gw1-x) - var(--bl-gw0-x)); height: calc(var(--bl-gw1-y) - var(--bl-gw0-y)); max-width: none; display: flex; align-items: center; justify-content: center; }
.gr-svg { display: block; width: 100%; height: 100%; max-height: 100%; }
.gr-bg { fill: #fbf2d8; fill-opacity: .9; stroke: #3a2614; stroke-width: 2; }
.gr-l { stroke: #c8b48a; stroke-width: 1; } .gr-l.ax { stroke: #3a2614; stroke-width: 2; }
.gr-n { font-family: 'Jersey 10', system-ui, sans-serif; font-size: 12px; fill: #5a4630; text-anchor: middle; } .gr-ax { font-size: 15px; fill: #3a2614; }
.gr-f { fill: none; stroke: #2a5aa8; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.gr-f.gold { stroke: #c08a1a; } .gr-f.right { stroke: #2f7a2a; } .gr-f.wrong { stroke: #a8302a; }
.gr-target { fill: none; stroke: #7a3a9a; stroke-width: 3; stroke-dasharray: 7 6; stroke-linecap: round; }
.gr-dot { fill: #c08a1a; stroke: #3a2614; stroke-width: 1.5; }
.gr-ctl { display: flex; flex-direction: column; align-items: center; gap: 8px; width: min(700px, 100%); }
#belso.land .gr-ctl { position: absolute; left: 50%; transform: translateX(-50%); bottom: 12px; width: min(820px, 70vw); }
.gr-opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; width: 100%; }
.gr-opt { justify-content: center; font-size: 22px; } .gr-opt span { white-space: nowrap; }
.gr-formula { margin: 0; font-size: 26px; background: #2a1a10; color: #f8e4b0; border: 3px solid #c8a040; border-radius: 6px; padding: 2px 16px 4px; }
.gr-formula small { font-size: 18px; color: #c8a868; margin-right: 6px; }
.gr-hint { margin: 0; font-size: 18px; color: #fff4d8; text-shadow: 2px 0 0 #1c140c, -2px 0 0 #1c140c, 0 2px 0 #1c140c, 0 -2px 0 #1c140c; }
#belso:not(.land) .gr-hint { color: #6a5236; text-shadow: none; font-size: 16px; }
.gr-pad { display: flex; gap: 8px; } .gr-pad .sm-k { width: 54px; } .gr-pad .sm-k.wide { width: auto; }
#belso:not(.land) .gr-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); } #belso:not(.land) .gr-formula { font-size: 21px; }

/* ---------- Logika Labirintusa: kérdés a boltív alatt, válaszok az ajtókon ---------- */
.lb-col { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lb-q { margin: 0; max-width: min(760px, 100%); text-align: center; background: #2a2e38; color: #f4ecd8; border: 3px solid #12141a; outline: 2px solid #8a8e98; border-radius: 6px; box-shadow: 0 6px 0 #0008; padding: 6px 14px 8px; font-size: 22px; line-height: 1.2; }
#belso.land .lb-col .lb-q { position: absolute; left: 50%; transform: translateX(-50%); top: max(calc(max(10px, env(safe-area-inset-top)) + 140px), calc(var(--bl-arch-y) - 30px)); width: max-content; }
.lb-doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; }
.lb-door { font: inherit; font-size: 19px; line-height: 1.1; color: #2a1e12; cursor: pointer; min-height: 70px; background: #e8d8b0; border: 3px solid #3a2614; border-radius: 6px; box-shadow: 0 4px 0 #0008; padding: 6px 8px 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; position: relative; transition: transform .15s; }
.lb-door:hover:not([disabled]) { transform: translateY(-3px); background: #fff2c8; }
#belso.land .lb-door { position: absolute; left: var(--dx); top: var(--dy); transform: translate(-50%, -50%); width: 14vw; max-width: 220px; min-height: 0; background: #f0e2b8; }
#belso.land .lb-door:hover:not([disabled]) { transform: translate(-50%, -54%); }
.lb-door.open { background: #fff4b0; box-shadow: 0 0 0 4px #f8d860, 0 0 40px 12px #f8e08899, 0 4px 0 #0008; }
.lb-door.locked { background: #d8b8b0; filter: grayscale(.4); animation: fgShake .4s; } .lb-door.locked::after { content: '🔒'; position: absolute; top: -18px; right: -10px; font-size: 26px; }
.lb-door.shut { opacity: .7; } .lb-door[disabled] { cursor: default; }
#belso.land .lb-col .io-act { position: absolute !important; left: 50%; bottom: 14px !important; transform: translateX(-50%) !important; }
#belso.land .lb-note { position: absolute; left: 50%; transform: translateX(-50%); bottom: 72px; width: min(640px, 60vw); }
#belso:not(.land) .lb-doors { grid-template-columns: 1fr; } #belso:not(.land) .lb-q { font-size: 18px; }
/* Venn-diagram */
.vn-board { position: relative; width: min(560px, 100%); aspect-ratio: 3 / 2; cursor: default; }
.vn-board.drop { cursor: crosshair; } .vn-board svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.vn-u { fill: #2a2e38; fill-opacity: .9; stroke: #8a8e98; stroke-width: 3; }
.vn-a { fill: #c8303a; fill-opacity: .28; stroke: #f08080; stroke-width: 3; } .vn-b { fill: #2a7ac8; fill-opacity: .28; stroke: #80b8f0; stroke-width: 3; }
.vn-board.drop .vn-a, .vn-board.drop .vn-b { animation: vnGlow 1.2s ease-in-out infinite; }
@keyframes vnGlow { 50% { fill-opacity: .42; } }
.vn-t { font-family: 'Jersey 10', system-ui, sans-serif; font-size: 16px; fill: #c8ccd4; }
.vn-name { position: absolute; top: 3%; font-size: 15px; color: #fff; background: #0008; border-radius: 3px; padding: 0 6px; white-space: nowrap; pointer-events: none; }
.vn-name.a { left: 8%; } .vn-name.b { right: 3%; }
.vn-zone { position: absolute; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 4px; pointer-events: none; }
.vn-zone > * { pointer-events: auto; }
.z-a { left: 15%; top: 28%; width: 21%; height: 44%; } .z-ab { left: 42%; top: 28%; width: 16%; height: 44%; } .z-b { left: 64%; top: 28%; width: 21%; height: 44%; }
.z-none { left: 2%; right: 2%; bottom: 3%; height: 14%; flex-wrap: nowrap; }
.vn-chip { font: inherit; font-size: 19px; line-height: 1; min-width: 32px; color: #2a1e12; background: #fff8e4; border: 2px solid #3a2614; border-radius: 50%; padding: 5px 6px 7px; cursor: pointer; box-shadow: 0 2px 0 #0006; position: relative; }
.vn-chip.sel { background: #fff0a8; box-shadow: 0 0 0 3px #f8d860; transform: translateY(-3px); }
.vn-chip.right { background: #d8f0c0; border-color: #2f7a2a; } .vn-chip.wrong { background: #f6d0c8; border-color: #a8302a; }
.vn-chip ins { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); white-space: nowrap; font-size: 12px; color: #fff; background: #2f7a2a; border-radius: 3px; padding: 0 3px; z-index: 1; }
.vn-pool { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; min-height: 36px; }

/* ---------- épületmenü (js/jatekok/epuletmenu.js): szint, játék, témakör, haladás ---------- */
.em-col { display: flex; flex-direction: column; align-items: center; gap: 10px; }
#belso.land .em-col { position: absolute; left: 50%; transform: translateX(-50%); top: calc(max(10px, env(safe-area-inset-top)) + 150px); bottom: 12px; width: min(820px, 66vw); }
.em-card { width: 100%; min-height: 0; flex: 1 1 auto; overflow-y: auto; scrollbar-width: thin; background: #f1e6cc; border: 4px solid #4a2e18; border-radius: 10px; box-shadow: 0 6px 0 #0006; padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 10px; color: #3a2a1a; }
#belso:not(.land) .em-card { border: none; box-shadow: none; padding: 0; overflow: visible; }
.em-col > .io-act { position: static !important; transform: none !important; flex-wrap: wrap; }
.em-tabs, .em-modes { display: flex; gap: 8px; flex-wrap: wrap; }
:is(.em-tab, .em-mode, .em-row, .em-alt) { font: inherit; color: #3a2a1a; cursor: pointer; border: 2px solid #8a6a40; background: #fff8e4; border-radius: 6px; text-align: left; }
:is(.em-tab, .em-mode, .em-row, .em-alt):hover:not([disabled]) { background: #fff2cc; }
:is(.em-tab, .em-mode, .em-alt)[disabled] { opacity: .5; cursor: default; }
.em-tab { flex: 1 1 0; min-width: 150px; font-size: 21px; padding: 5px 12px 7px; display: flex; flex-direction: column; box-shadow: 0 3px 0 #0003; }
.em-tab small, .em-mode small { font-size: 15px; color: #7a5a30; }
.em-tab.on { background: #4a8a3a; border-color: #2a4a1e; color: #fff; } .em-tab.on small { color: #e4f4d4; }
.em-tab.emelt.on { background: #7a1a2a; border-color: #3a0a12; } .em-tab.emelt.on small { color: #f8e4b0; }
.em-sum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px 8px; text-align: center; background: #e8d8b4; border-radius: 6px; padding: 6px 8px 8px; }
.em-sum b { display: block; font-weight: 400; font-size: 26px; line-height: 1; } .em-sum span { font-size: 15px; color: #6a4a28; }
.em-sum .em-bar { grid-column: 1 / -1; }
.em-sec h4 { margin: 0 0 5px; font-weight: 400; font-size: 17px; color: #7a4a20; text-transform: uppercase; letter-spacing: .05em; }
.em-mode { flex: 1 1 0; min-width: 140px; padding: 5px 10px 8px; display: flex; flex-direction: column; gap: 3px; }
.em-mode b { font-weight: 400; font-size: 20px; }
.em-mode.on { border-color: #2a4a1e; box-shadow: 0 0 0 3px #4a8a3a; }
.em-topics { display: flex; flex-direction: column; gap: 5px; }
.em-row { display: grid; grid-template-columns: 1fr auto 120px; align-items: center; gap: 10px; padding: 5px 10px 6px; font-size: 18px; }
.em-row.on { border-color: #2a4a1e; box-shadow: 0 0 0 3px #4a8a3a; background: #f4fbe8; }
.em-name { line-height: 1.1; } .em-name em { font-style: normal; } .em-num { font-size: 16px; color: #6a4a28; white-space: nowrap; }
.em-alts { display: flex; flex-wrap: wrap; gap: 5px; padding: 2px 0 4px 14px; }
.em-alt { font-size: 16px; padding: 2px 9px 4px; } .em-alt small { color: #7a5a30; font-size: 14px; }
.em-alt.on { background: #4a8a3a; border-color: #2a4a1e; color: #fff; } .em-alt.on small { color: #e4f4d4; }
.em-alt.kesz:not(.on) { border-color: #2f7a2a; }
.em-bar { position: relative; display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: #d8c8a4; border: 1px solid #8a6a40; }
.em-bar i { background: #4a8a3a; } .em-bar u { background: #c86a4a; }
.em-bar.big { height: 12px; }
@media (max-width: 560px) { .em-row { grid-template-columns: 1fr auto; } .em-row .em-bar { grid-column: 1 / -1; } .em-sum b { font-size: 22px; } .em-tab { min-width: 0; font-size: 18px; } }

/* ---------- alacsony fekvő képernyő (telefon fektetve): tömörebb ---------- */
@media (max-height: 520px) {
  #belso.land :is(.ol-wrap, .kc-col, .vs-col, .jv-col, .el-col, .sz-col, .pc-col, .fg-col, .mt-col, .pt-col, .sm-col, .vn-col) { top: calc(max(8px, env(safe-area-inset-top)) + 108px); gap: 6px; }
  .ol-book p, .jv-page p, .pt-letter p { font-size: 14px; } .ol-qt, .sm-q { font-size: 17px; } .kc-plaque blockquote, .sz-stage blockquote { font-size: 19px; }
  :is(.ol-opt, .kc-opt, .sz-mask, .fg-opt, .pt-opt, .gr-opt, .jv-ch) { min-height: 34px; font-size: 15px; } .sm-k { height: 34px; font-size: 19px; } .sm-keys { grid-template-columns: repeat(5, 44px); }
  .el-w { font-size: 19px; } .pc-stall { min-height: 80px; } .ab-svg { width: 130px; }
}

/* keskeny telefon: a hosszú épületnév ne tolja ki a fejlécből a számlálót és a kilépést */
@media (max-width: 560px) { .bl-head { gap: 6px; padding-left: 10px; } .bl-head b { font-size: 19px; min-width: 0; overflow: hidden; text-overflow: ellipsis; } .bl-lvl { font-size: 12px; padding: 2px 5px 3px; } }

/* ---------- élő eredménylap: csillagok, érmék ---------- */
.io-stars { display: flex; justify-content: center; gap: 6px; margin: -4px 0 2px; font-size: 46px; line-height: 1; }
.io-stars span { color: #c8b890; text-shadow: 0 3px 0 #0004; }
.io-stars span.on { color: #f4c430; text-shadow: 0 0 0 #8a5a10, 2px 2px 0 #8a5a10, -2px 2px 0 #8a5a10, 0 4px 0 #0005; animation: ioStar .55s cubic-bezier(.2, 1.8, .4, 1) var(--d) both; }
.io-stars span:nth-child(2) { font-size: 1.2em; transform: translateY(-6px); } .io-stars span.on:nth-child(2) { animation-name: ioStar2; }
@keyframes ioStar { from { transform: scale(0) rotate(-90deg); opacity: 0; } }
@keyframes ioStar2 { from { transform: translateY(-6px) scale(0) rotate(-90deg); opacity: 0; } to { transform: translateY(-6px); } }
.io-result .io-seal { position: absolute; right: 14px; top: 10px; width: 72px; height: 72px; margin: 0; animation-delay: 1.3s; }
.io-result { position: relative; }
#belso:not(.land) .io-result .io-seal { right: 0; top: 0; width: 56px; height: 56px; }
.io-coin { position: fixed; left: 0; top: 0; z-index: 60; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff4b0 0 20%, #f0c040 21% 60%, #a87810 61%); border: 2px solid #6a4a08; pointer-events: none; }
.io-quest { color: #6a3a10; }
@media (prefers-reduced-motion: reduce) { .io-stars span.on, .io-seal { animation: none !important; } }
.em-stars { font-style: normal; white-space: nowrap; font-size: 15px; letter-spacing: -1px; } .em-stars i { font-style: normal; color: #c8b890; } .em-stars i.on { color: #e0a820; text-shadow: 1px 1px 0 #8a5a10; }

/* ---------- negyedek stílusa (#belso[data-q], belso.js): pergamen és viasz · márvány és arany · kikötői fa és kötél · réz és csillagtérkép ---------- */
#belso[data-q] { --t-paper: #f1e6cc; --t-pat: none; --t-edge: #4a2e18; --t-head: #f1e6cc; --t-head-ink: #3a2a1a; --t-muted: #7a4a20; --t-btn: #4a8a3a; --t-btn-edge: #2a4a1e; --t-ghost: #d8c8a4; --t-on: #4a8a3a; --t-on-edge: #2a4a1e; --t-ring: none; }
#belso[data-q="tori"], #belso[data-q="foter"] { --t-pat: repeating-linear-gradient(0deg, #0000 0 5px, #8a6a400d 5px 6px), radial-gradient(circle at 20% 10%, #fff8 0, #0000 40%);
  --t-btn: #a8262c; --t-btn-edge: #5a0e12; --t-on: #a8262c; --t-on-edge: #5a0e12; --t-head: #7a1a1e; --t-head-ink: #f8e4b0; --t-ring: inset 0 0 0 2px #c8a050; }
#belso[data-q="magyar"] { --t-paper: #f6f3ec; --t-pat: linear-gradient(115deg, #0000 40%, #9a94881a 41%, #0000 43%), linear-gradient(160deg, #0000 62%, #9a948814 63%, #0000 66%), linear-gradient(35deg, #0000 20%, #b0a89a12 21%, #0000 24%);
  --t-edge: #8a6a2a; --t-muted: #6a5a30; --t-btn: #24467a; --t-btn-edge: #0e2040; --t-ghost: #e8e2d2; --t-on: #24467a; --t-on-edge: #0e2040; --t-head: #f6f3ec; --t-head-ink: #24467a; --t-ring: inset 0 0 0 2px #e0c070, inset 0 0 0 4px #f6f3ec, inset 0 0 0 5px #c8a040; }
#belso[data-q="angol"] { --t-paper: #ecdcbc; --t-pat: repeating-linear-gradient(0deg, #0000 0 26px, #6a4a2224 26px 28px), repeating-linear-gradient(90deg, #0000 0 140px, #6a4a2218 140px 142px);
  --t-edge: #3a2414; --t-muted: #6a4220; --t-btn: #1f6a7a; --t-btn-edge: #0c3640; --t-ghost: #dcc8a0; --t-on: #1f6a7a; --t-on-edge: #0c3640; --t-head: #5a3a1e; --t-head-ink: #f4e4c4; --t-ring: inset 0 0 0 3px #c8a060, inset 0 0 0 5px #0000; }
#belso[data-q="matek"] { --t-paper: #e6e9f0; --t-pat: radial-gradient(circle at 12% 18%, #8a4a1e55 0 1.5px, #0000 2px), radial-gradient(circle at 78% 32%, #8a4a1e44 0 1.5px, #0000 2px), radial-gradient(circle at 42% 76%, #8a4a1e44 0 1px, #0000 1.5px),
    radial-gradient(circle at 70% 30%, #0000 0 120px, #6a7a9a26 121px 122px, #0000 123px), radial-gradient(circle at 70% 30%, #0000 0 220px, #6a7a9a1c 221px 222px, #0000 223px);
  --t-edge: #8a4a1e; --t-muted: #6a4a2a; --t-btn: #b8682a; --t-btn-edge: #5a2a0a; --t-ghost: #d8d4cc; --t-on: #b8682a; --t-on-edge: #5a2a0a; --t-head: #1c2638; --t-head-ink: #f0d8b0; --t-ring: inset 0 0 0 2px #d8945a; }
#belso[data-q="kamra"] { --t-paper: #f4ecf6; --t-edge: #3a1e3a; --t-muted: #7a4a7a; --t-btn: #6a2a6a; --t-btn-edge: #2a0a2a; --t-ghost: #e2d4e2; --t-on: #6a2a6a; --t-on-edge: #2a0a2a;
  --t-head: #3a1e4a; --t-head-ink: #f4d890; --t-ring: inset 0 0 0 2px #c8a050; }
#belso[data-q] .bl-head { background: var(--t-head); color: var(--t-head-ink); border-color: var(--t-edge); box-shadow: var(--t-ring), 0 4px 0 #0006; }
#belso[data-q] .bl-head span { color: color-mix(in srgb, var(--t-head-ink) 75%, var(--t-head)); }
#belso[data-q] .bl-x { background: var(--t-ghost); border-color: var(--t-edge); }
#belso[data-q] .bl-say { border-color: var(--t-edge); box-shadow: var(--t-ring), 0 4px 0 #0005; } #belso[data-q] .bl-say b { color: var(--t-muted); }
#belso[data-q] :is(.em-card, .io-result) { background-color: var(--t-paper); background-image: var(--t-pat); border-color: var(--t-edge); box-shadow: var(--t-ring), 0 6px 0 #0006; }
#belso[data-q]:not(.land) .bl-ui { background-color: var(--t-paper); background-image: var(--t-pat); border-top-color: var(--t-edge); }
#belso[data-q]:not(.land) :is(.em-card, .io-result) { box-shadow: none; background: none; }
#belso[data-q] .io-btn:not(.io-ghost):not([disabled]) { background: var(--t-btn); border-color: var(--t-btn-edge); }
#belso[data-q] .io-btn.io-ghost { background: var(--t-ghost); border-color: var(--t-edge); }
#belso[data-q] :is(.em-tab.on:not(.emelt), .em-alt.on) { background: var(--t-on); border-color: var(--t-on-edge); }
#belso[data-q] :is(.em-mode.on, .em-row.on) { border-color: var(--t-on-edge); box-shadow: 0 0 0 3px var(--t-on); background: #fffdf6; }
#belso[data-q] .em-sec h4, #belso[data-q] .em-num { color: var(--t-muted); }
#belso[data-q] .em-sum { background: color-mix(in srgb, var(--t-edge) 14%, #fff8); }
#belso[data-q] .io-stats div { border-color: color-mix(in srgb, var(--t-edge) 55%, #fff); }

/* ---------- Napi Csodakamra (jatekok/csodakamra.js) ---------- */
.ck-col { display: flex; flex-direction: column; align-items: center; gap: 10px; }
#belso.land .ck-col { position: absolute; left: 50%; transform: translateX(-50%); top: calc(max(10px, env(safe-area-inset-top)) + 150px); bottom: 12px; width: min(760px, 64vw); }
.ck-card { width: 100%; min-height: 0; overflow-y: auto; scrollbar-width: thin; background: #f4ecf6; background-image: radial-gradient(circle at 15% 10%, #fff8 0, #0000 45%); border: 4px solid #3a1e3a; border-radius: 10px;
  box-shadow: inset 0 0 0 2px #c8a050, 0 6px 0 #0006; padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 8px; color: #2a1a2a; }
#belso:not(.land) .ck-card { border: none; box-shadow: none; padding: 2px; background: none; }
.ck-col > .io-act, .ck-card .io-act { position: static !important; transform: none !important; flex-wrap: wrap; }
.ck-day { margin: 0; font-weight: 400; font-size: 18px; color: #7a4a7a; text-transform: uppercase; letter-spacing: .04em; }
.ck-h { margin: 6px 0 0; font-weight: 400; font-size: 18px; color: #7a4a7a; }
.ck-muted { margin: 0; font-size: 17px; color: #5a4a5a; }
.ck-big { margin: 0; font-size: 56px; line-height: 1; text-align: center; color: #6a2a6a; text-shadow: 0 3px 0 #c8a05066; } .ck-big small { font-size: 22px; color: #7a4a7a; }
.ck-rang { margin: 0; text-align: center; font-size: 22px; color: #a8781a; }
.ck-legend { display: flex; flex-wrap: wrap; gap: 6px; }
.ck-tier { display: inline-block; font-size: 15px; line-height: 1; padding: 3px 8px 4px; border-radius: 4px; border: 2px solid #0006; color: #fff; white-space: nowrap; }
.ck-tier.gyakori { background: #7a7a84; } .ck-tier.ritka { background: #2a6aa8; } .ck-tier.niche { background: #7a3aa8; }
.ck-tier.legendas { background: linear-gradient(135deg, #f4c430, #c8801a); color: #3a2000; box-shadow: 0 0 8px #f4c43099; } .ck-tier.zero { background: #b8b0b8; }
.ck-arch { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.ck-ad { font: inherit; cursor: pointer; text-align: left; display: flex; flex-direction: column; padding: 4px 8px 6px; background: #fff; border: 2px solid #8a6a8a; border-radius: 6px; color: #2a1a2a; }
.ck-ad b { font-weight: 400; font-size: 18px; } .ck-ad span { font-size: 13px; color: #7a6a7a; } .ck-ad em { font-style: normal; font-size: 15px; color: #a8302a; } .ck-ad.done em { color: #2f7a2a; }
.ck-top { display: flex; align-items: center; gap: 10px; }
.ck-subj { font-size: 14px; padding: 2px 8px 3px; border-radius: 4px; color: #fff; white-space: nowrap; }
.ck-subj.tori { background: #c0503a; } .ck-subj.magyar { background: #b8902a; } .ck-subj.angol { background: #3a78b0; } .ck-subj.matek { background: #7050b0; }
.ck-time { position: relative; flex: 1; height: 16px; background: #d8c8d8; border: 2px solid #3a1e3a; border-radius: 8px; overflow: hidden; }
.ck-time i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(#5aaa4a, #3a8a3a); transition: width .1s linear; }
.ck-time b { position: absolute; right: 6px; top: -3px; font-weight: 400; font-size: 16px; color: #2a1a2a; } .ck-time.low i { background: linear-gradient(#e0504a, #a8302a); } .ck-time.low b { color: #fff; }
.ck-q h3 { margin: 4px 0 2px; font-weight: 400; font-size: 28px; line-height: 1.1; text-align: center; }
.ck-form { display: flex; gap: 8px; } .ck-form .io-btn { font-size: 20px; padding: 2px 14px 4px; }
.ck-in { flex: 1; min-width: 0; font: inherit; font-size: 24px; padding: 4px 12px 6px; border: 3px solid #3a1e3a; border-radius: 6px; background: #fff; color: #2a1a2a; user-select: text; -webkit-user-select: text; }
.ck-in:focus { outline: 3px solid #c8a050; outline-offset: 1px; }
.ck-in.shake { animation: ckShake .35s; } @keyframes ckShake { 25% { translate: -8px 0; } 50% { translate: 7px 0; } 75% { translate: -4px 0; } }
.ck-no { margin: 0; color: #a8302a; font-size: 18px; }
.ck-sug { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 19px; } .ck-sug .io-btn { font-size: 18px; padding: 1px 12px 3px; }
.ck-got { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 8px 12px; border-radius: 8px; background: #fff; border: 3px solid #7a7a84; animation: ckPop .4s cubic-bezier(.2, 1.6, .4, 1); }
.ck-got b { font-weight: 400; font-size: 26px; } .ck-plus { font-size: 26px; color: #2f7a2a; }
.ck-got.ritka { border-color: #2a6aa8; } .ck-got.niche { border-color: #7a3aa8; background: #f6eefc; } .ck-got.legendas { border-color: #c8801a; background: #fff6d8; box-shadow: 0 0 18px #f4c43099; } .ck-got.zero { border-color: #b8b0b8; } .ck-got.zero .ck-plus { color: #a8302a; }
@keyframes ckPop { from { transform: scale(.6); opacity: 0; } }
.ck-more p { margin: 0 0 4px; font-size: 16px; color: #5a4a5a; } .ck-more div { display: flex; gap: 8px; align-items: baseline; font-size: 16px; margin: 2px 0; } .ck-more div .ck-tier { flex: none; }
.ck-dots { display: flex; gap: 6px; justify-content: center; } .ck-dots i { width: 14px; height: 14px; border-radius: 50%; background: #fff6; border: 2px solid #3a1e3a; }
.ck-dots i.cur { background: #f4c430; } .ck-dots i.gyakori { background: #7a7a84; } .ck-dots i.ritka { background: #2a6aa8; } .ck-dots i.niche { background: #7a3aa8; } .ck-dots i.legendas { background: #f4c430; box-shadow: 0 0 6px #f4c430; } .ck-dots i.zero { background: #b8b0b8; }
#belso:not(.land) .ck-dots i { border-color: #8a6a8a; }
.ck-sum { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ck-sum li { display: grid; grid-template-columns: auto 1fr auto auto; gap: 8px; align-items: center; font-size: 15px; background: #fff9; border-radius: 6px; padding: 3px 6px; }
.ck-sq { color: #5a4a5a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ck-sum b { font-weight: 400; font-size: 17px; }
.ck-gain { margin: 0; text-align: center; font-size: 20px; color: #2f7a2a; }
@media (max-width: 560px) { .ck-sum li { grid-template-columns: auto 1fr auto; } .ck-sq { grid-column: 1 / -1; order: -1; white-space: normal; } .ck-q h3 { font-size: 23px; } }
/* Csodakamra: tömör előcsarnok és archívum-naptár (görgetés nélkül) */
#belso.land .ck-col.ck-fit { bottom: auto; }
.ck-lobby { overflow: visible; align-items: center; text-align: center; gap: 10px; }
.ck-rule { margin: 0; font-size: 19px; color: #3a2a3a; }
.ck-lobby .ck-legend { justify-content: center; }
.ck-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 52px)); gap: 5px; justify-content: center; }
.ck-ch { font-size: 14px; color: #7a4a7a; }
.ck-cd { font: inherit; cursor: pointer; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; border: 2px solid #8a6a8a; border-radius: 6px; background: #fff; color: #2a1a2a; padding: 0; }
.ck-cd b { font-weight: 400; font-size: 18px; } .ck-cd small { font-size: 12px; color: #7a6a7a; }
.ck-cd.l1 { background: #e4dce4; } .ck-cd.l2 { background: #c8dcf0; } .ck-cd.l3 { background: #dcc8f0; } .ck-cd.l4 { background: #f8e4a0; border-color: #c8801a; }
.ck-cd.today { box-shadow: 0 0 0 3px #c8a050; }
/* Csodakamra: Vándorút-térkép és a válaszok színes címkéi */
.ck-res { align-items: center; text-align: center; gap: 6px; overflow: visible; }
.ck-map { display: block; width: min(100%, calc(40vh * 16 / 9)); aspect-ratio: 16 / 9; image-rendering: pixelated; border: 3px solid #3a1e3a; border-radius: 6px; box-shadow: inset 0 0 0 2px #c8a050; background: #7a9a5a; }
#belso:not(.land) .ck-map { width: 100%; }
.ck-res .ck-big { font-size: 44px; } .ck-res .ck-rang { font-size: 19px; }
.ck-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; width: 100%; }
.ck-chip { font-size: 15px; line-height: 1.1; padding: 3px 6px 4px; border-radius: 4px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 2px solid #0004; }
.ck-chip.gyakori { background: #7a7a84; } .ck-chip.ritka { background: #2a6aa8; } .ck-chip.niche { background: #7a3aa8; } .ck-chip.legendas { background: #e0a820; color: #3a2000; } .ck-chip.zero { background: #b8b0b8; }
@media (max-width: 560px) { .ck-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Csodakamra – animációk: beúszó kérdés, pörgő pont, szikrák, kiszíneződő pöttyök, séta után sorban érkező címkék */
.ck-enter { animation: ckIn .45s cubic-bezier(.2, .9, .3, 1.15) both; } .ck-enter h3 { animation: ckUp .45s .12s ease-out both; } .ck-enter .ck-form { animation: ckUp .4s .22s ease-out both; }
@keyframes ckIn { from { transform: translateX(60px) rotate(1.5deg); opacity: 0; } }
@keyframes ckUp { from { transform: translateY(12px); opacity: 0; } }
.ck-lobby { animation: ckUp .45s ease-out both; } .ck-lobby .ck-legend .ck-tier { animation: ckPop .45s cubic-bezier(.2, 1.7, .4, 1) both; }
.ck-lobby .ck-legend .ck-tier:nth-child(2) { animation-delay: .12s; } .ck-lobby .ck-legend .ck-tier:nth-child(3) { animation-delay: .24s; } .ck-lobby .ck-legend .ck-tier:nth-child(4) { animation-delay: .36s; }
.ck-time.low { animation: ckThrob .5s ease-in-out infinite alternate; } @keyframes ckThrob { to { transform: scale(1.03); } }
.ck-got { position: relative; overflow: visible; }
.ck-got .ck-plus { display: inline-block; animation: ckFloat .9s ease-out both; } @keyframes ckFloat { 0% { transform: translateY(10px) scale(.6); opacity: 0; } 40% { transform: translateY(-6px) scale(1.25); opacity: 1; } 100% { transform: none; } }
.ck-got .ck-tier { animation: ckPop .5s .15s cubic-bezier(.2, 1.7, .4, 1) both; }
.ck-got.legendas { animation: ckPop .4s cubic-bezier(.2, 1.6, .4, 1), ckGlow 1.6s .4s ease-in-out infinite alternate; } @keyframes ckGlow { to { box-shadow: 0 0 26px #f4c430cc; } }
.ck-spark { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px; pointer-events: none; background: #f4c430; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: ckSpark .9s ease-out both; }
.ck-got.niche .ck-spark { background: #b87ae8; } .ck-got.ritka .ck-spark { background: #6aaae8; }
@keyframes ckSpark { from { transform: translate(0, 0) scale(.4) rotate(0); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(1.2) rotate(180deg); opacity: 0; } }
.ck-dots i { transition: background .3s; } .ck-dots i.cur { animation: ckThrob .7s ease-in-out infinite alternate; } .ck-dots i.pop { animation: ckDot .5s cubic-bezier(.2, 1.8, .4, 1); }
@keyframes ckDot { 40% { transform: scale(1.8); } }
.ck-dots { align-items: center; } .ck-run { margin-left: 10px; font-size: 16px; color: #fff4d8; text-shadow: 2px 0 0 #1c140c, -2px 0 0 #1c140c, 0 2px 0 #1c140c, 0 -2px 0 #1c140c; white-space: nowrap; }
#belso:not(.land) .ck-run { color: #6a2a6a; text-shadow: none; } .ck-run.up { animation: ckDot .6s .35s ease-out; }
.ck-map { cursor: pointer; }
.ck-res.walking .ck-late { opacity: 0; } .ck-late { transition: opacity .4s; }
.ck-res:not(.walking) .ck-chip { animation: ckPop .45s calc(var(--k) * 90ms) cubic-bezier(.2, 1.7, .4, 1) both; }
.ck-res:not(.walking) .ck-rang { animation: ckUp .4s ease-out both; }
@media (prefers-reduced-motion: reduce) { .ck-enter, .ck-enter *, .ck-lobby, .ck-lobby *, .ck-got, .ck-got *, .ck-dots i, .ck-chip, .ck-time { animation: none !important; } .ck-spark { display: none; } }
.rm :is(.ck-enter, .ck-enter *, .ck-lobby, .ck-lobby *, .ck-got, .ck-got *, .ck-dots i, .ck-chip, .ck-time) { animation: none !important; } .rm .ck-spark { display: none; }
.ck-hu { margin: -2px 0 2px; text-align: center; font-size: 16px; color: #7a5a7a; font-style: italic; } .ck-enter .ck-hu { animation: ckUp .45s .17s ease-out both; }
/* kérdésenkénti Vándorút: kis térkép a válasz alatt */
.ck-mini { width: min(100%, calc(26vh * 16 / 9)); margin: 6px auto 0; animation: ckUp .4s .2s ease-out both; }
#belso:not(.land) .ck-mini { width: 100%; }
