﻿/* ── Step 1: Upload / Photos ── */
.tour-hint {
  margin: 0; padding: 0 14px 8px;
  font-size: 11px; color: var(--text-4); line-height: 1.5;
}

.upload-zone {
  margin: 0 16px 16px;
  border: 1.5px dashed rgba(124,58,237,.4);
  border-radius: var(--radius);
  height: 110px; text-align: center; cursor: pointer;
  background: rgba(124,58,237,.05);
  transition: border-color .2s, background .2s;
  -webkit-tap-highlight-color: transparent;
}
.upload-zone:hover {
  border-color: var(--indigo);
  background: rgba(124,58,237,.09);
}

#takePhotoBtn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  /* form controls (button/input/select) shrink-to-fit their width even at
     display:flex/block, unlike a plain div (.upload-zone fills normally) --
     width has to be set explicitly to match the upload zone's margin inset. */
  width: calc(100% - 32px);
  margin: 10px 16px 0;
  padding: 12px;
  border: 1px solid rgba(124,58,237,.4);
  border-radius: var(--radius-sm);
  background: rgba(124,58,237,.05);
  color: var(--indigo-lt);
  font-family: var(--font);
  font-size: var(--fs-base);
  font-weight: var(--fw-semi);
  cursor: pointer;
  transition: border-color .2s, background .2s;
  -webkit-tap-highlight-color: transparent;
}
#takePhotoBtn:hover {
  border-color: var(--indigo);
  background: rgba(124,58,237,.09);
}
#takePhotoBtn svg { flex-shrink: 0; }

#uploadEmpty {
  height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 8px 20px;
}
.upload-zone p { font-size: var(--fs-base); color: var(--text-3); margin-top: 8px; }
.upload-zone p strong { color: var(--indigo-lt); }
.upload-zone .sub { font-size: var(--fs-sm); color: var(--text-4); margin-top: 3px; }

/* Gallery mode — when photos have been added */
.upload-zone.has-photos {
  display: flex; align-items: stretch; padding: 0;
  cursor: default; overflow: hidden;
  border-style: solid; border-color: var(--border); background: none;
}
.upload-zone.has-photos:hover { border-color: var(--border); background: none; }
.upload-zone.has-photos #uploadEmpty { display: none; }
.gallery-scroll {
  flex: 1; display: flex; align-items: center; gap: 8px;
  overflow-x: auto; padding: 15px 10px 15px 12px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.gallery-scroll::-webkit-scrollbar { display: none; }
.gallery-thumb {
  flex: none; position: relative; width: 80px; height: 80px;
  border-radius: 8px; overflow: hidden; scroll-snap-align: start;
  background: var(--surface-2); border: 1.5px solid var(--border);
  transition: border-color .15s; cursor: default;
}
.gallery-thumb.is-thumb { border-color: var(--indigo); box-shadow: 0 0 0 1px rgba(124,58,237,.25); }
.gallery-thumb > img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
}
.gallery-thumb .badge-360 {
  position: absolute; bottom: 3px; left: 3px; top: auto; padding: 1px 4px; font-size: 8px;
  border-radius: 3px; pointer-events: none;
}
.gallery-thumb .g-name {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.72));
  padding: 12px 5px 4px; font-size: 9px; color: rgba(255,255,255,.88);
  border: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  display: flex; align-items: center; justify-content: center; gap: 3px;
}
.gallery-thumb .g-name-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gallery-thumb .g-name svg { flex-shrink: 0; opacity: .7; }
.g-star {
  position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0,0,0,.52); border: none; color: rgba(255,255,255,.5);
  cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0;
  transition: all .15s; -webkit-tap-highlight-color: transparent;
}
.gallery-thumb.is-thumb .g-star { color: var(--indigo-lt); background: rgba(124,58,237,.3); }
.gallery-thumb.is-thumb .g-star svg polygon { fill: var(--indigo-lt); }
.g-del {
  position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0,0,0,.52); border: none; color: rgba(255,255,255,.7);
  font-size: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s; -webkit-tap-highlight-color: transparent;
}
.g-del:active { background: #ef4444; color: #fff; }
.gallery-thumb.dragging { opacity: .4; }
.gallery-thumb.drag-over { border-color: var(--indigo); }
.gallery-add-btn {
  flex-shrink: 0; width: 52px; align-self: stretch;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: none; background: none; cursor: pointer; color: var(--indigo-lt);
  border-left: 1px solid var(--border); padding: 0;
  -webkit-tap-highlight-color: transparent; transition: background .15s;
}
.gallery-add-btn:active { background: rgba(124,58,237,.07); }
.gallery-add-btn span { font-size: 9px; font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: .5px; opacity: .7; }

/* ── Guide carousel ── */
.guide-wrap { margin: 0 16px 4px; }
.guide-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 0 8px;
}
.guide-header-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-4);
}
.guide-toggle-btn {
  background: none; border: none; padding: 4px; cursor: pointer;
  color: var(--text-4); display: flex; align-items: center;
  -webkit-tap-highlight-color: transparent;
  transition: color .15s;
}
.guide-toggle-btn:hover { color: var(--indigo-lt); }
.guide-toggle-btn svg { transition: transform .25s; }
.guide-toggle-btn.collapsed svg { transform: rotate(180deg); }

