/* ERP Rush – Oberfläche (Glas, Neon, senergy-Farben) */
:root {
  --navy: #233788; --gold: #BC9B18; --gold2: #f5c542; --cyan: #3de0ff; --bg: #070b22;
  --txt: #eef2ff; --mut: #a9b6e0; --glass: rgba(18, 28, 72, .58); --line: rgba(140, 170, 255, .2);
  --font: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--txt); font-family: var(--font); overflow: hidden;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; overscroll-behavior: none; }
#cv { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#sa { position: fixed; visibility: hidden; pointer-events: none;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }

.scr { position: fixed; inset: 0; display: none; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: calc(env(safe-area-inset-top) + 10px) calc(env(safe-area-inset-right) + 10px) calc(env(safe-area-inset-bottom) + 10px) calc(env(safe-area-inset-left) + 10px); }
.scr.show { display: flex; animation: fadeIn .25s ease; }
.scr.dim { background: rgba(3, 6, 20, .55); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.wrap { width: 100%; max-width: 480px; margin: auto; display: flex; flex-direction: column; gap: 12px; }
.wrap.wide { max-width: 900px; margin-top: 0; }
.wrap.narrow { max-width: 360px; }

.glass { background: var(--glass); border: 1px solid var(--line); border-radius: 18px;
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .07); }
.glass2 { background: rgba(10, 16, 46, .55); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.pad { padding: 16px; }
.center { text-align: center; }

.logo { width: min(190px, 46vw); display: block; margin: 0 auto; filter: drop-shadow(0 0 18px rgba(61, 224, 255, .35)); }
.logo.sm { width: 96px; }
.title { margin: -6px 0 0; text-align: center; font-size: clamp(44px, 13vw, 76px); font-weight: 900; letter-spacing: .04em; line-height: 1;
  background: linear-gradient(100deg, #fff 10%, var(--cyan) 40%, #fff 55%, var(--gold2) 85%); background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 5s linear infinite;
  filter: drop-shadow(0 0 22px rgba(61, 224, 255, .35)); }
.title span { margin-left: .18em; }
@keyframes shine { to { background-position: 200% center; } }
.tag { text-align: center; margin: 0; color: var(--mut); font-size: 15px; }

.firm { padding: 12px 14px; }
.firm-top, .firm-bot { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }
.firm-top small { color: var(--mut); }
.firm-bot { margin-top: 6px; color: var(--mut); }
.chf b, .chf { color: var(--gold2); font-weight: 800; }
.bar { height: 8px; border-radius: 6px; background: rgba(255, 255, 255, .1); margin-top: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, var(--cyan), var(--gold2)); transition: width .8s ease; box-shadow: 0 0 12px rgba(61, 224, 255, .6); }

.btn { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font: 800 16px var(--font); color: var(--txt); text-decoration: none; cursor: pointer;
  padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(44, 64, 150, .7), rgba(22, 32, 84, .75));
  box-shadow: 0 6px 20px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .12);
  transition: transform .08s ease, box-shadow .2s ease, filter .2s; }
.btn:hover { filter: brightness(1.12); box-shadow: 0 6px 26px rgba(61, 224, 255, .25), inset 0 1px 0 rgba(255, 255, 255, .15); }
.btn:active { transform: scale(.96); }
.btn small { font-weight: 600; font-size: 12px; color: var(--mut); }
.btn.primary { background: linear-gradient(135deg, #3de0ff 0%, #3d8bff 45%, #233788 100%); border-color: rgba(160, 230, 255, .6);
  box-shadow: 0 8px 30px rgba(61, 139, 255, .45), inset 0 1px 0 rgba(255, 255, 255, .35); text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.btn.primary small { color: rgba(255, 255, 255, .85); }
.btn.big { font-size: 22px; padding: 16px; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 8px 40px rgba(61, 224, 255, .7), inset 0 1px 0 rgba(255, 255, 255, .35); } }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.btn.sm { padding: 10px 4px; font-size: 12px; font-weight: 700; }
.btn.sm b { font-size: 22px; }
.btn.mode span { font-size: 15px; }
.dot { position: absolute; top: 6px; right: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold2); box-shadow: 0 0 10px var(--gold2); display: none; }
.dot.on { display: block; }
.settings { display: flex; justify-content: center; gap: 10px; }
.tog { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: rgba(20, 30, 76, .6); font-size: 20px; cursor: pointer; color: #fff; }
.tog.off { opacity: .35; filter: grayscale(1); }
.link { background: none; border: 0; color: var(--mut); font: 600 14px var(--font); text-decoration: underline; cursor: pointer; padding: 6px; }

.hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: sticky; top: 0; z-index: 2;
  padding: 8px 4px; background: linear-gradient(180deg, rgba(7, 11, 34, .95), rgba(7, 11, 34, .6)); border-radius: 0 0 14px 14px; }
