/* Prima Life Makadi – resort map. Brand: navy + orange on cream (from the logo and the guest guide). */

:root {
  --navy: #1c2c68;
  --navy-2: #243c84;
  --royal: #1c3c80;
  --ink: #182034;
  --ink-2: #3c4460;
  --muted: #7c808b;
  --cream: #faf5ee;
  --cream-2: #f3ece1;
  --line: #ebe4d9;
  --line-2: #f2ede5;
  --white: #fff;
  --orange: #eb5f31;
  --orange-soft: #fdece5;
  --green: #1f8a5b;
  --green-2: #25b36f;
  --green-soft: #e4f4ec;
  --red: #dc3124;
  --red-soft: #fbe9e6;
  --amber: #b8601c;
  --amber-soft: #fbefe3;
  --purple: #7a3ea0;
  --teal: #2e7ea6;
  --star: #e0a428;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow-card: 0 1px 2px rgba(24, 32, 52, 0.04), 0 8px 24px rgba(24, 32, 52, 0.06);
  --shadow-float: 0 2px 6px rgba(24, 32, 52, 0.08), 0 12px 32px rgba(24, 32, 52, 0.16);
  --shadow-pop: 0 10px 40px rgba(24, 32, 52, 0.22);
  --font: 'Manrope', 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Fraunces', 'Lora', 'IBM Plex Sans Arabic', Georgia, serif;
  --panel-w: 420px;
  --sheet-h: 0px;
  --topbar-h: 190px;
  color-scheme: light;
}

:lang(ar) {
  --font: 'IBM Plex Sans Arabic', 'Manrope', system-ui, sans-serif;
  --serif: 'IBM Plex Sans Arabic', system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  font: 500 14.5px/1.5 var(--font);
  color: var(--ink);
  background: var(--cream);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2.5px solid var(--orange);
  outline-offset: 2px;
}

.i {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[dir='rtl'] .i.flip,
[dir='rtl'] .i.chev {
  transform: scaleX(-1);
}

.app {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

/* ---- map ------------------------------------------------------------------------------- */

.map {
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-start: var(--panel-w);
  inset-inline-end: 0;
  transition: inset-inline-start 0.25s ease;
}

.app.collapsed .map {
  inset-inline-start: 0;
}

.mapview {
  overflow: hidden;
  background: #1a2a38;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  outline: none;
}

.mapview.dragging-map {
  cursor: grabbing;
}

.mapview.adding,
.mapview.adding .pin-dot {
  cursor: crosshair;
}

.mv-backdrop {
  position: absolute;
  inset: -80px;
  background-position: center;
  background-size: cover;
  filter: blur(48px) saturate(1.2) brightness(0.55);
  pointer-events: none;
}

.mv-img {
  position: absolute;
  left: 0;
  top: 0;
  max-width: none;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 14px 50px rgba(0, 0, 0, 0.5);
}

.mv-layer {
  direction: ltr;
  --d: 25px;
  --ds: 36px;
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.pin {
  --g: calc(var(--d) / 2 + 4px);
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  pointer-events: none;
  outline: none;
}

.pin-dot {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--d);
  height: var(--d);
  margin: calc(var(--d) / -2) 0 0 calc(var(--d) / -2);
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--c);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.2s ease;
}

.pin-dot .i {
  width: calc(var(--d) * 0.56);
  height: calc(var(--d) * 0.56);
  stroke-width: 2.3;
}

.pin-dot::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
}

.pin:hover .pin-dot {
  transform: scale(1.12);
}

.pin:focus-visible .pin-dot {
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--orange);
}

/* selected: a teardrop whose tip sits on the place */
.pin.sel {
  z-index: 3;
}

