:root {
  --paper: #f7f5fa;
  --paper-deep: #efebf5;
  --paper-bright: #fdfcff;
  --ink: #2c2833;
  --ink-soft: #746e7d;
  --line: #756d80;
  --line-soft: rgba(75, 65, 87, 0.14);
  --sea: #7867a6;
  --sea-soft: #e9e3f2;
  --coral: #8a72b5;
  --sun: #e1d5ef;
  --leaf: #5d887b;
  --danger: #b5536d;
  --white: #fdfcff;
  --lavender-deep: #6e5a97;
  --lavender-shadow: rgba(78, 62, 101, 0.16);
  --topbar-height: 66px;
  --panel-width: clamp(420px, 34vw, 570px);
  --edge: clamp(14px, 2vw, 30px);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

html {
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

body.register-sheet-open {
  overflow: hidden;
}

a,
button,
input,
select,
textarea,
summary {
  font: inherit;
  touch-action: manipulation;
}

button,
input,
select,
textarea {
  outline: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
}

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.community-app {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  overflow: hidden;
}

/* Command rail */

.topbar {
  position: relative;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(520px, 38vw) minmax(280px, 340px);
  align-items: stretch;
  min-height: var(--topbar-height);
  background: rgba(253, 252, 255, 0.96);
  border-bottom: 1px solid var(--line-soft);
  box-shadow: 0 1px 12px rgba(67, 56, 78, 0.05);
  backdrop-filter: blur(14px);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 12px var(--edge);
}

.brand-block > div {
  min-width: 0;
}

.brand-block h1 {
  margin: 0;
  font-size: clamp(1.1rem, 0.95rem + 0.5vw, 1.52rem);
  font-weight: 820;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.brand-kicker {
  flex: 0 0 auto;
  margin: 0;
  color: var(--coral);
  font-size: 0.63rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  line-height: 1.3;
  white-space: nowrap;
}

.brand-copy {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-mode-tabs {
  --visible-mode-tab-count: 3;
  display: grid;
  grid-template-columns: repeat(var(--visible-mode-tab-count), minmax(0, 1fr));
  min-width: 0;
  border-right: 1px solid var(--line-soft);
  border-left: 1px solid var(--line-soft);
}

.mode-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 64px;
  padding: 0 18px;
  border: 0;
  border-right: 1px solid var(--line-soft);
  background: transparent;
  color: var(--ink-soft);
  font-weight: 850;
  cursor: pointer;
}

.mode-tab:last-child {
  border-right: 0;
}

.mode-tab::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 0;
  left: 14px;
  height: 3px;
  background: transparent;
}

.mode-tab:hover {
  background: rgba(225, 213, 239, 0.38);
  color: var(--ink);
}

.mode-tab.is-active {
  background: var(--sun);
  color: var(--ink);
}

.mode-tab.is-active::after {
  background: var(--lavender-deep);
}

.mode-tab-label {
  min-width: 0;
  font-size: 0.96rem;
  letter-spacing: -0.025em;
  line-height: 1.2;
  white-space: nowrap;
}

.mode-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.topbar-utility {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  padding: 9px var(--edge) 9px 16px;
}

.community-auth-block {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.community-auth-copy {
  min-width: 0;
  text-align: right;
}

.auth-label {
  display: block;
  margin-bottom: 2px;
  color: var(--coral);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-status {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.72rem;
  line-height: 1.3;
}

.community-auth-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.community-auth-actions button,
.action-button,
.selection-button,
#registration-toggle-btn,
.saved-discovery-form > button[type="submit"],
.flow-search-form > button[type="submit"],
.inline-form > button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(110, 90, 151, 0.72);
  border-radius: 10px;
  background: var(--lavender-deep);
  color: #fff;
  font-weight: 820;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--lavender-shadow);
  transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.community-auth-actions button:hover,
.action-button:hover,
.selection-button:hover,
#registration-toggle-btn:hover,
.saved-discovery-form > button[type="submit"]:hover,
.flow-search-form > button[type="submit"]:hover,
.inline-form > button:hover {
  background: #625087;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(78, 62, 101, 0.2);
}

.community-auth-actions button.secondary {
  background: var(--paper-bright);
  color: var(--ink);
}

button[disabled] {
  cursor: not-allowed !important;
  opacity: 0.46;
  transform: none !important;
  box-shadow: none !important;
}

/* Main split: map is the canvas, index is a solid page */

.community-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--panel-width);
  min-height: 0;
  overflow: hidden;
  background: var(--paper);
}

.map-stage,
.map-stage-frame,
#kakao-map {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.map-stage {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-right: 1px solid var(--line-soft);
}

