:root {
  color-scheme: light;
  --blue: #005ca9;
  --blue-2: #004f93;
  --blue-soft: #e7f1fb;
  --lime: #a8ec18;
  --ink: #102033;
  --muted: #687589;
  --line: rgba(0, 92, 169, 0.18);
  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.9);
  --white: #ffffff;
  --paper: #f7fbff;
  --ok: #168a5a;
  --wait: #b86a12;
  --soft-radius: 24px;
  --tile-radius: 28px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(130deg, rgba(0, 92, 169, 0.98) 0%, rgba(0, 92, 169, 0.88) 30%, rgba(247, 251, 255, 0.96) 30.2%, rgba(247, 251, 255, 1) 100%),
    var(--paper);
}

body::before,
body::after {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  content: "";
  opacity: 0.1;
  image-rendering: pixelated;
  background-repeat: no-repeat;
  background-size: contain;
}

body::before {
  right: -26px;
  top: 132px;
  width: 150px;
  height: 106px;
  background-image: url("/assets/pixel-cassette.png");
  transform: rotate(8deg);
}

body::after {
  left: -18px;
  bottom: 90px;
  width: 112px;
  height: 168px;
  background-image: url("/assets/pixel-cup.png");
  transform: rotate(-7deg);
}

button,
input,
textarea {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 14px max(24px, env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 76px;
  padding: 6px 0 12px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.boot-view {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-height: 56vh;
  align-content: center;
  color: var(--blue);
  text-align: center;
}

.boot-view strong {
  font-size: 20px;
}

.boot-view > span:last-child {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.boot-spinner {
  width: 34px;
  height: 34px;
  border: 4px solid rgba(0, 92, 169, 0.16);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: boot-spin 0.8s linear infinite;
}

@keyframes boot-spin {
  to { transform: rotate(360deg); }
}

.messages-btn {
  position: relative;
  display: grid;
  place-items: center;
}

.mail-glyph {
  font-size: 22px;
  line-height: 1;
}

.messages-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  padding: 0 5px;
  border: 2px solid var(--blue);
  border-radius: 10px;
  background: #a8ec18;
  color: #083b22;
  font-size: 10px;
  font-weight: 950;
}

.brand-lockup {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.brand-logo {
  display: block;
  width: 76px;
  height: 76px;
  object-fit: contain;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 44px rgba(0, 52, 98, 0.2);
}

.eyebrow {
  margin: 0 0 3px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  color: var(--white);
  font-size: 32px;
  line-height: 1.02;
}

h2 {
  margin-bottom: 12px;
  color: var(--blue);
  font-size: 20px;
  line-height: 1.1;
}

.lead-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 2px;
  min-height: 92px;
  margin: 2px 0 14px;
  padding: 16px 112px 16px 16px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: var(--soft-radius);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.58));
  box-shadow: 0 20px 60px rgba(0, 52, 98, 0.18);
  backdrop-filter: blur(18px) saturate(1.25);
}

.lead-card span {
  color: var(--blue);
  font-size: 15px;
  font-weight: 850;
}

.lead-card strong {
  color: var(--ink);
  font-size: 28px;
  line-height: 1.04;
}

.lead-card img {
  position: absolute;
  right: 18px;
  bottom: -16px;
  width: 72px;
  image-rendering: pixelated;
}

.view {
  display: grid;
  gap: 14px;
}

.auth-switch,
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 16px 42px rgba(0, 52, 98, 0.1);
  backdrop-filter: blur(16px) saturate(1.35);
}

.switch-btn,
.tab {
  min-height: 42px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
}

.switch-btn.active,
.tab.active {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 10px 22px rgba(0, 92, 169, 0.24);
}

.panel,
.hero,
.gift,
.respect-link {
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: var(--soft-radius);
  background: var(--glass);
  box-shadow: 0 20px 60px rgba(0, 52, 98, 0.11);
  backdrop-filter: blur(20px) saturate(1.28);
}

.panel {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 18px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.64)),
    linear-gradient(180deg, rgba(0, 92, 169, 0.16), rgba(168, 236, 24, 0.1));
}

.hero::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.45), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent 44%);
}

.hero > * {
  position: relative;
  z-index: 1;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(0, 92, 169, 0.2);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  outline: none;
}

input {
  min-height: 50px;
  padding: 0 14px;
  font-size: 17px;
}

textarea {
  resize: vertical;
  min-height: 128px;
  padding: 12px 14px;
}

input:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0, 92, 169, 0.13);
}

.check {
  grid-template-columns: 22px 1fr;
  align-items: start;
  color: var(--ink);
  font-weight: 650;
}

.check input {
  width: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  accent-color: var(--blue);
}

.inline-link {
  color: var(--blue);
  font-weight: 900;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 92, 169, 0.32);
}

.primary,
.icon-btn,
.tab,
.ghost-btn {
  border: 0;
  cursor: pointer;
}

.primary {
  min-height: 50px;
  border-radius: 18px;
  background: var(--blue);
  color: var(--white);
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(0, 92, 169, 0.22);
}

.primary:active,
.ghost-btn:active,
.switch-btn:active,
.tab:active,
.icon-btn:active {
  transform: translateY(1px);
}

.ghost-btn {
  min-height: 40px;
  border: 1px solid rgba(0, 92, 169, 0.2);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--blue);
  font-weight: 900;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--blue);
  font-size: 21px;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(0, 52, 98, 0.14);
}

.menu-btn {
  display: inline-grid;
  place-content: center;
  gap: 5px;
}

.menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--blue);
}

.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.guest {
  color: var(--muted);
  font-weight: 850;
}

.balance {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 8px 0 18px;
}

.balance strong {
  color: var(--blue);
  font-size: 78px;
  line-height: 0.92;
}

.balance span {
  max-width: 154px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.code-action {
  width: 100%;
}

.code-box {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 16px 14px;
  border: 1px solid rgba(0, 92, 169, 0.16);
  border-radius: var(--soft-radius);
  background: rgba(255, 255, 255, 0.9);
}

body.qr-mode .hero {
  background: linear-gradient(180deg, #ffffff, #f9fcff);
  box-shadow: 0 22px 70px rgba(0, 52, 98, 0.18);
}

body.qr-mode .code-box {
  border-color: rgba(0, 92, 169, 0.28);
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(0, 52, 98, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.9);
}

.code-box span {
  display: block;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.guest-qr {
  display: grid;
  place-items: center;
  width: 236px;
  height: 236px;
  padding: 10px;
  border: 1px solid rgba(0, 92, 169, 0.2);
  border-radius: 22px;
  background: var(--white);
  box-shadow: inset 0 0 0 6px rgba(0, 92, 169, 0.04);
}

body.qr-mode .guest-qr {
  width: min(292px, 100%);
  height: auto;
  aspect-ratio: 1;
  padding: 14px;
  border-color: rgba(0, 92, 169, 0.34);
  box-shadow: 0 0 0 8px #ffffff, 0 16px 36px rgba(0, 52, 98, 0.14);
}

.guest-qr img,
.guest-qr canvas {
  display: block;
  width: 220px;
  height: 220px;
}

body.qr-mode .guest-qr img,
body.qr-mode .guest-qr canvas {
  width: min(264px, calc(100vw - 116px));
  height: min(264px, calc(100vw - 116px));
}

.code-box strong {
  display: block;
  color: var(--ink);
  font-size: 42px;
  line-height: 1;
  text-align: center;
  letter-spacing: 0;
}

.code-box p {
  max-width: 280px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
  text-align: center;
}

.hero-sticker {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  image-rendering: pixelated;
  opacity: 0.12;
}

.hero-sticker-machine {
  right: 20px;
  bottom: 12px;
  width: 82px;
  transform: rotate(-12deg);
}

.call-info {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(0, 92, 169, 0.22);
  border-radius: 20px;
  background: rgba(231, 241, 251, 0.86);
}

.call-info span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.call-info a {
  color: var(--blue);
  font-size: 28px;
  font-weight: 950;
  text-decoration: none;
}

.call-info p {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
}

.call-info.checking {
  border-color: rgba(0, 92, 169, 0.28);
  background: rgba(231, 241, 251, 0.96);
}

.call-info.missing {
  border-color: rgba(184, 106, 18, 0.3);
  background: rgba(255, 247, 234, 0.9);
}

.section {
  padding: 2px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-head h2 {
  margin-bottom: 0;
}

.section-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.gifts-section h2 {
  color: var(--white);
}

.summer-feed .section-head span {
  color: var(--ink);
}

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

.visit-feedback {
  gap: 12px;
}

.visit-feedback > strong {
  color: var(--blue);
  font-size: 18px;
  line-height: 1.12;
}

.visit-chat-btn {
  min-height: 48px;
  border: 1px solid rgba(0, 92, 169, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--blue);
  cursor: pointer;
  font-weight: 950;
  box-shadow: 0 12px 28px rgba(0, 92, 169, 0.1);
}

.level-card {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: var(--soft-radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.58)),
    rgba(255, 255, 255, 0.72);
  box-shadow: 0 20px 60px rgba(0, 52, 98, 0.11);
  backdrop-filter: blur(20px) saturate(1.28);
  cursor: pointer;
}

.level-top {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.level-top span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.level-top strong {
  color: var(--blue);
  font-size: 20px;
  line-height: 1;
  white-space: nowrap;
}

.level-track {
  overflow: hidden;
  height: 14px;
  border: 1px solid rgba(0, 92, 169, 0.12);
  border-radius: 999px;
  background: rgba(0, 92, 169, 0.09);
}

.level-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--lime));
}

.level-card p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.level-detail-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(0, 92, 169, 0.14);
  border-radius: var(--soft-radius);
  background: rgba(255, 255, 255, 0.72);
}

.level-detail-card > strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.14;
}

.level-detail-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.level-detail-row span,
.level-detail-row.muted {
  color: var(--muted);
}

.level-detail-row b {
  color: var(--ink);
  font-size: 18px;
}

.level-timeline {
  display: grid;
  gap: 0;
  padding: 6px 0;
}

.level-step {
  position: relative;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 14px;
  min-height: 74px;
  color: rgba(104, 117, 137, 0.62);
}

