
:root{
  --purple:#6a1b6a;
  --purple-dark:#4A0F4A;
  --yellow:#F2B705;
  --cream:#FFF6E8;
}
*{box-sizing:border-box;-webkit-user-select:none;user-select:none}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:linear-gradient(180deg,var(--purple-dark),var(--purple));
  color:var(--cream);
}
/* Prevent background scroll when a modal is open (especially iOS Safari) */
body.modal-open{
  overflow:hidden;
  touch-action:none;
}
.app{min-height:100vh;display:flex;flex-direction:column;}
.hidden{display:none !important}

.topbar{
  position:sticky;
  top:0;
  z-index:10001;
  padding-top: env(safe-area-inset-top);
  background:linear-gradient(180deg,var(--purple-dark),var(--purple));
  border-bottom:1px solid rgba(255,255,255,.12);
}
.icon-btn{
  width:50px;height:50px;border:none;border-radius:999px;
  background:var(--yellow);color:var(--purple-dark);
  font-size:22px;font-weight:950;
  box-shadow:0 12px 22px rgba(0,0,0,.24);
}
#btnReset{justify-self:start}
#btnOverview{justify-self:end}

.brand-center{
  justify-self:center;
  display:flex;
  align-items:center;
  gap:10px;
}
.logo{
  width:64px;height:64px;border-radius:18px;object-fit:cover;
  border:2px solid rgba(255,255,255,.14);
  box-shadow:0 16px 30px rgba(0,0,0,.30);
}

/* Make the logo feel tappable */
.logo[role="button"]{ cursor:pointer; user-select:none; -webkit-tap-highlight-color: transparent; }
.logo[role="button"]:active{ transform: scale(0.98); }
.brand-text{line-height:1.05;text-align:left;min-width:0}
.brand-title{
  color:var(--yellow);
  font-weight:950;
  letter-spacing:.10em;
  font-size:14px;
  white-space:nowrap;
}
.brand-sub{
  font-weight:850;
  font-size:13px;
  white-space:nowrap;
}
.spotify-btn{
  border:none;background:transparent;padding:0;
  width:28px;height:28px;display:flex;align-items:center;justify-content:center;
  cursor:pointer;
}
.spotify-svg{width:28px;height:28px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.25));}

main{flex:1;padding:12px}
.screen{max-width:920px;margin:0 auto;}

.add-row{display:flex;gap:12px;margin:6px 0 12px}
.input{
  flex:1;padding:14px 14px;border-radius:18px;border:none;font-size:17px;
}
.btn{border:none;border-radius:18px;padding:14px 18px;font-weight:950;font-size:16px;}
.btn-primary{
  background:var(--yellow);color:var(--purple-dark);
  box-shadow:0 12px 22px rgba(0,0,0,.18);
}

.grid{display:grid;gap:14px}
.grid-2{grid-template-columns:repeat(2, minmax(0, 1fr));}

/* Tiles */
.tile{
  position:relative;
  background:var(--yellow);
  border-radius:30px;
  padding:20px 14px 18px;
  color:var(--purple-dark);
  font-weight:950;
  text-align:center;
  box-shadow:0 14px 24px rgba(0,0,0,.20);
  /* IMPORTANT: no overflow hidden, otherwise the bubble gets clipped */
}
.tile::before{content:"";position:absolute;left:0;top:0;bottom:0;width:25%;}
.tile::after{content:"";position:absolute;left:25%;right:0;top:0;bottom:0;}
.drink-name{
  font-size:20px;line-height:1.08;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden;
}
/* Count bubble fully INSIDE, always readable */
.count-bubble{
  position:absolute;
  top:10px;
  right:10px;
  width:42px;height:42px;border-radius:50%;
  background:var(--purple-dark);
  border:4px solid var(--yellow);
  color:var(--yellow);
  display:flex;align-items:center;justify-content:center;
  font-size:20px;font-weight:950;
  box-shadow:0 10px 18px rgba(0,0,0,.22);
}
.bottom-spacer{height:10px}

/* Overview: much bigger for distance */
.title{
  margin:10px 0 18px;
  text-align:center;
  color:var(--yellow);
  font-size:44px;
  font-weight:950;
  letter-spacing:.02em;
}
.summary-list{display:flex;flex-direction:column;gap:18px;}
.summary-row{
  display:flex;justify-content:space-between;align-items:center;gap:18px;
  padding:26px 22px;
  border-radius:22px;
  background:rgba(0,0,0,.22);
  border:1px solid rgba(255,255,255,.12);
}
.summary-row .left{
  font-weight:950;
  font-size:40px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.summary-row .right{
  font-weight:950;
  font-size:48px;
  color:var(--yellow);
  min-width:64px;
  text-align:right;
}

/* Spotify modal */
.modal{
  position:fixed;inset:0;z-index:20000;
  display:flex;align-items:center;justify-content:center;
  padding:18px;
}
.modal-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.60);}
.modal-card{
  max-height: calc(100vh - env(safe-area-inset-top) - 24px);
  overflow:auto;

  position:relative;z-index:20001;
  width:min(520px,100%);
  border-radius:22px;
  background:linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.10));
  border:1px solid rgba(255,255,255,.18);
  padding:14px;
  box-shadow:0 24px 46px rgba(0,0,0,.40);
  
}
.modal-head{
  display:flex;
  align-items:center;
  gap:12px;
  /* Keep header in-flow to avoid iOS Safari scroll/overlap glitches */
  position:relative;
  z-index:2;
  background:transparent;
  padding-bottom:10px;
  border-bottom:none;
}
.modal-title-main{font-weight:950;color:var(--yellow);letter-spacing:.08em;}
.modal-title-sub{font-weight:850;opacity:.55;font-size:12px;}
.modal-x{
  margin-left:auto;
  width:48px;height:48px;border:none;border-radius:999px;
  background:rgba(255,255,255,.18);
  color:var(--cream);
  font-weight:950;font-size:20px;
  cursor:pointer;pointer-events:auto;
  position:relative;z-index:20002;
}
.qr-link{display:block;margin:12px auto 10px;width:fit-content;}
.qr-img{width:260px;height:260px;background:#fff;padding:10px;border-radius:18px;object-fit:contain;}
.open-spotify{
  display:block;text-align:center;
  padding:14px 14px;border-radius:18px;
  background:#1DB954;color:#fff;
  font-weight:950;text-decoration:none;
}

/* v8.4 modal robustness */
.modal *{ -webkit-user-select:none; user-select:none; }
.modal-x{ pointer-events:auto !important; }


/* v8.5: Summary must fit on one screen (no scroll) */
#screenSummary{
  height: calc(100vh - 86px); /* header approx */
  display: flex;
  flex-direction: column;
}
#summaryList{
  flex: 1;
  min-height: 0;
  overflow: hidden; /* prevent scrolling */
}
#summaryFooter{
  margin-top: 12px;
  padding: 14px 18px;
  border-radius: 22px;
  background: rgba(0,0,0,.26);
  border: 1px solid rgba(255,255,255,.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#summaryFooter .left{
  font-weight: 950;
  font-size: clamp(18px, 4.2vw, 34px);
}
#summaryFooter .right{
  font-weight: 950;
  font-size: clamp(22px, 5vw, 42px);
  color: var(--yellow);
}

