:root {
  --ink: #171713;
  --paper: #f5f3ec;
  --orange: #ff5a36;
  --lime: #dfff52;
  --line: #d8d5cc;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html,
body {
  margin: 0;
  height: 100%;
  font-family: Arial, sans-serif;
  color: var(--ink);
  background: #dad8d1;
}
button,
input,
textarea {
  font: inherit;
}
#app {
  position: relative;
  height: 100dvh;
  max-width: 520px;
  margin: auto;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 0 50px #0002;
}
#app > header {
  position: absolute;
  z-index: 800;
  inset: 0 0 auto;
  height: 68px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(var(--paper), #f5f3ecdd, transparent);
}
.brand {
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -1px;
}
.brand i {
  font-style: normal;
  font-weight: 400;
}
.brand b {
  color: var(--orange);
}
header div {
  display: flex;
  align-items: center;
  gap: 8px;
}
header span {
  font-size: 9px;
  background: var(--ink);
  color: #fff;
  padding: 7px 9px;
  border-radius: 20px;
  font-weight: 900;
}
header button,
.close,
.sheet-head > button {
  border: 1px solid var(--line);
  background: #fffd;
  border-radius: 50%;
  width: 37px;
  height: 37px;
}
#trip-menu {
  position: absolute;
  z-index: 950;
  top: 58px;
  right: 14px;
  width: 190px;
  padding: 7px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 14px 40px #0003;
}
#trip-menu button {
  width: 100%;
  height: auto;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  font-size: 11px;
  font-weight: 800;
}
#trip-menu button:hover,
#trip-menu button:focus-visible {
  background: var(--paper);
}
#trip-menu button b {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
}
#map {
  position: absolute;
  inset: 0 0 185px;
  background: #daddd0;
}
.leaflet-tile {
  filter: saturate(0.58) contrast(0.94) brightness(1.06);
}
.blank {
  background: none !important;
  border: 0 !important;
}
.pin {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  border: 3px solid #fff;
  box-shadow: 0 5px 15px #0005;
  font-weight: 900;
}
.pin.guest {
  background: var(--orange);
}
.pin.latest {
  width: 58px;
  height: 58px;
  background: var(--lime);
  color: var(--ink);
  border: 4px solid var(--ink);
  animation: pulse 1.8s infinite;
}
.pin-photo {
  position: relative;
  width: 48px;
  height: 48px;
  border: 3px solid #fff;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 6px 18px #0005;
}
.pin-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 11px;
}
.pin-photo b {
  position: absolute;
  top: -9px;
  right: -9px;
  background: var(--ink);
  color: #fff;
  border-radius: 20px;
  padding: 4px 6px;
  font-size: 8px;
}
.pin-photo.latest {
  width: 62px;
  height: 62px;
  border: 4px solid var(--lime);
}
@keyframes pulse {
  50% {
    box-shadow: 0 0 0 13px #dfff5200;
  }
}
#trip {
  position: absolute;
  z-index: 700;
  inset: auto 0 0;
  min-height: 190px;
  padding: 28px 20px 70px;
  background: var(--paper);
  border-radius: 28px 28px 0 0;
  display: flex;
  justify-content: space-between;
}
#trip:before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  width: 42px;
  height: 4px;
  border-radius: 4px;
  background: #c4c1b9;
  transform: translateX(-50%);
}
#trip small,
.sheet small {
  font-size: 9px;
  letter-spacing: 0.17em;
  font-weight: 900;
  color: #77736a;
}
#trip h1 {
  font-size: 28px;
  line-height: 1;
  margin: 7px 0;
  letter-spacing: -1.4px;
}
#trip p {
  font-size: 12px;
  color: #706d65;
  margin: 0;
}
#trip em {
  height: 30px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 20px;
  padding: 8px 10px;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
}
#trip footer {
  position: absolute;
  left: 20px;
  bottom: 52px;
  font-size: 10px;
  color: #77736a;
}
#add {
  position: absolute;
  z-index: 900;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  border: 0;
  border-radius: 40px;
  padding: 6px 18px 6px 6px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 9px;
}
#add b {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--orange);
  display: grid;
  place-items: center;
  font-size: 22px;
}
.shade {
  position: fixed;
  z-index: 1300;
  inset: 0;
  background: #0007;
  display: flex;
  align-items: flex-end;
}
.sheet {
  width: 100%;
  max-width: 520px;
  margin: auto;
  background: var(--paper);
  border-radius: 27px 27px 0 0;
  padding: 16px 18px calc(20px + env(safe-area-inset-bottom));
  max-height: 94dvh;
  overflow: auto;
}
.handle {
  display: block;
  width: 42px;
  height: 4px;
  background: #bdbab1;
  margin: 0 auto 15px;
  border-radius: 5px;
}
.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sheet h2 {
  margin: 4px 0 0;
}
.sheet nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 17px 0;
}
.sheet nav button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 9px 2px;
  font-size: 9px;
  font-weight: 900;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
}
.sheet nav b {
  font-size: 17px;
}
.sheet nav .active {
  background: var(--ink);
  color: #fff;
}
.sheet form > label {
  display: block;
  margin: 12px 0;
}
.sheet label span,
.sheet legend {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 900;
  color: #706d65;
  margin-bottom: 6px;
}
.sheet input:not([type="radio"]),
.sheet textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  padding: 11px;
}
.sheet textarea {
  min-height: 72px;
}
.upload {
  position: relative;
  min-height: 112px;
  border: 1.5px dashed #aaa69b;
  border-radius: 15px;
  background: #eae8e0;
  overflow: hidden;
}
.upload > label {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.upload small {
  font-size: 9px;
  color: #777;
}
.upload img,
.upload video {
  width: 100%;
  max-height: 250px;
  object-fit: contain;
  background: #111;
  display: block;
}
.redact {
  position: absolute;
  right: 8px;
  bottom: 8px;
  border: 0;
  background: #171713df;
  color: #fff;
  border-radius: 20px;
  padding: 8px 10px;
  font-size: 9px;
  font-weight: 900;
}
.sheet fieldset {
  border: 0;
  padding: 0;
}
.sheet fieldset label {
  display: flex;
  gap: 8px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 9px;
  margin: 5px 0;
  font-size: 10px;
}
.sheet .category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.sheet .category-grid label {
  margin: 0;
  min-height: 42px;
}
.sheet .category-grid label:last-child {
  grid-column: 1 / -1;
}
.publish {
  width: 100%;
  border: 0;
  background: var(--orange);
  color: #fff;
  border-radius: 12px;
  padding: 13px;
  font-weight: 900;
}
.safe {
  text-align: center;
  color: #888;
  font-size: 8px;
}
#form-error {
  background: #ffe1da;
  color: #92230f;
  border-radius: 9px;
  font-size: 10px;
  padding: 0;
}
#form-error:not(:empty) {
  padding: 9px;
}
.modal {
  position: fixed;
  z-index: 1100;
  inset: auto 12px 15px;
  background: #fff;
  border-radius: 24px;
  overflow: auto;
  max-height: 80dvh;
  box-shadow: 0 18px 60px #0006;
}
.modal > button {
  position: absolute;
  right: 9px;
  top: 9px;
  z-index: 2;
}
.modal > img,
.modal > video {
  width: 100%;
  max-height: 46dvh;
  object-fit: cover;
  background: #111;
}
.post-body {
  padding: 16px;
}
.post-body small {
  color: #777;
}
.remove {
  border: 1px solid #efbbb0;
  background: #fff0ed;
  color: #9a2713;
  border-radius: 10px;
  padding: 8px;
  font-size: 10px;
  font-weight: 900;
}
#editor {
  position: fixed;
  z-index: 1800;
  inset: 0;
  background: var(--ink);
  color: #fff;
  padding: 22px;
  display: flex;
  flex-direction: column;
}
#editor[hidden] {
  display: none;
}
#editor canvas {
  width: 100%;
  height: auto;
  max-height: 72dvh;
  object-fit: contain;
  touch-action: none;
  background: #000;
  flex: 1;
}
#editor footer {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
#editor footer button {
  flex: 1;
  padding: 12px;
  border-radius: 11px;
  border: 1px solid #555;
  background: transparent;
  color: #fff;
}
#editor footer button:last-child {
  background: var(--lime);
  color: var(--ink);
}
#toast {
  position: fixed;
  z-index: 2000;
  top: 77px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  border-radius: 25px;
  padding: 10px 14px;
  font-size: 10px;
  font-weight: 900;
}