.level-step::before {
  position: absolute;
  z-index: 0;
  left: 10px;
  top: 32px;
  bottom: -4px;
  width: 3px;
  border-radius: 999px;
  content: "";
  background: rgba(104, 117, 137, 0.22);
}

.level-step:last-child::before {
  display: none;
}

.level-step > span {
  position: relative;
  z-index: 2;
  width: 23px;
  height: 23px;
  margin-top: 1px;
  border-radius: 50%;
  background: #d2dbe7;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.94);
}

.level-step.active {
  color: var(--ink);
}

.level-step.active::before,
.level-step.active > span {
  background: var(--blue);
}

.level-step.current strong {
  color: var(--blue);
}

.level-step strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
}

.level-step p {
  color: currentColor;
  line-height: 1.34;
}

.summer-feed {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.summer-intro,
.summer-outro {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.42;
}

.summer-intro {
  padding: 0 2px;
}

.drink-feed {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(248px, 82%);
  gap: 12px;
  overflow-x: auto;
  padding: 2px 2px 12px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.drink-feed::-webkit-scrollbar {
  display: none;
}

.drink-card {
  position: relative;
  overflow: hidden;
  scroll-snap-align: start;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: var(--tile-radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.5)),
    rgba(255, 255, 255, 0.62);
  box-shadow: 0 22px 60px rgba(0, 52, 98, 0.15);
  backdrop-filter: blur(20px) saturate(1.28);
}

.drink-card-btn {
  position: relative;
  display: grid;
  align-content: end;
  width: 100%;
  min-height: 318px;
  padding: 14px;
  overflow: hidden;
  border: 0;
  border-radius: var(--tile-radius);
  background: #07111d;
  color: var(--white);
  cursor: pointer;
  text-align: left;
}

.drink-card-btn img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
}

.drink-card-btn::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.02) 20%, rgba(0, 0, 0, 0.62) 100%),
    linear-gradient(120deg, rgba(0, 92, 169, 0.2), transparent 42%);
}

.drink-glow {
  position: absolute;
  right: -48px;
  bottom: -58px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  filter: blur(26px);
  opacity: 0.72;
}

.drink-glow.pink { background: #ff2d9d; }
.drink-glow.gold { background: #f6b434; }
.drink-glow.matcha { background: #a8ec18; }
.drink-glow.cream { background: #ffe0b8; }
.drink-glow.green { background: #79b927; }
.drink-glow.peach { background: #ff7757; }

.drink-title {
  position: relative;
  z-index: 1;
}

.drink-title {
  display: block;
  max-width: 92%;
  color: var(--white);
  font-size: 24px;
  font-weight: 950;
  line-height: 1.08;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.summer-outro {
  align-self: start;
  min-height: 110px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 18px 48px rgba(0, 52, 98, 0.1);
  backdrop-filter: blur(18px) saturate(1.2);
}

.gift {
  display: grid;
  align-content: space-between;
  gap: 10px;
  min-height: 0;
  aspect-ratio: 1;
  padding: 12px;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.gift.ok {
  border-color: rgba(36, 166, 91, 0.42);
  background:
    linear-gradient(145deg, rgba(237, 255, 243, 0.92), rgba(255, 255, 255, 0.68)),
    rgba(237, 255, 243, 0.76);
  box-shadow: 0 18px 54px rgba(36, 166, 91, 0.17);
}

.gift strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.12;
}

.gift.ok strong {
  color: #146737;
}

.gift p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.gift.ok p {
  color: #178143;
}

.gift-cost {
  display: inline-block;
  margin-top: 7px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 950;
}

.gift.ok .gift-cost {
  color: #178143;
}

.gift-bottom {
  display: block;
}

.gift-progress {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 92, 169, 0.12);
}

.gift-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--lime));
}

.gift.ok .gift-progress {
  background: rgba(36, 166, 91, 0.16);
}

.gift.ok .gift-progress-fill {
  background: linear-gradient(90deg, #24a65b, var(--lime));
}

.progress {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.progress-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.progress-track {
  overflow: hidden;
  height: 8px;
  border-radius: 8px;
  background: rgba(0, 92, 169, 0.12);
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--lime));
}

.history-list {
  display: grid;
  gap: 8px;
}

.history-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0, 92, 169, 0.12);
}

.history-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.history-item strong {
  display: block;
}

.history-item small {
  color: var(--muted);
}

.qty {
  color: var(--blue);
  font-weight: 950;
  white-space: nowrap;
}

.qty.minus {
  color: #c74747;
}

.receipt-id {
  color: var(--blue);
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}

.drink-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 14, 28, 0.52);
  backdrop-filter: blur(18px) saturate(1.18);
}

.drink-modal-card {
  overflow: hidden;
  width: min(420px, 100%);
  max-height: min(86vh, 760px);
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: var(--tile-radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.68)),
    rgba(255, 255, 255, 0.78);
  box-shadow: 0 30px 90px rgba(0, 18, 44, 0.32);
}

.drink-modal-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.drink-modal-copy {
  max-height: 38vh;
  overflow: auto;
  padding: 16px;
}

.drink-modal-copy h3 {
  margin-bottom: 10px;
  color: var(--blue);
  font-size: 22px;
  line-height: 1.1;
}

.drink-modal-copy p {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.48;
}

.menu-overlay,
.info-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  padding: 18px;
  background: rgba(2, 14, 28, 0.42);
  backdrop-filter: blur(18px) saturate(1.18);
}

.menu-overlay {
  align-items: start;
  justify-items: end;
  padding-top: max(18px, env(safe-area-inset-top));
}

.menu-sheet,
.info-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: var(--soft-radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.7)),
    rgba(255, 255, 255, 0.82);
  box-shadow: 0 30px 90px rgba(0, 18, 44, 0.28);
  backdrop-filter: blur(22px) saturate(1.24);
}

.menu-sheet {
  display: grid;
  gap: 8px;
  width: min(320px, 100%);
  padding: 18px;
}

.menu-sheet > strong {
  color: var(--blue);
  font-size: 24px;
  line-height: 1;
  margin-bottom: 8px;
}

.menu-close {
  position: absolute;
  right: 10px;
  top: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 16px;
  background: rgba(0, 92, 169, 0.1);
  color: var(--blue);
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

.menu-item {
  min-height: 48px;
  border: 1px solid rgba(0, 92, 169, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink);
  cursor: pointer;
  font-weight: 950;
  text-align: left;
  padding: 0 14px;
}

.menu-push-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(0, 92, 169, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
}

.menu-push-panel strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 15px;
}

.menu-push-panel p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.menu-item.muted {
  color: var(--muted);
}

.info-modal {
  place-items: center;
}

.info-card {
  display: grid;
  gap: 16px;
  width: min(440px, 100%);
  max-height: min(86vh, 780px);
  overflow: auto;
  padding: 20px;
}

.info-card h2 {
  padding-right: 40px;
  margin-bottom: 0;
}

.info-card > p,
.how-copy p,
.how-copy li {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.46;
}

.gift-modal-text {
  white-space: pre-line;
}

.gift {
  cursor: pointer;
}

.how-copy {
  display: grid;
  gap: 12px;
}

.how-copy ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.link-actions {
  display: grid;
  gap: 10px;
}

.link-button {
  display: grid;
  place-items: center;
  min-height: 50px;
  text-decoration: none;
  text-align: center;
}

.install-card {
  gap: 14px;
}

.install-visuals {
  display: grid;
  gap: 10px;
}

.install-shot {
  overflow: hidden;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(0, 92, 169, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.install-shot img {
  display: block;
  width: 100%;
  max-height: 94px;
  object-fit: cover;
  border-radius: 12px;
}

.install-shot figcaption {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.26;
}

.install-icon-shot {
  grid-template-columns: 54px 1fr;
  align-items: center;
}

.install-icon-shot strong {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--blue);
  color: var(--white);
  font-size: 32px;
  line-height: 1;
}

.install-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  counter-reset: install-step;
  list-style: none;
}

.install-steps li {
  position: relative;
  min-height: 42px;
  padding: 10px 12px 10px 46px;
  border: 1px solid rgba(0, 92, 169, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  line-height: 1.34;
}

.install-steps li::before {
  position: absolute;
  left: 12px;
  top: 9px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  counter-increment: install-step;
  content: counter(install-step);
  background: var(--blue);
  color: var(--white);
  font-size: 13px;
  font-weight: 950;
}

.rating-stars {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.rating-stars button {
  min-height: 52px;
  border: 0;
  border-radius: 18px;
  background: rgba(0, 92, 169, 0.08);
  color: rgba(0, 92, 169, 0.28);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
}

.rating-stars button.active {
  color: var(--blue);
  background: rgba(0, 92, 169, 0.14);
}

.rating-stars.compact button {
  min-height: 46px;
  background: rgba(0, 92, 169, 0.07);
  font-size: 30px;
}

.photo-attach {
  display: grid;
  place-items: center;
  min-height: 48px;
  border: 1px solid rgba(0, 92, 169, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--blue);
  cursor: pointer;
  font-weight: 950;
  text-align: center;
}

.photo-attach input {
  position: absolute;
  width: 1px;
  min-height: 1px;
  opacity: 0;
  pointer-events: none;
}

.respect-link {
  display: grid;
  place-items: center;
  min-height: 46px;
  color: var(--blue);
  font-weight: 950;
  text-decoration: none;
}

.push-panel {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.push-panel strong {
  display: block;
  margin-bottom: 4px;
  color: var(--blue);
}

.push-panel p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.push-panel .ghost-btn {
  min-width: 108px;
}

.push-panel #pushTestBtn {
  grid-column: 1 / -1;
}

.toast {
  position: fixed;
  left: 50%;
  top: max(12px, env(safe-area-inset-top));
  bottom: auto;
  z-index: 1000;
  width: min(440px, calc(100vw - 28px));
  transform: translateX(-50%);
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  background: rgba(16, 32, 51, 0.92);
  color: var(--white);
  font-weight: 800;
  box-shadow: 0 18px 42px rgba(0, 22, 48, 0.28);
  backdrop-filter: blur(18px);
  pointer-events: none;
}

.welcome-flash {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  place-content: center;
  gap: 6px;
  padding: 24px;
  background: rgba(247, 251, 255, 0.78);
  color: var(--ink);
  text-align: center;
  backdrop-filter: blur(18px) saturate(1.25);
  animation: flashOut 1.15s ease forwards;
}

.welcome-flash strong {
  color: var(--blue);
  font-size: 30px;
}

.welcome-flash span {
  color: var(--muted);
  font-weight: 900;
}

.push-prompt {
  position: fixed;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: end center;
  padding: 18px 14px max(18px, env(safe-area-inset-bottom));
  background: rgba(16, 32, 51, 0.16);
  backdrop-filter: blur(14px);
}

.push-prompt-card {
  display: grid;
  gap: 10px;
  width: min(452px, 100%);
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 70px rgba(0, 52, 98, 0.22);
}

.push-prompt-card span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.push-prompt-card strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.12;
}

.push-prompt-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.38;
}