.map-stage-frame {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(rgba(25, 124, 131, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25, 124, 131, 0.08) 1px, transparent 1px),
    var(--sea-soft);
  background-size: 32px 32px;
}

.map-stage-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(247, 245, 250, 0.08), transparent 28%);
}

.map-disabled {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background:
    linear-gradient(rgba(23, 35, 30, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 35, 30, 0.1) 1px, transparent 1px),
    var(--sea-soft);
  background-size: 44px 44px;
  color: var(--ink);
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  font-weight: 750;
  line-height: 1.65;
  text-align: center;
}

.map-disabled.show {
  display: flex;
}

.map-floating {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 4;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.home-link,
.map-legend {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(75, 65, 87, 0.24);
  border-radius: 10px;
  background: rgba(253, 252, 255, 0.94);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 820;
  text-decoration: none;
  box-shadow: 0 5px 16px rgba(49, 41, 58, 0.13);
  backdrop-filter: blur(10px);
}

.map-legend {
  gap: 7px;
  background: rgba(233, 227, 242, 0.96);
}

.map-legend > span {
  width: 10px;
  height: 10px;
  border: 1px solid rgba(110, 90, 151, 0.7);
  border-radius: 50%;
  background: var(--coral);
}

.side-sheet {
  position: static;
  z-index: 5;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--paper);
}

.side-sheet-handle {
  display: none;
}

.side-sheet-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: var(--paper);
}

.workspace-shell-header {
  flex: 0 0 auto;
  padding: 22px 24px 19px;
  border-bottom: 1px solid var(--line-soft);
}