/* Make summary row sizes controllable via CSS vars set by JS */
.summary-row{
  padding: var(--sum-pad, 22px) var(--sum-pad-x, 22px) !important;
}
.summary-row .left{
  font-size: var(--sum-name, 36px) !important;
}
.summary-row .right{
  font-size: var(--sum-qty, 44px) !important;
}

/* Spotify icon should feel tappable */
.spotify-btn{
  width: 40px !important;
  height: 40px !important;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  box-shadow: 0 10px 18px rgba(0,0,0,.20);
}
.spotify-btn:active{
  transform: scale(0.96);
}
.spotify-svg{width: 28px !important; height: 28px !important;}

/* v8.6: lock summary to one screen with grid layout */
#screenSummary{
  height: calc(100vh - 86px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  overflow: hidden;
}
#screenSummary .title{margin: 4px 0 0 !important;}
#summaryList{overflow: hidden !important;}
.summary-list{gap: var(--sum-gap, 12px) !important;}

/* v8.7: remove overview title spacing */
#screenSummary .title{display:none !important;}

/* v8.8: bigger Spotify button for tap-ability */
.spotify-btn{
  width: 54px !important;
  height: 54px !important;
  padding: 0 !important;
}
.spotify-svg{
  width: 36px !important;
  height: 36px !important;
}

/* =========================
   v9: SCOREBOARD OVERVIEW
   - ZERO SCROLL, EVER
   - iOS Safari safe height (uses --appH from JS = window.innerHeight)
   ========================= */
:root{
  --appH: 100vh;     /* JS will override to px */
  --headerH: 86px;   /* JS will update precisely */
  --sum-gap: 8px;
  --sum-name: 28px;
  --sum-qty: 34px;
  --sum-padY: 10px;
  --sum-padX: 14px;
  --footerH: 64px;
}

/* Prevent rubber-band scroll in overview */
body.overview-lock{ overflow: hidden !important; }

#screenSummary{
  /* use JS-measured innerHeight to avoid iOS 100vh issues */
  height: calc(var(--appH) - var(--headerH));
  display: grid;
  grid-template-rows: 1fr var(--footerH);
  gap: 10px;
  overflow: hidden;
  padding-top: 6px;
}

#summaryList{
  overflow: hidden !important;
  display: flex;
  flex-direction: column;
  gap: var(--sum-gap);
  min-height: 0;
}

/* Each row gets equal height so everything fits */
#summaryList .summary-row{
  flex: 1 1 0;
  min-height: 0;
  padding: var(--sum-padY) var(--sum-padX) !important;
  border-radius: 18px;
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: none; /* save space */
}

#summaryList .summary-row .left{
  font-size: var(--sum-name) !important;
  font-weight: 950;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#summaryList .summary-row .right{
  font-size: var(--sum-qty) !important;
  font-weight: 950;
  color: var(--yellow);
  min-width: 56px;
  text-align: right;
}

#summaryFooter{
  height: var(--footerH);
  padding: 10px 16px;
  border-radius: 18px;
  background: rgba(0,0,0,.30);
  border: 1px solid rgba(255,255,255,.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#summaryFooter .left{
  font-weight: 950;
  font-size: clamp(18px, 4.0vw, 30px);
}
#summaryFooter .right{
  font-weight: 950;
  font-size: clamp(22px, 5.0vw, 40px);
  color: var(--yellow);
}

/* Spotify button: bigger + clearer tap target */
.spotify-btn{
  width: 58px !important;
  height: 58px !important;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  box-shadow: 0 10px 18px rgba(0,0,0,.22);
}
.spotify-svg{ width: 40px !important; height: 40px !important; }
.spotify-btn:active{ transform: scale(0.96); }

/* v9.1 cross-platform UX */
button, .drink-btn, .spotify-btn, .icon-btn {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  touch-action: manipulation;
}

/* iOS safe areas */
#screenSummary{
  padding-bottom: max(10px, env(safe-area-inset-bottom));
}
#summaryFooter{
  margin-bottom: env(safe-area-inset-bottom);
}

/* Make Spotify feel more like a button */
.spotify-btn{
  outline: 2px solid rgba(255,255,255,.14);
}
.spotify-btn::after{
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 999px;
}

/* v9.2: prevent center (logo/text/spotify) from overlapping the right icon button */
.topbar{ overflow:hidden; }
.brand-center{ max-width:100%; min-width:0; }
.brand-text{ max-width: 150px; min-width:0; }
@media (max-width: 420px){
  .logo{ width:56px; height:56px; border-radius:16px; }
  .brand-title{ font-size:13px; letter-spacing:.08em; }
  .brand-sub{ font-size:12px; }
  .spotify-btn{ width:52px !important; height:52px !important; }
  .spotify-svg{ width:36px !important; height:36px !important; }
}
/* ensure right button stays clickable above any overlap */
#btnOverview{ position:relative; z-index:20; }
#btnSpotify{ position:relative; z-index:10; }

