/* 机位探索（Photo Spots）—— 模块自带样式，沿用模板的色板与圆角 */

#photo-spots-root [hidden] { display: none !important; }

.spots-note {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #e6d9c8;
  border-radius: 11px;
  color: #7a6247;
  background: #fdf7ee;
  font-size: 11px;
  line-height: 1.6;
}

.spots-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.spots-primary {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}
.spots-primary:hover { background: #1d3b48; }
.spots-primary:disabled { opacity: .55; cursor: default; }

.spots-tools { display: flex; gap: 6px; }
.spots-tools button {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, .8);
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
}
.spots-tools button:hover { color: var(--ink); border-color: #b9c7c5; }

.spots-error {
  margin: 10px 0 0;
  padding: 9px 12px;
  border: 1px solid #efd3cb;
  border-radius: 11px;
  color: #9c4630;
  background: #fdf3ef;
  font-size: 11px;
  line-height: 1.6;
}

/* ------------------------------------------------------------- 表单 */

.spots-form-wrap { margin-top: 14px; }
.spot-form {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.spot-form__head { display: flex; flex-direction: column; gap: 3px; margin-bottom: 14px; }
.spot-form__head strong { font-size: 14px; }
.spot-form__head span { color: var(--muted); font-size: 11px; }

.spot-field { display: block; margin-bottom: 12px; }
.spot-field > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .08em;
}
.spot-field > span em { margin-left: 3px; color: var(--terracotta); font-style: normal; }
.spot-field input,
.spot-field select,
.spot-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, .9);
  font: inherit;
  font-size: 13px;
  line-height: 1.55;
  outline: none;
  resize: vertical;
}
.spot-field input:focus,
.spot-field select:focus,
.spot-field textarea:focus { border-color: var(--lake); box-shadow: 0 0 0 3px rgba(40, 123, 144, .1); }
.spot-field__hint { display: block; margin-top: 5px; color: var(--muted); font-size: 10.5px; line-height: 1.5; }
.spot-field__hint[data-state="ok"] { color: var(--forest); }
.spot-field__hint[data-state="warn"] { color: var(--warning); }

.spot-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.spot-picker { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spot-picker__button {
  min-height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  border: 1px dashed #b4c3c0;
  border-radius: 11px;
  color: var(--lake);
  background: var(--lake-soft);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}
.spot-picker__button:hover { border-color: var(--lake); }
.spot-picker small { color: var(--muted); font-size: 10.5px; }

.spot-previews { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.spot-preview { position: relative; width: 76px; height: 76px; }
.spot-preview img { width: 100%; height: 100%; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); }
.spot-preview button {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(19, 38, 47, .12);
}

.spot-form__actions { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.spot-form__actions button[type="button"] {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}

/* ------------------------------------------------------------- 卡片 */

.spots-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 560px) { .spots-grid { grid-template-columns: 1fr 1fr; } }

.spot-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 8px 26px rgba(25, 47, 55, .06);
}
.spot-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #eef3f1, #dfe8e6);
}
.spot-card__media[data-action] { cursor: zoom-in; }
.spot-card__media img { width: 100%; height: 100%; object-fit: cover; }
.spot-card__empty { color: var(--muted); font-size: 11px; }
.spot-card__badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(19, 38, 47, .72);
  font: 700 10px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.spot-card__body { padding: 13px 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.spot-card__title { margin: 0; font-size: 15px; line-height: 1.3; letter-spacing: -.01em; }
.spot-card__chips { display: flex; flex-wrap: wrap; gap: 5px; }
.spot-chip {
  padding: 3px 8px;
  border-radius: 999px;
  color: #46605c;
  background: #eef4f2;
  font: 650 10px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .02em;
}
.spot-card__note {
  margin: 0;
  color: #55666a;
  font-size: 12px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.spot-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}
.spot-card__actions button,
.spot-card__xhs {
  min-height: 34px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  font-size: 11px;
  font-weight: 680;
}
.spot-card__actions button:hover { color: var(--ink); background: #eef3f1; }
.spot-card__actions [data-action="delete"] { color: #9a7062; }
.spot-card__xhs { color: #c0392b; background: #fdf1ef; }
.spot-card__xhs:hover { background: #fae4e0; }

.spots-empty {
  margin-top: 16px;
  padding: 30px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  text-align: center;
  background: rgba(255, 255, 255, .55);
}
.spots-empty strong { display: block; font-size: 13px; }
.spots-empty p { margin: 8px auto 0; max-width: 340px; color: var(--muted); font-size: 11.5px; line-height: 1.7; }

@media (max-width: 420px) {
  .spot-form__row { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------- 参考图浏览 */

.spot-gallery {
  width: 100%;
  max-width: 900px;
  max-height: none;
  margin: 0;
  padding: calc(14px + var(--safe-top)) 14px calc(20px + var(--safe-bottom));
  border: 0;
  background: #0e1b21;
  color: #eaf2f2;
}
.spot-gallery::backdrop { background: rgba(8, 18, 22, .72); }
.spot-gallery > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.spot-gallery > header span {
  display: block;
  color: #8fa8ae;
  font: 700 10px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .1em;
}
.spot-gallery > header h2 { margin: 4px 0 0; font-size: 18px; line-height: 1.25; }
.spot-gallery > header button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 11px;
  color: #dbe8e8;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
}
.spot-gallery__stage { display: flex; align-items: center; gap: 8px; }
.spot-gallery__stage figure { margin: 0; flex: 1; min-width: 0; text-align: center; }
.spot-gallery__stage img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 12px;
  background: #0a1419;
}
.spot-gallery__stage figcaption {
  margin-top: 10px;
  color: #a8bfc4;
  font: 650 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.spot-gallery__nav {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 50%;
  color: #eaf2f2;
  background: rgba(255, 255, 255, .07);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.spot-gallery__nav:hover { background: rgba(255, 255, 255, .16); }

@media (min-width: 700px) {
  .spot-gallery {
    margin: auto;
    border-radius: var(--radius-lg);
    padding: 22px 22px 26px;
    max-height: 92vh;
    overflow: auto;
  }
}
