/* Map-first workspace. Navigation stays in document flow, never at the browser edge. */
.travel-app {
  --ink: #203c35;
  --paper: #f7f8f5;
  --soft: #edf1ec;
  --line: #dfe6df;
  --muted: #596a61;
  --accent: #b8432c;
  --surface-shadow: 0 12px 40px #18392d18;
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
}
.travel-app h1,
.travel-app h2,
.travel-app h3 {
  font-weight: 650;
}
.travel-app button,
.travel-app .button {
  border-radius: 12px;
  font-weight: 550;
}
.travel-app button:active:not(:disabled),
.travel-app .button:active {
  transform: translateY(1px);
}
.travel-app button:disabled {
  opacity: 0.5;
}
.travel-app input,
.travel-app select,
.travel-app textarea {
  background: #fff;
  border-color: var(--line);
}
.travel-app input:focus,
.travel-app select:focus,
.travel-app textarea:focus {
  outline: 3px solid #b8432c30;
  outline-offset: 2px;
  border-color: var(--accent);
}
.travel-app header.site {
  background: white;
  padding: 8px 16px;
  gap: 6px;
}
.travel-app .brand-copy small {
  display: none;
}
.travel-app header.site nav {
  border-radius: 16px;
  background: var(--soft);
  gap: 2px;
}
.travel-app header.site nav a {
  font-size: 12px;
  padding: 8px 4px;
  min-width: 0;
}
.nav-icon {
  display: none;
  font-size: 24px;
  line-height: 1;
}
.travel-app .notice {
  background: #f0f3ed;
  font-size: 10px;
  padding: 4px 12px;
}
.travel-app .container {
  max-width: 1600px;
}
.travel-app .map-intro {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.travel-app .map-intro .eat-entry {
  display: none;
}
.travel-app[data-view='map'] .container,
.travel-app[data-view='place'] .container,
.travel-app[data-view='eat'] .container {
  padding: 8px;
  max-width: none;
}
.travel-app .map-workspace .map-panel {
  border-radius: 18px;
  border: 1px solid var(--line);
}
.travel-app .map-workspace #map {
  height: calc(100svh - 170px);
  min-height: 490px;
  max-height: none;
}
.travel-app .map-overlay-toolbar button {
  background: white;
  box-shadow: 0 4px 18px #18392d14;
}
.travel-app .map-group-dock {
  border-radius: 18px;
  box-shadow: var(--surface-shadow);
}
.travel-app .map-filter-panel,
.travel-app .map-suggestions {
  background: #fffffffa;
  box-shadow: var(--surface-shadow);
  border-color: var(--line);
}
.travel-app .place-card {
  border-width: 1px;
  border-color: var(--line);
  border-radius: 18px;
  box-shadow: 0 3px 14px #18392d08;
}
.travel-app .place-card.selected {
  border: 2px solid var(--accent);
}
.travel-app .place-card h3 {
  letter-spacing: -0.3px;
}
.travel-app .pin-popup .maplibregl-popup-content {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--surface-shadow);
}
.pin-card-cover {
  height: 86px;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 10px;
}
.pin-card-cover img,
.pin-card-cover .cover-glyph {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: grid;
  place-items: center;
}
.pin-card-cover .icon {
  width: 32px;
  height: 32px;
}
.pin-card .pin-dish {
  margin: 7px 0;
  font-size: 13px;
}
.pin-rating {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0;
}
.pin-card .actions {
  flex-wrap: nowrap;
}
.pin-card .actions button {
  font-size: 12px;
  padding: 10px;
}
.map-detail {
  position: absolute;
  top: 14px;
  left: 14px;
  bottom: 76px;
  width: 400px;
  max-width: calc(100% - 88px);
  z-index: 7;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: white;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--surface-shadow);
  padding: 18px;
  animation: detail-arrive 0.24s ease-out;
}
.map-detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.map-detail-heading .button {
  width: 44px;
  padding: 0;
  font-size: 22px;
  border: 0;
  background: var(--soft);
}
.map-detail .detail-page {
  display: block;
}
.map-detail .detail-cover {
  width: 100%;
  height: 210px;
  object-fit: cover;
  border-radius: 14px;
  background: #12241e;
}
.map-detail .detail-watch {
  width: 100%;
  margin: 8px 0 18px;
}
.map-detail .detail-copy {
  padding: 0;
}
.map-detail .detail-copy h1 {
  font-size: 26px;
  line-height: 1.25;
  margin: 12px 0;
  letter-spacing: -0.8px;
}
.map-detail .detail-copy h2,
.map-detail .detail-reviews h2 {
  font-size: 19px;
  margin-top: 24px;
}
.map-detail .detail-copy .description {
  font-size: 14px;
}
.map-detail .actions {
  flex-wrap: wrap;
}
.map-detail .actions > * {
  flex: 1 1 auto;
}
.map-detail .facts {
  display: block;
}
.map-detail .facts > div {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.map-detail .review-strip {
  margin-bottom: 12px;
}
.travel-app .card {
  border-radius: 20px;
  border-color: var(--line);
  box-shadow: 0 4px 24px #18392d06;
}
.travel-app dialog {
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 24px 90px #10221d40;
}
.travel-app dialog::backdrop {
  background: #122b2470;
  backdrop-filter: blur(4px);
}
#food-dialog {
  width: min(1080px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100svh - 144px);
  margin: 72px auto;
  padding: 20px;
  overflow-y: auto;
}
#food-dialog .dialog-heading {
  gap: 10px;
  position: sticky;
  top: -20px;
  z-index: 10;
  padding: 10px 0;
  background: var(--paper);
}
#food-dialog-title {
  font-size: 16px;
}
#food-dialog .food-game-heading {
  margin: 16px 0 24px;
}
#food-dialog .food-game-heading h1 {
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -1.5px;
}
#food-dialog .food-game-heading > a {
  display: none;
}
#food-dialog .food-game-layout {
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 18px;
}
#food-dialog .food-preferences {
  border-radius: 18px;
  padding: 20px;
}
#food-dialog .food-roulette {
  background: radial-gradient(circle at 50% 30%, #fff5df, #f0f3eb);
  border-radius: 22px;
}
#food-dialog .wheel-scene {
  max-width: 320px;
}
#food-dialog .wheel-label {
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-85px)
    rotate(calc(-1 * var(--angle)));
  font-size: 11px;
}
#food-dialog .food-nearby-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.travel-app[data-view='video'] .container {
  padding: 0;
}
.travel-app .immersive-video {
  max-width: none;
}
.travel-app .immersive-video .feed {
  border-radius: 0;
}
.travel-app .immersive-video .video-copy {
  background: white;
}
.travel-app .immersive-video .video-copy h2 {
  font-weight: 650;
  line-height: 1.22;
  letter-spacing: -1px;
}
.video-overlay {
  display: none;
}
.review-gallery {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 12px;
}
.review-gallery img {
  flex: 0 0 100%;
  width: 100%;
  object-fit: contain;
  max-height: 55svh;
  scroll-snap-align: start;
}
.review-menu {
  margin: 14px 0;
  border-block: 1px solid var(--line);
}
.feed-modes {
  display: flex;
  gap: 4px;
}
.feed-modes button {
  padding: 8px 12px;
  font-size: 12px;
}
.feed-modes button[aria-pressed='true'] {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
@keyframes detail-arrive {
  from {
    opacity: 0;
    translate: -12px 0;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}
/* Horizontal food draw: the centre card is the selection, side cards hint at motion. */
#food-dialog .slot-scene {
  --slot-width: 180px;
  width: 100%;
  max-width: none;
  height: 290px;
  aspect-ratio: auto;
  margin: 20px auto;
  overflow: hidden;
}
#food-dialog .slot-track {
  display: flex;
  gap: 12px;
  position: absolute;
  left: 50%;
  top: 38px;
  right: auto;
  bottom: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: none;
}
.slot-card {
  flex: 0 0 var(--slot-width);
  width: var(--slot-width);
  height: 220px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
  text-align: left;
  overflow: hidden;
}
.slot-card img,
.slot-card .cover-glyph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 116px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 12px;
}
.slot-card strong {
  display: block;
  font-size: 15px;
  line-height: 1.3;
}
.slot-card small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
}
.slot-selection {
  position: absolute;
  left: 50%;
  top: 34px;
  width: calc(var(--slot-width) + 8px);
  height: 228px;
  transform: translateX(-50%);
  border: 2px solid var(--accent);
  border-radius: 22px;
  pointer-events: none;
  box-shadow: 0 8px 24px #b8432c18;
}
.slot-pointer {
  color: var(--accent);
  font-size: 22px;
}
.slot-empty {
  margin: 80px 20px;
}
#food-dialog .slot-track.is-idle {
  animation: slot-hello 4s ease-in-out infinite;
}
@keyframes slot-hello {
  0%,
  100% {
    translate: -8px 0;
  }
  50% {
    translate: 8px 0;
  }
}
@media (min-width: 801px) {
  .travel-app {
    padding-left: 100px;
  }
  .travel-app header.site {
    position: absolute;
    top: 0;
    left: 0;
    width: 100px;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 22px 8px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    gap: 20px;
  }
  .travel-app header.site .brand {
    margin: 0;
    justify-content: center;
  }
  .travel-app header.site .brand-copy {
    display: none;
  }
  .travel-app header.site nav {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 8px;
    background: transparent;
    margin: 0;
    padding: 0;
  }
  .travel-app header.site nav a {
    flex-direction: column;
    gap: 8px;
    padding: 12px 4px;
    min-height: 74px;
    border-radius: 16px;
    font-size: 11px;
  }
  .travel-app header.site nav a:not([aria-current]):hover {
    background: var(--soft);
  }
  .nav-icon {
    display: block;
  }
  .travel-app header.site .menu-button {
    width: 100%;
    margin-top: 12px;
    flex-direction: column;
    font-size: 11px;
  }
  .travel-app .notice {
    text-align: left;
    padding: 9px 24px;
    font-size: 11px;
  }
  .travel-app[data-view='map'] .container,
  .travel-app[data-view='place'] .container,
  .travel-app[data-view='eat'] .container {
    padding: 12px;
  }
  .travel-app .map-workspace #map {
    height: calc(100svh - 88px);
    min-height: 560px;
  }
  .travel-app .map-workspace .map-panel {
    border-radius: 24px;
  }
  .travel-app .map-overlay-toolbar {
    top: 18px;
    left: 18px;
    right: 18px;
  }
  .travel-app .map-suggestions {
    width: 340px;
  }
  .travel-app .video-pages {
    grid-template-columns: minmax(300px, 1.15fr) minmax(300px, 1fr);
  }
  .travel-app .immersive-video .feed-step {
    right: calc(46.5% + 16px);
  }
  .travel-app .immersive-video .video-copy {
    padding: 36px clamp(24px, 4vw, 64px);
  }
}
@media (max-width: 800px) {
  #food-dialog .slot-scene {
    --slot-width: 150px;
  }
  .travel-app .brand {
    min-height: 44px;
  }
  .travel-app .logo {
    font-size: 30px;
  }
  .travel-app .brand-copy .eyebrow {
    font-size: 9px;
  }
  .travel-app header.site nav {
    grid-auto-columns: 1fr;
  }
  .travel-app .menu-button {
    min-height: 44px;
  }
  .travel-app .map-detail {
    top: 64px;
    left: 8px;
    right: 8px;
    bottom: 80px;
    width: auto;
    max-width: none;
    padding: 16px;
  }
  .travel-app[data-view='place'] .map-group-dock {
    visibility: hidden;
  }
  #food-dialog {
    padding: 16px;
    max-height: calc(100svh - 144px);
  }
  #food-dialog .food-game-layout {
    display: flex;
  }
  #food-dialog .food-game-heading p {
    max-width: 220px;
    line-height: 1.7;
  }
  #food-dialog .food-preferences {
    max-height: none;
  }
  #food-dialog .food-nearby-grid {
    grid-template-columns: 1fr;
  }
  #food-dialog .wheel-label {
    font-size: 10px;
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-75px)
      rotate(calc(-1 * var(--angle)));
  }
  .travel-app[data-view='video'] header.site,
  .travel-app[data-view='video'] .notice {
    display: none;
  }
  .travel-app .immersive-video .feed-scope {
    height: auto;
    min-height: 52px;
    flex-wrap: wrap;
    background: #14281f;
    color: white;
    gap: 4px;
    padding: 0 8px;
  }
  .travel-app .immersive-video .feed-scope > span {
    display: none;
  }
  .travel-app .immersive-video .feed-scope .button,
  .travel-app .feed-modes button {
    background: transparent;
    color: white;
    border-color: #ffffff35;
    padding: 8px 10px;
  }
  .travel-app .feed-modes button[aria-pressed='true'] {
    background: white;
    color: var(--ink);
  }
  .video-overlay {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 72px;
    padding: 40px 18px 16px;
    color: white;
    background: linear-gradient(transparent, #081b13d9);
    pointer-events: none;
  }
  .video-overlay > * {
    pointer-events: auto;
  }
  .video-overlay h3 {
    font-size: 22px;
    line-height: 1.3;
    margin-bottom: 6px;
    max-width: calc(100% - 76px);
    text-shadow: 0 1px 8px #0005;
  }
  .video-overlay p {
    color: #fff;
    font-size: 13px;
    margin: 0 0 8px;
    max-width: calc(100% - 76px);
  }
  .video-overlay .actions {
    position: absolute;
    right: 14px;
    bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 62px;
  }
  .video-overlay .actions button {
    width: 62px;
    min-height: 66px;
    padding: 8px 4px;
    font-size: 0;
    flex-direction: column;
    gap: 2px;
  }
  .video-overlay .actions button::before {
    content: '♡';
    font-size: 25px;
  }
  .video-overlay .actions button::after {
    content: 'Lưu';
    font-size: 10px;
  }
  .video-overlay .actions button.primary::before {
    content: '+';
  }
  .video-overlay .actions button.primary::after {
    content: 'Chuyến đi';
  }
  .video-overlay .actions button[aria-pressed='true']::before {
    content: '♥';
  }
  .video-overlay .actions button.primary[aria-pressed='true']::before {
    content: '✓';
  }
  .video-overlay .actions button,
  .video-overlay .button {
    background: #14281fb8;
    border-color: #ffffff60;
    color: white;
    font-size: 12px;
  }
  .video-overlay .actions .primary {
    background: white;
    color: #203c35;
    border-color: white;
  }
  .video-overlay .actions button {
    font-size: 0;
  }
  .travel-app .immersive-video .video-copy {
    padding-top: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #food-dialog .slot-track.is-idle {
    animation: none;
  }
  .map-detail {
    animation: none;
  }
  .travel-app button:active,
  .travel-app .button:active {
    transform: none;
  }
}
