/* BUTTONS */
.btn-start {
  width: 100%;
  background: var(--gold);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 16px;
  font-size: 15px;
  font-weight: 500;
  font-family: 'Instrument Sans', sans-serif;
  cursor: pointer;
  margin-top: 8px;
  letter-spacing: 0.02em;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-start:hover { opacity: 0.92; }
.btn-start:active { transform: scale(0.98); }

.btn-reset {
  width: 100%;
  background: transparent;
  color: rgb(190, 192, 196);
  border: none;
  border-radius: 30px;
  padding: 12px;
  font-size: 13px;
  font-family: 'Instrument Sans', sans-serif;
  cursor: pointer;
  margin-top: 4px;
  letter-spacing: 0.02em;
  transition: color 0.2s;
  display: none;
}
.btn-reset:hover { color: var(--red-soft); }

.btn-save {
  width: 100%;
  background: var(--gold);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 16px;
  font-size: 15px;
  font-weight: 500;
  font-family: 'Instrument Sans', sans-serif;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: opacity 0.2s, transform 0.15s;
  margin-top: 4px;
}
.btn-save:hover { opacity: 0.9; }
.btn-save:active { transform: scale(0.98); }
.save-msg {
  text-align: center;
  font-size: 13px;
  color: var(--gold);
  margin-top: 10px;
  min-height: 20px;
  font-weight: 500;
}

.btn-link {
  display: block;
  width: 100%;
  background: var(--gold);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 16px;
  font-size: 15px;
  font-weight: 500;
  font-family: 'Instrument Sans', sans-serif;
  cursor: pointer;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-align: center;
  transition: opacity 0.2s, transform 0.15s;
  margin-top: 16px;
  box-sizing: border-box;
}
.btn-link:hover { opacity: 0.9; }
.btn-link:active { transform: scale(0.98); }

/* NUDGE CARD */
.nudge-card {
  background: var(--greyish);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.nudge-day {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 8px;
}
.nudge-text {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 20px;
  color: var(--text);
  line-height: 1.4;
}

/* CARDS */
.card {
  background: var(--white);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.card-title {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 16px;
}
.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.card-title-row .card-title { margin-bottom: 0; }
.view-toggle {
  display: flex;
  gap: 2px;
  background: var(--cream-dark);
  border-radius: 8px;
  padding: 3px;
}
.view-btn {
  background: none;
  border: none;
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 15px;
  cursor: pointer;
  color: var(--text-light);
  transition: background 0.15s, color 0.15s;
}
.view-btn.active {
  background: #fff;
  color: var(--gold);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* METRICS */
.metric-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.metric-box {
  background: var(--cream);
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
}
.metric-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 8px;
  display: block;
}
.metric-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1.5px solid var(--border-dark);
  font-size: 22px;
  font-weight: 400;
  font-family: 'Instrument Sans', sans-serif;
  color: var(--text);
  text-align: center;
  outline: none;
  padding: 2px 0;
  -moz-appearance: textfield;
  appearance: textfield;
}
.metric-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.metric-input:focus { border-bottom-color: var(--gold); }
.metric-unit { font-size: 11px; color: var(--text-light); margin-top: 4px; }

/* CHECKLIST */
.check-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--cream-dark);
  cursor: pointer;
  transition: opacity 0.15s;
}
.check-item:last-child { border-bottom: none; padding-bottom: 0; }
.check-item:first-child { padding-top: 0; }
.check-circle {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border-dark);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.check-item.done .check-circle { background: var(--gold); border-color: var(--gold); }
.check-check { display: none; color: #fff; font-size: 13px; font-weight: 700; }
.check-item.done .check-check { display: block; }
.check-text { font-size: 14px; color: var(--text); flex: 1; line-height: 1.4; }
.check-emoji { font-size: 16px; margin-right: 2px; }
.check-item.done .check-text { color: var(--text-light); text-decoration: line-through; }

/* PHOTO */
.photo-zone {
  border: 2px dashed var(--border-dark);
  border-radius: 14px;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s;
}
.photo-zone:hover { border-color: var(--gold); }
.photo-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
}
.photo-icon { font-size: 28px; margin-bottom: 8px; }
.photo-hint { font-size: 13px; color: var(--text-light); line-height: 1.5; }
.photo-preview-img {
  width: 100%;
  border-radius: 12px;
  display: none;
  max-height: 280px;
  object-fit: cover;
}
.photo-change-btn {
  display: none;
  margin-top: 10px;
  font-size: 12px;
  color: var(--gold);
  background: var(--gold-light);
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 500;
  position: relative;
}
.photo-change-btn input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* TIP CARD (inline, today section) */
.tip-card {
  background: var(--gold-light);
  border-left: 3px solid var(--gold);
  border-radius: 0 12px 12px 0;
  padding: 16px 18px;
  margin-bottom: 16px;
}
.tip-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.tip-text { font-size: 14px; color: var(--text); line-height: 1.6; }
.tip-shop-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.02em;
}

