/* =========================================================
   Plan Your Himalayan Trip — Banjara chat planner
   "Basecamp" layout: the chat app floats on a mountain
   backdrop, with a dark trip ticket beside it (a slide-up
   sheet on phones). Tokens come from style.css; the form
   fallback and shared bits live in trip-builder.css.
   ========================================================= */

.pc-pending .tb-shell,
.pc-pending .pc-stage,
.pc-pending .tb-intro { visibility: hidden; }

/* In chat mode the stage has its own headline */
.pc-mode-chat .tb-intro { display: none; }
.pc-mode-chat .tb-main { padding-bottom: 0; }

/* ---------- Stage ---------- */
.pc-stage {
  --pc-ink: #14140f;
  --pc-line: #e8e8e0;
  --pc-soft: #f4f4ee;
  position: relative;
  padding: clamp(28px, 4vw, 48px) 0 clamp(32px, 5vw, 64px);
  background:
    linear-gradient(180deg, rgba(14, 16, 12, 0.72) 0%, rgba(14, 16, 12, 0.55) 45%, var(--color-surface-muted) 100%),
    url('../images/home/hero-poster.jpg') center 35% / cover no-repeat;
}
.pc-stage[hidden] { display: none; }

.pc-stage-head { text-align: center; color: #fff; margin-bottom: clamp(18px, 3vw, 28px); }
.pc-stage-kicker {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-black);
  background: var(--color-accent);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
}
.pc-stage-head h1 { font-size: clamp(28px, 4.2vw, 46px); color: #fff; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35); }
.pc-stage-head h1 span { color: var(--color-accent); }
.pc-stage-head p { margin-top: 8px; font-size: clamp(14px, 1.5vw, 16.5px); color: rgba(255, 255, 255, 0.85); }

/* ---------- App frame ---------- */
.pc-app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  max-width: 1180px;
  height: min(780px, calc(100svh - 120px));
  min-height: 560px;
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 40px 90px -30px rgba(10, 12, 8, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
  padding: 0;
}

/* ---------- Chat column ---------- */
.pc-chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; }

.pc-chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--pc-line);
}
.pc-chat-id { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pc-chat-id strong { font-size: 16px; letter-spacing: -0.01em; }
.pc-chat-id small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-online { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--color-success); box-shadow: 0 0 0 3px rgba(47, 168, 79, 0.18); }

.pc-avatar {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--pc-ink);
  color: var(--color-accent);
}
.pc-avatar svg { width: 62%; height: 62%; }
.pc-avatar-lg { flex-basis: 42px; width: 42px; height: 42px; border-radius: 13px; }

.pc-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--pc-line);
  background: #fff;
  color: var(--color-text);
  border-radius: var(--radius-pill);
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 700;
}
.pc-icon-btn:hover { border-color: var(--pc-ink); }

/* ---------- Messages ---------- */
.pc-thread { --pc-dock-h: 100px; position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pc-thread:not(.is-welcome) .pc-messages { padding-bottom: calc(var(--pc-dock-h) + 14px); }
/* Soft floor under the docked mascot so scrolled-up bubbles fade out behind him */
.pc-thread:not(.is-welcome)::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 36px;
  background: linear-gradient(to top, var(--pc-soft), rgba(244, 244, 238, 0));
  pointer-events: none;
}

.pc-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 24px clamp(16px, 3vw, 32px) 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background:
    radial-gradient(circle at 1px 1px, rgba(20, 20, 15, 0.05) 1px, transparent 0) 0 0 / 18px 18px,
    var(--pc-soft);
}

.pc-msg { display: flex; gap: 10px; align-items: flex-start; max-width: min(640px, 90%); }
.pc-msg + .pc-msg:not(.pc-cont) { margin-top: 12px; }
.pc-msg-user { align-self: flex-end; flex-direction: row-reverse; }
.pc-msg .pc-avatar { margin-top: 2px; }
.pc-cont .pc-avatar { visibility: hidden; }

