:root {
  color-scheme: light;
  --ink: #211c37;
  --muted: #635c75;
  --purple: #5b3de5;
  --purple-dark: #4930bf;
  --purple-wash: #efecff;
  --line: #e9e5f2;
  --white: #fff;
  --map-ground: #eeedf2;
  --shadow: 0 8px 30px #30284c1e, 0 1px 4px #30284c13;
  --header-height: 68px;
  font-family: Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", "Noto Sans KR", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.48;
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--map-ground); overflow: hidden; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: not-allowed; opacity: .56; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #8067ef; outline-offset: 3px; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
.icon { width: 20px; height: 20px; display: block; flex-shrink: 0; }
[data-icon] { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.site-header {
  display: grid;
  grid-template-columns: auto minmax(180px, 510px) 1fr auto;
  grid-template-areas: "brand search . actions";
  align-items: center;
  gap: clamp(12px, 2.3vw, 33px);
  height: var(--header-height);
  padding: 0 22px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 6;
}
.identity { grid-area: brand; display: inline-flex; gap: 10px; align-items: center; width: fit-content; }
.brand-mark { display: block; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; }
.brand-text { display: grid; gap: 3px; }
.brand-name { color: var(--ink); font-size: 1.25rem; line-height: 1; font-weight: 850; letter-spacing: -.075em; white-space: nowrap; }
.brand-name > span { color: var(--purple); }
.header-caption { color: var(--muted); font-size: .72rem; line-height: 1.1; white-space: nowrap; }
.header-actions { grid-area: actions; display: flex; align-items: center; gap: 8px; }
.button { min-height: 40px; padding: 8px 12px; border: 1px solid transparent; border-radius: 10px; display: inline-flex; gap: 6px; align-items: center; justify-content: center; font-size: .875rem; font-weight: 740; line-height: 1.2; white-space: nowrap; }
.button .icon { width: 17px; height: 17px; }
.button-primary { background: var(--purple); color: var(--white); }
.button-primary:hover { background: var(--purple-dark); }
.button-danger { background: #a02b44; color: var(--white); }
.button-danger:hover { background: #822137; }
.button-light { background: var(--white); border-color: var(--line); color: #3d3658; }
.button-light:hover { background: #f5f2ff; border-color: #ddd5fb; }
.button-soft { background: var(--purple-wash); color: var(--purple-dark); }
.button-soft:hover { background: #e5ddff; }
.icon-button { padding: 0; border: 0; background: transparent; display: inline-grid; place-items: center; width: 41px; height: 41px; flex-shrink: 0; border-radius: 9px; color: var(--muted); }
.icon-button:hover { background: var(--purple-wash); color: var(--purple-dark); }

.search { grid-area: search; min-width: 0; height: 43px; display: flex; align-items: center; padding: 0 4px 0 12px; gap: 7px; border: 1px solid #e3def1; border-radius: 12px; background: #f8f7fb; color: var(--purple); }
.search:focus-within { background: var(--white); border-color: #a18cf0; box-shadow: 0 0 0 2px #5b3de514; }
.search input { min-width: 0; flex: 1; color: var(--ink); background: transparent; border: 0; outline: none; padding: 8px 0; }
.search input::placeholder { color: #706984; font-size: .9rem; }
.search input::-webkit-search-cancel-button { display: none; }
.search .icon-button { width: 29px; height: 30px; }
.search .icon-button .icon { width: 15px; height: 15px; }
.search-submit { flex-shrink: 0; border: 0; border-radius: 8px; background: var(--purple-wash); color: var(--purple-dark); padding: 6px 12px; font-size: .875rem; font-weight: 790; min-height: 33px; }
.search-submit:hover { background: #e5ddff; }

.workspace { position: relative; height: calc(100vh - var(--header-height)); height: calc(100dvh - var(--header-height)); isolation: isolate; overflow: hidden; }
.map-section { position: absolute; inset: 0; background: var(--map-ground); overflow: hidden; isolation: isolate; }
.map-surface, .tiles, .markers, .schematic, .kakao-map, .vector-map { position: absolute; inset: 0; }
.map-surface { cursor: grab; touch-action: none; user-select: none; }
.map-surface.is-dragging { cursor: grabbing; }
.map-surface.kakao-active, .map-surface.vector-active { touch-action: auto; }
.schematic { background: #eeebf5; overflow: hidden; }
.schematic svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tiles { pointer-events: none; background: transparent; }
.tiles img { position: absolute; width: 256px; height: 256px; pointer-events: none; filter: saturate(.32) contrast(.88) brightness(1.08); }
.tiles img:not(.loaded) { visibility: hidden; }
.markers { pointer-events: none; z-index: 2; }
.map-pin { position: absolute; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; z-index: 1; border: 1px solid #d8cdf7; border-radius: 11px; background: #fff; color: #563abc; box-shadow: 0 2px 6px #37225d35; transform: translate(-50%, -50%); pointer-events: auto; }
.map-pin .icon { width: 17px; height: 17px; }
.map-pin:hover, .map-pin:focus-visible, .map-pin.is-selected { z-index: 3; border-color: var(--white); background: var(--purple); color: var(--white); box-shadow: 0 0 0 4px #6f56e930, 0 2px 8px #402a6540; }
.map-pin-group { border-radius: 50%; border: 2px solid #fff; background: #e6ddff; box-shadow: 0 0 0 3px #7554df2a, 0 2px 7px #37225d30; font-size: .83rem; font-weight: 820; }
.bubble-label { position: absolute; display: inline-flex; max-width: 185px; overflow: hidden; text-overflow: ellipsis; transform: translate(-50%, 20px); white-space: nowrap; z-index: 4; pointer-events: none; padding: 5px 8px; color: #453096; border: 1px solid #dfd5fa; background: #fff; box-shadow: 0 2px 8px #392b571e; border-radius: 8px; font-size: .79rem; font-weight: 780; }
.current-position { position: absolute; width: 18px; height: 18px; background: #146ada; border: 3px solid white; box-shadow: 0 0 0 6px #146ada32; transform: translate(-50%, -50%); border-radius: 50%; }
.map-filters { position: absolute; z-index: 3; top: 15px; left: 16px; max-width: calc(100% - 89px); display: flex; flex-wrap: nowrap; align-items: center; gap: 3px; height: 46px; padding: 4px; background: #fff; border: 1px solid #e8e2ef; border-radius: 13px; box-shadow: var(--shadow); overflow: auto hidden; scrollbar-width: none; }
.map-filters::-webkit-scrollbar { display: none; }
.filter { display: inline-flex; align-items: center; gap: 5px; min-height: 35px; padding: 5px 10px; flex: 0 0 auto; border: 1px solid transparent; border-radius: 9px; background: transparent; color: #524969; font-size: .84rem; font-weight: 740; white-space: nowrap; }
.filter .icon { width: 16px; height: 16px; }
.filter:hover { background: #f6f2ff; color: var(--purple-dark); }
.filter[aria-pressed="true"] { color: var(--purple-dark); background: var(--purple-wash); border-color: #e5dfff; }
.reviewed-filter { color: var(--purple-dark); border-color: var(--line); }
.filter:focus-visible { outline-offset: -3px; }
.zoom-stack { position: absolute; z-index: 3; top: 15px; right: 16px; display: grid; background: white; border: 1px solid #e8e2ef; border-radius: 12px; box-shadow: var(--shadow); padding: 3px; }
.zoom-stack .icon-button { color: #4b3a81; }
.zoom-stack .icon-button + .icon-button { border-top: 1px solid #f1edf8; }
.zoom-stack .icon { width: 18px; height: 18px; }
.reopen-results { position: absolute; z-index: 3; top: 71px; left: 16px; box-shadow: var(--shadow); }
.nearby-search { position: absolute; z-index: 3; top: 15px; left: 50%; transform: translateX(-50%); min-height: 43px; box-shadow: var(--shadow); color: var(--purple-dark); }
.nearby-search:disabled { opacity: .83; }
.map-caption { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; position: absolute; right: 7px; bottom: 6px; max-width: calc(100% - 14px); padding: 3px 6px; background: #fffffff0; border-radius: 4px; color: #433b57; font-size: .7rem; z-index: 3; }
.map-caption a { text-decoration: underline; }

.drawer { position: absolute; z-index: 5; top: 72px; left: 16px; bottom: 16px; width: min(365px, calc(100% - 90px)); min-height: 0; display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: 17px; overflow: hidden; box-shadow: var(--shadow); }
.drawer-header { min-height: 58px; display: flex; align-items: center; gap: 6px; padding: 6px 7px 6px 15px; border-bottom: 1px solid var(--line); }
.drawer-header h2 { font-size: 1.03rem; font-weight: 800; letter-spacing: -.035em; margin-right: auto; }
.drawer-scroll { min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #dcd5ee transparent; }
.result-count { color: var(--purple-dark); background: var(--purple-wash); border-radius: 100px; min-width: 22px; display: inline-block; text-align: center; padding: 1px 6px; font-size: .73rem; margin-left: 2px; }
.sort-control { position: relative; color: var(--muted); }
.sort-control select { appearance: none; padding: 7px 20px 7px 4px; border: 0; background: transparent; color: inherit; font-size: .84rem; cursor: pointer; }
.sort-control [data-icon] { position: absolute; pointer-events: none; right: 1px; top: 50%; transform: translateY(-50%); }
.sort-control .icon { width: 15px; height: 15px; }
.search-status { color: var(--muted); font-size: .87rem; padding: 11px 14px; }
.place-list { display: grid; grid-template-columns: minmax(0, 1fr); }
.place-card { width: 100%; min-width: 0; min-height: 79px; padding: 12px 14px; display: flex; text-align: left; align-items: flex-start; gap: 10px; border: 0; border-bottom: 1px solid var(--line); background: var(--white); }
.place-card:hover { background: #f6f2ff; }
.place-card:focus-visible { outline-offset: -3px; }
.place-icon { flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center; color: var(--purple-dark); background: var(--purple-wash); border-radius: 10px; }
.place-icon .icon { width: 17px; height: 17px; }
.place-main { flex: 1; min-width: 0; }
.place-name { display: block; color: var(--ink); font-weight: 780; font-size: 1rem; letter-spacing: -.035em; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.place-line { display: block; color: var(--muted); font-size: .78rem; margin-top: 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.place-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 5px; line-height: 1.35; font-size: .76rem; color: var(--muted); }
.tag { display: inline-flex; align-items: center; gap: 4px; width: fit-content; padding: 3px 7px; background: #eeebfb; border-radius: 5px; color: #4e4379; font-weight: 730; font-size: .75rem; white-space: nowrap; }
.tag-access { color: #096557; background: #e3f6ef; }
.review-score { display: inline-flex; align-items: center; gap: 3px; color: #5035bb; font-weight: 770; white-space: nowrap; }
.review-score .icon { width: 14px; height: 14px; fill: currentColor; stroke: currentColor; }
.search-actions { display: flex; flex-wrap: wrap; padding: 10px 13px; gap: 7px; }
.source-footer { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--muted); font-size: .72rem; padding: 10px 14px 13px; }
.source-footer a:hover { text-decoration: underline; }
.empty { text-align: center; padding: 26px 14px 18px; }
.empty > span { color: var(--purple); display: inline-block; margin-bottom: 5px; }
.empty h3 { font-size: 1.01rem; }
.empty p { color: var(--muted); margin-top: 4px; font-size: .87rem; }
.empty .button { margin-top: 9px; }

.drawer-actions { min-height: 47px; display: flex; align-items: center; gap: 8px; padding: 4px 7px 2px 13px; }
.detail-drawer { bottom: auto; max-height: calc(100% - 88px); }
.drawer-actions #close-details { margin-left: auto; }
.drawer-actions #detail-back { min-height: 33px; padding: 5px 9px; font-size: .79rem; }
.drawer-actions #detail-back .icon { width: 15px; height: 15px; }
.detail-scroll { padding: 1px 15px 16px; }
.detail-scroll h2 { font-size: 1.45rem; letter-spacing: -.052em; line-height: 1.28; overflow-wrap: anywhere; }
.detail-scroll h2:focus { outline-offset: 0; }
.detail-location { margin-top: 13px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 11px; background: #f9f7ff; }
.detail-location p { display: flex; gap: 6px; color: var(--muted); margin-block: 4px; font-size: .85rem; }
.detail-location p:first-child { color: var(--ink); font-weight: 740; }
.detail-location .icon { width: 15px; height: 15px; color: var(--purple); }
.detail-facilities, .review-flags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.detail-source { display: inline-block; margin-top: 7px; font-size: .74rem; color: var(--muted); text-decoration: underline; }
.detail-visit-date { margin-left: 5px; color: var(--muted); font-size: .74rem; }
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-block: 13px 16px; }
.detail-actions .button { padding-inline: 6px; }
.restroom-reviews { border-top: 1px solid var(--line); padding-top: 12px; }
.restroom-reviews h3 { font-size: .99rem; letter-spacing: -.025em; }
.restroom-filters { display: flex; flex-wrap: wrap; gap: 5px; margin-block: 8px; }
.restroom-filters .filter { min-height: 44px; border-color: var(--line); }
.restroom-filters .filter[aria-pressed="true"] { border-color: #d7cafa; }
.reviews-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .85rem; color: var(--muted); }
.review-empty { padding: 4px 0; font-size: .875rem; color: var(--muted); }
.tag-restroom-type { color: var(--purple-dark); background: var(--purple-wash); }
.review-item { border: 1px solid var(--line); border-radius: 11px; padding: 10px; margin-top: 8px; }
.review-item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: .81rem; color: var(--muted); }
.review-item-head time { margin-left: auto; font-size: .75rem; }
.review-note { margin-top: 7px; overflow-wrap: anywhere; white-space: pre-wrap; font-size: .86rem; }
.review-owner-actions { display: flex; gap: 5px; justify-content: flex-end; margin-top: 8px; }
.review-owner-actions .button { min-height: 34px; padding: 5px 9px; font-size: .8rem; }
.review-owner-actions [data-review-action="delete"] { color: #9d273d; }

:where(.grade-choice, .grade-badge, .grade-preview, .grade-share)[data-grade="gold"] {
  --grade-text: #69460c;
  --grade-tint: #fff4d8;
  --grade-border: #e5cb91;
}
:where(.grade-choice, .grade-badge, .grade-preview, .grade-share)[data-grade="silver"] {
  --grade-text: #3b4c63;
  --grade-tint: #f0f3f8;
  --grade-border: #ccd6e4;
}
:where(.grade-choice, .grade-badge, .grade-preview, .grade-share)[data-grade="bronze"] {
  --grade-text: #793f27;
  --grade-tint: #fff0e7;
  --grade-border: #e7c2aa;
}
.grade-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  padding: 3px 7px;
  border: 1px solid var(--grade-border, var(--line));
  border-radius: 6px;
  color: var(--grade-text, var(--ink));
  background: var(--grade-tint, var(--white));
  font-size: .78rem;
  font-weight: 780;
  line-height: 1.3;
  white-space: nowrap;
}
.grade-average { color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.grade-distribution { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.place-main > .grade-distribution { margin-top: 5px; }
.grade-share {
  padding: 2px 5px;
  border: 1px solid var(--grade-border, var(--line));
  border-radius: 5px;
  color: var(--grade-text, var(--ink));
  background: var(--grade-tint, var(--white));
  font-size: .7rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.grade-preview {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px 10px;
  width: 100%;
  padding: 8px;
  border: 1px solid var(--grade-border, var(--line));
  border-radius: 11px;
  background: var(--grade-tint, #f9f7ff);
}
.grade-preview-visual { display: grid; justify-items: start; gap: 3px; }
.grade-preview img { width: 80px; height: 62px; border-radius: 7px; object-fit: cover; }
.grade-preview-copy { display: grid; min-width: 0; gap: 4px; }
.grade-preview-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; font-size: .86rem; }
.grade-preview small { color: var(--muted); font-size: .72rem; overflow-wrap: anywhere; }
.grade-preview > .grade-distribution, .grade-preview-rules { grid-column: 1 / -1; }
.grade-preview-rules { display: grid; gap: 2px; padding-top: 6px; border-top: 1px solid var(--grade-border, var(--line)); }
.review-amenity-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 10px; }
.review-amenity-summary h4 { flex-basis: 100%; margin: 0 0 2px; color: var(--ink); font-size: .84rem; }
.review-amenity-summary .review-flags { margin-top: 0; }

.dialog { color: var(--ink); padding: 0; border: 1px solid var(--line); border-radius: 22px; width: min(530px, calc(100vw - 30px)); max-height: min(88vh, 820px); max-height: min(88dvh, 820px); box-shadow: 0 21px 90px #1911324d; background: var(--white); scrollbar-width: thin; }
.review-dialog { width: min(630px, calc(100vw - 24px)); }
.small-dialog { width: min(380px, calc(100vw - 30px)); }
.dialog::backdrop { background: #1f123e69; backdrop-filter: blur(2px); }
.dialog-content { position: relative; padding: 22px; }
.dialog-close { position: absolute; right: 8px; top: 8px; }
.dialog-kicker { font-size: .8rem; color: var(--purple-dark); font-weight: 780; margin-bottom: 4px; }
.dialog h2 { font-size: 1.54rem; letter-spacing: -.048em; padding-right: 31px; line-height: 1.3; }
.dialog-intro { font-size: .88rem; color: var(--muted); margin-top: 5px; overflow-wrap: anywhere; }
.confirm-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.account-controls, #review-delete-form { display: grid; gap: 8px; margin-top: 10px; }
.account-controls > .button { justify-self: start; }
#review-delete-help { margin-top: 6px; }
#review-form, #venue-form { display: grid; gap: 12px; margin-top: 13px; }
#review-form { gap: 16px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.field { display: grid; gap: 4px; min-width: 0; color: #463e59; font-size: .86rem; font-weight: 740; }
.field select, .field input { color: var(--ink); width: 100%; min-width: 0; padding: 7px 8px; min-height: 41px; border: 1px solid #ded8ec; border-radius: 8px; background: var(--white); font-size: 1rem; font-weight: 440; }
fieldset { min-width: 0; padding: 0; margin: 0; border: 0; }
.review-section legend { padding: 0; margin-bottom: 6px; color: var(--ink); font-size: 1rem; font-weight: 790; }
.field-optional { margin-left: 3px; color: var(--muted); font-size: .78rem; font-weight: 520; }
.review-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.review-type-choices { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.review-choice, .amenity-choice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  min-height: 44px;
  padding: 6px 9px;
  border: 1px solid #e4dff0;
  border-radius: 9px;
  background: var(--white);
  color: #463e59;
  font-size: .875rem;
  font-weight: 690;
  line-height: 1.3;
  cursor: pointer;
}
.review-choice { justify-content: center; text-align: center; word-break: keep-all; }
.review-choice small { color: var(--muted); font-size: .75rem; font-weight: 520; }
.review-choice::before, .grade-choice::after, .amenity-choice::before {
  flex: 0 0 15px;
  width: 15px;
  height: 15px;
  border: 1px solid #a79bbf;
  border-radius: 50%;
  background: var(--white);
  content: "";
}
.review-choice:hover, .amenity-choice:hover { background: #f8f5ff; }
.review-choice:has(input:checked), .amenity-choice:has(input:checked) {
  border-color: #b9a7f6;
  background: var(--purple-wash);
  color: var(--purple-dark);
}
.review-choice:has(input:checked)::before, .grade-choice:has(input:checked)::after { border: 4px solid var(--purple); }
.review-choice:has(input:focus-visible), .grade-choice:has(input:focus-visible), .amenity-choice:has(input:focus-visible) {
  outline: 3px solid #8067ef;
  outline-offset: 2px;
}
.grade-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.grade-choice {
  position: relative;
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  padding: 6px;
  border: 1px solid var(--grade-border, var(--line));
  border-radius: 12px;
  color: var(--grade-text, var(--ink));
  background: var(--grade-tint, var(--white));
  cursor: pointer;
}
.grade-choice:hover { box-shadow: 0 2px 8px #3e335019; }
.grade-choice:has(input:checked) { border-color: var(--purple); box-shadow: inset 0 0 0 1px var(--purple); }
.grade-choice::after { position: absolute; top: 11px; right: 11px; width: 18px; height: 18px; box-shadow: 0 1px 3px #25193933; }
.grade-choice-art { display: block; width: 100%; aspect-ratio: 4 / 3; max-height: 142px; border-radius: 7px; object-fit: cover; }
.grade-choice-copy { display: grid; gap: 4px; min-width: 0; padding: 0 4px 4px; }
.grade-name { font-size: .97rem; font-weight: 800; }
.grade-description { color: #4f475d; font-size: .8rem; line-height: 1.35; overflow-wrap: anywhere; }
.amenity-group { margin-top: 9px; }
.amenity-group h4 { margin: 0 0 5px; color: var(--ink); font-size: .84rem; }
.amenity-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.amenity-choice::before { display: inline-grid; place-items: center; border-radius: 4px; font-size: .69rem; line-height: 1; }
.amenity-choice:has(input:checked)::before { border-color: var(--purple); color: var(--white); background: var(--purple); content: "✓"; }
.form-help { color: var(--muted); font-size: .8rem; }
.form-error { color: #9d273d; background: #fff0f3; border-radius: 8px; padding: 6px 8px; font-size: .87rem; }
.submit-button { width: 100%; min-height: 43px; }
.toast { z-index: 12; position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); border-radius: 12px; color: white; background: #312754; width: max-content; max-width: calc(100% - 32px); padding: 9px 13px; box-shadow: var(--shadow); font-size: .88rem; }

@media (max-width: 720px) {
  :root { --header-height: calc(107px + env(safe-area-inset-top)); }
  .site-header { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand actions" "search search"; grid-template-rows: 43px 40px; gap: 6px 9px; padding: calc(7px + env(safe-area-inset-top)) 10px 9px; }
  .brand-mark { width: 34px; height: 34px; flex-basis: 34px; }
  .identity { gap: 7px; }
  .brand-name { font-size: 1.16rem; }
  .header-caption { font-size: .68rem; }
  .header-actions { gap: 5px; }
  .header-actions .button { min-height: 37px; padding-inline: 8px; font-size: .81rem; }
  .header-actions .button .icon { width: 15px; height: 15px; }
  .search { height: 40px; }
  .search-submit { min-height: 30px; }
  .map-filters { top: 8px; left: 8px; max-width: calc(100% - 16px); height: 41px; gap: 1px; padding: 3px; }
  .filter { min-height: 33px; padding-inline: 8px; gap: 4px; font-size: .81rem; }
  .filter .icon { width: 15px; height: 15px; }
  .zoom-stack { top: 58px; right: 8px; padding: 2px; }
  .zoom-stack .icon-button { width: 37px; height: 38px; }
  .map-pin { width: 29px; height: 29px; border-radius: 9px; }
  .map-pin .icon { width: 15px; height: 15px; }
  .reopen-results { top: 58px; left: 8px; }
  .nearby-search { top: 58px; min-height: 37px; padding-inline: 9px; }
  .drawer { top: auto; left: 7px; right: 7px; bottom: max(7px, env(safe-area-inset-bottom)); width: auto; max-height: 58%; border-radius: 16px; }
  .results-drawer { height: min(51%, 455px); }
  .drawer-header { min-height: 48px; padding-block: 3px; }
  .drawer-actions { min-height: 39px; }
  .place-card { min-height: 74px; padding-block: 10px; }
  .detail-scroll { padding-bottom: 12px; }
  .workspace:not([data-panel="map"]) .map-caption { top: 103px; right: 55px; bottom: auto; justify-content: flex-end; max-width: calc(100% - 67px); }
  .dialog-content { padding: 18px; }
  .dialog { max-height: 92dvh; }
}
@media (min-width: 721px) and (max-width: 1170px) {
  .nearby-search { top: 15px; right: 72px; left: auto; transform: none; }
}
@media (max-width: 510px) {
  .review-type-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grade-options { grid-template-columns: 1fr; gap: 6px; }
  .grade-choice { grid-template-columns: minmax(70px, 28%) minmax(0, 1fr); align-items: center; }
  .grade-choice-art { aspect-ratio: 4 / 3; max-height: 74px; }
  .grade-choice-copy { padding: 3px 23px 3px 3px; }
  .grade-choice::after { top: calc(50% - 9px); right: 9px; }
  .review-choice { padding-inline: 6px; }
}
@media (max-width: 370px) {
  .filter { padding-inline: 6px; }
  .nearby-search { right: 54px; left: auto; transform: none; }
  .header-actions .locate-button { min-width: 38px; }
  .locate-button > span:last-child { display: none; }
  .field-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