.pin.sel .pin-dot {
  width: var(--ds);
  height: var(--ds);
  margin: calc(var(--ds) * -1.207) 0 0 calc(var(--ds) / -2);
  border-width: 3px;
  border-radius: 50% 50% 50% 3px;
  transform: rotate(-45deg);
  box-shadow: -2px 3px 10px rgba(0, 0, 0, 0.45);
  animation: drop 0.28s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.pin.sel .pin-dot .i {
  width: calc(var(--ds) * 0.52);
  height: calc(var(--ds) * 0.52);
  transform: rotate(45deg);
}

.pin.sel::after {
  content: '';
  position: absolute;
  left: -4px;
  top: -2px;
  width: 8px;
  height: 4px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
}

@keyframes drop {
  from {
    transform: rotate(-45deg) translate(6px, -6px) scale(0.6);
    opacity: 0.4;
  }
}

.pin.dim .pin-dot {
  opacity: 0.35;
  transform: scale(0.78);
}

.pin-label {
  position: absolute;
  left: 0;
  top: 0;
  height: 22px;
  padding: 0 9px;
  transform: translate(var(--g), -11px);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--navy);
  font: 700 12px/22px var(--font);
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
  pointer-events: auto;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.pin[data-side='l'] .pin-label {
  transform: translate(calc(-100% - var(--g)), -11px);
}

.pin[data-side='b'] .pin-label {
  transform: translate(-50%, calc(var(--g) - 2px));
}

.pin[data-side='t'] .pin-label {
  transform: translate(-50%, calc(-100% - var(--g) + 2px));
}

.pin.sel .pin-label {
  --g: calc(var(--ds) * 0.62 + 4px);
  top: calc(var(--ds) * -0.707);
  height: 26px;
  border-radius: 13px;
  background: var(--navy);
  color: #fff;
  font-size: 13.5px;
  line-height: 26px;
  transform: translate(var(--g), -13px);
}

.pin.sel[data-side='l'] .pin-label {
  transform: translate(calc(-100% - var(--g)), -13px);
}

.pin.sel[data-side='b'] .pin-label,
.pin.sel[data-side='t'] .pin-label {
  transform: translate(calc(var(--ds) * 0.62 + 4px), -13px);
}

.pin.nolabel .pin-label {
  opacity: 0;
  visibility: hidden;
}

.pin.nolabel:hover .pin-label {
  opacity: 1;
  visibility: visible;
  z-index: 3;
}

.pin.dim .pin-label {
  display: none;
}

.mapview.editing .pin-dot {
  cursor: grab;
}

.pin.dragging .pin-dot {
  cursor: grabbing;
  transform: scale(1.4);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.pin.sel.dragging .pin-dot {
  transform: rotate(-45deg) scale(1.1);
}

/* ---- panel (desktop side panel) ---------------------------------------------------------- */

.panel {
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-start: 0;
  z-index: 10;
  width: var(--panel-w);
  display: flex;
  flex-direction: column;
  background: var(--cream);
  box-shadow: 0 0 30px rgba(24, 32, 52, 0.14);
  transition: transform 0.25s ease;
}

.app.collapsed .panel {
  transform: translateX(-100%);
}

[dir='rtl'] .app.collapsed .panel {
  transform: translateX(100%);
}

.panel-grip {
  display: none;
}

.panel-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-top: var(--topbar-h);
  scrollbar-width: thin;
  scrollbar-color: #d9d0c2 transparent;
}

.panel-body {
  padding: 4px 16px 28px;
}

.panel-toggle {
  position: absolute;
  z-index: 9;
  inset-inline-start: var(--panel-w);
  top: 50%;
  width: 26px;
  height: 56px;
  margin-top: -28px;
  display: grid;
  place-items: center;
  border: 0;
  border-start-end-radius: 12px;
  border-end-end-radius: 12px;
  background: var(--cream);
  color: var(--navy);
  box-shadow: 4px 0 10px rgba(24, 32, 52, 0.12);
  transition: inset-inline-start 0.25s ease;
}

.panel-toggle .i {
  transition: transform 0.25s ease;
}

.app.collapsed .panel-toggle {
  inset-inline-start: 0;
}

.app.collapsed .panel-toggle .i {
  transform: rotate(180deg);
}

[dir='rtl'] .panel-toggle .i {
  transform: scaleX(-1);
}

[dir='rtl'] .app.collapsed .panel-toggle .i {
  transform: scaleX(-1) rotate(180deg);
}

/* ---- top bar: logo, languages, search, chips --------------------------------------------- */

.topbar {
  position: absolute;
  z-index: 12;
  top: 0;
  inset-inline-start: 0;
  width: var(--panel-w);
  padding: 14px 16px 8px;
  background: linear-gradient(var(--cream) 88%, rgba(250, 245, 238, 0));
}

.app.collapsed .topbar {
  background: transparent;
  pointer-events: none;
}

.app.collapsed .topbar > * {
  pointer-events: auto;
}

.brandbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.logo-card {
  display: block;
  padding: 7px 12px;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.logo-card img {
  display: block;
  height: 38px;
  width: auto;
}

.langs {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.langs-ic {
  width: 18px;
  height: 18px;
  margin: 0 4px 0 6px;
  color: var(--orange);
}

.lang {
  min-width: 36px;
  height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.lang:hover {
  background: var(--cream-2);
}

.lang.on {
  background: var(--navy);
  color: #fff;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 50px;
  padding: 0 5px;
  border-radius: 25px;
  background: #fff;
  box-shadow: var(--shadow-float);
}

.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 4px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 15px;
  font-weight: 500;
}

.search input::placeholder {
  color: var(--muted);
}

.search input::-webkit-search-cancel-button {
  display: none;
}

.search-ic {
  display: grid;
  padding: 0 12px 0 6px;
  color: var(--navy);
}

.lang-btn {
  display: none;
  align-items: center;
  gap: 5px;
  height: 38px;
  margin-inline-end: 1px;
  padding: 0 11px 0 9px;
  border: 0;
  border-radius: 19px;
  background: var(--cream-2);
  color: var(--navy);
  font-size: 12.5px;
  font-weight: 800;
}

.lang-btn .i {
  width: 17px;
  height: 17px;
  color: var(--orange);
}

.chips {
  display: flex;
  gap: 8px;
  padding: 12px 1px 6px;
  overflow-x: auto;
  scrollbar-width: none;
  mask-image: linear-gradient(90deg, #000 90%, transparent);
}

[dir='rtl'] .chips {
  mask-image: linear-gradient(270deg, #000 90%, transparent);
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 15px 0 12px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: #fff;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.chip .i {
  width: 17px;
  height: 17px;
  color: var(--c);
}

.chip:hover {
  border-color: #d8cfc1;
}

.chip.on {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.chip.on .i {
  color: #fff;
}

.icon-btn {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--navy);
}

.icon-btn:hover {
  background: var(--cream-2);
}

.icon-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.icon-btn.sm {
  width: 32px;
  height: 32px;
}

.icon-btn.sm .i {
  width: 18px;
  height: 18px;
}

/* ---- buttons, inputs --------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
}

.btn:hover {
  border-color: #d8cfc1;
  background: #fffdf9;
}

.btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.btn.sm {
  height: 34px;
  gap: 6px;
  padding: 0 13px;
  font-size: 13px;
}

.btn.sm .i {
  width: 17px;
  height: 17px;
}

.btn.ghost {
  border-style: dashed;
  background: transparent;
}

.btn.primary {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.btn.primary:hover {
  background: var(--navy-2);
}

.btn.danger {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.btn.danger-outline {
  border-color: #f0c4be;
  color: var(--red);
}

.btn.danger-outline:hover {
  background: var(--red-soft);
}

.input {
  width: 100%;
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font-weight: 500;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input::placeholder {
  color: #aaa59c;
}

.input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(28, 44, 104, 0.14);
}

textarea.input {
  min-height: 96px;
  line-height: 1.55;
  resize: vertical;
}

select.input {
  appearance: none;
  padding-inline-end: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231c2c68' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 18px;
}

[dir='rtl'] select.input {
  background-position: left 12px center;
}

input[type='time'].input {
  padding: 9px 8px;
}

/* ---- shared pieces ----------------------------------------------------------------------- */

.card {
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-card);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--orange);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

:lang(ar) .eyebrow {
  letter-spacing: 0;
  font-size: 13px;
}

.eyebrow .i {
  width: 15px;
  height: 15px;
}

.ic-badge {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--c);
  color: #fff;
}

.ic-badge .i {
  width: 22px;
  height: 22px;
}

.ic-badge.sm {
  width: 36px;
  height: 36px;
  border-radius: 11px;
}

.ic-badge.sm .i {
  width: 19px;
  height: 19px;
}

.st {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.st-dot {
  display: inline-block;
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.st-open {
  color: var(--green);
}

.st-soon,
.st-opening {
  color: var(--amber);
}

.st-closed {
  color: var(--red);
}

.st-detail {
  color: var(--muted);
  font-weight: 600;
}

.st-detail::before {
  content: '·';
  margin: 0 6px;
}

.thumb {
  position: relative;
  flex: none;
  width: 58px;
  height: 58px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--cream-2);
}

.thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.aerial-img {
  position: absolute;
  left: 50%;
  top: 50%;
  max-width: none;
  object-fit: fill;
}

.thumb img.aerial-img,
.hero-aerial img.aerial-img,
.mini-map img.aerial-img {
  width: auto;
  height: auto;
}

.aerial-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border: 2.5px solid #fff;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2);
}

.chev {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

/* ---- list -------------------------------------------------------------------------------- */

.list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.home-head {
  padding: 6px 4px 2px;
}

.home-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.home-logo {
  display: none;
  height: 42px;
  width: auto;
  padding: 6px 10px;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

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

.home-title {
  margin: 2px 0 0;
  color: var(--navy);
  font: 600 30px/1.1 var(--serif);
  letter-spacing: -0.01em;
}

.home-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chip-soft {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 13px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-card);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
}

.chip-soft .i {
  width: 16px;
  height: 16px;
  color: var(--orange);
}

.group {
  overflow: hidden;
}

.group-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 16px 12px;
}

.group-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
}

.group-head p {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.group-head .st-open {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.rows {
  display: flex;
  flex-direction: column;
}

.card.rows {
  overflow: hidden;
}

.row {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 11px 16px;
  border: 0;
  border-top: 1px solid var(--line-2);
  background: none;
  text-align: start;
}

.card.rows .row:first-child {
  border-top: 0;
}

.row:hover {
  background: #fdfbf7;
}

.row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.row-name {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.row-sub {
  color: var(--muted);
  font-weight: 600;
}

.row-status {
  overflow: hidden;
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.row-status.muted {
  color: var(--muted);
  font-weight: 600;
}

.list-note {
  margin: 4px 4px -4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 44px 20px;
  color: var(--muted);
  text-align: center;
}

.empty .i {
  width: 34px;
  height: 34px;
  color: #c8bfb0;
}

/* ---- place card -------------------------------------------------------------------------- */

.place {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
}

.place-hero {
  position: relative;
  height: 250px;
  flex: none;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--cream-2);
  box-shadow: var(--shadow-card);
}

.hero-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.hero-track::-webkit-scrollbar {
  display: none;
}

.hero-slide {
  flex: 0 0 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  scroll-snap-align: start;
}

.hero-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-aerial {
  position: absolute;
  inset: 0;
}

.hero-aerial .aerial-dot {
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border-width: 4px;
}

.hero-count,
.hero-note {
  position: absolute;
  inset-inline-start: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 14px;
  background: rgba(24, 32, 52, 0.7);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

.hero-count .i,
.hero-note .i {
  width: 15px;
  height: 15px;
}

.round-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--navy);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.round-btn .i {
  width: 19px;
  height: 19px;
}

.hero-close {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
}

.hero-edit {
  position: absolute;
  top: 12px;
  inset-inline-end: 58px;
}

.place-close {
  display: none;
}

.place-head {
  position: relative;
  padding: 2px 4px 0;
}

.place-title {
  margin: 6px 0 8px;
  color: var(--navy);
  font: 600 34px/1.1 var(--serif);
  letter-spacing: -0.01em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--green-soft);
  font-size: 13.5px;
}

.status-pill:has(.st-closed) {
  background: var(--red-soft);
}

.status-pill:has(.st-soon),
.status-pill:has(.st-opening) {
  background: var(--amber-soft);
}

.actions {
  display: flex;
  justify-content: space-around;
  gap: 4px;
  padding: 14px 8px 12px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-card);
}

.act {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
}

.act-ic {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--a);
  color: #fff;
  box-shadow: 0 4px 12px rgba(24, 32, 52, 0.16);
  transition: transform 0.15s ease;
}

.act:hover .act-ic {
  transform: translateY(-2px);
}

.act-label {
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tabs {
  scroll-margin-top: calc(var(--topbar-h) + 10px);
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--cream-2);
}

.tab {
  flex: 1;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 700;
}

.tab.on {
  background: #fff;
  color: var(--navy);
  box-shadow: 0 1px 4px rgba(24, 32, 52, 0.12);
}

.tab-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sec {
  padding: 16px 18px;
}

.sec-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--navy);
  font: 600 19px/1.2 var(--serif);
}