.guide-body { overflow: hidden; transition: max-height .3s ease; max-height: 260px; }
.guide-body.collapsed { max-height: 0; }

.guide-track {
  display: flex; gap: 10px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0 0 10px; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.guide-track::-webkit-scrollbar { display: none; }

.guide-card {
  flex: 0 0 100%; max-width: none;
  scroll-snap-align: start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 14px 12px;
}
.guide-card-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 10px;
}
.guide-card-icon {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px;
  background: rgba(124,58,237,.12); border: 1px solid rgba(124,58,237,.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--indigo-lt);
}
.guide-card-icon svg { width: 22px; height: 22px; flex-shrink: 0; display: block; }
.guide-card-head-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.guide-card-step {
  font-size: var(--fs-xs); font-weight: var(--fw-semi); text-transform: uppercase;
  letter-spacing: 1px; color: var(--indigo-lt);
}
.guide-card-title {
  font-size: var(--fs-base); font-weight: var(--fw-bold); color: var(--text);
}
.guide-card-list {
  margin: 0; padding: 0 0 0 14px;
  display: flex; flex-direction: column; gap: 5px;
}
.guide-card-list li {
  font-size: 12px; color: var(--text-3); line-height: 1.4;
}

.guide-app-row {
  display: flex; gap: 8px; margin-top: 10px;
}
.guide-app-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 8px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  color: var(--text-2); font-size: 12px; font-weight: 600;
  text-decoration: none; transition: background .15s, border-color .15s;
  font-family: var(--font);
}
.guide-app-btn:hover { background: rgba(255,255,255,.11); border-color: rgba(255,255,255,.22); color: #fff; }
.guide-app-btn svg { flex-shrink: 0; opacity: .8; }

.guide-dots {
  display: flex; justify-content: center; gap: 6px; padding-bottom: 12px;
}
.guide-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--border); transition: background .2s, width .2s;
}
.guide-dot.active { background: var(--indigo-lt); width: 16px; border-radius: 3px; }

.photo-grid {
  display: flex; flex-direction: row;
  gap: 10px; padding: 0 16px 20px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.photo-grid::-webkit-scrollbar { display: none; }
.photo-item {
  position: relative; border-radius: var(--radius-sm); overflow: hidden;
  flex: none; width: 160px; aspect-ratio: 4/3;
  scroll-snap-align: start;
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform .18s, box-shadow .18s;
}
.photo-item:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.photo-bg {
  position: absolute; top: -5%; left: -5%; width: 110%; height: 110%;
  object-fit: cover; display: block; filter: blur(14px) brightness(0.55);
}
.photo-fg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; display: block;
}
.photo-item-name {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
  padding: 18px 7px 6px; display: flex; align-items: center; gap: 4px;
}
.photo-name-text {
  flex: 1; color: white; font-size: var(--fs-sm); font-weight: var(--fw-normal);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.photo-rename-btn {
  flex-shrink: 0; background: rgba(255,255,255,.15); border: none; border-radius: 50%;
  width: 22px; height: 22px; color: white; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
  -webkit-tap-highlight-color: transparent; transform: scaleX(-1); transition: background .15s;
}
.photo-rename-btn:active { background: rgba(124,58,237,.55); }
.photo-del {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(0,0,0,.55); border: 1.5px solid rgba(255,255,255,.4); color: white;
  font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.photo-del:active { background: #ef4444; }
.photo-thumb-star {
  position: absolute; top: 6px; left: 6px; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(0,0,0,.55); border: 1.5px solid rgba(255,255,255,.25); color: rgba(255,255,255,.5);
  cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0;
  transition: all .15s; -webkit-tap-highlight-color: transparent;
}
.photo-thumb-star svg polygon { fill: none; }
.photo-thumb-star:hover { border-color: var(--indigo-lt); color: var(--indigo-lt); }
.photo-thumb-star.is-thumb {
  background: rgba(124,58,237,.25); border-color: var(--indigo); color: var(--indigo-lt);
}
.photo-thumb-star.is-thumb svg polygon { fill: var(--indigo-lt); }
.photo-item.is-thumb { border-color: var(--indigo); box-shadow: 0 0 0 1px rgba(124,58,237,.3); }
.badge-360 {
  position: absolute; top: 32px; left: 6px; padding: 2px 5px; border-radius: 4px;
  background: rgba(124,58,237,.75); color: #fff; font-size: 10px; font-weight: 700;
  letter-spacing: .5px; pointer-events: none; line-height: 1.4;
}

