/* Experience presentation and admin tools share sizing, not editing controls. */
[hidden] { display: none !important; }
body.experience-is-open { overflow: hidden; }
#experienceModal { padding: clamp(8px, 2vw, 24px); }
#experienceModal .experience-modal-panel {
  display: flex; flex-direction: column; gap: 0; padding: 0;
  width: min(860px, 100%); max-height: calc(100dvh - 48px); min-width: 0;
  overflow: hidden; border-radius: 20px;
}
.experience-modal-toolbar {
  display: flex; flex: 0 0 auto; align-items: center; gap: 12px;
  min-height: 60px; padding: 9px 16px; background: var(--cream);
  border-bottom: 1px solid var(--line);
}
#experienceModal .modal-close { position: static; margin-left: auto; flex: 0 0 38px; height: 38px; width: 38px; }
.popup-step { font: 600 12px/1.5 var(--sans); color: var(--green); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.popup-back { flex: 0 0 auto; border: 0; background: none; color: var(--green); font: 600 12px/1.5 var(--sans); padding: 9px 0; cursor: pointer; }
.experience-modal-scroll { overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
.experience-cover { isolation: isolate; position: relative; display: grid; place-items: center; min-height: min(490px, 68dvh); padding: 60px 32px; overflow: hidden; background: #244b46; }
.experience-cover-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(2px); transform: scale(1.03); z-index: -2; }
.experience-cover-shade { position: absolute; inset: 0; background: linear-gradient(180deg, #12262270, #122622d9); z-index: -1; }
.experience-cover-copy { width: min(600px, 100%); text-align: center; color: #fffaf3; }
.experience-cover-copy .eyebrow { color: #f4cda5; }
#experienceModal #modalExperienceTitle { color: #fffaf3; font-size: clamp(32px, 4vw, 54px); line-height: 1.07; margin: 16px 0; overflow-wrap: anywhere; }
#modalExperienceDescription { font: 400 15px/1.7 var(--sans); max-width: 52ch; margin: 0 auto 26px; color: #fffaf3; }
#modalExperienceDescription[contenteditable="true"]:empty::before { content: attr(data-placeholder); opacity: .7; }
.cover-edit { position: absolute; right: 16px; top: 16px; background: #fffaf3; color: #244b46; border: 0; border-radius: 20px; padding: 9px 14px; cursor: pointer; }
.experience-details { padding: clamp(18px, 3vw, 32px); }
#experienceModal .community-viewer { display: block; background: none; border: 0; border-radius: 0; padding: 0; margin: 0; }
.subitem-heading { text-align: center; max-width: 60ch; margin: 0 auto 20px; }
#experienceModal #communityName { font-size: clamp(28px, 3vw, 40px); line-height: 1.15; margin: 9px 0; }
#experienceModal #communityText { font: 400 14px/1.75 var(--sans); margin: 0; }
#experienceModal .experience-modal-gallery { min-height: 0; height: auto; aspect-ratio: 16 / 8; width: 100%; max-height: 310px; border-radius: 12px; box-shadow: none; background: #ebe6dc; }
#experienceModal .experience-modal-gallery::after { display: none; }
#experienceModal .experience-modal-gallery img { position: absolute; inset: 0; height: 100%; width: 100%; opacity: 1; filter: none; transform: none; object-fit: cover; transition: none; pointer-events: none; }
.gallery-empty { display: grid; place-items: center; position: absolute; inset: 0; width: 100%; height: 100%; border: 1px dashed #244b4660; border-radius: 12px; background: #f4f0e7; color: #244b46; font: 600 14px/1.5 var(--sans); margin: 0; padding: 24px; text-align: center; }
button.gallery-empty { cursor: pointer; }
.experience-photo-thumbnails { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.experience-photo-thumbnails button { width: 64px; aspect-ratio: 4/3; border: 2px solid transparent; border-radius: 7px; padding: 2px; background: none; cursor: pointer; overflow: hidden; }
.experience-photo-thumbnails button[aria-pressed="true"] { border-color: var(--copper); }
.experience-photo-thumbnails img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }
.subitem-photo-tools { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; margin-top: 12px; }
.subitem-photo-tools button { background: none; border: 0; text-decoration: underline; color: var(--green); font: 500 12px/1.5 var(--sans); cursor: pointer; padding: 8px 0; }
#clearSubitemPhotos { color: #80574c; }
#experienceModal .community-actions { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.community-actions button:disabled { opacity: .4; cursor: default; }
.subitem-create { margin-top: 20px; text-align: center; }
.subitem-create button { border: 1px dashed #244b4660; padding: 12px 22px; border-radius: 8px; background: none; color: var(--green); cursor: pointer; font: 600 13px/1.5 var(--sans); }
.empty-subitems { text-align: center; padding: 40px 20px; font-size: 14px; }
.experience-booking { padding: 20px 28px; border-top: 1px solid var(--line); }
#experienceModal .experience-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
#experienceModal .btn { padding: 13px 20px; font-size: 11px; min-height: 42px; max-width: 100%; white-space: normal; }
#experienceModal .experience-options { grid-template-columns: 1fr 1fr auto; align-items: end; margin-top: 16px; padding-top: 16px; }
#experienceModal .experience-options label { font-size: 11px; }
#experienceModal .experience-options input { min-width: 0; width: 100%; }
/* The admin remains usable at 100% zoom without scaling the iframe. */
.admin-body { height: 100dvh; overflow: hidden; }
.admin-shell { height: 100dvh; min-height: 0; grid-template-columns: 170px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
.builder-topbar { min-height: 64px; padding: 10px 16px; gap: 12px; }
.builder-brand strong { font-size: 16px; white-space: nowrap; }
.builder-brand span, .builder-context { font-size: 11px; }
.admin-actions { gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.admin-actions .btn { padding: 11px 14px; font-size: 10px; letter-spacing: .05em; }
.admin-sidebar { min-width: 0; overflow: auto; }
.admin-preview-pane { min-width: 0; min-height: 0; display: flex; flex-direction: column; height: auto; }
.preview-toolbar { flex: 0 0 auto; min-height: 54px; padding: 9px 14px; flex-wrap: wrap; gap: 8px; }
.preview-copy span { font-size: 11px; }
#previewIframe { flex: 1; min-height: 0; height: 100%; width: 100%; border: 0; }
#uploadTool.open { width: min(440px, calc(100vw - 24px)); right: 12px; top: 76px; max-height: calc(100dvh - 88px); display: flex; flex-direction: column; overflow: hidden; gap: 12px; }
#uploadTool .sidebar-tool-head, #uploadTool .sidebar-upload-btn, #uploadHint, .photo-picker-actions { flex: 0 0 auto; }
#uploadTool .upload-library { flex: 1 1 auto; min-height: 0; max-height: 44dvh; overflow: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.upload-thumb:disabled { opacity: .35; cursor: not-allowed; }
.upload-thumb.selected { border-color: var(--green); }
.photo-selection-number { position: absolute; right: 6px; top: 6px; width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: white; font: 700 13px/1 var(--sans); box-shadow: 0 0 0 2px white; }
.photo-picker-actions { border-top: 1px solid var(--line); padding-top: 12px; }
.photo-picker-actions strong { display: block; font-size: 12px; margin-bottom: 12px; }
.photo-picker-actions > div { display: flex; justify-content: space-between; gap: 10px; }
.photo-picker-actions button { cursor: pointer; border: 0; border-radius: 7px; padding: 12px 16px; font: 600 12px/1.4 var(--sans); }
.photo-picker-actions button:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 1050px) {
  .site-header { flex-wrap: wrap; gap: 12px; padding: 14px 20px; }
  .nav-links { flex-wrap: wrap; gap: 14px; }
  .hero h1 { font-size: clamp(38px, 6vw, 68px); }
  .builder-context, .preview-copy span { display: none; }
}
@media (max-width: 650px) {
  #experienceModal .experience-modal-panel { max-height: calc(100dvh - 16px); border-radius: 14px; }
  .experience-cover { min-height: 400px; padding: 65px 22px 40px; }
  .experience-modal-toolbar { min-height: 54px; padding: 8px 12px; }
  .popup-step { display: none; }
  #experienceModal .experience-modal-gallery { aspect-ratio: 4/3; }
  .experience-booking { padding: 18px; }
  #experienceModal .experience-options { grid-template-columns: 1fr 1fr; }
  #experienceModal .experience-options .btn { grid-column: 1 / -1; }
  .admin-shell { grid-template-columns: 1fr; grid-template-rows: auto auto minmax(0, 1fr); }
  .builder-topbar { padding: 9px 10px; flex-wrap: wrap; }
  .builder-brand span, #resetLocal, .save-status { display: none; }
  .admin-sidebar { padding: 6px 10px; grid-column: 1; grid-row: 2; overflow: visible; border-right: 0; }
  .admin-brand, .sidebar-section h3 { display: none; }
  .sidebar-section { margin: 0; }
  .admin-nav { display: flex; gap: 8px; }
  .admin-sidebar .sidebar-btn { padding: 7px 12px; width: auto; min-height: 36px; font-size: 12px; }
  .admin-preview-pane { grid-column: 1; grid-row: 3; }
  .preview-toolbar { padding: 7px 10px; min-height: 45px; }
  .preview-copy { display: none; }
  .page-tabs { flex-wrap: wrap; gap: 4px; }
  .page-tabs button { padding: 7px 9px; font-size: 10px; }
  #uploadTool.open { top: 10px; max-height: calc(100dvh - 20px); z-index: 200; padding: 16px; }
  #uploadTool .upload-library { max-height: 55dvh; }
  .site-header .nav-links { display: none; }
  .site-header .nav-right { gap: 10px; }
  .site-header .nav-action { font-size: 10px; padding: 10px; }
  .site-header .brand { font-size: 19px; }
  .site-header { padding: 12px 16px; }
}
