/* Multiblock reader and authoring surfaces. The compact controls keep the
   guide text visually dominant while the 3D viewport gets room to orbit. */
.guide-schematic {
  --schematic-ink: #f0e6f2;
  --schematic-muted: #a88ba9;
  --schematic-border: #513449;
  --schematic-violet: #b77ce4;
  margin: 2rem 0 2.5rem;
  padding: 1.05rem;
  color: var(--schematic-ink);
  background: #110b11;
  border: 1px solid var(--schematic-border);
  border-radius: 15px;
  box-shadow: 0 16px 40px rgba(9, 4, 13, .22);
}

.guide-schematic__header,
.guide-schematic__header-actions,
.guide-schematic__view-toggle {
  display: flex;
  align-items: center;
}

.guide-schematic__header {
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .8rem;
}

.guide-schematic__eyebrow,
.guide-schematic__materials-label {
  display: block;
  color: var(--schematic-muted);
  font: 700 .68rem/1.2 var(--font-mono, monospace);
  letter-spacing: .14em;
}

.guide-schematic__header h3 {
  margin: .28rem 0 0;
  color: var(--schematic-ink);
  font-size: 1.15rem;
  line-height: 1.3;
}

.guide-schematic__header-actions { gap: .4rem; }
.guide-schematic__header-actions > [hidden] { display: none !important; }

