/* Tablet and desktop layout. Phones (up to 760px) keep the single column with top bar and tab bar;
   from 761px the app gets a side navigation and a desktop top bar, and each screen spreads into columns.
   Three steps: icon-only navigation (761–980), compact navigation (981–1200) and full navigation (1201+). */

.sidebar, #deskbar, .trip-aside { display: none; }
.trip-list { display: grid; gap: 12px; }
.trip-teaser__cta { display: none; }

@media (max-width: 760px) {
  .wide-only { display: none !important; }
}

@media (min-width: 761px) {
  :root { --nav-w: 84px; --page-x: 28px; }
  .br-narrow { display: none; }
  .narrow-only { display: none !important; }

  /* Shell */
  .app { max-width: none; margin: 0; }
  .app-main { margin-left: var(--nav-w); min-height: 100dvh; }
  #top, #tabs { display: none; }
  #deskbar { display: block; }
  body[data-chrome="none"] .sidebar, body[data-chrome="none"] #deskbar { display: none; }
  body[data-chrome="none"] .app-main { margin-left: 0; }

  .sidebar {
    display: block;
    position: fixed; inset: 0 auto 0 0;
    width: var(--nav-w);
    background: var(--surface);
    border-right: 1px solid var(--line);
    z-index: 30;
  }
  .sidebar__inner { height: 100%; display: flex; flex-direction: column; align-items: center; padding: calc(var(--safe-top) + 20px) 14px calc(var(--safe-bottom) + 16px) max(14px, var(--safe-left)); overflow-y: auto; }
  .sidebar .brand { margin-bottom: 53px; min-width: var(--hit); justify-content: center; }
  .sidebar .brand__mark { width: 36px; height: 23px; }
  .sidebar .brand__name, .side-note, .side-user__text, .side-user > .icon:last-child { display: none; }
  .sidenav { display: flex; flex-direction: column; gap: 16px; }
  .sidenav__item { display: flex; align-items: center; gap: 14px; min-width: var(--hit); min-height: var(--hit); padding: 12px 14px; border-radius: 11px; color: var(--muted); font-size: 14px; font-weight: 500; transition: background .2s, color .2s; }
  .sidenav__item span { display: none; }
  .sidenav__item .icon { width: 23px; height: 23px; }
  .sidenav__item:hover { background: var(--green-50); color: var(--primary); }
  .sidenav__item[aria-current="page"] { background: var(--primary); color: var(--primary-ink); font-weight: 650; }
  .sidebar__foot { margin-top: auto; width: 100%; }
  .side-user { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 10px 1px; color: var(--ink); }

  .deskbar {
    min-height: 78px;
    height: auto;
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    padding: var(--safe-top) max(var(--page-x), var(--safe-right)) 0 max(var(--page-x), var(--safe-left));
    border-bottom: 1px solid var(--line);
    background: var(--bg);
  }
  .crumbs { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 12px; color: var(--muted); }
  .crumbs a { display: inline-flex; align-items: center; min-height: var(--hit); white-space: nowrap; }
  .crumbs a:hover { color: var(--ink); }
  .crumbs span { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .deskbar__tools { display: flex; align-items: center; gap: 20px; }
  .deskbar__date { display: none; font-size: 12px; color: var(--muted); white-space: nowrap; }
  .deskbar .icon-btn--ghost { width: var(--hit); height: var(--hit); border: 0; background: transparent; color: var(--ink); }

  .screen, .screen--bleed { max-width: 1480px; margin: 0 auto; padding: 31px max(var(--page-x), var(--safe-right)) calc(45px + var(--safe-bottom)) max(var(--page-x), var(--safe-left)); }
  body[data-chrome="none"] .screen { max-width: none; padding: 0; }
  .toast { bottom: 28px; }
  .chips--scroll { margin: 0; padding: 0; flex-wrap: wrap; }

  /* Headings */
  .page-head { padding-top: 0; margin-bottom: 26px; gap: 20px; }
  .page-head .display, .explore-hero .display { font-size: 38px; line-height: 1.12; letter-spacing: -.02em; }
  .page-head .lead, .explore-hero + .lead { font-size: 14px; margin-top: 10px; }
  .section { margin-top: 34px; }
  .section__head { align-items: center; margin-bottom: 20px; }
  .section__head .title { font-size: 26px; }
  .section__head .lead { font-size: 12px; }
  .section__head .link { font-size: 12px; color: var(--primary); }
  .empty { padding: 65px 25px; min-height: 260px; justify-content: center; }
  .empty .title { font-size: 25px; }
  .empty .lead { font-size: 13px; max-width: 340px; }

  /* Explore */
  .screen:has(.explore-hero) { display: grid; grid-template-columns: minmax(0, 1.95fr) minmax(240px, 1fr); column-gap: 22px; align-content: start; }
  .screen:has(.explore-hero) > * { grid-column: 1 / -1; }
  .explore-hero { padding-top: 0; }
  .explore-hero__add { display: inline-flex; align-items: center; width: auto; height: auto; min-height: 45px; padding: 0 22px; gap: 10px; margin-top: 4px; border-radius: 9px; font-size: 13px; font-weight: 600; }
  .explore-hero__add .icon { width: 17px; height: 17px; }
  .explore-search { margin: 26px 0 24px; }
  .explore-search > .input { min-height: 49px; font-size: 13px; }
  .screen > .hero-card { grid-column: 1; margin-top: 0; height: auto; min-height: 360px; }
  .screen > .trip-teaser { grid-column: 2; margin-top: 0; }
  .hero-slide__text { left: 28px; bottom: 64px; right: 120px; }
  .hero-slide__where { font-size: 11px; letter-spacing: .13em; }
  .hero-slide__title { font-size: 43px; letter-spacing: -.02em; }
  .hero-slide__desc { font-size: 12px; max-width: 380px; }
  .hero-card__badge { top: 22px; left: 22px; font-size: 11px; padding: 7px 10px; }
  .hero-card__next { top: 16px; right: 16px; width: var(--hit); height: var(--hit); }
  .hero-card__controls { left: 22px; bottom: 12px; }

  .trip-teaser { flex-direction: column; min-height: 0; border-radius: var(--radius-lg); }
  .trip-teaser > img { width: 100%; height: 130px; }
  .trip-teaser__body { display: flex; flex-direction: column; padding: 22px; }
  .trip-teaser__body .eyebrow { display: none; }
  .trip-teaser__body .title { font-size: 25px; margin-top: 0; }
  .trip-teaser__body .hint { font-size: 11px; line-height: 1.7; max-width: none; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
  .trip-teaser__go { display: none; }
  .trip-teaser__cta { display: inline-flex; width: 100%; margin-top: auto; min-height: 45px; gap: 10px; font-size: 13px; }
  .trip-teaser__body .hint + .trip-teaser__cta { margin-top: auto; }
  .trip-teaser__body { flex: 1; gap: 14px; }

  .trend-row { gap: 14px; }
  .trend-card { border-radius: 16px; }
  .trend-card img { height: auto; aspect-ratio: 1.5; }
  .trend-card__body { padding: 13px 14px 16px; }
  .trend-card .eyebrow { font-size: 10px; }
  .trend-card h3 { font-size: 18px; }

  .love-filter { margin-bottom: 22px; }
  .love-filter .chip { min-height: var(--hit); padding: 0 18px; font-size: 13px; }
  .love-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 21px; }
  .love-card { border-radius: 18px; }
  .love-card__media { height: auto; aspect-ratio: 4 / 5; }
  .love-card__media .tag { top: 12px; left: 12px; font-size: 9px; padding: 5px 9px; }
  .love-card__text { left: 17px; right: 17px; bottom: 18px; }
  .love-card__where { font-size: 10px; margin-bottom: 4px; }
  .love-card__text h3 { font-size: 25px; line-height: 1.1; }
  .love-card__desc { padding: 16px; font-size: 11px; line-height: 1.65; }

  /* Destinations: photo on top, text below */
  .dest-grid .love-card__media { aspect-ratio: 1.34; color: var(--ink); }
  .dest-grid .love-card__media::after { display: none; }
  .dest-grid .love-card__media img { height: auto; aspect-ratio: 1.34; }
  .dest-grid .love-card__text { position: static; padding: 14px 16px 0; }
  .dest-grid .love-card__where { color: var(--muted); }
  .dest-grid .love-card__text h3 { font-size: 21px; }
  .dest-grid .love-card__desc { padding-top: 8px; }

  /* Trips */
  .trip-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .trip-row { flex-direction: column; border-radius: 18px; }
  .trip-row > img { width: 100%; height: 190px; }
  .trip-row__body { padding: 20px 17px; }

  /* Saved */
  .saved-search-btn { width: var(--hit); height: var(--hit); }

  /* Place detail */
  body[data-screen="place"] .screen, body[data-screen="featured"] .screen { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; align-items: start; }
  .place-hero { position: sticky; top: 25px; height: 510px; border-radius: 20px; overflow: hidden; }
  .place-hero__back, .place-hero__save { top: 20px; }
  .place-hero__back { left: 20px; }
  .place-hero__save { right: 20px; }
  .place-body { padding: 6px 0 0; }
  .place-body .display { font-size: 34px; }

  /* Profile */
  .profile-layout { display: grid; grid-template-columns: 1fr 1.4fr; gap: 26px; align-items: start; }
  .profile-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; text-align: center; padding-bottom: 6px; }
  .profile-card .profile-cover { margin: 0; height: 150px; }
  .profile-card .profile-cover img { height: 150px; }
  .profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 18px 0 0; padding: 18px 10px 14px; border-top: 1px solid var(--line); }
  .profile-stats dt { font-family: var(--font-serif); font-size: 21px; font-weight: 700; color: var(--ink); }
  .profile-stats dd { margin: 4px 0 0; font-size: 10px; color: var(--muted); }
  .profile-side .profile-menu { margin-top: 0; padding: 0; }
  .profile-side .profile-foot { padding-left: 0; padding-right: 0; }
  body[data-screen="profile"] .screen { max-width: 920px; }
  body[data-screen^="profile-"] .screen { max-width: 920px; }
  body[data-screen^="profile-"] .screen > :not(.subpage-head) { max-width: 620px; margin-left: auto; margin-right: auto; }
  .subpage-head { margin: 0 0 29px; gap: 14px; }
  .subpage-head .icon-btn { width: var(--hit); height: var(--hit); border: 1px solid var(--line); background: var(--surface); border-radius: 50%; }
  .subpage-head .icon-btn .icon { width: 18px; height: 18px; }
  .subpage-head .display { font-size: 31px; }
  body[data-screen="legal"] .screen { max-width: 920px; }

  /* Wizard: progress across 1000px, content in a 680px column */
  .wizard { max-width: 1000px; margin: 0 auto; padding-top: 0; }
  .wizard .progress { margin: 0 0 34px; }
  .wizard > :not(.progress), .wizard > .wizard-form > * { max-width: 680px; margin-left: auto; margin-right: auto; }
  .wizard > .wizard-form { max-width: none; }
  .wizard__title { font-size: 34px; line-height: 1.08; }
  .wizard .lead { font-size: 13px; }

  /* Itinerary */
  .trip-back { margin-top: 0; }
  .trip-head .display { font-size: 31px; }
  .trip-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(220px, 1fr); gap: 22px; align-items: start; }
  .trip-aside { display: grid; gap: 18px; position: sticky; top: 25px; }
  .trip-overview { border: 1px solid var(--line); border-radius: 15px; padding: 18px; background: var(--surface); }
  .trip-overview .title { margin-bottom: 12px; }
  .trip-fact { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 11px; color: var(--ink); text-align: left; }
  .trip-fact .icon { color: var(--primary); }
  button.trip-fact:hover { color: var(--primary); }
  .trip-overview .btn { margin-top: 18px; }
  .trip-aside__map { height: 360px; margin: 0; }
  .trip-main .day-mode { display: none; }
  .trip-main .timeline[hidden] { display: block !important; }
  .trip-main .day-map { display: none; }

  /* Login: photo on the left, form on the right */
  .login { display: grid; grid-template-columns: 1.1fr 1fr; grid-template-rows: auto 1fr; min-height: 100dvh; background: var(--surface); }
  .login__bg { position: relative; grid-column: 1; grid-row: 1 / 3; height: 100%; min-height: 100dvh; object-position: center; }
  .login > .login__brand { grid-column: 1; grid-row: 1; padding-top: 100px; z-index: 1; }
  .login::before { content: ''; grid-column: 1; grid-row: 1 / 3; z-index: 0; position: relative; background: linear-gradient(180deg, rgba(255, 249, 235, .85) 0, rgba(255, 249, 235, .31) 35%, transparent 70%); pointer-events: none; }
  .login > .login__brand .brand__name { font-size: 40px; }
  .login > .login__brand .brand__mark { width: 42px; height: 26px; }
  .login > .login__brand p { font-size: 12px; margin-top: 16px; color: #11243a; }
  .login__panel { grid-column: 2; grid-row: 1 / 3; display: flex; flex-direction: column; justify-content: center; padding: 45px 30px; max-width: 420px; width: 100%; margin: 0 auto; }
  .login__welcome .brand { margin-bottom: 42px; }
  .login__welcome .brand__name { font-size: 28px; }
  .login__welcome .display { font-size: 32px; }
  .login__welcome .lead { font-size: 12px; line-height: 1.7; margin: 12px 0 27px; }
  .login__sheet { padding: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border-radius: 0; }
  .login__sheet .btn--lg, .login__sheet .btn--apple { min-height: 46px; }
}