.pc-bubble {
  padding: 12px 16px;
  border-radius: 20px;
  font-size: 15px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.pc-msg-bot .pc-bubble {
  background: #fff;
  border-top-left-radius: 6px;
  box-shadow: 0 1px 2px rgba(20, 20, 15, 0.06), 0 6px 18px -10px rgba(20, 20, 15, 0.18);
}
.pc-msg-user .pc-bubble {
  background: var(--color-accent);
  color: var(--pc-ink);
  font-weight: 500;
  border-top-right-radius: 6px;
}
.pc-msg-error .pc-bubble { background: #fff8e1; box-shadow: inset 0 0 0 1px #f1d27a; }
.pc-bubble p + p, .pc-bubble p + ul, .pc-bubble p + ol, .pc-bubble ul + p, .pc-bubble ol + p { margin-top: 8px; }
.pc-bubble ul, .pc-bubble ol { margin: 6px 0 0; padding-left: 20px; }
.pc-bubble ul { list-style: disc; }
.pc-bubble ol { list-style: decimal; }
.pc-bubble li { padding-left: 2px; }
.pc-bubble li + li { margin-top: 4px; }
.pc-bubble li::marker { color: var(--color-accent-dark); font-weight: 700; }

/* "Plan updated" card inside the conversation */
.pc-update {
  align-self: flex-start;
  margin: 8px 0 4px 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--pc-ink);
  color: #fff;
  border: 0;
  border-radius: 16px;
  padding: 10px 14px 10px 10px;
  text-align: left;
  max-width: min(440px, 85%);
  transition: transform 0.15s ease;
}
.pc-update:hover { transform: translateY(-1px); }
.pc-update-icon {
  flex: 0 0 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--color-accent);
  color: var(--pc-ink);
  font-size: 16px;
}
.pc-update strong { display: block; font-size: 13.5px; }
.pc-update small { display: block; font-size: 12px; color: rgba(255, 255, 255, 0.68); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-update > span:last-child { margin-left: auto; color: var(--color-accent); font-size: 13px; font-weight: 700; white-space: nowrap; }

.pc-ready {
  align-self: stretch;
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: linear-gradient(120deg, var(--pc-ink), #2b2b20);
  color: #fff;
  border-radius: 20px;
  padding: 16px 18px;
}
.pc-ready p { flex: 1; min-width: 220px; font-size: 14px; color: rgba(255, 255, 255, 0.82); }
.pc-ready p strong { display: block; color: #fff; font-size: 16px; margin-bottom: 2px; }

.pc-typing { display: inline-flex; align-items: center; gap: 5px; padding: 15px 18px; }
.pc-typing i { width: 7px; height: 7px; border-radius: 50%; background: #a9a99e; animation: pc-bounce 1.2s infinite ease-in-out; }
.pc-typing i:nth-child(2) { animation-delay: 0.15s; }
.pc-typing i:nth-child(3) { animation-delay: 0.3s; }
.pc-typing em { font-style: normal; font-size: 12.5px; color: var(--color-text-muted); margin-left: 6px; }
@keyframes pc-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* ---------- Banjara mascot ----------
   A sprite sheet (10 x 6 frames) stepped by trip-chat.js; CSS adds
   the breathing, the thinking dots and the hop when a reply lands. */
.pc-mascot {
  position: relative;
  display: block;
  height: 100px;
  aspect-ratio: 190 / 240;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.pc-mascot-sprite {
  position: absolute;
  inset: 0;
  background: url('../images/mascot/banjara-sprite.webp?v=1') 0 0 / 1000% 600% no-repeat;
  transform-origin: 50% 100%;
  animation: pc-breathe 3.2s ease-in-out infinite;
}
.pc-mascot[data-state="think"] .pc-mascot-sprite { animation-duration: 4.8s; }
.pc-mascot[data-state="sit"] .pc-mascot-sprite,
.pc-mascot[data-state="rise"] .pc-mascot-sprite { animation: none; }
@keyframes pc-breathe {
  0%, 100% { transform: scale(1, 1); }
  50% { transform: scale(1.012, 1.022); }
}

/* Calm glow under him while he meditates */
.pc-mascot::before {
  content: '';
  position: absolute;
  left: -14%;
  right: -14%;
  bottom: -4%;
  height: 46%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(214, 255, 63, 0.55), rgba(214, 255, 63, 0));
  opacity: 0;
  transition: opacity 0.6s ease;
}
.pc-mascot[data-state="think"]::before { opacity: 1; animation: pc-glow 2.6s ease-in-out infinite; }
@keyframes pc-glow {
  0%, 100% { transform: scale(0.9); opacity: 0.55; }
  50% { transform: scale(1.06); opacity: 1; }
}

/* Thought dots drifting up beside his head */
.pc-mascot-dots { position: absolute; left: 74%; top: 22%; width: 34px; height: 30px; }
.pc-mascot-dots i {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1.5px var(--pc-ink);
  opacity: 0;
}
.pc-mascot-dots i:nth-child(1) { left: 0; bottom: 0; width: 5px; height: 5px; }
.pc-mascot-dots i:nth-child(2) { left: 8px; bottom: 9px; width: 7px; height: 7px; }
.pc-mascot-dots i:nth-child(3) { left: 18px; bottom: 19px; width: 10px; height: 10px; }
.pc-mascot[data-state="think"] .pc-mascot-dots i { animation: pc-dot 1.8s ease-in-out infinite; }
.pc-mascot[data-state="think"] .pc-mascot-dots i:nth-child(2) { animation-delay: 0.3s; }
.pc-mascot[data-state="think"] .pc-mascot-dots i:nth-child(3) { animation-delay: 0.6s; }
@keyframes pc-dot {
  0% { opacity: 0; transform: translateY(4px) scale(0.6); }
  35%, 70% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-4px) scale(0.9); }
}

/* Reply landed: a happy hop */
.pc-mascot.is-cheer { animation: pc-hop 0.65s cubic-bezier(0.3, 0.7, 0.4, 1); }
@keyframes pc-hop {
  0% { transform: translateY(0) scale(1, 1); }
  18% { transform: translateY(0) scale(1.06, 0.92); }
  45% { transform: translateY(-14%) scale(0.96, 1.05); }
  75% { transform: translateY(0) scale(1.04, 0.96); }
  100% { transform: translateY(0) scale(1, 1); }
}

/* Click tricks: a spin and a quip bubble */
.pc-mascot.is-spin { animation: pc-spin 0.8s ease-in-out; }
@keyframes pc-spin {
  0% { transform: rotateY(0) translateY(0); }
  40% { transform: rotateY(180deg) translateY(-8%); }
  100% { transform: rotateY(360deg) translateY(0); }
}
.pc-mascot-bubble {
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  margin-bottom: 4px;
  padding: 5px 10px;
  border-radius: 12px;
  background: #fff;
  color: var(--pc-ink);
  box-shadow: 0 0 0 1.5px var(--pc-ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  animation: pc-bubble 2.2s ease both;
}
@keyframes pc-bubble {
  0% { opacity: 0; transform: translate(-50%, 6px) scale(0.8); }
  10%, 85% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -4px) scale(1); }
}

.pc-mascot-dock { position: absolute; left: clamp(10px, 2.4vw, 26px); bottom: 4px; z-index: 1; height: var(--pc-dock-h); }
.is-welcome .pc-mascot-dock { display: none; }
.pc-mascot-lg { height: 150px; margin-bottom: -4px; }

.pc-avatar-face { background: var(--color-accent) url('../images/mascot/banjara-face.webp?v=1') center 30% / 112% no-repeat; }

@media (prefers-reduced-motion: reduce) {
  .pc-mascot-sprite, .pc-mascot::before, .pc-mascot-dots i, .pc-mascot.is-cheer, .pc-mascot.is-spin { animation: none !important; }
  .pc-mascot[data-state="think"] .pc-mascot-dots i { opacity: 1; }
}

/* ---------- Welcome state ---------- */
.pc-welcome { margin: auto 0; padding: 8px 0 12px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.pc-welcome .pc-avatar { width: 56px; height: 56px; flex-basis: 56px; border-radius: 18px; }
.pc-welcome h2 { font-size: clamp(22px, 2.6vw, 30px); margin-top: 6px; }
.pc-welcome > p { color: var(--color-text-muted); max-width: 470px; font-size: 15px; }
.pc-starts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; width: 100%; max-width: 680px; margin-top: 14px; }
.pc-start {
  position: relative;
  aspect-ratio: 3 / 4;
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  padding: 0;
  background: var(--pc-ink);
  color: #fff;
  text-align: left;
  box-shadow: 0 10px 24px -14px rgba(20, 20, 15, 0.6);
  transition: transform 0.18s ease;
}
.pc-start:hover { transform: translateY(-3px); }
.pc-start img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pc-start::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0) 60%); }
.pc-start span { position: absolute; left: 12px; right: 12px; bottom: 11px; z-index: 1; font-weight: 700; font-size: 14px; line-height: 1.25; }
.pc-start small { display: block; font-weight: 500; font-size: 11.5px; opacity: 0.8; margin-top: 2px; }

