/* Scoped print-size enhancement; no global typography or art alterations. */
#true-scale {
  appearance: none;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--oxide, #a73722);
  font: 12px/1.35 var(--sans, Jost, sans-serif);
  min-height: 44px;
  padding: 8px 2px;
  text-align: left;
}
#true-scale[hidden] { display: none; }
#true-scale:hover { color: var(--ink, #181916); }
html.ts-modal-open,
html.ts-modal-open body { overflow: hidden; }
.ts-dialog {
  --ts-paper: var(--paper, #f4f1e9);
  --ts-ink: var(--ink, #181916);
  --ts-oxide: var(--oxide, #a73722);
  --ts-soft: var(--soft, #56564d);
  --ts-border: var(--line, #c6c1b5);
  --ts-inch: 96px;
  --ts-width: 768px;
  --ts-height: 960px;
  box-sizing: border-box;
  width: min(620px, calc(100% - 24px));
  max-width: calc(100% - 24px);
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  padding: 0;
  margin: auto;
  border: 1px solid var(--ts-ink);
  border-radius: 2px;
  background: var(--ts-paper);
  color: var(--ts-ink);
  font: 16px/1.5 var(--sans, Jost, sans-serif);
  overflow: hidden;
  overscroll-behavior: contain;
}
.ts-dialog::backdrop { background: rgb(24 25 22 / 72%); }
.ts-dialog.ts-viewing { width: min(1100px, calc(100% - 24px)); }
.ts-dialog *, .ts-dialog *::before, .ts-dialog *::after { box-sizing: border-box; }
.ts-dialog [hidden] { display: none !important; }
.ts-layout {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 26px);
  max-height: calc(100dvh - 26px);
  min-width: 0;
}
.ts-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex: 0 0 auto;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--ts-border);
}
.ts-kicker {
  margin: 0 0 8px;
  color: var(--ts-oxide);
  font: 10px/1.5 var(--mono, monospace);
  text-transform: uppercase;
  letter-spacing: .1em;
}
.ts-header h2 {
  margin: 0;
  font: 400 clamp(25px, 4vw, 34px)/1.1 var(--serif, Georgia, serif);
  letter-spacing: -.035em;
}
.ts-body {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 20px 24px 24px;
  scrollbar-gutter: stable;
}
.ts-dialog p { margin: 0; }
.ts-dialog .ts-description { margin-bottom: 12px; text-wrap: pretty; }
.ts-dialog .ts-help { color: var(--ts-soft); font-size: 13px; line-height: 1.5; }
.ts-dialog .ts-notice:not(:empty) {
  margin: 0 0 16px;
  padding-left: 12px;
  border-left: 2px solid var(--ts-oxide);
  font-size: 13px;
}
.ts-dialog button {
  appearance: none;
  font: 14px/1.35 var(--sans, Jost, sans-serif);
  min-height: 44px;
  min-width: 44px;
  padding: 10px 14px;
  border: 1px solid var(--ts-ink);
  border-radius: 0;
  background: transparent;
  color: var(--ts-ink);
  cursor: pointer;
}
.ts-dialog button:hover { background: #e7e3d8; }
.ts-dialog button:disabled { opacity: .5; cursor: default; }
.ts-dialog .ts-primary { background: var(--ts-ink); color: var(--ts-paper); }
.ts-dialog .ts-primary:hover { background: #34352d; }
.ts-dialog .ts-close { border: 0; flex: 0 0 auto; padding: 8px; }
.ts-close span { font-size: 21px; padding-left: 6px; }
.ts-dialog :focus-visible, #true-scale:focus-visible {
  outline: 3px solid var(--oxide, #a73722);
  outline-offset: 3px;
}
.ts-dialog h2:focus { outline: none; }
.ts-line-viewport {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior: contain;
  margin: 18px 0;
  border: 1px solid var(--ts-border);
  background: #ebe7dd;
  scrollbar-gutter: stable;
}
.ts-line-space {
  width: max-content;
  min-width: 100%;
  padding: 28px 20px 18px;
}
.ts-rule {
  position: relative;
  display: block;
  width: var(--ts-inch);
  height: 1px;
  background: var(--ts-ink);
  margin-block: 8px 16px;
  flex: none;
}
/* End-mark centers are exactly --ts-inch apart; stroke width adds no distance. */
.ts-rule::before, .ts-rule::after {
  content: '';
  position: absolute;
  left: 0;
  top: -7px;
  width: 1px;
  height: 15px;
  transform: translateX(-50%);
  background: var(--ts-ink);
}
.ts-rule::after { left: 100%; }
.ts-rule-caption, .ts-reference-caption {
  font: 11px/1.5 var(--mono, monospace);
  color: var(--ts-soft);
}
.ts-slider-label {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  font-size: 14px;
}
#ts-pixel-value { font-family: var(--mono, monospace); color: var(--ts-oxide); }
.ts-adjust {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
  margin: 10px 0;
}
.ts-adjust button { padding: 8px; font-size: 21px; }
.ts-adjust input {
  width: 100%;
  min-width: 0;
  height: 44px;
  margin: 0;
  accent-color: var(--ts-oxide);
  cursor: pointer;
}
.ts-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.ts-dialog .ts-privacy { margin-top: 16px; }
.ts-dialog .ts-work { margin-bottom: 10px; font-size: 14px; }
.ts-work em { font: italic 22px/1.3 var(--serif, Georgia, serif); }
.ts-canvas {
  width: 100%;
  height: clamp(240px, 52vh, 640px);
  height: clamp(240px, 52dvh, 640px);
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y pinch-zoom;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--ts-border);
  background: #e5e1d6;
  margin-top: 14px;
  scrollbar-gutter: stable;
  scroll-behavior: auto;
}
.ts-stage {
  width: max-content;
  min-width: 100%;
  margin: 0;
  padding: 24px;
}
.ts-reference-caption { max-width: var(--ts-width); margin-bottom: 18px; }
.ts-reference { margin-bottom: 26px; }
.ts-impression {
  width: var(--ts-width);
  height: var(--ts-height);
  overflow: hidden;
  background: #d2cfc6;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.ts-impression img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  opacity: 0;
}
.ts-impression img.ts-loaded { opacity: 1; }
.ts-dialog .ts-image-status:not(:empty) { margin-top: 12px; font-size: 13px; }
.ts-dialog .ts-caution { margin-top: 14px; }
@media (max-width: 540px) {
  .ts-header { padding: 16px; gap: 8px; }
  .ts-body { padding: 16px; }
  .ts-actions { flex-direction: column; }
  .ts-actions button { width: 100%; }
  .ts-stage { padding: 18px; }
}
@media (forced-colors: active) {
  .ts-rule, .ts-rule::before, .ts-rule::after { background: CanvasText; }
  .ts-dialog { border-color: CanvasText; }
  .ts-dialog :focus-visible { outline-color: Highlight; }
}