/* Gold theme v10.5 */
:root{
  --gold:#f7c948;
  --gold-2:#ffde7a;
  --spark:rgba(255, 222, 122, .22);
  --spark-2:rgba(255, 222, 122, .10);
  --glass:rgba(255,255,255,.08);
  --glass-2:rgba(255,255,255,.12);
}

body::before{
  content:"";
  position:fixed; inset:-20vh -20vw;
  pointer-events:none;
  background:
    radial-gradient(circle at 20% 10%, var(--spark) 0 18%, transparent 19%),
    radial-gradient(circle at 80% 15%, var(--spark-2) 0 14%, transparent 15%),
    radial-gradient(circle at 70% 80%, var(--spark) 0 16%, transparent 17%),
    radial-gradient(circle at 25% 75%, var(--spark-2) 0 12%, transparent 13%);
  filter: blur(0.2px);
  opacity:.55;
}

.icon-btn, .spotify-btn, .btn, .drink-btn{
  box-shadow: 0 10px 22px rgba(0,0,0,.25);
}

.icon-btn:active, .spotify-btn:active, .btn:active, .drink-btn:active{
  transform: translateY(1px);
}

.primary-btn{
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color:#2a102a;
  font-weight:900;
  border:none;
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: 0 0 0 2px rgba(0,0,0,.08), 0 0 18px rgba(247,201,72,.35);
}

.primary-btn:hover{ filter: brightness(1.03); }
.primary-btn:active{ transform: translateY(1px); }

/* Help modal */
.help-modal .help-card{
  width:min(680px, 92vw);
  max-height: 90vh;
  overflow:auto;
  position: relative;
}

.help-close{
  position:absolute;
  top:14px;
  right:14px;
  width:44px;
  height:44px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.22);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  cursor:pointer;
}
.help-close:hover{ background: rgba(0,0,0,.36); }
.help-close:active{ transform: scale(0.98); }

.help-hero{
  position:relative;
  padding: 18px 18px 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(247,201,72,.18), rgba(255,255,255,.06));
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 0 28px rgba(247,201,72,.20);
  margin: 14px;
}

.help-hero-badge{
  display:inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.18);
  font-weight: 800;
  letter-spacing: .2px;
}

.help-hero-title{
  margin-top: 10px;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: .3px;
}

.help-hero-sub{
  margin-top: 6px;
  opacity: .95;
  font-size: 16px;
  line-height: 1.3;
}

.help-steps{ padding: 0 14px 10px; }

.help-step{
  display:flex;
  gap:14px;
  align-items: stretch;
  margin: 12px 0;
  padding: 14px;
  border-radius: 18px;
  background: var(--glass);
  border: 1px solid rgba(255,255,255,.14);
}

.help-step-left{ flex: 1.3; min-width: 0; }
.help-step-right{ flex: 1; display:flex; align-items:center; justify-content:center; }

.help-step-title{ font-weight: 900; font-size: 18px; margin-bottom: 6px; }
.help-step-text{ opacity: .95; line-height: 1.35; }

.help-plusminus{
  margin-top: 10px;
  display: grid;
  gap: 6px;
  max-width: 280px;
}

.pm-row{
  display:grid;
  grid-template-columns: 1fr 64px;
  align-items:center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 14px;
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.14);
}
.pm-side{ opacity:.95; font-weight:700; }
.pm-val{
  text-align:center;
  font-weight: 900;
  color: #2a102a;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  border-radius: 12px;
  padding: 6px 0;
  box-shadow: 0 0 16px rgba(247,201,72,.25);
}

.mini-screen{
  width: min(240px, 36vw);
  border-radius: 18px;
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.14);
  padding: 10px;
  box-shadow: 0 0 20px rgba(0,0,0,.22);
}
.mini-top{
  font-weight: 900;
  letter-spacing: .2px;
  font-size: 13px;
  opacity:.95;
  margin-bottom: 8px;
}
.mini-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.mini-btn{
  background: linear-gradient(135deg, rgba(247,201,72,.95), rgba(255,222,122,.95));
  color:#2a102a;
  font-weight: 900;
  font-size: 12px;
  padding: 10px 8px;
  border-radius: 999px;
  text-align:center;
  box-shadow: 0 0 16px rgba(247,201,72,.22);
}
.mini-hint{
  margin-top: 8px;
  font-size: 12px;
  opacity: .92;
}

.mini-list{ display:grid; gap: 8px; }
.mini-row{
  display:flex; justify-content:space-between; align-items:center;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  font-weight: 800;
  font-size: 12px;
}
.mini-total{
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(247,201,72,.18);
  border: 1px solid rgba(255,255,255,.14);
  font-weight: 900;
  font-size: 12px;
  text-align:center;
}

.mini-toast{
  width: min(240px, 36vw);
  text-align:center;
  padding: 18px 12px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(247,201,72,.22), rgba(255,255,255,.06));
  border: 1px solid rgba(255,255,255,.16);
  font-size: 34px;
  box-shadow: 0 0 28px rgba(247,201,72,.18);
}

.help-qr{
  margin: 4px 14px 0;
  padding: 14px 14px 12px;
  border-radius: 18px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  text-align: center;
}
.help-qr-title{ font-weight: 900; margin-bottom: 10px; }
.help-qr-link{ display:inline-block; text-decoration:none; color:inherit; }
.help-qr-img{
  width: min(220px, 70vw);
  height: auto;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(0,0,0,.30), 0 0 22px rgba(247,201,72,.18);
  display:block;
  margin: 0 auto 8px;
}
.help-qr-url{ font-weight: 900; opacity:.95; }
.help-qr-hint{ margin-top: 6px; font-size: .95em; opacity:.55; }

.help-actions{
  display:flex; justify-content:center;
  padding: 14px 14px 18px;
}

@media (max-width: 520px){
  .help-step{ flex-direction: column; }
  .help-hero-title{ font-size: 30px; }
  .mini-screen, .mini-toast{ width: 100%; }
}

.no-scroll{ overflow:hidden; }

