@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --bg-1: #ffffff;
  --bg-2: #f8fafc;
  --panel: rgba(255, 255, 255, 0.95);
  --panel-soft: rgba(248, 250, 252, 0.95);
  --line: rgba(15, 23, 42, 0.08);
  --ink: #0f172a;
  --muted: #64748b;
  --team-red: #1d4ed8;
  --team-gold: #ea580c;
  --user: #1d4ed8;
  --bot: rgba(15, 23, 42, 0.03);
  --ok: #1d4ed8;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(29, 78, 216, 0.05), transparent 32%),
    radial-gradient(circle at top right, rgba(234, 88, 12, 0.03), transparent 22%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
  color: var(--ink);
  font-family: "Manrope", sans-serif;
}

.app {
  max-width: 430px;
  height: 100dvh;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  background: #ffffff;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at top right, rgba(29, 78, 216, 0.05), transparent 24%),
    linear-gradient(135deg, #f8fafc, #f1f5f9);
}

.crest {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: "Fraunces", serif;
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(160deg, #1d4ed8 0%, #1e40af 100%);
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.2);
}

.title-group h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.02;
  letter-spacing: 0.2px;
  font-family: "Fraunces", serif;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 10px;
  color: var(--team-red);
}

.title-group p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.status-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--ok);
  box-shadow: 0 0 0 5px rgba(20, 173, 121, 0.14);
}

#status-text {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.dashboard-link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(29, 78, 216, 0.2);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  background: #1d4ed8;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.15);
}

.dashboard-link svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.dashboard-link:hover,
.dashboard-link:focus-visible {
  background: rgba(29, 78, 216, 0.08);
  border-color: rgba(29, 78, 216, 0.2);
}

.header-dashboard {
  align-self: start;
}

.quick-menu {
  margin-left: auto;
  display: flex;
  gap: 10px;
}

.quick-menu.is-hidden {
  visibility: hidden;
  pointer-events: none;
}

.quick-icon {
  border: 0;
  background: transparent;
  display: grid;
  justify-items: center;
  gap: 3px;
  color: #4b6170;
  min-width: 52px;
  padding: 0;
}

.quick-glyph {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid #ccbba0;
  background: #fffaf0;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(79, 60, 35, 0.12);
}

.quick-icon svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.quick-label {
  font-size: 10px;
  line-height: 1;
  color: #5a6d79;
  font-weight: 700;
}

.quick-icon.food {
  color: #2f7a4f;
}

.quick-icon.food .quick-glyph {
  border-color: #9ac8a9;
  background: #f2fbf4;
}

.quick-icon.merch {
  color: #5f4b8b;
}

.quick-icon.merch .quick-glyph {
  border-color: #b9acd6;
  background: #f7f3ff;
}

.quick-icon.tickets {
  color: #2f647e;
}

.quick-icon.tickets .quick-glyph {
  border-color: #9ebfd1;
  background: #f1f8fc;
}

.quick-icon.danger {
  color: #7d2c3a;
}

.quick-icon.danger .quick-glyph {
  border-color: #cb8f97;
  background: #fff7f8;
}

.quick-icon:hover,
.quick-icon:focus-visible {
  transform: translateY(-1px);
}

.quick-icon:hover .quick-glyph,
.quick-icon:focus-visible .quick-glyph {
  border-color: #bfa57d;
}

.chat {
  min-height: 0;
  overflow-y: auto;
  padding: 14px 12px;
  display: grid;
  align-content: start;
  justify-items: start;
  grid-auto-rows: max-content;
  gap: 10px;
}

.msg {
  max-width: 88%;
  width: fit-content;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.35;
  animation: bubble-in 150ms ease;
}

.msg.bot {
  justify-self: start;
  background: var(--bot);
  border: 1px solid var(--line);
  color: var(--ink);
}

.msg.user {
  justify-self: end;
  background: var(--user);
  border: 1px solid var(--user);
  color: #ffffff;
}

.msg.system {
  justify-self: center;
  background: rgba(234, 88, 12, 0.05);
  border: 1px dashed rgba(234, 88, 12, 0.2);
  color: #450a0a;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.typing {
  width: 64px;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  align-items: center;
}

.typing span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #8ea2b1;
  animation: pulse 900ms infinite ease-in-out;
}

