.fc-doc-label {
  display: grid;
  flex: 0 1 12rem;
  min-width: 5rem;
  line-height: 1.15;
  margin-inline-end: .125rem;
}
.fc-doc-label small { color: var(--color-on-surface-variant); font-size: .65rem; }
.fc-doc-label strong { overflow-wrap: anywhere; font-size: .82rem; }

.fc-experience-bar, .fc-editor-hint {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex: none;
  min-height: 2.35rem;
  padding: .25rem clamp(.75rem, 2vw, 1.5rem);
  background: var(--color-surface-container-lowest);
  color: var(--color-on-surface);
  border-bottom: 1px solid var(--divider-line);
  font-size: .79rem;
}
.fc-experience-bar[hidden], .fc-editor-hint[hidden], .fc-editor-empty[hidden],
.fc-experience-bar #fcExperienceDownload[hidden], body.fc-viewmode .fc-editor-empty { display: none !important; }
.fc-experience-bar { background: var(--color-surface-container-low); }
.fc-experience-bar div { display: flex; align-items: baseline; flex: 1; min-width: 0; gap: .25rem .65rem; flex-wrap: wrap; }
.fc-experience-bar div span, .fc-editor-hint #fcEditorHintText { color: var(--color-on-surface-variant); }
.fc-experience-bar button { flex: 0 1 auto; min-width: 0; max-inline-size: 100%; white-space: normal; overflow-wrap: anywhere; }
.fc-editor-hint button { flex: none; }
.fc-editor-hint > .material-symbols-outlined { color: var(--color-primary); font-size: 1.12rem; }
.fc-editor-hint #fcEditorHintText { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.fc-editor-hint { border-block-start: 1px solid var(--divider-line); border-block-end: 0; }
.fc-publish-guide { margin: 0 0 .9rem; color: var(--color-on-surface-variant); font-size: .85rem; line-height: 1.4; }

.editor-body:has(.fc-editor-empty:not([hidden])) { position: relative; }
.fc-editor-empty {
  position: absolute;
  inset-inline: .85rem;
  inset-block-start: clamp(8.5rem, 29%, 15rem);
  width: min(26.5rem, calc(100% - 1.7rem));
  margin-inline: auto;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: .6rem;
  padding: clamp(.95rem, 2.8vw, 1.7rem);
  border: 1px solid var(--divider-line-strong);
  border-radius: 1.15rem;
  background: var(--color-surface-container-lowest);
  color: var(--color-on-surface);
  text-align: center;
  box-shadow: 0 .5rem 1.5rem rgb(20 25 45 / .09);
  pointer-events: none;
}
.fc-editor-empty .fc-editor-empty-icon {
  display: grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: .8rem;
  background: var(--color-surface-container);
  color: var(--color-primary);
  font-size: 1.25rem;
}
.fc-editor-empty h1 { margin: 0; font-size: clamp(1.14rem, 2vw, 1.42rem); line-height: 1.15; letter-spacing: -.02em; }
.fc-editor-empty p { max-width: 28ch; margin: 0; color: var(--color-on-surface-variant); font-size: .88rem; line-height: 1.45; }
.fc-editor-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem; margin-block-start: .3rem; }
.fc-editor-empty-actions button { pointer-events: auto; max-inline-size: 100%; white-space: normal; overflow-wrap: anywhere; }
.fc-editor-empty-actions .btn .material-symbols-outlined { font-size: 1.04rem; }

.fc-editor-dialog { width: min(34rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); margin: auto; padding: 1.25rem; overflow: auto; border: 1px solid var(--divider-line-strong); border-radius: 1rem; background: var(--color-surface-container-lowest); color: var(--color-on-surface); }
.fc-editor-dialog::backdrop { background: rgb(13 16 29 / .48); }
.fc-editor-dialog header, .fc-editor-dialog footer { display: flex; align-items: center; gap: .55rem; }
.fc-editor-dialog header h2 { flex: 1; min-width: 0; margin: 0; font-size: 1.25rem; line-height: 1.2; overflow-wrap: anywhere; }
.fc-editor-dialog header .btn-icon { flex: none; }
.fc-editor-dialog footer { justify-content: flex-end; flex-wrap: wrap; margin-top: 1.2rem; }
#fcResumeExperience [hidden] { display: none; }
.fc-editor-dialog footer .btn { max-inline-size: 100%; white-space: normal; overflow-wrap: anywhere; }
.fc-editor-dialog ol { display: grid; gap: .65rem; padding-inline-start: 1.45rem; }
.fc-editor-dialog li, .fc-editor-dialog p { color: var(--color-on-surface-variant); font-size: .9rem; line-height: 1.5; }
.fc-editor-preview { width: min(70rem, calc(100% - 2rem)); }
.fc-editor-preview header { padding-block-end: .8rem; flex-wrap: wrap; }
.fc-editor-preview select { min-height: 2rem; max-inline-size: 100%; padding: .25rem .6rem; background: var(--color-surface-container-lowest); color: var(--color-on-surface); border: 1px solid var(--divider-line-strong); border-radius: .45rem; font: inherit; }
.fc-editor-preview iframe { display: block; margin: 0 auto; width: min(100%, var(--fc-preview-width, 100%)); height: min(75dvh, 45rem); background: var(--color-background); border: 1px solid var(--divider-line); border-radius: .65rem; }

