html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

:root {
  color-scheme: light;
  --brand: #F9A8BB;
  --brand-deep: #F07090;
  --bg: #fff4f8;
  --surface: rgba(255, 248, 251, 0.92);
  --surface-strong: #fff8fb;
  --text: #2a1a22;
  --muted: #9e7a88;
  --line: rgba(180, 100, 130, 0.1);
  --accent: #F9A8BB;
  --accent-2: #f4a43c;
  --shadow: 0 28px 60px rgba(180, 80, 110, 0.13);
}

* {
  box-sizing: border-box;
}

html, body {
  font-family: "Inter", system-ui, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #fff4f8 0%, #fde8f2 100%);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  background: none;
  color: inherit;
}

.app-container {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  position: relative;
  background: linear-gradient(180deg, #fff4f8 0%, #fde8f2 100%);
  margin: 0;
  padding: 0;
}




.screen {
  position: fixed;
  inset: 0;
  bottom: calc(83px + env(safe-area-inset-bottom, 0px));
  top: env(safe-area-inset-top, 0px);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #fff4f8 0%, #fde8f2 100%);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.screen.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Trip screen overrides */
.screen-trip {
  z-index: 6;
  align-items: flex-start;
  justify-content: flex-start;
  background: #fff;
}

/* ============ TRIP SCREEN ============ */
.trip-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.trip-hdr {
  padding: 12px 20px 4px;
  flex: none;
}

.trip-back {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #555;
  cursor: pointer;
}

.trip-meta {
  padding: 16px 20px 12px;
  flex: none;
}

.trip-title-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
  flex-wrap: nowrap;
  overflow: hidden;
}

.trip-title {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  color: #1a1a1a;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex: none;
}

.trip-daterange {
  font-size: 13px;
  font-weight: 500;
  color: #888;
  white-space: nowrap;
  flex: none;
}

.trip-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.trip-artist-tag {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-deep);
}

.trip-action-btns {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  flex: none;
}

.trip-edit-btn,
.trip-new-btn {
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.trip-edit-btn {
  background: #f0f0f0;
  color: #444;
}

.trip-new-btn {
  border: 1.5px solid rgba(249,168,187,0.5);
  background: rgba(249,168,187,0.08);
  color: var(--brand-deep);
}

/* Popup */
.trip-popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(20,15,8,.45);
  display: flex;
  align-items: center;
  justify-content: center;
}

.trip-popup-backdrop[hidden] { display: none; }

.trip-popup {
  background: #fff;
  border-radius: 22px;
  padding: 28px 24px 20px;
  width: 80%;
  max-width: 300px;
  box-shadow: 0 24px 60px rgba(0,0,0,.18);
}

.trip-popup-msg {
  margin: 0 0 22px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.55;
  text-align: center;
}

.trip-popup-btns {
  display: flex;
  gap: 10px;
}

.trip-popup-no,
.trip-popup-yes {
  flex: 1;
  height: 44px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.trip-popup-no {
  background: #f0f0f0;
  color: #555;
}

.trip-popup-yes {
  background: var(--brand);
  color: #fff;
}

/* Day tabs */
.trip-tabs-wrap {
  flex: none;
  padding: 0 20px 12px;
  border-bottom: 1px solid #f0f0f0;
}

.trip-day-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.trip-day-tabs::-webkit-scrollbar { display: none; }

.trip-day-tab {
  flex: none;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  background: #f0f0f0;
  color: #666;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.trip-day-tab.active {
  background: var(--brand);
  color: #fff;
}

/* Trip content + Timeline */
.trip-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 24px;
  min-height: 0;
}

.trip-day-label {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 20px;
}

.trip-timeline { position: relative; }

/* ---- Timeline item: venue ---- */
.tl-item {
  display: flex;
  gap: 14px;
  position: relative;
  padding-bottom: 0;
}

.tl-item + .tl-item { margin-top: 0; }

.tl-line-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: none;
  width: 14px;
}

.tl-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2.5px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
  flex: none;
  z-index: 1;
}

.tl-dot-sm {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ccc;
  border: 2px solid #fff;
  flex: none;
  z-index: 1;
}

