:root {
  --ground: #EDF2E8;
  --paper: #F8FAF5;
  --celadon: #D2DFCA;
  --celadon-2: #B7C9B1;
  --sage: #9CB397;
  --moss: #4E6A54;
  --forest: #25362B;
  --custard: #DDB967;
  --tabbg: #F8FAF5;
  --font: 'Jost', 'Century Gothic', 'Avenir Next', Avenir, 'PingFang HK', 'Noto Sans HK', 'Microsoft JhengHei', system-ui, sans-serif;
  --col: 560px;
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--forest);
  font-family: var(--font);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
h1, h2, h3, h4, p, ul { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }

:focus-visible {
  outline: 3px solid var(--forest);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--paper);
}
.card :focus-visible, #tabs :focus-visible { box-shadow: none; }

.view {
  max-width: var(--col);
  margin: 0 auto;
  padding: 28px var(--gutter) calc(110px + env(safe-area-inset-bottom));
}
#view-cover { padding-bottom: 40px; }
#view-guide { padding-top: 0; }

/* ---------- shared bits ---------- */
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.head-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 4px; flex: none; }
.page-head h1 { font-size: 36px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.quiet-link { font-size: 15px; color: var(--moss); padding: 10px 0 10px 12px; min-height: 44px; display: inline-flex; align-items: center; background: none; border: 0; cursor: pointer; font-family: inherit; text-decoration: underline; }
.lede { color: var(--moss); margin-bottom: 18px; }
.prose p + p { margin-top: 12px; }
.footnote { color: var(--moss); font-size: 15px; margin-top: 32px; }
.zh { font-weight: 400; color: var(--moss); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px; border-radius: 999px;
  font-size: 17px; font-weight: 500; text-decoration: none; cursor: pointer; border: 0;
}
.btn-primary { background: var(--forest); color: var(--paper); }
.btn-secondary { background: transparent; color: var(--forest); border: 1.5px solid var(--forest); }

/* ---------- cover ---------- */
.cover { display: flex; flex-direction: column; align-items: flex-start; padding-top: 4px; }
.mosaic {
  width: 100%; max-width: 360px; display: grid; grid-template-columns: repeat(3, 1fr);
  border-radius: 4px; overflow: hidden; margin-bottom: 36px;
}
.mosaic > div { aspect-ratio: 1 / 1; }
.mosaic svg, .photo svg { display: block; width: 100%; height: 100%; }
.cover h1 { font-size: clamp(42px, 12vw, 56px); font-weight: 400; letter-spacing: -0.025em; line-height: 1.02; }
.cover-note { font-size: 19px; margin-top: 22px; max-width: 24em; }
.cover-ai { font-size: 15px; color: var(--moss); margin-top: 16px; max-width: 24em; }
.cover-sig { font-weight: 500; margin-top: 20px; margin-bottom: 28px; }

/* ---------- meals ---------- */
.meal-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 22px 0 14px; }
.meal {
  min-height: 68px; border: 0; border-radius: 6px; padding: 8px 2px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: var(--bg); color: var(--fg); cursor: pointer; line-height: 1.1;
  transition: transform .18s ease, box-shadow .18s ease;
}
.meal-n { font-size: 22px; font-weight: 400; }
.meal-l { font-size: 12.5px; text-align: center; }
.meal[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--ground), 0 0 0 5px var(--forest); transform: translateY(-2px); }
.meal-status { min-height: 1.5em; color: var(--moss); font-size: 15px; margin-bottom: 14px; }

.tile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile {
  min-height: 78px; padding: 8px 6px; border: 1px solid var(--celadon-2); border-radius: 6px;
  background: var(--paper); color: var(--forest); font-size: 14.5px; font-weight: 500; line-height: 1.15;
  display: flex; align-items: center; justify-content: center; text-align: center; cursor: pointer;
  transition: background-color .28s ease, color .28s ease, opacity .28s ease, transform .28s ease, border-color .28s ease;
  transition-delay: var(--d, 0ms);
}
.tile.lit { background: var(--moss); color: var(--paper); border-color: var(--moss); transform: translateY(-2px); }
.tile.dim { opacity: .38; }
.outro { margin-top: 32px; color: var(--moss); }

