:root {
  --bg: #f7f5ef;
  --ink: #1c2c2b;
  --brand: #2f6b57;
  --cluster: #17344d;
  --panel: #ffffff;
  --line: #e5e2d6;
  --error: #8f2c2c;
  --ok: #1b6b3f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at top, #fff8e6, var(--bg));
  color: var(--ink);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  overflow-x: hidden;
  overflow-y: auto;
}

body.map-page {
  overflow: hidden;
}

main {
  position: relative;
}

.map-search {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 35;
  display: flex;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.35rem;
  backdrop-filter: blur(4px);
}

.map-search input {
  min-height: 40px;
  min-width: 240px;
  border-radius: 8px;
  border: 1px solid #d6d2c2;
  padding: 0.5rem 0.6rem;
  font: inherit;
}

.map-search button {
  min-height: 40px;
  border-radius: 8px;
  padding: 0.5rem 0.8rem;
}

.map-search-results {
  position: fixed;
  top: 64px;
  left: 12px;
  z-index: 91;
  width: min(440px, calc(100vw - 24px));
  max-height: min(52vh, 420px);
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  display: none;
}

.map-search-results.open {
  display: block;
}

.map-search-result-item {
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #efecdf;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  box-shadow: none;
  padding: 0.6rem 0.75rem;
}

.map-search-result-item:last-child {
  border-bottom: 0;
}

.map-search-result-item strong {
  display: block;
  font-size: 0.9rem;
}

.map-search-result-item span {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.78rem;
  color: #4f5d69;
}

.map-search-result-item em {
  display: inline-block;
  margin-top: 0.22rem;
  font-size: 0.72rem;
  font-style: normal;
  color: #2b6f57;
  background: #e8f4ee;
  border-radius: 999px;
  padding: 0.1rem 0.42rem;
}

.map-search-results-empty {
  padding: 0.8rem;
  font-size: 0.88rem;
  color: #4f5d69;
}

