@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("/fonts/dm-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("/fonts/dm-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #22262A;
  --fg: #fff;
  --mu: #BDB9B1;
  --faint: #8d8a84;
  --ac: #4ADE80;
  --ac-ink: #052e14;
  --up: #4ADE80;
  --down: #F87171;
  --warn: #FFAA1F;
  --sell: #FFB547;
  --buy: #7DD3FC;
  --news: #C4B5FD;
  --line: rgba(255, 255, 255, .14);
  --glass: rgba(255, 255, 255, .07);
  --glass-strong: rgba(34, 38, 42, .82);
  --glass-blur: blur(22px) saturate(140%);
  --glass-shadow: 0 10px 40px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .08);
  --font: "Bricolage Grotesque", system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, monospace;
  --w: 460px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html {
  background: #141618;
  color-scheme: dark;
}
body {
  font: 500 15px/1.45 var(--font);
  color: var(--fg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(60% 40% at 10% 5%, rgba(74, 222, 128, .16), transparent 60%),
    radial-gradient(55% 40% at 95% 90%, rgba(45, 212, 191, .12), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: inherit; }
svg { display: block; }
a { color: var(--ac); }

#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.glass {
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  box-shadow: var(--glass-shadow);
}
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.up { color: var(--up); }
.down { color: var(--down); }
.mu { color: var(--mu); }
.faint { color: var(--faint); }

/* Laden + Login */
.mitte {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}
.logo-klein { border-radius: 12px; opacity: .85; }
.login-box {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  text-align: center;
}
.login-logo { margin: 0 auto; border-radius: 16px; }
.login-box h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 6px; }
.feld {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  font: 500 16px var(--font);
  color: var(--fg);
  outline: none;
}
.feld:focus { border-color: var(--ac); }
.feld::placeholder { color: var(--faint); }
.knopf {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  text-align: center;
  font-weight: 700;
  background: var(--ac);
  color: var(--ac-ink);
}
.knopf:disabled { opacity: .55; cursor: default; }
.fehlerzeile { min-height: 18px; font: 400 12px var(--mono); color: var(--down); }

/* App-Rahmen */
#app { position: relative; z-index: 1; padding: 14px 16px 120px; max-width: var(--w); margin: 0 auto; }
.top { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; flex: 1; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.pill { font: 400 11.5px var(--mono); color: var(--mu); padding: 6px 10px; border-radius: 99px; display: flex; align-items: center; gap: 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ac); box-shadow: 0 0 8px var(--ac); }
.kopf-knoepfe { display: flex; align-items: center; gap: 8px; }
.iconbtn { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; }

.card { border-radius: 24px; padding: 18px; margin-bottom: 14px; }
.platzhalter { font: 400 14px var(--mono); color: var(--mu); }

