/* ===== Design Tokens ===== */
@font-face {
  font-family: 'Pangea';
  src: url('../fonts/Pangea-RegularWeb.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Pangea';
  src: url('../fonts/Pangea-SemiBoldWeb.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: 'Pangea';
  src: url('../fonts/Pangea-BoldWeb.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: 'Pangea';
  src: url('../fonts/Pangea-ItalicWeb.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
}

@font-face {
  font-family: 'Pangea';
  src: url('../fonts/Pangea-BoldItalicWeb.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
}


:root{
  /* Bewegungen */
  --duration: .32s;
  --easing: cubic-bezier(.2,.8,.2,1);

  /* Farben */
  --bg:#ffffff;                /* App background */
  --fg:#ffffff;                /* für Burger-Linien */
  --ink:#0c1320;               /* Primary text */

  --card:#f5f5f5;        /* Card Basic color */
  --card-basic:#ffffff;        /* Card Basic color */
  --badge-basic:#000000;     /* Badge Basic color */
  --card-history:#e4e8fa;      /* Card History color */
  --badge-history:#6888ff;     /* Badge History color */
  --card-advanced:#f4f9e6;     /* Card Advanced color */
  --badge-advanced:#dcf98a;    /* Badge Advanced color */
  --appbar-h: 56px; /* Höhe der fixen Topbar */
  --appbar-bg: var(--bg);
  


  /* Layout / Shadow */
  --shadow:0 5px 14px rgba(15,23,42,.08);
  --radius-xl:20px;
  --radius-lg:16px;
  --radius-pill:9999px;

  /* Spacing */
  --space-2:.5rem;
  --space-3:.75rem;
  --space-4:1rem;
  --space-5:1.25rem;
  --space-6:1.5rem;
}




*{box-sizing:border-box}

body{
  margin:0;
  font-family: 'Pangea', sans-serif;
  line-height:1.45;
  color:var(--ink);
  background:var(--bg);
}

canvas {
  background: #fafafa;
  border-radius: var(--radius-lg);
}
/* ===== Appbar / Topbar ===== */
.appbar{
  position: fixed; 
  inset: 0 0 0 0; 
  height:56px; 
  display:flex; 
  align-items:center; 
  padding:16px 16px 0 16px; 
  background:var(--appbar-bg); z-index:60;
}

.topbar{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom: var(--space-2);
}

.appbar img {
  height:70%;
  width:auto;         
  display:block;
}

.topbar h1{
  margin:0;
  font-size:1.6rem;
  font-weight:500;
  letter-spacing:.2px;
}
.actions{display:flex; gap:.6rem;}
.icon-btn{
  width:44px; height:44px; border:none; cursor:pointer;
  border-radius: var(--radius-pill);
  display:grid; place-items:center;
  background:#0b0b0b; color:#fff;
  box-shadow: var(--shadow);
}
.icon-btn svg{width:22px; height:22px; display:block}

/* ===== Hamburger Button ===== */
.menu-btn{
  width:40px; height:40px; border:0; background:transparent; padding:0; margin:0;
  display:grid; place-items:center; cursor:pointer;
}
.menu-btn:focus-visible{outline:2px solid #ccc; outline-offset:2px; border-radius:8px;}

.burger{ position:relative; width:24px; height:18px; }
.line{
  position:absolute; left:0; right:0; height:2px; background:var(--fg);
  transition: transform var(--duration) var(--easing), opacity var(--duration) var(--easing), top var(--duration) var(--easing), bottom var(--duration) var(--easing);
}
.line.top{ top:3px; }
.line.bot{ bottom:3px; }

/* ===== Overlay ===== */
.overlay{
  position: fixed; inset: 0; background: var(--bg); z-index:50;
  transform: translateY(-100%); transition: transform var(--duration) var(--easing);
  display:flex; align-items:center; justify-content:center; text-align:center; padding:32px;
}

.card{
  background:var(--card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: var(--space-4);
  max-width: 420px;
  margin: var(--space-4) 0;
}
.badge{
  width:44px; height:44px; border-radius:var(--radius-pill);
  display:grid; place-items:center;
  font-size:24px; line-height:1;
}
/* Badges Varianten */
.badge--basic{ background: var(--badge-basic); }
.badge--history{ background: var(--badge-history); }
.badge--advanced{ background: var(--badge-advanced); }
.badge-overlay{ 
  display:inline-grid;
  width:56px; height:56px;
  background: var(--badge-advanced); 
}

.badge svg{width:22px;height:22px;opacity:.85}


.title{ font-weight:700; font-size:20px; margin:0 0 10px; }
.text{ color:var(--ink); line-height:1.45; margin:0 0 12px; }
.link{ color:#0066cc; text-decoration:underline; }

/* Geöffneter Zustand */
.is-open .overlay{ transform: translateY(0); }
.is-open .line.top{ top: 8px; transform: rotate(45deg); }
.is-open .line.bot{ bottom: 8px; transform: rotate(-45deg); }

/* ===== Cards ===== */
.card h1{
  margin:0;
  font-size:1.25rem;
  font-weight:700;
  color:#1d2b5c;
}
.card .heading{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom: var(--space-3);
}
.card h2{
  margin:0;
  font-size:1.05rem;
  font-weight:800;
  color:#1d2b5c;
}
.card--basic{ background: var(--card-basic) }
.card--history{ background: var(--card-history) }
.card--advanced{ background: var(--card-advanced) }



/* Content layout */
.grid{
  display:grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-4);
}
.kv .row{
  display:flex; gap:.75rem; justify-content:space-between;
  padding:.35rem 0;
}
.kv .k{ font-weight:600; color:var(--ink); min-width:9ch; }
.kv .v{ color:var(--ink); }
.history .row .k{ min-width:auto; }

/* ===== Bottom Bar ===== */
.bottom-bar{
  margin-top: var(--space-6);
  background: #ffffffcc;
  backdrop-filter: blur(6px);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow);
  padding: .35rem .5rem;
  display:flex; justify-content:space-between; align-items:center;
}
.bottom-bar button{
  width:44px; height:44px; border-radius:var(--radius-pill);
  border:none; background:#fff; display:grid; place-items:center;
  color:#1f2937; cursor:pointer;
}
.bottom-bar button.active{ background:#0b0b0b; color:#fff; }
.bottom-bar svg{width:22px;height:22px}

/* ===== Misc ===== */
.screen{
  max-width: 420px;
  margin: 16px auto;
  padding: var(--space-4);
  /*padding-top: calc(var(--space-2) + var(--appbar-h)); /* <— neu */
  padding-top: calc(2px + var(--appbar-h)); /* <— neu */
}

/* Slightly roomier on wider screens */
@media (min-width:480px){
  .screen{padding:24px}
}

/* Motion-Reduce */
@media (prefers-reduced-motion: reduce){
  .overlay, .line{ transition: none; }
}