.tl-line {
  flex: 1;
  width: 2px;
  background: #eee;
  min-height: 16px;
}

.tl-body { flex: 1; min-width: 0; padding-bottom: 20px; }

/* Venue card */
.tl-venue-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding-top: 0;
}

.tl-venue-name {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 3px;
  line-height: 1.3;
}

.tl-venue-time {
  font-size: 12px;
  color: #999;
  font-weight: 500;
}

.tl-venue-btns {
  display: flex;
  gap: 6px;
  flex: none;
}

.tl-btn {
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f0f0f0;
  color: #444;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.tl-venue-img {
  width: 100%;
  height: 140px;
  border-radius: 16px;
  background: linear-gradient(135deg, #f5f5f5 0%, #ebebeb 100%);
}

/* Transit section */
.tl-transit-time {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 6px;
  padding-top: 2px;
}

.tl-transit-bar {
  height: 6px;
  background: #eee;
  border-radius: 3px;
  margin-bottom: 10px;
  overflow: hidden;
}

.tl-transit-fill {
  height: 100%;
  width: 80%;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-deep) 100%);
  border-radius: 3px;
}

.tl-stations {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tl-station-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #555;
  font-weight: 500;
}

.tl-line-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  flex: none;
}

.tl-station-hint {
  font-size: 10px;
  color: #bbb;
  margin-left: 2px;
}

.schedule-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  padding: 0 32px;
}

.schedule-eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-deep);
  opacity: 0.7;
}

.schedule-title {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--text);
}

.brand-logo {
  display: block;
  width: 220px;
  height: auto;
  margin-top: -8px;
}

.schedule-create-btn {
  margin-top: 16px;
  height: 52px;
  padding: 0 40px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(249, 168, 187, 0.45);
  transition: opacity 0.15s, transform 0.15s;
}

.schedule-create-btn:active {
  opacity: 0.85;
  transform: scale(0.97);
}

