/* ===== RISO STUDIO - HyperCard skin =====
 * Layered on top of studio.css. Everything is scoped to body.theme-hypercard,
 * so removing that class from the template restores the Win95 skin.
 *
 * Fonts: Chicago 12 and Geneva 9 pixel recreations by Giles Booth
 * (@blogmywiki), as bundled with system.css. ChicagoFLF is the vector fallback.
 */

@font-face {
  font-family: "Chicago_12";
  src:
    url("/fonts/hypercard/ChiKareGo2.woff2") format("woff2"),
    url("/fonts/hypercard/ChiKareGo2.woff") format("woff");
  font-display: swap;
}

@font-face {
  font-family: "Geneva_9";
  src:
    url("/fonts/hypercard/FindersKeepers.woff2") format("woff2"),
    url("/fonts/hypercard/FindersKeepers.woff") format("woff");
  font-display: swap;
}

@font-face {
  font-family: "ChicagoFLF";
  src: url("/fonts/hypercard/ChicagoFLF.woff2") format("woff2");
  font-display: swap;
}

body.theme-hypercard {
  --w95-bg: #fff;
  --w95-highlight: #000;
  --w95-shadow: #000;
  --w95-dark-shadow: #000;
  --w95-window-bg: #fff;
  --studio-canvas-bg: #fff;
  --vw-title-start: #000;
  --vw-title-end: #000;
  --vw-glow: transparent;

  --hc-chicago: "Chicago_12", "ChicagoFLF", "Geneva", sans-serif;
  --hc-geneva: "Geneva_9", "Geneva", sans-serif;
  --hc-mono: "Monaco", "Menlo", monospace;

  /* 1-bit fills */
  --hc-grey-50: repeating-conic-gradient(#000 0% 25%, #fff 0% 50%) 0 0 / 2px 2px;
  --hc-dither-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' shape-rendering='crispEdges'%3E%3Crect width='4' height='4' fill='%23fff'/%3E%3Crect width='1' height='1' fill='%23000'/%3E%3Crect x='2' y='2' width='1' height='1' fill='%23000'/%3E%3C/svg%3E");
  --hc-dither-faint: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' shape-rendering='crispEdges'%3E%3Crect width='4' height='4' fill='%23fff'/%3E%3Crect width='1' height='1' fill='%23000'/%3E%3C/svg%3E");
  --hc-stripes: repeating-linear-gradient(
    to bottom,
    #000 0 1px,
    transparent 1px 2px
  );

  background: #000;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Generic controls ---------- */

.theme-hypercard .win95-raised,
.theme-hypercard .win95-sunken {
  border: 0;
}

.theme-hypercard :focus-visible {
  outline: 1px dotted #000;
  outline-offset: 1px;
}

/* HyperCard "roundRect" button */
.theme-hypercard .win95-btn {
  background: #fff;
  color: #000;
  border: 1px solid #000;
  border-radius: 7px;
  box-shadow: 1px 1px 0 #000;
  font-family: var(--hc-chicago);
  font-size: 16px;
  line-height: 1;
  padding: 1px 12px 0;
  cursor: pointer;
}

.theme-hypercard .win95-btn:hover {
  background: #fff;
}

.theme-hypercard .win95-btn:active,
.theme-hypercard .studio-menubar .win95-btn:active {
  background: #000;
  color: #fff;
  border-color: #000;
  padding: 1px 12px 0;
}

.theme-hypercard .win95-btn:disabled,
.theme-hypercard .reseparate-btn:disabled,
.theme-hypercard .reset-side-btn:disabled {
  background: #fff;
  color: #999;
  border-color: #000;
  opacity: 1;
  cursor: default;
}

.theme-hypercard .btn-emoji {
  display: none;
}

/* Classic checkbox: a box with an X */
.theme-hypercard input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  margin: 0;
  flex-shrink: 0;
  border: 1px solid #000;
  border-radius: 0;
  background: #fff;
  cursor: pointer;
  vertical-align: middle;
}

.theme-hypercard input[type="checkbox"]:checked {
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' shape-rendering='crispEdges'%3E%3Cpath d='M0 0L10 10M10 0L0 10' stroke='%23000' stroke-width='1.2'/%3E%3C/svg%3E")
    center / 100% 100% no-repeat;
}

.theme-hypercard input[type="checkbox"]:active {
  box-shadow: inset 0 0 0 1px #000;
}

/* Pop-up menu */
.theme-hypercard select,
.theme-hypercard .layout-control select {
  -webkit-appearance: none;
  appearance: none;
  height: 20px;
  padding: 0 24px 0 6px;
  border: 1px solid #000;
  border-radius: 0;
  box-shadow: 1px 1px 0 #000;
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='6' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h11L5.5 6z' fill='%23000'/%3E%3C/svg%3E")
    right 6px center no-repeat;
  color: #000;
  font-family: var(--hc-chicago);
  font-size: 16px;
  line-height: 18px;
  cursor: pointer;
}

.theme-hypercard input[type="number"],
.theme-hypercard input[type="text"] {
  border: 1px solid #000;
  border-radius: 0;
  background: #fff;
  color: #000;
  font-family: var(--hc-geneva);
  font-size: 16px;
}

/* Slider: patterned track, rectangular thumb */
.theme-hypercard input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 18px;
  background: transparent;
}

.theme-hypercard input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border: 1px solid #000;
  background: var(--hc-grey-50);
}

.theme-hypercard input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px;
  height: 16px;
  margin-top: -6px;
  border: 1px solid #000;
  border-radius: 0;
  background: #fff;
  box-shadow: 1px 1px 0 #000;
}

