:root {
  --pink: #ff6b9d;
  --pink-dark: #e8497a;
  --caramel: #f4a259;
  --cream: #fff9f4;
  --ink: #2d2a32;
  --line: #f0e2d8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 6vw;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
}

.logo {
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--pink-dark);
  text-decoration: none;
}

nav a {
  margin-left: 24px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
}

nav a:hover { color: var(--pink-dark); }

.hero {
  padding: 70px 6vw;
  text-align: center;
  background: linear-gradient(180deg, #fff 0%, var(--cream) 100%);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 12px;
}

.hero p {
  max-width: 560px;
  margin: 0 auto 28px;
  font-size: 1.1rem;
  opacity: .85;
}

.btn {
  display: inline-block;
  padding: 14px 28px;
  background: var(--pink);
  color: #fff;
  border: none;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s, background .15s;
}

.btn:hover { background: var(--pink-dark); transform: translateY(-2px); }

section.content {
  max-width: 760px;
  margin: 0 auto;
  padding: 50px 6vw;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 6vw 60px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
}

.card .emoji { font-size: 2.2rem; }

footer {
  text-align: center;
  padding: 30px;
  font-size: .85rem;
  opacity: .6;
}

/* Rechner */
.calc-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px;
  max-width: 480px;
  margin: 0 auto;
}

.calc-box label {
  display: block;
  font-weight: 700;
  margin: 16px 0 6px;
}

.calc-box input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 1rem;
}

.result {
  margin-top: 24px;
  padding: 20px;
  border-radius: 12px;
  background: var(--cream);
  border: 1px solid var(--line);
  display: none;
}

.result.show { display: block; }

.result .big {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--pink-dark);
}

.cubes {
  font-size: 1.6rem;
  letter-spacing: 2px;
  margin: 8px 0;
}

.bar-bg {
  background: var(--line);
  border-radius: 20px;
  height: 14px;
  overflow: hidden;
  margin-top: 10px;
}

.bar-fill {
  height: 100%;
  background: var(--caramel);
  border-radius: 20px;
  transition: width .3s;
}

.hint {
  font-size: .85rem;
  opacity: .7;
  margin-top: 14px;
}

/* Zuckerwerte-Tabelle */
.table-wrap {
  max-width: 700px;
  margin: 0 auto 60px;
  padding: 0 6vw;
}

table.zucker {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,.05);
}

table.zucker th, table.zucker td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

table.zucker th {
  background: var(--pink);
  color: #fff;
  font-weight: 700;
}

table.zucker tr:last-child td { border-bottom: none; }
table.zucker tr:nth-child(even) td { background: var(--cream); }

.zucker-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
}

.zucker-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 18px;
}

.zucker-item strong { color: var(--pink-dark); }

@media (max-width: 600px) {
  .zucker-grid {
    grid-template-columns: 1fr;
  }
}
