/* ============================================================
   Dolomites 2026 — "Enrosadira"
   Named for the Ladin word describing the moment pale dolomite
   limestone turns rose and amber at sunrise and sunset.
   Palette: limestone, alpenglow, glacier turquoise, dusk blue, pine.

   Written with CSS logical properties throughout so the single
   stylesheet serves both Hebrew (RTL) and English (LTR).
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --bg:          #FAF6F0;
  --bg-tint:     #F3EBE0;
  --surface:     #FFFFFF;
  --surface-2:   #F7F1E8;
  --line:        #E4D8C7;
  --line-soft:   #EFE7DA;

  --ink:         #1F2A35;
  --ink-2:       #5A6976;
  --ink-3:       #8B98A3;

  --rose:        #D2694F;   /* alpenglow */
  --rose-deep:   #AE4E38;
  --rose-wash:   #FBEDE6;
  --glacier:     #2F9C93;   /* lake turquoise */
  --glacier-wash:#E4F3F1;
  --pine:        #33503E;
  --gold:        #B98639;

  --shadow-sm: 0 1px 2px rgba(31, 42, 53, .06), 0 1px 3px rgba(31, 42, 53, .05);
  --shadow:    0 4px 12px rgba(31, 42, 53, .07), 0 1px 3px rgba(31, 42, 53, .05);
  --shadow-lg: 0 12px 32px rgba(31, 42, 53, .13), 0 3px 8px rgba(31, 42, 53, .07);

  --r-sm: 8px;
  --r:    14px;
  --r-lg: 20px;
  --r-xl: 26px;

  --font-display: 'Frank Ruhl Libre', 'Times New Roman', Georgia, serif;
  --font-ui: 'Assistant', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --nav-h: 62px;
  --maxw: 720px;
}

:root[data-theme='dark'] {
  --bg:          #0F151B;
  --bg-tint:     #151E27;
  --surface:     #18222C;
  --surface-2:   #1F2B37;
  --line:        #2C3A48;
  --line-soft:   #243040;

  --ink:         #E9EFF5;
  --ink-2:       #9FAEBC;
  --ink-3:       #6E7E8D;

  --rose:        #E8836A;
  --rose-deep:   #F0A288;
  --rose-wash:   #2A1F1D;
  --glacier:     #4FBDB1;
  --glacier-wash:#14282A;
  --pine:        #6E9B7C;
  --gold:        #D2A55E;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow:    0 4px 14px rgba(0, 0, 0, .45);
  --shadow-lg: 0 14px 36px rgba(0, 0, 0, .55);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0F151B; --bg-tint: #151E27; --surface: #18222C; --surface-2: #1F2B37;
    --line: #2C3A48; --line-soft: #243040;
    --ink: #E9EFF5; --ink-2: #9FAEBC; --ink-3: #6E7E8D;
    --rose: #E8836A; --rose-deep: #F0A288; --rose-wash: #2A1F1D;
    --glacier: #4FBDB1; --glacier-wash: #14282A; --pine: #6E9B7C; --gold: #D2A55E;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow: 0 4px 14px rgba(0,0,0,.45);
    --shadow-lg: 0 14px 36px rgba(0,0,0,.55);
  }
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  padding-block-end: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: var(--rose-deep); text-decoration: none; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.25; margin: 0; }