.theme-hypercard input[type="range"]:active::-webkit-slider-thumb {
  background: #000;
}

.theme-hypercard input[type="range"]::-moz-range-track {
  height: 4px;
  border: 1px solid #000;
  background: var(--hc-grey-50);
}

.theme-hypercard input[type="range"]::-moz-range-thumb {
  width: 9px;
  height: 14px;
  border: 1px solid #000;
  border-radius: 0;
  background: #fff;
  box-shadow: 1px 1px 0 #000;
}

/* ---------- App shell: desktop + menu bar ---------- */

.theme-hypercard .studio-app {
  width: 100vw;
  height: 100vh;
  margin: 0;
  border: 0;
  border-radius: 8px 8px 0 0;
  box-shadow: none;
  background: var(--hc-grey-50);
  font-family: var(--hc-geneva);
  font-size: 16px;
  color: #000;
}

.theme-hypercard .studio-menubar {
  height: 22px;
  padding: 0 10px;
  gap: 0;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #000;
  border-radius: 8px 8px 0 0;
  font-family: var(--hc-chicago);
  font-size: 16px;
}

.theme-hypercard .menubar-logo {
  display: inline-flex;
  align-items: center;
  padding: 0 8px 0 4px;
  order: 0;
  color: #000;
  text-decoration: none;
  cursor: pointer;
}

.theme-hypercard .menubar-logo__door {
  fill: #fff;
}

.theme-hypercard .menubar-logo:hover,
.theme-hypercard .menubar-logo:active {
  background: #000;
  color: #fff;
}

.theme-hypercard .menubar-logo:hover .menubar-logo__door,
.theme-hypercard .menubar-logo:active .menubar-logo__door {
  fill: #000;
}

.theme-hypercard .menubar-cog {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  padding: 0;
}

.theme-hypercard .menubar-cog__hole {
  fill: #fff;
}

.theme-hypercard .menubar-cog:hover,
.theme-hypercard .studio-app-menu.is-open > .menubar-cog {
  background: #000;
  color: #fff;
}

.theme-hypercard .menubar-cog:hover .menubar-cog__hole,
.theme-hypercard .studio-app-menu.is-open > .menubar-cog .menubar-cog__hole {
  fill: #000;
}

.theme-hypercard .studio-app-menu[data-menu="settings"] .studio-app-menu-dropdown {
  min-width: 248px;
}

/* Menus first, then the controls grouped on the right. */
.theme-hypercard .studio-menubar .studio-app-menu {
  order: 1;
  margin-left: 0;
}

.theme-hypercard .studio-menubar .layout-control {
  order: 2;
  margin-left: auto;
  gap: 6px;
}

.theme-hypercard .studio-menubar .trim-marks-control {
  order: 3;
  margin-left: 12px;
  gap: 6px;
}

.theme-hypercard .studio-menubar .reset-side-btn {
  order: 4;
  margin-left: 14px;
}

.theme-hypercard .studio-menubar .save-zip-btn {
  order: 5;
  margin-left: 8px;
  min-width: 0;
}

.theme-hypercard .studio-menubar .place-order-btn {
  order: 6;
  margin-left: 8px;
}

.theme-hypercard .studio-menubar .win95-btn {
  height: 17px;
  padding: 1px 10px 0;
  font-size: 16px;
  box-shadow: none;
}

.theme-hypercard .studio-menubar .layout-control select {
  height: 17px;
  line-height: 15px;
  min-width: 96px;
  box-shadow: none;
}

.theme-hypercard .studio-app-menu-btn {
  height: 22px;
  padding: 0 10px;
  border: 0;
  font-family: var(--hc-chicago);
  font-size: 16px;
  line-height: 22px;
  color: #000;
  background: transparent;
}

.theme-hypercard .studio-app-menu-btn:disabled {
  color: #808080;
}

.theme-hypercard .studio-app-menu[data-menu="admin"] .studio-app-menu-dropdown {
  min-width: 340px;
}

.theme-hypercard .studio-app-menu-btn.is-active {
  font-weight: normal;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.theme-hypercard .studio-app-menu.is-open > .studio-app-menu-btn,
.theme-hypercard .adjust-win-menu.is-open > .adjust-win-menu-btn {
  background: #000;
  color: #fff;
  border-color: #000;
  text-decoration: none;
}

.theme-hypercard .studio-app-menu-dropdown,
.theme-hypercard .adjust-win-menu-dropdown {
  top: 100%;
  min-width: 190px;
  padding: 0;
  background: #fff;
  border: 1px solid #000;
  box-shadow: 1px 1px 0 #000;
}

.theme-hypercard .studio-app-menu-dropdown {
  top: calc(100% + 1px);
}

.theme-hypercard .studio-app-menu-item,
.theme-hypercard .adjust-win-menu-item {
  padding: 2px 24px 1px 22px;
  font-family: var(--hc-chicago);
  font-size: 16px;
  line-height: 18px;
  color: #000;
}

.theme-hypercard .studio-app-menu-item:hover,
.theme-hypercard .adjust-win-menu-item:hover {
  background: #000;
  color: #fff;
}

.theme-hypercard .studio-app-menu-item:disabled,
.theme-hypercard .studio-app-menu-item:disabled:hover,
.theme-hypercard .adjust-win-menu-item:disabled,
.theme-hypercard .adjust-win-menu-item:disabled:hover {
  background: transparent;
  color: #808080;
}

.theme-hypercard .studio-app-menu-item.is-checked::before,
.theme-hypercard .adjust-win-menu-item.is-checked::before {
  left: 7px;
  top: 2px;
}

.theme-hypercard .studio-app-menu-dropdown hr,
.theme-hypercard .adjust-win-menu-dropdown hr {
  border: 0;
  border-top: 1px dotted #000;
  margin: 3px 0;
}

.theme-hypercard .studio-app-menu-label {
  margin: 3px 0 0;
  padding: 5px 12px 2px 8px;
  border-top: 1px dotted #000;
  box-shadow: none;
  font-family: var(--hc-chicago);
  font-size: 12px;
  line-height: 14px;
  color: #808080;
}

.theme-hypercard .layout-control,
.theme-hypercard .trim-marks-control {
  font-family: var(--hc-chicago);
  font-size: 16px;
}

/* ---------- Card window ---------- */

.theme-hypercard .studio-card-window {
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin: 14px 18px 0;
  background: #fff;
  border: 1px solid #000;
  box-shadow: 2px 2px 0 #000;
}

.theme-hypercard .studio-card-titlebar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: 20px;
  background: #fff;
  border-bottom: 1px solid #000;
  user-select: none;
}