/* ---------- guide ---------- */
.pills {
  position: sticky; top: var(--bh, 0px); z-index: 5; background: var(--ground);
  margin: 0 calc(var(--gutter) * -1); padding: 14px var(--gutter) 12px;
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
}
.pills::-webkit-scrollbar { display: none; }
.pill {
  flex: none; min-height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--sage); background: transparent; font-size: 15px; font-weight: 500; white-space: nowrap;
}
.pill[aria-current="true"] { background: var(--forest); border-color: var(--forest); color: var(--paper); }

.sec-head { padding: 22px 0 6px; }
.sec-head h2 { font-size: 34px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.sec-head p { margin-top: 12px; }
.sec-slots { max-width: 560px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.sec-photo { margin: 0; }
.sec-photo .photo { aspect-ratio: 1 / 1; }
.sec-photo figcaption { font-size: 14px; color: var(--moss); margin-top: 6px; }

.cards { margin-top: 22px; display: grid; gap: 22px; }
.card { background: var(--paper); border-radius: 8px; overflow: hidden; scroll-margin-top: calc(84px + var(--bh, 0px)); }
.card.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 55% { box-shadow: 0 0 0 3px var(--custard); } 100% { box-shadow: 0 0 0 3px transparent; } }
.card-body { padding: 18px 18px 20px; }

.photo { position: relative; aspect-ratio: 4 / 3; background: var(--celadon); overflow: hidden; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-slot { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 10px; font-size: 13px; color: var(--paper); background: rgba(37, 54, 43, .62); }
.photo.has-img .photo-slot { display: none; }

.card h3 { font-size: 25px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.15; }
.card h3 .zh { font-size: 20px; margin-left: 6px; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 10px; }
.dots { list-style: none; padding: 0; display: flex; gap: 4px; }
.dots li {
  width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 500;
  display: flex; align-items: center; justify-content: center; background: var(--bg); color: var(--fg);
}
.lead { font-weight: 500; font-size: 18px; margin-top: 14px; }
.body p { margin-top: 12px; }
.body a { color: var(--moss); text-underline-offset: 3px; }

.tagpill {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 500; line-height: 1.5;
}
.t-deep { background: var(--moss); color: var(--paper); }
.t-special { background: var(--custard); color: var(--forest); }
.t-mention { background: var(--celadon); color: var(--forest); border: 1px solid var(--sage); }

.pins { display: grid; gap: 8px; margin-top: 14px; }
.pin {
  width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer;
  display: grid; grid-template-columns: 14px 1fr auto; gap: 4px 12px; align-items: start;
  min-height: 56px; padding: 11px 14px; border-radius: 6px; text-decoration: none;
  background: var(--ground); border: 1px solid var(--celadon-2);
}
.pin-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--custard); box-shadow: 0 0 0 2px var(--forest); margin-top: 7px; }
.pin-name { font-weight: 500; }
.pin-area { display: block; font-size: 14.5px; color: var(--moss); }
.pin-note { display: block; font-size: 15px; margin-top: 4px; }
.pin-go { font-size: 14px; font-weight: 500; color: var(--moss); padding-top: 2px; }
.pin .tagpill { margin-top: 6px; }

