* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #1a1e14; color: #f3ead2; font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif; }
#app { position: relative; width: 100%; height: 100%; overflow: hidden; }
#c3d { display: block; width: 100%; height: 100%; }
#hud { pointer-events: none; }
#hud button, #virtual-stick { pointer-events: auto; }
#compass { position: absolute; top: 16px; left: 16px; text-align: center; font-size: 12px; }
#task { position: absolute; top: 16px; left: 120px; right: 180px; background: rgba(20,24,16,0.72); padding: 6px 14px; border: 1px solid #c9b57a; min-height: 48px; }
#task-la { display: block; font-weight: bold; letter-spacing: 0.1em; text-transform: uppercase; color: #E69F00; }
#task-la:empty { display: none; }
#task-nl { display: block; }
#task.flash { animation: taskflash 1.6s ease-out 1; }
@keyframes taskflash { 0% { box-shadow: 0 0 0 0 rgba(230,159,0,0); } 30% { box-shadow: 0 0 14px 3px rgba(230,159,0,0.55); } 100% { box-shadow: 0 0 0 0 rgba(230,159,0,0); } }
#guide-banner { position: absolute; top: 76px; left: 120px; background: #d4c36a; color: #1a1e14; padding: 6px 12px; font-weight: bold; }
#subtitle { position: absolute; bottom: 88px; left: 50%; transform: translateX(-50%); background: rgba(20,24,16,0.8); padding: 8px 18px; border: 1px solid #c9b57a; }
#border-msg, #interact-prompt { position: absolute; bottom: 140px; left: 50%; transform: translateX(-50%); max-width: 640px; background: rgba(20,24,16,0.85); padding: 10px 16px; }
#watals-banner { position: absolute; top: 16px; right: 200px; background: #8b3a1e; padding: 6px 12px; letter-spacing: 0.08em; text-transform: uppercase; }
#btn-map, #btn-codex, #btn-mute, #btn-finish { position: absolute; right: 16px; padding: 10px 14px; background: #3d2a16; color: #f3ead2; border: 1px solid #c9b57a; cursor: pointer; }
#btn-map { bottom: 24px; }
#btn-codex { bottom: 72px; }
#btn-mute { top: 16px; }
#btn-finish { bottom: 120px; background: #5a3a14; }
#virtual-stick { position: absolute; left: 24px; bottom: 24px; width: 110px; height: 110px; border-radius: 50%; border: 2px solid #c9b57a; background: rgba(20,24,16,0.35); }
.overlay { position: absolute; inset: 0; background: rgba(10,12,8,0.55); display: flex; flex-direction: column; }
.overlay[hidden], .panel[hidden], [hidden] { display: none !important; }
#map-canvas { flex: 1; width: 100%; cursor: crosshair; background: #1c2418; }
.map-toolbar, .map-orders { background: #1a1e14; padding: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.row { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
button { font: inherit; background: #2c2618; color: #f3ead2; border: 1px solid #c9b57a; padding: 6px 10px; cursor: pointer; }
button:hover { background: #453820; }
#selection-label, #formation-hint { background: #1a1e14; padding: 8px 12px; border-top: 1px solid #c9b57a; }
.panel, .overlay-panel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: #2a2418; border: 2px solid #c9b57a; padding: 20px 24px; max-width: 720px; max-height: 80%; overflow: auto; width: min(720px, 92vw); }
.overlay-panel.wide { max-width: 900px; width: min(900px, 94vw); }
#title { position: absolute; inset: 0; background: linear-gradient(#1a2430, #2a2418); display: flex; align-items: center; justify-content: center; }
#title .panel { position: static; transform: none; }
.kicker { letter-spacing: 0.12em; text-transform: uppercase; color: #c9b57a; }
.note, .bron { color: #c9b57a; font-size: 0.92em; }
blockquote { font-style: italic; border-left: 3px solid #c9b57a; padding-left: 10px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.watals { border: 1px solid #8b3a1e; padding: 8px; margin-bottom: 12px; }
.watals-tag { background: #8b3a1e; display: inline-block; padding: 2px 8px; }
.hist { border: 1px solid #5a6a3a; padding: 8px; margin-bottom: 12px; }
input { font: inherit; padding: 6px; background: #1a1e14; color: #f3ead2; border: 1px solid #c9b57a; }
#boot-error { color: #ffb4a8; padding: 12px; }
@media print {
  #app, .no-print { display: none !important; }
  #print-view { display: block !important; position: static; color: #1a1e14; background: #fff; }
}
#btn-menu { position: absolute; top: 60px; right: 16px; pointer-events: auto; }
#btn-enter { position: absolute; bottom: 168px; left: 50%; transform: translateX(-50%); pointer-events: auto; background: #9C322C; }
#btn-leave { position: absolute; top: 86px; left: 50%; transform: translateX(-50%); pointer-events: auto; background: #9C322C; z-index: 6; }
#crosshair { position: absolute; left: 50%; top: 48%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border: 2px solid #f3ead2; border-radius: 50%; pointer-events: none; box-shadow: 0 0 0 1px #1a1e14; }
#draw-meter { position: absolute; left: 50%; bottom: 210px; width: 168px; height: 10px; transform: translateX(-50%); background: #1a1814; border: 1px solid #c9b57a; pointer-events: none; }
#draw-meter-fill { height: 100%; width: 0; background: #c4a056; }
#hit-marker { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); color: #ffe9a0; font-size: 58px; font-weight: bold; pointer-events: none; opacity: 0; text-shadow: 0 0 14px #fff4b0, 0 0 4px #1a1e14; }
#hit-marker.show { opacity: 1; }
body.hit-flash #vignette { box-shadow: inset 0 0 100px rgba(232, 212, 138, 0.5); }
#quiz-body .ok { color: #8fce7a; font-weight: bold; }
#quiz-body .fout { color: #e08a7a; font-weight: bold; }
#print-view { position: absolute; inset: 0; overflow: auto; background: #f3ead2; color: #1a1e14; z-index: 50; padding: 28px; }
#combat-hud { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); min-width: 320px; background: rgba(20,24,16,0.82); border: 1px solid #c9b57a; padding: 10px 14px; pointer-events: auto; }
.meter { height: 10px; background: #1A1814; border: 1px solid #2A241C; margin: 6px 0; }
#meter-stamina { height: 100%; width: 100%; background: #3D8A3A; }
.combat-row { display: flex; gap: 12px; justify-content: space-between; }
#vignette { pointer-events: none; position: absolute; inset: 0; box-shadow: inset 0 0 0 0 transparent; }
body.wounded-1 #vignette { box-shadow: inset 0 0 80px rgba(180,40,40,0.35); }
body.wounded-2 #vignette { box-shadow: inset 0 0 110px rgba(180,40,40,0.5); }
body.wounded-3 #vignette { box-shadow: inset 0 0 140px rgba(180,40,40,0.65); }
label { display: block; margin: 10px 0; }
select { font: inherit; background: #1a1e14; color: #f3ead2; border: 1px solid #c9b57a; padding: 6px; }
#btn-enter { display: inline-flex; align-items: center; gap: 8px; }
#btn-enter img { width: 36px; height: 36px; object-fit: contain; }
.combat-icons { display: flex; gap: 6px; align-items: center; }
.ui-icon { width: 40px; height: 40px; object-fit: contain; }
.health-wrap { display: inline-flex; align-items: center; gap: 6px; }
.health-wrap img { width: 28px; height: 28px; object-fit: contain; }
.stamina-wrap, .health-wrap { display: inline-flex; align-items: center; gap: 6px; }
.stamina-wrap img, .health-wrap img { width: 28px; height: 28px; object-fit: contain; }
.stamina-wrap .ui-icon, .health-wrap .ui-icon { width: 36px; height: 36px; }
.stamina-wrap .meter { width: 64px; margin: 0; }

#block-marker { position: absolute; left: 50%; top: 44%; width: 52px; height: 64px; transform: translate(-50%, -50%); pointer-events: none; opacity: 0; background: #8a8f86; clip-path: polygon(50% 0, 100% 18%, 88% 78%, 50% 100%, 12% 78%, 0 18%); box-shadow: 0 0 10px rgba(40,42,38,0.55); border-radius: 4px; }
#block-marker.show { opacity: 0.92; }
#combat-subtitle { position: absolute; bottom: 128px; left: 50%; transform: translateX(-50%); background: rgba(22,24,20,0.88); color: #e6e2d4; padding: 8px 16px; border: 1px solid #8a8f86; pointer-events: none; font-size: 15px; letter-spacing: 0.01em; }

#quality-notice { position: absolute; top: 150px; left: 50%; transform: translateX(-50%); background: rgba(30,26,18,0.92); color: #f1e6c4; border: 1px solid #c9b57a; padding: 8px 16px; font-size: 14px; pointer-events: none; z-index: 40; }

/* M1.5 */
#objective-distance { margin-top: 2px; font-size: 13px; font-weight: bold; color: #f3ead2; background: rgba(20,24,16,0.75); border: 1px solid #E69F00; padding: 1px 6px; display: inline-block; }
#area-card { position: absolute; top: 112px; left: 50%; transform: translateX(-50%); text-align: center; background: rgba(20,24,16,0.78); border: 1px solid #c9b57a; padding: 6px 18px; pointer-events: none; }
#area-card strong { display: block; letter-spacing: 0.18em; font-size: 20px; }
#area-card span { font-size: 13px; color: #d8cba0; }
#latin-subtitle { position: absolute; bottom: 196px; left: 50%; transform: translateX(-50%); max-width: 760px; background: rgba(22,24,20,0.88); color: #f3ead2; padding: 8px 16px; border: 1px solid #c9b57a; pointer-events: none; font-size: 15px; text-align: center; }
#latin-subtitle i, #combat-subtitle i { color: #ffd27a; }
#codex-popup { position: absolute; right: 16px; top: 112px; width: min(360px, 40vw); display: flex; gap: 10px; background: rgba(42,36,24,0.95); border: 2px solid #c9b57a; padding: 10px 12px; pointer-events: auto; cursor: pointer; z-index: 20; }
#codex-popup img { width: 40px; height: 40px; flex: none; }
#codex-popup h3 { margin: 0 0 4px; font-size: 16px; }
#codex-popup p { margin: 2px 0; font-size: 14px; }
#epilogue-bar { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); background: rgba(20,24,16,0.85); border: 1px solid #c9b57a; padding: 6px 12px; display: flex; gap: 10px; align-items: center; pointer-events: auto; }
#fatigue-hint { position: absolute; bottom: 168px; left: 50%; transform: translateX(-50%); background: rgba(60,40,20,0.92); color: #ffe2b0; border: 2px solid #E69F00; padding: 6px 14px; font-weight: bold; pointer-events: none; animation: fatiguepulse 1.2s ease-in-out infinite; }
@keyframes fatiguepulse { 0%,100% { opacity: 0.85; } 50% { opacity: 1; } }
#quote-card blockquote { font-size: 18px; }
fieldset.markers { border: 1px solid #5a4a2a; margin: 8px 0; padding: 4px 10px; }
fieldset.markers label { margin: 4px 0; }
#compass > span { display: block; color: #e6d7a8; }
#compass #objective-distance { margin-top: 3px; }

/* fix 17-11: pijl aan de schermrand naar het doel */
#edge-arrow { position: absolute; width: 1px; height: 1px; pointer-events: none; z-index: 8; }
#edge-arrow .edge-arrow-head { position: absolute; left: -26px; top: -26px; width: 52px; height: 52px; line-height: 52px; text-align: center; font-size: 44px; color: #E69F00; text-shadow: 0 0 2px #fff, 0 0 6px #fff, 0 2px 6px rgba(0,0,0,0.8); transform-origin: 50% 50%; animation: edgepulse 1.1s ease-in-out infinite; }
#edge-arrow .edge-arrow-label { position: absolute; left: -32px; top: 26px; width: 64px; text-align: center; font-size: 13px; font-weight: bold; color: #f3ead2; background: rgba(20,24,16,0.82); border: 1px solid #c9b57a; border-radius: 3px; }
@keyframes edgepulse { 0%,100% { opacity: 1; } 50% { opacity: 0.6; } }
.pause-note { font-size: 0.6em; font-weight: normal; color: #c9b57a; }

/* ---------- VS1 (verhaal, keuzes, slag) ---------- */
#vs1-ui { position: fixed; inset: 0; pointer-events: none; z-index: 30; font-family: inherit; }
#vs1-ui [hidden] { display: none !important; }
#vs1-letterbox .lb-top, #vs1-letterbox .lb-bot { position: fixed; left: 0; right: 0; height: 9vh; background: #000; }
#vs1-letterbox .lb-top { top: 0; } #vs1-letterbox .lb-bot { bottom: 0; }
body.vs1-cine #hud, body.vs1-cine #compass, body.vs1-cine #objective-hud, body.vs1-cine .hud-top, body.vs1-cine #edge-arrow { opacity: 0; pointer-events: none; }
#vs1-banner { position: fixed; top: 12vh; left: 0; right: 0; text-align: center; color: #f3e6c4; text-shadow: 0 2px 8px #000; }
#vs1-banner .la { font-size: 30px; letter-spacing: .18em; font-weight: 700; }
#vs1-banner .nl { font-size: 17px; opacity: .9; margin-top: 4px; }
#vs1-banner.big { top: 34vh; } #vs1-banner.big .la { font-size: 54px; }
#vs1-titlecard { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(8,6,4,.86); color: #f3e6c4; }
#vs1-titlecard .la { font-size: 40px; letter-spacing: .14em; font-weight: 700; text-align: center; } #vs1-titlecard .nl { font-size: 18px; margin-top: 8px; opacity: .85; }
#vs1-sub { position: fixed; left: 50%; transform: translateX(-50%); bottom: 11.5vh; max-width: min(860px, 92vw); background: rgba(10,8,6,.72); color: #fff; padding: 10px 18px 12px; border-radius: 8px; text-align: center; border-left: 4px solid var(--who, #ccc); }
#vs1-sub .who { color: var(--who, #ddd); font-weight: 700; font-size: 15px; margin-bottom: 2px; }
#vs1-sub .la { font-style: italic; color: #f1dca6; font-size: 19px; } #vs1-sub .la:empty { display: none; }
#vs1-sub .nl { font-size: 19px; line-height: 1.35; }
#vs1-sub .meta { margin-top: 4px; font-size: 12px; opacity: .8; } #vs1-sub .meta:empty { display: none; }
#vs1-ui .chip { display: inline-block; padding: 1px 7px; border-radius: 9px; background: rgba(255,255,255,.14); font-size: 12px; }
#vs1-ui .chip.ok { background: rgba(60,160,90,.4); } #vs1-ui .chip.src { background: rgba(200,160,60,.32); }
#vs1-skip { position: fixed; right: 20px; bottom: 2.5vh; color: #ddd; font-size: 13px; z-index: 2; }
#vs1-skip .bar { display: inline-block; width: 60px; height: 5px; background: rgba(255,255,255,.2); vertical-align: middle; margin-left: 6px; }
#vs1-skip .bar i { display: block; height: 100%; width: 0; background: #f1dca6; }
#vs1-choice, #vs1-card, #vs1-classpick, #vs1-report { pointer-events: auto; position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%); width: min(640px, 92vw); background: rgba(24,19,14,.95); color: #f3ead6; border: 1px solid #8a6d3b; border-radius: 10px; padding: 18px 22px; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
#vs1-choice .q, #vs1-classpick .q { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
#vs1-choice .opts { list-style: none; padding: 0; margin: 0; }
#vs1-choice .opts li { padding: 9px 12px; margin: 6px 0; background: rgba(255,255,255,.07); border-radius: 6px; cursor: pointer; font-size: 16px; }
#vs1-choice .opts li:hover { background: rgba(230,180,90,.25); } #vs1-choice .opts li b { color: #e6b45a; margin-right: 8px; }
#vs1-choice .timer { height: 4px; background: rgba(255,255,255,.15); margin-top: 10px; } #vs1-choice .timer i { display: block; height: 100%; background: #e6b45a; }
#vs1-choice .keys { font-size: 12px; opacity: .7; margin-top: 6px; }
#vs1-card blockquote { margin: 10px 0; padding: 8px 12px; border-left: 3px solid #e6b45a; background: rgba(255,255,255,.05); }
#vs1-card blockquote .la { font-style: italic; color: #f1dca6; } #vs1-card cite { display: block; font-size: 12px; opacity: .75; margin-top: 4px; }
#vs1-card .lbl { font-size: 12px; opacity: .75; } #vs1-ui .go { margin-top: 12px; }
#vs1-classpick button { display: block; width: 100%; margin: 8px 0; padding: 10px; font-size: 16px; }
#vs1-bhud { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); text-align: center; color: #fff; text-shadow: 0 1px 4px #000; }
#vs1-bhud .wave { font-weight: 700; letter-spacing: .06em; }
#vs1-bhud .front { width: 220px; height: 7px; margin: 5px auto; background: rgba(160,40,30,.7); border-radius: 4px; overflow: hidden; }
#vs1-bhud .front i { display: block; height: 100%; width: 50%; background: #c9a24a; transition: width .3s; }
#vs1-bhud .hint { margin-top: 8px; padding: 4px 12px; background: rgba(0,0,0,.55); border-radius: 6px; font-weight: 700; display: inline-block; }
#vs1-vignette { position: fixed; inset: 0; opacity: 0; background: radial-gradient(ellipse at center, rgba(0,0,0,0) 55%, rgba(120,0,0,.75) 100%); }
#vs1-report table.rep { width: 100%; border-collapse: collapse; font-size: 14px; } #vs1-report td { padding: 5px; border-bottom: 1px solid rgba(255,255,255,.1); vertical-align: top; }
#vs1-end { position: fixed; inset: 0; background: rgba(0,0,0,.82); color: #f3e6c4; display: flex; flex-direction: column; align-items: center; justify-content: center; }
#vs1-end .la { font-size: 52px; letter-spacing: .2em; } #vs1-end .nl { font-size: 18px; margin-top: 10px; }
#vs1-comfort { margin-top: 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 6px; padding: 6px 10px; }
#vs1-comfort label { display: block; margin: 3px 0; }
body.vs1-battle #vs1-sub { bottom: 30vh; }

/* ===== VS1 art block 3: Artist-HUD (ui.css van de Artist wordt als <style id="vs1-ui-css"> geladen) ===== */
body.vs1 #compass, body.vs1 #task, body.vs1 #codex-popup, body.vs1 #btn-codex, body.vs1 #combat-hud,
body.vs1 #vs1-bhud, body.vs1 #vs1-sub, body.vs1 #vs1-skip, body.vs1 #vs1-titlecard, body.vs1 #vs1-letterbox, body.vs1 #vs1-classpick { display: none !important; }
#vs1-hud { position: fixed; inset: 0; pointer-events: none; z-index: 25; }
#vs1-hud [hidden] { display: none !important; }
#vs1-hud .h-top { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); }
#vs1-hud .h-kompas { position: absolute; top: 86px; left: 50%; transform: translateX(-50%); }
#vs1-hud .h-rb { position: absolute; top: 14px; right: 16px; }
#vs1-hud .h-codex { position: absolute; top: 112px; right: 16px; pointer-events: auto; }
#vs1-hud .h-lo { position: absolute; left: 16px; bottom: 16px; }
#vs1-hud .h-ro { position: absolute; right: 16px; bottom: 16px; }
#vs1-hud .h-hint { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); }
#vs1-hud .h-prompts { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); }
#vs1-hud .h-skip { position: absolute; right: 3%; bottom: 3%; z-index: 3; }
#vs1-hud .h-tk { position: absolute; inset: 0; z-index: 4; }
#vs1-hud .h-tk .tk-wrap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at center, rgba(10,7,4,.35), rgba(10,7,4,.7)); }
#vs1-hud .h-bron .bronkaart { position: absolute; left: 3%; top: 13%; max-width: 430px; padding: 12px 16px; background: var(--paneel-l); color: var(--inkt); border: 2px solid var(--brons); border-radius: 8px; box-shadow: 0 0 0 2px var(--inkt), 0 6px 14px rgba(0,0,0,.45); }
#vs1-hud .h-bron .bronkaart .la { font: italic 19px var(--lat); line-height: 1.3 }
#vs1-hud .h-bron .bronkaart .nl { font: 600 17px var(--nl); margin-top: 6px; line-height: 1.3 }
#vs1-hud .h-bron .bronkaart .ref { font: 700 13px var(--nl); color: var(--brons-d); margin-top: 6px; letter-spacing: .05em }
#vs1-hud .h-codexfx { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; }
#vs1-hud .h-klas { position: absolute; inset: 0; z-index: 6; display: flex; align-items: center; justify-content: center; background: rgba(11,8,5,.55); pointer-events: auto; }
#vs1-hud.cine .h-skip { bottom: 11.5%; }
body.vs1-battle #vs1-hud .h-sub .ondertitel { bottom: 24%; }
@media (max-width: 1500px) { #vs1-hud .h-prompts { transform: translateX(calc(-50% - 60px)) scale(.9); } }
body.vs1 #vs1-banner:not(.big) { display: none !important; }
#vs1-hud.cine .h-codex, #vs1-hud.cine .h-top, #vs1-hud.cine .h-kompas { display: none !important; }
/* M1.5-knoppen (geluid/menu) blijven, maar uit de weg van het golfpaneel: linksboven in de stijl van de Artist */
body.vs1 #btn-mute, body.vs1 #btn-menu { left: 16px; right: auto; padding: 6px 12px; font: 600 14px system-ui, sans-serif; background: #4a3626; color: #f3e6c8; border: 2px solid #c8963e; border-radius: 10px; z-index: 6; }
body.vs1 #btn-mute { top: 14px; }
body.vs1 #btn-menu { top: 14px; left: 128px; }
#vs1-hud .h-top .doelregel { max-width: min(620px, calc(100vw - 2 * 330px)); }
/* VS1: menu en andere pauzerende vensters boven de Artist-HUD; geluid/menu-knop blijft bereikbaar (ook tijdens klassenkeuze) */
body.vs1 #menu, body.vs1 #codex, body.vs1 #teacher, body.vs1 #report, body.vs1 #quiz, body.vs1 #print-view { z-index: 45; }
body.vs1 #btn-mute, body.vs1 #btn-menu { z-index: 35; }
