:root {
  --blue: #1263f1;
  --blue2: #064cf6;
  --ink: #071326;
  --muted: #657188;
  --line: #dde7f3;
  --soft: #f4f8fd;
  --green: #16a36f;
  --orange: #f28a19;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #eef7f5;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.objects-app {
  width: min(430px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  background: #fff;
  position: relative;
  overflow-x: hidden;
  box-shadow: 0 24px 80px rgba(15, 23, 42, .16);
  padding-bottom: 92px;
}

.app-header {
  height: 62px;
  padding: 0 18px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
}

.app-header strong {
  text-align: center;
  font-size: 18px;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 19px;
}

.search-panel {
  padding: 8px 18px 10px;
}

.search-panel label {
  display: block;
}

.search-panel label span {
  position: absolute;
  left: -999px;
}

.search-panel input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  outline: none;
  background: #fff;
  color: var(--ink);
}

.category-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 14px 0 2px;
  scrollbar-width: none;
}

.category-strip button {
  min-width: 74px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  font-weight: 800;
  white-space: nowrap;
}

.category-strip button.active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.nearby-head {
  padding: 12px 18px 8px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.nearby-head h1 {
  margin: 0;
  font-size: 20px;
}

.nearby-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.nearby-head button {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 900;
}

.object-list {
  display: grid;
  gap: 12px;
  padding: 10px 18px 20px;
}

.object-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  display: grid;
  grid-template-columns: 78px 1fr 28px;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}

.object-thumb {
  width: 78px;
  height: 78px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), var(--green));
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 950;
  font-size: 25px;
}

.object-card h2 {
  margin: 0 0 5px;
  font-size: 16px;
  line-height: 1.2;
}

.object-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.object-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 7px 0;
}

.object-tags span {
  border-radius: 999px;
  padding: 4px 7px;
  background: #edf4ff;
  color: #155eef;
  font-size: 11px;
  font-weight: 800;
}

.object-distance {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.fab {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 20;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 30px;
  font-weight: 600;
  box-shadow: 0 14px 32px rgba(18, 99, 241, .34);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 15;
  width: min(430px, 100%);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(255, 255, 255, .94);
  border-top: 1px solid var(--line);
  padding: 8px 8px max(8px, env(safe-area-inset-bottom));
  backdrop-filter: blur(14px);
}

.bottom-nav button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  min-height: 42px;
}

.bottom-nav button.active {
  color: var(--blue);
}

.publish-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(15, 23, 42, .32);
  display: grid;
  place-items: end center;
  padding: 18px;
}

.publish-modal[hidden],
.map-preview[hidden] {
  display: none;
}

.modal-card {
  width: min(430px, 100%);
  background: #fff;
  border-radius: 18px 18px 8px 8px;
  padding: 22px;
  position: relative;
  box-shadow: 0 -20px 60px rgba(15, 23, 42, .2);
}

.modal-close {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  background: #fff;
  font-size: 25px;
}

.modal-card h2 {
  margin: 42px 0 4px;
  text-align: center;
  font-size: 24px;
}

.modal-card > p {
  margin: 0 0 24px;
  text-align: center;
  color: var(--muted);
}

.publish-choice {
  width: 100%;
  min-height: 142px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  margin-bottom: 14px;
  display: grid;
  place-items: center;
  gap: 5px;
}

.publish-choice span {
  width: 58px;
  height: 58px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 29px;
}

.publish-choice.lost span {
  background: #efe9ff;
}

.publish-choice.found span {
  background: #def8eb;
}

.publish-choice strong {
  font-size: 18px;
}

.publish-choice small {
  color: var(--muted);
}

.safe-note {
  border-radius: 8px;
  background: #edf5ff;
  color: #34506d;
  padding: 14px;
  font-size: 13px;
  line-height: 1.45;
}

.map-preview {
  position: fixed;
  inset: 0;
  z-index: 30;
  width: min(430px, 100%);
  margin: 0 auto;
  background: #edf3f8;
}

.map-preview header {
  height: 62px;
  padding: 0 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,.9);
}

.map-preview header button {
  border: 0;
  border-radius: 999px;
  background: #fff;
  padding: 10px 14px;
  font-weight: 800;
}

.fake-map {
  height: calc(100vh - 250px);
  min-height: 380px;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, .06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(15, 23, 42, .06) 1px, transparent 1px),
    #edf4f2;
  background-size: 32px 32px;
  position: relative;
}

.fake-map::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 48%;
  width: 64px;
  height: 64px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: rgba(18, 99, 241, .18);
  box-shadow: inset 0 0 0 17px rgba(18, 99, 241, .9);
}

.map-pin {
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 999px 999px 999px 4px;
  transform: rotate(-45deg);
  background: var(--orange);
  border: 4px solid #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .18);
}

.map-pin span {
  display: block;
  transform: rotate(45deg);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  line-height: 26px;
  text-align: center;
}

.map-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 78px;
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 18px;
  box-shadow: 0 -16px 44px rgba(15, 23, 42, .18);
}

.map-sheet > div {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin-top: 12px;
  padding-bottom: 4px;
}

.map-mini {
  min-width: 92px;
  color: inherit;
  text-decoration: none;
}

.map-mini .object-thumb {
  width: 72px;
  height: 72px;
  font-size: 20px;
}

.map-mini span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

@media (min-width: 700px) {
  body {
    padding: 28px 0;
  }

  .objects-app,
  .map-preview {
    min-height: calc(100vh - 56px);
    border-radius: 18px;
    overflow: hidden;
  }
}