html[data-fc-guest] #fcTourPublishBtn,
html[data-fc-guest] #fcExtZone,
html[data-fc-guest] #fcDraftRecovery,
html[data-fc-guest] #fcTourTagsBtn,
html[data-fc-guest] #pageBgEntryLock { display: none !important; }
html[data-fc-preview] .fc-editor-hint,
html[data-fc-preview] .fc-experience-bar,
html[data-fc-preview] .editor-statusbar { display: none !important; }

.fc-editor-empty button:focus-visible,
.fc-editor-dialog :is(button, select):focus-visible,
.fc-editor-hint button:focus-visible,
.fc-experience-bar button:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }
.asset-panel .card[data-asset]:focus-visible { outline: 2px solid var(--color-primary); outline-offset: -2px; }

.context-menu:not(.ctx-pill), .viewport-popover, .layers-popover {
  max-inline-size: calc(100vw - 16px);
  max-block-size: var(--fc-popup-height, calc(100dvh - 16px));
  overflow: auto;
  overscroll-behavior: contain;
}
.context-menu .context-menu-item { overflow-wrap: anywhere; }

@media (max-width: 380px) {
  .viewport-popover .vp-presets { flex-wrap: wrap; gap: 4px; min-width: 0; }
  #viewportPopover .vp-presets .vp-btn {
    max-inline-size: 100%;
    border: 1px solid var(--divider-line-strong);
    border-radius: 4px;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  #viewportPopover .vp-presets .vp-btn.active { border-color: var(--color-primary); }
}

.editor-header > :is(.btn, .migrate-btn) { flex-shrink: 0; }
.editor-header #lastSavedLabel { min-width: 0; max-inline-size: 18ch; white-space: normal; overflow-wrap: anywhere; }

@media (min-width: 768px) and (max-width: 1120px) {
  body:not(.fc-viewmode) .editor-header { flex-wrap: wrap; }
}

@media (max-width: 767px), (orientation: landscape) and (max-height: 500px) {
  .editor-header .fc-doc-label { flex: 0 1 6rem; min-width: 4.35rem; }
  .editor-header #fcEditorPreviewButton { order: 6; }
  .editor-header #fcTourPublishBtn { order: 7; }
  .editor-header :is(#undoBtn, #redoBtn, #fcTourHistoryBtn, #fcTourTagsBtn, #settingsBtn, #fcEditorHelp, #fcDraftRecovery) { order: 8; }
  .editor-header #lastSavedLabel { min-width: 7ch; max-width: 12ch; overflow-wrap: anywhere; font-size: .67rem; line-height: 1.12; }
  html:lang(zh) .editor-header #lastSavedLabel { min-width: 0; max-width: 10em; }
  .fc-editor-empty { inset-block-start: clamp(6.6rem, 28%, 14rem); width: min(23rem, calc(100% - 1.7rem)); }
  .fc-editor-empty-actions button, .fc-experience-bar button { min-height: 44px; }
  .fc-experience-bar { padding-block: .32rem; flex-wrap: wrap; }
  .fc-experience-bar div { flex-basis: 9rem; }
  .fc-editor-dialog { padding: .8rem; }
  .fc-editor-preview iframe { height: min(71dvh, 42rem); }
}

@media (orientation: landscape) and (max-height: 500px) and (min-width: 580px) {
  body:not(.fc-viewmode) .editor-body { padding-block-start: 10px; }
  .editor-body .title-input { margin-block-end: .25rem; padding-block: 4px; }
  .fc-editor-empty {
    position: relative;
    inset: auto;
    width: min(38rem, calc(100% - 1.7rem));
    margin-block: .45rem;
    padding-block: .5rem;
    grid-template-columns: minmax(0, 1fr) minmax(11.5rem, .9fr);
    column-gap: .85rem;
    justify-items: start;
    text-align: start;
  }
  .fc-editor-empty .fc-editor-empty-icon { display: none; }
  .fc-editor-empty p { grid-column: 1; max-width: none; }
  .fc-editor-empty-actions { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
}

@media (orientation: landscape) and (max-height: 500px) and (min-width: 810px) {
  .fc-editor-empty { width: min(38rem, calc(100% - 18rem)); }
}