.desc {
  margin: 0;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.6;
  white-space: pre-line;
}

.hours-t {
  width: 100%;
  border-collapse: collapse;
}

.hours-t th,
.hours-t td {
  padding: 7px 0;
  border-top: 1px solid var(--line-2);
  vertical-align: top;
  text-align: start;
}

.hours-t tr:first-child th,
.hours-t tr:first-child td {
  border-top: 0;
}

.hours-t th {
  padding-inline-end: 12px;
  color: var(--ink);
  font-weight: 700;
}

.hours-t .t {
  padding-inline-end: 12px;
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hours-t .d {
  color: var(--muted);
  font-weight: 600;
  text-align: end;
}

.hours-t tr.not-today th,
.hours-t tr.not-today td {
  color: #aaa59c;
}

.cta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  border-radius: var(--radius);
  background: var(--navy);
  color: #fff;
  font-size: 15.5px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(28, 44, 104, 0.3);
}

.cta span {
  flex: 1;
}

.cta:hover {
  background: var(--navy-2);
}

.cta .i {
  width: 22px;
  height: 22px;
  color: #ffd2c2;
}

.cta .cta-ext {
  width: 18px;
  height: 18px;
  opacity: 0.7;
}

.map-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px;
  border: 0;
  text-align: start;
}

