:root {
  color-scheme: light;
  --ink: #191512;
  --muted: #6f6256;
  --paper: #f2eadc;
  --paper-strong: #fff8eb;
  --lacquer: #86131d;
  --lacquer-dark: #2a0d0f;
  --gold: #be9148;
  --gold-soft: #ead7aa;
  --jade: #1f5248;
  --sea: #163f48;
  --line: rgba(77, 52, 34, 0.17);
  --shadow: 0 22px 70px rgba(43, 22, 14, 0.16);
  --radius: 8px;
  --font-serif: "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
  --font-sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #120f0d;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  background:
    linear-gradient(105deg, rgba(134, 19, 29, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(31, 82, 72, 0.08), transparent 46%),
    repeating-linear-gradient(90deg, rgba(95, 65, 42, 0.025) 0, rgba(95, 65, 42, 0.025) 1px, transparent 1px, transparent 18px),
    var(--paper);
}

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

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.boot {
  display: grid;
  min-height: 100vh;
  place-items: center;
  gap: 16px;
  color: var(--paper);
  background: #171312;
  font-family: var(--font-serif);
}

.boot-mark {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border: 1px solid rgba(184, 137, 61, 0.6);
  background: var(--lacquer);
  color: var(--paper-strong);
  font-size: 2rem;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  padding: 14px 28px;
  color: var(--paper-strong);
  background:
    linear-gradient(90deg, rgba(42, 13, 15, 0.96), rgba(25, 20, 17, 0.94) 42%, rgba(13, 37, 41, 0.93)),
    rgba(18, 15, 13, 0.92);
  border-bottom: 1px solid rgba(190, 145, 72, 0.34);
  backdrop-filter: blur(14px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.seal {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(238, 206, 142, 0.72);
  background: linear-gradient(135deg, #9a1724, #641018);
  color: var(--paper-strong);
  font-family: var(--font-serif);
  font-size: 1.35rem;
  line-height: 1;
}

.brand-name {
  display: block;
  overflow: hidden;
  color: #fff6df;
  font-family: var(--font-serif);
  font-size: 1.18rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.brand-sub {
  display: block;
  margin-top: 2px;
  color: rgba(255, 246, 223, 0.66);
  font-size: 0.75rem;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ghost-button,
.primary-button,
.icon-button,
.chip,
.tab-button,
.qty-button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.ghost-button,
.primary-button,
.icon-button {
  min-height: 40px;
  padding: 0 14px;
  color: inherit;
  background: transparent;
  transition:
    transform 160ms var(--ease),
    border-color 160ms var(--ease),
    background 160ms var(--ease),
    box-shadow 160ms var(--ease);
}

.ghost-button {
  color: rgba(255, 246, 223, 0.88);
  border-color: rgba(255, 246, 223, 0.22);
}

.ghost-button:hover,
.icon-button:hover {
  border-color: rgba(255, 246, 223, 0.5);
  background: rgba(255, 246, 223, 0.08);
}

.panel .ghost-button {
  color: var(--ink);
  border-color: var(--line);
  background: var(--paper-strong);
}

.panel .ghost-button:hover {
  border-color: rgba(142, 20, 33, 0.34);
  background: rgba(142, 20, 33, 0.06);
}

.primary-button {
  color: #fff8e8;
  border-color: rgba(184, 137, 61, 0.55);
  background: linear-gradient(135deg, #981722, #5d1015);
  box-shadow: 0 12px 30px rgba(142, 20, 33, 0.22);
}

.primary-button:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.primary-button:active,
.ghost-button:active,
.icon-button:active,
.chip:active,
.prompt-chip:active,
.tab-button:active,
.qty-button:active {
  transform: translateY(1px) scale(0.99);
}

.primary-button:disabled,
.ghost-button:disabled,
.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.page {
  width: min(1500px, calc(100% - 36px));
  margin: 0 auto;
  padding-bottom: 44px;
}

.conversation-layout {
  display: grid;
  grid-template-columns: minmax(560px, 0.95fr) minmax(420px, 0.72fr);
  gap: 22px;
  align-items: start;
  padding: 28px 0 22px;
}

.agent-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 126px);
  max-height: calc(100vh - 108px);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 248, 235, 0.95), rgba(246, 236, 219, 0.9)),
    var(--paper-strong);
  animation: fadeLift 420ms var(--ease) both;
}

.agent-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(190, 145, 72, 0.18), transparent),
    repeating-linear-gradient(135deg, rgba(134, 19, 29, 0.026) 0, rgba(134, 19, 29, 0.026) 1px, transparent 1px, transparent 22px);
  opacity: 0.45;
}

.agent-hero,
.chat-stream,
.agent-context,
.agent-preferences,
.composer,
.quick-prompts,
.agent-recommendation,
.side-brand {
  position: relative;
}

.agent-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 28px;
  color: #fff8e8;
  background:
    linear-gradient(135deg, rgba(117, 17, 25, 0.98), rgba(42, 13, 15, 0.96) 52%, rgba(22, 63, 72, 0.92)),
    var(--lacquer-dark);
  border-bottom: 1px solid rgba(190, 145, 72, 0.42);
}

