/* H5 试玩模式 · 编辑态样式 */

body.editor-mode-active {
  padding-top: calc(36px + env(safe-area-inset-top, 0));
}

body.editor-mode-active.has-contact-footer {
  padding-bottom: calc(148px + env(safe-area-inset-bottom, 0px));
}

body.editor-mode-active.showcase-back-active {
  padding-top: calc(36px + 44px + env(safe-area-inset-top, 0));
}

.em-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  min-height: 36px;
  padding: 6px 2.5rem 6px 0.75rem;
  padding-top: calc(6px + env(safe-area-inset-top, 0));
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
  backdrop-filter: blur(4px);
}

.em-bar__close {
  position: absolute;
  top: calc(6px + env(safe-area-inset-top, 0));
  right: 0.5rem;
  width: 1.75rem;
  height: 1.75rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.em-editable {
  cursor: pointer;
  border-radius: 4px;
  border: 1px dashed rgba(33, 150, 243, 0.45);
  transition: border-color 0.15s ease;
}

.em-editable:active,
.em-editable.em-editing {
  border: 2px solid #2196f3;
}

.em-editable-img {
  cursor: pointer;
  outline: 2px dashed rgba(33, 150, 243, 0.45);
  outline-offset: 2px;
}

.em-editable-img:active {
  outline: 2px solid #2196f3;
}

.hero__bg.em-editable-img {
  outline-offset: -4px;
}

.em-editable-media {
  cursor: pointer;
}

.em-editable-video {
  outline: 3px dashed rgba(147, 51, 234, 0.55);
  outline-offset: 2px;
}

.em-editable-audio {
  outline: 3px dashed rgba(147, 51, 234, 0.75) !important;
  outline-offset: 3px;
}

.em-toast {
  position: fixed;
  left: 50%;
  bottom: calc(10rem + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 10001;
  max-width: 90vw;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  font-size: 0.8rem;
  text-align: center;
  pointer-events: none;
}

.em-toast[hidden] {
  display: none !important;
}

.em-editable-type {
  cursor: pointer;
}

.em-editable-date {
  outline: 2px dashed rgba(234, 88, 12, 0.65) !important;
  outline-offset: 3px;
  border-radius: 6px;
}

.em-editable-theme {
  outline: 2px dashed rgba(236, 72, 153, 0.75) !important;
  outline-offset: 3px;
}

.em-editable-mode-switch,
.em-mode-switch {
  position: fixed;
  top: calc(44px + env(safe-area-inset-top, 0));
  left: 50%;
  transform: translateX(-50%);
  z-index: 9998;
  border: 2px dashed rgba(236, 72, 153, 0.85);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  cursor: pointer;
}

.em-editable-button-text {
  outline: 1px dashed rgba(33, 150, 243, 0.55);
  outline-offset: 2px;
  border-radius: 4px;
}

body.editor-mode-active .compare-tag {
  pointer-events: auto;
  cursor: pointer;
}

body.editor-mode-active .theme-panel__list:not([hidden]) {
  display: flex !important;
}

.em-editable-count {
  outline: 2px dashed rgba(59, 130, 246, 0.75) !important;
  outline-offset: 3px;
  border-radius: 6px;
}

.em-editable-map {
  outline: 2px dashed rgba(34, 197, 94, 0.75) !important;
  outline-offset: 3px;
  border-radius: 4px;
}

.em-editable-music,
.em-music-label {
  position: fixed;
  right: calc(1rem + env(safe-area-inset-right, 0));
  bottom: calc(9.5rem + env(safe-area-inset-bottom, 0));
  z-index: 9997;
  max-width: 42vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 2px dashed rgba(147, 51, 234, 0.75);
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  cursor: pointer;
}

.em-password-chip {
  position: fixed;
  top: calc(78px + env(safe-area-inset-top, 0));
  left: 50%;
  transform: translateX(-50%);
  z-index: 9998;
  border: 2px dashed rgba(168, 85, 247, 0.85);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  cursor: pointer;
}

.em-editable-password {
  outline: 2px dashed rgba(168, 85, 247, 0.75) !important;
  outline-offset: 3px;
  border-radius: 4px;
}

.em-pwd-preview {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10002;
  width: min(88vw, 320px);
  padding: 1rem;
  border-radius: 16px;
  background: rgba(20, 20, 30, 0.94);
  color: #fff;
  font-size: 0.85rem;
  line-height: 1.5;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.em-pwd-preview[hidden] {
  display: none !important;
}

.em-pwd-preview__title {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.em-pwd-preview__note {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  opacity: 0.85;
}

.em-pwd-preview__close {
  display: block;
  margin: 0.75rem auto 0;
  border: none;
  border-radius: 999px;
  padding: 0.35rem 1rem;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
}

/* 普通 Demo 页 · 进入试玩入口（底部居中，避开 Hero 遮挡） */
.em-entry-btn {
  position: fixed;
  left: 50%;
  bottom: calc(6.85rem + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 960;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  padding: 0.55rem 1.15rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
  box-shadow: 0 4px 20px rgba(33, 150, 243, 0.45);
  cursor: pointer;
  white-space: nowrap;
  animation: em-entry-pulse 2.5s ease-in-out infinite;
}

@keyframes em-entry-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(33, 150, 243, 0.45); }
  50% { box-shadow: 0 4px 28px rgba(33, 150, 243, 0.75); }
}

.em-entry-btn:active {
  transform: translateX(-50%) scale(0.97);
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
}

/* R65 / 旅行 Vlog · 试玩模式媒体替换 */
body.editor-mode-active .photo-overlay,
body.editor-mode-active .video-card-play,
body.editor-mode-active .video-card-badge,
body.editor-mode-active .hero-overlay,
body.editor-mode-active .hero-mobile-play {
  pointer-events: none;
}

body.editor-mode-active .photo-card,
body.editor-mode-active .photo-masonry-item,
body.editor-mode-active .em-editable-img-zone {
  cursor: pointer;
}

body.editor-mode-active .video-card-cover.em-editable-img,
body.editor-mode-active .photo-img.em-editable-img {
  position: relative;
  z-index: 2;
}

body.editor-mode-active .hero-video-wrapper.em-editable-video-zone {
  outline: 3px dashed rgba(147, 51, 234, 0.55);
  outline-offset: -3px;
  cursor: pointer;
}

body.editor-mode-active .video-card-preview.em-editable-video,
body.editor-mode-active .video-card-preview.em-editable-preview-video {
  pointer-events: auto;
  opacity: 0.28;
  outline: 2px dashed rgba(147, 51, 234, 0.65);
  outline-offset: -2px;
  z-index: 1;
}