.theme-hypercard .studio-card-titlebar::before,
.theme-hypercard .adjust-popup-header::before {
  content: "";
  position: absolute;
  inset: 4px 2px 3px;
  background: var(--hc-stripes);
  pointer-events: none;
}

.theme-hypercard .studio-card-title {
  position: relative;
  padding: 0 8px;
  background: #fff;
  font-family: var(--hc-chicago);
  font-size: 16px;
  line-height: 18px;
}

.theme-hypercard .studio-card-closebox {
  position: absolute;
  left: 9px;
  top: 4px;
  width: 11px;
  height: 11px;
  background: #fff;
  border: 1px solid #000;
  box-shadow: 0 0 0 1px #fff;
}

.theme-hypercard .studio-middle {
  flex: 1;
  min-height: 0;
}

/* ---------- Left panel: patterns palette + layer fields ---------- */

.theme-hypercard .studio-left {
  width: 148px;
  background: #fff;
  border-right: 1px solid #000;
}

.theme-hypercard .ink-palette {
  gap: 0;
  padding: 10px 11px 11px 10px;
  justify-items: stretch;
  background: #fff;
  border-bottom: 1px solid #000;
}

.theme-hypercard .ink-swatch {
  width: auto;
  height: 28px;
  margin: 0 -1px -1px 0;
  border: 1px solid #000;
  border-radius: 0;
  box-shadow: none;
  transition: none;
}

.theme-hypercard .ink-swatch:hover,
body.theme-hypercard.maintenance-inks .ink-swatch.is-out:hover {
  transform: none;
}

.theme-hypercard .ink-swatch.selected {
  z-index: 1;
  border-color: #000;
  box-shadow:
    inset 0 0 0 2px #000,
    inset 0 0 0 4px #fff;
}

.theme-hypercard .ink-swatch.selected::after {
  display: none;
}

.theme-hypercard .layer-stack {
  padding: 4px 6px 6px;
  gap: 4px;
}

.theme-hypercard .layer-header {
  height: 18px;
  padding: 0 1px;
  gap: 6px;
}

.theme-hypercard .layer-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 0;
  border: 1px solid #000;
  opacity: 1;
  box-shadow: none;
}

.theme-hypercard .layer-slot.disabled .layer-color-dot {
  opacity: 0.35;
}

.theme-hypercard .layer-slot:not(.disabled) .layer-color-dot {
  box-shadow:
    0 0 0 1px #fff,
    0 0 0 2px #000;
}

.theme-hypercard .layer-name {
  font-family: var(--hc-geneva);
  font-size: 16px;
}

.theme-hypercard .layer-preview {
  margin: 0 0 2px;
  border: 1px solid #000;
  background: #fff;
}

.theme-hypercard .layer-preview:has(.layer-thumb),
.theme-hypercard .layer-slot.disabled .layer-preview:has(.layer-thumb) {
  background: #fff;
}

.theme-hypercard .layer-preview.drag-over {
  outline: 2px dashed #000;
  outline-offset: -3px;
}

.theme-hypercard .layer-preview.drag-over:not(:has(.layer-thumb)) {
  background: #fff var(--hc-dither-light);
}

/* Small square buttons (close boxes, A / F, + etc.) */
.theme-hypercard .layer-delete-btn,
.theme-hypercard .aside-delete-btn,
.theme-hypercard .bside-delete-btn,
.theme-hypercard .layer-preview:hover:has(.layer-thumb) .layer-delete-btn,
.theme-hypercard .page-sheet[data-side="a"]:hover .aside-delete-btn,
.theme-hypercard .page-sheet[data-side="b"]:hover .bside-delete-btn {
  border: 1px solid #000;
  border-radius: 0;
  background: #fff;
  color: #000;
  font-family: var(--hc-chicago);
  font-size: 16px;
  line-height: 1;
}

.theme-hypercard .layer-delete-btn:hover,
.theme-hypercard .aside-delete-btn:hover,
.theme-hypercard .bside-delete-btn:hover {
  background: #fff;
}

.theme-hypercard .layer-delete-btn:active,
.theme-hypercard .aside-delete-btn:active,
.theme-hypercard .bside-delete-btn:active {
  background: #000;
  color: #fff;
  padding: 0;
}

.theme-hypercard .layer-adjust-btn {
  width: 18px;
  height: 18px;
  border: 1px solid #000;
  border-radius: 0;
  background: #fff;
  box-shadow: 1px 1px 0 #000;
  color: #000;
  font-family: var(--hc-chicago);
  font-size: 16px;
  font-weight: normal;
  line-height: 16px;
}

.theme-hypercard .layer-adjust-btn:hover {
  background: #fff;
}

