/* 推開自由門特展 — 嵌入網站內頁版面 */

.innerContent:has(.fdExperience) {
  padding-top: max(16px, calc(16 * var(--ui-scale, 1)));
  padding-bottom: max(28px, calc(32 * var(--ui-scale, 1)));
  padding-left: max(12px, 2vw);
  padding-right: max(12px, 2vw);
}

.fdExperience {
  --fd-max-w: min(1800px, 90vw, calc(86vh * 16 / 9));
  --fd-ratio: 16 / 9;
  padding: 0;
  max-width: var(--fd-max-w);
  margin: 0 auto;
  width: 100%;
}

.fdViewport {
  width: 100%;
  max-width: var(--fd-max-w);
  margin: 0 auto;
  aspect-ratio: var(--fd-ratio);
  position: relative;
  background: #ece7df;
  border: 1px solid #ddd6cb;
  overflow: hidden;
  border-radius: 2px;
}

.fdStage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #ece7df;
}

.fdScene {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.fdScene--corridor {
  position: relative;
  inset: auto;
  flex: 0 0 auto;
  height: 100%;
}

.fdScene--blur .fdSceneImg {
  filter: blur(6px) brightness(0.92);
}

.fdSceneFrame {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  line-height: 0;
}

.fdSceneFrame--corridor {
  height: 100%;
  max-width: none;
}

.fdSceneFrame--room {
  position: relative;
  display: inline-block;
  max-width: 100%;
  max-height: 100%;
  line-height: 0;
}

.fdSceneImg {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

.fdSceneFrame--corridor .fdSceneImg {
  height: 100%;
  max-height: 100%;
  width: auto;
  max-width: none;
}

.fdRoomLayer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  user-select: none;
  pointer-events: none;
}

.fdRoomLayer--base {
  position: relative;
  inset: auto;
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.fdRoomLayer--front {
  z-index: 25;
  pointer-events: none;
}

.fdRoomLayer--top {
  z-index: 26;
  pointer-events: none;
}

.fdScene--blur .fdRoomLayer {
  filter: blur(6px) brightness(0.92);
}

.fdSceneOverlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
}

.fdSceneOverlay > * {
  pointer-events: auto;
}

.fdRoomWrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fdRoomWrap .fdScene {
  position: relative;
  inset: auto;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  max-height: 100%;
}

.fdPanelSlot {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(34%, 340px);
  z-index: 46;
  pointer-events: none;
}

.fdPanelSlot:empty {
  display: none;
}

.fdPanelSlot > * {
  pointer-events: auto;
}

.fdBg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
}

.fdStartBtn {
  position: absolute;
  left: 7%;
  bottom: 10%;
  z-index: 5;
  padding: 6px 16px;
  border: 1px solid #b82020;
  background: #fff;
  color: #b82020;
  font-size: 18.67px;
  letter-spacing: 1.33px;
  cursor: pointer;
}

.fdNav {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 40;
}

.fdNavBtn,
.fdNavCenter {
  position: absolute;
  pointer-events: auto;
  border: 0;
  background: rgba(255, 255, 255, 0.72);
  color: #b82020;
  font-size: 16px;
  letter-spacing: 1.33px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 2px;
}

.fdNavBtn--left {
  left: 2%;
  top: 2%;
}

.fdNavBtn--right {
  right: 2%;
  top: 2%;
}

.fdNav--end .fdNavBtn--left,
.fdNav--end .fdNavBtn--right {
  top: auto;
  bottom: 4.5%;
}

.fdExperience:has(.fdStage--end) .fdViewport {
  background: #111;
  border-color: #2a2a2a;
}

.fdEndContent {
  width: 78%;
  max-width: 760px;
  text-align: center;
}

.fdEndTitle {
  margin-bottom: 18px;
  color: #e8b421;
}

.fdEndContent .aboutConceptParagraph {
  margin-bottom: 8px;
}

.fdNavCenter {
  left: 50%;
  top: 2%;
  transform: translateX(-50%);
  color: #555;
  font-size: 14.67px;
  background: transparent;
}

