:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #667085;
  --soft: rgba(255, 255, 255, 0.34);
  --soft-strong: rgba(255, 255, 255, 0.58);
  --line: rgba(255, 255, 255, 0.5);
  --shadow: 0 20px 60px rgba(23, 32, 51, 0.13);
  --radius: 18px;
  --panel-radius: 28px;
  --blue: #54b7df;
  --mint: #5fd2b2;
  --coral: #ff8f7c;
  --rose: #e887b6;
  --gold: #f2bf5e;
  --lavender: #9d8df1;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
  background:
    linear-gradient(120deg, rgba(255, 248, 214, 0.95), rgba(221, 247, 255, 0.9) 28%, rgba(255, 229, 237, 0.92) 58%, rgba(216, 246, 234, 0.95)),
    #f7fbff;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(100deg, rgba(84, 183, 223, 0.2), transparent 30%, rgba(255, 143, 124, 0.14) 62%, transparent 82%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0, rgba(255, 255, 255, 0.14) 1px, transparent 1px, transparent 18px);
}

.page-sheen {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.58), transparent 34%, rgba(255, 255, 255, 0.26) 72%, transparent);
  filter: blur(22px);
  transform: skewY(-6deg);
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: min(720px, 86svh);
  padding: 22px 18px 34px;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -2;
  transform: scale(1.02);
}

.hero-tint {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(12, 22, 39, 0.72), rgba(12, 22, 39, 0.26) 52%, rgba(255, 255, 255, 0.1)),
    linear-gradient(0deg, rgba(248, 251, 255, 0.78), transparent 44%);
}

.top-nav {
  position: absolute;
  top: 16px;
  left: 50%;
  z-index: 4;
  display: flex;
  gap: 6px;
  width: min(94vw, 680px);
  padding: 6px;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.top-nav a {
  flex: 1 0 auto;
  min-width: 82px;
  padding: 10px 12px;
  color: #fff;
  text-align: center;
  text-decoration: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.22);
  transition: transform 180ms ease, background 180ms ease;
}

.top-nav a:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  width: min(1100px, 100%);
  margin: 0 auto;
  padding-top: 80px;
}

.hero-copy {
  max-width: 760px;
  color: #fff;
  animation: rise-in 680ms ease both;
}

.eyebrow {
  margin: 0 0 8px;
  color: rgba(23, 32, 51, 0.68);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow,
.trip-progress .eyebrow {
  color: rgba(255, 255, 255, 0.76);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: 3rem;
  line-height: 1.02;
  letter-spacing: 0;
  text-wrap: balance;
  text-shadow: 0 18px 54px rgba(0, 0, 0, 0.34);
}

.hero-subtitle {
  max-width: 620px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.08rem;
  text-shadow: 0 10px 32px rgba(0, 0, 0, 0.26);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(18px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 16px;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
  filter: saturate(1.05);
}

.button:focus-visible,
.icon-button:focus-visible,
.accordion-trigger:focus-visible,
.vote-option:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(84, 183, 223, 0.45);
  outline-offset: 3px;
}

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, #2f9fda, #63d1b6 58%, #ff9a7d);
  box-shadow: 0 16px 32px rgba(47, 159, 218, 0.26);
}

.button-soft {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px);
}

.glass-panel,
.overview-card,
.activity-card,
.day-panel,
.mini-card {
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  background: var(--soft);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.trip-progress {
  padding: 18px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  animation: rise-in 760ms ease both;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-title h2,
.panel-title h3 {
  margin: 0;
}

.icon-disc {
  display: inline-grid;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #fff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--mint));
  box-shadow: 0 12px 26px rgba(84, 183, 223, 0.24);
}

.icon-disc.mint {
  background: linear-gradient(135deg, var(--mint), #8fe2cc);
}

.icon-disc.coral {
  background: linear-gradient(135deg, var(--coral), #f6bf72);
}

.icon-disc.sky {
  background: linear-gradient(135deg, var(--blue), #8fdaf1);
}

.icon-disc.lavender {
  background: linear-gradient(135deg, var(--lavender), var(--rose));
}

.progress-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.progress-list li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.16);
}

.progress-list span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  font-weight: 800;
}

.progress-list strong {
  font-size: 0.96rem;
}

main {
  width: min(1100px, calc(100% - 28px));
  margin: 0 auto;
}

.section {
  padding: 34px 0;
}

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

.section-heading.compact {
  align-items: center;
  margin-bottom: 14px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.9rem;
  line-height: 1.12;
}

.text-link {
  color: #19739e;
  font-weight: 800;
  text-decoration: none;
}

.overview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.overview-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  animation: rise-in 600ms ease both;
}

.overview-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.day-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  color: #fff;
  font-weight: 900;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--coral));
}

.overview-card h3 {
  margin: 0;
  font-size: 1.16rem;
}

.overview-card p {
  margin: 0;
  color: var(--muted);
}

.meta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.meta-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.28);
  color: #31405d;
  font-size: 0.91rem;
  font-weight: 700;
}

.meta-pill svg {
  width: 18px;
  height: 18px;
  color: #247ea9;
}

.accordion-list {
  display: grid;
  gap: 14px;
}

.day-panel {
  overflow: hidden;
}

.accordion-trigger {
  display: grid;
  grid-template-columns: 1fr auto;
  width: 100%;
  gap: 12px;
  align-items: center;
  padding: 18px;
  color: var(--ink);
  text-align: left;
  border: 0;
  background: rgba(255, 255, 255, 0.32);
}

.accordion-trigger h3 {
  margin: 4px 0 0;
  font-size: 1.2rem;
}

.accordion-trigger p {
  margin: 4px 0 0;
  color: var(--muted);
}

.chevron {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.42);
  transition: transform 180ms ease;
}

.accordion-trigger[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.timeline {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.timeline-item {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.32);
}

.timeline-time {
  color: #1d789f;
  font-weight: 900;
}

.timeline-item h4 {
  margin: 0;
  font-size: 1.03rem;
}

.timeline-item ul,
.notes-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
  color: #4b5870;
}

.timeline-item p {
  margin: 0;
  color: var(--muted);
}

.day-notes {
  padding: 14px;
  border: 1px solid rgba(95, 210, 178, 0.36);
  border-radius: 16px;
  background: rgba(95, 210, 178, 0.16);
}

.day-notes h4 {
  margin: 0 0 8px;
}

.friends-section {
  scroll-margin-top: 18px;
}

.status-pill,
.notice {
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  color: #3a4a64;
  font-weight: 800;
  backdrop-filter: blur(18px);
}

.status-pill {
  padding: 8px 12px;
  white-space: nowrap;
}

.status-pill.connected {
  color: #0f6d55;
  background: rgba(213, 255, 238, 0.62);
}

.notice {
  display: none;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 16px;
}

.notice.is-visible {
  display: block;
}

.collab-grid,
.budget-grid,
.split-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.form-panel,
.list-panel,
.budget-card,
.calculator-card,
.checklist-panel,
.rain-panel {
  padding: 18px;
}

.stacked-form,
.calculator-form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  color: #3a4a64;
  font-size: 0.92rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--ink);
  padding: 12px 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

textarea {
  resize: vertical;
  min-height: 116px;
}

.card-list {
  display: grid;
  gap: 10px;
}

.mini-card {
  padding: 14px;
  background: rgba(255, 255, 255, 0.34);
}