.dish-row { display: flex; flex-wrap: wrap; gap: 0 6px; margin-top: 8px; }
.dish { font: inherit; font-size: 14px; color: inherit; background: none; border: 0; padding: 7px 0; min-height: 44px; cursor: pointer; perspective: 500px; display: inline-flex; align-items: center; }
.dish-in { display: grid; position: relative; transform-style: preserve-3d; transition: transform .45s ease; }
.dish-f, .dish-b { grid-area: 1 / 1; padding: 4px 14px; border-radius: 999px; text-align: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.dish-f { background: var(--celadon); }
.dish-b { background: var(--forest); color: var(--paper); font-size: 16px; transform: rotateX(180deg); }
.dish.flipped .dish-in { transform: rotateX(180deg); }

.extras { display: grid; gap: 10px; margin-top: 14px; }
.extra { border-left: 3px solid var(--sage); padding: 2px 0 2px 12px; }
.extra h4 { font-size: 17px; font-weight: 500; margin-bottom: 4px; }
.extra p { margin-top: 6px; }
.extra .tagpill { margin-bottom: 2px; }

.card-note { background: var(--forest); color: var(--paper); padding: 22px 20px 24px; }
.card-note h3 .zh { color: var(--celadon-2); }
.card-note p { margin-top: 12px; }
.card-aside { background: transparent; border: 1.5px dashed var(--sage); }
.card-aside .card-body { padding: 14px 16px; }
.card-aside h3 { font-size: 18px; color: var(--moss); }
.card-aside p { margin-top: 6px; font-size: 15.5px; color: var(--moss); }

.closing { margin-top: 36px; }
.closing p + p { margin-top: 4px; font-weight: 500; }
.sec-intro-gap { height: 0; }

/* ---------- map ---------- */
.map {
  position: relative; width: 100%; aspect-ratio: 100 / 112; background-color: var(--paper);
  background-image: linear-gradient(rgba(248, 250, 245, .1), rgba(248, 250, 245, .1)), url("map-bg.png");
  background-size: 100% 100%, 183% auto; background-position: 0 0, 51.7% 100%; background-repeat: no-repeat;
  border-radius: 8px; overflow: hidden; touch-action: manipulation;
}
.map svg.msvg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mlabel {
  position: absolute; transform: translate(-50%, -50%); pointer-events: none; white-space: nowrap;
  font-size: 12px; color: var(--moss); background: var(--paper); padding: 1px 8px; border-radius: 999px; border: 1px solid var(--celadon-2);
}
.mland { position: absolute; transform: translate(-50%, -50%); pointer-events: none; font-size: 13px; color: var(--moss); letter-spacing: .02em; }
.mhotel { position: absolute; transform: translate(-50%, -50%); pointer-events: none; display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; }
.mhotel i { width: 14px; height: 14px; background: var(--forest); transform: rotate(45deg); flex: none; }
.mhotel span { position: absolute; left: 20px; white-space: nowrap; background: var(--paper); padding: 0 4px; border-radius: 4px; }
.mpin {
  position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; padding: 0; border: 0; background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.mpin i {
  width: 13px; height: 13px; border-radius: 50%; background: var(--custard); box-shadow: 0 0 0 2px var(--forest);
  transition: transform .15s ease;
}
.mpin[aria-pressed="true"] i { transform: scale(1.5); background: var(--forest); box-shadow: 0 0 0 2px var(--custard); }

.map-card { margin-top: 14px; background: var(--paper); border: 2px solid var(--forest); border-radius: 12px; padding: 16px 18px 18px; scroll-margin-bottom: 100px; }
.map-card h2 { font-size: 21px; font-weight: 500; line-height: 1.2; }
.map-card p { color: var(--moss); margin-top: 4px; font-size: 15.5px; }
.map-card .btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.map-card .btn { min-height: 48px; padding: 0 20px; font-size: 16px; }

/* ---------- list ---------- */
.list-sec h2 { font-size: 18px; font-weight: 500; padding: 0 0 8px; margin-top: 30px; border-bottom: 1.5px solid var(--forest); }
.row {
  width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; background: none; border: 0; border-bottom: 1px solid var(--celadon-2); border-radius: 0;
  display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 0; text-decoration: none;
  border-bottom: 1px solid var(--celadon-2);
}
.row-text { flex: 1; min-width: 0; }
.row-name { font-weight: 500; }
.row-line { font-size: 14.5px; color: var(--moss); }
.row-go {
  flex: none; min-width: 56px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--forest);
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 500;
}

/* ---------- tab bar ---------- */
#tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  --tabbg: var(--paper);
  background: var(--paper); border-top: 1px solid var(--celadon-2);
  display: flex; justify-content: center; padding-bottom: env(safe-area-inset-bottom);
}
#tabs a {
  flex: 1 1 0; max-width: 112px; min-height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  text-decoration: none; color: var(--moss); font-size: 12px; white-space: nowrap;
}
#tabs svg { width: 24px; height: 24px; }
#tabs a[aria-current="page"] { color: var(--forest); font-weight: 500; }
#tabs a[aria-current="page"] svg { transform: translateY(-1px); }
#tabs a[aria-current="page"] circle[r="8"], #tabs a[aria-current="page"] rect { fill: var(--forest); }
#tabs a[aria-current="page"] path[d^="M5"] { stroke-width: 2.4; }

