:root {
  --ink: #4b4a54;
  --muted: #8b8993;
  --paper: #fffdf3;
  --card: #fffefa;
  --accent: #d7b544;
  --accent-dark: #786528;
  --coral: #dfa091;
  --gold: #d39d2f;
  --lavender: #c9c2df;
  --sky: #bcdde2;
  --butter: #f8e792;
  --line: rgba(100, 94, 112, 0.11);
  --shadow: 0 18px 45px rgba(108, 96, 115, 0.12);
}

* { box-sizing: border-box; }

html { background: #f1eee4; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 100% 0, rgba(248, 231, 146, .34), transparent 38%),
    radial-gradient(circle at 0 42%, rgba(243, 198, 167, .16), transparent 28%),
    var(--paper);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  min-height: 100vh;
}

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

.app-shell { width: min(100%, 980px); max-width: 100%; min-height: 100vh; margin: 0 auto; padding-bottom: 118px; overflow-x: hidden; }

.hero {
  position: relative;
  overflow: hidden;
  padding: calc(24px + env(safe-area-inset-top)) 22px 23px;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 8%, rgba(255,255,255,.68), transparent 27%),
    linear-gradient(145deg, #fff7bc, #f8e58b);
  border-radius: 0 0 32px 32px;
  box-shadow: 0 16px 40px rgba(174, 145, 61, .16);
}
.hero-animal { position: absolute; top: 11px; right: 59px; width: 96px; height: 84px; color: rgba(48, 47, 44, .84); fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.hero-animal .animal-tile { fill: rgba(255,255,255,.38); stroke: none; }
.hero-animal .animal-eye { fill: currentColor; stroke: none; }
.hero-animal .cat-patch { fill: currentColor; stroke: currentColor; }
.hero-animal .snack-fill { fill: rgba(255,255,255,.72); }

.hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.eyebrow { margin: 0 0 7px; font-size: 10px; font-weight: 800; letter-spacing: .2em; opacity: .72; }
h1 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: clamp(38px, 10vw, 56px); line-height: 1; letter-spacing: -.08em; }
h1 span { color: #d79791; }
.hero-copy { margin: 11px 0 0; color: rgba(75,74,84,.75); font-size: 14px; }
.icon-button, .close-button { border: 0; background: rgba(255,255,255,.55); color: var(--accent-dark); cursor: pointer; }
.icon-button { width: 40px; height: 40px; border-radius: 14px; font-weight: 900; letter-spacing: 2px; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 25px;
  padding: 17px 8px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 20px;
  background: rgba(255,255,255,.31);
  backdrop-filter: blur(10px);
}
.stats button { min-width: 0; padding: 0 4px; border: 0; border-right: 1px solid rgba(110,91,32,.15); color: var(--accent-dark); text-align: center; background: transparent; cursor: pointer; }
.stats button:last-child { border-right: 0; }
.stats strong { display: block; font: 700 23px Georgia, serif; }
.stats span { display: block; margin-top: 3px; color: rgba(75,74,84,.68); font-size: 11px; }
.stats small { display: block; margin-top: 5px; color: rgba(75,74,84,.47); font-size: 8px; font-weight: 600; }

main { min-width: 0; padding: 20px 16px; }
.toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
.search-box { min-width: 0; display: flex; align-items: center; gap: 7px; height: 47px; padding: 0 14px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 8px 24px rgba(70, 43, 27, .05); }
.search-box span { font: 27px Georgia, serif; color: var(--coral); transform: rotate(-15deg); }
.search-box input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.filter-button { flex: none; border: 1px solid var(--line); border-radius: 16px; padding: 0 14px; background: white; font-size: 12px; font-weight: 700; cursor: pointer; }
.region-filter { grid-column: 1 / -1; display: grid; grid-template-columns: auto repeat(3, minmax(0, 1fr)); align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.74); }
.region-filter > span { color: var(--accent-dark); font-size: 10px; font-weight: 800; }
.region-filter select { min-width: 0; height: 35px; padding: 0 24px 0 8px; border: 0; border-radius: 10px; color: var(--ink); background: #fff6c9; font-size: 9px; }
.region-filter select:nth-of-type(2) { background: #f8f1d7; }
.region-filter select:nth-of-type(3) { background: #fdf1ef; }
.region-filter select:disabled { color: #aaa9a2; background: #f2f1ec; }
.wish-summary { margin-top: 11px; }
.wish-summary > button { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto 14px; align-items: center; gap: 10px; width: 100%; min-height: 68px; padding: 10px 13px; border: 1px solid rgba(218, 160, 151, .2); border-radius: 17px; text-align: left; color: var(--ink); background: linear-gradient(135deg, #fff8e4, #fff2e7); box-shadow: 0 8px 22px rgba(122, 87, 65, .05); cursor: pointer; }
.wish-heart { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; color: #cc817d; background: #ffe5df; font-size: 24px; }
.wish-copy { min-width: 0; }
.wish-copy b, .wish-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wish-copy b { font-size: 13px; }
.wish-copy small { margin-top: 5px; color: var(--muted); font-size: 9px; }
.wish-summary strong { color: #a86e67; font-size: 11px; }
.wish-summary i { color: #b6a59a; font: 22px Georgia, serif; }
.food-library { margin-top: 17px; padding: 14px; border: 1px solid rgba(197,159,94,.16); border-radius: 20px; background: rgba(255,255,255,.58); box-shadow: 0 9px 24px rgba(105,76,48,.05); }
.library-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.library-heading p { margin: 0 0 3px; color: var(--coral); font-size: 8px; font-weight: 900; letter-spacing: .16em; }
.library-heading h2 { margin: 0; font: 700 19px Georgia, "Songti SC", serif; }
.library-heading > small { color: var(--muted); font-size: 8px; }
.library-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.library-grid button { min-width: 0; padding: 11px 6px 9px; border: 0; border-radius: 15px; color: var(--ink); text-align: center; background: #fff1b8; cursor: pointer; }
.library-grid button:nth-child(2) { background: #ffe4e1; }
.library-grid button:nth-child(3) { background: #e3eff3; }
.library-grid span, .library-grid b, .library-grid small, .library-grid strong { display: block; }
.library-grid span { font-size: 22px; }
.library-grid b { margin-top: 5px; font-size: 11px; }
.library-grid small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.library-grid strong { margin-top: 7px; color: #8c7444; font-size: 9px; }
.library-grid button:nth-child(2) strong { color: #a86e67; }
.library-grid button:nth-child(3) strong { color: #668491; }

.section-heading { display: flex; justify-content: space-between; align-items: end; margin: 25px 4px 15px; }
.section-heading p { margin: 0 0 3px; color: var(--coral); font-size: 9px; font-weight: 900; letter-spacing: .18em; }
.section-heading h2, .sheet h2 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: 25px; }
.text-button, .danger-text { border: 0; padding: 6px; background: none; cursor: pointer; font-size: 12px; }
.text-button { color: var(--accent); }
.danger-text { color: #bb3728; }

.food-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.food-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid rgba(74,46,30,.07); border-radius: 21px; background: var(--card); box-shadow: 0 10px 28px rgba(76, 44, 24, .08); transition: transform .2s ease, box-shadow .2s ease; }
.food-card:active { transform: scale(.985); }
.card-hit-area { position: absolute; z-index: 3; inset: 0; border: 0; background: transparent; cursor: pointer; }
.food-photo { position: relative; aspect-ratio: 1 / .86; overflow: hidden; background: linear-gradient(145deg, #f7e2af, #e9b9b5); }
.food-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-placeholder { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: #625d4e; background: linear-gradient(145deg, #fff5b8, #f6e49b); }
.photo-placeholder[hidden] { display: none; }
.card-animal { width: 72px; margin: 0 auto 5px; fill: none; stroke: #3f3b38; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.food-doodle .doodle-eye { fill: #45433e; stroke: none; }
.food-doodle .sticker-cream { fill: #fff8df; }
.food-doodle .sticker-yellow { fill: #f6c65e; }
.food-doodle .sticker-pink { fill: #efb4a2; }
.food-doodle .sticker-red { fill: #c95b50; }
.food-doodle .sticker-green { fill: #7d9f59; }
.food-doodle .sticker-brown { fill: #c18453; }
.food-doodle .sticker-purple { fill: #9c79b2; }
.food-doodle .sticker-blue { fill: #9ebedb; }
.food-doodle .sticker-caramel { fill: #bd7f4c; }
.food-doodle .sticker-dark { fill: #4c514d; }
.photo-placeholder span { font: 700 21px Georgia, "Songti SC", serif; }
.photo-placeholder small { margin-top: 4px; font-size: 9px; letter-spacing: .08em; opacity: .75; }
.card-body { padding: 12px 12px 14px; }
.card-meta { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 9px; }
.card-rating { padding: 4px 7px; border: 1px solid #f0d77d; border-radius: 999px; color: #745d13; background: #fff8d8; font-size: 10px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: 0; white-space: nowrap; }
.card-dish { overflow: hidden; margin: 7px 0 3px; font: 700 17px/1.25 Georgia, "Songti SC", serif; text-overflow: ellipsis; white-space: nowrap; }
.card-shop { overflow: hidden; margin: 0; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.tag-list { display: flex; gap: 5px; overflow: hidden; margin-top: 10px; }
.tag-list span { flex: none; padding: 4px 7px; border-radius: 999px; color: #766526; background: #fff6cb; font-size: 9px; }
.tag-list span:nth-child(even) { color: #766f88; background: #f1eef8; }

.empty-state { padding: 44px 15px; text-align: center; }
.empty-plate { width: 92px; height: 92px; margin: 0 auto 18px; border: 9px double #f0d7c4; border-radius: 50%; color: #e2bea3; font: 48px/67px Georgia, serif; }
.empty-state h3 { margin: 0 0 8px; font-family: Georgia, "Songti SC", serif; font-size: 22px; }
.empty-state p { margin: 0 0 20px; color: var(--muted); font-size: 13px; }

.fab { position: fixed; z-index: 10; right: max(20px, calc((100vw - 940px) / 2)); bottom: calc(22px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 7px; height: 56px; padding: 0 22px; border: 0; border-radius: 19px; color: #514623; background: linear-gradient(135deg, #f3d970, #dfba48); box-shadow: 0 14px 35px rgba(190, 149, 41, .25); font-weight: 800; cursor: pointer; }
.fab span { font-size: 24px; font-weight: 300; }

.sheet { width: min(100% - 16px, 590px); max-height: calc(100vh - 22px); margin: auto auto 0; padding: 0; border: 0; border-radius: 28px 28px 0 0; color: var(--ink); background: #fffbf8; box-shadow: var(--shadow); }
.sheet::backdrop { background: rgba(36, 25, 20, .52); backdrop-filter: blur(4px); }
.sheet[open] { animation: rise .25s ease-out; }
@keyframes rise { from { transform: translateY(35px); opacity: .5; } }
.sheet form, .compact-sheet { padding: 10px 20px calc(22px + env(safe-area-inset-bottom)); }
.sheet-handle { width: 42px; height: 4px; margin: 0 auto 16px; border-radius: 99px; background: #dbcabe; }
.sheet-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 17px; }
.sheet-header .eyebrow { color: var(--accent); }
.close-button { width: 36px; height: 36px; border-radius: 50%; color: var(--muted); background: #f1e8df; font-size: 25px; }

.photo-section, .dish-section, .visit-history { margin-bottom: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 19px; background: rgba(255,255,255,.72); }
.field-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.field-heading b, .field-heading small { display: block; }
.field-heading b { color: #685d57; font-size: 12px; }
.field-heading small { margin-top: 4px; color: var(--muted); font-size: 9px; font-weight: 400; }
.field-heading > span { flex: none; color: var(--accent); font-size: 11px; font-weight: 800; }
.photo-grid { display: grid; gap: 9px; }
.dish-item { position: relative; display: grid; grid-template-columns: 78px minmax(0, 1fr) 27px; align-items: start; gap: 9px; padding: 9px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.dish-photo { position: relative; display: grid; place-content: center; overflow: hidden; width: 74px; aspect-ratio: 1; border-radius: 11px; color: #a99184; background: linear-gradient(145deg, #f5e4d5, #f9efe6); font-size: 9px; }
.dish-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dish-photo img:not([src]) { display: none; }
.cover-choice { position: absolute; right: 4px; bottom: 4px; padding: 4px 6px; border: 0; border-radius: 999px; color: white; background: rgba(33,23,19,.7); font-size: 8px; cursor: pointer; }
.cover-choice.selected { color: #8b2d18; background: #ffd695; font-weight: 800; }
.dish-fields { display: grid; gap: 7px; min-width: 0; }
.dish-fields input { height: 38px; border-radius: 10px; }
.dish-fields label { position: relative; display: block; }
.dish-fields label span { position: absolute; z-index: 1; left: 10px; top: 10px; color: var(--accent); font-size: 12px; }
.dish-fields label input { padding-left: 25px; }
.dish-rating-editor { display: grid; grid-template-columns: auto minmax(92px, 1fr) 32px; align-items: center; gap: 8px; }
.dish-rating-editor > span { color: var(--muted); font-size: 9px; }
.rating-control { position: relative; width: 104px; height: 26px; }
.rating-preview { position: absolute; inset: 4px auto auto 0; color: #d8d8cf; font-size: 18px; letter-spacing: 2px; line-height: 1; pointer-events: none; }
.rating-preview::before { content: "★★★★★"; }
.rating-preview > span { position: absolute; inset: 0 auto 0 0; width: calc(var(--rating, 0) / 5 * 100%); overflow: hidden; color: var(--gold); white-space: nowrap; }
.rating-preview > span::before { content: "★★★★★"; }
.dish-rating-editor input { position: absolute; inset: 0; z-index: 1; width: 104px; height: 26px; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.rating-control:focus-within .rating-preview { border-radius: 4px; outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 3px; }
.dish-rating-editor output { color: var(--gold); font: 700 11px Georgia, serif; text-align: right; }
.dish-review-input { min-height: 54px; padding: 9px 10px; border-radius: 10px; font-size: 10px; line-height: 1.45; }
.field-hint { float: right; color: var(--muted); font-size: 9px; font-weight: 400; }
.region-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 7px 0; }
.region-grid select { min-width: 0; height: 43px; padding: 0 27px 0 10px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: #fff; font-size: 10px; }
.region-grid select:disabled { color: #aaa9a2; background: #f4f3ee; }
.dish-item > .remove-dish { align-self: start; }
.photo-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 10px; }
.photo-action { position: relative; display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 46px; overflow: hidden; border: 1px solid #efc8b6; border-radius: 14px; color: #a7422c; background: #fff3ea; font-size: 11px; font-weight: 800; cursor: pointer; }
.photo-action span { font-size: 19px; font-weight: 400; }
.photo-action input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.album-action { color: #50451f; border-color: #e1bd47; background: linear-gradient(135deg, #f8e588, #e7c755); }
.no-photo-dish { width: 100%; margin-top: 9px; padding: 9px; border: 0; border-radius: 11px; color: var(--accent); background: transparent; font-size: 10px; font-weight: 800; cursor: pointer; }

.dish-section { padding-bottom: 8px; }
.field-heading button { flex: none; border: 0; padding: 7px 9px; border-radius: 10px; color: var(--accent); background: #fff0e8; font-size: 10px; font-weight: 800; cursor: pointer; }
.dish-list { display: grid; gap: 8px; }
.dish-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) 28px; align-items: center; gap: 7px; }
.dish-number { color: #c4aaa0; font: 700 11px Georgia, serif; }
.dish-row input { height: 42px; }
.remove-dish { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; color: #a8958b; background: #f2e9e3; font-size: 18px; cursor: pointer; }
.dish-row:only-child .remove-dish { visibility: hidden; }

.visit-tabs { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.visit-tabs::-webkit-scrollbar { display: none; }
.visit-tab { flex: none; padding: 8px 10px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: white; font-size: 10px; cursor: pointer; }
.visit-tab.active { color: white; border-color: var(--accent); background: var(--accent); }

.cost-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 12px; }
.cost-summary div { padding: 12px 14px; border-radius: 15px; background: #fff7d2; }
.cost-summary div:last-child { background: #f1eef8; }
.cost-summary span, .cost-summary strong { display: block; }
.cost-summary span { color: var(--muted); font-size: 9px; }
.cost-summary strong { margin-top: 4px; color: var(--accent-dark); font: 700 19px Georgia, serif; }
.secondary-button { min-height: 43px; padding: 0 14px; border: 1px solid #b9cabe; border-radius: 14px; color: var(--accent); background: #f1f5ef; font-size: 11px; font-weight: 800; cursor: pointer; }

.form-row { display: grid; gap: 11px; margin-bottom: 12px; }
.two-columns { grid-template-columns: 1fr 1fr; }
.form-row label, .full-field { display: grid; gap: 6px; color: #685d57; font-size: 11px; font-weight: 700; }
.full-field { margin-bottom: 12px; }
input, textarea { width: 100%; border: 1px solid var(--line); border-radius: 13px; outline: none; color: var(--ink); background: white; }
input { height: 44px; padding: 0 12px; }
textarea { resize: vertical; padding: 12px; line-height: 1.6; }
input:focus, textarea:focus { border-color: rgba(215, 181, 68, .75); box-shadow: 0 0 0 3px rgba(215, 181, 68, .13); }
.rating-field { margin: 0 0 12px; padding: 0; border: 0; }
.rating-field legend { margin-bottom: 6px; color: #685d57; font-size: 11px; font-weight: 700; }
.rating-buttons { display: flex; gap: 7px; }
.rating-buttons button { width: 43px; height: 43px; border: 1px solid var(--line); border-radius: 13px; color: #d8cdc5; background: white; font-size: 23px; cursor: pointer; }
.rating-buttons button.active { color: var(--gold); border-color: #f4c36e; background: #fff8e8; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 19px; }
.primary-button { min-height: 46px; padding: 0 21px; border: 0; border-radius: 15px; color: #514623; background: linear-gradient(135deg, #f3dc7b, #dfba48); box-shadow: 0 9px 22px rgba(190, 149, 41, .19); font-weight: 800; cursor: pointer; }

.compact-sheet { padding-top: 10px; }
.setting-list { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: white; }
.setting-list button, .setting-import { display: grid; grid-template-columns: 38px 1fr 20px; align-items: center; width: 100%; min-height: 72px; padding: 11px 14px; border: 0; border-bottom: 1px solid var(--line); text-align: left; background: white; cursor: pointer; }
.setting-list > :last-child { border-bottom: 0; }
.setting-list > * > span { color: var(--accent); font-size: 22px; }
.setting-list b, .setting-list small { display: block; }
.setting-list b { font-size: 13px; }
.setting-list small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.setting-list i { color: #b9aaa0; font: 24px Georgia, serif; }
.setting-import { position: relative; }
.setting-import input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.privacy-note { margin: 15px 8px 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.share-panel { display: grid; gap: 12px; }
.share-intro { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: #fff5c7; }
.share-intro > span { display: grid; place-items: center; flex: none; width: 39px; height: 39px; border-radius: 50%; color: #9b6874; background: #f8dce3; font-size: 21px; }
.share-intro b, .share-intro small { display: block; }
.share-intro b { font-size: 12px; }
.share-intro small { margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.55; }
.share-code-field { display: grid; gap: 7px; color: #685d57; font-size: 10px; font-weight: 700; }
.share-connect-button, .share-sync-button, .share-disconnect-button { width: 100%; min-height: 44px; border-radius: 13px; font-size: 11px; font-weight: 800; cursor: pointer; }
.share-sync-button { border: 1px solid #dfbd4e; color: #735f1d; background: #fff6c9; }
.share-disconnect-button { border: 1px solid #efc9c2; color: #a65f55; background: #fff7f4; }
.share-state { padding: 10px 12px; border-radius: 12px; color: #796e68; background: #f5f0ec; font-size: 10px; line-height: 1.5; text-align: center; }
.share-state.connected { color: #55714d; background: #edf6e9; }
.share-state.error { color: #a45b4e; background: #fff0ea; }
.share-note { margin: 0 3px; color: var(--muted); font-size: 9px; line-height: 1.6; }
.install-help-sheet { overflow-y: auto; }
.install-help { display: grid; gap: 13px; }
.install-device { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; border-radius: 15px; background: #fff7d2; }
.install-device span { flex: none; padding: 5px 8px; border-radius: 999px; color: #69571e; background: #f2d56c; font-size: 9px; font-weight: 800; }
.install-device b { font-size: 11px; text-align: right; }
.install-steps { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.install-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 14px; background: white; color: #665b55; font-size: 11px; line-height: 1.55; }
.install-steps li > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #584b21; background: #f5df84; font: 800 11px Georgia, serif; }
.install-warning { margin: 0; padding: 12px 13px; border-radius: 14px; color: #81502f; background: #fff0df; font-size: 10px; line-height: 1.65; }
.install-tip { margin: 0 3px; color: var(--muted); font-size: 9px; line-height: 1.6; }
.install-status { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 16px; background: #edf6e9; }
.install-status > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: white; background: #82aa72; font-weight: 900; }
.install-status b, .install-status small { display: block; }
.install-status small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.wish-sheet { overflow-y: auto; padding: 10px 20px calc(24px + env(safe-area-inset-bottom)); }
.wish-form { display: grid; gap: 12px; margin-bottom: 16px; padding: 13px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.72); }
.wish-form label { display: grid; gap: 6px; color: #685d57; font-size: 10px; font-weight: 700; }
.wish-form input { height: 42px; }
.wish-full-field { width: 100%; }
.wish-food-section, .wish-location-section { display: grid; gap: 8px; }
.wish-location-section > b { color: #685d57; font-size: 10px; }
.wish-field-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wish-field-heading b { color: #685d57; font-size: 10px; }
.wish-field-heading button { padding: 6px 9px; border: 0; border-radius: 9px; color: #806a22; background: #fff4bb; font-size: 9px; font-weight: 800; cursor: pointer; }
.wish-food-fields { display: grid; gap: 7px; }
.wish-food-row { display: grid; grid-template-columns: minmax(0, 1fr) 30px; align-items: center; gap: 7px; }
.wish-food-row button { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; color: #a86b61; background: #fff0eb; font-size: 18px; cursor: pointer; }
.wish-list { display: grid; gap: 8px; max-height: 48vh; overflow-y: auto; }
.wish-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.wish-item b, .wish-item small { display: block; }
.wish-item b { font-size: 13px; }
.wish-item small { margin-top: 5px; color: var(--muted); font-size: 9px; }
.wish-item-location { color: #887a61 !important; }
.wish-item button { width: 30px; height: 30px; border: 0; border-radius: 50%; color: #b17268; background: #fff0eb; font-size: 17px; cursor: pointer; }
.wish-empty { padding: 28px 10px; color: var(--muted); text-align: center; font-size: 11px; }

.detail-sheet, .shop-list-sheet { padding: 10px 20px calc(24px + env(safe-area-inset-bottom)); }
.detail-sheet { height: min(780px, calc(100dvh - 12px)); max-height: calc(100dvh - 12px); overflow-y: auto; overscroll-behavior: contain; }
.detail-header { position: sticky; z-index: 8; top: -10px; margin: 0 -2px 13px; padding: 10px 2px 10px; background: rgba(255,251,248,.97); backdrop-filter: blur(8px); }
.detail-header > div { min-width: 0; }
.detail-header .close-button { z-index: 9; flex: none; box-shadow: 0 4px 12px rgba(74,55,45,.12); }
.detail-header h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-header p:last-child { margin: 6px 0 0; color: var(--muted); font-size: 10px; }
.dish-carousel { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 22px; }
.dish-carousel::-webkit-scrollbar { display: none; }
.dish-slide { flex: 0 0 100%; overflow: hidden; scroll-snap-align: start; border: 1px solid var(--line); border-radius: 22px; background: white; }
.slide-photo { position: relative; display: grid; place-content: center; aspect-ratio: 1.18 / 1; color: #68604a; background: linear-gradient(145deg, #fff5bb, #f4e29b); }
.slide-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide-photo span { font: 700 52px Georgia, "Songti SC", serif; opacity: .9; }
.slide-photo .slide-visit-date { position: absolute; top: 12px; left: 12px; z-index: 1; padding: 6px 9px; border-radius: 999px; color: white; background: rgba(40,28,23,.64); font: 700 9px/1.2 "Microsoft YaHei", sans-serif; }
.slide-body { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; }
.slide-body h3 { margin: 0; font: 700 21px Georgia, "Songti SC", serif; }
.slide-body p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.slide-rating { display: flex; align-items: center; min-height: 20px; }
.star-meter { position: relative; display: inline-block; margin-top: 6px; color: #d7d8d0; font-size: 14px; letter-spacing: 1px; line-height: 1; }
.star-meter::before { content: "★★★★★"; }
.star-meter > span { position: absolute; inset: 0 auto 0 0; width: calc(var(--rating, 0) / 5 * 100%); overflow: hidden; color: var(--gold); white-space: nowrap; }
.star-meter > span::before { content: "★★★★★"; }
.star-number { margin-left: 6px; color: var(--gold); font: 700 10px Georgia, serif; }
.slide-price { flex: none; color: var(--accent-dark); font: 700 23px Georgia, serif; }
.slide-actions { display: flex; flex: none; flex-direction: column; align-items: flex-end; gap: 9px; }
.dish-delete-button { border: 0; border-radius: 999px; padding: 7px 10px; color: #a94a3d; background: #fff0e9; font: 700 10px/1 "Microsoft YaHei", sans-serif; cursor: pointer; }
.dish-delete-button:disabled { opacity: .55; }
.carousel-dots { display: flex; justify-content: center; gap: 5px; min-height: 7px; margin: 11px 0 15px; }
.carousel-dots span { width: 5px; height: 5px; border-radius: 99px; background: #d8c6bc; transition: .2s; }
.carousel-dots span.active { width: 18px; background: var(--accent); }
.detail-meta { display: grid; grid-template-columns: minmax(105px, .8fr) minmax(0, 2fr); gap: 8px; }
.detail-meta div { min-width: 0; padding: 12px; border-radius: 13px; text-align: left; background: #fff7d2; }
.detail-meta div:last-child { background: #f4eff5; }
.detail-meta span, .detail-meta strong { display: block; }
.detail-meta span { color: var(--muted); font-size: 8px; }
.detail-meta strong { margin-top: 5px; overflow-wrap: anywhere; font-size: 11px; line-height: 1.45; }
.detail-revisit-button { display: block; width: 100%; margin-top: 13px; padding: 12px; border: 1px solid #efc4cc; border-radius: 13px; color: #9f6370; background: #fff5f7; font-size: 11px; font-weight: 800; cursor: pointer; }
.detail-revisit-button.active { color: #8b4d5b; border-color: #e9aeb9; background: #f9dfe5; }
.detail-cover-button { display: block; width: 100%; margin-top: 13px; padding: 12px; border: 1px solid rgba(186, 146, 45, .25); border-radius: 13px; color: #69571e; background: #fff5c7; font-size: 11px; font-weight: 800; cursor: pointer; }
.cover-picker { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.74); }
.cover-picker-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.cover-picker-heading b { font-size: 11px; }
.cover-picker-heading span { color: var(--muted); font-size: 8px; }
.cover-picker-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cover-empty { grid-column: 1 / -1; margin: 0; padding: 18px 8px; color: var(--muted); text-align: center; font-size: 10px; line-height: 1.6; }
.cover-option { position: relative; overflow: hidden; padding: 0; border: 2px solid transparent; border-radius: 11px; background: #f3efe5; aspect-ratio: 1; cursor: pointer; }
.cover-option img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-option span { position: absolute; inset: auto 4px 4px; overflow: hidden; padding: 3px 5px; border-radius: 999px; color: white; background: rgba(48,42,37,.64); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.cover-option.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(215,181,68,.17); }
.cover-option.selected::after { content: "当前封面"; position: absolute; top: 4px; right: 4px; padding: 3px 5px; border-radius: 999px; color: #5c4b17; background: #ffe67d; font-size: 7px; font-weight: 800; }
.detail-delete-button { display: block; width: 100%; margin-top: 13px; padding: 12px; border: 1px solid rgba(180, 85, 72, .22); border-radius: 13px; color: #b15f55; background: #fff6f2; font-size: 11px; font-weight: 700; cursor: pointer; }
.detail-delete-button:active { background: #fde9e3; }

.shop-list { display: grid; gap: 9px; max-height: 65vh; overflow-y: auto; }
.shop-list-item { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 11px; width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 15px; text-align: left; background: white; cursor: pointer; }
.shop-list-cover { display: grid; place-content: center; width: 46px; height: 46px; overflow: hidden; border-radius: 12px; color: #6d6349; background: linear-gradient(145deg, #fff5bb, #f1dfa0); font-family: Georgia, serif; }
.shop-list-cover img { width: 100%; height: 100%; object-fit: cover; }
.shop-list-item b, .shop-list-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-list-item b { font-size: 13px; }
.shop-list-item small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.shop-list-item > span:last-child { color: var(--accent); font: 20px Georgia, serif; }

.toast { position: fixed; z-index: 50; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); max-width: calc(100% - 40px); padding: 10px 16px; border-radius: 999px; color: white; background: rgba(35, 28, 25, .9); box-shadow: var(--shadow); font-size: 12px; transform: translate(-50%, 18px); opacity: 0; pointer-events: none; transition: .22s ease; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (min-width: 700px) {
  body { padding: 24px 0; }
  .app-shell { min-height: calc(100vh - 48px); overflow: hidden; border-radius: 32px; background: var(--paper); box-shadow: 0 30px 80px rgba(57, 36, 23, .14); }
  .hero { border-radius: 0 0 32px 32px; padding-inline: 34px; }
  main { padding-inline: 30px; }
  .food-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 370px) {
  .hero { padding-inline: 17px; }
  main { padding-inline: 12px; }
  .two-columns { grid-template-columns: 1fr; }
  .rating-buttons { gap: 5px; }
  .rating-buttons button { width: 40px; }
}
