:root {
  --bg: #fff0ee;
  --paper: #f7f7f7;
  --ink: #444444;
  --muted: #747474;
  --line: #eaeaea;
  --gold: #444444;
  --swatch: #f7f7f7;
  --shadow: none;
  --serif: 'Fraunces','Songti SC','Source Han Serif SC','Noto Serif SC',STSong,SimSun,serif;
  --sans: 'Figtree',-apple-system,'PingFang SC','Microsoft YaHei','Source Han Sans SC',sans-serif;
  --chat-width: 360px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-size: 15px;
  line-height: 1.7;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

.context-bar {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  padding: 10px 24px;
}

.site-header {
  background: var(--bg);
  padding: 28px 48px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-name {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--ink);
}

.page {
  padding: 28px 48px 80px;
  padding-right: calc(var(--chat-width) + 80px);
}

.catalog {
  max-width: 760px;
  background: var(--paper);
  padding: 8px 40px;
}

.product-list {
  list-style: none;
}

.product-item {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 36px 0;
}

.product-item + .product-item {
  border-top: 1px solid var(--line);
}

.product-visual {
  width: 88px;
  height: 88px;
  flex: 0 0 88px;
  background: var(--swatch);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 26px;
  color: var(--ink);
}

.product-copy {
  min-width: 0;
}

.product-name {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.45;
}

.product-intro {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.price {
  margin-top: 12px;
  font-family: var(--serif);
  font-size: 18px;
  color: var(--gold);
  letter-spacing: 0.04em;
}

.shop-next-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.shop-gate-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: right;
}

.shop-gate-hint[hidden] {
  display: none;
}

.shop-next,
.chat-form button,
.landing-btn {
  background: var(--ink);
  color: #ffffff;
  border: 1px solid var(--ink);
  border-radius: 2px;
  padding: 8px 16px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.shop-next:hover,
.chat-form button:hover,
.landing-btn:hover {
  background: #5a5a5a;
  border-color: #5a5a5a;
}

.shop-next:disabled {
  border-color: var(--line);
  color: var(--muted);
  cursor: not-allowed;
}

.chat-widget {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: var(--chat-width);
  height: min(540px, calc(100vh - 120px));
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 20;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.chat-title {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.chat-header button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 13px;
}

.chat-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: var(--paper);
}

.chat-turns {
  padding: 8px 16px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.msg {
  max-width: 75%;
  padding: 10px 12px;
  border-radius: 2px;
  font-size: 15px;
  line-height: 1.7;
  word-break: normal;
  overflow-wrap: break-word;
}

.msg.bot {
  white-space: pre-wrap;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
}

.msg.bot p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.7;
}

.msg.bot p + p {
  margin-top: 0.6em;
}

.msg.user {
  margin-left: auto;
  background: var(--bg);
  color: var(--ink);
}

.msg.error {
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--line);
}

.suggested-questions {
  padding: 8px 12px 0;
  background: var(--paper);
}

.suggested-questions-label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 6px;
}

.suggested-questions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 8px;
}

.suggested-question {
  flex: 0 0 auto;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 5px 8px;
  background: var(--paper);
  color: var(--muted);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1.4;
}

.suggested-question:hover,
.suggested-question:focus-visible {
  color: var(--ink);
  outline: none;
}

.chat-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.chat-form input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 10px 12px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  outline: none;
  background: var(--paper);
}

.chat-form input:focus {
  border-color: var(--line);
}

.chat-widget.is-minimized {
  height: auto;
}

.chat-widget.is-minimized .chat-body {
  display: none;
}

.chat-widget.is-minimized .chat-header {
  border-bottom: 0;
}

.landing {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 48px 16px;
}

.landing-card {
  width: min(640px, 100%);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 48px 40px;
}

.landing-brand {
  font-family: var(--serif);
  color: var(--muted);
  letter-spacing: 0.15em;
  font-size: 13px;
  margin-bottom: 12px;
}

.landing-card h1 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 20px;
}

.landing-card p {
  color: var(--muted);
  line-height: 1.75;
  font-size: 15px;
  margin-bottom: 12px;
}

.landing-btn {
  display: inline-block;
  margin-top: 16px;
  text-decoration: none;
  padding: 10px 22px;
  font-size: 14px;
  letter-spacing: 0.08em;
}

@media (max-width: 900px) {
  .site-header {
    padding: 20px 16px;
    align-items: flex-start;
  }

  .brand-name {
    font-size: 24px;
  }

  .page {
    padding: 20px 16px 150px;
  }

  .catalog {
    padding: 4px 18px;
  }

  .product-item {
    gap: 16px;
    padding: 28px 0;
  }

  .chat-widget {
    right: 12px;
    left: 12px;
    width: auto;
  }
}
