:root {
  --ink: #1c1024;
  --paper: #f7f3f8;
  --disc: #f3d4e8;
  --paw: #6a3484;
  --hull: #241428;
  --q400: #3d2448;
  --rail: #2c1836;
  --yellow: #f5c542;
  --green: #3db87a;
  --slate: #9eb1bc;
  --q400-h: 96px;
  font-family: Fredoka, sans-serif;
  font-weight: 500;
  color: var(--paper);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; background: var(--hull); }
.sr-frame {
  position: relative;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--hull);
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.desk {
  height: 100%;
  display: grid;
  grid-template-columns: 8.6rem minmax(0, 1fr) 8.6rem;
  grid-template-rows: minmax(0, 1fr) var(--q400-h);
}
html.sr-desk-lock .desk {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1536px;
  height: 864px;
  transform: translate(-50%, -50%) scale(var(--sr-desk-scale, 1));
  transform-origin: center center;
}
.desk.rails-hidden {
  grid-template-columns: minmax(0, 1fr);
}
.desk.rails-hidden #q100,
.desk.rails-hidden #q300 { display: none; }

#q100, #q300 {
  background: var(--rail);
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0.45rem 0.35rem;
  gap: 0.35rem;
}

.rail-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05rem;
  width: 100%;
}
.rail-btn, .gutter button {
  width: 2.15rem;
  height: 2.15rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #f5f5f5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.rail-btn { width: 100%; height: 4.35rem; padding: 0; border-radius: 8px; }
.rail-btn i { font-size: 4.1rem; line-height: 1; }
.gutter button:hover, .step:hover { background: rgba(255,255,255,0.08); }
#q100 .rail-btn,
#q100 .backpack { position: relative; }
#q100 .rail-btn i,
#q100 .backpack i {
  display: inline-block;
  transform-origin: center center;
  transition:
    transform 0.16s cubic-bezier(0.22, 1, 0.32, 1),
    filter 0.16s ease;
}
#q100 .rail-btn:hover,
#q100 .rail-btn:focus-visible,
#q100 .backpack:hover,
#q100 .backpack:focus-visible { z-index: 2; }
#q100 .rail-btn:hover i,
#q100 .rail-btn:focus-visible i,
#q100 .backpack:hover i,
#q100 .backpack:focus-visible i {
  transform: scale(1.06);
  filter: drop-shadow(0 0 12px rgba(245, 245, 245, 0.85));
}
@media (prefers-reduced-motion: reduce) {
  #q100 .rail-btn i,
  #q100 .backpack i { transition: filter 0.16s ease; }
  #q100 .rail-btn:hover i,
  #q100 .rail-btn:focus-visible i,
  #q100 .backpack:hover i,
  #q100 .backpack:focus-visible i { transform: none; }
}
.pack-title {
  margin: 0.45rem 0 0;
  padding-top: 0.55rem;
  border-top: 1px dashed rgba(245, 245, 245, 0.42);
  width: 100%;
  text-align: center;
  line-height: 1.1;
  font-size: 0.95rem;
}
.pack-title span { display: block; }
.pack-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}
.pack-scroll button {
  width: 5rem;
  height: 5rem;
  padding: 0;
  border: 2px solid rgba(245, 245, 245, 0.48);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.pack-scroll img { width: 100%; height: 100%; object-fit: cover; display: block; }
.backpack {
  align-self: center;
  width: 5rem;
  height: 5rem;
  margin-top: auto;
  padding: 0;
  border: 2px solid rgba(245, 245, 245, 0.48);
  border-radius: 10px;
  background: transparent;
  color: #f5f5f5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.backpack i { font-size: 3.4rem; line-height: 1; }

.rail-title {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  text-align: center;
  line-height: 1.05;
  font-size: 1.05rem;
  font-weight: 600;
}
.layer-well { position: relative; flex: 1; min-height: 0; }
.layer-scroll {
  height: 100%;
  overflow: auto;
  padding-bottom: 6.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.layer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}
.thumb-wrap {
  position: relative;
  width: 4.75rem;
  height: 4.75rem;
}
.thumb {
  width: 4.75rem;
  height: 4.75rem;
  padding: 0;
  border: 2px solid rgba(245, 245, 245, 0.48);
  border-radius: 10px;
  background-color: #fff;
  background-image:
    linear-gradient(#cfcfcf, #cfcfcf),
    linear-gradient(#fff, #fff),
    linear-gradient(#fff, #fff),
    linear-gradient(#cfcfcf, #cfcfcf);
  background-size: 50% 50%;
  background-repeat: no-repeat;
  background-position: left top, right top, left bottom, right bottom;
  opacity: 0.62;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.layer.is-filled .thumb, .layer.is-open .thumb { opacity: 1; }
.layer.is-open .thumb {
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.06),
    0 0 0 2px #fff;
}
.layer.is-born .thumb { animation: born 0.42s ease; }
@keyframes born {
  from { transform: scale(0.72); opacity: 0; }
  to { transform: none; }
}
.layer-name {
  width: 4.75rem;
  border: 0;
  border-radius: 4px;
  background: rgba(255,255,255,0.08);
  padding: 0.05rem 0.25rem;
  font-size: 0.8rem;
  text-align: center;
}
.layer-x {
  position: absolute;
  right: -0.15rem;
  bottom: -0.15rem;
  z-index: 1;
  width: 1.55rem;
  height: 1.55rem;
  padding: 0;
  border: 1px solid rgba(245, 245, 245, 0.55);
  border-radius: 6px;
  background: rgba(28, 16, 36, 0.92);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.layer-x i { font-size: 0.95rem; line-height: 1; pointer-events: none; }
.add-layer {
  position: static;
  width: 4.75rem;
  height: 2.2rem;
  margin: 0.1rem 0 0.2rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #f5f5f5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.add-layer i { font-size: 2rem; line-height: 1; }
.add-layer:hover, .add-layer:focus-visible { filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.45)); }
.rainbow-dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.45rem 0 0.35rem;
  background: var(--rail);
}
.rainbow-tile { position: relative; width: 4.75rem; height: 4.75rem; }
.rainbow {
  position: static;
  width: 4.75rem;
  height: 4.75rem;
  border: 2px solid rgba(245, 245, 245, 0.48);
  border-radius: 10px;
  background: linear-gradient(90deg, #f25, #fc0, #3d3, #3af, #93f);
}
.rainbow.is-field { cursor: crosshair; background-size: 100% 100%; background-repeat: no-repeat; }
.rainbow-pick {
  position: absolute;
  right: -0.2rem;
  top: -0.2rem;
  z-index: 2;
  width: 1.45rem;
  height: 1.45rem;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: conic-gradient(#f25, #fc0, #3d3, #3af, #93f, #f25);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}
.rainbow-clear {
  position: absolute;
  right: -0.15rem;
  bottom: -0.15rem;
  z-index: 2;
  width: 1.55rem;
  height: 1.55rem;
  padding: 0;
  border: 1px solid rgba(245, 245, 245, 0.55);
  border-radius: 6px;
  background: rgba(28, 16, 36, 0.92);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.rainbow-clear i { font-size: 0.95rem; line-height: 1; pointer-events: none; }
.hex-color input {
  width: 4.75rem;
  border: 0;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  text-align: center;
  font-size: 0.85rem;
  padding: 0.12rem 0.2rem;
}

#q200 {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse at center, var(--stage, #4a2c58) 0%, var(--hull) 72%);
}
.stage-house {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 0;
}
.stage-house[hidden] { display: none; }
.stage-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}
.stage-picks button {
  width: 3.2rem;
  height: 3.2rem;
  padding: 0;
  border-radius: 6px;
  overflow: hidden;
}
.stage-picks img { width: 100%; height: 100%; object-fit: cover; display: block; }
#q200.has-house .book,
#q200.has-house .gutter-row { position: relative; z-index: 1; }
#q200.has-house .gutter-row { background: rgba(22, 12, 28, 0.55); }
.gutter-row {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.6rem;
  min-height: 2.7rem;
  padding: 0.1rem 0.55rem 0.2rem;
}
.gutter-side {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.gutter-cluster {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.gutter-dot {
  color: rgba(245, 245, 245, 0.55);
  font-size: 0.85rem;
  line-height: 1;
}
.page-spec {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  font-size: 0.95rem;
  white-space: nowrap;
}
#page-spec { overflow: hidden; text-overflow: ellipsis; }
.spec-sep { flex: 0 0 auto; }
.doc-title { display: inline-flex; align-items: center; gap: 0.35rem; }
.doc-title input {
  width: 12rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0;
}
.doc-title input::placeholder { color: rgba(245, 245, 245, 0.45); }
.gutter {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.05rem;
}
.gutter i { font-size: 1.55rem; line-height: 1; }
#btn-pixer.is-recording {
  color: #ff4d6a;
  animation: sr-pixer-rec 1.2s ease-in-out infinite;
}
@keyframes sr-pixer-rec {
  50% { filter: drop-shadow(0 0 8px #ff4d6a); }
}
#btn-pixer, #btn-window, #btn-zoom, .page-dock button, .tool {
  transform-origin: center bottom;
}
#btn-pixer:hover,
#btn-pixer:focus-visible,
#btn-window:hover,
#btn-window:focus-visible,
#btn-zoom:hover,
#btn-zoom:focus-visible,
.page-dock button:hover,
.page-dock button:focus-visible,
.tool:hover,
.tool:focus-visible {
  filter: drop-shadow(0 0 10px rgba(245, 245, 245, 0.7));
  animation: sr-corners-grow 0.277s ease-in-out 2 forwards;
}
.page-dock button:hover,
.page-dock button:focus-visible {
  filter: drop-shadow(0 0 8px rgba(255, 214, 120, 0.95));
}
@keyframes sr-corners-grow {
  0% { transform: scale(1); }
  50% { transform: scale(1.22); }
  100% { transform: scale(1.12); }
}
@media (prefers-reduced-motion: reduce) {
  #btn-pixer:hover,
  #btn-pixer:focus-visible,
  #btn-window:hover,
  #btn-window:focus-visible,
  #btn-zoom:hover,
  #btn-zoom:focus-visible,
  .page-dock button:hover,
  .page-dock button:focus-visible,
  .tool:hover,
  .tool:focus-visible {
    animation: none;
    transform: scale(1.12);
  }
}
.page-dock {
  position: absolute;
  z-index: 8;
  bottom: 0.28rem;
  display: flex;
  align-items: center;
  gap: 0.05rem;
  opacity: 1;
  cursor: grab;
  touch-action: none;
  transition: opacity 1.5s ease, filter 1.5s ease;
}
.page-dock[data-slot="left"] { left: 0.4rem; }
.page-dock[data-slot="center"] { left: 50%; transform: translateX(-50%); }
.page-dock[data-slot="right"] { right: 0.4rem; }
.page-dock.is-dim { opacity: 0.28; }
.page-dock:hover,
.page-dock:focus-within,
.page-dock.is-dragging {
  opacity: 1;
  filter: drop-shadow(0 0 7px rgba(255, 214, 120, 0.9));
  transition-duration: 0.15s;
}
.page-dock.is-dragging { cursor: grabbing; }
.page-dock button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #3d2448;
  text-shadow: 0 0 2px #fff, 0 1px 0 #fff;
  cursor: pointer;
}
.page-dock button i { font-size: 1.55rem; line-height: 1; }
.page-dock button:disabled { opacity: 0.35; cursor: default; }
.zone-row { display: flex; align-items: center; gap: 0.35rem; }
.zone-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0.28rem;
  border: 0;
  border-radius: 8px;
  background: rgba(28, 16, 36, 0.06);
  color: var(--ink);
}
.zone-row button.is-active { color: var(--disc); background: rgba(233, 30, 140, 0.12); }
.zone-glyph {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1.5px currentColor;
}
.zone-glyph span {
  position: absolute;
  box-sizing: border-box;
  border: 1.25px solid currentColor;
  border-radius: 1px;
}
.pop button, .export {
  border: 0;
  border-radius: 6px;
  background: rgba(28, 16, 36, 0.08);
  padding: 0.2rem 0.45rem;
  font-size: 0.95rem;
}
.book {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  align-items: flex-start;
}
.track {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  transition: transform 0.38s ease;
  will-change: transform;
}
.sheet {
  position: relative;
  flex: 0 0 auto;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);
  overflow: hidden;
}
.sheet.is-side { filter: saturate(0.65) brightness(0.82); }
.sheet.is-side .editor { pointer-events: none; }
.folio {
  position: absolute;
  top: 0.35rem;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(28,16,36,0.45);
  pointer-events: none;
}
.sheet-head, .sheet-foot {
  position: absolute;
  left: 8%;
  right: 8%;
  font-size: 0.8rem;
  color: rgba(28,16,36,0.55);
  pointer-events: none;
}
.sheet-head { top: 0.85rem; }
.sheet-foot { bottom: 0.45rem; }
.run {
  position: absolute;
  left: 8%;
  right: 8%;
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  pointer-events: none;
}
.run-head { top: 1.05rem; }
.run-foot { bottom: 0.45rem; }
.run-text {
  margin: 0;
  font-size: 0.85rem;
  text-align: center;
  color: rgba(28, 16, 36, 0.72);
}
.run-tools { display: flex; gap: 0.35rem; pointer-events: auto; }
.run-tools button, .run-custom {
  border: 0;
  background: transparent;
  color: rgba(61, 36, 72, 0.42);
  font: inherit;
  font-size: 0.85rem;
  text-shadow: 0 0 2px #fff;
  padding: 0.05rem 0.2rem;
}
.run-tools button:hover, .run-tools button:focus-visible {
  color: var(--paw);
  filter: drop-shadow(0 0 6px rgba(255, 214, 120, 0.9));
}
.run-custom { width: 10rem; text-align: center; color: var(--ink); }
.col-break { break-before: column; display: block; height: 0; }
.editor, .readout {
  position: absolute;
  overflow: hidden;
  outline: none;
}
.editor { cursor: text; }
.editor :is(div, p) + :is(div, p) { margin-top: var(--para, 0px); }
.sheet.is-draw .editor { pointer-events: none; }
.readout { pointer-events: none; }
.grid-on {
  background-image:
    linear-gradient(rgba(106,52,132,0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(106,52,132,0.18) 1px, transparent 1px);
  background-size: 24px 24px;
}
.sheet.is-draw .stroke { z-index: 5; pointer-events: auto; }
.stroke, .obj {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}
.obj { width: auto; height: auto; }
.zone {
  position: absolute;
  border: 1.5px dashed var(--paw);
  background: rgba(106,52,132,0.06);
}
.zone.is-picked { outline: 2px solid var(--paw); }
.placed {
  position: absolute;
  object-fit: contain;
}
.pic {
  position: absolute;
  z-index: 6;
  cursor: move;
}
.pic.is-picked {
  outline: 1.5px solid var(--paw);
  box-shadow: 0 0 0 1px #fff;
}
.pic img, .pic audio, .pic video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  display: block;
}
.pic--media {
  display: flex;
  flex-direction: column;
  background: #1c1024;
  border-radius: 6px;
  overflow: hidden;
}
.pic--media audio, .pic--media video {
  pointer-events: auto;
  height: calc(100% - 1.15rem);
  background: #111;
}
.pic-move {
  flex: none;
  height: 1.15rem;
  cursor: move;
  background: rgba(245, 245, 245, 0.18);
}
.pic-size {
  position: absolute;
  right: -0.35rem;
  bottom: -0.35rem;
  width: 0.75rem;
  height: 0.75rem;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: var(--paw);
  cursor: nwse-resize;
}
.baked {
  position: absolute;
  z-index: 1;
  object-fit: contain;
  pointer-events: none;
}
.wordbox {
  position: absolute;
  z-index: 6;
  transform-origin: center center;
  border: 1.5px dashed rgba(106, 52, 132, 0.55);
  background: rgba(255, 255, 255, 0.42);
  color: var(--ink);
}
.wordbox.is-picked {
  border-style: solid;
  border-color: var(--paw);
  background: rgba(255, 255, 255, 0.72);
}
.wordbox-text {
  width: 100%;
  height: 100%;
  padding: 0.35rem;
  overflow: auto;
  outline: none;
  cursor: text;
}
.wordbox-size {
  position: absolute;
  right: -0.35rem;
  bottom: -0.35rem;
  width: 0.75rem;
  height: 0.75rem;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: var(--paw);
  cursor: nwse-resize;
}
.wordbox-turn {
  display: none;
  position: absolute;
  left: 50%;
  top: -1.25rem;
  width: 0.8rem;
  height: 0.8rem;
  margin-left: -0.4rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--paw);
  cursor: grab;
}
.wordbox.is-picked .wordbox-turn { display: block; }
.wordbox-turn::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 100%;
  width: 1.5px;
  height: 0.45rem;
  margin-left: -0.75px;
  background: var(--paw);
}
.forgive {
  display: flex;
  align-items: center;
  gap: 0.05rem;
}
.forgive button {
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.55));
}
.forgive i { font-size: 1.65rem; line-height: 1; }
#smudgies { color: var(--yellow); }
#sharkies { color: var(--green); }
#osbard { color: var(--slate); }
.forgive button:disabled { opacity: 0.35; cursor: default; }
.status {
  margin: 0;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.status:empty { display: none; }

#q400 {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  height: var(--q400-h);
  background: var(--q400);
  box-shadow: inset 0 3px 0 #e7b4d4;
  padding: 0 0.35rem;
}
.wing { display: flex; align-items: center; min-width: 0; height: 100%; gap: 0.2rem; }
.wing--pop { justify-content: flex-end; }
.wing--candy { justify-content: flex-start; }
.tool, .edge {
  flex: 0 0 auto;
  width: 3.75rem;
  height: 3.75rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tool.is-on, .tool[aria-expanded="true"] { background: rgba(255,255,255,0.14); }
.tool i { font-size: 3rem; line-height: 1; }
.tool--font { color: #9eb1bc; }
.tool--fx { color: #f0d78c; }
.tool--paragraph { color: #e7b4d4; }
.tool--columns { color: #7eb6ff; }
.tool--margins { color: #f3d4e8; }
.tool--breaks { color: #ff9a62; }
.tool--overclock { color: #ffb020; }
.tool--zones { color: #d7b4f5; }
.tool--scrippies { color: #F5C542; }
.tool--zoom { color: #7dcea0; }
.paw-row { display: flex; align-items: center; height: 100%; gap: 0.1rem; }
.step {
  width: 4.25rem;
  height: 96px;
  border: 0;
  background: transparent;
  color: var(--disc);
}
.step svg { width: 3.4rem; height: 3.4rem; display: block; margin: 0 auto; }
.paw {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--disc);
  box-shadow: 0 0 0 2px rgba(245, 245, 245, 0.4);
  transition: box-shadow 0.28s ease, transform 0.28s ease;
}
.paw img { width: 92%; height: 92%; display: block; object-fit: contain; }
.paw:hover,
.paw:focus-visible {
  transform: scale(1.04);
  box-shadow:
    0 0 0 3px rgba(245, 245, 245, 0.75),
    0 0 18px color-mix(in srgb, var(--disc) 85%, transparent),
    0 0 36px color-mix(in srgb, var(--disc) 65%, transparent);
}
.paw[aria-expanded="true"] {
  box-shadow:
    0 0 0 3px var(--disc),
    0 0 18px color-mix(in srgb, var(--disc) 70%, transparent);
}
.candy {
  display: flex;
  gap: 0;
  overflow: auto;
  min-width: 0;
  height: 100%;
  align-items: center;
  padding: 0 0.2rem;
}
.candy-plus {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
  margin: 0 -0.15rem;
  padding: 0;
  border: 1px solid rgba(245, 245, 245, 0.35);
  border-radius: 4px;
  background: rgba(28, 16, 36, 0.55);
  color: #f5f5f5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.candy-plus i { font-size: 0.8rem; line-height: 1; }
.candy-plus:hover, .candy-plus:focus-visible {
  background: rgba(61, 36, 72, 0.92);
  color: #fff;
}
.page-thumb {
  flex: 0 0 auto;
  width: 2.7rem;
  height: 3.5rem;
  border: 0;
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-size: 0.8rem;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.25);
  opacity: 0.72;
}
.page-thumb.is-on { box-shadow: 0 0 0 2px var(--disc); opacity: 1; }
.page-thumb:hover,
.page-thumb:focus-visible {
  animation: sr-candy-nudge 0.28s ease-in-out;
}
@keyframes sr-candy-nudge {
  0% { transform: translateY(0); }
  45% { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .page-thumb:hover,
  .page-thumb:focus-visible { animation: none; }
}
.edge { width: 1.6rem; font-size: 1.4rem; }

.pop {
  position: fixed;
  z-index: 35;
  min-width: 14rem;
  max-width: 22rem;
  max-height: calc(100vh - 1rem);
  overflow: auto;
  padding: 0.7rem;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
.pop[hidden] { display: none; }
.pop h3 { margin: 0 0 0.4rem; font-size: 1.05rem; font-weight: 600; }
.pop label { display: flex; justify-content: space-between; gap: 0.5rem; margin: 0.3rem 0; font-size: 0.95rem; }
.pop input[type="number"], .pop input[type="text"], .pop select {
  width: 7rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0.15rem 0.3rem;
  color: var(--ink);
  background: #fff;
}
.pop .row { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.pop .row + .row { margin-top: 0.35rem; }
.overclock-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}
.overclock-grid .icon-choice { width: 100%; }
.marks button, .pop .row button { min-width: 2rem; }
.marks button.is-on, .choice.is-on { background: var(--paw); color: #fff; }
.swatches { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.35rem; }
.swatch {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.2);
  padding: 0;
}
.ph-fill.ph-rainbow:before { content: "\e598"; }
.scrippy-pop { font-size: 0.95rem; }
#pop-tool.scrippy-pop .page-set__head { grid-template-columns: 1.9rem 1fr 1.6rem; }
.scrib-rainbow {
  justify-self: start;
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #f5f5f5;
}
.scrib-rainbow.is-on {
  color: #f5c542;
  box-shadow: inset 0 0 0 1px #f5f5f5;
}
.scrib-rainbow i { font-size: 1.25rem; }
#pop-tool.scrippy-pop {
  width: max-content;
  min-width: 0;
  max-width: calc(100vw - 1rem);
}
.scrib-tools {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}
.scrib-tools .icon-choice { min-height: 3.1rem; padding: 0.25rem 0.15rem; }
.scrib-tools .icon-choice span { font-size: 0.85rem; font-weight: 600; }
.scrib-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 0.75rem;
}
.scrib-tray h4 {
  margin: 0 0 0.28rem;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.28rem;
}
.scrib-board {
  display: grid;
  grid-template-columns: repeat(6, 2.15rem) 2.4rem;
  gap: 1rem;
  align-items: center;
  justify-content: start;
}
.scrib-board .swatch {
  width: 2.15rem;
  height: 3.15rem;
  border-radius: 50%;
  border: 4px solid #f5f5f5;
  box-shadow: none;
  padding: 0;
}
.scrib-board .swatch.is-on { box-shadow: 0 0 0 2px #f5f5f5; }
.scrib-lock, .scrib-random {
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #f5f5f5;
  cursor: pointer;
}
.scrib-lock { grid-column: 7; grid-row: 1; }
.scrib-random { grid-column: 7; grid-row: 2; }
.scrib-lock.is-on { color: #f5c542; }
.scrib-lock i, .scrib-random i { font-size: 1.7rem; }
.pop.pop--wine {
  background: var(--q400);
  color: #f5f5f5;
  border: 1px solid rgba(245, 245, 245, 0.28);
}
.pop.pop--wine h3 {
  margin: 0;
  text-align: center;
  color: #f5f5f5;
}
.pop.pop--wine h3 i { margin-right: 0.2rem; font-size: 1.05rem; vertical-align: -0.12rem; }
.pop .page-set__close {
  border: 0;
  background: transparent;
  min-width: 0;
  min-height: 0;
  box-shadow: none;
  padding: 0;
}
.pop.pop--wine > button,
.pop.pop--wine .row button,
.pop.pop--wine .icon-choice {
  min-height: 2.7rem;
  border: 1px solid rgba(245, 245, 245, 0.28);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.22);
  color: inherit;
}
.pop.pop--wine .icon-choice {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  padding: 0.3rem 0.45rem;
  font-size: 0.85rem;
  line-height: 1.1;
}
.pop.pop--wine .icon-choice i { font-size: 1.25rem; }
.pop.pop--wine .ink-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.55rem;
}
.pop.pop--wine .ink-row > span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(245, 245, 245, 0.9);
}
.pop.pop--wine .ink-wells {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.pop.pop--wine .ink-wells .swatch {
  width: 1.55rem;
  height: 1.55rem;
  min-height: 0;
  padding: 0;
  border: 2px solid rgba(245, 245, 245, 0.45);
  border-radius: 50%;
  background-clip: padding-box;
}
.pop.pop--wine .ink-wells .swatch.is-light { border-color: rgba(28, 25, 23, 0.55); }
.pop.pop--wine .ink-wells .swatch.is-on { box-shadow: 0 0 0 2px #f5f5f5; }
.pop.pop--wine .fx-punch {
  justify-content: flex-start;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.55rem;
}
.pop.pop--wine .fx-punch input { width: auto; }
.pop.pop--wine .row button.is-on,
.pop.pop--wine .icon-choice.is-on,
.pop.pop--wine .marks button.is-on {
  border-color: #f5f5f5;
  box-shadow: inset 0 0 0 1px #f5f5f5;
  background: rgba(0, 0, 0, 0.22);
  color: inherit;
}
.pop.pop--wine input,
.pop.pop--wine select {
  border-color: rgba(245, 245, 245, 0.28);
  background: rgba(0, 0, 0, 0.28);
  color: #f5f5f5;
}
.pop.pop--wine .zone-row button {
  background: rgba(0, 0, 0, 0.22);
  color: #f5f5f5;
  border: 1px solid rgba(245, 245, 245, 0.28);
}
.pop.pop--wine .zone-row button.is-active {
  color: #f5f5f5;
  background: rgba(0, 0, 0, 0.22);
  border-color: #f5f5f5;
  box-shadow: inset 0 0 0 1px #f5f5f5;
}
.pop.pop--wine .line-width { background: rgba(0, 0, 0, 0.28); }
.file-recents {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 14rem;
  overflow: auto;
}
.file-recents__empty {
  margin: 0.15rem 0.1rem 0.2rem;
  font-size: 0.9rem;
  color: rgba(245, 245, 245, 0.65);
}
.pop.pop--wine .file-recent {
  width: 100%;
  min-height: 0;
  padding: 0.4rem 0.55rem;
  text-align: left;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pop .line-width {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin: 0.55rem -0.7rem -0.7rem;
  padding: 0.4rem 0.7rem 0.55rem;
  border-radius: 0 0 8px 8px;
  background: #3d2448;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(245, 245, 245, 0.9);
}
.pop .line-width input[type='range'] {
  width: 100%;
  margin: 0;
  accent-color: #f1d1e5;
}
.pack-grid { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pack-grid img { width: 4.2rem; height: 4.2rem; object-fit: cover; border-radius: 6px; cursor: pointer; }

.hub {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}
.hub[hidden] { display: none; }
.hub:not([hidden]) { pointer-events: auto; }
.hub__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
}
.hub__panel {
  position: absolute;
  left: 50%;
  bottom: calc(96px * var(--sr-desk-scale, 1));
  width: calc((752px * var(--sr-desk-scale, 1)) * 4 / 3 - 96px * var(--sr-desk-scale, 1));
  height: calc((752px * var(--sr-desk-scale, 1) * 4 / 3 - 96px * var(--sr-desk-scale, 1)) * 3 / 4);
  max-width: calc(100vw - 8.6rem * 2 - 1rem);
  border-radius: calc(1.35rem * var(--sr-desk-scale, 1));
  transform: translateX(-50%);
  overflow: hidden;
  color: #f5f5f5;
  background: linear-gradient(165deg, var(--hub-light, #4a2c58) 0%, var(--q400) 42%, var(--hull) 100%);
  border: 3px solid rgba(245, 245, 245, 0.92);
  box-shadow:
    0 0 0 1px rgba(231, 180, 212, 0.65),
    0 0 22px rgba(231, 180, 212, 0.45),
    0 0 44px rgba(120, 40, 96, 0.28),
    0 12px 40px rgba(0, 0, 0, 0.45);
}
html.sr-desk-lock .hub__panel {
  bottom: calc((var(--sr-frame-h, 100dvh) - 864px * var(--sr-desk-scale, 1)) / 2 + 96px * var(--sr-desk-scale, 1));
  max-width: none;
}
.hub__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: calc(0.85rem * var(--sr-desk-scale, 1)) calc(1rem * var(--sr-desk-scale, 1)) 0;
  box-sizing: border-box;
  gap: 0.35rem;
}
.hub__head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  flex-shrink: 0;
  min-height: calc(6rem * var(--sr-desk-scale, 1));
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(231, 180, 212, 0.28);
}
.hub__brand {
  justify-self: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  max-width: 6.75rem;
}
.hub__home { display: flex; line-height: 0; border-radius: 8px; }
.hub__home img {
  display: block;
  height: calc(4.1rem * var(--sr-desk-scale, 1));
  width: auto;
  max-width: min(11rem, 46vw);
  object-fit: contain;
}
.hub__here {
  color: #f5f5f5;
  font-size: calc(1rem * var(--sr-desk-scale, 1));
  font-weight: 500;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
}
.hub__lockup { text-align: center; }
.hub__title {
  margin: 0;
  font-size: calc(2.35rem * var(--sr-desk-scale, 1));
  font-weight: 700;
  line-height: 1.1;
  color: #f5f5f5;
}
.hub__tag {
  margin: 0.15rem 0 0;
  font-family: Caveat, cursive;
  font-size: calc(1.55rem * var(--sr-desk-scale, 1));
  font-weight: 700;
  line-height: 1.1;
  color: #f5f5f5;
}
.hub__close {
  justify-self: end;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(245, 245, 245, 0.72);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}
.hub__close:hover, .hub__close:focus-visible { color: #f5f5f5; background: rgba(255, 255, 255, 0.06); }
.hub__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0.35rem 0.15rem 0.6rem;
}
.hub__body h3 { margin: 0.2rem 0 0.45rem; font-weight: 600; color: #f5f5f5; }
.hub-cards, .facing { display: flex; gap: 0.45rem; overflow: auto; }
.hub-card, .facing .sheet {
  width: 7rem;
  height: 9rem;
  background: #fff;
  color: var(--ink);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  padding: 0.35rem;
  font-size: 0.7rem;
  overflow: hidden;
}
.hub-card { display: flex; flex-direction: column; gap: 0.25rem; }
.export { margin-top: 0.8rem; background: var(--paw); color: #fff; padding: 0.45rem 0.8rem; }
.hub__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-shrink: 0;
  width: calc(100% + 2rem * var(--sr-desk-scale, 1));
  margin-left: calc(-1rem * var(--sr-desk-scale, 1));
  padding: 0.35rem 0.5rem 0.4rem;
  border-top: 1px solid rgba(231, 180, 212, 0.28);
  font-size: calc(0.85rem * var(--sr-desk-scale, 1));
}
.hub__foot-legal, .hub__social {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
}
.hub__foot-legal { justify-content: flex-start; gap: 0.45rem; }
.hub__social { justify-content: flex-end; }
.hub-legal {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 3.2rem;
  z-index: 2;
  padding: 0.85rem 0.95rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(245, 245, 245, 0.28);
  background: var(--q400);
  color: #f5f5f5;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}
.hub-legal[hidden] { display: none; }
.hub-legal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.hub-legal__title { margin: 0; font: 600 1.05rem / 1.2 Fredoka, system-ui, sans-serif; }
.hub-legal__close {
  border: 0;
  background: transparent;
  color: #f5f5f5;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.hub-legal__lede { margin: 0.55rem 0 0; font: 500 0.95rem / 1.35 Fredoka, system-ui, sans-serif; }
.hub-legal__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.hub-legal__link {
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  border: 1px solid rgba(245, 245, 245, 0.28);
  background: rgba(0, 0, 0, 0.22);
  color: #f5f5f5;
  font: 500 0.95rem / 1 Fredoka, system-ui, sans-serif;
  text-decoration: none;
}
.hub-legal__link--primary { background: #f5c542; color: #2a1024; font-weight: 600; }
.hub__privacy {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #f5f5f5;
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.hub__privacy:hover, .hub__privacy:focus-visible { text-decoration: underline; }
.hub__sep { color: rgba(245, 245, 245, 0.7); user-select: none; }
.hub__copy { margin: 0; color: rgba(245, 245, 245, 0.72); white-space: nowrap; }
.hub__utils { display: flex; align-items: center; flex: 0 0 auto; }
.hub__util, .hub__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(3.3rem * var(--sr-desk-scale, 1));
  height: calc(3.3rem * var(--sr-desk-scale, 1));
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  text-decoration: none;
}
.hub__util i {
  font-size: calc(2.68rem * var(--sr-desk-scale, 1));
  line-height: 1;
}
.hub__social img {
  width: calc(2.68rem * var(--sr-desk-scale, 1));
  height: calc(2.68rem * var(--sr-desk-scale, 1));
  object-fit: contain;
  filter: brightness(0) invert(1);
}
.hub__util:hover, .hub__util:focus-visible,
.hub__social a:hover, .hub__social a:focus-visible {
  color: #fff;
  transform: scale(1.08);
}

#pop-page {
  min-width: 16.5rem;
  max-width: 18rem;
  padding: 0.75rem 0.85rem 0.9rem;
  background: var(--q400);
  color: #f5f5f5;
  border: 1px solid rgba(245, 245, 245, 0.28);
}
.page-set__head {
  display: grid;
  grid-template-columns: 1.6rem 1fr 1.6rem;
  align-items: center;
  margin-bottom: 0.55rem;
}
#pop-page h3 {
  margin: 0;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 600;
}
.page-set__close {
  justify-self: end;
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #f5f5f5;
}
.page-set__close i { font-size: 1rem; }
.page-set__grid, .page-set__units, .pixer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.page-set__units { margin-top: 0.45rem; }
#pop-page .page-set__grid button, #pop-page .page-set__units button {
  min-height: 3.35rem;
  border: 1px solid rgba(245, 245, 245, 0.28);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.22);
  color: #f5f5f5;
  font-size: 1rem;
}
#pop-page .page-set__units button { min-height: 2.3rem; }
#pop-page .page-set__grid button.is-on, #pop-page .page-set__units button.is-on {
  border-color: #f5f5f5;
  box-shadow: inset 0 0 0 1px #f5f5f5;
}
.page-set__rule {
  margin: 0.6rem 0 0.5rem;
  border: 0;
  border-top: 1px solid rgba(245, 245, 245, 0.28);
}
.page-set__custom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}
#pop-page .page-set__custom input {
  width: 4.4rem;
  padding: 0.32rem 0.2rem;
  border: 1px solid rgba(245, 245, 245, 0.28);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.28);
  color: #f5f5f5;
  text-align: center;
  font-size: 1rem;
}
#pop-page input[type='number']::-webkit-outer-spin-button,
#pop-page input[type='number']::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#pop-page input[type='number'] { -moz-appearance: textfield; }
.page-set__times { color: rgba(245, 245, 245, 0.75); }
#pop-page .page-set__apply {
  border: 1px solid rgba(245, 245, 245, 0.28);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #f5f5f5;
  padding: 0.32rem 0.55rem;
  font-size: 1rem;
}
.page-set__ready {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.45rem;
  margin: 0.65rem 0 0;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(245, 245, 245, 0.22);
  font-size: 0.95rem;
  line-height: 1.35;
  cursor: pointer;
}
.page-set__ready input { margin-top: 0.15rem; flex-shrink: 0; }

#pop-pixer {
  min-width: 16rem;
  background: #3d2448;
  color: #f5f5f5;
  border: 1px solid rgba(245, 245, 245, 0.28);
}
#pop-pixer h3 {
  margin: 0;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 600;
  color: #f5f5f5;
}
#pop-pixer .pixer-grid button {
  min-height: 4.4rem;
  border: 1px solid rgba(245, 245, 245, 0.28);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.22);
  color: #f5f5f5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  font-size: 0.95rem;
  line-height: 1.15;
}
#pop-pixer .pixer-grid button i { font-size: 1.35rem; }
#pop-pixer .pixer-grid button.is-on {
  border-color: #f5f5f5;
  box-shadow: inset 0 0 0 1px #f5f5f5;
}

.save-as {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(8, 10, 14, 0.72);
}
.save-as[hidden] { display: none; }
.leave {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(8, 10, 14, 0.72);
}
.leave[hidden] { display: none; }
.leave__panel {
  width: min(26rem, 90vw);
  padding: 1.35rem 1.5rem 1.25rem;
  border-radius: 8px;
  border: 1px solid rgba(245, 245, 245, 0.28);
  background: var(--q400);
  color: #f5f5f5;
  text-align: center;
}
.leave__title { margin: 0; font: 600 1.45rem / 1.2 Fredoka, system-ui, sans-serif; }
.leave__detail { margin: 0.7rem 0 0; font: 500 1.05rem / 1.4 Fredoka, system-ui, sans-serif; }
.leave__hint { margin: 0.45rem 0 0; font: 500 0.95rem / 1.35 Fredoka, system-ui, sans-serif; color: rgba(245, 245, 245, 0.78); }
.leave__actions { display: flex; justify-content: center; gap: 0.6rem; margin-top: 1.1rem; }
.leave__actions button {
  padding: 0.5rem 0.9rem;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #f5f5f5;
  font: 500 1rem / 1 Fredoka, system-ui, sans-serif;
  cursor: pointer;
}
.leave__go { background: #f5c542; color: #2a1024; font-weight: 600; }
.save-as__panel {
  width: min(26rem, 90vw);
  margin: 0;
  padding: 1.35rem 1.5rem 1.25rem;
  border-radius: 8px;
  border: 1px solid rgba(245, 245, 245, 0.28);
  background: var(--q400);
  color: #f5f5f5;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.save-as__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  text-align: center;
}
.save-as__field { display: block; margin: 0; }
.save-as__input {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 6px;
  border: 1px solid rgba(245, 245, 245, 0.28);
  background: rgba(0, 0, 0, 0.28);
  color: #f5f5f5;
  font: inherit;
  font-size: 1.05rem;
}
.save-as__input::placeholder { color: rgba(245, 245, 245, 0.45); }
.save-as__formats { display: flex; gap: 0.5rem; }
.save-as__formats button, .save-as__cancel {
  flex: 1;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(245, 245, 245, 0.28);
  background: rgba(0, 0, 0, 0.22);
  color: #f5f5f5;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.save-as__formats button.is-on {
  background: rgba(0, 0, 0, 0.22);
  border-color: #f5f5f5;
  box-shadow: inset 0 0 0 1px #f5f5f5;
}
.save-as__hint {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.35;
  text-align: center;
  color: rgba(245, 245, 245, 0.78);
}
.save-as__hint strong { font-weight: 600; color: #f5f5f5; }
.save-as__cancel { background: transparent; font-weight: 500; letter-spacing: 0; }

.gutter-row { position: relative; z-index: 30; }

.sr-veil {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: rgba(22, 8, 16, 0.1);
  opacity: 0;
  transition: opacity 0.9s ease;
}
.sr-veil.is-on { opacity: 1; }
.sr-veil[hidden] { display: none; }

.sr-welcome {
  position: absolute;
  inset: 0;
  z-index: 24;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1.25rem 3.4rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 720ms ease;
}
.sr-welcome--visible { opacity: 1; }
.sr-welcome--out { opacity: 0; transition-duration: 920ms; }
.sr-welcome[hidden] { display: none; }

.sr-chrome {
  position: relative;
  padding: 4px;
  border-radius: 1.35rem;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    0 0 18px rgba(231, 180, 212, 0.45),
    0 0 36px rgba(245, 197, 66, 0.22);
}
.sr-chrome__spin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 180%;
  aspect-ratio: 1;
  translate: -50% -50%;
  background: conic-gradient(
    from 0deg,
    #4a1028 0deg,
    #e7b4d4 36deg,
    #fff8ee 52deg,
    #f5c542 74deg,
    #f3d4e8 110deg,
    #6e1838 160deg,
    #c45c8a 210deg,
    #fff 232deg,
    #ffe9a8 268deg,
    #7a2048 320deg,
    #4a1028 360deg
  );
  animation: sr-chrome-glide 7.25s infinite;
}
@keyframes sr-chrome-glide {
  0% { transform: rotate(0deg); animation-timing-function: cubic-bezier(0.45, 0.04, 0.55, 0.96); }
  19.4% { transform: rotate(46deg); animation-timing-function: cubic-bezier(0.04, 0.86, 0.12, 1); }
  33.5% { transform: rotate(168deg); animation-timing-function: cubic-bezier(0.42, 0.02, 0.58, 0.98); }
  51.2% { transform: rotate(208deg); animation-timing-function: cubic-bezier(0.06, 0.82, 0.16, 1); }
  65.3% { transform: rotate(318deg); animation-timing-function: cubic-bezier(0.32, 0.18, 0.46, 1); }
  81.2% { transform: rotate(346deg); animation-timing-function: cubic-bezier(0.05, 0.72, 0.18, 1); }
  100% { transform: rotate(360deg); }
}

.sr-welcome__card,
.sr-intermission__card {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #f5f5f5;
  background: rgba(42, 16, 36, 0.92);
}
.sr-welcome__card {
  max-width: min(33.8rem, 92vw);
  padding: 1.43rem 1.89rem 1.56rem;
  border-radius: 1.2rem;
}
.sr-welcome--visible .sr-chrome { transform: translateY(0); }
.sr-chrome { transform: translateY(6px); transition: transform 720ms ease; }
.sr-welcome--out .sr-chrome { transform: translateY(-4px); }

.sr-welcome__lead {
  margin: 0;
  font-family: Caveat, cursive;
  font-weight: 700;
  font-size: clamp(2.405rem, 6.24vw, 3.445rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  min-height: 1.05em;
}
.sr-welcome__char { display: inline-block; }
.sr-welcome__char--space { min-width: 0.28em; }
.sr-welcome__char--fresh { animation: sr-welcome-char-in 0.22s ease-out; }
@keyframes sr-welcome-char-in {
  0% { opacity: 0; transform: translateY(0.14em) scale(0.88) rotate(-4deg); }
  55% { opacity: 1; transform: translateY(-0.04em) scale(1.06) rotate(2deg); }
  100% { opacity: 1; transform: none; }
}
.sr-welcome__sub {
  margin: 0.45rem 0 0;
  font: 500 clamp(1.3rem, 3.12vw, 1.495rem) / 1.35 Fredoka, system-ui, sans-serif;
  color: rgba(245, 245, 245, 0.9);
  min-height: 1.35em;
}
.sr-welcome__sub[hidden] { display: none; }

.sr-intermission {
  position: absolute;
  inset: 0 0 3.2rem 0;
  z-index: 22;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(10, 4, 8, 0.28);
  opacity: 1;
  transition: opacity 0.5s ease;
}
.sr-intermission[hidden] { display: none; }
.sr-intermission.is-out {
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.5s ease-out;
}
.sr-intermission__marquee { width: min(28rem, calc(100% - 1.5rem)); }
.sr-intermission__card {
  padding: 1.35rem 1.5rem 1.25rem;
  border-radius: 1.15rem;
}
.sr-intermission__title {
  margin: 0;
  font: 700 2.4rem / 0.95 Fredoka, system-ui, sans-serif;
  color: #ffe9a8;
}
.sr-intermission__rule {
  margin: 0.75rem 0 0;
  font: 500 1.05rem / 1.4 Fredoka, system-ui, sans-serif;
}
.sr-intermission__continue {
  display: inline-flex;
  margin-top: 1.1rem;
  padding: 0.55rem 1.25rem;
  border: 0;
  border-radius: 6px;
  background: #f5c542;
  color: #2a1024;
  font: 600 1.05rem / 1 Fredoka, system-ui, sans-serif;
  cursor: pointer;
}
.sr-intermission__continue:hover,
.sr-intermission__continue:focus-visible {
  filter: drop-shadow(0 0 10px rgba(245, 197, 66, 0.85));
}
.sr-intermission__optout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.85rem;
  font: 500 0.95rem / 1.3 Fredoka, system-ui, sans-serif;
  color: rgba(245, 245, 245, 0.88);
  cursor: pointer;
}
.sr-intermission__optout input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: #f5c542;
}

.sr-welcome-celebration {
  position: absolute;
  inset: 0;
  z-index: 16;
  pointer-events: none;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.92s ease-out;
}
.sr-welcome-celebration--out { opacity: 0; }
.sr-theater-popcorn,
.sr-theater-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.sr-theater-popcorn__piece,
.sr-theater-confetti__piece {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}
.sr-theater-popcorn__piece { font-size: 3.4rem; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
.sr-theater-popcorn--welcome { --sr-piece: 6.0125rem; }
.sr-theater-popcorn--welcome .sr-theater-popcorn__piece { font-size: var(--sr-piece); }
.sr-theater-popcorn__piece--toss {
  bottom: var(--sr-pop-origin, 9%);
  left: var(--sr-pop-left, 50%);
  animation: sr-pop-toss var(--sr-pop-dur, 1.8s) cubic-bezier(0.33, 0.12, 0.55, 1) var(--sr-pop-delay, 0s) forwards;
}
.sr-theater-popcorn__piece--fall {
  top: var(--sr-pop-top, -6%);
  left: var(--sr-pop-left, 50%);
  animation: sr-pop-fall var(--sr-pop-dur, 1.5s) ease-in var(--sr-pop-delay, 0s) forwards;
}
.sr-theater-popcorn__piece--spill {
  bottom: var(--sr-pop-origin, 7%);
  left: var(--sr-pop-left, 50%);
  animation: sr-pop-spill var(--sr-pop-dur, 1.2s) ease-out var(--sr-pop-delay, 0s) forwards;
}
@keyframes sr-pop-toss {
  0% { opacity: 0; transform: scale(0.55); }
  10% { opacity: 1; }
  42% { transform: translate3d(var(--sr-pop-drift-mid), calc(-1 * var(--sr-pop-rise)), 0) scale(1.05) rotate(var(--sr-pop-rot-mid)); }
  100% { opacity: 0; transform: translate3d(var(--sr-pop-drift), var(--sr-pop-drop), 0) scale(0.8) rotate(var(--sr-pop-rot-end)); }
}
@keyframes sr-pop-fall {
  0% { opacity: 0; transform: scale(0.65); }
  12% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--sr-pop-drift), 105vh, 0) rotate(200deg); }
}
@keyframes sr-pop-spill {
  0% { opacity: 0; transform: scale(0.5) rotate(-20deg); }
  8% { opacity: 1; }
  35% { transform: translate3d(var(--sr-pop-drift-mid), calc(-1 * var(--sr-pop-rise)), 0) rotate(40deg); }
  100% { opacity: 0; transform: translate3d(var(--sr-pop-drift), var(--sr-pop-drop), 0) scale(0.75) rotate(160deg); }
}
.sr-theater-confetti__piece {
  top: var(--sr-conf-top, -8%);
  left: var(--sr-conf-left, 50%);
  animation: sr-conf-fall var(--sr-conf-dur, 2s) ease-in var(--sr-conf-delay, 0s) forwards;
}
.sr-theater-confetti__piece--spark { font-size: 3rem; }
.sr-theater-confetti--welcome { --sr-piece: 6.0125rem; --sr-bar-w: 1.755rem; --sr-bar-h: 2.925rem; }
.sr-theater-confetti--welcome .sr-theater-confetti__piece--spark { font-size: var(--sr-piece); }
.sr-theater-confetti--welcome .sr-theater-confetti__piece--rect {
  width: var(--sr-bar-w);
  height: var(--sr-bar-h);
}
.sr-theater-confetti__piece--rect {
  display: block;
  width: 1.05rem;
  height: 1.8rem;
  border-radius: 2px;
  background: hsl(var(--sr-conf-hue, 45) 78% 62%);
}
@keyframes sr-conf-fall {
  0% { opacity: 0; transform: scale(0.6); }
  8% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--sr-conf-drift), 108vh, 0) rotate(var(--sr-conf-spin)); }
}