.messages-card {
  max-height: min(720px, calc(100vh - 38px));
}

#inboxHome,
.inbox-thread {
  display: grid;
  gap: 14px;
}

.inbox-threads {
  display: grid;
  gap: 10px;
}

.inbox-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 70px;
  padding: 10px;
  border: 1px solid rgba(0, 92, 169, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.inbox-item > img,
.inbox-item-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 15px;
  background: rgba(0, 92, 169, 0.1);
  color: var(--blue);
  font-size: 23px;
  object-fit: cover;
}

.inbox-item > img.inbox-chat-icon {
  padding: 13px;
  object-fit: contain;
}

.inbox-item-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.inbox-item-copy strong,
.inbox-item-copy small,
.inbox-item-copy em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbox-item-copy strong {
  font-size: 15px;
}

.inbox-item-copy small,
.inbox-item-copy em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.inbox-item > b {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 11px;
  background: #a8ec18;
  color: #083b22;
  font-size: 11px;
}

.inbox-back {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 16px;
  background: rgba(0, 92, 169, 0.1);
  color: var(--blue);
  cursor: pointer;
  font-size: 23px;
}

.campaign-content {
  display: grid;
  gap: 12px;
}

.campaign-photo-grid,
.message-photo-grid {
  display: grid;
  gap: 8px;
}

.campaign-photo-grid a,
.message-photo-grid a {
  overflow: hidden;
  display: block;
  border-radius: 18px;
  background: rgba(0, 92, 169, 0.06);
}

.campaign-photo-grid img,
.message-photo-grid img {
  display: block;
  width: 100%;
  max-height: min(58vh, 560px);
  object-fit: contain;
}

.campaign-message {
  max-width: 100%;
}

.guest-messages,
.chat-messages {
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  max-height: 360px;
  padding: 4px;
}

.message-bubble,
.bo-message {
  display: grid;
  gap: 5px;
  max-width: 88%;
  padding: 11px 12px;
  border-radius: 18px;
  background: rgba(0, 92, 169, 0.08);
}

.message-bubble.admin,
.bo-message.admin {
  justify-self: start;
  background: rgba(0, 92, 169, 0.12);
}

.message-bubble.guest,
.bo-message.guest {
  justify-self: end;
  background: rgba(168, 236, 24, 0.18);
}

.message-bubble span,
.bo-message span,
.message-bubble small,
.bo-message small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.message-bubble p,
.bo-message p {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
  white-space: pre-wrap;
}

.bo-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.bo-photo-grid a {
  overflow: hidden;
  display: block;
  aspect-ratio: 1;
  border-radius: 14px;
  background: rgba(0, 92, 169, 0.08);
}

.bo-photo-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.guest-message-form {
  display: grid;
  gap: 10px;
}

.broadcast-card {
  overflow: hidden;
}

.broadcast-audience {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border-radius: 18px;
  background: rgba(0, 92, 169, 0.08);
}

.broadcast-audience label {
  cursor: pointer;
}

.broadcast-audience input {
  position: absolute;
  opacity: 0;
}

.broadcast-audience span {
  display: grid;
  min-height: 40px;
  place-items: center;
  border-radius: 15px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 950;
}

.broadcast-audience input:checked + span {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(0, 92, 169, 0.2);
}

.guest-picker,
.guest-checklist {
  display: grid;
  gap: 8px;
}

.guest-checklist {
  max-height: 210px;
  overflow: auto;
  padding: 2px;
}

.guest-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(0, 92, 169, 0.1);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.64);
  cursor: pointer;
}

.guest-option input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--blue);
}

.guest-option span {
  display: grid;
  gap: 2px;
}

.guest-option small {
  color: var(--muted);
  font-size: 11px;
}

.broadcast-preview {
  overflow: hidden;
  display: grid;
  gap: 10px;
  border: 1px solid rgba(0, 92, 169, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.64);
}

.broadcast-preview img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  background: rgba(0, 92, 169, 0.04);
}

.broadcast-preview div {
  display: grid;
  gap: 5px;
  padding: 0 12px 12px;
}

.broadcast-preview p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  white-space: pre-wrap;
}

.broadcast-history {
  display: grid;
  gap: 8px;
}

.broadcast-history-title {
  margin-top: 4px;
  color: var(--ink);
  font-size: 13px;
}

.broadcast-history-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 8px;
  border-radius: 15px;
  background: rgba(0, 92, 169, 0.07);
}

.broadcast-history-item img {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  object-fit: cover;
}

.broadcast-history-item div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.broadcast-history-item strong,
.broadcast-history-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.broadcast-history-item small {
  color: var(--muted);
  font-size: 11px;
}

.backoffice-page {
  min-height: 100vh;
  background:
    linear-gradient(130deg, rgba(0, 92, 169, 0.98) 0%, rgba(0, 92, 169, 0.88) 30%, rgba(247, 251, 255, 0.96) 30.2%, rgba(247, 251, 255, 1) 100%),
    var(--paper);
}

.backoffice-page::before,
.backoffice-page::after {
  display: none;
}

.bo-shell {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 14px max(24px, env(safe-area-inset-bottom));
}

.bo-card {
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: var(--soft-radius);
  background: var(--glass);
  box-shadow: 0 20px 60px rgba(0, 52, 98, 0.11);
  backdrop-filter: blur(20px) saturate(1.28);
}

.bo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 76px;
  margin-bottom: 14px;
  padding: 6px 0 12px;
}

.bo-logo {
  display: block;
  width: 58px;
  height: 58px;
  object-fit: contain;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 44px rgba(0, 52, 98, 0.2);
}

.bo-header > div {
  flex: 1;
  min-width: 0;
}

.bo-header span {
  color: rgba(255, 255, 255, 0.86);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.bo-header h1 {
  color: var(--white);
  font-size: 32px;
  line-height: 1.04;
}

.bo-refresh {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  color: var(--blue);
  cursor: pointer;
  font-size: 30px;
  font-weight: 950;
  box-shadow: 0 18px 44px rgba(0, 52, 98, 0.18);
}

.bo-content {
  display: grid;
  gap: 14px;
}

.bo-push-card {
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}

.bo-push-card > div:nth-child(2) {
  min-width: 0;
}

.bo-push-card h2 {
  font-size: 16px;
}

.bo-push-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.bo-push-icon {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background: rgba(0, 92, 169, 0.11);
}

.bo-push-icon::before {
  display: block;
  width: 22px;
  height: 22px;
  margin: 11px;
  background: var(--blue);
  content: "";
  mask: url("/assets/menu-icons/bell.svg") center / contain no-repeat;
}

.bo-push-button {
  min-width: 90px;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 14px;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.bo-push-card[data-state="enabled"] {
  border-color: rgba(31, 167, 91, 0.28);
  background: rgba(236, 255, 244, 0.82);
}

.bo-push-card[data-state="enabled"] .bo-push-icon {
  background: rgba(31, 167, 91, 0.13);
}

.bo-push-card[data-state="enabled"] .bo-push-icon::before {
  background: #159b62;
}

.bo-push-card[data-state="enabled"] .bo-push-button {
  background: #159b62;
}

.bo-push-card[data-state="denied"] .bo-push-button {
  background: #d94c4c;
}

.bo-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.bo-card h2 {
  margin: 0;
  color: var(--blue);
  font-size: 20px;
}

.bo-card-head,
.chat-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bo-card-head span,
.chat-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.bo-disclosure {
  display: block;
}

.bo-disclosure > summary {
  position: relative;
  padding-right: 28px;
  list-style: none;
  cursor: pointer;
}

.bo-disclosure > summary::-webkit-details-marker {
  display: none;
}

.bo-disclosure > summary::after {
  position: absolute;
  top: 50%;
  right: 2px;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  content: "";
  transform: translateY(-70%) rotate(45deg);
  transition: transform 180ms ease;
}

.bo-disclosure[open] > summary::after {
  transform: translateY(-30%) rotate(225deg);
}

.bo-disclosure-body {
  display: grid;
  gap: 12px;
  padding-top: 14px;
}

.token-gate {
  width: 100%;
}

.bo-circle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.bo-circle-card {
  display: grid;
  gap: 8px;
  align-items: start;
  min-height: 0;
  padding: 9px;
  border: 1px solid rgba(0, 92, 169, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.58);
}

.bo-ring {
  --value: 0;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle closest-side, rgba(255, 255, 255, 0.94) 68%, transparent 70%),
    conic-gradient(var(--blue) calc(var(--value) * 1%), rgba(0, 92, 169, 0.12) 0);
  box-shadow: inset 0 0 0 1px rgba(0, 92, 169, 0.1);
}

.bo-ring strong,
.bo-ring span {
  grid-area: 1 / 1;
}

.bo-ring strong {
  color: var(--blue);
  font-size: clamp(18px, 5.7vw, 24px);
  line-height: 1;
  transform: translateY(-6px);
}

.bo-ring span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  transform: translateY(15px);
}

.bo-ring-copy {
  display: grid;
  gap: 4px;
}

.bo-ring-copy strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.1;
}

.bo-ring-copy p,
.bo-ring-copy small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.24;
}

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

.engagement-metric {
  position: relative;
  display: grid;
  align-content: start;
  min-height: 154px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(0, 92, 169, 0.14);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.62);
}

