:root {
  color-scheme: light;
  --sand-50: #fbfaf8;
  --sand-100: #f8f3e9;
  --sand-200: #e9e6df;
  --slate-300: #bbc9d7;
  --slate-700: #3d4955;
  --slate-950: #161e25;
  --orange-50: #ffebe1;
  --orange-700: #be4400;
  --teal-50: #e1f3f1;
  --teal-700: #2e6f6c;
  --blue-100: #a1d1f8;
  --blue-800: #335068;
  --paper: var(--sand-100);
  --surface: var(--sand-50);
  --ink: var(--slate-950);
  --muted: var(--slate-700);
  --line: var(--sand-200);
  --soft: var(--sand-100);
  --ramen: var(--orange-700);
  --ramen-soft: var(--orange-50);
  --katsu: var(--teal-700);
  --map-bg: var(--blue-100);
  --solid: var(--slate-950);
  --on-solid: var(--sand-50);
  --pin-outline: var(--sand-50);
  --chrome: var(--slate-950);
  --on-chrome: var(--sand-50);
  --on-chrome-muted: var(--slate-300);
  --map-land: var(--sand-100);
  --map-water: var(--blue-100);
  --map-label: var(--slate-700);
  --map-water-label: var(--blue-800);
  --map-park: var(--teal-50);
  --focus: #205cca;
  --danger: #af2842;
  --shade: rgb(15 35 48 / 14%);
  --scrim: rgb(21 27 22 / 45%);
  --image-outline: rgb(0 0 0 / 10%);
  --font: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  --brand-font: "Gowun Batang", serif;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --popup-shadow: 0 4px 12px rgb(15 35 48 / 10%), 0 16px 40px rgb(15 35 48 / 16%);
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  overflow-x: clip;
}
::selection {
  background: var(--ramen-soft);
  color: var(--ink);
}
input,
textarea {
  caret-color: var(--ramen);
}
* {
  scrollbar-color: var(--line) transparent;
  scrollbar-width: thin;
}
body {
  font: 14px/1.6 var(--font);
  background: var(--paper);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  height: 100dvh;
}
button,
input,
textarea {
  font: inherit;
}
button,
a,
summary,
label {
  -webkit-tap-highlight-color: transparent;
}
button,
summary {
  cursor: pointer;
}
button {
  color: inherit;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
button,
input,
textarea {
  border-radius: 0;
}
button {
  touch-action: manipulation;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button:active:not(:disabled) {
  scale: 0.96;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.place-row h2,
.place-title,
.place-preview h2 {
  word-break: keep-all;
  text-wrap: pretty;
}
.original-name {
  display: block;
  margin-top: 3px;
  font-size: 0.65em;
  line-height: 1.55;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
  word-break: normal;
}
p,
a {
  overflow-wrap: anywhere;
}
ul {
  padding: 0;
  margin: 0;
  list-style: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: 0;
  left: 16px;
  z-index: 4000;
  transform: translateY(-130%);
  background: var(--surface);
  padding: 12px;
}
.skip-link:focus {
  transform: none;
}
.masthead {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 22px;
  padding: 0 28px;
  min-height: 76px;
  background: var(--chrome);
  color: var(--on-chrome);
}
.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font: 700 28px/1 var(--brand-font);
  text-decoration: none;
  white-space: nowrap;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  font-size: 23px;
  background: var(--ramen);
  color: var(--on-solid);
  border-radius: 3px;
}
.masthead-caption {
  color: var(--on-chrome-muted);
  font-size: 12px;
  letter-spacing: 0.02em;
}
.parent-link {
  font-size: 12px;
  margin-left: auto;
  text-decoration: none;
  white-space: nowrap;
  padding: 12px 0;
}
.controls {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  z-index: 1200;
}
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.search-form {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 290px;
  max-width: 430px;
  min-width: 0;
}
.search-form input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 0 42px;
  font-size: 15px;
  color: var(--ink);
}
.search-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
  pointer-events: none;
}
.search-submit {
  position: absolute;
  right: 2px;
  width: 40px;
  height: 42px;
  background: none;
  border: 0;
  color: var(--muted);
}
.kind-switch {
  display: flex;
  background: var(--soft);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.kind-switch button {
  min-height: 40px;
  min-width: 58px;
  padding: 0 14px;
  border: 0;
  background: none;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
.kind-switch [aria-pressed="true"] {
  background: var(--solid);
  color: var(--on-solid);
}
.kind-switch [data-kind="ramen"][aria-pressed="true"] {
  background: var(--ramen);
}
.kind-switch [data-kind="katsu"][aria-pressed="true"] {
  background: var(--katsu);
}
.filter-actions {
  display: flex;
  gap: 8px;
}
.button {
  display: inline-flex;
  min-height: 44px;
  justify-content: center;
  align-items: center;
  padding: 10px 15px;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 7px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 140ms var(--ease),
    scale 100ms var(--ease);
}
.button[aria-pressed="true"] {
  background: var(--soft);
  border-color: var(--solid);
  color: var(--ink);
}
.primary {
  background: var(--solid);
  border-color: var(--solid);
  color: var(--on-solid);
}
.danger {
  background: var(--danger);
  border-color: var(--danger);
}
.text-button {
  border: 0;
  background: none;
  padding: 10px 8px;
  min-height: 44px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.suggest {
  margin-left: auto;
  font-weight: 600;
  color: var(--ink);
}
.view-toggle {
  display: none;
}
.style-menu {
  width: min(380px, calc(100% - 24px));
  max-height: 65dvh;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
}
.style-group {
  padding: 12px 4px;
  border-top: 1px solid var(--line);
}
.style-group h2 {
  font-size: 15px;
  margin-bottom: 12px;
}
.style-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.style-group-name {
  width: 100%;
  font-size: 12px;
  color: var(--muted);
}
.style-menu .region-option[aria-pressed="true"] {
  font-weight: 700;
  color: var(--ink);
}
.region-menu {
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 180px;
  max-height: min(440px, 60dvh);
  background: var(--surface);
  box-shadow: 0 8px 32px var(--shade);
  color: var(--ink);
}
.region-option {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 5px;
  background: none;
  padding: 10px 16px;
  min-height: 44px;
}
.region-option[aria-pressed="true"] {
  background: var(--soft);
  font-weight: 700;
}
.visit-notice,
.venue-popup .visit-notice {
  margin-top: 12px;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.6;
}
.workspace {
  flex: 1;
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  min-height: 0;
  position: relative;
}
.sidebar {
  min-width: 0;
  min-height: 0;
  border-right: 1px solid var(--line);
  background: var(--surface);
  overflow: auto;
  overscroll-behavior: contain;
}
.list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 18px 24px 10px;
}
.list-heading h1 {
  font-size: 14px;
  font-weight: 600;
}
#result-count {
  margin-left: 9px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.sort-switch {
  display: flex;
}
.sort-switch .text-button {
  font-size: 11px;
  padding: 10px 5px;
}
.sort-switch [aria-pressed="true"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 5px;
}
.place-row {
  padding: 20px 24px;
  position: relative;
  border-bottom: 1px solid var(--line);
}
.category {
  color: var(--ramen);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.katsu .category,
.category.katsu {
  color: var(--katsu);
}
.place-row h2 {
  font-size: 22px;
  line-height: 1.5;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 3px 0;
}
.place-link {
  text-decoration: none;
  display: inline-block;
  padding: 3px 0;
}
.row-area {
  color: var(--muted);
  font-size: 12px;
}
.signature {
  margin-top: 8px;
  color: var(--ink);
  font-size: 13px;
}
.row-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}
.rating {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.save-button {
  background: none;
  color: var(--muted);
  border: 0;
  min-height: 44px;
  min-width: 44px;
  padding: 8px 0 8px 12px;
  font-size: 11px;
  white-space: nowrap;
}
.save-button[aria-pressed="true"] {
  color: var(--ink);
  font-weight: 700;
}
.list-foot {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 10px;
  padding: 22px 24px;
}
.legend {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.legend::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ramen);
}
.legend.katsu::before {
  background: var(--katsu);
}
.map-area {
  position: relative;
  min-width: 0;
  min-height: 0;
  background: var(--map-bg);
}
.map-area > .map {
  position: absolute;
  inset: 0;
  background: var(--map-bg);
}
.map-bounds {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 800;
  box-shadow: 0 3px 12px var(--shade);
  font-size: 12px;
}
.map-message {
  position: absolute;
  top: 78px;
  left: 50%;
  translate: -50% 0;
  z-index: 800;
  max-width: min(360px, calc(100% - 24px));
  padding: 16px;
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 4px 16px var(--shade);
}
.map-message .button {
  margin-top: 12px;
}
.place-marker {
  width: 44px;
  height: 48px;
  padding: 0;
  background: none;
  border: 0;
}
.place-marker:active:not(:disabled) {
  scale: 1;
}
.pin {
  --pin-color: var(--ramen);
  display: block;
  position: relative;
  width: 44px;
  height: 48px;
  filter: drop-shadow(0 2px 3px var(--shade));
}
.pin.katsu {
  --pin-color: var(--katsu);
}
.pin::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  left: 16px;
  top: 32px;
  background: var(--pin-color);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.pin-face {
  position: absolute;
  top: 4px;
  left: 6px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--pin-color);
  border: 2px solid var(--pin-outline);
  color: var(--on-solid);
}
.pin svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pin.selected .pin-face {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}
.pin.cluster {
  --pin-color: var(--solid);
}
.pin.cluster::before {
  display: none;
}
.pin.cluster .pin-face {
  top: 6px;
  left: 4px;
  width: 36px;
  height: 36px;
  border: 0;
  color: var(--on-solid);
  background: var(--solid);
  font-size: 13px;
  font-weight: 700;
}
.place-marker:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 8px;
}
.map-area:has(.venue-popup) .map-bounds,
.map-area:has(.venue-popup) .maplibregl-ctrl-group {
  visibility: hidden;
}
.venue-popup .maplibregl-popup-content {
  border-radius: 16px;
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--popup-shadow);
  overflow: clip;
  font: 13px/1.5 var(--font);
}
.venue-popup.maplibregl-popup-anchor-bottom .maplibregl-popup-tip {
  border-top-color: var(--surface);
}
.map .maplibregl-ctrl-group button {
  width: 42px;
  height: 42px;
}
.map .maplibregl-ctrl-attrib {
  font: 10px/1.5 var(--font);
}
.place-preview {
  position: relative;
  min-width: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.preview-close {
  display: grid;
  place-items: center;
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 1;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 2px 8px var(--shade);
}
.preview-close svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
}
.preview-photo {
  display: block;
  width: 100%;
  height: 132px;
  object-fit: cover;
  outline: 1px solid var(--image-outline);
  outline-offset: -1px;
}
.preview-media {
  position: relative;
  min-height: 132px;
  background: var(--soft);
}
.preview-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-inline: 8px;
  min-height: 40px;
  background: var(--soft);
}
.preview-pagination button {
  min-width: 44px;
  min-height: 40px;
  padding: 6px;
  border: 0;
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: 500 11px var(--font);
}
.preview-pagination span {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.venue-popup .preview-photo-error {
  padding: 48px 16px;
  font-size: 12px;
  color: var(--muted);
}
.preview-body {
  padding: 16px;
}
.place-preview h2 {
  font-size: 19px;
  line-height: 1.4;
  font-weight: 800;
  letter-spacing: -0.025em;
  padding-right: 28px;
  text-wrap: pretty;
}
.preview-media + .preview-body h2 {
  padding-right: 0;
}
.venue-popup .preview-area {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.venue-popup .preview-summary {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.65;
  word-break: keep-all;
}
.preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.preview-tags span {
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 11px;
  color: var(--muted);
  background: var(--soft);
}
.preview-open {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 14px;
  background: var(--solid);
  color: var(--on-solid) !important;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.venue-popup .preview-open {
  position: sticky;
  bottom: 0;
}
.place-gallery,
.place-menu {
  margin-top: 24px;
}
.place-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.place-photos figure {
  margin: 0;
  min-width: 0;
}
.place-photos figure:only-child {
  grid-column: 1 / -1;
}
.place-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  overflow: clip;
  border: 0;
  border-radius: 10px;
  background: var(--soft);
}
.place-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  outline: 1px solid var(--image-outline);
  outline-offset: -1px;
}
.photo-error {
  display: block;
  padding: 12px;
  color: var(--muted);
  font-size: 12px;
}
.place-menu ul {
  display: grid;
  font-size: 14px;
}
.place-menu li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.place-menu li:last-child {
  border-bottom: 0;
}
.menu-name {
  min-width: 0;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.menu-price {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 13px;
}
.menu-price.unconfirmed,
.menu-note,
.menu-date {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}
.menu-note {
  display: block;
  margin-top: 3px;
}
.menu-date {
  margin-top: 12px;
  line-height: 1.7;
}
.detail {
  padding: 12px 24px 32px;
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
}
.detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 -8px 16px;
  position: sticky;
  top: -12px;
  z-index: 2;
  background: var(--surface);
}
.detail-expand {
  display: none;
}
.place-title {
  font-size: 34px;
  line-height: 1.3;
  letter-spacing: -0.03em;
  margin: 9px 0;
}
.place-title:focus {
  outline: 0;
}
.detail-rating {
  font-size: 12px;
  color: var(--muted);
}
.styles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}
.style-tag {
  flex-shrink: 0;
  min-height: 44px;
  padding: 6px 10px;
  border: 0;
  border-radius: 6px;
  font-size: 12px;
  background: var(--soft);
  color: var(--ink);
  white-space: nowrap;
}
.style-tag[aria-pressed="true"] {
  color: var(--on-solid);
  background: var(--solid);
}
.place-row .styles {
  flex-wrap: nowrap;
  overflow-x: auto;
  margin: 8px 0 0;
  padding: 4px 0;
}
.address {
  color: var(--muted);
  font-size: 12px;
}
.detail-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.detail-actions .button {
  font-size: 12px;
  flex: 1;
}
.place-info {
  padding: 26px 0;
}
.section-label {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
}
.place-reason {
  font-size: 15px;
  line-height: 1.95;
  word-break: keep-all;
}
.sources {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}
.sources a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.reviews-section {
  margin-top: 26px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.section-heading h2 {
  font-size: 16px;
}
.section-heading .button {
  font-size: 12px;
}
.review {
  padding: 22px 0 12px;
  border-bottom: 1px solid var(--line);
}
.review-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.review-top strong {
  font-size: 12px;
}
.review-top time {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}
.review-stars {
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 1px;
  margin: 5px 0 10px;
}
.review-body {
  font-size: 13px;
  line-height: 1.9;
  white-space: pre-wrap;
}
.review-photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 14px;
}
.review-photo {
  background: none;
  padding: 0;
  border: 0;
  aspect-ratio: 1;
}
.review-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
  outline: 1px solid var(--image-outline);
  outline-offset: -1px;
}
.review-actions {
  display: flex;
  justify-content: flex-end;
}
.review-actions .text-button {
  font-size: 10px;
}
.load-state {
  color: var(--muted);
  font-size: 12px;
  margin: 16px 0;
}
.load-state:empty {
  display: none;
}
.more {
  width: 100%;
  margin: 10px 0;
}
.detail-foot {
  margin-top: 24px;
  text-align: center;
}
.empty {
  padding: 48px 24px;
  text-align: center;
}
.empty h2 {
  font-size: 17px;
  font-weight: 600;
}
.empty .text-button {
  margin-top: 14px;
}
.initial {
  padding: 24px;
}
.initial h1 {
  font-size: 22px;
}
.initial-count {
  color: var(--muted);
  margin: 8px 0;
}
.initial-row {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.initial-row a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
}
.initial-row strong {
  font-size: 18px;
}
.initial-row span,
.initial-place p {
  font-size: 13px;
  color: var(--muted);
}
.initial-place {
  margin-bottom: 24px;
}
.initial-place h2 {
  margin: 16px 0;
}
.initial-place p {
  margin: 10px 0;
}
.status {
  position: fixed;
  z-index: 2500;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 50%;
  translate: -50% 0;
  max-width: min(500px, calc(100% - 32px));
  padding: 12px 18px;
  background: var(--solid);
  color: var(--on-solid);
  border-radius: 8px;
  box-shadow: 0 4px 16px var(--shade);
  font-size: 12px;
  pointer-events: none;
}
.status:empty {
  display: none;
}
dialog {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 16px 64px var(--shade);
  padding: 0;
}
dialog::backdrop {
  background: var(--scrim);
}
.editor {
  width: min(520px, calc(100% - 24px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  overscroll-behavior: contain;
}
.editor form {
  padding: 22px 26px 28px;
}
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.dialog-header h2 {
  font-size: 20px;
  letter-spacing: -0.04em;
}
.form-fields {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.form-place {
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--muted);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 22px;
}
.field-label {
  font-size: 12px;
  font-weight: 600;
}
.field input,
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
}
.field textarea {
  resize: vertical;
  min-height: 130px;
}
.field [aria-invalid="true"] {
  border-color: var(--danger);
}
.field-hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
}
.rating-input,
.choice-field {
  padding: 0;
  border: 0;
  margin: 0 0 22px;
}
.star-row {
  display: flex;
  margin-top: 4px;
  gap: 4px;
}
.star-row label {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 48px;
  color: var(--line);
  font-size: 36px;
  cursor: pointer;
}
.star-row .filled {
  color: var(--ramen);
}
.star-row input,
.choice-row input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.star-row label:has(:focus-visible),
.choice-row label:has(:focus-visible),
.upload-button:has(:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}
.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.choice-row label {
  position: relative;
  cursor: pointer;
}
.choice-row span {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 13px;
}
.choice-row input:checked + span {
  background: var(--soft);
  border-color: var(--solid);
  color: var(--ink);
}
.upload-button {
  display: inline-flex;
  position: relative;
  padding: 10px 15px;
  border: 1px dashed var(--muted);
  border-radius: 6px;
  margin: 8px 0;
  min-height: 44px;
  font-size: 12px;
  cursor: pointer;
}
.upload-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  cursor: pointer;
}
.upload-button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.upload-button + .field-hint {
  margin-bottom: 22px;
}
.photo-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.photo-preview {
  position: relative;
}
.photo-preview img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 6px;
  outline: 1px solid var(--image-outline);
  outline-offset: -1px;
}
.photo-remove {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 0 6px 0 6px;
  background: var(--solid);
  color: var(--on-solid);
  font-size: 24px;
}
.form-error {
  color: var(--danger);
  font-size: 12px;
  margin: 12px 0;
}
.form-error:empty {
  display: none;
}
.editor form > .primary {
  width: 100%;
  margin-top: 12px;
}
.challenge {
  min-width: 0;
}
.lightbox {
  max-width: calc(100% - 24px);
  max-height: calc(100dvh - 24px);
  background: var(--solid);
  border: 0;
  padding: 56px 12px 12px;
}
.lightbox > .button {
  position: absolute;
  right: 12px;
  top: 6px;
}
.lightbox img {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - 104px);
  object-fit: contain;
}
@media (hover: hover) {
  .button:not(.primary):hover,
  .region-option:hover {
    background: var(--soft);
  }
  .style-tag:hover {
    background: var(--line);
  }
  .style-tag[aria-pressed="true"]:hover {
    background: var(--solid);
  }
  .text-button:hover,
  .save-button:hover {
    color: var(--ink);
  }
  .place-link:hover {
    color: var(--ramen);
    text-decoration: underline;
  }
  .katsu .place-link:hover {
    color: var(--katsu);
  }
  .primary:not(:disabled):hover {
    filter: brightness(1.2);
  }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .controls {
    gap: 8px;
    padding: 12px 20px;
  }
  .search-form {
    max-width: none;
    flex-basis: 100%;
  }
  .workspace {
    grid-template-columns: 360px minmax(0, 1fr);
  }
}
@media (max-width: 760px) {
  .masthead {
    min-height: 54px;
    padding: 0 16px;
    gap: 12px;
  }
  .brand {
    font-size: 25px;
    gap: 8px;
  }
  .brand-mark {
    width: 29px;
    height: 29px;
    font-size: 20px;
  }
  .masthead-caption {
    display: none;
  }
  .parent-link {
    font-size: 11px;
  }
  .controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 8px 12px;
    gap: 6px 8px;
  }
  .filter-bar {
    grid-column: 1 / -1;
    overflow-x: auto;
    gap: 8px;
    padding: 2px 0;
  }
  .filter-bar > * {
    flex-shrink: 0;
  }
  .search-form {
    max-width: none;
  }
  .search-form input {
    font-size: 16px;
  }
  .kind-switch button {
    min-width: 44px;
    min-height: 44px;
    padding: 0 9px;
    font-size: 12px;
  }
  .filter-actions {
    gap: 6px;
  }
  .filter-actions .button {
    padding: 8px 10px;
    font-size: 11px;
  }
  #nearby {
    display: inline-flex;
  }
  .suggest {
    font-size: 11px;
    padding: 0 8px;
  }
  .view-toggle {
    display: inline-flex;
    padding: 9px 13px;
    font-size: 12px;
  }
  .workspace {
    display: block;
  }
  .sidebar {
    position: absolute;
    inset: 0;
    border: 0;
    z-index: 900;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .map-area {
    position: absolute;
    inset: 0;
    display: none;
  }
  .map-view .map-area {
    display: block;
  }
  .map-view .sidebar {
    visibility: hidden;
    pointer-events: none;
  }
  .has-detail .controls {
    display: none;
  }
  .map-view.has-detail {
    --sheet-height: min(210px, 45%);
  }
  .map-view.has-detail .sidebar {
    visibility: visible;
    pointer-events: auto;
    top: auto;
    height: var(--sheet-height);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -6px 20px var(--shade);
  }
  .map-view.has-detail .map-area {
    bottom: var(--sheet-height);
  }
  .map-view.has-detail:not(.detail-expanded) .detail-content {
    display: none;
  }
  .map-view.has-detail.detail-expanded .sidebar {
    height: 100%;
    border-radius: 0;
  }
  .map-view.has-detail.detail-expanded .map-area {
    bottom: 0;
    display: none;
  }
  .map-view.has-detail .map-bounds {
    display: none;
  }
  .list-heading {
    padding: 14px 20px 4px;
  }
  .place-row {
    padding: 18px 20px;
  }
  .place-row h2 {
    font-size: 23px;
  }
  .list-foot {
    padding: 22px 20px;
  }
  .detail {
    padding: 8px 20px 36px;
  }
  .detail-toolbar {
    margin-bottom: 8px;
    top: -8px;
  }
  .detail-expand {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    margin-right: 12px;
    color: var(--ink);
    font-weight: 600;
  }
  .place-title {
    font-size: 31px;
  }
  .editor form {
    padding: 18px 20px 24px;
  }
  .region-menu {
    max-width: calc(100% - 24px);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
  button:active:not(:disabled) {
    scale: none;
  }
}
@media (max-width: 760px) and (max-height: 640px) {
  .preview-photo {
    height: 96px;
  }
  .preview-media {
    min-height: 96px;
  }
  .preview-body {
    padding: 10px;
  }
  .place-preview h2 {
    font-size: 18px;
    line-height: 1.2;
  }
  .venue-popup .preview-area {
    margin-top: 2px;
  }
  .venue-popup .preview-summary {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.5;
  }
  .preview-tags {
    display: none;
  }
  .preview-open {
    margin-top: 8px;
  }
}