.theme-hypercard .layer-adjust-btn:active,
.theme-hypercard .layer-adjust-btn.is-open {
  background: #000;
  color: #fff;
  border-color: #000;
}

.theme-hypercard .layer-slot.is-collage-current .layer-preview {
  outline: 2px solid #000;
  outline-offset: -2px;
}

.theme-hypercard .layer-adjust-btn.is-active::after {
  top: -3px;
  right: -3px;
  width: 7px;
  height: 7px;
  background: #000;
  border: 1px solid #fff;
}

/* ---------- Card canvas ---------- */

.theme-hypercard .studio-canvas {
  background: #fff var(--hc-dither-faint);
}

.theme-hypercard .studio-canvas.canvas-drag-over {
  outline: 2px dashed #000;
  outline-offset: -4px;
}

.theme-hypercard #studio-main-canvas {
  box-shadow:
    0 0 0 1px #000,
    3px 3px 0 1px #000;
}

.theme-hypercard .canvas-drop-hint__box,
.theme-hypercard .maintenance-ink-window,
.theme-hypercard .maintenance-ink-body,
.theme-hypercard .maintenance-ink-body p {
  font-family: var(--hc-chicago);
  font-size: 16px;
  font-weight: normal;
  line-height: 22px;
}

.theme-hypercard .canvas-fit-btn,
.theme-hypercard .canvas-margin-btn {
  padding: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: 1px 1px 0 #000;
}

.theme-hypercard .canvas-fit-btn:active,
.theme-hypercard .canvas-margin-btn:active,
.theme-hypercard .canvas-fit-btn.is-active,
.theme-hypercard .canvas-fit-btn[aria-pressed="true"],
.theme-hypercard .canvas-margin-btn.is-active,
.theme-hypercard .canvas-margin-btn[aria-pressed="true"] {
  background: #000;
  border-color: #000;
  padding: 0;
}

.theme-hypercard .canvas-fit-btn:active .canvas-tool-icon,
.theme-hypercard .canvas-margin-btn:active .canvas-tool-icon,
.theme-hypercard .canvas-fit-btn.is-active .canvas-tool-icon,
.theme-hypercard .canvas-fit-btn[aria-pressed="true"] .canvas-tool-icon,
.theme-hypercard .canvas-margin-btn.is-active .canvas-tool-icon,
.theme-hypercard .canvas-margin-btn[aria-pressed="true"] .canvas-tool-icon {
  filter: brightness(0) invert(1);
}

.theme-hypercard .canvas-tool-icon {
  filter: brightness(0);
}

.theme-hypercard .canvas-margin-toolbar {
  border-bottom: 1px dotted #000;
}

.theme-hypercard .shapes-field-label {
  font-family: var(--hc-chicago);
  font-size: 16px;
  font-weight: normal;
  line-height: 18px;
}

.theme-hypercard .shapes-tool[aria-pressed='true'] {
  background: #000;
  border-color: #000;
}

.theme-hypercard .shapes-tool[aria-pressed='true'] svg {
  filter: brightness(0) invert(1);
}

.theme-hypercard .hc-hourglass {
  image-rendering: pixelated;
}

.theme-hypercard .separation-spinner {
  background: rgba(255, 255, 255, 0.85);
}

.theme-hypercard .spinner-ring {
  border: 2px solid #000;
  border-top-color: transparent;
  border-right-color: transparent;
}

.theme-hypercard .spinner-text {
  font-family: var(--hc-chicago);
  font-size: 16px;
  font-weight: normal;
  color: #000;
  text-shadow: none;
  background: #fff;
  padding: 2px 8px;
  border: 1px solid #000;
  box-shadow: 2px 2px 0 #000;
}

/* Loupe */
.theme-hypercard .loupe-launcher {
  border: 1px solid #000;
  border-radius: 0;
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' shape-rendering='crispEdges'%3E%3Ccircle cx='8' cy='8' r='5.5' fill='%23fff' stroke='%23000' stroke-width='2'/%3E%3Cpath d='M12 12l6 6' stroke='%23000' stroke-width='3'/%3E%3C/svg%3E")
    center no-repeat;
  box-shadow: 2px 2px 0 #000;
}

.theme-hypercard .loupe-launcher:active {
  border-color: #000;
  filter: invert(1);
}

.theme-hypercard .loupe {
  box-shadow:
    0 0 0 1px #000,
    0 0 0 4px #fff,
    0 0 0 5px #000,
    3px 3px 0 5px #000;
}

/* Solid white tile with a thick black frame and hard shadow, so it reads
   against the dithered desktop. The X is drawn, not a font glyph. */
.theme-hypercard .loupe-close {
  top: 0;
  right: 0;
  width: 28px;
  height: 28px;
  border: 2px solid #000;
  border-radius: 0;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' shape-rendering='crispEdges'%3E%3Cpath d='M2 2h2v2H2zM4 4h2v2H4zM6 6h2v2H6zM8 8h2v2H8zM10 10h2v2h-2zM10 2h2v2h-2zM8 4h2v2H8zM4 8h2v2H4zM2 10h2v2H2z' fill='%23000'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 20px 20px;
  box-shadow: 2px 2px 0 #000;
  font-size: 0;
  line-height: 0;
  image-rendering: pixelated;
}

.theme-hypercard .loupe-close:hover,
.theme-hypercard .loupe-close:active {
  background-color: #000;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' shape-rendering='crispEdges'%3E%3Cpath d='M2 2h2v2H2zM4 4h2v2H4zM6 6h2v2H6zM8 8h2v2H8zM10 10h2v2h-2zM10 2h2v2h-2zM8 4h2v2H8zM4 8h2v2H4zM2 10h2v2H2z' fill='%23fff'/%3E%3C/svg%3E");
}

