.rebuild-controls[hidden], .rebuild-controls [hidden] { display: none !important; }
.rebuild-controls {
  position: absolute; z-index: 24; right: 40px; bottom: 27px;
  display: flex; align-items: center; gap: 18px;
  font: 400 11px/1.4 var(--mono); letter-spacing: 0;
}
.rebuild-controls button {
  min-height: 44px; padding: 6px 0; border: 0; border-bottom: 1px solid #a9856844;
  border-radius: 0; background: transparent; color: #e7c0a0;
  font: inherit; cursor: pointer;
}
.rebuild-controls button:hover { color: #fff3df; border-color: currentColor; }
.rebuild-controls button:focus-visible { outline: 2px solid #e7c0a0; outline-offset: 5px; }
.rebuild-controls [data-rebuild-restore], [data-rebuild-count] { color: #b0b8c0; }
.portal-instruction { bottom: 88px; }
.portal.has-open-index .rebuild-controls, .portal.has-focused-star .rebuild-controls { visibility: hidden; }
.rebuild-dialog {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; overflow: hidden;
  background: transparent; color: #f4efe5; letter-spacing: 0;
}
.rebuild-dialog::backdrop { background: #030408e8; }
.rebuild-dialog canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.rebuild-copy { position: absolute; left: 24px; right: 24px; top: 39%; text-align: center; pointer-events: none; }
.rebuild-copy p { margin: 0 0 18px; font: 400 11px/1.4 var(--mono); color: #d0b79e; }
.rebuild-copy h2 { margin: 0; font: 400 76px/1.05 var(--serif); }
.rebuild-copy small { display: block; margin-top: 22px; font: 400 13px/1.6 var(--sans); color: #adb4bf; }
.rebuild-skip {
  position: absolute; bottom: max(30px, env(safe-area-inset-bottom)); right: 32px;
  min-height: 44px; padding: 10px 0; background: transparent; border: 0;
  border-bottom: 1px solid #666; color: #dce1e5; font: 12px var(--mono); cursor: pointer;
}
.rebuild-skip:focus-visible { outline: 2px solid #e7c0a0; outline-offset: 5px; }
.rebuild-dialog[data-phase="burst"] .rebuild-copy { top: 64%; }
.rebuild-dialog[data-phase="rebuild"] .rebuild-copy { top: 25%; }
.rebuild-dialog[data-phase="panic"] .rebuild-copy { top: 12%; }
.rebuild-dialog[data-phase="panic"] .rebuild-copy h2 { font-size: 52px; }
.rebuild-dialog[data-phase="panic"] canvas { visibility: hidden; }
.retro-window {
  color-scheme: light; color: #111; background: #c0c0c0;
  border: 3px solid; border-color: #f8f8f8 #303030 #303030 #f8f8f8;
  box-shadow: 2px 2px 0 #000; border-radius: 0;
  font: 13px/1.5 Tahoma, Arial, sans-serif; text-shadow: none;
}
.retro-title {
  padding: 3px 6px; background: #000080; color: #fff; font-weight: bold;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.retro-body { padding: 18px; }
.retro-body p { margin: 0 0 18px; }
.retro-body h2 { margin: 0 0 12px; font: bold 25px/1.2 Tahoma, Arial, sans-serif; }
.retro-window button {
  background: #c0c0c0; color: #111; font: inherit; padding: 6px 12px;
  border: 2px solid; border-color: #fff #444 #444 #fff; border-radius: 0;
  min-height: 36px; box-shadow: 1px 1px 0 #111; cursor: pointer;
}
.retro-window button:active { border-color: #444 #fff #fff #444; }
.retro-window button:focus-visible { outline: 2px dotted #000; outline-offset: -5px; }
.retro-title button { min-width: 32px; min-height: 32px; padding: 0 5px; font-size: 22px; }
.retro-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.rebuild-error {
  position: absolute; width: 330px; max-width: calc(100% - 36px);
  left: calc(8% + var(--error-index) * 12%); top: calc(30% + var(--error-index) * 8%);
  animation: error-arrives .16s both; animation-delay: calc(var(--error-index) * .22s);
}
@keyframes error-arrives { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: none; } }
.rebuild-dialog:not([data-phase="panic"]):not([data-phase="collapse"]) .rebuild-errors { display: none; }
.rebuild-dialog[data-phase="collapse"] .rebuild-copy { visibility: hidden; }
.rebuild-premature { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); width: 380px; max-width: calc(100% - 40px); }
.rebuild-premature .retro-body { padding: 12px; }
.rebuild-dialog:not([data-phase="rebuild"]) .rebuild-premature { display: none; }
.portal.has-rebuilt .portal-intro { visibility: hidden; pointer-events: none; }
.rebuild-argument, .rebuild-committee {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 510px; max-width: calc(100% - 40px); max-height: calc(100% - 120px); overflow: auto;
}
.rebuild-argument .retro-body { min-height: 300px; }
.rebuild-argument p { padding-bottom: 12px; border-bottom: 1px solid #888; }
.rebuild-argument b { display: block; margin-bottom: 3px; }
.rebuild-font-sample { padding: 12px 6px; border: 1px dashed #555; font: bold 18px Georgia, serif; }
.rebuild-argument.font-changed .rebuild-font-sample,
.portal[data-rebuild-theme][data-font-meddler] .portal-brand { font-family: "Comic Sans MS", "Comic Sans", cursive; }
.rebuild-committee .retro-body { min-height: 340px; }
.rebuild-committee ul { margin: 0; padding: 0; list-style: none; }
.rebuild-committee li { padding: 10px 0; border-bottom: 1px solid #888; }
.committee-stamp { margin-top: 20px; border: 4px double #962d26; padding: 10px; color: #962d26; text-align: center; font: bold 26px/1.1 "Courier New", monospace; transform: rotate(-3deg); animation: committee-stamp-in .18s ease-out; }
.committee-stamp small { display: block; font: 12px/1.4 Arial, sans-serif; margin-top: 5px; }
@keyframes committee-stamp-in { from { transform: rotate(-3deg) scale(1.2); opacity: 0; } to { transform: rotate(-3deg) scale(1); opacity: 1; } }
.rebuild-dialog:not([data-phase="argument"]) .rebuild-argument,
.rebuild-dialog:not([data-phase="committee"]) .rebuild-committee { display: none; }
.rebuild-dialog[data-phase="argument"] .rebuild-copy,
.rebuild-dialog[data-phase="committee"] .rebuild-copy { visibility: hidden; }
.rebuild-regret { width: 420px; max-width: calc(100% - 40px); max-height: calc(100% - 40px); margin: auto; padding: 0; }
.rebuild-regret::backdrop { background: #000b; }
.rebuild-report { max-height: calc(100svh - 225px); overflow: auto; }
.rebuild-report button:disabled { opacity: .65; cursor: default; }
.rebuild-progress { position: absolute; left: 50%; top: 70%; transform: translateX(-50%); width: 360px; max-width: calc(100% - 40px); }
.rebuild-progress label { display: block; margin-bottom: 8px; }
.rebuild-progress progress { width: 100%; height: 20px; accent-color: #000080; }
.rebuild-dialog:not([data-phase="rebuild"]) .rebuild-progress { display: none; }
.rebuild-report { position: absolute; z-index: 35; left: 40px; bottom: 105px; width: 350px; max-width: calc(100% - 40px); }
.portal.has-open-index .rebuild-report, .portal.has-focused-star .rebuild-report { visibility: hidden; }
.portal[data-rebuild-theme] { --rebuild-logo-scale: 1; font-family: var(--sans); color: var(--ink); }
.portal[data-rebuild-theme] .portal-brand img { transform: scale(var(--rebuild-logo-scale)); }
.portal[data-rebuild-theme] .portal-atmosphere,
.portal[data-rebuild-theme] .portal-grain,
.portal[data-rebuild-theme] .optical-flare { display: none; }
.portal[data-rebuild-theme]::after { box-shadow: none; }
.portal[data-rebuild-theme] .portal-canvas { mix-blend-mode: screen; }
.portal[data-rebuild-theme] .arrival-film { visibility: hidden; }
.portal[data-rebuild-theme] .rebuild-controls button { color: var(--ink); }
.portal[data-rebuild-theme] .rebuild-controls button:focus-visible { outline-color: var(--ink); }
.portal[data-rebuild-theme] .portal-instruction { color: var(--muted); }
.portal[data-rebuild-theme] .star-label { text-shadow: 0 1px 5px #000; }
.portal[data-rebuild-theme] .project-index { background: var(--night); }
.portal[data-rebuild-theme] .project-index li small,
.portal[data-rebuild-theme] .project-index li span { color: var(--muted); }
.portal[data-rebuild-theme] .project-index li { border-color: currentColor; }
.portal[data-rebuild-theme] .project-preview { background: #06090ef2; --ink: #fff; --muted: #bbc1c8; color: #fff; }
.portal[data-rebuild-theme] .preview-subtitle,
.portal[data-rebuild-theme] .preview-description { color: #d3d8dd; }
.portal[data-rebuild-theme] .star-label small,
.portal[data-rebuild-theme] .star-label em { color: var(--ink); }
.portal[data-rebuild-theme] .project-index::before,
.portal[data-rebuild-theme] .project-index::after { display: none; }
.portal[data-rebuild-theme] .preview-copy h2 { font-size: 42px; line-height: 1.05; overflow-wrap: anywhere; }
.portal[data-rebuild-theme] .project-preview { max-height: calc(100svh - 115px); overflow-y: auto; padding: 18px; }
.portal[data-rebuild-theme] .star-label strong { overflow-wrap: anywhere; }
.portal[data-rebuild-theme="win31"] {
  --void: #008080; --night: #c0c0c0; --ink: #fff; --muted: #ddd; --warm: #fff;
  --serif: Tahoma, Arial, sans-serif; --sans: Tahoma, Arial, sans-serif; --mono: "Courier New", monospace;
}
.portal[data-rebuild-theme="win31"] .portal-header {
  top: 10px; left: 10px; right: 10px; padding: 6px 10px; background: #000080;
  border: 4px solid; border-color: #eee #555 #555 #eee; box-shadow: 1px 1px #000;
}
.portal[data-rebuild-theme="win31"] .portal-brand,
.portal[data-rebuild-theme="win31"] .portal-contact { color: #fff; }
.portal[data-rebuild-theme="win31"] .index-toggle,
.portal[data-rebuild-theme="win31"] .icon-control,
.portal[data-rebuild-theme="win31"] .rebuild-controls button {
  background: #c0c0c0; color: #000; border: 2px solid; border-color: #fff #444 #444 #fff;
  border-radius: 0; padding: 7px 10px; box-shadow: 1px 1px #111;
}
.portal[data-rebuild-theme="win31"] .star-label strong { font: bold 14px Tahoma, Arial, sans-serif; }
.portal[data-rebuild-theme="win31"] .project-index { --ink: #111; --muted: #333; --warm: #000080; color: #111; border: 3px outset #ddd; }
.portal[data-rebuild-theme="win31"] .project-index-header { background: #000080; color: #fff; padding: 5px; }
.portal[data-rebuild-theme="win31"] .project-index button { color: inherit; }
.portal[data-rebuild-theme="win31"] .project-index-item { border-color: #777; }
.portal[data-rebuild-theme="terminal"] {
  --void: #090c08; --night: #101710; --ink: #b8ffc7; --muted: #94bd9b; --warm: #efc97e;
  --serif: "Courier New", monospace; --sans: "Courier New", monospace; --mono: "Courier New", monospace;
  background-image: repeating-linear-gradient(0deg, transparent 0 3px, #88ff9906 3px 4px);
}
.portal[data-rebuild-theme="terminal"] .portal-header { border-bottom: 1px solid #527258; padding-bottom: 18px; }
.portal[data-rebuild-theme="terminal"] .star-label strong { font-size: 17px; }
.portal[data-rebuild-theme="terminal"] .retro-window { background: #101710; color: #b8ffc7; border: 1px solid #83b48c; box-shadow: none; font-family: "Courier New", monospace; }
.portal[data-rebuild-theme="terminal"] .retro-title { background: #b8ffc7; color: #091109; }
.portal[data-rebuild-theme="terminal"] .retro-body h2 { font: bold 24px "Courier New", monospace; }
.portal[data-rebuild-theme="tabloid"] {
  --void: #e5e5dd; --night: #eee; --ink: #161616; --muted: #444; --warm: #a31522;
  --serif: Georgia, "Times New Roman", serif; --sans: Georgia, serif; --mono: "Courier New", monospace;
}
.portal[data-rebuild-theme="tabloid"] .portal-canvas { mix-blend-mode: multiply; filter: invert(1) grayscale(1); }
.portal[data-rebuild-theme="tabloid"] .portal-header { border-block: 3px double #111; padding-block: 12px; }
.portal[data-rebuild-theme="tabloid"] .portal-brand { font: bold 24px Georgia, serif; }
.portal[data-rebuild-theme="tabloid"] .star-label { color: #111; text-shadow: none; }
.portal[data-rebuild-theme="tabloid"] .star-label strong { color: #111; }
.portal[data-rebuild-theme="tabloid"] .retro-window { background: #eee; color: #111; border: 2px solid #111; box-shadow: 5px 5px 0 #a31522; font-family: Georgia, serif; }
.portal[data-rebuild-theme="tabloid"] .retro-title { background: #a31522; }
.portal[data-rebuild-theme="tabloid"] .retro-body h2 { font: bold 28px Georgia, serif; }
.portal[data-rebuild-theme="candy"] {
  --void: #edbed0; --night: #f0eedb; --ink: #242424; --muted: #433044; --warm: #70322f;
  --serif: Impact, "Arial Black", sans-serif; --sans: Arial, sans-serif; --mono: "Courier New", monospace;
}
.portal[data-rebuild-theme="candy"] .portal-canvas { mix-blend-mode: multiply; filter: invert(1); }
.portal[data-rebuild-theme="candy"] .portal-header { padding: 12px; background: #ece962; border: 3px solid #111; box-shadow: 5px 5px 0 #368a98; }
.portal[data-rebuild-theme="candy"] .star-label { text-shadow: none; }
.portal[data-rebuild-theme="candy"] .star-label strong { color: #242424; }
.portal[data-rebuild-theme="candy"] .retro-window { border: 3px solid #111; background: #ece962; box-shadow: 6px 6px 0 #368a98; }
.portal[data-rebuild-theme="candy"] .retro-title { background: #368a98; }
.portal[data-rebuild-theme="candy"] .retro-body h2 { font: 30px Impact, "Arial Black", sans-serif; }
.portal[data-rebuild-theme="classic"] {
  --void: #a4a4a4; --night: #fff; --ink: #111; --muted: #333; --warm: #111;
  --serif: "Courier New", monospace; --sans: Geneva, Verdana, sans-serif; --mono: "Courier New", monospace;
  background-image: repeating-conic-gradient(#999 0 25%, #bcbcbc 0 50%); background-size: 4px 4px;
}
.portal[data-rebuild-theme="classic"] .portal-canvas { mix-blend-mode: multiply; filter: invert(1) grayscale(1) contrast(1.5); }
.portal[data-rebuild-theme="classic"] .portal-header { padding: 12px; background: #fff; border: 2px solid #111; box-shadow: 3px 3px #111; }
.portal[data-rebuild-theme="classic"] .star-label { text-shadow: none; }
.portal[data-rebuild-theme="classic"] .star-label strong { color: #111; background: #fff; padding: 4px 6px; }
.portal[data-rebuild-theme="classic"] .retro-window { background: #fff; border: 2px solid #111; box-shadow: 5px 5px #111; font-family: Geneva, Verdana, sans-serif; }
.portal[data-rebuild-theme="classic"] .retro-title { color: #111; background: #eee; border-bottom: 2px solid #111; }
.portal[data-rebuild-theme="classic"] .retro-window button { border: 2px solid #111; background: #fff; box-shadow: 2px 2px #111; }
.portal[data-rebuild-theme="blueprint"] {
  --void: #123db1; --night: #102d7c; --ink: #fff; --muted: #d2e0ff; --warm: #ffdc62;
  --serif: "Courier New", monospace; --sans: "Courier New", monospace; --mono: "Courier New", monospace;
  background-image: linear-gradient(#ffffff12 1px, transparent 1px), linear-gradient(90deg, #ffffff12 1px, transparent 1px); background-size: 32px 32px;
}
.portal[data-rebuild-theme="blueprint"] .portal-header { border: 1px solid #fff; padding: 12px; }
.portal[data-rebuild-theme="blueprint"] .retro-window { background: #102d7c; color: #fff; border: 1px solid #fff; box-shadow: 7px 7px 0 #ffdc62; font-family: "Courier New", monospace; }
.portal[data-rebuild-theme="blueprint"] .retro-title { background: #ffdc62; color: #102d7c; }
.portal[data-rebuild-theme="blueprint"] .retro-body h2 { font: bold 26px "Courier New", monospace; }
.portal[data-rebuild-theme="punk"] {
  --void: #dce62d; --night: #e7e7df; --ink: #111; --muted: #292929; --warm: #ad1228;
  --serif: Impact, "Arial Black", sans-serif; --sans: "Courier New", monospace; --mono: "Courier New", monospace;
}
.portal[data-rebuild-theme="punk"] .portal-canvas { mix-blend-mode: multiply; filter: invert(1) grayscale(1) contrast(2); }
.portal[data-rebuild-theme="punk"] .portal-header { padding: 12px; background: #111; border-bottom: 6px solid #f1f1e9; color: #fff; }
.portal[data-rebuild-theme="punk"] .portal-header a,
.portal[data-rebuild-theme="punk"] .portal-header button { color: #fff; }
.portal[data-rebuild-theme="punk"] .star-label { text-shadow: none; }
.portal[data-rebuild-theme="punk"] .star-label strong { padding: 4px 8px; background: #111; color: #fff; font: 19px Impact, sans-serif; }
.portal[data-rebuild-theme="punk"] .retro-window { background: #e7e7df; border: 3px solid #111; box-shadow: 7px 7px #111; font-family: "Courier New", monospace; }
.portal[data-rebuild-theme="punk"] .retro-title { background: #ad1228; }
.portal[data-rebuild-theme="punk"] .retro-body h2 { font: 32px Impact, sans-serif; text-transform: uppercase; }
.portal[data-rebuild-theme="corporate"] {
  --void: #f0f3f7; --night: #fff; --ink: #123751; --muted: #42596a; --warm: #08755f;
  --serif: Arial, sans-serif; --sans: Arial, sans-serif; --mono: Arial, sans-serif;
}
.portal[data-rebuild-theme="corporate"] .portal-canvas { mix-blend-mode: multiply; filter: invert(1) grayscale(1); }
.portal[data-rebuild-theme="corporate"] .portal-header { padding: 16px; background: #fff; border-top: 6px solid #08755f; border-bottom: 1px solid #bdcbd4; }
.portal[data-rebuild-theme="corporate"] .star-label { text-shadow: none; }
.portal[data-rebuild-theme="corporate"] .star-label strong { color: #123751; font: bold 15px Arial, sans-serif; }
.portal[data-rebuild-theme="corporate"] .retro-window { background: #fff; border: 1px solid #bdcbd4; border-top: 6px solid #08755f; box-shadow: none; font-family: Arial, sans-serif; }
.portal[data-rebuild-theme="corporate"] .retro-title { background: #123751; }
.portal[data-rebuild-theme="corporate"] .retro-body h2 { font: bold 26px Arial, sans-serif; }
.portal[data-rebuild-theme="corporate"] .retro-window button { background: #123751; color: #fff; border: 1px solid #123751; box-shadow: none; }
.portal[data-rebuild-theme="seventies"] {
  --void: #ebc349; --night: #f5edcf; --ink: #273b2b; --muted: #394633; --warm: #9d3529;
  --serif: "Cooper Black", "Bookman Old Style", Georgia, serif;
  --sans: "Trebuchet MS", Arial, sans-serif; --mono: "Courier New", monospace;
}
.portal[data-rebuild-theme="seventies"]::before {
  content: ""; position: absolute; z-index: 1; pointer-events: none;
  width: 58%; height: 130%; right: -21%; top: -43%;
  border: 34px solid #9d3529; border-radius: 44%; transform: rotate(-24deg);
  box-shadow: 0 0 0 24px #dc7239, 0 0 0 48px #f5edcf, 0 0 0 72px #667340;
  opacity: .9;
}
.portal[data-rebuild-theme="seventies"] .portal-canvas { mix-blend-mode: multiply; filter: invert(1) sepia(.5); }
.portal[data-rebuild-theme="seventies"] .portal-header { padding: 18px 24px; background: #f5edcf; border-block: 3px solid #273b2b; }
.portal[data-rebuild-theme="seventies"] .portal-brand { font: 900 28px/1.1 var(--serif); text-transform: none; }
.portal[data-rebuild-theme="seventies"] .portal-brand img { width: 40px; height: 40px; }
.portal[data-rebuild-theme="seventies"] .star-label { text-shadow: none; }
.portal[data-rebuild-theme="seventies"] .star-label strong { color: #273b2b; font: 900 20px/1.1 var(--serif); }
.portal[data-rebuild-theme="seventies"] [data-star-id="magnus"] .star-label strong { background: #ebc349; padding: 3px 0; }
.portal[data-rebuild-theme="seventies"] .portal-instruction { background: #ebc349; padding: 5px 8px; }
.portal[data-rebuild-theme="seventies"] .rebuild-controls { background: #ebc349; padding: 0 8px; }
.portal[data-rebuild-theme="seventies"] [data-rebuild-count] { color: #394633; }
.portal[data-rebuild-theme="seventies"] .retro-window { border: 2px solid #273b2b; background: #f5edcf; color: #273b2b; box-shadow: 7px 7px 0 #9d3529; border-radius: 6px; overflow: hidden; font-family: "Trebuchet MS", Arial, sans-serif; }
.portal[data-rebuild-theme="seventies"] .retro-title { color: #f5edcf; background: #667340; padding: 7px 10px; font-family: "Courier New", monospace; }
.portal[data-rebuild-theme="seventies"] .retro-body { border-top: 8px solid #dc7239; }
.portal[data-rebuild-theme="seventies"] .retro-body h2 { font: 900 31px/1.1 var(--serif); }
.portal[data-rebuild-theme="seventies"] .retro-window button { background: #f5edcf; color: #273b2b; border: 2px solid #273b2b; box-shadow: 2px 2px #273b2b; }
.portal[data-rebuild-theme="seventies"] .project-index { border-left: 8px solid #9d3529; }
.portal[data-rebuild-theme="seventies"] .project-index-header { border-bottom: 5px solid #667340; }
.portal[data-rebuild-theme="seventies"].has-focused-star::before,
.portal[data-rebuild-theme="seventies"].has-open-index::before { opacity: .25; }
.portal.is-rebuilding .portal-canvas,
.portal.is-rebuilding .star-layer,
.portal.is-rebuilding .optical-flare { opacity: 0 !important; transition: opacity .6s; }
.portal.is-rebuilding .portal-intro,
.portal.is-rebuilding .portal-header,
.portal.is-rebuilding .portal-instruction { opacity: 0 !important; transition: opacity .6s; }
@media (max-width: 720px) {
  .rebuild-controls { right: 20px; bottom: max(18px, env(safe-area-inset-bottom)); gap: 14px; font-size: 10px; }
  .rebuild-controls [data-rebuild-count] { display: none; }
  .portal[data-rebuild-theme] .preview-copy h2 { font-size: 32px; }
  .portal-instruction { bottom: 78px; }
  .portal[data-arrival="entering"] .rebuild-controls { bottom: 80px; }
  .rebuild-copy h2 { font-size: 45px; }
  .rebuild-copy small { max-width: 260px; margin: 20px auto 0; }
  .rebuild-dialog[data-phase="panic"] .rebuild-copy { top: 8%; }
  .rebuild-dialog[data-phase="panic"] .rebuild-copy h2 { font-size: 38px; }
  .rebuild-error { left: calc(10px + var(--error-index) * 7px); top: calc(27% + var(--error-index) * 6%); width: calc(100% - 55px); }
  .rebuild-error .retro-body { padding: 12px; }
  .rebuild-report { left: 20px; bottom: 120px; }
  .retro-window button { min-height: 44px; }
  .portal[data-rebuild-theme="win31"] .portal-header { padding: 6px; }
  .portal[data-rebuild-theme="win31"] .portal-brand { font-size: 10px; }
  .portal[data-rebuild-theme="win31"] .index-toggle { font-size: 10px; padding: 6px; }
  .portal[data-rebuild-theme="tabloid"] .portal-brand { font-size: 16px; }
  .portal[data-rebuild-theme="seventies"] .portal-header { padding: 12px 10px; }
  .portal[data-rebuild-theme="seventies"] .portal-brand { font-size: 17px; }
  .portal[data-rebuild-theme="seventies"] .portal-brand img { width: 28px; height: 28px; }
  .portal[data-rebuild-theme="seventies"] .star-label strong { font-size: 15px; }
  .portal[data-rebuild-theme="seventies"]::before { right: -75%; width: 95%; border-width: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .portal.is-rebuilding * { transition: none !important; }
  .rebuild-error { animation: none; }
  .committee-stamp { animation: none; transform: none; }
}

/* The operation is a quiet tenth world, reached through the same safe slots. */
.portal[data-rebuild-theme="abramelin"] {
  --void: #080806; --night: #13120e; --ink: #f0e8cf; --muted: #c6b98f;
  --warm: #efc770; --serif: Georgia, serif; --mono: "Courier New", monospace;
}
.portal[data-rebuild-theme="abramelin"] .portal-header {
  border-block: 3px double #bba475; padding: 12px; background: #10100ccf;
}
.portal[data-rebuild-theme="abramelin"] .portal-canvas { filter: sepia(.6); }
.portal[data-rebuild-theme="abramelin"] .star-label strong { font-family: Georgia, serif; }
.rebuild-dialog[data-story-theme="abramelin"]::backdrop { background: #080704f2; }
.rebuild-dialog[data-story-theme="abramelin"] .rebuild-errors,
.rebuild-dialog[data-story-theme="abramelin"] .rebuild-argument,
.rebuild-dialog[data-story-theme="abramelin"] .rebuild-committee,
.rebuild-dialog[data-story-theme="abramelin"] .rebuild-premature { display: none !important; }
.rebuild-dialog[data-story-theme="abramelin"] .rebuild-copy { visibility: visible !important; top: 24% !important; }
.rebuild-dialog[data-story-theme="abramelin"] .rebuild-copy h2 { color: #ebd9aa; }
.rebuild-dialog[data-story-theme="abramelin"] .rebuild-copy small { color: #d5c69f; }
.rebuild-controls { flex-wrap: wrap; max-width: calc(100% - 80px); }
.rebuild-controls [data-rebuild-journal] { color: inherit; }
@media (max-width:720px) {
  .rebuild-controls { max-width: calc(100% - 40px); gap: 4px 16px; justify-content: flex-end; }
  .rebuild-controls button { white-space: nowrap; }
  .rebuild-controls [data-rebuild-journal] { flex-basis: auto; }
  .portal.has-rebuilt .portal-instruction { display: none; }
}

.portal[data-rebuild-theme="abramelin"] .portal-header :is(a,button) { color: #ead8b3; }
.portal.has-rebuilt .rebuild-controls [data-rebuild] {
  background: #fff2b9; color: #202014; border: 1px solid #b5a364;
  padding: 8px 13px; font-weight: 700;
}
.portal.has-rebuilt .rebuild-controls [data-rebuild]:hover { background: #fff9db; color: #202014; }