.mini-map {
  position: relative;
  flex: none;
  width: 76px;
  height: 76px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--cream-2);
}

.map-card-text {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.map-card-text strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.map-card-text small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.menu-items {
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu-items li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px dashed var(--line);
}

.menu-items li:first-child {
  border-top: 0;
}

.mi-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.mi-name {
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.mi-desc {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.mi-price {
  color: var(--orange);
  font-weight: 800;
  white-space: nowrap;
}

.menu-files {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mf-pdf {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--cream);
  color: var(--navy);
  font-weight: 800;
  text-decoration: none;
}

.mf-pdf span {
  flex: 1;
}

.mf-pdf .i:first-child {
  color: var(--red);
}

.mf-img {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--cream-2);
}

.mf-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.pg-item {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--cream-2);
}

.pg-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- editor ------------------------------------------------------------------------------ */

.editor {
  display: flex;
  flex-direction: column;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

.ed-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 -16px;
  padding: 8px 16px 10px 10px;
  background: var(--cream);
}

.ed-title {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--navy);
  font: 600 21px/1.2 var(--serif);
}

.ed-langs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 2px 0 12px;
}

.ed-lang {
  position: relative;
  min-width: 42px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 800;
}

.ed-lang.on {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.ed-lang.missing::after {
  content: '';
  position: absolute;
  top: 2px;
  inset-inline-end: 3px;
  width: 7px;
  height: 7px;
  border: 1.5px solid #fff;
  border-radius: 50%;
  background: var(--orange);
}

.ed-lang-hint {
  margin-inline-start: 6px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.ed-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-card);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.f-label {
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 800;
}

.f-label small {
  color: var(--muted);
  font-weight: 600;
}

.f-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
}

