/* ==========================================================================
   USM Spezi – Paulaner-Spezi-Label design system
   Wave palette extracted from the label:
   yellow #F5B800 · orange #EE6F04 · red #E10414 · magenta #E5007F
   purple #49277E · navy #052A5E (PAULANER wordmark) · cream #FFFDF5
   ========================================================================== */

:root {
  --yellow: #f5b800;
  --yellow-light: #ffd75e;
  --orange: #ee6f04;
  --red: #e10414;
  --red-dark: #b00310;
  --magenta: #e5007f;
  --purple: #49277e;
  --navy: #052a5e;
  --navy-soft: #0a2e5e;
  --cream: #fffdf5;
  --cream-dim: #f1e8d4;
  --ink: #14213d;
  --ink-soft: #55618a;
  --green: #2f9e57;
  --green-bg: #e0f3e6;
  --radius: 18px;
  --hard: 0 5px 0 rgba(5, 42, 94, 0.35);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  color: var(--cream);
  background: linear-gradient(180deg,
    #f5b800 0%,
    #f3a600 14%,
    #ee6f04 34%,
    #e10414 56%,
    #e5007f 78%,
    #7a2f96 92%,
    #49277e 100%);
  background-attachment: fixed;
  line-height: 1.45;
}

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 18px 16px 56px;
}

a { color: var(--red); }
.on-light a { color: var(--red-dark); }

/* ------------------------------- header ---------------------------------- */

