:root {
  --line-green: #06c755;
  --line-green-dark: #04a845;
  --line-bg: #f5f2ea;
  --line-paper: #ffffff;
  --line-ink: #1e241f;
  --line-muted: #768078;
  --line-border: rgba(45, 66, 49, 0.12);
  --line-soft: #f4f7f2;
  --line-soft-2: #eef4ed;
  --line-warning: #fff3cf;
  --line-danger: #ffe8e3;
  --line-shadow: 0 28px 80px rgba(16, 26, 18, 0.18);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --sans: "PingFang TC", "Noto Sans TC", sans-serif;
  --mono: "SFMono-Regular", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, #fcfff9 0, transparent 24%),
    linear-gradient(180deg, #ebf1eb 0%, #dbe3db 100%);
  color: var(--line-ink);
  font-family: var(--sans);
  overflow-x: hidden;
}

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

button {
  cursor: pointer;
}

.phone-stage {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 28px 18px;
}

.phone-shell {
  position: relative;
  width: 430px;
  min-height: 900px;
  padding: 20px;
  border-radius: 42px;
  background:
    linear-gradient(160deg, #0e140f 0%, #202a22 58%, #121912 100%);
  box-shadow: var(--line-shadow);
}

.phone-shell__notch {
  position: absolute;
  left: 50%;
  top: 10px;
  width: 146px;
  height: 28px;
  transform: translateX(-50%);
  border-radius: 0 0 18px 18px;
  background: #09100a;
}

.phone-shell__screen {
  min-height: 860px;
  overflow: hidden;
  border-radius: 30px;
  background: #f9fbf8;
  border: 1px solid rgba(210, 220, 211, 0.65);
}

.screen {
  position: relative;
  min-height: 860px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #fbfcf9 0%, #f1f5f0 100%);
}

.status-bar {
  display: flex;
  justify-content: space-between;
  padding: 12px 18px 6px;
  font-family: var(--mono);
  font-size: 12px;
}

.screen-body {
  padding: 0 16px 18px;
}

.stack {
  display: grid;
  gap: 12px;
}

.card,
.notice,
.info-row,
.faq-item,
.summary-card,
.message-bubble,
.rich-card,
.sheet-card {
  border: 1px solid var(--line-border);
  border-radius: var(--radius-lg);
  background: var(--line-paper);
  box-shadow: 0 10px 24px rgba(17, 29, 18, 0.05);
}

.label,
.helper,
.muted,
.field-note,
.chip {
  letter-spacing: 0.01em;
}

.label {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.helper,
.muted,
.field-note {
  margin: 0;
  color: var(--line-muted);
  font-size: 13px;
  line-height: 1.5;
}

.line-profile {
  flex: 1;
  background: #fff;
}

.profile-topbar {
  display: flex;
  justify-content: flex-end;
  padding: 14px 18px 6px;
  font-size: 26px;
  color: #3d433e;
}

.profile-hero {
  padding: 8px 20px 20px;
}

.profile-brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.profile-avatar,
.auth-avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(160deg, #fff4df 0%, #ffe9b5 100%);
  color: #d58d14;
  font-weight: 800;
  text-align: center;
  line-height: 1.12;
  word-break: break-word;
  padding: 8px;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  font-size: 11px;
}

.profile-title {
  margin: 0;
  font-size: 32px;
  line-height: 1;
}

.verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  color: #5f6a61;
  font-size: 12px;
  font-weight: 700;
}

.verified::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #5ba8ff;
  color: #fff;
  font-size: 11px;
}

.profile-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.profile-button,
.outline-button,
.ghost-button,
.small-button,
.qty-button,
.cta,
.mini-nav,
.menu-tile {
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    border-color 140ms ease,
    background 140ms ease;
}

.profile-button,
.outline-button,
.ghost-button,
.small-button,
.qty-button,
.mini-nav {
  border: 1px solid rgba(68, 83, 69, 0.16);
  background: #fff;
  color: var(--line-ink);
}

.profile-button:hover,
.outline-button:hover,
.ghost-button:hover,
.small-button:hover,
.qty-button:hover,
.cta:hover,
.mini-nav:hover,
.menu-tile:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(16, 27, 18, 0.08);
}

.profile-button {
  min-height: 54px;
  border-radius: 14px;
  font-weight: 700;
}

.profile-button--primary,
.cta {
  border-color: rgba(6, 199, 85, 0.28);
  background: linear-gradient(180deg, var(--line-green) 0%, var(--line-green-dark) 100%);
  color: #fff;
}