.hd h2 { margin: 0; font-size: 22px; flex: 1; }
.back { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: rgba(30, 44, 100, .7); color: #fff; font: 800 26px var(--font); cursor: pointer; line-height: 1; }
h3 { margin: 0 0 10px; font-size: 16px; }
h3 small { color: var(--mut); font-weight: 600; }

/* Labor */
.boosts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.bst { display: flex; gap: 8px; align-items: center; padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: rgba(10, 16, 46, .5); cursor: pointer; text-align: left; color: var(--txt); font: 600 12px var(--font); }
.bst b { font-size: 26px; }
.bst strong { display: block; font-size: 14px; }
.bst span { color: var(--mut); }
.bst.on { border-color: var(--cyan); background: rgba(61, 224, 255, .14); box-shadow: 0 0 18px rgba(61, 224, 255, .25); }
.bst.lock { opacity: .4; cursor: default; }
.tree { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.branch { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.branch h3 { text-align: center; color: var(--cyan); letter-spacing: .05em; text-transform: uppercase; font-size: 13px; }
.up { display: grid; grid-template-columns: 40px 1fr auto; gap: 8px; align-items: center; padding: 10px; border-radius: 14px;
  background: rgba(10, 16, 46, .55); border: 1px solid var(--line); position: relative; }
.up b.ic { font-size: 26px; text-align: center; }
.up strong { font-size: 14px; display: block; }
.up small { color: var(--mut); font-size: 12px; }
.pips { display: flex; gap: 3px; margin-top: 4px; }
.pips i { width: 14px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .15); }
.pips i.on { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.buy { font: 800 13px var(--font); padding: 8px 10px; border-radius: 10px; border: 0; cursor: pointer; color: #1a1400; white-space: nowrap;
  background: linear-gradient(180deg, #ffd85a, var(--gold)); box-shadow: 0 4px 14px rgba(188, 155, 24, .4); }
.buy:disabled { background: rgba(255, 255, 255, .1); color: var(--mut); box-shadow: none; cursor: default; }
.up.max { border-color: rgba(61, 224, 255, .4); }
.up.lock { opacity: .5; }

/* Erfolge */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.st { text-align: center; }
.st b { display: block; font-size: 20px; color: var(--cyan); }
.st small { color: var(--mut); font-size: 12px; }
.achs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.ach { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: rgba(10, 16, 46, .6); border: 1px solid var(--line); }
.ach b { font-size: 28px; }
.ach strong { display: block; font-size: 14px; }
.ach small { color: var(--mut); font-size: 12px; }
.ach.off { opacity: .4; }
.ach.off b { filter: grayscale(1); }
.ach.on { border-color: rgba(245, 197, 66, .5); box-shadow: inset 0 0 20px rgba(245, 197, 66, .08); }

/* Anleitung / Über */
.help .lead, .about .lead { font-size: 16px; font-weight: 700; margin-top: 0; }
.hrow { display: flex; gap: 12px; padding: 8px 0; border-top: 1px solid rgba(140, 170, 255, .1); }
.hrow > b { font-size: 26px; width: 36px; text-align: center; flex: none; }
.hrow h4 { margin: 0 0 2px; font-size: 15px; }
.hrow p { margin: 0; color: var(--mut); font-size: 14px; line-height: 1.4; }
kbd { display: inline-block; padding: 0 6px; border-radius: 5px; border: 1px solid var(--line); background: rgba(255, 255, 255, .08); font: 700 12px var(--font); color: #fff; }
.about { display: flex; flex-direction: column; gap: 10px; }
.about .lead { text-align: center; color: var(--cyan); }
.about p { margin: 0; line-height: 1.5; font-size: 14px; color: #d6defa; }
.feat { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: #d6defa; }
.feat li { padding: 8px 10px; border-radius: 12px; background: rgba(10, 16, 46, .5); }
.fine { font-size: 11px !important; color: var(--mut) !important; text-align: center; }

/* Ergebnis */
.res { display: flex; flex-direction: column; gap: 10px; text-align: center; }
.res h2 { margin: 4px 0 0; font-size: 26px; }
.sub { margin: 0; color: var(--mut); font-size: 14px; }
.score { font-size: clamp(48px, 15vw, 72px); font-weight: 900; line-height: 1; color: #fff; text-shadow: 0 0 30px rgba(61, 224, 255, .6); }
.record { display: none; color: var(--gold2); font-weight: 900; font-size: 18px; animation: pop .6s ease; }
.record.on { display: block; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.15); } 100% { transform: none; opacity: 1; } }
.rank { font-weight: 800; color: var(--cyan); font-size: 16px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.grid div { padding: 8px 4px; border-radius: 12px; background: rgba(10, 16, 46, .55); }
.grid b { display: block; font-size: 18px; }
.grid small { color: var(--mut); font-size: 11px; }
.earn { text-align: left; }
.earn small { color: var(--mut); display: block; margin-top: 6px; }
.newach { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.newach span { padding: 6px 10px; border-radius: 20px; background: rgba(245, 197, 66, .15); border: 1px solid rgba(245, 197, 66, .5); font-size: 13px; font-weight: 700; animation: pop .5s ease both; }
.tip { margin: 0; font-size: 13px; color: var(--mut); font-style: italic; }

#toast { position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 76px); transform: translate(-50%, -30px); opacity: 0; pointer-events: none;
  padding: 10px 16px; border-radius: 14px; background: rgba(30, 26, 8, .92); border: 1px solid var(--gold2); color: #fff; font: 700 14px var(--font);
  box-shadow: 0 0 30px rgba(245, 197, 66, .4); transition: all .35s cubic-bezier(.2, 1.4, .4, 1); z-index: 50; white-space: nowrap; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }

/* Querformat mit wenig Höhe: Start kompakter */
@media (max-height: 560px) and (orientation: landscape) {
  .wrap.start { max-width: 760px; display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: row dense; gap: 8px 16px; align-items: center; }
  .wrap.start .logo, .wrap.start .title, .wrap.start .tag, .wrap.start .firm { grid-column: 1; }
  .wrap.start .btn.big, .wrap.start .row2, .wrap.start .row4, .wrap.start .settings { grid-column: 2; }
  .wrap.start .logo { width: 120px; }
  .title { font-size: 44px; }
}
@media (min-width: 900px) and (min-height: 700px) {
  .wrap { max-width: 520px; }
  .wrap.wide { max-width: 980px; }
}