::selection { background: var(--rose); color: #fff; }

:focus-visible { outline: 2px solid var(--glacier); outline-offset: 2px; border-radius: 4px; }

/* ---------- layout ---------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: 18px; }
.view { display: none; animation: rise .32s cubic-bezier(.2, .7, .3, 1); }
.view.active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.section { margin-block: 30px; }
.section-title {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); margin-block-end: 12px;
}
[lang='he'] .section-title { letter-spacing: .06em; }

/* ---------- masthead ---------- */
.masthead {
  position: relative; overflow: hidden;
  background: linear-gradient(165deg, #22303F 0%, #4A3F49 48%, #8A5A4C 100%);
  color: #FBF3EA;
  padding-block: 26px 30px;
  border-end-start-radius: var(--r-xl); border-end-end-radius: var(--r-xl);
}
.masthead::after {
  content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 55%;
  background: linear-gradient(to top, rgba(210, 105, 79, .34), transparent);
  pointer-events: none;
}
.masthead > * { position: relative; z-index: 1; }

.brandline { display: flex; align-items: center; gap: 13px; }
.brandline img { width: 46px; height: 46px; flex: none; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.brandline .bt { min-width: 0; }
.brandline .app-name {
  font-family: var(--font-display); font-size: 21px; font-weight: 700;
  line-height: 1.15; letter-spacing: .01em;
}
.brandline .app-sub {
  font-size: 12.5px; color: #E7C6B4; margin-block-start: 2px;
  letter-spacing: .05em; text-transform: uppercase; font-weight: 600;
}
[lang='he'] .brandline .app-sub { letter-spacing: 0; text-transform: none; font-size: 13px; }

.masthead-tag {
  font-family: var(--font-display); font-size: 15.5px; line-height: 1.45;
  color: #F6DCCB; margin-block-start: 16px; max-width: 30ch;
}
.masthead-meta {
  display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 16px;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, .13); color: #FBF3EA;
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(4px);
}
.chip.count { background: var(--rose); border-color: transparent; color: #fff; }

/* ---------- cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-pad { padding: 16px 17px; }

.day-card {
  display: block; width: 100%; text-align: start;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  overflow: hidden; margin-block-end: 14px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.day-card:active { transform: scale(.988); }
@media (hover: hover) { .day-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); } }

.day-card .ph { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); }
.day-card .ph img { width: 100%; height: 100%; object-fit: cover; }
.day-card .ph::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20, 28, 36, .72) 4%, rgba(20, 28, 36, .12) 44%, transparent 72%);
}
.day-card .ph .lbl {
  position: absolute; inset-block-end: 12px; inset-inline-start: 14px; inset-inline-end: 14px;
  z-index: 1; color: #fff;
}
.day-card .ph .daynum {
  font-family: var(--font-display); font-size: 11.5px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: #F3C4AE;
  text-shadow: 0 1px 4px rgba(0,0,0,.6);
}
[lang='he'] .day-card .ph .daynum { letter-spacing: .02em; text-transform: none; font-size: 13px; }
.day-card .ph h3 {
  font-size: 19px; color: #fff; margin-block-start: 2px;
  text-shadow: 0 1px 8px rgba(0,0,0,.55);
}

.stats { display: flex; gap: 0; border-block-start: 1px solid var(--line-soft); }
.stats .s { flex: 1; padding: 11px 8px; text-align: center; }
.stats .s + .s { border-inline-start: 1px solid var(--line-soft); }
.stats .s .k {
  font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3);
}
[lang='he'] .stats .s .k { letter-spacing: 0; text-transform: none; font-size: 11.5px; }
.stats .s .v { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--ink); }
.stats .s .v small { font-size: 11px; font-weight: 400; color: var(--ink-3); }

.badge {
  display: inline-block; font-size: 11.5px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
}
.badge.hike     { background: var(--glacier-wash); color: var(--glacier); }
.badge.drive    { background: var(--surface-2); color: var(--ink-2); }
.badge.transfer { background: var(--rose-wash); color: var(--rose-deep); }

/* ---------- day detail ---------- */
.hero { position: relative; margin-inline: -18px; }
.hero img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg) 1%, rgba(0,0,0,.25) 40%, rgba(0,0,0,.3) 100%);
}
.hero .cap {
  position: absolute; inset-block-end: 16px; inset-inline: 18px; z-index: 1; color: #fff;
}
.hero .cap h2 { font-size: 25px; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.hero .cap .sub {
  font-size: 12px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
  color: #F3C4AE; text-shadow: 0 1px 5px rgba(0,0,0,.7);
}
[lang='he'] .hero .cap .sub { letter-spacing: .02em; text-transform: none; font-size: 13.5px; }

.detail-block { margin-block: 22px; }
.detail-block h4 {
  font-family: var(--font-ui); font-size: 11.5px; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase; color: var(--rose);
  margin: 0 0 6px;
}
[lang='he'] .detail-block h4 { letter-spacing: .02em; text-transform: none; font-size: 13.5px; }
.detail-block p { margin: 0; color: var(--ink-2); }

.gallery-strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: 74%;
  gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin-inline: -18px; padding-inline: 18px; padding-block-end: 4px;
  scrollbar-width: none;
}
.gallery-strip::-webkit-scrollbar { display: none; }
.gallery-strip figure { margin: 0; scroll-snap-align: center; }
.gallery-strip img {
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: var(--r); box-shadow: var(--shadow-sm);
}
.gallery-strip figcaption { font-size: 12px; color: var(--ink-3); margin-block-start: 6px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 17px; border-radius: var(--r); font-weight: 700; font-size: 14.5px;
  background: var(--surface-2); color: var(--ink); border: 1px solid var(--line);
  transition: transform .14s ease, filter .14s ease;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--rose); color: #fff; border-color: transparent; box-shadow: var(--shadow-sm); }