.theme-hypercard .loupe-close:active {
  box-shadow: none;
  transform: translate(2px, 2px);
}

/* ---------- Right panel: the stack of cards ---------- */

.theme-hypercard .studio-right {
  background: #fff;
  border-left: 1px solid #000;
  box-shadow: none;
}

.theme-hypercard .page-tray::-webkit-scrollbar {
  width: 16px;
}

.theme-hypercard .page-tray::-webkit-scrollbar-track {
  background: var(--hc-grey-50);
  border-left: 1px solid #000;
}

.theme-hypercard .page-tray::-webkit-scrollbar-thumb {
  background: #fff;
  border: 1px solid #000;
}

.theme-hypercard .sheet-label {
  font-family: var(--hc-chicago);
  font-weight: normal;
  line-height: 1;
  color: #000;
}

/* Chicago's A is narrow; keep it clear of the dog-ear. */
.theme-hypercard .page-sheet[data-side="a"] .sheet-label {
  top: 4px;
  left: 33%;
}

.theme-hypercard .page-num {
  font-family: var(--hc-chicago);
  font-size: 16px;
  font-weight: normal;
  color: #000;
}

.theme-hypercard .add-bside-btn {
  border: 1px solid #000;
  background: #fff;
  box-shadow: 1px 1px 0 #000;
  font-family: var(--hc-chicago);
  font-size: 16px;
  color: #000;
}

.theme-hypercard .add-bside-btn:hover {
  background: #fff;
}

.theme-hypercard .add-bside-btn:active {
  background: #000;
  color: #fff;
  border-color: #000;
}

.theme-hypercard .page-paper-btn {
  width: 16px;
  height: 16px;
  border: 1px solid #000;
  background: #fff;
  box-shadow: 1px 1px 0 #000;
  font-size: 9px;
  color: #000;
}

.theme-hypercard .page-paper-btn:active,
.theme-hypercard .page-paper-btn.is-open {
  border-color: #000;
  background: #000;
  color: #fff;
}

.theme-hypercard .page-paper-summary {
  gap: 0 5px;
  font-family: var(--hc-geneva);
  font-size: 16px;
  line-height: 1.05;
  color: #000;
}

.theme-hypercard .paper-chip {
  border-color: #000;
}

.theme-hypercard .add-page-btn {
  height: 22px;
  margin: 8px auto 12px;
}

/* ---------- Paper flyout + Paper window ---------- */

.theme-hypercard .paper-flyout {
  padding: 0 10px 10px;
  gap: 8px;
  background: #fff;
  border: 1px solid #000;
  box-shadow: 2px 2px 0 #000;
  font-family: var(--hc-geneva);
  font-size: 16px;
  width: 260px;
}

.theme-hypercard .paper-flyout::after {
  border-left-color: #000;
}

/* Striped drag-bar look, like a HyperCard palette. */
.theme-hypercard .paper-flyout-title {
  position: relative;
  margin: 0 -10px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #000;
  font-family: var(--hc-chicago);
  font-size: 16px;
  font-weight: normal;
}

.theme-hypercard .paper-flyout-title::before {
  content: "";
  position: absolute;
  inset: 4px 2px 3px;
  background: var(--hc-stripes);
}

.theme-hypercard .paper-flyout-title span {
  position: relative;
  padding: 0 8px;
  background: #fff;
  line-height: 18px;
}

.theme-hypercard .paper-field-label {
  font-family: var(--hc-chicago);
  font-size: 16px;
}

.theme-hypercard .paper-field {
  grid-template-columns: 58px 1fr;
}

.theme-hypercard .paper-field input,
.theme-hypercard .paper-table input {
  height: 20px;
  width: 72px;
}

.theme-hypercard .paper-field select,
.theme-hypercard .paper-table select {
  height: 20px;
  font-family: var(--hc-geneva);
}

.theme-hypercard .adjust-popup.paper-window {
  width: 560px;
}

.theme-hypercard .paper-table {
  font-family: var(--hc-geneva);
  font-size: 16px;
}

.theme-hypercard .paper-table thead th {
  border-bottom: 1px solid #000;
  font-family: var(--hc-chicago);
  font-weight: normal;
}

.theme-hypercard .paper-table tbody th {
  font-family: var(--hc-chicago);
  font-weight: normal;
}

.theme-hypercard .paper-table tr.is-unpriced th,
.theme-hypercard .paper-table tr.is-unpriced .paper-row-inks {
  color: #999;
}

.theme-hypercard .paper-breakdown {
  border-top: 1px dotted #000;
  font-family: var(--hc-geneva);
  font-size: 16px;
}

.theme-hypercard .paper-breakdown-line.is-detail {
  color: #000;
}

.theme-hypercard .paper-breakdown-line.is-total {
  border-top: 1px solid #000;
  font-family: var(--hc-chicago);
  font-weight: normal;
}

.theme-hypercard .paper-quote {
  border-top: 1px dotted #000;
  font-family: var(--hc-geneva);
  font-size: 16px;
}

.theme-hypercard .paper-quote-label {
  font-family: var(--hc-chicago);
}

.theme-hypercard .paper-quote-code {
  font-family: var(--hc-mono);
  font-size: 12px;
}

.theme-hypercard .status-cost {
  font-family: var(--hc-mono);
  font-size: 12px;
  font-weight: normal;
}

.theme-hypercard .status-cost:hover {
  text-decoration: none;
  background: #000;
  color: #fff;
}

/* ---------- Status bar as the Message box ---------- */