.row2,
.dlg .row,
.ed-body .row {
  display: flex;
  gap: 12px;
}

.grow {
  flex: 1;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
  gap: 6px;
}

.ig {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 11px;
  background: var(--cream);
  color: var(--ink-2);
}

.ig .i {
  width: 19px;
  height: 19px;
}

.ig:hover {
  border-color: var(--line);
}

.ig.on {
  border-color: var(--c);
  background: var(--c);
  color: #fff;
}

.h-row,
.me-sec {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffdf9;
}

.h-line,
.me-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.h-label,
.me-title {
  flex: 1;
  min-width: 0;
}

.h-time {
  flex: 0 1 140px;
  min-width: 0;
}

.h-dash {
  padding: 0 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.h-days {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.day {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 800;
}

.day.on {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.h-days-text {
  margin-inline-start: 8px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.h-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 6px;
}

.me-item {
  display: grid;
  grid-template-columns: 1fr 96px 32px;
  gap: 6px;
  padding-inline-start: 10px;
  border-inline-start: 3px solid var(--line);
}

.me-desc {
  grid-column: 1 / 3;
  min-height: 36px;
  padding-block: 6px;
  font-size: 13px;
}

.me-files {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.me-file {
  display: flex;
  align-items: center;
  gap: 10px;
}

.me-file img,
.me-file-ic {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  object-fit: cover;
  background: var(--cream-2);
  color: var(--red);
}

.menu-ed.drop,
.photos-ed.drop .ph-grid {
  outline: 2px dashed var(--orange);
  outline-offset: 4px;
  border-radius: 14px;
}

.ph-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.ph-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px;
  background: var(--cream-2);
}

.ph-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ph-cover {
  position: absolute;
  inset-inline-start: 6px;
  top: 6px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(24, 32, 52, 0.7);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.ph-tools {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  padding: 4px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
}

.ph-tools button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--navy);
}

.ph-tools button:disabled {
  opacity: 0.35;
  cursor: default;
}

.ph-tools .i {
  width: 16px;
  height: 16px;
}

.ph-add {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 2px dashed var(--line);
  border-radius: 12px;
  background: none;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
}

.ph-add:hover {
  border-color: var(--orange);
  background: var(--orange-soft);
}

.ph-progress,
.me-progress {
  margin: 6px 0 0;
  color: var(--orange);
  font-size: 13px;
  font-weight: 700;
}

.pos-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pos {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--cream);
  font: 12.5px/1 ui-monospace, Consolas, monospace;
  white-space: pre;
}

.ed-danger {
  padding-top: 14px;
  border-top: 1px solid var(--line-2);
}

/* ---- edit bar, hints, map controls ------------------------------------------------------- */

.editbar {
  position: absolute;
  z-index: 11;
  top: 14px;
  inset-inline-start: calc(var(--panel-w) + 16px);
  inset-inline-end: 16px;
  width: max-content;
  max-width: calc(100% - var(--panel-w) - 32px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-float);
  transition: inset-inline-start 0.25s ease, max-width 0.25s ease;
}

.app.collapsed .editbar {
  inset-inline-start: 16px;
  max-width: calc(100% - 32px);
}

.eb-title {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px 0 8px;
  color: var(--orange);
  font-weight: 800;
  white-space: nowrap;
}

.eb-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  min-width: 38px;
  padding: 0 11px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

.eb-btn:hover:not(:disabled) {
  background: var(--cream);
}

.eb-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.eb-btn.accent {
  color: var(--navy);
}

.eb-btn.accent.on {
  background: var(--navy);
  color: #fff;
}

.eb-btn.done {
  margin-inline-start: 4px;
  padding: 0 18px;
  background: var(--navy);
  color: #fff;
}

.eb-btn.done:hover:not(:disabled) {
  background: var(--navy-2);
}

.eb-status {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-inline-start: 4px;
  padding: 0 10px;
  border-inline-start: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}

.eb-status .i {
  width: 17px;
  height: 17px;
}

.eb-status[data-state='saved'] .i {
  color: var(--green);
}

.eb-status[data-state='error'] {
  color: var(--red);
  cursor: pointer;
}

.addhint {
  position: absolute;
  z-index: 11;
  left: calc((100% + var(--panel-w)) / 2);
  bottom: calc(var(--sheet-h) + 24px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 7px 7px 16px;
  border-radius: 26px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  box-shadow: var(--shadow-float);
  white-space: nowrap;
}

[dir='rtl'] .addhint {
  left: calc((100% - var(--panel-w)) / 2);
}

.app.collapsed .addhint {
  left: 50%;
}

.map-ctrls {
  position: absolute;
  z-index: 8;
  inset-inline-end: 16px;
  bottom: calc(var(--sheet-h) + 20px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ctrl-group {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-float);
}

.ctrl-group button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  color: var(--navy);
}

.ctrl-group button:hover {
  background: var(--cream);
}

.ctrl-group button + button {
  border-top: 1px solid var(--line-2);
}

/* ---- menu, toasts ------------------------------------------------------------------------ */

.menu {
  position: fixed;
  z-index: 50;
  min-width: 250px;
  max-height: calc(100dvh - 90px);
  overflow-y: auto;
  padding: 6px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-pop);
}

.menu button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: none;
  font-weight: 600;
  text-align: start;
}

