/* Mirin — паназиат-минимализм. Тёмный, тёплый янтарный акцент. */

:root {
  --bg:        #0e0e10;
  --bg-card:   #16161a;
  --bg-inset:  #1c1c20;
  --border:    #2a2a2e;
  --text:      #e8e6df;
  --text-dim:  #9a978f;
  --text-muted:#65635d;
  --accent:    #d4a154;
  --accent-soft:#3a2e1c;
  --danger:    #c4665e;
  --success:   #6fa86b;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ─────────────── Layout ─────────────── */
.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 4rem 1.25rem 3rem;
}

.hero { text-align: center; margin-bottom: 2.5rem; }
.hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 300;
  letter-spacing: 0.4em;
  font-size: 3rem;
  margin: 0 0 0.4rem;
  padding-left: 0.4em; /* визуальная компенсация трекинга */
}
.hero .tagline { color: var(--text-dim); margin: 0 0 0.25rem; font-size: 1rem; }
.hero .meta    { color: var(--text-muted); font-size: 0.85rem; margin: 0; }

/* ─────────────── Chat card ─────────────── */
.chat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 540px;
  box-shadow: 0 6px 30px rgba(0,0,0,0.4);
}

.chat-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.chat-head-title {
  font-size: 0.85rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--text-dim);
}
.chat-head-title strong { color: var(--accent); font-weight: 500; }
.chat-reset {
  background: transparent; border: 1px solid var(--border);
  color: var(--text-dim); cursor: pointer;
  font-size: 0.78rem; padding: 0.3rem 0.7rem; border-radius: 6px;
  font-family: inherit;
}
.chat-reset:hover { color: var(--text); border-color: var(--text-muted); }
.chat-reset:disabled { opacity: 0.4; cursor: not-allowed; }

.chat-scroll {
  flex: 1; padding: 1.25rem; overflow-y: auto; min-height: 320px;
  display: flex; flex-direction: column; gap: 0.85rem;
}

