:root {
  --brand: #106546;
  --brand-deep: #0a4a33;
  --brand-soft: #e3f2ec;
  --eye: #f2c41a;
  --bow: #d62828;
  --ink: #121816;
  --ink-soft: #3a4a44;
  --muted: #6a7a74;
  --line: #cfe0d8;
  --bg: #eef5f1;
  --surface: #f6faf8;
  --card: #fff;
  --gold: #8b6b1f;
  --gold-soft: #f6edd4;
  --danger-soft: #fdeceb;
  --radius: 18px;
  --font: "Noto Sans TC", system-ui, sans-serif;
  --display: "Nunito", "Noto Sans TC", sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: #d7e5de;
}

button, input, textarea, select { font: inherit; }
button {
  border: 0;
  background: none;
  cursor: pointer;
  color: inherit;
}
img { max-width: 100%; }

.app-shell {
  width: min(430px, 100%);
  min-height: 100%;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 0 1px #c5d6cd, 0 20px 60px rgba(16, 101, 70, 0.12);
}

@media (min-width: 860px) {
  body {
    display: grid;
    place-items: center;
    padding: 24px;
    min-height: 100%;
    background:
      radial-gradient(900px 420px at 10% -10%, #cfe8dc, transparent 55%),
      #d7e5de;
  }
  .app-shell {
    height: min(900px, calc(100vh - 48px));
    border-radius: 28px;
    overflow: hidden;
  }
}

.status-bar {
  display: flex;
  justify-content: space-between;
  padding: 10px 18px 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
}
@media (max-width: 859px) {
  .status-bar { display: none; }
}

.screen-host {
  flex: 1;
  overflow: auto;
  padding: 8px 16px calc(88px + var(--safe-bottom));
}

.tabbar {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(10px + var(--safe-bottom));
  height: 64px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 22px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  backdrop-filter: blur(12px);
  z-index: 20;
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}
.tab.active { color: var(--brand); font-weight: 800; }
.tab-ico { font-size: 15px; line-height: 1; }
.tab-ai .tab-ico-ai {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--brand);
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--brand);
}
.tab-ai .tab-ico-ai img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 0 12px;
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.brand-lockup img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.brand-lockup .name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 16px;
  color: var(--brand-deep);
  line-height: 1.1;
}
.brand-lockup .en {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}

.session-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
  max-width: 46%;
}
.session-chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1f9d5a;
  flex-shrink: 0;
}
.session-chip.guest .dot { background: var(--muted); }

.banner {
  position: relative;
  border-radius: 22px;
  padding: 20px 18px;
  min-height: 148px;
  color: #f4fffb;
  background: linear-gradient(150deg, #147554 0%, #0c5640 55%, #0a4333 100%);
  overflow: hidden;
}
.banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 92% 12%, rgba(242, 196, 26, 0.16), transparent 26%),
    repeating-linear-gradient(-28deg, rgba(255,255,255,.04) 0 8px, transparent 8px 16px);
  pointer-events: none;
}
.banner > * { position: relative; z-index: 1; }
.banner .kicker {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.85;
  margin-bottom: 8px;
}
.banner h1 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 26px;
  line-height: 1.15;
  font-weight: 800;
  max-width: 14ch;
}
.banner p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  opacity: 0.9;
  max-width: 28ch;
}
.banner-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 13px;
}
.btn-light { background: #fff; color: var(--brand-deep); }
.btn-ghost {
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,.28);
}
.btn-solid {
  width: 100%;
  min-height: 46px;
  border-radius: 15px;
  background: var(--brand);
  color: #fff;
}
.btn-outline {
  width: 100%;
  min-height: 44px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: var(--card);
  font-weight: 700;
}
.btn-danger {
  width: 100%;
  min-height: 46px;
  border-radius: 15px;
  background: var(--bow);
  color: #fff;
  font-weight: 800;
}

.section {
  margin-top: 18px;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}