/* 換裝頁導覽：回到上方，但避開衣櫃與說明文字 */
.fdNav--dress .fdNavBtn--dress {
  top: 2.2%;
  bottom: auto;
  padding: 8px 14px;
  border: 1.5px solid rgba(92, 68, 48, 0.55);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255, 249, 236, 0.94), rgba(243, 232, 208, 0.92));
  color: #6b3a2a;
  font-family: "FIFI CJK Serif", "Noto Serif TC", "Source Han Serif TC", serif;
  font-size: clamp(13px, 1.35vw, 16px);
  letter-spacing: 0.18em;
  box-shadow:
    2px 3px 0 rgba(90, 64, 48, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.fdNav--dress .fdNavBtn--dress:hover {
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.98), rgba(248, 236, 214, 0.96));
  color: #8a2e1e;
  transform: translateY(-1px);
}

.fdNav--dress .fdNavBtn--dress:active {
  transform: translateY(1px);
  box-shadow: 1px 1px 0 rgba(90, 64, 48, 0.14);
}

/* 左側空白牆面，避開人物頭部 */
.fdNav--dress .fdNavBtn--left {
  left: 1.8%;
  right: auto;
}

/* 人物與衣櫃之間的空隙，避免壓到衣櫃上緣 */
.fdNav--dress .fdNavBtn--right {
  left: 40%;
  right: auto;
  transform: none;
}

.fdModalOverlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
  padding: 20px;
}

.fdModal {
  position: relative;
  width: min(92%, 560px);
  max-height: 82%;
  overflow: auto;
  box-sizing: border-box;
  padding: 36px 32px 28px;
  background: transparent url("../assets/images/PopUp.png") center / 100% 100% no-repeat;
  border: 0;
  box-shadow: none;
  color: #f3f3f3;
}

.fdModalTitle {
  margin: 0 0 12px;
  padding: 0 28px;
  text-align: center;
  font-size: 18.67px;
  letter-spacing: 1.33px;
  color: #fff;
}

.fdModalText {
  margin: 0 0 10px;
  line-height: 1.75;
  font-family: var(--font-body, "DIN Pro Condensed", "FIFI CJK Sans", "Noto Sans TC", "Microsoft JhengHei", sans-serif);
  font-size: 13.33px;
  font-weight: 500;
  color: #f0f0f0;
  text-align: left;
  white-space: pre-line;
}

.fdModal--slogan {
  text-align: center;
}

.fdModal--slogan .fdModalText {
  text-align: center;
  font-size: 18px;
  line-height: 1.7;
  letter-spacing: 0.06em;
}

.fdModalClose {
  position: absolute;
  left: 14px;
  top: 12px;
  right: auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  line-height: 0;
}

.fdModalClose .sitePopupCloseIcon,
.fdModalClose img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.fdModalAction {
  display: block;
  margin: 18px auto 0;
  padding: 8px 22px;
  border: 1px solid #e8b421;
  background: transparent;
  color: #e8b421;
  cursor: pointer;
}

.fdModalExtra {
  display: flex;
  justify-content: center;
  margin: 10px 0 2px;
}

.fdAudioBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #f3f3f3;
  cursor: pointer;
  line-height: 0;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.55));
  transition: transform 0.15s ease, color 0.15s ease, filter 0.15s ease;
}

.fdAudioBtn:hover {
  transform: scale(1.07);
  color: #e8b421;
}

.fdAudioBtn:active {
  transform: scale(0.96);
}

.fdAudioIconImg,
.fdAudioIconFallback,
.fdAudioIconFallback svg {
  display: block;
  width: 100%;
  height: 100%;
}

.fdAudioBtn--modal {
  width: 46px;
  height: 46px;
}

.fdAudioBtn--room {
  position: absolute;
  left: 8.5%;
  bottom: 1.8%;
  z-index: 42;
  width: clamp(36px, 4.2vw, 52px);
  height: clamp(36px, 4.2vw, 52px);
}

.fdModalAudio {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.fdCorridor {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.fdCorridorTrack {
  display: flex;
  height: 100%;
  width: max-content;
  transition: transform 0.35s ease;
  will-change: transform;
}

.fdDoorHotspot {
  position: absolute;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}

.fdDoorHotspot:hover {
  background: rgba(255, 255, 255, 0.1);
}

.fdDoorHotspot:focus-visible {
  outline: 2px solid rgba(232, 180, 33, 0.85);
  outline-offset: 2px;
}

.fdArrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 15;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 52px;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.72);
  color: #444;
  cursor: pointer;
}

.fdArrowIcon {
  display: block;
  width: 11px;
  height: 11px;
  border-right: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  box-sizing: border-box;
}