/* ---------- wider screens ---------- */
@media (min-width: 960px) {
  #view-guide { max-width: 1020px; }
  .cards { display: block; column-count: 2; column-gap: 24px; }
  .cards .card { break-inside: avoid; margin-bottom: 24px; }
  .view { padding-top: 40px; }
  #view-guide { padding-top: 0; }
}

@media (max-width: 359px) {
  :root { --gutter: 14px; }
  .meal-l { font-size: 11.5px; }
  .tile { font-size: 13.5px; }
  .pill { padding: 0 14px; }
}

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

/* ---------- round 2 ---------- */
:root { --tabh: calc(60px + env(safe-area-inset-bottom)); }
html.no-scroll, html.no-scroll body { overflow: hidden; }

.wx-banner { position: sticky; top: 0; z-index: 40; background: var(--forest); color: var(--paper); padding: 12px var(--gutter); font-weight: 500; text-align: center; }
.weather { color: var(--moss); font-size: 15.5px; margin: -4px 0 14px; }

.next-sec {
  display: flex; align-items: center; justify-content: space-between; min-height: 56px; margin-top: 28px; padding: 0 18px;
  border: 1.5px solid var(--sage); border-radius: 8px; text-decoration: none; font-weight: 500; background: var(--paper);
}
.next-sec::after { content: ""; width: 10px; height: 10px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); margin-right: 4px; }