/* Polish v10.7 */
.help-modal{
  display:none;
}
.help-modal[data-open="1"]{
  display:block;
}
.help-modal .help-card{
  transform: translateY(10px);
  opacity: 0;
  transition: transform 180ms ease, opacity 180ms ease;
}
.help-modal.is-open .help-card{
  transform: translateY(0);
  opacity: 1;
}
.modal-backdrop{
  opacity: 0;
  transition: opacity 180ms ease;
}
.modal-backdrop.is-open{
  opacity: 1;
}
/* Slightly calmer gold glow */
.primary-btn{
  box-shadow: 0 0 0 2px rgba(0,0,0,.08), 0 0 14px rgba(247,201,72,.28);
}
.mini-btn{
  box-shadow: 0 0 12px rgba(247,201,72,.18);
}
.help-hero{
  box-shadow: 0 0 22px rgba(247,201,72,.16);
}
.help-qr-img{
  box-shadow: 0 12px 26px rgba(0,0,0,.28), 0 0 18px rgba(247,201,72,.14);
}
/* Accessibility */
@media (prefers-reduced-motion: reduce){
  .help-modal .help-card, .modal-backdrop, .primary-btn, .mini-btn{
    transition: none !important;
  }
  .icon-btn:active, .spotify-btn:active, .btn:active, .drink-btn:active, .primary-btn:active{
    transform:none !important;
  }
}


/* ===== Popup menu zoals voorbeeld ===== */
.visually-hidden{ 
  position:absolute !important; 
  width:1px; height:1px; 
  padding:0; margin:-1px; 
  overflow:hidden; clip:rect(0,0,0,0); 
  white-space:nowrap; border:0; 
}

.menu-toggle{ font-size: 20px; }

.popup-overlay{
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(0,0,0,.35);
  z-index: 9999;
}
.popup-overlay.show{ display:block; }

.popup-menu{
  position: fixed;
  top: calc(env(safe-area-inset-top) + 86px);
  left: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transform: translateY(-10px);
  opacity: 0;
  pointer-events: none;
  z-index: 10000;
}
.popup-menu.open{
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
  transition: opacity 160ms ease, transform 160ms ease;
}

.popup-item{width:62px !important;height:62px !important;border-radius:50% !important;border:none !important;background:#F7C600 !important;display:flex !important;align-items:center !important;justify-content:center !important;box-shadow:0 10px 26px rgba(0,0,0,0.18) !important;position:relative;z-index:35002;}
.popup-item .spotify-svg{
  width: 34px;
  height: 34px;
  display:block;
}

/* zet de popup net onder de menu knop */
.topbar{ position: relative; }


/* === HEADERFIX (popupmenu) === */
.hdr-grid{
  display:grid;
  grid-template-columns: 56px 1fr 56px;
  align-items:center;
  column-gap: 10px;
  width:100%;
}

.hdr-left, .hdr-right{
  display:flex;
  flex-direction:column;
  gap: 10px;
  align-items:center;
  justify-content:center;
}

.hdr-center{
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:0;
}

.hdr-center .brand-center{
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  min-width:0;
}

.hdr-center .brand-center img,
.hdr-center .brand-center .logo{
  width:44px;
  height:44px;
  object-fit:cover;
  border-radius:12px;
}

.hdr-center .brand-text{
  min-width:0;
}

.hdr-center .brand-title,
.hdr-center .brand-sub{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Ensure header buttons keep size */
#menuBtn, #btnOverview, #btnReset{
  width:44px;
  height:44px;
}


/* === HEADERFIX2: menu links, overzicht+reset rechts (naast elkaar) === */
.hdr-grid2{
  display:grid;
  grid-template-columns: 56px 1fr auto;
  align-items:center;
  column-gap: 10px;
  width:100%;
}

.hdr-left2{
  display:flex;
  align-items:center;
  justify-content:center;
}

.hdr-center2{
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:0;
}

.hdr-right2{
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
}

.hdr-center2 .brand-center{
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  min-width:0;
}

.hdr-center2 .brand-center img,
.hdr-center2 .brand-center .logo{
  width:44px;
  height:44px;
  object-fit:cover;
  border-radius:12px;
}

.hdr-center2 .brand-title,
.hdr-center2 .brand-sub{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Make sure these are consistent */
#menuBtn, #btnOverview, #btnReset{
  width:44px;
  height:44px;
}


/* === HEADERFIX3: vink helemaal rechts === */
.hdr-grid3{min-height:72px;
  display:grid;
  grid-template-columns: 56px 1fr 132px;
  align-items:center;
  width:100%;
}

.hdr-left3{
  display:flex;
  align-items:center;
  justify-content:center;
}

.hdr-center3{
  display:flex;
  align-items:center;
  justify-content:center;
}

.hdr-right3{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:12px;
}

/* tiny nudge so the top-right overview button doesn't hug the screen edge */
.hdr-right3 #btnOverview{
  margin-right:4px;
}

.hdr-spacer{
  flex:1;
}

#menuBtn, #btnOverview, #btnReset{
  width:44px;
  height:44px;
}

#btnMenu{width:44px;height:44px;}


.settings-section{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 12px;
}
.settings-label{
  font-weight: 700;
  margin-bottom: 8px;
}
.settings-row{
  display:flex;
  gap:10px;
  margin-top:10px;
}
.settings-row .btn{
  flex:1;
}


.settings-section{ margin-top: 6px; }
.settings-h{ font-weight:800; margin-top:6px; }
.settings-sub{ opacity:.8; font-size:14px; margin-bottom:8px; }
.settings-drinks{ display:block; }

/* Small sub-panels inside settings (e.g. restore defaults) */
.settings-subcard{
  margin-top:12px;
  padding:12px;
  border-radius:18px;
  background: rgba(255,255,255,0.10);
  border:1px solid rgba(255,255,255,0.14);
}

.settings-subtitle{
  font-weight:800;
  opacity:0.95;
  margin-bottom:8px;
}