.coming-soon-desc {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

/* ============ MENU SCREEN ============ */
.screen-menu {
  align-items: flex-start;
  justify-content: flex-start;
  background: #fff;
}

.menu-wrap {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.menu-cover {
  flex: none;
  height: 110px;
  background: linear-gradient(180deg, #f0eef5 0%, #e2dff0 100%);
}

.menu-profile-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px 20px;
  margin-top: -36px;
  flex: none;
}

.menu-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #c5bfe8;
  border: 3px solid #fff;
  flex: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

.menu-identity {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 38px;
}

.menu-nickname {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.menu-id {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.menu-edit-btn {
  flex: none;
  align-self: flex-end;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid #ddd;
  background: #fff;
  color: #444;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.menu-stats-card {
  margin: 0 20px 8px;
  border: 1.5px solid #ececec;
  border-radius: 18px;
  padding: 18px 0 14px;
  flex: none;
}

.menu-stats-top {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 0 16px 14px;
}

.menu-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.menu-stat span {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.menu-stats-divider {
  height: 1px;
  background: #ececec;
  margin: 0 16px 14px;
}

.menu-stats-bottom {
  padding: 0 20px;
}

.menu-points-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.menu-list {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  flex: 1;
}

.menu-list-item {
  width: 100%;
  text-align: left;
  padding: 18px 24px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  transition: background 0.12s;
}

.menu-list-item:active {
  background: rgba(249, 168, 187, 0.08);
}



.map-stage {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
}

.map-canvas {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: calc(83px + env(safe-area-inset-bottom, 0px));
  width: 100%;
  height: calc(100% - 83px - env(safe-area-inset-bottom, 0px));
  background: #d9d9d9;
  overflow: hidden;
}

.map-canvas.is-live .map-pattern,
.map-canvas.is-live .route,
.map-canvas.is-live .route-badge,
.map-canvas.is-live .poi {
  display: none;
}

.map-pattern {
  display: none;
}

.route {
  display: none;
}

.route-a {
  width: 220%;
  height: 9px;
  left: -42%;
  top: 58%;
  transform: rotate(16deg);
  background: linear-gradient(90deg, #1cb548 0 50%, #ffd24f 50% 100%);
}

.route-b {
  width: 170%;
  height: 7px;
  left: -10%;
  top: 48%;
  transform: rotate(-18deg);
  background: linear-gradient(90deg, #40b3ff 0 40%, #62cf9a 40% 100%);
}

.route-c {
  width: 190%;
  height: 6px;
  left: -20%;
  top: 39%;
  transform: rotate(43deg);
  background: linear-gradient(90deg, #1db954 0 45%, #f1c54d 45% 100%);
  opacity: 0.88;
}

.route-badge,
.poi {
  display: none;
}

.map-legend {
  position: fixed;
  left: 14px;
  bottom: calc(90px + env(safe-area-inset-bottom, 0px));
  z-index: 6;
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(255, 248, 251, 0.94);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(180, 80, 110, 0.12);
  border: 1px solid rgba(249, 168, 187, 0.2);
}

.map-legend.visible { display: flex; }

.legend-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  flex: none;
}

.route-badge {
  padding: 7px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(64, 52, 31, 0.1);
  font-size: 13px;
}

.badge-left {
  left: 112px;
  top: 495px;
}

.badge-right {
  right: 54px;
  top: 116px;
}

.poi {
  color: rgba(86, 74, 58, 0.86);
  font-size: 14px;
}

.poi-a {
  left: 72px;
  top: 629px;
}

.poi-b {
  right: 28px;
  top: 337px;
}

.poi-c {
  left: 8px;
  top: 312px;
}

.profile-button,
.location-pin {
  position: fixed;
  z-index: 4;
  display: grid;
  place-items: center;
  border-radius: 999px;
  box-shadow: 0 14px 36px rgba(30, 24, 13, 0.18);
}

.profile-button {
  right: 14px;
  top: 60px;
  width: 46px;
  height: 46px;
  background: rgba(255, 255, 255, 0.88);
  color: #8a8171;
  font-size: 22px;
}

.location-pin {
  left: 16px;
  top: 180px;
  width: 42px;
  height: 42px;
  background: #fff;
}

.location-pin span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 10px rgba(40, 180, 99, 0.14);
}

.map-status {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 92px;
  z-index: 5;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(72, 63, 48, 0.12);
  box-shadow: 0 18px 36px rgba(39, 29, 12, 0.12);
  color: #4f473b;
  font-size: 12px;
  line-height: 1.4;
  backdrop-filter: blur(10px);
}

.top-overlay {
  position: fixed;
  top: env(safe-area-inset-top, 0px);
  left: 0;
  right: 0;
  z-index: 3;
  padding: 14px 14px 0;
  width: 100%;
}

.search-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-chip-wrap {
  flex: 1;
  position: relative;
}

.search-chip {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 40px rgba(58, 47, 20, 0.12);
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 8;
  background: rgba(255, 248, 251, 0.98);
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(180, 80, 110, 0.14);
  overflow: hidden;
  backdrop-filter: blur(16px);
}

.search-suggestions[hidden] { display: none; }

.suggestion-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  cursor: pointer;
  border-bottom: 1px solid rgba(249, 168, 187, 0.1);
  transition: background 0.12s;
}

.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:active { background: rgba(249, 168, 187, 0.12); }

.suggestion-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.suggestion-name em {
  color: var(--brand-deep);
  font-style: normal;
}

.suggestion-group {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: rgba(249, 168, 187, 0.15);
  padding: 2px 8px;
  border-radius: 999px;
}

.filter-button {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 40px rgba(58, 47, 20, 0.12);
  display: grid;
  place-items: center;
  color: #4d463b;
  cursor: pointer;
}

.filter-button svg {
  width: 22px;
  height: 22px;
}

.search-icon {
  width: 16px;
  height: 16px;
  border: 2px solid #908676;
  border-radius: 50%;
  position: relative;
  flex: none;
}

.search-icon::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 2px;
  background: #908676;
  right: -5px;
  bottom: -2px;
  transform: rotate(45deg);
  border-radius: 999px;
}

.search-chip input {
  flex: 1;
  height: 100%;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: var(--text);
  min-width: 0;
}

.search-chip input::placeholder {
  color: #8f8575;
}


.bottom-sheet {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(83px + env(safe-area-inset-bottom, 0px));
  z-index: 3;
  margin: 0;
  padding: 10px 16px 18px;
  border-radius: 30px 30px 0 0;
  background: rgba(255, 252, 246, 0.92);
  box-shadow: 0 -24px 60px rgba(46, 32, 13, 0.12);
  backdrop-filter: blur(18px);
  width: 100%;
  max-height: 50vh;
  overflow-y: auto;
}

.sheet-handle {
  width: 46px;
  height: 5px;
  border-radius: 999px;
  margin: 0 auto 16px;
  background: rgba(92, 78, 58, 0.18);
  cursor: pointer;
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sheet-head h1 {
  margin: 0;
  font-size: 23px;
  line-height: 1.1;
}

.pill-button {
  flex: none;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: #f3eee5;
  color: #52493d;
  font-weight: 700;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 14px;
}

.place-card {
  min-height: 118px;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #fbf7ef 100%);
  border: 1px solid rgba(77, 63, 43, 0.08);
  box-shadow: 0 14px 28px rgba(50, 39, 16, 0.06);
}

.place-card.accent {
  background: linear-gradient(135deg, rgba(40, 180, 99, 0.12), rgba(255, 255, 255, 0.95));
}

.place-meta {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.place-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.2;
}

.place-card p:last-child {
  margin: 0;
  color: #62584a;
  line-height: 1.45;
}

.filter-sheet-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: calc(83px + env(safe-area-inset-bottom, 0px));
  z-index: 19;
  background: rgba(20, 15, 8, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.filter-sheet-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.filter-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(83px + env(safe-area-inset-bottom, 0px));
  z-index: 20;
  border-radius: 30px 30px 0 0;
  background: rgba(255, 248, 251, 0.97);
  box-shadow: 0 -24px 60px rgba(180, 80, 110, 0.1);
  backdrop-filter: blur(20px);
  transform: translateY(100%);
  transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1);
  padding: 10px 0 0;
  max-height: 72vh;
  display: flex;
  flex-direction: column;
}

.filter-sheet.hidden {
  display: none;
}

.filter-sheet.open {
  transform: translateY(0);
}

.filter-sheet .sheet-handle {
  margin: 0 auto 14px;
  padding: 10px 40px;
  cursor: pointer;
}

.filter-sheet-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

.filter-col {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0 16px;
}

.filter-col-left {
  padding-left: 16px;
  padding-right: 12px;
}

.filter-col-right {
  padding-left: 12px;
  padding-right: 16px;
}

.filter-divider {
  width: 1px;
  background: rgba(88, 73, 50, 0.1);
  align-self: stretch;
  flex: none;
}

.filter-artist {
  display: block;
  width: 100%;
  text-align: left;
  padding: 13px 16px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  color: #62584a;
  background: transparent;
  margin-bottom: 2px;
  transition: background 0.15s, color 0.15s;
}

.filter-artist.active {
  background: rgba(40, 180, 99, 0.1);
  color: var(--accent);
}

.filter-sheet-footer {
  display: none;
  justify-content: flex-end;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(88, 73, 50, 0.08);
}

.filter-sheet-footer.visible {
  display: flex;
}

.filter-search-btn {
  height: 48px;
  padding: 0 32px;
  border-radius: 999px;
  background: var(--text);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: opacity 0.15s;
}

.filter-search-btn:active {
  opacity: 0.75;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  height: calc(83px + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: flex-start;
  padding: 10px 10px 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(255, 248, 251, 0.97);
  border-top: 1px solid rgba(180, 100, 130, 0.08);
  width: 100%;
  backdrop-filter: blur(20px);
}

.nav-item {
  display: grid;
  place-items: center;
  gap: 3px;
  min-width: 0;
  overflow: hidden;
  padding: 0 2px;
  color: #8a7f6f;
}

.nav-item span {
  font-size: 18px;
  line-height: 1;
}

.nav-icon {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  stroke-width: 1.75;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.nav-item strong {
  display: block;
  width: 100%;
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item.active {
  color: var(--text);
}

@media (max-height: 780px) {
  .bottom-sheet {
    padding-bottom: 12px;
  }

  .place-card {
    min-height: 104px;
  }
}

/* ============ SURVEY ============ */
.survey-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 8px 0 0;
}

.survey-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px 16px;
  flex: none;
}

.survey-back-nav {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(249, 168, 187, 0.15);
  color: var(--brand-deep);
  cursor: pointer;
}

.survey-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.sdot {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: rgba(249, 168, 187, 0.35);
  transition: width 0.3s ease, background 0.3s ease;
}

.sdot.active {
  width: 22px;
  background: var(--brand);
}

.survey-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  padding: 0 20px;
}

.survey-panel[hidden] { display: none; }

.survey-q-block {
  margin-bottom: 18px;
  flex: none;
}

.survey-q {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}

.survey-nights {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--brand-deep);
  min-height: 20px;
}

.survey-budget-val {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--brand-deep);
}

/* ---- Calendar ---- */
.survey-cal-wrap {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.cal-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  flex: none;
}

.cal-month-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.cal-arrow {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(249, 168, 187, 0.12);
  color: var(--brand-deep);
  cursor: pointer;
}

.cal-arrow svg { width: 14px; height: 14px; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  flex: 1;
  align-content: start;
}

.cal-dow {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  padding-bottom: 6px;
}

.cal-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  cursor: pointer;
}

.cal-cell.empty,
.cal-cell.disabled { pointer-events: none; }

.cal-cell.disabled .cal-num { color: rgba(42, 26, 34, 0.2); }

/* Range band */
.cal-cell::before {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 32px;
  left: 0; right: 0;
  background: transparent;
  z-index: 0;
  pointer-events: none;
}

.cal-cell.in-range::before { background: rgba(249, 168, 187, 0.22); }
.cal-cell.range-start::before { left: 50%; background: rgba(249, 168, 187, 0.22); }
.cal-cell.range-end::before { right: 50%; background: rgba(249, 168, 187, 0.22); }

.cal-cell.row-first.in-range::before,
.cal-cell.row-first.range-end::before { border-radius: 16px 0 0 16px; }

.cal-cell.row-last.in-range::before,
.cal-cell.row-last.range-start::before { border-radius: 0 16px 16px 0; }

.cal-num {
  position: relative;
  z-index: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  transition: background 0.15s;
}

.cal-cell.today .cal-num { color: var(--brand-deep); font-weight: 700; }

.cal-cell:not(.disabled):not(.empty):not(.checkin):not(.checkout):hover .cal-num {
  background: rgba(249, 168, 187, 0.25);
}

.cal-cell.checkin .cal-num,
.cal-cell.checkout .cal-num {
  background: var(--brand);
  color: #fff;
  font-weight: 700;
}

/* ---- Dual Range Slider ---- */
.survey-slider-block {
  padding: 32px 8px 0;
}

.dual-range {
  position: relative;
  height: 44px;
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.dual-track {
  position: absolute;
  width: 100%;
  height: 4px;
  background: rgba(249, 168, 187, 0.25);
  border-radius: 2px;
  pointer-events: none;
}

.dual-fill {
  position: absolute;
  height: 100%;
  background: var(--brand);
  border-radius: 2px;
}

.dual-input {
  position: absolute;
  width: 100%;
  height: 4px;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  pointer-events: none;
  outline: none;
  border: none;
}

.dual-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--brand);
  box-shadow: 0 2px 10px rgba(249, 168, 187, 0.5);
  pointer-events: all;
  cursor: grab;
}