.section-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 800;
}
.link {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.cat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px 6px 10px;
  text-align: center;
}
.cat-ico {
  width: 38px;
  height: 38px;
  margin: 0 auto 6px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-weight: 800;
  font-size: 13px;
}
.cat-photo {
  width: 100%;
  aspect-ratio: 1;
  margin: 0 auto 8px;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  background-color: var(--brand-soft);
  box-shadow: inset 0 0 0 1px rgba(16, 101, 70, 0.08);
}
.cat span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}
.card + .card { margin-top: 10px; }
.card-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.thumb {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(160deg, #cfe8de, #7fbfa5);
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: transparent;
  flex-shrink: 0;
  font-size: 12px;
  overflow: hidden;
}
.thumb.alt { background-color: #e0c56c; }
.thumb.blue { background-color: #8fb1c7; }
.hero-photo {
  width: 100%;
  height: 160px;
  border-radius: 18px;
  background-size: cover;
  background-position: center;
  margin-bottom: 12px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}
.meta { flex: 1; min-width: 0; }
.meta h3 { margin: 0 0 4px; font-size: 14px; font-weight: 800; }
.meta p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.price-line {
  margin-top: 8px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.price {
  font-family: var(--display);
  font-weight: 800;
  font-size: 16px;
  color: var(--brand-deep);
}
.price .strike {
  font-size: 12px;
  color: var(--muted);
  text-decoration: line-through;
  font-weight: 600;
  margin-right: 6px;
}
.price small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  margin-left: 4px;
}
.chip {
  font-size: 10px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.warranty {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 11px;
  font-weight: 700;
}
.warranty.locked {
  background: var(--gold-soft);
  color: var(--gold);
}
.warranty.warn {
  background: var(--danger-soft);
  color: var(--bow);
}

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.qa {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  text-align: left;
}
.qa strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 2px;
}
.qa span { font-size: 11px; color: var(--muted); }

.page-title {
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 800;
  color: var(--brand-deep);
}
.page-sub {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--muted);
}
.back {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 8px;
}

.seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: var(--surface);
  padding: 4px;
  border-radius: 14px;
  margin-bottom: 12px;
}
.seg button {
  padding: 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.seg button.on {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
}

.plan {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: var(--card);
  position: relative;
}
.plan.featured {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(16, 101, 70, 0.12);
}
.plan-badge {
  position: absolute;
  top: -10px;
  right: 14px;
  background: var(--bow);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
}
.plan h3 { margin: 0 0 4px; font-family: var(--display); font-weight: 800; }
.plan .yen {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 800;
  color: var(--brand-deep);
}
.plan .yen span { font-size: 13px; color: var(--muted); font-weight: 600; }
.plan ul {
  margin: 10px 0 14px;
  padding-left: 18px;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.list-nav button {
  width: 100%;
  text-align: left;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 700;
}
.list-nav button span { color: var(--muted); font-weight: 600; font-size: 12px; }

.field { margin-bottom: 12px; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--ink-soft);
}
.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: var(--card);
  outline: none;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(16, 101, 70, 0.12);
}

.steps {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.step-dot {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
}
.step-dot.on { background: var(--brand); }

.ai-head {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}
.ai-head img { width: 46px; height: 46px; object-fit: contain; }
.ai-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 800;
}
.ai-head p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  padding-right: 2px;
}
.bubble {
  max-width: 88%;
  padding: 11px 13px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.55;
}
.bubble.bot {
  align-self: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
}
.bubble.user {
  align-self: flex-end;
  background: var(--brand);
  color: #fff;
  border-bottom-right-radius: 6px;
}
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
}
.summary-card {
  background: var(--gold-soft);
  border: 1px solid #e2d2a8;
  border-radius: 16px;
  padding: 12px;
  font-size: 12px;
}
.summary-card h4 { margin: 0 0 6px; font-weight: 800; }
.summary-card ul { margin: 0; padding-left: 16px; color: var(--ink-soft); }
.ai-composer {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px;
}
.ai-composer input {
  flex: 1;
  border: 0;
  outline: none;
  padding: 8px;
  background: transparent;
}
.ai-send {
  width: 40px;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
}

.article {
  width: 100%;
  text-align: left;
  padding: 0 0 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: start;
}
.article-cover {
  width: 92px;
  height: 72px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  background-color: var(--brand-soft);
}
.article-copy { min-width: 0; }
.article .tag {
  font-size: 10px;
  font-weight: 800;
  color: var(--brand);
  margin-bottom: 4px;
}
.article h3 { margin: 0 0 4px; font-size: 14px; font-weight: 800; line-height: 1.35; }
.article p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.article-hero {
  width: 100%;
  height: 160px;
  border-radius: 18px;
  background-size: cover;
  background-position: center;
  background-color: var(--brand-soft);
}
.article-body p {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.blog-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 78%);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.blog-card {
  scroll-snap-align: start;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.blog-cover {
  height: 100px;
  background-size: cover;
  background-position: center;
  background-color: var(--brand-soft);
}
.blog-body { padding: 10px 12px 12px; }
.blog-body .tag {
  font-size: 10px;
  font-weight: 800;
  color: var(--brand);
  margin-bottom: 4px;
}
.blog-body h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
  color: var(--ink);
}

.faq-search {
  margin: 0 0 10px;
}
.faq-search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  background: var(--card);
  outline: none;
}
.faq-search input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.faq-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.faq-chip {
  font-size: 11px;
  font-weight: 700;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-soft);
}
.faq-chip.on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-cat {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  color: var(--brand);
  margin-bottom: 4px;
}
.faq-item strong {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
}
.faq-item p {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.terms-box { margin-top: 0; }
.terms-list {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
}
.terms-list li + li { margin-top: 6px; }

.qty-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 8px 0 12px;
}
.qty-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 22px;
  font-weight: 700;
  color: var(--brand-deep);
}
.qty-val {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 800;
  min-width: 40px;
  text-align: center;
}
.slot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.slot {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  padding: 12px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
}
.slot.on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 8px 0;
}
.photo-slot {
  aspect-ratio: 1;
  border-radius: 14px;
  border: 1px dashed var(--line);
  background: var(--surface);
  color: var(--muted);
  font-weight: 700;
}
.photo-slot.filled {
  border-style: solid;
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-deep);
}
.check-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-soft);
}
.check-row input { margin-top: 2px; }
.summary-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.summary-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.summary-list li span { color: var(--muted); flex-shrink: 0; }
.summary-list li strong {
  text-align: right;
  font-weight: 700;
  color: var(--ink);
}
.summary-list .deposit { color: var(--brand-deep); font-size: 15px; }
.field input[type="date"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
  background: var(--surface);
}
.bubble.typing { opacity: 0.7; font-style: italic; }
.ai-composer button:disabled,
.ai-composer input:disabled {
  opacity: 0.55;
}

.toast {
  position: absolute;
  left: 50%;
  bottom: calc(86px + var(--safe-bottom));
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  padding: 10px 14px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  z-index: 30;
  white-space: nowrap;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toast.show { opacity: 1; }

.fade-in { animation: fadeIn .25s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.demo-bar {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 3px;
}
.demo-bar button {
  font-size: 10px;
  font-weight: 800;
  padding: 5px 7px;
  border-radius: 9px;
  color: var(--muted);
}
.demo-bar button.on {
  background: var(--card);
  color: var(--brand-deep);
}

.note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 10px;
}