.mini-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.mini-card strong {
  color: var(--ink);
}

.mini-card p {
  margin: 0;
  color: #4b5870;
}

.mini-card time {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.category-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 143, 124, 0.18);
  color: #9a4d3e;
  font-size: 0.78rem;
  font-weight: 900;
}

.like-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  color: #247ea9;
  font-weight: 900;
}

.empty-state {
  padding: 16px;
  color: var(--muted);
  border: 1px dashed rgba(102, 112, 133, 0.35);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.24);
}

.vote-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.activity-card {
  padding: 16px;
}

.activity-card h3 {
  margin: 0 0 12px;
  font-size: 1.08rem;
}

.vote-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.vote-option {
  min-height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.34);
  color: #31405d;
  font-weight: 900;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.vote-option span {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--muted);
}

.vote-option:hover {
  transform: translateY(-1px);
}

.vote-option.is-active {
  color: #fff;
  background: linear-gradient(135deg, #2f9fda, #63d1b6);
  box-shadow: 0 12px 26px rgba(47, 159, 218, 0.2);
}

.budget-lines {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 14px 0 0;
  list-style: none;
}

.budget-lines li,
.total-output,
.mini-breakdown span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.34);
}

.total-output {
  margin-top: 14px;
  color: #3a4a64;
}

.total-output strong {
  color: #0f6d55;
  font-size: 1.7rem;
}

.mini-breakdown {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  color: #4b5870;
  font-size: 0.9rem;
  font-weight: 800;
}

.checklist {
  display: grid;
  gap: 8px;
}

.check-item {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.32);
  color: #3a4a64;
  font-weight: 800;
}

.check-item input {
  width: 20px;
  height: 20px;
  padding: 0;
  accent-color: #2f9fda;
}

.check-item.is-done span {
  color: #7a8799;
  text-decoration: line-through;
}

.icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  color: #247ea9;
}

.rain-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rain-options span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  color: #3a4a64;
  font-weight: 800;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  width: min(1100px, calc(100% - 28px));
  margin: 10px auto 34px;
  color: #59657a;
  font-size: 0.92rem;
  font-weight: 800;
}

.site-footer a {
  color: #19739e;
  text-decoration: none;
}


.ai-section {
  scroll-margin-top: 18px;
}

.ai-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.ai-panel,
.ai-response-panel {
  padding: 18px;
}

.ai-disc {
  background: linear-gradient(135deg, var(--lavender), var(--blue) 55%, var(--mint));
}

.helper-text {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.ai-status-pill.is-loading {
  color: #7a4b00;
  background: rgba(255, 244, 204, 0.72);
}

.ai-status-pill.is-error {
  color: #9a3412;
  background: rgba(255, 232, 220, 0.75);
}

.ai-status-pill.is-done {
  color: #0f6d55;
  background: rgba(213, 255, 238, 0.68);
}

.prompt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.prompt-chips button {
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  color: #247ea9;
  font-weight: 900;
  transition: transform 160ms ease, background 160ms ease;
}

.prompt-chips button:hover {
  background: rgba(255, 255, 255, 0.55);
  transform: translateY(-1px);
}

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

.ai-message {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.34);
}

.ai-message.user {
  background: rgba(84, 183, 223, 0.16);
}

.ai-message.assistant {
  background: rgba(255, 255, 255, 0.4);
}

.ai-message strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
}

.ai-message p {
  margin: 0 0 8px;
  color: #4b5870;
}

.ai-message p:last-child {
  margin-bottom: 0;
}

.ai-clear {
  margin-top: 14px;
  color: #247ea9;
  background: rgba(255, 255, 255, 0.34);
}

@media (min-width: 880px) {
  .ai-grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 18px;
    align-items: start;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 640px) {
  h1 {
    font-size: 4rem;
  }

  .meta-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .overview-grid,
  .vote-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .calculator-form {
    grid-template-columns: 1fr 180px;
  }
}

@media (min-width: 880px) {
  .hero {
    padding: 28px 28px 42px;
  }

  .hero-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: end;
    gap: 28px;
  }

  .collab-grid,
  .budget-grid,
  .split-section {
    grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
    gap: 18px;
  }

  .split-section {
    align-items: start;
  }
}

@media (min-width: 1040px) {
  h1 {
    font-size: 4.6rem;
  }

  .overview-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .vote-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 460px) {
  .hero {
    min-height: auto;
    padding-top: 78px;
  }

  .hero-layout {
    padding-top: 0;
  }

  h1 {
    font-size: 2.35rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .section-heading {
    display: grid;
    align-items: start;
  }

  .vote-options {
    grid-template-columns: 1fr;
  }

  .top-nav {
    justify-content: flex-start;
  }
}

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


/* ==== Austin AI clean floating chat + upload v4 ==== */
.ai-section {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  width: min(460px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  padding: 0;
  margin: 0;
  transition: opacity 180ms ease, transform 180ms ease;
}

.ai-section.is-closed {
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.98);
}

.ai-section.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.ai-window-shell {
  display: flex;
  flex-direction: column;
  height: min(78vh, 680px);
  min-height: 520px;
  overflow: hidden;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 26px 70px rgba(23, 32, 51, 0.24);
  backdrop-filter: blur(24px);
}

.ai-window-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  background: linear-gradient(135deg, rgba(255,255,255,0.72), rgba(255,255,255,0.42));
}

.ai-window-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ai-window-title .icon-disc {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.ai-window-title h2 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.1;
}

.ai-window-title .eyebrow {
  margin: 0 0 2px;
  font-size: 0.68rem;
}

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

.ai-icon-button,
.ai-tool-button,
.ai-send-button {
  display: inline-grid;
  place-items: center;
  border: 0;
}

.ai-icon-button {
  width: 38px;
  height: 38px;
  color: #247ea9;
  border: 1px solid rgba(255,255,255,0.62);
  border-radius: 50%;
  background: rgba(255,255,255,0.58);
}

.ai-status-pill {
  padding: 7px 10px;
  font-size: 0.84rem;
}

.ai-answer-list {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 14px;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(245,250,255,0.78), rgba(255,250,252,0.54));
  scrollbar-width: thin;
}

.ai-welcome,
.ai-message {
  border: 1px solid rgba(255,255,255,0.58);
  border-radius: 20px;
  background: rgba(255,255,255,0.58);
  box-shadow: 0 10px 24px rgba(23, 32, 51, 0.08);
}

.ai-welcome {
  padding: 14px;
  color: #44536c;
}

.ai-welcome p {
  margin: 6px 0 0;
}

.ai-message {
  display: grid;
  gap: 8px;
  max-width: 100%;
  padding: 13px 14px;
}

.ai-message.user {
  align-self: flex-end;
  width: min(88%, 100%);
  border-bottom-right-radius: 8px;
  background: linear-gradient(135deg, rgba(84,183,223,0.24), rgba(95,210,178,0.22));
}

.ai-message.assistant {
  align-self: stretch;
  border-bottom-left-radius: 8px;
}

.ai-message-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ai-message-label {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 900;
}