.topbar {
  position: relative;
  overflow: hidden;
  border: 3px solid var(--navy);
  border-radius: var(--radius);
  background:
    radial-gradient(340px 170px at 85% 0%, rgba(255, 255, 255, 0.35), transparent 70%),
    linear-gradient(160deg, #ffd75e 0%, #f5b800 48%, #ee6f04 100%);
  padding: 26px 20px 22px;
  box-shadow: var(--hard);
  margin-bottom: 18px;
}

.topbar .stripes {
  position: absolute;
  inset: auto 0 0 0;
  height: 9px;
  background: repeating-linear-gradient(-45deg,
    #e10414 0 16px, #e5007f 16px 32px, #49277e 32px 48px);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.brand h1 {
  margin: 0;
  font-size: clamp(1.9rem, 8.5vw, 2.8rem);
  font-weight: 900;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.brand h1 .s {
  display: inline-block;
  background: linear-gradient(180deg, #f01423, #e10414 55%, #b00310);
  color: #fff;
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  padding: 0 16px 2px;
  border-radius: 16px;
  border: 3px solid var(--navy);
  transform: rotate(-2deg);
  box-shadow: 0 4px 0 rgba(5, 42, 94, 0.4);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
}

.brand .fridge { font-size: 1.6rem; filter: drop-shadow(0 2px 0 rgba(5, 42, 94, 0.35)); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 999px;
  border: 2px solid var(--navy);
  background: var(--cream);
  color: var(--navy);
}

.chip.navy { background: var(--navy); color: var(--yellow); }
.chip.magenta { background: var(--magenta); color: #fff; }

/* CO2 bubbles (label style: white + purple) */
.bubbles span {
  position: absolute;
  bottom: -18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.25));
  border: 1px solid rgba(255, 255, 255, 0.5);
  animation: rise 7s linear infinite;
  pointer-events: none;
}
.bubbles span:nth-child(3), .bubbles span:nth-child(5) {
  background: radial-gradient(circle at 35% 30%, rgba(255, 215, 94, 0.85), rgba(229, 0, 127, 0.25));
  border-color: rgba(229, 0, 127, 0.4);
}
.bubbles span:nth-child(1) { left: 12%; width: 10px; height: 10px; animation-delay: 0s; }
.bubbles span:nth-child(2) { left: 26%; width: 6px; height: 6px; animation-delay: 1.8s; }
.bubbles span:nth-child(3) { left: 44%; width: 14px; height: 14px; animation-delay: 3.4s; opacity: .8; }
.bubbles span:nth-child(4) { left: 61%; width: 7px; height: 7px; animation-delay: 0.9s; }
.bubbles span:nth-child(5) { left: 73%; width: 11px; height: 11px; animation-delay: 2.6s; }
.bubbles span:nth-child(6) { left: 88%; width: 8px; height: 8px; animation-delay: 4.7s; }
@keyframes rise {
  0%   { transform: translateY(0); opacity: 0; }
  12%  { opacity: 0.9; }
  100% { transform: translateY(-170px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .bubbles span { animation: none; display: none; }
}

/* ------------------------------- cards ----------------------------------- */

.card {
  background: var(--cream);
  color: var(--ink);
  border: 3px solid var(--navy);
  border-radius: var(--radius);
  box-shadow: var(--hard);
  padding: 18px 16px;
  margin-bottom: 18px;
}

.card h2 {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card h2 .count {
  margin-left: auto;
  font-size: 0.8rem;
  font-weight: 800;
  background: var(--yellow);
  border: 2px solid var(--navy);
  border-radius: 999px;
  padding: 2px 10px;
  color: var(--navy);
}

/* ------------------------------ flash / toast ----------------------------- */

.flash {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 3px solid var(--navy);
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 700;
  margin-bottom: 16px;
  box-shadow: var(--hard);
  font-size: 0.95rem;
}
.flash.ok { background: var(--green-bg); color: #14532d; }
.flash.err { background: #ffe1e1; color: #7f1d1d; }
.flash.info { background: var(--yellow-light); color: var(--navy); }
.flash .ficon { font-size: 1.4rem; }

/* ------------------------------- buttons --------------------------------- */

.btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 17px 20px;
  font-size: 1.2rem;
  font-weight: 900;
  font-family: inherit;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(180deg, #f01423, var(--red) 55%, var(--red-dark));
  border: 3px solid var(--navy);
  border-radius: 999px;
  box-shadow: var(--hard);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.06s ease, box-shadow 0.06s ease;
}
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 rgba(5, 42, 94, 0.4); }
.btn.lemon {
  background: linear-gradient(180deg, #ffd75e, var(--yellow) 60%, #d99e00);
  color: var(--navy);
}
.btn.navy {
  background: linear-gradient(180deg, #1b4489, var(--navy) 60%, #041f45);
  color: #fff;
}
.btn.green {
  background: linear-gradient(180deg, #43b56a, var(--green) 60%, #237a42);
}
.btn.small { padding: 10px 16px; font-size: 0.95rem; width: auto; display: inline-block; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
/* Button-Text schlägt die Link-Farbregel (.on-light a) – war rot-auf-rot unreadbar */
a.btn, button.btn { color: #fff; }
a.btn.lemon, button.btn.lemon { color: var(--navy); }

.btnrow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btnrow .btn { width: 100%; }

/* ---------------------------- forms / inputs ------------------------------ */

input[type="text"], input[type="number"], input[type="date"], input[type="password"], select, textarea {
  width: 100%;
  padding: 13px 14px;
  font-size: 1.05rem;
  font-family: inherit;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  border: 3px solid var(--navy);
  border-radius: 14px;
  box-shadow: inset 0 3px 6px rgba(5, 42, 94, 0.08);
}
input:focus, select:focus { outline: 3px solid var(--yellow); outline-offset: 1px; }

label.field {
  display: block;
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  margin: 14px 0 6px;
}

.hint { font-size: 0.85rem; color: var(--ink-soft); margin-top: 8px; }

/* -------------------------------- index ----------------------------------- */

.stock-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 2px dashed rgba(5, 42, 94, 0.18);
}
.stock-row:last-child { border-bottom: 0; }

.stock-row .emoji {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  font-size: 1.6rem;
  background: #fff;
  border: 2px solid var(--navy);
  border-radius: 12px;
}

.stock-row .name { font-weight: 800; font-size: 1rem; }
.stock-row .meta { font-size: 0.78rem; color: var(--ink-soft); font-weight: 600; }

.stock-num {
  font-size: 1.5rem;
  font-weight: 900;
  min-width: 52px;
  text-align: right;
  color: var(--navy);
}
.stock-num small { display: block; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; color: var(--ink-soft); }

.bar {
  grid-column: 1 / -1;
  height: 10px;
  border-radius: 999px;
  background: var(--cream-dim);
  border: 1.5px solid rgba(5, 42, 94, 0.25);
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 999px;
  padding: 2px 9px;
  border: 2px solid var(--navy);
  margin-left: 8px;
  vertical-align: 1px;
}
.badge.out { background: var(--magenta); color: #fff; }
.badge.low { background: var(--yellow); color: var(--navy); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.08); } }

/* rankings (Beliebtheit + Bewertungen) */
.rank-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 600px) { .rank-grid { grid-template-columns: 1fr 1fr; } }

.rank-list h3 {
  margin: 0 0 8px;
  font-size: 0.9rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--navy);
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 2px dashed rgba(5, 42, 94, 0.15);
  font-weight: 800;
}
.rank-row:last-child { border-bottom: 0; }
.rank-row .medal { font-size: 1.3rem; width: 26px; text-align: center; }
.rank-row .pos {
  font-size: 0.75rem;
  font-weight: 900;
  color: var(--ink-soft);
  width: 22px; text-align: center;
}
.rank-row .r-name { flex: 1; font-size: 0.92rem; line-height: 1.2; }
.rank-row .r-val { font-size: 0.95rem; font-weight: 900; color: var(--red-dark); white-space: nowrap; }
.rank-row .r-sub { font-size: 0.72rem; color: var(--ink-soft); font-weight: 700; }
.rank-empty { font-size: 0.85rem; color: var(--ink-soft); font-weight: 600; padding: 6px 2px; }

.debt-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 10px 0;
  border-bottom: 2px dashed rgba(5, 42, 94, 0.18);
  font-weight: 700;
}
.debt-row:last-child { border-bottom: 0; }
.debt-row .who { font-size: 1rem; }
.debt-row .amt { font-size: 1.05rem; font-weight: 900; text-align: right; }
.debt-row .amt.open { color: var(--red-dark); }
.debt-row .amt.clear { color: var(--green); }
.debt-row .sub { grid-column: 1 / -1; font-size: 0.78rem; color: var(--ink-soft); font-weight: 600; }

.total-open {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  background: #fff;
  border: 2px solid var(--navy);
  border-radius: 12px;
  padding: 10px 14px;
  margin-top: 12px;
  font-weight: 900;
  color: var(--navy);
}
.total-open b { font-size: 1.25rem; color: var(--red-dark); }

/* ------------------------------- phone home ------------------------------- */

.hero { text-align: center; padding: 6px 0 2px; }
.hero h2 {
  margin: 6px 0 2px;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--navy);
}
.hero p { margin: 0; color: var(--ink-soft); font-weight: 700; }

.debt-chip {
  margin: 16px auto 2px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border: 2px solid var(--navy);
  border-radius: 999px;
  padding: 7px 16px;
  font-weight: 800;
  font-size: 0.9rem;
  background: var(--yellow-light);
  color: var(--navy);
}
.debt-chip.open { background: #ffd7d7; color: #7f1d1d; }

.menu { display: grid; gap: 14px; margin-top: 22px; }
.menu .btn { font-size: 1.35rem; padding: 22px; }
.menu .btn .micon { margin-right: 10px; font-size: 1.5rem; }

.foot {
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 253, 245, 0.75);
  margin-top: 26px;
}
.foot a { color: var(--yellow-light); text-decoration: none; font-weight: 700; }

/* ---------------------------- take a drink grid --------------------------- */

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

.tile {
  position: relative;
  display: block;
  background: #fff;
  border: 3px solid var(--navy);
  border-radius: 16px;
  box-shadow: 0 4px 0 rgba(5, 42, 94, 0.35);
  padding: 14px 12px 12px;
  text-decoration: none;
  color: var(--ink);
  overflow: hidden;
  transition: transform 0.06s ease;
}
.tile:active { transform: translateY(3px); }
.tile::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 7px;
  background: var(--tile, var(--yellow));
}
.tile .t-emoji { font-size: 2.1rem; display: block; margin-top: 4px; }
.tile .t-name { font-weight: 900; font-size: 0.95rem; margin-top: 6px; line-height: 1.2; color: var(--navy); }
.tile .t-stock { font-size: 0.75rem; font-weight: 800; color: var(--ink-soft); margin-top: 4px; }
.tile .t-price {
  position: absolute;
  top: 14px; right: 10px;
  font-size: 0.75rem;
  font-weight: 900;
  background: var(--yellow);
  color: var(--navy);
  border: 2px solid var(--navy);
  border-radius: 999px;
  padding: 1px 8px;
}
.tile.out { pointer-events: none; }
.tile.out .t-emoji { filter: grayscale(1); opacity: 0.5; }
.tile .sold {
  position: absolute;
  inset: auto;
  margin: auto;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  background: var(--magenta);
  color: #fff;
  font-weight: 900;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 5px 12px;
  border: 2px solid var(--navy);
  border-radius: 999px;
}

/* ------------------------------ rating slider ----------------------------- */

.rating-box { text-align: center; padding: 6px 4px; }
.rating-box .big {
  font-size: 3rem;
  font-weight: 900;
  color: var(--red-dark);
  line-height: 1;
}
.rating-box .face { font-size: 2.4rem; display: block; min-height: 2.6rem; }
.rating-box input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--yellow));
  border: 2px solid var(--navy);
  margin: 14px 0 4px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}
.rating-box input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--cream);
  border: 3px solid var(--navy);
  box-shadow: 0 3px 0 rgba(5, 42, 94, 0.4);
  cursor: pointer;
}
.rating-box input[type="range"]::-moz-range-thumb {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--cream);
  border: 3px solid var(--navy);
  box-shadow: 0 3px 0 rgba(5, 42, 94, 0.4);
  cursor: pointer;
}
.rating-scale { display: flex; justify-content: space-between; font-size: 0.7rem; font-weight: 800; color: var(--ink-soft); }