.menu button .i {
  color: var(--navy);
}

.menu button:hover,
.menu button:focus-visible {
  outline: none;
  background: var(--cream);
}

.menu hr {
  margin: 5px 8px;
  border: 0;
  border-top: 1px solid var(--line);
}

.menu-check {
  display: grid;
  width: 20px;
  margin-inline-start: auto;
}

.menu-check .i {
  color: var(--orange) !important;
}

.toasts {
  position: fixed;
  z-index: 90;
  left: calc((100% + var(--panel-w)) / 2);
  bottom: calc(var(--sheet-h) + 24px);
  width: max-content;
  max-width: calc(100vw - 32px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}

[dir='rtl'] .toasts {
  left: calc((100% - var(--panel-w)) / 2);
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  padding: 11px 18px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow-float);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: auto;
}

.toast.in {
  opacity: 1;
  transform: none;
}

.toast-error {
  background: #b3261e;
}

.toast-action {
  padding: 4px 8px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: #ffc7b3;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.toast-error .toast-action {
  color: #fff;
}

/* ---- dialogs ----------------------------------------------------------------------------- */

.dlg {
  width: min(430px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-pop);
}

.dlg::backdrop {
  background: rgba(24, 32, 52, 0.45);
  backdrop-filter: blur(2px);
}