.settings-subcard-restore .primary-btn{
  width:100%;
  font-weight:800;
}
.settings-col{ flex:1; min-width: 210px; }
.settings-col-h{ font-weight:700; margin-bottom:6px; }
.drink-list{ display:flex; flex-direction:column; gap:8px; }
.drink-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:8px 10px;
  border-radius:14px;
  background: rgba(255,255,255,0.15);
  
}
.drink-name{ font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* Settings grid: make tiles more compact and keep a fixed height */
.settings-item .drink-name{
  font-size:13px;
  line-height:1.05;
  white-space:normal;            /* allow 2-line names (cola-zero, radler 0.0, etc.) */
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
}
.btn-trash{
  width:38px; height:38px;
  border-radius:999px;
  border:none;
  background: rgba(255,255,255,0.85);
  color:#111;
  font-weight:900;
}
.btn-trash:active{ transform: scale(0.98); }


.toggle{ position:relative; display:inline-flex; align-items:center; }
.toggle input{ position:absolute; opacity:0; pointer-events:auto; cursor:pointer; inset:0; width:100%; height:100%; z-index:2; }
.toggle-ui{
  width:50px; height:30px;
  background: rgba(255,255,255,0.55);
  border-radius: 999px;
  position:relative;
  box-shadow: inset 0 0 0 2px rgba(0,0,0,0.12);
}
.toggle-ui::after{
  content:'';
  width:24px; height:24px;
  border-radius:999px;
  background: rgba(255,255,255,0.95);
  position:absolute;
  top:3px; left:3px;
  transition: transform .15s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.toggle input:checked + .toggle-ui{
  background: rgba(255,255,255,0.85);
}
.toggle input:checked + .toggle-ui::after{
  transform: translateX(20px);
}

/* App variant: iOS-schakelaar in geel */
.settings-item .toggle{ justify-self:end; }
.toggle.toggle--yellow input:checked + .toggle-ui{
  background: var(--yellow);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,0.10);
}

.brand-subtitle{color:#fff;font-weight:700;font-size:14px;line-height:1.05;margin-top:2px; white-space:nowrap;}
.version-badge{display:inline-block;margin-top:4px;padding:2px 8px;border-radius:999px;background:rgba(255,255,255,0.18);color:#fff;font-weight:800;font-size:11px;letter-spacing:0.5px;}


.settings-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  padding: 6px 0 2px;
}

/* Settings: iOS-style switches in Tegedraods kleuren */
.settings-item{
  position:relative;
  display:grid;
  grid-template-columns: 1fr auto;
  align-items:center;
  column-gap:6px;
  border-radius:999px;
  /* Make every settings card the exact same height */
  height:40px;
  min-height:40px;
  padding:4px 8px;
  background: rgba(255,255,255,0.14);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.18);
}
.settings-item.is-on{
  background: rgba(255,255,255,0.10);
}
/* Label inside each drink card */
.settings-item .settings-pill-label{
  font-weight:900;
  font-size:13px;
  color: rgba(255,255,255,0.95);
  line-height:1.05;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  text-align:center;
  justify-self:center;
  padding:0 4px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}
.settings-item.is-on .settings-pill-label{
  color: rgba(255,255,255,0.98);
}

.toggle.toggle--yellow .toggle-ui{
  background: rgba(255,255,255,0.35);
}
.toggle.toggle--yellow input:checked + .toggle-ui{
  background: rgba(255,208,0,0.95);
}
.toggle.toggle--yellow input:checked + .toggle-ui::after{
  transform: translateX(20px);
}

.settings-item.is-custom{ padding-right:46px; }
.settings-item .item-trash{
  position:absolute;
  right:-6px;
  top:-6px;
  transform:none;
  width:22px;
  height:22px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:14px;
  line-height:1;
  background: #ff3b30;
  color:#fff;
  border:2px solid rgba(255,255,255,0.95);
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
  cursor:pointer;
  z-index:5;
}
.settings-pill{border:none;border-radius:999px;padding:12px 14px;font-weight:800;font-size:17px;}
.settings-pill.is-on{
  background: var(--yellow);
  color: #4b1562;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
}
.settings-pill.is-off{
  background: rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.92);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.18);
  
}

.brand-center .logo{ cursor: default; pointer-events: none; }

.settings-trash.is-on{ background: rgba(255,255,255,0.35); }
.settings-trash.is-off{ background: rgba(255,255,255,0.18); }

.share-ios-icon{width:28px;height:28px;display:block;}

.info-letter{font-weight:900;font-size:30px;color:#4b1562;line-height:1;}
.gear-letter{font-size:28px;color:#4b1562;line-height:1;}

.settings-pill{position:relative;}
.settings-pill .pill-label{display:block;padding-right:42px;}
.settings-pill.is-custom .pill-trash{
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%);
  width:34px;
  height:34px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:16px;
  background: rgba(255,255,255,0.28);
  border:2px solid rgba(75,21,98,0.35);
}

  box-shadow:0 10px 26px rgba(0,0,0,0.18) !important;
}
.popup-item svg, .popup-item span, .popup-item .info-letter, .popup-item .gear-letter{
  color:#4b1562 !important;
  fill:#4b1562 !important;
}

