/* Games VITA – Runenschmiede · Gestaltung 1.35.0
   Festes Spielfenster wie Tiefenreich, Kronenwacht und Kronenwall: 16:9 am PC, volle Höhe im Hochformat,
   Größen-Container (rff), Maße in em. Auftragsauswahl: links Werkstattbild mit Prüfung, rechts Kapitel und Runen.
   Amboss: links das Brett (passt sich der Fensterhöhe an), rechts nächste Runen, Auftrag und Werkzeuge.
   Ersetzt die Schichten aus runen.css (1.22) und den Runenschmiede-Teil aus illustrated-menus.css. */

.rf-play-wrap{max-width:1540px!important}
#gv-runen{--rf-off:86px;--rf-gold:#e7bd78;--rf-muted:#c7bcae;--line:#b9894c;position:relative;margin:10px auto 28px;color:#f7f0e5;scroll-margin-top:calc(var(--rf-off) - 6px)}
#gv-runen [hidden]{display:none!important}
:where(#gv-runen) button{font-family:inherit;font-size:1em;color:inherit}
#gv-runen button:focus-visible,#gv-runen a:focus-visible{outline:.16em solid #80ece5;outline-offset:.12em}
#gv-runen .kicker{margin:0 0 .4em;color:var(--rf-gold);font-size:.7em;font-weight:800;letter-spacing:.15em;text-transform:uppercase}

/* ---------- Spielfenster ---------- */
.rf-frame{position:relative;container:rff/size;width:min(100%,calc((100svh - var(--rf-off)) * 16 / 9));aspect-ratio:16/9;margin:0 auto;overflow:hidden;border-radius:14px;border:2px solid var(--line);background:#0b1018;box-shadow:inset 0 0 0 1px #ffe2a333,0 22px 50px #000b;isolation:isolate}
.rf-frame>*{font-size:clamp(8px,min(2.05cqh,3.9cqw),40px)}
@media (orientation:portrait) and (max-width:900px){.rf-frame{width:100%;aspect-ratio:auto;height:calc(100svh - var(--rf-off));min-height:560px;max-height:1250px;border-radius:12px}}
#gv-runen:fullscreen,#gv-runen.gv-immersive{display:flex;align-items:center;justify-content:center;margin:0;padding:0;max-width:none;background:radial-gradient(ellipse at 50% 40%,#1b2230,#020306 75%);overflow:hidden}
#gv-runen:fullscreen .rf-frame,#gv-runen.gv-immersive .rf-frame{width:min(100vw,calc(100vh * 16 / 9));height:auto;max-height:100vh;border-radius:0;border-width:0}
@media (orientation:portrait){#gv-runen:fullscreen .rf-frame,#gv-runen.gv-immersive .rf-frame{width:100vw;height:100vh;aspect-ratio:auto;max-height:none}}
.rf-map,.rf-stage{position:absolute;inset:0;display:flex;flex-direction:column;min-height:0}

/* ---------- Kopfleisten ---------- */
.rf-mtop,.rf-top{display:flex;align-items:center;gap:.8em;padding:.45em .8em;background:linear-gradient(90deg,#0d151fee,#1d2530dd 55%,#0d151fee);border-bottom:.1em solid var(--line);box-shadow:inset 0 -.4em .8em #0007;flex:none;z-index:5}
.rf-mtop-rune{width:2.3em;flex:none}
.rf-brand{display:flex;flex-direction:column;line-height:1.1;min-width:0;margin-right:auto}
.rf-brand b,.rf-top h2{margin:0;font:700 1.3em Georgia,serif;letter-spacing:.05em;background:linear-gradient(180deg,#fff4d6,#f0c873 55%,#b17a2c);-webkit-background-clip:text;background-clip:text;color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rf-brand small{font-size:.66em;color:#92e4df;letter-spacing:.14em;text-transform:uppercase}
.rf-top>div{flex:1;min-width:0;line-height:1.15}
.rf-top .kicker{margin:0;font-size:.62em}
.rf-icon-btn{flex:none;display:grid;place-items:center;width:2.3em;height:2.3em;padding:0;border:.07em solid #c8ba9f88;border-radius:.55em;background:linear-gradient(#2a3440,#111b27);color:#f5d6a0;font-size:1em;font-weight:800;line-height:1;cursor:pointer;box-shadow:inset 0 1px #ffefce22,0 2px 4px #0005}
.rf-icon-btn:hover{filter:brightness(1.25)}
#gv-runen .btn{display:inline-flex;align-items:center;justify-content:center;gap:.35em;min-height:2.4em;padding:.4em 1em;border-radius:.55em;border:.07em solid #b9b39877;background:linear-gradient(#22323d,#121c26);color:#eee0c8;font-weight:800;font-size:.82em;line-height:1.2;text-align:center;white-space:normal;cursor:pointer;text-shadow:0 1px 2px #000}
#gv-runen .btn:hover:not(:disabled){filter:brightness(1.2)}
#gv-runen .btn:disabled{opacity:.5;cursor:not-allowed}
#gv-runen .btn-primary{background:linear-gradient(130deg,#f0cf8a,#c8973f);border-color:#f8dda3;color:#241a0d;text-shadow:0 1px #fff2c766}

/* ---------- Auftragsauswahl ---------- */
.rf-map-cols{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);grid-template-rows:minmax(0,1fr) auto}
.rf-map-art{grid-column:1;grid-row:1;position:relative;display:flex;flex-direction:column;justify-content:flex-end;padding:1.6em 1.6em 1.4em;background:linear-gradient(90deg,#07131bf0,#08111a99 70%,#07131b55),var(--rf-scene) center 55%/cover;border-bottom:.08em solid #b9894c66}
.rf-map-art h2{margin:0 0 .4em;font:700 2.2em/1.05 Georgia,serif;color:#fff1d2;text-shadow:0 .1em .4em #000}
.rf-map-art>p:last-child{max-width:22em;margin:0;font-size:.95em;color:#e4d9c8}
.rf-map-body{grid-column:1;grid-row:2;min-height:0;overflow-y:auto;padding:1em 1.2em;background:linear-gradient(180deg,#101721,#0b1018)}
.rf-resume:empty{display:none}
.rf-resume>div{display:flex;align-items:center;justify-content:space-between;gap:.8em;padding:.7em .9em;margin:0 0 .8em;background:#25413b99;border:.08em solid #87d7b866;border-radius:.7em}
.rf-challenge{display:flex;gap:.9em;align-items:center;justify-content:space-between;padding:.8em 1em;border:.08em solid #c6a3e066;border-radius:.8em;background:linear-gradient(120deg,#30223fa0,#122c3ea0)}
.rf-challenge p:last-child{margin:0;color:#e3d3f4;font-size:.85em}
.rf-account-note{margin:.9em 0 0;font-size:.8em;color:var(--rf-muted)}
.rf-account-note a{color:#92e4df}
.rf-map-message{margin:.5em 0 0;color:#f5bc85;font-size:.85em}
.rf-map-message:empty{display:none}
.rf-level-list{grid-column:2;grid-row:1/3;min-height:0;overflow-y:auto;padding:1em 1.2em;border-left:.08em solid #b9894c66;background:linear-gradient(180deg,#0f1620f2,#0a0f17f2),var(--rf-scene) center/cover}
.rf-chapter{margin:0 0 1em}
.rf-chapter>div{display:flex;align-items:baseline;gap:.6em;margin:0 0 .5em}
.rf-chapter .kicker{margin:0}
.rf-chapter h3{margin:0;font:700 1.15em Georgia,serif;color:#fff1d2}
.rf-chapter ol{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:.45em;list-style:none;margin:0;padding:0}
.rf-level{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.15em;width:100%;aspect-ratio:1/1.05;padding:.3em .15em;background:linear-gradient(155deg,#263440,#14202b);color:#e8e8e7;border:.08em solid #84b3c155;border-radius:.6em;cursor:pointer;transition:transform .15s,border-color .15s}
.rf-level:not(:disabled):hover{transform:translateY(-.12em);border-color:#e6c285}
.rf-level>strong{font:700 1.4em/1 Georgia,serif}
.rf-level>span,.rf-level>small{font-size:.6em;line-height:1.3;text-align:center}
.rf-level>small{color:#e2bf7f}
.rf-level.is-open{border-color:#edca87;background:linear-gradient(155deg,#6b5334,#28271e);box-shadow:0 0 1em #f0c37444;animation:rfOpen 1.8s ease-in-out infinite}
@keyframes rfOpen{50%{box-shadow:0 0 1.6em #f0c374aa}}
.rf-level.is-done{border-color:#5bba9d88}
.rf-level.is-locked{opacity:.45;cursor:not-allowed}
.rf-codex{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:.4em;padding-top:.8em;border-top:.06em solid #b9b38c44}
.rf-codex>div{text-align:center;min-width:0}
.rf-codex small{display:block;font-size:.55em;color:#cabda6;line-height:1.25}

/* ---------- Runen-Grafik ---------- */
.rf-rune{display:inline-block;aspect-ratio:1;width:100%;background-image:var(--rf-runes);background-size:300% 300%;background-position:var(--rx) var(--ry);background-repeat:no-repeat;filter:drop-shadow(0 .12em .12em #0008)}

/* ---------- Amboss ---------- */
.rf-stage-bg{position:absolute;inset:0;z-index:-1;background:linear-gradient(#090e1999,#080e19d9),var(--rf-scene) center/cover;pointer-events:none}
.rf-layout{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 18em;gap:0}
.rf-main{min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:.6em 1em}
.rf-hud{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:.5em;width:min(100%,62cqh);padding:.4em .8em;border:.06em solid #c1b69855;border-radius:.6em;background:#0c1420dc}
.rf-hud>div+div{border-left:.06em solid #d4c19b44;padding-left:.7em}
.rf-hud small{display:block;font-size:.66em;color:#bcbab8}
.rf-hud strong{font:800 1.25em/1.1 var(--body);color:#ffe1a3;font-variant-numeric:tabular-nums}
.rf-progress{width:min(100%,62cqh);height:.25em;margin:.4em 0;background:#151e2a;border-radius:.2em;overflow:hidden}
.rf-progress i{display:block;width:0;height:100%;background:linear-gradient(90deg,#5dccb7,#f4d18c);transition:width .25s}
.rf-board{position:relative;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.35em;width:min(100%,62cqh);padding:.55em;aspect-ratio:1;background:linear-gradient(140deg,#3c3d3b,#1a242d 20%,#101a24 75%,#3f3e36);border:.1em solid #b09968;border-radius:.8em;box-shadow:0 0 0 .3em #0b121a,0 0 0 .38em #b0996877,0 1em 2.4em #000b}
.rf-cell{position:relative;display:block;min-width:0;min-height:0;padding:0;border:.06em solid #9bafbb33;border-radius:.5em;background:linear-gradient(145deg,#131f29ea,#17242b 55%,#283239);cursor:pointer;box-shadow:inset .05em .1em .25em #0009}
.rf-cell.is-occupied{background:linear-gradient(135deg,#3d4b50aa,#293744a8);border-color:#bdc8c544}
.rf-cell:hover,.rf-cell:focus-visible{border-color:#e0d2a9}
.rf-art{position:absolute;inset:.15em;pointer-events:none}
.rf-empty-mark{position:absolute;inset:0;display:grid;place-items:center;font-size:1.3em;color:#a6bbb533}
.rf-cell-rank{position:absolute;right:.15em;bottom:.12em;min-width:1.4em;font-size:.6em;font-weight:800;line-height:1.4em;text-align:center;background:#10141ed9;border:.06em solid #c3bca944;border-radius:.3em;pointer-events:none}
.rf-cell-rank:empty{display:none}
.rf-match{border-color:#88e6c2!important;box-shadow:inset 0 0 .7em #9affbd30,0 0 .6em #72f3bc66}
.rf-match .rf-rune{filter:drop-shadow(0 0 .3em var(--glow))}
.rf-cell.can-hammer{border-color:#f4a678aa;background:#5b302966}
.rf-new .rf-rune{animation:rfForge .35s cubic-bezier(.2,1.5,.4,1)}
@keyframes rfForge{0%{transform:scale(.5);filter:brightness(2)}70%{transform:scale(1.12)}100%{transform:scale(1)}}
.rf-pop{position:absolute;left:50%;top:20%;transform:translateX(-50%);font:800 1.2em var(--body);color:#ffe8a8;text-shadow:0 .1em .3em #000;pointer-events:none;z-index:5;animation:rfPop .75s ease-out both}
@keyframes rfPop{to{transform:translate(-50%,-2.5em);opacity:0}}
.rf-status{width:min(100%,62cqh);min-height:2.6em;margin:.5em 0 0;font-size:.8em;line-height:1.35;text-align:center;color:#e5d3ac}
.rf-side{min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:.7em;padding:.8em;background:linear-gradient(180deg,#0f1822f2,#0a1018f4);border-left:.1em solid var(--line)}
.rf-next,.rf-order{padding:.7em .8em;background:#101c27ed;border:.06em solid #c5ad7466;border-radius:.7em}
.rf-next>p:last-child{margin:.5em 0 0;font-size:.72em;color:#bcb8b0;line-height:1.45}
.rf-queue{display:grid;grid-template-columns:1.25fr 1fr 1fr;align-items:center;gap:.4em}
.rf-queue>div{position:relative;padding:.25em .1em 1.1em;text-align:center;border:.06em solid #70818b55;border-radius:.45em;background:#30404a66}
.rf-queue .is-next{border-color:#e1c28f;background:#6b563977}
.rf-queue small{position:absolute;bottom:.2em;left:0;right:0;font-size:.6em;color:#e9d0a6}
.rf-goals{margin:.5em 0 0;font-size:.8em;color:#d0c8bd;line-height:1.5}
.rf-goals>span{display:flex;align-items:center;gap:.4em;margin:.25em 0}
.rf-goals .rf-rune{width:1.9em;flex:none}
.rf-goals .is-complete{color:#8de3b7}
.rf-actions{display:grid;grid-template-columns:1fr 1fr;gap:.4em;margin-top:auto}
.rf-actions .btn{font-size:.74em!important}
.rf-actions .rf-hammer,.rf-actions .rf-bank{grid-column:1/-1}
.rf-actions .rf-hammer{border-color:#e7ba70!important;color:#ffe4b0!important;background:linear-gradient(#8a6233,#5a3d1f)!important}
.rf-hammer[aria-pressed=true]{box-shadow:0 0 0 .12em #f9a568;filter:brightness(1.25)}
.rf-stage.is-hammer .rf-board{box-shadow:0 0 0 .3em #0b121a,0 0 0 .38em #f4a678,0 1em 2.4em #000b}

/* Dialoge */
.rf-overlay{position:absolute;inset:0;z-index:10;display:grid;place-items:center;padding:1em;background:#050a12d9;overflow:auto}
.rf-dialog{width:min(26em,100%);max-height:100%;overflow:auto;padding:1.3em;background:linear-gradient(150deg,#233340,#0d1723);border:.08em solid #d3ae70aa;border-radius:.9em;box-shadow:0 1.5em 4em #0009}
.rf-dialog h2{margin:.3em 0 .7em;font:700 1.45em/1.2 Georgia,serif;color:#fff1d2}
.rf-dialog ol{padding-left:1.3em;font-size:.85em;color:#ded7ca}
.rf-dialog li{padding:.2em 0}
.rf-dialog>p{font-size:.85em}
.rf-dialog .muted{color:#bcb8b0}
.rf-demo{display:flex;align-items:center;gap:.3em}
.rf-demo .rf-rune{width:21%;min-width:0}
.rf-demo b{font-size:.8em;color:#f0d69f}
.rf-result-body{text-align:center}
.rf-result-rune{width:6em;margin:0 auto}
.rf-stars{margin:.4em;color:#ffd97b;font-size:1.6em;letter-spacing:.1em}
.rf-reward{min-height:2.6em;color:#a9e7d1;font-size:.9em}
.rf-result-actions{display:flex;justify-content:center;gap:.5em;flex-wrap:wrap}

/* ---------- Hochformat (Handy) ---------- */
@container rff (aspect-ratio < 1){
	.rf-frame>*{font-size:clamp(8px,min(1.7cqh,3.6cqw),24px)}
	.rf-brand small{display:none}
	.rf-map-cols{display:block;overflow-y:auto}
	.rf-map-art{padding:1.2em}
	.rf-map-art h2{font-size:1.8em}
	.rf-map-body,.rf-level-list{overflow:visible;border-left:0}
	.rf-challenge,.rf-resume>div{flex-direction:column;align-items:stretch}
	.rf-chapter ol{grid-template-columns:repeat(3,minmax(0,1fr))}
	.rf-codex{grid-template-columns:repeat(5,minmax(0,1fr))}
	.rf-layout{display:flex;flex-direction:column;overflow-y:auto}
	.rf-main{padding:.5em .6em 0;justify-content:flex-start}
	.rf-hud,.rf-progress,.rf-board,.rf-status{width:min(100%,56cqh)}
	.rf-side{border-left:0;border-top:.1em solid var(--line);display:grid;grid-template-columns:1fr 1fr;overflow:visible}
	.rf-actions{grid-column:1/-1;grid-template-columns:repeat(4,minmax(0,1fr));margin-top:0}
	.rf-actions .rf-hammer,.rf-actions [data-restart],.rf-actions .rf-sound,.rf-actions [data-hint]{grid-column:span 2}
}
@media (prefers-reduced-motion:reduce){#gv-runen *{animation:none!important;transition:none!important}}