.workspace-shell-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.workspace-shell-kicker,
.section-eyebrow {
  margin: 0;
  color: var(--coral);
  font-size: 0.67rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.workspace-shell-badge {
  padding-bottom: 3px;
  border-bottom: 2px solid var(--sea);
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 900;
}

.workspace-shell-title {
  margin: 0;
  font-family: inherit;
  font-size: clamp(1.5rem, 1.15rem + 0.55vw, 1.9rem);
  font-weight: 820;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.workspace-shell-summary {
  margin: 9px 0 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.45;
}

.status-banner {
  position: relative;
  flex: 0 0 auto;
  min-height: 42px;
  padding: 10px 20px 10px 42px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: var(--paper-bright);
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

.status-banner::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 23px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-soft);
  transform: translateY(-50%);
}

.status-banner.is-ok::before {
  background: var(--leaf);
}

.status-banner.is-warn::before {
  background: var(--coral);
}

.status-banner.is-error::before,
.status-banner.is-err::before {
  background: var(--danger);
}

.mode-panel-wrap {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.mode-panel {
  display: none;
  width: 100%;
  min-height: 0;
}

.mode-panel.is-active {
  display: block;
  animation: page-enter 0.22s ease-out;
}

.panel-stack {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.surface {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: transparent;
}

.saved-surface,
.flow-surface {
  flex: 1 1 auto;
  overflow: hidden;
}

.admin-surface {
  flex: 0 0 auto;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line-soft);
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 0 0 auto;
}

.section-heading-inline {
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.saved-surface > .section-heading {
  padding: 18px 22px 15px;
  border-bottom: 1px solid var(--line-soft);
}

.section-heading h2,
.register-sheet-head h2 {
  margin: 0;
  font-family: inherit;
  font-size: 1.28rem;
  letter-spacing: -0.045em;
  line-height: 1.2;
}

.section-copy,
.description {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.45;
}

.result-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.result-count,
.saved-count,
.toggle-status,
.selection-label {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border-left: 4px solid var(--coral);
  background: transparent;
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.toolbar-button {
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid rgba(75, 65, 87, 0.22);
  border-radius: 8px;
  background: var(--paper-bright);
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 850;
  cursor: pointer;
}

.toolbar-button:hover {
  background: var(--sea-soft);
}

.toolbar-button.secondary {
  background: var(--sea-soft);
}

.toolbar-button.ghost {
  border-width: 0 0 1px;
  border-radius: 0;
  background: transparent;
}

.utility-button {
  min-height: 32px;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

/* Saved index */

.saved-discovery-tools {
  flex: 0 0 auto;
  border-bottom: 1px solid var(--line-soft);
}

.nearby-discovery {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  min-height: 52px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--paper-bright);
}

.nearby-location-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 52px;
  padding: 0 16px;
  border: 0;
  border-right: 1px solid var(--line-soft);
  background: transparent;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.nearby-location-button:hover,
.nearby-location-button[aria-pressed="true"] {
  background: var(--sea-soft);
  color: var(--lavender-deep);
}

.nearby-location-dot {
  position: relative;
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--sea);
  border-radius: 50%;
}

.nearby-location-dot::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: transparent;
}

.nearby-discovery[data-state="active"] .nearby-location-dot::after {
  background: var(--sea);
}

.nearby-radius-field {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding-left: 12px;
  border-right: 1px solid var(--line-soft);
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.nearby-radius-field select {
  min-height: 52px;
  padding: 0 32px 0 8px;
  border: 0;
  -webkit-appearance: none;
  appearance: none;
  background-color: transparent;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 13px) 50%, calc(100% - 8px) 50%;
  background-repeat: no-repeat;
  background-size: 5px 5px;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.nearby-location-status {
  min-width: 0;
  margin: 0;
  padding: 8px 13px;
  color: var(--ink-soft);
  font-size: 0.68rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.nearby-discovery[data-state="error"] .nearby-location-status {
  color: var(--danger);
  font-weight: 750;
}

.recommender-quick-block {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: stretch;
  min-width: 0;
  border-bottom: 1px solid var(--line-soft);
}

.saved-filter-label {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0 12px;
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 850;
}

.recommender-quick-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
}

.recommender-quick-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
  min-height: 50px;
  padding: 0 10px;
  border: 0;
  border-left: 1px solid var(--line-soft);
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
}

.recommender-quick-filter strong {
  color: var(--ink);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.recommender-quick-filter:hover {
  background: var(--paper-bright);
}

.recommender-quick-filter.is-active {
  background: var(--sun);
  color: var(--ink);
}

.recommender-quick-filter.is-featured.is-active {
  background: #d9cbed;
}

.saved-discovery-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: stretch;
  min-width: 0;
  background: var(--paper-bright);
}

.saved-discovery-form input,
.flow-search-form input,
.inline-form input,
.form-input,
.creator-filter-search {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  padding: 0 14px;
  background: var(--paper-bright);
  color: var(--ink);
  font-size: 0.86rem;
}

.saved-discovery-form input {
  min-height: 54px;
  border: 0;
}

.saved-discovery-form > button {
  min-width: 58px;
  min-height: 54px;
  border: 0;
  border-left: 1px solid var(--line-soft);
  box-shadow: none;
}

.saved-discovery-form > button[type="submit"] {
  border: 0;
  border-left: 1px solid rgba(110, 90, 151, 0.28);
  border-radius: 0;
  background: var(--lavender-deep);
  color: #fff;
  box-shadow: none;
}

.saved-discovery-form > button[type="submit"]:hover {
  transform: none;
  box-shadow: none;
}

.saved-filter-stack {
  display: grid;
  flex: 0 0 auto;
  gap: 16px;
  padding: 18px 20px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--paper-deep);
}

.saved-filter-stack:not([hidden]) {
  animation: page-enter 0.18s ease-out;
}

.saved-filter-group {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.saved-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.saved-filter-group .saved-filter-label {
  padding: 0;
  color: var(--ink);
}

.saved-filter-selection {
  max-width: 62%;
  margin: 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-chip-row,
.creator-filter-list {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 7px;
  border: 0;
}

.filter-chip,
.creator-filter-option {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid rgba(75, 65, 87, 0.18);
  border-radius: 999px;
  background: var(--paper-bright);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.filter-chip.is-active,
.creator-filter-option.is-active {
  border-color: rgba(110, 90, 151, 0.38);
  background: var(--sun);
  color: var(--lavender-deep);
}

.filter-chip-count,
.creator-filter-option-count {
  color: var(--ink-soft);
  font-size: 0.65rem;
  font-variant-numeric: tabular-nums;
}

.creator-filter-picker {
  display: grid;
  gap: 8px;
}

.creator-filter-list {
  max-height: 154px;
  overflow: auto;
}

.creator-filter-option {
  flex: 1 0 32%;
}

.creator-filter-option-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creator-featured-label {
  color: var(--coral);
  font-size: 0.56rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.creator-filter-empty {
  width: 100%;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  color: var(--ink-soft);
  font-size: 0.72rem;
}

/* Numbered editorial rows, never cards */

.result-list,
.summary-list,
.confirm-selection-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.result-list,
.summary-list {
  flex: 1 1 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--sea) var(--paper-deep);
  -webkit-overflow-scrolling: touch;
}

.summary-list {
  counter-reset: restaurant-index;
}

.summary-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  min-width: 0;
  padding-left: 46px;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  counter-increment: restaurant-index;
}

.summary-card::before {
  content: counter(restaurant-index, decimal-leading-zero);
  position: absolute;
  top: 18px;
  left: 14px;
  color: var(--coral);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.summary-item {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 96px;
  padding: 15px 14px 14px 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.summary-item:hover {
  background: rgba(233, 227, 242, 0.48);
}

.summary-item.is-active {
  background: var(--sea-soft);
}

.summary-item.is-active::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 3px;
  background: var(--lavender-deep);
}

.summary-top-row,
.summary-footer,
.result-meta-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 7px 10px;
}

.summary-name,
.result-name {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 950;
  letter-spacing: -0.035em;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.summary-address,
.summary-meta,
.result-address,
.result-meta,
.empty-state-copy {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.73rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.summary-address {
  margin-top: 6px;
}

.summary-footer {
  justify-content: flex-start;
  margin-top: 8px;
}

.summary-badges,
.result-badges {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.summary-category,
.summary-pick-badge,
.result-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid rgba(75, 65, 87, 0.2);
  border-radius: 999px;
  background: var(--paper-bright);
  color: var(--ink);
  font-size: 0.62rem;
  font-weight: 900;
  white-space: nowrap;
}

.summary-pick-badge {
  border-color: rgba(110, 90, 151, 0.4);
  background: #e3d8f0;
  color: #5f4a84;
}

.summary-meta-label {
  margin-right: 5px;
  color: var(--ink);
  font-size: 0.58rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.summary-distance {
  color: var(--sea);
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.summary-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1px;
  border-left: 1px solid var(--line-soft);
}

.restaurant-delete-button,
.recommendation-remove-button,
.info-window-delete,
.info-window-remove {
  min-height: 42px;
  padding: 0 10px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
  color: var(--danger);
  font-size: 0.67rem;
  font-weight: 900;
  cursor: pointer;
}

.recommendation-remove-button:hover,
.restaurant-delete-button:hover {
  background: #f5e2e8;
}

.summary-load-more-row {
  min-height: 50px;
}

.summary-load-more {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: var(--sea-soft);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 900;
  cursor: pointer;
}

.empty-state-card {
  padding: 28px 22px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--paper-bright);
}

.empty-state-title {
  margin: 0 0 7px;
  font-family: inherit;
  font-size: 1.08rem;
  font-weight: 800;
}

.empty-state-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

/* Recommendation flow */

.flow-surface {
  padding: 22px 24px 18px;
}

.flow-progress-block {
  flex: 0 0 auto;
  margin-bottom: 18px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.flow-progress-label {
  width: fit-content;
  margin: 0;
  padding: 8px 12px;
  border-left: 3px solid var(--lavender-deep);
  background: var(--sea-soft);
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 950;
}

.register-step {
  display: none;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  min-height: 0;
}

.register-step.is-active {
  display: flex;
  animation: page-enter 0.2s ease-out;
}

.flow-search-form,
.inline-form {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-width: 0;
}

.flow-search-form input,
.inline-form input,
.inline-form select {
  border: 1px solid rgba(75, 65, 87, 0.28);
  border-radius: 10px 0 0 10px;
  border-right: 0;
}

.flow-search-form > button,
.inline-form > button {
  flex: 0 0 auto;
}

.input-intent-hint {
  margin: -7px 0 0;
  color: var(--sea);
  font-size: 0.72rem;
  font-weight: 800;
}

.search-example-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border: 0;
}

.search-example-chip {
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--paper-bright);
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 750;
}

.inline-note {
  margin: 0;
  padding: 11px 13px;
  border-left: 3px solid var(--sea);
  border-radius: 0 8px 8px 0;
  background: var(--sea-soft);
  color: var(--ink-soft);
  font-size: 0.74rem;
  line-height: 1.45;
}

.inline-note.is-warn {
  border-left-color: var(--coral);
}

.result-list {
  border-top: 1px solid var(--line-soft);
  counter-reset: result-index;
}

.result-list > li {
  counter-increment: result-index;
}

.result-item {
  position: relative;
  width: 100%;
  min-height: 94px;
  padding: 14px 14px 14px 48px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.result-item::before {
  content: counter(result-index, decimal-leading-zero);
  position: absolute;
  top: 16px;
  left: 14px;
  color: var(--coral);
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 900;
}

.result-item:hover {
  background: rgba(233, 227, 242, 0.48);
}

.result-item.selected {
  background: var(--sea-soft);
}

.result-address {
  margin-top: 5px;
}

.result-meta {
  margin-top: 4px;
}

.result-pill.selected {
  background: var(--sea-soft);
}

.result-pill.registered {
  background: var(--paper-deep);
}

.result-skeleton {
  pointer-events: none;
}

.result-skeleton-line {
  height: 10px;
  margin-bottom: 10px;
  background: var(--paper-deep);
  animation: pulse 1.2s ease-in-out infinite;
}

.result-skeleton-line.is-short {
  width: 46%;
}

.selection-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex: 0 0 auto;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
  background: var(--paper);
}

.selection-copy strong,
.selection-copy p {
  margin: 0;
}

.selection-copy p {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 0.7rem;
}

.selection-label {
  margin-right: 8px;
}

.step-footer {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  flex: 0 0 auto;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.step-footer-split {
  justify-content: space-between;
}

.confirm-preview-card {
  padding: 16px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.confirm-preview-card strong,
.confirm-preview-card p {
  margin: 0;
}

.confirm-preview-card p {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.confirm-selection-details {
  border-bottom: 1px solid var(--line-soft);
}

.confirm-selection-details summary {
  padding: 10px 0;
  font-size: 0.76rem;
  font-weight: 900;
  cursor: pointer;
}

.confirm-selection-list li {
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-block {
  min-width: 0;
}

.form-label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 900;
}

.form-input {
  border: 1px solid rgba(75, 65, 87, 0.28);
  border-radius: 10px;
}

.form-input[readonly] {
  background: var(--paper-deep);
}

.checkbox-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 9px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.8rem;
  font-weight: 850;
}

.checkbox-row input {
  width: 19px;
  height: 19px;
  accent-color: var(--lavender-deep);
}

.checkbox-row small {
  grid-column: 2;
  color: var(--ink-soft);
  font-size: 0.67rem;
  font-weight: 600;
}

.complete-actions {
  display: grid;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.debug-panel {
  margin-top: 12px;
  border: 1px solid var(--line);
}

.debug-output {
  max-height: 260px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  background: var(--ink);
  color: var(--paper-bright);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.68rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

/* Map information sheet */

.info-window {
  width: min(310px, calc(100vw - 44px));
  padding: 14px;
  border: 1px solid rgba(75, 65, 87, 0.22);
  border-radius: 14px;
  background: var(--paper-bright);
  color: var(--ink);
  box-shadow: 0 12px 32px rgba(49, 41, 58, 0.18);
  font-size: 12px;
}

.info-window-title {
  margin: 0;
  font-family: inherit;
  font-size: 16px;
  font-weight: 900;
}

.info-window-category,
.info-window-meta-label,
.info-window-meta-value {
  font-size: 11px;
  line-height: 1.45;
}

.info-window-category {
  display: inline-block;
  margin-top: 6px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--coral);
  font-weight: 900;
}

.info-window-meta {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.info-window-meta-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 8px;
}

.info-window-meta-label {
  color: var(--ink-soft);
  font-weight: 800;
}

.info-window-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  border: 0;
}

.info-window-link,
.info-window-delete,
.info-window-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--paper-bright);
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
}

.info-window-delete,
.info-window-remove {
  color: var(--danger);
}

.service-legal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 18px;
  border-top: 1px solid var(--line-soft);
  background: var(--paper-deep);
  color: var(--ink-soft);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.service-legal-links {
  display: flex;
  gap: 12px;
}

.service-legal-links a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  max-width: min(440px, calc(100vw - 32px));
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: #332d3d;
  color: var(--paper-bright);
  font-size: 0.78rem;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  pointer-events: none;
  box-shadow: 0 12px 30px rgba(49, 41, 58, 0.24);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  box-shadow: 0 12px 30px rgba(181, 83, 109, 0.22);
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 1;
  }
}

@media (max-width: 1280px) {
  :root {
    --panel-width: clamp(390px, 39vw, 500px);
  }

  .topbar {
    grid-template-columns: 190px minmax(470px, 1fr) 240px;
  }

  .topbar-utility {
    min-height: 0;
    padding-top: 7px;
    padding-bottom: 7px;
    border-top: 0;
  }

  .community-auth-block {
    justify-content: flex-end;
  }

  .brand-kicker,
  .brand-copy,
  .community-auth-copy {
    display: none;
  }

  .brand-block {
    padding: 8px 12px;
  }

  .brand-block h1 {
    font-size: 1rem;
  }
}

@media (max-width: 900px) {
  :root {
    --mobile-sheet-height: min(72dvh, 680px);
    --mobile-sheet-peek: 84px;
  }

  body {
    overflow: hidden;
  }

  .community-app {
    display: grid;
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand utility"
      "tabs tabs";
    min-height: 0;
    padding-top: env(safe-area-inset-top);
  }

  .brand-block {
    grid-area: brand;
    min-height: 58px;
    padding: 9px 14px;
  }

  .brand-kicker,
  .brand-copy {
    display: none;
  }

  .brand-block h1 {
    font-size: 1.18rem;
  }

  .topbar-mode-tabs {
    grid-area: tabs;
    min-height: 60px;
    border: 0;
    border-top: 1px solid var(--line-soft);
  }

  .mode-tab {
    min-height: 60px;
    padding: 0 12px;
  }

  .mode-tab::after {
    right: 0;
    left: 0;
    height: 4px;
  }

  .mode-tab-label {
    font-size: 0.9rem;
  }

  .mode-tab-badge {
    min-width: 22px;
    height: 22px;
  }

  .topbar-utility {
    grid-area: utility;
    min-width: 0;
    min-height: 58px;
    padding: 7px 12px 7px 0;
    border: 0;
  }

  .community-auth-copy,
  .auth-label {
    display: none;
  }

  .community-auth-actions button {
    min-height: 42px;
    padding: 0 12px;
    box-shadow: 0 3px 10px var(--lavender-shadow);
    font-size: 0.74rem;
  }

  #reset-flow-btn {
    min-height: 42px;
  }

  .community-workspace {
    display: block;
    height: auto;
    min-height: 0;
    overflow: hidden;
  }

  .map-stage {
    height: 100%;
    border: 0;
  }

  .map-floating {
    top: 12px;
    left: 12px;
    right: 12px;
  }

  .home-link,
  .map-legend {
    min-height: 42px;
  }

  .side-sheet {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 45;
    height: var(--mobile-sheet-height);
    overflow: visible;
    padding-bottom: env(safe-area-inset-bottom);
    background: transparent;
    pointer-events: none;
    transition: height 0.24s ease;
  }

  .side-sheet-handle {
    position: absolute;
    top: -44px;
    right: 0;
    left: 0;
    display: flex;
    justify-content: center;
    height: 44px;
    pointer-events: none;
  }

  .sheet-toggle-button {
    min-width: 154px;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid rgba(110, 90, 151, 0.28);
    border-bottom: 0;
    border-radius: 12px 12px 0 0;
    background: rgba(247, 245, 250, 0.96);
    color: var(--lavender-deep);
    font-size: 0.78rem;
    font-weight: 820;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 -5px 16px rgba(49, 41, 58, 0.08);
    backdrop-filter: blur(10px);
  }

  .side-sheet-body {
    position: relative;
    z-index: 1;
    height: 100%;
    border-top: 1px solid rgba(75, 65, 87, 0.18);
    background: var(--paper);
    pointer-events: auto;
    box-shadow: 0 -12px 34px rgba(49, 41, 58, 0.12);
  }

  body.sheet-collapsed .side-sheet {
    height: var(--mobile-sheet-peek);
  }

  body.sheet-expanded .side-sheet {
    z-index: 55;
  }

  body.sheet-collapsed[data-active-mode="saved"] .workspace-shell-header,
  body.sheet-collapsed[data-active-mode="saved"] .status-banner,
  body.sheet-collapsed[data-active-mode="saved"] .saved-surface > .section-heading,
  body.sheet-collapsed[data-active-mode="saved"] .service-legal-footer {
    display: none;
  }

  body.sheet-collapsed[data-active-mode="saved"] .saved-surface,
  body.sheet-collapsed[data-active-mode="saved"] .panel-stack,
  body.sheet-collapsed[data-active-mode="saved"] .mode-panel-wrap {
    height: 100%;
  }

  body.sheet-collapsed[data-active-mode="saved"] .recommender-quick-block,
  body.sheet-collapsed[data-active-mode="saved"] .saved-discovery-form,
  body.sheet-collapsed[data-active-mode="saved"] .saved-filter-stack,
  body.sheet-collapsed[data-active-mode="saved"] .summary-list {
    display: none;
  }

  .workspace-shell-header {
    display: none;
  }

  .workspace-shell-summary {
    max-width: 42ch;
  }

  .status-banner {
    padding-right: 16px;
  }

  .mode-panel-wrap {
    min-height: 0;
  }

  .saved-surface > .section-heading {
    padding: 14px 16px 12px;
  }

  .nearby-location-button,
  .nearby-radius-field,
  .nearby-radius-field select {
    min-height: 48px;
  }

  .nearby-location-status {
    font-size: 0.66rem;
  }

  .saved-discovery-form input,
  .flow-search-form input,
  .inline-form input,
  .form-input,
  .creator-filter-search,
  .nearby-radius-field select {
    font-size: 16px;
  }

  .filter-chip,
  .creator-filter-option,
  .recommender-quick-filter,
  .toolbar-button,
  .restaurant-delete-button,
  .recommendation-remove-button {
    min-height: 44px;
  }

  .saved-filter-stack:not([hidden]) {
    flex: 1 1 auto;
    min-height: 120px;
    overflow: auto;
  }

  .summary-list {
    min-height: 100px;
  }

  .flow-surface {
    padding: 18px;
  }

  .service-legal-footer {
    min-height: 32px;
  }

  .toast {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: 12px;
    max-width: none;
  }
}

@media (max-width: 620px) {
  .brand-block h1 {
    font-size: 1.04rem;
  }

  .mode-tab-label {
    font-size: 0.84rem;
  }

  .community-auth-actions button {
    padding: 0 10px;
    font-size: 0.7rem;
  }

  .workspace-shell-kicker,
  .workspace-shell-summary,
  .section-eyebrow {
    display: none;
  }

  .workspace-shell-title {
    font-size: 1.18rem;
  }

  .status-banner {
    min-height: 36px;
    padding: 8px 14px 8px 34px;
    overflow: hidden;
    font-size: 0.67rem;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .status-banner::before {
    left: 16px;
  }

  .saved-surface > .section-heading {
    padding: 11px 14px 10px;
  }

  .section-heading h2,
  .register-sheet-head h2 {
    font-size: 1.12rem;
  }

  .section-heading-inline {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .saved-surface .result-toolbar {
    justify-content: space-between;
    width: 100%;
  }

  .nearby-discovery {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .nearby-location-status {
    grid-column: 1 / -1;
    min-height: 34px;
    padding: 7px 12px;
    border-top: 1px solid var(--line-soft);
  }

  .recommender-quick-block {
    grid-template-columns: 1fr;
  }

  .recommender-quick-block > .saved-filter-label {
    min-height: 32px;
    border-bottom: 1px solid var(--line-soft);
  }

  .recommender-quick-filters {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .recommender-quick-filters::-webkit-scrollbar {
    display: none;
  }

  .recommender-quick-filter {
    flex: 1 0 112px;
  }

  .saved-discovery-form {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .saved-discovery-form #saved-discovery-clear {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line-soft);
    border-left: 0;
  }

  .saved-filter-stack {
    padding: 14px;
  }

  .creator-filter-option {
    flex-basis: 50%;
  }

  .summary-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .summary-actions {
    flex-direction: row;
    justify-content: flex-end;
    border-top: 1px solid var(--line-soft);
    border-left: 0;
  }

  .summary-item {
    min-height: 92px;
  }

  .summary-top-row {
    align-items: flex-start;
  }

  .flow-search-form,
  .inline-form,
  .toggle-row,
  .selection-action-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .flow-search-form input,
  .inline-form input,
  .inline-form select {
    border-right: 1px solid rgba(75, 65, 87, 0.28);
    border-radius: 10px 10px 0 0;
    border-bottom: 0;
  }

  .flow-search-form > button,
  .inline-form > button,
  .action-button,
  .selection-button {
    width: 100%;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .step-footer,
  .step-footer-split {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-surface {
    padding: 18px;
  }

  .map-disabled {
    align-items: flex-start;
    padding: 30vh 24px 0;
    font-size: 0.95rem;
  }
}

@media (max-width: 390px) {
  .brand-block {
    padding-right: 8px;
    padding-left: 10px;
  }

  .brand-block h1 {
    font-size: 0.96rem;
  }

  .community-auth-actions button {
    padding: 0 8px;
  }

  .mode-tab {
    padding: 0 8px;
  }

  .mode-tab-label {
    font-size: 0.78rem;
  }

  .mode-tab-badge {
    min-width: 20px;
    height: 20px;
    font-size: 0.62rem;
  }

  .nearby-location-button {
    padding: 0 10px;
  }

  .nearby-radius-field {
    padding-left: 8px;
  }

  .nearby-radius-field select {
    padding-left: 6px;
  }
}

@media (max-width: 900px) and (max-height: 560px) {
  :root {
    --mobile-sheet-height: min(62dvh, 370px);
    --mobile-sheet-peek: 156px;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) minmax(270px, 1.1fr) auto;
    grid-template-areas: "brand tabs utility";
  }

  .brand-block,
  .topbar-utility,
  .mode-tab,
  .topbar-mode-tabs {
    min-height: 60px;
  }

  .brand-block {
    min-width: 0;
  }

  .topbar-mode-tabs {
    border-top: 0;
  }

  .community-workspace {
    height: auto;
  }

  .workspace-shell-header,
  .status-banner {
    display: none;
  }

  .flow-surface {
    overflow: auto;
  }
}

@supports (-webkit-touch-callout: none) {
  input,
  select,
  textarea {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