@media (prefers-reduced-motion: reduce) {
  .sr-chrome__spin,
  .sr-welcome,
  .sr-welcome__char--fresh,
  .sr-intermission,
  .sr-veil { animation: none; transition: none; }
  .sr-welcome-celebration { display: none; }
}

/* House · Glow · Bones only */
body.theme-scrippy {
  --hull: #241428; --rail: #2c1836; --q400: #3d2448; --disc: #f3d4e8;
  --stage: #3d2448; --hub-light: #3d2448;
}
body.theme-huglo {
  --hull: #000; --rail: #000; --q400: #000; --disc: #fff;
  --stage: #1a1a1a; --hub-light: #1a1a1a;
}
body.theme-bones {
  --hull: #1c1917; --rail: #38322e; --q400: #1c1917; --disc: #ede1c9;
  --stage: #38322e; --hub-light: #38322e;
}

.globe-translator-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: none;
  overflow: hidden;
  pointer-events: none;
}
.globe-translator-overlay[data-open='true'] { display: block; }
.globe-translator-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(8, 4, 14, 0.78);
  pointer-events: none;
}
.globe-translator-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: auto;
}
.globe-translator-overlay[data-retracting='true'] .globe-translator-flag { pointer-events: none !important; }
.globe-translator-flag {
  position: absolute;
  border: 2px solid transparent;
  border-radius: 50%;
  padding: 0.15rem;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: auto;
  z-index: 1;
  background: transparent;
  cursor: pointer;
}
.globe-translator-flag:hover,
.globe-translator-flag:focus-visible {
  transform: translateY(-4px) scale(1.35);
  border-color: rgba(255, 210, 140, 0.9);
  outline: none;
  z-index: 10;
}
.globe-translator-flag.is-active { border-color: #ffc878; }
.globe-translator-flag__img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.globe-translator-toast {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  z-index: 46;
  background: rgba(30, 20, 10, 0.92);
  color: #ffe2b6;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  opacity: 0;
  pointer-events: none;
}
.globe-translator-toast.is-visible { opacity: 1; }
.goog-te-banner-frame,
.skiptranslate > iframe.skiptranslate { display: none !important; }
body { top: 0 !important; }
.goog-te-gadget { font-size: 0 !important; }

@media print {
  body * { visibility: hidden; }
  #print-root, #print-root * { visibility: visible; }
  #print-root { position: absolute; left: 0; top: 0; }
  #print-root .sheet { box-shadow: none; page-break-after: always; margin: 0 auto 0.4in; }
}
