/* Tételvár – épületek belseje és a minijátékok (pergamen-fa stílus, mint a város felülete) */
#belso { position: fixed; inset: 0; z-index: 25; background: #1c140c; opacity: 0; transition: opacity .22s; color: #3a2a1a; overflow: hidden; touch-action: none; }
#belso.on { opacity: 1; }
#belso[hidden] { display: none; }
.bl-bg { position: absolute; image-rendering: pixelated; }
.bl-ui { position: absolute; inset: 0; }
#belso:not(.land) .bl-ui { top: var(--bl-h); background: #f1e6cc; border-top: 4px solid #4a2e18; overflow-y: auto; padding: 10px 10px max(12px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }

/* fejléc: az épület neve, a játék, a számláló, kilépés */
.bl-head { position: fixed; z-index: 2; left: 50%; transform: translateX(-50%); top: max(10px, env(safe-area-inset-top)); display: flex; align-items: center; gap: 10px;
  max-width: calc(100vw - 20px); background: #f1e6cc; border: 3px solid #4a2e18; border-radius: 8px; box-shadow: 0 4px 0 #0006; padding: 2px 6px 2px 14px; font-size: 20px; white-space: nowrap; }
.bl-head b { font-weight: 400; font-size: 24px; } .bl-head span { color: #7a4a20; overflow: hidden; text-overflow: ellipsis; } .bl-head i { font-style: normal; background: #4a2e18; color: #f8ecd0; border-radius: 4px; padding: 0 8px; }
.bl-x { font: inherit; font-size: 20px; background: #d8c8a4; color: #3a2a1a; border: 2px solid #4a2e18; border-radius: 50%; width: 32px; height: 32px; cursor: pointer; line-height: 1; }

/* a házigazda szavai */
.bl-say { position: fixed; z-index: 2; left: 50%; transform: translateX(-50%); top: calc(max(10px, env(safe-area-inset-top)) + 52px); width: min(620px, calc(100vw - 20px));
  background: #fff8e4; border: 3px solid #4a2e18; border-radius: 8px; box-shadow: 0 4px 0 #0005; padding: 6px 14px 8px; font-size: 21px; line-height: 1.15; }
.bl-say[hidden] { display: none; }
.bl-say b { display: block; font-weight: 400; font-size: 17px; color: #7a4a20; }

/* idővonal: fekvő képernyőn a tekercs magasságában, álló telefonon függőleges lista */
.io-line { display: flex; align-items: center; gap: 10px; }
#belso.land .io-line { position: absolute; left: 50%; top: var(--bl-scroll-y); transform: translate(-50%, -50%); }
.io-edge { font-size: 18px; color: #fff4d8; text-shadow: 2px 0 0 #1c140c, -2px 0 0 #1c140c, 0 2px 0 #1c140c, 0 -2px 0 #1c140c; }
.io-slots { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.io-slot { position: relative; width: clamp(112px, 11.5vw, 168px); min-height: 92px; display: flex; align-items: stretch; border: 3px dashed #6b4526; border-radius: 8px; background: rgba(241,230,204,0.55); }
.io-slot em { position: absolute; left: 6px; top: 2px; font-style: normal; font-size: 16px; color: #6b4526; }
.io-slot.empty::after { content: ''; flex: 1; }
.io-slot.hov { background: rgba(255,240,170,0.9); border-style: solid; }
.io-slot.right { border: 3px solid #2f7a2a; background: #d8f0c0; } .io-slot.wrong { border: 3px solid #a8302a; background: #f6d0c8; }
#belso:not(.land) .io-line { flex-direction: column; align-items: stretch; gap: 4px; }
#belso:not(.land) .io-edge { color: #7a4a20; text-shadow: none; font-size: 16px; text-align: center; }
#belso:not(.land) .io-slots { flex-direction: column; gap: 6px; }
#belso:not(.land) .io-slot { width: auto; min-height: 38px; padding-left: 22px; }
#belso:not(.land) .io-slot em { top: 50%; transform: translateY(-50%); }

/* kártyák */
.io-hand { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
#belso.land .io-hand { position: absolute; left: 50%; bottom: 78px; transform: translateX(-50%); width: min(1100px, 94vw); }
.io-card { font: inherit; font-size: 19px; line-height: 1.05; color: #3a2a1a; text-align: center; cursor: grab; touch-action: none; user-select: none;
  width: clamp(112px, 11.5vw, 168px); min-height: 80px; padding: 8px 8px 10px; background: #f6ead0; border: 3px solid #4a2e18; border-radius: 6px; box-shadow: 0 4px 0 #0006;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.io-card:hover { background: #fff6dc; }
.io-card small { font-size: 18px; color: #fff; background: #7a4a20; border-radius: 4px; padding: 0 6px; }
.io-slot .io-card { width: 100%; min-height: 0; box-shadow: none; border: none; background: transparent; padding: 14px 6px 8px; }
#belso:not(.land) .io-slot .io-card { flex-direction: row; justify-content: space-between; padding: 6px 8px; text-align: left; }
#belso:not(.land) .io-hand .io-card { width: calc(50% - 5px); min-height: 44px; font-size: 17px; padding: 4px 6px 6px; }
#belso:not(.land) .io-hand { gap: 8px; }
#belso:not(.land) .io-slot .io-card { font-size: 17px; }
.io-lifted { opacity: 0.35; }
.io-ghost-card { position: fixed; z-index: 40; pointer-events: none; transform: rotate(-3deg) scale(1.05); box-shadow: 0 10px 0 #0005; }
.io-tip { width: 100%; text-align: center; margin: 4px 0 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) .io-tip { color: #6a5236; text-shadow: none; font-size: 16px; }

/* gombok */
.io-act { display: flex; justify-content: center; gap: 12px; }
#belso.land .io-act { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); }
.io-btn { font: inherit; font-size: 23px; padding: 4px 22px 6px; border: 3px solid #2a4a1e; border-radius: 6px; cursor: pointer; background: #4a8a3a; color: #fff; box-shadow: 0 4px 0 #0006;
  display: inline-flex; align-items: center; gap: 10px; }
.io-btn[disabled] { background: #8a8270; border-color: #4a463a; cursor: default; opacity: .8; }
.io-btn kbd { font-family: inherit; font-size: 18px; line-height: 1; padding: 2px 7px 3px; border-radius: 5px; background: #f8ecd0; color: #3a2a1a; border: 2px solid #3e2414; }
.touch .io-btn kbd { display: none; }
.io-btn.io-ghost { background: #d8c8a4; color: #3a2a1a; border-color: #4a2e18; }

/* eredmény */
.io-result { text-align: center; background: #f1e6cc; border: 4px solid #4a2e18; border-radius: 10px; box-shadow: 0 6px 0 #0006; padding: 14px 18px; width: min(520px, calc(100vw - 20px)); }
#belso.land .io-result { position: absolute; left: 50%; top: 56%; transform: translate(-50%, -50%); }
#belso:not(.land) .io-result { border: none; box-shadow: none; padding: 4px; width: auto; }
.io-result h3 { margin: 0 0 8px; font-weight: 400; font-size: 32px; }
.io-result .io-act { position: static !important; transform: none !important; margin-top: 12px; }
.io-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.io-stats div { background: #fff8e4; border: 2px solid #c9a66c; border-radius: 6px; padding: 4px; }
.io-stats b { display: block; font-weight: 400; font-size: 24px; } .io-stats span { font-size: 15px; color: #6a5236; }
.io-up { margin: 8px 0 0; font-size: 19px; }
.io-result .io-tip { color: #6a5236; text-shadow: none; }
.io-seal { width: 96px; height: 96px; image-rendering: pixelated; display: block; margin: -6px auto 2px; animation: ioStamp .5s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes ioStamp { from { transform: scale(2.4) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 560px) { .io-stats { grid-template-columns: repeat(2, 1fr); } .bl-head span { display: none; } }
.rf .io-card, .rf .bl-say span { font-family: 'Atkinson Hyperlegible', system-ui, sans-serif; font-size: 0.85em; }
/* alacsony fekvő képernyő (telefon fektetve): tömörebb helyek és kártyák */
@media (max-height: 520px) {
  #belso.land .io-slot, #belso.land .io-card { min-height: 58px; width: clamp(96px, 15vw, 150px); font-size: 16px; }
  #belso.land .io-slot .io-card { padding-top: 12px; }
  #belso.land .io-hand { bottom: 58px; gap: 6px; }
  #belso.land .io-act { bottom: 8px; } .io-btn { font-size: 20px; padding: 2px 16px 4px; }
  .bl-say { font-size: 18px; top: calc(max(8px, env(safe-area-inset-top)) + 46px); width: min(560px, 60vw); }
  .io-tip { display: none; }
}

/* „Ki vagyok én?” (Hősök Panteonja): kőtáblák a szobor két oldalán, válaszgombok a padlón, név a talapzat tábláján */
.kv-tabs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
#belso.land .kv-tabs { position: absolute; left: 2vw; right: 2vw; top: calc(max(10px, env(safe-area-inset-top)) + 128px); display: grid; grid-template-columns: min(25vw, 330px) 1fr min(25vw, 330px); grid-auto-flow: row dense; align-items: start; pointer-events: none; }
#belso.land .kv-l { grid-column: 1; } #belso.land .kv-r { grid-column: 3; } .kv-tab { pointer-events: auto; }
.kv-tab { position: relative; background: #3a3644; color: #f4ecd8; border: 3px solid #1a1820; border-radius: 6px; box-shadow: inset 0 0 0 2px #c8a040, 0 4px 0 #0007; padding: 7px 10px 8px 30px; font-size: 18px; line-height: 1.12; }
.kv-tab em { position: absolute; left: 9px; top: 7px; font-style: normal; color: #e8c050; }
.kv-tab.new { animation: kvIn .45s ease both; }
@keyframes kvIn { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }
.kv-opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
#belso.land .kv-opts { position: absolute; left: 50%; bottom: 74px; transform: translateX(-50%); width: min(900px, 92vw); }
.kv-opt { width: auto; min-height: 54px; flex-direction: row; gap: 8px; cursor: pointer; }
.kv-opt kbd { font-family: inherit; font-size: 15px; color: #7a4a20; border: 2px solid #c9a66c; border-radius: 4px; padding: 0 5px; }
.touch .kv-opt kbd { display: none; }
.kv-opt.right { background: #d8f0c0; border-color: #2f7a2a; } .kv-opt.wrong { background: #f6d0c8; border-color: #a8302a; opacity: .75; text-decoration: line-through; }
.kv-opt[disabled] { cursor: default; }
.kv-plaque { position: absolute; z-index: 1; left: var(--bl-plaque-x, 50%); top: var(--bl-plaque-y, 60%); transform: translate(-50%, -50%); white-space: nowrap;
  background: linear-gradient(#e8c050, #b8862a); color: #2a1a08; border: 3px solid #5a3a10; border-radius: 4px; padding: 2px 14px 4px; font-size: 24px; box-shadow: 0 4px 0 #0007; animation: kvPlaque .6s ease both; }
.kv-plaque:not(.ok) { filter: grayscale(.5); }
@keyframes kvPlaque { from { opacity: 0; transform: translate(-50%, -50%) scale(.6); } to { opacity: 1; transform: translate(-50%, -50%); } }
#belso:not(.land) .kv-tabs { gap: 6px; } #belso:not(.land) .kv-tab { font-size: 16px; padding: 5px 8px 6px 26px; }
#belso:not(.land) .kv-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
#belso:not(.land) .kv-plaque { position: fixed; }
@media (max-height: 520px) { #belso.land .kv-tabs { top: calc(max(8px, env(safe-area-inset-top)) + 100px); } #belso.land .kv-tab { font-size: 15px; padding: 4px 8px 5px 24px; } #belso.land .kv-opts { bottom: 52px; } .kv-opt { min-height: 42px; } }

/* párosítás (Hadvezérek Akadémiája): két oszlop a térképasztal fölött, köztük színes vonalak */
.pr-board { display: grid; grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr); gap: 0; align-items: start; }
#belso.land .pr-board { position: absolute; left: 50%; transform: translateX(-50%); top: calc(max(10px, env(safe-area-inset-top)) + 156px); width: min(860px, 70vw); grid-template-columns: minmax(0, 1fr) 80px minmax(0, 1fr); }
.pr-col { display: flex; flex-direction: column; gap: 8px; }
.pr-col h4 { margin: 0; font-weight: 400; font-size: 18px; text-align: center; color: #fff4d8; text-shadow: 2px 0 0 #1c140c, -2px 0 0 #1c140c, 0 2px 0 #1c140c, 0 -2px 0 #1c140c; }
#belso:not(.land) .pr-col h4 { color: #7a4a20; text-shadow: none; font-size: 16px; }
.pr-lines { width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.pr-c { width: auto; min-height: 56px; flex-direction: row; gap: 8px; cursor: pointer; text-align: left; justify-content: flex-start; position: relative; transition: transform .12s; }
.pr-c span { flex: 1; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.pr-c small { font-size: 15px; }
.pr-c kbd { font-family: inherit; font-size: 15px; color: #7a4a20; border: 2px solid #c9a66c; border-radius: 4px; padding: 0 5px; }
.touch .pr-c kbd { display: none; }
.pr-c.on { border-color: var(--pr); box-shadow: inset 0 0 0 2px var(--pr), 0 3px 0 #0005; }
.pr-l.on::after, .pr-r.on::before { content: ''; position: absolute; top: 50%; width: 12px; height: 16px; margin-top: -8px; background: var(--pr); border: 2px solid #1c140c; }
.pr-l.on::after { right: -9px; clip-path: polygon(0 0, 100% 0, 70% 50%, 100% 100%, 0 100%); }
.pr-r.on::before { left: -9px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 30% 50%); }
.pr-c.sel { background: #fff0a8; border-color: #c08a1a; transform: translateY(-2px); box-shadow: 0 0 0 3px #f8d860, 0 5px 0 #0005; }
.pr-c.right { background: #d8f0c0; border-color: #2f7a2a; } .pr-c.wrong { background: #f6d0c8; border-color: #a8302a; }
.pr-c[disabled] { cursor: default; }
#belso:not(.land) .pr-c { min-height: 48px; font-size: 16px; padding: 4px 6px 6px; }
#belso:not(.land) .pr-c small { font-size: 13px; }
@media (max-height: 520px) { #belso.land .pr-board { top: calc(max(8px, env(safe-area-inset-top)) + 118px); } #belso.land .pr-col { gap: 5px; } #belso.land .pr-c { min-height: 40px; font-size: 15px; padding: 2px 8px 4px; } .pr-col h4 { font-size: 15px; } }

/* Ereklyék Múzeuma: a kiállított tárgy (forrás vagy térkép) aranykeretben az állványon, alatta múzeumi címke a kérdéssel */
.mz-col { display: flex; flex-direction: column; align-items: center; gap: 10px; }
#belso.land .mz-col { position: absolute; left: 50%; transform: translateX(-50%); top: calc(max(10px, env(safe-area-inset-top)) + 150px); width: min(780px, 62vw); }
.mz-frame { margin: 0; background: #f6eed8; border: 8px solid #c89a40; outline: 3px solid #5a3a14; box-shadow: inset 0 0 0 2px #8a6420, 0 6px 0 #0006; padding: 10px 14px; max-width: 100%; }
.mz-map { padding: 6px; background: #e9dcb6; }
.mz-map canvas { display: block; image-rendering: pixelated; cursor: pointer; width: 100%; height: auto; }
#belso.land .mz-map canvas { width: min(100%, calc((100vh - 440px) * 1.43)); min-width: 260px; }
.mz-paper { overflow-y: auto; width: 100%; }
#belso.land .mz-paper { max-height: calc(100vh - 430px); min-height: 120px; }
.mz-paper figcaption { font-size: 19px; color: #7a2a1a; margin-bottom: 4px; }
.mz-paper blockquote { margin: 0; font-size: 18px; line-height: 1.2; color: #2a1e12; }
.mz-paper cite { display: block; margin-top: 6px; font-size: 15px; color: #7a4a20; font-style: normal; text-align: right; }
.mz-label { margin: 0; background: #fbf6ea; color: #2a1e12; border: 2px solid #5a4630; border-radius: 3px; box-shadow: 0 3px 0 #0005; padding: 5px 12px 6px; font-size: 19px; line-height: 1.15; text-align: center; max-width: 100%; }
.mz-label em { font-style: normal; color: #7a4a20; margin-right: 4px; }
.mz-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; }
.mz-opt { width: auto; min-height: 46px; flex-direction: row; gap: 8px; cursor: pointer; text-align: left; justify-content: flex-start; font-size: 17px; }
.mz-opt kbd { font-family: inherit; font-size: 15px; color: #7a4a20; border: 2px solid #c9a66c; border-radius: 4px; padding: 0 5px; }
.touch .mz-opt kbd { display: none; }
.mz-opt.right { background: #d8f0c0; border-color: #2f7a2a; } .mz-opt.wrong { background: #f6d0c8; border-color: #a8302a; }
.mz-opt[disabled] { cursor: default; }
#belso:not(.land) .mz-col { gap: 8px; } #belso:not(.land) .mz-frame { border-width: 5px; padding: 6px 10px; }
#belso:not(.land) .mz-paper blockquote { font-size: 16px; } #belso:not(.land) .mz-label { font-size: 17px; } #belso:not(.land) .mz-opt { font-size: 15px; min-height: 42px; padding: 4px 6px 6px; }
@media (max-height: 520px) { #belso.land .mz-col { top: calc(max(8px, env(safe-area-inset-top)) + 112px); gap: 5px; } #belso.land .mz-paper, #belso.land .mz-map canvas { max-height: calc(100vh - 300px); min-height: 0; }
  #belso.land .mz-map canvas { width: auto; min-width: 0; height: calc(100vh - 300px); } .mz-label { font-size: 15px; padding: 2px 8px 3px; } .mz-opt { min-height: 36px; font-size: 14px; } .mz-paper blockquote { font-size: 14px; } }

/* Diplomácia Háza: oklevél a tárgyalóasztal fölött hézagokkal, alatta a szókártyák; hibátlan kitöltésnél pecsét */
.dp-col { display: flex; flex-direction: column; align-items: center; gap: 12px; }
#belso.land .dp-col { position: absolute; left: 50%; transform: translateX(-50%); top: calc(max(10px, env(safe-area-inset-top)) + 156px); width: min(760px, 62vw); }
.dp-doc { position: relative; width: 100%; background: #f6ecd0; color: #2a1e12; border: 3px solid #8a6a3a; border-radius: 4px; box-shadow: inset 0 0 0 6px #efe0b8, inset 0 0 0 7px #c8a868, 0 6px 0 #0006; padding: 14px 22px 18px; }
.dp-doc h4 { margin: 0 0 6px; font-weight: 400; font-size: 22px; text-align: center; color: #7a1a1e; }
.dp-doc p { margin: 0; font-size: 20px; line-height: 1.75; }
.dp-gap { font: inherit; font-size: 19px; line-height: 1.1; color: #1a2a5a; background: #fff8e4; border: none; border-bottom: 3px solid #6b4526; border-radius: 3px 3px 0 0; padding: 1px 8px; min-width: 90px; cursor: pointer; vertical-align: baseline; }
.dp-gap.empty { background: rgba(200,168,104,0.25); border-bottom-style: dashed; }
.dp-gap.sel { background: #fff0a8; box-shadow: 0 0 0 2px #e8c050; }
.dp-gap.right { background: #d8f0c0; border-bottom-color: #2f7a2a; } .dp-gap.wrong { background: #f6d0c8; border-bottom-color: #a8302a; text-decoration: line-through; }
.dp-gap ins { text-decoration: none; display: inline-block; color: #fff; background: #2f7a2a; border-radius: 3px; padding: 0 5px; margin-left: 4px; }
.dp-gap[disabled] { cursor: default; }
.dp-seal { position: absolute; right: 12px; bottom: -14px; width: 64px; height: 64px; image-rendering: pixelated; animation: dpStamp .35s ease-out both; }
@keyframes dpStamp { from { transform: scale(2.2) rotate(-14deg); opacity: 0; } to { transform: scale(1) rotate(-8deg); opacity: 1; } }
.dp-words { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.dp-w { width: auto; min-height: 44px; flex-direction: row; gap: 8px; padding: 4px 12px 6px; cursor: pointer; }
.dp-w kbd { font-family: inherit; font-size: 15px; color: #7a4a20; border: 2px solid #c9a66c; border-radius: 4px; padding: 0 5px; }
.touch .dp-w kbd { display: none; }
.dp-w.used { opacity: .35; } .dp-w[disabled] { cursor: default; }
#belso.land .dp-col .io-tip { color: #fff4d8; text-shadow: 2px 0 0 #1c140c, -2px 0 0 #1c140c, 0 2px 0 #1c140c, 0 -2px 0 #1c140c; }
#belso:not(.land) .dp-doc { padding: 10px 12px 14px; } #belso:not(.land) .dp-doc p { font-size: 17px; line-height: 1.7; } #belso:not(.land) .dp-gap { font-size: 16px; min-width: 70px; }
#belso:not(.land) .dp-w { font-size: 16px; min-height: 40px; } #belso:not(.land) .dp-seal { width: 48px; height: 48px; }
@media (max-height: 520px) { #belso.land .dp-col { top: calc(max(8px, env(safe-area-inset-top)) + 112px); gap: 6px; } .dp-doc p { font-size: 16px; line-height: 1.6; } .dp-doc h4 { font-size: 17px; margin-bottom: 2px; } .dp-doc { padding: 8px 14px 10px; } .dp-w { min-height: 34px; font-size: 15px; } }
.dp-words[hidden] { display: none; }

/* Tételkártyák Könyvtára: katalóguscédula az asztal fölött (megfordítható), alatta a Leitner-fiókok */
.kt-col { display: flex; flex-direction: column; align-items: center; gap: 12px; }
#belso.land .kt-col { position: absolute; left: 50%; transform: translateX(-50%); top: calc(max(10px, env(safe-area-inset-top)) + 176px); width: min(640px, 56vw); }
.kt-card { width: min(560px, 100%); cursor: pointer; perspective: 1200px; outline: none; animation: ktIn .3s ease-out both; }
.kt-inner { display: grid; transform-style: preserve-3d; transition: transform .45s cubic-bezier(.3, .1, .3, 1); }
.kt-card.flip { cursor: default; } .kt-card.flip .kt-inner { transform: rotateY(180deg); }
.kt-card:focus-visible .kt-face { box-shadow: 0 0 0 3px #e8c050, 0 6px 0 #0007; }
.kt-face { grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; min-height: 180px; padding: 8px 16px 10px;
  background: repeating-linear-gradient(#fbf4e2 0 27px, #c8d4e4 27px 28px); background-position: 0 6px; color: #2a1e12; border: 3px solid #5a3a1e; border-radius: 4px; box-shadow: 0 6px 0 #0007; position: relative; }
.kt-face::after { content: ''; position: absolute; left: 50%; bottom: 7px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #3a2014; box-shadow: inset 0 2px 0 #0008; }   /* a katalóguscédula lyuka */
.kt-back { transform: rotateY(180deg); background: repeating-linear-gradient(#fff8e8 0 27px, #e0d0b0 27px 28px); background-position: 0 6px; }
.kt-face header { display: flex; justify-content: space-between; gap: 10px; border-bottom: 2px solid #b8282e; padding-bottom: 2px; font-size: 16px; color: #b8282e; text-transform: uppercase; letter-spacing: .04em; }
.kt-face p { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; margin: 10px 0 14px; font-size: 27px; line-height: 1.15; }
.kt-face header span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kt-face h5 { margin: 6px 0 0; font-weight: 400; font-size: 18px; color: #7a4a20; text-align: center; }
.kt-back p { margin-top: 2px; font-size: 22px; line-height: 1.25; color: #1a2a5a; }
.kt-face footer { display: flex; justify-content: space-between; align-items: flex-end; font-size: 16px; color: #7a6a52; }
.kt-face footer b { font-weight: 400; color: #fff; background: #6b4526; border-radius: 3px; padding: 0 7px 1px; }
.kt-card.out-ok { animation: ktOutOk .32s ease-in both; } .kt-card.out-no { animation: ktOutNo .32s ease-in both; }
@keyframes ktIn { from { opacity: 0; translate: 0 -14px; } to { opacity: 1; translate: 0 0; } }
@keyframes ktOutOk { to { opacity: 0; translate: 60px 40px; scale: .6; } }
@keyframes ktOutNo { to { opacity: 0; translate: -60px 40px; scale: .6; } }
.kt-drawers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; width: min(560px, 100%); }
.kt-drawers li { position: relative; display: flex; flex-direction: column; align-items: center; background: linear-gradient(#7a4a28, #5a3420); color: #f4e4c4; border: 3px solid #2a160c; border-radius: 4px; box-shadow: 0 3px 0 #0007; padding: 2px 2px 3px; line-height: 1.05; }
.kt-drawers b { font-weight: 400; font-size: 15px; color: #2a1a08; background: linear-gradient(#e8c050, #b8862a); border: 1px solid #5a3a10; border-radius: 2px; padding: 0 6px; }
.kt-drawers i { font-style: normal; font-size: 22px; }
.kt-drawers span { font-size: 13px; color: #d8c49c; text-align: center; }
.kt-drawers li.cur { border-color: #e8c050; box-shadow: 0 0 0 2px #e8c050, 0 3px 0 #0007; }
.kt-drawers li.pulse { animation: ktPulse .6s ease-out; }
@keyframes ktPulse { 0% { transform: none; } 30% { transform: translateY(-6px) scale(1.08); background: #4a8a3a; } 100% { transform: none; } }
.io-btn.kt-no { background: #e8c8b8; border-color: #6a2a1e; color: #4a1a10; }
.io-btn.kt-no kbd { margin-right: 0; }
#belso.land .kt-col .io-tip { margin-top: 0; }
#belso:not(.land) .kt-face { min-height: 150px; padding: 6px 12px 8px; } #belso:not(.land) .kt-face p { font-size: 22px; margin: 8px 0 12px; } #belso:not(.land) .kt-back p { font-size: 18px; }
#belso:not(.land) .kt-drawers { gap: 4px; } #belso:not(.land) .kt-drawers span { font-size: 11px; }
@media (max-height: 520px) { #belso.land .kt-col { top: calc(max(8px, env(safe-area-inset-top)) + 122px); gap: 6px; } #belso.land .kt-face { min-height: 120px; padding: 4px 12px 6px; }
  #belso.land .kt-face p { font-size: 21px; margin: 4px 0 10px; } #belso.land .kt-back p { font-size: 17px; } #belso.land .kt-drawers i { font-size: 17px; } #belso.land .kt-drawers span { display: none; } }

/* Vizsgaterem: próbaérettségi – vonalas feladatlap a padsorok fölött, alatta a feladatok számai; beadás után piros tollas javítás */
.vz-sheet { position: relative; background: repeating-linear-gradient(#fffdf6 0 29px, #dfe6ee 29px 30px); color: #22262e; border: 3px solid #4a4e58; border-radius: 3px; box-shadow: 0 6px 0 #0006; padding: 10px 18px 14px; }
.vz-sheet h4 { margin: 0 0 6px; font-weight: 400; font-size: 24px; text-align: center; }
#belso.land .vz-rules { position: absolute; left: 50%; transform: translateX(-50%); top: calc(max(10px, env(safe-area-inset-top)) + 168px); width: min(600px, 60vw); }
.vz-rules ul { margin: 0; padding-left: 22px; font-size: 20px; line-height: 1.5; } .vz-rules b { font-weight: 400; color: #a8202a; }
#belso.land .vz-paper { position: absolute; left: 50%; transform: translateX(-50%); top: calc(max(10px, env(safe-area-inset-top)) + 54px); width: min(880px, 74vw); max-height: calc(100vh - 54px - 150px); overflow-y: auto; }
.vz-paper header { display: flex; gap: 12px; align-items: baseline; border-bottom: 2px solid #4a4e58; margin-bottom: 6px; font-size: 17px; color: #5a5e68; }
.vz-paper header span:first-child { font-size: 21px; color: #22262e; } .vz-paper header b { margin-left: auto; font-weight: 400; }
.vz-q { margin: 4px 0 8px; font-size: 21px; line-height: 1.2; }
.vz-help { margin: -4px 0 6px; font-size: 16px; color: #6a6e78; }
.vz-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.vz-opt { font: inherit; font-size: 18px; line-height: 1.1; text-align: left; color: #22262e; background: #fff; border: 2px solid #8a8e98; border-radius: 5px; padding: 5px 10px 6px; cursor: pointer; display: flex; gap: 8px; align-items: center; }
.vz-opt:hover { background: #f4f6fa; }
.vz-opt kbd { flex: none; font-family: inherit; font-size: 15px; min-width: 24px; text-align: center; color: #4a4e58; border: 2px solid #b8bcc4; border-radius: 50%; padding: 0 4px; }
.vz-opt.on { border-color: #1a3a8a; background: #e4ecfa; box-shadow: inset 0 0 0 1px #1a3a8a; } .vz-opt.on kbd { background: #1a3a8a; border-color: #1a3a8a; color: #fff; }
.vz-mapwrap { display: flex; gap: 12px; align-items: flex-start; } .vz-map { margin: 0; flex: 1; min-width: 0; }
.vz-map canvas { display: block; width: 100%; max-height: calc(100vh - 340px); object-fit: contain; image-rendering: pixelated; border: 2px solid #4a4e58; cursor: pointer; }
.vz-opts.vz-col { grid-template-columns: 1fr; width: 150px; flex: none; }
.vz-src { margin: 0 0 8px; background: #f6efdc; border-left: 4px solid #a88a4a; padding: 6px 12px; }
.vz-src figcaption { font-size: 18px; color: #7a4a20; } .vz-src blockquote { margin: 4px 0; font-size: 18px; line-height: 1.3; font-style: italic; } .vz-src cite { font-size: 14px; color: #7a6a52; }
.vz-sub + .vz-sub { margin-top: 8px; }
.vz-bar { display: flex; flex-direction: column; align-items: center; gap: 4px; }
#belso.land .vz-bar { position: absolute; left: 50%; transform: translateX(-50%); bottom: 76px; }
.vz-nav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.vz-nav button { position: relative; font: inherit; font-size: 18px; width: 38px; height: 38px; border-radius: 5px; border: 3px solid #4a4e58; background: #fffdf6; color: #22262e; cursor: pointer; box-shadow: 0 3px 0 #0006; }
.vz-nav button.done { background: #1a3a8a; border-color: #0e2050; color: #fff; } .vz-nav button.part { background: linear-gradient(135deg, #1a3a8a 50%, #fffdf6 50%); color: #fff; text-shadow: 0 0 2px #000; }
.vz-nav button.cur { outline: 3px solid #e8c050; outline-offset: 1px; }
.vz-nav button.flag::after { content: ''; position: absolute; right: -5px; top: -5px; width: 10px; height: 10px; background: #c8202a; border: 2px solid #fff; border-radius: 50%; }
.io-btn.io-ghost.on { background: #f6d0c8; border-color: #a8202a; color: #a8202a; }
.vz-confirm { margin: 0; font-size: 18px; background: #fff0c8; border: 2px solid #a8802a; border-radius: 5px; padding: 1px 10px 3px; }
.bl-head i.low { background: #a8202a; animation: vzLow 1s steps(2) infinite; } @keyframes vzLow { 50% { background: #e84040; } }
#belso.land .vz-review { position: absolute; left: 50%; transform: translateX(-50%); top: calc(max(10px, env(safe-area-inset-top)) + 156px); width: min(780px, 70vw); max-height: calc(100vh - 156px - 90px); overflow-y: auto; }
.vz-review ol { list-style: none; margin: 0; padding: 0; }
.vz-review li { display: flex; gap: 8px; align-items: flex-start; padding: 3px 0; border-bottom: 1px dashed #c8ccd4; }
.vz-review li em { font-style: normal; width: 24px; flex: none; color: #5a5e68; } .vz-review li div { flex: 1; min-width: 0; } .vz-review li p { margin: 0; font-size: 18px; line-height: 1.15; }
.vz-review li small { display: block; font-size: 16px; line-height: 1.2; color: #4a4e58; } .vz-review s { color: #a8202a; } .vz-review ins { text-decoration: none; color: #1a6a2a; }
.vz-review li b { font-weight: 400; font-size: 20px; color: #c8202a; flex: none; } .vz-review li.ok b { color: #1a6a2a; }
.vz-review li.ok p::after { content: ' ✓'; color: #1a6a2a; } .vz-review li.no p::after { content: ' ✗'; color: #c8202a; }
.vz-sum { margin: -4px 0 6px; text-align: center; font-size: 19px; } .vz-sum b { font-weight: 400; color: #c8202a; }
.vz-scale { margin: 6px 0 0; font-size: 14px; color: #6a6e78; text-align: center; }
.vz-grade { position: absolute; right: 14px; top: 6px; width: 70px; height: 70px; border: 4px solid #c8202a; border-radius: 50%; color: #c8202a; display: flex; flex-direction: column; align-items: center; justify-content: center; transform: rotate(-8deg); animation: ioStamp .5s cubic-bezier(.2, 1.6, .4, 1) both; }
.vz-grade b { font-weight: 400; font-size: 38px; line-height: .9; } .vz-grade span { font-size: 13px; line-height: 1; }
#belso:not(.land) .vz-sheet { padding: 8px 10px 10px; } #belso:not(.land) .vz-opts { grid-template-columns: 1fr; } #belso:not(.land) .vz-q { font-size: 18px; } #belso:not(.land) .vz-opt { font-size: 16px; }
#belso:not(.land) .vz-mapwrap { flex-direction: column; } #belso:not(.land) .vz-opts.vz-col { width: auto; align-self: stretch; grid-template-columns: repeat(2, 1fr); } #belso:not(.land) .vz-map canvas { max-height: none; }
#belso:not(.land) .vz-nav button { width: 34px; height: 34px; font-size: 16px; } #belso:not(.land) .vz-review h4 { text-align: left; } #belso:not(.land) .vz-grade { width: 56px; height: 56px; } #belso:not(.land) .vz-grade b { font-size: 30px; } #belso:not(.land) .vz-grade span { font-size: 11px; } #belso:not(.land) .vz-sum { text-align: left; }
#belso:not(.land) .io-act { flex-wrap: wrap; }
@media (max-height: 520px) { #belso.land .vz-paper { top: calc(max(8px, env(safe-area-inset-top)) + 46px); max-height: calc(100vh - 46px - 108px); padding: 4px 12px 8px; } #belso.land .vz-bar { bottom: 54px; }
  .vz-nav button { width: 30px; height: 30px; font-size: 15px; } .vz-q { font-size: 18px; margin: 2px 0 4px; } .vz-opt { font-size: 16px; padding: 3px 8px 4px; } .vz-help { display: none; }
  #belso.land .vz-rules, #belso.land .vz-review { top: calc(max(8px, env(safe-area-inset-top)) + 118px); } #belso.land .vz-review { max-height: calc(100vh - 118px - 60px); } .vz-rules ul { font-size: 17px; line-height: 1.3; } }

/* Bajvívótér: párbaj – fent az életek (szívek, pajzsok), alatta a fogyó lándzsa (idő), a kérdés és a válaszok */
.bv-col { display: flex; flex-direction: column; align-items: center; gap: 8px; }
#belso.land .bv-col { position: absolute; left: 50%; transform: translateX(-50%); top: calc(max(10px, env(safe-area-inset-top)) + 150px); width: min(820px, 68vw); }
.bv-card { width: 100%; background: #f6ead0; border: 3px solid #4a2e18; border-radius: 6px; box-shadow: 0 5px 0 #0006; padding: 8px 16px 10px; color: #2a1e12; }
.bv-card h4 { margin: 0 0 4px; font-weight: 400; font-size: 26px; text-align: center; }
.bv-rules ul { margin: 0; padding-left: 22px; font-size: 20px; line-height: 1.45; } .bv-rules b { font-weight: 400; color: #a8202a; }
.bv-hud { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bv-side { display: flex; align-items: center; gap: 8px; background: #2a1e12e0; color: #f8ecd0; border: 2px solid #1a120a; border-radius: 6px; padding: 2px 10px 3px; font-size: 19px; }
.bv-side b { font-weight: 400; } .bv-side span { display: flex; gap: 4px; }
.bv-vs { font-size: 26px; color: #fff4d8; text-shadow: 2px 0 0 #1c140c, -2px 0 0 #1c140c, 0 2px 0 #1c140c, 0 -2px 0 #1c140c; }
.bv-heart, .bv-shield { display: block; width: 18px; height: 16px; image-rendering: pixelated; transition: opacity .3s, transform .3s; }
.bv-heart { background: #d82a3a; clip-path: polygon(50% 100%, 0 45%, 0 15%, 15% 0, 35% 0, 50% 18%, 65% 0, 85% 0, 100% 15%, 100% 45%); }
.bv-shield { width: 15px; background: linear-gradient(90deg, #c8c4bc 50%, #9a968e 50%); clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%); }
.bv-heart.off, .bv-shield.off { opacity: .22; transform: scale(.8); filter: grayscale(1); }
.bv-lance { width: 100%; height: 12px; background: #2a1e12; border: 2px solid #1a120a; border-radius: 6px; overflow: hidden; }
.bv-lance i { display: block; height: 100%; background: linear-gradient(90deg, #c8303a, #e8c050 30%, #4a8a3a); transform-origin: left; animation: bvLance linear both; }
.bv-lance.stop i { animation-play-state: paused; }
@keyframes bvLance { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.bv-q { margin: 0; font-size: 22px; line-height: 1.2; text-align: center; }
.bv-hints { margin: 4px 0 0; padding-left: 22px; font-size: 19px; line-height: 1.25; }
.bv-map { margin: 6px auto 0; } .bv-map canvas { display: block; height: min(32vh, 230px); image-rendering: pixelated; border: 2px solid #4a2e18; cursor: pointer; margin: 0 auto; }
.bv-opts { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bv-opt { width: auto; min-height: 50px; flex-direction: row; gap: 8px; cursor: pointer; }
.bv-opt kbd { font-family: inherit; font-size: 15px; color: #7a4a20; border: 2px solid #c9a66c; border-radius: 4px; padding: 0 5px; }
.touch .bv-opt kbd { display: none; }
.bv-opt.right { background: #d8f0c0; border-color: #2f7a2a; } .bv-opt.wrong { background: #f6d0c8; border-color: #a8302a; } .bv-opt[disabled] { cursor: default; }
.bv-res { margin: 0; font-size: 22px; border-radius: 6px; padding: 2px 14px 4px; border: 3px solid; animation: bvRes .35s cubic-bezier(.2, 1.6, .4, 1) both; }
.bv-res.ok { background: #d8f0c0; border-color: #2f7a2a; color: #1a4a1a; } .bv-res.no { background: #f6d0c8; border-color: #a8302a; color: #6a1a10; }
@keyframes bvRes { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.bv-end { text-align: center; } .bv-end.win h4 { color: #2f7a2a; font-size: 34px; } .bv-end.lose h4 { color: #a8302a; font-size: 34px; }
.bv-end .bv-hud { justify-content: center; }
#belso:not(.land) .bv-opts { grid-template-columns: 1fr; gap: 6px; } #belso:not(.land) .bv-opt { min-height: 42px; font-size: 17px; } #belso:not(.land) .bv-q { font-size: 19px; }
#belso:not(.land) .bv-side { font-size: 16px; padding: 2px 6px; } #belso:not(.land) .bv-heart { width: 15px; height: 13px; } #belso:not(.land) .bv-shield { width: 12px; height: 14px; }
#belso:not(.land) .bv-map canvas { height: 26vh; width: auto; max-width: 100%; } #belso:not(.land) .bv-res { order: -1; font-size: 18px; } #belso:not(.land) .bv-rules ul { font-size: 17px; }
@media (max-height: 520px) { #belso.land .bv-col { top: calc(max(8px, env(safe-area-inset-top)) + 118px); gap: 4px; width: min(860px, 76vw); } .bv-q { font-size: 18px; } .bv-hints { font-size: 16px; } .bv-opt { min-height: 36px; font-size: 16px; }
  #belso.land .bv-opts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; } .bv-card { padding: 4px 12px 6px; } .bv-map { margin-top: 2px; }
  .bv-map canvas { height: min(24vh, 92px); } .bv-res { font-size: 18px; padding: 0 10px 2px; } #belso.land .bv-res { position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); white-space: nowrap; box-shadow: 0 4px 0 #0006; animation: none; } .bv-rules ul { font-size: 16px; line-height: 1.3; } .bv-side { font-size: 16px; } }
/* belépés (belso.js): a terem kinyílik, a házigazda besétál, a felület utána úszik be */
#belso.on .bl-bg { animation: blOpen .5s ease-out both; }
@keyframes blOpen { from { clip-path: inset(0 50% 0 50%); filter: brightness(.4); } to { clip-path: inset(0 0 0 0); filter: none; } }
#belso .bl-ui { transition: opacity .35s ease; } #belso .bl-say { transition: opacity .35s ease, translate .35s ease; }
#belso.entering .bl-ui, #belso.entering .bl-say { opacity: 0; pointer-events: none; } #belso.entering .bl-say { translate: 0 -10px; }   /* a .bl-ui-t nem toljuk el: benne fix helyzetű a fejléc */
.rm #belso.on .bl-bg { animation: none; }