.floating-top-right {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 35;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.brand-menu-btn {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  height: 52px;
  min-width: 74px;
  padding: 0 0.45rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  color: #17344d;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
}

.brand-logo {
  width: 44px;
  height: 44px;
  display: block;
}

.brand-menu-glyph {
  font-size: 1.2rem;
  line-height: 1;
  font-weight: 700;
}

.locate-btn {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  color: #17344d;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
  padding: 0;
  display: grid;
  place-items: center;
}

.locate-icon {
  width: 24px;
  height: 24px;
  display: block;
}

.menu-panel {
  position: fixed;
  top: 66px;
  right: 12px;
  z-index: 34;
  width: 180px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  transform: scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease, transform 150ms ease;
}

.menu-panel.open {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.menu-panel nav {
  display: flex;
  flex-direction: column;
}

.menu-panel a {
  display: block;
  padding: 0.75rem 0.85rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid #efecdf;
}

.menu-panel .menu-action {
  width: 100%;
  text-align: left;
  display: block;
  padding: 0.75rem 0.85rem;
  color: var(--ink);
  border: 0;
  border-bottom: 1px solid #efecdf;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.menu-panel a:last-child {
  border-bottom: 0;
}

.layer-controls {
  position: fixed;
  left: 12px;
  bottom: 14px;
  z-index: 35;
}

.layer-actions {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  align-items: center;
}

.layer-fab {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
  padding: 0;
  display: grid;
  place-items: center;
}

.layer-fab i {
  font-size: 1.15rem;
  color: #17344d;
}

.layer-fab img {
  width: 26px;
  height: 26px;
  display: block;
}

.category-filter-panel {
  position: absolute;
  bottom: 168px;
  left: 0;
  width: 220px;
  max-height: min(56vh, 420px);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
  display: flex;
  flex-direction: column;
}

.category-filter-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.category-filter-head {
  padding: 0.5rem 0.65rem 0.35rem 0.65rem;
  border-bottom: 1px solid #efecdf;
}

.category-filter-list {
  padding: 0.35rem 0.65rem;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.category-filter-list label {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  font-size: 0.85rem;
  color: #17344d;
}

.category-filter-list input[type="checkbox"] {
  margin: 0;
}

.category-filter-actions {
  border-top: 1px solid #efecdf;
  padding: 0.45rem 0.65rem;
  display: flex;
  gap: 0.42rem;
}

.category-filter-actions button {
  min-height: 34px;
  padding: 0.35rem 0.58rem;
  font-size: 0.82rem;
}

.layer-panel {
  position: absolute;
  bottom: 56px;
  left: 0;
  width: 184px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
}

.layer-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.layer-option {
  width: 100%;
  min-height: 54px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #efecdf;
  border-radius: 0;
  background: #f6f4ec;
  color: #fff;
  box-shadow: none;
  padding: 0.5rem 0.6rem;
  position: relative;
  overflow: hidden;
}

.layer-option span {
  position: relative;
  z-index: 2;
  display: inline-block;
  font-size: 0.86rem;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.layer-option::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05) contrast(1.02);
}

.layer-thumb-ofm::before {
  background-image:
    linear-gradient(120deg, rgba(35, 74, 56, 0.35), rgba(18, 40, 30, 0.2)),
    radial-gradient(circle at 20% 30%, #88b04b 0 18%, transparent 19%),
    radial-gradient(circle at 72% 58%, #6e97c9 0 22%, transparent 23%),
    linear-gradient(135deg, #d8d0b5, #a7c49e);
}

.layer-thumb-osm::before {
  background-image:
    linear-gradient(125deg, rgba(30, 45, 23, 0.32), rgba(24, 40, 56, 0.28)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 2px, transparent 2px 9px),
    linear-gradient(135deg, #ccd9bd, #b6caa8 50%, #9eb39d);
}

.layer-thumb-mml-base::before {
  background-image:
    linear-gradient(130deg, rgba(30, 57, 40, 0.35), rgba(18, 28, 42, 0.24)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.12) 0 2px, transparent 2px 7px),
    linear-gradient(135deg, #8da373, #6d8763 50%, #8b8c6a);
}

.layer-thumb-mml-air::before {
  background-image:
    linear-gradient(135deg, rgba(40, 27, 14, 0.28), rgba(16, 26, 24, 0.26)),
    radial-gradient(circle at 30% 50%, #58724d 0 24%, transparent 25%),
    radial-gradient(circle at 68% 35%, #768a61 0 18%, transparent 19%),
    linear-gradient(150deg, #496057, #6c6b57 52%, #8b7c62);
}

.layer-thumb-osm-air::before {
  background-image:
    linear-gradient(125deg, rgba(18, 27, 18, 0.35), rgba(18, 25, 36, 0.3)),
    radial-gradient(circle at 28% 58%, #3a6a3f 0 25%, transparent 26%),
    radial-gradient(circle at 72% 36%, #3d5754 0 20%, transparent 21%),
    linear-gradient(145deg, #355043, #63736a 54%, #847f70);
}

.layer-option:last-child {
  border-bottom: 0;
}

.layer-option.active {
  box-shadow: inset 0 0 0 2px #1d6d53;
}

.layer-option.active span {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.layer-option.hidden {
  display: none;
}

.cadastre-toggle {
  margin-top: 0.45rem;
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  color: #17344d;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
  display: none;
}

.cadastre-toggle.visible {
  display: inline-flex;
  align-items: center;
}

.cadastre-toggle.active {
  background: #1d6d53;
  color: #fff;
}

#map {
  height: 100vh;
  height: 100dvh;
  width: 100%;
}

.maplibregl-ctrl-attrib {
  font-size: 10px;
  line-height: 1.15;
  padding: 1px 4px;
  max-width: min(44vw, 230px);
  white-space: normal;
}

.maplibregl-ctrl-attrib a {
  word-break: break-word;
}

.map-marker {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  touch-action: manipulation;
}

.map-marker.place {
  width: 30px;
  height: 34px;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.map-marker.cluster {
  background: var(--cluster);
  min-width: 38px;
  padding: 0 8px;
}

.user-location-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #1f7ae6;
  border: 2px solid #fff;
  box-shadow: 0 0 0 3px rgba(31, 122, 230, 0.28);
}

.marker-icon {
  width: 29px;
  height: 33px;
  display: block;
  object-fit: contain;
  pointer-events: none;
}

.place-page,
.admin-shell {
  max-width: 860px;
  margin: 1rem auto;
  padding: 0 0.9rem 2rem;
}

.admin-shell.narrow {
  max-width: 620px;
}

.place-page dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.35rem 0.8rem;
}

.place-page dt {
  font-weight: 700;
}

.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.admin-top.compact {
  margin-bottom: 0.4rem;
}

.admin-top h1 {
  margin: 0;
}

.form-page-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.35rem;
  line-height: 1.1;
}

.form-page-logo {
  width: 26px;
  height: 30px;
  object-fit: contain;
  flex: 0 0 26px;
}

.guide-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem;
}

.guide-section h2 {
  margin: 0 0 0.7rem;
  font-size: 1.08rem;
}

.guide-category-list {
  display: grid;
  gap: 0.6rem;
}

.guide-category-item {
  border: 1px solid #dce4e9;
  border-radius: 10px;
  background: #f9fcfe;
  padding: 0.55rem 0.65rem;
}

.guide-category-item h3 {
  margin: 0 0 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.42rem;
  font-size: 0.95rem;
  line-height: 1.25;
}

.guide-category-item h3 img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex: 0 0 22px;
  display: block;
}

.guide-category-item p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
}

.admin-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.admin-search {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  margin: 0 0 0.8rem;
}

.admin-search input[type="search"] {
  flex: 1;
  min-width: 0;
  font: inherit;
  border: 1px solid #d6d2c2;
  border-radius: 8px;
  min-height: 40px;
  padding: 0.55rem 0.65rem;
  background: #fff;
}

.btn,
button {
  border: 0;
  background: var(--brand);
  color: #fff;
  border-radius: 8px;
  min-height: 40px;
  padding: 0.55rem 0.85rem;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}

.btn.secondary {
  background: #4b5d67;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem;
}

.admin-form label {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  font-weight: 600;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  font: inherit;
  border: 1px solid #d6d2c2;
  border-radius: 8px;
  min-height: 40px;
  padding: 0.55rem 0.65rem;
  background: #fff;
}

.admin-form input[type="file"] {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.admin-form textarea {
  min-height: 110px;
}

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.grid-two > * {
  min-width: 0;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.choice-grid.dense {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.32rem;
}

.admin-form > div > strong {
  display: block;
  margin-bottom: 0.4rem;
}

.choice-item {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 0.45rem;
  border: 1px solid #d6d2c2;
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  background: #fff;
  min-width: 0;
  font-weight: 500;
}

.choice-grid.dense .choice-item {
  padding: 0.34rem 0.42rem;
  gap: 0.35rem;
}

.choice-item.icon-choice {
  display: grid;
  grid-template-columns: 16px 22px minmax(0, 1fr);
  align-items: center;
  column-gap: 0.45rem;
}

.choice-item input[type="checkbox"],
.choice-item input[type="radio"] {
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
}

.choice-item span {
  white-space: normal;
  line-height: 1.2;
}

.icon-choice {
  align-items: center;
}

.icon-choice img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex: 0 0 22px;
}

.choice-grid.dense .icon-choice img {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.choice-grid.dense .choice-item span {
  font-size: 0.83rem;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.report-choice-grid {
  grid-template-columns: 1fr;
}

.report-choice-grid .choice-item {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 0.5rem;
}

.report-choice-grid .choice-item span {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.table-wrap {
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 0.6rem;
  text-align: left;
  white-space: nowrap;
}

.admin-row-draft {
  background: #fff6df;
}

.admin-row-visible {
  background: #f8fcff;
}

.admin-row-deleted {
  background: #fff1f1;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-chip.visible {
  color: #0b6f2a;
}

.status-chip.hidden {
  color: #8a6400;
}

.status-chip.deleted {
  color: #9d2020;
}

.action-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid #d6d2c2;
  background: #fff;
  color: #17344d;
  text-decoration: none;
  margin-right: 0.2rem;
}

.action-icon-link:hover {
  background: #eef4f7;
}

.inline-action-form {
  display: inline-flex;
  margin: 0;
}

.action-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid #d6d2c2;
  background: #fff;
  color: #17344d;
  margin-right: 0.2rem;
  cursor: pointer;
  font: inherit;
}

.action-icon-button:hover {
  background: #eef4f7;
}

.action-icon-button.danger {
  color: #9d2020;
  border-color: #e8b0b0;
}

.admin-image-block {
  border: 1px solid #d6d2c2;
  border-radius: 10px;
  background: #fafcfe;
  padding: 0.6rem;
}

.admin-image-block > strong {
  display: block;
  margin-bottom: 0.45rem;
}

.admin-image-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}

.admin-image-item {
  border: 1px solid #d6d2c2;
  border-radius: 8px;
  background: #fff;
  padding: 0.4rem;
}

.admin-image-item img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #d3dce2;
  background: #eef3f6;
  display: block;
  margin-bottom: 0.3rem;
}

.admin-image-main {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  margin-bottom: 0.3rem;
}

.admin-image-remove {
  width: 100%;
}

.admin-thumb-list {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  flex-wrap: wrap;
  min-width: 170px;
}

.admin-thumb-link {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  text-decoration: none;
  color: #17344d;
  font-size: 0.76rem;
  white-space: normal;
}

.admin-thumb {
  width: 84px;
  height: 62px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #d3dce2;
  background: #eef3f6;
  display: block;
}

.pager {
  margin-top: 0.8rem;
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.msg {
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  margin: 0.6rem 0;
}

.msg.error {
  background: #fbe3e3;
  color: var(--error);
}

.msg.ok {
  background: #ddf3e3;
  color: var(--ok);
}

.place-detail {
  position: fixed;
  inset: 0;
  z-index: 120;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding: 0;
}

.place-detail.open {
  pointer-events: auto;
}

.place-detail-card {
  position: relative;
  width: 100%;
  max-width: 740px;
  height: 100dvh;
  max-height: 100dvh;
  transform: translateY(100%);
  transition: transform 180ms ease;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.2);
  border-radius: 0;
  padding: 0.9rem 0.9rem 1.1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.place-detail.open .place-detail-card {
  transform: translateY(0);
}

.place-detail-close {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  background: #fff;
  color: #17344d;
  border: none !important;
  width: 30px;
  min-width: 30px;
  min-height: 30px;
  height: 30px;
  padding: 0;
  border-radius: 8px !important;
  font-size: 1.45rem;
  line-height: 1;
  font-weight: 700;
  box-shadow: none;
  outline: none;
  overflow: hidden;
}

.place-detail h2 {
  margin: 0.2rem 0 0.6rem;
  font-size: 1.1rem;
}

.place-detail-meta {
  margin-bottom: 0.45rem;
}

.detail-place-name {
  margin: 0 0 0.55rem;
  font-size: 1.08rem;
}

.detail-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.6rem;
}

.detail-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #d3dce2;
  background: #f7fbfd;
  color: #17344d;
  font-size: 0.78rem;
  line-height: 1.2;
}

.detail-icon-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 0.65rem;
}

.detail-icon-item {
  width: 36px;
  height: 36px;
  min-height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #d3dce2;
  border-radius: 10px;
  background: #f7fbfd;
  box-shadow: none;
  padding: 0;
}

.detail-icon-item img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

.detail-icon-hint {
  position: absolute;
  z-index: 90;
  max-width: 240px;
  padding: 0.32rem 0.5rem;
  border-radius: 8px;
  background: rgba(12, 20, 28, 0.92);
  color: #fff;
  font-size: 0.8rem;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -100%);
  transition: opacity 120ms ease;
}

.detail-icon-hint.visible {
  opacity: 1;
  visibility: visible;
}

.detail-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.6rem;
}

.detail-action-row a,
.detail-action-row button {
  min-height: 36px;
  width: 36px;
  min-width: 36px;
  padding: 0;
  border-radius: 8px !important;
  overflow: hidden;
  border: 1px solid #d3dce2;
  background: #f7fbfd;
  color: #17344d;
  text-decoration: none;
  font-size: 0.98rem;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.detail-action-row .action-icon-btn i {
  line-height: 1;
}


.detail-media {
  position: relative;
  margin: 0 0 0.7rem;
  border-radius: 12px;
  overflow: hidden;
  background: #e7ecef;
}

.detail-media-stage {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: min(42vh, 420px);
  background: #cad6dd;
  cursor: zoom-in;
}

.detail-media-image,
.detail-media-frame {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  object-fit: cover;
}

.detail-media-video-wrap {
  position: relative;
  width: 100%;
  height: 100%;
}

.detail-media-open-link {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 3;
  background: rgba(17, 30, 41, 0.84);
  color: #fff;
  text-decoration: none;
  font-size: 0.78rem;
  border-radius: 8px;
  padding: 0.3rem 0.5rem;
}

.detail-media-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  min-height: 36px;
  width: 34px;
  padding: 0;
  border-radius: 9px;
  background: rgba(18, 34, 46, 0.78);
}

.detail-media-nav.prev {
  left: 6px;
}

.detail-media-nav.next {
  right: 6px;
}

.detail-media-zoom {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  min-height: 32px;
  width: 32px;
  padding: 0;
  border-radius: 8px;
  background: rgba(18, 34, 46, 0.78);
  color: #fff;
}

.detail-media-thumbs {
  display: flex;
  gap: 0.38rem;
  margin: 0.45rem 0 0.7rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}

.detail-media-thumb {
  border: 1px solid #c8d5dd;
  background: #f6fafc;
  border-radius: 8px;
  width: 66px;
  height: 52px;
  padding: 0;
  flex: 0 0 auto;
  overflow: hidden;
}

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

.detail-media-thumb.active {
  border-color: #1b648a;
  box-shadow: 0 0 0 2px rgba(27, 100, 138, 0.15);
}

.detail-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(5, 11, 16, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.detail-lightbox.open {
  display: flex;
}

.detail-lightbox-figure {
  margin: 0;
  width: min(96vw, 1300px);
  max-height: 92vh;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 0.5rem;
}

.detail-lightbox-image {
  width: 100%;
  height: 100%;
  max-height: 84vh;
  object-fit: contain;
  border-radius: 10px;
  background: #0f1920;
}

.detail-lightbox-caption {
  color: #e8f2f9;
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.9rem;
}

.detail-lightbox-close,
.detail-lightbox-nav {
  position: absolute;
  z-index: 2;
  min-height: 36px;
  width: 36px;
  padding: 0;
  border-radius: 9px;
  color: #fff;
  background: rgba(18, 34, 46, 0.82);
}

.detail-lightbox-close {
  right: 14px;
  top: 14px;
  font-size: 1.45rem;
  line-height: 1;
}

.detail-lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
}

.detail-lightbox-nav.prev {
  left: 12px;
}

.detail-lightbox-nav.next {
  right: 12px;
}

body.lightbox-open {
  overflow: hidden;
}

.place-detail-links {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.place-detail-links a {
  text-decoration: underline;
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
}

.link-logo {
  width: auto;
  height: 18px;
  max-width: 34px;
  object-fit: contain;
  display: inline-block;
}

.place-detail-links .brand-link {
  white-space: nowrap;
}

.detail-comments {
  margin-top: 0.65rem;
  border-top: 1px solid #dce4e9;
  padding-top: 0.6rem;
}

.detail-comments h4 {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
}

.detail-comments-list {
  display: grid;
  gap: 0.45rem;
}

.detail-comment-item {
  border: 1px solid #dce4e9;
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  background: #f9fcfe;
}

.detail-comment-item strong {
  display: block;
  margin-bottom: 0.12rem;
  font-size: 0.8rem;
}

.detail-comment-meta {
  display: block;
  margin-bottom: 0.24rem;
  font-size: 0.75rem;
  color: #5a7284;
}

.detail-comment-item p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.35;
}

.detail-comment-form {
  margin-top: 0.55rem;
  display: grid;
  gap: 0.4rem;
  border: 1px solid #dce4e9;
  border-radius: 10px;
  background: #fff;
  padding: 0.55rem;
}

.detail-comment-form.is-collapsed {
  display: none;
}

.detail-review-toggle {
  margin-top: 0.55rem;
  min-height: 34px;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
}

.detail-comment-form label {
  display: grid;
  gap: 0.2rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.detail-comment-form input,
.detail-comment-form select,
.detail-comment-form textarea {
  font: inherit;
  border: 1px solid #d6d2c2;
  border-radius: 8px;
  min-height: 36px;
  padding: 0.45rem 0.55rem;
  background: #fff;
}

.detail-comment-form textarea {
  min-height: 90px;
}

.no-copy {
  user-select: none;
  -webkit-user-select: none;
}

.suggest-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(8, 16, 23, 0.35);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
}

.suggest-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.suggest-modal-card {
  width: min(92vw, 420px);
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 1rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.suggest-modal-card h2 {
  margin: 0 0 0.45rem;
  font-size: 1.06rem;
}

.suggest-modal-card p {
  margin: 0 0 0.8rem;
}

.suggest-modal-actions {
  display: grid;
  gap: 0.5rem;
}

.suggest-close {
  margin-top: 0.6rem;
  background: #4b5d67;
  width: 100%;
}

.pick-hint {
  position: fixed;
  left: 12px;
  bottom: 76px;
  z-index: 66;
  background: rgba(23, 52, 77, 0.95);
  color: #fff;
  border-radius: 10px;
  padding: 0.5rem 0.7rem;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.pick-hint.visible {
  opacity: 1;
}

.pick-controls {
  position: fixed;
  left: 12px;
  bottom: 120px;
  z-index: 67;
  display: flex;
  gap: 0.45rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.pick-controls.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media (max-width: 740px) {
  .place-detail {
    padding: 0;
  }

  .place-detail-card {
    max-width: none;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .map-search {
    left: 8px;
    right: 94px;
    top: 8px;
    width: auto;
  }

  .map-search input {
    min-width: 0;
    width: 100%;
  }

  .map-search button {
    padding: 0.5rem 0.7rem;
  }

  .map-search-results {
    left: 8px;
    right: 8px;
    width: auto;
    top: 62px;
  }

  .floating-top-right {
    top: 8px;
    right: 8px;
  }

  .brand-menu-btn {
    width: 76px;
    height: 52px;
    min-width: 76px;
    border-radius: 11px;
  }

  .brand-logo {
    width: 44px;
    height: 44px;
  }

  .locate-btn {
    width: 44px;
    height: 44px;
    border-radius: 11px;
  }

  .locate-icon {
    width: 22px;
    height: 22px;
  }

  .menu-panel {
    top: 62px;
    right: 8px;
  }

  .layer-controls {
    left: 8px;
    bottom: 10px;
  }

  .layer-actions {
    gap: 0.4rem;
  }

  .layer-fab {
    width: 44px;
    height: 44px;
    border-radius: 11px;
  }

  .layer-fab img {
    width: 24px;
    height: 24px;
  }

  .layer-panel {
    width: 160px;
    bottom: 52px;
  }

  .category-filter-panel {
    width: 190px;
    bottom: 152px;
  }

  .layer-option {
    min-height: 48px;
    padding: 0.4rem 0.52rem;
  }

  .layer-option span {
    font-size: 0.8rem;
  }

  .pick-hint {
    left: 8px;
    bottom: 68px;
    font-size: 0.85rem;
  }

  .pick-controls {
    left: 8px;
    right: 8px;
    bottom: 112px;
  }

  .pick-controls button {
    flex: 1;
  }

  .admin-top {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-actions {
    width: 100%;
    justify-content: space-between;
  }

  .admin-search {
    flex-direction: column;
    align-items: stretch;
  }

  .grid-two {
    grid-template-columns: 1fr;
  }

  .choice-grid {
    grid-template-columns: 1fr;
  }

  .choice-grid.dense {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .place-page dl {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }
}

.hp-wrap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.suggest-status {
  margin: 0.2rem 0 0;
  font-size: 0.92rem;
}

.suggest-status.ok {
  color: var(--ok);
}

.suggest-status.error {
  color: var(--error);
}