.dual-input::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--brand);
  box-shadow: 0 2px 10px rgba(249, 168, 187, 0.5);
  pointer-events: all;
  cursor: grab;
}

.dual-endpoints {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

/* ---- Survey Footer ---- */
.survey-ftr {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 20px 20px;
  flex: none;
}

.survey-btn-back {
  height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  background: rgba(249, 168, 187, 0.15);
  color: var(--brand-deep);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.survey-btn-back[hidden] { display: none; }

.survey-btn-next {
  height: 48px;
  padding: 0 36px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(249, 168, 187, 0.45);
  transition: opacity 0.15s;
}

.survey-btn-next:disabled {
  background: rgba(249, 168, 187, 0.35);
  box-shadow: none;
  cursor: default;
}

.survey-btn-next:not(:disabled):active { opacity: 0.8; }

/* ---- Step 5 : Food ---- */
.survey-food-limit {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.food-selected-strip {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 20px;
  margin: 0 -20px 0;
  scrollbar-width: none;
  min-height: 44px;
  border-top: 1px solid rgba(249, 168, 187, 0.15);
  border-bottom: 1px solid rgba(249, 168, 187, 0.15);
}

.food-selected-strip::-webkit-scrollbar { display: none; }

.food-strip-empty {
  font-size: 12px;
  color: rgba(158, 122, 136, 0.4);
  white-space: nowrap;
}

.food-strip-count {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-deep);
  padding-left: 2px;
  white-space: nowrap;
}

.food-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
  height: 26px;
  padding: 0 6px 0 10px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.food-chip-remove {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 13px;
  display: grid;
  place-items: center;
  cursor: pointer;
  line-height: 1;
  padding-bottom: 1px;
}

.food-body {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-height: 0;
  margin: 4px -20px 0;
}

.food-cat-col {
  width: 106px;
  flex: none;
  overflow-y: auto;
  padding: 6px 0 16px 12px;
}

.food-cat-divider {
  width: 1px;
  background: rgba(249, 168, 187, 0.18);
  align-self: stretch;
  flex: none;
}

.food-items-col {
  flex: 1;
  overflow-y: auto;
  padding: 6px 12px 16px 0;
}

.food-cat-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 10px;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  text-align: left;
  margin-bottom: 2px;
  cursor: pointer;
  line-height: 1.3;
  transition: background 0.15s, color 0.15s;
}

.food-cat-btn.active {
  background: rgba(249, 168, 187, 0.15);
  color: var(--brand-deep);
}

.food-cat-count {
  flex: none;
  min-width: 17px;
  height: 17px;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  margin-left: 4px;
}

.food-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 12px;
  border-radius: 12px;
  margin-bottom: 3px;
  cursor: pointer;
  transition: background 0.15s;
}