/* NOTE TEXTAREA */
.note-input {
  width: 100%;
  background: var(--cream-dark);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  font-size: 14px;
  font-family: 'Instrument Sans', sans-serif;
  color: var(--text);
  outline: none;
  resize: none;
  line-height: 1.6;
  min-height: 80px;
  transition: border-color 0.2s;
}
.note-input:focus { border-color: var(--gold); }

/* MEAL CHIPS (Heute-Ansicht) */
.meal-chips {
  display: flex;
  gap: 8px;
}
.meal-chip {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 6px;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: var(--cream);
  color: var(--text-mid);
  font-family: 'Instrument Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1.2;
}
.meal-chip-icon { font-size: 20px; display: block; }
.meal-chip.selected {
  background: var(--gold-light);
  border-color: var(--gold);
  color: var(--gold);
  font-weight: 600;
}
.meal-hint {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 12px;
  line-height: 1.5;
  text-align: center;
}

/* MEAL CHOOSER (Edit-Panel) */
.meal-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--cream-dark);
}
.meal-item:last-of-type { border-bottom: none; }
.meal-name { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 10px; }
.meal-toggle { display: flex; gap: 8px; }
.meal-btn {
  flex: 1;
  padding: 9px 10px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: transparent;
  font-size: 13px;
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 500;
  color: var(--text-mid);
  cursor: pointer;
  transition: all 0.18s;
}
.meal-btn.selected-myline { background: var(--gold); border-color: var(--gold); color: #fff; }
.meal-btn.selected-normal { background: var(--cream-dark); border-color: var(--border-dark); color: var(--text); }
.meal-counter {
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--gold-light);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-mid);
  text-align: center;
  transition: background 0.2s;
}
.meal-counter strong { color: var(--gold); }
.meal-counter.goal-reached { background: rgba(255,131,41,0.18); }

/* TIP SECTIONS (Tipps & Ernährung pages) */
.tip-section-title {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 26px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 6px;
}
.tip-section-sub {
  font-size: 13px;
  color: var(--text-mid);
  margin-bottom: 20px;
  line-height: 1.6;
}
.tip-big-card {
  background: var(--greyish);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.tip-big-card .tip-category {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.tip-big-card h3 {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.3;
}
.tip-big-card p { font-size: 14px; color: var(--text-mid); line-height: 1.65; }
.tip-card-img {
  display: block;
  width: calc(100% + 44px);
  margin: -22px -22px 18px -22px;
  border-radius: 16px 16px 0 0;
  object-fit: cover;
  max-height: 200px;
}

/* ROUTINE HEADING */
.routine-section-heading {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--text);
  margin: 8px 0 12px;
  padding-left: 2px;
}

/* ANIMATIONS */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.section.active { animation: fadeIn 0.3s ease; }

@keyframes checkPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.check-item.done .check-circle { animation: checkPop 0.25s ease; }

/* PWA INSTALL BANNER */
#pwa-banner {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 480px;
  background: var(--white);
  border-top: 1px solid var(--border);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 24px rgba(17,24,39,0.10);
  padding: 16px 16px 24px;
  z-index: 9999;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#pwa-banner.visible {
  transform: translateX(-50%) translateY(0);
}
.pwa-banner-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pwa-banner-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  flex-shrink: 0;
}
.pwa-banner-text {
  flex: 1;
}
.pwa-banner-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  line-height: 1.3;
}
.pwa-banner-sub {
  font-size: 13px;
  color: var(--text-mid);
  margin-top: 2px;
  line-height: 1.4;
}
#pwa-close {
  background: none;
  border: none;
  color: var(--text-mid);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  line-height: 1;
}
#pwa-install-btn {
  display: none;
  width: 100%;
  margin-top: 12px;
  background: var(--gold);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 13px;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
}
@keyframes pwaBannerIn {
  from { transform: translateX(-50%) translateY(100%); }
  to   { transform: translateX(-50%) translateY(0); }
}