@media (min-width: 981px) {
  :root { --nav-w: 200px; --page-x: 30px; }
  .sidebar__inner { align-items: stretch; padding: 32px 17px 22px; }
  .sidebar .brand { margin: 0 0 52px 6px; }
  .sidebar .brand__name { display: inline; font-size: 27px; }
  .sidebar .brand__mark { width: 29px; height: 19px; }
  .sidenav { gap: 9px; }
  .sidenav__item { padding: 13px 16px; }
  .sidenav__item span { display: inline; }
  .sidenav__item .icon { width: 20px; height: 20px; }
  .side-note { display: block; padding: 22px 15px; border-radius: 14px; background: var(--green-50); margin-bottom: 22px; }
  .side-note > .icon { color: var(--primary); margin-bottom: 11px; }
  .side-note__title { font-family: var(--font-serif); font-weight: 700; font-size: 18px; line-height: 1.3; color: var(--ink); margin-bottom: 8px; }
  .side-note__text { font-size: 11px; line-height: 1.65; color: var(--muted); }
  .side-user { justify-content: flex-start; }
  .side-user__text { display: block; min-width: 0; }
  .side-user__text strong { display: block; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .side-user__text small { display: block; margin-top: 1px; font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .side-user > .icon:last-child { display: block; margin-left: auto; color: var(--ink); }

  .deskbar { height: 90px; }
  .deskbar__date { display: inline; }
  .trip-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .place-hero { height: 540px; }
  .place-body .display { font-size: 32px; }
  .trip-grid { grid-template-columns: minmax(0, 1.5fr) minmax(230px, 1fr); }
  .login__panel { padding: 60px 45px; }
  .login > .login__brand { padding-top: 110px; }
}

@media (min-width: 1101px) {
  .love-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dest-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .trip-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1201px) {
  :root { --nav-w: 232px; --page-x: 44px; }
  .sidebar__inner { padding: 39px 25px 25px; }
  .sidebar .brand { margin: 0 9px 52px; }
  .sidebar .brand__name { font-size: 29px; }
  .sidebar .brand__mark { width: 32px; height: 20px; }
  .screen, .screen--bleed { padding: 39px var(--page-x) 60px; }
  .place-hero { height: 590px; }
  body[data-screen="place"] .screen, body[data-screen="featured"] .screen { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 37px; }
  .place-body .display { font-size: 39px; }
  .profile-layout { grid-template-columns: 1fr 1.45fr; gap: 32px; }
  .trip-grid { grid-template-columns: minmax(0, 1.6fr) minmax(250px, 1fr); gap: 32px; }
  .trip-overview { padding: 23px; }
  .trip-overview .title { font-size: 21px; margin-bottom: 18px; }
  .trip-fact { font-size: 12px; }
  .trip-head .display { font-size: 38px; }
}

@media (min-width: 1600px) {
  .screen > .hero-card { min-height: 395px; }
}
