:root {
  color-scheme: light;
  --ink: #13211f;
  --muted: #667370;
  --line: rgba(24, 56, 52, 0.13);
  --panel: rgba(255, 255, 255, 0.72);
  --panel-strong: rgba(255, 255, 255, 0.9);
  --mint: #d6faf1;
  --aqua: #aef0e5;
  --leaf: #caead6;
  --lime: #dfff00;
  --shadow: 0 22px 70px rgba(21, 58, 55, 0.14);
  --radius: 24px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "SF Pro Text", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 255, 255, 0.46) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.42) 1px, transparent 1px),
    radial-gradient(circle at 12% 22%, rgba(177, 239, 231, 0.78), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(214, 249, 219, 0.88), transparent 26%),
    radial-gradient(circle at 76% 82%, rgba(165, 225, 218, 0.64), transparent 31%),
    linear-gradient(145deg, #f8fffd 0%, #ddf7f2 46%, #eefbf2 100%);
  background-size: 86px 86px, 86px 86px, auto, auto, auto, auto;
  overflow: hidden;
}

button,
textarea,
a {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.web-app {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 300px;
  height: 100vh;
  height: 100dvh;
  padding: 16px;
  gap: 16px;
}

.side-rail,
.context-panel,
.chat-shell {
  min-height: 0;
}

.side-rail {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(246, 255, 252, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 720;
  letter-spacing: 0;
}

.brand-mark img {
  width: 42px;
  height: 46px;
  object-fit: contain;
}

.new-chat,
.saved-item,
.admin-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #172724;
  background: rgba(255, 255, 255, 0.65);
  text-align: left;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.new-chat:hover,
.saved-item:hover,
.admin-link:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(33, 116, 105, 0.28);
}

.new-chat span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--lime);
  font-size: 21px;
  line-height: 1;
}

.rail-section {
  display: grid;
  gap: 8px;
}

.rail-section p,
.eyebrow {
  margin: 0;
  color: rgba(19, 33, 31, 0.54);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.chat-list {
  display: grid;
  gap: 8px;
  overflow: auto;
}

.chat-list button {
  min-height: 38px;
  padding: 9px 10px;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  text-align: left;
}

.chat-list button.is-active,
.chat-list button:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.65);
}

.admin-link {
  margin-top: auto;
  justify-content: center;
  color: rgba(19, 33, 31, 0.67);
  font-size: 14px;
}

.chat-shell {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(44, 103, 94, 0.16);
  border-radius: 30px;
  background: rgba(250, 255, 253, 0.58);
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px);
}

.topbar {
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 16px 20px 10px;
}

.location-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  max-width: 430px;
  padding: 10px 14px;
  border: 1px solid rgba(41, 154, 139, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 30px rgba(21, 58, 55, 0.07);
  text-align: left;
}

.location-chip strong,
.location-chip small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-chip strong {
  font-size: 17px;
  font-weight: 650;
}

.location-chip small,
.city-now {
  color: var(--muted);
  font-size: 13px;
}

.pin-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #16b49d;
  box-shadow: 0 0 0 7px rgba(22, 180, 157, 0.12);
}

.city-now {
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.top-actions {
  display: flex;
  justify-content: flex-end;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #183834;
  box-shadow: 0 10px 26px rgba(21, 58, 55, 0.1);
}

.ticker-shell {
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 20px 10px;
  padding: 7px 10px;
  overflow: hidden;
  border: 1px solid rgba(41, 154, 139, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
}

.ticker-eye {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(214, 250, 241, 0.88);
  color: #1b5d54;
}

.ticker-track {
  display: flex;
  gap: 36px;
  min-width: max-content;
  color: rgba(19, 33, 31, 0.68);
  font-size: 13px;
  animation: tickerMove 44s linear infinite;
}

.ticker-track b {
  margin-right: 5px;
  color: #0f8f7e;
}

.ticker-shell.is-hidden .ticker-track {
  opacity: 0;
}

@keyframes tickerMove {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.conversation {
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  padding: 12px clamp(22px, 8vw, 110px) 22px;
  scroll-behavior: smooth;
}

.conversation.is-empty {
  pointer-events: none;
}

.welcome-panel {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 20px;
  padding: 110px clamp(22px, 8vw, 110px) 150px;
  transition: opacity 220ms ease, transform 220ms ease;
}

.chat-shell.has-messages .welcome-panel {
  pointer-events: none;
  opacity: 0;
  transform: translateY(-10px);
}

.welcome-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.welcome-logo img {
  width: 70px;
  height: 78px;
  object-fit: contain;
  filter: drop-shadow(0 16px 24px rgba(8, 45, 41, 0.12));
}

.welcome-logo h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.95;
  letter-spacing: 0;
}

.welcome-panel p {
  max-width: 620px;
  margin: 0;
  color: rgba(19, 33, 31, 0.68);
  font-size: 18px;
  line-height: 1.5;
  text-align: center;
}

.starter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 230px));
  gap: 10px;
  width: min(100%, 480px);
}