.ai-message-time {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.ai-bubble {
  color: #44536c;
  overflow-wrap: anywhere;
}

.ai-bubble p,
.ai-bubble ul,
.ai-bubble ol,
.ai-bubble pre,
.ai-bubble blockquote,
.ai-bubble table,
.ai-bubble hr {
  margin: 0 0 12px;
}

.ai-bubble p:last-child,
.ai-bubble ul:last-child,
.ai-bubble ol:last-child,
.ai-bubble pre:last-child,
.ai-bubble blockquote:last-child,
.ai-bubble table:last-child,
.ai-bubble hr:last-child {
  margin-bottom: 0;
}

.ai-bubble h1,
.ai-bubble h2,
.ai-bubble h3,
.ai-bubble h4,
.ai-bubble h5,
.ai-bubble h6 {
  margin: 0 0 10px;
  color: var(--ink);
  line-height: 1.18;
}

.ai-bubble h1 { font-size: 1.3rem; }
.ai-bubble h2 { font-size: 1.18rem; }
.ai-bubble h3 { font-size: 1.08rem; }
.ai-bubble h4,
.ai-bubble h5,
.ai-bubble h6 { font-size: 1rem; }

.ai-bubble ul,
.ai-bubble ol {
  padding-left: 1.25rem;
}

.ai-bubble li + li {
  margin-top: 0.25rem;
}

.ai-bubble a {
  color: #19739e;
  font-weight: 800;
  text-decoration: underline;
}

.ai-bubble strong {
  color: #152238;
  font-weight: 900;
}

.ai-bubble em {
  font-style: italic;
}

.ai-bubble del {
  opacity: 0.82;
  text-decoration: line-through;
}

.ai-bubble mark {
  padding: 0 0.2em;
  border-radius: 0.28em;
  background: rgba(242, 191, 94, 0.35);
}

.ai-bubble code {
  padding: 0.12rem 0.36rem;
  border-radius: 0.45rem;
  background: rgba(23, 32, 51, 0.08);
  color: #b54708;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.ai-bubble pre {
  overflow-x: auto;
  padding: 12px 14px;
  border-radius: 16px;
  background: #182335;
  color: #eff6ff;
}

.ai-bubble pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.ai-bubble blockquote {
  padding: 10px 14px;
  border-left: 4px solid rgba(84, 183, 223, 0.75);
  border-radius: 0 14px 14px 0;
  background: rgba(84, 183, 223, 0.1);
}

.ai-bubble hr {
  height: 1px;
  border: 0;
  background: rgba(23, 32, 51, 0.12);
}

.ai-bubble table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.ai-bubble th,
.ai-bubble td {
  padding: 9px 10px;
  border: 1px solid rgba(23, 32, 51, 0.1);
  text-align: left;
  vertical-align: top;
}

.ai-bubble thead th {
  background: rgba(84, 183, 223, 0.16);
  color: #18324f;
}

.ai-bubble img {
  display: block;
  max-width: min(100%, 340px);
  width: auto;
  height: auto;
  margin: 10px 0;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: 0 10px 24px rgba(23, 32, 51, 0.14);
}

.ai-attachment-preview {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  padding: 10px 14px 0;
  overflow-x: auto;
  background: rgba(255,255,255,0.78);
}

.ai-attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 220px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,0.68);
  border-radius: 999px;
  background: rgba(255,255,255,0.76);
  color: #31405d;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.ai-attachment-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-attachment-chip button {
  border: 0;
  color: #9a3412;
  background: transparent;
  font-weight: 900;
}

.ai-composer {
  flex: 0 0 auto;
  display: grid;
  gap: 8px;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.86);
}

.ai-composer-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: end;
}

.ai-tool-button,
.ai-send-button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.ai-tool-button {
  color: #247ea9;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(255,255,255,0.68);
}

.ai-send-button {
  color: #fff;
  background: linear-gradient(135deg, #2f9fda, #63d1b6 58%, #ff9a7d);
  box-shadow: 0 10px 22px rgba(47, 159, 218, 0.24);
}

.ai-send-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.ai-composer textarea {
  min-height: 42px;
  max-height: 120px;
  resize: none;
  border-radius: 22px;
  padding: 10px 14px;
}

.ai-private-code {
  color: #59657a;
  font-size: 0.82rem;
  font-weight: 800;
}

.ai-private-code summary {
  cursor: pointer;
  width: max-content;
  padding: 4px 2px;
  color: #247ea9;
}

.ai-private-code input {
  margin-top: 6px;
}

.prompt-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.prompt-chips button {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 999px;
  color: #247ea9;
  background: rgba(255,255,255,0.62);
  font-size: 0.86rem;
  font-weight: 900;
}

.ai-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 79;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #2f9fda, #63d1b6 60%, #ff9a7d);
  box-shadow: 0 20px 40px rgba(47, 159, 218, 0.28);
}

.ai-fab.is-hidden {
  display: none;
}

.ai-fab-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 5px rgba(255,255,255,0.18);
}

@media (max-width: 860px) {
  .ai-section {
    inset: auto 10px 10px 10px;
    width: auto;
    max-width: none;
  }

  .ai-window-shell {
    height: min(82vh, 720px);
    min-height: 500px;
  }
}


/* ==== Austin AI PDF + mobile browser fix v5 ==== */
.ai-window-shell {
  max-height: calc(100dvh - 36px);
}

