@font-face {
  font-family: "Map Brush";
  src: url("assets/ma-shan-zheng.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #342821;
  --mute: #746255;
  --paper: #f8f0dc;
  --ivory: #fffbef;
  --line: #d8c7aa;
  --red: #ae392b;
  --red-dark: #862a20;
  --red-light: #f5dbcc;
  --yellow: #f5e3ad;
  --sage: #e2eacb;
  --blue: #d9e9e4;
  --hand: "Map Brush", "Kaiti SC", STKaiti, KaiTi, serif;
  --body: "PingFang SC", "Microsoft YaHei", "Source Sans 3", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--paper); }
body {
  margin: 0;
  color: var(--ink);
  font: 15px/1.55 var(--body);
  background-color: var(--paper);
  background-image: radial-gradient(#8b5d3318 .65px, transparent .75px), radial-gradient(#c6822926 .45px, transparent .65px);
  background-size: 5px 7px, 11px 9px;
}

button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .44; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.masthead { border-bottom: 1px dashed #cbb697; }
.masthead-inner, .page {
  max-width: 1640px;
  margin: 0 auto;
  padding-inline: clamp(18px, 3vw, 48px);
}
.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 67px;
  gap: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  white-space: nowrap;
  font: 28px/1 var(--hand);
}
.brand-mark {
  position: relative;
  width: 37px;
  height: 36px;
  flex: none;
  transform: rotate(-7deg);
  border: 1px solid var(--red-dark);
  border-radius: 9px 10px 8px 11px / 8px 9px 11px 9px;
  background: var(--red);
  box-shadow: 1px 2px 0 #623a28;
}
.brand-mark span {
  position: absolute;
  left: 7px;
  top: 16px;
  width: 22px;
  height: 11px;
  border: 1.5px solid var(--ivory);
  border-radius: 4px 4px 12px 12px;
}
.brand-mark span::before {
  position: absolute;
  content: "";
  top: -8px;
  left: 2px;
  width: 18px;
  height: 3px;
  transform: rotate(-15deg);
  border-block: 1px solid var(--ivory);
}
.masthead-actions { display: flex; align-items: center; gap: 13px; }
.account-name {
  max-width: 124px;
  color: var(--mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px 8px 7px 6px;
  background: #fffaf0;
  font-size: 13px;
}
.account-name:hover { color: var(--red-dark); border-color: var(--red); }
.city {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
}
.pin-icon {
  display: inline-block;
  width: 10px;
  height: 12px;
  background: var(--red);
  border-radius: 70% 65% 65% 5%;
  transform: rotate(-45deg);
  flex: none;
}
.pin-icon::after {
  content: "";
  display: block;
  width: 3px;
  height: 3px;
  margin: 3px auto 0;
  border-radius: 50%;
  background: var(--ivory);
}
.my-ratings {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1.3px solid #bda486;
  border-radius: 8px 11px 8px 11px;
  background: var(--ivory);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.my-ratings:hover, .my-ratings[aria-pressed="true"] { color: var(--red-dark); border-color: var(--red); background: var(--red-light); }
#rating-count {
  min-width: 19px;
  padding-inline: 4px;
  text-align: center;
  border-radius: 12px;
  background: var(--red-light);
  color: var(--red-dark);
  font-size: 11px;
}

.intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-block: 30px 24px;
}
.intro h1 {
  margin: 0;
  font: 400 clamp(46px, 5.3vw, 84px)/1.05 var(--hand);
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}
.title-accent { position: relative; isolation: isolate; color: var(--red); }
.title-accent::after {
  content: "";
  position: absolute;
  inset: auto 0 .03em -.025em;
  height: .11em;
  transform: rotate(-3deg);
  z-index: -1;
  background: #e4a44970;
  border-radius: 44% 49% 34% 38%;
}
.intro p { margin: 10px 0 0; font-size: 14px; color: var(--mute); }
.guest {
  display: flex;
  position: relative;
  align-items: center;
  gap: 15px;
  min-width: 217px;
  padding: 13px 22px 13px 16px;
  margin: 0 7px 0 0;
  border: 1px solid #c7ab80;
  border-radius: 4px 9px 4px 6px;
  background: #f6e5b7;
  box-shadow: 2px 3px 0 #a4743820;
  transform: rotate(2.2deg);
}
.guest::before {
  content: "";
  position: absolute;
  left: 53%;
  top: -9px;
  width: 62px;
  height: 15px;
  background: #deb46766;
  transform: rotate(-9deg);
  clip-path: polygon(1% 0, 99% 0, 96% 29%, 100% 55%, 96% 82%, 99% 100%, 0 100%, 4% 70%, 0 35%);
}
.guest-stamp {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 42px;
  border: 2px solid currentColor;
  border-radius: 50% 44% 48% 46%;
  color: var(--red);
  font: italic 700 27px/1 Georgia, serif;
  transform: rotate(-12deg);
}
.guest-role { display: block; color: #734a28; font-size: 11px; font-weight: 700; }
.guest strong { font: 27px/1.1 var(--hand); }
.guest-edition { color: var(--mute); font: 12px/1 var(--body); }

.map-shelves {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 9px;
  border-bottom: 1px dashed var(--line);
}
.shelf-views { display: flex; gap: 4px; }
.map-shelves button {
  min-height: 34px;
  padding: 5px 10px;
  color: var(--mute);
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  font-size: 13px;
  font-weight: 750;
}
.map-shelves button:hover, .map-shelves button[aria-pressed="true"] {
  color: var(--red-dark);
  border-bottom-color: var(--red);
}
#rating-count { margin-left: 5px; font-size: 11px; }
#room-options { padding-inline: 6px; color: var(--red-dark); }
.room-actions { display: flex; align-items: center; gap: 7px; margin-block: 3px; }
.room-actions #room-share {
  min-height: 34px;
  padding: 5px 11px;
  color: #fff9ef;
  border: 1px solid var(--red-dark);
  border-radius: 6px 8px 7px 6px;
  background: var(--red);
}
.room-actions #room-share:hover { background: var(--red-dark); }
.map-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
  padding-bottom: 14px;
}
.category-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pick-place {
  flex: none;
  min-height: 36px;
  padding: 4px 12px;
  color: var(--red-dark);
  background: #f5e4bb;
  border: 1.2px solid #9d5942;
  border-radius: 5px 9px 6px 7px;
  box-shadow: 1px 2px 0 #7a4d392e;
  font-size: 13px;
  font-weight: 750;
}
.pick-place span { margin-right: 3px; }
.pick-place:not(:disabled):hover { background: #f1d797; }
.pick-place:not(:disabled):active { translate: 0 1px; box-shadow: none; }
.category {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 13px 5px;
  min-height: 36px;
  white-space: nowrap;
  border: 1.15px solid #c7af90;
  border-radius: 8px 10px 9px 7px;
  background: var(--ivory);
  font-size: 13px;
  font-weight: 650;
}
.category img { width: 23px; height: 23px; object-fit: contain; }
.category:hover { border-color: var(--red); }
.category[aria-pressed="true"] {
  color: #fff9e9;
  border-color: var(--red-dark);
  background: var(--red);
  box-shadow: 1px 2px 0 #783c2c80;
}

.journal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(298px, 27vw, 364px);
  height: clamp(510px, calc(100dvh - 325px), 780px);
  border: 1.5px solid #765e47;
  border-radius: 18px 15px 17px 15px / 15px 16px 14px 17px;
  box-shadow: 3px 4px 0 #79593833;
  overflow: hidden;
  background: var(--ivory);
}
.map-sheet {
  position: relative;
  min-width: 0;
  isolation: isolate;
  overflow: hidden;
  background: #f0e2c2;
}
.map-surface {
  position: absolute;
  inset: 0;
  outline-offset: -4px;
  user-select: none;
  touch-action: none;
  cursor: grab;
  scroll-margin-top: 10px;
}
.map-surface.is-dragging { cursor: grabbing; }
#map-canvas, .map-markers { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-markers { pointer-events: none; isolation: isolate; }
.marker {
  position: absolute;
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  padding: 2px;
  transform: translate(-50%, -88%) rotate(var(--tilt, -4deg));
  color: var(--ink);
  border: 1.5px solid #76553a;
  border-radius: 48% 47% 48% 47%;
  background: #fff9e9;
  box-shadow: 0 3px 0 #79583850;
  pointer-events: auto;
}
.marker::after {
  content: "";
  position: absolute;
  z-index: -1;
  bottom: -3px;
  left: 17px;
  width: 8px;
  height: 8px;
  transform: rotate(45deg);
  border-right: 1.4px solid #76553a;
  border-bottom: 1.4px solid #76553a;
  border-radius: 0 0 3px;
  background: inherit;
}
.marker img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.marker.is-primary { background: #fff6dc; border-color: var(--red); }
.marker.is-closed { background: #ede6d8; }
.marker[data-opinion="great"] { border-color: var(--red); background: var(--red-light); }
.marker[data-opinion="okay"] { border-color: #627349; background: var(--sage); }
.marker[data-opinion="bad"] { border-color: #548188; background: var(--blue); }
.marker:hover, .marker:focus-visible, .marker.is-previewed { z-index: 3; background: #fce6b7; }
.marker.is-selected {
  z-index: 4;
  border-color: var(--red);
  box-shadow: 0 0 0 4px #b53d2b3d, 0 3px 0 #7958386b;
  transform: translate(-50%, -93%) rotate(var(--tilt, -4deg)) scale(1.12);
}
.marker-count {
  position: absolute;
  top: -7px;
  right: -8px;
  min-width: 20px;
  height: 20px;
  padding-inline: 3px;
  border: 1px solid #863322;
  border-radius: 50%;
  color: #fff8e9;
  background: var(--red);
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
}
.marker-label {
  display: none;
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  max-width: 190px;
  width: max-content;
  padding: 4px 9px;
  color: var(--ink);
  background: var(--ivory);
  border: 1px solid #9f7a56;
  border-radius: 5px;
  box-shadow: 1px 2px 0 #70503935;
  transform: translateX(-50%);
  font-size: 12px;
  line-height: 1.35;
}
.marker:hover .marker-label,
.marker:focus-visible .marker-label,
.marker.is-previewed .marker-label,
.marker.is-selected .marker-label { display: block; }
.marker.is-selected .marker-label { border-color: var(--red); color: var(--red-dark); }
.marker.near-left .marker-label { left: -8px; transform: none; }
.marker.near-right .marker-label { left: auto; right: -8px; transform: none; }

.map-region {
  position: absolute;
  z-index: 2;
  top: 15px;
  left: 15px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1.1px solid #ab9274;
  border-radius: 7px 10px 8px 8px;
  color: #594634;
  background: #fffae8ee;
  font-size: 11px;
  font-weight: 700;
}
.map-region button {
  padding: 5px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}
.map-region button:hover { background: var(--yellow); }
.compass {
  position: absolute;
  z-index: 2;
  top: 15px;
  right: 17px;
  display: grid;
  justify-items: center;
  width: 39px;
  height: 46px;
  font: 17px/1 var(--hand);
  color: #624a3a;
  pointer-events: none;
}
.compass i {
  width: 17px;
  height: 25px;
  background: linear-gradient(90deg, #ad493c 0 50%, #744737 50%);
  clip-path: polygon(50% 0, 98% 100%, 50% 69%, 2% 100%);
}
.map-controls {
  position: absolute;
  z-index: 2;
  right: 13px;
  bottom: 36px;
  display: grid;
  justify-items: end;
  gap: 4px;
}
.map-controls button {
  width: 36px;
  height: 35px;
  padding: 0;
  border: 1px solid #987f64;
  border-radius: 7px 9px 7px 9px;
  background: var(--ivory);
  box-shadow: 1px 2px 0 #79583933;
  font: 24px/1 system-ui, sans-serif;
}
.map-controls button:not(:disabled):hover { background: var(--yellow); }
.map-controls .locate-me {
  width: auto;
  padding: 0 8px;
  color: #245775;
  border-color: #77919b;
  font: 700 11px/1 var(--body);
}
.location-message {
  position: absolute;
  z-index: 2;
  bottom: 30px;
  left: 12px;
  max-width: calc(100% - 112px);
  margin: 0;
  padding: 6px 9px;
  color: #28506b;
  border: 1px solid #91aaa9;
  border-radius: 6px;
  background: #fffae9f5;
  font-size: 11px;
}
.map-foot {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 5px;
  bottom: 8px;
  padding-inline: 12px;
  width: 100%;
  pointer-events: none;
}
.map-credit {
  margin-left: auto;
  padding: 0 4px;
  color: #524836;
  background: #fff8e2e0;
  border-radius: 3px;
  font-size: 9px;
  pointer-events: auto;
}
.map-credit a { text-decoration: none; }
.map-credit a:hover { text-decoration: underline; }
.map-scale { border: 1px solid #554333; border-top: 0; text-align: center; font-size: 9px; line-height: 12px; background: #fff8e28c; }

.places-panel {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-left: 1.5px solid #866a4d;
  background: #fff9ea;
}
.places-header {
  padding: 19px 16px 12px;
  border-bottom: 1px dashed var(--line);
}
.places-heading { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-bottom: 11px; }
.places-heading h2 { margin: 0; font: 31px/1.13 var(--hand); }
.places-count { white-space: nowrap; color: var(--red-dark); font-size: 12px; font-weight: 700; }
.search {
  display: flex;
  gap: 9px;
  align-items: center;
  min-height: 37px;
  padding-inline: 11px;
  border: 1px solid var(--line);
  border-radius: 7px 8px 9px 7px;
  background: #f8f0dd;
}
.search:focus-within { border-color: var(--red); }
.search-icon {
  position: relative;
  flex: none;
  width: 13px;
  height: 13px;
  border: 1.6px solid #796757;
  border-radius: 50%;
}
.search-icon::after { content: ""; position: absolute; top: 10px; left: 9px; width: 6px; height: 1.4px; background: #796757; transform: rotate(46deg); }
.search input { padding: 6px 0; outline: none; width: 100%; min-width: 0; border: 0; background: transparent; font-size: 13px; color: var(--ink); }
.search input::placeholder { color: #796a5c; }
.places-list { overflow-y: auto; scrollbar-color: #d3b991 transparent; padding: 1px 12px 14px; }
.place-card {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 83px;
  padding: 8px 4px;
  border: 0;
  border-bottom: 1px dashed #ddcdb2;
  background: transparent;
  text-align: start;
}
.place-card:hover, .place-card.is-highlighted { background: #f5ebd7; }
.place-card.is-selected { background: #f7e5d2; }
.place-card:focus-visible { outline-offset: -2px; }
.food-thumb {
  display: grid;
  place-items: center;
  flex: none;
  width: 56px;
  height: 54px;
  padding: 4px;
  border-radius: 11px 12px 10px 12px / 9px 11px 12px 9px;
  background: var(--yellow);
}
.food-thumb img { width: 100%; height: 100%; object-fit: contain; }
.food-thumb[data-tint="red"] { background: var(--red-light); }
.food-thumb[data-tint="sage"] { background: var(--sage); }
.food-thumb[data-tint="blue"] { background: var(--blue); }
.place-card-body { flex: 1; min-width: 0; }
.place-card-title { display: block; color: #392a22; font-size: 13.5px; line-height: 1.45; font-weight: 750; overflow-wrap: anywhere; }
.place-card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 6px; margin-top: 4px; color: var(--mute); font-size: 11px; }
.place-arrow { margin-left: auto; color: #8a6b52; font: 21px/1 var(--body); }
.tag { display: inline-block; padding: 1px 5px; border-radius: 4px; color: #6a4e3b; background: #f2e4cc; font-size: 10px; font-weight: 650; }
.tag[data-rating="great"] { background: var(--red-light); color: var(--red-dark); }
.tag[data-rating="okay"] { background: var(--sage); color: #384729; }
.tag[data-rating="bad"] { background: var(--blue); color: #2c4f4f; }
.empty { margin: 24px 6px; font-size: 14px; color: var(--mute); }
.empty button { margin-top: 8px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--ivory); }
.footer { padding: 14px 0 18px; color: var(--mute); font-size: 11px; }
.footer a { margin-left: 8px; text-underline-offset: 2px; }
.footer-action {
  margin-left: 8px;
  padding: 2px 4px;
  color: var(--red-dark);
  border: 0;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-dialog {
  width: min(420px, calc(100% - 28px));
  max-height: 88dvh;
  padding: 0;
  color: var(--ink);
  border: 1.4px solid #85674d;
  border-radius: 13px 12px 15px 11px;
  background: var(--ivory);
  box-shadow: 4px 6px 0 #6546364d;
  scrollbar-color: #d3b991 transparent;
}
.site-dialog::backdrop { background: #39281970; }
.dialog-content { padding: 20px 19px; }
.dialog-content h2 { margin: 0 35px 5px 0; font: 29px/1.2 var(--hand); overflow-wrap: anywhere; }
.dialog-content h2[tabindex="-1"]:focus { outline: none; }
.account-table-name {
  margin: 0 0 4px;
  color: var(--red-dark);
  font-size: 17px;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.dialog-close-form { position: sticky; top: 0; height: 0; z-index: 1; }
.dialog-close {
  position: absolute;
  right: 7px;
  top: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #644b38;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle, #fffaf0 14px, var(--line) 14px 15px, transparent 15px);
  font-size: 0;
}
.dialog-close::before, .dialog-close::after {
  content: "";
  position: absolute;
  top: calc(50% - 1px);
  left: calc(50% - 7px);
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}
.dialog-close::before { transform: rotate(45deg); }
.dialog-close::after { transform: rotate(-45deg); }
.dialog-close:hover { background: radial-gradient(circle, var(--red-light) 14px, var(--line) 14px 15px, transparent 15px); }
.dialog-help { margin: 0; color: var(--mute); font-size: 13px; }
.auth-tabs {
  display: flex;
  flex-wrap: wrap;
  width: fit-content;
  gap: 2px;
  padding: 2px;
  margin-top: 13px;
  border: 1px solid #c9b290;
  border-radius: 7px 8px 7px 6px;
  background: #f6ebd2;
}
.auth-tabs button {
  min-height: 32px;
  padding: 3px 12px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}
.auth-tabs button[aria-pressed="true"] { color: var(--ivory); background: var(--red); }
.dialog-fields { display: grid; gap: 11px; margin-top: 13px; }
.dialog-fields label { display: grid; gap: 4px; font-size: 13px; font-weight: 700; }
.dialog-fields input:not([type="checkbox"]):not([type="radio"]), .dialog-fields textarea {
  width: 100%;
  padding: 7px 9px;
  color: var(--ink);
  border: 1px solid #c8b598;
  border-radius: 6px 5px 7px 6px;
  background: #fffdf4;
  font: 14px/1.5 var(--body);
}
.dialog-fields textarea { min-height: 104px; resize: vertical; }
.dialog-fields select, .circle-person select {
  min-height: 36px;
  max-width: 100%;
  padding: 6px 8px;
  color: var(--ink);
  border: 1px solid #c8b598;
  border-radius: 6px 5px 7px 6px;
  background: #fffdf4;
  font: 13px/1.5 var(--body);
}
.verification-fields { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 7px; }
.form-primary, .form-secondary {
  min-height: 36px;
  padding: 5px 10px;
  border: 1px solid #a38a6d;
  border-radius: 6px 8px 7px 6px;
  background: #f7ebd2;
  font-size: 13px;
  font-weight: 700;
}
.form-primary { color: var(--ivory); border-color: var(--red-dark); background: var(--red); }
a.form-primary { display: grid; place-items: center; text-decoration: none; }
.form-primary:not(:disabled):hover { background: var(--red-dark); }
.auth-link {
  justify-self: start;
  min-height: 36px;
  padding-inline: 7px;
  border: 0;
  background: transparent;
  color: var(--red-dark);
  font-size: 13px;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.dialog-status { margin: 0; color: var(--red-dark); font-size: 13px; overflow-wrap: anywhere; }
.dialog-status[data-tone="notice"] { color: var(--mute); }
.dialog-status[data-tone="success"], .page-message[data-tone="success"] { color: #384729; }
.dialog-fields label.import-legacy { display: flex; align-items: center; font-weight: 500; }
.import-legacy input { margin: 0 4px 0 0; accent-color: var(--red); }
.access-choice input { accent-color: var(--red); }
.share-ticket {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  margin-top: 11px;
  border: 1px dashed #c8a786;
  border-radius: 8px 10px 7px 9px;
  background: #f8edd2;
}
.share-ticket img {
  display: block;
  object-fit: contain;
  width: 50px;
  height: 50px;
  flex: none;
}
.share-ticket > div { min-width: 0; }
.share-ticket h3 { margin: 0 0 3px; font-size: 16px; line-height: 1.35; overflow-wrap: anywhere; }
.share-ticket p { margin: 0; color: var(--mute); font-size: 12px; }
.share-actions { display: flex; gap: 8px; }
.share-actions button { flex: 1; }
.share-settings { margin-top: 13px; padding-top: 9px; border-top: 1px dashed var(--line); }
.share-settings summary { padding-block: 4px; font-size: 13px; font-weight: 700; cursor: pointer; }
.share-settings form { margin-top: 6px; }
.access-status { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 7px 12px; }
.access-status strong { display: block; font-size: 13px; }
.access-status span { color: var(--mute); font-size: 12px; }
.access-actions { display: flex; gap: 6px; }
.access-actions button { flex: none; white-space: nowrap; }
.access-choice { display: flex; flex-wrap: wrap; gap: 7px; min-width: 0; margin: 0; padding: 0; border: 0; }
.access-choice label { display: flex; align-items: center; gap: 5px; min-height: 36px; padding: 3px 8px; }
.access-choice label:has(input:checked) { border-radius: 7px 6px 8px 6px; background: #f4e4c7; }
.share-disable {
  margin-top: 10px;
  padding-inline: 0;
  color: var(--red-dark);
  border: 0;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: 12px;
}
.page-message {
  position: fixed;
  z-index: 20;
  bottom: 13px;
  left: 50%;
  width: max-content;
  max-width: calc(100% - 26px);
  transform: translateX(-50%);
  padding: 7px 12px;
  color: var(--red-dark);
  border: 1px solid #b4876c;
  border-radius: 7px 6px 8px 7px;
  background: var(--ivory);
  box-shadow: 2px 3px 0 #64453242;
  font-size: 12px;
  pointer-events: none;
}
.page-message[data-tone="success"] { border-color: #9ca886; }
.circle-dialog { width: min(500px, calc(100% - 26px)); }
.circle-rooms { display: grid; gap: 5px; margin-top: 10px; }
.circle-room strong { overflow-wrap: anywhere; min-width: 0; }
.library-tabs { margin-top: 15px; }
.library-tabs button { flex: 1; }
.circle-room {
  min-height: 40px;
  padding: 7px 9px;
  color: var(--ink);
  border: 1px solid #d2bd9d;
  border-radius: 6px 7px 6px 5px;
  background: #faf0d9;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.circle-room span { flex: none; color: var(--red-dark); font-size: 12px; }
.circle-room:hover { border-color: var(--red); }
.circle-form { margin-top: 14px; padding-top: 12px; border-top: 1px dashed #cab293; }
.circle-form h3, .shared-opinions h3 { margin: 0 0 7px; font-size: 13px; font-weight: 750; }
.circle-people { display: grid; gap: 5px; list-style: none; padding: 0; margin: 8px 0; }
.circle-person { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 29px; }
.circle-person span { min-width: 0; overflow-wrap: anywhere; }
.circle-person button, .circle-person select { flex: none; min-height: 30px; padding-block: 3px; }
.invite-result { display: grid; gap: 7px; padding: 8px; border: 1px dashed #c9ad8a; background: #f8ecd1; }
.shared-opinions { margin-top: 13px; padding-top: 9px; border-top: 1px dashed var(--line); }
.shared-list { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 5px; }
.shared-review { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 12px; overflow-wrap: anywhere; }

.place-dock {
  flex: 1;
  min-height: 0;
  padding: 0 14px 13px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.receipt-nav {
  position: sticky;
  z-index: 1;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 8px 0;
  background: #fff9ea;
}
.receipt-nav button {
  min-height: 32px;
  color: #644b38;
  border: 1px solid #d4bea0;
  border-radius: 6px 8px 7px 6px;
  background: #f9edd8;
}
.receipt-nav button:hover { background: var(--yellow); }
.receipt-back { padding: 3px 9px; font-size: 12px; font-weight: 700; }
.receipt-pager { display: flex; align-items: center; gap: 6px; }
.receipt-pager button { min-width: 34px; padding: 0; font: 22px/1 var(--body); }
#receipt-position { color: var(--mute); font-size: 11px; font-variant-numeric: tabular-nums; }
.receipt {
  padding: 14px 12px 16px;
  border: 1px solid #ceba98;
  border-bottom-style: dashed;
  border-radius: 5px 6px 4px 5px;
  box-shadow: 2px 3px 0 #b8a4872c;
  background: #fffbf0;
}
@media (min-width: 691px) {
  .places-panel.has-dock .places-list { display: none; }
}
.detail-top { display: flex; gap: 10px; align-items: center; }
.detail-top .food-thumb { width: 63px; height: 64px; padding: 5px; }
.detail-top h2 { margin: 1px 0 4px; font-size: 17px; line-height: 1.35; overflow-wrap: anywhere; }
.detail-top p { margin: 0; color: var(--mute); font-size: 12px; }
.detail-address { margin: 13px 0 3px; font-size: 13px; font-weight: 650; }
.detail-note { margin: 5px 0 0; color: var(--mute); font-size: 12px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.detail-actions a, .detail-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 5px 10px;
  border: 1px solid #b2987d;
  border-radius: 6px 8px 6px 7px;
  color: var(--ink);
  background: var(--ivory);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.detail-actions .primary-action { color: #fff9ee; border-color: var(--red-dark); background: var(--red); }
.detail-actions .primary-action:hover { background: var(--red-dark); }
.detail-actions a:not(.primary-action):hover, .detail-actions button:hover { background: var(--yellow); }
.review { margin-top: 19px; padding-top: 14px; border-top: 1px dashed #cbb599; }
.review-head { display: flex; align-items: center; justify-content: space-between; }
.review-head h3 { margin: 0; font: 26px/1 var(--hand); }
.review-head button { padding: 3px; border: 0; color: var(--mute); background: transparent; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.review-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 11px; }
.review-option {
  padding: 7px 5px;
  border: 1.4px dashed #c6a88c;
  border-radius: 8px 7px 9px 7px;
  background: #f7ebd7;
  font: 23px/1.15 var(--hand);
}
.review-option:not([aria-pressed="true"]):hover { border-color: var(--red); }
.review-option[aria-pressed="true"] {
  border: 2px solid currentColor;
  background: var(--red-light);
  color: var(--red-dark);
  box-shadow: inset 0 0 0 2px #fff9eb;
  transform: rotate(-4deg);
}
.review-option[data-rating="okay"][aria-pressed="true"] { background: var(--sage); color: #384729; }
.review-option[data-rating="bad"][aria-pressed="true"] { background: var(--blue); color: #2c4f4f; }
.review-hint { color: var(--mute); margin: 7px 0 0; font-size: 11px; }
.cluster-title { margin: 1px 22px 8px 0; font: 30px/1.15 var(--hand); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.noscript { padding: 14px; }

@media (max-width: 880px) {
  .journal { grid-template-columns: minmax(0, 1fr) 278px; }
  .places-header { padding-inline: 12px; }
}
@media (max-width: 690px) {
  body { padding-top: env(safe-area-inset-top); }
  .masthead-inner, .page {
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }
  .masthead-inner { min-height: 58px; }
  .brand { font-size: 24px; gap: 8px; }
  .brand-mark { width: 36px; height: 34px; }
  .masthead-actions { gap: 10px; }
  .account-name { max-width: 84px; min-height: 44px; }
  .city { font-size: 11px; }
  .my-ratings { gap: 4px; min-height: 44px; padding: 6px 8px; font-size: 12px; }
  .intro { flex-wrap: wrap; gap: 9px; padding-block: 16px 10px; }
  .intro h1 { font-size: clamp(36px, 9.7vw, 57px); }
  .intro p { margin-top: 7px; font-size: 13px; }
  .guest { gap: 8px; min-width: 0; margin: 0 0 0 2px; padding: 4px 12px 4px 6px; transform: rotate(-1.1deg); }
  .guest::before { display: none; }
  .guest-stamp { width: 24px; height: 24px; font-size: 15px; border-width: 1.4px; }
  .guest-role { display: inline; font-size: 10px; margin-right: 3px; }
  .guest strong { font-size: 19px; vertical-align: middle; }
  .guest-edition { font-size: 10px; }
  .map-toolbar { gap: 7px; align-items: center; padding-bottom: 10px; }
  .category-tabs {
    gap: 6px;
    flex: 1;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 3px 4px 4px;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .pick-place { min-height: 44px; padding-inline: 8px; font-size: 12px; }
  .category { min-height: 44px; font-size: 12px; padding-inline: 8px; }
  .category img { width: 20px; height: 20px; }
  .journal { grid-template-columns: 1fr; height: auto; }
  .map-sheet { min-height: clamp(318px, 51dvh, 490px); }
  .places-panel { overflow: visible; border-left: 0; border-top: 1.5px solid #866a4d; }
  .places-header { padding: 14px 13px 10px; }
  .search { min-height: 44px; }
  .search input { font-size: 16px; }
  .place-card { min-height: 58px; }
  .places-list { overflow: visible; }
  .place-dock {
    position: fixed;
    z-index: 10;
    inset-inline: env(safe-area-inset-left) env(safe-area-inset-right);
    bottom: env(safe-area-inset-bottom);
    max-height: 62dvh;
    padding-inline: 11px;
    border: 1.5px solid #85674b;
    border-radius: 16px 16px 0 0;
    background: #fff9ea;
    box-shadow: 2px 4px 0 #7151346b, 0 -6px 24px #64422428;
  }
  .map-region { top: 9px; left: 8px; padding: 2px 4px; }
  .map-region button { min-height: 44px; }
  .compass { top: 10px; right: 7px; }
  .map-controls { right: 8px; }
  .map-controls button { min-height: 44px; min-width: 44px; }
  .map-controls .locate-me { padding-inline: 10px; font-size: 12px; }
  .map-shelves button { min-height: 44px; padding-inline: 8px; font-size: 12px; }
  .room-actions #room-share { min-height: 44px; }
  .receipt-nav button, .receipt-pager button, .review-option,
  .detail-actions a, .detail-actions button { min-height: 44px; }
  .receipt-pager button { min-width: 44px; }
  .map-credit { font-size: 8px; }
  .page-message { bottom: max(12px, env(safe-area-inset-bottom)); }
  .site-dialog {
    position: fixed;
    inset: auto 0 0;
    width: 100%;
    max-width: none;
    max-height: min(88dvh, 760px);
    margin: 0;
    padding-bottom: env(safe-area-inset-bottom);
    border-inline: 0;
    border-bottom: 0;
    border-radius: 17px 17px 0 0;
    box-shadow: 0 -5px 24px #412b2338;
    overscroll-behavior: contain;
  }
  .dialog-content { padding-inline: max(17px, env(safe-area-inset-left)) max(17px, env(safe-area-inset-right)); }
  .dialog-content h2 { margin-right: 48px; }
  .dialog-close { right: max(7px, env(safe-area-inset-right)); }
  #account-form { gap: 9px; }
  .dialog-fields label { font-size: 14px; }
  .dialog-fields input:not([type="checkbox"]):not([type="radio"]),
  .dialog-fields select, .dialog-fields textarea { min-height: 44px; font-size: 16px; }
  .form-primary, .form-secondary, .auth-link, .auth-tabs button,
  .circle-room, .access-choice label, .share-disable,
  .circle-person button, .circle-person select { min-height: 44px; }
  .share-settings summary { display: list-item; padding-block: 10px; }
}

@media (prefers-reduced-motion: no-preference) {
  .marker { transition: background-color 120ms, transform 150ms; }
  .receipt { animation: receipt-open 180ms ease-out; }
  .guest { transition: transform 150ms; }
  .guest:hover { transform: rotate(0deg); }
}
@keyframes receipt-open {
  from { opacity: .45; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