/* place card */
.sheet { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet-bg { position: absolute; inset: 0; background: rgba(37, 54, 43, .55); }
.sheet-panel {
  position: relative; width: 100%; max-width: var(--col); max-height: 86vh; overflow-y: auto;
  background: var(--paper); border-radius: 16px 16px 0 0; padding: 22px 20px calc(24px + env(safe-area-inset-bottom));
  animation: rise .22s ease;
}
@keyframes rise { from { transform: translateY(24px); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet-x { position: absolute; top: 8px; right: 8px; min-height: 44px; padding: 0 14px; background: none; border: 0; color: var(--moss); font: inherit; font-size: 15px; cursor: pointer; text-decoration: underline; }
.sheet-panel h2 { font-size: 26px; font-weight: 500; line-height: 1.15; padding-right: 60px; }
.sheet-area { color: var(--moss); margin-top: 6px; }
.sheet-hours { margin-top: 10px; }
.sheet-note { margin-top: 12px; }
.sheet-btns { display: grid; gap: 10px; margin-top: 18px; }
.sheet-btns .btn { width: 100%; }
.how-h3 { font-size: 18px; font-weight: 500; margin: 22px 0 6px; }
#howsheet .sheet-panel p { margin: 8px 0 12px; }
#howsheet .btn { width: 100%; margin-top: 6px; }

/* driver card */
.driver { position: fixed; inset: 0; z-index: 70; background: var(--paper); color: var(--forest); display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.driver-x { position: absolute; top: calc(10px + env(safe-area-inset-top)); right: 10px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1.5px solid var(--forest); background: none; font: inherit; font-weight: 500; cursor: pointer; }
.driver-zh { font-weight: 500; line-height: 1.12; letter-spacing: .02em; word-break: keep-all; overflow-wrap: anywhere; }
.driver-latin { letter-spacing: -0.01em; }
.driver-en { font-size: 22px; margin-top: 16px; }
.driver-addr { text-wrap: balance; font-size: 22px; line-height: 1.5; margin: 24px auto 0; max-width: 18em; }
.driver-area { font-size: 16px; margin-top: 18px; color: var(--moss); }
.driver-mtr { font-size: 17px; line-height: 1.5; margin: 22px auto 0; padding-top: 16px; border-top: 1px solid var(--celadon-2); max-width: 18em; }
.driver-mtr span { font-size: 20px; }

/* Ask Lisa */
.chat-note { position: sticky; top: var(--bh, 0px); z-index: 4; background: var(--ground); color: var(--moss); font-size: 15px; padding: 8px 0 12px; margin: 0 0 6px; border-bottom: 1px solid var(--celadon-2); }
.chat-offline { background: var(--celadon); border-radius: 6px; padding: 10px 14px; margin: 10px 0; font-weight: 500; }
.chat-log { display: grid; gap: 12px; margin-top: 14px; padding-bottom: 76px; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 92%; }
.msg-user { justify-self: end; }
.msg-model { justify-self: start; }
.avatar { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--forest); color: var(--paper); display: inline-flex; align-items: center; justify-content: center; font-weight: 500; font-size: 15px; }
.bub { border-radius: 16px; padding: 10px 14px; font-size: 16.5px; line-height: 1.45; }
.msg-model .bub { background: var(--paper); border-bottom-left-radius: 4px; }
.msg-user .bub { background: var(--forest); color: var(--paper); border-bottom-right-radius: 4px; }
.bub p + p { margin-top: 8px; }
.bub a { color: var(--moss); text-underline-offset: 3px; word-break: break-word; }
.msg-error .bub { background: var(--celadon); }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--sage); animation: blink 1.1s infinite; }
.typing i:nth-child(2) { animation-delay: .18s; }
.typing i:nth-child(3) { animation-delay: .36s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.composer {
  position: fixed; left: 0; right: 0; bottom: var(--tabh); z-index: 19; background: var(--ground); border-top: 1px solid var(--celadon-2);
  display: flex; gap: 8px; padding: 10px max(var(--gutter), calc((100vw - var(--col)) / 2 + var(--gutter)));
}
.composer input { flex: 1; min-height: 48px; border: 1.5px solid var(--sage); border-radius: 999px; padding: 0 18px; font: inherit; font-size: 16px; background: var(--paper); color: var(--forest); min-width: 0; }
.composer button { min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0; background: var(--forest); color: var(--paper); font: inherit; font-weight: 500; cursor: pointer; }
.composer button:disabled, .composer input:disabled { opacity: .5; }

/* tour */
.tour { position: fixed; inset: 0; z-index: 100; }
.tour-hole { position: fixed; border-radius: 12px; box-shadow: 0 0 0 100vmax rgba(37, 54, 43, .74); pointer-events: none; transition: all .25s ease; }
.tour-tip { position: fixed; left: 50%; transform: translateX(-50%); width: min(340px, calc(100vw - 32px)); background: var(--paper); border-radius: 12px; padding: 16px 18px; box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }
.tour-text { font-size: 16.5px; }
.tour-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.tour-count { flex: 1; color: var(--moss); font-size: 14px; }
.tour-skip { min-height: 44px; padding: 0 12px; background: none; border: 0; font: inherit; color: var(--moss); text-decoration: underline; cursor: pointer; }
.tour-next { min-height: 44px !important; padding: 0 22px !important; }

/* home-screen bar */
.installbar {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabh) + 8px); z-index: 25; max-width: calc(var(--col) - 24px); margin: 0 auto;
  background: var(--forest); color: var(--paper); border-radius: 12px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; font-size: 15px;
}
.installbar span { flex: 1; }
.installbar .btn { min-height: 44px; padding: 0 18px; background: var(--paper); color: var(--forest); }
.bar-x { min-height: 44px; padding: 0 8px; background: none; border: 0; color: var(--celadon); font: inherit; text-decoration: underline; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  .sheet-panel, .typing i, .tour-hole { animation: none !important; transition: none !important; }
}

/* Lisa starter questions */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0 38px; }
.starter { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--sage); background: var(--paper); color: var(--forest); font: inherit; font-size: 15.5px; cursor: pointer; }