.agent-hero h1 {
  color: #fff8e8;
}

.agent-hero .eyebrow {
  color: var(--gold-soft);
}

.agent-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.agent-meta span {
  min-height: 30px;
  padding: 6px 10px;
  color: rgba(255, 248, 232, 0.86);
  border: 1px solid rgba(234, 215, 170, 0.26);
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.08);
  font-size: 0.78rem;
}

.chat-stream {
  display: grid;
  gap: 14px;
  align-content: end;
  flex: 1;
  min-height: 240px;
  overflow: auto;
  padding: 24px 28px 18px;
  scroll-behavior: smooth;
}

.chat-message {
  display: flex;
  align-items: end;
  gap: 10px;
  animation: messageIn 260ms var(--ease) both;
}

.chat-message.from-user {
  flex-direction: row-reverse;
}

.message-mark {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff8e8;
  border: 1px solid rgba(190, 145, 72, 0.42);
  border-radius: 999px;
  background: var(--jade);
  font-family: var(--font-serif);
}

.from-user .message-mark {
  background: var(--lacquer);
}

.message-bubble {
  max-width: min(620px, 82%);
  padding: 12px 14px;
  color: var(--ink);
  border: 1px solid rgba(77, 52, 34, 0.14);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.86);
  box-shadow: 0 10px 28px rgba(43, 22, 14, 0.08);
  line-height: 1.65;
}

.from-user .message-bubble {
  color: #fff8e8;
  border-color: rgba(190, 145, 72, 0.28);
  background: linear-gradient(135deg, #8f1722, #661117);
}

.typing-dots {
  display: inline-flex;
  gap: 4px;
  margin-left: 8px;
  vertical-align: middle;
}

.typing-dots i {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--gold);
  animation: typingDot 820ms var(--ease) infinite;
}

.typing-dots i:nth-child(2) {
  animation-delay: 110ms;
}

.typing-dots i:nth-child(3) {
  animation-delay: 220ms;
}

.quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 28px 18px;
}

.prompt-chip {
  min-height: 34px;
  padding: 0 11px;
  color: #603e22;
  border: 1px solid rgba(190, 145, 72, 0.35);
  border-radius: 999px;
  background: rgba(234, 215, 170, 0.22);
  transition:
    transform 160ms var(--ease),
    background 160ms var(--ease),
    border-color 160ms var(--ease);
}

.prompt-chip:hover {
  border-color: rgba(134, 19, 29, 0.35);
  background: rgba(134, 19, 29, 0.07);
}

.agent-context {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(220px, 1.2fr) minmax(160px, 0.9fr) auto;
  gap: 12px;
  align-items: end;
  padding: 18px 28px;
  border-top: 1px solid rgba(77, 52, 34, 0.1);
  border-bottom: 1px solid rgba(77, 52, 34, 0.1);
  background: rgba(255, 248, 235, 0.48);
}