.share-link{display:inline-block;margin-top:10px;font-weight:900;font-size:22px;color:#ffffff;text-decoration:none;background:rgba(75,21,98,0.55);padding:10px 14px;border-radius:14px;box-shadow:0 10px 26px rgba(0,0,0,0.28);}

#shareModal .modal-actions{justify-content:center;gap:14px;}

.qr-url{color:#fff !important;font-weight:900 !important;font-size:22px !important;background:rgba(75,21,98,0.55);padding:10px 14px;border-radius:14px;display:inline-block;}

.main-under-header{
  padding-top: 12px;
}

#shareModal .qr-wrap{display:flex;justify-content:center;align-items:center;}
#shareModal img#shareQr{display:block;max-width:100%;height:auto;margin:0 auto;}

/* Ensure the whole share content centers nicely */
#shareModal .share-box{display:flex;flex-direction:column;align-items:center;}

.help-visual{
  margin-top:14px;
  padding:14px;
  border-radius:18px;
  background:rgba(255,255,255,0.10);
  border:1px solid rgba(255,255,255,0.14);
}
.splitbar{
  height:14px;
  border-radius:999px;
  overflow:hidden;
  display:flex;
  background:rgba(255,255,255,0.14);
}
.splitbar .p75{flex:3;}
.splitbar .p25{flex:1;}
.splitbar .p75, .splitbar .p25{background:rgba(247,198,0,0.85);}
.splitlabel{
  margin-top:8px;
  display:flex;
  justify-content:space-between;
  font-weight:800;
  color:#fff;
  opacity:.92;
}
.sample-btn{
  margin-top:12px;
  border-radius:999px;
  background:#F7C600;
  color:#4A1362;
  font-weight:900;
  padding:14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  box-shadow:0 10px 26px rgba(0,0,0,0.18);
}
.sample-btn .name{font-size:18px;}
.sample-btn .pm{
  display:flex;
  gap:10px;
}
.sample-pill{
  min-width:56px;
  height:34px;
  border-radius:999px;
  background:rgba(255,255,255,0.45);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  color:#4A1362;
}

/* --- Modal layering + close button safety --- */
.modal{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: calc(env(safe-area-inset-top) + 16px) 16px 16px;
  z-index: 20000; /* above sticky header */
}
.modal.open{display:flex;}
.modal .modal-card{
  width: min(520px, 100%);
  max-height: calc(100vh - env(safe-area-inset-top) - 32px);
  overflow: auto;
  position: relative;
}
.modal .modal-close{
  position: sticky;
  top: 0;
  margin-left: auto;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: none;
  background: rgba(255,255,255,0.22);
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index: 20001;
}

/* --- Help modal: centered, readable, consistent --- */
#helpModal.modal{
  align-items: center;
  justify-content: center;
}
#helpModal .modal-card{
  width: calc(100vw - 28px);
  max-width: 720px;
  max-height: calc(100vh - env(safe-area-inset-top) - 28px);
  border-radius: 26px;
  background: rgba(28, 5, 35, 0.64);

  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
  overflow: hidden;
}
#helpModal .help-body{
  padding: 18px 16px 14px;
  color: rgba(255,255,255,.92);
}
#helpModal h2, #helpModal h3{
  margin: 0 0 6px 0;
}
#helpModal .help-subtitle{
  margin: 0 0 14px 0;
  color: rgba(255,255,255,.70);
  font-weight: 650;
}
#helpModal .help-step{
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  padding: 14px 14px;
  margin-bottom: 12px;
}
#helpModal .help-step .nr{
  width: 30px; height: 30px;
  border-radius: 999px;
  background: rgba(255,255,255,0.20);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  margin-right: 10px;
}
#helpModal .help-step .title{
  font-weight: 900;
  margin: 0 0 4px 0;
}
#helpModal .help-step .desc{
  margin: 0;
  color: rgba(255,255,255,.82);
  line-height: 1.25;
}
#helpModal .help-actions{
  display:flex;
  gap: 12px;
  padding: 0 16px 16px;
}
#helpModal .help-actions .primary{
  flex:1;
  border:none;
  border-radius: 16px;
  height: 48px;
  background: var(--yellow);
  color: var(--purple-dark);
  font-weight: 950;
}
#helpModal .modal-close{
  position: absolute;
  top: 12px;
  right: 12px;
  width: 54px;
  height: 54px;
  background: rgba(255,255,255,0.18);
}

/* ===== v18 fix: Uitleg modal breedte/centrering (iOS) ===== */
#helpModal .modal-card{
  width: calc(100% - 24px);
  max-width: 560px;
}

/* Zorg dat sluitknoppen altijd klikbaar blijven */
#helpModal .modal-close-btn,
#helpModal .help-close-x{
  z-index: 5;
}

/* --- v19: force help modal to be centered full-width (avoid right-half layout) --- */
.help-modal{
  padding-left: 0 !important;
  padding-right: 0 !important;
  justify-content: center !important;
  align-items: center !important;
}
.help-modal .help-card{
  width: min(560px, calc(100% - 24px)) !important;
  max-width: 560px !important;
  margin: 0 auto !important;
}
/* --- v19: ensure help modal stacks above backdrop correctly --- */
.help-modal{ position: fixed !important; inset: 0 !important; z-index: 2000 !important; }
.help-modal .modal-backdrop{ position: fixed !important; inset: 0 !important; z-index: 2000 !important; }
.help-modal .help-card{ position: relative !important; z-index: 2001 !important; }

/* === Hotfix: help modal must render above header + popup menu (v20) === */
#helpBackdrop.open{ z-index: 49998 !important; }
#helpModal.modal.open{
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 49999 !important;
}
#helpModal .modal-card{ z-index: 50000 !important; }
/* === v23: stable layering & spacing === */
:root{ --headerH:70px; }

/* Header must not cover content */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--headerH);
}

/* Popup menu layering: overlay under menu buttons */
.popup-overlay{ z-index: 9999; }
.popup-menu{ z-index: 10000; }
.popup-menu .menu-item{ opacity: 1; pointer-events: auto; }
.popup-menu .menu-item button,
.popup-menu .menu-item a{ pointer-events: auto; }

/* =====================================================
   Help modal: compact + intuitive (v24+)
   ===================================================== */
.help-steps.compact{ display:flex; flex-direction:column; gap: 12px; }
.help-steps.compact .help-step{ display:block; }

/* v26: help cards without the empty left column */
.help-step-card{
  position: relative;
  padding: 14px 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 14px 28px rgba(0,0,0,.22);
}
.help-head{ display:flex; align-items:center; gap: 10px; margin-bottom: 10px; }
.help-badge{
  width: 34px; height: 34px; border-radius: 999px;
  display:grid; place-items:center;
  background: rgba(255, 205, 70, 0.22);
  border: 1px solid rgba(255, 205, 70, 0.35);
  color: #fff; font-weight: 900;
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
  flex: 0 0 34px;
}
.help-title{ font-weight: 900; color: rgba(255,255,255,.96); }
.help-sub{ font-size: 13px; color: rgba(255,255,255,.82); margin-top: 2px; }
.help-dot{
  width:34px; height:34px; flex:0 0 34px; border-radius:999px;
  background: rgba(255, 205, 70, 0.22);
  border: 1px solid rgba(255, 205, 70, 0.35);
  display:grid; place-items:center;
  color: #fff; font-weight: 900;
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
}
.help-text{ color: rgba(255,255,255,0.92); line-height: 1.25; }
.help-sample{ margin-top: 10px; }
.help-pill{
  position: relative;
  height: 44px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,205,70,.92), rgba(255,175,0,.92));
  box-shadow: 0 14px 28px rgba(0,0,0,.25);
  overflow: hidden;
  display:flex; align-items:center; justify-content:center;
  color: #3b0f57;
  font-weight: 900;
  letter-spacing: .2px;
}
.help-pill::before{
  content:"";
  position:absolute; inset:0;
  background:
    linear-gradient(90deg,
      rgba(59,15,87,.25) 0%,
      rgba(59,15,87,.25) 25%,
      rgba(59,15,87,0) 25%,
      rgba(59,15,87,0) 100%);
  mix-blend-mode: multiply;
  pointer-events:none;
}
.help-pill-left, .help-pill-right{
  position:absolute; top:50%; transform: translateY(-50%);
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.35);
  border: 1px solid rgba(255,255,255,.35);
  color: #3b0f57;
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
}
.help-pill-left{ left: 10px; }
.help-pill-right{ right: 10px; }
.help-pill-label{ position:relative; z-index:1; }
.help-hint{ margin-top: 8px; font-size: 12px; opacity: .9; }