.engagement-metric.success {
  border-color: rgba(31, 167, 91, 0.26);
  background: rgba(236, 255, 244, 0.72);
}

.engagement-metric.muted {
  background: rgba(244, 248, 252, 0.72);
}

.engagement-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: rgba(0, 92, 169, 0.1);
  color: var(--blue);
  font-size: 14px;
  font-weight: 950;
}

.engagement-metric > strong {
  margin: 4px 38px 9px 0;
  color: var(--blue);
  font-size: 38px;
  line-height: 1;
}

.engagement-metric h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.15;
}

.engagement-metric p,
.engagement-metric small {
  position: relative;
  z-index: 1;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.28;
}

.engagement-metric small {
  margin-top: 7px;
  font-weight: 800;
}

.staff-list {
  display: grid;
  gap: 12px;
}

.staff-member {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid rgba(0, 92, 169, 0.13);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.62);
}

.staff-member-head {
  display: flex;
  align-items: center;
  gap: 11px;
}

.staff-member-head > div:last-child {
  display: grid;
  gap: 3px;
}

.staff-member-head strong {
  color: var(--ink);
  font-size: 15px;
}

.staff-member-head small,
.staff-member label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.staff-avatar {
  display: grid;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  background: var(--club-blue-soft);
  background-position: center;
  background-size: cover;
  color: var(--blue);
  font-size: 20px;
  font-weight: 900;
}

.staff-avatar.has-photo span {
  display: none;
}

.staff-member > label:not(.staff-photo-input):not(.staff-active) {
  display: grid;
  gap: 5px;
}

.staff-member input[type="text"],
.staff-member input[type="url"] {
  width: 100%;
}

.staff-photo-input {
  display: grid;
  min-height: 44px;
  place-items: center;
  border: 1px dashed rgba(0, 92, 169, 0.28);
  border-radius: 14px;
  background: rgba(236, 246, 255, 0.7);
  color: var(--blue);
  cursor: pointer;
}

.staff-photo-input input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.staff-photo-input > span {
  color: var(--blue) !important;
  font-size: 13px !important;
}

.staff-active {
  display: flex;
  align-items: center;
  gap: 8px;
}

.staff-active input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.staff-save {
  min-height: 44px;
}

.bo-columns {
  display: grid;
  gap: 14px;
}

.crm-card {
  overflow: hidden;
}

.thread-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(174px, 62%);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.thread-list::-webkit-scrollbar {
  display: none;
}

.thread-item {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 96px;
  padding: 12px;
  border: 1px solid rgba(0, 92, 169, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  cursor: pointer;
  scroll-snap-align: start;
  text-align: left;
}

.thread-item.active {
  border-color: rgba(0, 92, 169, 0.46);
  background: rgba(0, 92, 169, 0.11);
  box-shadow: 0 16px 34px rgba(0, 92, 169, 0.14);
}

.thread-item.unread {
  position: relative;
  border-color: rgba(22, 156, 91, 0.5);
  background: rgba(168, 236, 24, 0.2);
  box-shadow: 0 14px 30px rgba(22, 156, 91, 0.12);
}

.thread-item.unread > strong {
  color: #117a49;
}

.thread-unread-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  min-width: 23px;
  height: 23px;
  place-items: center;
  padding: 0 6px;
  border-radius: 12px;
  background: #169c5b;
  color: #fff;
  font-size: 11px;
  font-weight: 950;
}

.thread-item span,
.thread-item small {
  color: var(--muted);
  font-size: 12px;
}

.thread-item p {
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-card {
  min-height: 0;
}

.chat-empty {
  display: grid;
  min-height: 240px;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
}

#chatPanel {
  display: grid;
  gap: 12px;
}

.chat-messages {
  max-height: min(58vh, 560px);
  padding: 6px;
}

.bo-message {
  max-width: min(86%, 360px);
  padding: 12px 13px;
  border-radius: 24px;
}

.bo-photo-grid {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  max-width: min(100%, 330px);
}

.bo-photo-grid a {
  border-radius: 18px;
}

.bo-photo-grid img {
  display: block;
}

@keyframes flashOut {
  0% { opacity: 0; transform: scale(0.98); }
  14% { opacity: 1; transform: scale(1); }
  76% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.02); pointer-events: none; }
}

.hidden {
  display: none !important;
}

@media (max-width: 380px) {
  .shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .brand-logo {
    width: 66px;
    height: 66px;
  }

  h1 {
    font-size: 29px;
  }

  .lead-card {
    padding-right: 94px;
  }

  .lead-card strong {
    font-size: 25px;
  }

  .balance strong {
    font-size: 68px;
  }

  .push-panel {
    grid-template-columns: 1fr;
  }

  .bo-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .bo-push-card {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    padding: 12px;
  }

  .bo-push-icon {
    width: 40px;
    height: 40px;
  }

  .bo-push-icon::before {
    width: 20px;
    height: 20px;
    margin: 10px;
  }

  .bo-push-button {
    min-width: 82px;
    padding: 0 10px;
  }

  .bo-circle-grid {
    gap: 8px;
  }

  .bo-circle-card {
    padding: 7px;
    border-radius: 18px;
  }

  .bo-ring-copy p,
  .bo-ring-copy small {
    font-size: 10px;
  }
}

