: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;
}

.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-bottom {
  display: grid;
  gap: 8px;
}

.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-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-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;
}

.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;
}

.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-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;
  }
}
