:root {
  --forest: #1E3A2A;
  --ink: #111111;
  --gray: #5F6561;
  --mist: #F2F3F1;
  --line: #DFE3DE;
  --teal: #167F88;
  --red: #B3261E;
}

* { box-sizing: border-box; }
html { background: var(--mist); }
body {
  margin: 0;
  color: var(--ink);
  font: 400 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Thai", sans-serif;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, p { margin: 0; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

.wrap { max-width: 980px; margin: 0 auto; padding: 24px 16px 80px; }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.bar h1 { font-size: 26px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.muted { color: var(--gray); font-size: 13px; }

.btn {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 22px;
  background: #fff;
  font-weight: 600;
}
.btn.primary { background: var(--ink); color: #fff; }
.btn.danger { background: #fff; color: var(--red); }
.btn:disabled { opacity: .5; cursor: default; }

.panel { padding: 20px; border-radius: 22px; background: #fff; }
.panel + .panel { margin-top: 16px; }
.panel h2 { margin-bottom: 14px; font-size: 18px; }

.login { display: grid; min-height: 100dvh; place-items: center; padding: 16px; background: var(--forest); }
.login form { display: grid; gap: 14px; width: min(360px, 100%); padding: 28px; border-radius: 28px; background: #fff; }
.login h1 { font-size: 24px; }

label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
input, select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-weight: 400;
}
input[type="checkbox"] { width: 22px; min-height: 22px; }
textarea { min-height: 84px; resize: vertical; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.full { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; min-height: 44px; }

.search { margin-bottom: 14px; }
.items { display: grid; gap: 8px; }
.item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 12px 16px;
  border: 0;
  border-radius: 18px;
  background: #fff;
  text-align: left;
}
.item strong { display: block; }
.tag { flex: none; padding: 3px 10px; border-radius: 12px; background: var(--mist); font-size: 12px; font-weight: 600; }
.tag.published { background: #DDF1F2; color: #0D5B62; }
.tag.warn { background: #FBE9D7; color: #80450B; }

.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 12px; }
.photo { position: relative; overflow: hidden; border-radius: 16px; background: var(--mist); }
.photo img { display: block; width: 100%; aspect-ratio: 8 / 9; object-fit: cover; }
.photo .btn { width: 100%; min-height: 40px; border-radius: 0; color: var(--red); font-size: 13px; }

.lens-map { position: relative; width: 196px; height: 426px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; cursor: crosshair; }
.lens-map svg { display: block; width: 100%; height: 100%; }
.lens-dot { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border: 3px solid #fff; border-radius: 50%; background: var(--ink); pointer-events: none; }

#notice {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 10;
  max-width: calc(100% - 32px);
  padding: 10px 18px;
  border-radius: 20px;
  background: var(--ink);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity .2s;
}
#notice.show { opacity: 1; }