.ai-answer-list {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.ai-composer textarea {
  font-size: 16px; /* prevent iPhone zoom on focus */
}

.ai-file-reading {
  color: #855b00;
  background: rgba(255, 246, 214, 0.72);
}

/* Mobile: make Austin AI a clean full-screen sheet */
@media (max-width: 860px) {
  .ai-section {
    position: fixed;
    inset: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    max-width: none;
    padding: 0;
    z-index: 120;
  }

  .ai-section.is-open {
    transform: none;
  }

  .ai-section.is-closed {
    transform: translateY(12px);
  }

  .ai-window-shell {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    max-height: 100dvh;
    border-radius: 0;
    border: 0;
    background: rgba(255, 255, 255, 0.92);
  }

  .ai-window-header {
    padding-top: max(12px, env(safe-area-inset-top));
    padding-left: 12px;
    padding-right: 12px;
  }

  .ai-window-title .icon-disc {
    width: 38px;
    height: 38px;
  }

  .ai-window-title h2 {
    font-size: 1.06rem;
  }

  .ai-window-title .eyebrow {
    font-size: 0.64rem;
  }

  .ai-status-pill {
    max-width: 92px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.76rem;
  }

  .ai-answer-list {
    padding: 12px;
  }

  .ai-composer {
    padding: 10px 10px max(12px, env(safe-area-inset-bottom));
  }

  .ai-composer-row {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    gap: 7px;
  }

  .ai-tool-button,
  .ai-send-button {
    width: 40px;
    height: 40px;
  }

  .ai-composer textarea {
    min-height: 40px;
    max-height: 104px;
    padding: 9px 12px;
  }

  .prompt-chips {
    gap: 7px;
  }

  .prompt-chips button {
    padding: 8px 10px;
    font-size: 0.82rem;
  }

  .ai-message {
    padding: 12px;
    border-radius: 18px;
  }

  .ai-message.user {
    width: min(92%, 100%);
  }

  .ai-fab {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 119;
  }
}

/* Small phone height: reduce header and chips */
@media (max-width: 860px) and (max-height: 690px) {
  .ai-window-header {
    padding-bottom: 8px;
  }

  .ai-window-title .helper-text,
  .prompt-chips {
    display: none;
  }
}


/* ==== v6 final: no votes + rebuilt Austin AI floating chat ==== */

/* Hide old vote UI if cached HTML still contains it */
#votes,
.vote-grid,
.activity-card {
  display: none !important;
}

/* Completely override old AI section/card styles */
#ai.ai-overlay,
.ai-overlay {
  position: fixed !important;
  inset: auto 18px 18px auto !important;
  z-index: 9999 !important;
  width: min(440px, calc(100vw - 24px)) !important;
  max-width: calc(100vw - 24px) !important;
  padding: 0 !important;
  margin: 0 !important;
  transform: none !important;
  transition: opacity 180ms ease, transform 180ms ease !important;
}

.ai-overlay.is-closed {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(12px) scale(0.98) !important;
}

.ai-overlay.is-open {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.ai-card {
  display: flex !important;
  flex-direction: column !important;
  height: min(72vh, 640px) !important;
  min-height: 480px !important;
  overflow: hidden !important;
  border: 1px solid rgba(255,255,255,0.62) !important;
  border-radius: 28px !important;
  background: rgba(255,255,255,0.88) !important;
  box-shadow: 0 26px 70px rgba(23,32,51,0.24) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
}

.ai-card-header {
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 12px 12px 10px !important;
  border-bottom: 1px solid rgba(255,255,255,0.64) !important;
  background: linear-gradient(135deg, rgba(255,255,255,0.78), rgba(255,255,255,0.46)) !important;
}

.ai-title-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0 !important;
}

.ai-logo {
  display: inline-grid !important;
  width: 40px !important;
  height: 40px !important;
  flex: 0 0 auto !important;
  place-items: center !important;
  color: #fff !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, var(--blue), var(--mint)) !important;
  box-shadow: 0 12px 26px rgba(84, 183, 223, 0.24) !important;
}

.ai-logo svg,
.ai-close svg,
.ai-round-btn svg,
.ai-send-btn svg {
  width: 20px !important;
  height: 20px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.9 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.ai-title-wrap p {
  margin: 0 0 2px !important;
  color: rgba(23,32,51,0.68) !important;
  font-size: 0.68rem !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
}

.ai-title-wrap h2 {
  margin: 0 !important;
  color: var(--ink) !important;
  font-size: 1.16rem !important;
  line-height: 1.1 !important;
}

.ai-head-actions {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
}

.ai-status {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 34px !important;
  max-width: 90px !important;
  padding: 7px 10px !important;
  overflow: hidden !important;
  border: 1px solid rgba(255,255,255,0.64) !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,0.62) !important;
  color: #3a4a64 !important;
  font-size: 0.78rem !important;
  font-weight: 900 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.ai-status.is-loading {
  color: #855b00 !important;
  background: rgba(255,246,214,0.75) !important;
}

.ai-status.is-error {
  color: #9a3412 !important;
  background: rgba(255,232,214,0.78) !important;
}

.ai-status.is-done {
  color: #0f6d55 !important;
  background: rgba(213,255,238,0.72) !important;
}

.ai-close,
.ai-round-btn,
.ai-send-btn {
  display: inline-grid !important;
  place-items: center !important;
  border: 0 !important;
  cursor: pointer !important;
}

.ai-close {
  width: 36px !important;
  height: 36px !important;
  color: #247ea9 !important;
  border: 1px solid rgba(255,255,255,0.64) !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,0.62) !important;
}

.ai-answer-list {
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  min-height: 0 !important;
  padding: 12px !important;
  overflow-y: auto !important;
  background: linear-gradient(180deg, rgba(245,250,255,0.78), rgba(255,250,252,0.54)) !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch !important;
}

.ai-welcome,
.ai-message {
  border: 1px solid rgba(255,255,255,0.6) !important;
  border-radius: 18px !important;
  background: rgba(255,255,255,0.6) !important;
  box-shadow: 0 10px 24px rgba(23,32,51,0.08) !important;
}

.ai-welcome {
  padding: 12px !important;
  color: #44536c !important;
}

.ai-welcome p {
  margin: 5px 0 0 !important;
}

.ai-message {
  display: grid !important;
  gap: 8px !important;
  max-width: 100% !important;
  padding: 12px !important;
}

.ai-message.user {
  align-self: flex-end !important;
  width: min(88%, 100%) !important;
  border-bottom-right-radius: 8px !important;
  background: linear-gradient(135deg, rgba(84,183,223,0.24), rgba(95,210,178,0.22)) !important;
}

.ai-message.assistant {
  align-self: stretch !important;
  border-bottom-left-radius: 8px !important;
}

.ai-message-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

.ai-message-label {
  color: var(--ink) !important;
  font-size: 0.88rem !important;
  font-weight: 900 !important;
}

.ai-message-time {
  color: var(--muted) !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
}

.ai-bubble {
  color: #44536c !important;
  overflow-wrap: anywhere !important;
}

.ai-bubble p,
.ai-bubble ul,
.ai-bubble ol,
.ai-bubble pre,
.ai-bubble blockquote,
.ai-bubble table,
.ai-bubble hr {
  margin: 0 0 10px !important;
}

.ai-bubble p:last-child,
.ai-bubble ul:last-child,
.ai-bubble ol:last-child,
.ai-bubble pre:last-child,
.ai-bubble blockquote:last-child,
.ai-bubble table:last-child,
.ai-bubble hr:last-child {
  margin-bottom: 0 !important;
}

.ai-bubble h1,
.ai-bubble h2,
.ai-bubble h3 {
  margin: 0 0 8px !important;
  color: var(--ink) !important;
  line-height: 1.18 !important;
}

.ai-bubble h1 { font-size: 1.24rem !important; }
.ai-bubble h2 { font-size: 1.14rem !important; }
.ai-bubble h3 { font-size: 1.04rem !important; }

.ai-bubble ul,
.ai-bubble ol {
  padding-left: 1.2rem !important;
}

.ai-bubble strong {
  color: #152238 !important;
  font-weight: 900 !important;
}

.ai-bubble code {
  padding: 0.12rem 0.34rem !important;
  border-radius: 0.42rem !important;
  background: rgba(23,32,51,0.08) !important;
  color: #b54708 !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
}

.ai-bubble pre {
  overflow-x: auto !important;
  padding: 11px 12px !important;
  border-radius: 14px !important;
  background: #182335 !important;
  color: #eff6ff !important;
}

.ai-bubble pre code {
  padding: 0 !important;
  background: transparent !important;
  color: inherit !important;
}

.ai-bubble table {
  display: block !important;
  width: 100% !important;
  overflow-x: auto !important;
  border-collapse: collapse !important;
}

.ai-bubble th,
.ai-bubble td {
  padding: 8px 9px !important;
  border: 1px solid rgba(23,32,51,0.1) !important;
  text-align: left !important;
}

.ai-bubble img {
  display: block !important;
  max-width: min(100%, 320px) !important;
  height: auto !important;
  margin: 8px 0 !important;
  border-radius: 14px !important;
}

.ai-attachment-preview {
  flex: 0 0 auto !important;
  display: flex !important;
  gap: 8px !important;
  padding: 8px 12px 0 !important;
  overflow-x: auto !important;
  background: rgba(255,255,255,0.82) !important;
}

.ai-attachment-preview[hidden] {
  display: none !important;
}

.ai-attachment-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  max-width: 220px !important;
  padding: 7px 9px !important;
  border: 1px solid rgba(255,255,255,0.68) !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,0.78) !important;
  color: #31405d !important;
  font-size: 0.8rem !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