/* --------------------------------- pay page ------------------------------- */

.debt-card { text-align: center; }
.debt-card .amount {
  font-size: 3rem;
  font-weight: 900;
  color: var(--red-dark);
  line-height: 1.1;
}
.debt-card .amount.clear { color: var(--green); }
.debt-card .label { font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.8rem; color: var(--ink-soft); }

.debt-lines { text-align: left; margin: 16px 0; }
.debt-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 2px;
  border-bottom: 2px dashed rgba(5, 42, 94, 0.18);
  font-weight: 700;
}
.debt-line:last-child { border-bottom: 0; }

.pay-note {
  background: var(--yellow-light);
  border: 2px solid var(--navy);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 14px;
  color: var(--navy);
}

/* --------------------------------- onboarding ----------------------------- */

.onb h2 { margin-top: 0; font-size: 1.4rem; font-weight: 900; }
.or-divider {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink-soft); font-weight: 800; font-size: 0.8rem; text-transform: uppercase;
  margin: 18px 0;
}
.or-divider::before, .or-divider::after {
  content: ""; flex: 1; height: 2px; background: rgba(5, 42, 94, 0.2);
}

/* ----------------------------------- QR ----------------------------------- */

.qr-card { text-align: center; }
.qr-card img {
  width: 78%;
  max-width: 340px;
  border-radius: 16px;
  border: 3px solid var(--navy);
  box-shadow: var(--hard);
}
.qr-url {
  display: inline-block;
  margin-top: 12px;
  font-weight: 800;
  background: #fff;
  border: 2px dashed var(--navy);
  border-radius: 10px;
  padding: 8px 14px;
  word-break: break-all;
  color: var(--navy);
}