.starter-grid button {
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
  color: rgba(19, 33, 31, 0.76);
  text-align: left;
}

.message {
  display: grid;
  gap: 10px;
  max-width: 780px;
  font-size: 16px;
  line-height: 1.55;
}

.message.user {
  align-self: flex-end;
  max-width: 660px;
  padding: 13px 16px;
  border: 1px solid rgba(19, 33, 31, 0.08);
  border-radius: 18px 18px 6px 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 32px rgba(21, 58, 55, 0.08);
}

.message.ai {
  align-self: flex-start;
  padding: 15px 17px;
  border: 1px solid rgba(41, 154, 139, 0.12);
  border-radius: 18px 18px 18px 6px;
  background: rgba(246, 255, 252, 0.82);
  box-shadow: 0 12px 34px rgba(21, 58, 55, 0.07);
}

.message p {
  margin: 0;
}

.thinking {
  width: fit-content;
  color: rgba(19, 33, 31, 0.58);
  font-size: 14px;
}

.thinking span {
  display: inline-block;
  animation: thinkingPulse 1.15s ease-in-out infinite;
}

@keyframes thinkingPulse {
  0%,
  100% {
    opacity: 0.38;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-1px);
  }
}

.choice-row,
.cards-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice-row button {
  min-height: 38px;
  padding: 9px 13px;
  border: 1px solid rgba(41, 154, 139, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: #1b4d47;
}

.place-card {
  display: grid;
  gap: 8px;
  width: min(100%, 220px);
  padding: 12px;
  border: 1px solid rgba(19, 33, 31, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.place-card strong {
  font-weight: 680;
}

.place-card span {
  color: var(--muted);
  font-size: 13px;
}

.video-message {
  overflow: hidden;
  max-width: 560px;
  padding: 0;
}

.video-message strong,
.video-message p,
.video-message span {
  padding-right: 16px;
  padding-left: 16px;
}

.video-message strong {
  padding-top: 14px;
  font-weight: 680;
}

.video-message span {
  padding-bottom: 15px;
  color: var(--muted);
  font-size: 13px;
}

.video-card-player {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 14;
  max-height: 560px;
  object-fit: cover;
  background: #0f1816;
}

.video-tiktok-frame {
  display: grid;
  width: 100%;
  min-height: 360px;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 45, 196, 0.28), transparent 36%),
    radial-gradient(circle at 82% 88%, rgba(0, 242, 234, 0.26), transparent 38%),
    #0f1115;
  color: #ffffff;
  font-weight: 760;
  text-decoration: none;
}

.composer {
  z-index: 6;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  width: min(900px, calc(100% - 40px));
  margin: 0 auto 18px;
  padding: 10px;
  border: 1px solid rgba(21, 58, 55, 0.16);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 60px rgba(21, 58, 55, 0.15);
}

.composer-add,
.send-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  font-size: 24px;
}

.composer-add {
  background: transparent;
  color: #23302e;
}

.send-button {
  background: #12201d;
  color: white;
  font-size: 25px;
  line-height: 1;
}

.composer textarea {
  display: block;
  width: 100%;
  max-height: 150px;
  min-height: 44px;
  padding: 11px 4px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
}

.context-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.context-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(246, 255, 252, 0.7);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.context-card h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.05;
}

.context-card p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.mini-places {
  display: grid;
  gap: 9px;
}

.mini-places article {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.65);
}

.mini-places strong {
  font-weight: 650;
}

.mini-places span {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1120px) {
  .web-app {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .context-panel {
    display: none;
  }
}

@media (max-width: 760px) {
  body {
    overflow: auto;
  }

  .web-app {
    grid-template-columns: 1fr;
    height: 100dvh;
    padding: 0;
  }

  .side-rail {
    display: none;
  }

  .chat-shell {
    border: 0;
    border-radius: 0;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 14px 14px 8px;
  }

  .city-now {
    grid-column: 1 / -1;
    padding-left: 46px;
  }

  .ticker-shell {
    margin-inline: 14px;
  }

  .conversation {
    padding: 10px 14px 20px;
  }

  .welcome-panel {
    padding: 96px 18px 138px;
  }

  .welcome-logo img {
    width: 54px;
    height: 60px;
  }

  .welcome-logo h1 {
    font-size: 40px;
  }

  .welcome-panel p {
    font-size: 15px;
  }

  .starter-grid {
    grid-template-columns: 1fr;
  }

  .composer {
    width: calc(100% - 20px);
    margin-bottom: max(10px, env(safe-area-inset-bottom));
    border-radius: 24px;
  }
}