.faq-section {
  margin-top: 22px;
}

.faq-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.faq-title {
  margin: 0;
  font-size: 24px;
}

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

.faq-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px;
}

.profile-sticky {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  padding: 14px 16px 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, #fff 20%);
}

.cta {
  width: 100%;
  min-height: 54px;
  border-radius: 16px;
  font-weight: 800;
  border-width: 1px;
}

.line-chat {
  flex: 1;
  background:
    radial-gradient(circle at 12% 20%, rgba(247, 218, 148, 0.22) 0, transparent 18%),
    radial-gradient(circle at 84% 18%, rgba(173, 216, 255, 0.22) 0, transparent 18%),
    linear-gradient(180deg, #f9f7f1 0%, #f7f1e4 100%);
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 10px;
  background: rgba(255, 255, 255, 0.84);
  border-bottom: 1px solid rgba(30, 36, 31, 0.08);
}

.chat-header__title {
  flex: 1;
  min-width: 0;
}

.chat-header__title h1 {
  margin: 0;
  font-size: 20px;
}

.chat-header__title p {
  margin: 2px 0 0;
  color: var(--line-muted);
  font-size: 11px;
}

.chat-icon-row {
  display: flex;
  gap: 10px;
  color: #4a524b;
}

.chat-content {
  display: grid;
  gap: 14px;
  padding: 14px 14px 232px;
}

.today-chip {
  width: fit-content;
  margin: 0 auto;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(68, 77, 70, 0.18);
  color: #fff;
  font-size: 12px;
}

.message-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.message-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(160deg, #ffeabf 0%, #ffd77c 100%);
}

.message-bubble {
  padding: 14px;
  max-width: 82%;
  border-radius: 18px 18px 18px 8px;
  background: rgba(246, 252, 255, 0.96);
}

.message-time {
  align-self: end;
  color: var(--line-muted);
  font-size: 11px;
}

.message-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 800;
}

.message-text {
  margin: 0;
  line-height: 1.68;
  white-space: pre-line;
}

.rich-menu {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 10px 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.88) 24%, #fff 100%);
  border-top: 1px solid rgba(30, 36, 31, 0.06);
}

.rich-grid {
  display: grid;
  gap: 8px;
}

.rich-grid--menu {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.menu-tile {
  display: grid;
  gap: 6px;
  align-content: start;
  min-height: 92px;
  padding: 12px 10px 10px;
  border: 1px solid rgba(215, 136, 34, 0.14);
  border-radius: 18px;
  color: #43311a;
  background: linear-gradient(155deg, rgba(255, 146, 25, 0.96) 0%, rgba(255, 197, 86, 0.96) 100%);
  text-align: left;
  overflow: hidden;
  position: relative;
}

.menu-tile::after {
  content: "";
  position: absolute;
  right: -10px;
  bottom: -12px;
  width: 74px;
  height: 74px;
  border-radius: 24px 0 0 0;
  background: rgba(255, 255, 255, 0.18);
}

.menu-tile--green {
  color: #173c20;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.26) 0, transparent 28%),
    linear-gradient(155deg, #72d583 0%, #beeaa8 100%);
}

.menu-tile--gold {
  color: #4f3314;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.24) 0, transparent 30%),
    linear-gradient(155deg, #ffb347 0%, #ffd778 100%);
}

.menu-tile--sand {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18) 0, transparent 30%),
    linear-gradient(155deg, #ffe2a2 0%, #fff0c8 100%);
}

.menu-tile--orange {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18) 0, transparent 30%),
    linear-gradient(155deg, #ffc47d 0%, #ffe1ad 100%);
}

.menu-tile--mint {
  color: #23433e;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18) 0, transparent 30%),
    linear-gradient(155deg, #a9ead4 0%, #d9f7ed 100%);
}

.menu-tile--cream {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18) 0, transparent 30%),
    linear-gradient(155deg, #fff3d6 0%, #fffaf0 100%);
}

.menu-tile__badge {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.86;
}

.menu-tile__title {
  position: relative;
  z-index: 1;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.15;
}

.menu-tile__note {
  position: relative;
  z-index: 1;
  font-size: 12px;
  color: rgba(34, 31, 24, 0.72);
}

.chat-inputbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 0 4px;
  color: #4f564f;
}

.chat-input {
  flex: 1;
  height: 38px;
  border-radius: 999px;
  background: #f0f2ee;
}