.btn.glacier { background: var(--glacier); color: #fff; border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.full { width: 100%; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: var(--r-sm); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-row { display: flex; gap: 9px; flex-wrap: wrap; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-row > .btn { flex: 1 1 auto; }

/* ---------- bottom nav ---------- */
.tabbar {
  position: fixed; inset-block-end: 0; inset-inline: 0; z-index: 60;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(16px) saturate(1.5);
  border-block-start: 1px solid var(--line-soft);
  padding-block-end: env(safe-area-inset-bottom, 0px);
}
.tabbar button {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding-block: 9px 7px; color: var(--ink-3); font-size: 10.5px; font-weight: 700;
  transition: color .16s ease;
}
[lang='he'] .tabbar button { font-size: 11.5px; }
.tabbar button svg { width: 22px; height: 22px; stroke-width: 1.7; }
.tabbar button.on { color: var(--rose); }
.tabbar button.on svg { stroke-width: 2.2; }

/* ---------- album ---------- */
.dayscroll {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin-inline: -18px; padding: 2px 18px 10px;
}
.dayscroll::-webkit-scrollbar { display: none; }
.daypill {
  flex: none; padding: 8px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 700;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2);
  white-space: nowrap;
}
.daypill.on { background: var(--rose); color: #fff; border-color: transparent; }
.daypill .d { font-size: 11px; opacity: .8; display: block; font-weight: 600; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.tile {
  position: relative; aspect-ratio: 1; border-radius: var(--r); overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line-soft);
}
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; }
.tile .meta {
  position: absolute; inset-block-end: 0; inset-inline: 0; padding: 16px 9px 7px;
  background: linear-gradient(to top, rgba(15,21,27,.8), transparent);
  color: #fff; font-size: 11.5px; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
}
.tile .vbadge {
  position: absolute; inset-block-start: 7px; inset-inline-end: 7px;
  background: rgba(15,21,27,.65); border-radius: 6px; padding: 2px 6px;
  color: #fff; font-size: 11px; font-weight: 700;
}
.tile.pending { opacity: .6; }

.empty {
  text-align: center; padding: 40px 20px; color: var(--ink-3);
  border: 1.5px dashed var(--line); border-radius: var(--r-lg);
}
.empty .big { font-size: 30px; margin-block-end: 8px; }

.comment {
  display: flex; gap: 10px; padding-block: 11px;
  border-block-start: 1px solid var(--line-soft);
}
.comment:first-child { border-block-start: 0; }
.avatar {
  width: 32px; height: 32px; flex: none; border-radius: 50%;
  background: var(--rose-wash); color: var(--rose-deep);
  display: grid; place-items: center; font-weight: 800; font-size: 13px;
}
.comment .who { font-weight: 700; font-size: 13.5px; }
.comment .when { font-size: 11.5px; color: var(--ink-3); }
.comment .txt { font-size: 14.5px; color: var(--ink-2); margin-block-start: 2px; }

.composer { display: flex; gap: 8px; margin-block-start: 12px; }
.composer input {
  flex: 1; padding: 11px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink);
}
.composer input::placeholder { color: var(--ink-3); }

/* ---------- forms ---------- */
.field { margin-block-end: 13px; }
.field label {
  display: block; font-size: 12px; font-weight: 700; color: var(--ink-2);
  margin-block-end: 5px; letter-spacing: .03em;
}
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 13px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink);
}
.field textarea { min-height: 76px; resize: vertical; }
.field .hint { font-size: 12px; color: var(--ink-3); margin-block-start: 4px; }