.typing span:nth-child(2) {
  animation-delay: 120ms;
}

.typing span:nth-child(3) {
  animation-delay: 240ms;
}

.offer-card {
  justify-self: start;
  max-width: 92%;
  background: linear-gradient(145deg, #fffaf2 0%, #f8ecdc 100%);
  border: 1px solid #d5c3a5;
  border-radius: 14px;
  padding: 12px;
}

.offer-tag {
  margin: 0 0 6px;
  color: #8c6a2f;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.offer-card h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.1;
}

.offer-copy {
  margin: 7px 0 9px;
  color: #556873;
  font-size: 14px;
}

.offer-prices {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.offer-prices span {
  display: inline-block;
  border: 1px solid #cdb999;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
}

.offer-prices .now {
  border-color: #d67f8d;
  color: #7d2a39;
  background: rgba(207, 46, 68, 0.1);
}

.offer-prices .later {
  border-color: #bda785;
  color: #5a4a33;
}

.product-gallery {
  justify-self: stretch;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  overflow: visible;
  padding: 2px 0 6px;
}

.product-card {
  background: #fffaf0;
  border: 1px solid #d6c4a8;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(89, 67, 35, 0.1);
}

.product-media {
  width: 100%;
  height: 118px;
  background: linear-gradient(180deg, #fff8ea 0%, #f3e5cf 100%);
  border-bottom: 1px solid #d6c4a8;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-media-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #6d7e89;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

.product-details {
  padding: 10px;
  display: grid;
  gap: 6px;
}

.product-category {
  margin: 0;
  color: #8c6a2f;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.product-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
  font-family: "Barlow", "Avenir Next", sans-serif;
}

.product-meta {
  margin: 0;
  color: #5f7280;
  font-size: 12px;
}

.product-price {
  margin: 0;
  color: #ff8a9a;
  font-size: 18px;
  font-weight: 700;
  font-family: "Barlow", "Avenir Next", sans-serif;
}

.product-action {
  border: 1px solid #cb2f43;
  border-radius: 10px;
  background: linear-gradient(160deg, #ca2e42 0%, #a31a2d 100%);
  color: #fff7f7;
  font-size: 14px;
  font-weight: 700;
  padding: 9px 10px;
}

.product-action:hover,
.product-action:focus-visible {
  filter: brightness(1.08);
}

.product-action:disabled {
  opacity: 0.6;
}

.composer {
  border-top: 1px solid var(--line);
  background: #fff8ec;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.composer-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #6f5c3f;
  font-weight: 700;
}

.prompt {
  margin: 0;
  font-size: 13px;
  color: #5f7280;
}

.choices {
  display: grid;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 2px;
}

.choices.choices-2x2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: none;
  overflow: visible;
}

.choice {
  border: 1px solid #ccbca1;
  background: #fffdf9;
  color: #243037;
  border-radius: 12px;
  text-align: left;
  padding: 9px 10px;
  font-weight: 700;
  font-size: 15px;
}

.choices.choices-2x2 .choice {
  min-height: 82px;
  padding: 8px;
  font-size: 13px;
}

.choice small {
  display: block;
  margin-top: 2px;
  color: #738592;
  font-size: 12px;
  font-weight: 500;
}

.choices.choices-2x2 .choice small {
  font-size: 11px;
  line-height: 1.2;
}

.choice:hover,
.choice:focus-visible {
  background: #f7efdf;
  border-color: #c8b18a;
}

.choice:disabled {
  opacity: 0.6;
}

.text-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.text-form input {
  width: 100%;
  border: 1px solid #cbbda4;
  border-radius: 10px;
  background: #ffffff;
  color: #243037;
  font-size: 16px;
  padding: 10px;
  outline: none;
}

.text-form input::placeholder {
  color: #788a97;
}

.text-form input:focus {
  border-color: #b79f78;
}

.text-form button {
  border: 1px solid #cb2f43;
  border-radius: 10px;
  background: linear-gradient(160deg, #ca2e42 0%, #a31a2d 100%);
  color: #fff5f7;
  font-size: 16px;
  font-weight: 700;
  padding: 0 14px;
}

.text-form button:hover,
.text-form button:focus-visible {
  filter: brightness(1.1);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
}

@keyframes bubble-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {

  0%,
  70%,
  100% {
    transform: translateY(0);
    opacity: 0.6;
  }

  35% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

@media (max-width: 430px) {
  .app {
    border: 0;
    max-width: 100%;
  }

  .title-group h1 {
    font-size: 20px;
  }

  .top {
    grid-template-columns: auto 1fr;
    gap: 10px;
  }

  .header-dashboard {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .quick-menu {
    gap: 4px;
  }

  .quick-glyph {
    width: 34px;
    height: 34px;
  }

  .quick-icon svg {
    width: 16px;
    height: 16px;
  }

  .quick-label {
    font-size: 9px;
  }

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

  .product-media {
    height: 102px;
  }

  .product-details {
    gap: 5px;
    padding: 8px;
  }

  .product-title {
    font-size: 14px;
  }

  .product-meta {
    font-size: 11px;
  }

  .product-price {
    font-size: 16px;
  }

  .product-action {
    font-size: 13px;
    padding: 8px;
  }
}

@media (max-width: 360px) {
  .product-gallery {
    grid-template-columns: 1fr;
  }
}

/* 360Engage Pro Classic reskin */
.quick-glyph,
.choice,
.offer-card,
.product-card,
.composer,
.status-strip,
.scene-card,
.journey-progress,
.chat-head,
.text-form input {
  border-color: rgba(15, 23, 42, 0.08);
}

.choice,
.offer-card,
.product-card,
.scene-card,
.journey-progress,
.chat-head,
.text-form input {
  background: #ffffff;
}

.quick-glyph {
  background: #f8fafc;
}

.quick-label,
.prompt,
.offer-copy,
.product-meta,
.scene-card p,
.choice small,
.journey-pill,
.chat-mode,
.text-form input::placeholder,
#status-text,
.title-group p {
  color: var(--muted);
}

.quick-icon.food,
.quick-icon.merch,
.quick-icon.tickets,
.quick-icon.danger {
  color: #1d4ed8;
}

.quick-label {
  color: #64748b;
}

.offer-tag {
  color: #ea580c;
}

.quick-icon.food .quick-glyph,
.quick-icon.merch .quick-glyph,
.quick-icon.tickets .quick-glyph,
.quick-icon.danger .quick-glyph {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.1);
}

.msg.bot {
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: var(--ink);
}

.msg.user {
  background: #1d4ed8;
  border: 1px solid rgba(29, 78, 216, 0.8);
  color: #ffffff;
}

.msg.system {
  background: rgba(234, 88, 12, 0.05);
  border: 1px dashed rgba(234, 88, 12, 0.25);
  color: #9a3412;
}

.product-media,
.offer-mini,
.offer-feature,
.composer {
  background: #f8fafc;
}

.product-card,
.offer-card,
.offer-mini,
.offer-feature,
.choice,
.scene-card,
.composer,
.text-form input {
  color: var(--ink);
}

.product-action,
.text-form button {
  border-color: rgba(29, 78, 216, 0.3);
  background: linear-gradient(160deg, #1d4ed8 0%, #1e40af 100%);
  color: #ffffff;
}

.offer-prices .now {
  border-color: rgba(234, 88, 12, 0.28);
  color: #c2410c;
  background: rgba(234, 88, 12, 0.1);
}

.offer-prices .later {
  border-color: rgba(15, 23, 42, 0.16);
  color: #64748b;
}

.choice:hover,
.choice:focus-visible,
.option-btn:hover {
  background: rgba(29, 78, 216, 0.05);
}

.option-btn {
  border-color: rgba(15, 23, 42, 0.14);
  background: #ffffff;
  color: var(--ink);
}

.journey-track {
  background: #f1f5f9;
}

.journey-fill {
  background: linear-gradient(90deg, #60a5fa 0%, #1d4ed8 100%);
}

.journey-pill {
  border-color: rgba(15, 23, 42, 0.14);
  background: #ffffff;
}

.journey-pill.is-active {
  color: #ffffff;
  border-color: rgba(29, 78, 216, 0.32);
  background: #1d4ed8;
}

.journey-pill.is-done {
  color: #1e40af;
  border-color: rgba(29, 78, 216, 0.2);
  background: rgba(29, 78, 216, 0.1);
}