@media (max-width: 860px) {
  .bo-header {
    align-items: flex-start;
  }
}
.issues-list { display: grid; gap: 8px; }
.issue-row { display: grid; gap: 3px; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.5); border: 1px solid rgba(0,92,169,.12); }
.issue-row strong { color: #075fa9; }
.issue-row span { color: #64748b; font-size: 13px; }
.issue-row.problem { background: #fff1f2; border-color: #fecdd3; }
.issue-row.problem strong { color: #be123c; }
.issue-row.ok { background: #ecfdf5; border-color: #a7f3d0; }
.issue-row.ok strong { color: #047857; }

/* Guest app redesign, July 2026 */
:root {
  --club-blue: #075faa;
  --club-blue-dark: #034d8d;
  --club-blue-soft: #e8f3fb;
  --club-ink: #102238;
  --club-muted: #6d7d90;
  --club-line: #dce7f0;
  --club-surface: #ffffff;
  --club-bg: #f3f7fa;
  --club-green: #159b62;
  --club-red: #d94c4c;
}

body:has(> .shell) {
  background: var(--club-bg);
  color: var(--club-ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

body:has(> .shell)::before,
body:has(> .shell)::after {
  display: none;
}

body > .shell {
  width: min(100%, 560px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(76px + env(safe-area-inset-top)) 16px calc(104px + env(safe-area-inset-bottom));
  background: var(--club-bg);
  overflow: visible;
}

body > .shell .topbar {
  position: fixed;
  z-index: 80;
  top: 0;
  left: 50%;
  width: min(100%, 560px);
  height: calc(64px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 18px 0;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(7, 95, 170, .96);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

body > .shell .brand-lockup {
  gap: 10px;
  align-items: center;
}

body > .shell .brand-logo {
  width: 42px;
  height: 42px;
  padding: 4px;
  object-fit: contain;
  background: #fff;
  border-radius: 12px;
}

body > .shell .brand-lockup h1 {
  margin: 0;
  color: #fff;
  font-size: 21px;
  line-height: 1;
  font-weight: 760;
  letter-spacing: 0;
}

body > .shell .topbar-actions {
  gap: 8px;
}

body > .shell .icon-btn {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(255,255,255,.14);
  color: #fff;
  border-radius: 50%;
  box-shadow: none;
}

body > .shell .mail-glyph {
  width: 23px;
  height: 23px;
  filter: brightness(0) invert(1);
}

body > .shell .menu-btn span {
  background: #fff;
}

body > .shell .lead-card {
  margin-top: 18px;
}

body > .shell #appView {
  display: block;
  width: 100%;
}

body > .shell #appView.hidden {
  display: none !important;
}

.app-page {
  display: none;
  animation: club-page-in .22s ease both;
}

.app-page.active {
  display: block;
}

@keyframes club-page-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

body > .shell .hero {
  position: relative;
  min-height: 0;
  margin: 4px 0 12px;
  padding: 22px;
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  background: linear-gradient(145deg, var(--club-blue) 0%, #0b73c5 100%);
  color: #fff;
  box-shadow: 0 14px 30px rgba(5, 72, 128, .18);
}

body > .shell .hero::after {
  content: "";
  position: absolute;
  right: -48px;
  bottom: -78px;
  width: 210px;
  height: 210px;
  border: 34px solid rgba(255,255,255,.08);
  border-radius: 50%;
}

body > .shell .guest {
  position: relative;
  z-index: 1;
  margin: 0 0 6px;
  color: rgba(255,255,255,.78);
  font-size: 16px;
  font-weight: 620;
}

body > .shell .balance {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 0 0 18px;
}

body > .shell .balance strong {
  color: #fff;
  font-size: clamp(48px, 15vw, 64px);
  line-height: .95;
  font-weight: 790;
  letter-spacing: 0;
}

body > .shell .balance span {
  max-width: 96px;
  color: rgba(255,255,255,.9);
  font-size: 16px;
  line-height: 1.05;
  font-weight: 690;
}

body > .shell .code-action {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 14px;
  background: #fff;
  color: var(--club-blue);
  font-size: 17px;
  font-weight: 750;
  box-shadow: none;
}

body > .shell .level-card {
  margin: 0 0 24px;
  padding: 17px 18px;
  border: 1px solid var(--club-line);
  border-radius: 20px;
  background: #fff;
  color: var(--club-ink);
  box-shadow: 0 8px 22px rgba(25, 54, 78, .06);
}

body > .shell .level-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body > .shell .level-top strong {
  color: var(--club-blue);
  font-size: 18px;
}

body > .shell .level-top span,
body > .shell .level-card p {
  color: var(--club-muted);
}

body > .shell .level-card p {
  margin: 10px 0 0;
  font-size: 14px;
  font-weight: 600;
}

body > .shell .level-track,
body > .shell .gift-progress {
  height: 7px;
  margin-top: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5edf3;
}

body > .shell .level-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--club-blue);
}

body > .shell .section,
body > .shell .panel {
  margin: 0 0 24px;
}

body > .shell .section h2,
body > .shell .panel h2,
body > .shell .page-heading h2 {
  margin: 0;
  color: var(--club-ink);
  font-size: 25px;
  line-height: 1.12;
  font-weight: 780;
  letter-spacing: 0;
}

.section-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.text-action {
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--club-blue);
  font-size: 15px;
  font-weight: 700;
}

.home-gift-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(164px, 44%);
  gap: 10px;
  margin-right: -16px;
  padding-right: 16px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.home-gift-list::-webkit-scrollbar,
.drink-feed::-webkit-scrollbar,
.gift-filter::-webkit-scrollbar { display: none; }

body > .shell .gift {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--club-line);
  border-radius: 18px;
  background: #fff;
  color: var(--club-ink);
  box-shadow: 0 8px 20px rgba(25, 54, 78, .05);
  aspect-ratio: auto;
}

.home-gift-list .gift { min-height: 250px; }
body > .shell .gift-list .gift { min-height: 320px; }

body > .shell .gift.ok {
  border-color: #b9e6d0;
  background: #f8fffb;
}

.gift-media {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 100%;
  aspect-ratio: 1.35 / 1;
  overflow: hidden;
  background: var(--club-blue-soft);
  color: var(--club-blue);
}

.gift-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gift-media span {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #fff;
  color: var(--club-blue);
  font-size: 28px;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(7,95,170,.12);
}

.gift-art-drip_culture { background: #e7f0ff; }
.gift-art-canele_any { background: #fff0de; }
.gift-art-condensed_tube { background: #fff5e9; }
.gift-art-cake_any { background: #f8eaf1; }
.gift-art-half_sandwich { background: #e8f4e8; }

.gift-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 13px;
}

.gift-copy > strong {
  min-height: 40px;
  color: var(--club-ink);
  font-size: 16px;
  line-height: 1.2;
}

.gift-cost {
  margin-top: 7px;
  color: var(--club-blue);
  font-size: 14px;
  font-weight: 720;
}

body > .shell .gift-progress {
  width: 100%;
  height: 6px;
  margin-top: auto;
  transform: translateY(10px);
}

body > .shell .gift-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--club-blue);
}

body > .shell .gift.ok .gift-progress-fill {
  background: var(--club-green);
}

.gift-copy small {
  margin-top: 16px;
  color: var(--club-muted);
  font-size: 12px;
  font-weight: 650;
}

body > .shell .gift.ok .gift-copy small {
  color: var(--club-green);
}

body > .shell .visit-feedback {
  padding: 18px;
  border: 1px solid var(--club-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: none;
}

body > .shell .visit-feedback > strong {
  display: block;
  color: var(--club-ink);
  font-size: 18px;
  text-align: center;
}

body > .shell .rating-stars.compact {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 10px;
}

body > .shell .rating-stars.compact button {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #cbd5df;
  font-size: 34px;
  box-shadow: none;
}

body > .shell .rating-stars.compact button.active,
body > .shell .rating-stars.compact button:hover {
  color: var(--club-blue);
}

body > .shell .home-history-panel,
body > .shell .history-panel {
  padding: 18px;
  border: 1px solid var(--club-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: none;
}

body > .shell .history-list {
  display: grid;
  gap: 0;
}

body > .shell .history-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid #edf1f4;
  border-radius: 0;
  background: transparent;
}

body > .shell .history-item:last-child { border-bottom: 0; }

.history-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e7f6ee;
  color: var(--club-green);
  font-size: 22px;
  font-weight: 700;
}

.history-icon.minus {
  background: #fff0f0;
  color: var(--club-red);
}

body > .shell .history-item strong {
  color: var(--club-ink);
  font-size: 14px;
}

body > .shell .history-item small {
  display: block;
  margin-top: 3px;
  color: var(--club-muted);
  font-size: 11px;
}

body > .shell .history-item .qty {
  color: var(--club-green);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

body > .shell .history-item .qty.minus { color: var(--club-red); }

body > .shell .summer-feed {
  margin-bottom: 10px;
}

body > .shell .section-head {
  display: block;
  margin-bottom: 13px;
}

body > .shell .section-head span {
  display: block;
  margin-top: 5px;
  color: var(--club-muted);
  font-size: 14px;
}

body > .shell .drink-feed {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 76%;
  gap: 12px;
  margin-right: -16px;
  padding-right: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

body > .shell .drink-card {
  scroll-snap-align: start;
}

body > .shell .drink-card-btn {
  position: relative;
  width: 100%;
  aspect-ratio: 1.42 / 1;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: #fff;
}

body > .shell .drink-card-btn::after {
  content: "";
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(transparent, rgba(3,22,37,.74));
}

body > .shell .drink-card-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body > .shell .drink-title {
  position: absolute;
  z-index: 2;
  left: 16px;
  right: 16px;
  bottom: 15px;
  color: #fff;
  font-size: 18px;
  font-weight: 740;
  text-align: left;
}

.page-heading {
  padding: 10px 2px 18px;
}

.page-heading > span {
  color: var(--club-blue);
  font-size: 13px;
  font-weight: 750;
  text-transform: uppercase;
}

.page-heading h2 { margin-top: 4px !important; }

.page-heading p {
  margin: 7px 0 0;
  color: var(--club-muted);
  font-size: 15px;
}

.gift-filter {
  display: flex;
  gap: 8px;
  margin: 0 -16px 16px;
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.gift-filter button {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--club-line);
  border-radius: 999px;
  background: #fff;
  color: var(--club-muted);
  font-size: 14px;
  font-weight: 680;
  white-space: nowrap;
}

.gift-filter button.active {
  border-color: var(--club-blue);
  background: var(--club-blue);
  color: #fff;
}

body > .shell .gift-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.empty-state {
  grid-column: 1 / -1;
  display: grid;
  gap: 5px;
  padding: 36px 20px;
  border: 1px solid var(--club-line);
  border-radius: 20px;
  background: #fff;
  text-align: center;
}

.empty-state span { color: var(--club-muted); }

body > .shell .history-panel { margin-top: 0; }

body > .shell .bottom-nav {
  position: fixed;
  z-index: 70;
  left: 50%;
  bottom: 0;
  width: min(100%, 560px);
  height: calc(72px + env(safe-area-inset-bottom));
  padding: 7px 9px env(safe-area-inset-bottom);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid rgba(16,34,56,.09);
  background: rgba(255,255,255,.96);
  box-shadow: 0 -8px 30px rgba(19,49,73,.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.bottom-nav-item {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8290a0;
}

.bottom-nav-item.active { color: var(--club-blue); }

.bottom-nav-item .nav-icon {
  font-size: 24px;
  line-height: 1;
  font-weight: 700;
}

.bottom-nav-item small {
  font-size: 10px;
  font-weight: 650;
}

.qr-nav-item .nav-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-top: -24px;
  border: 5px solid var(--club-bg);
  border-radius: 50%;
  background: var(--club-blue);
  color: #fff;
  font-size: 25px;
  box-shadow: 0 8px 18px rgba(7,95,170,.25);
}

body > .shell .code-box {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100dvh;
  padding: max(28px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom));
  border: 0;
  border-radius: 0;
  background: #fff;
  color: var(--club-ink);
  box-shadow: none;
}

body > .shell .code-box.hidden { display: none !important; }

.qr-close {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  right: 18px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--club-blue-soft);
  color: var(--club-blue);
  font-size: 30px;
}

body > .shell .code-box > span {
  margin-bottom: 24px;
  color: var(--club-blue);
  font-size: 19px;
  font-weight: 750;
}

body > .shell .guest-qr {
  display: grid;
  place-items: center;
  width: min(78vw, 330px);
  aspect-ratio: 1;
  padding: 18px;
  border: 2px solid var(--club-line);
  border-radius: 24px;
  background: #fff;
}

body > .shell .guest-qr img,
body > .shell .guest-qr canvas {
  width: 100% !important;
  height: 100% !important;
}

body > .shell .code-box > strong {
  margin-top: 22px;
  color: var(--club-ink);
  font-size: 34px;
  letter-spacing: .12em;
}

body > .shell .code-box > p {
  margin: 9px 0 0;
  color: var(--club-muted);
  font-size: 16px;
}

body.qr-mode { overflow: hidden; }

body > .shell .menu-overlay,
body > .shell .info-modal {
  background: rgba(9, 27, 42, .48);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body > .shell .menu-sheet,
body > .shell .info-card {
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 24px;
  background: rgba(255,255,255,.96);
  color: var(--club-ink);
  box-shadow: 0 24px 60px rgba(7, 34, 56, .2);
}

body > .shell .menu-sheet > strong,
body > .shell .info-card h2 { color: var(--club-blue); }

body > .shell .menu-item {
  border-color: var(--club-line);
  border-radius: 14px;
  background: #fff;
  color: var(--club-ink);
}

body > .shell .menu-close {
  border-radius: 50%;
  background: var(--club-blue-soft);
  color: var(--club-blue);
}

body > .shell .toast {
  position: fixed;
  z-index: 400;
  top: calc(76px + env(safe-area-inset-top));
  bottom: auto;
  left: 50%;
  width: min(calc(100% - 32px), 480px);
  transform: translateX(-50%);
  border-radius: 14px;
  background: var(--club-ink);
  color: #fff;
}

body > .shell .push-prompt {
  z-index: 320;
  padding: 18px 14px max(18px, env(safe-area-inset-bottom));
  background: rgba(9, 27, 42, .46);
}

body > .shell .push-prompt-card {
  margin-bottom: 0;
  border-radius: 22px;
  background: rgba(255,255,255,.97);
}

@media (max-width: 390px) {
  body > .shell { padding-left: 12px; padding-right: 12px; }
  .home-gift-list { grid-auto-columns: 48%; margin-right: -12px; padding-right: 12px; }
  body > .shell .balance strong { font-size: 50px; }
  body > .shell .gift-list { gap: 8px; }
  .gift-copy { padding: 11px; }
  .gift-copy > strong { font-size: 14px; }
  body > .shell .rating-stars.compact button { width: 40px; }
  body > .shell .history-item { grid-template-columns: 32px minmax(0, 1fr); }
  body > .shell .history-item .qty { grid-column: 2; }
}

/* 2026 mobile system refresh: compact hierarchy, product imagery, purposeful motion. */
:root {
  --club-blue: #075fae;
  --club-blue-dark: #034a91;
  --club-blue-soft: #eaf4fd;
  --club-bg: #f4f8fc;
  --club-ink: #10263d;
  --club-muted: #6f8195;
  --club-line: #dce7f1;
  --club-green: #23a562;
  --club-red: #db4b4b;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
}

html,
body {
  overflow-x: hidden;
  background: var(--club-bg);
}

body {
  touch-action: manipulation;
  background: var(--club-bg);
}

body::before,
body::after {
  display: none;
}

body > .shell {
  width: min(100%, 560px);
  padding: 0 14px calc(94px + env(safe-area-inset-bottom));
  background: var(--club-bg);
}

body > .shell .topbar {
  position: sticky;
  z-index: 80;
  top: 0;
  left: auto;
  width: auto;
  height: auto;
  min-height: calc(64px + env(safe-area-inset-top));
  margin: 0 -14px;
  padding: calc(8px + env(safe-area-inset-top)) 16px 8px;
  transform: none;
  background: var(--club-blue);
  color: #fff;
}

body > .shell .brand-lockup {
  gap: 9px;
}

body > .shell .brand-logo {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  object-fit: contain;
}

body > .shell #screenTitle {
  color: #fff;
  font-size: 18px;
  letter-spacing: 0;
}

body > .shell .icon-btn {
  width: 38px;
  height: 38px;
  border: 0;
  background: rgba(255,255,255,.94);
  color: var(--club-blue);
  box-shadow: 0 4px 12px rgba(0, 42, 80, .14);
}

.menu-btn span {
  background: var(--club-blue) !important;
}

.boot-view {
  position: fixed;
  z-index: 500;
  inset: 0;
  min-height: 100dvh;
  padding: env(safe-area-inset-top) 24px env(safe-area-inset-bottom);
  align-content: center;
  background: var(--club-blue);
  color: #fff;
}

.boot-view.hidden { display: none !important; }

.boot-logo {
  width: 132px;
  max-height: 92px;
  margin-bottom: 34px;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  object-fit: contain;
}

.boot-view .boot-spinner {
  width: 30px;
  height: 30px;
  border-color: rgba(255,255,255,.3);
  border-top-color: #fff;
}

.boot-view strong {
  color: #fff;
  font-size: 22px;
}

.boot-view > span:last-child {
  color: rgba(255,255,255,.76);
  font-weight: 550;
}

body > .shell #appView {
  margin: 0 -14px;
}

body > .shell .app-page {
  display: none;
  padding: 14px;
}

body > .shell .app-page.active {
  display: block;
  animation: page-enter 240ms var(--ease-out) both;
}

#homePage {
  position: relative;
  isolation: isolate;
}

#homePage::before {
  position: absolute;
  z-index: -1;
  top: 0;
  right: 0;
  left: 0;
  height: 318px;
  background: var(--club-blue);
  content: "";
}

body > .shell .hero {
  min-height: 212px;
  margin: 2px 0 12px;
  padding: 20px;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 22px;
  background: #fff;
  color: var(--club-ink);
  box-shadow: 0 14px 32px rgba(0, 48, 90, .18);
}

body > .shell .hero::after { display: none; }

body > .shell .hero .guest {
  margin: 0 0 2px;
  color: var(--club-muted);
  font-size: 14px;
  font-weight: 700;
}

body > .shell .balance {
  align-items: flex-end;
  gap: 10px;
  margin: 3px 0 16px;
}

body > .shell .balance strong {
  color: var(--club-blue);
  font-size: clamp(46px, 15vw, 68px);
  line-height: .98;
  letter-spacing: 0;
}

body > .shell .balance span {
  max-width: 96px;
  padding-bottom: 8px;
  color: var(--club-ink);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.08;
}

body > .shell .hero .code-action {
  min-height: 52px;
  border-radius: 14px;
  background: var(--club-blue);
  box-shadow: none;
  font-size: 16px;
}

body > .shell .level-card {
  margin: 0 0 17px;
  padding: 18px;
  border: 1px solid var(--club-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(20, 63, 98, .08);
}

body > .shell .level-card:hover,
body > .shell .level-card:active {
  transform: none;
}

body > .shell .level-card h3,
body > .shell .level-card strong {
  color: var(--club-blue);
}

body > .shell .level-track,
body > .shell .gift-progress {
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: #e7eff6;
}

body > .shell .level-fill,
body > .shell .gift-progress-fill {
  border-radius: inherit;
  background: var(--club-blue);
  transition: width 650ms var(--ease-out);
}

body > .shell .gift.ok .gift-progress-fill {
  background: var(--club-green);
}

.section-title-row h2,
body > .shell .section-head h2 {
  color: var(--club-ink);
  font-size: 20px;
  letter-spacing: 0;
}

.text-action {
  color: var(--club-blue);
  font-size: 13px;
  font-weight: 750;
}

.home-gift-list {
  grid-auto-columns: 38%;
  gap: 10px;
  margin-right: -14px;
  padding: 2px 14px 9px 0;
}

body > .shell .gift {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--club-line);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(17, 56, 88, .07);
  animation: item-enter 280ms var(--ease-out) both;
  animation-delay: calc(var(--gift-index) * 32ms);
}

body > .shell .gift.ok {
  border-color: rgba(35,165,98,.42);
  background: #f7fffa;
}

body > .shell .gift-hit {
  display: grid;
  width: 100%;
  min-height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

body > .shell .gift-hit:active {
  transform: scale(.985);
}

.home-gift-list .gift,
body > .shell .home-gift-list .gift {
  min-height: 220px;
}

.home-gift-list .gift-hit {
  grid-template-rows: 112px 1fr;
}

.home-gift-list .gift-media {
  width: 100%;
  height: 112px;
  border-radius: 0;
}

.gift-media {
  overflow: hidden;
  background: #eef3f7;
}

.gift-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gift-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
  padding: 11px;
}

.gift-copy > strong {
  min-height: 34px;
  color: var(--club-ink);
  font-size: 13px;
  line-height: 1.25;
}

.gift-cost {
  color: var(--club-blue);
  font-size: 12px;
  font-weight: 800;
}

.gift-copy small {
  color: var(--club-muted);
  font-size: 11px;
  font-weight: 650;
}

body > .shell .gift.ok .gift-copy small {
  color: var(--club-green);
}

body > .shell #giftList {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  padding-bottom: 18px;
}

body > .shell #giftList .gift {
  min-height: 0;
}

body > .shell #giftList .gift-hit {
  grid-template-columns: 86px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 102px;
  padding: 8px;
}

body > .shell #giftList .gift-media {
  width: 86px;
  height: 86px;
  border-radius: 13px;
}

body > .shell #giftList .gift-copy {
  gap: 5px;
  padding: 6px 10px;
}

body > .shell #giftList .gift-copy > strong {
  min-height: 0;
  font-size: 15px;
}