/* ---------- lodging ---------- */
.stay-card { margin-block-end: 14px; }
.stay-card .top { display: flex; gap: 13px; padding: 14px; }
.stay-card .thumb {
  width: 82px; height: 82px; flex: none; border-radius: var(--r-sm);
  object-fit: cover; background: var(--surface-2); border: 1px solid var(--line-soft);
}
.stay-card .thumb.ph { display: grid; place-items: center; font-size: 26px; color: var(--ink-3); }
.stay-card h3 { font-size: 17px; }
.stay-card .addr { font-size: 13px; color: var(--ink-3); margin-block-start: 2px; }
.stay-card .price {
  font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--rose-deep);
  margin-block-start: 6px;
}
.stay-card .price small { font-family: var(--font-ui); font-size: 12px; font-weight: 600; color: var(--ink-3); }
.stay-card.is-chosen { border-color: var(--rose); box-shadow: 0 0 0 2px var(--rose-wash), var(--shadow-sm); }
.src-tag {
  font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 5px; background: var(--surface-2); color: var(--ink-2);
}
.src-tag.booking { background: #E8F0FE; color: #1A4FA0; }
.src-tag.airbnb  { background: #FDEAEE; color: #C4344F; }
:root[data-theme='dark'] .src-tag.booking { background: #16263F; color: #8FB6F0; }
:root[data-theme='dark'] .src-tag.airbnb  { background: #331A20; color: #F0899C; }

/* ---------- sheet / modal ---------- */
.sheet-back {
  position: fixed; inset: 0; z-index: 90; background: rgba(15, 21, 27, .5);
  backdrop-filter: blur(3px); display: none;
}
.sheet-back.open { display: block; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.sheet {
  position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 91;
  background: var(--surface); border-start-start-radius: var(--r-xl); border-start-end-radius: var(--r-xl);
  max-height: 88vh; overflow-y: auto;
  padding: 8px 18px calc(24px + env(safe-area-inset-bottom, 0px));
  box-shadow: var(--shadow-lg);
  transform: translateY(100%); transition: transform .3s cubic-bezier(.2, .8, .3, 1);
  max-width: var(--maxw); margin-inline: auto;
}
.sheet.open { transform: none; }
.sheet .handle {
  width: 38px; height: 4px; border-radius: 99px; background: var(--line);
  margin: 8px auto 14px;
}
.sheet h3 { font-size: 20px; margin-block-end: 14px; }

.lightbox {
  position: fixed; inset: 0; z-index: 95; background: rgba(8, 12, 16, .95);
  display: none; place-items: center;
}
.lightbox.open { display: grid; }
.lightbox img, .lightbox video { max-width: 100%; max-height: 82vh; object-fit: contain; }
.lightbox .x {
  position: absolute; inset-block-start: calc(12px + env(safe-area-inset-top, 0px));
  inset-inline-end: 14px; color: #fff; font-size: 30px; line-height: 1;
  width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.14);
}

/* ---------- rows ---------- */
.rows { border: 1px solid var(--line-soft); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 14px 16px; text-align: start; color: var(--ink); font-size: 15px;
}
.row + .row { border-block-start: 1px solid var(--line-soft); }
.row .val { margin-inline-start: auto; color: var(--ink-3); font-size: 14px; font-weight: 600; }
.row .chev { margin-inline-start: auto; color: var(--ink-3); }
[dir='rtl'] .row .chev { transform: scaleX(-1); }

.seg { display: flex; background: var(--surface-2); border-radius: var(--r-sm); padding: 3px; gap: 3px; }
.seg button {
  flex: 1; padding: 7px 10px; border-radius: 6px; font-size: 13.5px; font-weight: 700;
  color: var(--ink-2);
}
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

/* ---------- tracker ---------- */
.tracker-face {
  text-align: center; padding: 26px 18px;
  background: linear-gradient(160deg, var(--glacier-wash), var(--surface));
  border-radius: var(--r-lg); border: 1px solid var(--line-soft);
}
.tracker-face .big {
  font-family: var(--font-display); font-size: 52px; font-weight: 700;
  line-height: 1; color: var(--glacier); font-variant-numeric: tabular-nums;
}
.tracker-face .unit { font-size: 15px; color: var(--ink-3); font-weight: 700; }
.tracker-sub { display: flex; justify-content: center; gap: 26px; margin-block-start: 16px; }
.tracker-sub .k { font-size: 11px; color: var(--ink-3); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
[lang='he'] .tracker-sub .k { text-transform: none; letter-spacing: 0; font-size: 12px; }
.tracker-sub .v { font-family: var(--font-display); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }

.pulse { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--rose); }
.pulse.live { animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.75); } }

/* ---------- misc ---------- */
.note {
  font-size: 13px; color: var(--ink-2); background: var(--surface-2);
  border-inline-start: 3px solid var(--rose); padding: 11px 14px;
  border-radius: 0 var(--r-sm) var(--r-sm) 0; margin-block: 14px;
}
[dir='rtl'] .note { border-radius: var(--r-sm) 0 0 var(--r-sm); }

.toast {
  position: fixed; inset-block-end: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom, 0px));
  inset-inline: 0; margin-inline: auto; width: max-content; max-width: 82vw; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 11px 19px; border-radius: 999px;
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(14px); transition: all .26s ease; pointer-events: none;
}
.toast.show { opacity: 1; transform: none; }

.banner {
  display: flex; align-items: center; gap: 9px;
  background: var(--rose-wash); color: var(--rose-deep);
  padding: 9px 16px; font-size: 13px; font-weight: 600;
}

.credits-list { font-size: 12.5px; color: var(--ink-3); line-height: 1.75; }
.credits-list b { color: var(--ink-2); font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