.ai-attachment-chip span {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.ai-attachment-chip button {
  border: 0 !important;
  color: #9a3412 !important;
  background: transparent !important;
  font-weight: 900 !important;
}

.ai-composer {
  flex: 0 0 auto !important;
  display: grid !important;
  gap: 8px !important;
  padding: 10px 12px 12px !important;
  border-top: 1px solid rgba(255,255,255,0.64) !important;
  background: rgba(255,255,255,0.88) !important;
}

.ai-input-bar {
  display: grid !important;
  grid-template-columns: 38px minmax(0, 1fr) 38px !important;
  gap: 8px !important;
  align-items: end !important;
}

.ai-round-btn,
.ai-send-btn {
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
}

.ai-round-btn {
  color: #247ea9 !important;
  background: rgba(255,255,255,0.74) !important;
  border: 1px solid rgba(255,255,255,0.68) !important;
}

.ai-send-btn {
  color: #fff !important;
  background: linear-gradient(135deg, #2f9fda, #63d1b6 58%, #ff9a7d) !important;
  box-shadow: 0 10px 22px rgba(47,159,218,0.24) !important;
}

.ai-send-btn:disabled {
  cursor: wait !important;
  opacity: 0.6 !important;
}

.ai-composer textarea {
  width: 100% !important;
  min-height: 38px !important;
  max-height: 108px !important;
  resize: none !important;
  border-radius: 20px !important;
  padding: 9px 12px !important;
  font-size: 16px !important;
}

.ai-private-code {
  color: #59657a !important;
  font-size: 0.8rem !important;
  font-weight: 800 !important;
}

.ai-private-code summary {
  width: max-content !important;
  cursor: pointer !important;
  color: #247ea9 !important;
}

.ai-private-code input {
  margin-top: 6px !important;
  font-size: 16px !important;
}

.ai-prompt-row {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 7px !important;
  overflow-x: auto !important;
  padding-bottom: 2px !important;
}

.ai-prompt-row button {
  flex: 0 0 auto !important;
  padding: 7px 10px !important;
  border: 1px solid rgba(255,255,255,0.62) !important;
  border-radius: 999px !important;
  color: #247ea9 !important;
  background: rgba(255,255,255,0.66) !important;
  font-size: 0.82rem !important;
  font-weight: 900 !important;
}

.ai-fab {
  position: fixed !important;
  right: 18px !important;
  bottom: 18px !important;
  z-index: 9998 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 14px 18px !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: #fff !important;
  font-weight: 900 !important;
  background: linear-gradient(135deg, #2f9fda, #63d1b6 60%, #ff9a7d) !important;
  box-shadow: 0 20px 40px rgba(47,159,218,0.28) !important;
}

.ai-fab.is-hidden {
  display: none !important;
}

.ai-fab-dot {
  width: 10px !important;
  height: 10px !important;
  border-radius: 50% !important;
  background: #fff !important;
  box-shadow: 0 0 0 5px rgba(255,255,255,0.18) !important;
}

/* Phone browser: real app-style sheet. Not inline, not grey original form. */
@media (max-width: 860px) {
  body.ai-is-open {
    overflow: hidden !important;
  }

  #ai.ai-overlay,
  .ai-overlay {
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    max-width: none !important;
  }

  .ai-overlay.is-open {
    transform: none !important;
  }

  .ai-overlay.is-closed {
    transform: translateY(10px) !important;
  }

  .ai-card {
    width: 100% !important;
    height: 100dvh !important;
    min-height: 0 !important;
    max-height: 100dvh !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: rgba(255,255,255,0.94) !important;
  }

  .ai-card-header {
    padding-top: max(10px, env(safe-area-inset-top)) !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .ai-answer-list {
    padding: 10px !important;
  }

  .ai-composer {
    padding: 9px 10px max(12px, env(safe-area-inset-bottom)) !important;
  }

  .ai-input-bar {
    grid-template-columns: 38px minmax(0, 1fr) 38px !important;
    gap: 7px !important;
  }

  .ai-prompt-row {
    gap: 6px !important;
  }

  .ai-prompt-row button {
    padding: 7px 9px !important;
    font-size: 0.8rem !important;
  }

  .ai-fab {
    right: 12px !important;
    bottom: max(12px, env(safe-area-inset-bottom)) !important;
  }
}

@media (max-width: 860px) and (max-height: 690px) {
  .ai-prompt-row {
    display: none !important;
  }

  .ai-card-header {
    padding-bottom: 8px !important;
  }
}


/* ==== Place image cards + direct map buttons ==== */
.place-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.place-image-link {
  display: block;
  min-height: 132px;
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  background: rgba(255,255,255,0.36);
  box-shadow: 0 12px 26px rgba(23,32,51,0.12);
}

.place-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 132px;
  object-fit: cover;
  transition: transform 180ms ease, filter 180ms ease;
}

.place-image-link:hover .place-image {
  transform: scale(1.035);
  filter: saturate(1.06);
}

.place-info {
  min-width: 0;
}

.map-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 9px 13px;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  text-decoration: none;
  background: linear-gradient(135deg, #2f9fda, #63d1b6 58%, #ff9a7d);
  box-shadow: 0 10px 22px rgba(47,159,218,0.22);
}

.map-button svg {
  width: 18px;
  height: 18px;
}

.inline-map-link {
  display: inline-flex;
  margin-left: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #19739e;
  background: rgba(84,183,223,0.12);
  font-weight: 900;
  text-decoration: none;
}

@media (max-width: 720px) {
  .place-card {
    grid-template-columns: 1fr;
  }

  .place-image-link,
  .place-image {
    min-height: 160px;
  }
}


/* ==== Serious final fix v10 ==== */
/* Remove vote and all old AI layout leftovers */
#votes, .vote-grid, .activity-card,
.ai-section:not(#austinAiWidget), .ai-overlay:not(#austinAiWidget),
.ai-window:not(#austinAiWidget), .ai-panel, .ai-response-panel {
  display: none !important;
}

/* Clean timeline cards: NO random/wrong images */
.place-card, .place-card-clean {
  display: grid !important;
  grid-template-columns: 46px minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: start !important;
}

.place-image-link, .place-image {
  display: none !important;
}

.place-map-icon {
  display: grid !important;
  place-items: center !important;
  width: 46px !important;
  height: 46px !important;
  color: #fff !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, var(--blue), var(--mint)) !important;
  box-shadow: 0 10px 22px rgba(47,159,218,.20) !important;
}

.place-map-icon svg {
  width: 21px !important;
  height: 21px !important;
}

.map-button {
  min-height: 36px !important;
  padding: 8px 12px !important;
  font-size: .9rem !important;
}

/* One and only Austin AI floating widget */
#austinAiWidget.austin-ai-widget {
  display: block !important;
  position: fixed !important;
  right: 18px !important;
  bottom: 18px !important;
  z-index: 2147483000 !important;
  width: min(430px, calc(100vw - 28px)) !important;
  max-width: calc(100vw - 28px) !important;
  padding: 0 !important;
  margin: 0 !important;
  transition: opacity 180ms ease, transform 180ms ease !important;
}

#austinAiWidget.is-closed {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(12px) scale(.98) !important;
}

#austinAiWidget.is-open {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(0) scale(1) !important;
}

.austin-ai-card {
  display: flex !important;
  flex-direction: column !important;
  height: min(68vh, 620px) !important;
  min-height: 430px !important;
  overflow: hidden !important;
  border: 1px solid rgba(255,255,255,.72) !important;
  border-radius: 26px !important;
  background: rgba(255,255,255,.92) !important;
  box-shadow: 0 28px 80px rgba(23,32,51,.28) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
}

.austin-ai-header {
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 12px !important;
  border-bottom: 1px solid rgba(255,255,255,.72) !important;
  background: linear-gradient(135deg, rgba(255,255,255,.86), rgba(255,255,255,.54)) !important;
}

.austin-ai-title {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0 !important;
}

.austin-ai-logo {
  display: inline-grid !important;
  place-items: center !important;
  width: 38px !important;
  height: 38px !important;
  flex: 0 0 auto !important;
  color: #fff !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, var(--blue), var(--mint)) !important;
}

.austin-ai-logo svg, .austin-ai-close svg, .austin-ai-round svg, .austin-ai-send svg {
  width: 19px !important;
  height: 19px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.9 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.austin-ai-title p {
  margin: 0 !important;
  color: rgba(23,32,51,.62) !important;
  font-size: .68rem !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
}

.austin-ai-title h2 {
  margin: 1px 0 0 !important;
  color: var(--ink) !important;
  font-size: 1.14rem !important;
  line-height: 1.1 !important;
}

.austin-ai-actions {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
}

.austin-ai-status {
  display: inline-flex !important;
  align-items: center !important;
  max-width: 90px !important;
  min-height: 32px !important;
  padding: 6px 10px !important;
  overflow: hidden !important;
  border: 1px solid rgba(255,255,255,.72) !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.70) !important;
  color: #3a4a64 !important;
  font-size: .76rem !important;
  font-weight: 900 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.austin-ai-status.is-loading { color:#855b00 !important; background:rgba(255,246,214,.8) !important; }
.austin-ai-status.is-error { color:#9a3412 !important; background:rgba(255,232,214,.82) !important; }
.austin-ai-status.is-done { color:#0f6d55 !important; background:rgba(213,255,238,.78) !important; }

.austin-ai-close, .austin-ai-round, .austin-ai-send {
  display: inline-grid !important;
  place-items: center !important;
  border: 0 !important;
  cursor: pointer !important;
}

.austin-ai-close {
  width: 34px !important;
  height: 34px !important;
  color: #247ea9 !important;
  border: 1px solid rgba(255,255,255,.72) !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,.72) !important;
}

#austinAiWidget .ai-answer-list {
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  min-height: 0 !important;
  padding: 12px !important;
  overflow-y: auto !important;
  background: linear-gradient(180deg, rgba(245,250,255,.86), rgba(255,250,252,.60)) !important;
  -webkit-overflow-scrolling: touch !important;
}

#austinAiWidget .ai-welcome, #austinAiWidget .ai-message {
  border: 1px solid rgba(255,255,255,.68) !important;
  border-radius: 18px !important;
  background: rgba(255,255,255,.70) !important;
  box-shadow: 0 10px 24px rgba(23,32,51,.08) !important;
}

#austinAiWidget .ai-welcome { padding: 12px !important; color: #44536c !important; }
#austinAiWidget .ai-welcome p { margin: 5px 0 0 !important; }

#austinAiWidget .ai-message {
  display: grid !important;
  gap: 8px !important;
  max-width: 100% !important;
  padding: 12px !important;
}

#austinAiWidget .ai-message.user {
  align-self: flex-end !important;
  width: min(88%,100%) !important;
  border-bottom-right-radius: 8px !important;
  background: linear-gradient(135deg, rgba(84,183,223,.24), rgba(95,210,178,.22)) !important;
}