body > .shell #giftList .gift-progress {
  max-width: 160px;
}

.gift-select {
  align-self: center;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--club-blue);
  color: #fff;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

/* The full gift catalogue uses product tiles; the home carousel keeps its progress cards. */
body > .shell #giftList {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body > .shell #giftList .gift-catalog-card,
body > .shell #giftList .gift-catalog-card.ok {
  min-height: 0;
  border-color: rgba(13, 62, 99, .08);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(17, 56, 88, .06);
}

body > .shell #giftList .gift-catalog-hit {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(112px, 1fr);
  align-items: stretch;
  min-height: 278px;
  padding: 0;
}

body > .shell #giftList .gift-catalog-card .gift-media {
  position: relative;
  width: 100%;
  height: auto;
  overflow: hidden;
  aspect-ratio: 1 / .92;
  border-radius: 0;
  background: #fff;
}

body > .shell #giftList .gift-catalog-card .gift-media img {
  object-fit: contain;
}

body > .shell #giftList .gift-catalog-card .gift-media::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  content: "";
  box-shadow: inset 0 0 18px 14px #fff;
}

.gift-catalog-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0;
  padding: 13px 13px 14px;
}

.gift-catalog-copy > strong {
  min-height: 38px;
  margin: 0;
  color: var(--club-ink);
  font-size: 15px;
  line-height: 1.25;
  font-weight: 750;
  overflow-wrap: anywhere;
}

body > .shell #giftList .gift-catalog-progress {
  width: 100%;
  max-width: none;
  height: 6px;
  margin: 13px 0 12px;
  transform: none;
  background: rgba(0, 92, 169, .12);
}

.gift-catalog-footer {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
}

.gift-catalog-price {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  color: var(--club-ink);
  font-size: 17px;
  line-height: 1;
}

.gift-catalog-price b {
  font: inherit;
  font-weight: 750;
}

.gift-catalog-status {
  min-width: 0;
  color: var(--club-muted);
  font-size: 9px;
  line-height: 1.1;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

body > .shell #giftList .gift-catalog-card.ok .gift-catalog-status {
  color: var(--club-green);
}

.ycoin-symbol {
  position: relative;
  display: inline-block;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
}

.ycoin-symbol img {
  position: absolute;
  top: -4px;
  left: -4px;
  width: 30px;
  height: 30px;
  max-width: none;
}

@media (max-width: 350px) {
  body > .shell #giftList {
    gap: 8px;
  }

  body > .shell #giftList .gift-catalog-hit {
    min-height: 250px;
  }

  .gift-catalog-copy {
    padding: 11px;
  }

  .gift-catalog-copy > strong {
    font-size: 14px;
  }

  .gift-catalog-footer {
    gap: 4px;
  }

  .gift-catalog-price {
    gap: 3px;
    font-size: 16px;
  }

  .gift-catalog-status {
    font-size: 8px;
  }

  .gift-catalog-price .ycoin-symbol {
    flex-basis: 20px;
    width: 20px;
    height: 20px;
  }

  .gift-catalog-price .ycoin-symbol img {
    width: 28px;
    height: 28px;
  }
}