.theme-hypercard .studio-statusbar {
  position: relative;
  height: auto;
  margin: 12px 18px 12px;
  padding: 12px 10px 4px;
  gap: 18px;
  background: #fff;
  border: 1px solid #000;
  box-shadow: 2px 2px 0 #000;
  font-family: var(--hc-mono);
  font-size: 12px;
  color: #000;
}

.theme-hypercard .studio-statusbar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 8px;
  border-bottom: 1px solid #000;
  background: #fff var(--hc-dither-light);
}

.theme-hypercard .status-gpu,
.theme-hypercard .status-gpu.available {
  color: #000;
}

.theme-hypercard .status-gpu.unavailable {
  background: #000;
  color: #fff;
  padding: 0 4px;
}

/* ---------- Adjust / Filter windows as palettes ---------- */

.theme-hypercard .adjust-popup {
  background: #fff;
  border: 1px solid #000;
  box-shadow: 2px 2px 0 #000;
  font-family: var(--hc-geneva);
  font-size: 16px;
  -webkit-font-smoothing: none;
}

.theme-hypercard .adjust-popup-header {
  position: relative;
  justify-content: center;
  height: 20px;
  padding: 0 6px;
  background: #fff;
  color: #000;
  border-bottom: 1px solid #000;
  font-weight: normal;
}

.theme-hypercard .adjust-popup-title {
  position: relative;
  padding: 0 8px;
  background: #fff;
  font-family: var(--hc-chicago);
  font-size: 16px;
  line-height: 18px;
}

.theme-hypercard .adjust-popup-swatch {
  width: 10px;
  height: 10px;
  border-radius: 0;
  border: 1px solid #000;
}

.theme-hypercard .adjust-popup-close {
  position: absolute;
  left: 8px;
  top: 4px;
  width: 11px;
  height: 11px;
  border: 1px solid #000;
  background: #fff;
  box-shadow: 0 0 0 1px #fff;
  color: transparent;
  font-size: 0;
}