.settings-dlg {
  width: min(700px, calc(100vw - 24px));
}

.dlg-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 24px;
}

.dlg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -6px -8px -2px 0;
}

.dlg-title {
  margin: 0;
  color: var(--navy);
  font: 600 23px/1.2 var(--serif);
}

.dlg-text {
  margin: 0;
  color: var(--ink-2);
}

.dlg-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}

.set-sec {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line-2);
}

.set-h {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.set-h small {
  color: var(--muted);
  font-weight: 600;
}

.set-map {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.set-map-img {
  flex: none;
  width: 64px;
  height: 150px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--cream-2);
}

.set-map-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.set-map-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.set-map-meta {
  margin: 0;
  font-weight: 700;
  word-break: break-all;
}

.cat-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cat-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.cat-color {
  position: relative;
  flex: none;
  width: 34px;
  height: 34px;
}

.cat-color input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.cat-color span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--c);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6), 0 0 0 1px var(--line);
  pointer-events: none;
}

.cat-icon {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: var(--c);
  color: #fff;
}

.cat-row .input {
  flex: 1;
  min-width: 140px;
}

.cat-count {
  width: 64px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.icon-picker {
  flex-basis: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, 38px);
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.icon-picker button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--cream);
  color: var(--ink);
}

.icon-picker button.on {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}


.login-dlg {
  width: min(400px, calc(100vw - 32px));
}

.login-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.login-head img {
  height: 40px;
  width: auto;
}

.dlg-error {
  margin: 0;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 13.5px;
  font-weight: 700;
}

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

/* ---- lightbox ---------------------------------------------------------------------------- */

.lightbox {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: rgba(16, 22, 38, 0.96);
  color: #fff;
}

.lb-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(env(safe-area-inset-top) + 12px) 14px 10px 22px;
}

.lb-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font: 600 19px/1.2 var(--serif);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.lb-count {
  font-size: 13px;
  font-weight: 700;
  opacity: 0.8;
}

.lb-btn,
.lb-nav {
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.lb-btn {
  width: 42px;
  height: 42px;
}

.lb-btn:hover,
.lb-nav:hover {
  background: rgba(255, 255, 255, 0.24);
}

.lb-stage {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 8px 76px calc(28px + env(safe-area-inset-bottom));
  touch-action: pan-y;
}

.lb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 14px;
  user-select: none;
}

.lb-nav {
  position: absolute;
  top: 50%;
  width: 50px;
  height: 50px;
  margin-top: -25px;
}