.guide-schematic__drag-settings { position: relative; }
.guide-schematic__drag-settings > summary { display: flex; align-items: center; justify-content: center; list-style: none; }
.guide-schematic__drag-settings > summary::-webkit-details-marker { display: none; }
.guide-schematic__drag-settings[open] > summary { border-color: #9f53ad; color: #fff3ff; background: #321a36; }
.guide-schematic__drag-settings-panel { position: absolute; top: calc(100% + .4rem); right: 0; z-index: 5; display: grid; gap: .45rem; width: min(250px, calc(100vw - 36px)); padding: .7rem; border: 1px solid #674568; border-radius: 9px; color: #e8d8eb; background: #1a111d; box-shadow: 0 10px 28px rgba(0, 0, 0, .42); }
.guide-schematic__drag-sensitivity-label { display: grid; gap: .35rem; color: #c9b1cb; font-size: .7rem; }
.guide-schematic__drag-sensitivity-controls { display: flex; align-items: center; gap: .5rem; }
.guide-schematic__drag-sensitivity-controls input { flex: 1 1 auto; width: 100%; min-width: 0; accent-color: #b77ce4; }
.guide-schematic__drag-sensitivity-controls output { min-width: 3.2em; color: #f0e6f2; font: 600 .68rem/1.2 var(--font-mono, monospace); text-align: right; }
.guide-schematic__drag-settings-panel p { margin: 0; color: #a88ba9; font-size: .62rem; line-height: 1.4; }

.guide-schematic__center-settings { position: relative; }
.guide-schematic__center-settings > summary { display: flex; align-items: center; justify-content: center; list-style: none; }
.guide-schematic__center-settings > summary::-webkit-details-marker { display: none; }
.guide-schematic__center-settings[open] > summary { border-color: #9f53ad; color: #fff3ff; background: #321a36; }
.guide-schematic__center-settings-panel { position: absolute; top: calc(100% + .4rem); right: 0; z-index: 5; display: grid; gap: .45rem; width: min(230px, calc(100vw - 36px)); padding: .7rem; border: 1px solid #674568; border-radius: 9px; color: #e8d8eb; background: #1a111d; box-shadow: 0 10px 28px rgba(0, 0, 0, .42); }
.guide-schematic__center-settings-panel p { margin: 0; color: #a88ba9; font-size: .65rem; line-height: 1.4; }
.guide-schematic__center-action { width: 100%; padding: .45rem .55rem; border: 1px solid #513449; border-radius: 6px; color: #e8d8eb; background: #211525; font: 600 .68rem/1.25 var(--font-sans, sans-serif); text-align: left; cursor: pointer; }
.guide-schematic__center-action:hover,
.guide-schematic__center-action.is-active { border-color: #9f53ad; color: #fff3ff; background: #321a36; }
.guide-schematic__center-action:focus-visible { outline: 2px solid #d7a2ed; outline-offset: 2px; }
.guide-schematic.is-picking-orbit-center [data-schematic-3d] { cursor: crosshair; }

.guide-schematic__view-toggle {
  gap: .32rem;
  padding: .2rem;
  border: 1px solid #54344e;
  border-radius: 9px;
  background: #190f19;
}

.guide-schematic__view-toggle button,
.guide-schematic__icon-button,
.guide-schematic__stage {
  min-height: 34px;
  padding: .42rem .72rem;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #d6c0d6;
  background: transparent;
  font: 600 .82rem/1.1 var(--font-sans, sans-serif);
  cursor: pointer;
}

.guide-schematic__view-toggle button[aria-pressed="true"],
.guide-schematic__stage.is-active {
  border-color: #9f53ad;
  color: #fff3ff;
  background: #321a36;
  box-shadow: inset 0 0 0 1px rgba(202, 122, 227, .13);
}

.guide-schematic__icon-button {
  width: 36px;
  padding: .35rem;
  border-color: #513449;
  color: #d6afd9;
  font-size: 1.05rem;
}

.guide-schematic__stages {
  display: flex;
  gap: .38rem;
  margin: 0 0 .7rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.guide-schematic__stage { flex: 0 0 auto; border-color: #382338; }

.guide-schematic__viewport {
  position: relative;
  min-height: 240px;
  height: clamp(245px, 38vw, 380px);
  overflow: hidden;
  border: 1px solid #352339;
  border-radius: 11px;
  background: radial-gradient(ellipse at 50% 65%, #281732 0, #160f1a 45%, #100b12 100%);
}

.guide-schematic__viewport:fullscreen {
  display: block;
  width: 100vw;
  height: 100vh;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: #100b12;
}

.guide-schematic__canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  touch-action: none;
}

.guide-schematic__canvas[hidden] { display: none !important; }
.guide-schematic__canvas[data-schematic-2d] { width: 100%; max-width: none; }
.guide-schematic.is-schematic-2d .guide-schematic__viewport { display: block; overflow: hidden; }
.guide-schematic.is-schematic-2d .guide-schematic__canvas[data-schematic-2d] { width: 100%; height: 100%; margin: 0; cursor: grab; }
.guide-schematic.is-schematic-2d .guide-schematic__canvas[data-schematic-2d].is-panning { cursor: grabbing; }
.guide-schematic__rotate-button { display: none; }
.guide-schematic.is-schematic-2d .guide-schematic__rotate-button { display: inline-flex; align-items: center; justify-content: center; }

.guide-schematic__status {
  position: absolute;
  right: .55rem;
  bottom: .45rem;
  margin: 0;
  padding: .3rem .48rem;
  border: 1px solid rgba(130, 90, 145, .28);
  border-radius: 6px;
  color: #d2b9d7;
  background: rgba(15, 9, 18, .78);
  font: 500 .68rem/1.3 var(--font-sans, sans-serif);
  pointer-events: none;
}

.guide-schematic__layers {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding-top: .48rem;
}

.guide-schematic__layer-select {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: var(--schematic-muted);
  font-size: .78rem;
}

.guide-schematic__layer-select select {
  max-width: min(75vw, 260px);
  min-height: 34px;
  padding: .35rem 2rem .35rem .55rem;
  border: 1px solid var(--schematic-border);
  border-radius: 7px;
  color: var(--schematic-ink);
  background: #1c111e;
}

.guide-schematic__materials-wrap { margin-top: .72rem; }
.guide-schematic__materials-label { margin-bottom: .42rem; font-size: .6rem; }

.guide-schematic__materials {
  display: flex;
  flex-wrap: wrap;
  gap: .32rem .55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-schematic__material {
  display: inline-flex;
  align-items: center;
  gap: .36rem;
  min-height: 29px;
  padding: .18rem .45rem .18rem .2rem;
  border: 1px solid #372338;
  border-radius: 7px;
  color: #e2d0e5;
  background: #1a111b;
  font-size: .75rem;
  line-height: 1.2;
}

.guide-schematic__material img {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  object-fit: cover;
  image-rendering: pixelated;
}

.guide-schematic__material-placeholder { display: block; width: 24px; height: 24px; border-radius: 4px; background: linear-gradient(135deg, #68427c, #261b31); }

.guide-schematic__material span:last-child {
  color: #c79ada;
  font: 600 .72rem/1 var(--font-mono, monospace);
}

.guide-schematic button:focus-visible,
.guide-schematic select:focus-visible,
.schematic-author-dialog button:focus-visible,
.schematic-author-dialog input:focus-visible,
.schematic-author-dialog select:focus-visible {
  outline: 2px solid #d1a0f0;
  outline-offset: 2px;
}

/* Compact editor node between paragraphs. */
.editor-multiblock {
  margin: 1.1rem 0;
  padding: .75rem;
  border: 1px solid #593d59;
  border-radius: 12px;
  background: #171019;
  color: #eadcea;
}

.editor-multiblock__header,
.editor-multiblock__actions {
  display: flex;
  align-items: center;
}

.editor-multiblock__header { justify-content: space-between; gap: .8rem; }
.editor-multiblock__copy { display: grid; gap: .18rem; }
.editor-multiblock__eyebrow { color: #b78bbd; font: 700 .62rem/1.2 var(--font-mono, monospace); letter-spacing: .12em; }
.editor-multiblock__copy strong { font-size: .98rem; }
.editor-multiblock__actions { gap: .4rem; }
.editor-multiblock__edit,
.editor-multiblock__remove { min-height: 34px; border: 1px solid #684568; border-radius: 7px; color: #f3e8f4; background: #28172b; cursor: pointer; }
.editor-multiblock__edit { padding: .4rem .65rem; font-size: .78rem; }
.editor-multiblock__remove { width: 34px; color: #e99baa; font-size: 1.2rem; }
.editor-multiblock__preview { display: block; width: 100%; height: 120px; margin-top: .55rem; border: 1px solid #332539; border-radius: 8px; background: #110c15; }
.editor-multiblock__meta { margin-top: .4rem; color: #ba9cba; font-size: .73rem; }
.editor-multiblock__materials { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .45rem; }
.editor-multiblock__material { padding: .2rem .38rem; border: 1px solid #37283c; border-radius: 5px; color: #dfc9e2; background: #211626; font-size: .7rem; }
.editor-multiblock__material--empty { color: #b8a3bc; }

/* Full-screen authoring dialog. */
.schematic-author-dialog {
  position: fixed;
  inset: auto;
  top: 50%;
  left: 50%;
  width: min(1240px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 28px);
  margin: 0;
  transform: translate(-50%, -50%);
  padding: 0;
  overflow: hidden;
  border: 1px solid #70476f;
  border-radius: 16px;
  color: #f0e6f2;
  background: #130d16;
  box-shadow: 0 28px 100px rgba(0, 0, 0, .7);
}

.schematic-author-dialog::backdrop { background: rgba(7, 4, 9, .84); backdrop-filter: blur(7px); }
.schematic-author { display: flex; flex-direction: column; max-height: calc(100dvh - 30px); min-height: min(650px, calc(100dvh - 30px)); }
.schematic-author__header { display: grid; grid-template-columns: minmax(170px, 1fr) minmax(150px, 1fr) auto auto; align-items: center; gap: .65rem; padding: .75rem 1rem; border-bottom: 1px solid #3f2d44; background: #19111d; }
.schematic-author__title-group { display: grid; min-width: 0; gap: .25rem; }
.schematic-author__eyebrow { color: #b78bbd; font: 700 .6rem/1.2 var(--font-mono, monospace); letter-spacing: .14em; }
.schematic-author__title { width: 100%; min-width: 0; border: 0 !important; padding: 0 !important; color: #f6eef7 !important; background: transparent !important; font: 600 1.12rem/1.2 var(--font-sans, sans-serif) !important; }
.schematic-author__status { margin: 0; color: #b99fbc; font-size: .73rem; line-height: 1.35; }
.schematic-author__primary,
.schematic-author__secondary,
.schematic-author__add-block,
.schematic-author__icon-button {
  min-height: 34px;
  padding: .42rem .7rem;
  border: 1px solid #634366;
  border-radius: 7px;
  color: #ead8ed;
  background: #23162a;
  font: 600 .75rem/1.1 var(--font-sans, sans-serif);
  cursor: pointer;
}
.schematic-author__primary { border-color: #aa64bd; color: #fff5ff; background: #55295f; }
.schematic-author__primary:disabled,.schematic-author__secondary:disabled { opacity: .48; cursor: not-allowed; }
.schematic-author__icon-button { min-width: 34px; padding: .25rem; font-size: 1.05rem; }
.schematic-author__workspace { display: grid; grid-template-columns: 255px minmax(0, 1fr); min-height: 0; flex: 1; overflow: hidden; }
.schematic-author__sidebar { display: flex; flex-direction: column; min-width: 0; padding: .8rem; overflow-y: auto; border-right: 1px solid #38283e; background: #171019; }
.schematic-author__sidebar-heading { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.schematic-author__sidebar-heading h2 { margin: 0; font-size: .92rem; }
.schematic-author__add-block { min-height: 30px; padding: .3rem .48rem; font-size: .68rem; }
.schematic-author__search { width: 100%; min-height: 37px; margin: .5rem 0; padding: .45rem .55rem; border: 1px solid #4a344d; border-radius: 7px; color: #f1e7f1; background: #100b12; }
.schematic-author__catalog-list { display: grid; flex: 1 1 0; min-height: 90px; gap: .32rem; max-height: 48%; overflow-y: auto; overscroll-behavior: contain; }
.schematic-author__block { display: flex; align-items: center; gap: .55rem; width: 100%; min-height: 46px; padding: .35rem; border: 1px solid #382a3d; border-radius: 7px; color: #ead9ed; background: #1b131e; text-align: left; cursor: pointer; }
.schematic-author__block.is-selected { border-color: #b47ad4; background: #2a1930; box-shadow: 0 0 0 1px rgba(186, 124, 222, .16); }
.schematic-author__block img { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 4px; object-fit: cover; image-rendering: pixelated; }
.schematic-author__used-list { display: grid; flex: 0 1 34%; min-height: 0; gap: .3rem; max-height: 34%; margin-top: .55rem; overflow-y: auto; overscroll-behavior: contain; }
.schematic-author__used-list h3 { margin: 0 0 .1rem; color: #bda8bf; font-size: .72rem; }
.schematic-author__used-item { display: flex; min-width: 0; gap: .28rem; }
.schematic-author__used-item > .schematic-author__block { flex: 1 1 auto; min-width: 0; }
.schematic-author__version-button { flex: 0 0 auto; align-self: stretch; padding: .25rem .35rem; border: 1px solid #5b4161; border-radius: 6px; color: #d9bce1; background: #211727; font-size: .57rem; cursor: pointer; }
.schematic-author__version-button:hover { border-color: #ab78c0; color: white; }
.schematic-author__used-list .schematic-author__block { min-height: 38px; }
.schematic-author__used-list .schematic-author__block img { width: 28px; height: 28px; flex-basis: 28px; }
.schematic-author__block-copy { display: grid; min-width: 0; gap: .12rem; }
.schematic-author__block-copy strong { overflow: hidden; color: #f0e4f1; font-size: .73rem; text-overflow: ellipsis; white-space: nowrap; }
.schematic-author__block-copy small { overflow: hidden; color: #ad94ae; font: 500 .62rem/1.2 var(--font-mono, monospace); text-overflow: ellipsis; white-space: nowrap; }
.schematic-author__empty { color: #b49cb7; font-size: .75rem; }
.schematic-author__editor { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: .75rem; overflow: auto; }
.schematic-author__stage-toolbar { display: flex; justify-content: space-between; gap: .5rem; }
.schematic-author__stage-list { display: flex; gap: .3rem; min-width: 0; overflow-x: auto; }
.schematic-author__stage-actions { display: flex; flex: 0 0 auto; gap: .3rem; }
.schematic-author__stage-tab { flex: 0 0 auto; min-height: 34px; padding: .35rem .55rem; border: 1px solid #3e2b44; border-radius: 7px; color: #cdb7d1; background: #1b131e; font-size: .72rem; cursor: pointer; }
.schematic-author__stage-tab.is-active { border-color: #ae70cb; color: #fff2ff; background: #381d40; }
.schematic-author__stage-name { align-self: flex-start; width: min(300px, 100%); min-height: 34px; margin: .55rem 0; padding: .4rem .55rem; border: 1px solid #49334f; border-radius: 7px; color: #f0e4f2; background: #100b12; }
.schematic-author__stage-name.is-empty { border-color: #ce728f; }
.schematic-author__scene-toolbar { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; margin-bottom: .45rem; }
.schematic-author__scene-toolbar > [hidden] { display: none !important; }
.schematic-author__scene-toolbar .schematic-author__view-toggle { display: flex; gap: .25rem; margin-right: auto; }
.schematic-author__scene-toolbar .schematic-author__view-toggle button { min-height: 33px; padding: .36rem .68rem; border: 1px solid #48334d; border-radius: 7px; color: #cdb5d1; background: #1a121e; cursor: pointer; }
.schematic-author__scene-toolbar .schematic-author__view-toggle button.is-active { border-color: #ae70cb; color: white; background: #351d3d; }
.schematic-author__scene-wrap { position: relative; min-height: 250px; height: min(48vh, 470px); overflow: hidden; border: 1px solid #49334d; border-radius: 10px; background: radial-gradient(ellipse at 50% 65%, #281732, #110c15 72%); }
.schematic-author__canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; min-height: 250px; touch-action: none; }
.schematic-author__canvas[hidden] { display: none !important; }
.schematic-author__canvas--2d { width: 100%; max-width: none; margin: 0; image-rendering: pixelated; cursor: grab; }
.schematic-author__canvas--2d.is-panning { cursor: grabbing; }
.schematic-author__layer-bar { position: absolute; top: .55rem; left: .55rem; display: flex; align-items: center; gap: .55rem; padding: .36rem .5rem; border: 1px solid rgba(125, 88, 139, .55); border-radius: 7px; color: #dccce0; background: rgba(16, 10, 19, .9); font-size: .68rem; }
.schematic-author__layer-bar { z-index: 1; }
.schematic-author__layer-bar[hidden] { display: none; }
.schematic-author__layer-bar label { display: flex; align-items: center; gap: .3rem; }
.schematic-author__layer-bar input { width: 58px; min-height: 28px; padding: .2rem; border: 1px solid #5b4264; border-radius: 5px; color: #f1e8f2; background: #190f1d; }
.schematic-author__layer-hint { color: #a88fab; }
.schematic-author__symmetry { display: flex; align-items: end; gap: .55rem; flex-wrap: wrap; margin-top: .65rem; padding: .55rem .65rem; border: 1px solid #3c2c42; border-radius: 9px; background: #18111a; }
.schematic-author__symmetry h3 { flex: 1 0 100%; margin: 0; color: #dccce0; font-size: .77rem; }
.schematic-author__symmetry label { display: grid; gap: .2rem; color: #b59cb9; font-size: .65rem; }
.schematic-author__symmetry select,.schematic-author__symmetry input { width: 100%; min-width: 78px; min-height: 32px; padding: .35rem .45rem; border: 1px solid #48344e; border-radius: 6px; color: #f0e5f1; background: #100b12; font-size: .72rem; }
.schematic-author__symmetry .schematic-author__drag-sensitivity { flex: 1 1 230px; min-width: 190px; }
.schematic-author__drag-sensitivity-controls { display: flex; align-items: center; gap: .5rem; }
.schematic-author__symmetry .schematic-author__drag-sensitivity input[type="range"] { flex: 1 1 auto; width: 100%; min-width: 100px; min-height: 26px; padding: 0; accent-color: #b97afa; }
.schematic-author__drag-sensitivity output { min-width: 3.2em; color: #eadcf0; font: 600 .68rem/1.2 var(--font-mono, monospace); text-align: right; }
.schematic-author__symmetry .schematic-author__drag-sensitivity-hint { flex: 1 0 100%; }
.schematic-author__symmetry button.is-active { border-color: #c18be0; color: white; background: #492454; box-shadow: 0 0 0 1px rgba(193, 139, 224, .16); }
.schematic-author__symmetry .schematic-author__hint { flex: 1 0 100%; margin: 0; color: #9f879f; font-size: .65rem; }
.schematic-author__new-block { margin-top: .7rem; padding: .65rem; border: 1px solid #604565; border-radius: 9px; background: #211625; }
.schematic-author__new-block h3 { margin: 0 0 .45rem; font-size: .8rem; }
.schematic-author__block-form { display: grid; gap: .42rem; }
.schematic-author__block-form > label { display: grid; gap: .2rem; color: #bca8bf; font-size: .66rem; }
.schematic-author__texture-info { margin: 0; color: #a88fab; font-size: .61rem; line-height: 1.45; }
.schematic-author__manage-catalog { display: inline-flex; align-items: center; min-height: 31px; padding: .35rem .5rem; border: 1px solid #48344e; border-radius: 6px; color: #d7c4dc; background: #151019; font-size: .66rem; text-decoration: none; }
.schematic-author__manage-catalog:hover { border-color: #92629d; color: #fff; }
.schematic-author__block-form input:not([type="file"]),.schematic-author__block-form select { width: 100%; min-height: 32px; padding: .34rem .42rem; border: 1px solid #4d3652; border-radius: 5px; color: #f1e9f2; background: #120d16; font-size: .7rem; }
.schematic-author__texture-fields { display: grid; gap: .35rem; }
.schematic-author__file-label { display: grid; gap: .2rem; padding: .4rem; border: 1px dashed #67496e; border-radius: 6px; color: #d8c2dd; background: rgba(17, 11, 19, .6); font-size: .66rem; }
.schematic-author__file-label input { width: 100%; color: #bba8c0; font-size: .65rem; }
.schematic-author__texture-preview { display: flex; flex-wrap: wrap; gap: .3rem; }
.schematic-author__texture-rotations { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .3rem; }
.schematic-author__rotation-heading { grid-column: 1 / -1; color: #d8c2dd; font-size: .67rem; }
.schematic-author__rotation-control { display: grid; gap: .15rem; color: #bba8c0; font-size: .59rem; }
.schematic-author__rotation-control select { width: 100%; min-height: 29px; padding: .28rem; border: 1px solid #4d3652; border-radius: 5px; color: #f1e9f2; background: #120d16; font-size: .66rem; }
.schematic-author__cross-help { margin: 0; color: #c1a8c5; font-size: .63rem; line-height: 1.45; }
.schematic-author__template-tools { display: flex; align-items: end; gap: .35rem; }
.schematic-author__template-tools[hidden],.schematic-author__cross-help[hidden] { display: none; }
.schematic-author__template-tools label { display: grid; gap: .15rem; color: #bca8bf; font-size: .62rem; }
.schematic-author__template-tools select { min-height: 30px; padding: .3rem; border: 1px solid #4d3652; border-radius: 5px; color: #f1e9f2; background: #120d16; font-size: .68rem; }
.schematic-author__cross-grid-label { flex: 1 0 100%; color: #ad93b0; font-size: .6rem; }
.schematic-author__texture-tile { display: grid; justify-items: center; gap: .1rem; width: 50px; margin: 0; padding: .2rem; border: 1px solid #48334d; border-radius: 5px; background: #110c15; }
.schematic-author__texture-tile img { width: 34px; height: 34px; object-fit: contain; image-rendering: pixelated; }
.schematic-author__texture-tile canvas { width: 34px; height: 34px; image-rendering: pixelated; }
.schematic-author__texture-tile figcaption { max-width: 100%; overflow: hidden; color: #bca7c0; font-size: .52rem; text-overflow: ellipsis; white-space: nowrap; }
.schematic-author__block-message { margin: 0; color: #caadd0; font-size: .66rem; }
.schematic-author__form-actions { display: flex; gap: .35rem; }

.schematic-catalog-page { width: min(1240px, calc(100% - 40px)); margin: 0 auto; padding: 32px 0 64px; color: var(--text-100, #f5f1fc); }
.schematic-catalog__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.schematic-catalog__header h1 { margin: 0; color: var(--text-100, #f5f1fc); font-size: 1.8rem; font-weight: 600; line-height: 1.25; }
.schematic-catalog__header > div > p:last-child { max-width: 730px; margin: 8px 0 0; color: var(--text-400, #b3a6d4); font-size: .95rem; line-height: 1.5; }
.schematic-catalog__back { flex: none; margin-top: 4px; text-decoration: none; }
.schematic-catalog__guide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line, rgba(175,148,255,.14)); border-bottom: 1px solid var(--line, rgba(175,148,255,.14)); }
.schematic-catalog__guide .schematic-catalog__instructions { padding: 16px 20px 16px 0; border: 0; }
.schematic-catalog__guide .schematic-catalog__instructions--identity { padding-right: 0; padding-left: 20px; border-left: 1px solid var(--line, rgba(175,148,255,.14)); }
.schematic-catalog__instruction-heading { display: flex; align-items: flex-start; gap: 12px; }
.schematic-catalog__instruction-heading > span { flex: 0 0 34px; width: 34px; color: var(--violet-300, #cab3ff); font: 600 .8rem/1.5 var(--font-mono, monospace); }
.schematic-catalog__instruction-heading h2 { margin: 0; color: var(--text-100, #f5f1fc); font-size: 1rem; font-weight: 600; }
.schematic-catalog__instruction-heading p { margin: 4px 0 0; color: var(--text-400, #b3a6d4); font-size: .84rem; line-height: 1.45; }
.schematic-catalog__instructions ul { display: grid; gap: 6px; max-width: 100ch; margin: 12px 0 0 46px; padding-left: 18px; color: var(--text-300, #dbd2f0); font-size: .84rem; line-height: 1.5; }
.schematic-catalog__instructions li::marker { color: var(--violet-400, #ab8bff); }
.schematic-catalog__instructions code,.schematic-catalog__examples code { color: var(--violet-200, #e7ddff); font: .78em var(--font-mono, monospace); }
.schematic-catalog__examples { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 12px 0 0 46px; color: var(--text-500, #8c81a9); font-size: .76rem; }
.schematic-catalog__examples code { max-width: 100%; padding: 3px 6px; overflow-wrap: anywhere; border: 1px solid var(--line, rgba(175,148,255,.14)); border-radius: 6px; background: var(--ink-900, #120b1e); }
.schematic-catalog__source-note { margin: 10px 0 0 46px; color: var(--text-500, #8c81a9); font-size: .78rem; line-height: 1.5; }
.schematic-catalog__toolbar { display: flex; align-items: end; gap: 10px; margin: 24px 0 10px; }
.schematic-catalog__toolbar > div { flex: 1 1 auto; min-width: 200px; }
.schematic-catalog__toolbar h2 { margin: 0; color: var(--text-100, #f5f1fc); font-size: 1.05rem; font-weight: 600; }
.schematic-catalog__toolbar p { min-height: 1.2em; margin: 4px 0 0; color: var(--text-500, #8c81a9); font-size: .76rem; }
.schematic-catalog__toolbar p[data-tone="error"] { color: #ef9aa8; }
.schematic-catalog__toolbar p[data-tone="success"] { color: #9bd8b4; }
.schematic-catalog__count { margin-left: 4px; color: var(--violet-300, #cab3ff); font: 600 .84rem var(--font-mono, monospace); }
.schematic-catalog__search-label { flex: 0 1 290px; }
.schematic-catalog__search-label input { width: 100%; min-height: 40px; padding: 8px 11px; border: 1px solid var(--line-strong, rgba(175,148,255,.3)); border-radius: 6px; color: var(--text-100, #f5f1fc); background: var(--ink-900, #120b1e); font: inherit; font-size: .84rem; }
.schematic-catalog__search-label input:focus-visible { outline: 2px solid var(--violet-400, #ab8bff); outline-offset: 2px; }
.schematic-catalog__add { flex: none; min-height: 40px; }
.schematic-catalog__form .schematic-author__new-block { max-width: 800px; margin: 0 0 12px; padding: 16px; border-color: var(--line, rgba(175,148,255,.14)); background: linear-gradient(160deg, var(--ink-700, #211934), var(--ink-800, #191228)); }
.schematic-catalog__form .schematic-author__block-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.schematic-catalog__form .schematic-author__block-form > .schematic-author__texture-info,
.schematic-catalog__form .schematic-author__block-form > .schematic-author__texture-fields,
.schematic-catalog__form .schematic-author__block-form > .schematic-author__texture-rotations,
.schematic-catalog__form .schematic-author__block-form > .schematic-author__texture-preview,
.schematic-catalog__form .schematic-author__block-form > .schematic-author__cross-help,
.schematic-catalog__form .schematic-author__block-form > .schematic-author__template-tools,
.schematic-catalog__form .schematic-author__block-form > .schematic-author__block-message,
.schematic-catalog__form .schematic-author__block-form > .schematic-author__form-actions { grid-column: 1 / -1; }
.schematic-catalog__form .schematic-author__block-form > .schematic-author__texture-info { font-size: .74rem; }
.schematic-catalog__form .schematic-author__block-form > label { font-size: .76rem; }
.schematic-catalog__form .schematic-author__block-form input:not([type="file"]),.schematic-catalog__form .schematic-author__block-form select { min-height: 38px; font-size: .8rem; }
.schematic-catalog__form .schematic-author__file-label { font-size: .75rem; }
.schematic-catalog__table-frame { overflow: hidden; border: 1px solid var(--line, rgba(175,148,255,.14)); border-radius: 12px; background: linear-gradient(160deg, var(--ink-700, #211934), var(--ink-800, #191228)); box-shadow: 0 8px 24px -8px rgba(6,3,14,.55); }
.schematic-catalog__table { width: 100%; border-collapse: collapse; text-align: left; }
.schematic-catalog__table th { padding: 9px 12px; border-bottom: 1px solid var(--line, rgba(175,148,255,.14)); color: var(--text-500, #8c81a9); background: rgba(18,11,30,.56); font-size: .68rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.schematic-catalog__table td { padding: 7px 12px; border-bottom: 1px solid var(--line, rgba(175,148,255,.14)); vertical-align: middle; }
.schematic-catalog__table tbody tr:last-child td { border-bottom: 0; }
.schematic-catalog__table tbody tr:not(.schematic-catalog__skeleton):hover { background: rgba(141,92,245,.055); }
.schematic-catalog__table th:first-child,.schematic-catalog__table td:first-child { width: 62px; }
.schematic-catalog__texture { display: block; width: 38px; height: 38px; padding: 3px; border: 1px solid var(--line, rgba(175,148,255,.14)); border-radius: 6px; background: var(--ink-900, #120b1e); image-rendering: pixelated; object-fit: contain; }
.schematic-catalog__block-details { display: grid; min-width: 0; gap: 3px; }
.schematic-catalog__block-details h3 { margin: 0; overflow: hidden; color: var(--text-100, #f5f1fc); font-size: .83rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.schematic-catalog__block-details code { overflow: hidden; color: var(--text-400, #b3a6d4); font: .7rem var(--font-mono, monospace); text-overflow: ellipsis; white-space: nowrap; }
.schematic-catalog__version { color: var(--text-500, #8c81a9); font-size: .75rem; }
.schematic-catalog__update { min-height: 32px; padding: 6px 9px; border: 1px solid var(--line-strong, rgba(175,148,255,.3)); border-radius: 6px; color: var(--text-300, #dbd2f0); background: rgba(255,255,255,.02); cursor: pointer; font: inherit; font-size: .72rem; transition: border-color .15s ease, color .15s ease, transform .15s ease; }
.schematic-catalog__update:hover { border-color: var(--violet-400, #ab8bff); color: var(--text-100, #f5f1fc); }
.schematic-catalog__update:active { transform: translateY(1px) scale(.98); }
.schematic-catalog__update:focus-visible { outline: 2px solid var(--violet-400, #ab8bff); outline-offset: 2px; }
.schematic-catalog__empty { padding: 24px !important; color: var(--text-400, #b3a6d4); text-align: center; font-size: .86rem; }
.schematic-catalog__skeleton td > span { display: block; width: 38px; height: 38px; border-radius: 6px; background: var(--skeleton-weak, #241c38); animation: schematic-catalog-pulse 1.4s ease-in-out infinite alternate; }
.schematic-catalog__skeleton td:nth-child(2) span { width: min(100%, 270px); height: 11px; margin: 5px 0; }
.schematic-catalog__skeleton td:nth-child(2) span + span { width: min(68%, 190px); }
.schematic-catalog__skeleton td:nth-child(3) span { width: 30px; height: 10px; }
@keyframes schematic-catalog-pulse { to { opacity: .48; } }

@media (max-width: 760px) {
  .guide-schematic { margin: 1.4rem 0 1.8rem; padding: .75rem; border-radius: 12px; }
  .guide-schematic__viewport { min-height: 220px; height: 56vw; max-height: 310px; }
  .guide-schematic__header { align-items: flex-start; }
  .guide-schematic__header h3 { font-size: 1rem; }
  .guide-schematic__header-actions { flex-wrap: wrap; justify-content: flex-end; }
  .guide-schematic__view-toggle button { min-height: 31px; padding: .35rem .55rem; font-size: .73rem; }
  .guide-schematic__icon-button { width: 32px; min-height: 31px; }
  .guide-schematic__stage { min-height: 31px; padding: .35rem .55rem; font-size: .75rem; }
  .guide-schematic__materials { gap: .25rem; }
  .guide-schematic__material { gap: .28rem; min-height: 27px; padding-right: .35rem; font-size: .69rem; }
  .guide-schematic__material img { width: 22px; height: 22px; flex-basis: 22px; }

  .schematic-author-dialog { position: fixed; inset: 0; top: 0; left: 0; width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; transform: none; border: 0; border-radius: 0; }
  .schematic-author { height: 100dvh; max-height: 100dvh; }
  .schematic-author__header { grid-template-columns: minmax(0, 1fr) auto auto; gap: .4rem; padding: .6rem; }
  .schematic-author__title-group { grid-column: 1 / 3; }
  .schematic-author__title { font-size: 1rem !important; }
  .schematic-author__status { grid-column: 1 / 4; grid-row: 2; min-height: 1em; }
  .schematic-author__header > .schematic-author__secondary { grid-column: 2; grid-row: 1; }
  .schematic-author__header > .schematic-author__primary { grid-column: 3; grid-row: 1; }
  .schematic-author__workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); overflow-y: auto; }
  .schematic-author__sidebar { order: 2; max-height: 28vh; padding: .55rem; overflow: auto; border-top: 1px solid #38283e; border-right: 0; }
  .schematic-author__editor { order: 1; padding: .55rem; overflow: visible; }
  .schematic-author__catalog-list { grid-template-columns: minmax(0, 1fr); flex: 0 0 auto; min-height: 55px; max-height: 18vh; }
  .schematic-author__used-list { display: grid; flex: 0 0 auto; max-height: 12vh; }
  .schematic-author__stage-toolbar { align-items: flex-start; flex-direction: column; }
  .schematic-author__stage-actions { width: 100%; }
  .schematic-author__stage-actions button { flex: 1; }
  .schematic-author__scene-wrap { min-height: 220px; height: 38vh; }
  .schematic-author__canvas { min-height: 220px; }
  .schematic-author__layer-hint { display: none; }
  .schematic-author__symmetry { gap: .35rem; }
  .schematic-author__symmetry label { flex: 1 1 29%; }
  .schematic-author__symmetry .schematic-author__secondary { flex: 1 0 100%; }
  .schematic-author__symmetry .schematic-author__drag-sensitivity { flex: 1 1 100%; min-width: 0; }

  .schematic-catalog-page { width: calc(100% - 24px); padding: 22px 0 44px; }
  .schematic-catalog__header { align-items: stretch; flex-direction: column; gap: 12px; margin-bottom: 18px; }
  .schematic-catalog__header h1 { font-size: 1.45rem; }
  .schematic-catalog__back { align-self: flex-start; }
  .schematic-catalog__instructions { padding: 14px 0; }
  .schematic-catalog__guide { grid-template-columns: minmax(0, 1fr); }
  .schematic-catalog__guide .schematic-catalog__instructions { padding: 14px 0; }
  .schematic-catalog__guide .schematic-catalog__instructions--identity { padding-right: 0; padding-left: 0; border-top: 1px solid var(--line, rgba(175,148,255,.14)); border-left: 0; }
  .schematic-catalog__instruction-heading { gap: 8px; }
  .schematic-catalog__instruction-heading > span { flex-basis: 28px; width: 28px; }
  .schematic-catalog__instructions ul,.schematic-catalog__examples,.schematic-catalog__source-note { margin-left: 36px; }
  .schematic-catalog__toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; margin-top: 18px; }
  .schematic-catalog__toolbar > div { grid-column: 1 / -1; min-width: 0; }
  .schematic-catalog__search-label { min-width: 0; }
  .schematic-catalog__add { min-height: 40px; padding: 8px 10px; font-size: .75rem; }
  .schematic-catalog__form .schematic-author__block-form { grid-template-columns: minmax(0, 1fr); }
  .schematic-catalog__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .schematic-catalog__table,.schematic-catalog__table tbody { display: block; width: 100%; }
  .schematic-catalog__table tbody tr { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 7px 8px; border-bottom: 1px solid var(--line, rgba(175,148,255,.14)); }
  .schematic-catalog__table tbody tr:last-child { border-bottom: 0; }
  .schematic-catalog__table td { min-width: 0; padding: 0; border: 0; }
  .schematic-catalog__table th:first-child,.schematic-catalog__table td:first-child { width: auto; }
  .schematic-catalog__texture { width: 38px; height: 38px; }
  .schematic-catalog__table td:nth-child(3) { display: none; }
  .schematic-catalog__table td:nth-child(4) { grid-column: 3; grid-row: 1; }
  .schematic-catalog__update { min-height: 31px; padding: 5px 7px; font-size: .64rem; white-space: nowrap; }
  .schematic-catalog__empty { grid-column: 1 / -1; padding: 16px 8px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .guide-schematic *, .schematic-author-dialog * { scroll-behavior: auto !important; }
}