/* ---------- Composer ---------- */
.pc-compose { padding: 10px clamp(12px, 2.5vw, 24px) 12px; background: var(--pc-soft); }
.pc-fallback { margin-bottom: 8px; }
.pc-fallback[hidden] { display: none; }

.pc-suggestions {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 2px 10px;
  mask-image: linear-gradient(90deg, #000 92%, transparent);
}
.pc-suggestions::-webkit-scrollbar { display: none; }
.pc-suggestions:empty { display: none; }
.pc-chip {
  flex: 0 0 auto;
  border: 1.5px solid var(--pc-ink);
  background: #fff;
  border-radius: var(--radius-pill);
  padding: 8px 15px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.15s ease;
}
.pc-chip:hover { background: var(--color-accent); transform: translateY(-1px); }

.pc-input {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: #fff;
  border-radius: 26px;
  padding: 6px 6px 6px 18px;
  box-shadow: 0 0 0 1.5px var(--pc-line), 0 8px 24px -14px rgba(20, 20, 15, 0.35);
  transition: box-shadow 0.15s ease;
}
.pc-input:focus-within { box-shadow: 0 0 0 2px var(--pc-ink), 0 8px 24px -14px rgba(20, 20, 15, 0.35); }
.pc-input textarea {
  flex: 1;
  resize: none;
  border: 0;
  outline: none;
  font: inherit;
  font-size: 15.5px;
  line-height: 1.45;
  padding: 9px 0;
  max-height: 140px;
  background: transparent;
  color: var(--color-text);
}
.pc-send {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: var(--pc-ink);
  color: var(--color-accent);
  display: grid;
  place-items: center;
  transition: transform 0.15s ease;
}
.pc-send:hover:not(:disabled) { transform: scale(1.06); }
.pc-send:disabled { opacity: 0.35; cursor: default; }

.pc-alt { text-align: center; font-size: 12px; color: var(--color-text-muted); margin-top: 9px; }
.pc-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pc-back { margin: 0 auto 14px; display: block; max-width: 920px; text-align: left; font-size: 13px; }
.pc-back[hidden] { display: none; }

.pc-trip-pill { display: none; }

/* ---------- Trip ticket ---------- */
.pc-trip {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--pc-ink);
  color: #fff;
  position: relative;
}
.pc-trip-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 22px 22px 18px;
  border-bottom: 2px dashed rgba(255, 255, 255, 0.14);
  position: relative;
}
/* Ticket notches */
.pc-trip-head::before, .pc-trip-head::after {
  content: '';
  position: absolute;
  bottom: -11px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
}
.pc-trip-head::before { left: -10px; }
.pc-trip-head::after { right: -10px; }
.pc-trip-head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pc-trip-kicker { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-accent); }
.pc-trip-head strong { font-size: 19px; line-height: 1.25; letter-spacing: -0.01em; }
.pc-trip-head small { font-size: 12.5px; color: rgba(255, 255, 255, 0.62); }
.pc-trip-close { display: none; }