.lb-nav.prev {
  left: 16px;
}

.lb-nav.next {
  right: 16px;
}

/* ---- error page -------------------------------------------------------------------------- */

.fatal {
  max-width: 520px;
  margin: 15vh auto;
  padding: 24px;
  text-align: center;
}

.fatal h1 {
  color: var(--navy);
  font: 600 30px/1.2 var(--serif);
}

.fatal pre {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--cream-2);
}

/* ---- phones: bottom sheet ---------------------------------------------------------------- */

@media (max-width: 859px) {
  :root {
    --panel-w: 0px;
  }

  .map {
    inset-inline-start: 0;
  }

  .topbar {
    inset-inline-end: 0;
    width: auto;
    padding: calc(env(safe-area-inset-top) + 10px) 10px 0;
    background: transparent;
    pointer-events: none;
  }

  .topbar > * {
    pointer-events: auto;
  }

  .brandbar {
    display: none;
  }

  .lang-btn {
    display: inline-flex;
  }

  .search-ic {
    display: none;
  }

  .chips {
    margin: 0 -10px;
    padding: 9px 10px 4px;
    mask-image: none !important;
  }

  .chip {
    border-color: transparent;
    box-shadow: var(--shadow-float);
  }

  .chip.on {
    border-color: var(--navy);
  }

  .panel {
    top: auto;
    bottom: 0;
    width: 100%;
    height: 118px;
    border-radius: 26px 26px 0 0;
    box-shadow: 0 -4px 24px rgba(24, 32, 52, 0.2);
  }

  .app.collapsed .panel,
  [dir='rtl'] .app.collapsed .panel {
    transform: none;
  }

  .panel.anim {
    transition: height 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  .panel-grip {
    flex: none;
    display: flex;
    justify-content: center;
    padding: 9px 0 3px;
    cursor: grab;
    touch-action: none;
  }

  .panel-grip span {
    width: 40px;
    height: 5px;
    border-radius: 3px;
    background: #d9d0c2;
  }

  .panel-scroll {
    padding-top: 0;
  }

  .panel-body {
    padding: 2px 12px 24px;
  }

  .sheet-drag {
    touch-action: none;
  }

  .home-logo {
    display: block;
  }

  .home-title {
    font-size: 24px;
  }

  .home-meta {
    margin-top: 10px;
  }

  .panel-toggle,
  .map-ctrls .ctrl-group:first-child {
    display: none;
  }

  .map-ctrls {
    inset-inline-end: 12px;
    bottom: calc(var(--sheet-h) + 14px);
  }

  .app[data-sheet='full'] .map-ctrls {
    display: none;
  }

  .editbar {
    top: calc(env(safe-area-inset-top) + 68px);
    inset-inline-start: 10px;
    inset-inline-end: 10px;
    width: auto;
    max-width: none;
    margin: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .app.editing .chips {
    display: none;
  }

  .eb-title,
  #settingsBtn span,
  .eb-status span {
    display: none;
  }

  .eb-status {
    margin-inline-start: auto;
    padding: 0 8px;
  }

  .place-head {
    order: 1;
    padding: 0 52px 0 4px;
  }

  [dir='rtl'] .place-head {
    padding: 0 4px 0 52px;
  }

  .place-close {
    position: absolute;
    top: -2px;
    inset-inline-end: 0;
    display: grid;
    background: var(--cream-2);
    box-shadow: none;
  }

  .place-title {
    font-size: 28px;
  }

  .place > .actions {
    order: 2;
  }

  .place-hero {
    order: 3;
    height: 200px;
  }

  .hero-close {
    display: none;
  }

  .hero-edit {
    inset-inline-end: 12px;
  }

  .tabs {
    order: 4;
    scroll-margin-top: 10px;
  }

  .tab-body {
    order: 5;
  }

  .ed-body {
    padding: 14px;
  }

  .toasts,
  .addhint,
  [dir='rtl'] .toasts,
  [dir='rtl'] .addhint {
    left: 50%;
  }

  .lb-stage {
    padding: 8px 0 calc(24px + env(safe-area-inset-bottom));
  }

  .lb-nav {
    display: none;
  }
}

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