.fdArrow--left {
  left: 8px;
}

.fdArrow--left .fdArrowIcon {
  transform: translateX(2px) rotate(135deg);
}

.fdArrow--right {
  right: 8px;
}

.fdArrow--right .fdArrowIcon {
  transform: translateX(-2px) rotate(-45deg);
}

@media (min-width: 901px) {
  .fdCorridorTrack {
    width: 100%;
    display: block;
  }

  .fdScene--corridor {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    flex: none;
  }

  .fdSceneFrame--corridor {
    width: 100%;
    height: 100%;
    max-width: 100%;
  }

  .fdSceneFrame--corridor .fdSceneImg {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: fill;
  }

  .fdArrow {
    display: none;
  }
}

.fdHotspot {
  position: absolute;
  z-index: 3;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.fdHotspot--front {
  z-index: 4;
}

.fdInfoVideo {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 0 12px;
  background: #111;
  overflow: hidden;
  flex: 0 0 auto;
}

.fdInfoVideoFrame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.fdInfoVideo--pending {
  display: grid;
  place-items: center;
  color: #eee;
  font-size: 12px;
  letter-spacing: 1px;
}

.fdInfoLink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 0 12px;
  padding: 10px 12px;
  box-sizing: border-box;
  background: #fff8e1;
  border: 1px solid rgba(90, 64, 48, 0.22);
  color: #5a4030;
  text-decoration: none;
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.fdInfoLink:hover {
  background: #fff;
  color: #b82020;
}

.fdHotspotHint {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(12px, 1.45vw, 20px);
  height: clamp(12px, 1.45vw, 20px);
  transform: translate(-50%, -50%);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 1px #000) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.75));
  animation: fdHotspotHintPulse 1.6s ease-in-out infinite;
}

.fdHotspotHintArrow {
  width: 54%;
  height: 54%;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg) translate(-12%, -12%);
  box-sizing: border-box;
}

.fdRoomWrap--panelOpen .fdHotspotHint {
  display: none;
}

@keyframes fdHotspotHintPulse {
  0%,
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -56%) scale(1.08);
  }
}

.fdHotspot--wallCatch {
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  cursor: default;
}

.fdHotspot--wallCatch:hover,
.fdHotspot--wallCatch.isActive {
  background: transparent;
}

.fdHotspot:focus,
.fdHotspot:focus-visible {
  outline: none;
}

.fdInfoPanel {
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 40px 14px 14px;
  /* 牆面奶油黃再淺一點，透明度 75% */
  background: rgba(255, 248, 225, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-left: 1px solid rgba(255, 255, 255, 0.4);
  overflow: auto;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.14);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  -webkit-overflow-scrolling: touch;
}

.fdInfoClose {
  position: absolute;
  right: 8px;
  top: 8px;
  border: 0;
  background: transparent;
  font-size: 29.33px;
  cursor: pointer;
  z-index: 2;
}

.fdInfoLabel {
  margin: 0 0 2px;
  font-size: 11px;
  color: #666;
  text-align: left;
}

.fdInfoTitle {
  margin: 0 0 14px;
  font-size: 17px;
  color: #222;
  text-align: center;
}

.fdInfoBody {
  margin: 0 0 12px;
  line-height: 1.75;
  font-family: var(--font-body, "DIN Pro Condensed", "FIFI CJK Sans", "Noto Sans TC", "Microsoft JhengHei", sans-serif);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
}

.fdInfoBody + .fdInfoBody {
  margin-top: -6px;
}

.fdInfoPhoto {
  margin: 0 0 12px;
  flex: 0 0 auto;
  line-height: 0;
  text-align: center;
}

.fdInfoPhotoImg {
  display: inline-block;
  width: 60%;
  height: auto;
  max-width: 60%;
  max-height: none;
  object-fit: contain;
  object-position: center;
}

.fdInfoPanel--wall .fdInfoPhotoImg,
.fdInfoPanel--guanyin .fdInfoPhotoImg {
  width: 92%;
  max-width: 92%;
}

.fdInfoPanel--wardrobe {
  overflow: hidden;
}

