/* Tiefenreich · Gestaltung 1.30.0 – Bergwerk als Querschnitt.
   Festes Spielfenster (16:9 am PC, volle Höhe im Hochformat) als Größen-Container; Maße in em wachsen mit.
   Ersetzt die Schichten aus 1.18/1.19 (trw-*) sowie die Tiefenreich-Teile aus game-materials.css und illustrated-menus.css. */

.tr-play-wrap{max-width:1540px!important}
#gv-tiefenreich{--tf-off:86px;--gold:#ffcf3f;--line:#b98544;--ink:#0a0a14;--text:#f6ead6;--dim:#cbbca6;position:relative;margin:10px auto 28px;color:var(--text);scroll-margin-top:calc(var(--tf-off) - 6px)}
#gv-tiefenreich [hidden]{display:none!important}
#gv-tiefenreich svg{flex:none}
:where(#gv-tiefenreich) button,:where(#gv-tiefenreich) select{font-family:inherit;font-size:1em;color:inherit}
#gv-tiefenreich button:focus-visible,#gv-tiefenreich a:focus-visible,#gv-tiefenreich select:focus-visible{outline:.16em solid #fff2b2;outline-offset:.12em}
.tf-defs{position:absolute;width:0;height:0;overflow:hidden}
.tr-loading{padding:3em;text-align:center;color:#cbbca6}

/* ---------- Spielfenster ---------- */
.tf-frame{position:relative;container:tff/size;width:min(100%,calc((100svh - var(--tf-off)) * 16 / 9));aspect-ratio:16/9;margin:0 auto;overflow:hidden;border-radius:16px;border:2px solid var(--line);background:#0a0912;box-shadow:inset 0 0 0 1px #ffd99a22,0 22px 50px #000b;display:grid;grid-template-rows:auto auto minmax(0,1fr);isolation:isolate}
.tf-frame>*{font-size:clamp(8px,min(2.05cqh,3.9cqw),40px)}
@media (orientation:portrait) and (max-width:900px){.tf-frame{width:100%;aspect-ratio:auto;height:calc(100svh - var(--tf-off));min-height:560px;max-height:1200px;border-radius:12px}}
#gv-tiefenreich:fullscreen,#gv-tiefenreich.gv-immersive{display:flex;align-items:center;justify-content:center;margin:0;padding:0;max-width:none;background:radial-gradient(ellipse at 50% 40%,#1d1628,#030306 75%);overflow:hidden}
#gv-tiefenreich:fullscreen .tf-frame,#gv-tiefenreich.gv-immersive .tf-frame{width:min(100vw,calc(100vh * 16 / 9));height:auto;max-height:100vh;border-radius:0;border-width:0}
@media (orientation:portrait){#gv-tiefenreich:fullscreen .tf-frame,#gv-tiefenreich.gv-immersive .tf-frame{width:100vw;height:100vh;aspect-ratio:auto;max-height:none}}

/* ---------- Kopfleiste ---------- */
.tf-hud{display:flex;align-items:center;gap:1em;padding:.45em .9em;background:linear-gradient(90deg,#0c0a14f2,#2a1f30ee 50%,#0c0a14f2),url(../img/tiefenreich/ui/tex-stone.webp) center/12em;border-bottom:.1em solid var(--line);box-shadow:inset 0 -.4em .8em #0008;z-index:5}
.tf-brand{display:flex;flex-direction:column;line-height:1.1;min-width:0}
.tf-brand b{font:700 1.2em Georgia,serif;letter-spacing:.08em;background:linear-gradient(180deg,#fff3cf,#ffc861 60%,#b97326);-webkit-background-clip:text;background-clip:text;color:transparent}
.tf-brand small{font-size:.66em;color:var(--dim);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tf-money{display:flex;align-items:baseline;gap:.6em;margin-left:auto;padding:.25em .8em;border-radius:.6em;background:#07060cd0;border:.08em solid #a77a45}
.tf-goldval{display:inline-flex;align-items:center;gap:.3em}.tf-goldval svg{width:1.5em;height:1.5em;align-self:center}
.tf-goldval b{font:800 1.5em/1 var(--body);color:#ffe08a;text-shadow:0 0 .5em #ffb02e55}
.tf-rate{font-size:.85em;color:#9fe6a8;font-weight:800}
.tf-res{display:flex;gap:.5em}
.tf-res span{display:inline-flex;align-items:center;gap:.25em;padding:.3em .55em;border-radius:.5em;background:#07060cb0;border:.06em solid #ffffff1f;font-weight:800;font-size:.9em}
.tf-res svg{width:1.1em;height:1.1em}.tf-res span:first-child{color:#d8b6ff}.tf-res span:last-child{color:#9fd8ff}
.tf-hud-btns{display:flex;gap:.4em}
.tf-ic{position:relative;display:inline-flex;align-items:center;gap:.35em;height:2.4em;padding:0 .75em;border-radius:.5em;border:.08em solid #a77a45;background:linear-gradient(180deg,#2a2236,#14101e);font-weight:800;font-size:.88em;cursor:pointer}
.tf-ic svg{width:1.2em;height:1.2em}
.tf-ic-sq{width:2.4em;padding:0;justify-content:center}
.tf-ic:hover{border-color:#ffd88d;filter:brightness(1.15)}
.tf-ic[aria-pressed="true"]{color:#ffd88d}
.tf-dot{position:absolute;right:-.25em;top:-.25em;width:.75em;height:.75em;border-radius:50%;background:#ff5a6a;box-shadow:0 0 .4em #ff5a6a}

/* ---------- Kette Förderung → Aufzug → Verkauf ---------- */
.tf-chain{display:flex;align-items:center;justify-content:center;gap:.5em;padding:.85em .8em .4em;background:#0b0912;border-bottom:.06em solid #b9854455;z-index:4}
.tf-link{position:relative;display:inline-flex;align-items:center;gap:.5em;padding:.3em .8em .3em .6em;border-radius:.6em;border:.08em solid #6d5a40;background:#16121f;cursor:pointer;min-width:0}
.tf-link svg{width:1.3em;height:1.3em;color:#e8cf9c}
.tf-link span{display:flex;flex-direction:column;line-height:1.1;text-align:left}
.tf-link small{font-size:.7em;color:var(--dim)}.tf-link b{font-size:.95em}
.tf-link em{position:absolute;left:50%;top:.15em;transform:translate(-50%,-100%);padding:.05em .5em;border-radius:.5em;background:#e2563c;color:#fff;font:800 .62em/1.5 var(--body);font-style:normal;text-transform:uppercase;letter-spacing:.06em;white-space:nowrap}
.tf-link.is-weak{border-color:#ff7a5a;box-shadow:0 0 .8em #ff6a4a66;animation:tfWeak 1.6s ease-in-out infinite}
@keyframes tfWeak{50%{box-shadow:0 0 1.3em #ff6a4aaa}}
.tf-arrow svg{width:1.1em;height:1.1em;color:#a77a45}

/* ---------- Hauptbereich ---------- */
.tf-body{display:grid;grid-template-columns:minmax(0,1fr) 18.5em;min-height:0}
.tf-mine{position:relative;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;background:#120d0a url(../img/tiefenreich/rock.webp) center/14em;outline:0}
.tf-stack{position:relative}

/* Oberfläche mit Förderturm, Lore und Lager */
.tf-surface{position:relative;height:10.5em;background:var(--sky) center bottom/cover;border-bottom:.15em solid #3a2a1a}
.tf-surface::after{content:"";position:absolute;inset:auto 0 0;height:1.4em;background:linear-gradient(#0000,#0007)}
.tf-tower{position:absolute;left:0;bottom:0;width:7.2em;height:9.6em;padding:0;border:0;background:none;cursor:pointer;z-index:2}
.tf-tower-art{position:absolute;inset:0;width:100%;height:100%;filter:drop-shadow(0 .2em .3em #000a)}
.tf-tower .tf-wheel{transform-origin:60px 14px;animation:tfSpin 3s linear infinite}
@keyframes tfSpin{to{transform:rotate(360deg)}}
.tf-depot{position:absolute;right:.6em;bottom:.1em;width:11.5em;height:8.2em;padding:0;border:0;background:none;cursor:pointer;z-index:2}
.tf-depot-art{position:absolute;inset:0;width:100%;height:100%;filter:drop-shadow(0 .25em .35em #000a)}
.tf-tag{position:absolute;left:50%;top:-.2em;transform:translate(-50%,-100%);display:flex;flex-direction:column;align-items:center;padding:.2em .6em;border-radius:.5em;background:#0b0912e6;border:.08em solid #a77a45;white-space:nowrap;line-height:1.15;pointer-events:none}
.tf-tag b{font-size:.82em}.tf-tag small{font-size:.66em;color:var(--dim)}
.tf-tower .tf-tag{top:auto;bottom:.4em;left:calc(100% + .2em);transform:none;align-items:flex-start}
.tf-depot .tf-tag{top:.4em}
.tf-tower.is-sel .tf-tag,.tf-depot.is-sel .tf-tag{border-color:#ffd88d;box-shadow:0 0 .7em #ffcf3f88}
.tf-tower.is-weak .tf-tag,.tf-depot.is-weak .tf-tag{border-color:#ff7a5a;box-shadow:0 0 .8em #ff6a4a88}
.tf-tower:hover,.tf-depot:hover{filter:brightness(1.12)}
.tf-track{position:absolute;left:6.8em;right:12em;bottom:.5em;height:2.6em;background:linear-gradient(#0000 82%,#6b4a2a 82%,#6b4a2a 90%,#0000 90%),repeating-linear-gradient(90deg,#0000 0 .9em,#4a3018 .9em 1.2em) bottom/100% .35em no-repeat}
.tf-hauler{position:absolute;left:0;bottom:.2em;width:3.6em;height:2.4em;transform-origin:50% 50%}
.tf-hauler svg{width:100%;height:100%}
.tf-hauler.is-empty .tf-cart-load{opacity:0}
.tf-buffer{position:absolute;left:12.6em;top:.6em;display:flex;flex-direction:column;align-items:center;padding:.25em .7em;border-radius:.5em;background:#0b0912d8;border:.06em solid #ffffff22;line-height:1.15}
.tf-buffer small{font-size:.64em;color:var(--dim)}.tf-buffer b{font-size:.9em}

/* Stollen */
.tf-shaftzone{position:relative}
.tf-liftshaft{position:absolute;left:0;top:0;bottom:0;width:6.3em;z-index:3;pointer-events:none;background:linear-gradient(90deg,#0009,#000c 40%,#0009),url(../img/tiefenreich/rock.webp) center/10em;border-right:.18em solid #5b3b1e;box-shadow:inset -.4em 0 .6em #000a}
.tf-liftshaft::before,.tf-liftshaft::after{content:"";position:absolute;top:0;bottom:0;width:.35em;background:linear-gradient(90deg,#7b4a24,#c08a52,#7b4a24)}
.tf-liftshaft::before{left:.45em}.tf-liftshaft::after{right:.45em}
.tf-cable{position:absolute;left:50%;top:0;width:.14em;height:var(--cable,0px);background:#c9b48a;transform:translateX(-50%)}
.tf-shaftzone{--cable:0px}
.tf-liftshaft .tf-cable{height:var(--cable)}
.tf-cagebox{position:absolute;left:.75em;top:0;width:4.8em;height:5.2em;will-change:transform}
.tf-cage{width:100%;height:100%;filter:drop-shadow(0 .2em .3em #000)}
.tf-cage .tf-cage-load{transition:opacity .25s}
.tf-liftman-wrap{position:absolute;left:4%;bottom:12%;width:58%;height:72%;z-index:2;will-change:transform}
.tf-liftman{width:100%;height:100%;overflow:visible;transform-origin:50% 100%}
.tf-liftman .tf-scoop{opacity:0;transition:opacity .12s}
.tf-cage-num{position:absolute;left:50%;top:.1em;transform:translate(-50%,-100%);z-index:3;padding:.05em .35em;border-radius:.4em;background:#000b;font-size:.7em;font-weight:800;white-space:nowrap}

.tf-row{position:relative;height:8.4em;background:#0d0a08 var(--bg) 38% center/cover;border-bottom:.1em solid #00000088;overflow:hidden}
.tf-row::after{content:"";position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 0 .14em transparent;transition:box-shadow .2s}
.tf-row.is-sel::after{box-shadow:inset 0 0 0 .16em #ffd88d,inset 0 0 1.6em #ffcf3f33}
.tf-row.is-flash{animation:tfFlash .6s}
@keyframes tfFlash{30%{filter:brightness(1.45)}}
.tf-row-hit{position:absolute;inset:0;padding:0;border:0;background:none;cursor:pointer;z-index:0}
.tf-row-tag{position:absolute;left:7em;top:.45em;display:flex;align-items:center;gap:.45em;padding:.2em .6em .2em .25em;border-radius:.55em;background:#0b0912d8;border:.07em solid color-mix(in srgb,var(--ore) 55%,#6d5a40);z-index:2;pointer-events:none}
.tf-row-tag>b{display:grid;place-items:center;width:1.7em;height:1.7em;border-radius:.4em;background:color-mix(in srgb,var(--ore) 30%,#1a1424);color:#fff;font-size:.8em}
.tf-row-tag span{display:flex;flex-direction:column;line-height:1.1}
.tf-row-tag strong{font:700 .95em Georgia,serif}.tf-row-tag small{font-size:.7em;color:var(--dim)}
.tf-boss{display:grid;place-items:center;width:1.5em;height:1.5em;border-radius:50%;background:#2f6b3a;color:#ffe08a;border:.06em solid #9be0a0}
.tf-boss svg{width:.95em;height:.95em}
.tf-crate-wrap{position:absolute;left:7em;bottom:.75em;width:4.6em;z-index:2;pointer-events:none}
.tf-crate{width:100%;display:block}
.tf-ore-pile{transform-origin:32px 24px;transform:scaleY(var(--pile,0))}
.tf-crate-num{position:absolute;left:50%;top:58%;transform:translate(-50%,-50%);font-size:.74em;white-space:nowrap;font-weight:800;text-shadow:0 1px 2px #000,0 0 .4em #000}
.tf-crate-bar{position:absolute;left:8%;right:8%;bottom:-.55em;height:.38em;border-radius:.3em;background:#000a;overflow:hidden}
.tf-crate-bar i{position:absolute;inset:0 auto 0 0;background:var(--ore);transition:width .4s}
.tf-row.is-full .tf-crate-bar i{background:#ff6a4a}
.tf-worker{position:absolute;left:0;bottom:.45em;width:4.4em;height:5.6em;padding:0;border:0;background:none;cursor:pointer;z-index:2;will-change:transform}
.tf-miner{width:100%;height:100%;overflow:visible;transform-origin:50% 100%}
.tf-miner g{transform-box:fill-box}
.tf-leg-f,.tf-leg-b{transform-origin:50% 0}
.tf-arm-f,.tf-arm-b{transform-origin:0 0}
.tf-sack{opacity:0;transition:opacity .15s}
.tf-zzz{opacity:0}
.tf-lampglow{opacity:.75}
.tf-wake{position:absolute;left:88%;bottom:62%;display:none;padding:.15em .5em;border-radius:.5em;background:#2a5ea8;color:#fff;font-size:.68em;font-weight:800;white-space:nowrap;box-shadow:0 0 .7em #4f9bff99;animation:tfBob 1.4s ease-in-out infinite}
@keyframes tfBob{50%{translate:0 -.25em}}
.tf-row.is-idle .tf-zzz{opacity:1;animation:tfZ 2s ease-in-out infinite}
.tf-row.is-idle .tf-wake{display:block}
.tf-row.is-idle .tf-miner{filter:saturate(.7) brightness(.85)}
.tf-row.is-idle .tf-lampglow{opacity:.15}
@keyframes tfZ{50%{translate:.2em -.3em;opacity:.5}}
.tf-row-act{position:absolute;right:.7em;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;align-items:stretch;gap:.35em;z-index:3;width:12em}
.tf-up{display:flex;align-items:center;justify-content:space-between;gap:.5em;min-height:2.6em;padding:.25em .7em;border-radius:.55em;border:.1em solid #ffd88d;background:linear-gradient(180deg,#ffe7a3,#e5a646 50%,#a8661e);color:#2b1606;font-weight:800;cursor:pointer;box-shadow:inset 0 .1em 0 #fff6d0,0 .2em .5em #000a}
.tf-up-a,.tf-up-c{display:inline-flex;align-items:center;gap:.25em;white-space:nowrap}
.tf-up svg{width:1.1em;height:1.1em}
.tf-up-c b{font-size:.9em}
.tf-up{font-size:.95em}
.tf-up:disabled{filter:grayscale(.75) brightness(.62);cursor:not-allowed}
.tf-up.is-ready:hover{filter:brightness(1.1)}
.tf-hire{display:flex;align-items:center;gap:.35em;min-height:2em;padding:.15em .6em;border-radius:.5em;border:.08em solid #8fe0a0;background:linear-gradient(180deg,#3f8a4c,#22552c);color:#effff0;font-size:.8em;font-weight:800;cursor:pointer}
.tf-hire svg{width:1.1em;height:1.1em;color:#ffe08a}.tf-hire b{margin-left:auto}
.tf-hire:disabled{filter:grayscale(.7) brightness(.65);cursor:not-allowed}
.tf-relic{position:absolute;left:calc(50% - 1.3em);top:2.4em;width:2.6em;height:2.6em;display:grid;place-items:center;border-radius:50%;border:.1em solid #e9c6ff;background:radial-gradient(#d29cff,#6a2ba0);color:#fff;z-index:4;cursor:pointer;animation:tfRelic 1.2s ease-in-out infinite;box-shadow:0 0 1.2em #c890ff}
.tf-relic svg{width:1.5em;height:1.5em}
@keyframes tfRelic{50%{transform:translateY(-.3em) scale(1.08)}}
.tf-float{position:absolute;left:40%;top:30%;font-weight:900;font-size:1.2em;color:#ffe08a;text-shadow:0 2px 0 #000,0 0 .6em #000;pointer-events:none;z-index:6;animation:tfFloat 1.2s ease-out forwards}
@keyframes tfFloat{to{transform:translateY(-2.2em);opacity:0}}
.tf-row.is-locked{filter:none}
.tf-row.is-sealed{filter:brightness(.68) saturate(.7)}
.tf-row.is-sealed .tf-dig img{filter:grayscale(1) brightness(.7)}
.tf-row.is-sealed .tf-up-dig{opacity:.75}
.tf-float-take{left:12em;top:auto;bottom:1.6em;color:#fff;font-size:.95em}
.tf-float-un{left:50%;top:-.4em;transform:translateX(-50%);font-size:1em}
.tf-dig{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:1em;padding-left:6.5em;z-index:2}
.tf-dig img{width:3.6em;height:3.6em;filter:grayscale(.4) drop-shadow(0 0 .6em color-mix(in srgb,var(--ore) 60%,transparent))}
.tf-dig div{display:flex;flex-direction:column;line-height:1.15}
.tf-dig small{font-size:.72em;color:var(--dim);text-transform:uppercase;letter-spacing:.08em}.tf-dig strong{font:700 1.2em Georgia,serif}
.tf-up-dig{min-width:12em}
.tf-deeper{margin:0;padding:1.2em 1em 2em 7em;background:linear-gradient(#0000,#000c),#0c0907;color:var(--dim);font-size:.8em;text-align:center}

/* ---------- Detailbereich ---------- */
.tf-panel{display:flex;flex-direction:column;gap:.6em;min-height:0;overflow-y:auto;padding:.9em;background:linear-gradient(180deg,#171220f2,#0c0a12f8),url(../img/tiefenreich/ui/tex-stone.webp) center/12em;border-left:.1em solid var(--line);scrollbar-width:thin}
.tf-ph{display:flex;align-items:center;gap:.6em}
.tf-ph img,.tf-ph-ic{width:3em;height:3em;flex:none}
.tf-ph-ic{display:grid;place-items:center;border-radius:.6em;background:#2a2236;border:.08em solid #a77a45;color:#e8cf9c}.tf-ph-ic svg{width:1.7em;height:1.7em}
.tf-ph div{min-width:0;flex:1}
.tf-ph small{font-size:.7em;color:#e9b86d;text-transform:uppercase;letter-spacing:.1em}
.tf-ph h2{margin:0;font:700 1.3em/1.1 Georgia,serif;color:#fff0cf}
.tf-sheet-x{display:none}
.tf-stat{display:flex;justify-content:space-between;gap:.5em;padding:.4em .1em;border-bottom:.06em solid #ffffff14;font-size:.85em}
.tf-stat span{color:var(--dim)}.tf-stat b{display:inline-flex;align-items:center;gap:.25em;white-space:nowrap}
.tf-stat i svg{width:.9em;height:.9em;color:#9fe6a8}.tf-stat em{font-style:normal;color:#9fe6a8}
.tf-qty{display:grid;grid-template-columns:repeat(3,1fr);gap:.3em;padding:.25em;border-radius:.6em;background:#07060c}
.tf-qty button{padding:.4em 0;border:0;border-radius:.4em;background:none;font-weight:800;cursor:pointer;color:var(--dim)}
.tf-qty button[aria-pressed="true"]{background:linear-gradient(180deg,#ffe7a3,#d8953a);color:#2b1606}
.tf-big{display:flex;align-items:center;justify-content:space-between;gap:.6em;min-height:3em;padding:.4em .9em;border-radius:.6em;font-weight:800;cursor:pointer}
.tf-big span,.tf-big b{display:inline-flex;align-items:center;gap:.3em}.tf-big svg{width:1.2em;height:1.2em}
.tf-mid{display:inline-flex;align-items:center;justify-content:center;gap:.35em;min-height:2.4em;padding:.3em .8em;border-radius:.5em;font-weight:800;font-size:.88em;cursor:pointer;text-decoration:none;border:.08em solid #a77a45;background:linear-gradient(180deg,#2a2236,#14101e)}
.tf-mid svg{width:1.1em;height:1.1em}
.tf-gold{border:.1em solid #ffd88d;background:linear-gradient(180deg,#ffe7a3,#e5a646 50%,#a8661e);color:#2b1606;box-shadow:inset 0 .1em 0 #fff6d0,0 .2em .5em #000a}
.tf-green{border:.08em solid #8fe0a0;background:linear-gradient(180deg,#3f8a4c,#22552c);color:#effff0}
.tf-blue{border:.08em solid #8cc7ff;background:linear-gradient(180deg,#3567a8,#1d3a66);color:#eef6ff}
.tf-purple{border:.08em solid #c9a3ff;background:linear-gradient(180deg,#6a43a8,#3a2066);color:#f6efff}
.tf-danger{border:.08em solid #ff9a8a;background:linear-gradient(180deg,#8a2e2e,#4f1616);color:#fff}
.tf-big:disabled,.tf-mid:disabled{filter:grayscale(.75) brightness(.6);cursor:not-allowed}
.tf-big:not(:disabled):hover,.tf-mid:not(:disabled):hover{filter:brightness(1.12)}
.tf-boss-box{display:flex;align-items:center;justify-content:space-between;gap:.6em;padding:.55em .6em;border-radius:.6em;border:.06em solid #ffffff1c;background:#0a0910}
.tf-boss-box div{display:flex;flex-direction:column;line-height:1.2}
.tf-boss-box b{display:inline-flex;align-items:center;gap:.3em;font-size:.88em}.tf-boss-box b svg{width:1.1em;height:1.1em;color:#ffe08a}
.tf-boss-box small{font-size:.72em;color:var(--dim)}
.tf-boss-box.is-on{border-color:#8fe0a066}
.tf-boss-box .tf-mid{white-space:nowrap;font-size:.8em}
.tf-ok{display:grid;place-items:center;width:1.9em;height:1.9em;border-radius:50%;background:#2f6b3a;color:#cfffd6;font-weight:900}
.tf-hint{margin:.2em 0 0;padding:.6em .7em;border-radius:.6em;background:#0a0910;border-left:.2em solid #e9b86d;color:var(--dim);font-size:.78em;line-height:1.4}

/* ---------- Menü ---------- */
.tf-menu{position:absolute;inset:0;z-index:20;display:grid;place-items:center;padding:1em;background:#04030acc;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}
.tf-menu-box{display:flex;flex-direction:column;width:min(34em,100%);max-height:100%;border-radius:.9em;border:.12em solid var(--line);background:linear-gradient(160deg,#211735f2,#0b0a14f8),url(../img/tiefenreich/ui/tex-stone.webp) center/12em;box-shadow:0 1.2em 3em #000e;overflow:hidden}
.tf-menu-head{display:flex;align-items:center;gap:.5em;padding:.6em;border-bottom:.08em solid #b9854466}
.tf-menu-head nav{display:flex;flex-wrap:wrap;gap:.3em;flex:1}
.tf-menu-head nav button{padding:.45em .8em;border-radius:.5em;border:.06em solid #ffffff22;background:#120f1c;font-weight:800;font-size:.85em;cursor:pointer}
.tf-menu-head nav button[aria-pressed="true"]{border-color:#ffd88d;background:linear-gradient(180deg,#ffe7a3,#d8953a);color:#2b1606}
.tf-menu-body{display:flex;flex-direction:column;gap:.6em;padding:.9em;overflow-y:auto}
.tf-lead{margin:0;color:var(--dim);font-size:.85em;line-height:1.45}
.tf-lead svg{width:1em;height:1em;vertical-align:-.15em;color:#d8b6ff}
.tf-card{display:flex;align-items:center;gap:.7em;padding:.7em;border-radius:.7em;border:.06em solid #ffffff1f;background:#0b0910d8}
.tf-card>div{flex:1;display:flex;flex-direction:column;line-height:1.25}
.tf-card small{font-size:.75em;color:var(--dim)}
.tf-card-ic{display:grid;place-items:center;width:2.4em;height:2.4em;border-radius:.5em;background:#2a2236;color:#e8cf9c}.tf-card-ic svg{width:1.4em;height:1.4em}
.tf-card-col{flex-direction:column;align-items:stretch}
.tf-prog{height:.6em;border-radius:.4em;background:#000a;overflow:hidden}.tf-prog i{display:block;height:100%;background:linear-gradient(90deg,#e5a646,#ffe08a)}
.tf-big-num{margin:0;font:800 1.6em var(--body);color:#9fd8ff;display:flex;align-items:center;gap:.3em}.tf-big-num svg{width:1em;height:1em}
.tf-steps{margin:0;padding:0;list-style:none;counter-reset:s;display:grid;gap:.55em}
.tf-steps li{display:grid;grid-template-columns:2em 1fr;gap:.1em .6em;counter-increment:s;font-size:.85em;line-height:1.4}
.tf-steps li::before{content:counter(s);grid-row:span 2;display:grid;place-items:center;width:1.8em;height:1.8em;border-radius:50%;background:linear-gradient(180deg,#ffe7a3,#d8953a);color:#2b1606;font-weight:900}
.tf-steps span{color:var(--dim)}
.tf-setting{display:flex;align-items:center;justify-content:space-between;gap:1em;padding:.6em .7em;border-radius:.6em;background:#0b0910d8;border:.06em solid #ffffff1f;font-weight:700}
.tf-setting select{padding:.35em .5em;border-radius:.4em;border:.06em solid #a77a45;background:#120f1c}

.tf-toast{position:absolute;left:50%;bottom:1em;transform:translate(-50%,1em);z-index:30;max-width:90%;padding:.55em 1em;border-radius:.7em;background:#0b0912f2;border:.08em solid #ffd88d;font-weight:700;font-size:.85em;opacity:0;pointer-events:none;transition:opacity .25s,transform .25s;text-align:center}
.tf-toast.on{opacity:1;transform:translate(-50%,0)}

/* ---------- Hochformat (Handy): Detailbereich als Blatt von unten ---------- */
@container tff (aspect-ratio < 1){
	.tf-frame>*{font-size:clamp(11px,min(3.9cqw,2.1cqh),28px)}
	.tf-hud{flex-wrap:wrap;gap:.4em .6em;padding:.4em .5em}
	.tf-brand{display:none}
	.tf-money{margin-left:0}
	.tf-res{margin-right:auto}
	.tf-hud-btns{gap:.3em}
	.tf-ic span{display:none}
	.tf-ic{width:2.3em;padding:0;justify-content:center}
	.tf-chain{gap:.25em;padding:.8em .3em .35em}
	.tf-link{padding:.25em .45em;gap:.3em}
	.tf-link svg{width:1.05em;height:1.05em}
	.tf-link small{font-size:.62em}.tf-link b{font-size:.8em}
	.tf-arrow svg{width:.8em;height:.8em}
	.tf-body{grid-template-columns:1fr;position:relative}
	.tf-panel{position:absolute;left:0;right:0;bottom:0;max-height:72%;z-index:8;border-left:0;border-top:.14em solid var(--line);border-radius:1em 1em 0 0;box-shadow:0 -1em 2em #000c;transform:translateY(105%);transition:transform .25s}
	.tf-frame.sheet-open .tf-panel{transform:none}
	.tf-sheet-x{display:grid;place-items:center;width:2.2em;height:2.2em;padding:0;border-radius:50%;border:.08em solid #a77a45;background:#120f1c;cursor:pointer}
	.tf-sheet-x svg{width:1.1em;height:1.1em}
	.tf-surface{height:9em}
	.tf-tower{width:5.6em;height:8em}
	.tf-tower .tf-tag{display:none}
	.tf-depot{width:8.6em;height:6.4em}
	.tf-track{left:5.4em;right:8.8em}
	.tf-buffer{left:6em;top:.4em}
	.tf-liftshaft{width:4.6em}
	.tf-cagebox{left:.4em;width:3.8em;height:4.2em}
	.tf-row{height:7.6em;background-position:82% center}
	.tf-row-tag{left:5.1em;top:.35em}
	.tf-crate-wrap{left:5.2em;width:3.7em}
	.tf-worker{width:3.7em;height:4.8em}
	.tf-row-act{width:8.6em;right:.4em}
	.tf-relic{top:3em}
	.tf-up{min-height:2.4em;padding:.2em .5em}

	.tf-hire{font-size:.72em}
	.tf-hire span{display:none}
	.tf-dig{padding-left:5em;gap:.5em;flex-wrap:wrap}
	.tf-dig img{width:2.6em;height:2.6em}
	.tf-up-dig{min-width:0}
	.tf-deeper{padding-left:5em}
}
@media (max-width:600px){#gv-tiefenreich{margin:4px auto 16px}}
@media (prefers-reduced-motion:reduce){.tf-tower .tf-wheel,.tf-link.is-weak,.tf-wake,.tf-row.is-idle .tf-zzz,.tf-relic{animation:none!important}.tf-panel{transition:none}}

/* ---------- 1.37: Gliederpuppen-Bergleute, Minenkarren, Kristallfenster, VITA-Belohnungen ---------- */
.tf-miner.tf-rig g{transform-box:view-box;transform-origin:0 0}
.tf-rig image{image-rendering:auto}
.tf-rig .tf-sack{opacity:0;transition:opacity .15s}
.tf-worker{width:5.2em;height:6.6em;bottom:.3em}
.tf-crate-wrap{width:5.4em;bottom:.35em}
.tf-cartimg{position:relative;z-index:1;display:block;width:100%;filter:drop-shadow(0 .25em .3em #000a)}
.tf-pile-wrap{position:absolute;left:15%;right:15%;bottom:58%;height:30%;z-index:0;transform-origin:50% 100%;transform:scaleY(calc(.12 + var(--pile,0) * .88));transition:transform .4s}
.tf-pile-wrap svg,.tf-cage-pile svg{display:block;width:100%;height:100%}
.tf-crate-num{top:62%;z-index:2}
.tf-crate-bar{bottom:-.35em;z-index:2}
/* Kristallader am Ende des Weges: der Bergmann schlägt hier zu */
.tf-vein{position:absolute;right:13.9em;bottom:.9em;width:4.4em;height:4.4em;z-index:1;pointer-events:none;display:grid;place-items:center}
.tf-vein::before{content:"";position:absolute;inset:-18%;border-radius:50%;background:radial-gradient(circle,color-mix(in srgb,var(--ore) 42%,transparent),transparent 68%);opacity:.75}
.tf-vein img{position:relative;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 0 .5em color-mix(in srgb,var(--ore) 70%,transparent))}
.tf-vein .tf-spark{position:absolute;left:8%;top:38%;width:1.6em;height:1.6em;border-radius:50%;background:radial-gradient(circle,#fff 0,#fff6 25%,color-mix(in srgb,var(--ore) 70%,transparent) 45%,transparent 70%);opacity:0;pointer-events:none}
.tf-vein.is-hit img{animation:tfVein .32s ease-out}
.tf-vein.is-hit .tf-spark{animation:tfSpark .35s ease-out}
.tf-vein.is-flash img{animation:tfVein .5s ease-out 2}
@keyframes tfVein{0%{transform:scale(1)}30%{transform:scale(.92) translateX(.06em)}60%{transform:scale(1.05)}100%{transform:scale(1)}}
@keyframes tfSpark{0%{opacity:1;transform:scale(.3)}100%{opacity:0;transform:scale(1.6)}}
.tf-row.is-idle .tf-vein img{filter:brightness(.75) saturate(.8)}
/* Kristallfenster: gerahmte, beleuchtete Nische für jedes Erz */
.tf-gemwin{position:relative;display:grid;place-items:center;flex:none;width:3.6em;height:3.6em;border-radius:.75em;overflow:hidden;border:.13em solid #c89a55;
 background:radial-gradient(circle at 50% 62%,color-mix(in srgb,var(--ore,#ffc859) 48%,transparent),transparent 62%),linear-gradient(180deg,#1d1628,#08060d);
 box-shadow:inset 0 0 .9em #000,inset 0 0 0 .12em #00000080,0 0 1em color-mix(in srgb,var(--ore,#ffc859) 35%,transparent)}
.tf-gemwin::after{content:"";position:absolute;inset:0;background:linear-gradient(135deg,#ffffff30,transparent 38%,transparent 70%,#ffffff12);pointer-events:none}
.tf-gemwin img{width:84%;height:84%;object-fit:contain;filter:drop-shadow(0 .15em .25em #000a)}
.tf-gemwin-lg{width:100%;height:auto;aspect-ratio:1;border-radius:.9em}
.tf-gemwin-sm{width:3.8em;height:3.8em}
.tf-gemwin-xs{width:2.4em;height:2.4em;border-radius:.5em;border-width:.1em}
.tf-ph .tf-gemwin{width:4.4em;height:4.4em}
.tf-dig .tf-gemwin img{width:84%;height:84%}
.tf-gearrow{display:flex;align-items:center;gap:.45em;padding:.45em .6em;border-radius:.6em;background:#0b0910d8;border:.06em solid #ffffff1f}
.tf-gearrow img{width:2.3em;height:2.3em;object-fit:contain;filter:drop-shadow(0 .1em .2em #000)}
.tf-gearrow div{display:flex;flex-direction:column;line-height:1.2;min-width:0}
.tf-gearrow b{font-size:.85em}.tf-gearrow small{font-size:.7em;color:var(--dim)}
.tf-hint-sm{font-size:.72em;margin:-.2em 0 0}
.tf-dyn img{width:1.55em;height:1.55em;object-fit:contain;margin-right:.2em}
.tf-vita-tag{display:inline-flex;align-items:center;gap:.25em;margin-top:.2em;font-style:normal;font-weight:800;font-size:.72em;color:#ffd88d}
.tf-vita-tag svg{width:1.1em;height:1.1em}
/* Aufzug: Karren im Korb, Laterne */
.tf-cage-lamp{position:absolute;right:-.35em;top:.15em;width:1.5em;height:1.5em;z-index:3;filter:drop-shadow(0 0 .4em #ffb02e)}
.tf-cage-load{position:absolute;right:7%;bottom:9%;width:50%;z-index:1;opacity:0;transition:opacity .2s}
.tf-cage-load.is-full{opacity:1}
.tf-cage-load img{position:relative;z-index:1;display:block;width:100%}
.tf-cage-pile{position:absolute;left:15%;right:15%;bottom:58%;height:30%;z-index:0;transform-origin:50% 100%;transform:scaleY(calc(.15 + var(--pile,0) * .85))}
.tf-liftman-wrap{width:62%;height:78%;bottom:10%}
/* Lore oben */
.tf-hauler{width:3.8em;height:3.4em;bottom:.05em}
.tf-hauler img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;transition:opacity .2s;filter:drop-shadow(0 .2em .2em #000a)}
.tf-hauler .tf-hauler-empty,.tf-hauler.is-empty .tf-hauler-full{opacity:0}
.tf-hauler.is-empty .tf-hauler-empty{opacity:1}
/* Menü breit für Kristallkammer und Belohnungen */
.tf-menu-box.is-wide{width:min(54em,100%)}
.tf-sub{margin:.4em 0 0;font:700 1.05em Georgia,serif;color:#fff0cf}
.tf-gemgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(8.6em,1fr));gap:.55em}
.tf-gemcard{display:flex;flex-direction:column;align-items:stretch;gap:.25em;padding:.5em;border-radius:.8em;border:.07em solid color-mix(in srgb,var(--ore) 45%,#4a3a28);background:linear-gradient(180deg,#171223,#0a0810);text-align:left;cursor:pointer;color:inherit;font:inherit}
.tf-gemcard:hover{border-color:var(--ore);filter:brightness(1.1)}
.tf-gemcard b{font:700 .92em Georgia,serif;color:#fff0cf}
.tf-gemcard small{font-size:.7em;color:var(--dim)}
.tf-gemcard em{font-style:normal;font-size:.72em;font-weight:800;color:color-mix(in srgb,var(--ore) 70%,#fff)}
.tf-gemcard.is-dark .tf-gemwin img{filter:brightness(0) drop-shadow(0 0 .3em #ffffff30);opacity:.75}
.tf-gemcard.is-dark b{color:#b9b0c8}
.tf-gemcard:not(.is-open) .tf-gemwin{border-color:#6d5a40}
.tf-geargrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(7em,1fr));gap:.5em}
.tf-gearcard{display:flex;flex-direction:column;align-items:center;gap:.15em;padding:.5em .3em;border-radius:.7em;background:#0b0910d8;border:.06em solid #ffffff1a;text-align:center;opacity:.55;filter:grayscale(.7)}
.tf-gearcard.is-on{opacity:1;filter:none;border-color:#c89a55}
.tf-gearcard span{display:flex}
.tf-gearcard img{width:2.6em;height:2.6em;object-fit:contain}
.tf-gearcard b{font-size:.82em}.tf-gearcard small{font-size:.68em;color:var(--dim)}
/* VITA-Belohnungen */
.tf-ic-vita{color:#ffd88d;border-color:#e0a84a}
.tf-vhead{display:flex;align-items:center;gap:.7em;padding:.7em;border-radius:.8em;background:linear-gradient(135deg,#3a2810,#120c18);border:.08em solid #e0a84a}
.tf-vhead>svg{width:2.6em;height:2.6em;flex:none}
.tf-vhead div{flex:1;display:flex;flex-direction:column;line-height:1.3}
.tf-vhead b{font:700 1.1em Georgia,serif;color:#ffe7a3}.tf-vhead small{font-size:.78em;color:#e8dcc4}
.tf-vbal{display:inline-flex;align-items:center;gap:.3em;padding:.3em .6em;border-radius:2em;background:#000a;font-weight:800}
.tf-vbal svg{width:1.3em;height:1.3em}
.tf-vlist{display:flex;flex-direction:column;gap:.35em}
.tf-vrow{display:flex;align-items:center;gap:.6em;padding:.45em .6em;border-radius:.6em;background:#0b0910d8;border:.06em solid #ffffff14}
.tf-vrow>div{flex:1;display:flex;flex-direction:column;line-height:1.25;min-width:0}
.tf-vrow b{font-size:.86em}.tf-vrow small{font-size:.7em;color:var(--dim)}
.tf-vrow-ic{display:grid;place-items:center;width:2.4em;height:2.4em;border-radius:.5em;background:#2a2236;color:#ffd88d;flex:none}.tf-vrow-ic svg{width:1.3em;height:1.3em}
.tf-vamt{display:inline-flex;align-items:center;gap:.2em;font-weight:800;color:#ffd88d;white-space:nowrap}
.tf-vamt svg{width:1.15em;height:1.15em}
.tf-vrow.is-ready{border-color:#e0a84a;box-shadow:0 0 .8em #ffbf4a33}
.tf-vrow.is-done{opacity:.55}
.tf-vopen{font-size:.72em;color:var(--dim);min-width:5.5em;text-align:center}
.tf-vrow .tf-mid{min-width:5.5em}
@container tff (aspect-ratio < 1){
	.tf-worker{width:4.4em;height:5.6em}
	.tf-crate-wrap{left:5.1em;width:4.4em}
	.tf-vein{right:9.1em;width:3.4em;height:3.4em;bottom:1em}
	.tf-gemgrid{grid-template-columns:repeat(auto-fill,minmax(7.2em,1fr))}
	.tf-menu-box.is-wide{width:100%}
}
@media (prefers-reduced-motion:reduce){.tf-vein.is-hit img,.tf-vein.is-hit .tf-spark{animation:none}}