.theme-hypercard .adjust-popup-close:active {
  border-color: #000;
  background:
    linear-gradient(#000, #000) center / 1px 100% no-repeat,
    linear-gradient(#000, #000) center / 100% 1px no-repeat,
    #fff;
}

.theme-hypercard .adjust-popup-toolbar {
  padding: 0 4px;
  background: #fff;
  border-bottom: 1px solid #000;
}

.theme-hypercard .adjust-win-menu-btn {
  height: 20px;
  padding: 0 8px;
  border: 0;
  font-family: var(--hc-chicago);
  font-size: 16px;
  line-height: 20px;
}

.theme-hypercard .adjust-reset-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 17px;
  margin: 1px 0;
  padding: 0 10px;
  border: 1px solid #000;
  border-radius: 7px;
  background: #fff;
  font-family: var(--hc-chicago);
  font-size: 16px;
  line-height: 15px;
}

.theme-hypercard .adjust-reset-btn:active {
  background: #000;
  color: #fff;
  border-color: #000;
}

.theme-hypercard .adjust-panel {
  padding: 10px;
}

.theme-hypercard .adjust-section-label,
.theme-hypercard .halftone-lpi-value {
  font-family: var(--hc-chicago);
  font-size: 16px;
  font-weight: normal;
}

.theme-hypercard .adjust-help,
.theme-hypercard .halftone-pitch-readout,
.theme-hypercard .adjust-curves-legend,
.theme-hypercard .adjust-check-row,
.theme-hypercard .adjust-invert-label,
.theme-hypercard .halftone-angle-row {
  font-family: var(--hc-geneva);
  font-size: 16px;
  line-height: 1.15;
  color: #000;
}

.theme-hypercard .halftone-lpi-mark i {
  background: #000;
}

.theme-hypercard .halftone-lpi-mark b {
  font-family: var(--hc-geneva);
  font-size: 16px;
  color: #000;
}

.theme-hypercard .halftone-lpi-marks {
  height: 22px;
}

.theme-hypercard .adjust-histogram-wrap,
.theme-hypercard .adjust-output-wrap {
  background: var(--hc-dither-light);
  border: 1px solid #000;
}

.theme-hypercard .adjust-curves-wrap {
  background: #fff;
  border: 1px solid #000;
}

.theme-hypercard .adjust-histogram {
  background: var(--hc-dither-light);
}

.theme-hypercard .adjust-levels-numbers input,
.theme-hypercard .adjust-output-numbers input,
.theme-hypercard .halftone-angle-input {
  border: 1px solid #000;
  font-family: var(--hc-geneva);
  font-size: 16px;
}

.theme-hypercard .adjust-blur-numbers {
  font-family: var(--hc-mono);
  font-size: 12px;
  color: #000;
}

.theme-hypercard .adjust-blur-readout {
  border: 1px solid #000;
  padding: 1px 6px;
}

.theme-hypercard .halftone-angle-swatch {
  border: 1px solid #000;
}

.theme-hypercard .halftone-angle-warn {
  color: #000;
  font-family: var(--hc-geneva);
  font-size: 16px;
}

.theme-hypercard .print-preview-menu > .studio-app-menu-btn {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  height: auto;
  padding: 0;
  border: 1px solid #000;
  border-radius: 0;
  background: #fff;
  box-shadow: 2px 2px 0 #000;
  font-family: var(--hc-chicago);
  font-size: 16px;
  font-weight: normal;
  line-height: 18px;
  text-decoration: none;
}

.theme-hypercard .print-preview-menu-label {
  padding: 2px 8px 1px 10px;
}

.theme-hypercard .print-preview-menu-caret {
  border-left-color: currentColor;
}

.theme-hypercard .print-preview-menu > .studio-app-menu-btn.is-active,
.theme-hypercard .print-preview-menu.is-open > .studio-app-menu-btn {
  font-weight: normal;
  background: #000;
  color: #fff;
  border-color: #000;
  box-shadow: none;
  text-decoration: none;
}

.theme-hypercard .print-preview-menu > .studio-app-menu-btn:disabled,
.theme-hypercard .print-preview-menu > .studio-app-menu-btn:disabled.is-active {
  color: #999;
  background: #fff;
  box-shadow: none;
  cursor: default;
}

.theme-hypercard .print-preview-download,
.theme-hypercard .print-preview-split {
  border: 1px solid #000;
  border-radius: 0;
  background: #fff;
  box-shadow: 2px 2px 0 #000;
  font-family: var(--hc-chicago);
  font-size: 16px;
  line-height: 18px;
  padding: 2px 10px 1px;
  cursor: pointer;
}

.theme-hypercard .print-preview-download:active,
.theme-hypercard .print-preview-split:active,
.theme-hypercard .print-preview-split.is-active {
  background: #000;
  color: #fff;
  box-shadow: none;
  font-weight: normal;
  font-synthesis: none;
}

/* Split bar: a dithered rule and a square grip, not the homepage knob. */
.theme-hypercard .print-split__handle::before {
  width: 5px;
  background-color: #fff;
  background-image: repeating-conic-gradient(#000 0% 25%, #fff 0% 50%);
  background-size: 2px 2px;
  box-shadow:
    -1px 0 0 #000,
    1px 0 0 #000;
  image-rendering: pixelated;
}

.theme-hypercard .print-split__knob {
  box-sizing: border-box;
  width: 22px;
  height: 16px;
  border-radius: 0;
  border: 1px solid #000;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' shape-rendering='crispEdges'%3E%3Cg fill='%23000'%3E%3Crect x='2' y='0' width='1' height='1'/%3E%3Crect x='1' y='1' width='2' height='1'/%3E%3Crect x='0' y='2' width='3' height='1'/%3E%3Crect x='1' y='3' width='2' height='1'/%3E%3Crect x='2' y='4' width='1' height='1'/%3E%3Crect x='5' y='0' width='1' height='1'/%3E%3Crect x='5' y='1' width='2' height='1'/%3E%3Crect x='5' y='2' width='3' height='1'/%3E%3Crect x='5' y='3' width='2' height='1'/%3E%3Crect x='5' y='4' width='1' height='1'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 10px;
  box-shadow: 1px 1px 0 #000;
}

.theme-hypercard .print-split__knob svg {
  display: none;
}

.theme-hypercard .print-split__handle:active .print-split__knob {
  background-color: #000;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' shape-rendering='crispEdges'%3E%3Cg fill='%23fff'%3E%3Crect x='2' y='0' width='1' height='1'/%3E%3Crect x='1' y='1' width='2' height='1'/%3E%3Crect x='0' y='2' width='3' height='1'/%3E%3Crect x='1' y='3' width='2' height='1'/%3E%3Crect x='2' y='4' width='1' height='1'/%3E%3Crect x='5' y='0' width='1' height='1'/%3E%3Crect x='5' y='1' width='2' height='1'/%3E%3Crect x='5' y='2' width='3' height='1'/%3E%3Crect x='5' y='3' width='2' height='1'/%3E%3Crect x='5' y='4' width='1' height='1'/%3E%3C/g%3E%3C/svg%3E");
  box-shadow: none;
}

.theme-hypercard .print-preview-scrim {
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2' shape-rendering='crispEdges'%3E%3Crect width='1' height='1' fill='%23000'/%3E%3Crect x='1' y='1' width='1' height='1' fill='%23000'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 2px 2px;
  image-rendering: pixelated;
}

.theme-hypercard .print-preview-window {
  font-family: var(--hc-geneva);
  font-size: 16px;
}

.theme-hypercard .about-lab-version {
  font-family: var(--hc-chicago);
  font-weight: normal;
  font-size: 16px;
}

.theme-hypercard .about-lab-copy {
  font-family: var(--hc-geneva);
  font-size: 16px;
}

.theme-hypercard .order-window,
.theme-hypercard .order-window .print-preview-body,
.theme-hypercard .order-window .print-preview-ask,
.theme-hypercard .order-window .print-preview-note,
.theme-hypercard .order-window .print-preview-status,
.theme-hypercard .order-window .order-maintenance,
.theme-hypercard .order-window .order-line,
.theme-hypercard .order-window .order-page,
.theme-hypercard .order-window .order-field,
.theme-hypercard .order-window .order-delivery,
.theme-hypercard .order-window .order-confirm,
.theme-hypercard .order-window .order-error,
.theme-hypercard .order-window input,
.theme-hypercard .order-window textarea,
.theme-hypercard .order-window .win95-btn {
  font-family: var(--hc-mono);
  font-size: 12px;
  line-height: 1.45;
  -webkit-font-smoothing: auto;
}


.theme-hypercard .order-window {
  color: #000;
}

.theme-hypercard .order-window .win95-btn {
  line-height: 1.2;
  padding: 4px 16px 3px;
}

.theme-hypercard .order-window .win95-btn:active {
  color: #fff;
}

.theme-hypercard .order-window .order-pay-btn {
  font-family: var(--hc-chicago);
  font-size: 16px;
  line-height: 1.2;
  padding: 6px 28px 4px;
}

.theme-hypercard .order-window .order-pay-btn:active {
  color: #fff;
}

.theme-hypercard .order-paid-stamp {
  font-family: var(--hc-chicago);
  font-weight: normal;
}

.theme-hypercard .riso-effect-note-title {
  font-family: var(--hc-chicago);
  font-size: 16px;
  font-weight: normal;
  line-height: 1.25;
}

.theme-hypercard .print-preview-status,
.theme-hypercard .print-preview-name,
.theme-hypercard .print-preview-ask {
  font-family: var(--hc-chicago);
  font-size: 16px;
  line-height: 1.25;
}

.theme-hypercard .print-preview-note {
  font-family: var(--hc-geneva);
  font-size: 16px;
  line-height: 1.3;
}

.theme-hypercard .print-preview-bar {
  height: 14px;
  border: 1px solid #000;
  box-shadow: 2px 2px 0 #000;
}

.theme-hypercard .print-preview-swatch {
  border-radius: 0;
}

/* --- Help: the ? in the menubar and the help cursor --- */
.theme-hypercard .menubar-help {
  order: 7;
  flex: 0 0 22px;
  margin-left: 10px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background: #fff;
  color: #000;
  font-family: var(--hc-chicago);
  font-size: 16px;
  line-height: 22px;
  text-align: center;
  cursor: pointer;
}

.theme-hypercard .menubar-help:hover,
.theme-hypercard .menubar-help:active,
.theme-hypercard .menubar-help[aria-expanded="true"] {
  background: #000;
  color: #fff;
}

/* Help cursor: a clear layer over everything catches the pointer. */
.theme-hypercard .studio-help {
  position: fixed;
  inset: 0;
  z-index: 11000;
  cursor:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' shape-rendering='crispEdges'%3E%3Cpath d='M1 1V17L5 13L8 19.5L10.2 18.5L7.3 12.2H12.5Z' fill='%23000' stroke='%23fff' stroke-width='1' stroke-linejoin='miter'/%3E%3Cpath d='M15 9h1v1h-1zM16 9h1v1h-1zM17 9h1v1h-1zM18 9h1v1h-1zM14 10h1v1h-1zM15 10h1v1h-1zM18 10h1v1h-1zM19 10h1v1h-1zM18 11h1v1h-1zM19 11h1v1h-1zM17 12h1v1h-1zM18 12h1v1h-1zM16 13h1v1h-1zM17 13h1v1h-1zM16 14h1v1h-1zM17 14h1v1h-1zM16 16h1v1h-1zM17 16h1v1h-1zM16 17h1v1h-1zM17 17h1v1h-1z' fill='%23000' stroke='%23fff' stroke-width='2' paint-order='stroke'/%3E%3C/svg%3E")
      1 1,
    help;
  font-family: var(--hc-geneva);
  font-size: 16px;
  line-height: 1.3;
  color: #000;
}

.theme-hypercard .studio-help[hidden],
.theme-hypercard .studio-help__scrim[hidden],
.theme-hypercard .studio-help__note[hidden] {
  display: none;
}

.theme-hypercard .studio-help__scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Whatever the help cursor is over shows in full black, even when disabled. */
.theme-hypercard.help-open [data-help-hot]:disabled,
.theme-hypercard.help-open [data-help-hot] > .studio-app-menu-btn:disabled {
  color: #000;
}

.theme-hypercard .studio-help__note {
  position: absolute;
  box-sizing: border-box;
  max-width: 260px;
  padding: 6px 9px 7px;
  background: #fff;
  border: 1px solid #000;
  box-shadow: 2px 2px 0 #000;
  pointer-events: none;
}

.theme-hypercard .studio-help__note--wide {
  max-width: 340px;
}

.theme-hypercard .studio-help__note b {
  display: block;
  font-family: var(--hc-chicago);
  font-weight: normal;
  margin-bottom: 2px;
}

.theme-hypercard .studio-help__note img {
  display: block;
  width: 100%;
  height: auto;
  margin: 4px 0 8px;
  border: 1px solid #000;
}

/* Staff: everything that has help, and what the selector being edited hits. */
.theme-hypercard.help-open [data-help-has] {
  outline: 1px dashed #000;
  outline-offset: -1px;
}

.theme-hypercard.help-open [data-help-match] {
  outline: 2px solid #000;
  outline-offset: 1px;
}

.theme-hypercard .studio-help-editor {
  position: fixed;
  z-index: 11001;
  box-sizing: border-box;
  width: 340px;
  background: #fff;
  border: 1px solid #000;
  box-shadow: 2px 2px 0 #000;
  font-family: var(--hc-geneva);
  font-size: 14px;
  color: #000;
}

.theme-hypercard .studio-help-editor[hidden] {
  display: none;
}

.theme-hypercard .studio-help-editor__title {
  padding: 3px 8px;
  border-bottom: 1px solid #000;
  font-family: var(--hc-chicago);
  text-align: center;
}

.theme-hypercard .studio-help-editor__body {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.theme-hypercard .studio-help-editor__field {
  display: grid;
  gap: 3px;
}

.theme-hypercard .studio-help-editor__field > span {
  font-family: var(--hc-chicago);
}

.theme-hypercard .studio-help-editor input,
.theme-hypercard .studio-help-editor textarea,
.theme-hypercard .studio-help-editor select {
  box-sizing: border-box;
  width: 100%;
  padding: 3px 5px;
  border: 1px solid #000;
  border-radius: 0;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  color: #000;
}

.theme-hypercard .studio-help-editor input[name="target"] {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px;
}

.theme-hypercard .studio-help-editor textarea {
  resize: vertical;
}

.theme-hypercard .studio-help-editor__error {
  margin: 0;
  font-weight: bold;
}

.theme-hypercard .studio-help-editor__error[hidden],
.theme-hypercard .studio-help-editor [hidden] {
  display: none;
}

.theme-hypercard .studio-help-editor__actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.theme-hypercard .studio-help-editor__actions [data-role="helpEditDelete"] {
  margin-right: auto;
}