.page-heading {
  margin: -14px -14px 0;
  padding: 20px 16px 28px;
  background: var(--club-blue);
  color: #fff;
}

.page-heading > span,
.page-heading p {
  color: rgba(255,255,255,.72);
}

.page-heading h2 {
  color: #fff;
  font-size: 28px;
}

.gift-filter {
  position: sticky;
  z-index: 20;
  top: calc(64px + env(safe-area-inset-top));
  margin: -17px -2px 13px;
  padding: 6px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 15px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 8px 22px rgba(12, 50, 82, .11);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.gift-filter button {
  min-height: 36px;
  padding: 8px 13px;
  border-radius: 10px;
  color: var(--club-muted);
  font-size: 13px;
}

.gift-filter button.active {
  background: var(--club-blue);
  color: #fff;
}

body > .shell .visit-feedback,
body > .shell .home-history-panel {
  border: 1px solid var(--club-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(17, 56, 88, .06);
}

body > .shell .history-item {
  min-height: 64px;
}

body > .shell .summer-feed {
  padding-bottom: 12px;
}

body > .shell .section-head {
  align-items: flex-end;
}

body > .shell .section-head span {
  max-width: 148px;
  color: var(--club-muted);
  font-size: 11px;
  text-align: right;
}

body > .shell .drink-feed {
  grid-auto-columns: 76%;
  gap: 11px;
}

body > .shell .drink-card,
body > .shell .drink-card-btn {
  min-height: 300px;
  border-radius: 19px;
}

body > .shell .drink-card-btn::after {
  background: linear-gradient(transparent 54%, rgba(4,17,30,.78));
}

body > .shell .drink-title {
  left: 17px;
  bottom: 16px;
  font-size: 20px;
}

body > .shell .bottom-nav {
  height: calc(70px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.97);
}

.bottom-nav-item .nav-icon {
  position: relative;
  width: 22px;
  height: 22px;
  font-size: 0;
}

.bottom-nav-item .nav-icon::before {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  font-size: 22px;
  line-height: 1;
}

.nav-home::before { content: "⌂"; }
.nav-gift::before { content: "◇"; }
.nav-qr::before { content: "▦"; color: #fff; }
.nav-history::before { content: "◷"; }
.nav-profile::before { content: "○"; }

.qr-nav-item .nav-icon {
  width: 48px;
  height: 48px;
  margin-top: -22px;
  border: 4px solid var(--club-bg);
  background: var(--club-blue);
}

body > .shell .code-box {
  background: var(--club-bg);
}

body > .shell .code-box > span {
  margin-bottom: 18px;
  color: var(--club-blue);
}

body > .shell .guest-qr {
  width: min(80vw, 340px);
  padding: 17px;
  border: 1px solid var(--club-line);
  border-radius: 25px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(18, 58, 91, .13);
  cursor: pointer;
  transition: transform 160ms var(--ease-out);
}

body > .shell .guest-qr:active {
  transform: scale(.975);
}

body > .shell .code-box > p::after {
  display: block;
  margin-top: 5px;
  color: #9aabba;
  font-size: 12px;
  content: "Нажми на QR, чтобы скрыть";
}

body > .shell .menu-overlay,
body > .shell .info-modal {
  align-items: flex-end;
  background: rgba(8, 29, 48, .46);
}

body > .shell .menu-sheet,
body > .shell .info-card {
  width: min(100%, 520px);
  max-height: min(88dvh, 820px);
  margin: auto auto 0;
  overflow-y: auto;
  border: 0;
  border-radius: 26px 26px 0 0;
  background: #fff;
  box-shadow: 0 -16px 48px rgba(8, 29, 48, .2);
  animation: sheet-enter 260ms var(--ease-out) both;
}

body > .shell .menu-sheet {
  display: grid;
  gap: 8px;
  padding: 24px 16px calc(20px + env(safe-area-inset-bottom));
}

body > .shell .menu-sheet > strong {
  margin-bottom: 8px;
  color: var(--club-blue);
  font-size: 24px;
}

body > .shell .menu-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 9px 11px;
  border: 1px solid var(--club-line);
  border-radius: 15px;
  background: #fff;
  text-align: left;
}

body > .shell .menu-item > span:nth-child(2) {
  display: grid;
  gap: 2px;
}

body > .shell .menu-item b {
  color: var(--club-ink);
  font-size: 14px;
}

body > .shell .menu-item small {
  color: var(--club-muted);
  font-size: 11px;
}

body > .shell .menu-item i {
  color: #9aabba;
  font-size: 24px;
  font-style: normal;
}

.menu-glyph {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--club-blue-soft);
  color: var(--club-blue);
  font-size: 20px;
  font-weight: 800;
}

.glyph-chat::before { content: "···"; transform: translateY(-3px); }
.glyph-guide::before { content: "?"; }
.glyph-pin::before { content: "•"; font-size: 30px; }
.glyph-team::before { content: "+"; }
.glyph-exit::before { content: "↪"; }

body > .shell .menu-item.muted,
body > .shell .menu-item.muted b {
  color: var(--club-red);
}

body > .shell .menu-item.muted .menu-glyph {
  background: #fff0f0;
  color: var(--club-red);
}

body > .shell .menu-push-panel {
  border: 1px solid var(--club-line);
  border-radius: 15px;
  background: #f8fbfe;
}

body > .shell .info-card {
  padding: 24px 18px calc(24px + env(safe-area-inset-bottom));
}

body > .shell .info-card h2 {
  color: var(--club-ink);
}

body > .shell .gift-info-card {
  padding: 12px 12px calc(18px + env(safe-area-inset-bottom));
}

.gift-info-card .menu-close {
  top: 20px;
  right: 20px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 4px 14px rgba(16,38,61,.12);
}

.gift-modal-hero {
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1.45;
  border-radius: 20px;
  background: #edf3f7;
}

.gift-modal-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gift-modal-body {
  padding: 17px 7px 4px;
}

.gift-modal-body h2 {
  margin: 0 0 8px;
  padding-right: 20px;
  font-size: 25px;
}

.gift-modal-cost {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--club-green);
  font-size: 18px;
}

.gift-modal-text {
  color: #34495e;
  font-size: 15px;
  line-height: 1.55;
  white-space: pre-line;
}

.gift-modal-status {
  margin-top: 18px;
  padding: 14px;
  border-radius: 13px;
  background: var(--club-blue-soft);
  color: var(--club-blue);
  font-weight: 750;
  text-align: center;
}

.gift-modal-status.available {
  background: #e9f8ef;
  color: var(--club-green);
}

.level-detail-card {
  border: 0;
  border-radius: 17px;
  background: var(--club-blue);
  color: #fff;
}

.level-detail-card > strong,
.level-detail-card .level-detail-row,
.level-detail-card .level-detail-row.muted {
  color: #fff;
}

.level-detail-card .level-track {
  background: rgba(255,255,255,.28);
}

.level-detail-card .level-fill {
  background: #fff;
}

.messages-card,
.feedback-card {
  min-height: min(78dvh, 690px);
}

.inbox-item {
  min-height: 70px;
  border-radius: 15px;
  background: #fff;
}

.guest-message-form {
  position: sticky;
  bottom: 0;
  padding-top: 10px;
  background: #fff;
}

.drink-modal {
  animation: modal-fade 180ms ease-out both;
}

.drink-modal-card {
  animation: sheet-enter 240ms var(--ease-out) both;
}

@keyframes page-enter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes item-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes sheet-enter {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 390px) {
  .home-gift-list { grid-auto-columns: 43%; }
  body > .shell #giftList .gift:not(.gift-catalog-card) .gift-hit { grid-template-columns: 76px minmax(0, 1fr) auto; }
  body > .shell #giftList .gift:not(.gift-catalog-card) .gift-media { width: 76px; height: 76px; }
  .gift-select { padding: 8px; font-size: 11px; }
  body > .shell #giftList .gift:not(.gift-catalog-card) .gift-copy { padding: 5px 8px; }
  body > .shell #giftList .gift:not(.gift-catalog-card) .gift-copy > strong { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* July layout fixes: fixed viewport, simpler levels, compact history and promo carousel. */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  -webkit-text-size-adjust: 100%;
}

button,
a,
[role="button"] {
  touch-action: manipulation;
}

input,
textarea,
select {
  font-size: 16px;
}

body > .shell,
body > .shell .app-page {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

body > .shell {
  overflow-x: clip;
}

body > .shell #appView,
body > .shell .app-page {
  overflow-x: hidden;
  overflow-x: clip;
}

.home-gift-list,
body > .shell .drink-feed {
  width: 100%;
  max-width: 100%;
  margin-right: 0;
  padding-right: 0;
}

body > .shell .level-top {
  justify-content: flex-start;
}

body > .shell .level-fill,
.level-detail-card .level-fill {
  background: var(--club-green);
}

.level-detail-card {
  padding: 19px;
}

.level-detail-card > strong {
  display: block;
  font-size: 20px;
}

.level-detail-card .level-track {
  margin-top: 18px;
}

.level-remaining {
  margin-top: 12px;
  color: #fff;
  font-size: 15px;
  font-weight: 750;
  text-align: right;
}

body > .shell .history-item .qty {
  color: #16a66a;
}

body > .shell .history-item .qty.minus {
  color: #e34a4a;
}

body > .shell .history-icon {
  border: 1px solid rgba(22,166,106,.25);
  background: #effaf4;
  color: #16a66a;
}

body > .shell .history-icon.minus {
  border-color: rgba(227,74,74,.25);
  background: #fff4f4;
  color: #e34a4a;
}

.promo-title-row {
  align-items: center;
  margin-bottom: 13px;
}

.promo-title-row h2 {
  margin: 0;
}

body > .shell .drink-feed {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

body > .shell .drink-card,
body > .shell .drink-card-btn {
  width: 100%;
  min-height: 0;
  border-radius: 20px;
}

body > .shell .drink-card {
  scroll-snap-align: start;
}

body > .shell .drink-card-btn {
  position: relative;
  display: block;
  aspect-ratio: .83 / 1;
  overflow: hidden;
  border: 0;
  background: #0c1720;
}

body > .shell .drink-card-btn::after {
  position: absolute;
  z-index: 1;
  inset: 42% 0 0;
  background: linear-gradient(transparent, rgba(3,18,31,.86));
  content: "";
}

body > .shell .drink-card-btn img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.drink-card-copy {
  position: absolute;
  z-index: 2;
  right: 62px;
  bottom: 18px;
  left: 18px;
  display: grid;
  gap: 4px;
  color: #fff;
  text-align: left;
}

.drink-card-copy strong {
  font-size: 25px;
  line-height: 1.05;
}

.drink-card-copy small {
  color: rgba(255,255,255,.82);
  font-size: 13px;
}

.drink-card-copy b {
  margin-top: 12px;
  font-size: 18px;
}

.drink-arrow {
  position: absolute;
  z-index: 3;
  right: 16px;
  bottom: 18px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--club-blue);
  font-size: 22px;
  font-weight: 800;
}

.drink-dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  min-height: 16px;
  padding-top: 9px;
}