.compact-field {
  min-width: 0;
}

.agent-preferences {
  padding: 16px 28px 0;
}

.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 16px 28px 28px;
  margin-top: auto;
  border-top: 1px solid rgba(77, 52, 34, 0.1);
  background: rgba(255, 248, 235, 0.62);
}

.composer textarea {
  min-height: 84px;
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.98), rgba(255, 248, 235, 0.94)),
    var(--paper-strong);
}

.composer-actions {
  display: grid;
  gap: 8px;
  min-width: 112px;
}

.menu-side {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 112px);
  overflow: auto;
  animation: fadeLift 520ms var(--ease) both;
  animation-delay: 90ms;
}

.side-brand {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 108px;
  padding: 10px;
  overflow: hidden;
  color: #fff8e8;
  border: 1px solid rgba(190, 145, 72, 0.32);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(42, 13, 15, 0.9), rgba(18, 54, 56, 0.86)),
    #171312;
  box-shadow: 0 16px 48px rgba(43, 22, 14, 0.15);
}

.side-brand img {
  width: 130px;
  height: 88px;
  object-fit: cover;
  border-radius: 6px;
}

.side-brand strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1rem;
}

.side-brand span {
  display: block;
  margin-top: 6px;
  color: rgba(255, 248, 232, 0.72);
  font-size: 0.78rem;
  line-height: 1.45;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.98fr) minmax(420px, 1.02fr);
  gap: 28px;
  align-items: stretch;
  min-height: 520px;
  padding: 28px 0 20px;
}

.hero-copy {
  display: grid;
  align-content: center;
  gap: 22px;
  min-width: 0;
}

.eyebrow {
  color: var(--lacquer);
  font-size: 0.8rem;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 780px;
  font-family: var(--font-serif);
  font-size: 3.2rem;
  font-weight: 600;
  line-height: 1.12;
}

.hero-text {
  max-width: 680px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 680px;
}

.metric {
  min-height: 88px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.72);
}

.metric strong {
  display: block;
  color: var(--lacquer);
  font-family: var(--font-serif);
  font-size: 1.5rem;
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.hero-visual {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid rgba(184, 137, 61, 0.34);
  border-radius: var(--radius);
  background: #171312;
  box-shadow: var(--shadow);
}

.hero-visual img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
  display: block;
}

.visual-caption {
  position: absolute;
  right: 18px;
  bottom: 18px;
  max-width: 280px;
  padding: 12px 14px;
  color: #fff6df;
  border: 1px solid rgba(238, 206, 142, 0.28);
  background: rgba(18, 15, 13, 0.72);
  backdrop-filter: blur(10px);
}

.visual-caption strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1rem;
}

.visual-caption span {
  display: block;
  margin-top: 6px;
  color: rgba(255, 246, 223, 0.76);
  font-size: 0.78rem;
  line-height: 1.55;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  align-items: start;
  padding-top: 6px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 248, 235, 0.86);
  box-shadow: 0 10px 38px rgba(39, 19, 13, 0.08);
}

.control-panel,
.cart-panel {
  position: sticky;
  top: 90px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--line);
}

.panel-title {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1.08rem;
}

.panel-kicker {
  color: var(--muted);
  font-size: 0.72rem;
}

.controls {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label,
.field-label {
  color: var(--muted);
  font-size: 0.78rem;
}

.number-row {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  gap: 8px;
  align-items: center;
}

.number-display {
  display: grid;
  min-height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-strong);
  font-weight: 700;
}

.qty-button,
.icon-button {
  display: grid;
  min-width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  color: var(--ink);
  background: var(--paper-strong);
}

.range-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--lacquer);
}

select,
input[type="search"],
textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-strong);
  outline: none;
}