.pc-trip-body { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 22px; scrollbar-color: #3a3a30 transparent; }
.pc-trip-empty { text-align: center; padding: 26px 8px; color: rgba(255, 255, 255, 0.6); font-size: 14px; }
.pc-trip-empty b { display: block; font-size: 34px; margin-bottom: 8px; }

/* Route strip: the nights in order */
.pc-route { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 4px; margin-bottom: 18px; }
.pc-route span {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.pc-route span:first-child, .pc-route span:last-child { background: var(--color-accent); color: var(--pc-ink); border-color: var(--color-accent); }
.pc-route i { width: 10px; height: 2px; background: rgba(255, 255, 255, 0.3); border-radius: 2px; }

.pc-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 18px; }
.pc-facts div { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px; padding: 9px 11px; min-width: 0; }
.pc-facts div.wide { grid-column: 1 / -1; }
.pc-facts dt { font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.5); margin-bottom: 2px; }
.pc-facts dd { margin: 0; font-size: 13.5px; line-height: 1.35; overflow-wrap: anywhere; }

.pc-days-title { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.5); margin-bottom: 8px; }
.pc-days { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pc-days details { background: rgba(255, 255, 255, 0.04); border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.06); }
.pc-days details[open] { background: rgba(255, 255, 255, 0.08); }
.pc-days summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
}
.pc-days summary::-webkit-details-marker { display: none; }
.pc-day-num {
  flex: 0 0 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(214, 255, 63, 0.14);
  color: var(--color-accent);
  font-size: 12px;
  font-weight: 800;
}
.pc-days summary b { font-weight: 600; flex: 1; min-width: 0; }
.pc-days summary::after { content: '+'; color: rgba(255, 255, 255, 0.45); font-size: 16px; }
.pc-days details[open] summary::after { content: '–'; }
.pc-day-more { padding: 0 12px 11px 46px; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: rgba(255, 255, 255, 0.7); line-height: 1.45; }
.pc-day-more em { font-style: normal; color: var(--color-accent); }