/* Pop-up / Vollbild-Ansicht */
.sheet-wrap { position: fixed; inset: 0; z-index: 30; }
.sheet-wrap::before { content: ""; position: absolute; inset: 0; background: rgba(10, 12, 14, .55); }
.sheet {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--w);
  overflow-y: auto;
  background: var(--glass-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  animation: sheet-hoch .25s cubic-bezier(.2, .8, .2, 1);
}
@keyframes sheet-hoch { from { transform: translate(-50%, 40px); opacity: 0; } }
.sheet .nav {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(34, 38, 42, .7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  z-index: 2;
}
.sheet .nav button { width: 36px; height: 36px; border-radius: 50%; font-size: 20px; display: grid; place-items: center; }
.sheet .body { padding: 16px 18px 140px; }

@media (prefers-reduced-motion: reduce) {
  .sheet { animation: none; }
}

@media (min-width: 1000px) {
  :root { --w: 1240px; }
  #app { padding: 16px 28px 10px; }
  .sheet-wrap::before { background: rgba(10, 12, 14, .5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
  .sheet {
    max-width: 640px;
    top: 5vh;
    bottom: 5vh;
    border-radius: 24px;
    background: rgba(30, 34, 37, .97);
    border: 1px solid var(--line);
    box-shadow: 0 30px 100px rgba(0, 0, 0, .7);
    animation: none;
  }
}

/* ---------- Depot-Oberfläche "Glas-Brief" ---------- */
.kicker { font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ac); }
.pill.warn { color: var(--warn); }
.pill.warn .dot { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.a .hero { padding: 20px 18px 14px; border-radius: 26px; margin-bottom: 14px; }
.a .big { font-size: 46px; font-weight: 700; letter-spacing: -.04em; line-height: 1.05; margin: 6px 0 8px; }
.a .sub { font: 400 13px/1.7 var(--mono); }
.a .chart { margin: 14px -18px 10px; }
.a .chart-leer { margin: 14px 0 10px; font: 400 13px var(--mono); color: var(--faint); }
.ranges { display: flex; gap: 4px; }
.ranges button { font: 500 12px var(--mono); color: var(--mu); padding: 6px 12px; border-radius: 99px; }
.ranges button.on { background: var(--ac); color: var(--ac-ink); }
.ranges button:disabled { opacity: .3; cursor: default; }
.hinweis-zeile { font: 400 12px/1.5 var(--mono); color: var(--warn); margin-top: 10px; }
.fussnote { font: 400 11px/1.5 var(--mono); color: var(--faint); margin-top: 8px; }
.a .card { border-radius: 24px; padding: 18px; margin-bottom: 14px; }
.a h2 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.a .ch { display: flex; align-items: center; gap: 8px; }
.a .cnt { font: 500 11px var(--mono); padding: 2px 8px; border-radius: 99px; background: rgba(255, 255, 255, .1); color: var(--mu); }
.a .lead { color: var(--mu); font-size: 13.5px; margin: 2px 0 10px; }
.a .leer { font: 400 13px var(--mono); color: var(--faint); padding: 8px 0; }
.a .row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.a .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font: 500 11px var(--mono); background: rgba(74, 222, 128, .12); color: var(--ac); flex: none; }
.a .nm { flex: 1; min-width: 0; }
.a .nm b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a .nm span { font: 400 12px var(--mono); color: var(--mu); }
.a .nm .alt { color: var(--warn); margin-left: 6px; }
.a .vl { text-align: right; font-family: var(--mono); flex: none; }
.a .vl small { display: block; color: var(--mu); font-size: 12px; }
.a .vl .kein { color: var(--faint); font-size: 12px; }
.a .detail { font: 400 12px/1.5 var(--mono); color: var(--mu); padding: 0 0 12px 50px; }
.a .more { width: 100%; margin-top: 6px; padding: 11px; border-radius: 14px; font: 500 13px var(--mono); color: var(--ac); background: rgba(74, 222, 128, .08); text-align: center; flex: none; }
.a .fc { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.a .fc div { padding: 12px 10px; border-radius: 16px; background: rgba(255, 255, 255, .05); }
.a .fc small { display: block; font: 400 11px var(--mono); color: var(--mu); }
.a .fc strong { display: block; font: 500 20px var(--mono); margin: 4px 0; }
.a .fc-hinweis { font: 400 11.5px/1.5 var(--mono); color: var(--faint); margin-top: 10px; }
.disc { font: 400 11px/1.5 var(--mono); color: var(--faint); margin-top: 18px; }
.sheet h2 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; margin: 6px 0 12px; }
.sheet .row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.sheet .row:first-of-type { border-top: 0; }
.sheet .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font: 500 11px var(--mono); background: rgba(74, 222, 128, .12); color: var(--ac); flex: none; }
.sheet .nm { flex: 1; min-width: 0; }
.sheet .nm b { display: block; font-size: 15px; }
.sheet .nm span { font: 400 11.5px/1.5 var(--mono); color: var(--mu); display: block; }
.sheet .vl { text-align: right; font-family: var(--mono); flex: none; }
.sheet .vl small { display: block; color: var(--mu); font-size: 12px; }
.sheet .vl .kein { color: var(--faint); font-size: 12px; }
.fehlerkarte { text-align: center; }
.fehlerkarte .knopf { max-width: 200px; margin: 14px auto 0; }

@media (min-width: 1000px) {
  html, body { height: 100%; overflow: hidden; }
  #app { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
  #app .top { margin-bottom: 14px; flex: none; }
  #inhalt { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  #inhalt.a { min-height: 0; }
  .a .cols { flex: 1; min-height: 0; display: grid; grid-template-columns: 400px 1fr; gap: 16px; }
  .a .colL { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
  .a .colL .hero, .a .colL .card { margin: 0; }
  .a .big { font-size: 40px; }
  .a .chart { margin: 8px -18px 6px; }
  .a .colR { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 14px; min-height: 0; }
  .a .card { margin: 0; display: flex; flex-direction: column; min-height: 0; overflow: hidden; padding: 16px 18px; }
  .a .colL .card { flex: 1; }
  .a h2 { font-size: 19px; }
  .a .lead { margin: 0 0 6px; font-size: 12.5px; }
  .a .cl { flex: 1; min-height: 0; overflow: hidden; }
  .a .row { padding: 8px 0; cursor: default; }
  .a .more { margin-top: 8px; }
  .a .fc { margin-top: auto; margin-bottom: auto; }
  .a .fc-hinweis { margin-top: 0; }
  .disc { margin-top: 8px; text-align: center; flex: none; }
  .a .hero .hinweis-zeile, .a .hero .fussnote { margin-top: 4px; }
}

/* ---------- Recherche: Hinweise, Kaufideen, News, Einstellungen ---------- */
.tag { display: inline-block; font: 500 10.5px var(--mono); letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 99px; border: 1px solid currentColor; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-sell { color: var(--sell); }
.t-buy { color: var(--buy); }
.t-news { color: var(--news); }
.hz { font: 400 10.5px var(--mono); color: var(--mu); padding: 3px 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); white-space: nowrap; }
.hz.kurz { color: var(--warn); background: rgba(255, 170, 31, .12); }
.tags { display: flex; gap: 6px; align-items: center; min-width: 0; }
.tags .rechts { margin-left: auto; white-space: nowrap; }
.a .note { display: block; padding: 14px 0; border-top: 1px solid var(--line); cursor: pointer; color: inherit; text-decoration: none; }
.a .note h3, .sheet .note h3 { font-size: 16px; margin: 8px 0 3px; }
.a .note p, .sheet .note p { color: var(--mu); font-size: 13.5px; }
.a .note .idea, .sheet .note .idea { color: var(--fg); margin-top: 5px; }
.meta { display: flex; gap: 6px; align-items: center; margin-top: 8px; font: 400 11.5px var(--mono); color: var(--faint); }
.tags .meta { margin-top: 0; }
.status { font: 400 11.5px var(--mono); color: var(--faint); margin: 0 0 8px; }
.status.warn { color: var(--warn); }
.sheet .note { display: block; padding: 14px 0; border-top: 1px solid var(--line); cursor: pointer; color: inherit; text-decoration: none; }
.sheet h4 { font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mu); margin: 22px 0 8px; }
.sheet ul { padding-left: 18px; }
.sheet li { margin: 5px 0; }
.sheet .box { border-radius: 18px; padding: 14px; }
.sheet .kv { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; font-family: var(--mono); }
.sheet .kv small { display: block; font-size: 10.5px; color: var(--mu); }
.sheet a { color: var(--ac); font: 400 13px var(--mono); display: block; margin: 6px 0; text-decoration: none; }
.sheet a.note { color: inherit; font: inherit; margin: 0; }
.exit { display: flex; gap: 8px; }
.exit div { flex: 1; padding: 12px; border-radius: 14px; font-family: var(--mono); }
.exit small { display: block; font-size: 10.5px; color: var(--mu); }
.sheet .disc { margin-top: 24px; }
.sheet select.feld { appearance: none; background-image: none; }
.sheet select.feld option { color: #111; }
.kvz { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font: 400 13px var(--mono); }
.meldung { min-height: 18px; margin-top: 8px; font: 400 12px var(--mono); color: var(--mu); }

@media (min-width: 1000px) {
  .a .note.c1 { padding: 9px 0; }
  .a .note.c1 h3 { font-size: 14.5px; margin: 6px 0 2px; }
  .a .note.c1 p { font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
}

/* ---------- Bugs & Änderungen ---------- */
.iconbtn { position: relative; }
.punkt { position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--ac); box-shadow: 0 0 8px var(--ac); }
.t-bug { color: var(--down); }
.umschalter { display: inline-flex; gap: 4px; padding: 4px; border-radius: 99px; background: rgba(255, 255, 255, .07); border: 1px solid var(--line); margin-bottom: 12px; }
.umschalter button { font: 500 13px var(--mono); color: var(--mu); padding: 7px 16px; border-radius: 99px; }
.umschalter button.on { background: var(--ac); color: var(--ac-ink); }
textarea.feld { resize: vertical; min-height: 96px; font-family: var(--font); line-height: 1.4; }
.sheet .wtext { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 6px; color: var(--fg); font-size: 14.5px; }
.sheet .erledigt { font: 500 12px var(--mono); color: var(--ac); padding: 8px 10px; border-radius: 10px; background: rgba(74, 222, 128, .08); align-self: flex-start; flex: none; }
.sheet .erledigt:disabled { opacity: .5; }
.sheet .leer { font: 400 13px var(--mono); color: var(--faint); padding: 8px 0; }
.sheet #wunsch-liste { margin-top: 18px; }