#austinAiWidget .ai-message.assistant {
  align-self: stretch !important;
  border-bottom-left-radius: 8px !important;
}

.austin-ai-composer {
  flex: 0 0 auto !important;
  display: grid !important;
  gap: 8px !important;
  padding: 10px 12px 12px !important;
  border-top: 1px solid rgba(255,255,255,.72) !important;
  background: rgba(255,255,255,.92) !important;
}

.austin-ai-inputbar {
  display: grid !important;
  grid-template-columns: 38px minmax(0,1fr) 38px !important;
  gap: 8px !important;
  align-items: end !important;
}

.austin-ai-round, .austin-ai-send {
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
}

.austin-ai-round {
  color: #247ea9 !important;
  background: rgba(255,255,255,.78) !important;
  border: 1px solid rgba(255,255,255,.72) !important;
}

.austin-ai-send {
  color: #fff !important;
  background: linear-gradient(135deg,#2f9fda,#63d1b6 58%,#ff9a7d) !important;
  box-shadow: 0 10px 22px rgba(47,159,218,.24) !important;
}

.austin-ai-composer textarea {
  width: 100% !important;
  min-height: 38px !important;
  max-height: 92px !important;
  resize: none !important;
  border-radius: 20px !important;
  padding: 9px 12px !important;
  font-size: 16px !important;
}

.austin-ai-private { color:#59657a !important; font-size:.8rem !important; font-weight:800 !important; }
.austin-ai-private summary { width:max-content !important; cursor:pointer !important; color:#247ea9 !important; }
.austin-ai-private input { margin-top:6px !important; font-size:16px !important; }

.austin-ai-prompts {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 7px !important;
  overflow-x: auto !important;
  padding-bottom: 2px !important;
}

.austin-ai-prompts button {
  flex: 0 0 auto !important;
  padding: 7px 10px !important;
  border: 1px solid rgba(255,255,255,.72) !important;
  border-radius: 999px !important;
  color: #247ea9 !important;
  background: rgba(255,255,255,.74) !important;
  font-size: .82rem !important;
  font-weight: 900 !important;
}

.austin-ai-fab {
  position: fixed !important;
  right: 18px !important;
  bottom: 18px !important;
  z-index: 2147482999 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 14px 18px !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: #fff !important;
  font-weight: 900 !important;
  background: linear-gradient(135deg,#2f9fda,#63d1b6 60%,#ff9a7d) !important;
  box-shadow: 0 20px 40px rgba(47,159,218,.28) !important;
}

.austin-ai-fab.is-hidden { display: none !important; }
.austin-ai-dot { width:10px !important; height:10px !important; border-radius:50% !important; background:#fff !important; box-shadow:0 0 0 5px rgba(255,255,255,.18) !important; }

@media (max-width: 860px) {
  #austinAiWidget.austin-ai-widget {
    right: 10px !important;
    left: 10px !important;
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
    width: auto !important;
    max-width: none !important;
  }

  .austin-ai-card {
    height: min(70dvh, 560px) !important;
    min-height: 420px !important;
    border-radius: 24px !important;
  }

  .austin-ai-header { padding: 10px !important; }
  #austinAiWidget .ai-answer-list { padding: 10px !important; }
  .austin-ai-composer { padding: 9px 10px 10px !important; }
  .austin-ai-prompts button { padding: 7px 9px !important; font-size:.8rem !important; }
  .austin-ai-fab { right:12px !important; bottom:max(12px, env(safe-area-inset-bottom)) !important; }
}

@media (max-width: 860px) and (max-height: 680px) {
  .austin-ai-prompts { display: none !important; }
  .austin-ai-card { height:min(72dvh, 500px) !important; min-height:360px !important; }
}


/* ==== Weather + clean map detail fix v11 ==== */
.weather-section {
  padding-top: 24px;
}

.weather-note {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.72);
  border-radius: 18px;
  background: rgba(255,255,255,0.58);
  color: #4b5870;
  font-weight: 750;
}

.weather-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.weather-card {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.weather-card-head {
  display: grid;
  gap: 8px;
}

.weather-card-head strong {
  font-size: 1.05rem;
  color: var(--ink);
}

.weather-main {
  margin: 0;
  color: #1f2a44;
  font-weight: 900;
}

.weather-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.weather-meta span {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(84, 183, 223, 0.13);
  color: #247ea9;
  font-size: 0.84rem;
  font-weight: 900;
}

.weather-rain {
  margin: 0;
  color: #39465f;
  font-weight: 780;
}

.weather-small {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.weather-card.skeleton {
  color: var(--muted);
}

.place-info ul li:empty,
.inline-map-link {
  display: none !important;
}

.place-card-clean {
  display: grid !important;
  grid-template-columns: 46px minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: start !important;
}

.place-map-icon {
  flex: 0 0 auto;
}

@media (max-width: 720px) {
  .weather-grid {
    grid-template-columns: 1fr;
  }

  .weather-card {
    padding: 14px;
  }
}


/* ==== Weather emoji + iOS glassmorphism v12 ==== */
.weather-section {
  position: relative;
}

.weather-section::before {
  content: "";
  position: absolute;
  inset: 18px -18px auto auto;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(84, 183, 223, 0.22), rgba(84, 183, 223, 0));
  pointer-events: none;
}

.weather-note {
  border: 1px solid rgba(255,255,255,0.72) !important;
  background: linear-gradient(135deg, rgba(255,255,255,0.68), rgba(255,255,255,0.34)) !important;
  box-shadow: 0 14px 34px rgba(23,32,51,0.08) !important;
  backdrop-filter: blur(18px) saturate(1.18) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.18) !important;
}

.weather-grid {
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)) !important;
  gap: 16px !important;
}

.weather-card.weather-glass-card {
  position: relative;
  display: grid !important;
  grid-template-columns: 60px minmax(0, 1fr) !important;
  gap: 13px !important;
  align-items: start !important;
  min-height: 150px;
  padding: 16px !important;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.66) !important;
  border-radius: 28px !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.72), rgba(255,255,255,0.34)),
    rgba(255,255,255,0.42) !important;
  box-shadow:
    0 22px 50px rgba(23,32,51,0.12),
    inset 0 1px 0 rgba(255,255,255,0.85) !important;
  backdrop-filter: blur(22px) saturate(1.25) !important;
  -webkit-backdrop-filter: blur(22px) saturate(1.25) !important;
}