.food-item:active { background: rgba(249, 168, 187, 0.08); }

.food-item.selected { background: rgba(249, 168, 187, 0.1); }

.food-item.disabled { opacity: 0.3; pointer-events: none; }

.food-item-check {
  flex: none;
  width: 19px;
  height: 19px;
  border-radius: 6px;
  border: 1.8px solid rgba(249, 168, 187, 0.5);
  display: grid;
  place-items: center;
  margin-top: 1px;
  transition: background 0.15s, border-color 0.15s;
}

.food-item.selected .food-item-check {
  background: var(--brand);
  border-color: var(--brand);
}

.food-item-text { flex: 1; min-width: 0; }

.food-item-name {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.food-key-badge {
  font-size: 10px;
  color: var(--brand-deep);
  margin-left: 2px;
}

.food-item-desc {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.35;
}

/* ---- Step 3 : Artist selector ---- */
.survey-artist-wrap {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-height: 0;
  margin: 0 -20px;
}

.survey-artist-col {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0 16px;
}

.survey-artist-col:first-child { padding-left: 20px; padding-right: 8px; }
.survey-artist-col:last-child  { padding-left: 8px;  padding-right: 20px; }

.survey-artist-divider {
  width: 1px;
  background: rgba(249, 168, 187, 0.2);
  align-self: stretch;
  flex: none;
}

.survey-artist-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  margin-bottom: 2px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.survey-artist-btn.active {
  background: rgba(249, 168, 187, 0.15);
  color: var(--brand-deep);
}

/* ---- Step 4 : Nights grid ---- */
.survey-nights-sub {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.survey-nights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding-top: 8px;
}

.survey-nights-btn {
  aspect-ratio: 1.4;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  background: rgba(249, 168, 187, 0.1);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}

.survey-nights-btn.active {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 14px rgba(249, 168, 187, 0.5);
}

.survey-nights-btn:active { transform: scale(0.95); }

@container (max-width: 320px) {
  .bottom-nav {
    height: 68px;
    padding: 4px 8px 8px;
  }

  .nav-item {
    gap: 0;
    padding: 0;
  }

  .nav-item strong {
    display: none;
  }

  .nav-item span {
    font-size: 20px;
  }

  .nav-icon {
    width: 24px;
    height: 24px;
  }
}

/* ============ DIARY EDITOR ============ */
.diary-editor {
  position: fixed;
  top: 0;
  left: 100vw;
  width: 100svh;
  height: 100svw;
  transform-origin: top left;
  transform: rotate(90deg);
  z-index: 60;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  background: #e8e8e8;
}

.diary-editor.active {
  opacity: 1;
  pointer-events: auto;
}

/* Dynamic Island pill (landscape left edge) */

/* ---- Inner wrapper ---- */
.diary-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: row;
}

