/* Helpiqo Front – Oberfläche. Spielfeld selbst: Canvas (web/src/front/render.js) */
body.ff-body { background: radial-gradient(ellipse at top, #312e81, #0f1023 62%); color: #eef0ff; min-height: 100vh; }
.ff-body .site-header { background: #14152e; border-color: #2c2e5c; } .ff-body .site-header a, .ff-body .logo { color: #eef0ff; }
.ff-body .site-footer { background: transparent; color: #a3a8d6; border-color: #2c2e5c; } .ff-body .site-footer a { color: #a3a8d6; }
.ff-main { max-width: 1120px; margin: 0 auto; padding: 12px 10px 30px; }
.ff-frame[hidden] { display: none; }
.ff-hero { position: relative; overflow: hidden; text-align: center; padding: 22px 14px 18px; border-radius: 22px; background: linear-gradient(120deg, #1e1b4b, #4c1d95 55%, #7e22ce); border: 1px solid #5b4bb0; }
.ff-hero h1 { margin: 0; font-size: clamp(2.2rem, 8vw, 3.6rem); letter-spacing: -.02em; background: linear-gradient(90deg, #fde68a, #fbbf24, #f0abfc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ff-hero p { margin: 6px auto 0; max-width: 620px; color: #d8d6ff; }
.ff-hero img { position: absolute; bottom: -8px; height: 124px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); pointer-events: none; }
.ff-hero .a { left: 2%; } .ff-hero .b { right: 2%; transform: scaleX(-1); }
@media (max-width: 720px) { .ff-hero img { display: none; } }
.ff-top3 { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 12px 0; align-items: center; }
.ff-pill { background: rgba(0,0,0,.3); border: 1px solid #4b4a8f; border-radius: 99px; padding: 6px 13px; font-weight: 800; font-size: .92rem; }
.ff-btn { border: 1px solid #5552a8; background: #2b2a63; color: #fff; font: inherit; font-weight: 800; border-radius: 13px; padding: 10px 16px; cursor: pointer; transition: transform .12s; text-decoration: none; display: inline-block; }
.ff-btn:hover:not(:disabled) { transform: translateY(-2px); }
.ff-btn:disabled { opacity: .5; cursor: default; }
.ff-btn.gold { background: linear-gradient(180deg, #fcd34d, #f59e0b); color: #2a1a00; border-color: #b45309; box-shadow: 0 6px 16px -6px rgba(245,158,11,.7); }
.ff-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.ff-small { font-size: .85rem; color: #b9bbe8; }
.ff-lands { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 12px; }
@media (max-width: 720px) { .ff-lands { grid-template-columns: 1fr; } }
.ff-land { border-radius: 18px; padding: 12px; border: 1px solid rgba(255,255,255,.14); }
.ff-land h3 { margin: 0 0 8px; }
.ff-l0 { background: linear-gradient(135deg, #14532d, #1e3a2f); } .ff-l1 { background: linear-gradient(135deg, #164e63, #1e293b); } .ff-l2 { background: linear-gradient(135deg, #7c2d12, #3f1d1d); } .ff-l3 { background: linear-gradient(135deg, #4c1d95, #1e1b4b); }
.ff-nodes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ff-node { display: flex; flex-direction: column; align-items: center; gap: 2px; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.2); border-radius: 14px; color: #fff; font: inherit; padding: 9px 5px; cursor: pointer; min-height: 92px; transition: transform .12s; }
.ff-node:hover:not(:disabled) { transform: translateY(-3px); border-color: #fbbf24; }
.ff-node b { font-size: 1.3rem; } .ff-node span { font-size: .76rem; line-height: 1.15; text-align: center; } .ff-node i { font-style: normal; color: #fbbf24; font-size: .85rem; letter-spacing: 1px; }
.ff-node.locked { opacity: .5; cursor: default; } .ff-node.boss { border-color: #f87171; }
.ff-box { background: rgba(26,27,58,.9); border: 1px solid #3b3f8a; border-radius: 18px; padding: 14px; margin-top: 12px; }
.ff-box h2 { margin: 0 0 8px; font-size: 1.15rem; }
.ff-chip { border: 1px solid #5552a8; background: #1e1d4d; color: #dfe0ff; border-radius: 99px; padding: 7px 13px; font: inherit; font-weight: 700; cursor: pointer; }
.ff-chip.on { background: #fbbf24; color: #2a1a00; border-color: #fbbf24; }
.ff-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.ff-werk { display: flex; gap: 10px; align-items: center; background: #14152e; border-radius: 14px; padding: 10px 12px; margin-top: 8px; }
.ff-werk > div { flex: 1; min-width: 0; display: flex; flex-direction: column; } .ff-werk small { color: #a5a8dc; }
.ff-wi { font-size: 1.7rem; }
.ff-pips { display: flex; gap: 4px; margin-top: 5px; } .ff-pips i { width: 20px; height: 6px; border-radius: 3px; background: #2f2f63; } .ff-pips i.on { background: #fbbf24; }
.ff-how li { margin: 7px 0; } .ff-how { line-height: 1.5; }

/* Schlacht */
body.ff-playing .site-header, body.ff-playing .site-footer, body.ff-playing .related { display: none; }
body.ff-playing .ff-main { padding: 0; max-width: none; }
body.ff-playing { overflow: hidden; overscroll-behavior: none; }
#scGame { display: flex; flex-direction: column; height: 100dvh; background: #0d0e22; user-select: none; -webkit-user-select: none; }
#scGame[hidden] { display: none; }
.ff-hud { display: grid; grid-template-columns: auto 1fr auto 1fr auto; gap: 8px; align-items: center; padding: 6px 8px; background: #14152e; }
.ff-burg { position: relative; height: 22px; border-radius: 8px; background: #2a0f28; overflow: hidden; border: 1px solid #454480; }
.ff-burg i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(180deg, #6b8cff, #2f54d9); transition: width .2s; }
.ff-burg.r i { left: auto; right: 0; background: linear-gradient(180deg, #f87171, #c62828); }
.ff-burg span { position: absolute; inset: 0; text-align: center; font-size: .76rem; font-weight: 800; line-height: 21px; text-shadow: 0 1px 2px #000; }
.ff-ib { border: 1px solid #454480; background: #24245a; color: #fff; border-radius: 9px; padding: 3px 8px; font: inherit; font-size: .85rem; font-weight: 800; cursor: pointer; min-height: 30px; }
.ff-ctl { display: flex; gap: 4px; }
.ff-phase { font-weight: 900; font-size: .95rem; min-width: 46px; text-align: center; font-variant-numeric: tabular-nums; }
.ff-fieldw { position: relative; flex: 1; min-height: 0; }
#field { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.ff-map { position: absolute; left: 8%; right: 8%; top: 7px; height: 5px; background: rgba(0,0,0,.4); border-radius: 3px; pointer-events: none; }
.ff-map i { position: absolute; top: -2px; width: 9px; height: 9px; margin-left: -4px; border-radius: 50%; border: 1px solid rgba(255,255,255,.7); background: #cbd5e1; }
.ff-map i.o0 { background: #3b6bff; } .ff-map i.o1 { background: #e5484d; }
.ff-map b { position: absolute; top: -4px; width: 3px; height: 13px; margin-left: -1px; background: #fbbf24; border-radius: 2px; transition: left .4s; }
.ff-segen { position: absolute; left: 8px; top: 22px; display: flex; flex-wrap: wrap; gap: 4px; max-width: 60%; z-index: 2; }
.ff-segen button { width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 2px solid #fbbf24; background: rgba(15,16,40,.78); font-size: 1rem; line-height: 1; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.4); animation: ffSegNeu .6s ease-out; }
@keyframes ffSegNeu { from { transform: scale(2.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.ff-banner { position: absolute; left: 50%; top: 24%; translate: -50% 0; text-align: center; opacity: 0; pointer-events: none; transition: opacity .3s, scale .3s; scale: .85; }
.ff-banner.on { opacity: 1; scale: 1; }
.ff-banner b { display: block; font-size: clamp(1.4rem, 5vw, 2.4rem); font-weight: 900; color: #fff; text-shadow: 0 3px 12px rgba(0,0,0,.7); white-space: nowrap; }
.ff-banner small { color: #fde68a; font-weight: 700; text-shadow: 0 1px 5px #000; }
.ff-banner.red b { color: #fecaca; } .ff-banner.gold b { color: #fde68a; }
.ff-hint { position: absolute; left: 50%; bottom: 8px; translate: -50% 12px; max-width: 92%; background: rgba(15,16,40,.9); color: #fff; border: 1px solid #5552a8; border-radius: 12px; padding: 6px 12px; font-size: .86rem; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .25s, translate .25s; text-align: center; }
.ff-hint.on { opacity: 1; translate: -50% 0; }
.ff-deck { display: grid; grid-template-columns: minmax(150px, 210px) 1fr auto; gap: 8px; padding: 7px 8px calc(7px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, #1a1b42, #101129); border-top: 1px solid #3b3f8a; }
.ff-eco { display: flex; flex-direction: column; gap: 5px; }
.ff-gold { font-weight: 900; font-size: 1.25rem; font-variant-numeric: tabular-nums; color: #fde68a; display: flex; align-items: baseline; gap: 6px; }
.ff-gold small { font-size: .74rem; color: #86efac; }
#rise { position: relative; overflow: hidden; border: 1px solid #5552a8; border-radius: 10px; background: #1e1d4d; color: #fff; font: inherit; font-size: .78rem; font-weight: 800; padding: 6px 4px; cursor: pointer; }
#rise i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #7c3aed, #4f46e5); transition: width .2s; }
#rise span { position: relative; }
#rise.ready { animation: ffGlow 1s infinite; border-color: #fbbf24; } #rise.ready i { background: linear-gradient(90deg, #f59e0b, #fbbf24); } #rise.ready span { color: #2a1a00; }
@keyframes ffGlow { 50% { box-shadow: 0 0 0 5px rgba(251,191,36,.3); } }
.ff-tts { display: flex; gap: 3px; } .ff-tt { flex: 1; border: 1px solid #454480; border-radius: 7px; background: #1e1d4d; color: #dfe0ff; font: inherit; font-size: .74rem; font-weight: 800; padding: 2px 0; cursor: pointer; }
.ff-tt.on { background: #4f46e5; color: #fff; } .ff-tt:disabled { opacity: .35; cursor: default; }
.ff-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; min-width: 0; }
.ff-card { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; border: 1px solid #5552a8; border-radius: 12px; background: linear-gradient(180deg, #2c2b6b, #1a1a48); color: #fff; font: inherit; padding: 3px 2px 4px; cursor: pointer; min-width: 0; transition: transform .1s; touch-action: manipulation; }
.ff-card:active { transform: scale(.94); }
.ff-card img { display: block; height: 58px; width: 116px; max-width: none; margin: 0 auto -4px; object-fit: contain; pointer-events: none; }
.ff-card .ff-emo { display: block; height: 52px; line-height: 52px; font-size: 2rem; text-align: center; }
.ff-card.dim img { filter: brightness(.6) saturate(.7); }
.ff-card b { font-size: .72rem; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ff-card small { font-size: .76rem; color: #fde68a; font-weight: 800; }
.ff-card.off { filter: grayscale(.75) brightness(.72); }
.ff-card.boost { border-color: #fbbf24; box-shadow: inset 0 0 12px rgba(251,191,36,.3); }
.ff-rn { position: absolute; left: 3px; top: 2px; font-size: .78rem; } .ff-st { position: absolute; right: 3px; top: 2px; font-size: .62rem; color: #fde68a; background: rgba(0,0,0,.35); border-radius: 6px; padding: 0 3px; } .ff-lg { position: absolute; right: 3px; top: 2px; font-size: .76rem; }
.ff-card kbd { display: none; position: absolute; left: 4px; bottom: 3px; font: 700 .65rem system-ui; color: #a5a8dc; }
@media (hover: hover) and (min-width: 900px) { .ff-card kbd { display: block; } }
.ff-cd { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: rgba(0,0,0,.6); pointer-events: none; }
.ff-sps { display: flex; flex-direction: column; gap: 4px; justify-content: center; } .ff-sps[hidden] { display: none; }
.ff-sp { position: relative; overflow: hidden; width: 46px; height: 34px; padding: 0; border: 1px solid #5552a8; border-radius: 11px; background: #2b2a63; font-size: 1.15rem; cursor: pointer; }
.ff-sp.arm { border-color: #fbbf24; box-shadow: 0 0 0 3px rgba(251,191,36,.45); } .ff-sp.off { filter: grayscale(.6); }
@media (max-width: 720px) {
  .ff-deck { grid-template-columns: 1fr auto; gap: 5px; padding: 5px 5px calc(5px + env(safe-area-inset-bottom)); }
  .ff-eco { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px; }
  .ff-gold { font-size: 1.05rem; } .ff-tts { min-width: 104px; }
  .ff-card img { height: 46px; } .ff-card b { font-size: .64rem; }
  .ff-sp { width: 42px; }
  .ff-hud { gap: 5px; padding: 4px 5px; }
}
.ff-ov { position: fixed; inset: 0; z-index: 2000; background: rgba(8,8,26,.72); display: flex; align-items: center; justify-content: center; padding: 14px; }
.ff-ov[hidden] { display: none; }
.ff-pop { background: linear-gradient(180deg, #24235a, #151640); border: 1px solid #5552a8; border-radius: 20px; padding: 18px; max-width: 520px; width: 100%; text-align: center; color: #eef0ff; max-height: 92vh; overflow: auto; }
.ff-pop h2 { margin: 0 0 6px; } .ff-pop h3 { margin: 0 0 8px; }
.ff-feats span { font-size: 1.3rem; margin: 0 3px; }
.ff-segs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
@media (max-width: 520px) { .ff-segs { grid-template-columns: 1fr; } }
.ff-seg { display: flex; flex-direction: column; align-items: center; gap: 3px; background: #2b2a63; border: 1px solid #6d69c9; border-radius: 15px; color: #fff; font: inherit; padding: 12px 8px; cursor: pointer; transition: transform .12s; }
.ff-seg:hover { transform: translateY(-3px); border-color: #fbbf24; }
.ff-seg span { font-size: 2rem; } .ff-seg small { color: #c4c5ee; font-size: .78rem; }
.ff-tws { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin-bottom: 10px; }
.ff-tw { display: flex; flex-direction: column; align-items: center; background: #2b2a63; border: 1px solid #5552a8; border-radius: 13px; color: #fff; font: inherit; padding: 8px 5px; cursor: pointer; }
.ff-tw:disabled { opacity: .5; cursor: default; } .ff-tw span { font-size: 1.4rem; } .ff-tw small { color: #b9bbe8; font-size: .72rem; } .ff-tw em { font-style: normal; color: #fde68a; font-weight: 800; font-size: .85rem; }
.ff-endk { height: 110px; } .ff-endk.lost { filter: grayscale(.8) brightness(.8); } .ff-endstars { color: #fbbf24; font-size: 2.3rem; letter-spacing: 4px; }
.ff-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 10px 0; } .ff-stats span { background: #14152e; border-radius: 10px; padding: 6px; font-weight: 800; } .ff-stats small { color: #a5a8dc; font-weight: 500; }
.ff-dust { color: #fde68a; font-weight: 800; }
@media (prefers-reduced-motion: reduce) { #rise.ready { animation: none; } }

/* Feste Spalten: Ist die Tag-/Nachtanzeige verborgen, bleibt die Burg der Horde trotzdem breit */
.ff-hud > .ff-ctl:first-child { grid-column: 1; } .ff-hud > .ff-burg { grid-column: 2; } .ff-hud > .ff-phase { grid-column: 3; } .ff-hud > .ff-burg.r { grid-column: 4; } .ff-hud > .ff-ctl:last-child { grid-column: 5; }
.ff-hud { grid-template-rows: auto; }
.ff-card { position: relative; }
.ff-cdt { position: absolute; left: 0; right: 0; top: 34%; text-align: center; font-style: normal; font-weight: 900; font-size: 1.25rem; color: #fff; text-shadow: 0 1px 4px #000, 0 0 2px #000; pointer-events: none; }
.ff-ziele { list-style: none; padding: 0; margin: 4px 0 10px; text-align: left; display: inline-block; }
.ff-ziele li { opacity: .7; } .ff-ziele li.ok { opacity: 1; color: #fbbf24; font-weight: 700; }
.ff-lehre { text-align: left; background: rgba(255,255,255,.06); border-radius: 12px; padding: 10px 14px; margin: 8px 0 12px; }
.ff-lehre ul { margin: 6px 0 0; padding-left: 18px; } .ff-lehre li { margin: 4px 0; line-height: 1.35; }
#werkReset { margin-top: 12px; }
/* Auftrag der Mission */
.ff-auftragchip { position: absolute; left: 10px; top: 30px; max-width: min(60%, 420px); padding: 4px 10px; border-radius: 999px; background: rgba(15,16,40,.72); color: #e0e7ff; font-size: .82rem; font-weight: 700; pointer-events: none; }
.ff-auftragchip.ok { background: rgba(120,80,0,.8); color: #fde68a; }
.ff-auftragchip[hidden] { display: none; }
.ff-auftrag { background: rgba(255,255,255,.07); border-radius: 10px; padding: 8px 12px; }
#btnWeiter { margin-left: 8px; }
@media (max-width: 700px) { .ff-auftragchip { top: 26px; font-size: .74rem; max-width: 75%; } #btnWeiter { margin: 8px 0 0; } }