.auth-screen {
  background: #fff;
}

.auth-topbar {
  display: flex;
  justify-content: space-between;
  padding: 14px 16px 8px;
  color: #555c56;
  font-size: 16px;
}

.auth-pattern {
  height: 16px;
  background:
    radial-gradient(circle at 10px 8px, rgba(143, 189, 255, 0.28) 0 3px, transparent 3px),
    radial-gradient(circle at 34px 8px, rgba(255, 208, 99, 0.32) 0 3px, transparent 3px);
  background-size: 44px 16px;
}

.auth-body {
  padding: 18px 22px 24px;
}

.auth-hero {
  text-align: center;
  padding: 8px 0 20px;
}

.auth-avatar {
  width: 74px;
  height: 74px;
  margin: 0 auto 14px;
  font-size: 20px;
}

.auth-hero h1 {
  margin: 0;
  font-size: 30px;
}

.auth-provider {
  margin-top: 6px;
  color: var(--line-muted);
}

.auth-location {
  margin-top: 20px;
  font-weight: 700;
}

.auth-company {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.auth-company__badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(160deg, #ffe9be 0%, #ffda7e 100%);
}

.auth-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.auth-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-item__text {
  display: grid;
  gap: 4px;
}

.toggle {
  position: relative;
  width: 50px;
  height: 30px;
  border-radius: 999px;
  background: #dddfdd;
  border: 0;
}

.toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
  transition: transform 160ms ease;
}

.toggle.is-on {
  background: rgba(6, 199, 85, 0.78);
}

.toggle.is-on::after {
  transform: translateX(18px);
}

.auth-actions {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

.auth-allow {
  min-height: 52px;
  border-radius: 14px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px 14px;
}

.page-header__title h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.02;
}

.page-header__title p {
  margin: 6px 0 0;
  color: var(--line-muted);
  font-size: 13px;
}

.header-actions {
  display: flex;
  gap: 8px;
}

.mini-nav,
.ghost-button,
.small-button,
.outline-button,
.qty-button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
}

.mini-nav {
  font-size: 13px;
  font-weight: 700;
}

.home-hero {
  padding: 0 16px;
}

.summary-card {
  padding: 16px;
  background:
    radial-gradient(circle at top right, rgba(6, 199, 85, 0.12) 0, transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f5faf4 100%);
}

.summary-card__row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(68, 83, 69, 0.12);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}

.chip--accent {
  border-color: rgba(6, 199, 85, 0.22);
  background: #e7faee;
}

.chip--warning {
  background: var(--line-warning);
}

.chip--danger {
  background: var(--line-danger);
}

.section-title {
  margin: 0 0 10px;
  font-size: 18px;
}

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

.action-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line-border);
  background: var(--line-paper);
  text-align: left;
}

.action-card__title {
  font-size: 16px;
  font-weight: 800;
}

.action-card__desc {
  color: var(--line-muted);
  font-size: 13px;
  line-height: 1.45;
}

.filter-bar,
.inline-actions,
.qty-control,
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-select,
.input,
.select,
.textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(69, 83, 70, 0.18);
  border-radius: 14px;
  background: #fff;
  color: var(--line-ink);
}

.filter-select {
  flex: 1;
  min-width: 0;
}

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

.list-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line-border);
  border-radius: 18px;
  background: #fff;
}

.list-card__top,
.list-card__footer,
.status-banner,
.summary-box__row,
.timeline__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.list-card__title {
  margin: 0;
  font-size: 18px;
}

.list-card__subtitle {
  margin: 6px 0 0;
  color: var(--line-muted);
  font-size: 12px;
}

.price-grid,
.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.meta-grid--single {
  grid-template-columns: 1fr;
}

.meta-item {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px dashed rgba(69, 83, 70, 0.18);
  background: var(--line-soft);
}

.meta-item__label {
  color: var(--line-muted);
  font-size: 12px;
}

.meta-item__value {
  font-size: 15px;
  font-weight: 800;
}

.list-card__button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(6, 199, 85, 0.26);
  border-radius: 14px;
  background: var(--line-green);
  color: #fff;
  font-weight: 700;
}

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

.textarea {
  min-height: 96px;
  resize: vertical;
}

.qty-control {
  align-items: center;
}

.qty-button {
  width: 46px;
  padding: 0;
  font-size: 24px;
}

.qty-value {
  min-width: 84px;
  text-align: center;
  font-size: 20px;
  font-weight: 800;
}