.weather-card.weather-glass-card::before {
  content: "";
  position: absolute;
  inset: -58px -42px auto auto;
  width: 170px;
  height: 170px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255,255,255,0.68), rgba(255,255,255,0));
  pointer-events: none;
}

.weather-card.weather-glass-card.sun {
  background:
    linear-gradient(135deg, rgba(255,247,194,0.76), rgba(255,255,255,0.38)),
    rgba(255,255,255,0.42) !important;
}

.weather-card.weather-glass-card.cloud {
  background:
    linear-gradient(135deg, rgba(224,242,254,0.76), rgba(255,255,255,0.38)),
    rgba(255,255,255,0.42) !important;
}

.weather-card.weather-glass-card.rain {
  background:
    linear-gradient(135deg, rgba(207,250,254,0.76), rgba(219,234,254,0.46)),
    rgba(255,255,255,0.42) !important;
}

.weather-card.weather-glass-card.storm {
  background:
    linear-gradient(135deg, rgba(221,214,254,0.78), rgba(219,234,254,0.46)),
    rgba(255,255,255,0.42) !important;
}

.weather-emoji-orb {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border: 1px solid rgba(255,255,255,0.72);
  border-radius: 22px;
  background: rgba(255,255,255,0.52);
  box-shadow: 0 12px 25px rgba(23,32,51,0.12);
  font-size: 1.95rem;
}

.weather-card-body {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.weather-card-head {
  display: grid !important;
  gap: 7px !important;
}

.weather-main {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px !important;
  font-size: 1rem;
}

.weather-meta span {
  background: rgba(255,255,255,0.52) !important;
  border: 1px solid rgba(255,255,255,0.58);
  color: #31405d !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
}

.weather-rain {
  margin-top: 10px !important;
}

.weather-card.skeleton {
  color: #46546d !important;
}

@media (max-width: 720px) {
  .weather-grid {
    grid-template-columns: 1fr !important;
  }

  .weather-card.weather-glass-card {
    grid-template-columns: 54px minmax(0, 1fr) !important;
    min-height: 132px;
    padding: 14px !important;
    border-radius: 24px !important;
  }

  .weather-emoji-orb {
    width: 54px;
    height: 54px;
    border-radius: 20px;
    font-size: 1.75rem;
  }
}


/* ==== Austin AI chat UX polish v12 ==== */
#austinAiWidget .ai-answer-list {
  scroll-behavior: smooth !important;
  padding-bottom: 14px !important;
}

#austinAiWidget .ai-message {
  animation: aiMessageIn 180ms ease both;
}

@keyframes aiMessageIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.ai-thinking-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 16px;
  background: rgba(255,255,255,.58);
}

.ai-thinking-card strong {
  display: block;
  color: #172033;
  font-weight: 900;
}

.ai-thinking-card p {
  margin: 3px 0 0 !important;
  color: #5c6a84;
  font-size: .9rem;
}

.ai-thinking-spinner {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 50%;
  font-size: 1.35rem;
  background: linear-gradient(135deg, rgba(84,183,223,.22), rgba(95,210,178,.22));
  animation: aiSpin 1s linear infinite;
}

@keyframes aiSpin {
  to { transform: rotate(360deg); }
}

#austinAiWidget .ai-message.assistant.is-thinking {
  background: linear-gradient(135deg, rgba(255,255,255,.74), rgba(236,253,245,.54)) !important;
}

.ai-sent-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.ai-sent-attachments span {
  display: inline-flex;
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 999px;
  color: #247ea9;
  background: rgba(84,183,223,.12);
  font-size: .78rem;
  font-weight: 800;
}

.ai-attachment-preview {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.ai-attachment-preview::-webkit-scrollbar,
.austin-ai-prompts::-webkit-scrollbar {
  display: none;
}

.ai-attachment-chip {
  position: relative;
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) 24px;
  grid-template-rows: auto auto;
  column-gap: 8px;
  align-items: center;
  min-width: 210px;
  max-width: 260px !important;
  padding: 8px 8px !important;
  border-radius: 16px !important;
}

.ai-attachment-chip img,
.ai-file-icon {
  grid-row: 1 / 3;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.6);
  font-weight: 900;
  font-size: .8rem;
}

.ai-attachment-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
  color: #172033;
}

.ai-attachment-chip small {
  grid-column: 2;
  color: #667085;
  font-size: .72rem;
  font-weight: 800;
}

.ai-attachment-chip button {
  grid-column: 3;
  grid-row: 1 / 3;
  width: 24px;
  height: 24px;
  border-radius: 50% !important;
  background: rgba(255,232,214,.85) !important;
}