textarea {
  min-height: 104px;
  resize: vertical;
  line-height: 1.55;
}

select:focus,
input[type="search"]:focus,
textarea:focus {
  border-color: rgba(142, 20, 33, 0.5);
  box-shadow: 0 0 0 3px rgba(142, 20, 33, 0.08);
}

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

.chip {
  min-height: 34px;
  padding: 0 10px;
  color: var(--ink);
  background: rgba(255, 250, 240, 0.72);
}

.chip.is-active {
  color: #fff8e8;
  border-color: var(--lacquer);
  background: var(--lacquer);
}

.switch-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.84rem;
}

.switch-line input {
  width: 18px;
  height: 18px;
  accent-color: var(--lacquer);
}

.agent-status {
  min-height: 28px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.menu-panel {
  min-width: 0;
  overflow: hidden;
}

.menu-toolbar {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 14px 16px 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.tab-button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
}

.tab-button.is-active {
  color: #fff8e8;
  border-color: var(--sea);
  background: var(--sea);
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.menu-side .menu-grid {
  grid-template-columns: 1fr;
}

.menu-side .cart-panel,
.menu-side .menu-panel {
  position: static;
}

.menu-side .cart-list {
  max-height: 260px;
}

.menu-side .dish-card {
  min-height: 178px;
}

.dish-card {
  display: grid;
  gap: 12px;
  min-height: 220px;
  padding: 14px;
  border: 1px solid rgba(57, 38, 29, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.96), rgba(247, 241, 230, 0.88)),
    var(--paper-strong);
  animation: cardEnter 260ms var(--ease) both;
}

.dish-card:hover {
  border-color: rgba(184, 137, 61, 0.5);
  box-shadow: 0 12px 30px rgba(39, 19, 13, 0.08);
  transform: translateY(-2px);
}

.dish-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.dish-name {
  font-family: var(--font-serif);
  font-size: 1.06rem;
  line-height: 1.35;
}

.dish-en {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.price {
  flex: 0 0 auto;
  color: var(--lacquer);
  font-family: var(--font-serif);
  font-size: 1.08rem;
  white-space: nowrap;
}

.dish-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 26px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  color: var(--muted);
  border: 1px solid rgba(57, 38, 29, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  font-size: 0.72rem;
}

.tag.gold {
  color: #7a521c;
  border-color: rgba(184, 137, 61, 0.32);
  background: rgba(184, 137, 61, 0.1);
}

.dish-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: auto;
}

.mini-select {
  min-height: 40px;
  padding: 0 10px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-strong);
}

.cart-list {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 330px);
  min-height: 120px;
  overflow: auto;
  padding: 16px;
}

.cart-empty,
.empty-state {
  display: grid;
  min-height: 120px;
  place-items: center;
  padding: 18px;
  color: var(--muted);
  border: 1px dashed rgba(57, 38, 29, 0.22);
  border-radius: var(--radius);
  text-align: center;
  line-height: 1.65;
}

.cart-item {
  display: grid;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(57, 38, 29, 0.1);
}

.cart-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.cart-name {
  font-size: 0.88rem;
  line-height: 1.35;
}

.cart-price {
  white-space: nowrap;
  color: var(--lacquer);
}

.cart-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-controls .qty-button {
  width: 30px;
  min-width: 30px;
  height: 30px;
}

.cart-total {
  display: grid;
  gap: 10px;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
}

.total-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.total-row strong {
  color: var(--ink);
  font-size: 1.24rem;
}

.recommendation {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(31, 82, 72, 0.1), rgba(134, 19, 29, 0.07)),
    rgba(255, 248, 235, 0.72);
  animation: fadeLift 320ms var(--ease) both;
}

.agent-recommendation {
  margin: 0 28px 18px;
  border: 1px solid rgba(190, 145, 72, 0.26);
  border-radius: var(--radius);
  box-shadow: 0 18px 44px rgba(43, 22, 14, 0.1);
}