.summary-box,
.notice,
.status-banner {
  padding: 14px 16px;
}

.summary-box__row + .summary-box__row,
.timeline__row + .timeline__row {
  margin-top: 10px;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline__dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  margin-top: 4px;
  border-radius: 50%;
  background: rgba(102, 115, 104, 0.38);
}

.timeline__row.is-active .timeline__dot {
  background: var(--line-green);
}

.timeline__content {
  display: grid;
  gap: 3px;
}

.timeline__title {
  font-size: 14px;
  font-weight: 800;
}

.timeline__hint {
  color: var(--line-muted);
  font-size: 12px;
}

.bottom-bar {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  padding: 12px 16px 16px;
  background: linear-gradient(180deg, rgba(249, 251, 248, 0.28) 0%, rgba(249, 251, 248, 0.92) 22%, #f9fbf8 100%);
}

.bottom-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 20px;
  border: 1px solid rgba(68, 83, 69, 0.12);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 32px rgba(17, 28, 18, 0.08);
}

.bottom-bar__label {
  color: var(--line-muted);
  font-size: 12px;
}

.bottom-bar__value {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 800;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 280px;
  padding: 24px;
  text-align: center;
}

.empty-illustration {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  border-radius: 22px;
  border: 1px dashed rgba(68, 83, 69, 0.22);
  background: #fff;
  font-size: 30px;
}

.upload-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.upload-box {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px dashed rgba(68, 83, 69, 0.24);
  border-radius: 16px;
  background: #fff;
  text-align: left;
}

.status-banner {
  border-radius: 18px;
  border: 1px solid rgba(68, 83, 69, 0.12);
  background: #fff;
}

.status-banner--warning {
  background: #fff8df;
}

.status-banner--danger {
  background: #fff0ee;
}

.reply-chat {
  display: grid;
  gap: 12px;
}

.reply-user,
.reply-bot {
  max-width: 88%;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(68, 83, 69, 0.12);
}

.reply-user {
  margin-left: auto;
  background: #dff9e6;
}

.reply-bot {
  background: #fff;
}

.toast {
  position: absolute;
  left: 50%;
  bottom: 118px;
  z-index: 30;
  transform: translateX(-50%);
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(20, 28, 21, 0.92);
  color: #fff;
  font-size: 12px;
  box-shadow: 0 14px 30px rgba(11, 18, 12, 0.18);
}

@media (max-width: 520px) {
  .phone-stage {
    padding: 0;
  }

  .phone-shell {
    width: min(100%, 430px);
    min-height: 0;
    padding: 8px;
    border-radius: 24px;
  }

  .phone-shell__screen,
  .screen {
    min-height: calc(100dvh - 16px);
    border-radius: 22px;
  }

  .price-grid,
  .meta-grid,
  .upload-row {
    grid-template-columns: 1fr;
  }

  .profile-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

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

  .rich-grid--menu {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .profile-brand {
    align-items: flex-start;
  }

  .profile-avatar {
    width: 60px;
    height: 60px;
    font-size: 10px;
  }

  .profile-title {
    font-size: 28px;
  }

  .profile-button {
    min-height: 48px;
    padding: 0 6px;
    font-size: 12px;
    white-space: nowrap;
  }

  .auth-avatar {
    font-size: 11px;
  }

  .chat-header {
    padding: 10px 12px 8px;
  }

  .chat-header__title h1 {
    font-size: 18px;
  }

  .chat-content {
    padding: 12px 12px 248px;
  }

  .message-bubble {
    max-width: 78%;
    padding: 12px;
  }

  .message-title {
    font-size: 14px;
  }

  .message-text {
    font-size: 13px;
    line-height: 1.58;
  }

  .rich-menu {
    padding: 8px 8px 10px;
  }

  .menu-tile {
    min-height: 80px;
    padding: 9px 8px 8px;
    border-radius: 16px;
  }

  .menu-tile__title {
    font-size: 13px;
  }

  .menu-tile__note,
  .menu-tile__badge {
    font-size: 10px;
  }

  .chat-inputbar {
    margin-top: 6px;
    gap: 8px;
  }

  .chat-input {
    height: 36px;
  }

  .page-header {
    padding: 10px 14px 12px;
  }

  .page-header__title h1 {
    font-size: 24px;
  }

  .screen-body {
    padding: 0 14px 16px;
  }

  .bottom-bar {
    padding: 10px 12px 12px;
  }

  .bottom-bar__inner {
    padding: 10px 12px;
  }
}