/* ---- Sidebar ---- */
.diary-sidebar {
  width: 30%;
  min-width: 140px;
  height: 100%;
  background: #d4d4d4;
  display: flex;
  flex-direction: column;
  padding: 12px 10px 10px 28px;
}

.diary-sb-top { flex: 1; overflow: hidden; }

.diary-sb-topbar {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}

.diary-back-btn {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0,0,0,.06);
  color: #333;
  cursor: pointer;
  flex: none;
}

.diary-hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: #333;
  cursor: pointer;
  margin-bottom: 8px;
}

.diary-panel-title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #333;
  margin-bottom: 10px;
}

.diary-panel[hidden] { display: none; }

.diary-tmpl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.diary-tmpl-card {
  aspect-ratio: 2/3;
  background: #fff;
  border-radius: 8px;
  display: flex;
  align-items: flex-end;
  padding: 5px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.1);
}

.diary-tmpl-card span {
  font-size: 8px;
  color: #888;
  line-height: 1.2;
}

/* Expanded menu */
.diary-tool-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 4px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  background: transparent;
  cursor: pointer;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.diary-sb-btns {
  display: flex;
  gap: 8px;
  padding-top: 10px;
}

.diary-btn {
  height: 30px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.diary-btn-save { background: var(--brand); color: #fff; }
.diary-btn-view { background: var(--brand); color: #fff; }

/* ---- Canvas ---- */
.diary-canvas {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  background: #e8e8e8;
  margin: 10px 10px 10px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
  transition: margin 0.3s ease;
}

.diary-pages {
  flex: 1;
  display: flex;
  flex-direction: row;
  background: #fff;
  overflow: hidden;
}

/* view 모드 오버레이 요소 - 기본 숨김 */
.diary-send-btn,
.diary-view-back,
.diary-pagination {
  display: none;
}

/* view 모드일 때 */
.diary-editor.view-mode .diary-sidebar {
  display: none;
}

.diary-editor.view-mode .diary-canvas {
  margin-left: 10px;
  border-radius: 12px;
}

.diary-editor.view-mode .diary-send-btn {
  display: block;
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
}

.diary-editor.view-mode .diary-view-back {
  display: block;
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
}

.diary-editor.view-mode .diary-pagination {
  display: flex;
  position: absolute;
  bottom: 10px;
  right: 12px;
  z-index: 2;
}

.diary-page {
  flex: 1;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.diary-page-r { background: #fafafa; }

.diary-page-sep {
  width: 1px;
  background: #eee;
  align-self: stretch;
}

.diary-photo-ph {
  width: 60px;
  height: 60px;
  background: #ddd;
  border-radius: 8px;
  flex: none;
}

.diary-memo-ph {
  font-size: 12px;
  color: #888;
}

.diary-send-btn {
  height: 30px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.diary-pagination {
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.diary-pg-label {
  font-size: 11px;
  color: #888;
  font-weight: 600;
  margin-right: 2px;
}

.diary-pg-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f0f0f0;
  color: #444;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
  cursor: pointer;
}