/* ─────────────── Examples ─────────────── */
.examples { padding: 0.5rem 0 0; }
.examples-lbl {
  font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 0.85rem;
}
.examples-grid { display: grid; gap: 0.5rem; }
.example-btn {
  text-align: left; background: var(--bg-inset); border: 1px solid var(--border);
  color: var(--text); padding: 0.7rem 0.9rem; border-radius: 8px;
  font-family: inherit; font-size: 0.92rem; cursor: pointer;
  transition: border-color 120ms, background 120ms;
}
.example-btn:hover { border-color: var(--accent); background: #1f1d18; }
.example-btn .arrow { color: var(--accent); margin-right: 0.5rem; }

/* ─────────────── Bubbles ─────────────── */
.bubble { display: flex; }
.bubble-user { justify-content: flex-end; }
.bubble-user .bubble-body {
  background: var(--accent-soft); color: var(--text);
  padding: 0.6rem 0.95rem; border-radius: 14px 14px 4px 14px;
  max-width: 80%; white-space: pre-wrap;
}
.bubble-ai { justify-content: flex-start; }
.bubble-ai .bubble-body {
  background: var(--bg-inset); border: 1px solid var(--border);
  padding: 0.85rem 1rem; border-radius: 4px 14px 14px 14px;
  max-width: 92%;
}
.bubble-text { white-space: pre-wrap; line-height: 1.55; }

/* ─────────────── Recommendation card ─────────────── */
.rec-notes { color: var(--text-dim); font-size: 0.92rem; margin: 0 0 0.85rem; }
.rec-dishes { display: flex; flex-direction: column; gap: 0.7rem; }

.dish {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 0.85rem 1rem;
}
.dish-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; margin-bottom: 0.25rem;
}
.dish-name { font-size: 1rem; font-weight: 500; color: var(--text); }
.dish-price { color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dish-meta {
  font-size: 0.8rem; color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.dish-desc { font-size: 0.9rem; color: var(--text-dim); margin: 0 0 0.55rem; }
.dish-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tag {
  font-size: 0.72rem; padding: 0.18rem 0.5rem; border-radius: 999px;
  background: var(--bg-inset); color: var(--text-muted);
  border: 1px solid var(--border);
}
.tag-spicy { color: var(--danger); border-color: rgba(196,102,94,0.3); }

.rec-removed {
  margin-top: 0.9rem; padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
  font-size: 0.78rem; color: var(--text-muted);
}
.rec-removed-lbl { color: var(--text-dim); margin-bottom: 0.25rem; }
.rec-removed-item { display: block; line-height: 1.6; }
.rec-removed-item s { opacity: 0.7; }

/* ─────────────── Booking card ─────────────── */
.booking {
  border-top: 1px solid var(--border); margin-top: 0.85rem; padding-top: 0.85rem;
}
.booking-head {
  font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.55rem;
}
.booking-summary {
  display: flex; flex-wrap: wrap; gap: 0.7rem;
  margin-bottom: 0.95rem;
}
.booking-pill {
  background: var(--bg); border: 1px solid var(--border);
  padding: 0.35rem 0.7rem; border-radius: 6px; font-size: 0.85rem;
}
.booking-pill b { color: var(--text); font-weight: 500; }
.booking-pill span { color: var(--text-muted); margin-right: 0.3rem; }

.booking-form { display: flex; flex-direction: column; gap: 0.55rem; }
.field { display: flex; flex-direction: column; gap: 0.25rem; }
.field-lbl { font-size: 0.78rem; color: var(--text-dim); }
.field input {
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  padding: 0.55rem 0.7rem; border-radius: 6px;
  font-family: inherit; font-size: 0.95rem;
}
.field input:focus { outline: none; border-color: var(--accent); }
.booking-error { color: var(--danger); font-size: 0.85rem; margin-top: 0.25rem; }

.booking-success {
  display: flex; flex-direction: column; gap: 0.4rem; padding: 0.5rem 0;
}
.booking-success-title { color: var(--success); font-size: 1rem; }
.booking-success-id {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.8rem; color: var(--text-muted);
}
.booking-success-hint { font-size: 0.85rem; color: var(--text-dim); }

/* ─────────────── Status / dots ─────────────── */
.thinking {
  display: flex; align-items: center; gap: 0.5rem;
  color: var(--text-dim); font-size: 0.88rem;
  padding: 0.55rem 0.25rem;
}
.thinking-dots { display: inline-flex; gap: 4px; }
.thinking-dots span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted);
  animation: dot 1.2s infinite ease-in-out;
}
.thinking-dots span:nth-child(2) { animation-delay: 0.15s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}

/* ─────────────── Input footer ─────────────── */
.chat-foot {
  display: flex; gap: 0.5rem; padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
}
.chat-input {
  flex: 1; background: var(--bg-inset); border: 1px solid var(--border);
  color: var(--text); padding: 0.65rem 0.85rem; border-radius: 8px;
  font-family: inherit; font-size: 0.95rem; resize: vertical; min-height: 2.5rem;
}
.chat-input:focus { outline: none; border-color: var(--accent); }
.chat-input:disabled { opacity: 0.5; }

.btn-send {
  background: var(--accent); color: #2a1f0c; border: none;
  padding: 0 1.1rem; border-radius: 8px;
  font-family: inherit; font-size: 0.92rem; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.45rem;
  white-space: nowrap;
}
.btn-send:hover { background: #dfb069; }
.btn-send:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary {
  background: var(--accent); color: #2a1f0c; border: none;
  padding: 0.55rem 1.1rem; border-radius: 6px;
  font-family: inherit; font-size: 0.92rem; font-weight: 600; cursor: pointer;
  margin-top: 0.45rem;
}
.btn-primary:hover { background: #dfb069; }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.chat-hint {
  font-size: 0.74rem; color: var(--text-muted); text-align: center;
  padding: 0 1rem 0.85rem;
}

/* ─────────────── Footer ─────────────── */
.page-foot {
  text-align: center; color: var(--text-muted); font-size: 0.78rem;
  margin-top: 2rem;
}

/* ─────────────── Responsive ─────────────── */
@media (max-width: 600px) {
  .page { padding: 2rem 0.75rem; }
  .hero h1 { font-size: 2.2rem; letter-spacing: 0.3em; }
  .chat-card { min-height: 460px; border-radius: 10px; }
  .chat-scroll { padding: 0.9rem; }
  .bubble-ai .bubble-body, .bubble-user .bubble-body { max-width: 96%; }
}