.drink-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #cfd9e3;
  transition: width 180ms var(--ease-out), background 180ms var(--ease-out);
}

.drink-dots span.active {
  width: 15px;
  border-radius: 999px;
  background: var(--club-blue);
}

.drink-feed.expanded {
  grid-auto-flow: row;
  grid-template-columns: 1fr;
  overflow: visible;
  scroll-snap-type: none;
}

.drink-feed.expanded .drink-card-btn {
  aspect-ratio: 1.15 / 1;
}

.drink-feed.expanded + .drink-dots {
  display: none;
}

@media (max-width: 390px) {
  body > .shell .history-item {
    grid-template-columns: 32px minmax(0, 1fr) auto;
  }

  body > .shell .history-item .qty {
    grid-column: auto;
    font-size: 12px;
  }

  body > .shell .drink-card-btn {
    aspect-ratio: .86 / 1;
  }
}

/* Final width and CTA overrides must remain last in the cascade. */
body > .shell #appView {
  width: calc(100% + 28px);
  max-width: none;
  min-width: 0;
  margin-right: -14px;
  margin-left: -14px;
}

body > .shell .hero .code-action {
  color: #fff;
  -webkit-text-fill-color: #fff;
}

/* The QR view always occupies the physical viewport. */
body.qr-mode {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body.qr-mode > .shell .code-box {
  position: fixed;
  z-index: 1000;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  min-height: 100dvh;
  margin: 0;
  padding:
    max(20px, env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    max(20px, env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
  overflow: hidden;
  border-radius: 0;
  overscroll-behavior: none;
}

body.qr-mode > .shell .qr-close {
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
}

@media (max-width: 390px) {
  body.qr-mode > .shell .guest-qr {
    width: min(82vw, 310px);
    padding: 14px;
  }

  body.qr-mode > .shell .code-box > strong {
    margin-top: 18px;
    font-size: 30px;
  }
}

@media (max-height: 690px) {
  body.qr-mode > .shell .code-box {
    gap: 6px;
  }

  body.qr-mode > .shell .code-box > span {
    margin-bottom: 8px;
    font-size: 15px;
  }

  body.qr-mode > .shell .guest-qr {
    width: min(62vh, 76vw, 292px);
    padding: 12px;
  }

  body.qr-mode > .shell .code-box > strong {
    margin-top: 10px;
    font-size: 27px;
  }

  body.qr-mode > .shell .code-box > p {
    margin-top: 4px;
    font-size: 13px;
  }
}

/* Modal behavior and compact message list. */
body.modal-open {
  position: fixed;
  right: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
}

body > .shell .menu-overlay,
body > .shell .info-modal,
.drink-modal {
  overscroll-behavior: contain;
  touch-action: none;
}

body > .shell .menu-sheet,
body > .shell .info-card,
.drink-modal-card {
  overscroll-behavior: contain;
  touch-action: pan-y;
}

body > .shell .messages-card {
  min-height: 0;
  height: auto;
  max-height: min(86dvh, 720px);
  gap: 10px;
  padding: 18px 14px;
}

body > .shell .messages-card.thread-open {
  height: min(82dvh, 720px);
}

body > .shell #inboxHome,
body > .shell .inbox-thread {
  gap: 9px;
  min-height: 0;
}

body > .shell .inbox-threads {
  gap: 7px;
}

body > .shell .inbox-item {
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 9px;
  min-height: 56px;
  padding: 7px 9px;
  border-radius: 14px;
}

body > .shell .inbox-item > img,
body > .shell .inbox-item-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

body > .shell .inbox-item > img.inbox-chat-icon {
  padding: 10px;
}

body > .shell .inbox-thread:not(.hidden) {
  height: 100%;
  grid-template-rows: auto auto minmax(0, 1fr);
}

body > .shell #dialogContent {
  display: grid;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) auto;
}

body > .shell .guest-messages {
  min-height: 0;
  max-height: none;
}

/* One outline icon family for the bottom navigation. */
.bottom-nav-item .nav-icon img {
  display: none;
}

.bottom-nav-item .nav-icon::before {
  content: "";
  width: 23px;
  height: 23px;
  background: currentColor;
  -webkit-mask: var(--nav-icon) center / contain no-repeat;
  mask: var(--nav-icon) center / contain no-repeat;
}

.bottom-nav-item .nav-home { --nav-icon: url("/assets/nav-icons/house.svg"); }
.bottom-nav-item .nav-gift { --nav-icon: url("/assets/nav-icons/gift.svg"); }
.bottom-nav-item .nav-qr { --nav-icon: url("/assets/nav-icons/qr-code.svg"); }
.bottom-nav-item .nav-history { --nav-icon: url("/assets/nav-icons/history.svg"); }
.bottom-nav-item .nav-profile { --nav-icon: url("/assets/nav-icons/circle-user-round.svg"); }

.bottom-nav-item.qr-nav-item .nav-icon::before {
  width: 24px;
  height: 24px;
}

.respect-card {
  justify-items: center;
  width: min(360px, 100%);
  text-align: center;
}

.respect-card h2 {
  padding: 0;
}

.respect-staff-photo {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border-radius: 50%;
  background: var(--club-blue-soft);
  background-position: center;
  background-size: cover;
  color: var(--club-blue);
  font-size: 28px;
  font-weight: 850;
  box-shadow: inset 0 0 0 1px rgba(0, 92, 169, 0.12);
}

.respect-staff-photo.has-photo span {
  display: none;
}

.respect-card > p {
  margin: 0;
}

.respect-card .respect-question {
  color: var(--club-muted);
  font-size: 14px;
}

.respect-actions {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.respect-actions .link-button,
.respect-actions .ghost-btn {
  min-height: 48px;
}

.respect-feedback-btn {
  grid-column: 1 / -1;
  min-height: 48px;
  border: 1px solid var(--club-line);
  border-radius: 14px;
  background: #fff;
  color: var(--club-blue);
  font-size: 15px;
  font-weight: 750;
}

/* Secondary pages start below the blue header instead of crossing its edge. */
body > .shell #giftsPage .page-heading,
body > .shell #historyPage .page-heading {
  padding-bottom: 22px;
}

body > .shell #giftsPage .gift-filter {
  position: sticky;
  top: calc(68px + env(safe-area-inset-top));
  margin: 16px 0 18px;
}

body > .shell #historyPage .history-panel {
  margin-top: 18px;
}

/* Profile menu and header actions. */
body > .shell .messages-btn {
  border: 1px solid rgba(255, 255, 255, .72);
  background: linear-gradient(145deg, #ffffff 6%, #d8efff 62%, #c9f27a 145%);
  color: var(--club-blue);
  box-shadow: 0 8px 22px rgba(0, 40, 82, .22), inset 0 1px 0 rgba(255, 255, 255, .92);
}

body > .shell .messages-btn .mail-glyph {
  filter: none;
}

.menu-glyph::before {
  width: 22px;
  height: 22px;
  background: currentColor;
  -webkit-mask: var(--menu-icon) center / contain no-repeat;
  mask: var(--menu-icon) center / contain no-repeat;
  content: "";
  transform: none;
}

.glyph-chat { --menu-icon: url("/assets/chat-cloud.svg?v=20260721"); }
.glyph-guide { --menu-icon: url("/assets/menu-icons/circle-help.svg"); }
.glyph-pin { --menu-icon: url("/assets/menu-icons/map-pin.svg"); }
.glyph-team { --menu-icon: url("/assets/menu-icons/users-round.svg"); }
.glyph-bell { --menu-icon: url("/assets/menu-icons/bell.svg"); }
.glyph-exit { --menu-icon: url("/assets/menu-icons/log-out.svg"); }

.menu-heart {
  color: #eb4b64;
}

body > .shell .menu-push-panel {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  padding: 9px 11px;
  border: 1px solid var(--club-line);
  border-radius: 15px;
  background: #fff;
}

body > .shell .menu-push-panel > div {
  min-width: 0;
}

body > .shell .menu-push-panel strong {
  margin: 0;
  color: var(--club-ink);
  font-size: 14px;
}

body > .shell .menu-push-panel p {
  margin: 2px 0 0;
  color: var(--club-muted);
  font-size: 11px;
  line-height: 1.3;
}

.notification-toggle {
  position: relative;
  flex: 0 0 auto;
  width: 50px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: #cbd4dc;
  cursor: pointer;
  transition: background 180ms var(--ease-out);
}

.notification-toggle > span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 7px rgba(16, 43, 65, .2);
  transition: transform 180ms var(--ease-out);
}

.notification-toggle.active {
  background: var(--club-blue);
}

.notification-toggle.active > span {
  transform: translateX(20px);
}

.notification-toggle:disabled {
  opacity: .6;
}

.broadcast-retention {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px auto;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 8px 11px;
  border: 1px solid rgba(0, 92, 169, .12);
  border-radius: 15px;
  background: #fff;
  color: var(--club-ink);
  font-size: 13px;
  font-weight: 750;
}

.broadcast-retention input {
  width: 76px;
  min-height: 36px;
  padding: 6px 8px;
  text-align: center;
}

.broadcast-retention small {
  color: var(--club-muted);
  font-size: 12px;
}