.recommendation h3 {
  font-family: var(--font-serif);
  font-size: 1.18rem;
}

.recommendation p {
  color: var(--muted);
  line-height: 1.65;
}

.plan-list {
  display: grid;
  gap: 8px;
}

.plan-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(57, 38, 29, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.62);
}

.plan-item span {
  color: var(--muted);
  font-size: 0.78rem;
}

.plan-price {
  color: var(--lacquer);
  white-space: nowrap;
}

.source-pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  color: #fff8e8;
  border-radius: 999px;
  background: var(--jade);
  font-size: 0.72rem;
}

.source-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tool-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  color: #6b481d;
  border: 1px solid rgba(190, 145, 72, 0.34);
  border-radius: 999px;
  background: rgba(234, 215, 170, 0.24);
  font-size: 0.72rem;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  max-width: min(420px, calc(100vw - 36px));
  padding: 12px 14px;
  color: #fff8e8;
  border: 1px solid rgba(238, 206, 142, 0.28);
  border-radius: var(--radius);
  background: rgba(18, 15, 13, 0.92);
  box-shadow: var(--shadow);
  animation: toastIn 220ms var(--ease) both;
}

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

@keyframes messageIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes typingDot {
  0%,
  80%,
  100% {
    opacity: 0.34;
    transform: translateY(0);
  }
  35% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

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

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

@media (max-width: 1220px) {
  .conversation-layout {
    grid-template-columns: minmax(520px, 1fr) minmax(380px, 0.72fr);
  }

  .workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .cart-panel {
    position: static;
    grid-column: 1 / -1;
  }

  .cart-list {
    max-height: none;
  }
}

@media (max-width: 980px) {
  .topbar {
    align-items: start;
    padding: 12px 18px;
  }

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

  .page {
    width: min(100% - 24px, 900px);
  }

  .conversation-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .menu-side {
    position: static;
    max-height: none;
  }

  .agent-panel {
    min-height: 720px;
    max-height: none;
  }

  .side-brand {
    position: static;
  }

  .agent-context {
    grid-template-columns: 1fr 1fr;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  h1 {
    font-size: 2.35rem;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .hero-visual,
  .hero-visual img {
    min-height: 310px;
  }

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

  .control-panel {
    position: static;
  }

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

@media (max-width: 640px) {
  .topbar {
    position: static;
    display: grid;
  }

  .brand-name {
    font-size: 1rem;
  }

  .top-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .top-actions button {
    width: 100%;
  }

  .page {
    width: min(100% - 18px, 560px);
  }

  h1 {
    font-size: 2rem;
  }

  .conversation-layout {
    padding-top: 14px;
  }

  .agent-hero {
    display: grid;
    padding: 20px;
  }

  .agent-meta {
    justify-content: flex-start;
  }

  .chat-stream {
    max-height: 390px;
    padding: 18px 16px 14px;
  }

  .agent-panel {
    min-height: 0;
  }

  .side-brand {
    grid-template-columns: 94px minmax(0, 1fr);
  }

  .side-brand img {
    width: 94px;
    height: 72px;
  }

  .message-bubble {
    max-width: calc(100vw - 92px);
  }

  .quick-prompts,
  .agent-preferences {
    padding-left: 16px;
    padding-right: 16px;
  }

  .agent-context {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .composer {
    grid-template-columns: 1fr;
    padding: 14px 16px 18px;
  }

  .composer-actions {
    grid-template-columns: 1fr 1fr;
  }

  .agent-recommendation {
    margin-left: 16px;
    margin-right: 16px;
  }

  .hero {
    padding-top: 16px;
  }

  .hero-text {
    font-size: 0.94rem;
  }

  .visual-caption {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
  }

  .menu-toolbar {
    grid-template-columns: 1fr;
  }

  .dish-top,
  .plan-item {
    grid-template-columns: 1fr;
  }

  .dish-top {
    display: grid;
  }

  .price,
  .plan-price {
    white-space: normal;
  }
}

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