/* V1 local integration: retain established artwork and component behavior. */
html:not(.wt-plan-links-enabled) :is(.bf-plan-link-row, .mt-plan-link-row, .wt-plan-link-overlay) { display: none !important; }

.footer-note { display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 100%; padding: 0 12px; }
.footer-brand { display: block; text-align: center; overflow-wrap: anywhere; }
.footer-actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0 10px; max-width: 100%; }
.footer-actions > button { border: 0; background: none; color: #aeb9aa; padding: 5px 2px; font: inherit; cursor: pointer; white-space: normal; }
.footer-actions > button + button::before { content: '·'; margin-right: 10px; color: #8d8a72; }
.footer-actions > button:hover, .footer-actions > button:focus-visible { color: #e8d4a4; }
.footer-note .footer-actions > button { display: inline; min-width: 0; min-height: 0; margin: 0; padding: 0; border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; text-decoration: none; color: #b5b9ad; }
.footer-note .footer-actions > button:hover { color: #e8d4a4; text-decoration: underline; text-underline-offset: 3px; }

/* A single button hierarchy across the existing pages. */
:is(#branchStartBtn, #branchGoBtn, .mt-primary, #metamorphGenerate.is-ready, .btn-primary):not(:disabled) {
  color: #231d10; border: 1px solid rgba(255,231,178,.65);
  background: linear-gradient(135deg, #e1c890, #cda762 52%, #f0dba9);
  box-shadow: inset 0 1px rgba(255,255,255,.34), 0 5px 18px rgba(192,144,70,.18);
  border-radius: 999px;
}
:is(#branchStartBtn, #branchGoBtn, .mt-primary, #metamorphGenerate.is-ready, .btn-primary):not(:disabled):hover {
  box-shadow: inset 0 1px rgba(255,255,255,.38), 0 7px 22px rgba(192,144,70,.28);
}
:is(.history-btn, .bf-export-text, .mt-secondary, .mt-ghost, .wt-backup-entry, .wt-legal-entry):not(.danger) {
  border: 1px solid rgba(202,188,150,.34); background-color: rgba(12,29,31,.75);
  color: #dddbc9; border-radius: 12px;
}
:is(.history-btn, .bf-export-text, .mt-secondary, .mt-ghost):not(.danger):hover { border-color: rgba(225,195,139,.6); }
:is(.history-close, .mt-close, .mobile-menu-toggle, .mobile-text-size-toggle) {
  background: transparent; box-shadow: none;
}
:is(.history-btn.danger, [data-action="delete"], [data-bulk-action="delete"]) { color: #e6ada4; border-color: rgba(188,103,91,.55); }
button:focus-visible, a:focus-visible { outline: 2px solid #e9cc8e; outline-offset: 3px; }

/* The next assumption belongs to the scrollable result, never over it. */
#branchFullscreen .bf-body { padding-bottom: 32px; }
#branchFullscreen .bf-inputbar {
  position: static; box-sizing: border-box; width: 100%; max-width: 1280px; margin: 24px auto 0;
  padding: 16px; border: 1px solid rgba(216,184,106,.25); border-radius: 18px;
  box-shadow: none;
}
#branchFullscreen .bf-inputbar .bar-row { flex-direction: column; align-items: stretch; gap: 12px; }
#branchFullscreen .bf-inputbar .wt-expand-field { box-sizing: border-box; width: 100%; flex: none; }
#branchFullscreen .bf-inputbar #branchInput { box-sizing: border-box; width: 100%; min-width: 0; max-width: none; min-height: 52px; padding-right: max(3.2rem, 54px); }
#branchFullscreen .bf-inputbar .wt-expand-trigger { top: 8px; right: 8px; }
#branchFullscreen .bf-inputbar :is(.btn, .bf-restart) { align-self: center; }
#branchFullscreen .bf-inputbar .btn, #branchFullscreen .bf-inputbar .bf-restart { min-width: 140px; }
#branchFullscreen .fx-stage { max-width: min(1200px, 100%); }
#branchFullscreen .fx-stage-wrap, #branchFullscreen .fx-orbit { min-width: 0; }
.fx-origin-details { max-width: 1100px; margin: 14px auto; padding: 11px 15px; color: #d7decf; border: 1px solid rgba(216,184,106,.22); border-radius: 12px; background: rgba(7,17,15,.65); }
.fx-origin-details summary { cursor: pointer; color: #e4cea1; }
.fx-origin-details p { margin: 10px 0 0; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.fx-return-row { display: flex; justify-content: center; margin: 22px auto; }
.fx-return-latest { min-height: 44px; padding: 9px 24px; border: 1px solid rgba(216,184,106,.45); border-radius: 999px; color: #e5d5ab; background: rgba(12,29,31,.8); cursor: pointer; }
.fx-return-latest:hover { border-color: #e5c78b; }
.fx-plan-details { max-width: 1100px; margin: 22px auto 0; padding: 12px 18px; border: 1px solid rgba(216,184,106,.24); border-radius: 14px; background: rgba(7,17,25,.77); color: #dce0da; }
.fx-plan-details summary { color: #e9d19e; cursor: pointer; }
.fx-plan-details p { margin: 14px 0; line-height: 1.7; overflow-wrap: anywhere; white-space: pre-wrap; }
.fx-plan-details strong { display: block; margin-bottom: 3px; color: #e8d2aa; font-weight: 600; }

.export-footer { justify-content: center; min-height: 86px; }
.export-footer .ef-quote { text-align: center; }

/* Theme art keeps its real 16:9 frame on both desktop and mobile. */
.mt-ai-card { align-items: center; }
.mt-ai-cover { place-self: center; width: 100%; height: auto; min-height: 0; aspect-ratio: 16 / 9; background-color: #0c1725; }
.mt-ai-cover { background-image: none; }
.mt-story-cover-image { display: block; width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: center center; }
.mt-story-cover-image.is-legacy-square { object-fit: cover; background: #0c1725; }
.mt-collection-thumb { aspect-ratio: 16 / 9; width: 88px; height: auto; object-fit: cover; }
.mt-cover-picker { position: fixed; z-index: 100045; inset: 0; display: grid; place-items: center; padding: 12px; background: rgba(2,8,16,.78); }
.mt-cover-picker[hidden] { display: none; }
.mt-cover-picker-card { width: min(760px,100%); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 20px; border: 1px solid rgba(216,184,106,.32); border-radius: 18px; background: #0d1a22; color: #e4e2d8; }
.mt-cover-picker-card h2 { color: #edd4a3; margin: 0 0 8px; }
#mtCoverChoices { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 18px 0; }
#mtCoverChoices button { min-width: 0; padding: 7px; color: #e2d8c2; border: 1px solid rgba(216,184,106,.28); border-radius: 10px; background: rgba(15,30,40,.8); cursor: pointer; }
#mtCoverChoices img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 6px; }
#mtCoverPickerClose { min-height: 44px; padding: 8px 18px; border: 1px solid rgba(216,184,106,.32); border-radius: 10px; color: #e4e2d8; background: #142833; }

@media (max-width: 640px) {
  .footer-note { margin-bottom: calc(90px + env(safe-area-inset-bottom)); line-height: 1.5; }
  .footer-actions { width: 100%; }
  .footer-actions > button { max-width: 48%; overflow-wrap: anywhere; }
  #branchFullscreen .bf-body { padding: 16px 12px 26px; }
  #branchFullscreen .bf-inputbar { padding: 14px 10px calc(16px + env(safe-area-inset-bottom)); }
  #branchFullscreen .bf-inputbar input { width: 100%; flex-basis: 100%; }
  #branchFullscreen .fx-stage-wrap .fx-orbit { max-width: 100%; }
  #branchFullscreen .fx-orbit { overflow: clip; }
  #mtCoverChoices { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 340px) {
  .footer-actions { gap: 0 5px; }
  .footer-actions > button + button::before { margin-right: 5px; }
  #mtCoverChoices { grid-template-columns: minmax(0,1fr); }
}

/* Final V1 visual corrections: the plan action keeps one warm-gold treatment in every supervision mode. */
body #generateBtn:not(:disabled), body.mode-gentle #generateBtn:not(:disabled),
body.mode-normal #generateBtn:not(:disabled), body.mode-strict #generateBtn:not(:disabled),
body.mode-hell #generateBtn:not(:disabled) {
  animation: none;
  color: #241c0c; text-shadow: none; border-color: rgba(255,232,180,.72);
  background: linear-gradient(135deg,#e4cf9a,#cda45c 53%,#f0dcaa);
  box-shadow: inset 0 1px rgba(255,255,255,.35), 0 8px 20px rgba(184,139,66,.23);
}
body #generateBtn:not(:disabled):is(:hover,:focus-visible) {
  color: #241c0c; border-color: #f0d9a5;
  background: linear-gradient(135deg,#f0dda9,#d7b36c 53%,#f5e4b8);
  box-shadow: inset 0 1px rgba(255,255,255,.43), 0 9px 23px rgba(189,144,70,.32);
}
body #generateBtn::before { box-shadow: none; }

/* History drawer: art, text and actions each have their own space. */
html.metamorph-open #historyPanel { width: min(720px,94vw); max-width: 94vw; right: calc(-1 * min(720px,94vw)); }
html.metamorph-open #historyPanel.open { right: 0; }
body.wt-history-open { overflow: hidden; }
html:has(body.wt-history-open) { overflow: hidden; }
#historyPanel :is(.history-list,.mt-collection-list) {
  scrollbar-width: thin;
  scrollbar-color: #486258 #0d1b1a;
}
#historyPanel :is(.history-list,.mt-collection-list)::-webkit-scrollbar { width: 7px; }
#historyPanel :is(.history-list,.mt-collection-list)::-webkit-scrollbar-track { background: #0d1b1a; }
#historyPanel :is(.history-list,.mt-collection-list)::-webkit-scrollbar-thumb {
  background: #486258; border-radius: 8px;
}
#historyPanel :is(.history-list,.mt-collection-list):hover::-webkit-scrollbar-thumb { background: #708a79; }
@media (min-width: 901px) {
  #historyPanel, html.metamorph-open #historyPanel {
    width: min(760px, 62vw); max-width: 760px; right: calc(-1 * min(760px, 62vw));
  }
  #historyPanel.open, html.metamorph-open #historyPanel.open { right: 0; }
  #historyPanel :is(.history-list,.mt-collection-list) {
    min-width: 0; overflow-x: hidden;
  }
  #historyPanel .wt-branch-item { display: block; min-width: 0; }
  #historyPanel :is(.history-item-title,.mt-collection-title) { word-break: normal; overflow-wrap: anywhere; }
  #historyPanel :is(.history-item-actions,.mt-collection-actions) button {
    writing-mode: horizontal-tb; white-space: normal; min-width: 4em;
  }
}
html.metamorph-open #historyClose, #mtHistoryClose {
  width: auto; min-width: 44px; min-height: 44px; padding: 8px 10px;
  border: 0; border-radius: 8px; background: transparent; box-shadow: none;
  color: #d9cba8; font: inherit; gap: 5px;
}
html.metamorph-open #historyClose:hover, #mtHistoryClose:hover { background: rgba(227,202,152,.08); }
.mt-collection-list { min-width: 0; }
.mt-collection-item, .mt-collection-item.mt-novel-item {
  position: relative; display: block; min-width: 0; padding: 13px;
}
.mt-collection-item .mt-collection-thumb {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9;
  object-fit: cover; border-radius: 10px; background: #0c1725;
}
.mt-collection-item .mt-collection-main { min-width: 0; margin-top: 12px; }
.mt-collection-title { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; line-height: 1.4; }
.mt-collection-excerpt { margin: 6px 0 11px; color: #c7d0c7; line-height: 1.55; font-size: .83rem; overflow-wrap: anywhere; }
.mt-collection-item .mt-collection-actions { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; }
.mt-collection-actions button { min-width: 0; min-height: 40px; white-space: normal; line-height: 1.35; }
.mt-collection-item :is(.mt-story-picker,.wt-bulk-picker) { position: absolute; z-index: 1; top: 19px; left: 19px; margin: 0; padding: 5px; border-radius: 8px; background: rgba(5,18,20,.78); }
.mt-novel-zone { min-width: 0; margin-bottom: 17px; padding: 16px; border: 1px solid rgba(212,179,112,.27); border-radius: 15px; background: rgba(15,31,30,.54); }
.mt-novel-zone h3 { margin: 0 0 12px; color: #efd39d; font-size: 1.05rem; }
.mt-novel-hint, .mt-novel-compose p { margin: 0 0 12px; color: #c9d0c5; line-height: 1.6; }
.mt-novel-compose { text-align: center; }
#mtGenerateNovel { min-width: min(100%,270px); min-height: 48px; padding: 10px 18px; font-size: 1rem; }
#mtGenerateNovel { letter-spacing: 0; text-shadow: none; font-family: system-ui,-apple-system,'Segoe UI',sans-serif; font-weight: 650; }
#mtGenerateNovel:disabled { opacity: .48; box-shadow: none; }
.mt-novel-source > .mt-novel-compose { margin: 12px 0 18px; padding: 14px; border: 1px solid rgba(220,192,137,.3); border-radius: 12px; background: rgba(11,30,28,.72); }

/* One warm-gold rule for both actual branch actions, including their focus and loading states. */
#branchFullscreen :is(#branchStartBtn,#branchGoBtn):not(:disabled),
#branchFullscreen :is(#branchStartBtn,#branchGoBtn):not(:disabled):is(:hover,:focus-visible) {
  animation: none; filter: none; text-shadow: none; color: #241d11;
  border-color: rgba(252,231,182,.72);
  background: linear-gradient(135deg,#e4cf9a,#cda45c 53%,#f0dcaa);
  box-shadow: inset 0 1px rgba(255,255,255,.35),0 7px 18px rgba(184,139,66,.23);
}
#branchFullscreen :is(#branchStartBtn,#branchGoBtn)::before,
#branchFullscreen :is(#branchStartBtn,#branchGoBtn)::after { box-shadow: none; filter: none; }

/* Return, disclosure and version controls share the same text scale. */
.wt-arrow-back,.wt-arrow-down { width: 1.18em; height: 1.18em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mt-history-back-label, #mtHistoryClose, #mtJumpAi { align-items: center; justify-content: center; gap: .42em; }
html.metamorph-open .mt-history-back-label, #mtHistoryClose, #mtJumpAi { display: inline-flex; }
#mtHistoryClose, html.metamorph-open #historyClose { font-size: var(--wt-control-size,1rem); }
#mtRevisionVersions { min-height: var(--wt-touch-size,44px); max-width: 100%; padding: 8px 12px; border-radius: 10px; font-size: var(--wt-control-size,1rem); line-height: 1.4; }
#mtRevisionVersions option { font-size: max(1rem,var(--wt-control-size,1rem)); }
#mtJumpAi { font-size: var(--wt-control-size,1rem); }
.mt-novel-library { border-color: rgba(159,187,173,.26); }

/* Desktop branch controls align as one group; the round badge is a status chip of the same size. */
#branchFullscreen .bf-header { display: flex; align-items: center; }
#branchFullscreen .bf-header .bf-round,
#branchFullscreen .bf-header-actions .bf-export-text {
  box-sizing: border-box; min-height: 40px; padding: 8px 13px;
  border: 1px solid rgba(205,185,143,.37); border-radius: 11px;
  color: #e0d9c5; background: rgba(12,29,31,.75); font: .83rem/1.35 system-ui,sans-serif;
}
#branchFullscreen .bf-header .bf-round { display: inline-flex; align-items: center; }
#branchFullscreen .bf-header-actions { display: inline-flex; align-items: center; flex-wrap: nowrap; gap: 9px; }
#branchFullscreen .bf-header-actions #branchClose {
  flex: none; width: 40px; min-width: 40px; height: 40px; min-height: 40px;
  padding: 0; border: 0; border-radius: 50%; background: transparent;
  box-shadow: none; color: #c7d1c7; font-size: 1rem;
}
#branchFullscreen .bf-header-actions #branchClose:hover { background: rgba(231,206,157,.08); }
#branchFullscreen .bf-title-logo,
#branchFullscreen .bf-action-icon,
#branchFullscreen .bf-action-label-mobile,
#branchFullscreen .bf-more-toggle { display: none; }
#branchFullscreen .bf-more-menu { display: contents; }

/* Desktop branch screen uses the available width; mobile keeps its own reading order. */
@media (min-width: 901px) {
  #branchFullscreen .bf-body { max-width: 1380px; width: 100%; margin: 0 auto; padding-inline: clamp(28px,5vw,72px); }
  #branchFullscreen .fx-start { display: grid; grid-template-columns: minmax(290px,44%) minmax(0,1fr); align-items: center; gap: clamp(28px,4vw,70px); max-width: 1200px; min-height: 580px; text-align: left; }
  #branchFullscreen .fx-start-visual { text-align: center; }
  #branchFullscreen .fx-start-visual .fx-orbit-solo { min-height: 285px; }
  #branchFullscreen .fx-start-title { font-size: 1.3rem; letter-spacing: .08em; }
  #branchFullscreen .fx-start-sub { max-width: 390px; margin: 10px auto 0; font-size: .94rem; }
  #branchFullscreen .fx-start-form { min-width: 0; padding: 28px; border: 1px solid rgba(220,190,130,.22); border-radius: 18px; background: rgba(12,29,31,.45); }
  #branchFullscreen .fx-stage-wrap, #branchFullscreen .fx-stage { max-width: 1280px; }
  #branchFullscreen .fx-assume { width: 64%; max-width: none; margin-left: auto; margin-right: 0; }
  #branchFullscreen .fx-stage .fx-core { width: 64%; margin-left: auto; margin-right: 0; }
  #branchFullscreen .fx-stage-wrap .fx-orbit:not(.fx-orbit-solo) { grid-template-columns: minmax(230px,35%) repeat(2,minmax(0,1fr)); grid-template-rows: repeat(2,minmax(145px,auto)); gap: 16px; align-items: stretch; }
  #branchFullscreen .fx-stage-wrap .fx-orbit:not(.fx-orbit-solo) .fx-main { grid-column: 1; grid-row: 1 / span 2; align-self: center; justify-self: center; }
  #branchFullscreen .fx-stage-wrap .fx-orbit:not(.fx-orbit-solo) .fx-field { left: 17.5%; width: 34%; }
  #branchFullscreen .fx-stage-wrap .fx-orbit:not(.fx-orbit-solo) .fx-band { display: none; }
  #branchFullscreen .fx-stage-wrap .fx-node.is-ul { grid-column: 2; grid-row: 1; }
  #branchFullscreen .fx-stage-wrap .fx-node.is-ur { grid-column: 3; grid-row: 1; }
  #branchFullscreen .fx-stage-wrap .fx-node.is-ll { grid-column: 2; grid-row: 2; }
  #branchFullscreen .fx-stage-wrap .fx-node.is-lr { grid-column: 3; grid-row: 2; }
  #branchFullscreen .fx-stage-wrap .fx-node { max-width: none; }
  #branchFullscreen .fx-node-name, #branchFullscreen .fx-node-desc { display: block; overflow: visible; white-space: normal; -webkit-line-clamp: unset; }
}

/* Right quick actions grow in layout, not by visual scaling. */
@media (min-width: 901px) {
  html[data-text-size="large"] #quickTools { gap: 10px; }
  html[data-text-size="xlarge"] #quickTools { gap: 12px; }
  html[data-text-size="large"] #quickTools > :is(#shareEntry,#pixelTree,#branchEntry,#metamorphEntry) { width: 82px; height: 82px; padding: 7px; }
  html[data-text-size="xlarge"] #quickTools > :is(#shareEntry,#pixelTree,#branchEntry,#metamorphEntry) { width: 96px; height: 96px; padding: 9px; }
  html[data-text-size="large"] #quickTools .quick-svg { width: 34px; height: 34px; }
  html[data-text-size="xlarge"] #quickTools .quick-svg { width: 39px; height: 39px; }
  html[data-text-size="large"] #quickTools > :is(#branchEntry,#metamorphEntry) .quick-svg { width: 34px; height: 34px; }
  html[data-text-size="xlarge"] #quickTools > :is(#branchEntry,#metamorphEntry) .quick-svg { width: 39px; height: 39px; }
  html[data-text-size="large"] #quickTools .quick-label { font-size: 13px !important; }
  html[data-text-size="xlarge"] #quickTools .quick-label { font-size: 15px !important; }
}

@media (max-width: 900px) {
  #branchFullscreen .fx-start-visual, #branchFullscreen .fx-start-form { width: 100%; }
  .mt-collection-item, .mt-collection-item.mt-novel-item { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .mt-collection-item .mt-collection-thumb { max-width: 100%; }
  .mt-collection-item .mt-collection-actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .mt-collection-actions button { min-height: var(--wt-touch-size); font-size: var(--wt-control-size); }
  #branchFullscreen .bf-header { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 8px; align-items: center; }
  #branchFullscreen .fx-head-main { display: contents; }
  #branchFullscreen .bf-header h3 { grid-column: 1; grid-row: 1; display: inline-flex; align-items: center; gap: 5px; margin: 0; min-width: 0; font-size: max(1rem,clamp(15px,4vw,18px)); letter-spacing: 0; white-space: nowrap; }
  #branchFullscreen .bf-title-emoji { display: none; }
  #branchFullscreen .bf-title-logo { display: block; flex: 0 0 25px; width: 25px; height: 25px; object-fit: contain; }
  #branchFullscreen .bf-header .fx-head-sub { grid-column: 1 / -1; grid-row: 2; margin: 0; }
  #branchFullscreen .bf-header-actions { position: relative; grid-column: 2; grid-row: 1; display: flex; align-items: center; justify-content: flex-end; flex-wrap: nowrap; gap: 6px; min-width: 0; }
  #branchFullscreen .bf-header-actions .bf-export-text,
  #branchFullscreen .bf-header-actions #branchClose {
    box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 auto; width: auto; min-width: 0; height: 44px; min-height: 44px;
    margin: 0; padding: 0 2px; border: 0; border-radius: 0;
    background: transparent; box-shadow: none; color: #e7e3d8; line-height: 1;
  }
  #branchFullscreen .bf-header-actions .bf-export-text { gap: 4px; font-size: max(.76rem,13px); white-space: nowrap; }
  #branchFullscreen .bf-action-icon { display: block; flex: 0 0 18px; width: 18px; height: 18px; color: #dcc58f; }
  #branchFullscreen .bf-action-label-desktop { display: none; }
  #branchFullscreen .bf-action-label-mobile { display: inline; }
  #branchFullscreen .bf-header-actions :is(.bf-export-text, #branchClose):is(:hover, :focus-visible) {
    color: #fff1cf; background: transparent; box-shadow: none;
  }
  #branchFullscreen .bf-header-actions #branchClose { flex: 0 0 44px; width: 44px; min-width: 44px; padding: 0; font-size: 22px; }
  #branchFullscreen .bf-header .bf-round { grid-column: 1 / -1; grid-row: 3; justify-self: start; min-height: 32px; padding: 5px 10px; }
  #branchFullscreen .fx-stage-wrap .fx-orbit:not(.fx-orbit-solo) {
    display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(185px,auto) repeat(4,auto); gap: 12px;
  }
  #branchFullscreen .fx-stage-wrap .fx-orbit .fx-main { grid-column: 1; grid-row: 1; justify-self: center; }
  #branchFullscreen .fx-stage-wrap .fx-node.is-ul { grid-column: 1; grid-row: 2; }
  #branchFullscreen .fx-stage-wrap .fx-node.is-ur { grid-column: 1; grid-row: 3; }
  #branchFullscreen .fx-stage-wrap .fx-node.is-ll { grid-column: 1; grid-row: 4; }
  #branchFullscreen .fx-stage-wrap .fx-node.is-lr { grid-column: 1; grid-row: 5; }
  #branchFullscreen .fx-stage-wrap .fx-node { width: 100%; max-width: none; min-height: 0; }
  #branchFullscreen .fx-node-head { min-height: 0; height: auto; align-items: flex-start; }
  #branchFullscreen .fx-node-txt { min-width: 0; }
  #branchFullscreen .fx-node-name, #branchFullscreen .fx-node-desc { display: block; overflow: visible; white-space: normal; overflow-wrap: anywhere; -webkit-line-clamp: unset; font-size: max(.83rem,var(--wt-control-size)); }
  #branchFullscreen .bf-inputbar { position: static; margin: 24px auto 0; }
  #quickTools > :is(#shareEntry,#pixelTree,#metamorphNovelQuick) { width: max(142px, 8.5rem); min-height: var(--wt-touch-size); }
  html[data-text-size="large"] #quickTools > :is(#shareEntry,#pixelTree,#metamorphNovelQuick) { width: 164px; height: 48px; min-height: 48px; }
  html[data-text-size="xlarge"] #quickTools > :is(#shareEntry,#pixelTree,#metamorphNovelQuick) { width: 190px; height: 54px; min-height: 54px; }
  html[data-text-size="large"] #quickTools > :is(#shareEntry,#pixelTree,#metamorphNovelQuick) .quick-svg { flex-basis: 24px; width: 24px; height: 24px; }
  html[data-text-size="xlarge"] #quickTools > :is(#shareEntry,#pixelTree,#metamorphNovelQuick) .quick-svg { flex-basis: 28px; width: 28px; height: 28px; }
  html[data-text-size="large"] #quickTools .quick-label { font-size: 15px !important; }
  html[data-text-size="xlarge"] #quickTools .quick-label { font-size: 17px !important; }
  html[data-text-size="xlarge"] #quickToolsToggle { width: 54px; min-height: 50px; }
}
@media (max-width: 380px) {
  .mt-novel-zone { padding: 11px; }
  #branchFullscreen .bf-header { padding-inline: 9px; }
}
@media (max-width: 359px) {
  #branchFullscreen .bf-more-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-width: 60px; min-height: 44px; padding: 0 2px; border: 0; background: transparent; box-shadow: none; color: #e7e3d8; font: max(.76rem,13px)/1 system-ui,sans-serif; cursor: pointer; }
  #branchFullscreen .bf-more-toggle span:first-child { color: #dcc58f; font-size: 21px; line-height: .7; }
  #branchFullscreen .bf-more-menu { display: none; position: absolute; top: calc(100% + 5px); right: 44px; z-index: 5; min-width: 118px; padding: 5px; border: 1px solid rgba(205,185,143,.3); border-radius: 10px; background: #0d201b; box-shadow: 0 12px 24px rgba(0,0,0,.3); }
  #branchFullscreen .bf-more-menu.is-open { display: flex; flex-direction: column; }
  #branchFullscreen .bf-more-menu .bf-export-text { justify-content: flex-start; width: 100%; min-height: 44px; padding: 0 8px; }
}
@media (max-width: 390px) {
  html[data-text-size="xlarge"] #branchFullscreen .bf-more-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-width: 66px; min-height: 44px; padding: 0 2px; border: 0; background: transparent; box-shadow: none; color: #e7e3d8; font: max(.76rem,13px)/1 system-ui,sans-serif; cursor: pointer; }
  html[data-text-size="xlarge"] #branchFullscreen .bf-more-toggle span:first-child { color: #dcc58f; font-size: 21px; line-height: .7; }
  html[data-text-size="xlarge"] #branchFullscreen .bf-more-menu { display: none; position: absolute; top: calc(100% + 5px); right: 44px; z-index: 5; min-width: 118px; padding: 5px; border: 1px solid rgba(205,185,143,.3); border-radius: 10px; background: #0d201b; box-shadow: 0 12px 24px rgba(0,0,0,.3); }
  html[data-text-size="xlarge"] #branchFullscreen .bf-more-menu.is-open { display: flex; flex-direction: column; }
  html[data-text-size="xlarge"] #branchFullscreen .bf-more-menu .bf-export-text { justify-content: flex-start; width: 100%; min-height: 44px; padding: 0 8px; }
}