/* --------------------------------- admin ---------------------------------- */

.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th {
  text-align: left;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  padding: 6px 4px;
}
.table td { padding: 7px 4px; border-bottom: 2px dashed rgba(5, 42, 94, 0.15); font-weight: 700; }
.table input { padding: 8px 10px; font-size: 0.95rem; width: 84px; }

.or {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink-soft); font-weight: 800; font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.05em; margin: 22px 0 14px;
}
.or::before, .or::after { content: ""; flex: 1; height: 2px; background: rgba(5, 42, 94, 0.2); }

.add-grid {
  display: grid; gap: 12px; grid-template-columns: 1fr 1fr;
}
.add-grid input[type="color"] { width: 100%; height: 44px; padding: 3px; cursor: pointer; }

.linkbtn {
  background: none; border: none; cursor: pointer; font: inherit;
  font-size: 0.8rem; font-weight: 800; color: var(--navy);
  text-decoration: underline; text-underline-offset: 2px; padding: 0;
}
.linkbtn.danger { color: var(--red-dark); }
.table td button {
  background: none; border: none; cursor: pointer; font-size: 1.05rem;
  padding: 4px; border-radius: 8px;
}
.table td button:hover { background: rgba(5, 42, 94, 0.1); }

.act {
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 2px dashed rgba(5, 42, 94, 0.15);
  font-size: 0.88rem;
  font-weight: 700;
}
.act:last-child { border-bottom: 0; }
.act .when { margin-left: auto; color: var(--ink-soft); font-size: 0.75rem; white-space: nowrap; }
.act .kind-entnahme { color: var(--red-dark); }
.act .kind-zahlung { color: var(--green); }

/* ------------------------------- footer / misc ----------------------------- */