.help-icons{
  display:flex; gap: 10px; flex-wrap: wrap;
  margin-top: 10px;
}
.help-icon{
  height: 34px; padding: 0 12px;
  border-radius: 999px;
  display:flex; align-items:center; gap: 8px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 10px 22px rgba(0,0,0,.22);
  color: rgba(255,255,255,.92);
}
.help-icon span:first-child{ font-size: 16px; }


/* Help modal: mini header-like buttons */
.help-mini-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:28px;
  height:28px;
  border-radius:50%;
  background: var(--yellow, #f6c400);
  box-shadow: 0 6px 18px rgba(0,0,0,.22);
  vertical-align: middle;
  margin: 0 4px;
}
.help-mini-icon{
  font-weight: 900;
  color: var(--purple, #4b165e);
  font-size: 16px;
  line-height: 1;
}


/* Settings drink grid */
.settings-hint{
  font-size: 14px;
  opacity: .9;
  margin: 10px 4px 12px;
  line-height: 1.25;
}
.settings-tiles{
  width:100%;
  max-width:520px;
  margin:10px auto 0;
  padding:0 2px;
}

.settings-maint-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.settings-maint-grid .primary-btn{
  width:100%;
}
.tile.inactive{
  background: rgba(255,255,255,0.14);
  border: 2px solid rgba(255,255,255,0.28);
  box-shadow: none;
}
.tile.inactive .tile-label{
  color: rgba(255,255,255,0.92);
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}
.trash-bubble{
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.9);
  border: 3px solid rgba(255,255,255,0.25);
  font-size: 18px;
  line-height: 1;
}
.trash-bubble:active{
  transform: scale(0.96);
}

/* In the settings list the trash icon should look like an iOS notification badge */
.settings-item .settings-trash{
  left:auto;
  top:6px;
  right:8px;
  transform:none;
  width:22px;
  height:22px;
  border-radius:999px;
  background:#ff3b30; /* iOS red */
  color:#ffffff;
  border:2px solid rgba(255,255,255,0.70);
  box-shadow:0 6px 14px rgba(0,0,0,0.28);
  font-size:12px;
  z-index:3;
}
.settings-item .settings-trash:active{
  transform: scale(0.96);
}

/* Drink buttons: slightly more compact + a bit bigger text so more fits on screen */
.drink-btn{
  padding:12px 14px;
  min-height:58px;
  font-size:27px;
}
@media (max-width:420px){
  .drink-btn{min-height:56px;font-size:25px;}
}

/* Version badge */
.version-badge{display:inline-block;margin-top:4px;padding:2px 8px;border-radius:999px;background:rgba(255,255,255,0.18);color:#fff;font-weight:800;font-size:11px;letter-spacing:0.5px;}


/* Share modal centering */
#shareModal .modal-card{align-items:center;text-align:center;}
#shareModal .modal-content{align-items:center;text-align:center;}



/* === v10.10.51 micro-polish === */

/* Slightly smaller drink name in settings */
.settings-item .drink-name{
  font-size:15px;
  line-height:1.25;
}

/* Lighter, smaller hint text */
.settings-hint{
  font-size:12px;
  opacity:0.72;
}

/* More air left of toggle */
.settings-item .toggle{
  margin-left:10px;
}

/* Subtle iOS-like toggle animation */
.toggle-ui{
  transition: background-color 140ms ease-out, border-color 140ms ease-out;
}
.toggle-ui::after{
  transition: transform 140ms ease-out;
  will-change: transform;
}

/* === v10.10.58 HEADER: revert to v51 layout (stable) === */
/* === HEADERFIX3: vink helemaal rechts === */
.hdr-grid3{min-height:72px;
  display:grid;
  grid-template-columns: 56px 1fr 132px;
  align-items:center;
  width:100%;
}

.hdr-left3{
  display:flex;
  align-items:center;
  justify-content:center;
}

.hdr-center3{
  display:flex;
  align-items:center;
  justify-content:center;
}

.hdr-right3{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:12px;
}

/* tiny nudge so the top-right overview button doesn't hug the screen edge */
.hdr-right3 #btnOverview{
  margin-right:4px;
}

.hdr-spacer{
  flex:1;
}

#menuBtn, #btnOverview, #btnReset{
  width:44px;
  height:44px;
}

#btnMenu{width:44px;height:44px;}




/* Safety: never hide or shrink overview button */
#btnOverview{display:inline-flex;visibility:visible;opacity:1;flex:0 0 auto;}
#btnReset{flex:0 0 auto;}
.hdr-right3 .hdr-spacer{display:block;}


/* === v10.10.59 overview icon centering === */
#btnOverview{
  display:flex;
  align-items:center;
  justify-content:center;
}
#btnOverview *{
  line-height:1;
}


/* Settings: row with toggle */
.settings-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  margin-top: 10px;
}
.settings-row-left{display:flex;flex-direction:column;gap:2px;}
.settings-row-title{font-weight:800;}
.settings-row-hint{opacity:0.72;font-size:12px;}