.fdInfoPanel--wardrobe .fdInfoPhoto,
.fdInfoPanel--clothes .fdInfoPhoto {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fdInfoPanel--wardrobe .fdInfoPhotoImg,
.fdInfoPanel--clothes .fdInfoPhotoImg {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.fdInfoPhotoPlaceholder {
  min-height: 80px;
  display: grid;
  place-items: center;
  background: #e8e4dc;
  color: #888;
  font-size: 11px;
  margin-bottom: 12px;
  flex: 0 0 auto;
}

.fdInfoCta {
  width: 100%;
  margin: 4px 0 12px;
  padding: 10px 12px;
  border: 1.5px solid #b82020;
  background: #b82020;
  color: #fff;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.06em;
  cursor: pointer;
  flex: 0 0 auto;
  order: 5;
}

.fdInfoPanel--wardrobe .fdInfoPhoto,
.fdInfoPanel--wardrobe .fdInfoPhotoPlaceholder {
  order: 6;
}

.fdInfoCta:active {
  background: #9a1a1a;
}

.fdSubmitLayout {
  position: absolute;
  inset: 40px 16px 14px;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 16px;
  align-items: stretch;
}

.fdDressLayout {
  position: absolute;
  inset: 36px 12px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 12px;
}

.fdDressScene {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1814;
}

.fdDressFrame {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 16 / 9;
  margin: auto;
  overflow: hidden;
  line-height: 0;
}

.fdDressLayer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

.fdDressAvatarHost {
  position: absolute;
  inset: 0;
  z-index: 2;
  transform: translateX(-7%);
  transform-origin: center center;
}

.fdDressLayer--hang {
  z-index: 3;
}

.fdHangHitLayer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.fdHangHit {
  position: absolute;
  pointer-events: auto;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.fdHangHit:hover,
.fdHangHit.isColorTarget,
.fdHangHit.isActive {
  border: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
}

.fdPaletteFloat {
  position: absolute;
  left: 29%;
  bottom: 4%;
  width: 22%;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
  pointer-events: none;
}

.fdPaletteHint {
  font-size: clamp(10px, 1.15vw, 13px);
  line-height: 1.2;
  color: #5a4030;
  background: rgba(255, 248, 230, 0.9);
  border: 1px solid rgba(90, 64, 48, 0.25);
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  pointer-events: none;
}

.fdPaletteBox {
  position: relative;
  width: 100%;
  cursor: crosshair;
  pointer-events: auto;
}

.fdPaletteImg {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
}

/* 操作說明：放在按鈕下方、牆面中央空隙，避開頭／腳／衣櫃 */
.fdDressTargetNote {
  position: absolute;
  left: 26%;
  right: auto;
  top: 12%;
  bottom: auto;
  z-index: 9;
  width: 26%;
  max-width: none;
  font-size: clamp(9px, 0.95vw, 11px);
  line-height: 1.4;
  text-align: center;
  color: #4a3728;
  background: rgba(255, 248, 230, 0.9);
  border: 1px solid rgba(90, 64, 48, 0.18);
  padding: 7px 10px;
  pointer-events: none;
}

.fdDressPreview {
  display: grid;
  place-items: center;
  min-height: 0;
  min-width: 0;
  padding: 8px;
}

.fdCharacter--dress {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.fdCharacter {
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  min-height: 0;
}

.fdAvatarStack {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #1a1814;
}

.fdAvatarLayer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

.fdCharacter--submit {
  width: 100%;
  min-height: 0;
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  padding-top: 0;
  background: transparent;
  overflow: hidden;
}

.fdCroppedPreviewImg {
  display: block;
  width: auto;
  height: auto;
  max-width: min(48%, 220px);
  max-height: 86%;
  object-fit: contain;
  object-position: center center;
  user-select: none;
  pointer-events: none;
}

.fdCharacterSvg {
  width: min(72%, 168px);
  height: auto;
  max-height: 92%;
}

.fdDressControls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow: auto;
}

.fdDressHint {
  margin: 0;
  text-align: center;
  color: #666;
  font-size: 16px;
}

.fdStyleRow,
.fdColorTargetRow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.fdStyleBtn,
.fdColorTargetBtn {
  padding: 8px 10px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
  font-size: 16px;
}

.fdStyleBtn.isActive,
.fdColorTargetBtn.isActive {
  border-color: #b82020;
  color: #b82020;
}

.fdColorTargetLabel {
  font-size: 16px;
  color: #666;
}

.fdPalette {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.fdSwatch {
  aspect-ratio: 1;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 999px;
  cursor: pointer;
}

.fdSwatch.isActive {
  outline: 3px solid #b82020;
  outline-offset: 2px;
}

.fdSubmitForm {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f3efe6;
  border: 1px solid #ddd;
  padding: 16px;
}

.fdInput,
.fdTextarea {
  width: 100%;
  border: 1px solid #ccc;
  padding: 10px 12px;
  font-family: var(--font-body, "DIN Pro Condensed", "FIFI CJK Sans", "Noto Sans TC", "Microsoft JhengHei", sans-serif);
  font-size: var(--type-body, 16px);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: normal;
  background: #fff;
  box-sizing: border-box;
}

.fdInput::placeholder,
.fdTextarea::placeholder {
  font-weight: 400;
  opacity: 0.72;
}

.fdTextarea {
  min-height: 120px;
  resize: vertical;
}

.fdCounter {
  font-size: 16px;
  color: #777;
  text-align: right;
}

.fdUploadStatus {
  font-size: 17.33px;
  color: #555;
  line-height: 1.6;
}

.fdGalleryBody {
  position: absolute;
  inset: 42px 12px 10px;
  overflow: auto;
  padding: 0 4px 8px;
}

.fdGalleryHeader h2 {
  margin: 0 0 4px;
  font-size: clamp(16px, 1.8vw, 20px);
}

.fdGalleryNote,
.fdGalleryPendingNote {
  display: none;
}

.fdGalleryGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 12px;
  align-items: start;
}

.fdGalleryCard {
  background: rgba(255, 252, 245, 0.94);
  border: 1px solid rgba(90, 64, 48, 0.18);
  padding: 8px 8px 10px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.fdGalleryImg {
  width: auto;
  max-width: 100%;
  height: min(28vh, 220px);
  margin: 0 auto;
  object-fit: contain;
  object-position: center bottom;
  display: block;
  background: transparent;
}

.fdGalleryImg--placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: min(28vh, 220px);
  color: #999;
  font-size: 13px;
  background: rgba(243, 239, 230, 0.7);
}

.fdGalleryMeta {
  width: 100%;
  margin-top: 8px;
  text-align: center;
}

.fdGalleryTitle {
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 700;
  color: #3f2d22;
  word-break: break-word;
}

.fdGalleryAuthor {
  margin: 0 0 4px;
  font-size: 12px;
  color: #7a5a45;
  line-height: 1.4;
  word-break: break-word;
}

.fdGalleryConcept {
  margin: 0;
  font-size: 12px;
  color: #555;
  line-height: 1.45;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fdGalleryEmpty,
.fdGalleryLoading {
  grid-column: 1 / -1;
  text-align: center;
  color: #777;
  font-size: 14px;
  padding: 20px 8px;
}

.fdGalleryOwn {
  margin: 0 0 12px;
}

.fdGalleryOwn h3 {
  margin: 0 0 8px;
  font-size: 14px;
  color: #6b3a2a;
}

.fdGalleryCard--own {
  max-width: 200px;
  border-color: rgba(140, 70, 48, 0.45);
}

.fdGalleryOwn .fdGalleryImg {
  height: min(30vh, 240px);
}

.fdGalleryPendingNote {
  display: none;
}

.fdNavBtn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.aboutActions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
  justify-content: center;
}

.fdAboutStartBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border: 1px solid #b82020;
  background: #b82020;
  color: #fff;
  text-decoration: none;
  letter-spacing: 1.33px;
  font-size: 20px;
}

.fdAboutStartBtn:hover {
  background: #9a1a1a;
}

/* —— 手機換裝／投稿／作品牆 —— */
.fdDressMobile {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 8px 0;
  overflow: hidden;
  background: #f6efd8;
}

.fdDressMobile--tap {
  padding-bottom: 0;
}

.fdDressMobileTip {
  margin: 0;
  flex: 0 0 auto;
  text-align: center;
  font-size: 12px;
  line-height: 1.35;
  color: #5a4030;
  background: rgba(255, 248, 230, 0.94);
  border: 1px solid rgba(90, 64, 48, 0.18);
  padding: 6px 8px;
}

.fdDressMobileStage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 2px 0;
}

.fdDressMobilePreviewFrame {
  position: relative;
  /* 與人物裁切 PNG 同比例，熱區才能對準 */
  aspect-ratio: 760 / 2040;
  height: min(100%, var(--fd-char-h, 80vh));
  max-height: 100%;
  width: auto;
  max-width: min(var(--fd-char-max-w-vw, 51vw), var(--fd-char-max-w-px, 240px));
  transform: translate(var(--fd-char-offset-x, 0px), var(--fd-char-offset-y, 0px));
  line-height: 0;
}

.fdDressMobilePreview,
.fdDressMobilePreview--full {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  background: transparent;
}

.fdDressMobilePreviewImg {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: center center;
  pointer-events: none;
  user-select: none;
}

.fdDressMobileZones {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.fdDressMobileZone {
  position: absolute;
  /* left / width 由 JS BODY_ZONES inline style 設定 */
  pointer-events: auto;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  appearance: none;
}

.fdDressMobileZone:active,
.fdDressMobileZone:focus,
.fdDressMobileZone:focus-visible {
  background: transparent;
  outline: none;
  box-shadow: none;
}

.fdDressMobileActions {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  background: rgba(246, 239, 216, 0.98);
  border-top: 1px solid rgba(90, 64, 48, 0.12);
}

.fdMobileActionBtn {
  border: 1.5px solid rgba(92, 68, 48, 0.5);
  padding: 10px 8px;
  font-family: "FIFI CJK Serif", "Noto Serif TC", serif;
  font-size: 14px;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.fdMobileActionBtn--ghost {
  background: rgba(255, 248, 230, 0.95);
  color: #6b3a2a;
}

.fdMobileActionBtn--primary {
  background: #6b3a2a;
  color: #fff8ef;
  border-color: #6b3a2a;
}

.fdMobileActionBtn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.fdMobileSheetOverlay {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(40, 30, 22, 0.42);
  padding: 12px 10px calc(10px + env(safe-area-inset-bottom, 0px));
}

.fdMobileSheet {
  width: min(100%, 420px);
  max-height: min(78%, 560px);
  display: flex;
  flex-direction: column;
  background: #fffaf1;
  border: 1px solid rgba(90, 64, 48, 0.22);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.fdMobileSheetHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 12px 8px;
  border-bottom: 1px solid rgba(90, 64, 48, 0.12);
}

.fdMobileSheetTitle {
  margin: 0;
  font-size: 16px;
  color: #3f2d22;
}

.fdMobileSheetSub {
  margin: 4px 0 0;
  font-size: 12px;
  color: #7a5a45;
}

.fdMobileSheetClose {
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: #6b3a2a;
  cursor: pointer;
  padding: 0 4px;
}

.fdMobileSheetBody {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px;
  -webkit-overflow-scrolling: touch;
}

.fdMobileSheetFooter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(90, 64, 48, 0.12);
  background: #f7f0e2;
}

.fdMobileSheetFooter:has(> :only-child) {
  grid-template-columns: 1fr;
}

.fdMobileHangRow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.fdMobileHangRow--outer {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.fdMobileHangBtn {
  border: 1.5px solid rgba(92, 68, 48, 0.35);
  background: rgba(255, 252, 245, 0.95);
  padding: 6px;
  cursor: pointer;
  text-align: center;
}

.fdMobileHangBtn--text {
  min-height: 88px;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: #6b3a2a;
}

.fdMobileHangBtn.isActive,
.fdMobileHangBtn.isColorTarget {
  border-color: #8a2e1e;
  box-shadow: inset 0 0 0 1px rgba(138, 46, 30, 0.35);
  background: #fff8ef;
}

.fdMobileHangThumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: #efe8da;
  margin-bottom: 4px;
}

.fdMobileHangThumbImg {
  position: absolute;
  max-width: none;
  pointer-events: none;
  user-select: none;
}

.fdMobileHangLabel {
  display: block;
  font-size: 12px;
  color: #4a3728;
  line-height: 1.2;
}

.fdPaletteFloat--sheet {
  position: relative;
  left: auto;
  bottom: auto;
  width: min(70%, 220px);
  margin: 8px auto 0;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.2));
}