.muted { color: var(--ink-soft); font-weight: 600; font-size: 0.85rem; }
.muted.on-dark { color: rgba(255, 253, 245, 0.75); }
.center { text-align: center; }
.mt { margin-top: 16px; }

@media (min-width: 700px) {
  .wrap { max-width: 640px; }
  .grid { grid-template-columns: 1fr 1fr 1fr; }
}

@media print {
  body { background: #fff; }
  .no-print { display: none !important; }
  .wrap { max-width: 100%; }
  .qr-card { box-shadow: none; }
}

/* ---------- full-page rising bubbles (over the whole background) ---------- */
.bubbles-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.bubbles-bg i {
  position: absolute;
  bottom: -80px;
  left: var(--x, 50%);
  width: var(--s, 14px);
  height: var(--s, 14px);
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, rgba(255,255,255,.65), rgba(255,255,255,.12) 55%, rgba(255,255,255,0) 72%);
  border: 1px solid rgba(255,255,255,.28);
  opacity: 0;
  animation: rise var(--d, 11s) linear infinite;
  animation-delay: var(--dl, 0s);
}
.bubbles-bg i:nth-child(1)  { --x: 6%;  --s: 10px; --d: 9s;   --dl: 0s; }
.bubbles-bg i:nth-child(2)  { --x: 15%; --s: 18px; --d: 13s;  --dl: 2.2s; }
.bubbles-bg i:nth-child(3)  { --x: 24%; --s: 8px;  --d: 8s;   --dl: 4.1s; }
.bubbles-bg i:nth-child(4)  { --x: 33%; --s: 22px; --d: 15s;  --dl: 1.2s; }
.bubbles-bg i:nth-child(5)  { --x: 42%; --s: 12px; --d: 10s;  --dl: 5.6s; }
.bubbles-bg i:nth-child(6)  { --x: 51%; --s: 9px;  --d: 8.5s; --dl: 3.3s; }
.bubbles-bg i:nth-child(7)  { --x: 60%; --s: 20px; --d: 14s;  --dl: 0.7s; }
.bubbles-bg i:nth-child(8)  { --x: 69%; --s: 11px; --d: 9.5s; --dl: 6.4s; }
.bubbles-bg i:nth-child(9)  { --x: 78%; --s: 16px; --d: 12s;  --dl: 2.9s; }
.bubbles-bg i:nth-child(10) { --x: 86%; --s: 9px;  --d: 8s;   --dl: 4.8s; }
.bubbles-bg i:nth-child(11) { --x: 93%; --s: 14px; --d: 11s;  --dl: 1.9s; }
.bubbles-bg i:nth-child(12) { --x: 10%; --s: 6px;  --d: 7.5s; --dl: 6.9s; }
.bubbles-bg i:nth-child(13) { --x: 47%; --s: 6px;  --d: 7s;   --dl: 7.7s; }
.bubbles-bg i:nth-child(14) { --x: 90%; --s: 24px; --d: 16s;  --dl: 3.8s; }
@keyframes rise {
  0%   { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
  6%   { opacity: .55; }
  50%  { transform: translateY(-55vh) translateX(14px) scale(1.04); }
  90%  { opacity: .45; }
  100% { transform: translateY(-112vh) translateX(-10px) scale(1.12); opacity: 0; }
}
.wrap { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) {
  .bubbles-bg i { animation: none; opacity: .12; bottom: 8%; }
}

/* ---------- subtle language switch chip ---------- */
.chip.langchip {
  background: rgba(255,255,255,.35);
  color: var(--navy);
  border: 1.5px dashed rgba(5,42,94,.45);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .08em;
  padding: 5px 9px;
  text-decoration: none;
  cursor: pointer;
}
.chip.langchip:hover { background: rgba(255,255,255,.55); }

/* ---------- brand links to index ---------- */
.topbar h1 a { color: inherit; text-decoration: none; }
.topbar h1 a:hover { text-decoration: underline; }

/* ---------- stacked ZWJ emoji: front one overlaps w/ white outline ---------- */
.em { display: inline-block; line-height: 1; }
.em-over {
  margin-left: -0.42em;
  text-shadow: -2px 0 0 #fffdf5, 2px 0 0 #fffdf5, 0 -2px 0 #fffdf5, 0 2px 0 #fffdf5,
               -1.6px -1.6px 0 #fffdf5, 1.6px 1.6px 0 #fffdf5, -1.6px 1.6px 0 #fffdf5, 1.6px -1.6px 0 #fffdf5;
}