/* === v10.10.61 Apple-ish Glass theme (stronger, clearly visible) === */
:root{
  --glass-blur-strong: 22px;
  --glass-blur-soft: 14px;
  --glass-bg-strong: rgba(255,255,255,0.18);
  --glass-bg-soft: rgba(255,255,255,0.12);
  --glass-stroke: rgba(255,255,255,0.28);
  --glass-stroke-soft: rgba(255,255,255,0.18);
  --glass-shadow-strong: 0 18px 55px rgba(0,0,0,0.35);
  --glass-shadow-soft: 0 10px 26px rgba(0,0,0,0.22);
  --glass-highlight: rgba(255,255,255,0.24);
  --glass-highlight-2: rgba(255,255,255,0.10);
  --glass-text: rgba(255,255,255,0.92);
  --glass-text-dim: rgba(255,255,255,0.70);
}

/* Background: richer gradient + subtle light blobs + grain */
body.theme-glass{
  color: var(--glass-text);
}
body.theme-glass .app{
  background:
    radial-gradient(900px 520px at 18% -10%, rgba(255,255,255,0.18), transparent 60%),
    radial-gradient(820px 520px at 95% 18%, rgba(255,255,255,0.14), transparent 65%),
    radial-gradient(700px 420px at 30% 95%, rgba(255,255,255,0.10), transparent 60%),
    linear-gradient(160deg, #240028 0%, #4a0d52 40%, #1a0a24 100%);
  position: relative;
}
/* Grain overlay (cheap but effective) */
body.theme-glass .app::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.025), rgba(255,255,255,0.025) 1px, transparent 1px, transparent 3px),
    repeating-linear-gradient(90deg, rgba(0,0,0,0.02), rgba(0,0,0,0.02) 1px, transparent 1px, transparent 4px);
  opacity:0.35;
  mix-blend-mode: overlay;
}

/* Header: floating glass capsule */
body.theme-glass .topbar{ background: transparent; }
body.theme-glass .hdr-grid3{
  background: linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0.10));
  border: 1px solid var(--glass-stroke);

  box-shadow: var(--glass-shadow-strong);
  border-radius: 22px;
  margin: 12px 12px 0 12px;
}
body.theme-glass .brand-title{ color: rgba(255,255,255,0.95); }
body.theme-glass .brand-subtitle{ color: rgba(255,255,255,0.85); }
body.theme-glass .version-badge{
  background: rgba(255,255,255,0.22);
  border: 1px solid rgba(255,255,255,0.18);
}

/* Icon buttons: slightly glassy with inner highlight */
body.theme-glass .icon-btn{
  background: radial-gradient(circle at 30% 25%, rgba(255,255,255,0.26), rgba(255,255,255,0.06) 55%, rgba(0,0,0,0.05));
  box-shadow: 0 10px 22px rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.16);
}
body.theme-glass .icon-btn:active{ transform: scale(0.985); }

/* Add row: frosted input + button gets a glossy top */
body.theme-glass .add-row .input{
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.18);

  box-shadow: var(--glass-shadow-soft);
}
body.theme-glass .btn-primary{
  position: relative;
  box-shadow: 0 12px 26px rgba(0,0,0,0.26);
}
body.theme-glass .btn-primary::before{
  content:"";
  position:absolute;
  inset:2px 2px auto 2px;
  height:45%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.22), transparent);
  pointer-events:none;
  opacity:0.9;
}

/* Drink buttons: glassy yellow pills with highlight + depth */
body.theme-glass .drink-btn{
  position: relative;
  background: linear-gradient(180deg, rgba(255,213,79,0.98), rgba(255,193,7,0.92));
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow: 0 18px 40px rgba(0,0,0,0.30);
}
body.theme-glass .drink-btn::before{
  content:"";
  position:absolute;
  inset:3px 3px auto 3px;
  height:44%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.28), rgba(255,255,255,0.08) 70%, transparent);
  pointer-events:none;
}
body.theme-glass .drink-btn::after{
  content:"";
  position:absolute;
  inset:auto 0 0 0;
  height:45%;
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.08));
  pointer-events:none;
}
body.theme-glass .drink-btn:active{
  transform: translateY(1px) scale(0.985);
  box-shadow: 0 10px 24px rgba(0,0,0,0.26);
}

/* Summary cards/list and settings sections get glass cards */
body.theme-glass .summary-list .summary-item,
body.theme-glass .settings-section,
body.theme-glass .modal-card{
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.18);

  box-shadow: var(--glass-shadow-soft);
}
body.theme-glass .settings-h,
body.theme-glass .settings-label{ color: var(--glass-text); }
body.theme-glass .settings-sub,
body.theme-glass .settings-hint{ color: var(--glass-text-dim); opacity:1; }

/* Settings tiles: a bit more translucent */
body.theme-glass .tile{
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.16);
}
body.theme-glass .tile.inactive{
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
}

/* Make the glass header spacing not push content too far */
body.theme-glass .main-under-header{ padding-top: 8px; }



/* === v10.10.62 tone-down: solid actions, glass only for chrome === */
body.theme-glass .drink-btn{
  background: #f4c430;
  box-shadow: 0 10px 22px rgba(0,0,0,0.28);
}
body.theme-glass .drink-btn::before,
body.theme-glass .drink-btn::after{
  display:none;
}

body.theme-glass .add-row .input{
  background: #ffffff;
  color:#3a003d;
  border: 1px solid rgba(0,0,0,0.12);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  
}

/* Calm background */
body.theme-glass .app{
  background:
    radial-gradient(800px 500px at 20% -10%, rgba(255,255,255,0.10), transparent 60%),
    linear-gradient(160deg, #2a0030 0%, #4b0f53 45%, #200024 100%);
}
body.theme-glass .app::before{ opacity:0.18; }


/* Patch: improve Settings contrast on iOS */
#settingsModal .modal-backdrop{ background: rgba(0,0,0,0.72); }
#settingsModal .modal-card{ background: rgba(25,14,45,0.94); box-shadow: 0 18px 60px rgba(0,0,0,0.55); }
#settingsModal .settings-item{ background: rgba(0,0,0,0.28); box-shadow: inset 0 0 0 2px rgba(255,255,255,0.14); }
#settingsModal .settings-note{ color: rgba(255,255,255,0.82); }