.fdPaletteFloat--sheet .fdPaletteHint {
  font-size: 12px;
}

.fdStage--dressMobile,
.fdStage--submitMobile,
.fdStage--galleryMobile {
  background: #f6efd8;
}

.fdSubmitLayout--mobile {
  --fd-submit-inset-t: 22px;
  --fd-submit-inset-x: 10px;
  --fd-submit-inset-b: 62px;
  --fd-submit-gap: 10px;
  --fd-submit-char-flex: 1.65;
  --fd-submit-form-flex: 0.85;
  --fd-submit-char-max-w: min(55vw, 138px);
  --fd-submit-char-max-h: 100%;
  --fd-submit-char-offset-x: 0px;
  --fd-submit-char-offset-y: 0px;
  --fd-submit-form-pad: 10px;
  --fd-submit-form-gap: 8px;
  --fd-submit-textarea-min-h: 72px;

  position: absolute;
  inset: var(--fd-submit-inset-t) var(--fd-submit-inset-x) var(--fd-submit-inset-b);
  display: flex;
  flex-direction: column;
  gap: var(--fd-submit-gap);
  overflow: hidden;
  height: auto;
  min-height: 0;
}

.fdSubmitLayout--mobile .fdCharacter--submit {
  position: relative;
  flex: var(--fd-submit-char-flex) 1 0;
  min-height: 0;
  width: 100%;
  display: block;
  padding-top: 0;
  overflow: hidden;
  background: transparent;
}