.austin-ai-composer textarea.shake {
  animation: aiShake 260ms ease;
  border-color: rgba(220, 38, 38, .55) !important;
}

@keyframes aiShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.austin-ai-prompts button {
  cursor: pointer !important;
  transition: transform 150ms ease, background 150ms ease, color 150ms ease !important;
}

.austin-ai-prompts button:hover,
.austin-ai-prompts button:focus {
  transform: translateY(-1px) !important;
  color: #fff !important;
  background: linear-gradient(135deg, #2f9fda, #63d1b6 58%, #ff9a7d) !important;
}

#austinAiWidget .ai-bubble img {
  max-width: 100% !important;
  border-radius: 14px !important;
}

@media (max-width: 860px) {
  #austinAiWidget.austin-ai-widget {
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
  }

  .austin-ai-card {
    height: min(76dvh, 620px) !important;
    min-height: 460px !important;
  }

  .austin-ai-prompts {
    padding-bottom: 0 !important;
    mask-image: linear-gradient(90deg, #000 88%, transparent) !important;
  }

  .ai-attachment-chip {
    min-width: 190px;
  }
}


/* ==== Austin AI ChatGPT-style history v12 ==== */
#austinAiWidget.austin-ai-widget {
  width: min(780px, calc(100vw - 28px)) !important;
}

.austin-ai-card.chatgpt-style {
  display: grid !important;
  grid-template-columns: 220px minmax(0, 1fr) !important;
  height: min(76vh, 720px) !important;
  min-height: 540px !important;
  overflow: hidden !important;
  border-radius: 28px !important;
  background: rgba(255, 255, 255, 0.88) !important;
  border: 1px solid rgba(255, 255, 255, 0.68) !important;
  box-shadow: 0 28px 80px rgba(23, 32, 51, 0.26) !important;
  backdrop-filter: blur(24px) saturate(1.2) !important;
  -webkit-backdrop-filter: blur(24px) saturate(1.2) !important;
}

.austin-ai-history {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 12px;
  border-right: 1px solid rgba(23, 32, 51, 0.08);
  background: rgba(247, 250, 255, 0.68);
}

.ai-history-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
  padding: 4px 4px 10px;
}

.ai-history-top p {
  margin: 0;
  color: rgba(23, 32, 51, 0.56);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ai-history-top h3 {
  margin: 2px 0 0;
  font-size: 1.08rem;
}

.ai-history-close {
  display: none;
  border: 0;
  background: rgba(255, 255, 255, 0.62);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 1.1rem;
}

.ai-new-chat {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 10px 12px;
  color: #fff;
  background: linear-gradient(135deg, #2f9fda, #63d1b6 58%, #ff9a7d);
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(47,159,218,0.18);
}

.ai-history-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 0;
  margin-top: 12px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.ai-history-item {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 0;
  border-radius: 15px;
  padding: 10px 11px;
  text-align: left;
  background: rgba(255, 255, 255, 0.50);
  color: #31405d;
}

.ai-history-item.active {
  background: rgba(84, 183, 223, 0.16);
  box-shadow: inset 3px 0 0 #54b7df;
}

.ai-history-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 900;
}

.ai-history-date {
  color: rgba(49, 64, 93, 0.56);
  font-size: 0.76rem;
  font-weight: 800;
}

.ai-history-empty {
  color: rgba(49, 64, 93, 0.58);
  font-size: 0.9rem;
  padding: 12px;
}

.austin-ai-main {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
}

.ai-history-toggle {
  display: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: #247ea9;
  background: rgba(255,255,255,0.68);
}

.ai-thinking-strip {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(23, 32, 51, 0.06);
  color: #38516b;
  background: rgba(255, 255, 255, 0.54);
  font-size: 0.9rem;
  font-weight: 850;
}

.ai-thinking-strip[hidden] {
  display: none !important;
}

.ai-spinner {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(84, 183, 223, 0.22);
  border-top-color: #54b7df;
  border-radius: 50%;
  animation: aiSpin 0.85s linear infinite;
}

@keyframes aiSpin {
  to { transform: rotate(360deg); }
}

#austinAiWidget .ai-answer-list {
  scroll-behavior: smooth;
}

#austinAiWidget .ai-message {
  animation: aiMessageIn 180ms ease both;
}

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

.ai-message-files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.ai-message-files span {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(84, 183, 223, 0.12);
  color: #247ea9;
  font-size: 0.78rem;
  font-weight: 850;
}

.ai-attachment-chip.upgraded {
  display: grid !important;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 8px;
  align-items: center;
  min-width: 220px;
  max-width: 280px;
  border-radius: 18px !important;
  padding: 8px !important;
}

.ai-attachment-chip.upgraded img,
.ai-attachment-chip.upgraded .file-icon {
  grid-row: span 2;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: rgba(84, 183, 223, 0.13);
}

.ai-attachment-chip.upgraded span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-attachment-chip.upgraded small {
  color: rgba(49, 64, 93, 0.58);
  font-size: 0.72rem;
  font-weight: 800;
}

.austin-ai-prompts {
  scrollbar-width: none;
}

.austin-ai-prompts::-webkit-scrollbar {
  display: none;
}

/* Clear and obvious weather refresh button */
.weather-refresh,
#refreshWeather,
#weatherRefresh,
button[data-refresh-weather],
.weather-section button,
#weather button {
  border: 0 !important;
  border-radius: 999px !important;
  padding: 10px 14px !important;
  color: #fff !important;
  background: linear-gradient(135deg, #2f9fda, #63d1b6 58%, #ff9a7d) !important;
  box-shadow: 0 12px 26px rgba(47,159,218,0.22) !important;
  font-weight: 900 !important;
}

.weather-refresh::before,
#refreshWeather::before,
#weatherRefresh::before,
button[data-refresh-weather]::before {
  content: "↻ ";
}

/* Mobile: ChatGPT-style history becomes slide panel, chat remains floating */
@media (max-width: 760px) {
  #austinAiWidget.austin-ai-widget {
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
  }

  .austin-ai-card.chatgpt-style {
    grid-template-columns: 1fr !important;
    height: min(74dvh, 620px) !important;
    min-height: 480px !important;
    border-radius: 24px !important;
  }

  .austin-ai-history {
    position: absolute;
    inset: 0 auto 0 0;
    z-index: 5;
    width: min(82vw, 280px);
    transform: translateX(-105%);
    transition: transform 180ms ease;
    box-shadow: 20px 0 50px rgba(23,32,51,0.16);
  }

  .austin-ai-history.show {
    transform: translateX(0);
  }

  .ai-history-close {
    display: inline-grid;
    place-items: center;
  }

  .ai-history-toggle {
    display: inline-grid;
  }

  .austin-ai-header {
    gap: 8px !important;
  }

  .austin-ai-title h2 {
    max-width: 150px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .austin-ai-status {
    max-width: 78px !important;
  }

  .austin-ai-prompts {
    padding-bottom: 0 !important;
  }
}

@media (max-width: 420px) {
  .austin-ai-card.chatgpt-style {
    height: min(76dvh, 610px) !important;
    min-height: 440px !important;
  }

  .austin-ai-prompts button {
    padding: 7px 9px !important;
    font-size: 0.78rem !important;
  }
}