.pc-trip-foot { padding: 16px 22px 20px; border-top: 1px solid rgba(255, 255, 255, 0.1); display: flex; flex-direction: column; gap: 8px; text-align: center; }
.pc-trip-foot small { font-size: 11.5px; color: rgba(255, 255, 255, 0.55); }
.pc-cta {
  width: 100%;
  border: 0;
  border-radius: var(--radius-pill);
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 800;
  background: var(--color-accent);
  color: var(--pc-ink);
  box-shadow: 0 8px 22px -10px rgba(214, 255, 63, 0.8);
  transition: transform 0.15s ease;
}
.pc-cta:hover:not(:disabled) { transform: translateY(-1px); }
.pc-cta:disabled { background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.45); box-shadow: none; cursor: default; }
.pc-trip.is-flash .pc-trip-head { animation: pc-flash 1.2s ease; }
@keyframes pc-flash { 0% { background: rgba(214, 255, 63, 0.25); } 100% { background: transparent; } }

/* ---------- Send dialog ---------- */
.pc-dialog {
  width: min(480px, calc(100vw - 32px));
  border: 0;
  border-radius: 24px;
  padding: 28px 24px 24px;
  box-shadow: 0 30px 80px rgba(20, 20, 15, 0.35);
  color: var(--color-text);
}
.pc-dialog::backdrop { background: rgba(20, 20, 15, 0.6); backdrop-filter: blur(3px); }
.pc-dialog h2 { font-size: 22px; margin: 0 28px 18px 0; }
.pc-dialog form { display: flex; flex-direction: column; gap: 12px; position: relative; }
.pc-dialog form[hidden], .pc-done[hidden] { display: none; }
.pc-dialog-close {
  position: absolute;
  top: -12px;
  right: -8px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: var(--color-surface-muted);
  font-size: 22px;
  line-height: 1;
}
.pc-field { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 600; }
.pc-field small { color: var(--color-text-muted); font-weight: 500; }
.pc-done { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }

/* ---------- Tablets & phones ---------- */
@media (max-width: 960px) {
  .pc-app { grid-template-columns: 1fr; position: relative; }
  .pc-hint { display: none; }

  /* The ticket becomes a slide-up sheet */
  .pc-trip {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 82%;
    border-radius: 24px 24px 0 0;
    transform: translateY(105%);
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 5;
    box-shadow: 0 -20px 40px -20px rgba(0, 0, 0, 0.5);
  }
  .pc-trip.is-open { transform: translateY(0); }
  .pc-trip-head::before, .pc-trip-head::after { display: none; }
  .pc-trip-close {
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    height: 34px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 22px;
    line-height: 1;
  }
  .pc-sheet-scrim { position: absolute; inset: 0; background: rgba(10, 12, 8, 0.45); z-index: 4; }
  .pc-sheet-scrim[hidden] { display: none; }

  .pc-trip-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    background: var(--pc-ink);
    color: #fff;
    border-radius: var(--radius-pill);
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 10px;
  }
  .pc-trip-pill[hidden] { display: none; }
  .pc-trip-pill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-accent); }
}

@media (max-width: 640px) {
  .pc-stage { padding: 14px 0 0; background-position: center top; }
  .pc-stage-head { margin-bottom: 12px; }
  .pc-stage-head p { display: none; }
  .pc-stage-kicker { display: none; }
  .pc-stage-head h1 { font-size: 24px; }
  .pc-app {
    height: calc(100svh - 64px - 56px);
    min-height: 480px;
    border-radius: 22px 22px 0 0;
    margin: 0;
  }
  .pc-stage .container.pc-app { padding: 0; }
  .pc-chat-head { padding: 12px 14px; }
  .pc-icon-btn span { display: none; }
  .pc-msg { max-width: 94%; }
  .pc-thread { --pc-dock-h: 78px; }
  .pc-mascot-lg { height: 118px; }
  .pc-bubble { font-size: 14.5px; }
  .pc-update { margin-left: 0; }
  .pc-starts { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pc-start { aspect-ratio: 4 / 3; }
  .pc-welcome > p { font-size: 14px; }
}