.fdSubmitLayout--mobile .fdCroppedPreviewImg {
  /* 絕對置中 + 雙向 max，確保全身完整顯示、不被父層裁切 */
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  max-width: min(100%, var(--fd-submit-char-max-w));
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center center;
  transform: translate(var(--fd-submit-char-offset-x), var(--fd-submit-char-offset-y));
}

.fdSubmitLayout--mobile .fdSubmitForm {
  flex: var(--fd-submit-form-flex) 1 0;
  display: flex;
  flex-direction: column;
  gap: var(--fd-submit-form-gap);
  padding: var(--fd-submit-form-pad);
  overflow: auto;
  min-height: 0;
  max-height: none;
  background: rgba(243, 239, 230, 0.96);
  border: 1px solid rgba(90, 64, 48, 0.16);
  z-index: 2;
  -webkit-overflow-scrolling: touch;
}

.fdSubmitLayout--mobile .fdInput,
.fdSubmitLayout--mobile .fdTextarea {
  flex: 0 0 auto;
}

.fdSubmitLayout--mobile .fdTextarea {
  min-height: var(--fd-submit-textarea-min-h);
  max-height: none;
}

.fdSubmitMobileActions,
.fdGalleryMobileActions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  background: rgba(246, 239, 216, 0.98);
  border-top: 1px solid rgba(90, 64, 48, 0.12);
}

