:root {
  color-scheme: light;
  --bg: #f2f3f5;
  --ink: #21201f;
  --muted: #6b6a68;
  --card: #fff;
  --yellow: #ffcc00;
  --danger: #c62828;
  --radius: 24px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "YS Text", "Segoe UI", Tahoma, system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
img { max-width: 100%; }

.screen {
  width: min(480px, 100%);
  margin: 0 auto;
  min-height: 100dvh;
  padding: 28px max(22px, env(safe-area-inset-right)) calc(36px + env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.mark {
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 15px;
  text-decoration: none;
}
.pill {
  display: inline-flex;
  align-items: center;
  background: var(--card);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  border: 0;
  color: inherit;
  cursor: pointer;
}
.langs {
  display: flex;
  gap: 4px;
  margin-top: 14px;
}
.langs button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 999px;
  cursor: pointer;
}
.langs button.on { background: var(--card); color: var(--ink); }

h1 {
  margin: 16px 0 0;
  font-size: 40px;
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 800;
  overflow-wrap: anywhere;
}
h2 {
  margin: 28px 0 8px;
  font-size: 22px;
  letter-spacing: -0.03em;
  font-weight: 800;
}
p { margin: 0; }

.search, .stack input, .stack textarea, .stack select, .inline input {
  width: 100%;
  border: 0;
  border-radius: 16px;
  background: var(--card);
  padding: 14px 16px;
  font-size: 16px;
  outline: none;
}
.stack input, .stack textarea, .stack select { background: var(--bg); }
.search { margin-top: 18px; }
textarea { resize: vertical; min-height: 120px; }
::placeholder { color: #9b9a97; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--ink); outline-offset: 1px; }

.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.chip.on { background: var(--ink); color: #fff; }

.list, .stack-list { display: grid; gap: 10px; margin-top: 14px; }
.stay {
  display: grid;
  gap: 8px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 10px;
  text-decoration: none;
  color: inherit;
}
.stay:active, .add-card:active, .primary:active { transform: scale(0.985); }
.frame, .ph {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  background: #e7e8ea;
  object-fit: cover;
}
.ph {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.stay h2 { margin: 2px 4px 0; font-size: 22px; }
.stay .meta, .meta { color: var(--muted); font-size: 14px; line-height: 1.4; }
.line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin: 0 4px 6px;
}
.price { font-weight: 800; letter-spacing: -0.03em; }
.price-lg {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.lead { margin-top: 8px; color: var(--muted); }
.desc {
  margin-top: 16px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.45;
  font-size: 16px;
}
.gallery { margin-top: 18px; }
.hero {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  background: #e7e8ea;
}
.thumbs { display: flex; gap: 6px; margin-top: 6px; overflow-x: auto; }
.thumbs button { border: 0; padding: 0; background: none; border-radius: 12px; cursor: pointer; }
.thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; display: block; }
.thumbs button.on img { outline: 2px solid var(--ink); outline-offset: 1px; }

.panel {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  margin-top: 12px;
}
.panel h2 { margin: 0 0 12px; }
.stack { display: grid; }
.stack label, .inline label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 800;
}
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.check, .stack label.check {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 700;
}
.check input { width: auto; accent-color: var(--ink); }
.primary, .ghost {
  border: 0;
  border-radius: 16px;
  padding: 16px;
  font-weight: 800;
  font-size: 17px;
  cursor: pointer;
}
.primary { width: 100%; background: var(--yellow); color: #1a1a1a; }
.primary:disabled, .ghost:disabled { opacity: 0.55; cursor: default; }
.ghost { background: var(--bg); color: var(--ink); }
.hint { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.4; }
.form-error { color: var(--danger); font-size: 14px; margin: 0 0 12px; }
.ok { font-weight: 800; }
.empty { color: var(--muted); margin-top: 18px; }
.hub {
  display: inline-block;
  margin-top: 28px;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}
.add-card {
  display: block;
  width: 100%;
  margin-top: 18px;
  text-align: start;
  background: var(--card);
  border: 0;
  border-radius: var(--radius);
  padding: 22px 20px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.actions { display: flex; gap: 14px; align-items: center; margin-top: 8px; }
.text {
  border: 0;
  background: none;
  padding: 0;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}
.text.danger { color: var(--danger); }
.badge {
  display: inline-block;
  margin-inline-start: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.stars { display: flex; gap: 6px; margin-bottom: 12px; }
.photo-edit { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 12px; }
.photo-edit figure { margin: 0; display: grid; gap: 4px; justify-items: start; }
.photo-edit img { width: 84px; height: 84px; object-fit: cover; border-radius: 12px; }
.trap {
  position: absolute;
  inset-inline-start: -9999px;
  height: 0;
  opacity: 0;
}
.score { font-weight: 800; letter-spacing: -0.03em; }

.screen { padding-bottom: calc(108px + env(safe-area-inset-bottom)); }
.stay { position: relative; }
.stay-link { display: grid; gap: 8px; text-decoration: none; color: inherit; }
.save {
  position: absolute;
  top: 18px;
  inset-inline-end: 18px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
}
.save.on { color: #c62828; }
.price-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.price-row .save { position: static; }

.bottom {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(480px, 100%);
  background: #fff;
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
}
.bottom-in { display: grid; grid-template-columns: repeat(5, 1fr); }
.tab {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-height: 52px;
  padding-top: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
}
.tab svg { width: 22px; height: 22px; }
.tab.on { color: var(--ink); }
.tab.center { padding-top: 0; }
.tab.center .ic {
  width: 46px;
  height: 46px;
  margin-top: -16px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
}
.tab.center.on .ic { background: var(--ink); }

.lang-block { margin-top: 22px; }
.lang-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.lang-pick button {
  border: 0;
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
}
.lang-pick button.on { background: var(--ink); color: #fff; }

.map-screen { padding: 0; }
.map-canvas { height: calc(100dvh - 74px); background: #e7e8ea; }
.map-sheet {
  position: absolute;
  z-index: 500;
  left: max(12px, calc(50% - 228px));
  right: max(12px, calc(50% - 228px));
  bottom: calc(86px + env(safe-area-inset-bottom));
  background: #fff;
  border-radius: 22px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.map-sheet strong { display: block; letter-spacing: -0.03em; }
.pin-map { height: 180px; border-radius: 16px; margin-bottom: 12px; overflow: hidden; background: #e7e8ea; }
.leaflet-control-attribution { font-size: 10px; }