.fdStage--galleryMobile .fdGalleryBody {
  inset: 10px 10px 62px;
}

.fdStage--galleryMobile .fdGalleryGrid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fdStage--galleryMobile .fdGalleryImg,
.fdStage--galleryMobile .fdGalleryImg--placeholder {
  height: min(24vh, 180px);
}

.fdStage--galleryMobile .fdGalleryCard--own {
  max-width: none;
}

@media (max-width: 900px) {
  .fdExperience {
    --fd-max-w: 100%;
    --fd-ratio: 9 / 16;
  }

  .fdExperience:has(.fdStage--dressMobile),
  .fdExperience:has(.fdStage--submitMobile),
  .fdExperience:has(.fdStage--galleryMobile) {
    --fd-ratio: 9 / 16;
  }

  .fdExperience:has(.fdStage--end) {
    --fd-ratio: 16 / 9;
  }

  .innerContent:has(.fdExperience) {
    padding-left: 8px;
    padding-right: 8px;
    padding-top: 8px;
  }

  .fdViewport {
    max-height: min(88vh, 820px);
    border-left: 0;
    border-right: 0;
  }

  .fdDressLayout,
  .fdSubmitLayout:not(.fdSubmitLayout--mobile) {
    grid-template-columns: 1fr;
    inset: 40px 8px 8px;
    gap: 10px;
  }

  .fdGalleryGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .fdGalleryImg,
  .fdGalleryImg--placeholder {
    height: min(24vh, 170px);
  }

  .fdRoomWrap {
    align-items: center;
    justify-content: center;
  }

  .fdRoomWrap .fdScene {
    max-width: 100%;
    max-height: 100%;
    flex: 1 1 auto;
  }

  .fdPanelSlot {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: min(52%, 360px);
    min-height: 200px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 46;
  }

  .fdPanelSlot > * {
    flex: 1 1 auto;
    min-height: 0;
  }

  .fdRoomWrap--panelOpen ~ .fdAudioBtn--room {
    display: none;
  }

  .fdInfoPanel {
    position: relative;
    inset: auto;
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 248, 225, 0.75);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.16);
    padding: 36px 14px 12px;
    overflow-x: hidden;
    overflow-y: auto;
    text-align: left;
  }

  .fdInfoLabel,
  .fdInfoBody {
    text-align: left;
  }

  .fdInfoTitle {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
  }

  .fdInfoBody {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 10px;
  }

  .fdInfoPhotoPlaceholder {
    display: none;
  }

  .fdInfoPhoto {
    display: block;
    text-align: center;
  }

  .fdInfoPhotoImg {
    display: inline-block;
    width: 60%;
    max-width: 60%;
    height: auto;
    object-fit: contain;
  }

  .fdInfoVideo {
    margin-bottom: 10px;
  }

  .fdInfoLink {
    font-size: 11px;
    padding: 8px 10px;
  }

  .fdInfoPanel--wall .fdInfoPhotoImg,
  .fdInfoPanel--guanyin .fdInfoPhotoImg {
    width: 88%;
    max-width: 88%;
  }

  .fdInfoPanel--wardrobe .fdInfoPhotoImg,
  .fdInfoPanel--clothes .fdInfoPhotoImg {
    width: 72%;
    max-width: 72%;
    max-height: 160px;
    height: auto;
  }

  .fdInfoPanel--wardrobe {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .fdInfoPanel--wardrobe .fdInfoPhoto,
  .fdInfoPanel--clothes .fdInfoPhoto {
    flex: 0 0 auto;
    min-height: 120px;
    margin: 8px 0 12px;
    order: 4;
  }

  .fdInfoPanel--wardrobe .fdInfoCta {
    position: sticky;
    bottom: 0;
    z-index: 3;
    margin: 8px 0 0;
    padding: 12px 10px;
    font-size: 12px;
    box-shadow: 0 -8px 12px rgba(255, 248, 225, 0.9);
  }

  .fdNavBtn {
    font-size: 14px;
    padding: 8px 10px;
  }

  .fdNav--end .fdNavBtn {
    font-size: 11px;
    padding: 4px 6px;
    letter-spacing: 0.02em;
    max-width: 48%;
    white-space: nowrap;
  }

  .fdNav--end .fdNavBtn--left,
  .fdNav--end .fdNavBtn--right {
    bottom: 3.5%;
  }

  .fdEndContent {
    width: auto;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    text-align: center;
    letter-spacing: 0.02em;
  }

  .fdEndTitle {
    margin-bottom: 8px;
    letter-spacing: 0.04em;
  }

  .fdEndContent .aboutConceptParagraph {
    letter-spacing: 0.02em;
    line-height: 1.45;
    margin-bottom: 4px;
  }

  .fdModal {
    width: min(94%, 560px);
    max-height: 78%;
    padding: 28px 20px 20px;
  }

  .fdModalTitle {
    font-size: 16px;
    text-align: center;
  }

  .fdModalText {
    font-size: 13px;
    line-height: 1.65;
  }

  .fdModal--slogan .fdModalText {
    font-size: 16px;
    line-height: 1.7;
  }

  .fdNav--dress .fdNavBtn--dress {
    top: 2%;
    bottom: auto;
    padding: 7px 10px;
    font-size: 12px;
    letter-spacing: 0.12em;
  }

  .fdNav--dress .fdNavBtn--right {
    left: 36%;
    right: auto;
  }

  .fdDressTargetNote {
    font-size: 9px;
    left: 22%;
    width: 30%;
    top: 14%;
    bottom: auto;
    max-width: none;
  }

  .fdNavCenter {
    display: none;
  }

  .fdArrow {
    width: 40px;
    height: 52px;
  }
}

@media (max-width: 520px) {
  .fdGalleryGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fdGalleryImg,
  .fdGalleryImg--placeholder,
  .fdGalleryOwn .fdGalleryImg {
    height: min(22vh, 150px);
  }

  .fdDressMobilePreviewFrame {
    height: min(100%, var(--fd-char-h, 80vh));
    max-width: min(var(--fd-char-max-w-vw, 51vw), var(--fd-char-max-w-px, 240px));
  }

  .fdSubmitLayout--mobile .fdCroppedPreviewImg {
    max-width: var(--fd-submit-char-max-w, min(46vw, 180px));
  }

  .fdPalette {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
